@tempots/dom 24.0.0-next.5 → 24.0.0-next.7
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/headless-context.d.ts +2 -2
- package/index.cjs +1 -1
- package/index.js +901 -766
- package/package.json +1 -1
- package/renderable/render.d.ts +36 -0
package/index.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var $e = Object.defineProperty;
|
|
2
|
+
var te = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const r = Math.max(
|
|
5
|
+
var Ie = (t, e, s) => e in t ? $e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
6
|
+
var o = (t, e, s) => Ie(t, typeof e != "symbol" ? e + "" : e, s), se = (t, e, s) => e.has(t) || te("Cannot " + s);
|
|
7
|
+
var O = (t, e, s) => (se(t, e, "read from private field"), s ? s.call(t) : e.get(t)), re = (t, e, s) => e.has(t) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), Y = (t, e, s, r) => (se(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s);
|
|
8
|
+
const ke = (t, e, s) => t + (e - t) * s;
|
|
9
|
+
const Ne = (t, e, s) => {
|
|
10
|
+
const r = Math.max(t.length, e.length);
|
|
11
11
|
let n = "";
|
|
12
|
-
for (let
|
|
13
|
-
let l =
|
|
12
|
+
for (let i = 0; i < r; i++) {
|
|
13
|
+
let l = t.charCodeAt(i);
|
|
14
14
|
isNaN(l) && (l = 97);
|
|
15
|
-
let c = e.charCodeAt(
|
|
16
|
-
isNaN(c) && (c = 97), n += String.fromCharCode(l + (c - l) *
|
|
15
|
+
let c = e.charCodeAt(i);
|
|
16
|
+
isNaN(c) && (c = 97), n += String.fromCharCode(l + (c - l) * s);
|
|
17
17
|
}
|
|
18
18
|
return n;
|
|
19
|
-
},
|
|
19
|
+
}, Re = (t, e, s) => new Date(t.getTime() + (e.getTime() - t.getTime()) * s), Ve = (t, e) => e, je = (t) => typeof t == "number" ? ke : typeof t == "string" ? Ne : t instanceof Date ? Re : Ve;
|
|
20
20
|
var w;
|
|
21
|
-
class
|
|
21
|
+
class D {
|
|
22
22
|
/**
|
|
23
23
|
* Creates a new instance of `ElementPosition`.
|
|
24
24
|
* @param index - The index of the element.
|
|
25
25
|
* @param total - The total number of elements in the collection.
|
|
26
26
|
*/
|
|
27
|
-
constructor(e,
|
|
27
|
+
constructor(e, s) {
|
|
28
28
|
/**
|
|
29
29
|
* The counter of the element starting from 1.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
o(this, "counter");
|
|
32
32
|
/**
|
|
33
33
|
* Checks if the element is the first element in the collection.
|
|
34
34
|
* @returns `true` if the element is the first element, `false` otherwise.
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
o(this, "isFirst");
|
|
37
37
|
/**
|
|
38
38
|
* Checks if the counter of the element is even.
|
|
39
39
|
* @returns `true` if the counter is even, `false` otherwise.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
o(this, "isEven");
|
|
42
42
|
/**
|
|
43
43
|
* Checks if the counter of the element is odd.
|
|
44
44
|
* @returns `true` if the counter is odd, `false` otherwise.
|
|
45
45
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
o(this, "isOdd");
|
|
47
|
+
re(this, w);
|
|
48
|
+
o(this, "dispose", () => {
|
|
49
|
+
O(this, w) != null && (O(this, w).dispose(), Y(this, w, void 0));
|
|
50
50
|
});
|
|
51
|
-
this.index = e, this.total =
|
|
51
|
+
this.index = e, this.total = s, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Checks if the element is the last element in the collection.
|
|
55
55
|
* @returns `true` if the element is the last element, `false` otherwise.
|
|
56
56
|
*/
|
|
57
57
|
get isLast() {
|
|
58
|
-
return
|
|
58
|
+
return O(this, w) == null && Y(this, w, this.total.map((e) => this.counter === e)), O(this, w);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
w = new WeakMap();
|
|
62
|
-
const
|
|
62
|
+
const M = class M {
|
|
63
63
|
/**
|
|
64
64
|
* Represents a signal with a value of type T.
|
|
65
65
|
*
|
|
@@ -67,37 +67,37 @@ const k = class k {
|
|
|
67
67
|
* @param equals - A function that determines whether two values of type T are equal.
|
|
68
68
|
* @public
|
|
69
69
|
*/
|
|
70
|
-
constructor(e,
|
|
70
|
+
constructor(e, s) {
|
|
71
71
|
/**
|
|
72
72
|
* @internal
|
|
73
73
|
*/
|
|
74
|
-
|
|
74
|
+
o(this, "$__signal__", !0);
|
|
75
75
|
/**
|
|
76
76
|
* @internal
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
o(this, "_value");
|
|
79
79
|
/**
|
|
80
80
|
* @internal
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
o(this, "_derivatives", []);
|
|
83
83
|
/**
|
|
84
84
|
* @internal
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
o(this, "_onValueListeners", []);
|
|
87
87
|
/**
|
|
88
88
|
* @internal
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
o(this, "_onDisposeListeners", []);
|
|
91
91
|
/**
|
|
92
92
|
* Gets the current value of the signal.
|
|
93
93
|
* @returns The current value of the signal.
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
o(this, "get", () => this._value);
|
|
96
96
|
/**
|
|
97
97
|
* Checks if the signal has any registered listeners.
|
|
98
98
|
* @returns `true` if the signal has listeners, `false` otherwise.
|
|
99
99
|
*/
|
|
100
|
-
|
|
100
|
+
o(this, "hasListeners", () => this._onValueListeners.length > 0);
|
|
101
101
|
/**
|
|
102
102
|
* Registers a listener function to be called whenever the value of the signal changes.
|
|
103
103
|
* The listener function will be immediately called with the current value of the signal.
|
|
@@ -105,37 +105,37 @@ const k = class k {
|
|
|
105
105
|
*
|
|
106
106
|
* @param listener - The listener function to be called when the value of the signal changes.
|
|
107
107
|
*/
|
|
108
|
-
|
|
108
|
+
o(this, "on", (e) => (e(this.get()), this._onValueListeners.push(e), () => {
|
|
109
109
|
this._onValueListeners.splice(this._onValueListeners.indexOf(e), 1);
|
|
110
110
|
}));
|
|
111
111
|
/**
|
|
112
112
|
* @internal
|
|
113
113
|
*/
|
|
114
|
-
|
|
114
|
+
o(this, "_setAndNotify", (e, s) => {
|
|
115
115
|
const r = this.equals(this._value, e);
|
|
116
|
-
r || (this._value = e), (
|
|
116
|
+
r || (this._value = e), (s || !r) && this._onValueListeners.forEach((n) => n(e));
|
|
117
117
|
});
|
|
118
118
|
/**
|
|
119
119
|
* @internal
|
|
120
120
|
*/
|
|
121
|
-
|
|
121
|
+
o(this, "_disposed", !1);
|
|
122
122
|
/**
|
|
123
123
|
* Checks whether the signal is disposed.
|
|
124
124
|
* @returns True if the signal is disposed, false otherwise.
|
|
125
125
|
*/
|
|
126
|
-
|
|
126
|
+
o(this, "isDisposed", () => this._disposed);
|
|
127
127
|
/**
|
|
128
128
|
* Adds a listener function to be called when the object is disposed.
|
|
129
129
|
* @param listener - The listener function to be called when the object is disposed.
|
|
130
130
|
* @returns A function that can be called to remove the listener.
|
|
131
131
|
*/
|
|
132
|
-
|
|
132
|
+
o(this, "onDispose", (e) => {
|
|
133
133
|
this._onDisposeListeners.push(e);
|
|
134
134
|
});
|
|
135
135
|
/**
|
|
136
136
|
* Disposes the signal, releasing any resources associated with it.
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
o(this, "dispose", () => {
|
|
139
139
|
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
140
140
|
});
|
|
141
141
|
/**
|
|
@@ -147,14 +147,14 @@ const k = class k {
|
|
|
147
147
|
* @param equals - Optional equality function to determine if two mapped values are equal.
|
|
148
148
|
* @returns - A new Computed instance with the mapped value.
|
|
149
149
|
*/
|
|
150
|
-
|
|
151
|
-
const r = new
|
|
150
|
+
o(this, "map", (e, s = (r, n) => r === n) => {
|
|
151
|
+
const r = new v(() => {
|
|
152
152
|
try {
|
|
153
153
|
return e(this.get());
|
|
154
154
|
} catch (n) {
|
|
155
155
|
throw console.error("Error in Signal.map:", n), n;
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, s);
|
|
158
158
|
return this.setDerivative(r), r;
|
|
159
159
|
});
|
|
160
160
|
/**
|
|
@@ -167,14 +167,14 @@ const k = class k {
|
|
|
167
167
|
* Defaults to a strict equality check (===).
|
|
168
168
|
* @returns A new Signal that emits the values of the resulting Signal.
|
|
169
169
|
*/
|
|
170
|
-
|
|
171
|
-
const r = new
|
|
170
|
+
o(this, "flatMap", (e, s = (r, n) => r === n) => {
|
|
171
|
+
const r = new v(() => {
|
|
172
172
|
try {
|
|
173
173
|
return e(this.get()).get();
|
|
174
174
|
} catch (n) {
|
|
175
175
|
throw console.error("Error in Signal.flatMap:", n), n;
|
|
176
176
|
}
|
|
177
|
-
},
|
|
177
|
+
}, s);
|
|
178
178
|
return this.setDerivative(r), r;
|
|
179
179
|
});
|
|
180
180
|
/**
|
|
@@ -183,26 +183,26 @@ const k = class k {
|
|
|
183
183
|
* @param fn - The callback function to be invoked with the current value of the signal.
|
|
184
184
|
* @returns A new signal that emits the same value as the original signal and invokes the callback function.
|
|
185
185
|
*/
|
|
186
|
-
|
|
186
|
+
o(this, "tap", (e) => this.map((s) => (e(s), s)));
|
|
187
187
|
/**
|
|
188
188
|
* Returns a new Signal that emits the value at the specified key of the current value.
|
|
189
189
|
*
|
|
190
190
|
* @param key - The key of the value to retrieve.
|
|
191
191
|
* @returns A new Signal that emits the value at the specified key.
|
|
192
192
|
*/
|
|
193
|
-
|
|
193
|
+
o(this, "at", (e) => this.map((s) => s[e]));
|
|
194
194
|
/**
|
|
195
195
|
* @internal
|
|
196
196
|
*/
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
let r =
|
|
200
|
-
const n = new
|
|
197
|
+
o(this, "_$");
|
|
198
|
+
o(this, "filter", (e, s) => {
|
|
199
|
+
let r = s ?? this.get();
|
|
200
|
+
const n = new v(() => {
|
|
201
201
|
try {
|
|
202
|
-
const
|
|
203
|
-
return r = e(
|
|
204
|
-
} catch (
|
|
205
|
-
throw console.error("Error in Signal.filter:",
|
|
202
|
+
const i = this.get();
|
|
203
|
+
return r = e(i) ? i : r;
|
|
204
|
+
} catch (i) {
|
|
205
|
+
throw console.error("Error in Signal.filter:", i), i;
|
|
206
206
|
}
|
|
207
207
|
}, this.equals);
|
|
208
208
|
return this.setDerivative(n), n;
|
|
@@ -217,9 +217,9 @@ const k = class k {
|
|
|
217
217
|
* @param equals - Optional equality function to determine if two values are equal.
|
|
218
218
|
* @returns - A new Computed object with the mapped and filtered values.
|
|
219
219
|
*/
|
|
220
|
-
|
|
221
|
-
let n =
|
|
222
|
-
const
|
|
220
|
+
o(this, "filterMap", (e, s, r = (n, i) => n === i) => {
|
|
221
|
+
let n = s;
|
|
222
|
+
const i = new v(() => {
|
|
223
223
|
try {
|
|
224
224
|
const l = this.get(), c = e(l);
|
|
225
225
|
return n = c ?? n;
|
|
@@ -227,7 +227,7 @@ const k = class k {
|
|
|
227
227
|
throw console.error("Error in Signal.filterMap:", l), l;
|
|
228
228
|
}
|
|
229
229
|
}, r);
|
|
230
|
-
return this.setDerivative(
|
|
230
|
+
return this.setDerivative(i), i;
|
|
231
231
|
});
|
|
232
232
|
/**
|
|
233
233
|
* Maps the values emitted by the signal to a new value asynchronously using the provided function.
|
|
@@ -242,25 +242,25 @@ const k = class k {
|
|
|
242
242
|
* @param equals - The equality function to compare the mapped values for equality.
|
|
243
243
|
* @returns A property that holds the mapped value and can be observed for changes.
|
|
244
244
|
*/
|
|
245
|
-
|
|
246
|
-
const
|
|
245
|
+
o(this, "mapAsync", (e, s, r, n = (i, l) => i === l) => {
|
|
246
|
+
const i = N(s, n);
|
|
247
247
|
let l = 0, c = new AbortController();
|
|
248
|
-
return
|
|
248
|
+
return i.onDispose(
|
|
249
249
|
this.on(async (a) => {
|
|
250
|
-
const
|
|
250
|
+
const u = ++l;
|
|
251
251
|
c.abort(), c = new AbortController();
|
|
252
252
|
try {
|
|
253
253
|
const h = await e(a, { abortSignal: c.signal });
|
|
254
|
-
|
|
254
|
+
u === l && i.set(h);
|
|
255
255
|
} catch (h) {
|
|
256
|
-
if (
|
|
256
|
+
if (u === l)
|
|
257
257
|
if (r != null)
|
|
258
|
-
|
|
258
|
+
i.set(r(h));
|
|
259
259
|
else
|
|
260
260
|
throw h;
|
|
261
261
|
}
|
|
262
262
|
})
|
|
263
|
-
),
|
|
263
|
+
), i;
|
|
264
264
|
});
|
|
265
265
|
/**
|
|
266
266
|
* Maps the values of the signal using the provided function `fn`, and returns a new signal
|
|
@@ -272,28 +272,28 @@ const k = class k {
|
|
|
272
272
|
* @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
|
|
273
273
|
* @returns A new signal containing the mapped values.
|
|
274
274
|
*/
|
|
275
|
-
|
|
275
|
+
o(this, "mapMaybe", (e, s) => this.map((r) => e(r) ?? s));
|
|
276
276
|
/**
|
|
277
277
|
* Feeds a property into the signal and sets up disposal behavior.
|
|
278
278
|
* @param prop - The property to feed into the signal.
|
|
279
279
|
* @param autoDisposeProp - Determines whether the property should be automatically disposed when the signal is disposed.
|
|
280
280
|
* @returns The input property.
|
|
281
281
|
*/
|
|
282
|
-
|
|
282
|
+
o(this, "feedProp", (e, s = !1) => {
|
|
283
283
|
const r = this.on(e.set);
|
|
284
|
-
return e.onDispose(r),
|
|
284
|
+
return e.onDispose(r), s ? this.onDispose(e.dispose) : this.onDispose(r), e;
|
|
285
285
|
});
|
|
286
286
|
/**
|
|
287
287
|
* Derives a new property from the current signal.
|
|
288
288
|
* @param autoDisposeProp - Determines whether the derived property should be automatically disposed.
|
|
289
289
|
* @returns The derived property.
|
|
290
290
|
*/
|
|
291
|
-
|
|
291
|
+
o(this, "deriveProp", (e = !0) => this.feedProp(N(this.get()), e));
|
|
292
292
|
/**
|
|
293
293
|
* Returns a signal that emits the count of values received so far.
|
|
294
294
|
* @returns A signal that emits the count of values received so far.
|
|
295
295
|
*/
|
|
296
|
-
|
|
296
|
+
o(this, "count", () => {
|
|
297
297
|
let e = 0;
|
|
298
298
|
return this.map(() => ++e);
|
|
299
299
|
});
|
|
@@ -303,7 +303,7 @@ const k = class k {
|
|
|
303
303
|
* Additionally, when the computed value is disposed, it sets the signal as dirty.
|
|
304
304
|
* @param computed - The computed value to add as a derivative.
|
|
305
305
|
*/
|
|
306
|
-
|
|
306
|
+
o(this, "setDerivative", (e) => {
|
|
307
307
|
this._derivatives.push(e), e.onDispose(() => {
|
|
308
308
|
this._derivatives.splice(
|
|
309
309
|
this._derivatives.indexOf(e),
|
|
@@ -311,7 +311,7 @@ const k = class k {
|
|
|
311
311
|
);
|
|
312
312
|
}), e.onDispose(this.on(e.setDirty)), this.onDispose(e.dispose);
|
|
313
313
|
});
|
|
314
|
-
this.equals =
|
|
314
|
+
this.equals = s, this._value = e;
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
317
317
|
* Gets the value of the signal.
|
|
@@ -326,7 +326,7 @@ const k = class k {
|
|
|
326
326
|
*/
|
|
327
327
|
get $() {
|
|
328
328
|
return this._$ !== void 0 ? this._$ : this._$ = new Proxy(this, {
|
|
329
|
-
get: (e,
|
|
329
|
+
get: (e, s) => this.at(s)
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
332
|
};
|
|
@@ -340,68 +340,68 @@ const k = class k {
|
|
|
340
340
|
* @param equals - A function to compare two values of type O for equality. Defaults to strict equality (===).
|
|
341
341
|
* @returns - A Signal that represents the result of the Promise.
|
|
342
342
|
*/
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
return e.then((l) =>
|
|
346
|
-
r != null ?
|
|
343
|
+
o(M, "ofPromise", (e, s, r, n = (i, l) => i === l) => {
|
|
344
|
+
const i = new M(s, n);
|
|
345
|
+
return e.then((l) => i._setAndNotify(l, !1)).catch((l) => {
|
|
346
|
+
r != null ? i._setAndNotify(r(l), !1) : console.error(
|
|
347
347
|
"Unhandled promise rejection in Signal.ofPromise:",
|
|
348
348
|
l
|
|
349
349
|
);
|
|
350
|
-
}),
|
|
350
|
+
}), i;
|
|
351
351
|
}), /**
|
|
352
352
|
* Checks if a value is a Signal.
|
|
353
353
|
*
|
|
354
354
|
* @param value - The value to check.
|
|
355
355
|
* @returns `true` if the value is a Signal, `false` otherwise.
|
|
356
356
|
*/
|
|
357
|
-
|
|
357
|
+
o(M, "is", (e) => (
|
|
358
358
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
359
359
|
e != null && e.$__signal__ === !0
|
|
360
360
|
));
|
|
361
|
-
let d =
|
|
362
|
-
const
|
|
363
|
-
class
|
|
361
|
+
let d = M;
|
|
362
|
+
const qe = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
363
|
+
class v extends d {
|
|
364
364
|
/**
|
|
365
365
|
* Represents a Signal object.
|
|
366
366
|
* @param _fn - The function that returns the value of the signal.
|
|
367
367
|
* @param equals - The function used to compare two values of type T for equality.
|
|
368
368
|
*/
|
|
369
|
-
constructor(
|
|
369
|
+
constructor(s, r) {
|
|
370
370
|
super(void 0, r);
|
|
371
371
|
/**
|
|
372
372
|
* @internal
|
|
373
373
|
*/
|
|
374
|
-
|
|
374
|
+
o(this, "$__computed__", !0);
|
|
375
375
|
/**
|
|
376
376
|
* @internal
|
|
377
377
|
*/
|
|
378
|
-
|
|
378
|
+
o(this, "_isDirty", !1);
|
|
379
379
|
/**
|
|
380
380
|
* Marks the signal as dirty, indicating that its value has changed and needs to be recalculated.
|
|
381
381
|
* If the signal is already dirty or disposed, this method does nothing.
|
|
382
382
|
* It also marks all dependent signals as dirty and schedules a notification to update their values.
|
|
383
383
|
*/
|
|
384
|
-
|
|
385
|
-
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((
|
|
384
|
+
o(this, "setDirty", () => {
|
|
385
|
+
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((s) => s.setDirty()), this._scheduleNotify());
|
|
386
386
|
});
|
|
387
387
|
/**
|
|
388
388
|
* @internal
|
|
389
389
|
*/
|
|
390
|
-
|
|
390
|
+
o(this, "_scheduleCount", 0);
|
|
391
391
|
/**
|
|
392
392
|
* Schedules a notification to be executed asynchronously.
|
|
393
393
|
* If the signal is dirty, it will be updated and notified.
|
|
394
394
|
* @internal
|
|
395
395
|
*/
|
|
396
|
-
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
this._scheduleCount !==
|
|
396
|
+
o(this, "_scheduleNotify", () => {
|
|
397
|
+
const s = ++this._scheduleCount;
|
|
398
|
+
qe(() => {
|
|
399
|
+
this._scheduleCount !== s || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
|
|
400
400
|
});
|
|
401
401
|
});
|
|
402
402
|
/** {@inheritDoc Signal.get} */
|
|
403
|
-
|
|
404
|
-
this._fn =
|
|
403
|
+
o(this, "get", () => (this._isDirty && (this._isDirty = !1, this._value = this._fn(), this._setAndNotify(this._value, !0)), this._value));
|
|
404
|
+
this._fn = s, this.setDirty();
|
|
405
405
|
}
|
|
406
406
|
/**
|
|
407
407
|
* Checks if a value is an instance of `Computed`.
|
|
@@ -409,35 +409,35 @@ class C extends d {
|
|
|
409
409
|
* @param value - The value to check.
|
|
410
410
|
* @returns `true` if the value is an instance of `Computed`, `false` otherwise.
|
|
411
411
|
*/
|
|
412
|
-
static is(
|
|
413
|
-
return
|
|
412
|
+
static is(s) {
|
|
413
|
+
return s != null && s.$__computed__ === !0;
|
|
414
414
|
}
|
|
415
415
|
/** {@inheritDoc Signal.value} */
|
|
416
416
|
get value() {
|
|
417
417
|
return this.get();
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
const
|
|
420
|
+
const W = class W extends d {
|
|
421
421
|
constructor() {
|
|
422
422
|
super(...arguments);
|
|
423
423
|
/**
|
|
424
424
|
* @internal
|
|
425
425
|
*/
|
|
426
|
-
|
|
426
|
+
o(this, "$__prop__", !0);
|
|
427
427
|
/**
|
|
428
428
|
* Changes the value of the property and notifies its listeners.
|
|
429
429
|
*
|
|
430
430
|
* @param value - The new value of the property.
|
|
431
431
|
*/
|
|
432
|
-
|
|
433
|
-
this._setAndNotify(
|
|
432
|
+
o(this, "set", (s) => {
|
|
433
|
+
this._setAndNotify(s, !1);
|
|
434
434
|
});
|
|
435
435
|
/**
|
|
436
436
|
* Updates the value of the signal by applying the provided function to the current value.
|
|
437
437
|
* @param fn - The function to apply to the current value.
|
|
438
438
|
*/
|
|
439
|
-
|
|
440
|
-
this._setAndNotify(
|
|
439
|
+
o(this, "update", (s) => {
|
|
440
|
+
this._setAndNotify(s(this.get()), !1);
|
|
441
441
|
});
|
|
442
442
|
/**
|
|
443
443
|
* Creates a reducer function that combines the provided reducer function and effects.
|
|
@@ -445,16 +445,16 @@ const R = class R extends d {
|
|
|
445
445
|
* @param effects - An array of effects to be executed after the state is updated.
|
|
446
446
|
* @returns A dispatch function that can be used to update the state and trigger the effects.
|
|
447
447
|
*/
|
|
448
|
-
|
|
448
|
+
o(this, "reducer", (s, ...r) => {
|
|
449
449
|
const n = this;
|
|
450
|
-
return function
|
|
450
|
+
return function i(l) {
|
|
451
451
|
const c = n.value;
|
|
452
|
-
n.update((a) =>
|
|
452
|
+
n.update((a) => s(a, l)), !n.equals(c, n.value) && r.forEach(
|
|
453
453
|
(a) => a({
|
|
454
454
|
previousState: c,
|
|
455
455
|
state: n.value,
|
|
456
456
|
action: l,
|
|
457
|
-
dispatch:
|
|
457
|
+
dispatch: i
|
|
458
458
|
})
|
|
459
459
|
);
|
|
460
460
|
};
|
|
@@ -470,9 +470,9 @@ const R = class R extends d {
|
|
|
470
470
|
* Defaults to a strict equality check (===).
|
|
471
471
|
* @returns A Prop object representing the isomorphism.
|
|
472
472
|
*/
|
|
473
|
-
|
|
474
|
-
const
|
|
475
|
-
return
|
|
473
|
+
o(this, "iso", (s, r, n = (i, l) => i === l) => {
|
|
474
|
+
const i = new W(s(this.get()), n);
|
|
475
|
+
return i.onDispose(this.on((l) => i.set(s(l)))), i.on((l) => this._setAndNotify(r(l), !1)), i;
|
|
476
476
|
});
|
|
477
477
|
/**
|
|
478
478
|
* Returns a `Prop` that represents the value at the specified key of the current value.
|
|
@@ -480,9 +480,9 @@ const R = class R extends d {
|
|
|
480
480
|
* @param key - The key of the value to access.
|
|
481
481
|
* @returns A `Prop` that represents the value at the specified key.
|
|
482
482
|
*/
|
|
483
|
-
|
|
484
|
-
(r) => r[
|
|
485
|
-
(r) => ({ ...this.value, [
|
|
483
|
+
o(this, "atProp", (s) => this.iso(
|
|
484
|
+
(r) => r[s],
|
|
485
|
+
(r) => ({ ...this.value, [s]: r })
|
|
486
486
|
));
|
|
487
487
|
}
|
|
488
488
|
/**
|
|
@@ -491,8 +491,8 @@ const R = class R extends d {
|
|
|
491
491
|
get value() {
|
|
492
492
|
return this.get();
|
|
493
493
|
}
|
|
494
|
-
set value(
|
|
495
|
-
this._setAndNotify(
|
|
494
|
+
set value(s) {
|
|
495
|
+
this._setAndNotify(s, !1);
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
/**
|
|
@@ -500,15 +500,15 @@ const R = class R extends d {
|
|
|
500
500
|
* @param value - The value to check.
|
|
501
501
|
* @returns `true` if the value is a Prop, `false` otherwise.
|
|
502
502
|
*/
|
|
503
|
-
|
|
503
|
+
o(W, "is", (s) => (
|
|
504
504
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
505
|
-
|
|
505
|
+
s != null && s.$__prop__ === !0
|
|
506
506
|
));
|
|
507
|
-
let
|
|
508
|
-
const
|
|
509
|
-
const r = new
|
|
507
|
+
let k = W;
|
|
508
|
+
const Q = (t, e, s = (r, n) => r === n) => {
|
|
509
|
+
const r = new v(t, s);
|
|
510
510
|
return e.forEach((n) => n.setDerivative(r)), r;
|
|
511
|
-
},
|
|
511
|
+
}, Be = (t, e) => Q(t, e).dispose, N = (t, e = (s, r) => s === r) => new k(t, e), J = (t, e = (s, r) => s === r) => new d(t, e), ie = () => typeof window < "u" ? window : void 0, p = {
|
|
512
512
|
/**
|
|
513
513
|
* Maps a value or a Signal to a new value.
|
|
514
514
|
* If the value is a Signal, it returns a new Signal with the mapped value.
|
|
@@ -520,7 +520,7 @@ const G = (s, e, t = (r, n) => r === n) => {
|
|
|
520
520
|
* @param fn - The function to map the value.
|
|
521
521
|
* @returns The mapped value.
|
|
522
522
|
*/
|
|
523
|
-
map: (
|
|
523
|
+
map: (t, e) => d.is(t) ? t.map(e) : e(t),
|
|
524
524
|
/**
|
|
525
525
|
* Wraps a value or a Signal instance into a Signal.
|
|
526
526
|
* If the value is already a Signal, it returns the value itself.
|
|
@@ -531,30 +531,30 @@ const G = (s, e, t = (r, n) => r === n) => {
|
|
|
531
531
|
* @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
|
|
532
532
|
* @returns A Signal instance.
|
|
533
533
|
*/
|
|
534
|
-
toSignal: (
|
|
534
|
+
toSignal: (t, e) => d.is(t) ? t : J(t, e),
|
|
535
535
|
/**
|
|
536
536
|
* Wraps a value in a `Signal` if it is not already a `Signal`.
|
|
537
537
|
* If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
|
|
538
538
|
* @param value - The value to wrap or check.
|
|
539
539
|
* @returns The wrapped value if it is not `null` or `undefined`, otherwise `null` or `undefined`.
|
|
540
540
|
*/
|
|
541
|
-
maybeToSignal: (
|
|
542
|
-
if (
|
|
543
|
-
return p.toSignal(
|
|
541
|
+
maybeToSignal: (t, e) => {
|
|
542
|
+
if (t != null)
|
|
543
|
+
return p.toSignal(t, e);
|
|
544
544
|
},
|
|
545
545
|
/**
|
|
546
546
|
* Gets the value from a `Signal` or the value itself if it is not a `Signal`.
|
|
547
547
|
* @param value - The value or Signal instance to get the value from.
|
|
548
548
|
* @returns The value.
|
|
549
549
|
*/
|
|
550
|
-
get: (
|
|
550
|
+
get: (t) => d.is(t) ? t.get() : t,
|
|
551
551
|
/**
|
|
552
552
|
* Adds a listener to a `Signal` or calls the listener immediately if it is not a `Signal`.
|
|
553
553
|
* @param value - The value or Signal instance to add the listener to.
|
|
554
554
|
* @param listener - The listener to call when the value changes.
|
|
555
555
|
* @returns A function to remove the listener.
|
|
556
556
|
*/
|
|
557
|
-
on: (
|
|
557
|
+
on: (t, e) => d.is(t) ? t.on(e) : (e(t), () => {
|
|
558
558
|
}),
|
|
559
559
|
/**
|
|
560
560
|
* Disposes of a value or a Signal.
|
|
@@ -562,109 +562,109 @@ const G = (s, e, t = (r, n) => r === n) => {
|
|
|
562
562
|
* If the value is not a Signal, it does nothing.
|
|
563
563
|
* @param value - The value or Signal instance to dispose of.
|
|
564
564
|
*/
|
|
565
|
-
dispose: (
|
|
566
|
-
d.is(
|
|
565
|
+
dispose: (t) => {
|
|
566
|
+
d.is(t) && t.dispose();
|
|
567
567
|
}
|
|
568
|
-
},
|
|
569
|
-
const r =
|
|
570
|
-
return
|
|
571
|
-
() => e(...
|
|
568
|
+
}, $t = (...t) => (e, s) => {
|
|
569
|
+
const r = t.filter((n) => d.is(n));
|
|
570
|
+
return Q(
|
|
571
|
+
() => e(...t.map((n) => p.get(n))),
|
|
572
572
|
r,
|
|
573
|
-
|
|
573
|
+
s
|
|
574
574
|
);
|
|
575
|
-
},
|
|
576
|
-
const
|
|
577
|
-
|
|
575
|
+
}, It = (...t) => (e) => {
|
|
576
|
+
const s = t.filter((r) => d.is(r));
|
|
577
|
+
Be(() => e(...t.map(p.get)), s);
|
|
578
578
|
};
|
|
579
|
-
class
|
|
579
|
+
class oe {
|
|
580
580
|
constructor() {
|
|
581
|
-
|
|
581
|
+
o(this, "_store", /* @__PURE__ */ new Map());
|
|
582
582
|
/**
|
|
583
583
|
* Retrieves the value associated with the specified key from the memory store.
|
|
584
584
|
* @param key - The key to retrieve the value for.
|
|
585
585
|
* @returns The value associated with the key, or `null` if the key is not found.
|
|
586
586
|
*/
|
|
587
|
-
|
|
587
|
+
o(this, "getItem", (e) => this._store.get(e) ?? null);
|
|
588
588
|
/**
|
|
589
589
|
* Sets the value associated with the specified key in the memory store.
|
|
590
590
|
* @param key - The key to set the value for.
|
|
591
591
|
* @param value - The value to set.
|
|
592
592
|
*/
|
|
593
|
-
|
|
594
|
-
this._store.set(e,
|
|
593
|
+
o(this, "setItem", (e, s) => {
|
|
594
|
+
this._store.set(e, s);
|
|
595
595
|
});
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
const
|
|
599
|
-
key:
|
|
598
|
+
const le = ({
|
|
599
|
+
key: t,
|
|
600
600
|
defaultValue: e,
|
|
601
|
-
store:
|
|
601
|
+
store: s,
|
|
602
602
|
serialize: r = JSON.stringify,
|
|
603
603
|
deserialize: n = JSON.parse,
|
|
604
|
-
equals:
|
|
604
|
+
equals: i = (c, a) => c === a,
|
|
605
605
|
onLoad: l = (c) => c
|
|
606
606
|
}) => {
|
|
607
|
-
const c =
|
|
607
|
+
const c = s.getItem(t), a = new k(
|
|
608
608
|
c != null ? l(n(c)) : typeof e == "function" ? e() : e,
|
|
609
|
-
|
|
609
|
+
i
|
|
610
610
|
);
|
|
611
|
-
return a.on((
|
|
612
|
-
|
|
611
|
+
return a.on((u) => {
|
|
612
|
+
s.setItem(t, r(u));
|
|
613
613
|
}), a;
|
|
614
|
-
},
|
|
614
|
+
}, kt = (t) => {
|
|
615
615
|
var e;
|
|
616
|
-
return
|
|
617
|
-
...
|
|
618
|
-
store: ((e =
|
|
616
|
+
return le({
|
|
617
|
+
...t,
|
|
618
|
+
store: ((e = ie()) == null ? void 0 : e.localStorage) ?? new oe()
|
|
619
619
|
});
|
|
620
|
-
},
|
|
620
|
+
}, Nt = (t) => {
|
|
621
621
|
var e;
|
|
622
|
-
return
|
|
623
|
-
...
|
|
624
|
-
store: ((e =
|
|
622
|
+
return le({
|
|
623
|
+
...t,
|
|
624
|
+
store: ((e = ie()) == null ? void 0 : e.sessionStorage) ?? new oe()
|
|
625
625
|
});
|
|
626
626
|
};
|
|
627
|
-
function
|
|
628
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(
|
|
627
|
+
function ne(t) {
|
|
628
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
629
629
|
}
|
|
630
|
-
const
|
|
631
|
-
const n = (r == null ? void 0 : r.duration) ?? 300,
|
|
632
|
-
let c = r == null ? void 0 : r.interpolate, a =
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
}),
|
|
637
|
-
|
|
630
|
+
const Fe = (t, e, s, r) => {
|
|
631
|
+
const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((T) => T), l = (r == null ? void 0 : r.equals) ?? ((T, I) => T === I);
|
|
632
|
+
let c = r == null ? void 0 : r.interpolate, a = t, u = e(), h = performance.now(), m = null, S = !0;
|
|
633
|
+
const X = new v(e, l), b = N(t, l);
|
|
634
|
+
b.onDispose(() => {
|
|
635
|
+
m !== null && cancelAnimationFrame(m);
|
|
636
|
+
}), b.onDispose(X.dispose), s.forEach((T) => {
|
|
637
|
+
T.setDerivative(X), T.onDispose(b.dispose);
|
|
638
638
|
});
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
},
|
|
642
|
-
const
|
|
643
|
-
c == null && (c =
|
|
644
|
-
let
|
|
645
|
-
|
|
639
|
+
const Me = (T) => {
|
|
640
|
+
u = T, h = performance.now(), a = b.value, S && (S = !1, m = ne(K));
|
|
641
|
+
}, K = () => {
|
|
642
|
+
const I = (performance.now() - h) / p.get(n), He = i(I);
|
|
643
|
+
c == null && (c = je(a));
|
|
644
|
+
let ee = c(a, u, He);
|
|
645
|
+
I >= 1 ? (S = !0, ee = u) : m = ne(K), b.set(ee);
|
|
646
646
|
};
|
|
647
|
-
return
|
|
648
|
-
},
|
|
649
|
-
const { initialValue:
|
|
650
|
-
return
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
[
|
|
647
|
+
return X.on(Me), b;
|
|
648
|
+
}, Rt = (t, e) => {
|
|
649
|
+
const { initialValue: s, ...r } = e ?? {};
|
|
650
|
+
return Fe(
|
|
651
|
+
s ?? t.get(),
|
|
652
|
+
t.get,
|
|
653
|
+
[t],
|
|
654
654
|
r
|
|
655
655
|
);
|
|
656
|
-
},
|
|
657
|
-
const { signals:
|
|
658
|
-
({ signals:
|
|
656
|
+
}, Vt = (t, e) => {
|
|
657
|
+
const { signals: s, literals: r } = Object.entries(t).reduce(
|
|
658
|
+
({ signals: i, literals: l }, [c, a]) => (d.is(a) ? i.push([c, a]) : l[c] = a, { signals: i, literals: l }),
|
|
659
659
|
{ signals: [], literals: {} }
|
|
660
|
-
), n =
|
|
661
|
-
return
|
|
662
|
-
},
|
|
660
|
+
), n = s.map(([, i]) => i);
|
|
661
|
+
return Q(() => (s.forEach(([i, l]) => r[i] = l.value), e(r)), n);
|
|
662
|
+
}, ce = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), ae = /* @__PURE__ */ new Set([
|
|
663
663
|
"rowSpan",
|
|
664
664
|
"colSpan",
|
|
665
665
|
"tabIndex",
|
|
666
666
|
"valueAsNumber"
|
|
667
|
-
]),
|
|
667
|
+
]), ue = /* @__PURE__ */ new Set(["valueAsDate"]), he = /* @__PURE__ */ new Set([
|
|
668
668
|
"value",
|
|
669
669
|
"textContent",
|
|
670
670
|
"innerText",
|
|
@@ -672,26 +672,26 @@ const Ie = (s, e, t, r) => {
|
|
|
672
672
|
"outerHTML",
|
|
673
673
|
"className",
|
|
674
674
|
"classList"
|
|
675
|
-
]),
|
|
676
|
-
|
|
677
|
-
} :
|
|
678
|
-
|
|
679
|
-
} :
|
|
680
|
-
|
|
681
|
-
} :
|
|
682
|
-
|
|
683
|
-
} : (
|
|
684
|
-
|
|
685
|
-
},
|
|
686
|
-
const e =
|
|
687
|
-
e && e.onblur && (e.onblur = null), !(!
|
|
688
|
-
},
|
|
689
|
-
class
|
|
675
|
+
]), Ue = (t, e) => ce.has(t) ? (s) => {
|
|
676
|
+
s == null ? e[t] = null : e[t] = !!s;
|
|
677
|
+
} : ae.has(t) ? (s) => {
|
|
678
|
+
s == null ? e[t] = null : e[t] = Number(s);
|
|
679
|
+
} : ue.has(t) ? (s) => {
|
|
680
|
+
s == null ? e[t] = null : e[t] = s;
|
|
681
|
+
} : he.has(t) ? (s) => {
|
|
682
|
+
s == null ? e[t] = null : e[t] = String(s);
|
|
683
|
+
} : (s) => {
|
|
684
|
+
s == null ? e.removeAttribute(t) : e.setAttribute(t, s);
|
|
685
|
+
}, We = (t, e) => ce.has(t) ? () => !!e[t] : ae.has(t) ? () => Number(e[t]) : ue.has(t) ? () => e[t] : he.has(t) ? () => String(e[t]) : () => e.getAttribute(t), R = (t) => {
|
|
686
|
+
const e = t;
|
|
687
|
+
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
|
|
688
|
+
}, Je = (t) => fe(t) ? t : t.parentElement, fe = (t) => t.nodeType === 1;
|
|
689
|
+
class de extends Error {
|
|
690
690
|
constructor(e) {
|
|
691
691
|
super(`Provider not found: ${e.description}`);
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
-
class
|
|
694
|
+
class P {
|
|
695
695
|
/**
|
|
696
696
|
* Constructs a new `DOMContext` instance.
|
|
697
697
|
*
|
|
@@ -701,7 +701,7 @@ class b {
|
|
|
701
701
|
* @param providers - The `Providers` instance associated with this context.
|
|
702
702
|
* @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
|
|
703
703
|
*/
|
|
704
|
-
constructor(e,
|
|
704
|
+
constructor(e, s, r, n) {
|
|
705
705
|
/**
|
|
706
706
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
|
|
707
707
|
*
|
|
@@ -709,7 +709,7 @@ class b {
|
|
|
709
709
|
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
710
710
|
* @returns The newly created element.
|
|
711
711
|
*/
|
|
712
|
-
|
|
712
|
+
o(this, "createElement", (e, s) => s !== void 0 ? this.document.createElementNS(s, e) : this.document.createElement(e));
|
|
713
713
|
/**
|
|
714
714
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace and appends it to the current element.
|
|
715
715
|
*
|
|
@@ -717,8 +717,8 @@ class b {
|
|
|
717
717
|
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
718
718
|
* @returns The newly created element.
|
|
719
719
|
*/
|
|
720
|
-
|
|
721
|
-
const r = this.createElement(e,
|
|
720
|
+
o(this, "makeChildElement", (e, s) => {
|
|
721
|
+
const r = this.createElement(e, s);
|
|
722
722
|
return this.appendOrInsert(r), this.withElement(r);
|
|
723
723
|
});
|
|
724
724
|
/**
|
|
@@ -726,28 +726,28 @@ class b {
|
|
|
726
726
|
* @param text - The text content for the new text node.
|
|
727
727
|
* @returns A new `Text` node with the specified text content.
|
|
728
728
|
*/
|
|
729
|
-
|
|
729
|
+
o(this, "createText", (e) => this.document.createTextNode(e));
|
|
730
730
|
/**
|
|
731
731
|
* Creates a new text node with the specified text content and appends it to the current element.
|
|
732
732
|
* @param text - The text content for the new text node.
|
|
733
733
|
* @returns A new `DOMContext` with a reference to the new text node.
|
|
734
734
|
*/
|
|
735
|
-
|
|
736
|
-
const
|
|
737
|
-
return this.appendOrInsert(
|
|
735
|
+
o(this, "makeChildText", (e) => {
|
|
736
|
+
const s = this.createText(e);
|
|
737
|
+
return this.appendOrInsert(s), this.withReference(s);
|
|
738
738
|
});
|
|
739
739
|
/**
|
|
740
740
|
* Sets the text content of the current element.
|
|
741
741
|
* @param text - The text content to set.
|
|
742
742
|
*/
|
|
743
|
-
|
|
743
|
+
o(this, "setText", (e) => {
|
|
744
744
|
this.reference.nodeValue = e;
|
|
745
745
|
});
|
|
746
746
|
/**
|
|
747
747
|
* Gets the text content of the current element or text node.
|
|
748
748
|
* @returns The text content of the current element or text node.
|
|
749
749
|
*/
|
|
750
|
-
|
|
750
|
+
o(this, "getText", () => {
|
|
751
751
|
var e;
|
|
752
752
|
return ((e = this.reference) == null ? void 0 : e.nodeValue) ?? this.element.textContent ?? "";
|
|
753
753
|
});
|
|
@@ -756,7 +756,7 @@ class b {
|
|
|
756
756
|
* The text node is appended or inserted to the current `DOMContext`.
|
|
757
757
|
* The new `DOMContext` with the reference is returned.
|
|
758
758
|
*/
|
|
759
|
-
|
|
759
|
+
o(this, "makeRef", () => {
|
|
760
760
|
const e = this.createText("");
|
|
761
761
|
return this.appendOrInsert(e), this.withReference(e);
|
|
762
762
|
});
|
|
@@ -765,7 +765,7 @@ class b {
|
|
|
765
765
|
*
|
|
766
766
|
* @param child - The child node to append or insert.
|
|
767
767
|
*/
|
|
768
|
-
|
|
768
|
+
o(this, "appendOrInsert", (e) => {
|
|
769
769
|
this.reference === void 0 ? this.element.appendChild(e) : this.element.insertBefore(e, this.reference);
|
|
770
770
|
});
|
|
771
771
|
/**
|
|
@@ -773,17 +773,17 @@ class b {
|
|
|
773
773
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
774
774
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
775
775
|
*/
|
|
776
|
-
|
|
776
|
+
o(this, "withElement", (e) => new P(this.document, e, void 0, this.providers));
|
|
777
777
|
/**
|
|
778
778
|
* Creates a new `DOMContext` instance with a reference to a DOM element selected by the provided `selector`.
|
|
779
779
|
* @param selector - The CSS selector for the target DOM element.
|
|
780
780
|
* @returns A new `DOMContext` instance with a reference to the selected DOM element.
|
|
781
781
|
*/
|
|
782
|
-
|
|
783
|
-
const
|
|
784
|
-
if (
|
|
782
|
+
o(this, "makePortal", (e) => {
|
|
783
|
+
const s = this.document.querySelector(e);
|
|
784
|
+
if (s == null)
|
|
785
785
|
throw new Error(`Cannot find element by selector for portal: ${e}`);
|
|
786
|
-
return this.withElement(
|
|
786
|
+
return this.withElement(s);
|
|
787
787
|
});
|
|
788
788
|
/**
|
|
789
789
|
* Creates a new `DOMContext` instance with the specified reference.
|
|
@@ -791,7 +791,7 @@ class b {
|
|
|
791
791
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
792
792
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
793
793
|
*/
|
|
794
|
-
|
|
794
|
+
o(this, "withReference", (e) => new P(this.document, this.element, e, this.providers));
|
|
795
795
|
/**
|
|
796
796
|
* Returns a new HTMLDOMContext instance with the specified providers merged into
|
|
797
797
|
* the existing providers.
|
|
@@ -799,7 +799,7 @@ class b {
|
|
|
799
799
|
* @param providers - An object containing the providers to be merged into the existing providers.
|
|
800
800
|
* @returns A new HTMLDOMContext instance with the merged providers.
|
|
801
801
|
*/
|
|
802
|
-
|
|
802
|
+
o(this, "withProviders", (e) => new P(this.document, this.element, this.reference, {
|
|
803
803
|
...this.providers,
|
|
804
804
|
...e
|
|
805
805
|
}));
|
|
@@ -810,71 +810,71 @@ class b {
|
|
|
810
810
|
* @returns The provider for the given mark.
|
|
811
811
|
* @throws Throws `ProviderNotFoundError` if the provider for the given mark is not found.
|
|
812
812
|
*/
|
|
813
|
-
|
|
813
|
+
o(this, "getProvider", (e) => {
|
|
814
814
|
if (this.providers[e] === void 0)
|
|
815
|
-
throw new
|
|
815
|
+
throw new de(e);
|
|
816
816
|
return this.providers[e];
|
|
817
817
|
});
|
|
818
|
-
|
|
819
|
-
e && (this.reference !== void 0 ?
|
|
818
|
+
o(this, "clear", (e) => {
|
|
819
|
+
e && (this.reference !== void 0 ? R(this.reference) : R(this.element));
|
|
820
820
|
});
|
|
821
821
|
/**
|
|
822
822
|
* Adds classes to the element.
|
|
823
823
|
* @param tokens - The class names to add.
|
|
824
824
|
*/
|
|
825
|
-
|
|
825
|
+
o(this, "addClasses", (e) => {
|
|
826
826
|
this.element.classList.add(...e);
|
|
827
827
|
});
|
|
828
828
|
/**
|
|
829
829
|
* Removes classes from the element.
|
|
830
830
|
* @param tokens - The class names to remove.
|
|
831
831
|
*/
|
|
832
|
-
|
|
832
|
+
o(this, "removeClasses", (e) => {
|
|
833
833
|
this.element.classList.remove(...e);
|
|
834
834
|
});
|
|
835
835
|
/**
|
|
836
836
|
* Gets the classes of the element.
|
|
837
837
|
* @returns The classes of the element.
|
|
838
838
|
*/
|
|
839
|
-
|
|
839
|
+
o(this, "getClasses", () => Array.from(this.element.classList));
|
|
840
840
|
/**
|
|
841
841
|
* Adds an event listener to the element.
|
|
842
842
|
* @param event - The event to listen for.
|
|
843
843
|
* @param listener - The listener to call when the event occurs.
|
|
844
844
|
* @returns A function to remove the event listener.
|
|
845
845
|
*/
|
|
846
|
-
|
|
847
|
-
r && this.element.removeEventListener(e,
|
|
846
|
+
o(this, "on", (e, s) => (this.element.addEventListener(e, s), (r) => {
|
|
847
|
+
r && this.element.removeEventListener(e, s);
|
|
848
848
|
}));
|
|
849
849
|
/**
|
|
850
850
|
* Returns `true` if the context is a browser DOM context.
|
|
851
851
|
* @returns `true` if the context is a browser DOM context.
|
|
852
852
|
*/
|
|
853
|
-
|
|
853
|
+
o(this, "isBrowserDOM", () => !0);
|
|
854
854
|
/**
|
|
855
855
|
* Returns `true` if the context is a headless DOM context.
|
|
856
856
|
* @returns `true` if the context is a headless DOM context.
|
|
857
857
|
*/
|
|
858
|
-
|
|
858
|
+
o(this, "isHeadlessDOM", () => !1);
|
|
859
859
|
/**
|
|
860
860
|
* Sets the style of the element.
|
|
861
861
|
* @param name - The name of the style to set.
|
|
862
862
|
* @param value - The value of the style to set.
|
|
863
863
|
*/
|
|
864
|
-
|
|
865
|
-
this.element.style.setProperty(e,
|
|
864
|
+
o(this, "setStyle", (e, s) => {
|
|
865
|
+
this.element.style.setProperty(e, s);
|
|
866
866
|
});
|
|
867
867
|
/**
|
|
868
868
|
* Gets the style of the element.
|
|
869
869
|
* @param name - The name of the style to get.
|
|
870
870
|
* @returns The value of the style.
|
|
871
871
|
*/
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
get:
|
|
875
|
-
set:
|
|
872
|
+
o(this, "getStyle", (e) => this.element.style.getPropertyValue(e));
|
|
873
|
+
o(this, "makeAccessors", (e) => ({
|
|
874
|
+
get: We(e, this.element),
|
|
875
|
+
set: Ue(e, this.element)
|
|
876
876
|
}));
|
|
877
|
-
this.document = e, this.element =
|
|
877
|
+
this.document = e, this.element = s, this.reference = r, this.providers = n;
|
|
878
878
|
}
|
|
879
879
|
/**
|
|
880
880
|
* Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
|
|
@@ -883,256 +883,412 @@ class b {
|
|
|
883
883
|
* @param ref - An optional reference `Node` to associate with the `DOMContext`.
|
|
884
884
|
* @returns A new `DOMContext` instance.
|
|
885
885
|
*/
|
|
886
|
-
static of(e,
|
|
887
|
-
return new
|
|
886
|
+
static of(e, s) {
|
|
887
|
+
return new P(e.ownerDocument, e, s, {});
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
const
|
|
891
|
-
|
|
890
|
+
const Z = (t, e) => {
|
|
891
|
+
const s = t(e);
|
|
892
|
+
return () => s(!0);
|
|
893
|
+
}, jt = (t, e, { doc: s, clear: r } = {}) => {
|
|
894
|
+
const n = typeof e == "string" ? (s ?? document).querySelector(e) : e;
|
|
895
|
+
if (n === null)
|
|
896
|
+
throw new Ge(
|
|
897
|
+
`Cannot find element by selector for render: ${e}`
|
|
898
|
+
);
|
|
899
|
+
r !== !1 && (s ?? n.ownerDocument) != null && n.nodeType === 1 && (n.innerHTML = "");
|
|
900
|
+
const i = Je(n), l = fe(n) ? void 0 : n, c = P.of(i, l);
|
|
901
|
+
return Z(t, c);
|
|
902
|
+
}, qt = (t, {
|
|
903
|
+
startUrl: e = "https://example.com",
|
|
904
|
+
selector: s = ":root"
|
|
905
|
+
} = {}) => {
|
|
906
|
+
const r = p.toSignal(e).deriveProp(), n = new ye(s, void 0), i = new x(n, void 0, { currentURL: r }, {});
|
|
907
|
+
return {
|
|
908
|
+
clear: Z(t(), i),
|
|
909
|
+
root: n,
|
|
910
|
+
currentURL: r
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
class Ge extends Error {
|
|
914
|
+
constructor(e) {
|
|
915
|
+
super(e);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
const pe = "data-tts-node", V = "data-tts-class", j = "data-tts-style", q = "data-tts-html", B = "data-tts-text", F = "data-tts-attrs";
|
|
919
|
+
class Bt {
|
|
920
|
+
constructor({
|
|
921
|
+
select: e,
|
|
922
|
+
getAttribute: s,
|
|
923
|
+
setAttribute: r,
|
|
924
|
+
getClass: n,
|
|
925
|
+
setClass: i,
|
|
926
|
+
getStyles: l,
|
|
927
|
+
setStyles: c,
|
|
928
|
+
appendHTML: a,
|
|
929
|
+
getInnerHTML: u,
|
|
930
|
+
setInnerHTML: h,
|
|
931
|
+
getInnerText: m,
|
|
932
|
+
setInnerText: S
|
|
933
|
+
}) {
|
|
934
|
+
o(this, "select");
|
|
935
|
+
o(this, "getAttribute");
|
|
936
|
+
o(this, "setAttribute");
|
|
937
|
+
o(this, "getClass");
|
|
938
|
+
o(this, "setClass");
|
|
939
|
+
o(this, "getStyles");
|
|
940
|
+
o(this, "setStyles");
|
|
941
|
+
o(this, "appendHTML");
|
|
942
|
+
o(this, "getInnerHTML");
|
|
943
|
+
o(this, "setInnerHTML");
|
|
944
|
+
o(this, "getInnerText");
|
|
945
|
+
o(this, "setInnerText");
|
|
946
|
+
o(this, "setFromRoot", (e, s) => {
|
|
947
|
+
e.getPortals().forEach((n) => {
|
|
948
|
+
const i = this.select(n.selector)[0];
|
|
949
|
+
if (i == null)
|
|
950
|
+
throw new Error(
|
|
951
|
+
`Cannot find element by selector for render: ${n.selector}`
|
|
952
|
+
);
|
|
953
|
+
if (n.hasChildren() && this.appendHTML(i, n.contentToHTML(s)), n.hasInnerHTML()) {
|
|
954
|
+
if (s) {
|
|
955
|
+
const l = this.getInnerHTML(i);
|
|
956
|
+
l != null && this.setAttribute(i, q, l);
|
|
957
|
+
}
|
|
958
|
+
this.setInnerHTML(i, n.getInnerHTML());
|
|
959
|
+
}
|
|
960
|
+
if (n.hasInnerText()) {
|
|
961
|
+
if (s) {
|
|
962
|
+
const l = this.getInnerText(i);
|
|
963
|
+
l != null && this.setAttribute(i, B, l);
|
|
964
|
+
}
|
|
965
|
+
this.setInnerText(i, n.getInnerText());
|
|
966
|
+
}
|
|
967
|
+
if (n.hasClasses()) {
|
|
968
|
+
if (s) {
|
|
969
|
+
const l = this.getClass(i);
|
|
970
|
+
l != null && this.setAttribute(i, V, l);
|
|
971
|
+
}
|
|
972
|
+
this.setClass(i, n.getClasses().join(" "));
|
|
973
|
+
}
|
|
974
|
+
if (n.hasStyles()) {
|
|
975
|
+
if (s) {
|
|
976
|
+
const l = this.getStyles(i);
|
|
977
|
+
l != null && this.setAttribute(
|
|
978
|
+
i,
|
|
979
|
+
j,
|
|
980
|
+
JSON.stringify(l)
|
|
981
|
+
);
|
|
982
|
+
}
|
|
983
|
+
this.setStyles(i, n.getStyles());
|
|
984
|
+
}
|
|
985
|
+
if (n.hasAttributes()) {
|
|
986
|
+
const l = n.getAttributes();
|
|
987
|
+
if (s) {
|
|
988
|
+
const c = [];
|
|
989
|
+
l.forEach(([a]) => {
|
|
990
|
+
const u = this.getAttribute(i, a);
|
|
991
|
+
u != null && c.push([a, u]);
|
|
992
|
+
}), this.setAttribute(
|
|
993
|
+
i,
|
|
994
|
+
F,
|
|
995
|
+
JSON.stringify(Object.fromEntries(c))
|
|
996
|
+
);
|
|
997
|
+
}
|
|
998
|
+
l.forEach(([c, a]) => {
|
|
999
|
+
this.setAttribute(i, c, a);
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
});
|
|
1004
|
+
this.select = e, this.getAttribute = s, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = a, this.getInnerHTML = u, this.setInnerHTML = h, this.getInnerText = m, this.setInnerText = S;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
const ze = () => {
|
|
1008
|
+
document.querySelectorAll(`[${pe}]`).forEach(R);
|
|
1009
|
+
}, Xe = (t) => {
|
|
1010
|
+
const e = t.getAttribute(V);
|
|
1011
|
+
t.removeAttribute(V), e != null && t.setAttribute("class", e);
|
|
1012
|
+
}, Ye = () => {
|
|
1013
|
+
document.querySelectorAll(`[${V}]`).forEach((e) => Xe(e));
|
|
1014
|
+
}, Qe = (t) => {
|
|
1015
|
+
const e = t.getAttribute(q);
|
|
1016
|
+
t.removeAttribute(q), e != null && (t.innerHTML = e);
|
|
1017
|
+
}, Ze = () => {
|
|
1018
|
+
document.querySelectorAll(`[${q}]`).forEach((e) => Qe(e));
|
|
1019
|
+
}, Ke = (t) => {
|
|
1020
|
+
const e = t.getAttribute(B);
|
|
1021
|
+
t.removeAttribute(B), e != null && (t.innerText = e);
|
|
1022
|
+
}, et = () => {
|
|
1023
|
+
document.querySelectorAll(`[${B}]`).forEach((e) => Ke(e));
|
|
1024
|
+
}, tt = (t) => {
|
|
1025
|
+
const e = t.getAttribute(j);
|
|
1026
|
+
if (t.removeAttribute(j), e != null) {
|
|
1027
|
+
const s = JSON.parse(e);
|
|
1028
|
+
Object.entries(s).forEach(([r, n]) => {
|
|
1029
|
+
t.style.setProperty(r, n);
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
}, st = () => {
|
|
1033
|
+
document.querySelectorAll(`[${j}]`).forEach((e) => tt(e));
|
|
1034
|
+
}, rt = (t) => {
|
|
1035
|
+
const e = t.getAttribute(F);
|
|
1036
|
+
if (t.removeAttribute(F), e != null) {
|
|
1037
|
+
const s = JSON.parse(e);
|
|
1038
|
+
Object.entries(s).forEach(([r, n]) => {
|
|
1039
|
+
n == null ? t.removeAttribute(r) : t.setAttribute(r, n);
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
}, nt = () => {
|
|
1043
|
+
document.querySelectorAll(`[${F}]`).forEach((e) => rt(e));
|
|
1044
|
+
}, Ft = () => {
|
|
1045
|
+
ze(), Ye(), et(), Ze(), st(), nt();
|
|
1046
|
+
}, y = Symbol("class"), _ = Symbol("style"), E = Symbol("handler"), ge = () => Math.random().toString(36).substring(2, 15), it = (t) => t.replace(/<[^>]*>?/g, "");
|
|
1047
|
+
class me {
|
|
892
1048
|
constructor(e) {
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
const
|
|
901
|
-
|
|
1049
|
+
o(this, "id", ge());
|
|
1050
|
+
o(this, "properties", {});
|
|
1051
|
+
o(this, "children", []);
|
|
1052
|
+
o(this, "isElement", () => !0);
|
|
1053
|
+
o(this, "isText", () => !1);
|
|
1054
|
+
o(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? it(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
|
|
1055
|
+
o(this, "removeChild", (e) => {
|
|
1056
|
+
const s = this.children.indexOf(e);
|
|
1057
|
+
s !== -1 && this.children.splice(s, 1);
|
|
902
1058
|
});
|
|
903
|
-
|
|
1059
|
+
o(this, "remove", () => {
|
|
904
1060
|
if (this.parent != null)
|
|
905
1061
|
this.parent.removeChild(this);
|
|
906
1062
|
else
|
|
907
1063
|
throw new Error("Parent is undefined");
|
|
908
1064
|
});
|
|
909
|
-
|
|
910
|
-
const e = this.elements().flatMap((
|
|
1065
|
+
o(this, "getPortals", () => {
|
|
1066
|
+
const e = this.elements().flatMap((s) => s.isPortal() ? [s, ...s.getPortals()] : s.getPortals());
|
|
911
1067
|
return this.isPortal() && e.unshift(this), e;
|
|
912
1068
|
});
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1069
|
+
o(this, "elements", () => this.children.filter((e) => e.isElement()));
|
|
1070
|
+
o(this, "hasInnerHTML", () => this.properties.innerHTML != null);
|
|
1071
|
+
o(this, "getInnerHTML", () => this.properties.innerHTML ?? "");
|
|
1072
|
+
o(this, "getInnerText", () => this.properties.innerText ?? "");
|
|
1073
|
+
o(this, "hasInnerText", () => this.properties.innerText != null);
|
|
1074
|
+
o(this, "hasChildren", () => this.children.length > 0);
|
|
1075
|
+
o(this, "hasClasses", () => this.properties[y] != null);
|
|
1076
|
+
o(this, "hasStyles", () => this.properties[_] != null);
|
|
1077
|
+
o(this, "hasAttributes", () => Object.keys(this.properties).length > 0);
|
|
1078
|
+
o(this, "hasHandlers", () => this.properties[E] != null);
|
|
1079
|
+
o(this, "hasRenderableProperties", () => this.hasClasses() || this.hasAttributes() || this.hasStyles());
|
|
1080
|
+
o(this, "getById", (e) => {
|
|
925
1081
|
if (this.properties.id === e)
|
|
926
1082
|
return this;
|
|
927
|
-
for (const
|
|
928
|
-
const r =
|
|
1083
|
+
for (const s of this.elements()) {
|
|
1084
|
+
const r = s.getById(e);
|
|
929
1085
|
if (r != null)
|
|
930
1086
|
return r;
|
|
931
1087
|
}
|
|
932
1088
|
});
|
|
933
|
-
|
|
934
|
-
((this.properties[
|
|
1089
|
+
o(this, "trigger", (e, s) => {
|
|
1090
|
+
((this.properties[E] ?? {})[e] ?? []).forEach((n) => n(s));
|
|
935
1091
|
});
|
|
936
|
-
|
|
1092
|
+
o(this, "click", () => {
|
|
937
1093
|
this.trigger("click", {});
|
|
938
1094
|
});
|
|
939
|
-
|
|
940
|
-
var
|
|
941
|
-
const r = (
|
|
1095
|
+
o(this, "on", (e, s) => {
|
|
1096
|
+
var i;
|
|
1097
|
+
const r = (i = this.properties)[E] ?? (i[E] = {}), n = s;
|
|
942
1098
|
return r[e] = [...r[e] ?? [], n], () => {
|
|
943
1099
|
const l = r[e] ?? [], c = l.indexOf(n);
|
|
944
|
-
c !== -1 && (l.splice(c, 1), l.length === 0 ? (delete r[e], Object.keys(r).length === 0 && delete this.properties[
|
|
1100
|
+
c !== -1 && (l.splice(c, 1), l.length === 0 ? (delete r[e], Object.keys(r).length === 0 && delete this.properties[E]) : r[e] = l);
|
|
945
1101
|
};
|
|
946
1102
|
});
|
|
947
|
-
|
|
1103
|
+
o(this, "addClasses", (e) => {
|
|
948
1104
|
var r;
|
|
949
1105
|
if (e.length === 0)
|
|
950
1106
|
return;
|
|
951
|
-
const
|
|
1107
|
+
const s = (r = this.properties)[y] ?? (r[y] = []);
|
|
952
1108
|
e.forEach((n) => {
|
|
953
|
-
|
|
1109
|
+
s.includes(n) || s.push(n);
|
|
954
1110
|
});
|
|
955
1111
|
});
|
|
956
|
-
|
|
1112
|
+
o(this, "removeClasses", (e) => {
|
|
957
1113
|
var r;
|
|
958
1114
|
if (e.length === 0)
|
|
959
1115
|
return;
|
|
960
|
-
const
|
|
1116
|
+
const s = (r = this.properties)[y] ?? (r[y] = []);
|
|
961
1117
|
e.forEach((n) => {
|
|
962
|
-
const
|
|
963
|
-
|
|
964
|
-
}),
|
|
1118
|
+
const i = s.indexOf(n);
|
|
1119
|
+
i !== -1 && s.splice(i, 1);
|
|
1120
|
+
}), s.length === 0 && delete this.properties[y];
|
|
965
1121
|
});
|
|
966
|
-
|
|
967
|
-
|
|
1122
|
+
o(this, "getClasses", () => this.properties[y] ?? []);
|
|
1123
|
+
o(this, "getAttributes", () => Object.entries(this.properties).filter(
|
|
968
1124
|
([e]) => !["innerText", "innerHTML"].includes(e)
|
|
969
1125
|
));
|
|
970
|
-
|
|
971
|
-
(e) => e ===
|
|
1126
|
+
o(this, "getVisibleAttributes", () => Reflect.ownKeys(this.properties).flatMap(
|
|
1127
|
+
(e) => e === y ? [["class", this.getClasses()]] : e === _ ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
972
1128
|
));
|
|
973
|
-
|
|
1129
|
+
o(this, "setStyle", (e, s) => {
|
|
974
1130
|
var n;
|
|
975
1131
|
const r = (n = this.properties)[_] ?? (n[_] = {});
|
|
976
|
-
r[e] =
|
|
1132
|
+
r[e] = s, s === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[_]);
|
|
977
1133
|
});
|
|
978
|
-
|
|
979
|
-
var
|
|
980
|
-
return ((
|
|
1134
|
+
o(this, "getStyle", (e) => {
|
|
1135
|
+
var s;
|
|
1136
|
+
return ((s = this.properties[_]) == null ? void 0 : s[e]) ?? "";
|
|
981
1137
|
});
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
const
|
|
1138
|
+
o(this, "getStyles", () => this.properties[_] ?? {});
|
|
1139
|
+
o(this, "makeAccessors", (e) => {
|
|
1140
|
+
const s = this.properties;
|
|
985
1141
|
return {
|
|
986
|
-
get: () =>
|
|
987
|
-
set: (r) =>
|
|
1142
|
+
get: () => s[e],
|
|
1143
|
+
set: (r) => s[e] = r
|
|
988
1144
|
};
|
|
989
1145
|
});
|
|
990
1146
|
this.parent = e;
|
|
991
1147
|
}
|
|
992
1148
|
}
|
|
993
|
-
const
|
|
994
|
-
class
|
|
995
|
-
constructor(
|
|
1149
|
+
const ot = (t) => t.replace(/"/g, """), lt = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1150
|
+
class ct extends me {
|
|
1151
|
+
constructor(s, r, n) {
|
|
996
1152
|
super(n);
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
const
|
|
1000
|
-
let
|
|
1001
|
-
const
|
|
1002
|
-
return
|
|
1153
|
+
o(this, "isPortal", () => !1);
|
|
1154
|
+
o(this, "toHTML", (s = !1) => {
|
|
1155
|
+
const r = this.children.map((a) => a.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
|
|
1156
|
+
let i = null;
|
|
1157
|
+
const l = this.getVisibleAttributes().map(([a, u]) => a === "class" ? ` class="${u.join(" ")}"` : a === "style" ? typeof u == "string" ? ` style="${u}"` : ` style="${Object.entries(u).map(([h, m]) => `${h}: ${m};`).join(" ")}"` : ut.has(a) ? ` ${a}` : a === "innerHTML" ? (i = u, "") : a === "innerText" ? (i = lt(u), "") : ` ${a}="${ot(u)}"`).join(""), c = s ? ` ${pe}` : "";
|
|
1158
|
+
return ht.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
|
|
1003
1159
|
});
|
|
1004
|
-
this.tagName =
|
|
1160
|
+
this.tagName = s, this.namespace = r;
|
|
1005
1161
|
}
|
|
1006
1162
|
}
|
|
1007
|
-
class
|
|
1008
|
-
constructor(
|
|
1163
|
+
class ye extends me {
|
|
1164
|
+
constructor(s, r) {
|
|
1009
1165
|
super(r);
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
this.selector =
|
|
1166
|
+
o(this, "isPortal", () => !0);
|
|
1167
|
+
o(this, "toHTML", () => "");
|
|
1168
|
+
o(this, "contentToHTML", (s = !1) => this.children.map((r) => r.toHTML(s)).join(""));
|
|
1169
|
+
this.selector = s;
|
|
1014
1170
|
}
|
|
1015
1171
|
}
|
|
1016
|
-
class
|
|
1172
|
+
class at {
|
|
1017
1173
|
constructor(e) {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1174
|
+
o(this, "id", ge());
|
|
1175
|
+
o(this, "isElement", () => !1);
|
|
1176
|
+
o(this, "isText", () => !0);
|
|
1177
|
+
o(this, "getText", () => this.text);
|
|
1178
|
+
o(this, "toHTML", () => this.text);
|
|
1023
1179
|
this.text = e;
|
|
1024
1180
|
}
|
|
1025
1181
|
}
|
|
1026
|
-
class
|
|
1027
|
-
constructor(e,
|
|
1028
|
-
|
|
1182
|
+
class x {
|
|
1183
|
+
constructor(e, s, r, n) {
|
|
1184
|
+
o(this, "appendOrInsert", (e) => {
|
|
1029
1185
|
if (this.reference != null) {
|
|
1030
|
-
const
|
|
1031
|
-
this.element.children.splice(
|
|
1186
|
+
const s = this.element.children.indexOf(this.reference);
|
|
1187
|
+
this.element.children.splice(s, 0, e);
|
|
1032
1188
|
} else
|
|
1033
1189
|
this.element.children.push(e);
|
|
1034
1190
|
});
|
|
1035
|
-
|
|
1036
|
-
const r = new
|
|
1037
|
-
return this.appendOrInsert(r), new
|
|
1191
|
+
o(this, "makeChildElement", (e, s) => {
|
|
1192
|
+
const r = new ct(e, s, this.element);
|
|
1193
|
+
return this.appendOrInsert(r), new x(
|
|
1038
1194
|
r,
|
|
1039
1195
|
void 0,
|
|
1040
1196
|
this.container,
|
|
1041
1197
|
this.providers
|
|
1042
1198
|
);
|
|
1043
1199
|
});
|
|
1044
|
-
|
|
1045
|
-
const
|
|
1046
|
-
return this.appendOrInsert(
|
|
1200
|
+
o(this, "makeChildText", (e) => {
|
|
1201
|
+
const s = new at(e);
|
|
1202
|
+
return this.appendOrInsert(s), new x(
|
|
1047
1203
|
this.element,
|
|
1048
|
-
|
|
1204
|
+
s,
|
|
1049
1205
|
this.container,
|
|
1050
1206
|
this.providers
|
|
1051
1207
|
);
|
|
1052
1208
|
});
|
|
1053
|
-
|
|
1209
|
+
o(this, "setText", (e) => {
|
|
1054
1210
|
this.reference && this.reference.isText() && (this.reference.text = e);
|
|
1055
1211
|
});
|
|
1056
|
-
|
|
1212
|
+
o(this, "getText", () => {
|
|
1057
1213
|
var e;
|
|
1058
1214
|
return ((e = this.reference) == null ? void 0 : e.getText()) ?? this.element.getText();
|
|
1059
1215
|
});
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
const
|
|
1063
|
-
return this.appendOrInsert(
|
|
1064
|
-
|
|
1216
|
+
o(this, "makeRef", () => this.makeChildText(""));
|
|
1217
|
+
o(this, "makePortal", (e) => {
|
|
1218
|
+
const s = new ye(e, this.element);
|
|
1219
|
+
return this.appendOrInsert(s), new x(
|
|
1220
|
+
s,
|
|
1065
1221
|
void 0,
|
|
1066
1222
|
this.container,
|
|
1067
1223
|
this.providers
|
|
1068
1224
|
);
|
|
1069
1225
|
});
|
|
1070
|
-
|
|
1226
|
+
o(this, "withProviders", (e) => new x(this.element, this.reference, this.container, {
|
|
1071
1227
|
...this.providers,
|
|
1072
1228
|
...e
|
|
1073
1229
|
}));
|
|
1074
|
-
|
|
1230
|
+
o(this, "getProvider", (e) => {
|
|
1075
1231
|
if (this.providers[e] === void 0)
|
|
1076
|
-
throw new
|
|
1232
|
+
throw new de(e);
|
|
1077
1233
|
return this.providers[e];
|
|
1078
1234
|
});
|
|
1079
|
-
|
|
1235
|
+
o(this, "clear", (e) => {
|
|
1080
1236
|
e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
|
|
1081
1237
|
});
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
this.element = e, this.reference =
|
|
1238
|
+
o(this, "on", (e, s) => this.element.on(e, s));
|
|
1239
|
+
o(this, "addClasses", (e) => this.element.addClasses(e));
|
|
1240
|
+
o(this, "removeClasses", (e) => this.element.removeClasses(e));
|
|
1241
|
+
o(this, "getClasses", () => this.element.getClasses());
|
|
1242
|
+
o(this, "isBrowserDOM", () => !1);
|
|
1243
|
+
o(this, "isHeadlessDOM", () => !0);
|
|
1244
|
+
o(this, "setStyle", (e, s) => this.element.setStyle(e, s));
|
|
1245
|
+
o(this, "getStyle", (e) => this.element.getStyle(e));
|
|
1246
|
+
o(this, "makeAccessors", (e) => this.element.makeAccessors(e));
|
|
1247
|
+
this.element = e, this.reference = s, this.container = r, this.providers = n;
|
|
1092
1248
|
}
|
|
1093
1249
|
}
|
|
1094
|
-
const
|
|
1250
|
+
const ut = /* @__PURE__ */ new Set([
|
|
1095
1251
|
"checked",
|
|
1096
1252
|
"disabled",
|
|
1097
1253
|
"multiple",
|
|
1098
1254
|
"readonly",
|
|
1099
1255
|
"required",
|
|
1100
1256
|
"selected"
|
|
1101
|
-
]),
|
|
1102
|
-
const
|
|
1103
|
-
return (r) =>
|
|
1104
|
-
},
|
|
1105
|
-
const
|
|
1257
|
+
]), ht = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Te = (t) => (e) => {
|
|
1258
|
+
const s = e.makeChildText(t);
|
|
1259
|
+
return (r) => s.clear(r);
|
|
1260
|
+
}, we = (t) => (e) => {
|
|
1261
|
+
const s = e.makeChildText(t.value), r = t.on((n) => s.setText(n));
|
|
1106
1262
|
return (n) => {
|
|
1107
|
-
r(),
|
|
1263
|
+
r(), s.clear(n);
|
|
1108
1264
|
};
|
|
1109
|
-
},
|
|
1110
|
-
const
|
|
1265
|
+
}, Ut = (t) => d.is(t) ? we(t) : Te(t), g = (...t) => (e) => {
|
|
1266
|
+
const s = t.map((r) => f(r)(e));
|
|
1111
1267
|
return (r) => {
|
|
1112
|
-
|
|
1268
|
+
s.forEach((n) => n(r));
|
|
1113
1269
|
};
|
|
1114
|
-
},
|
|
1115
|
-
},
|
|
1116
|
-
|
|
1117
|
-
}),
|
|
1118
|
-
let
|
|
1119
|
-
const r =
|
|
1120
|
-
e.removeClasses(
|
|
1270
|
+
}, A = () => () => {
|
|
1271
|
+
}, ft = (t) => (e) => (e.addClasses(t), (s) => {
|
|
1272
|
+
s && e.removeClasses(t);
|
|
1273
|
+
}), dt = (t) => (e) => {
|
|
1274
|
+
let s = [];
|
|
1275
|
+
const r = t.on((n) => {
|
|
1276
|
+
e.removeClasses(s), s = (n ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(s);
|
|
1121
1277
|
});
|
|
1122
1278
|
return (n) => {
|
|
1123
|
-
r(), n && e.removeClasses(
|
|
1279
|
+
r(), n && e.removeClasses(s), s.length = 0;
|
|
1124
1280
|
};
|
|
1125
|
-
},
|
|
1126
|
-
const { get: r, set: n } =
|
|
1281
|
+
}, H = (t, e) => (s) => {
|
|
1282
|
+
const { get: r, set: n } = s.makeAccessors(t), i = r();
|
|
1127
1283
|
return n(e), (l) => {
|
|
1128
|
-
l && n(
|
|
1284
|
+
l && n(i);
|
|
1129
1285
|
};
|
|
1130
|
-
}, $ = (
|
|
1131
|
-
const { get: r, set: n } =
|
|
1286
|
+
}, $ = (t, e) => (s) => {
|
|
1287
|
+
const { get: r, set: n } = s.makeAccessors(t), i = r(), l = e.on(n);
|
|
1132
1288
|
return (c) => {
|
|
1133
|
-
l(), c && n(
|
|
1289
|
+
l(), c && n(i);
|
|
1134
1290
|
};
|
|
1135
|
-
},
|
|
1291
|
+
}, L = new Proxy(
|
|
1136
1292
|
{},
|
|
1137
1293
|
{
|
|
1138
1294
|
/**
|
|
@@ -1146,17 +1302,17 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1146
1302
|
* @returns The renderable component for the specified attribute.
|
|
1147
1303
|
*
|
|
1148
1304
|
*/
|
|
1149
|
-
get: (
|
|
1150
|
-
(
|
|
1151
|
-
) : (
|
|
1305
|
+
get: (t, e) => e === "class" ? (s) => d.is(s) ? dt(s) : ft(
|
|
1306
|
+
(s ?? "").split(" ").filter((r) => r.length > 0)
|
|
1307
|
+
) : (s) => d.is(s) ? $(
|
|
1152
1308
|
e,
|
|
1153
|
-
|
|
1154
|
-
) :
|
|
1309
|
+
s
|
|
1310
|
+
) : H(
|
|
1155
1311
|
e,
|
|
1156
|
-
|
|
1312
|
+
s
|
|
1157
1313
|
)
|
|
1158
1314
|
}
|
|
1159
|
-
),
|
|
1315
|
+
), Wt = new Proxy(
|
|
1160
1316
|
{},
|
|
1161
1317
|
{
|
|
1162
1318
|
/**
|
|
@@ -1167,12 +1323,12 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1167
1323
|
* @returns The renderable component for the specified attribute.
|
|
1168
1324
|
*
|
|
1169
1325
|
*/
|
|
1170
|
-
get: (
|
|
1326
|
+
get: (t, e) => (s) => d.is(s) ? $(
|
|
1171
1327
|
`data-${e}`,
|
|
1172
|
-
|
|
1173
|
-
) :
|
|
1328
|
+
s
|
|
1329
|
+
) : H(`data-${e}`, s)
|
|
1174
1330
|
}
|
|
1175
|
-
),
|
|
1331
|
+
), Jt = new Proxy(
|
|
1176
1332
|
{},
|
|
1177
1333
|
{
|
|
1178
1334
|
/**
|
|
@@ -1183,15 +1339,15 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1183
1339
|
* @returns The renderable component for the specified attribute.
|
|
1184
1340
|
*
|
|
1185
1341
|
*/
|
|
1186
|
-
get: (
|
|
1342
|
+
get: (t, e) => (s) => d.is(s) ? $(
|
|
1187
1343
|
`aria-${e}`,
|
|
1188
|
-
|
|
1189
|
-
) :
|
|
1344
|
+
s
|
|
1345
|
+
) : H(
|
|
1190
1346
|
`aria-${e}`,
|
|
1191
|
-
|
|
1347
|
+
s
|
|
1192
1348
|
)
|
|
1193
1349
|
}
|
|
1194
|
-
),
|
|
1350
|
+
), Gt = new Proxy(
|
|
1195
1351
|
{},
|
|
1196
1352
|
{
|
|
1197
1353
|
/**
|
|
@@ -1202,15 +1358,15 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1202
1358
|
* @returns The renderable component for the specified attribute.
|
|
1203
1359
|
*
|
|
1204
1360
|
*/
|
|
1205
|
-
get: (
|
|
1361
|
+
get: (t, e) => (s) => d.is(s) ? $(
|
|
1206
1362
|
e,
|
|
1207
|
-
|
|
1208
|
-
) :
|
|
1363
|
+
s
|
|
1364
|
+
) : H(
|
|
1209
1365
|
e,
|
|
1210
|
-
|
|
1366
|
+
s
|
|
1211
1367
|
)
|
|
1212
1368
|
}
|
|
1213
|
-
),
|
|
1369
|
+
), zt = new Proxy(
|
|
1214
1370
|
{},
|
|
1215
1371
|
{
|
|
1216
1372
|
/**
|
|
@@ -1220,37 +1376,37 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1220
1376
|
* @returns The renderable component for the specified attribute.
|
|
1221
1377
|
*
|
|
1222
1378
|
*/
|
|
1223
|
-
get: (
|
|
1379
|
+
get: (t, e) => (s) => d.is(s) ? $(
|
|
1224
1380
|
e,
|
|
1225
|
-
|
|
1226
|
-
) :
|
|
1381
|
+
s
|
|
1382
|
+
) : H(
|
|
1227
1383
|
e,
|
|
1228
|
-
|
|
1384
|
+
s
|
|
1229
1385
|
)
|
|
1230
1386
|
}
|
|
1231
|
-
),
|
|
1232
|
-
if (
|
|
1233
|
-
return
|
|
1234
|
-
if (Array.isArray(
|
|
1235
|
-
return
|
|
1236
|
-
if (typeof
|
|
1237
|
-
return
|
|
1238
|
-
if (d.is(
|
|
1239
|
-
return
|
|
1240
|
-
if (typeof
|
|
1241
|
-
return
|
|
1242
|
-
throw new Error(`Unknown type: '${typeof
|
|
1243
|
-
},
|
|
1244
|
-
const r =
|
|
1245
|
-
return (
|
|
1246
|
-
n.forEach((l) => l(!1)), r.clear(
|
|
1387
|
+
), f = (t) => {
|
|
1388
|
+
if (t == null)
|
|
1389
|
+
return A;
|
|
1390
|
+
if (Array.isArray(t))
|
|
1391
|
+
return g(...t.map(f));
|
|
1392
|
+
if (typeof t == "string")
|
|
1393
|
+
return Te(t);
|
|
1394
|
+
if (d.is(t))
|
|
1395
|
+
return we(t);
|
|
1396
|
+
if (typeof t == "function")
|
|
1397
|
+
return t;
|
|
1398
|
+
throw new Error(`Unknown type: '${typeof t}' for child: ${t}`);
|
|
1399
|
+
}, _e = (t, ...e) => (s) => {
|
|
1400
|
+
const r = s.makeChildElement(t, void 0), n = e.map((i) => f(i)(r));
|
|
1401
|
+
return (i) => {
|
|
1402
|
+
n.forEach((l) => l(!1)), r.clear(i);
|
|
1247
1403
|
};
|
|
1248
|
-
},
|
|
1249
|
-
const n = r.makeChildElement(
|
|
1404
|
+
}, Ae = (t, e, ...s) => (r) => {
|
|
1405
|
+
const n = r.makeChildElement(t, e), i = s.map((l) => f(l)(n));
|
|
1250
1406
|
return (l) => {
|
|
1251
|
-
|
|
1407
|
+
i.forEach((c) => c(!1)), n.clear(l);
|
|
1252
1408
|
};
|
|
1253
|
-
},
|
|
1409
|
+
}, Xt = new Proxy(
|
|
1254
1410
|
{},
|
|
1255
1411
|
{
|
|
1256
1412
|
/**
|
|
@@ -1258,9 +1414,9 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1258
1414
|
* @param tagName - The HTML tag name.
|
|
1259
1415
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
1260
1416
|
*/
|
|
1261
|
-
get: (
|
|
1417
|
+
get: (t, e) => (...s) => _e(e, s.flatMap(f))
|
|
1262
1418
|
}
|
|
1263
|
-
),
|
|
1419
|
+
), Yt = new Proxy(
|
|
1264
1420
|
{},
|
|
1265
1421
|
{
|
|
1266
1422
|
/**
|
|
@@ -1268,9 +1424,9 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1268
1424
|
* @param type - The input type name.
|
|
1269
1425
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
1270
1426
|
*/
|
|
1271
|
-
get: (
|
|
1427
|
+
get: (t, e) => (...s) => _e("input", L.type(e), ...s)
|
|
1272
1428
|
}
|
|
1273
|
-
),
|
|
1429
|
+
), pt = "http://www.w3.org/2000/svg", Qt = new Proxy(
|
|
1274
1430
|
{},
|
|
1275
1431
|
{
|
|
1276
1432
|
/**
|
|
@@ -1278,9 +1434,9 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1278
1434
|
* @param tagName - The SVG tag name.
|
|
1279
1435
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1280
1436
|
*/
|
|
1281
|
-
get: (
|
|
1437
|
+
get: (t, e) => (...s) => Ae(e, pt, s.flatMap(f))
|
|
1282
1438
|
}
|
|
1283
|
-
),
|
|
1439
|
+
), gt = "http://www.w3.org/1998/Math/MathML", Zt = new Proxy(
|
|
1284
1440
|
{},
|
|
1285
1441
|
{
|
|
1286
1442
|
/**
|
|
@@ -1288,35 +1444,35 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1288
1444
|
* @param tagName - The Math tag name.
|
|
1289
1445
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1290
1446
|
*/
|
|
1291
|
-
get: (
|
|
1447
|
+
get: (t, e) => (...s) => Ae(e, gt, s.flatMap(f))
|
|
1292
1448
|
}
|
|
1293
|
-
),
|
|
1449
|
+
), Se = (t, e) => {
|
|
1294
1450
|
if (typeof e == "function")
|
|
1295
|
-
return
|
|
1296
|
-
const
|
|
1297
|
-
return (
|
|
1451
|
+
return Se(t, { then: e });
|
|
1452
|
+
const s = e.pending != null ? f(e.pending) : A, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => A;
|
|
1453
|
+
return (i) => {
|
|
1298
1454
|
let l = !0;
|
|
1299
|
-
const c =
|
|
1300
|
-
let
|
|
1455
|
+
const c = t(), a = i.makeRef();
|
|
1456
|
+
let u = f(s)(a);
|
|
1301
1457
|
return c.then(
|
|
1302
1458
|
(h) => {
|
|
1303
|
-
l && (
|
|
1459
|
+
l && (u(!0), u = f(r(h))(a));
|
|
1304
1460
|
},
|
|
1305
1461
|
(h) => {
|
|
1306
|
-
l && (
|
|
1462
|
+
l && (u(!0), u = f(n(h))(a));
|
|
1307
1463
|
}
|
|
1308
1464
|
), (h) => {
|
|
1309
|
-
l = !1,
|
|
1465
|
+
l = !1, u(h), a.clear(h);
|
|
1310
1466
|
};
|
|
1311
1467
|
};
|
|
1312
|
-
},
|
|
1468
|
+
}, Kt = (t, e) => Se(() => t, e), be = (t, e) => (s) => s.on(t, e), mt = (t) => be("click", (e) => {
|
|
1313
1469
|
e.preventDefault();
|
|
1314
|
-
const
|
|
1470
|
+
const s = e.target;
|
|
1315
1471
|
setTimeout(() => {
|
|
1316
|
-
const r =
|
|
1317
|
-
r != null &&
|
|
1472
|
+
const r = s.ownerDocument != null ? s == null ? void 0 : s.checked : void 0;
|
|
1473
|
+
r != null && t(!r);
|
|
1318
1474
|
}, 0);
|
|
1319
|
-
}),
|
|
1475
|
+
}), G = new Proxy(
|
|
1320
1476
|
{},
|
|
1321
1477
|
{
|
|
1322
1478
|
/**
|
|
@@ -1324,311 +1480,282 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1324
1480
|
* @param fn - The function to call when the event is triggered.
|
|
1325
1481
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1326
1482
|
*/
|
|
1327
|
-
get: (
|
|
1483
|
+
get: (t, e) => (s) => be(e, s)
|
|
1328
1484
|
}
|
|
1329
|
-
),
|
|
1330
|
-
const
|
|
1331
|
-
s
|
|
1332
|
-
},
|
|
1333
|
-
const
|
|
1334
|
-
s
|
|
1335
|
-
},
|
|
1336
|
-
const
|
|
1337
|
-
if (
|
|
1485
|
+
), yt = (t) => (e) => {
|
|
1486
|
+
const s = e.target;
|
|
1487
|
+
t(s.value);
|
|
1488
|
+
}, Tt = (t) => (e) => {
|
|
1489
|
+
const s = e.target;
|
|
1490
|
+
t(s.valueAsNumber);
|
|
1491
|
+
}, wt = (t) => (e) => {
|
|
1492
|
+
const s = e.target;
|
|
1493
|
+
if (s.value === "")
|
|
1338
1494
|
return;
|
|
1339
|
-
const r =
|
|
1495
|
+
const r = s.value.split("-"), n = new Date(
|
|
1340
1496
|
Number(r[0]),
|
|
1341
1497
|
Number(r[1]) - 1,
|
|
1342
1498
|
Number(r[2].substring(0, 2))
|
|
1343
1499
|
);
|
|
1344
|
-
|
|
1345
|
-
},
|
|
1346
|
-
const
|
|
1347
|
-
if (
|
|
1500
|
+
t(n);
|
|
1501
|
+
}, _t = (t) => (e) => {
|
|
1502
|
+
const s = e.target;
|
|
1503
|
+
if (s.value === "")
|
|
1348
1504
|
return;
|
|
1349
|
-
const r =
|
|
1505
|
+
const r = s.value.split("T"), n = r[0].split("-"), i = new Date(
|
|
1350
1506
|
Number(n[0]),
|
|
1351
1507
|
Number(n[1]) - 1,
|
|
1352
1508
|
Number(n[2])
|
|
1353
1509
|
), l = r[1].split(":");
|
|
1354
|
-
|
|
1355
|
-
},
|
|
1356
|
-
const
|
|
1357
|
-
s
|
|
1358
|
-
},
|
|
1359
|
-
e.preventDefault(),
|
|
1360
|
-
},
|
|
1361
|
-
e.stopPropagation(),
|
|
1362
|
-
},
|
|
1363
|
-
e.stopImmediatePropagation(),
|
|
1364
|
-
},
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
),
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
),
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
),
|
|
1374
|
-
if (d.is(
|
|
1510
|
+
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), t(i);
|
|
1511
|
+
}, es = (t) => (e) => {
|
|
1512
|
+
const s = e.target;
|
|
1513
|
+
t(s.checked);
|
|
1514
|
+
}, ts = (t) => (e) => {
|
|
1515
|
+
e.preventDefault(), t();
|
|
1516
|
+
}, ss = (t) => (e) => {
|
|
1517
|
+
e.stopPropagation(), t();
|
|
1518
|
+
}, rs = (t) => (e) => {
|
|
1519
|
+
e.stopImmediatePropagation(), t();
|
|
1520
|
+
}, ns = (t, e = "input") => g(
|
|
1521
|
+
L.valueAsDate(t),
|
|
1522
|
+
G[e](wt(t.set))
|
|
1523
|
+
), is = (t, e = "input") => g(
|
|
1524
|
+
L.valueAsDate(t),
|
|
1525
|
+
G[e](_t(t.set))
|
|
1526
|
+
), os = (t, e = "input") => g(
|
|
1527
|
+
L.valueAsNumber(t),
|
|
1528
|
+
G[e](Tt(t.set))
|
|
1529
|
+
), ls = (t, e = "input") => g(L.value(t), G[e](yt(t.set))), cs = (t) => g(L.checked(t), mt(t.set)), z = (t, e) => {
|
|
1530
|
+
if (d.is(t))
|
|
1375
1531
|
return (r) => {
|
|
1376
1532
|
const n = r.makeRef();
|
|
1377
|
-
let
|
|
1378
|
-
const c =
|
|
1533
|
+
let i, l;
|
|
1534
|
+
const c = t.map((h) => Object.keys(h)[0]);
|
|
1379
1535
|
let a;
|
|
1380
|
-
const
|
|
1536
|
+
const u = c.on((h) => {
|
|
1381
1537
|
if (h !== a) {
|
|
1382
|
-
l == null || l.dispose(),
|
|
1383
|
-
const
|
|
1384
|
-
|
|
1538
|
+
l == null || l.dispose(), i == null || i(!0), l = t.map((S) => S[h]);
|
|
1539
|
+
const m = e[h](l);
|
|
1540
|
+
i = f(m)(n), a = h;
|
|
1385
1541
|
}
|
|
1386
1542
|
});
|
|
1387
1543
|
return (h) => {
|
|
1388
|
-
|
|
1544
|
+
u(), n.clear(h), i == null || i(h);
|
|
1389
1545
|
};
|
|
1390
1546
|
};
|
|
1391
|
-
const
|
|
1392
|
-
return
|
|
1393
|
-
},
|
|
1394
|
-
p.map(
|
|
1547
|
+
const s = Object.keys(t)[0];
|
|
1548
|
+
return f(e[s](J(t[s])));
|
|
1549
|
+
}, Ee = (t, e, s) => z(
|
|
1550
|
+
p.map(t, (r) => ({ [r[e]]: r })),
|
|
1395
1551
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1396
|
-
|
|
1397
|
-
),
|
|
1398
|
-
const
|
|
1399
|
-
return
|
|
1400
|
-
},
|
|
1401
|
-
p.map(
|
|
1552
|
+
s
|
|
1553
|
+
), as = (t, e) => Ee(t, "kind", e), us = (t, e) => {
|
|
1554
|
+
const s = p.map(t, ([r, n]) => ({ [r]: n }));
|
|
1555
|
+
return z(s, e);
|
|
1556
|
+
}, hs = (t, e) => Ee(t, "type", e), At = (t, e) => z(
|
|
1557
|
+
p.map(t, (s) => ({ [s]: !0 })),
|
|
1402
1558
|
e
|
|
1403
|
-
),
|
|
1404
|
-
const r = (e == null ? void 0 : e.firstSeparator) ??
|
|
1405
|
-
return
|
|
1406
|
-
|
|
1559
|
+
), fs = (t, e = {}) => (s) => {
|
|
1560
|
+
const r = (e == null ? void 0 : e.firstSeparator) ?? t, n = (e == null ? void 0 : e.lastSeparator) ?? t;
|
|
1561
|
+
return At(
|
|
1562
|
+
s.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
|
|
1407
1563
|
{
|
|
1408
1564
|
first: () => r,
|
|
1409
1565
|
last: () => n,
|
|
1410
|
-
other: () =>
|
|
1566
|
+
other: () => t
|
|
1411
1567
|
}
|
|
1412
1568
|
);
|
|
1413
|
-
},
|
|
1414
|
-
const r = Object.values(
|
|
1415
|
-
const l =
|
|
1416
|
-
return n[
|
|
1569
|
+
}, Ce = (t, e) => (s) => {
|
|
1570
|
+
const r = Object.values(t).reduce((n, i) => {
|
|
1571
|
+
const l = s.getProvider(i);
|
|
1572
|
+
return n[i] = l, n;
|
|
1417
1573
|
}, {});
|
|
1418
|
-
return
|
|
1419
|
-
},
|
|
1420
|
-
const r = [], n = Object.entries(
|
|
1421
|
-
(
|
|
1422
|
-
c((a) => (Reflect.set(
|
|
1423
|
-
),
|
|
1574
|
+
return f(e(r))(s);
|
|
1575
|
+
}, ds = (t, e) => (s) => {
|
|
1576
|
+
const r = [], n = Object.entries(t).reduce(
|
|
1577
|
+
(i, [l, c]) => (r.push(
|
|
1578
|
+
c((a) => (Reflect.set(i, l, a), null))(s)
|
|
1579
|
+
), i),
|
|
1424
1580
|
{}
|
|
1425
1581
|
);
|
|
1426
|
-
return r.push(e(n)(
|
|
1427
|
-
r.forEach((l) => l(
|
|
1582
|
+
return r.push(e(n)(s)), (i) => {
|
|
1583
|
+
r.forEach((l) => l(i));
|
|
1428
1584
|
};
|
|
1429
|
-
},
|
|
1430
|
-
}),
|
|
1431
|
-
|
|
1432
|
-
}),
|
|
1433
|
-
if (d.is(
|
|
1434
|
-
const r =
|
|
1585
|
+
}, St = (t, e) => Ce([t], (s) => f(e(s[t]))), ps = (t, e) => Ce(t, (s) => f(e(s))), gs = (t) => (e) => t(e) ?? (() => {
|
|
1586
|
+
}), ms = (t) => (e) => (e.appendOrInsert(t), (s) => {
|
|
1587
|
+
s && R(t);
|
|
1588
|
+
}), bt = (t, e, s) => {
|
|
1589
|
+
if (d.is(t)) {
|
|
1590
|
+
const r = t;
|
|
1435
1591
|
return (n) => {
|
|
1436
|
-
const
|
|
1592
|
+
const i = n.makeRef();
|
|
1437
1593
|
let l = null, c = !1;
|
|
1438
|
-
const a =
|
|
1439
|
-
h == null ? (l == null || l(!0), l =
|
|
1440
|
-
|
|
1594
|
+
const a = N(null), u = r.on((h) => {
|
|
1595
|
+
h == null ? (l == null || l(!0), l = f((s == null ? void 0 : s()) ?? A)(i), c = !1) : (a.value = h, c || (l == null || l(!0), l = f(e(a))(
|
|
1596
|
+
i
|
|
1441
1597
|
), c = !0));
|
|
1442
1598
|
});
|
|
1443
1599
|
return (h) => {
|
|
1444
|
-
|
|
1600
|
+
u(), l == null || l(h), i.clear(h);
|
|
1445
1601
|
};
|
|
1446
1602
|
};
|
|
1447
1603
|
} else {
|
|
1448
|
-
const r =
|
|
1604
|
+
const r = t;
|
|
1449
1605
|
if (r == null) {
|
|
1450
|
-
const n =
|
|
1451
|
-
return n != null ?
|
|
1606
|
+
const n = s == null ? void 0 : s();
|
|
1607
|
+
return n != null ? f(n) : A;
|
|
1452
1608
|
}
|
|
1453
|
-
return
|
|
1609
|
+
return f(e(J(r)));
|
|
1454
1610
|
}
|
|
1455
|
-
},
|
|
1456
|
-
|
|
1611
|
+
}, U = (t) => (e) => (s) => t(s, e), ve = (t, e, s) => Pe(
|
|
1612
|
+
t,
|
|
1457
1613
|
() => e,
|
|
1458
|
-
() =>
|
|
1459
|
-
),
|
|
1460
|
-
p.map(
|
|
1614
|
+
() => s
|
|
1615
|
+
), Pe = (t, e, s) => bt(
|
|
1616
|
+
p.map(t, (r) => r ? !0 : null),
|
|
1461
1617
|
e,
|
|
1462
|
-
|
|
1463
|
-
),
|
|
1464
|
-
|
|
1618
|
+
s ?? void 0
|
|
1619
|
+
), ys = (t, e, s) => Et(
|
|
1620
|
+
t,
|
|
1465
1621
|
() => e,
|
|
1466
|
-
() =>
|
|
1467
|
-
),
|
|
1468
|
-
p.map(
|
|
1622
|
+
() => s
|
|
1623
|
+
), Et = (t, e, s) => Pe(
|
|
1624
|
+
p.map(t, (r) => !r),
|
|
1469
1625
|
e,
|
|
1470
|
-
|
|
1471
|
-
),
|
|
1472
|
-
const n = new
|
|
1626
|
+
s
|
|
1627
|
+
), xe = (t, e, s) => s != null ? xe(t, (r) => {
|
|
1628
|
+
const n = new D(
|
|
1473
1629
|
r.index,
|
|
1474
|
-
r.total.map((
|
|
1630
|
+
r.total.map((i) => i - 1)
|
|
1475
1631
|
);
|
|
1476
|
-
return
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
ve(r.isLast,
|
|
1632
|
+
return g(
|
|
1633
|
+
U(n.dispose),
|
|
1634
|
+
f(e(r)),
|
|
1635
|
+
ve(r.isLast, A, s(n))
|
|
1480
1636
|
);
|
|
1481
|
-
}) : d.is(
|
|
1482
|
-
const n = r.makeRef(),
|
|
1483
|
-
{ length:
|
|
1484
|
-
(a,
|
|
1485
|
-
).map((a) => new
|
|
1486
|
-
(a) =>
|
|
1487
|
-
), c =
|
|
1637
|
+
}) : d.is(t) ? (r) => {
|
|
1638
|
+
const n = r.makeRef(), i = Array.from(
|
|
1639
|
+
{ length: t.value },
|
|
1640
|
+
(a, u) => u
|
|
1641
|
+
).map((a) => new D(a, t)), l = i.map(
|
|
1642
|
+
(a) => f(e(a))(n)
|
|
1643
|
+
), c = t.on((a) => {
|
|
1488
1644
|
for (; a < l.length; )
|
|
1489
|
-
|
|
1490
|
-
for (let
|
|
1491
|
-
if (
|
|
1492
|
-
|
|
1493
|
-
const h =
|
|
1494
|
-
l[
|
|
1645
|
+
i.pop().dispose(), l.pop()(!0);
|
|
1646
|
+
for (let u = 0; u < a; u++)
|
|
1647
|
+
if (i[u] == null) {
|
|
1648
|
+
i[u] = new D(u, t);
|
|
1649
|
+
const h = f(e(i[u]));
|
|
1650
|
+
l[u] = h(n);
|
|
1495
1651
|
}
|
|
1496
1652
|
});
|
|
1497
1653
|
return (a) => {
|
|
1498
1654
|
c(), n.clear(a);
|
|
1499
1655
|
};
|
|
1500
|
-
} :
|
|
1501
|
-
...Array.from({ length:
|
|
1502
|
-
(r) =>
|
|
1656
|
+
} : g(
|
|
1657
|
+
...Array.from({ length: t }, (r, n) => n).map(
|
|
1658
|
+
(r) => f(e(new D(r, J(t))))
|
|
1503
1659
|
)
|
|
1504
|
-
),
|
|
1505
|
-
if (
|
|
1506
|
-
return
|
|
1507
|
-
const
|
|
1660
|
+
), Ct = (t, e, s) => {
|
|
1661
|
+
if (s != null)
|
|
1662
|
+
return Ct(t, (r, n) => {
|
|
1663
|
+
const i = new D(
|
|
1508
1664
|
n.index,
|
|
1509
1665
|
n.total.map((l) => l - 1)
|
|
1510
1666
|
);
|
|
1511
|
-
return
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
ve(n.isLast,
|
|
1667
|
+
return g([
|
|
1668
|
+
U(i.dispose),
|
|
1669
|
+
f(e(r, n)),
|
|
1670
|
+
ve(n.isLast, A, s(i))
|
|
1515
1671
|
]);
|
|
1516
1672
|
});
|
|
1517
1673
|
{
|
|
1518
|
-
const r = p.map(
|
|
1519
|
-
return
|
|
1520
|
-
const l = n.map((c) => c[
|
|
1521
|
-
return
|
|
1522
|
-
|
|
1523
|
-
|
|
1674
|
+
const r = p.map(t, (i) => i.length), n = p.toSignal(t);
|
|
1675
|
+
return xe(r, (i) => {
|
|
1676
|
+
const l = n.map((c) => c[i.index]);
|
|
1677
|
+
return g(
|
|
1678
|
+
U(l.dispose),
|
|
1679
|
+
f(e(l, i))
|
|
1524
1680
|
);
|
|
1525
1681
|
});
|
|
1526
1682
|
}
|
|
1527
|
-
},
|
|
1683
|
+
}, vt = (t) => (e) => e.isBrowserDOM() ? t(e) ?? (() => {
|
|
1528
1684
|
}) : () => {
|
|
1529
|
-
},
|
|
1685
|
+
}, Ts = (t) => (e) => e.isHeadlessDOM() ? t(e) ?? (() => {
|
|
1530
1686
|
}) : () => {
|
|
1531
|
-
},
|
|
1532
|
-
})),
|
|
1533
|
-
if (d.is(
|
|
1534
|
-
const
|
|
1687
|
+
}, ws = (t) => vt((e) => t(e.element) ?? (() => {
|
|
1688
|
+
})), _s = (t, e) => {
|
|
1689
|
+
if (d.is(t)) {
|
|
1690
|
+
const s = t;
|
|
1535
1691
|
return (r) => {
|
|
1536
1692
|
r = r.makeRef();
|
|
1537
|
-
const n =
|
|
1538
|
-
let
|
|
1693
|
+
const n = s.map((c) => f(e(c)));
|
|
1694
|
+
let i = () => {
|
|
1539
1695
|
};
|
|
1540
1696
|
const l = n.on((c) => {
|
|
1541
|
-
|
|
1697
|
+
i(!0), i = c(r);
|
|
1542
1698
|
});
|
|
1543
1699
|
return (c) => {
|
|
1544
|
-
l(),
|
|
1700
|
+
l(), i(c);
|
|
1545
1701
|
};
|
|
1546
1702
|
};
|
|
1547
1703
|
}
|
|
1548
|
-
return
|
|
1549
|
-
},
|
|
1704
|
+
return f(e(t));
|
|
1705
|
+
}, As = (t, e, s = () => A) => z(
|
|
1550
1706
|
p.map(
|
|
1551
|
-
|
|
1707
|
+
t,
|
|
1552
1708
|
(r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
|
|
1553
1709
|
),
|
|
1554
1710
|
{
|
|
1555
1711
|
notEmpty: (r) => e(r),
|
|
1556
|
-
whenEmpty: () =>
|
|
1712
|
+
whenEmpty: () => s()
|
|
1557
1713
|
}
|
|
1558
|
-
),
|
|
1559
|
-
const
|
|
1560
|
-
return ()
|
|
1561
|
-
},
|
|
1562
|
-
|
|
1563
|
-
if (n === null)
|
|
1564
|
-
throw new at(
|
|
1565
|
-
`Cannot find element by selector for render: ${e}`
|
|
1566
|
-
);
|
|
1567
|
-
r !== !1 && (t ?? n.ownerDocument) != null && n.nodeType === 1 && (n.innerHTML = "");
|
|
1568
|
-
const o = je(n), l = le(n) ? void 0 : n, c = b.of(o, l);
|
|
1569
|
-
return z(s, c);
|
|
1570
|
-
}, ss = (s, {
|
|
1571
|
-
startUrl: e = "https://example.com",
|
|
1572
|
-
selector: t = ":root"
|
|
1573
|
-
} = {}) => {
|
|
1574
|
-
const r = p.toSignal(e).deriveProp(), n = new he(t, void 0), o = new E(n, void 0, { currentURL: r }, {});
|
|
1575
|
-
return {
|
|
1576
|
-
clear: z(s(), o),
|
|
1577
|
-
root: n,
|
|
1578
|
-
currentURL: r
|
|
1579
|
-
};
|
|
1580
|
-
};
|
|
1581
|
-
class at extends Error {
|
|
1582
|
-
constructor(e) {
|
|
1583
|
-
super(e);
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
const rs = (s, e) => (t) => {
|
|
1587
|
-
const r = t.makePortal(s);
|
|
1588
|
-
return z(u(e), r);
|
|
1589
|
-
}, ut = (s) => Symbol(s), Te = (s, e) => (t) => u(e)(t.withProviders(s)), ns = (...s) => s.length > 0 ? s.reduceRight((e, t) => (r) => e(t(r))) : u, ht = (s, e, t) => Te({ [s]: e }, u(t)), is = (s, e) => Te(s, u(e)), xe = ut("Probe"), x = /* @__PURE__ */ new Map(), ft = ({
|
|
1590
|
-
identifier: s,
|
|
1714
|
+
), Ss = (t, e) => (s) => {
|
|
1715
|
+
const r = s.makePortal(t);
|
|
1716
|
+
return Z(f(e), r);
|
|
1717
|
+
}, Pt = (t) => Symbol(t), Le = (t, e) => (s) => f(e)(s.withProviders(t)), bs = (...t) => t.length > 0 ? t.reduceRight((e, s) => (r) => e(s(r))) : f, xt = (t, e, s) => Le({ [t]: e }, f(s)), Es = (t, e) => Le(t, f(e)), Oe = Pt("Probe"), C = /* @__PURE__ */ new Map(), Lt = ({
|
|
1718
|
+
identifier: t,
|
|
1591
1719
|
callback: e,
|
|
1592
|
-
child:
|
|
1720
|
+
child: s,
|
|
1593
1721
|
timeout: r = 10
|
|
1594
1722
|
}) => {
|
|
1595
|
-
if (
|
|
1596
|
-
throw new Error(`Probe already exists: ${
|
|
1723
|
+
if (C.has(t))
|
|
1724
|
+
throw new Error(`Probe already exists: ${t.description}`);
|
|
1597
1725
|
const n = setTimeout(() => e("timeout"), r);
|
|
1598
|
-
|
|
1726
|
+
C.set(t, {
|
|
1599
1727
|
counter: 0,
|
|
1600
1728
|
timeoutId: n
|
|
1601
1729
|
});
|
|
1602
|
-
const
|
|
1730
|
+
const i = (l) => {
|
|
1603
1731
|
clearTimeout(n);
|
|
1604
|
-
const c =
|
|
1732
|
+
const c = C.get(l);
|
|
1605
1733
|
if (c == null)
|
|
1606
1734
|
throw new Error(`Probe not found: ${l.description}`);
|
|
1607
|
-
--c.counter === 0 ? (e("resolved"),
|
|
1735
|
+
--c.counter === 0 ? (e("resolved"), C.delete(l)) : C.set(l, c);
|
|
1608
1736
|
};
|
|
1609
|
-
return
|
|
1610
|
-
|
|
1611
|
-
|
|
1737
|
+
return g(
|
|
1738
|
+
U(() => clearTimeout(n)),
|
|
1739
|
+
xt(Oe, i, s)
|
|
1612
1740
|
);
|
|
1613
|
-
},
|
|
1614
|
-
const r =
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
callback: s,
|
|
1741
|
+
}, Ot = (t, e) => St(Oe, (s) => {
|
|
1742
|
+
const r = C.get(t);
|
|
1743
|
+
return r == null ? e(() => {
|
|
1744
|
+
}) : (clearTimeout(r.timeoutId), r.counter++, e(() => s(t)));
|
|
1745
|
+
}), De = Symbol("globalProbe"), Cs = ({
|
|
1746
|
+
callback: t,
|
|
1620
1747
|
timeout: e
|
|
1621
|
-
},
|
|
1622
|
-
const r =
|
|
1623
|
-
return
|
|
1624
|
-
n &&
|
|
1748
|
+
}, s) => Lt({ identifier: De, callback: t, child: s, timeout: e }), vs = (t) => Ot(De, t), Dt = (t, e) => (s) => {
|
|
1749
|
+
const r = s.getStyle(t);
|
|
1750
|
+
return s.setStyle(t, e), (n) => {
|
|
1751
|
+
n && s.setStyle(t, r);
|
|
1625
1752
|
};
|
|
1626
|
-
},
|
|
1627
|
-
const r =
|
|
1628
|
-
return e.on((n) =>
|
|
1629
|
-
n &&
|
|
1753
|
+
}, Mt = (t, e) => (s) => {
|
|
1754
|
+
const r = s.getStyle(t);
|
|
1755
|
+
return e.on((n) => s.setStyle(t, n)), (n) => {
|
|
1756
|
+
n && s.setStyle(t, r);
|
|
1630
1757
|
};
|
|
1631
|
-
},
|
|
1758
|
+
}, Ps = new Proxy(
|
|
1632
1759
|
{},
|
|
1633
1760
|
{
|
|
1634
1761
|
/**
|
|
@@ -1639,117 +1766,125 @@ const rs = (s, e) => (t) => {
|
|
|
1639
1766
|
* @returns The renderable component for the specified attribute.
|
|
1640
1767
|
*
|
|
1641
1768
|
*/
|
|
1642
|
-
get: (
|
|
1769
|
+
get: (t, e) => (s) => d.is(s) ? Mt(e, s) : Dt(e, s)
|
|
1643
1770
|
}
|
|
1644
1771
|
);
|
|
1645
1772
|
export {
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1773
|
+
F as ATTRS_PLACEHOLDER_ATTR,
|
|
1774
|
+
Kt as Async,
|
|
1775
|
+
cs as BindChecked,
|
|
1776
|
+
ns as BindDate,
|
|
1777
|
+
is as BindDateTime,
|
|
1778
|
+
os as BindNumber,
|
|
1779
|
+
ls as BindText,
|
|
1780
|
+
P as BrowserContext,
|
|
1781
|
+
V as CLASS_PLACEHOLDER_ATTR,
|
|
1782
|
+
v as Computed,
|
|
1783
|
+
fs as Conjunction,
|
|
1784
|
+
ms as DOMNode,
|
|
1785
|
+
_e as El,
|
|
1786
|
+
Ae as ElNS,
|
|
1787
|
+
D as ElementPosition,
|
|
1788
|
+
A as Empty,
|
|
1789
|
+
bt as Ensure,
|
|
1790
|
+
Ct as ForEach,
|
|
1791
|
+
g as Fragment,
|
|
1792
|
+
q as HTML_PLACEHOLDER_ATTR,
|
|
1793
|
+
Bt as HeadlessAdapter,
|
|
1794
|
+
x as HeadlessContext,
|
|
1795
|
+
ct as HeadlessElement,
|
|
1796
|
+
ye as HeadlessPortal,
|
|
1797
|
+
at as HeadlessText,
|
|
1798
|
+
Et as LazyUnless,
|
|
1799
|
+
Pe as LazyWhen,
|
|
1800
|
+
_s as MapSignal,
|
|
1801
|
+
oe as MemoryStore,
|
|
1802
|
+
pe as NODE_PLACEHOLDER_ATTR,
|
|
1803
|
+
As as NotEmpty,
|
|
1804
|
+
vt as OnBrowserCtx,
|
|
1805
|
+
mt as OnChecked,
|
|
1806
|
+
gs as OnCtx,
|
|
1807
|
+
U as OnDispose,
|
|
1808
|
+
ws as OnElement,
|
|
1809
|
+
Ts as OnHeadlessCtx,
|
|
1810
|
+
z as OneOf,
|
|
1811
|
+
Ee as OneOfField,
|
|
1812
|
+
as as OneOfKind,
|
|
1813
|
+
us as OneOfTuple,
|
|
1814
|
+
hs as OneOfType,
|
|
1815
|
+
At as OneOfValue,
|
|
1816
|
+
Ss as Portal,
|
|
1817
|
+
k as Prop,
|
|
1818
|
+
bs as Provide,
|
|
1819
|
+
Cs as ProvideGlobalProbe,
|
|
1820
|
+
Lt as ProvideProbe,
|
|
1821
|
+
de as ProviderNotFoundError,
|
|
1822
|
+
Ge as RenderingError,
|
|
1823
|
+
xe as Repeat,
|
|
1824
|
+
j as STYLE_PLACEHOLDER_ATTR,
|
|
1692
1825
|
d as Signal,
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1826
|
+
B as TEXT_PLACEHOLDER_ATTR,
|
|
1827
|
+
Se as Task,
|
|
1828
|
+
Ut as TextNode,
|
|
1829
|
+
ys as Unless,
|
|
1830
|
+
ds as Use,
|
|
1831
|
+
vs as UseGlobalProbe,
|
|
1832
|
+
Ot as UseProbe,
|
|
1833
|
+
St as UseProvider,
|
|
1834
|
+
ps as UseProviders,
|
|
1701
1835
|
p as Value,
|
|
1702
1836
|
ve as When,
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1837
|
+
xt as WithProvider,
|
|
1838
|
+
Es as WithProviders,
|
|
1839
|
+
Je as _getSelfOrParentElement,
|
|
1840
|
+
fe as _isElement,
|
|
1841
|
+
We as _makeGetter,
|
|
1842
|
+
Ue as _makeSetter,
|
|
1843
|
+
R as _removeDOMNode,
|
|
1844
|
+
we as _signalText,
|
|
1845
|
+
Te as _staticText,
|
|
1846
|
+
Rt as animateSignal,
|
|
1847
|
+
Fe as animateSignals,
|
|
1848
|
+
Jt as aria,
|
|
1849
|
+
L as attr,
|
|
1850
|
+
Wt as dataAttr,
|
|
1851
|
+
es as emitChecked,
|
|
1852
|
+
ts as emitPreventDefault,
|
|
1853
|
+
rs as emitStopImmediatePropagation,
|
|
1854
|
+
ss as emitStopPropagation,
|
|
1855
|
+
yt as emitValue,
|
|
1856
|
+
wt as emitValueAsDate,
|
|
1857
|
+
_t as emitValueAsDateTime,
|
|
1858
|
+
Tt as emitValueAsNumber,
|
|
1859
|
+
Ve as endInterpolate,
|
|
1860
|
+
ie as getWindow,
|
|
1861
|
+
je as guessInterpolate,
|
|
1862
|
+
Xt as html,
|
|
1863
|
+
Yt as input,
|
|
1864
|
+
Re as interpolateDate,
|
|
1865
|
+
ke as interpolateNumber,
|
|
1866
|
+
Ne as interpolateString,
|
|
1867
|
+
kt as localStorageProp,
|
|
1868
|
+
Q as makeComputed,
|
|
1869
|
+
$t as makeComputedOf,
|
|
1870
|
+
Vt as makeComputedRecord,
|
|
1871
|
+
Be as makeEffect,
|
|
1872
|
+
It as makeEffectOf,
|
|
1873
|
+
N as makeProp,
|
|
1874
|
+
Pt as makeProviderMark,
|
|
1875
|
+
J as makeSignal,
|
|
1876
|
+
Zt as math,
|
|
1877
|
+
zt as mathAttr,
|
|
1878
|
+
G as on,
|
|
1879
|
+
Oe as probeMarker,
|
|
1880
|
+
jt as render,
|
|
1881
|
+
Z as renderWithContext,
|
|
1882
|
+
f as renderableOfTNode,
|
|
1883
|
+
Ft as restoreTempoPlaceholders,
|
|
1884
|
+
qt as runHeadless,
|
|
1885
|
+
Nt as sessionStorageProp,
|
|
1886
|
+
le as storedProp,
|
|
1887
|
+
Ps as style,
|
|
1888
|
+
Qt as svg,
|
|
1889
|
+
Gt as svgAttr
|
|
1755
1890
|
};
|