@tempots/dom 37.2.0 → 37.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,7 +1,7 @@
1
- import { DisposalScope as Ce, withScope as Me, Value as $, makeProviderMark as re, prop as B, createRenderable as Oe, easeOutQuad as Pe, guessInterpolate as Le, Signal as j, createSelector as Ie } from "@tempots/core";
2
- import { Computed as Gn, DisposalScope as Qn, ElementPosition as Jn, KeyedPosition as Zn, MemoryStore as zn, Prop as es, Signal as ts, Value as ns, animateSignal as ss, animateSignals as rs, bind as is, chainEasing as os, coalesce as ls, computed as cs, computedOf as as, computedOfAsync as us, computedOfAsyncGenerator as ds, computedRecord as hs, createRenderable as fs, createSelector as ps, delaySignal as ms, easeInBack as gs, easeInBounce as ys, easeInCubic as Ts, easeInElastic as bs, easeInExpo as Ss, easeInOutBack as vs, easeInOutBounce as xs, easeInOutCubic as ws, easeInOutElastic as Es, easeInOutExpo as ks, easeInOutQuad as As, easeInOutQuart as Cs, easeInOutSine as Ms, easeInQuad as Os, easeInQuart as Ps, easeInSine as Ls, easeOutBack as Is, easeOutBounce as Hs, easeOutCubic as Ds, easeOutElastic as Ns, easeOutExpo as Rs, easeOutQuad as _s, easeOutQuart as $s, easeOutSine as Bs, effect as Vs, effectOf as js, endInterpolate as Ys, getCurrentScope as Xs, getParentScope as Fs, getScopeStack as Ws, guessInterpolate as Ks, interpolateDate as qs, interpolateNumber as Us, interpolateString as Gs, joinSignals as Qs, linear as Js, localStorageProp as Zs, makeProviderMark as zs, merge as er, mirrorEasing as tr, popScope as nr, previousSignal as sr, prop as rr, pushScope as ir, reverseEasing as or, scoped as lr, sessionStorageProp as cr, signal as ar, slidingWindowSignal as ur, storedProp as dr, strictEquals as hr, syncProp as fr, untracked as pr, withScope as mr } from "@tempots/core";
1
+ import { DisposalScope as Ce, withScope as Me, Value as $, makeProviderMark as se, prop as B, createRenderable as Oe, easeOutQuad as Pe, guessInterpolate as Le, Signal as j, createSelector as Ie } from "@tempots/core";
2
+ import { Computed as Qn, DisposalScope as Jn, ElementPosition as Zn, KeyedPosition as zn, MemoryStore as er, Prop as tr, Signal as nr, Value as rr, animateSignal as sr, animateSignals as ir, bind as or, chainEasing as lr, coalesce as cr, computed as ar, computedOf as ur, computedOfAsync as dr, computedOfAsyncGenerator as hr, computedRecord as fr, createRenderable as pr, createSelector as mr, delaySignal as gr, easeInBack as yr, easeInBounce as Tr, easeInCubic as vr, easeInElastic as br, easeInExpo as Sr, easeInOutBack as xr, easeInOutBounce as wr, easeInOutCubic as Er, easeInOutElastic as kr, easeInOutExpo as Ar, easeInOutQuad as Cr, easeInOutQuart as Mr, easeInOutSine as Or, easeInQuad as Pr, easeInQuart as Lr, easeInSine as Ir, easeOutBack as Hr, easeOutBounce as Dr, easeOutCubic as Nr, easeOutElastic as Rr, easeOutExpo as _r, easeOutQuad as $r, easeOutQuart as Br, easeOutSine as Vr, effect as jr, effectOf as Yr, endInterpolate as Xr, getCurrentScope as Fr, getParentScope as Wr, getScopeStack as Kr, guessInterpolate as Ur, interpolateDate as qr, interpolateNumber as Gr, interpolateString as Qr, joinSignals as Jr, linear as Zr, localStorageProp as zr, makeProviderMark as es, merge as ts, mirrorEasing as ns, popScope as rs, previousSignal as ss, prop as is, pushScope as os, reverseEasing as ls, scoped as cs, sessionStorageProp as as, signal as us, slidingWindowSignal as ds, storedProp as hs, strictEquals as fs, syncProp as ps, untracked as ms, withScope as gs } from "@tempots/core";
3
3
  import { ProviderNotFoundError as ie, createRenderKit as He } from "@tempots/render";
4
- import { ProviderNotFoundError as yr, createRenderKit as Tr } from "@tempots/render";
4
+ import { ProviderNotFoundError as Ts, createRenderKit as vs } from "@tempots/render";
5
5
  const oe = /* @__PURE__ */ new Set([
6
6
  "checked",
7
7
  "disabled",
@@ -33,8 +33,8 @@ const oe = /* @__PURE__ */ new Set([
33
33
  };
34
34
  if (oe.has(n)) {
35
35
  const t = ue[n] || n;
36
- return (s) => {
37
- s == null ? e[t] = null : e[t] = !!s;
36
+ return (r) => {
37
+ r == null ? e[t] = null : e[t] = !!r;
38
38
  };
39
39
  } else return ce.has(n) ? (t) => {
40
40
  t == null ? e[n] = null : e[n] = Number(t);
@@ -52,7 +52,7 @@ const oe = /* @__PURE__ */ new Set([
52
52
  const e = n;
53
53
  e && e.onblur && (e.onblur = null), !(!n || n.ownerDocument === void 0) && n.parentNode && n.parentNode.removeChild(n);
54
54
  }, Re = (n) => he(n) || fe(n) ? n : n.parentElement, he = (n) => n.nodeType === 1, fe = (n) => n.nodeType === 11;
55
- class S {
55
+ class b {
56
56
  /**
57
57
  * Constructs a new `DOMContext` instance.
58
58
  *
@@ -62,8 +62,8 @@ class S {
62
62
  * @param providers - The `Providers` instance associated with this context.
63
63
  * @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
64
64
  */
65
- constructor(e, t, s, r) {
66
- this.document = e, this.element = t, this.reference = s, this.providers = r;
65
+ constructor(e, t, r, s) {
66
+ this.document = e, this.element = t, this.reference = r, this.providers = s;
67
67
  }
68
68
  /**
69
69
  * Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
@@ -73,8 +73,8 @@ class S {
73
73
  * @param providers - The providers to associate with the `DOMContext`.
74
74
  * @returns A new `DOMContext` instance.
75
75
  */
76
- static of(e, t, s) {
77
- return new S(e.ownerDocument, e, t, s);
76
+ static of(e, t, r) {
77
+ return new b(e.ownerDocument, e, t, r);
78
78
  }
79
79
  /**
80
80
  * Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
@@ -109,8 +109,8 @@ class S {
109
109
  * @returns A new DOMContext focused on the newly created child element
110
110
  */
111
111
  makeChildElement(e, t) {
112
- const s = this.createElement(e, t);
113
- return this.appendOrInsert(s), this.withElement(s);
112
+ const r = this.createElement(e, t);
113
+ return this.appendOrInsert(r), this.withElement(r);
114
114
  }
115
115
  /**
116
116
  * Creates a new text node with the specified text content.
@@ -173,7 +173,7 @@ class S {
173
173
  * @returns A new `DOMContext` instance with the provided `element`.
174
174
  */
175
175
  withElement(e) {
176
- return new S(
176
+ return new b(
177
177
  e.ownerDocument ?? this.document,
178
178
  e,
179
179
  void 0,
@@ -237,7 +237,7 @@ class S {
237
237
  * @returns A new `DOMContext` instance with the specified reference.
238
238
  */
239
239
  withReference(e) {
240
- return new S(
240
+ return new b(
241
241
  this.document,
242
242
  this.element,
243
243
  e,
@@ -251,10 +251,10 @@ class S {
251
251
  * @param value - The provider to set for the given mark.
252
252
  * @returns A new `DOMContext` instance with the specified provider.
253
253
  */
254
- setProvider(e, t, s) {
255
- return new S(this.document, this.element, this.reference, {
254
+ setProvider(e, t, r) {
255
+ return new b(this.document, this.element, this.reference, {
256
256
  ...this.providers,
257
- [e]: [t, s]
257
+ [e]: [t, r]
258
258
  });
259
259
  }
260
260
  /**
@@ -267,8 +267,14 @@ class S {
267
267
  getProvider(e) {
268
268
  if (this.providers[e] === void 0)
269
269
  throw new ie(e);
270
- const [t, s] = this.providers[e];
271
- return { value: t, onUse: s };
270
+ const [t, r] = this.providers[e];
271
+ return { value: t, onUse: r };
272
+ }
273
+ tryGetProvider(e) {
274
+ if (this.providers[e] === void 0)
275
+ return;
276
+ const [t, r] = this.providers[e];
277
+ return { value: t, onUse: r };
272
278
  }
273
279
  clear(e) {
274
280
  e && (this.reference !== void 0 ? V(this.reference) : V(this.element));
@@ -301,10 +307,10 @@ class S {
301
307
  * @param options - The options for the event listener.
302
308
  * @returns A function to remove the event listener.
303
309
  */
304
- on(e, t, s) {
305
- const r = (o) => t(o, this);
306
- return this.element.addEventListener(e, r, s), (o) => {
307
- o && this.element.removeEventListener(e, r, s);
310
+ on(e, t, r) {
311
+ const s = (o) => t(o, this);
312
+ return this.element.addEventListener(e, s, r), (o) => {
313
+ o && this.element.removeEventListener(e, s, r);
308
314
  };
309
315
  }
310
316
  /**
@@ -361,9 +367,9 @@ class S {
361
367
  getWindow() {
362
368
  return this.document.defaultView;
363
369
  }
364
- moveRangeBefore(e, t, s) {
365
- const r = e.reference, o = t.reference, i = s.reference, l = this.element;
366
- let c = r;
370
+ moveRangeBefore(e, t, r) {
371
+ const s = e.reference, o = t.reference, i = r.reference, l = this.element;
372
+ let c = s;
367
373
  for (; c !== null; ) {
368
374
  const h = c.nextSibling;
369
375
  if (l.insertBefore(c, i), c === o) break;
@@ -371,19 +377,19 @@ class S {
371
377
  }
372
378
  }
373
379
  removeRange(e, t) {
374
- const s = e.reference, r = t.reference, o = this.element;
375
- let i = s;
380
+ const r = e.reference, s = t.reference, o = this.element;
381
+ let i = r;
376
382
  for (; i !== null; ) {
377
383
  const l = i.nextSibling;
378
- if (o.removeChild(i), i === r) break;
384
+ if (o.removeChild(i), i === s) break;
379
385
  i = l;
380
386
  }
381
387
  }
382
388
  removeAllBefore(e) {
383
- const t = e.reference, s = this.element;
384
- if (!s.firstChild || s.firstChild === t) return;
385
- const r = this.document.createRange();
386
- r.setStartBefore(s.firstChild), r.setEndBefore(t), r.deleteContents();
389
+ const t = e.reference, r = this.element;
390
+ if (!r.firstChild || r.firstChild === t) return;
391
+ const s = this.document.createRange();
392
+ s.setStartBefore(r.firstChild), s.setEndBefore(t), s.deleteContents();
387
393
  }
388
394
  _detachedParent = null;
389
395
  _detachedNext = null;
@@ -396,20 +402,20 @@ class S {
396
402
  }
397
403
  }
398
404
  const I = (n, e) => {
399
- const t = new Ce(), s = Me(t, () => n.render(e));
400
- return (r = !0) => {
401
- t.dispose(), s(r);
405
+ const t = new Ce(), r = Me(t, () => n.render(e));
406
+ return (s = !0) => {
407
+ t.dispose(), r(s);
402
408
  };
403
- }, Rt = (n, e, { doc: t, clear: s, disposeWithParent: r = !0, providers: o = {} } = {}) => {
409
+ }, Rt = (n, e, { doc: t, clear: r, disposeWithParent: s = !0, providers: o = {} } = {}) => {
404
410
  const i = typeof e == "string" ? (t ?? document).querySelector(e) : e;
405
411
  if (i === null)
406
412
  throw new _e(
407
413
  `Cannot find element by selector for render: ${e}`
408
414
  );
409
- s !== !1 && (t ?? i.ownerDocument) != null && (i.nodeType === 1 || i.nodeType === 11) && (i.innerHTML = "");
410
- const l = Re(i), c = he(i) || fe(i) ? void 0 : i, h = S.of(l, c, o), f = I(n, h);
415
+ r !== !1 && (t ?? i.ownerDocument) != null && (i.nodeType === 1 || i.nodeType === 11) && (i.innerHTML = "");
416
+ const l = Re(i), c = he(i) || fe(i) ? void 0 : i, h = b.of(l, c, o), f = I(n, h);
411
417
  let d;
412
- return r && i.parentElement != null && (d = new MutationObserver((a) => {
418
+ return s && i.parentElement != null && (d = new MutationObserver((a) => {
413
419
  a[0]?.removedNodes.forEach((u) => {
414
420
  u === i && (d?.disconnect(), f(i.nodeType !== 1));
415
421
  });
@@ -423,15 +429,15 @@ const I = (n, e) => {
423
429
  }, _t = (n, {
424
430
  startUrl: e = "https://example.com",
425
431
  selector: t,
426
- providers: s = {}
432
+ providers: r = {}
427
433
  } = {
428
434
  selector: "body"
429
435
  }) => {
430
- const r = $.toSignal(e).deriveProp(), o = new ye(t, void 0), i = new k(o, void 0, { currentURL: r }, s);
436
+ const s = $.toSignal(e).deriveProp(), o = new ye(t, void 0), i = new k(o, void 0, { currentURL: s }, r);
431
437
  return {
432
438
  clear: I(n(), i),
433
439
  root: o,
434
- currentURL: r
440
+ currentURL: s
435
441
  };
436
442
  };
437
443
  class _e extends Error {
@@ -517,8 +523,8 @@ class $t {
517
523
  constructor({
518
524
  select: e,
519
525
  getAttribute: t,
520
- setAttribute: s,
521
- getClass: r,
526
+ setAttribute: r,
527
+ getClass: s,
522
528
  setClass: o,
523
529
  getStyles: i,
524
530
  setStyles: l,
@@ -528,7 +534,7 @@ class $t {
528
534
  getInnerText: d,
529
535
  setInnerText: a
530
536
  }) {
531
- this.select = e, this.getAttribute = t, this.setAttribute = s, this.getClass = r, this.setClass = o, this.getStyles = i, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = h, this.setInnerHTML = f, this.getInnerText = d, this.setInnerText = a;
537
+ this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = s, this.setClass = o, this.getStyles = i, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = h, this.setInnerHTML = f, this.getInnerText = d, this.setInnerText = a;
532
538
  }
533
539
  /**
534
540
  * Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
@@ -539,35 +545,35 @@ class $t {
539
545
  * when you render on the server and then hydrate on the client.
540
546
  */
541
547
  setFromRoot = (e, t) => {
542
- e.getPortals().forEach((r) => {
543
- const o = typeof r.selector == "string" ? this.select(r.selector) : [r.selector];
548
+ e.getPortals().forEach((s) => {
549
+ const o = typeof s.selector == "string" ? this.select(s.selector) : [s.selector];
544
550
  for (const i of o) {
545
551
  if (i == null)
546
552
  throw new Error(
547
- `Cannot find element by selector for render: ${r.selector}`
553
+ `Cannot find element by selector for render: ${s.selector}`
548
554
  );
549
- if (r.hasChildren() && this.appendHTML(i, r.contentToHTML(t)), r.hasInnerHTML()) {
555
+ if (s.hasChildren() && this.appendHTML(i, s.contentToHTML(t)), s.hasInnerHTML()) {
550
556
  if (t) {
551
557
  const l = this.getInnerHTML(i);
552
558
  l != null && this.setAttribute(i, O, l);
553
559
  }
554
- this.setInnerHTML(i, r.getInnerHTML());
560
+ this.setInnerHTML(i, s.getInnerHTML());
555
561
  }
556
- if (r.hasInnerText()) {
562
+ if (s.hasInnerText()) {
557
563
  if (t) {
558
564
  const l = this.getInnerText(i);
559
565
  l != null && this.setAttribute(i, P, l);
560
566
  }
561
- this.setInnerText(i, r.getInnerText());
567
+ this.setInnerText(i, s.getInnerText());
562
568
  }
563
- if (r.hasClasses()) {
569
+ if (s.hasClasses()) {
564
570
  if (t) {
565
571
  const l = this.getClass(i);
566
572
  l != null && this.setAttribute(i, C, l);
567
573
  }
568
- this.setClass(i, r.getClasses().join(" "));
574
+ this.setClass(i, s.getClasses().join(" "));
569
575
  }
570
- if (r.hasStyles()) {
576
+ if (s.hasStyles()) {
571
577
  if (t) {
572
578
  const l = this.getStyles(i);
573
579
  Object.keys(l).length > 0 && this.setAttribute(
@@ -576,10 +582,10 @@ class $t {
576
582
  JSON.stringify(l)
577
583
  );
578
584
  }
579
- this.setStyles(i, r.getStyles());
585
+ this.setStyles(i, s.getStyles());
580
586
  }
581
- if (r.hasAttributes()) {
582
- const l = r.getAttributes();
587
+ if (s.hasAttributes()) {
588
+ const l = s.getAttributes();
583
589
  if (t) {
584
590
  const c = [];
585
591
  l.forEach(([h]) => {
@@ -611,15 +617,15 @@ const pe = (n) => JSON.parse(n.replace(/"/g, '"')), $e = (n) => {
611
617
  }, je = (n) => {
612
618
  const e = n.getAttribute(M);
613
619
  if (n.removeAttribute(M), e != null) {
614
- const t = pe(e), s = Object.entries(t);
615
- s.length > 0 && (n.style.cssText = s.map(([r, o]) => `${r}: ${o}`).join("; "));
620
+ const t = pe(e), r = Object.entries(t);
621
+ r.length > 0 && (n.style.cssText = r.map(([s, o]) => `${s}: ${o}`).join("; "));
616
622
  }
617
623
  }, Ye = (n) => {
618
624
  const e = n.getAttribute(L);
619
625
  if (n.removeAttribute(L), e != null) {
620
626
  const t = pe(e);
621
- Object.entries(t).forEach(([s, r]) => {
622
- r == null ? n.removeAttribute(s) : n.setAttribute(s, r);
627
+ Object.entries(t).forEach(([r, s]) => {
628
+ s == null ? n.removeAttribute(r) : n.setAttribute(r, s);
623
629
  });
624
630
  }
625
631
  }, Bt = () => {
@@ -630,14 +636,14 @@ const pe = (n) => JSON.parse(n.replace(/"/g, '"')), $e = (n) => {
630
636
  P,
631
637
  M,
632
638
  L
633
- ].map((s) => `[${s}]`).join(",");
634
- document.querySelectorAll(e).forEach((s) => {
635
- const r = s;
636
- if (r.hasAttribute(W)) {
637
- V(r);
639
+ ].map((r) => `[${r}]`).join(",");
640
+ document.querySelectorAll(e).forEach((r) => {
641
+ const s = r;
642
+ if (s.hasAttribute(W)) {
643
+ V(s);
638
644
  return;
639
645
  }
640
- r.hasAttribute(C) && $e(r), r.hasAttribute(P) && Ve(r), r.hasAttribute(O) && Be(r), r.hasAttribute(M) && je(r), r.hasAttribute(L) && Ye(r);
646
+ s.hasAttribute(C) && $e(s), s.hasAttribute(P) && Ve(s), s.hasAttribute(O) && Be(s), s.hasAttribute(M) && je(s), s.hasAttribute(L) && Ye(s);
641
647
  });
642
648
  }, Xe = "data-tempo-id", w = /* @__PURE__ */ Symbol("class"), E = /* @__PURE__ */ Symbol("style"), R = /* @__PURE__ */ Symbol("handler"), me = () => Math.random().toString(36).substring(2, 15), Fe = (n) => n.replace(/<[^>]*>?/g, "");
643
649
  class ge {
@@ -707,43 +713,43 @@ class ge {
707
713
  if (this.properties.id === e)
708
714
  return this;
709
715
  for (const t of this.elements()) {
710
- const s = t.getById(e);
711
- if (s != null)
712
- return s;
716
+ const r = t.getById(e);
717
+ if (r != null)
718
+ return r;
713
719
  }
714
720
  }
715
721
  trigger(e, t) {
716
- ((this.properties[R] ?? {})[e] ?? []).forEach((r) => r(t));
722
+ ((this.properties[R] ?? {})[e] ?? []).forEach((s) => s(t));
717
723
  }
718
724
  click() {
719
725
  this.trigger("click", {});
720
726
  }
721
- on(e, t, s, r) {
722
- const o = this.properties[R] ??= {}, i = r?.once ? (c) => {
723
- l(), t(c, s);
724
- } : (c) => t(c, s);
727
+ on(e, t, r, s) {
728
+ const o = this.properties[R] ??= {}, i = s?.once ? (c) => {
729
+ l(), t(c, r);
730
+ } : (c) => t(c, r);
725
731
  o[e] = [...o[e] ?? [], i];
726
732
  const l = () => {
727
733
  const c = o[e] ?? [], h = c.indexOf(i);
728
- h !== -1 && (c.splice(h, 1), c.length === 0 ? (delete o[e], Object.keys(o).length === 0 && delete this.properties[R]) : o[e] = c, r?.signal != null && r.signal.removeEventListener("abort", l));
734
+ h !== -1 && (c.splice(h, 1), c.length === 0 ? (delete o[e], Object.keys(o).length === 0 && delete this.properties[R]) : o[e] = c, s?.signal != null && s.signal.removeEventListener("abort", l));
729
735
  };
730
- return r?.signal != null && r.signal.addEventListener("abort", l), l;
736
+ return s?.signal != null && s.signal.addEventListener("abort", l), l;
731
737
  }
732
738
  addClasses(e) {
733
739
  if (e.length === 0)
734
740
  return;
735
- const t = this.properties[w] ??= [], s = new Set(t);
736
- for (const r of e)
737
- s.has(r) || (t.push(r), s.add(r));
741
+ const t = this.properties[w] ??= [], r = new Set(t);
742
+ for (const s of e)
743
+ r.has(s) || (t.push(s), r.add(s));
738
744
  }
739
745
  removeClasses(e) {
740
746
  if (e.length === 0)
741
747
  return;
742
- const t = this.properties[w] ??= [], s = new Set(e);
743
- let r = 0;
748
+ const t = this.properties[w] ??= [], r = new Set(e);
749
+ let s = 0;
744
750
  for (let o = 0; o < t.length; o++)
745
- s.has(t[o]) || (t[r] = t[o], r++);
746
- t.length = r, t.length === 0 && delete this.properties[w];
751
+ r.has(t[o]) || (t[s] = t[o], s++);
752
+ t.length = s, t.length === 0 && delete this.properties[w];
747
753
  }
748
754
  getClasses() {
749
755
  return this.properties[w] ?? [];
@@ -759,8 +765,8 @@ class ge {
759
765
  );
760
766
  }
761
767
  setStyle(e, t) {
762
- const s = this.properties[E] ??= {};
763
- s[e] = t, t === "" && (delete s[e], Object.keys(s).length === 0 && delete this.properties[E]);
768
+ const r = this.properties[E] ??= {};
769
+ r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[E]);
764
770
  }
765
771
  getStyle(e) {
766
772
  return this.properties[E]?.[e] ?? "";
@@ -772,14 +778,14 @@ class ge {
772
778
  const t = this.properties;
773
779
  return {
774
780
  get: () => t[e],
775
- set: (s) => t[e] = s
781
+ set: (r) => t[e] = r
776
782
  };
777
783
  }
778
784
  }
779
785
  const We = (n) => n.replace(/"/g, "&quot;"), Ke = (n) => n.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
780
- class qe extends ge {
781
- constructor(e, t, s) {
782
- super(s), this.tagName = e, this.namespace = t;
786
+ class Ue extends ge {
787
+ constructor(e, t, r) {
788
+ super(r), this.tagName = e, this.namespace = t;
783
789
  }
784
790
  isPortal() {
785
791
  return !1;
@@ -790,12 +796,12 @@ class qe extends ge {
790
796
  */
791
797
  buildAttributesString(e) {
792
798
  let t = null;
793
- const s = this.namespace ? ` xmlns="${this.namespace}"` : "", r = this.getVisibleAttributes().map(([i, l]) => i === "class" ? ` class="${l.join(" ")}"` : i === "style" ? typeof l == "string" ? ` style="${l}"` : ` style="${Object.entries(l).map(([c, h]) => `${c}: ${h};`).join(" ")}"` : Ge.has(i) ? ` ${i}` : i === "innerHTML" ? (t = l, "") : i === "innerText" ? (t = Ke(l), "") : ` ${i}="${We(l)}"`).join(""), o = e ? ` ${W} ${Xe}="${this.id}"` : "";
794
- return { attrs: `${s}${r}${o}`, innerHTML: t };
799
+ const r = this.namespace ? ` xmlns="${this.namespace}"` : "", s = this.getVisibleAttributes().map(([i, l]) => i === "class" ? ` class="${l.join(" ")}"` : i === "style" ? typeof l == "string" ? ` style="${l}"` : ` style="${Object.entries(l).map(([c, h]) => `${c}: ${h};`).join(" ")}"` : Ge.has(i) ? ` ${i}` : i === "innerHTML" ? (t = l, "") : i === "innerText" ? (t = Ke(l), "") : ` ${i}="${We(l)}"`).join(""), o = e ? ` ${W} ${Xe}="${this.id}"` : "";
800
+ return { attrs: `${r}${s}${o}`, innerHTML: t };
795
801
  }
796
802
  toHTML(e = !1) {
797
- const t = this.children.map((o) => o.toHTML()).join(""), { attrs: s, innerHTML: r } = this.buildAttributesString(e);
798
- return Z.has(this.tagName) && t === "" ? `<${this.tagName}${s} />` : `<${this.tagName}${s}>${r ?? t}</${this.tagName}>`;
803
+ const t = this.children.map((o) => o.toHTML()).join(""), { attrs: r, innerHTML: s } = this.buildAttributesString(e);
804
+ return Z.has(this.tagName) && t === "" ? `<${this.tagName}${r} />` : `<${this.tagName}${r}>${s ?? t}</${this.tagName}>`;
799
805
  }
800
806
  /**
801
807
  * Generates HTML output as an async stream of string chunks.
@@ -805,13 +811,13 @@ class qe extends ge {
805
811
  * @yields String chunks of HTML content.
806
812
  */
807
813
  async *toHTMLStream(e) {
808
- const t = e?.generatePlaceholders ?? !1, { attrs: s, innerHTML: r } = this.buildAttributesString(t);
814
+ const t = e?.generatePlaceholders ?? !1, { attrs: r, innerHTML: s } = this.buildAttributesString(t);
809
815
  if (Z.has(this.tagName) && this.children.length === 0) {
810
- yield `<${this.tagName}${s} />`;
816
+ yield `<${this.tagName}${r} />`;
811
817
  return;
812
818
  }
813
- if (yield `<${this.tagName}${s}>`, r !== null)
814
- yield r;
819
+ if (yield `<${this.tagName}${r}>`, s !== null)
820
+ yield s;
815
821
  else
816
822
  for (const o of this.children)
817
823
  yield* o.toHTMLStream(e);
@@ -850,7 +856,7 @@ class ye extends ge {
850
856
  yield* t.toHTMLStream(e);
851
857
  }
852
858
  }
853
- class Ue {
859
+ class qe {
854
860
  constructor(e) {
855
861
  this.text = e;
856
862
  }
@@ -878,8 +884,8 @@ class Ue {
878
884
  }
879
885
  }
880
886
  class k {
881
- constructor(e, t, s, r) {
882
- this.element = e, this.reference = t, this.container = s, this.providers = r;
887
+ constructor(e, t, r, s) {
888
+ this.element = e, this.reference = t, this.container = r, this.providers = s;
883
889
  }
884
890
  appendOrInsert(e) {
885
891
  if (this.reference != null) {
@@ -889,16 +895,16 @@ class k {
889
895
  this.element.children.push(e);
890
896
  }
891
897
  makeChildElement(e, t) {
892
- const s = new qe(e, t, this.element);
893
- return this.appendOrInsert(s), new k(
894
- s,
898
+ const r = new Ue(e, t, this.element);
899
+ return this.appendOrInsert(r), new k(
900
+ r,
895
901
  void 0,
896
902
  this.container,
897
903
  this.providers
898
904
  );
899
905
  }
900
906
  makeChildText(e) {
901
- const t = new Ue(String(e));
907
+ const t = new qe(String(e));
902
908
  return this.appendOrInsert(t), new k(
903
909
  this.element,
904
910
  t,
@@ -934,17 +940,23 @@ class k {
934
940
  * @param value - The provider to set for the given mark.
935
941
  * @returns A new `DOMContext` instance with the specified provider.
936
942
  */
937
- setProvider(e, t, s) {
943
+ setProvider(e, t, r) {
938
944
  return new k(this.element, this.reference, this.container, {
939
945
  ...this.providers,
940
- [e]: [t, s]
946
+ [e]: [t, r]
941
947
  });
942
948
  }
943
949
  getProvider(e) {
944
950
  if (this.providers[e] === void 0)
945
951
  throw new ie(e);
946
- const [t, s] = this.providers[e];
947
- return { value: t, onUse: s };
952
+ const [t, r] = this.providers[e];
953
+ return { value: t, onUse: r };
954
+ }
955
+ tryGetProvider(e) {
956
+ if (this.providers[e] === void 0)
957
+ return;
958
+ const [t, r] = this.providers[e];
959
+ return { value: t, onUse: r };
948
960
  }
949
961
  clear(e) {
950
962
  e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
@@ -982,17 +994,17 @@ class k {
982
994
  makeAccessors(e) {
983
995
  return this.element.makeAccessors(e);
984
996
  }
985
- moveRangeBefore(e, t, s) {
986
- const r = e.reference, o = t.reference, i = s.reference, l = this.element.children, c = l.indexOf(r), f = l.indexOf(o) - c + 1, d = l.splice(c, f), a = l.indexOf(i);
997
+ moveRangeBefore(e, t, r) {
998
+ const s = e.reference, o = t.reference, i = r.reference, l = this.element.children, c = l.indexOf(s), f = l.indexOf(o) - c + 1, d = l.splice(c, f), a = l.indexOf(i);
987
999
  l.splice(a, 0, ...d);
988
1000
  }
989
1001
  removeRange(e, t) {
990
- const s = e.reference, r = t.reference, o = this.element.children, i = o.indexOf(s), c = o.indexOf(r) - i + 1;
1002
+ const r = e.reference, s = t.reference, o = this.element.children, i = o.indexOf(r), c = o.indexOf(s) - i + 1;
991
1003
  o.splice(i, c);
992
1004
  }
993
1005
  removeAllBefore(e) {
994
- const t = e.reference, s = this.element.children, r = s.indexOf(t);
995
- r > 0 && s.splice(0, r);
1006
+ const t = e.reference, r = this.element.children, s = r.indexOf(t);
1007
+ s > 0 && r.splice(0, s);
996
1008
  }
997
1009
  detach() {
998
1010
  }
@@ -1013,13 +1025,13 @@ const Ge = /* @__PURE__ */ new Set([
1013
1025
  function Je() {
1014
1026
  const n = Qe(), e = n?.matchMedia("(prefers-reduced-motion: reduce)"), t = B(e?.matches ?? !1);
1015
1027
  if (e != null) {
1016
- const s = (r) => t.set(r.matches);
1017
- e.addEventListener("change", s), t.onDispose(() => e.removeEventListener("change", s));
1028
+ const r = (s) => t.set(s.matches);
1029
+ e.addEventListener("change", r), t.onDispose(() => e.removeEventListener("change", r));
1018
1030
  }
1019
1031
  return t;
1020
1032
  }
1021
1033
  const Vt = {
1022
- mark: re("ReducedMotion"),
1034
+ mark: se("ReducedMotion"),
1023
1035
  create: () => {
1024
1036
  const n = Je();
1025
1037
  return {
@@ -1028,23 +1040,23 @@ const Vt = {
1028
1040
  };
1029
1041
  }
1030
1042
  }, Te = /* @__PURE__ */ Symbol("DOM_RENDERABLE"), y = (n) => Oe(Te, n);
1031
- function q(n) {
1032
- let e = null, t = null, s = !1;
1033
- const r = (o) => {
1034
- if (s) return;
1043
+ function U(n) {
1044
+ let e = null, t = null, r = !1;
1045
+ const s = (o) => {
1046
+ if (r) return;
1035
1047
  const i = e === null ? 0 : o - e;
1036
- e = o, n(i), t = requestAnimationFrame(r);
1048
+ e = o, n(i), t = requestAnimationFrame(s);
1037
1049
  };
1038
- return t = requestAnimationFrame(r), {
1050
+ return t = requestAnimationFrame(s), {
1039
1051
  dispose: () => {
1040
- s = !0, t !== null && cancelAnimationFrame(t);
1052
+ r = !0, t !== null && cancelAnimationFrame(t);
1041
1053
  }
1042
1054
  };
1043
1055
  }
1044
1056
  const jt = (n) => y((e) => {
1045
- const t = q(n);
1046
- return (s) => {
1047
- t.dispose(), e.clear(s);
1057
+ const t = U(n);
1058
+ return (r) => {
1059
+ t.dispose(), e.clear(r);
1048
1060
  };
1049
1061
  });
1050
1062
  function Yt(n) {
@@ -1052,11 +1064,11 @@ function Yt(n) {
1052
1064
  if (e == null) return !1;
1053
1065
  const t = e.activeElement;
1054
1066
  if (t == null) return !1;
1055
- const s = t.tagName;
1056
- return s === "INPUT" || s === "TEXTAREA" || s === "SELECT" || t.isContentEditable === !0;
1067
+ const r = t.tagName;
1068
+ return r === "INPUT" || r === "TEXTAREA" || r === "SELECT" || t.isContentEditable === !0;
1057
1069
  }
1058
1070
  function Xt(n, e) {
1059
- const t = e?.duration ?? 300, s = e?.easing ?? Pe, r = e?.reducedMotion;
1071
+ const t = e?.duration ?? 300, r = e?.easing ?? Pe, s = e?.reducedMotion;
1060
1072
  let o = e?.interpolate;
1061
1073
  const i = B(n);
1062
1074
  let l = null, c = n, h = n, f = 0;
@@ -1064,22 +1076,22 @@ function Xt(n, e) {
1064
1076
  l !== null && (l.dispose(), l = null);
1065
1077
  };
1066
1078
  return { value: i, tweenTo: (p) => {
1067
- if (d(), t <= 0 || r != null && r.get() === !0) {
1079
+ if (d(), t <= 0 || s != null && s.get() === !0) {
1068
1080
  i.set(p);
1069
1081
  return;
1070
1082
  }
1071
- c = i.get(), h = p, f = 0, o == null && (o = Le(c)), l = q((m) => {
1083
+ c = i.get(), h = p, f = 0, o == null && (o = Le(c)), l = U((m) => {
1072
1084
  f += m;
1073
- const g = Math.min(f / t, 1), b = s(g);
1074
- i.set(o(c, h, b)), g >= 1 && d();
1085
+ const g = Math.min(f / t, 1), v = r(g);
1086
+ i.set(o(c, h, v)), g >= 1 && d();
1075
1087
  });
1076
1088
  }, cancel: d, dispose: () => {
1077
1089
  d(), i.dispose();
1078
1090
  } };
1079
1091
  }
1080
1092
  function z(n, e) {
1081
- const t = n.clientX - e.clientX, s = n.clientY - e.clientY;
1082
- return Math.hypot(t, s);
1093
+ const t = n.clientX - e.clientX, r = n.clientY - e.clientY;
1094
+ return Math.hypot(t, r);
1083
1095
  }
1084
1096
  function ee(n, e) {
1085
1097
  return {
@@ -1088,9 +1100,9 @@ function ee(n, e) {
1088
1100
  };
1089
1101
  }
1090
1102
  function Ze(n, e, t) {
1091
- const s = t?.minScale ?? 0.1, r = t?.maxScale ?? 5;
1103
+ const r = t?.minScale ?? 0.1, s = t?.maxScale ?? 5;
1092
1104
  let o = 0, i = { x: 0, y: 0 }, l = { scale: 1, panX: 0, panY: 0 };
1093
- const c = (a) => Math.min(r, Math.max(s, a));
1105
+ const c = (a) => Math.min(s, Math.max(r, a));
1094
1106
  return { onTouchStart: (a) => {
1095
1107
  if (a.touches.length !== 2) return;
1096
1108
  a.preventDefault();
@@ -1099,27 +1111,27 @@ function Ze(n, e, t) {
1099
1111
  }, onTouchMove: (a) => {
1100
1112
  if (a.touches.length !== 2) return;
1101
1113
  a.preventDefault();
1102
- const u = a.touches[0], p = a.touches[1], m = z(u, p), g = ee(u, p), b = e(), F = m / o, U = c(l.scale * F), G = i.x - b.left, Q = i.y - b.top, we = g.x - i.x, Ee = g.y - i.y, J = U / l.scale, ke = G - (G - l.panX) * J + we, Ae = Q - (Q - l.panY) * J + Ee;
1103
- n.set({ scale: U, panX: ke, panY: Ae });
1104
- }, onTouchEnd: (a) => {
1114
+ const u = a.touches[0], p = a.touches[1], m = z(u, p), g = ee(u, p), v = e(), F = m / o, q = c(l.scale * F), G = i.x - v.left, Q = i.y - v.top, we = g.x - i.x, Ee = g.y - i.y, J = q / l.scale, ke = G - (G - l.panX) * J + we, Ae = Q - (Q - l.panY) * J + Ee;
1115
+ n.set({ scale: q, panX: ke, panY: Ae });
1116
+ }, onTouchEnd: () => {
1105
1117
  } };
1106
1118
  }
1107
1119
  function ze(n, e) {
1108
- const t = e?.friction ?? 0.95, s = e?.minVelocity ?? 0.5;
1109
- let r = 0, o = 0, i = null, l = 0, c = 0;
1120
+ const t = e?.friction ?? 0.95, r = e?.minVelocity ?? 0.5;
1121
+ let s = 0, o = 0, i = null, l = 0, c = 0;
1110
1122
  return { track: (d, a) => {
1111
1123
  const u = performance.now();
1112
1124
  if (i !== null) {
1113
1125
  const p = (u - i) / 1e3;
1114
- p > 0 && (l = (d - r) / p, c = (a - o) / p);
1126
+ p > 0 && (l = (d - s) / p, c = (a - o) / p);
1115
1127
  }
1116
- r = d, o = a, i = u;
1128
+ s = d, o = a, i = u;
1117
1129
  }, release: () => {
1118
1130
  let d = l, a = c;
1119
1131
  i = null, l = 0, c = 0;
1120
- const u = q((p) => {
1132
+ const u = U((p) => {
1121
1133
  const m = p / 1e3;
1122
- if (d *= t, a *= t, Math.hypot(d, a) < s) {
1134
+ if (d *= t, a *= t, Math.hypot(d, a) < r) {
1123
1135
  u.dispose();
1124
1136
  return;
1125
1137
  }
@@ -1129,13 +1141,13 @@ function ze(n, e) {
1129
1141
  } };
1130
1142
  }
1131
1143
  function et(n, e) {
1132
- const t = [], s = e.createDocumentFragment();
1133
- return K(n, s, [], { count: 0 }, t, e) ? { fragment: s, slots: t, topNodeCount: s.childNodes.length } : null;
1144
+ const t = [], r = e.createDocumentFragment();
1145
+ return K(n, r, [], { count: 0 }, t, e) ? { fragment: r, slots: t, topNodeCount: r.childNodes.length } : null;
1134
1146
  }
1135
- function K(n, e, t, s, r, o) {
1147
+ function K(n, e, t, r, s, o) {
1136
1148
  switch (n.kind) {
1137
1149
  case "element": {
1138
- const { tag: i, ns: l, children: c } = n, h = l != null ? o.createElementNS(l, i) : o.createElement(i), f = [...t, s.count++];
1150
+ const { tag: i, ns: l, children: c } = n, h = l != null ? o.createElementNS(l, i) : o.createElement(i), f = [...t, r.count++];
1139
1151
  let d = "";
1140
1152
  for (let u = 0; u < c.length; u++) {
1141
1153
  const p = c[u];
@@ -1143,84 +1155,84 @@ function K(n, e, t, s, r, o) {
1143
1155
  }
1144
1156
  d && h.setAttribute("class", d), e.appendChild(h);
1145
1157
  for (let u = 0; u < c.length; u++)
1146
- c[u].kind === "dynamic-attr" && r.push({ path: f, kind: "dynamic-attr" });
1158
+ c[u].kind === "dynamic-attr" && s.push({ path: f, kind: "dynamic-attr" });
1147
1159
  const a = { count: 0 };
1148
1160
  for (let u = 0; u < c.length; u++) {
1149
1161
  const p = c[u];
1150
- if (!(p.kind === "static-attr" || p.kind === "dynamic-attr") && !K(p, h, f, a, r, o))
1162
+ if (!(p.kind === "static-attr" || p.kind === "dynamic-attr") && !K(p, h, f, a, s, o))
1151
1163
  return !1;
1152
1164
  }
1153
1165
  return !0;
1154
1166
  }
1155
1167
  case "static-text":
1156
- return e.appendChild(o.createTextNode(n.text)), s.count++, !0;
1168
+ return e.appendChild(o.createTextNode(n.text)), r.count++, !0;
1157
1169
  case "dynamic-text":
1158
- return e.appendChild(o.createTextNode("")), r.push({
1159
- path: [...t, s.count++],
1170
+ return e.appendChild(o.createTextNode("")), s.push({
1171
+ path: [...t, r.count++],
1160
1172
  kind: "dynamic-text"
1161
1173
  }), !0;
1162
1174
  case "fragment": {
1163
1175
  const { children: i } = n;
1164
1176
  for (let l = 0; l < i.length; l++)
1165
- if (!K(i[l], e, t, s, r, o))
1177
+ if (!K(i[l], e, t, r, s, o))
1166
1178
  return !1;
1167
1179
  return !0;
1168
1180
  }
1169
1181
  case "empty":
1170
1182
  return !0;
1171
1183
  default:
1172
- return n.kind === void 0 ? (e.appendChild(o.createComment("")), r.push({
1173
- path: [...t, s.count++],
1184
+ return n.kind === void 0 ? (e.appendChild(o.createComment("")), s.push({
1185
+ path: [...t, r.count++],
1174
1186
  kind: "slot"
1175
1187
  }), !0) : !1;
1176
1188
  }
1177
1189
  }
1178
1190
  function tt(n, e) {
1179
1191
  let t = n;
1180
- for (let s = 0; s < e.length; s++)
1181
- t = t.childNodes[e[s]];
1192
+ for (let r = 0; r < e.length; r++)
1193
+ t = t.childNodes[e[r]];
1182
1194
  return t;
1183
1195
  }
1184
1196
  function nt(n, e, t) {
1185
- const s = e, r = n.fragment.cloneNode(!0), o = n.topNodeCount, i = new Array(o);
1186
- let l = r.firstChild;
1197
+ const r = e, s = n.fragment.cloneNode(!0), o = n.topNodeCount, i = new Array(o);
1198
+ let l = s.firstChild;
1187
1199
  for (let a = 0; a < o; a++)
1188
1200
  i[a] = l, l = l.nextSibling;
1189
1201
  const c = n.slots.length, h = new Array(c);
1190
1202
  for (let a = 0; a < c; a++)
1191
- h[a] = tt(r, n.slots[a].path);
1192
- s.appendOrInsert(r);
1203
+ h[a] = tt(s, n.slots[a].path);
1204
+ r.appendOrInsert(s);
1193
1205
  const f = new Array(c);
1194
1206
  for (let a = 0; a < c; a++) {
1195
1207
  const u = n.slots[a], p = h[a];
1196
1208
  if (u.kind === "dynamic-text") {
1197
1209
  const m = t[a], g = p;
1198
- g.textContent = m.transform(m.source.value), f[a] = m.source.onChange((b) => {
1199
- g.textContent = m.transform(b);
1210
+ g.textContent = m.transform(m.source.value), f[a] = m.source.onChange((v) => {
1211
+ g.textContent = m.transform(v);
1200
1212
  });
1201
1213
  } else if (u.kind === "dynamic-attr") {
1202
- const m = t[a], g = new S(
1203
- s.document,
1214
+ const m = t[a], g = new b(
1215
+ r.document,
1204
1216
  p,
1205
1217
  void 0,
1206
- s.providers
1218
+ r.providers
1207
1219
  );
1208
1220
  f[a] = m.render(g);
1209
1221
  } else {
1210
- const m = t[a], g = p, b = new S(
1211
- s.document,
1222
+ const m = t[a], g = p, v = new b(
1223
+ r.document,
1212
1224
  g.parentNode,
1213
1225
  g,
1214
- s.providers
1226
+ r.providers
1215
1227
  );
1216
- f[a] = m.render(b), g.remove();
1228
+ f[a] = m.render(v), g.remove();
1217
1229
  }
1218
1230
  }
1219
- const d = new S(
1220
- s.document,
1221
- s.element,
1231
+ const d = new b(
1232
+ r.document,
1233
+ r.element,
1222
1234
  i[0],
1223
- s.providers
1235
+ r.providers
1224
1236
  );
1225
1237
  return {
1226
1238
  clear: (a) => {
@@ -1235,38 +1247,38 @@ function nt(n, e, t) {
1235
1247
  startCtx: d
1236
1248
  };
1237
1249
  }
1238
- function st(n) {
1250
+ function rt(n) {
1239
1251
  const e = [];
1240
- function t(s) {
1241
- switch (s.kind) {
1252
+ function t(r) {
1253
+ switch (r.kind) {
1242
1254
  case "element": {
1243
- const { tag: r, children: o } = s;
1244
- e.push(`E:${r}`);
1255
+ const { tag: s, children: o } = r;
1256
+ e.push(`E:${s}`);
1245
1257
  for (const i of o) if (!t(i)) return !1;
1246
1258
  e.push("/E");
1247
1259
  break;
1248
1260
  }
1249
1261
  case "static-attr":
1250
- e.push(`SA:${s.name}=${s.value}`);
1262
+ e.push(`SA:${r.name}=${r.value}`);
1251
1263
  break;
1252
1264
  case "dynamic-attr":
1253
1265
  e.push("DA");
1254
1266
  break;
1255
1267
  case "static-text":
1256
- e.push(`ST:${s.text}`);
1268
+ e.push(`ST:${r.text}`);
1257
1269
  break;
1258
1270
  case "dynamic-text":
1259
1271
  e.push("DT");
1260
1272
  break;
1261
1273
  case "fragment": {
1262
- const { children: r } = s;
1263
- for (const o of r) if (!t(o)) return !1;
1274
+ const { children: s } = r;
1275
+ for (const o of s) if (!t(o)) return !1;
1264
1276
  break;
1265
1277
  }
1266
1278
  case "empty":
1267
1279
  break;
1268
1280
  default:
1269
- if (s.kind === void 0) {
1281
+ if (r.kind === void 0) {
1270
1282
  e.push("S");
1271
1283
  break;
1272
1284
  }
@@ -1276,13 +1288,13 @@ function st(n) {
1276
1288
  }
1277
1289
  return t(n) ? e.join("|") : null;
1278
1290
  }
1279
- function rt(n) {
1291
+ function st(n) {
1280
1292
  const e = [];
1281
- function t(s) {
1282
- switch (s.kind) {
1293
+ function t(r) {
1294
+ switch (r.kind) {
1283
1295
  case "element": {
1284
- const { children: r } = s;
1285
- for (const o of r)
1296
+ const { children: s } = r;
1297
+ for (const o of s)
1286
1298
  if (o.kind !== "static-attr") {
1287
1299
  if (o.kind === "dynamic-attr") {
1288
1300
  e.push(o);
@@ -1293,18 +1305,18 @@ function rt(n) {
1293
1305
  break;
1294
1306
  }
1295
1307
  case "fragment": {
1296
- const { children: r } = s;
1297
- for (const o of r) t(o);
1308
+ const { children: s } = r;
1309
+ for (const o of s) t(o);
1298
1310
  break;
1299
1311
  }
1300
1312
  case "static-text":
1301
1313
  case "empty":
1302
1314
  break;
1303
1315
  case "dynamic-text":
1304
- e.push(s);
1316
+ e.push(r);
1305
1317
  break;
1306
1318
  default:
1307
- s.kind === void 0 && e.push(s);
1319
+ r.kind === void 0 && e.push(r);
1308
1320
  break;
1309
1321
  }
1310
1322
  }
@@ -1315,17 +1327,17 @@ const it = {
1315
1327
  if (!e.isBrowser()) return null;
1316
1328
  const t = n;
1317
1329
  if (t.kind === void 0) return null;
1318
- const s = e.document;
1319
- return et(t, s);
1330
+ const r = e.document;
1331
+ return et(t, r);
1320
1332
  },
1321
1333
  cloneAndHydrate(n, e, t) {
1322
1334
  return nt(n, e, t);
1323
1335
  },
1324
1336
  fingerprint(n) {
1325
- return st(n);
1337
+ return rt(n);
1326
1338
  },
1327
1339
  extractSlots(n) {
1328
- return rt(n);
1340
+ return st(n);
1329
1341
  }
1330
1342
  }, ot = He({
1331
1343
  type: Te,
@@ -1333,13 +1345,13 @@ const it = {
1333
1345
  templateEngine: it
1334
1346
  }), {
1335
1347
  Empty: lt,
1336
- Fragment: v,
1348
+ Fragment: S,
1337
1349
  When: Ft,
1338
1350
  Unless: Wt,
1339
1351
  ForEach: Kt,
1340
1352
  KeyedForEach: ct,
1341
- Repeat: qt,
1342
- OneOf: Ut,
1353
+ Repeat: Ut,
1354
+ OneOf: qt,
1343
1355
  OneOfField: Gt,
1344
1356
  OneOfKind: Qt,
1345
1357
  OneOfType: Jt,
@@ -1348,8 +1360,8 @@ const it = {
1348
1360
  MapSignal: en,
1349
1361
  MapText: tn,
1350
1362
  Ensure: nn,
1351
- EnsureAll: sn,
1352
- NotEmpty: rn,
1363
+ EnsureAll: rn,
1364
+ NotEmpty: sn,
1353
1365
  Task: on,
1354
1366
  Async: ln,
1355
1367
  OnDispose: Y,
@@ -1359,8 +1371,9 @@ const it = {
1359
1371
  Provide: un,
1360
1372
  Use: dn,
1361
1373
  UseMany: hn,
1362
- handleValueOrSignal: fn,
1363
- createReactiveRenderable: pn,
1374
+ UseOptional: fn,
1375
+ handleValueOrSignal: pn,
1376
+ createReactiveRenderable: mn,
1364
1377
  renderableOfTNode: A
1365
1378
  } = ot, te = /* @__PURE__ */ new Map();
1366
1379
  function ut(n) {
@@ -1368,36 +1381,36 @@ function ut(n) {
1368
1381
  return e === void 0 && (e = n.split(" ").filter((t) => t.length > 0), te.set(n, e)), e;
1369
1382
  }
1370
1383
  const dt = (n) => {
1371
- const e = y((t) => (t.addClasses(n), (s) => {
1372
- s && t.removeClasses(n);
1384
+ const e = y((t) => (t.addClasses(n), (r) => {
1385
+ r && t.removeClasses(n);
1373
1386
  }));
1374
1387
  return e.kind = "static-attr", e.name = "class", e.value = n.join(" "), e;
1375
1388
  }, ht = (n) => {
1376
1389
  const e = y((t) => {
1377
- let s = [];
1378
- const r = n.on(
1390
+ let r = [];
1391
+ const s = n.on(
1379
1392
  (o) => {
1380
1393
  const i = (o ?? "").split(" ").filter((l) => l.length > 0);
1381
- s.length > 0 && t.removeClasses(s), i.length > 0 && t.addClasses(i), s = i;
1394
+ r.length > 0 && t.removeClasses(r), i.length > 0 && t.addClasses(i), r = i;
1382
1395
  },
1383
1396
  { noAutoDispose: !0 }
1384
1397
  );
1385
1398
  return (o) => {
1386
- r(), o && t.removeClasses(s), s = [];
1399
+ s(), o && t.removeClasses(r), r = [];
1387
1400
  };
1388
1401
  });
1389
1402
  return e.kind = "dynamic-attr", e;
1390
1403
  }, ft = (n, e) => {
1391
- const t = y((s) => {
1392
- const { get: r, set: o } = s.makeAccessors(n), i = r();
1404
+ const t = y((r) => {
1405
+ const { get: s, set: o } = r.makeAccessors(n), i = s();
1393
1406
  return o(e), (l) => {
1394
1407
  l && o(i);
1395
1408
  };
1396
1409
  });
1397
1410
  return t.kind = "static-attr", t.name = n, t.value = String(e), t;
1398
1411
  }, pt = (n, e) => {
1399
- const t = y((s) => {
1400
- const { get: r, set: o } = s.makeAccessors(n), i = r(), l = e.on(o, { noAutoDispose: !0 });
1412
+ const t = y((r) => {
1413
+ const { get: s, set: o } = r.makeAccessors(n), i = s(), l = e.on(o, { noAutoDispose: !0 });
1401
1414
  return (c) => {
1402
1415
  l(), c && o(i);
1403
1416
  };
@@ -1422,7 +1435,7 @@ const dt = (n) => {
1422
1435
  */
1423
1436
  get: (n, e) => (t) => mt(e, t)
1424
1437
  }
1425
- ), gt = (n, e) => H(`data-${n}`, e), mn = (n, e) => gt(n, e), yt = (n, e) => H(`aria-${n}`, e), gn = new Proxy(
1438
+ ), gt = (n, e) => H(`data-${n}`, e), gn = (n, e) => gt(n, e), yt = (n, e) => H(`aria-${n}`, e), yn = new Proxy(
1426
1439
  {},
1427
1440
  {
1428
1441
  /**
@@ -1435,7 +1448,7 @@ const dt = (n) => {
1435
1448
  */
1436
1449
  get: (n, e) => (t) => yt(e, t)
1437
1450
  }
1438
- ), Tt = (n, e) => H(n, e), yn = new Proxy(
1451
+ ), Tt = (n, e) => H(n, e), Tn = new Proxy(
1439
1452
  {},
1440
1453
  {
1441
1454
  /**
@@ -1448,7 +1461,7 @@ const dt = (n) => {
1448
1461
  */
1449
1462
  get: (n, e) => (t) => Tt(e, t)
1450
1463
  }
1451
- ), bt = (n, e) => H(n, e), Tn = new Proxy(
1464
+ ), vt = (n, e) => H(n, e), vn = new Proxy(
1452
1465
  {},
1453
1466
  {
1454
1467
  /**
@@ -1458,40 +1471,40 @@ const dt = (n) => {
1458
1471
  * @returns The renderable component for the specified attribute.
1459
1472
  *
1460
1473
  */
1461
- get: (n, e) => (t) => bt(e, t)
1474
+ get: (n, e) => (t) => vt(e, t)
1462
1475
  }
1463
1476
  ), ne = /* @__PURE__ */ new WeakMap();
1464
- function St(n, e) {
1477
+ function bt(n, e) {
1465
1478
  let t = ne.get(n);
1466
1479
  return t || (t = Ie(n, e), ne.set(
1467
1480
  n,
1468
1481
  t
1469
1482
  )), t;
1470
1483
  }
1471
- const bn = (n, e, t = "danger", s) => {
1472
- const r = ut(t), o = y((i) => {
1473
- const h = St(n, s)(e).on(
1484
+ const bn = (n, e, t = "danger", r) => {
1485
+ const s = ut(t), o = y((i) => {
1486
+ const h = bt(n, r)(e).on(
1474
1487
  (f) => {
1475
- f ? i.addClasses(r) : i.removeClasses(r);
1488
+ f ? i.addClasses(s) : i.removeClasses(s);
1476
1489
  },
1477
1490
  { noAutoDispose: !0 }
1478
1491
  );
1479
1492
  return (f) => {
1480
- h(), f && i.removeClasses(r);
1493
+ h(), f && i.removeClasses(s);
1481
1494
  };
1482
1495
  });
1483
1496
  return o.kind = "dynamic-attr", o;
1484
- }, be = (n, e, t) => {
1485
- const s = y(
1486
- (r) => r.on(n, e, t)
1497
+ }, ve = (n, e, t) => {
1498
+ const r = y(
1499
+ (s) => s.on(n, e, t)
1487
1500
  );
1488
- return s.kind = "dynamic-attr", s;
1489
- }, vt = (n) => be("click", (e, t) => {
1501
+ return r.kind = "dynamic-attr", r;
1502
+ }, St = (n) => ve("click", (e, t) => {
1490
1503
  e.preventDefault();
1491
- const s = e.target;
1504
+ const r = e.target;
1492
1505
  setTimeout(() => {
1493
- const r = s.ownerDocument != null ? s?.checked : void 0;
1494
- r != null && n(!r, t);
1506
+ const s = r.ownerDocument != null ? r?.checked : void 0;
1507
+ s != null && n(!s, t);
1495
1508
  }, 0);
1496
1509
  }), D = new Proxy(
1497
1510
  {},
@@ -1501,80 +1514,80 @@ const bn = (n, e, t = "danger", s) => {
1501
1514
  * @param fn - The function to call when the event is triggered.
1502
1515
  * @returns A `Renderable` function that adds the event listener to the element.
1503
1516
  */
1504
- get: (n, e) => (t) => be(e, t)
1517
+ get: (n, e) => (t) => ve(e, t)
1505
1518
  }
1506
1519
  ), xt = (n, e) => (t) => {
1507
1520
  e?.preventDefault === !0 && t.preventDefault(), e?.stopPropagation === !0 && t.stopPropagation(), e?.stopImmediatePropagation === !0 && t.stopImmediatePropagation(), n(t);
1508
1521
  }, x = (n, e) => xt((t) => {
1509
- const s = t.target;
1510
- n(s, t);
1522
+ const r = t.target;
1523
+ n(r, t);
1511
1524
  }, e), wt = (n, e) => x(
1512
- (t, s) => n(t.value, s),
1525
+ (t, r) => n(t.value, r),
1513
1526
  e
1514
1527
  ), Et = (n, e) => x(
1515
- (t, s) => n(t.valueAsNumber, s),
1528
+ (t, r) => n(t.valueAsNumber, r),
1516
1529
  e
1517
- ), kt = (n, e) => x((t, s) => {
1530
+ ), kt = (n, e) => x((t, r) => {
1518
1531
  if (t.value === "")
1519
1532
  return;
1520
- const r = t.value.split("-"), o = new Date(
1521
- Number(r[0]),
1522
- Number(r[1]) - 1,
1523
- Number(r[2].substring(0, 2))
1533
+ const s = t.value.split("-"), o = new Date(
1534
+ Number(s[0]),
1535
+ Number(s[1]) - 1,
1536
+ Number(s[2].substring(0, 2))
1524
1537
  );
1525
- n(o, s);
1526
- }, e), Sn = (n, e) => x((t, s) => {
1538
+ n(o, r);
1539
+ }, e), Sn = (n, e) => x((t, r) => {
1527
1540
  if (t.value === "") {
1528
- n(null, s);
1541
+ n(null, r);
1529
1542
  return;
1530
1543
  }
1531
- const r = t.value.split("-"), o = new Date(
1532
- Number(r[0]),
1533
- Number(r[1]) - 1,
1534
- Number(r[2].substring(0, 2))
1544
+ const s = t.value.split("-"), o = new Date(
1545
+ Number(s[0]),
1546
+ Number(s[1]) - 1,
1547
+ Number(s[2].substring(0, 2))
1535
1548
  );
1536
- n(o, s);
1537
- }, e), At = (n, e) => x((t, s) => {
1549
+ n(o, r);
1550
+ }, e), At = (n, e) => x((t, r) => {
1538
1551
  if (t.value === "")
1539
1552
  return;
1540
- const r = t.value.split("T"), o = r[0].split("-"), i = new Date(
1553
+ const s = t.value.split("T"), o = s[0].split("-"), i = new Date(
1541
1554
  Number(o[0]),
1542
1555
  Number(o[1]) - 1,
1543
1556
  Number(o[2])
1544
- ), l = r[1].split(":");
1545
- i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), n(i, s);
1546
- }, e), vn = (n, e) => x((t, s) => {
1557
+ ), l = s[1].split(":");
1558
+ i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), n(i, r);
1559
+ }, e), xn = (n, e) => x((t, r) => {
1547
1560
  if (t.value === "") {
1548
- n(null, s);
1561
+ n(null, r);
1549
1562
  return;
1550
1563
  }
1551
- const r = t.value.split("T");
1552
- if (r.length !== 2) {
1553
- n(null, s);
1564
+ const s = t.value.split("T");
1565
+ if (s.length !== 2) {
1566
+ n(null, r);
1554
1567
  return;
1555
1568
  }
1556
- const o = r[0].split("-"), i = new Date(
1569
+ const o = s[0].split("-"), i = new Date(
1557
1570
  Number(o[0]),
1558
1571
  Number(o[1]) - 1,
1559
1572
  Number(o[2])
1560
- ), l = r[1].split(":");
1561
- i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), n(i, s);
1562
- }, e), xn = (n, e) => x((t, s) => {
1563
- n(t.checked, s);
1564
- }, e), wn = (n, e = "input") => v(
1573
+ ), l = s[1].split(":");
1574
+ i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), n(i, r);
1575
+ }, e), wn = (n, e) => x((t, r) => {
1576
+ n(t.checked, r);
1577
+ }, e), En = (n, e = "input") => S(
1565
1578
  T.valueAsDate(n),
1566
1579
  D[e](kt((t) => n.set(t)))
1567
- ), En = (n, e = "input") => v(
1580
+ ), kn = (n, e = "input") => S(
1568
1581
  T.valueAsDate(n),
1569
1582
  D[e](At((t) => n.set(t)))
1570
- ), kn = (n, e = "input") => v(
1583
+ ), An = (n, e = "input") => S(
1571
1584
  T.valueAsNumber(n),
1572
1585
  D[e](Et((t) => n.set(t)))
1573
- ), An = (n, e = "input") => v(T.value(n), D[e](wt((t) => n.set(t)))), Cn = (n) => v(
1586
+ ), Cn = (n, e = "input") => S(T.value(n), D[e](wt((t) => n.set(t)))), Mn = (n) => S(
1574
1587
  T.checked(n),
1575
- vt((e) => n.set(e))
1576
- ), Ct = (n, e, t, s) => {
1577
- const r = y((o) => {
1588
+ St((e) => n.set(e))
1589
+ ), Ct = (n, e, t, r) => {
1590
+ const s = y((o) => {
1578
1591
  if (!o.isBrowser())
1579
1592
  return () => {
1580
1593
  };
@@ -1582,34 +1595,34 @@ const bn = (n, e, t = "danger", s) => {
1582
1595
  const h = c.target?.closest(e);
1583
1596
  h != null && i.contains(h) && t(c, o);
1584
1597
  };
1585
- return i.addEventListener(n, l, s), (c) => {
1586
- c && i.removeEventListener(n, l, s);
1598
+ return i.addEventListener(n, l, r), (c) => {
1599
+ c && i.removeEventListener(n, l, r);
1587
1600
  };
1588
1601
  });
1589
- return r.kind = "dynamic-attr", r;
1590
- }, Mn = new Proxy(
1602
+ return s.kind = "dynamic-attr", s;
1603
+ }, On = new Proxy(
1591
1604
  {},
1592
1605
  {
1593
- get: (n, e) => (t, s, r) => Ct(e, t, s, r)
1606
+ get: (n, e) => (t, r, s) => Ct(e, t, r, s)
1594
1607
  }
1595
- ), On = (n) => y((e) => (e.appendOrInsert(n), (t) => {
1608
+ ), Pn = (n) => y((e) => (e.appendOrInsert(n), (t) => {
1596
1609
  t && V(n);
1597
- })), Se = (n, ...e) => {
1598
- const t = e.map(A), s = y((r) => {
1599
- const o = r.makeChildElement(n, void 0), i = t.map((l) => l.render(o));
1610
+ })), be = (n, ...e) => {
1611
+ const t = e.map(A), r = y((s) => {
1612
+ const o = s.makeChildElement(n, void 0), i = t.map((l) => l.render(o));
1600
1613
  return (l) => {
1601
1614
  i.forEach((c) => c(!1)), o.clear(l);
1602
1615
  };
1603
1616
  });
1604
- return s.kind = "element", s.tag = n, s.children = t, s;
1617
+ return r.kind = "element", r.tag = n, r.children = t, r;
1605
1618
  }, X = (n, e, ...t) => {
1606
- const s = t.map(A), r = y((o) => {
1607
- const i = o.makeChildElement(n, e), l = s.map((c) => c.render(i));
1619
+ const r = t.map(A), s = y((o) => {
1620
+ const i = o.makeChildElement(n, e), l = r.map((c) => c.render(i));
1608
1621
  return (c) => {
1609
1622
  l.forEach((h) => h(!1)), i.clear(c);
1610
1623
  };
1611
1624
  });
1612
- return r.kind = "element", r.tag = n, r.ns = e, r.children = s, r;
1625
+ return s.kind = "element", s.tag = n, s.ns = e, s.children = r, s;
1613
1626
  }, Mt = new Proxy(
1614
1627
  {},
1615
1628
  {
@@ -1618,9 +1631,9 @@ const bn = (n, e, t = "danger", s) => {
1618
1631
  * @param tagName - The HTML tag name.
1619
1632
  * @returns A renderable function that creates and appends the HTML element to the DOM.
1620
1633
  */
1621
- get: (n, e) => (...t) => Se(e, ...t)
1634
+ get: (n, e) => (...t) => be(e, ...t)
1622
1635
  }
1623
- ), Pn = new Proxy(
1636
+ ), Ln = new Proxy(
1624
1637
  {},
1625
1638
  {
1626
1639
  /**
@@ -1628,9 +1641,9 @@ const bn = (n, e, t = "danger", s) => {
1628
1641
  * @param type - The input type name.
1629
1642
  * @returns A renderable function that creates and appends the HTMLInput element to the DOM.
1630
1643
  */
1631
- get: (n, e) => (...t) => Se("input", T.type(e), ...t)
1644
+ get: (n, e) => (...t) => be("input", T.type(e), ...t)
1632
1645
  }
1633
- ), ve = "http://www.w3.org/2000/svg", Ln = (n, ...e) => X(n, ve, ...e), In = new Proxy(
1646
+ ), Se = "http://www.w3.org/2000/svg", In = (n, ...e) => X(n, Se, ...e), Hn = new Proxy(
1634
1647
  {},
1635
1648
  {
1636
1649
  /**
@@ -1638,9 +1651,9 @@ const bn = (n, e, t = "danger", s) => {
1638
1651
  * @param tagName - The SVG tag name.
1639
1652
  * @returns A renderable function that creates and appends the SVG element to the DOM.
1640
1653
  */
1641
- get: (n, e) => (...t) => X(e, ve, ...t)
1654
+ get: (n, e) => (...t) => X(e, Se, ...t)
1642
1655
  }
1643
- ), xe = "http://www.w3.org/1998/Math/MathML", Hn = (n, ...e) => X(n, xe, ...e), Dn = new Proxy(
1656
+ ), xe = "http://www.w3.org/1998/Math/MathML", Dn = (n, ...e) => X(n, xe, ...e), Nn = new Proxy(
1644
1657
  {},
1645
1658
  {
1646
1659
  /**
@@ -1659,12 +1672,12 @@ const bn = (n, e, t = "danger", s) => {
1659
1672
  return () => {
1660
1673
  };
1661
1674
  });
1662
- function Nn({
1675
+ function Rn({
1663
1676
  src: n,
1664
1677
  name: e,
1665
1678
  width: t,
1666
- height: s,
1667
- sandbox: r,
1679
+ height: r,
1680
+ sandbox: s,
1668
1681
  allow: o,
1669
1682
  referrerpolicy: i,
1670
1683
  loading: l,
@@ -1678,9 +1691,9 @@ function Nn({
1678
1691
  t != null ? $.map(t, String) : void 0
1679
1692
  ),
1680
1693
  T.height(
1681
- s != null ? $.map(s, String) : void 0
1694
+ r != null ? $.map(r, String) : void 0
1682
1695
  ),
1683
- T.sandbox(r),
1696
+ T.sandbox(s),
1684
1697
  T.allow(o),
1685
1698
  T.referrerpolicy(i),
1686
1699
  c,
@@ -1692,16 +1705,16 @@ function Nn({
1692
1705
  p = !0;
1693
1706
  const g = a.contentDocument;
1694
1707
  if (g && (h && h(a), f.length > 0)) {
1695
- const b = g.body;
1696
- if (b) {
1697
- const F = d.withElement(b);
1698
- u = I(v(...f), F);
1708
+ const v = g.body;
1709
+ if (v) {
1710
+ const F = d.withElement(v);
1711
+ u = I(S(...f), F);
1699
1712
  }
1700
1713
  }
1701
1714
  };
1702
1715
  return l != null && $.on(l, (g) => {
1703
1716
  a.loading = g;
1704
- }), (f.length > 0 || h) && (n || setTimeout(m, 0)), v(
1717
+ }), (f.length > 0 || h) && (n || setTimeout(m, 0)), S(
1705
1718
  f.length > 0 || h ? D.load(m) : lt,
1706
1719
  Y(() => {
1707
1720
  u && u(!1);
@@ -1710,61 +1723,61 @@ function Nn({
1710
1723
  })
1711
1724
  );
1712
1725
  }
1713
- const Rn = (n, e) => y((t) => {
1714
- const s = t.makePortal(n), r = I(A(e), s);
1715
- return () => r(!0);
1726
+ const _n = (n, e) => y((t) => {
1727
+ const r = t.makePortal(n), s = I(A(e), r);
1728
+ return () => s(!0);
1716
1729
  }), _ = /* @__PURE__ */ new Map(), Ot = (n) => ({
1717
- mark: re(`Probe(${n.description})`),
1730
+ mark: se(`Probe(${n.description})`),
1718
1731
  create: ({ callback: e = () => {
1719
1732
  }, timeout: t = 10 } = {}) => {
1720
- const s = (l) => {
1721
- clearTimeout(r), _.delete(n), e(l);
1733
+ const r = (l) => {
1734
+ clearTimeout(s), _.delete(n), e(l);
1722
1735
  };
1723
1736
  if (_.has(n))
1724
1737
  throw new Error(`Probe already exists: ${n.description}`);
1725
- const r = setTimeout(() => s("timeout"), t), o = { counter: 0, timeoutId: r };
1738
+ const s = setTimeout(() => r("timeout"), t), o = { counter: 0, timeoutId: s };
1726
1739
  return _.set(n, o), {
1727
1740
  value: () => {
1728
- clearTimeout(r);
1741
+ clearTimeout(s);
1729
1742
  const l = _.get(n);
1730
- l != null && --l.counter === 0 && s("resolved");
1743
+ l != null && --l.counter === 0 && r("resolved");
1731
1744
  },
1732
- dispose: () => s("disposed"),
1745
+ dispose: () => r("disposed"),
1733
1746
  onUse: () => o.counter++
1734
1747
  };
1735
1748
  }
1736
- }), _n = Ot(/* @__PURE__ */ Symbol("GlobalProbe"));
1737
- function $n({
1749
+ }), $n = Ot(/* @__PURE__ */ Symbol("GlobalProbe"));
1750
+ function Bn({
1738
1751
  mode: n,
1739
1752
  delegatesFocus: e,
1740
1753
  slotAssignment: t,
1741
- clonable: s,
1742
- serializable: r
1754
+ clonable: r,
1755
+ serializable: s
1743
1756
  }, ...o) {
1744
1757
  return N((i) => {
1745
1758
  const l = { mode: n };
1746
- e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t), s !== void 0 && (l.clonable = s), r !== void 0 && (l.serializable = r);
1747
- const c = i.element.attachShadow(l), h = i.withElement(c), f = I(v(...o), h);
1759
+ e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t), r !== void 0 && (l.clonable = r), s !== void 0 && (l.serializable = s);
1760
+ const c = i.element.attachShadow(l), h = i.withElement(c), f = I(S(...o), h);
1748
1761
  return Y(() => f(!0));
1749
1762
  });
1750
1763
  }
1751
1764
  const Pt = (n, e) => {
1752
- const t = y((s) => {
1753
- const r = s.getStyle(n);
1754
- return s.setStyle(n, e), (o) => {
1755
- o && s.setStyle(n, r);
1765
+ const t = y((r) => {
1766
+ const s = r.getStyle(n);
1767
+ return r.setStyle(n, e), (o) => {
1768
+ o && r.setStyle(n, s);
1756
1769
  };
1757
1770
  });
1758
1771
  return t.kind = "dynamic-attr", t;
1759
1772
  }, Lt = (n, e) => {
1760
- const t = y((s) => {
1761
- const r = s.getStyle(n), o = e.on((i) => s.setStyle(n, i));
1773
+ const t = y((r) => {
1774
+ const s = r.getStyle(n), o = e.on((i) => r.setStyle(n, i));
1762
1775
  return (i) => {
1763
- o(), i && s.setStyle(n, r);
1776
+ o(), i && r.setStyle(n, s);
1764
1777
  };
1765
1778
  });
1766
1779
  return t.kind = "dynamic-attr", t;
1767
- }, se = (n, e) => j.is(e) ? Lt(n, e) : Pt(n, e), Bn = new Proxy({}, {
1780
+ }, re = (n, e) => j.is(e) ? Lt(n, e) : Pt(n, e), Vn = new Proxy({}, {
1768
1781
  /**
1769
1782
  * Creates a renderable component for the specified `style` property.
1770
1783
  *
@@ -1773,20 +1786,20 @@ const Pt = (n, e) => {
1773
1786
  * @returns The renderable component for the specified attribute.
1774
1787
  *
1775
1788
  */
1776
- get: (n, e) => e === "variable" ? (t, s) => se(t, s) : (t) => se(e, t)
1789
+ get: (n, e) => e === "variable" ? (t, r) => re(t, r) : (t) => re(e, t)
1777
1790
  }), It = (n) => y((e) => {
1778
1791
  const t = e.makeChildText(n);
1779
- return (s) => t.clear(s);
1792
+ return (r) => t.clear(r);
1780
1793
  }), Ht = (n) => y((e) => {
1781
- const t = e.makeChildText(n.value), s = n.on((r) => t.setText(r));
1782
- return (r) => {
1783
- s(), t.clear(r);
1794
+ const t = e.makeChildText(n.value), r = n.on((s) => t.setText(s));
1795
+ return (s) => {
1796
+ r(), t.clear(s);
1784
1797
  };
1785
- }), Vn = (n) => j.is(n) ? Ht(n) : It(n), jn = (n) => y((e) => {
1798
+ }), jn = (n) => j.is(n) ? Ht(n) : It(n), Yn = (n) => y((e) => {
1786
1799
  const t = n(e);
1787
1800
  return t == null ? () => {
1788
1801
  } : A(t).render(e);
1789
- }), Yn = (n) => N((e) => n(e.element)), Xn = (n) => y((e) => {
1802
+ }), Xn = (n) => N((e) => n(e.element)), Fn = (n) => y((e) => {
1790
1803
  if (e.isHeadlessDOM()) {
1791
1804
  const t = n(e);
1792
1805
  if (t)
@@ -1794,35 +1807,35 @@ const Pt = (n, e) => {
1794
1807
  }
1795
1808
  return () => {
1796
1809
  };
1797
- }), Fn = (n, e) => N((t) => {
1798
- const s = t.element, r = Ze(
1810
+ }), Wn = (n, e) => N((t) => {
1811
+ const r = t.element, s = Ze(
1799
1812
  n,
1800
- () => s.getBoundingClientRect(),
1813
+ () => r.getBoundingClientRect(),
1801
1814
  e
1802
1815
  );
1803
- return s.addEventListener("touchstart", r.onTouchStart, { passive: !1 }), s.addEventListener("touchmove", r.onTouchMove, { passive: !1 }), s.addEventListener("touchend", r.onTouchEnd), Y(() => {
1804
- s.removeEventListener("touchstart", r.onTouchStart), s.removeEventListener("touchmove", r.onTouchMove), s.removeEventListener("touchend", r.onTouchEnd);
1816
+ return r.addEventListener("touchstart", s.onTouchStart, { passive: !1 }), r.addEventListener("touchmove", s.onTouchMove, { passive: !1 }), r.addEventListener("touchend", s.onTouchEnd), Y(() => {
1817
+ r.removeEventListener("touchstart", s.onTouchStart), r.removeEventListener("touchmove", s.onTouchMove), r.removeEventListener("touchend", s.onTouchEnd);
1805
1818
  });
1806
- }), Wn = (n, e) => N((t) => {
1807
- const s = t.element, r = ze(n, e);
1819
+ }), Kn = (n, e) => N((t) => {
1820
+ const r = t.element, s = ze(n, e);
1808
1821
  let o = null, i = 0, l = 0;
1809
1822
  const c = (d) => {
1810
- o !== null && (o.dispose(), o = null), i = d.clientX, l = d.clientY, r.track(d.clientX, d.clientY), s.setPointerCapture(d.pointerId);
1823
+ o !== null && (o.dispose(), o = null), i = d.clientX, l = d.clientY, s.track(d.clientX, d.clientY), r.setPointerCapture(d.pointerId);
1811
1824
  }, h = (d) => {
1812
- if (!s.hasPointerCapture(d.pointerId)) return;
1825
+ if (!r.hasPointerCapture(d.pointerId)) return;
1813
1826
  const a = d.clientX - i, u = d.clientY - l;
1814
- i = d.clientX, l = d.clientY, r.track(d.clientX, d.clientY), n(a, u);
1827
+ i = d.clientX, l = d.clientY, s.track(d.clientX, d.clientY), n(a, u);
1815
1828
  }, f = (d) => {
1816
- s.hasPointerCapture(d.pointerId) && (s.releasePointerCapture(d.pointerId), o = r.release());
1829
+ r.hasPointerCapture(d.pointerId) && (r.releasePointerCapture(d.pointerId), o = s.release());
1817
1830
  };
1818
- return s.addEventListener("pointerdown", c), s.addEventListener("pointermove", h), s.addEventListener("pointerup", f), s.addEventListener("pointercancel", f), Y(() => {
1819
- o !== null && o.dispose(), s.removeEventListener("pointerdown", c), s.removeEventListener("pointermove", h), s.removeEventListener("pointerup", f), s.removeEventListener("pointercancel", f);
1831
+ return r.addEventListener("pointerdown", c), r.addEventListener("pointermove", h), r.addEventListener("pointerup", f), r.addEventListener("pointercancel", f), Y(() => {
1832
+ o !== null && o.dispose(), r.removeEventListener("pointerdown", c), r.removeEventListener("pointermove", h), r.removeEventListener("pointerup", f), r.removeEventListener("pointercancel", f);
1820
1833
  });
1821
1834
  });
1822
- function Kn(n, e, t, s) {
1823
- return at((r) => {
1835
+ function Un(n, e, t, r) {
1836
+ return at((s) => {
1824
1837
  const o = B([]), i = /* @__PURE__ */ new Map();
1825
- r.onDispose(() => {
1838
+ s.onDispose(() => {
1826
1839
  for (const c of i.values()) clearTimeout(c);
1827
1840
  i.clear();
1828
1841
  });
@@ -1832,12 +1845,12 @@ function Kn(n, e, t, s) {
1832
1845
  const h = new Set(c.map(e)), f = o.get();
1833
1846
  for (const u of f)
1834
1847
  if (!h.has(u.key) && !l.has(u.key))
1835
- if (l.add(u.key), u.isExiting.set(!0), s.exitDuration != null && s.exitDuration > 0) {
1848
+ if (l.add(u.key), u.isExiting.set(!0), r.exitDuration != null && r.exitDuration > 0) {
1836
1849
  const p = setTimeout(() => {
1837
1850
  i.delete(u.key), l.delete(u.key), o.set(o.get().filter((m) => m.key !== u.key));
1838
- }, s.exitDuration);
1851
+ }, r.exitDuration);
1839
1852
  i.set(u.key, p);
1840
- } else s.useAnimationEvents || l.delete(u.key);
1853
+ } else r.useAnimationEvents || l.delete(u.key);
1841
1854
  const d = c.map((u) => {
1842
1855
  const p = e(u), m = f.find(
1843
1856
  (g) => g.key === p && !l.has(p)
@@ -1867,76 +1880,77 @@ export {
1867
1880
  yt as Aria,
1868
1881
  ln as Async,
1869
1882
  mt as Attr,
1870
- Cn as BindChecked,
1871
- wn as BindDate,
1872
- En as BindDateTime,
1873
- kn as BindNumber,
1874
- An as BindText,
1875
- S as BrowserContext,
1883
+ Mn as BindChecked,
1884
+ En as BindDate,
1885
+ kn as BindDateTime,
1886
+ An as BindNumber,
1887
+ Cn as BindText,
1888
+ b as BrowserContext,
1876
1889
  C as CLASS_PLACEHOLDER_ATTR,
1877
- Gn as Computed,
1890
+ Qn as Computed,
1878
1891
  cn as Conjunction,
1879
- On as DOMNode,
1892
+ Pn as DOMNode,
1880
1893
  gt as DataAttr,
1881
- Qn as DisposalScope,
1882
- Se as El,
1894
+ Jn as DisposalScope,
1895
+ be as El,
1883
1896
  X as ElNS,
1884
- Jn as ElementPosition,
1897
+ Zn as ElementPosition,
1885
1898
  lt as Empty,
1886
1899
  nn as Ensure,
1887
- sn as EnsureAll,
1900
+ rn as EnsureAll,
1888
1901
  Kt as ForEach,
1889
- v as Fragment,
1890
- _n as GlobalProbe,
1902
+ S as Fragment,
1903
+ $n as GlobalProbe,
1891
1904
  Xe as HYDRATION_ID_ATTR,
1892
1905
  $t as HeadlessAdapter,
1893
1906
  k as HeadlessContext,
1894
- qe as HeadlessElement,
1907
+ Ue as HeadlessElement,
1895
1908
  ye as HeadlessPortal,
1896
- Ue as HeadlessText,
1897
- Nn as IFrame,
1898
- Wn as Inertia,
1909
+ qe as HeadlessText,
1910
+ Rn as IFrame,
1911
+ Kn as Inertia,
1899
1912
  ct as KeyedForEach,
1900
- Zn as KeyedPosition,
1913
+ zn as KeyedPosition,
1901
1914
  en as MapSignal,
1902
1915
  tn as MapText,
1903
- bt as MathAttr,
1904
- Hn as MathEl,
1905
- zn as MemoryStore,
1906
- rn as NotEmpty,
1907
- vt as OnChecked,
1916
+ vt as MathAttr,
1917
+ Dn as MathEl,
1918
+ er as MemoryStore,
1919
+ sn as NotEmpty,
1920
+ St as OnChecked,
1908
1921
  Y as OnDispose,
1909
- Ut as OneOf,
1922
+ qt as OneOf,
1910
1923
  Gt as OneOfField,
1911
1924
  Qt as OneOfKind,
1912
1925
  zt as OneOfTuple,
1913
1926
  Jt as OneOfType,
1914
1927
  Zt as OneOfValue,
1915
- Fn as PinchZoom,
1916
- Rn as Portal,
1917
- es as Prop,
1928
+ Wn as PinchZoom,
1929
+ _n as Portal,
1930
+ tr as Prop,
1918
1931
  un as Provide,
1919
- yr as ProviderNotFoundError,
1932
+ Ts as ProviderNotFoundError,
1920
1933
  jt as RafLoop,
1921
1934
  Vt as ReducedMotion,
1922
1935
  _e as RenderingError,
1923
- qt as Repeat,
1936
+ Ut as Repeat,
1924
1937
  Tt as SVGAttr,
1925
- Ln as SVGEl,
1926
- $n as ShadowRoot,
1927
- ts as Signal,
1938
+ In as SVGEl,
1939
+ Bn as ShadowRoot,
1940
+ nr as Signal,
1928
1941
  on as Task,
1929
- Vn as TextNode,
1930
- Kn as TransitionKeyedForEach,
1942
+ jn as TextNode,
1943
+ Un as TransitionKeyedForEach,
1931
1944
  Wt as Unless,
1932
1945
  dn as Use,
1933
1946
  hn as UseMany,
1934
- ns as Value,
1947
+ fn as UseOptional,
1948
+ rr as Value,
1935
1949
  Ft as When,
1936
1950
  N as WithBrowserCtx,
1937
- jn as WithCtx,
1938
- Yn as WithElement,
1939
- Xn as WithHeadlessCtx,
1951
+ Yn as WithCtx,
1952
+ Xn as WithElement,
1953
+ Fn as WithHeadlessCtx,
1940
1954
  an as WithProvider,
1941
1955
  at as WithScope,
1942
1956
  W as _NODE_PLACEHOLDER_ATTR,
@@ -1948,107 +1962,107 @@ export {
1948
1962
  V as _removeDOMNode,
1949
1963
  Ht as _signalText,
1950
1964
  It as _staticText,
1951
- ss as animateSignal,
1952
- rs as animateSignals,
1953
- gn as aria,
1965
+ sr as animateSignal,
1966
+ ir as animateSignals,
1967
+ yn as aria,
1954
1968
  T as attr,
1955
- is as bind,
1956
- os as chainEasing,
1957
- ls as coalesce,
1958
- cs as computed,
1959
- as as computedOf,
1960
- us as computedOfAsync,
1961
- ds as computedOfAsyncGenerator,
1962
- hs as computedRecord,
1969
+ or as bind,
1970
+ lr as chainEasing,
1971
+ cr as coalesce,
1972
+ ar as computed,
1973
+ ur as computedOf,
1974
+ dr as computedOfAsync,
1975
+ hr as computedOfAsyncGenerator,
1976
+ fr as computedRecord,
1963
1977
  ze as createInertiaHandler,
1964
1978
  Ze as createPinchZoomHandler,
1965
- q as createRafLoop,
1979
+ U as createRafLoop,
1966
1980
  Je as createReducedMotionSignal,
1967
- Tr as createRenderKit,
1968
- fs as createRenderable,
1969
- ps as createSelector,
1981
+ vs as createRenderKit,
1982
+ pr as createRenderable,
1983
+ mr as createSelector,
1970
1984
  Xt as createTween,
1971
- mn as dataAttr,
1972
- ms as delaySignal,
1973
- Mn as delegate,
1974
- gs as easeInBack,
1975
- ys as easeInBounce,
1976
- Ts as easeInCubic,
1977
- bs as easeInElastic,
1978
- Ss as easeInExpo,
1979
- vs as easeInOutBack,
1980
- xs as easeInOutBounce,
1981
- ws as easeInOutCubic,
1982
- Es as easeInOutElastic,
1983
- ks as easeInOutExpo,
1984
- As as easeInOutQuad,
1985
- Cs as easeInOutQuart,
1986
- Ms as easeInOutSine,
1987
- Os as easeInQuad,
1988
- Ps as easeInQuart,
1989
- Ls as easeInSine,
1990
- Is as easeOutBack,
1991
- Hs as easeOutBounce,
1992
- Ds as easeOutCubic,
1993
- Ns as easeOutElastic,
1994
- Rs as easeOutExpo,
1995
- _s as easeOutQuad,
1996
- $s as easeOutQuart,
1997
- Bs as easeOutSine,
1998
- Vs as effect,
1999
- js as effectOf,
1985
+ gn as dataAttr,
1986
+ gr as delaySignal,
1987
+ On as delegate,
1988
+ yr as easeInBack,
1989
+ Tr as easeInBounce,
1990
+ vr as easeInCubic,
1991
+ br as easeInElastic,
1992
+ Sr as easeInExpo,
1993
+ xr as easeInOutBack,
1994
+ wr as easeInOutBounce,
1995
+ Er as easeInOutCubic,
1996
+ kr as easeInOutElastic,
1997
+ Ar as easeInOutExpo,
1998
+ Cr as easeInOutQuad,
1999
+ Mr as easeInOutQuart,
2000
+ Or as easeInOutSine,
2001
+ Pr as easeInQuad,
2002
+ Lr as easeInQuart,
2003
+ Ir as easeInSine,
2004
+ Hr as easeOutBack,
2005
+ Dr as easeOutBounce,
2006
+ Nr as easeOutCubic,
2007
+ Rr as easeOutElastic,
2008
+ _r as easeOutExpo,
2009
+ $r as easeOutQuad,
2010
+ Br as easeOutQuart,
2011
+ Vr as easeOutSine,
2012
+ jr as effect,
2013
+ Yr as effectOf,
2000
2014
  xt as emit,
2001
- xn as emitChecked,
2015
+ wn as emitChecked,
2002
2016
  x as emitTarget,
2003
2017
  wt as emitValue,
2004
2018
  kt as emitValueAsDate,
2005
2019
  At as emitValueAsDateTime,
2006
2020
  Sn as emitValueAsNullableDate,
2007
- vn as emitValueAsNullableDateTime,
2021
+ xn as emitValueAsNullableDateTime,
2008
2022
  Et as emitValueAsNumber,
2009
- Ys as endInterpolate,
2010
- Xs as getCurrentScope,
2011
- Fs as getParentScope,
2012
- Ws as getScopeStack,
2023
+ Xr as endInterpolate,
2024
+ Fr as getCurrentScope,
2025
+ Wr as getParentScope,
2026
+ Kr as getScopeStack,
2013
2027
  Qe as getWindow,
2014
- Ks as guessInterpolate,
2028
+ Ur as guessInterpolate,
2015
2029
  Mt as html,
2016
- Pn as input,
2017
- qs as interpolateDate,
2018
- Us as interpolateNumber,
2019
- Gs as interpolateString,
2030
+ Ln as input,
2031
+ qr as interpolateDate,
2032
+ Gr as interpolateNumber,
2033
+ Qr as interpolateString,
2020
2034
  Yt as isInputFocused,
2021
- Qs as joinSignals,
2022
- Js as linear,
2023
- Zs as localStorageProp,
2035
+ Jr as joinSignals,
2036
+ Zr as linear,
2037
+ zr as localStorageProp,
2024
2038
  Ot as makeProbe,
2025
- zs as makeProviderMark,
2026
- Dn as math,
2027
- Tn as mathAttr,
2028
- er as merge,
2029
- tr as mirrorEasing,
2039
+ es as makeProviderMark,
2040
+ Nn as math,
2041
+ vn as mathAttr,
2042
+ ts as merge,
2043
+ ns as mirrorEasing,
2030
2044
  D as on,
2031
- nr as popScope,
2032
- sr as previousSignal,
2033
- rr as prop,
2034
- ir as pushScope,
2045
+ rs as popScope,
2046
+ ss as previousSignal,
2047
+ is as prop,
2048
+ os as pushScope,
2035
2049
  Rt as render,
2036
2050
  I as renderWithContext,
2037
2051
  A as renderableOfTNode,
2038
2052
  Bt as restoreTempoPlaceholders,
2039
- or as reverseEasing,
2053
+ ls as reverseEasing,
2040
2054
  _t as runHeadless,
2041
- lr as scoped,
2055
+ cs as scoped,
2042
2056
  bn as selectedClass,
2043
- cr as sessionStorageProp,
2044
- ar as signal,
2045
- ur as slidingWindowSignal,
2046
- dr as storedProp,
2047
- hr as strictEquals,
2048
- Bn as style,
2049
- In as svg,
2050
- yn as svgAttr,
2051
- fr as syncProp,
2052
- pr as untracked,
2053
- mr as withScope
2057
+ as as sessionStorageProp,
2058
+ us as signal,
2059
+ ds as slidingWindowSignal,
2060
+ hs as storedProp,
2061
+ fs as strictEquals,
2062
+ Vn as style,
2063
+ Hn as svg,
2064
+ Tn as svgAttr,
2065
+ ps as syncProp,
2066
+ ms as untracked,
2067
+ gs as withScope
2054
2068
  };