@tempots/dom 37.0.0 → 37.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -1
- package/index.js +435 -435
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DisposalScope as pe, withScope as me, Value as _, createRenderable as ge, Signal as B, createSelector as
|
|
2
|
-
import { Computed as
|
|
1
|
+
import { DisposalScope as pe, withScope as me, Value as _, createRenderable as ge, Signal as B, createSelector as ye, makeProviderMark as be } from "@tempots/core";
|
|
2
|
+
import { Computed as kr, DisposalScope as Cr, ElementPosition as vr, KeyedPosition as Er, MemoryStore as Pr, Prop as Mr, Signal as Or, Value as Lr, animateSignal as Hr, animateSignals as Nr, bind as Dr, coalesce as Ir, computed as Rr, computedOf as _r, computedOfAsync as $r, computedOfAsyncGenerator as Br, computedRecord as jr, createRenderable as Vr, createSelector as Wr, delaySignal as Fr, effect as Kr, effectOf as qr, endInterpolate as Gr, getCurrentScope as Ur, getParentScope as Jr, getScopeStack as Yr, guessInterpolate as Xr, interpolateDate as zr, interpolateNumber as Qr, interpolateString as Zr, joinSignals as en, localStorageProp as tn, makeProviderMark as rn, merge as nn, popScope as sn, previousSignal as on, prop as ln, pushScope as cn, scoped as an, sessionStorageProp as un, signal as dn, slidingWindowSignal as hn, storedProp as fn, strictEquals as pn, syncProp as mn, untracked as gn, withScope as yn } from "@tempots/core";
|
|
3
3
|
import { ProviderNotFoundError as J, createRenderKit as Te } from "@tempots/render";
|
|
4
|
-
import { ProviderNotFoundError as
|
|
4
|
+
import { ProviderNotFoundError as Tn, createRenderKit as Sn } from "@tempots/render";
|
|
5
5
|
const Y = /* @__PURE__ */ new Set([
|
|
6
6
|
"checked",
|
|
7
7
|
"disabled",
|
|
@@ -26,32 +26,32 @@ const Y = /* @__PURE__ */ new Set([
|
|
|
26
26
|
"outerHTML",
|
|
27
27
|
"className",
|
|
28
28
|
"classList"
|
|
29
|
-
]), Se = (
|
|
30
|
-
if (X.has(
|
|
29
|
+
]), Se = (r, e) => {
|
|
30
|
+
if (X.has(r))
|
|
31
31
|
return (t) => {
|
|
32
|
-
t == null || t !== !0 ? e.removeAttribute(
|
|
32
|
+
t == null || t !== !0 ? e.removeAttribute(r) : e.setAttribute(r, "");
|
|
33
33
|
};
|
|
34
|
-
if (Y.has(
|
|
35
|
-
const t = Z[
|
|
36
|
-
return (
|
|
37
|
-
|
|
34
|
+
if (Y.has(r)) {
|
|
35
|
+
const t = Z[r] || r;
|
|
36
|
+
return (n) => {
|
|
37
|
+
n == null ? e[t] = null : e[t] = !!n;
|
|
38
38
|
};
|
|
39
|
-
} else return z.has(
|
|
40
|
-
t == null ? e[
|
|
41
|
-
} : Q.has(
|
|
42
|
-
t == null ? e[
|
|
43
|
-
} : ee.has(
|
|
44
|
-
t == null ? e[
|
|
39
|
+
} else return z.has(r) ? (t) => {
|
|
40
|
+
t == null ? e[r] = null : e[r] = Number(t);
|
|
41
|
+
} : Q.has(r) ? (t) => {
|
|
42
|
+
t == null ? e[r] = null : e[r] = t;
|
|
43
|
+
} : ee.has(r) ? (t) => {
|
|
44
|
+
t == null ? e[r] = null : e[r] = String(t);
|
|
45
45
|
} : (t) => {
|
|
46
|
-
t == null ? e.removeAttribute(
|
|
46
|
+
t == null ? e.removeAttribute(r) : e.setAttribute(r, t);
|
|
47
47
|
};
|
|
48
|
-
}, xe = (
|
|
48
|
+
}, xe = (r, e) => X.has(r) ? () => e.hasAttribute(r) : Y.has(r) ? () => (
|
|
49
49
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
-
!!e[Z[
|
|
51
|
-
) : z.has(
|
|
52
|
-
const e =
|
|
53
|
-
e && e.onblur && (e.onblur = null), !(!
|
|
54
|
-
}, we = (
|
|
50
|
+
!!e[Z[r] || r]
|
|
51
|
+
) : z.has(r) ? () => Number(e[r]) : Q.has(r) ? () => e[r] : ee.has(r) ? () => String(e[r]) : () => e.getAttribute(r), $ = (r) => {
|
|
52
|
+
const e = r;
|
|
53
|
+
e && e.onblur && (e.onblur = null), !(!r || r.ownerDocument === void 0) && r.parentNode && r.parentNode.removeChild(r);
|
|
54
|
+
}, we = (r) => te(r) || re(r) ? r : r.parentElement, te = (r) => r.nodeType === 1, re = (r) => r.nodeType === 11;
|
|
55
55
|
class T {
|
|
56
56
|
/**
|
|
57
57
|
* Constructs a new `DOMContext` instance.
|
|
@@ -62,8 +62,8 @@ class T {
|
|
|
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,
|
|
66
|
-
this.document = e, this.element = t, this.reference =
|
|
65
|
+
constructor(e, t, n, s) {
|
|
66
|
+
this.document = e, this.element = t, this.reference = n, 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 T {
|
|
|
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,
|
|
77
|
-
return new T(e.ownerDocument, e, t,
|
|
76
|
+
static of(e, t, n) {
|
|
77
|
+
return new T(e.ownerDocument, e, t, n);
|
|
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 T {
|
|
|
109
109
|
* @returns A new DOMContext focused on the newly created child element
|
|
110
110
|
*/
|
|
111
111
|
makeChildElement(e, t) {
|
|
112
|
-
const
|
|
113
|
-
return this.appendOrInsert(
|
|
112
|
+
const n = this.createElement(e, t);
|
|
113
|
+
return this.appendOrInsert(n), this.withElement(n);
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
116
|
* Creates a new text node with the specified text content.
|
|
@@ -251,10 +251,10 @@ class T {
|
|
|
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,
|
|
254
|
+
setProvider(e, t, n) {
|
|
255
255
|
return new T(this.document, this.element, this.reference, {
|
|
256
256
|
...this.providers,
|
|
257
|
-
[e]: [t,
|
|
257
|
+
[e]: [t, n]
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
@@ -267,8 +267,8 @@ class T {
|
|
|
267
267
|
getProvider(e) {
|
|
268
268
|
if (this.providers[e] === void 0)
|
|
269
269
|
throw new J(e);
|
|
270
|
-
const [t,
|
|
271
|
-
return { value: t, onUse:
|
|
270
|
+
const [t, n] = this.providers[e];
|
|
271
|
+
return { value: t, onUse: n };
|
|
272
272
|
}
|
|
273
273
|
clear(e) {
|
|
274
274
|
e && (this.reference !== void 0 ? $(this.reference) : $(this.element));
|
|
@@ -301,10 +301,10 @@ class T {
|
|
|
301
301
|
* @param options - The options for the event listener.
|
|
302
302
|
* @returns A function to remove the event listener.
|
|
303
303
|
*/
|
|
304
|
-
on(e, t,
|
|
304
|
+
on(e, t, n) {
|
|
305
305
|
const s = (o) => t(o, this);
|
|
306
|
-
return this.element.addEventListener(e, s,
|
|
307
|
-
o && this.element.removeEventListener(e, s,
|
|
306
|
+
return this.element.addEventListener(e, s, n), (o) => {
|
|
307
|
+
o && this.element.removeEventListener(e, s, n);
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
@@ -342,7 +342,7 @@ class T {
|
|
|
342
342
|
* @param value - The value of the style to set.
|
|
343
343
|
*/
|
|
344
344
|
setStyle(e, t) {
|
|
345
|
-
this.element.style[e] = t;
|
|
345
|
+
e.startsWith("--") ? this.element.style.setProperty(e, t) : this.element.style[e] = t;
|
|
346
346
|
}
|
|
347
347
|
/**
|
|
348
348
|
* Gets the style of the element.
|
|
@@ -350,7 +350,7 @@ class T {
|
|
|
350
350
|
* @returns The value of the style.
|
|
351
351
|
*/
|
|
352
352
|
getStyle(e) {
|
|
353
|
-
return this.element.style[e];
|
|
353
|
+
return e.startsWith("--") ? this.element.style.getPropertyValue(e) : this.element.style[e];
|
|
354
354
|
}
|
|
355
355
|
makeAccessors(e) {
|
|
356
356
|
return {
|
|
@@ -361,8 +361,8 @@ class T {
|
|
|
361
361
|
getWindow() {
|
|
362
362
|
return this.document.defaultView;
|
|
363
363
|
}
|
|
364
|
-
moveRangeBefore(e, t,
|
|
365
|
-
const s = e.reference, o = t.reference, i =
|
|
364
|
+
moveRangeBefore(e, t, n) {
|
|
365
|
+
const s = e.reference, o = t.reference, i = n.reference, l = this.element;
|
|
366
366
|
let c = s;
|
|
367
367
|
for (; c !== null; ) {
|
|
368
368
|
const a = c.nextSibling;
|
|
@@ -371,8 +371,8 @@ class T {
|
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
removeRange(e, t) {
|
|
374
|
-
const
|
|
375
|
-
let i =
|
|
374
|
+
const n = e.reference, s = t.reference, o = this.element;
|
|
375
|
+
let i = n;
|
|
376
376
|
for (; i !== null; ) {
|
|
377
377
|
const l = i.nextSibling;
|
|
378
378
|
if (o.removeChild(i), i === s) break;
|
|
@@ -380,10 +380,10 @@ class T {
|
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
removeAllBefore(e) {
|
|
383
|
-
const t = e.reference,
|
|
384
|
-
if (!
|
|
383
|
+
const t = e.reference, n = this.element;
|
|
384
|
+
if (!n.firstChild || n.firstChild === t) return;
|
|
385
385
|
const s = this.document.createRange();
|
|
386
|
-
s.setStartBefore(
|
|
386
|
+
s.setStartBefore(n.firstChild), s.setEndBefore(t), s.deleteContents();
|
|
387
387
|
}
|
|
388
388
|
_detachedParent = null;
|
|
389
389
|
_detachedNext = null;
|
|
@@ -395,19 +395,19 @@ class T {
|
|
|
395
395
|
this._detachedParent && (this._detachedParent.insertBefore(this.element, this._detachedNext), this._detachedParent = null, this._detachedNext = null);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
const H = (
|
|
399
|
-
const t = new pe(),
|
|
398
|
+
const H = (r, e) => {
|
|
399
|
+
const t = new pe(), n = me(t, () => r.render(e));
|
|
400
400
|
return (s = !0) => {
|
|
401
|
-
t.dispose(),
|
|
401
|
+
t.dispose(), n(s);
|
|
402
402
|
};
|
|
403
|
-
}, gt = (
|
|
403
|
+
}, gt = (r, e, { doc: t, clear: n, disposeWithParent: s = !0, providers: o = {} } = {}) => {
|
|
404
404
|
const i = typeof e == "string" ? (t ?? document).querySelector(e) : e;
|
|
405
405
|
if (i === null)
|
|
406
406
|
throw new Ae(
|
|
407
407
|
`Cannot find element by selector for render: ${e}`
|
|
408
408
|
);
|
|
409
|
-
|
|
410
|
-
const l = we(i), c = te(i) ||
|
|
409
|
+
n !== !1 && (t ?? i.ownerDocument) != null && (i.nodeType === 1 || i.nodeType === 11) && (i.innerHTML = "");
|
|
410
|
+
const l = we(i), c = te(i) || re(i) ? void 0 : i, a = T.of(l, c, o), d = H(r, a);
|
|
411
411
|
let m;
|
|
412
412
|
return s && i.parentElement != null && (m = new MutationObserver((u) => {
|
|
413
413
|
u[0]?.removedNodes.forEach((h) => {
|
|
@@ -420,16 +420,16 @@ const H = (n, e) => {
|
|
|
420
420
|
})), () => {
|
|
421
421
|
m?.disconnect(), d(!0);
|
|
422
422
|
};
|
|
423
|
-
},
|
|
423
|
+
}, yt = (r, {
|
|
424
424
|
startUrl: e = "https://example.com",
|
|
425
425
|
selector: t,
|
|
426
|
-
providers:
|
|
426
|
+
providers: n = {}
|
|
427
427
|
} = {
|
|
428
428
|
selector: "body"
|
|
429
429
|
}) => {
|
|
430
|
-
const s = _.toSignal(e).deriveProp(), o = new oe(t, void 0), i = new
|
|
430
|
+
const s = _.toSignal(e).deriveProp(), o = new oe(t, void 0), i = new C(o, void 0, { currentURL: s }, n);
|
|
431
431
|
return {
|
|
432
|
-
clear: H(
|
|
432
|
+
clear: H(r(), i),
|
|
433
433
|
root: o,
|
|
434
434
|
currentURL: s
|
|
435
435
|
};
|
|
@@ -440,7 +440,7 @@ class Ae extends Error {
|
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
const V = "data-tts-node", E = "data-tts-class", P = "data-tts-style", M = "data-tts-html", O = "data-tts-text", L = "data-tts-attrs";
|
|
443
|
-
class
|
|
443
|
+
class bt {
|
|
444
444
|
/**
|
|
445
445
|
* Selects elements from the headless environment.
|
|
446
446
|
* @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
|
|
@@ -517,7 +517,7 @@ class yt {
|
|
|
517
517
|
constructor({
|
|
518
518
|
select: e,
|
|
519
519
|
getAttribute: t,
|
|
520
|
-
setAttribute:
|
|
520
|
+
setAttribute: n,
|
|
521
521
|
getClass: s,
|
|
522
522
|
setClass: o,
|
|
523
523
|
getStyles: i,
|
|
@@ -528,7 +528,7 @@ class yt {
|
|
|
528
528
|
getInnerText: m,
|
|
529
529
|
setInnerText: u
|
|
530
530
|
}) {
|
|
531
|
-
this.select = e, this.getAttribute = t, this.setAttribute =
|
|
531
|
+
this.select = e, this.getAttribute = t, this.setAttribute = n, this.getClass = s, this.setClass = o, this.getStyles = i, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = a, this.setInnerHTML = d, this.getInnerText = m, this.setInnerText = u;
|
|
532
532
|
}
|
|
533
533
|
/**
|
|
534
534
|
* Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
|
|
@@ -599,27 +599,27 @@ class yt {
|
|
|
599
599
|
});
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
const
|
|
603
|
-
const e =
|
|
604
|
-
|
|
605
|
-
},
|
|
606
|
-
const e =
|
|
607
|
-
|
|
608
|
-
},
|
|
609
|
-
const e =
|
|
610
|
-
|
|
611
|
-
}, Ee = (
|
|
612
|
-
const e =
|
|
613
|
-
if (
|
|
614
|
-
const t =
|
|
615
|
-
|
|
616
|
-
}
|
|
617
|
-
}, Pe = (
|
|
618
|
-
const e =
|
|
619
|
-
if (
|
|
620
|
-
const t =
|
|
621
|
-
Object.entries(t).forEach(([
|
|
622
|
-
s == null ?
|
|
602
|
+
const ne = (r) => JSON.parse(r.replace(/"/g, '"')), ke = (r) => {
|
|
603
|
+
const e = r.getAttribute(E);
|
|
604
|
+
r.removeAttribute(E), e != null && r.setAttribute("class", e);
|
|
605
|
+
}, Ce = (r) => {
|
|
606
|
+
const e = r.getAttribute(M);
|
|
607
|
+
r.removeAttribute(M), e != null && (r.innerHTML = e);
|
|
608
|
+
}, ve = (r) => {
|
|
609
|
+
const e = r.getAttribute(O);
|
|
610
|
+
r.removeAttribute(O), e != null && (r.innerText = e);
|
|
611
|
+
}, Ee = (r) => {
|
|
612
|
+
const e = r.getAttribute(P);
|
|
613
|
+
if (r.removeAttribute(P), e != null) {
|
|
614
|
+
const t = ne(e), n = Object.entries(t);
|
|
615
|
+
n.length > 0 && (r.style.cssText = n.map(([s, o]) => `${s}: ${o}`).join("; "));
|
|
616
|
+
}
|
|
617
|
+
}, Pe = (r) => {
|
|
618
|
+
const e = r.getAttribute(L);
|
|
619
|
+
if (r.removeAttribute(L), e != null) {
|
|
620
|
+
const t = ne(e);
|
|
621
|
+
Object.entries(t).forEach(([n, s]) => {
|
|
622
|
+
s == null ? r.removeAttribute(n) : r.setAttribute(n, s);
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
625
|
}, Tt = () => {
|
|
@@ -630,16 +630,16 @@ const re = (n) => JSON.parse(n.replace(/"/g, '"')), ke = (n) => {
|
|
|
630
630
|
O,
|
|
631
631
|
P,
|
|
632
632
|
L
|
|
633
|
-
].map((
|
|
634
|
-
document.querySelectorAll(e).forEach((
|
|
635
|
-
const s =
|
|
633
|
+
].map((n) => `[${n}]`).join(",");
|
|
634
|
+
document.querySelectorAll(e).forEach((n) => {
|
|
635
|
+
const s = n;
|
|
636
636
|
if (s.hasAttribute(V)) {
|
|
637
637
|
$(s);
|
|
638
638
|
return;
|
|
639
639
|
}
|
|
640
|
-
s.hasAttribute(E) && ke(s), s.hasAttribute(O) &&
|
|
640
|
+
s.hasAttribute(E) && ke(s), s.hasAttribute(O) && ve(s), s.hasAttribute(M) && Ce(s), s.hasAttribute(P) && Ee(s), s.hasAttribute(L) && Pe(s);
|
|
641
641
|
});
|
|
642
|
-
}, Me = "data-tempo-id", A = /* @__PURE__ */ Symbol("class"), k = /* @__PURE__ */ Symbol("style"), I = /* @__PURE__ */ Symbol("handler"), se = () => Math.random().toString(36).substring(2, 15), Oe = (
|
|
642
|
+
}, Me = "data-tempo-id", A = /* @__PURE__ */ Symbol("class"), k = /* @__PURE__ */ Symbol("style"), I = /* @__PURE__ */ Symbol("handler"), se = () => Math.random().toString(36).substring(2, 15), Oe = (r) => r.replace(/<[^>]*>?/g, "");
|
|
643
643
|
class ie {
|
|
644
644
|
constructor(e) {
|
|
645
645
|
this.parent = e;
|
|
@@ -707,9 +707,9 @@ class ie {
|
|
|
707
707
|
if (this.properties.id === e)
|
|
708
708
|
return this;
|
|
709
709
|
for (const t of this.elements()) {
|
|
710
|
-
const
|
|
711
|
-
if (
|
|
712
|
-
return
|
|
710
|
+
const n = t.getById(e);
|
|
711
|
+
if (n != null)
|
|
712
|
+
return n;
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
trigger(e, t) {
|
|
@@ -718,10 +718,10 @@ class ie {
|
|
|
718
718
|
click() {
|
|
719
719
|
this.trigger("click", {});
|
|
720
720
|
}
|
|
721
|
-
on(e, t,
|
|
721
|
+
on(e, t, n, s) {
|
|
722
722
|
const o = this.properties[I] ??= {}, i = s?.once ? (c) => {
|
|
723
|
-
l(), t(c,
|
|
724
|
-
} : (c) => t(c,
|
|
723
|
+
l(), t(c, n);
|
|
724
|
+
} : (c) => t(c, n);
|
|
725
725
|
o[e] = [...o[e] ?? [], i];
|
|
726
726
|
const l = () => {
|
|
727
727
|
const c = o[e] ?? [], a = c.indexOf(i);
|
|
@@ -732,17 +732,17 @@ class ie {
|
|
|
732
732
|
addClasses(e) {
|
|
733
733
|
if (e.length === 0)
|
|
734
734
|
return;
|
|
735
|
-
const t = this.properties[A] ??= [],
|
|
735
|
+
const t = this.properties[A] ??= [], n = new Set(t);
|
|
736
736
|
for (const s of e)
|
|
737
|
-
|
|
737
|
+
n.has(s) || (t.push(s), n.add(s));
|
|
738
738
|
}
|
|
739
739
|
removeClasses(e) {
|
|
740
740
|
if (e.length === 0)
|
|
741
741
|
return;
|
|
742
|
-
const t = this.properties[A] ??= [],
|
|
742
|
+
const t = this.properties[A] ??= [], n = new Set(e);
|
|
743
743
|
let s = 0;
|
|
744
744
|
for (let o = 0; o < t.length; o++)
|
|
745
|
-
|
|
745
|
+
n.has(t[o]) || (t[s] = t[o], s++);
|
|
746
746
|
t.length = s, t.length === 0 && delete this.properties[A];
|
|
747
747
|
}
|
|
748
748
|
getClasses() {
|
|
@@ -759,8 +759,8 @@ class ie {
|
|
|
759
759
|
);
|
|
760
760
|
}
|
|
761
761
|
setStyle(e, t) {
|
|
762
|
-
const
|
|
763
|
-
|
|
762
|
+
const n = this.properties[k] ??= {};
|
|
763
|
+
n[e] = t, t === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[k]);
|
|
764
764
|
}
|
|
765
765
|
getStyle(e) {
|
|
766
766
|
return this.properties[k]?.[e] ?? "";
|
|
@@ -772,14 +772,14 @@ class ie {
|
|
|
772
772
|
const t = this.properties;
|
|
773
773
|
return {
|
|
774
774
|
get: () => t[e],
|
|
775
|
-
set: (
|
|
775
|
+
set: (n) => t[e] = n
|
|
776
776
|
};
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
|
-
const Le = (
|
|
779
|
+
const Le = (r) => r.replace(/"/g, """), He = (r) => r.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
780
780
|
class Ne extends ie {
|
|
781
|
-
constructor(e, t,
|
|
782
|
-
super(
|
|
781
|
+
constructor(e, t, n) {
|
|
782
|
+
super(n), this.tagName = e, this.namespace = t;
|
|
783
783
|
}
|
|
784
784
|
isPortal() {
|
|
785
785
|
return !1;
|
|
@@ -790,12 +790,12 @@ class Ne extends ie {
|
|
|
790
790
|
*/
|
|
791
791
|
buildAttributesString(e) {
|
|
792
792
|
let t = null;
|
|
793
|
-
const
|
|
794
|
-
return { attrs: `${
|
|
793
|
+
const n = 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, a]) => `${c}: ${a};`).join(" ")}"` : Ie.has(i) ? ` ${i}` : i === "innerHTML" ? (t = l, "") : i === "innerText" ? (t = He(l), "") : ` ${i}="${Le(l)}"`).join(""), o = e ? ` ${V} ${Me}="${this.id}"` : "";
|
|
794
|
+
return { attrs: `${n}${s}${o}`, innerHTML: t };
|
|
795
795
|
}
|
|
796
796
|
toHTML(e = !1) {
|
|
797
|
-
const t = this.children.map((o) => o.toHTML()).join(""), { attrs:
|
|
798
|
-
return K.has(this.tagName) && t === "" ? `<${this.tagName}${
|
|
797
|
+
const t = this.children.map((o) => o.toHTML()).join(""), { attrs: n, innerHTML: s } = this.buildAttributesString(e);
|
|
798
|
+
return K.has(this.tagName) && t === "" ? `<${this.tagName}${n} />` : `<${this.tagName}${n}>${s ?? t}</${this.tagName}>`;
|
|
799
799
|
}
|
|
800
800
|
/**
|
|
801
801
|
* Generates HTML output as an async stream of string chunks.
|
|
@@ -805,12 +805,12 @@ class Ne extends ie {
|
|
|
805
805
|
* @yields String chunks of HTML content.
|
|
806
806
|
*/
|
|
807
807
|
async *toHTMLStream(e) {
|
|
808
|
-
const t = e?.generatePlaceholders ?? !1, { attrs:
|
|
808
|
+
const t = e?.generatePlaceholders ?? !1, { attrs: n, innerHTML: s } = this.buildAttributesString(t);
|
|
809
809
|
if (K.has(this.tagName) && this.children.length === 0) {
|
|
810
|
-
yield `<${this.tagName}${
|
|
810
|
+
yield `<${this.tagName}${n} />`;
|
|
811
811
|
return;
|
|
812
812
|
}
|
|
813
|
-
if (yield `<${this.tagName}${
|
|
813
|
+
if (yield `<${this.tagName}${n}>`, s !== null)
|
|
814
814
|
yield s;
|
|
815
815
|
else
|
|
816
816
|
for (const o of this.children)
|
|
@@ -877,9 +877,9 @@ class De {
|
|
|
877
877
|
yield this.text;
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
class
|
|
881
|
-
constructor(e, t,
|
|
882
|
-
this.element = e, this.reference = t, this.container =
|
|
880
|
+
class C {
|
|
881
|
+
constructor(e, t, n, s) {
|
|
882
|
+
this.element = e, this.reference = t, this.container = n, this.providers = s;
|
|
883
883
|
}
|
|
884
884
|
appendOrInsert(e) {
|
|
885
885
|
if (this.reference != null) {
|
|
@@ -889,9 +889,9 @@ class v {
|
|
|
889
889
|
this.element.children.push(e);
|
|
890
890
|
}
|
|
891
891
|
makeChildElement(e, t) {
|
|
892
|
-
const
|
|
893
|
-
return this.appendOrInsert(
|
|
894
|
-
|
|
892
|
+
const n = new Ne(e, t, this.element);
|
|
893
|
+
return this.appendOrInsert(n), new C(
|
|
894
|
+
n,
|
|
895
895
|
void 0,
|
|
896
896
|
this.container,
|
|
897
897
|
this.providers
|
|
@@ -899,7 +899,7 @@ class v {
|
|
|
899
899
|
}
|
|
900
900
|
makeChildText(e) {
|
|
901
901
|
const t = new De(String(e));
|
|
902
|
-
return this.appendOrInsert(t), new
|
|
902
|
+
return this.appendOrInsert(t), new C(
|
|
903
903
|
this.element,
|
|
904
904
|
t,
|
|
905
905
|
this.container,
|
|
@@ -920,7 +920,7 @@ class v {
|
|
|
920
920
|
}
|
|
921
921
|
makePortal(e) {
|
|
922
922
|
const t = new oe(e, this.element);
|
|
923
|
-
return this.appendOrInsert(t), new
|
|
923
|
+
return this.appendOrInsert(t), new C(
|
|
924
924
|
t,
|
|
925
925
|
void 0,
|
|
926
926
|
this.container,
|
|
@@ -934,17 +934,17 @@ class v {
|
|
|
934
934
|
* @param value - The provider to set for the given mark.
|
|
935
935
|
* @returns A new `DOMContext` instance with the specified provider.
|
|
936
936
|
*/
|
|
937
|
-
setProvider(e, t,
|
|
938
|
-
return new
|
|
937
|
+
setProvider(e, t, n) {
|
|
938
|
+
return new C(this.element, this.reference, this.container, {
|
|
939
939
|
...this.providers,
|
|
940
|
-
[e]: [t,
|
|
940
|
+
[e]: [t, n]
|
|
941
941
|
});
|
|
942
942
|
}
|
|
943
943
|
getProvider(e) {
|
|
944
944
|
if (this.providers[e] === void 0)
|
|
945
945
|
throw new J(e);
|
|
946
|
-
const [t,
|
|
947
|
-
return { value: t, onUse:
|
|
946
|
+
const [t, n] = this.providers[e];
|
|
947
|
+
return { value: t, onUse: n };
|
|
948
948
|
}
|
|
949
949
|
clear(e) {
|
|
950
950
|
e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
|
|
@@ -982,17 +982,17 @@ class v {
|
|
|
982
982
|
makeAccessors(e) {
|
|
983
983
|
return this.element.makeAccessors(e);
|
|
984
984
|
}
|
|
985
|
-
moveRangeBefore(e, t,
|
|
986
|
-
const s = e.reference, o = t.reference, i =
|
|
985
|
+
moveRangeBefore(e, t, n) {
|
|
986
|
+
const s = e.reference, o = t.reference, i = n.reference, l = this.element.children, c = l.indexOf(s), d = l.indexOf(o) - c + 1, m = l.splice(c, d), u = l.indexOf(i);
|
|
987
987
|
l.splice(u, 0, ...m);
|
|
988
988
|
}
|
|
989
989
|
removeRange(e, t) {
|
|
990
|
-
const
|
|
990
|
+
const n = e.reference, s = t.reference, o = this.element.children, i = o.indexOf(n), c = o.indexOf(s) - i + 1;
|
|
991
991
|
o.splice(i, c);
|
|
992
992
|
}
|
|
993
993
|
removeAllBefore(e) {
|
|
994
|
-
const t = e.reference,
|
|
995
|
-
s > 0 &&
|
|
994
|
+
const t = e.reference, n = this.element.children, s = n.indexOf(t);
|
|
995
|
+
s > 0 && n.splice(0, s);
|
|
996
996
|
}
|
|
997
997
|
detach() {
|
|
998
998
|
}
|
|
@@ -1009,15 +1009,15 @@ const Ie = /* @__PURE__ */ new Set([
|
|
|
1009
1009
|
]), K = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), St = () => (
|
|
1010
1010
|
/* c8 ignore next */
|
|
1011
1011
|
typeof window < "u" ? window : void 0
|
|
1012
|
-
), le = /* @__PURE__ */ Symbol("DOM_RENDERABLE"), p = (
|
|
1013
|
-
function Re(
|
|
1014
|
-
const t = [],
|
|
1015
|
-
return W(
|
|
1012
|
+
), le = /* @__PURE__ */ Symbol("DOM_RENDERABLE"), p = (r) => ge(le, r);
|
|
1013
|
+
function Re(r, e) {
|
|
1014
|
+
const t = [], n = e.createDocumentFragment();
|
|
1015
|
+
return W(r, n, [], { count: 0 }, t, e) ? { fragment: n, slots: t, topNodeCount: n.childNodes.length } : null;
|
|
1016
1016
|
}
|
|
1017
|
-
function W(
|
|
1018
|
-
switch (
|
|
1017
|
+
function W(r, e, t, n, s, o) {
|
|
1018
|
+
switch (r.kind) {
|
|
1019
1019
|
case "element": {
|
|
1020
|
-
const { tag: i, ns: l, children: c } =
|
|
1020
|
+
const { tag: i, ns: l, children: c } = r, a = l != null ? o.createElementNS(l, i) : o.createElement(i), d = [...t, n.count++];
|
|
1021
1021
|
let m = "";
|
|
1022
1022
|
for (let h = 0; h < c.length; h++) {
|
|
1023
1023
|
const f = c[h];
|
|
@@ -1035,74 +1035,74 @@ function W(n, e, t, r, s, o) {
|
|
|
1035
1035
|
return !0;
|
|
1036
1036
|
}
|
|
1037
1037
|
case "static-text":
|
|
1038
|
-
return e.appendChild(o.createTextNode(
|
|
1038
|
+
return e.appendChild(o.createTextNode(r.text)), n.count++, !0;
|
|
1039
1039
|
case "dynamic-text":
|
|
1040
1040
|
return e.appendChild(o.createTextNode("")), s.push({
|
|
1041
|
-
path: [...t,
|
|
1041
|
+
path: [...t, n.count++],
|
|
1042
1042
|
kind: "dynamic-text"
|
|
1043
1043
|
}), !0;
|
|
1044
1044
|
case "fragment": {
|
|
1045
|
-
const { children: i } =
|
|
1045
|
+
const { children: i } = r;
|
|
1046
1046
|
for (let l = 0; l < i.length; l++)
|
|
1047
|
-
if (!W(i[l], e, t,
|
|
1047
|
+
if (!W(i[l], e, t, n, s, o))
|
|
1048
1048
|
return !1;
|
|
1049
1049
|
return !0;
|
|
1050
1050
|
}
|
|
1051
1051
|
case "empty":
|
|
1052
1052
|
return !0;
|
|
1053
1053
|
default:
|
|
1054
|
-
return
|
|
1055
|
-
path: [...t,
|
|
1054
|
+
return r.kind === void 0 ? (e.appendChild(o.createComment("")), s.push({
|
|
1055
|
+
path: [...t, n.count++],
|
|
1056
1056
|
kind: "slot"
|
|
1057
1057
|
}), !0) : !1;
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
|
-
function _e(
|
|
1061
|
-
let t =
|
|
1062
|
-
for (let
|
|
1063
|
-
t = t.childNodes[e[
|
|
1060
|
+
function _e(r, e) {
|
|
1061
|
+
let t = r;
|
|
1062
|
+
for (let n = 0; n < e.length; n++)
|
|
1063
|
+
t = t.childNodes[e[n]];
|
|
1064
1064
|
return t;
|
|
1065
1065
|
}
|
|
1066
|
-
function $e(
|
|
1067
|
-
const
|
|
1066
|
+
function $e(r, e, t) {
|
|
1067
|
+
const n = e, s = r.fragment.cloneNode(!0), o = r.topNodeCount, i = new Array(o);
|
|
1068
1068
|
let l = s.firstChild;
|
|
1069
1069
|
for (let u = 0; u < o; u++)
|
|
1070
1070
|
i[u] = l, l = l.nextSibling;
|
|
1071
|
-
const c =
|
|
1071
|
+
const c = r.slots.length, a = new Array(c);
|
|
1072
1072
|
for (let u = 0; u < c; u++)
|
|
1073
|
-
a[u] = _e(s,
|
|
1074
|
-
|
|
1073
|
+
a[u] = _e(s, r.slots[u].path);
|
|
1074
|
+
n.appendOrInsert(s);
|
|
1075
1075
|
const d = new Array(c);
|
|
1076
1076
|
for (let u = 0; u < c; u++) {
|
|
1077
|
-
const h =
|
|
1077
|
+
const h = r.slots[u], f = a[u];
|
|
1078
1078
|
if (h.kind === "dynamic-text") {
|
|
1079
|
-
const
|
|
1080
|
-
g.textContent =
|
|
1081
|
-
g.textContent =
|
|
1079
|
+
const b = t[u], g = f;
|
|
1080
|
+
g.textContent = b.transform(b.source.value), d[u] = b.source.onChange((w) => {
|
|
1081
|
+
g.textContent = b.transform(w);
|
|
1082
1082
|
});
|
|
1083
1083
|
} else if (h.kind === "dynamic-attr") {
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1084
|
+
const b = t[u], g = new T(
|
|
1085
|
+
n.document,
|
|
1086
1086
|
f,
|
|
1087
1087
|
void 0,
|
|
1088
|
-
|
|
1088
|
+
n.providers
|
|
1089
1089
|
);
|
|
1090
|
-
d[u] =
|
|
1090
|
+
d[u] = b.render(g);
|
|
1091
1091
|
} else {
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1092
|
+
const b = t[u], g = f, w = new T(
|
|
1093
|
+
n.document,
|
|
1094
1094
|
g.parentNode,
|
|
1095
1095
|
g,
|
|
1096
|
-
|
|
1096
|
+
n.providers
|
|
1097
1097
|
);
|
|
1098
|
-
d[u] =
|
|
1098
|
+
d[u] = b.render(w), g.remove();
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
1101
|
const m = new T(
|
|
1102
|
-
|
|
1103
|
-
|
|
1102
|
+
n.document,
|
|
1103
|
+
n.element,
|
|
1104
1104
|
i[0],
|
|
1105
|
-
|
|
1105
|
+
n.providers
|
|
1106
1106
|
);
|
|
1107
1107
|
return {
|
|
1108
1108
|
clear: (u) => {
|
|
@@ -1117,38 +1117,38 @@ function $e(n, e, t) {
|
|
|
1117
1117
|
startCtx: m
|
|
1118
1118
|
};
|
|
1119
1119
|
}
|
|
1120
|
-
function Be(
|
|
1120
|
+
function Be(r) {
|
|
1121
1121
|
const e = [];
|
|
1122
|
-
function t(
|
|
1123
|
-
switch (
|
|
1122
|
+
function t(n) {
|
|
1123
|
+
switch (n.kind) {
|
|
1124
1124
|
case "element": {
|
|
1125
|
-
const { tag: s, children: o } =
|
|
1125
|
+
const { tag: s, children: o } = n;
|
|
1126
1126
|
e.push(`E:${s}`);
|
|
1127
1127
|
for (const i of o) if (!t(i)) return !1;
|
|
1128
1128
|
e.push("/E");
|
|
1129
1129
|
break;
|
|
1130
1130
|
}
|
|
1131
1131
|
case "static-attr":
|
|
1132
|
-
e.push(`SA:${
|
|
1132
|
+
e.push(`SA:${n.name}=${n.value}`);
|
|
1133
1133
|
break;
|
|
1134
1134
|
case "dynamic-attr":
|
|
1135
1135
|
e.push("DA");
|
|
1136
1136
|
break;
|
|
1137
1137
|
case "static-text":
|
|
1138
|
-
e.push(`ST:${
|
|
1138
|
+
e.push(`ST:${n.text}`);
|
|
1139
1139
|
break;
|
|
1140
1140
|
case "dynamic-text":
|
|
1141
1141
|
e.push("DT");
|
|
1142
1142
|
break;
|
|
1143
1143
|
case "fragment": {
|
|
1144
|
-
const { children: s } =
|
|
1144
|
+
const { children: s } = n;
|
|
1145
1145
|
for (const o of s) if (!t(o)) return !1;
|
|
1146
1146
|
break;
|
|
1147
1147
|
}
|
|
1148
1148
|
case "empty":
|
|
1149
1149
|
break;
|
|
1150
1150
|
default:
|
|
1151
|
-
if (
|
|
1151
|
+
if (n.kind === void 0) {
|
|
1152
1152
|
e.push("S");
|
|
1153
1153
|
break;
|
|
1154
1154
|
}
|
|
@@ -1156,14 +1156,14 @@ function Be(n) {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
return !0;
|
|
1158
1158
|
}
|
|
1159
|
-
return t(
|
|
1159
|
+
return t(r) ? e.join("|") : null;
|
|
1160
1160
|
}
|
|
1161
|
-
function je(
|
|
1161
|
+
function je(r) {
|
|
1162
1162
|
const e = [];
|
|
1163
|
-
function t(
|
|
1164
|
-
switch (
|
|
1163
|
+
function t(n) {
|
|
1164
|
+
switch (n.kind) {
|
|
1165
1165
|
case "element": {
|
|
1166
|
-
const { children: s } =
|
|
1166
|
+
const { children: s } = n;
|
|
1167
1167
|
for (const o of s)
|
|
1168
1168
|
if (o.kind !== "static-attr") {
|
|
1169
1169
|
if (o.kind === "dynamic-attr") {
|
|
@@ -1175,7 +1175,7 @@ function je(n) {
|
|
|
1175
1175
|
break;
|
|
1176
1176
|
}
|
|
1177
1177
|
case "fragment": {
|
|
1178
|
-
const { children: s } =
|
|
1178
|
+
const { children: s } = n;
|
|
1179
1179
|
for (const o of s) t(o);
|
|
1180
1180
|
break;
|
|
1181
1181
|
}
|
|
@@ -1183,31 +1183,31 @@ function je(n) {
|
|
|
1183
1183
|
case "empty":
|
|
1184
1184
|
break;
|
|
1185
1185
|
case "dynamic-text":
|
|
1186
|
-
e.push(
|
|
1186
|
+
e.push(n);
|
|
1187
1187
|
break;
|
|
1188
1188
|
default:
|
|
1189
|
-
|
|
1189
|
+
n.kind === void 0 && e.push(n);
|
|
1190
1190
|
break;
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
|
-
return t(
|
|
1193
|
+
return t(r), e;
|
|
1194
1194
|
}
|
|
1195
1195
|
const Ve = {
|
|
1196
|
-
build(
|
|
1196
|
+
build(r, e) {
|
|
1197
1197
|
if (!e.isBrowser()) return null;
|
|
1198
|
-
const t =
|
|
1198
|
+
const t = r;
|
|
1199
1199
|
if (t.kind === void 0) return null;
|
|
1200
|
-
const
|
|
1201
|
-
return Re(t,
|
|
1200
|
+
const n = e.document;
|
|
1201
|
+
return Re(t, n);
|
|
1202
1202
|
},
|
|
1203
|
-
cloneAndHydrate(
|
|
1204
|
-
return $e(
|
|
1203
|
+
cloneAndHydrate(r, e, t) {
|
|
1204
|
+
return $e(r, e, t);
|
|
1205
1205
|
},
|
|
1206
|
-
fingerprint(
|
|
1207
|
-
return Be(
|
|
1206
|
+
fingerprint(r) {
|
|
1207
|
+
return Be(r);
|
|
1208
1208
|
},
|
|
1209
|
-
extractSlots(
|
|
1210
|
-
return je(
|
|
1209
|
+
extractSlots(r) {
|
|
1210
|
+
return je(r);
|
|
1211
1211
|
}
|
|
1212
1212
|
}, We = Te({
|
|
1213
1213
|
type: le,
|
|
@@ -1220,8 +1220,8 @@ const Ve = {
|
|
|
1220
1220
|
Unless: wt,
|
|
1221
1221
|
ForEach: At,
|
|
1222
1222
|
KeyedForEach: kt,
|
|
1223
|
-
Repeat:
|
|
1224
|
-
OneOf:
|
|
1223
|
+
Repeat: Ct,
|
|
1224
|
+
OneOf: vt,
|
|
1225
1225
|
OneOfField: Et,
|
|
1226
1226
|
OneOfKind: Pt,
|
|
1227
1227
|
OneOfType: Mt,
|
|
@@ -1243,52 +1243,52 @@ const Ve = {
|
|
|
1243
1243
|
UseMany: Kt,
|
|
1244
1244
|
handleValueOrSignal: qt,
|
|
1245
1245
|
createReactiveRenderable: Gt,
|
|
1246
|
-
renderableOfTNode:
|
|
1246
|
+
renderableOfTNode: v
|
|
1247
1247
|
} = We, q = /* @__PURE__ */ new Map();
|
|
1248
|
-
function Ke(
|
|
1249
|
-
let e = q.get(
|
|
1250
|
-
return e === void 0 && (e =
|
|
1248
|
+
function Ke(r) {
|
|
1249
|
+
let e = q.get(r);
|
|
1250
|
+
return e === void 0 && (e = r.split(" ").filter((t) => t.length > 0), q.set(r, e)), e;
|
|
1251
1251
|
}
|
|
1252
|
-
const qe = (
|
|
1253
|
-
const e = p((t) => (t.addClasses(
|
|
1254
|
-
|
|
1252
|
+
const qe = (r) => {
|
|
1253
|
+
const e = p((t) => (t.addClasses(r), (n) => {
|
|
1254
|
+
n && t.removeClasses(r);
|
|
1255
1255
|
}));
|
|
1256
|
-
return e.kind = "static-attr", e.name = "class", e.value =
|
|
1257
|
-
}, Ge = (
|
|
1256
|
+
return e.kind = "static-attr", e.name = "class", e.value = r.join(" "), e;
|
|
1257
|
+
}, Ge = (r) => {
|
|
1258
1258
|
const e = p((t) => {
|
|
1259
|
-
let
|
|
1260
|
-
const s =
|
|
1259
|
+
let n = [];
|
|
1260
|
+
const s = r.on(
|
|
1261
1261
|
(o) => {
|
|
1262
1262
|
const i = (o ?? "").split(" ").filter((l) => l.length > 0);
|
|
1263
|
-
|
|
1263
|
+
n.length > 0 && t.removeClasses(n), i.length > 0 && t.addClasses(i), n = i;
|
|
1264
1264
|
},
|
|
1265
1265
|
{ noAutoDispose: !0 }
|
|
1266
1266
|
);
|
|
1267
1267
|
return (o) => {
|
|
1268
|
-
s(), o && t.removeClasses(
|
|
1268
|
+
s(), o && t.removeClasses(n), n = [];
|
|
1269
1269
|
};
|
|
1270
1270
|
});
|
|
1271
1271
|
return e.kind = "dynamic-attr", e;
|
|
1272
|
-
}, Ue = (
|
|
1273
|
-
const t = p((
|
|
1274
|
-
const { get: s, set: o } =
|
|
1272
|
+
}, Ue = (r, e) => {
|
|
1273
|
+
const t = p((n) => {
|
|
1274
|
+
const { get: s, set: o } = n.makeAccessors(r), i = s();
|
|
1275
1275
|
return o(e), (l) => {
|
|
1276
1276
|
l && o(i);
|
|
1277
1277
|
};
|
|
1278
1278
|
});
|
|
1279
|
-
return t.kind = "static-attr", t.name =
|
|
1280
|
-
}, Je = (
|
|
1281
|
-
const t = p((
|
|
1282
|
-
const { get: s, set: o } =
|
|
1279
|
+
return t.kind = "static-attr", t.name = r, t.value = String(e), t;
|
|
1280
|
+
}, Je = (r, e) => {
|
|
1281
|
+
const t = p((n) => {
|
|
1282
|
+
const { get: s, set: o } = n.makeAccessors(r), i = s(), l = e.on(o, { noAutoDispose: !0 });
|
|
1283
1283
|
return (c) => {
|
|
1284
1284
|
l(), c && o(i);
|
|
1285
1285
|
};
|
|
1286
1286
|
});
|
|
1287
1287
|
return t.kind = "dynamic-attr", t;
|
|
1288
|
-
}, N = (
|
|
1288
|
+
}, N = (r, e) => B.is(e) ? Je(r, e) : Ue(r, e), Ye = (r, e) => r === "class" ? B.is(e) ? Ge(e) : qe(
|
|
1289
1289
|
/* c8 ignore next */
|
|
1290
1290
|
(e ?? "").split(" ").filter((t) => t.length > 0)
|
|
1291
|
-
) : N(
|
|
1291
|
+
) : N(r, e), y = new Proxy(
|
|
1292
1292
|
{},
|
|
1293
1293
|
{
|
|
1294
1294
|
/**
|
|
@@ -1302,9 +1302,9 @@ const qe = (n) => {
|
|
|
1302
1302
|
* @returns The renderable component for the specified attribute.
|
|
1303
1303
|
*
|
|
1304
1304
|
*/
|
|
1305
|
-
get: (
|
|
1305
|
+
get: (r, e) => (t) => Ye(e, t)
|
|
1306
1306
|
}
|
|
1307
|
-
), Xe = (
|
|
1307
|
+
), Xe = (r, e) => N(`data-${r}`, e), Ut = new Proxy(
|
|
1308
1308
|
{},
|
|
1309
1309
|
{
|
|
1310
1310
|
/**
|
|
@@ -1315,9 +1315,9 @@ const qe = (n) => {
|
|
|
1315
1315
|
* @returns The renderable component for the specified attribute.
|
|
1316
1316
|
*
|
|
1317
1317
|
*/
|
|
1318
|
-
get: (
|
|
1318
|
+
get: (r, e) => (t) => Xe(e, t)
|
|
1319
1319
|
}
|
|
1320
|
-
), ze = (
|
|
1320
|
+
), ze = (r, e) => N(`aria-${r}`, e), Jt = new Proxy(
|
|
1321
1321
|
{},
|
|
1322
1322
|
{
|
|
1323
1323
|
/**
|
|
@@ -1328,9 +1328,9 @@ const qe = (n) => {
|
|
|
1328
1328
|
* @returns The renderable component for the specified attribute.
|
|
1329
1329
|
*
|
|
1330
1330
|
*/
|
|
1331
|
-
get: (
|
|
1331
|
+
get: (r, e) => (t) => ze(e, t)
|
|
1332
1332
|
}
|
|
1333
|
-
), Qe = (
|
|
1333
|
+
), Qe = (r, e) => N(r, e), Yt = new Proxy(
|
|
1334
1334
|
{},
|
|
1335
1335
|
{
|
|
1336
1336
|
/**
|
|
@@ -1341,9 +1341,9 @@ const qe = (n) => {
|
|
|
1341
1341
|
* @returns The renderable component for the specified attribute.
|
|
1342
1342
|
*
|
|
1343
1343
|
*/
|
|
1344
|
-
get: (
|
|
1344
|
+
get: (r, e) => (t) => Qe(e, t)
|
|
1345
1345
|
}
|
|
1346
|
-
), Ze = (
|
|
1346
|
+
), Ze = (r, e) => N(r, e), Xt = new Proxy(
|
|
1347
1347
|
{},
|
|
1348
1348
|
{
|
|
1349
1349
|
/**
|
|
@@ -1353,19 +1353,19 @@ const qe = (n) => {
|
|
|
1353
1353
|
* @returns The renderable component for the specified attribute.
|
|
1354
1354
|
*
|
|
1355
1355
|
*/
|
|
1356
|
-
get: (
|
|
1356
|
+
get: (r, e) => (t) => Ze(e, t)
|
|
1357
1357
|
}
|
|
1358
1358
|
), G = /* @__PURE__ */ new WeakMap();
|
|
1359
|
-
function et(
|
|
1360
|
-
let t = G.get(
|
|
1361
|
-
return t || (t =
|
|
1362
|
-
|
|
1359
|
+
function et(r, e) {
|
|
1360
|
+
let t = G.get(r);
|
|
1361
|
+
return t || (t = ye(r, e), G.set(
|
|
1362
|
+
r,
|
|
1363
1363
|
t
|
|
1364
1364
|
)), t;
|
|
1365
1365
|
}
|
|
1366
|
-
const zt = (
|
|
1366
|
+
const zt = (r, e, t = "danger", n) => {
|
|
1367
1367
|
const s = Ke(t), o = p((i) => {
|
|
1368
|
-
const a = et(
|
|
1368
|
+
const a = et(r, n)(e).on(
|
|
1369
1369
|
(d) => {
|
|
1370
1370
|
d ? i.addClasses(s) : i.removeClasses(s);
|
|
1371
1371
|
},
|
|
@@ -1376,17 +1376,17 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1376
1376
|
};
|
|
1377
1377
|
});
|
|
1378
1378
|
return o.kind = "dynamic-attr", o;
|
|
1379
|
-
}, ae = (
|
|
1380
|
-
const
|
|
1381
|
-
(s) => s.on(
|
|
1379
|
+
}, ae = (r, e, t) => {
|
|
1380
|
+
const n = p(
|
|
1381
|
+
(s) => s.on(r, e, t)
|
|
1382
1382
|
);
|
|
1383
|
-
return
|
|
1384
|
-
}, tt = (
|
|
1383
|
+
return n.kind = "dynamic-attr", n;
|
|
1384
|
+
}, tt = (r) => ae("click", (e, t) => {
|
|
1385
1385
|
e.preventDefault();
|
|
1386
|
-
const
|
|
1386
|
+
const n = e.target;
|
|
1387
1387
|
setTimeout(() => {
|
|
1388
|
-
const s =
|
|
1389
|
-
s != null &&
|
|
1388
|
+
const s = n.ownerDocument != null ? n?.checked : void 0;
|
|
1389
|
+
s != null && r(!s, t);
|
|
1390
1390
|
}, 0);
|
|
1391
1391
|
}), D = new Proxy(
|
|
1392
1392
|
{},
|
|
@@ -1396,20 +1396,20 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1396
1396
|
* @param fn - The function to call when the event is triggered.
|
|
1397
1397
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1398
1398
|
*/
|
|
1399
|
-
get: (
|
|
1400
|
-
}
|
|
1401
|
-
),
|
|
1402
|
-
e?.preventDefault === !0 && t.preventDefault(), e?.stopPropagation === !0 && t.stopPropagation(), e?.stopImmediatePropagation === !0 && t.stopImmediatePropagation(),
|
|
1403
|
-
}, x = (
|
|
1404
|
-
const
|
|
1405
|
-
n
|
|
1406
|
-
}, e),
|
|
1407
|
-
(t,
|
|
1399
|
+
get: (r, e) => (t) => ae(e, t)
|
|
1400
|
+
}
|
|
1401
|
+
), rt = (r, e) => (t) => {
|
|
1402
|
+
e?.preventDefault === !0 && t.preventDefault(), e?.stopPropagation === !0 && t.stopPropagation(), e?.stopImmediatePropagation === !0 && t.stopImmediatePropagation(), r(t);
|
|
1403
|
+
}, x = (r, e) => rt((t) => {
|
|
1404
|
+
const n = t.target;
|
|
1405
|
+
r(n, t);
|
|
1406
|
+
}, e), nt = (r, e) => x(
|
|
1407
|
+
(t, n) => r(t.value, n),
|
|
1408
1408
|
e
|
|
1409
|
-
), st = (
|
|
1410
|
-
(t,
|
|
1409
|
+
), st = (r, e) => x(
|
|
1410
|
+
(t, n) => r(t.valueAsNumber, n),
|
|
1411
1411
|
e
|
|
1412
|
-
), it = (
|
|
1412
|
+
), it = (r, e) => x((t, n) => {
|
|
1413
1413
|
if (t.value === "")
|
|
1414
1414
|
return;
|
|
1415
1415
|
const s = t.value.split("-"), o = new Date(
|
|
@@ -1417,10 +1417,10 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1417
1417
|
Number(s[1]) - 1,
|
|
1418
1418
|
Number(s[2].substring(0, 2))
|
|
1419
1419
|
);
|
|
1420
|
-
|
|
1421
|
-
}, e), Qt = (
|
|
1420
|
+
r(o, n);
|
|
1421
|
+
}, e), Qt = (r, e) => x((t, n) => {
|
|
1422
1422
|
if (t.value === "") {
|
|
1423
|
-
|
|
1423
|
+
r(null, n);
|
|
1424
1424
|
return;
|
|
1425
1425
|
}
|
|
1426
1426
|
const s = t.value.split("-"), o = new Date(
|
|
@@ -1428,8 +1428,8 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1428
1428
|
Number(s[1]) - 1,
|
|
1429
1429
|
Number(s[2].substring(0, 2))
|
|
1430
1430
|
);
|
|
1431
|
-
|
|
1432
|
-
}, e), ot = (
|
|
1431
|
+
r(o, n);
|
|
1432
|
+
}, e), ot = (r, e) => x((t, n) => {
|
|
1433
1433
|
if (t.value === "")
|
|
1434
1434
|
return;
|
|
1435
1435
|
const s = t.value.split("T"), o = s[0].split("-"), i = new Date(
|
|
@@ -1437,15 +1437,15 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1437
1437
|
Number(o[1]) - 1,
|
|
1438
1438
|
Number(o[2])
|
|
1439
1439
|
), l = s[1].split(":");
|
|
1440
|
-
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])),
|
|
1441
|
-
}, e), Zt = (
|
|
1440
|
+
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), r(i, n);
|
|
1441
|
+
}, e), Zt = (r, e) => x((t, n) => {
|
|
1442
1442
|
if (t.value === "") {
|
|
1443
|
-
|
|
1443
|
+
r(null, n);
|
|
1444
1444
|
return;
|
|
1445
1445
|
}
|
|
1446
1446
|
const s = t.value.split("T");
|
|
1447
1447
|
if (s.length !== 2) {
|
|
1448
|
-
|
|
1448
|
+
r(null, n);
|
|
1449
1449
|
return;
|
|
1450
1450
|
}
|
|
1451
1451
|
const o = s[0].split("-"), i = new Date(
|
|
@@ -1453,22 +1453,22 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1453
1453
|
Number(o[1]) - 1,
|
|
1454
1454
|
Number(o[2])
|
|
1455
1455
|
), l = s[1].split(":");
|
|
1456
|
-
i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)),
|
|
1457
|
-
}, e),
|
|
1458
|
-
|
|
1459
|
-
}, e),
|
|
1460
|
-
|
|
1461
|
-
D[e](it((t) =>
|
|
1462
|
-
),
|
|
1463
|
-
|
|
1464
|
-
D[e](ot((t) =>
|
|
1465
|
-
),
|
|
1466
|
-
|
|
1467
|
-
D[e](st((t) =>
|
|
1468
|
-
),
|
|
1469
|
-
|
|
1470
|
-
tt((e) =>
|
|
1471
|
-
), lt = (
|
|
1456
|
+
i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), r(i, n);
|
|
1457
|
+
}, e), er = (r, e) => x((t, n) => {
|
|
1458
|
+
r(t.checked, n);
|
|
1459
|
+
}, e), tr = (r, e = "input") => S(
|
|
1460
|
+
y.valueAsDate(r),
|
|
1461
|
+
D[e](it((t) => r.set(t)))
|
|
1462
|
+
), rr = (r, e = "input") => S(
|
|
1463
|
+
y.valueAsDate(r),
|
|
1464
|
+
D[e](ot((t) => r.set(t)))
|
|
1465
|
+
), nr = (r, e = "input") => S(
|
|
1466
|
+
y.valueAsNumber(r),
|
|
1467
|
+
D[e](st((t) => r.set(t)))
|
|
1468
|
+
), sr = (r, e = "input") => S(y.value(r), D[e](nt((t) => r.set(t)))), ir = (r) => S(
|
|
1469
|
+
y.checked(r),
|
|
1470
|
+
tt((e) => r.set(e))
|
|
1471
|
+
), lt = (r, e, t, n) => {
|
|
1472
1472
|
const s = p((o) => {
|
|
1473
1473
|
if (!o.isBrowser())
|
|
1474
1474
|
return () => {
|
|
@@ -1477,34 +1477,34 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1477
1477
|
const a = c.target?.closest(e);
|
|
1478
1478
|
a != null && i.contains(a) && t(c, o);
|
|
1479
1479
|
};
|
|
1480
|
-
return i.addEventListener(
|
|
1481
|
-
c && i.removeEventListener(
|
|
1480
|
+
return i.addEventListener(r, l, n), (c) => {
|
|
1481
|
+
c && i.removeEventListener(r, l, n);
|
|
1482
1482
|
};
|
|
1483
1483
|
});
|
|
1484
1484
|
return s.kind = "dynamic-attr", s;
|
|
1485
|
-
},
|
|
1485
|
+
}, or = new Proxy(
|
|
1486
1486
|
{},
|
|
1487
1487
|
{
|
|
1488
|
-
get: (
|
|
1488
|
+
get: (r, e) => (t, n, s) => lt(e, t, n, s)
|
|
1489
1489
|
}
|
|
1490
|
-
),
|
|
1491
|
-
t && $(
|
|
1492
|
-
})), ue = (
|
|
1493
|
-
const t = e.map(
|
|
1494
|
-
const o = s.makeChildElement(
|
|
1490
|
+
), lr = (r) => p((e) => (e.appendOrInsert(r), (t) => {
|
|
1491
|
+
t && $(r);
|
|
1492
|
+
})), ue = (r, ...e) => {
|
|
1493
|
+
const t = e.map(v), n = p((s) => {
|
|
1494
|
+
const o = s.makeChildElement(r, void 0), i = t.map((l) => l.render(o));
|
|
1495
1495
|
return (l) => {
|
|
1496
1496
|
i.forEach((c) => c(!1)), o.clear(l);
|
|
1497
1497
|
};
|
|
1498
1498
|
});
|
|
1499
|
-
return
|
|
1500
|
-
}, j = (
|
|
1501
|
-
const
|
|
1502
|
-
const i = o.makeChildElement(
|
|
1499
|
+
return n.kind = "element", n.tag = r, n.children = t, n;
|
|
1500
|
+
}, j = (r, e, ...t) => {
|
|
1501
|
+
const n = t.map(v), s = p((o) => {
|
|
1502
|
+
const i = o.makeChildElement(r, e), l = n.map((c) => c.render(i));
|
|
1503
1503
|
return (c) => {
|
|
1504
1504
|
l.forEach((a) => a(!1)), i.clear(c);
|
|
1505
1505
|
};
|
|
1506
1506
|
});
|
|
1507
|
-
return s.kind = "element", s.tag =
|
|
1507
|
+
return s.kind = "element", s.tag = r, s.ns = e, s.children = n, s;
|
|
1508
1508
|
}, ct = new Proxy(
|
|
1509
1509
|
{},
|
|
1510
1510
|
{
|
|
@@ -1513,9 +1513,9 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1513
1513
|
* @param tagName - The HTML tag name.
|
|
1514
1514
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
1515
1515
|
*/
|
|
1516
|
-
get: (
|
|
1516
|
+
get: (r, e) => (...t) => ue(e, ...t)
|
|
1517
1517
|
}
|
|
1518
|
-
),
|
|
1518
|
+
), cr = new Proxy(
|
|
1519
1519
|
{},
|
|
1520
1520
|
{
|
|
1521
1521
|
/**
|
|
@@ -1523,9 +1523,9 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1523
1523
|
* @param type - The input type name.
|
|
1524
1524
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
1525
1525
|
*/
|
|
1526
|
-
get: (
|
|
1526
|
+
get: (r, e) => (...t) => ue("input", y.type(e), ...t)
|
|
1527
1527
|
}
|
|
1528
|
-
), de = "http://www.w3.org/2000/svg",
|
|
1528
|
+
), de = "http://www.w3.org/2000/svg", ar = (r, ...e) => j(r, de, ...e), ur = new Proxy(
|
|
1529
1529
|
{},
|
|
1530
1530
|
{
|
|
1531
1531
|
/**
|
|
@@ -1533,9 +1533,9 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1533
1533
|
* @param tagName - The SVG tag name.
|
|
1534
1534
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1535
1535
|
*/
|
|
1536
|
-
get: (
|
|
1536
|
+
get: (r, e) => (...t) => j(e, de, ...t)
|
|
1537
1537
|
}
|
|
1538
|
-
), he = "http://www.w3.org/1998/Math/MathML",
|
|
1538
|
+
), he = "http://www.w3.org/1998/Math/MathML", dr = (r, ...e) => j(r, he, ...e), hr = new Proxy(
|
|
1539
1539
|
{},
|
|
1540
1540
|
{
|
|
1541
1541
|
/**
|
|
@@ -1543,22 +1543,22 @@ const zt = (n, e, t = "danger", r) => {
|
|
|
1543
1543
|
* @param tagName - The Math tag name.
|
|
1544
1544
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1545
1545
|
*/
|
|
1546
|
-
get: (
|
|
1546
|
+
get: (r, e) => (...t) => j(e, he, ...t)
|
|
1547
1547
|
}
|
|
1548
|
-
), F = (
|
|
1548
|
+
), F = (r) => p((e) => {
|
|
1549
1549
|
if (e.isBrowser()) {
|
|
1550
|
-
const t =
|
|
1550
|
+
const t = r(e);
|
|
1551
1551
|
if (t != null)
|
|
1552
|
-
return
|
|
1552
|
+
return v(t).render(e);
|
|
1553
1553
|
}
|
|
1554
1554
|
return () => {
|
|
1555
1555
|
};
|
|
1556
1556
|
});
|
|
1557
|
-
function
|
|
1558
|
-
src:
|
|
1557
|
+
function fr({
|
|
1558
|
+
src: r,
|
|
1559
1559
|
name: e,
|
|
1560
1560
|
width: t,
|
|
1561
|
-
height:
|
|
1561
|
+
height: n,
|
|
1562
1562
|
sandbox: s,
|
|
1563
1563
|
allow: o,
|
|
1564
1564
|
referrerpolicy: i,
|
|
@@ -1567,22 +1567,22 @@ function pn({
|
|
|
1567
1567
|
onLoad: a
|
|
1568
1568
|
} = {}, ...d) {
|
|
1569
1569
|
return ct.iframe(
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1570
|
+
y.src(r),
|
|
1571
|
+
y.name(e),
|
|
1572
|
+
y.width(
|
|
1573
1573
|
t != null ? _.map(t, String) : void 0
|
|
1574
1574
|
),
|
|
1575
|
-
|
|
1576
|
-
|
|
1575
|
+
y.height(
|
|
1576
|
+
n != null ? _.map(n, String) : void 0
|
|
1577
1577
|
),
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1578
|
+
y.sandbox(s),
|
|
1579
|
+
y.allow(o),
|
|
1580
|
+
y.referrerpolicy(i),
|
|
1581
1581
|
c,
|
|
1582
1582
|
F((m) => {
|
|
1583
1583
|
const u = m.element;
|
|
1584
1584
|
let h, f = !1;
|
|
1585
|
-
const
|
|
1585
|
+
const b = () => {
|
|
1586
1586
|
if (f) return;
|
|
1587
1587
|
f = !0;
|
|
1588
1588
|
const g = u.contentDocument;
|
|
@@ -1596,8 +1596,8 @@ function pn({
|
|
|
1596
1596
|
};
|
|
1597
1597
|
return l != null && _.on(l, (g) => {
|
|
1598
1598
|
u.loading = g;
|
|
1599
|
-
}), (d.length > 0 || a) && (
|
|
1600
|
-
d.length > 0 || a ? D.load(
|
|
1599
|
+
}), (d.length > 0 || a) && (r || setTimeout(b, 0)), S(
|
|
1600
|
+
d.length > 0 || a ? D.load(b) : Fe,
|
|
1601
1601
|
ce(() => {
|
|
1602
1602
|
h && h(!1);
|
|
1603
1603
|
})
|
|
@@ -1605,61 +1605,61 @@ function pn({
|
|
|
1605
1605
|
})
|
|
1606
1606
|
);
|
|
1607
1607
|
}
|
|
1608
|
-
const
|
|
1609
|
-
const
|
|
1608
|
+
const pr = (r, e) => p((t) => {
|
|
1609
|
+
const n = t.makePortal(r), s = H(v(e), n);
|
|
1610
1610
|
return () => s(!0);
|
|
1611
|
-
}), R = /* @__PURE__ */ new Map(), at = (
|
|
1612
|
-
mark:
|
|
1611
|
+
}), R = /* @__PURE__ */ new Map(), at = (r) => ({
|
|
1612
|
+
mark: be(`Probe(${r.description})`),
|
|
1613
1613
|
create: ({ callback: e = () => {
|
|
1614
1614
|
}, timeout: t = 10 } = {}) => {
|
|
1615
|
-
const
|
|
1616
|
-
clearTimeout(s), R.delete(
|
|
1615
|
+
const n = (l) => {
|
|
1616
|
+
clearTimeout(s), R.delete(r), e(l);
|
|
1617
1617
|
};
|
|
1618
|
-
if (R.has(
|
|
1619
|
-
throw new Error(`Probe already exists: ${
|
|
1620
|
-
const s = setTimeout(() =>
|
|
1621
|
-
return R.set(
|
|
1618
|
+
if (R.has(r))
|
|
1619
|
+
throw new Error(`Probe already exists: ${r.description}`);
|
|
1620
|
+
const s = setTimeout(() => n("timeout"), t), o = { counter: 0, timeoutId: s };
|
|
1621
|
+
return R.set(r, o), {
|
|
1622
1622
|
value: () => {
|
|
1623
1623
|
clearTimeout(s);
|
|
1624
|
-
const l = R.get(
|
|
1625
|
-
l != null && --l.counter === 0 &&
|
|
1624
|
+
const l = R.get(r);
|
|
1625
|
+
l != null && --l.counter === 0 && n("resolved");
|
|
1626
1626
|
},
|
|
1627
|
-
dispose: () =>
|
|
1627
|
+
dispose: () => n("disposed"),
|
|
1628
1628
|
onUse: () => o.counter++
|
|
1629
1629
|
};
|
|
1630
1630
|
}
|
|
1631
|
-
}),
|
|
1632
|
-
function
|
|
1633
|
-
mode:
|
|
1631
|
+
}), mr = at(/* @__PURE__ */ Symbol("GlobalProbe"));
|
|
1632
|
+
function gr({
|
|
1633
|
+
mode: r,
|
|
1634
1634
|
delegatesFocus: e,
|
|
1635
1635
|
slotAssignment: t,
|
|
1636
|
-
clonable:
|
|
1636
|
+
clonable: n,
|
|
1637
1637
|
serializable: s
|
|
1638
1638
|
}, ...o) {
|
|
1639
1639
|
return F((i) => {
|
|
1640
|
-
const l = { mode:
|
|
1641
|
-
e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t),
|
|
1640
|
+
const l = { mode: r };
|
|
1641
|
+
e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t), n !== void 0 && (l.clonable = n), s !== void 0 && (l.serializable = s);
|
|
1642
1642
|
const c = i.element.attachShadow(l), a = i.withElement(c), d = H(S(...o), a);
|
|
1643
1643
|
return ce(() => d(!0));
|
|
1644
1644
|
});
|
|
1645
1645
|
}
|
|
1646
|
-
const ut = (
|
|
1647
|
-
const t = p((
|
|
1648
|
-
const s =
|
|
1649
|
-
return
|
|
1650
|
-
o &&
|
|
1646
|
+
const ut = (r, e) => {
|
|
1647
|
+
const t = p((n) => {
|
|
1648
|
+
const s = n.getStyle(r);
|
|
1649
|
+
return n.setStyle(r, e), (o) => {
|
|
1650
|
+
o && n.setStyle(r, s);
|
|
1651
1651
|
};
|
|
1652
1652
|
});
|
|
1653
|
-
return t.kind = "
|
|
1654
|
-
}, dt = (
|
|
1655
|
-
const t = p((
|
|
1656
|
-
const s =
|
|
1653
|
+
return t.kind = "dynamic-attr", t;
|
|
1654
|
+
}, dt = (r, e) => {
|
|
1655
|
+
const t = p((n) => {
|
|
1656
|
+
const s = n.getStyle(r), o = e.on((i) => n.setStyle(r, i));
|
|
1657
1657
|
return (i) => {
|
|
1658
|
-
o(), i &&
|
|
1658
|
+
o(), i && n.setStyle(r, s);
|
|
1659
1659
|
};
|
|
1660
1660
|
});
|
|
1661
1661
|
return t.kind = "dynamic-attr", t;
|
|
1662
|
-
}, U = (
|
|
1662
|
+
}, U = (r, e) => B.is(e) ? dt(r, e) : ut(r, e), yr = new Proxy({}, {
|
|
1663
1663
|
/**
|
|
1664
1664
|
* Creates a renderable component for the specified `style` property.
|
|
1665
1665
|
*
|
|
@@ -1668,24 +1668,24 @@ const ut = (n, e) => {
|
|
|
1668
1668
|
* @returns The renderable component for the specified attribute.
|
|
1669
1669
|
*
|
|
1670
1670
|
*/
|
|
1671
|
-
get: (
|
|
1672
|
-
}), ht = (
|
|
1673
|
-
const t = e.makeChildText(
|
|
1674
|
-
return (
|
|
1675
|
-
}), ft = (
|
|
1676
|
-
const t = e.makeChildText(
|
|
1671
|
+
get: (r, e) => e === "variable" ? (t, n) => U(t, n) : (t) => U(e, t)
|
|
1672
|
+
}), ht = (r) => p((e) => {
|
|
1673
|
+
const t = e.makeChildText(r);
|
|
1674
|
+
return (n) => t.clear(n);
|
|
1675
|
+
}), ft = (r) => p((e) => {
|
|
1676
|
+
const t = e.makeChildText(r.value), n = r.on((s) => t.setText(s));
|
|
1677
1677
|
return (s) => {
|
|
1678
|
-
|
|
1678
|
+
n(), t.clear(s);
|
|
1679
1679
|
};
|
|
1680
|
-
}),
|
|
1681
|
-
const t =
|
|
1680
|
+
}), br = (r) => B.is(r) ? ft(r) : ht(r), Tr = (r) => p((e) => {
|
|
1681
|
+
const t = r(e);
|
|
1682
1682
|
return t == null ? () => {
|
|
1683
|
-
} :
|
|
1684
|
-
}),
|
|
1683
|
+
} : v(t).render(e);
|
|
1684
|
+
}), Sr = (r) => F((e) => r(e.element)), xr = (r) => p((e) => {
|
|
1685
1685
|
if (e.isHeadlessDOM()) {
|
|
1686
|
-
const t =
|
|
1686
|
+
const t = r(e);
|
|
1687
1687
|
if (t)
|
|
1688
|
-
return
|
|
1688
|
+
return v(t).render(e);
|
|
1689
1689
|
}
|
|
1690
1690
|
return () => {
|
|
1691
1691
|
};
|
|
@@ -1694,149 +1694,149 @@ export {
|
|
|
1694
1694
|
ze as Aria,
|
|
1695
1695
|
$t as Async,
|
|
1696
1696
|
Ye as Attr,
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1697
|
+
ir as BindChecked,
|
|
1698
|
+
tr as BindDate,
|
|
1699
|
+
rr as BindDateTime,
|
|
1700
|
+
nr as BindNumber,
|
|
1701
|
+
sr as BindText,
|
|
1702
1702
|
T as BrowserContext,
|
|
1703
1703
|
E as CLASS_PLACEHOLDER_ATTR,
|
|
1704
|
-
|
|
1704
|
+
kr as Computed,
|
|
1705
1705
|
Bt as Conjunction,
|
|
1706
|
-
|
|
1706
|
+
lr as DOMNode,
|
|
1707
1707
|
Xe as DataAttr,
|
|
1708
|
-
|
|
1708
|
+
Cr as DisposalScope,
|
|
1709
1709
|
ue as El,
|
|
1710
1710
|
j as ElNS,
|
|
1711
|
-
|
|
1711
|
+
vr as ElementPosition,
|
|
1712
1712
|
Fe as Empty,
|
|
1713
1713
|
Dt as Ensure,
|
|
1714
1714
|
It as EnsureAll,
|
|
1715
1715
|
At as ForEach,
|
|
1716
1716
|
S as Fragment,
|
|
1717
|
-
|
|
1717
|
+
mr as GlobalProbe,
|
|
1718
1718
|
Me as HYDRATION_ID_ATTR,
|
|
1719
|
-
|
|
1720
|
-
|
|
1719
|
+
bt as HeadlessAdapter,
|
|
1720
|
+
C as HeadlessContext,
|
|
1721
1721
|
Ne as HeadlessElement,
|
|
1722
1722
|
oe as HeadlessPortal,
|
|
1723
1723
|
De as HeadlessText,
|
|
1724
|
-
|
|
1724
|
+
fr as IFrame,
|
|
1725
1725
|
kt as KeyedForEach,
|
|
1726
|
-
|
|
1726
|
+
Er as KeyedPosition,
|
|
1727
1727
|
Ht as MapSignal,
|
|
1728
1728
|
Nt as MapText,
|
|
1729
1729
|
Ze as MathAttr,
|
|
1730
|
-
|
|
1731
|
-
|
|
1730
|
+
dr as MathEl,
|
|
1731
|
+
Pr as MemoryStore,
|
|
1732
1732
|
Rt as NotEmpty,
|
|
1733
1733
|
tt as OnChecked,
|
|
1734
1734
|
ce as OnDispose,
|
|
1735
|
-
|
|
1735
|
+
vt as OneOf,
|
|
1736
1736
|
Et as OneOfField,
|
|
1737
1737
|
Pt as OneOfKind,
|
|
1738
1738
|
Lt as OneOfTuple,
|
|
1739
1739
|
Mt as OneOfType,
|
|
1740
1740
|
Ot as OneOfValue,
|
|
1741
|
-
|
|
1742
|
-
|
|
1741
|
+
pr as Portal,
|
|
1742
|
+
Mr as Prop,
|
|
1743
1743
|
Wt as Provide,
|
|
1744
|
-
|
|
1744
|
+
Tn as ProviderNotFoundError,
|
|
1745
1745
|
Ae as RenderingError,
|
|
1746
|
-
|
|
1746
|
+
Ct as Repeat,
|
|
1747
1747
|
Qe as SVGAttr,
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1748
|
+
ar as SVGEl,
|
|
1749
|
+
gr as ShadowRoot,
|
|
1750
|
+
Or as Signal,
|
|
1751
1751
|
_t as Task,
|
|
1752
|
-
|
|
1752
|
+
br as TextNode,
|
|
1753
1753
|
wt as Unless,
|
|
1754
1754
|
Ft as Use,
|
|
1755
1755
|
Kt as UseMany,
|
|
1756
|
-
|
|
1756
|
+
Lr as Value,
|
|
1757
1757
|
xt as When,
|
|
1758
1758
|
F as WithBrowserCtx,
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1759
|
+
Tr as WithCtx,
|
|
1760
|
+
Sr as WithElement,
|
|
1761
|
+
xr as WithHeadlessCtx,
|
|
1762
1762
|
Vt as WithProvider,
|
|
1763
1763
|
jt as WithScope,
|
|
1764
1764
|
V as _NODE_PLACEHOLDER_ATTR,
|
|
1765
1765
|
we as _getSelfOrParentElement,
|
|
1766
1766
|
te as _isElement,
|
|
1767
|
-
|
|
1767
|
+
re as _isFragment,
|
|
1768
1768
|
xe as _makeGetter,
|
|
1769
1769
|
Se as _makeSetter,
|
|
1770
1770
|
$ as _removeDOMNode,
|
|
1771
1771
|
ft as _signalText,
|
|
1772
1772
|
ht as _staticText,
|
|
1773
|
-
|
|
1774
|
-
|
|
1773
|
+
Hr as animateSignal,
|
|
1774
|
+
Nr as animateSignals,
|
|
1775
1775
|
Jt as aria,
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1776
|
+
y as attr,
|
|
1777
|
+
Dr as bind,
|
|
1778
|
+
Ir as coalesce,
|
|
1779
|
+
Rr as computed,
|
|
1780
|
+
_r as computedOf,
|
|
1781
|
+
$r as computedOfAsync,
|
|
1782
|
+
Br as computedOfAsyncGenerator,
|
|
1783
|
+
jr as computedRecord,
|
|
1784
|
+
Sn as createRenderKit,
|
|
1785
|
+
Vr as createRenderable,
|
|
1786
|
+
Wr as createSelector,
|
|
1787
1787
|
Ut as dataAttr,
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1788
|
+
Fr as delaySignal,
|
|
1789
|
+
or as delegate,
|
|
1790
|
+
Kr as effect,
|
|
1791
|
+
qr as effectOf,
|
|
1792
|
+
rt as emit,
|
|
1793
|
+
er as emitChecked,
|
|
1794
1794
|
x as emitTarget,
|
|
1795
|
-
|
|
1795
|
+
nt as emitValue,
|
|
1796
1796
|
it as emitValueAsDate,
|
|
1797
1797
|
ot as emitValueAsDateTime,
|
|
1798
1798
|
Qt as emitValueAsNullableDate,
|
|
1799
1799
|
Zt as emitValueAsNullableDateTime,
|
|
1800
1800
|
st as emitValueAsNumber,
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1801
|
+
Gr as endInterpolate,
|
|
1802
|
+
Ur as getCurrentScope,
|
|
1803
|
+
Jr as getParentScope,
|
|
1804
|
+
Yr as getScopeStack,
|
|
1805
1805
|
St as getWindow,
|
|
1806
|
-
|
|
1806
|
+
Xr as guessInterpolate,
|
|
1807
1807
|
ct as html,
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1808
|
+
cr as input,
|
|
1809
|
+
zr as interpolateDate,
|
|
1810
|
+
Qr as interpolateNumber,
|
|
1811
|
+
Zr as interpolateString,
|
|
1812
|
+
en as joinSignals,
|
|
1813
|
+
tn as localStorageProp,
|
|
1814
1814
|
at as makeProbe,
|
|
1815
|
-
|
|
1816
|
-
|
|
1815
|
+
rn as makeProviderMark,
|
|
1816
|
+
hr as math,
|
|
1817
1817
|
Xt as mathAttr,
|
|
1818
|
-
|
|
1818
|
+
nn as merge,
|
|
1819
1819
|
D as on,
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1820
|
+
sn as popScope,
|
|
1821
|
+
on as previousSignal,
|
|
1822
|
+
ln as prop,
|
|
1823
|
+
cn as pushScope,
|
|
1824
1824
|
gt as render,
|
|
1825
1825
|
H as renderWithContext,
|
|
1826
|
-
|
|
1826
|
+
v as renderableOfTNode,
|
|
1827
1827
|
Tt as restoreTempoPlaceholders,
|
|
1828
|
-
|
|
1829
|
-
|
|
1828
|
+
yt as runHeadless,
|
|
1829
|
+
an as scoped,
|
|
1830
1830
|
zt as selectedClass,
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1831
|
+
un as sessionStorageProp,
|
|
1832
|
+
dn as signal,
|
|
1833
|
+
hn as slidingWindowSignal,
|
|
1834
|
+
fn as storedProp,
|
|
1835
|
+
pn as strictEquals,
|
|
1836
|
+
yr as style,
|
|
1837
|
+
ur as svg,
|
|
1838
1838
|
Yt as svgAttr,
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1839
|
+
mn as syncProp,
|
|
1840
|
+
gn as untracked,
|
|
1841
|
+
yn as withScope
|
|
1842
1842
|
};
|