@tempots/dom 37.2.0 → 37.4.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/dom/browser-context.d.ts +4 -0
- package/dom/dom-context.d.ts +11 -0
- package/dom/headless-context.d.ts +4 -0
- package/index.cjs +1 -1
- package/index.js +724 -698
- package/package.json +2 -2
- package/renderable/bind.d.ts +5 -5
- package/renderable/on.d.ts +44 -124
- package/renderable/provider.d.ts +1 -1
- package/renderable/shared.d.ts +4 -1
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DisposalScope as
|
|
2
|
-
import { Computed as
|
|
3
|
-
import { ProviderNotFoundError as
|
|
4
|
-
import { ProviderNotFoundError as
|
|
5
|
-
const
|
|
1
|
+
import { DisposalScope as Me, withScope as Oe, Value as $, makeProviderMark as ie, prop as B, createRenderable as Le, easeOutQuad as Ie, guessInterpolate as He, Signal as j, createSelector as De } from "@tempots/core";
|
|
2
|
+
import { Computed as er, DisposalScope as tr, ElementPosition as nr, KeyedPosition as rr, MemoryStore as sr, Prop as ir, Signal as or, Value as lr, animateSignal as cr, animateSignals as ar, bind as ur, chainEasing as dr, coalesce as hr, computed as fr, computedOf as pr, computedOfAsync as mr, computedOfAsyncGenerator as gr, computedRecord as yr, createRenderable as Tr, createSelector as vr, delaySignal as br, easeInBack as Sr, easeInBounce as xr, easeInCubic as wr, easeInElastic as Er, easeInExpo as kr, easeInOutBack as Ar, easeInOutBounce as Cr, easeInOutCubic as Pr, easeInOutElastic as Mr, easeInOutExpo as Or, easeInOutQuad as Lr, easeInOutQuart as Ir, easeInOutSine as Hr, easeInQuad as Dr, easeInQuart as Nr, easeInSine as Rr, easeOutBack as _r, easeOutBounce as $r, easeOutCubic as Br, easeOutElastic as Vr, easeOutExpo as jr, easeOutQuad as Yr, easeOutQuart as Xr, easeOutSine as Fr, effect as Wr, effectOf as Kr, endInterpolate as Ur, getCurrentScope as qr, getParentScope as Gr, getScopeStack as Qr, guessInterpolate as Jr, interpolateDate as Zr, interpolateNumber as zr, interpolateString as es, joinSignals as ts, linear as ns, localStorageProp as rs, makeProviderMark as ss, merge as is, mirrorEasing as os, popScope as ls, previousSignal as cs, prop as as, pushScope as us, reverseEasing as ds, scoped as hs, sessionStorageProp as fs, signal as ps, slidingWindowSignal as ms, storedProp as gs, strictEquals as ys, syncProp as Ts, untracked as vs, withScope as bs } from "@tempots/core";
|
|
3
|
+
import { ProviderNotFoundError as oe, createRenderKit as Ne } from "@tempots/render";
|
|
4
|
+
import { ProviderNotFoundError as xs, createRenderKit as ws } from "@tempots/render";
|
|
5
|
+
const le = /* @__PURE__ */ new Set([
|
|
6
6
|
"checked",
|
|
7
7
|
"disabled",
|
|
8
8
|
"hidden",
|
|
@@ -10,14 +10,14 @@ const oe = /* @__PURE__ */ new Set([
|
|
|
10
10
|
"readonly",
|
|
11
11
|
"required",
|
|
12
12
|
"autofocus"
|
|
13
|
-
]),
|
|
13
|
+
]), ce = /* @__PURE__ */ new Set(["selected"]), ae = /* @__PURE__ */ new Set([
|
|
14
14
|
"rowSpan",
|
|
15
15
|
"colSpan",
|
|
16
16
|
"tabIndex",
|
|
17
17
|
"valueAsNumber"
|
|
18
|
-
]),
|
|
18
|
+
]), ue = /* @__PURE__ */ new Set(["valueAsDate"]), de = {
|
|
19
19
|
readonly: "readOnly"
|
|
20
|
-
},
|
|
20
|
+
}, he = /* @__PURE__ */ new Set([
|
|
21
21
|
"value",
|
|
22
22
|
"textContent",
|
|
23
23
|
"innerText",
|
|
@@ -26,33 +26,33 @@ const oe = /* @__PURE__ */ new Set([
|
|
|
26
26
|
"outerHTML",
|
|
27
27
|
"className",
|
|
28
28
|
"classList"
|
|
29
|
-
]),
|
|
30
|
-
if (
|
|
29
|
+
]), Re = (n, e) => {
|
|
30
|
+
if (ce.has(n))
|
|
31
31
|
return (t) => {
|
|
32
32
|
t == null || t !== !0 ? e.removeAttribute(n) : e.setAttribute(n, "");
|
|
33
33
|
};
|
|
34
|
-
if (
|
|
35
|
-
const t =
|
|
36
|
-
return (
|
|
37
|
-
|
|
34
|
+
if (le.has(n)) {
|
|
35
|
+
const t = de[n] || n;
|
|
36
|
+
return (r) => {
|
|
37
|
+
r == null ? e[t] = null : e[t] = !!r;
|
|
38
38
|
};
|
|
39
|
-
} else return
|
|
39
|
+
} else return ae.has(n) ? (t) => {
|
|
40
40
|
t == null ? e[n] = null : e[n] = Number(t);
|
|
41
|
-
} :
|
|
41
|
+
} : ue.has(n) ? (t) => {
|
|
42
42
|
t == null ? e[n] = null : e[n] = t;
|
|
43
|
-
} :
|
|
43
|
+
} : he.has(n) ? (t) => {
|
|
44
44
|
t == null ? e[n] = null : e[n] = String(t);
|
|
45
45
|
} : (t) => {
|
|
46
46
|
t == null ? e.removeAttribute(n) : e.setAttribute(n, t);
|
|
47
47
|
};
|
|
48
|
-
},
|
|
48
|
+
}, _e = (n, e) => ce.has(n) ? () => e.hasAttribute(n) : le.has(n) ? () => (
|
|
49
49
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
-
!!e[
|
|
51
|
-
) :
|
|
50
|
+
!!e[de[n] || n]
|
|
51
|
+
) : ae.has(n) ? () => Number(e[n]) : ue.has(n) ? () => e[n] : he.has(n) ? () => String(e[n]) : () => e.getAttribute(n), V = (n) => {
|
|
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
|
-
},
|
|
55
|
-
class
|
|
54
|
+
}, $e = (n) => fe(n) || pe(n) ? n : n.parentElement, fe = (n) => n.nodeType === 1, pe = (n) => n.nodeType === 11;
|
|
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,
|
|
66
|
-
this.document = e, this.element = t, this.reference =
|
|
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,
|
|
77
|
-
return new
|
|
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
|
|
113
|
-
return this.appendOrInsert(
|
|
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
|
|
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
|
|
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,
|
|
255
|
-
return new
|
|
254
|
+
setProvider(e, t, r) {
|
|
255
|
+
return new b(this.document, this.element, this.reference, {
|
|
256
256
|
...this.providers,
|
|
257
|
-
[e]: [t,
|
|
257
|
+
[e]: [t, r]
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
@@ -266,9 +266,15 @@ class S {
|
|
|
266
266
|
*/
|
|
267
267
|
getProvider(e) {
|
|
268
268
|
if (this.providers[e] === void 0)
|
|
269
|
-
throw new
|
|
270
|
-
const [t,
|
|
271
|
-
return { value: t, onUse:
|
|
269
|
+
throw new oe(e);
|
|
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,
|
|
305
|
-
const
|
|
306
|
-
return this.element.addEventListener(e,
|
|
307
|
-
o && this.element.removeEventListener(e,
|
|
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
|
/**
|
|
@@ -354,36 +360,36 @@ class S {
|
|
|
354
360
|
}
|
|
355
361
|
makeAccessors(e) {
|
|
356
362
|
return {
|
|
357
|
-
get:
|
|
358
|
-
set:
|
|
363
|
+
get: _e(e, this.element),
|
|
364
|
+
set: Re(e, this.element)
|
|
359
365
|
};
|
|
360
366
|
}
|
|
361
367
|
getWindow() {
|
|
362
368
|
return this.document.defaultView;
|
|
363
369
|
}
|
|
364
|
-
moveRangeBefore(e, t,
|
|
365
|
-
const
|
|
366
|
-
let c =
|
|
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
|
-
const
|
|
374
|
+
const d = c.nextSibling;
|
|
369
375
|
if (l.insertBefore(c, i), c === o) break;
|
|
370
|
-
c =
|
|
376
|
+
c = d;
|
|
371
377
|
}
|
|
372
378
|
}
|
|
373
379
|
removeRange(e, t) {
|
|
374
|
-
const
|
|
375
|
-
let i =
|
|
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 ===
|
|
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,
|
|
384
|
-
if (!
|
|
385
|
-
const
|
|
386
|
-
|
|
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,51 +402,51 @@ class S {
|
|
|
396
402
|
}
|
|
397
403
|
}
|
|
398
404
|
const I = (n, e) => {
|
|
399
|
-
const t = new
|
|
400
|
-
return (
|
|
401
|
-
t.dispose(), s
|
|
405
|
+
const t = new Me(), r = Oe(t, () => n.render(e));
|
|
406
|
+
return (s = !0) => {
|
|
407
|
+
t.dispose(), r(s);
|
|
402
408
|
};
|
|
403
|
-
},
|
|
409
|
+
}, Vt = (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
|
-
throw new
|
|
412
|
+
throw new Be(
|
|
407
413
|
`Cannot find element by selector for render: ${e}`
|
|
408
414
|
);
|
|
409
|
-
|
|
410
|
-
const l =
|
|
411
|
-
let
|
|
412
|
-
return
|
|
415
|
+
r !== !1 && (t ?? i.ownerDocument) != null && (i.nodeType === 1 || i.nodeType === 11) && (i.innerHTML = "");
|
|
416
|
+
const l = $e(i), c = fe(i) || pe(i) ? void 0 : i, d = b.of(l, c, o), f = I(n, d);
|
|
417
|
+
let h;
|
|
418
|
+
return s && i.parentElement != null && (h = new MutationObserver((a) => {
|
|
413
419
|
a[0]?.removedNodes.forEach((u) => {
|
|
414
|
-
u === i && (
|
|
420
|
+
u === i && (h?.disconnect(), f(i.nodeType !== 1));
|
|
415
421
|
});
|
|
416
|
-
}),
|
|
422
|
+
}), h.observe(i.parentElement, {
|
|
417
423
|
childList: !0,
|
|
418
424
|
subtree: !1,
|
|
419
425
|
attributes: !1
|
|
420
426
|
})), () => {
|
|
421
|
-
|
|
427
|
+
h?.disconnect(), f(!0);
|
|
422
428
|
};
|
|
423
|
-
},
|
|
429
|
+
}, jt = (n, {
|
|
424
430
|
startUrl: e = "https://example.com",
|
|
425
431
|
selector: t,
|
|
426
|
-
providers:
|
|
432
|
+
providers: r = {}
|
|
427
433
|
} = {
|
|
428
434
|
selector: "body"
|
|
429
435
|
}) => {
|
|
430
|
-
const
|
|
436
|
+
const s = $.toSignal(e).deriveProp(), o = new Te(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:
|
|
440
|
+
currentURL: s
|
|
435
441
|
};
|
|
436
442
|
};
|
|
437
|
-
class
|
|
443
|
+
class Be extends Error {
|
|
438
444
|
constructor(e) {
|
|
439
445
|
super(e);
|
|
440
446
|
}
|
|
441
447
|
}
|
|
442
|
-
const W = "data-tts-node", C = "data-tts-class",
|
|
443
|
-
class
|
|
448
|
+
const W = "data-tts-node", C = "data-tts-class", P = "data-tts-style", M = "data-tts-html", O = "data-tts-text", L = "data-tts-attrs";
|
|
449
|
+
class Yt {
|
|
444
450
|
/**
|
|
445
451
|
* Selects elements from the headless environment.
|
|
446
452
|
* @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
|
|
@@ -517,18 +523,18 @@ class $t {
|
|
|
517
523
|
constructor({
|
|
518
524
|
select: e,
|
|
519
525
|
getAttribute: t,
|
|
520
|
-
setAttribute:
|
|
521
|
-
getClass:
|
|
526
|
+
setAttribute: r,
|
|
527
|
+
getClass: s,
|
|
522
528
|
setClass: o,
|
|
523
529
|
getStyles: i,
|
|
524
530
|
setStyles: l,
|
|
525
531
|
appendHTML: c,
|
|
526
|
-
getInnerHTML:
|
|
532
|
+
getInnerHTML: d,
|
|
527
533
|
setInnerHTML: f,
|
|
528
|
-
getInnerText:
|
|
534
|
+
getInnerText: h,
|
|
529
535
|
setInnerText: a
|
|
530
536
|
}) {
|
|
531
|
-
this.select = e, this.getAttribute = t, this.setAttribute =
|
|
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 = d, this.setInnerHTML = f, this.getInnerText = h, 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,112 +545,112 @@ 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((
|
|
543
|
-
const o = typeof
|
|
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: ${
|
|
553
|
+
`Cannot find element by selector for render: ${s.selector}`
|
|
548
554
|
);
|
|
549
|
-
if (
|
|
555
|
+
if (s.hasChildren() && this.appendHTML(i, s.contentToHTML(t)), s.hasInnerHTML()) {
|
|
550
556
|
if (t) {
|
|
551
557
|
const l = this.getInnerHTML(i);
|
|
552
|
-
l != null && this.setAttribute(i,
|
|
558
|
+
l != null && this.setAttribute(i, M, l);
|
|
553
559
|
}
|
|
554
|
-
this.setInnerHTML(i,
|
|
560
|
+
this.setInnerHTML(i, s.getInnerHTML());
|
|
555
561
|
}
|
|
556
|
-
if (
|
|
562
|
+
if (s.hasInnerText()) {
|
|
557
563
|
if (t) {
|
|
558
564
|
const l = this.getInnerText(i);
|
|
559
|
-
l != null && this.setAttribute(i,
|
|
565
|
+
l != null && this.setAttribute(i, O, l);
|
|
560
566
|
}
|
|
561
|
-
this.setInnerText(i,
|
|
567
|
+
this.setInnerText(i, s.getInnerText());
|
|
562
568
|
}
|
|
563
|
-
if (
|
|
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,
|
|
574
|
+
this.setClass(i, s.getClasses().join(" "));
|
|
569
575
|
}
|
|
570
|
-
if (
|
|
576
|
+
if (s.hasStyles()) {
|
|
571
577
|
if (t) {
|
|
572
578
|
const l = this.getStyles(i);
|
|
573
579
|
Object.keys(l).length > 0 && this.setAttribute(
|
|
574
580
|
i,
|
|
575
|
-
|
|
581
|
+
P,
|
|
576
582
|
JSON.stringify(l)
|
|
577
583
|
);
|
|
578
584
|
}
|
|
579
|
-
this.setStyles(i,
|
|
585
|
+
this.setStyles(i, s.getStyles());
|
|
580
586
|
}
|
|
581
|
-
if (
|
|
582
|
-
const l =
|
|
587
|
+
if (s.hasAttributes()) {
|
|
588
|
+
const l = s.getAttributes();
|
|
583
589
|
if (t) {
|
|
584
590
|
const c = [];
|
|
585
|
-
l.forEach(([
|
|
586
|
-
const f = this.getAttribute(i,
|
|
587
|
-
f != null && c.push([
|
|
591
|
+
l.forEach(([d]) => {
|
|
592
|
+
const f = this.getAttribute(i, d);
|
|
593
|
+
f != null && c.push([d, f]);
|
|
588
594
|
}), c.length > 0 && this.setAttribute(
|
|
589
595
|
i,
|
|
590
596
|
L,
|
|
591
597
|
JSON.stringify(Object.fromEntries(c))
|
|
592
598
|
);
|
|
593
599
|
}
|
|
594
|
-
l.forEach(([c,
|
|
595
|
-
this.setAttribute(i, c,
|
|
600
|
+
l.forEach(([c, d]) => {
|
|
601
|
+
this.setAttribute(i, c, d);
|
|
596
602
|
});
|
|
597
603
|
}
|
|
598
604
|
}
|
|
599
605
|
});
|
|
600
606
|
};
|
|
601
607
|
}
|
|
602
|
-
const
|
|
608
|
+
const me = (n) => JSON.parse(n.replace(/"/g, '"')), Ve = (n) => {
|
|
603
609
|
const e = n.getAttribute(C);
|
|
604
610
|
n.removeAttribute(C), e != null && n.setAttribute("class", e);
|
|
605
|
-
}, Be = (n) => {
|
|
606
|
-
const e = n.getAttribute(O);
|
|
607
|
-
n.removeAttribute(O), e != null && (n.innerHTML = e);
|
|
608
|
-
}, Ve = (n) => {
|
|
609
|
-
const e = n.getAttribute(P);
|
|
610
|
-
n.removeAttribute(P), e != null && (n.innerText = e);
|
|
611
611
|
}, je = (n) => {
|
|
612
612
|
const e = n.getAttribute(M);
|
|
613
|
-
|
|
614
|
-
const t = pe(e), s = Object.entries(t);
|
|
615
|
-
s.length > 0 && (n.style.cssText = s.map(([r, o]) => `${r}: ${o}`).join("; "));
|
|
616
|
-
}
|
|
613
|
+
n.removeAttribute(M), e != null && (n.innerHTML = e);
|
|
617
614
|
}, Ye = (n) => {
|
|
615
|
+
const e = n.getAttribute(O);
|
|
616
|
+
n.removeAttribute(O), e != null && (n.innerText = e);
|
|
617
|
+
}, Xe = (n) => {
|
|
618
|
+
const e = n.getAttribute(P);
|
|
619
|
+
if (n.removeAttribute(P), e != null) {
|
|
620
|
+
const t = me(e), r = Object.entries(t);
|
|
621
|
+
r.length > 0 && (n.style.cssText = r.map(([s, o]) => `${s}: ${o}`).join("; "));
|
|
622
|
+
}
|
|
623
|
+
}, Fe = (n) => {
|
|
618
624
|
const e = n.getAttribute(L);
|
|
619
625
|
if (n.removeAttribute(L), e != null) {
|
|
620
|
-
const t =
|
|
621
|
-
Object.entries(t).forEach(([
|
|
622
|
-
|
|
626
|
+
const t = me(e);
|
|
627
|
+
Object.entries(t).forEach(([r, s]) => {
|
|
628
|
+
s == null ? n.removeAttribute(r) : n.setAttribute(r, s);
|
|
623
629
|
});
|
|
624
630
|
}
|
|
625
|
-
},
|
|
631
|
+
}, Xt = () => {
|
|
626
632
|
const e = [
|
|
627
633
|
W,
|
|
628
634
|
C,
|
|
635
|
+
M,
|
|
629
636
|
O,
|
|
630
637
|
P,
|
|
631
|
-
M,
|
|
632
638
|
L
|
|
633
|
-
].map((
|
|
634
|
-
document.querySelectorAll(e).forEach((
|
|
635
|
-
const
|
|
636
|
-
if (
|
|
637
|
-
V(
|
|
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
|
-
|
|
646
|
+
s.hasAttribute(C) && Ve(s), s.hasAttribute(O) && Ye(s), s.hasAttribute(M) && je(s), s.hasAttribute(P) && Xe(s), s.hasAttribute(L) && Fe(s);
|
|
641
647
|
});
|
|
642
|
-
},
|
|
643
|
-
class
|
|
648
|
+
}, We = "data-tempo-id", w = /* @__PURE__ */ Symbol("class"), E = /* @__PURE__ */ Symbol("style"), R = /* @__PURE__ */ Symbol("handler"), ge = () => Math.random().toString(36).substring(2, 15), Ke = (n) => n.replace(/<[^>]*>?/g, "");
|
|
649
|
+
class ye {
|
|
644
650
|
constructor(e) {
|
|
645
651
|
this.parent = e;
|
|
646
652
|
}
|
|
647
|
-
id =
|
|
653
|
+
id = ge();
|
|
648
654
|
properties = {};
|
|
649
655
|
children = [];
|
|
650
656
|
isElement() {
|
|
@@ -654,7 +660,7 @@ class ge {
|
|
|
654
660
|
return !1;
|
|
655
661
|
}
|
|
656
662
|
getText() {
|
|
657
|
-
return this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ?
|
|
663
|
+
return this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? Ke(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
|
|
658
664
|
}
|
|
659
665
|
removeChild(e) {
|
|
660
666
|
const t = this.children.indexOf(e);
|
|
@@ -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
|
|
711
|
-
if (
|
|
712
|
-
return
|
|
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((
|
|
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,
|
|
722
|
-
const o = this.properties[R] ??= {}, i =
|
|
723
|
-
l(), t(c,
|
|
724
|
-
} : (c) => t(c,
|
|
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
|
-
const c = o[e] ?? [],
|
|
728
|
-
|
|
733
|
+
const c = o[e] ?? [], d = c.indexOf(i);
|
|
734
|
+
d !== -1 && (c.splice(d, 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
|
|
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] ??= [],
|
|
736
|
-
for (const
|
|
737
|
-
|
|
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] ??= [],
|
|
743
|
-
let
|
|
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
|
-
|
|
746
|
-
t.length =
|
|
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
|
|
763
|
-
|
|
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: (
|
|
781
|
+
set: (r) => t[e] = r
|
|
776
782
|
};
|
|
777
783
|
}
|
|
778
784
|
}
|
|
779
|
-
const
|
|
780
|
-
class
|
|
781
|
-
constructor(e, t,
|
|
782
|
-
super(
|
|
785
|
+
const Ue = (n) => n.replace(/"/g, """), qe = (n) => n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
786
|
+
class Ge extends ye {
|
|
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
|
|
794
|
-
return { attrs: `${
|
|
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, d]) => `${c}: ${d};`).join(" ")}"` : Je.has(i) ? ` ${i}` : i === "innerHTML" ? (t = l, "") : i === "innerText" ? (t = qe(l), "") : ` ${i}="${Ue(l)}"`).join(""), o = e ? ` ${W} ${We}="${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:
|
|
798
|
-
return Z.has(this.tagName) && 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,20 +811,20 @@ 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:
|
|
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}${
|
|
816
|
+
yield `<${this.tagName}${r} />`;
|
|
811
817
|
return;
|
|
812
818
|
}
|
|
813
|
-
if (yield `<${this.tagName}${
|
|
814
|
-
yield
|
|
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);
|
|
818
824
|
yield `</${this.tagName}>`;
|
|
819
825
|
}
|
|
820
826
|
}
|
|
821
|
-
class
|
|
827
|
+
class Te extends ye {
|
|
822
828
|
constructor(e, t) {
|
|
823
829
|
super(t), this.selector = e;
|
|
824
830
|
}
|
|
@@ -850,11 +856,11 @@ class ye extends ge {
|
|
|
850
856
|
yield* t.toHTMLStream(e);
|
|
851
857
|
}
|
|
852
858
|
}
|
|
853
|
-
class
|
|
859
|
+
class Qe {
|
|
854
860
|
constructor(e) {
|
|
855
861
|
this.text = e;
|
|
856
862
|
}
|
|
857
|
-
id =
|
|
863
|
+
id = ge();
|
|
858
864
|
isElement() {
|
|
859
865
|
return !1;
|
|
860
866
|
}
|
|
@@ -878,8 +884,8 @@ class Ue {
|
|
|
878
884
|
}
|
|
879
885
|
}
|
|
880
886
|
class k {
|
|
881
|
-
constructor(e, t,
|
|
882
|
-
this.element = e, this.reference = t, this.container =
|
|
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
|
|
893
|
-
return this.appendOrInsert(
|
|
894
|
-
|
|
898
|
+
const r = new Ge(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
|
|
907
|
+
const t = new Qe(String(e));
|
|
902
908
|
return this.appendOrInsert(t), new k(
|
|
903
909
|
this.element,
|
|
904
910
|
t,
|
|
@@ -919,7 +925,7 @@ class k {
|
|
|
919
925
|
return this.makeChildText("");
|
|
920
926
|
}
|
|
921
927
|
makePortal(e) {
|
|
922
|
-
const t = new
|
|
928
|
+
const t = new Te(e, this.element);
|
|
923
929
|
return this.appendOrInsert(t), new k(
|
|
924
930
|
t,
|
|
925
931
|
void 0,
|
|
@@ -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,
|
|
943
|
+
setProvider(e, t, r) {
|
|
938
944
|
return new k(this.element, this.reference, this.container, {
|
|
939
945
|
...this.providers,
|
|
940
|
-
[e]: [t,
|
|
946
|
+
[e]: [t, r]
|
|
941
947
|
});
|
|
942
948
|
}
|
|
943
949
|
getProvider(e) {
|
|
944
950
|
if (this.providers[e] === void 0)
|
|
945
|
-
throw new
|
|
946
|
-
const [t,
|
|
947
|
-
return { value: t, onUse:
|
|
951
|
+
throw new oe(e);
|
|
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,104 +994,104 @@ class k {
|
|
|
982
994
|
makeAccessors(e) {
|
|
983
995
|
return this.element.makeAccessors(e);
|
|
984
996
|
}
|
|
985
|
-
moveRangeBefore(e, t,
|
|
986
|
-
const
|
|
987
|
-
l.splice(a, 0, ...
|
|
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, h = l.splice(c, f), a = l.indexOf(i);
|
|
999
|
+
l.splice(a, 0, ...h);
|
|
988
1000
|
}
|
|
989
1001
|
removeRange(e, t) {
|
|
990
|
-
const
|
|
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,
|
|
995
|
-
|
|
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
|
}
|
|
999
1011
|
reattach() {
|
|
1000
1012
|
}
|
|
1001
1013
|
}
|
|
1002
|
-
const
|
|
1014
|
+
const Je = /* @__PURE__ */ new Set([
|
|
1003
1015
|
"checked",
|
|
1004
1016
|
"disabled",
|
|
1005
1017
|
"multiple",
|
|
1006
1018
|
"readonly",
|
|
1007
1019
|
"required",
|
|
1008
1020
|
"selected"
|
|
1009
|
-
]), Z = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]),
|
|
1021
|
+
]), Z = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Ze = () => (
|
|
1010
1022
|
/* c8 ignore next */
|
|
1011
1023
|
typeof window < "u" ? window : void 0
|
|
1012
1024
|
);
|
|
1013
|
-
function
|
|
1014
|
-
const n =
|
|
1025
|
+
function ze() {
|
|
1026
|
+
const n = Ze(), e = n?.matchMedia("(prefers-reduced-motion: reduce)"), t = B(e?.matches ?? !1);
|
|
1015
1027
|
if (e != null) {
|
|
1016
|
-
const
|
|
1017
|
-
e.addEventListener("change",
|
|
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
|
-
const
|
|
1022
|
-
mark:
|
|
1033
|
+
const Ft = {
|
|
1034
|
+
mark: ie("ReducedMotion"),
|
|
1023
1035
|
create: () => {
|
|
1024
|
-
const n =
|
|
1036
|
+
const n = ze();
|
|
1025
1037
|
return {
|
|
1026
1038
|
value: n,
|
|
1027
1039
|
dispose: () => n.dispose()
|
|
1028
1040
|
};
|
|
1029
1041
|
}
|
|
1030
|
-
},
|
|
1031
|
-
function
|
|
1032
|
-
let e = null, t = null,
|
|
1033
|
-
const
|
|
1034
|
-
if (
|
|
1042
|
+
}, ve = /* @__PURE__ */ Symbol("DOM_RENDERABLE"), y = (n) => Le(ve, n);
|
|
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(
|
|
1048
|
+
e = o, n(i), t = requestAnimationFrame(s);
|
|
1037
1049
|
};
|
|
1038
|
-
return t = requestAnimationFrame(
|
|
1050
|
+
return t = requestAnimationFrame(s), {
|
|
1039
1051
|
dispose: () => {
|
|
1040
|
-
|
|
1052
|
+
r = !0, t !== null && cancelAnimationFrame(t);
|
|
1041
1053
|
}
|
|
1042
1054
|
};
|
|
1043
1055
|
}
|
|
1044
|
-
const
|
|
1045
|
-
const t =
|
|
1046
|
-
return (
|
|
1047
|
-
t.dispose(), e.clear(
|
|
1056
|
+
const Wt = (n) => y((e) => {
|
|
1057
|
+
const t = U(n);
|
|
1058
|
+
return (r) => {
|
|
1059
|
+
t.dispose(), e.clear(r);
|
|
1048
1060
|
};
|
|
1049
1061
|
});
|
|
1050
|
-
function
|
|
1062
|
+
function Kt(n) {
|
|
1051
1063
|
const e = n ?? (typeof document < "u" ? document : void 0);
|
|
1052
1064
|
if (e == null) return !1;
|
|
1053
1065
|
const t = e.activeElement;
|
|
1054
1066
|
if (t == null) return !1;
|
|
1055
|
-
const
|
|
1056
|
-
return
|
|
1067
|
+
const r = t.tagName;
|
|
1068
|
+
return r === "INPUT" || r === "TEXTAREA" || r === "SELECT" || t.isContentEditable === !0;
|
|
1057
1069
|
}
|
|
1058
|
-
function
|
|
1059
|
-
const t = e?.duration ?? 300,
|
|
1070
|
+
function Ut(n, e) {
|
|
1071
|
+
const t = e?.duration ?? 300, r = e?.easing ?? Ie, s = e?.reducedMotion;
|
|
1060
1072
|
let o = e?.interpolate;
|
|
1061
1073
|
const i = B(n);
|
|
1062
|
-
let l = null, c = n,
|
|
1063
|
-
const
|
|
1074
|
+
let l = null, c = n, d = n, f = 0;
|
|
1075
|
+
const h = () => {
|
|
1064
1076
|
l !== null && (l.dispose(), l = null);
|
|
1065
1077
|
};
|
|
1066
1078
|
return { value: i, tweenTo: (p) => {
|
|
1067
|
-
if (
|
|
1079
|
+
if (h(), t <= 0 || s != null && s.get() === !0) {
|
|
1068
1080
|
i.set(p);
|
|
1069
1081
|
return;
|
|
1070
1082
|
}
|
|
1071
|
-
c = i.get(),
|
|
1083
|
+
c = i.get(), d = p, f = 0, o == null && (o = He(c)), l = U((m) => {
|
|
1072
1084
|
f += m;
|
|
1073
|
-
const g = Math.min(f / t, 1),
|
|
1074
|
-
i.set(o(c,
|
|
1085
|
+
const g = Math.min(f / t, 1), v = r(g);
|
|
1086
|
+
i.set(o(c, d, v)), g >= 1 && h();
|
|
1075
1087
|
});
|
|
1076
|
-
}, cancel:
|
|
1077
|
-
|
|
1088
|
+
}, cancel: h, dispose: () => {
|
|
1089
|
+
h(), i.dispose();
|
|
1078
1090
|
} };
|
|
1079
1091
|
}
|
|
1080
1092
|
function z(n, e) {
|
|
1081
|
-
const t = n.clientX - e.clientX,
|
|
1082
|
-
return Math.hypot(t,
|
|
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 {
|
|
@@ -1087,10 +1099,10 @@ function ee(n, e) {
|
|
|
1087
1099
|
y: (n.clientY + e.clientY) / 2
|
|
1088
1100
|
};
|
|
1089
1101
|
}
|
|
1090
|
-
function
|
|
1091
|
-
const
|
|
1102
|
+
function et(n, e, t) {
|
|
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(
|
|
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,128 +1111,128 @@ 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),
|
|
1103
|
-
n.set({ scale:
|
|
1104
|
-
}, onTouchEnd: (
|
|
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, ke = g.x - i.x, Ae = g.y - i.y, J = q / l.scale, Ce = G - (G - l.panX) * J + ke, Pe = Q - (Q - l.panY) * J + Ae;
|
|
1115
|
+
n.set({ scale: q, panX: Ce, panY: Pe });
|
|
1116
|
+
}, onTouchEnd: () => {
|
|
1105
1117
|
} };
|
|
1106
1118
|
}
|
|
1107
|
-
function
|
|
1108
|
-
const t = e?.friction ?? 0.95,
|
|
1109
|
-
let
|
|
1110
|
-
return { track: (
|
|
1119
|
+
function tt(n, e) {
|
|
1120
|
+
const t = e?.friction ?? 0.95, r = e?.minVelocity ?? 0.5;
|
|
1121
|
+
let s = 0, o = 0, i = null, l = 0, c = 0;
|
|
1122
|
+
return { track: (h, a) => {
|
|
1111
1123
|
const u = performance.now();
|
|
1112
1124
|
if (i !== null) {
|
|
1113
1125
|
const p = (u - i) / 1e3;
|
|
1114
|
-
p > 0 && (l = (
|
|
1126
|
+
p > 0 && (l = (h - s) / p, c = (a - o) / p);
|
|
1115
1127
|
}
|
|
1116
|
-
|
|
1128
|
+
s = h, o = a, i = u;
|
|
1117
1129
|
}, release: () => {
|
|
1118
|
-
let
|
|
1130
|
+
let h = l, a = c;
|
|
1119
1131
|
i = null, l = 0, c = 0;
|
|
1120
|
-
const u =
|
|
1132
|
+
const u = U((p) => {
|
|
1121
1133
|
const m = p / 1e3;
|
|
1122
|
-
if (
|
|
1134
|
+
if (h *= t, a *= t, Math.hypot(h, a) < r) {
|
|
1123
1135
|
u.dispose();
|
|
1124
1136
|
return;
|
|
1125
1137
|
}
|
|
1126
|
-
n(
|
|
1138
|
+
n(h * m, a * m);
|
|
1127
1139
|
});
|
|
1128
1140
|
return u;
|
|
1129
1141
|
} };
|
|
1130
1142
|
}
|
|
1131
|
-
function
|
|
1132
|
-
const t = [],
|
|
1133
|
-
return K(n,
|
|
1143
|
+
function nt(n, e) {
|
|
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,
|
|
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,
|
|
1139
|
-
let
|
|
1150
|
+
const { tag: i, ns: l, children: c } = n, d = l != null ? o.createElementNS(l, i) : o.createElement(i), f = [...t, r.count++];
|
|
1151
|
+
let h = "";
|
|
1140
1152
|
for (let u = 0; u < c.length; u++) {
|
|
1141
1153
|
const p = c[u];
|
|
1142
|
-
p.kind === "static-attr" && (p.name === "class" ?
|
|
1154
|
+
p.kind === "static-attr" && (p.name === "class" ? h += (h ? " " : "") + p.value : d.setAttribute(p.name, p.value));
|
|
1143
1155
|
}
|
|
1144
|
-
|
|
1156
|
+
h && d.setAttribute("class", h), e.appendChild(d);
|
|
1145
1157
|
for (let u = 0; u < c.length; u++)
|
|
1146
|
-
c[u].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,
|
|
1162
|
+
if (!(p.kind === "static-attr" || p.kind === "dynamic-attr") && !K(p, d, 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)),
|
|
1168
|
+
return e.appendChild(o.createTextNode(n.text)), r.count++, !0;
|
|
1157
1169
|
case "dynamic-text":
|
|
1158
|
-
return e.appendChild(o.createTextNode("")),
|
|
1159
|
-
path: [...t,
|
|
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,
|
|
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("")),
|
|
1173
|
-
path: [...t,
|
|
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
|
-
function
|
|
1190
|
+
function rt(n, e) {
|
|
1179
1191
|
let t = n;
|
|
1180
|
-
for (let
|
|
1181
|
-
t = t.childNodes[e[
|
|
1192
|
+
for (let r = 0; r < e.length; r++)
|
|
1193
|
+
t = t.childNodes[e[r]];
|
|
1182
1194
|
return t;
|
|
1183
1195
|
}
|
|
1184
|
-
function
|
|
1185
|
-
const
|
|
1186
|
-
let l =
|
|
1196
|
+
function st(n, e, t) {
|
|
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
|
-
const c = n.slots.length,
|
|
1201
|
+
const c = n.slots.length, d = new Array(c);
|
|
1190
1202
|
for (let a = 0; a < c; a++)
|
|
1191
|
-
|
|
1192
|
-
|
|
1203
|
+
d[a] = rt(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
|
-
const u = n.slots[a], p =
|
|
1207
|
+
const u = n.slots[a], p = d[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((
|
|
1199
|
-
g.textContent = m.transform(
|
|
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
|
|
1203
|
-
|
|
1214
|
+
const m = t[a], g = new b(
|
|
1215
|
+
r.document,
|
|
1204
1216
|
p,
|
|
1205
1217
|
void 0,
|
|
1206
|
-
|
|
1218
|
+
r.providers
|
|
1207
1219
|
);
|
|
1208
1220
|
f[a] = m.render(g);
|
|
1209
1221
|
} else {
|
|
1210
|
-
const m = t[a], g = p,
|
|
1211
|
-
|
|
1222
|
+
const m = t[a], g = p, v = new b(
|
|
1223
|
+
r.document,
|
|
1212
1224
|
g.parentNode,
|
|
1213
1225
|
g,
|
|
1214
|
-
|
|
1226
|
+
r.providers
|
|
1215
1227
|
);
|
|
1216
|
-
f[a] = m.render(
|
|
1228
|
+
f[a] = m.render(v), g.remove();
|
|
1217
1229
|
}
|
|
1218
1230
|
}
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1221
|
-
|
|
1231
|
+
const h = new b(
|
|
1232
|
+
r.document,
|
|
1233
|
+
r.element,
|
|
1222
1234
|
i[0],
|
|
1223
|
-
|
|
1235
|
+
r.providers
|
|
1224
1236
|
);
|
|
1225
1237
|
return {
|
|
1226
1238
|
clear: (a) => {
|
|
@@ -1232,41 +1244,41 @@ function nt(n, e, t) {
|
|
|
1232
1244
|
p.parentNode && p.parentNode.removeChild(p);
|
|
1233
1245
|
}
|
|
1234
1246
|
},
|
|
1235
|
-
startCtx:
|
|
1247
|
+
startCtx: h
|
|
1236
1248
|
};
|
|
1237
1249
|
}
|
|
1238
|
-
function
|
|
1250
|
+
function it(n) {
|
|
1239
1251
|
const e = [];
|
|
1240
|
-
function t(
|
|
1241
|
-
switch (
|
|
1252
|
+
function t(r) {
|
|
1253
|
+
switch (r.kind) {
|
|
1242
1254
|
case "element": {
|
|
1243
|
-
const { tag:
|
|
1244
|
-
e.push(`E:${
|
|
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:${
|
|
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:${
|
|
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:
|
|
1263
|
-
for (const o of
|
|
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 (
|
|
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
|
|
1291
|
+
function ot(n) {
|
|
1280
1292
|
const e = [];
|
|
1281
|
-
function t(
|
|
1282
|
-
switch (
|
|
1293
|
+
function t(r) {
|
|
1294
|
+
switch (r.kind) {
|
|
1283
1295
|
case "element": {
|
|
1284
|
-
const { children:
|
|
1285
|
-
for (const o of
|
|
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,117 +1305,118 @@ function rt(n) {
|
|
|
1293
1305
|
break;
|
|
1294
1306
|
}
|
|
1295
1307
|
case "fragment": {
|
|
1296
|
-
const { children:
|
|
1297
|
-
for (const o of
|
|
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(
|
|
1316
|
+
e.push(r);
|
|
1305
1317
|
break;
|
|
1306
1318
|
default:
|
|
1307
|
-
|
|
1319
|
+
r.kind === void 0 && e.push(r);
|
|
1308
1320
|
break;
|
|
1309
1321
|
}
|
|
1310
1322
|
}
|
|
1311
1323
|
return t(n), e;
|
|
1312
1324
|
}
|
|
1313
|
-
const
|
|
1325
|
+
const lt = {
|
|
1314
1326
|
build(n, e) {
|
|
1315
1327
|
if (!e.isBrowser()) return null;
|
|
1316
1328
|
const t = n;
|
|
1317
1329
|
if (t.kind === void 0) return null;
|
|
1318
|
-
const
|
|
1319
|
-
return
|
|
1330
|
+
const r = e.document;
|
|
1331
|
+
return nt(t, r);
|
|
1320
1332
|
},
|
|
1321
1333
|
cloneAndHydrate(n, e, t) {
|
|
1322
|
-
return
|
|
1334
|
+
return st(n, e, t);
|
|
1323
1335
|
},
|
|
1324
1336
|
fingerprint(n) {
|
|
1325
|
-
return
|
|
1337
|
+
return it(n);
|
|
1326
1338
|
},
|
|
1327
1339
|
extractSlots(n) {
|
|
1328
|
-
return
|
|
1340
|
+
return ot(n);
|
|
1329
1341
|
}
|
|
1330
|
-
},
|
|
1331
|
-
type:
|
|
1342
|
+
}, ct = Ne({
|
|
1343
|
+
type: ve,
|
|
1332
1344
|
create: y,
|
|
1333
|
-
templateEngine:
|
|
1345
|
+
templateEngine: lt
|
|
1334
1346
|
}), {
|
|
1335
|
-
Empty:
|
|
1336
|
-
Fragment:
|
|
1337
|
-
When:
|
|
1338
|
-
Unless:
|
|
1339
|
-
ForEach:
|
|
1340
|
-
KeyedForEach:
|
|
1341
|
-
Repeat:
|
|
1342
|
-
OneOf:
|
|
1343
|
-
OneOfField:
|
|
1344
|
-
OneOfKind:
|
|
1345
|
-
OneOfType:
|
|
1346
|
-
OneOfValue:
|
|
1347
|
-
OneOfTuple:
|
|
1348
|
-
MapSignal:
|
|
1349
|
-
MapText:
|
|
1350
|
-
Ensure:
|
|
1351
|
-
EnsureAll:
|
|
1352
|
-
NotEmpty:
|
|
1353
|
-
Task:
|
|
1354
|
-
Async:
|
|
1347
|
+
Empty: at,
|
|
1348
|
+
Fragment: S,
|
|
1349
|
+
When: qt,
|
|
1350
|
+
Unless: Gt,
|
|
1351
|
+
ForEach: Qt,
|
|
1352
|
+
KeyedForEach: ut,
|
|
1353
|
+
Repeat: Jt,
|
|
1354
|
+
OneOf: Zt,
|
|
1355
|
+
OneOfField: zt,
|
|
1356
|
+
OneOfKind: en,
|
|
1357
|
+
OneOfType: tn,
|
|
1358
|
+
OneOfValue: nn,
|
|
1359
|
+
OneOfTuple: rn,
|
|
1360
|
+
MapSignal: sn,
|
|
1361
|
+
MapText: on,
|
|
1362
|
+
Ensure: ln,
|
|
1363
|
+
EnsureAll: cn,
|
|
1364
|
+
NotEmpty: an,
|
|
1365
|
+
Task: un,
|
|
1366
|
+
Async: dn,
|
|
1355
1367
|
OnDispose: Y,
|
|
1356
|
-
Conjunction:
|
|
1357
|
-
WithScope:
|
|
1358
|
-
WithProvider:
|
|
1359
|
-
Provide:
|
|
1360
|
-
Use:
|
|
1361
|
-
UseMany:
|
|
1362
|
-
|
|
1363
|
-
|
|
1368
|
+
Conjunction: hn,
|
|
1369
|
+
WithScope: dt,
|
|
1370
|
+
WithProvider: fn,
|
|
1371
|
+
Provide: pn,
|
|
1372
|
+
Use: mn,
|
|
1373
|
+
UseMany: gn,
|
|
1374
|
+
UseOptional: yn,
|
|
1375
|
+
handleValueOrSignal: Tn,
|
|
1376
|
+
createReactiveRenderable: vn,
|
|
1364
1377
|
renderableOfTNode: A
|
|
1365
|
-
} =
|
|
1366
|
-
function
|
|
1378
|
+
} = ct, te = /* @__PURE__ */ new Map();
|
|
1379
|
+
function ht(n) {
|
|
1367
1380
|
let e = te.get(n);
|
|
1368
1381
|
return e === void 0 && (e = n.split(" ").filter((t) => t.length > 0), te.set(n, e)), e;
|
|
1369
1382
|
}
|
|
1370
|
-
const
|
|
1371
|
-
const e = y((t) => (t.addClasses(n), (
|
|
1372
|
-
|
|
1383
|
+
const ft = (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
|
+
}, pt = (n) => {
|
|
1376
1389
|
const e = y((t) => {
|
|
1377
|
-
let
|
|
1378
|
-
const
|
|
1390
|
+
let r = [];
|
|
1391
|
+
const s = n.on(
|
|
1379
1392
|
(o) => {
|
|
1380
1393
|
const i = (o ?? "").split(" ").filter((l) => l.length > 0);
|
|
1381
|
-
|
|
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
|
-
|
|
1399
|
+
s(), o && t.removeClasses(r), r = [];
|
|
1387
1400
|
};
|
|
1388
1401
|
});
|
|
1389
1402
|
return e.kind = "dynamic-attr", e;
|
|
1390
|
-
},
|
|
1391
|
-
const t = y((
|
|
1392
|
-
const { get:
|
|
1403
|
+
}, mt = (n, e) => {
|
|
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
|
-
},
|
|
1399
|
-
const t = y((
|
|
1400
|
-
const { get:
|
|
1411
|
+
}, gt = (n, e) => {
|
|
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
|
};
|
|
1404
1417
|
});
|
|
1405
1418
|
return t.kind = "dynamic-attr", t;
|
|
1406
|
-
}, H = (n, e) => j.is(e) ?
|
|
1419
|
+
}, H = (n, e) => j.is(e) ? gt(n, e) : mt(n, e), yt = (n, e) => n === "class" ? j.is(e) ? pt(e) : ft(
|
|
1407
1420
|
/* c8 ignore next */
|
|
1408
1421
|
(e ?? "").split(" ").filter((t) => t.length > 0)
|
|
1409
1422
|
) : H(n, e), T = new Proxy(
|
|
@@ -1420,9 +1433,9 @@ const dt = (n) => {
|
|
|
1420
1433
|
* @returns The renderable component for the specified attribute.
|
|
1421
1434
|
*
|
|
1422
1435
|
*/
|
|
1423
|
-
get: (n, e) => (t) =>
|
|
1436
|
+
get: (n, e) => (t) => yt(e, t)
|
|
1424
1437
|
}
|
|
1425
|
-
),
|
|
1438
|
+
), Tt = (n, e) => H(`data-${n}`, e), bn = (n, e) => Tt(n, e), vt = (n, e) => H(`aria-${n}`, e), Sn = new Proxy(
|
|
1426
1439
|
{},
|
|
1427
1440
|
{
|
|
1428
1441
|
/**
|
|
@@ -1433,9 +1446,9 @@ const dt = (n) => {
|
|
|
1433
1446
|
* @returns The renderable component for the specified attribute.
|
|
1434
1447
|
*
|
|
1435
1448
|
*/
|
|
1436
|
-
get: (n, e) => (t) =>
|
|
1449
|
+
get: (n, e) => (t) => vt(e, t)
|
|
1437
1450
|
}
|
|
1438
|
-
),
|
|
1451
|
+
), bt = (n, e) => H(n, e), xn = new Proxy(
|
|
1439
1452
|
{},
|
|
1440
1453
|
{
|
|
1441
1454
|
/**
|
|
@@ -1446,9 +1459,9 @@ const dt = (n) => {
|
|
|
1446
1459
|
* @returns The renderable component for the specified attribute.
|
|
1447
1460
|
*
|
|
1448
1461
|
*/
|
|
1449
|
-
get: (n, e) => (t) =>
|
|
1462
|
+
get: (n, e) => (t) => bt(e, t)
|
|
1450
1463
|
}
|
|
1451
|
-
),
|
|
1464
|
+
), St = (n, e) => H(n, e), wn = new Proxy(
|
|
1452
1465
|
{},
|
|
1453
1466
|
{
|
|
1454
1467
|
/**
|
|
@@ -1458,159 +1471,171 @@ const dt = (n) => {
|
|
|
1458
1471
|
* @returns The renderable component for the specified attribute.
|
|
1459
1472
|
*
|
|
1460
1473
|
*/
|
|
1461
|
-
get: (n, e) => (t) =>
|
|
1474
|
+
get: (n, e) => (t) => St(e, t)
|
|
1462
1475
|
}
|
|
1463
1476
|
), ne = /* @__PURE__ */ new WeakMap();
|
|
1464
|
-
function
|
|
1477
|
+
function xt(n, e) {
|
|
1465
1478
|
let t = ne.get(n);
|
|
1466
|
-
return t || (t =
|
|
1479
|
+
return t || (t = De(n, e), ne.set(
|
|
1467
1480
|
n,
|
|
1468
1481
|
t
|
|
1469
1482
|
)), t;
|
|
1470
1483
|
}
|
|
1471
|
-
const
|
|
1472
|
-
const
|
|
1473
|
-
const
|
|
1484
|
+
const En = (n, e, t = "danger", r) => {
|
|
1485
|
+
const s = ht(t), o = y((i) => {
|
|
1486
|
+
const d = xt(n, r)(e).on(
|
|
1474
1487
|
(f) => {
|
|
1475
|
-
f ? i.addClasses(
|
|
1488
|
+
f ? i.addClasses(s) : i.removeClasses(s);
|
|
1476
1489
|
},
|
|
1477
1490
|
{ noAutoDispose: !0 }
|
|
1478
1491
|
);
|
|
1479
1492
|
return (f) => {
|
|
1480
|
-
|
|
1493
|
+
d(), f && i.removeClasses(s);
|
|
1481
1494
|
};
|
|
1482
1495
|
});
|
|
1483
1496
|
return o.kind = "dynamic-attr", o;
|
|
1484
1497
|
}, be = (n, e, t) => {
|
|
1485
|
-
const
|
|
1486
|
-
(
|
|
1498
|
+
const r = y(
|
|
1499
|
+
(s) => s.on(n, e, t)
|
|
1487
1500
|
);
|
|
1501
|
+
return r.kind = "dynamic-attr", r;
|
|
1502
|
+
}, Se = (n) => (e, t, r) => {
|
|
1503
|
+
const s = y((o) => {
|
|
1504
|
+
if (!o.isBrowser())
|
|
1505
|
+
return () => {
|
|
1506
|
+
};
|
|
1507
|
+
const i = o, l = i.element, c = n === "document" ? i.document : i.getWindow();
|
|
1508
|
+
let d = !1;
|
|
1509
|
+
const f = (h) => {
|
|
1510
|
+
d || !l.isConnected || t(h, o);
|
|
1511
|
+
};
|
|
1512
|
+
return c.addEventListener(e, f, r), () => {
|
|
1513
|
+
d = !0, c.removeEventListener(e, f, r);
|
|
1514
|
+
};
|
|
1515
|
+
});
|
|
1488
1516
|
return s.kind = "dynamic-attr", s;
|
|
1489
|
-
},
|
|
1517
|
+
}, wt = Se("document"), Et = Se("window"), kt = (n) => be("click", (e, t) => {
|
|
1490
1518
|
e.preventDefault();
|
|
1491
|
-
const
|
|
1519
|
+
const r = e.target;
|
|
1492
1520
|
setTimeout(() => {
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1521
|
+
const s = r.ownerDocument != null ? r?.checked : void 0;
|
|
1522
|
+
s != null && n(!s, t);
|
|
1495
1523
|
}, 0);
|
|
1524
|
+
}), re = (n) => new Proxy({}, {
|
|
1525
|
+
get: (e, t) => (r, s) => n(t, r, s)
|
|
1496
1526
|
}), D = new Proxy(
|
|
1497
1527
|
{},
|
|
1498
1528
|
{
|
|
1499
|
-
|
|
1500
|
-
* @param name - The name of the event handler.
|
|
1501
|
-
* @param fn - The function to call when the event is triggered.
|
|
1502
|
-
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1503
|
-
*/
|
|
1504
|
-
get: (n, e) => (t) => be(e, t)
|
|
1529
|
+
get: (n, e) => e === "document" ? re(wt) : e === "window" ? re(Et) : (t, r) => be(e, t, r)
|
|
1505
1530
|
}
|
|
1506
|
-
),
|
|
1531
|
+
), At = (n, e) => (t) => {
|
|
1507
1532
|
e?.preventDefault === !0 && t.preventDefault(), e?.stopPropagation === !0 && t.stopPropagation(), e?.stopImmediatePropagation === !0 && t.stopImmediatePropagation(), n(t);
|
|
1508
|
-
}, x = (n, e) =>
|
|
1509
|
-
const
|
|
1510
|
-
n(
|
|
1511
|
-
}, e),
|
|
1512
|
-
(t,
|
|
1533
|
+
}, x = (n, e) => At((t) => {
|
|
1534
|
+
const r = t.target;
|
|
1535
|
+
n(r, t);
|
|
1536
|
+
}, e), Ct = (n, e) => x(
|
|
1537
|
+
(t, r) => n(t.value, r),
|
|
1513
1538
|
e
|
|
1514
|
-
),
|
|
1515
|
-
(t,
|
|
1539
|
+
), Pt = (n, e) => x(
|
|
1540
|
+
(t, r) => n(t.valueAsNumber, r),
|
|
1516
1541
|
e
|
|
1517
|
-
),
|
|
1542
|
+
), Mt = (n, e) => x((t, r) => {
|
|
1518
1543
|
if (t.value === "")
|
|
1519
1544
|
return;
|
|
1520
|
-
const
|
|
1521
|
-
Number(
|
|
1522
|
-
Number(
|
|
1523
|
-
Number(
|
|
1545
|
+
const s = t.value.split("-"), o = new Date(
|
|
1546
|
+
Number(s[0]),
|
|
1547
|
+
Number(s[1]) - 1,
|
|
1548
|
+
Number(s[2].substring(0, 2))
|
|
1524
1549
|
);
|
|
1525
|
-
n(o,
|
|
1526
|
-
}, e),
|
|
1550
|
+
n(o, r);
|
|
1551
|
+
}, e), kn = (n, e) => x((t, r) => {
|
|
1527
1552
|
if (t.value === "") {
|
|
1528
|
-
n(null,
|
|
1553
|
+
n(null, r);
|
|
1529
1554
|
return;
|
|
1530
1555
|
}
|
|
1531
|
-
const
|
|
1532
|
-
Number(
|
|
1533
|
-
Number(
|
|
1534
|
-
Number(
|
|
1556
|
+
const s = t.value.split("-"), o = new Date(
|
|
1557
|
+
Number(s[0]),
|
|
1558
|
+
Number(s[1]) - 1,
|
|
1559
|
+
Number(s[2].substring(0, 2))
|
|
1535
1560
|
);
|
|
1536
|
-
n(o,
|
|
1537
|
-
}, e),
|
|
1561
|
+
n(o, r);
|
|
1562
|
+
}, e), Ot = (n, e) => x((t, r) => {
|
|
1538
1563
|
if (t.value === "")
|
|
1539
1564
|
return;
|
|
1540
|
-
const
|
|
1565
|
+
const s = t.value.split("T"), o = s[0].split("-"), i = new Date(
|
|
1541
1566
|
Number(o[0]),
|
|
1542
1567
|
Number(o[1]) - 1,
|
|
1543
1568
|
Number(o[2])
|
|
1544
|
-
), l =
|
|
1545
|
-
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), n(i,
|
|
1546
|
-
}, e),
|
|
1569
|
+
), l = s[1].split(":");
|
|
1570
|
+
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), n(i, r);
|
|
1571
|
+
}, e), An = (n, e) => x((t, r) => {
|
|
1547
1572
|
if (t.value === "") {
|
|
1548
|
-
n(null,
|
|
1573
|
+
n(null, r);
|
|
1549
1574
|
return;
|
|
1550
1575
|
}
|
|
1551
|
-
const
|
|
1552
|
-
if (
|
|
1553
|
-
n(null,
|
|
1576
|
+
const s = t.value.split("T");
|
|
1577
|
+
if (s.length !== 2) {
|
|
1578
|
+
n(null, r);
|
|
1554
1579
|
return;
|
|
1555
1580
|
}
|
|
1556
|
-
const o =
|
|
1581
|
+
const o = s[0].split("-"), i = new Date(
|
|
1557
1582
|
Number(o[0]),
|
|
1558
1583
|
Number(o[1]) - 1,
|
|
1559
1584
|
Number(o[2])
|
|
1560
|
-
), l =
|
|
1561
|
-
i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), n(i,
|
|
1562
|
-
}, e),
|
|
1563
|
-
n(t.checked,
|
|
1564
|
-
}, e),
|
|
1585
|
+
), l = s[1].split(":");
|
|
1586
|
+
i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), n(i, r);
|
|
1587
|
+
}, e), Cn = (n, e) => x((t, r) => {
|
|
1588
|
+
n(t.checked, r);
|
|
1589
|
+
}, e), Pn = (n, e = "input") => S(
|
|
1565
1590
|
T.valueAsDate(n),
|
|
1566
|
-
D[e](
|
|
1567
|
-
),
|
|
1591
|
+
D[e](Mt((t) => n.set(t)))
|
|
1592
|
+
), Mn = (n, e = "input") => S(
|
|
1568
1593
|
T.valueAsDate(n),
|
|
1569
|
-
D[e](
|
|
1570
|
-
),
|
|
1594
|
+
D[e](Ot((t) => n.set(t)))
|
|
1595
|
+
), On = (n, e = "input") => S(
|
|
1571
1596
|
T.valueAsNumber(n),
|
|
1572
|
-
D[e](
|
|
1573
|
-
),
|
|
1597
|
+
D[e](Pt((t) => n.set(t)))
|
|
1598
|
+
), Ln = (n, e = "input") => S(T.value(n), D[e](Ct((t) => n.set(t)))), In = (n) => S(
|
|
1574
1599
|
T.checked(n),
|
|
1575
|
-
|
|
1576
|
-
),
|
|
1577
|
-
const
|
|
1600
|
+
kt((e) => n.set(e))
|
|
1601
|
+
), Lt = (n, e, t, r) => {
|
|
1602
|
+
const s = y((o) => {
|
|
1578
1603
|
if (!o.isBrowser())
|
|
1579
1604
|
return () => {
|
|
1580
1605
|
};
|
|
1581
1606
|
const i = o.element, l = (c) => {
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1607
|
+
const d = c.target?.closest(e);
|
|
1608
|
+
d != null && i.contains(d) && t(c, o);
|
|
1584
1609
|
};
|
|
1585
|
-
return i.addEventListener(n, l,
|
|
1586
|
-
c && i.removeEventListener(n, l,
|
|
1610
|
+
return i.addEventListener(n, l, r), (c) => {
|
|
1611
|
+
c && i.removeEventListener(n, l, r);
|
|
1587
1612
|
};
|
|
1588
1613
|
});
|
|
1589
|
-
return
|
|
1590
|
-
},
|
|
1614
|
+
return s.kind = "dynamic-attr", s;
|
|
1615
|
+
}, Hn = new Proxy(
|
|
1591
1616
|
{},
|
|
1592
1617
|
{
|
|
1593
|
-
get: (n, e) => (t,
|
|
1618
|
+
get: (n, e) => (t, r, s) => Lt(e, t, r, s)
|
|
1594
1619
|
}
|
|
1595
|
-
),
|
|
1620
|
+
), Dn = (n) => y((e) => (e.appendOrInsert(n), (t) => {
|
|
1596
1621
|
t && V(n);
|
|
1597
|
-
})),
|
|
1598
|
-
const t = e.map(A),
|
|
1599
|
-
const o =
|
|
1622
|
+
})), xe = (n, ...e) => {
|
|
1623
|
+
const t = e.map(A), r = y((s) => {
|
|
1624
|
+
const o = s.makeChildElement(n, void 0), i = t.map((l) => l.render(o));
|
|
1600
1625
|
return (l) => {
|
|
1601
1626
|
i.forEach((c) => c(!1)), o.clear(l);
|
|
1602
1627
|
};
|
|
1603
1628
|
});
|
|
1604
|
-
return
|
|
1629
|
+
return r.kind = "element", r.tag = n, r.children = t, r;
|
|
1605
1630
|
}, X = (n, e, ...t) => {
|
|
1606
|
-
const
|
|
1607
|
-
const i = o.makeChildElement(n, e), l =
|
|
1631
|
+
const r = t.map(A), s = y((o) => {
|
|
1632
|
+
const i = o.makeChildElement(n, e), l = r.map((c) => c.render(i));
|
|
1608
1633
|
return (c) => {
|
|
1609
|
-
l.forEach((
|
|
1634
|
+
l.forEach((d) => d(!1)), i.clear(c);
|
|
1610
1635
|
};
|
|
1611
1636
|
});
|
|
1612
|
-
return
|
|
1613
|
-
},
|
|
1637
|
+
return s.kind = "element", s.tag = n, s.ns = e, s.children = r, s;
|
|
1638
|
+
}, It = new Proxy(
|
|
1614
1639
|
{},
|
|
1615
1640
|
{
|
|
1616
1641
|
/**
|
|
@@ -1618,9 +1643,9 @@ const bn = (n, e, t = "danger", s) => {
|
|
|
1618
1643
|
* @param tagName - The HTML tag name.
|
|
1619
1644
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
1620
1645
|
*/
|
|
1621
|
-
get: (n, e) => (...t) =>
|
|
1646
|
+
get: (n, e) => (...t) => xe(e, ...t)
|
|
1622
1647
|
}
|
|
1623
|
-
),
|
|
1648
|
+
), Nn = new Proxy(
|
|
1624
1649
|
{},
|
|
1625
1650
|
{
|
|
1626
1651
|
/**
|
|
@@ -1628,9 +1653,9 @@ const bn = (n, e, t = "danger", s) => {
|
|
|
1628
1653
|
* @param type - The input type name.
|
|
1629
1654
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
1630
1655
|
*/
|
|
1631
|
-
get: (n, e) => (...t) =>
|
|
1656
|
+
get: (n, e) => (...t) => xe("input", T.type(e), ...t)
|
|
1632
1657
|
}
|
|
1633
|
-
),
|
|
1658
|
+
), we = "http://www.w3.org/2000/svg", Rn = (n, ...e) => X(n, we, ...e), _n = new Proxy(
|
|
1634
1659
|
{},
|
|
1635
1660
|
{
|
|
1636
1661
|
/**
|
|
@@ -1638,9 +1663,9 @@ const bn = (n, e, t = "danger", s) => {
|
|
|
1638
1663
|
* @param tagName - The SVG tag name.
|
|
1639
1664
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1640
1665
|
*/
|
|
1641
|
-
get: (n, e) => (...t) => X(e,
|
|
1666
|
+
get: (n, e) => (...t) => X(e, we, ...t)
|
|
1642
1667
|
}
|
|
1643
|
-
),
|
|
1668
|
+
), Ee = "http://www.w3.org/1998/Math/MathML", $n = (n, ...e) => X(n, Ee, ...e), Bn = new Proxy(
|
|
1644
1669
|
{},
|
|
1645
1670
|
{
|
|
1646
1671
|
/**
|
|
@@ -1648,7 +1673,7 @@ const bn = (n, e, t = "danger", s) => {
|
|
|
1648
1673
|
* @param tagName - The Math tag name.
|
|
1649
1674
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1650
1675
|
*/
|
|
1651
|
-
get: (n, e) => (...t) => X(e,
|
|
1676
|
+
get: (n, e) => (...t) => X(e, Ee, ...t)
|
|
1652
1677
|
}
|
|
1653
1678
|
), N = (n) => y((e) => {
|
|
1654
1679
|
if (e.isBrowser()) {
|
|
@@ -1659,50 +1684,50 @@ const bn = (n, e, t = "danger", s) => {
|
|
|
1659
1684
|
return () => {
|
|
1660
1685
|
};
|
|
1661
1686
|
});
|
|
1662
|
-
function
|
|
1687
|
+
function Vn({
|
|
1663
1688
|
src: n,
|
|
1664
1689
|
name: e,
|
|
1665
1690
|
width: t,
|
|
1666
|
-
height:
|
|
1667
|
-
sandbox:
|
|
1691
|
+
height: r,
|
|
1692
|
+
sandbox: s,
|
|
1668
1693
|
allow: o,
|
|
1669
1694
|
referrerpolicy: i,
|
|
1670
1695
|
loading: l,
|
|
1671
1696
|
iframeChild: c,
|
|
1672
|
-
onLoad:
|
|
1697
|
+
onLoad: d
|
|
1673
1698
|
} = {}, ...f) {
|
|
1674
|
-
return
|
|
1699
|
+
return It.iframe(
|
|
1675
1700
|
T.src(n),
|
|
1676
1701
|
T.name(e),
|
|
1677
1702
|
T.width(
|
|
1678
1703
|
t != null ? $.map(t, String) : void 0
|
|
1679
1704
|
),
|
|
1680
1705
|
T.height(
|
|
1681
|
-
|
|
1706
|
+
r != null ? $.map(r, String) : void 0
|
|
1682
1707
|
),
|
|
1683
|
-
T.sandbox(
|
|
1708
|
+
T.sandbox(s),
|
|
1684
1709
|
T.allow(o),
|
|
1685
1710
|
T.referrerpolicy(i),
|
|
1686
1711
|
c,
|
|
1687
|
-
N((
|
|
1688
|
-
const a =
|
|
1712
|
+
N((h) => {
|
|
1713
|
+
const a = h.element;
|
|
1689
1714
|
let u, p = !1;
|
|
1690
1715
|
const m = () => {
|
|
1691
1716
|
if (p) return;
|
|
1692
1717
|
p = !0;
|
|
1693
1718
|
const g = a.contentDocument;
|
|
1694
|
-
if (g && (
|
|
1695
|
-
const
|
|
1696
|
-
if (
|
|
1697
|
-
const F =
|
|
1698
|
-
u = I(
|
|
1719
|
+
if (g && (d && d(a), f.length > 0)) {
|
|
1720
|
+
const v = g.body;
|
|
1721
|
+
if (v) {
|
|
1722
|
+
const F = h.withElement(v);
|
|
1723
|
+
u = I(S(...f), F);
|
|
1699
1724
|
}
|
|
1700
1725
|
}
|
|
1701
1726
|
};
|
|
1702
1727
|
return l != null && $.on(l, (g) => {
|
|
1703
1728
|
a.loading = g;
|
|
1704
|
-
}), (f.length > 0 ||
|
|
1705
|
-
f.length > 0 ||
|
|
1729
|
+
}), (f.length > 0 || d) && (n || setTimeout(m, 0)), S(
|
|
1730
|
+
f.length > 0 || d ? D.load(m) : at,
|
|
1706
1731
|
Y(() => {
|
|
1707
1732
|
u && u(!1);
|
|
1708
1733
|
})
|
|
@@ -1710,61 +1735,61 @@ function Nn({
|
|
|
1710
1735
|
})
|
|
1711
1736
|
);
|
|
1712
1737
|
}
|
|
1713
|
-
const
|
|
1714
|
-
const
|
|
1715
|
-
return () =>
|
|
1716
|
-
}), _ = /* @__PURE__ */ new Map(),
|
|
1717
|
-
mark:
|
|
1738
|
+
const jn = (n, e) => y((t) => {
|
|
1739
|
+
const r = t.makePortal(n), s = I(A(e), r);
|
|
1740
|
+
return () => s(!0);
|
|
1741
|
+
}), _ = /* @__PURE__ */ new Map(), Ht = (n) => ({
|
|
1742
|
+
mark: ie(`Probe(${n.description})`),
|
|
1718
1743
|
create: ({ callback: e = () => {
|
|
1719
1744
|
}, timeout: t = 10 } = {}) => {
|
|
1720
|
-
const
|
|
1721
|
-
clearTimeout(
|
|
1745
|
+
const r = (l) => {
|
|
1746
|
+
clearTimeout(s), _.delete(n), e(l);
|
|
1722
1747
|
};
|
|
1723
1748
|
if (_.has(n))
|
|
1724
1749
|
throw new Error(`Probe already exists: ${n.description}`);
|
|
1725
|
-
const
|
|
1750
|
+
const s = setTimeout(() => r("timeout"), t), o = { counter: 0, timeoutId: s };
|
|
1726
1751
|
return _.set(n, o), {
|
|
1727
1752
|
value: () => {
|
|
1728
|
-
clearTimeout(
|
|
1753
|
+
clearTimeout(s);
|
|
1729
1754
|
const l = _.get(n);
|
|
1730
|
-
l != null && --l.counter === 0 &&
|
|
1755
|
+
l != null && --l.counter === 0 && r("resolved");
|
|
1731
1756
|
},
|
|
1732
|
-
dispose: () =>
|
|
1757
|
+
dispose: () => r("disposed"),
|
|
1733
1758
|
onUse: () => o.counter++
|
|
1734
1759
|
};
|
|
1735
1760
|
}
|
|
1736
|
-
}),
|
|
1737
|
-
function
|
|
1761
|
+
}), Yn = Ht(/* @__PURE__ */ Symbol("GlobalProbe"));
|
|
1762
|
+
function Xn({
|
|
1738
1763
|
mode: n,
|
|
1739
1764
|
delegatesFocus: e,
|
|
1740
1765
|
slotAssignment: t,
|
|
1741
|
-
clonable:
|
|
1742
|
-
serializable:
|
|
1766
|
+
clonable: r,
|
|
1767
|
+
serializable: s
|
|
1743
1768
|
}, ...o) {
|
|
1744
1769
|
return N((i) => {
|
|
1745
1770
|
const l = { mode: n };
|
|
1746
|
-
e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t),
|
|
1747
|
-
const c = i.element.attachShadow(l),
|
|
1771
|
+
e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t), r !== void 0 && (l.clonable = r), s !== void 0 && (l.serializable = s);
|
|
1772
|
+
const c = i.element.attachShadow(l), d = i.withElement(c), f = I(S(...o), d);
|
|
1748
1773
|
return Y(() => f(!0));
|
|
1749
1774
|
});
|
|
1750
1775
|
}
|
|
1751
|
-
const
|
|
1752
|
-
const t = y((
|
|
1753
|
-
const
|
|
1754
|
-
return
|
|
1755
|
-
o &&
|
|
1776
|
+
const Dt = (n, e) => {
|
|
1777
|
+
const t = y((r) => {
|
|
1778
|
+
const s = r.getStyle(n);
|
|
1779
|
+
return r.setStyle(n, e), (o) => {
|
|
1780
|
+
o && r.setStyle(n, s);
|
|
1756
1781
|
};
|
|
1757
1782
|
});
|
|
1758
1783
|
return t.kind = "dynamic-attr", t;
|
|
1759
|
-
},
|
|
1760
|
-
const t = y((
|
|
1761
|
-
const
|
|
1784
|
+
}, Nt = (n, e) => {
|
|
1785
|
+
const t = y((r) => {
|
|
1786
|
+
const s = r.getStyle(n), o = e.on((i) => r.setStyle(n, i));
|
|
1762
1787
|
return (i) => {
|
|
1763
|
-
o(), i &&
|
|
1788
|
+
o(), i && r.setStyle(n, s);
|
|
1764
1789
|
};
|
|
1765
1790
|
});
|
|
1766
1791
|
return t.kind = "dynamic-attr", t;
|
|
1767
|
-
}, se = (n, e) => j.is(e) ?
|
|
1792
|
+
}, se = (n, e) => j.is(e) ? Nt(n, e) : Dt(n, e), Fn = new Proxy({}, {
|
|
1768
1793
|
/**
|
|
1769
1794
|
* Creates a renderable component for the specified `style` property.
|
|
1770
1795
|
*
|
|
@@ -1773,20 +1798,20 @@ const Pt = (n, e) => {
|
|
|
1773
1798
|
* @returns The renderable component for the specified attribute.
|
|
1774
1799
|
*
|
|
1775
1800
|
*/
|
|
1776
|
-
get: (n, e) => e === "variable" ? (t,
|
|
1777
|
-
}),
|
|
1801
|
+
get: (n, e) => e === "variable" ? (t, r) => se(t, r) : (t) => se(e, t)
|
|
1802
|
+
}), Rt = (n) => y((e) => {
|
|
1778
1803
|
const t = e.makeChildText(n);
|
|
1779
|
-
return (
|
|
1780
|
-
}),
|
|
1781
|
-
const t = e.makeChildText(n.value),
|
|
1782
|
-
return (
|
|
1783
|
-
|
|
1804
|
+
return (r) => t.clear(r);
|
|
1805
|
+
}), _t = (n) => y((e) => {
|
|
1806
|
+
const t = e.makeChildText(n.value), r = n.on((s) => t.setText(s));
|
|
1807
|
+
return (s) => {
|
|
1808
|
+
r(), t.clear(s);
|
|
1784
1809
|
};
|
|
1785
|
-
}),
|
|
1810
|
+
}), Wn = (n) => j.is(n) ? _t(n) : Rt(n), Kn = (n) => y((e) => {
|
|
1786
1811
|
const t = n(e);
|
|
1787
1812
|
return t == null ? () => {
|
|
1788
1813
|
} : A(t).render(e);
|
|
1789
|
-
}),
|
|
1814
|
+
}), Un = (n) => N((e) => n(e.element)), qn = (n) => y((e) => {
|
|
1790
1815
|
if (e.isHeadlessDOM()) {
|
|
1791
1816
|
const t = n(e);
|
|
1792
1817
|
if (t)
|
|
@@ -1794,51 +1819,51 @@ const Pt = (n, e) => {
|
|
|
1794
1819
|
}
|
|
1795
1820
|
return () => {
|
|
1796
1821
|
};
|
|
1797
|
-
}),
|
|
1798
|
-
const
|
|
1822
|
+
}), Gn = (n, e) => N((t) => {
|
|
1823
|
+
const r = t.element, s = et(
|
|
1799
1824
|
n,
|
|
1800
|
-
() =>
|
|
1825
|
+
() => r.getBoundingClientRect(),
|
|
1801
1826
|
e
|
|
1802
1827
|
);
|
|
1803
|
-
return
|
|
1804
|
-
|
|
1828
|
+
return r.addEventListener("touchstart", s.onTouchStart, { passive: !1 }), r.addEventListener("touchmove", s.onTouchMove, { passive: !1 }), r.addEventListener("touchend", s.onTouchEnd), Y(() => {
|
|
1829
|
+
r.removeEventListener("touchstart", s.onTouchStart), r.removeEventListener("touchmove", s.onTouchMove), r.removeEventListener("touchend", s.onTouchEnd);
|
|
1805
1830
|
});
|
|
1806
|
-
}),
|
|
1807
|
-
const
|
|
1831
|
+
}), Qn = (n, e) => N((t) => {
|
|
1832
|
+
const r = t.element, s = tt(n, e);
|
|
1808
1833
|
let o = null, i = 0, l = 0;
|
|
1809
|
-
const c = (
|
|
1810
|
-
o !== null && (o.dispose(), o = null), i =
|
|
1811
|
-
},
|
|
1812
|
-
if (!
|
|
1813
|
-
const a =
|
|
1814
|
-
i =
|
|
1815
|
-
}, f = (
|
|
1816
|
-
|
|
1834
|
+
const c = (h) => {
|
|
1835
|
+
o !== null && (o.dispose(), o = null), i = h.clientX, l = h.clientY, s.track(h.clientX, h.clientY), r.setPointerCapture(h.pointerId);
|
|
1836
|
+
}, d = (h) => {
|
|
1837
|
+
if (!r.hasPointerCapture(h.pointerId)) return;
|
|
1838
|
+
const a = h.clientX - i, u = h.clientY - l;
|
|
1839
|
+
i = h.clientX, l = h.clientY, s.track(h.clientX, h.clientY), n(a, u);
|
|
1840
|
+
}, f = (h) => {
|
|
1841
|
+
r.hasPointerCapture(h.pointerId) && (r.releasePointerCapture(h.pointerId), o = s.release());
|
|
1817
1842
|
};
|
|
1818
|
-
return
|
|
1819
|
-
o !== null && o.dispose(),
|
|
1843
|
+
return r.addEventListener("pointerdown", c), r.addEventListener("pointermove", d), r.addEventListener("pointerup", f), r.addEventListener("pointercancel", f), Y(() => {
|
|
1844
|
+
o !== null && o.dispose(), r.removeEventListener("pointerdown", c), r.removeEventListener("pointermove", d), r.removeEventListener("pointerup", f), r.removeEventListener("pointercancel", f);
|
|
1820
1845
|
});
|
|
1821
1846
|
});
|
|
1822
|
-
function
|
|
1823
|
-
return
|
|
1847
|
+
function Jn(n, e, t, r) {
|
|
1848
|
+
return dt((s) => {
|
|
1824
1849
|
const o = B([]), i = /* @__PURE__ */ new Map();
|
|
1825
|
-
|
|
1850
|
+
s.onDispose(() => {
|
|
1826
1851
|
for (const c of i.values()) clearTimeout(c);
|
|
1827
1852
|
i.clear();
|
|
1828
1853
|
});
|
|
1829
1854
|
const l = /* @__PURE__ */ new Set();
|
|
1830
1855
|
return n.on(
|
|
1831
1856
|
(c) => {
|
|
1832
|
-
const
|
|
1857
|
+
const d = new Set(c.map(e)), f = o.get();
|
|
1833
1858
|
for (const u of f)
|
|
1834
|
-
if (!
|
|
1835
|
-
if (l.add(u.key), u.isExiting.set(!0),
|
|
1859
|
+
if (!d.has(u.key) && !l.has(u.key))
|
|
1860
|
+
if (l.add(u.key), u.isExiting.set(!0), r.exitDuration != null && r.exitDuration > 0) {
|
|
1836
1861
|
const p = setTimeout(() => {
|
|
1837
1862
|
i.delete(u.key), l.delete(u.key), o.set(o.get().filter((m) => m.key !== u.key));
|
|
1838
|
-
},
|
|
1863
|
+
}, r.exitDuration);
|
|
1839
1864
|
i.set(u.key, p);
|
|
1840
|
-
} else
|
|
1841
|
-
const
|
|
1865
|
+
} else r.useAnimationEvents || l.delete(u.key);
|
|
1866
|
+
const h = c.map((u) => {
|
|
1842
1867
|
const p = e(u), m = f.find(
|
|
1843
1868
|
(g) => g.key === p && !l.has(p)
|
|
1844
1869
|
);
|
|
@@ -1848,207 +1873,208 @@ function Kn(n, e, t, s) {
|
|
|
1848
1873
|
isExiting: B(!1)
|
|
1849
1874
|
};
|
|
1850
1875
|
}), a = f.filter(
|
|
1851
|
-
(u) => l.has(u.key) && !
|
|
1876
|
+
(u) => l.has(u.key) && !d.has(u.key)
|
|
1852
1877
|
);
|
|
1853
|
-
o.set([...
|
|
1878
|
+
o.set([...h, ...a]);
|
|
1854
1879
|
},
|
|
1855
1880
|
{ skipInitial: !1 }
|
|
1856
|
-
),
|
|
1881
|
+
), ut(
|
|
1857
1882
|
o,
|
|
1858
1883
|
(c) => c.key,
|
|
1859
|
-
(c,
|
|
1860
|
-
const f = c.map((a) => a.value),
|
|
1861
|
-
return t(f,
|
|
1884
|
+
(c, d) => {
|
|
1885
|
+
const f = c.map((a) => a.value), h = c.get().isExiting;
|
|
1886
|
+
return t(f, d, h);
|
|
1862
1887
|
}
|
|
1863
1888
|
);
|
|
1864
1889
|
});
|
|
1865
1890
|
}
|
|
1866
1891
|
export {
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1892
|
+
vt as Aria,
|
|
1893
|
+
dn as Async,
|
|
1894
|
+
yt as Attr,
|
|
1895
|
+
In as BindChecked,
|
|
1896
|
+
Pn as BindDate,
|
|
1897
|
+
Mn as BindDateTime,
|
|
1898
|
+
On as BindNumber,
|
|
1899
|
+
Ln as BindText,
|
|
1900
|
+
b as BrowserContext,
|
|
1876
1901
|
C as CLASS_PLACEHOLDER_ATTR,
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1902
|
+
er as Computed,
|
|
1903
|
+
hn as Conjunction,
|
|
1904
|
+
Dn as DOMNode,
|
|
1905
|
+
Tt as DataAttr,
|
|
1906
|
+
tr as DisposalScope,
|
|
1907
|
+
xe as El,
|
|
1883
1908
|
X as ElNS,
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1909
|
+
nr as ElementPosition,
|
|
1910
|
+
at as Empty,
|
|
1911
|
+
ln as Ensure,
|
|
1912
|
+
cn as EnsureAll,
|
|
1913
|
+
Qt as ForEach,
|
|
1914
|
+
S as Fragment,
|
|
1915
|
+
Yn as GlobalProbe,
|
|
1916
|
+
We as HYDRATION_ID_ATTR,
|
|
1917
|
+
Yt as HeadlessAdapter,
|
|
1893
1918
|
k as HeadlessContext,
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1919
|
+
Ge as HeadlessElement,
|
|
1920
|
+
Te as HeadlessPortal,
|
|
1921
|
+
Qe as HeadlessText,
|
|
1922
|
+
Vn as IFrame,
|
|
1923
|
+
Qn as Inertia,
|
|
1924
|
+
ut as KeyedForEach,
|
|
1925
|
+
rr as KeyedPosition,
|
|
1926
|
+
sn as MapSignal,
|
|
1927
|
+
on as MapText,
|
|
1928
|
+
St as MathAttr,
|
|
1929
|
+
$n as MathEl,
|
|
1930
|
+
sr as MemoryStore,
|
|
1931
|
+
an as NotEmpty,
|
|
1932
|
+
kt as OnChecked,
|
|
1908
1933
|
Y as OnDispose,
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1934
|
+
Zt as OneOf,
|
|
1935
|
+
zt as OneOfField,
|
|
1936
|
+
en as OneOfKind,
|
|
1937
|
+
rn as OneOfTuple,
|
|
1938
|
+
tn as OneOfType,
|
|
1939
|
+
nn as OneOfValue,
|
|
1940
|
+
Gn as PinchZoom,
|
|
1941
|
+
jn as Portal,
|
|
1942
|
+
ir as Prop,
|
|
1943
|
+
pn as Provide,
|
|
1944
|
+
xs as ProviderNotFoundError,
|
|
1945
|
+
Wt as RafLoop,
|
|
1946
|
+
Ft as ReducedMotion,
|
|
1947
|
+
Be as RenderingError,
|
|
1948
|
+
Jt as Repeat,
|
|
1949
|
+
bt as SVGAttr,
|
|
1950
|
+
Rn as SVGEl,
|
|
1951
|
+
Xn as ShadowRoot,
|
|
1952
|
+
or as Signal,
|
|
1953
|
+
un as Task,
|
|
1954
|
+
Wn as TextNode,
|
|
1955
|
+
Jn as TransitionKeyedForEach,
|
|
1956
|
+
Gt as Unless,
|
|
1957
|
+
mn as Use,
|
|
1958
|
+
gn as UseMany,
|
|
1959
|
+
yn as UseOptional,
|
|
1960
|
+
lr as Value,
|
|
1961
|
+
qt as When,
|
|
1936
1962
|
N as WithBrowserCtx,
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1963
|
+
Kn as WithCtx,
|
|
1964
|
+
Un as WithElement,
|
|
1965
|
+
qn as WithHeadlessCtx,
|
|
1966
|
+
fn as WithProvider,
|
|
1967
|
+
dt as WithScope,
|
|
1942
1968
|
W as _NODE_PLACEHOLDER_ATTR,
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1969
|
+
$e as _getSelfOrParentElement,
|
|
1970
|
+
fe as _isElement,
|
|
1971
|
+
pe as _isFragment,
|
|
1972
|
+
_e as _makeGetter,
|
|
1973
|
+
Re as _makeSetter,
|
|
1948
1974
|
V as _removeDOMNode,
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1975
|
+
_t as _signalText,
|
|
1976
|
+
Rt as _staticText,
|
|
1977
|
+
cr as animateSignal,
|
|
1978
|
+
ar as animateSignals,
|
|
1979
|
+
Sn as aria,
|
|
1954
1980
|
T as attr,
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
1981
|
+
ur as bind,
|
|
1982
|
+
dr as chainEasing,
|
|
1983
|
+
hr as coalesce,
|
|
1984
|
+
fr as computed,
|
|
1985
|
+
pr as computedOf,
|
|
1986
|
+
mr as computedOfAsync,
|
|
1987
|
+
gr as computedOfAsyncGenerator,
|
|
1988
|
+
yr as computedRecord,
|
|
1989
|
+
tt as createInertiaHandler,
|
|
1990
|
+
et as createPinchZoomHandler,
|
|
1991
|
+
U as createRafLoop,
|
|
1992
|
+
ze as createReducedMotionSignal,
|
|
1993
|
+
ws as createRenderKit,
|
|
1994
|
+
Tr as createRenderable,
|
|
1995
|
+
vr as createSelector,
|
|
1996
|
+
Ut as createTween,
|
|
1997
|
+
bn as dataAttr,
|
|
1998
|
+
br as delaySignal,
|
|
1999
|
+
Hn as delegate,
|
|
2000
|
+
Sr as easeInBack,
|
|
2001
|
+
xr as easeInBounce,
|
|
2002
|
+
wr as easeInCubic,
|
|
2003
|
+
Er as easeInElastic,
|
|
2004
|
+
kr as easeInExpo,
|
|
2005
|
+
Ar as easeInOutBack,
|
|
2006
|
+
Cr as easeInOutBounce,
|
|
2007
|
+
Pr as easeInOutCubic,
|
|
2008
|
+
Mr as easeInOutElastic,
|
|
2009
|
+
Or as easeInOutExpo,
|
|
2010
|
+
Lr as easeInOutQuad,
|
|
2011
|
+
Ir as easeInOutQuart,
|
|
2012
|
+
Hr as easeInOutSine,
|
|
2013
|
+
Dr as easeInQuad,
|
|
2014
|
+
Nr as easeInQuart,
|
|
2015
|
+
Rr as easeInSine,
|
|
2016
|
+
_r as easeOutBack,
|
|
2017
|
+
$r as easeOutBounce,
|
|
2018
|
+
Br as easeOutCubic,
|
|
2019
|
+
Vr as easeOutElastic,
|
|
2020
|
+
jr as easeOutExpo,
|
|
2021
|
+
Yr as easeOutQuad,
|
|
2022
|
+
Xr as easeOutQuart,
|
|
2023
|
+
Fr as easeOutSine,
|
|
2024
|
+
Wr as effect,
|
|
2025
|
+
Kr as effectOf,
|
|
2026
|
+
At as emit,
|
|
2027
|
+
Cn as emitChecked,
|
|
2002
2028
|
x as emitTarget,
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2029
|
+
Ct as emitValue,
|
|
2030
|
+
Mt as emitValueAsDate,
|
|
2031
|
+
Ot as emitValueAsDateTime,
|
|
2032
|
+
kn as emitValueAsNullableDate,
|
|
2033
|
+
An as emitValueAsNullableDateTime,
|
|
2034
|
+
Pt as emitValueAsNumber,
|
|
2035
|
+
Ur as endInterpolate,
|
|
2036
|
+
qr as getCurrentScope,
|
|
2037
|
+
Gr as getParentScope,
|
|
2038
|
+
Qr as getScopeStack,
|
|
2039
|
+
Ze as getWindow,
|
|
2040
|
+
Jr as guessInterpolate,
|
|
2041
|
+
It as html,
|
|
2042
|
+
Nn as input,
|
|
2043
|
+
Zr as interpolateDate,
|
|
2044
|
+
zr as interpolateNumber,
|
|
2045
|
+
es as interpolateString,
|
|
2046
|
+
Kt as isInputFocused,
|
|
2047
|
+
ts as joinSignals,
|
|
2048
|
+
ns as linear,
|
|
2049
|
+
rs as localStorageProp,
|
|
2050
|
+
Ht as makeProbe,
|
|
2051
|
+
ss as makeProviderMark,
|
|
2052
|
+
Bn as math,
|
|
2053
|
+
wn as mathAttr,
|
|
2054
|
+
is as merge,
|
|
2055
|
+
os as mirrorEasing,
|
|
2030
2056
|
D as on,
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2057
|
+
ls as popScope,
|
|
2058
|
+
cs as previousSignal,
|
|
2059
|
+
as as prop,
|
|
2060
|
+
us as pushScope,
|
|
2061
|
+
Vt as render,
|
|
2036
2062
|
I as renderWithContext,
|
|
2037
2063
|
A as renderableOfTNode,
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2064
|
+
Xt as restoreTempoPlaceholders,
|
|
2065
|
+
ds as reverseEasing,
|
|
2066
|
+
jt as runHeadless,
|
|
2067
|
+
hs as scoped,
|
|
2068
|
+
En as selectedClass,
|
|
2069
|
+
fs as sessionStorageProp,
|
|
2070
|
+
ps as signal,
|
|
2071
|
+
ms as slidingWindowSignal,
|
|
2072
|
+
gs as storedProp,
|
|
2073
|
+
ys as strictEquals,
|
|
2074
|
+
Fn as style,
|
|
2075
|
+
_n as svg,
|
|
2076
|
+
xn as svgAttr,
|
|
2077
|
+
Ts as syncProp,
|
|
2078
|
+
vs as untracked,
|
|
2079
|
+
bs as withScope
|
|
2054
2080
|
};
|