@jasonshimmy/custom-elements-runtime 2.2.2 → 2.2.3
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.
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
import { g as K, t as q, i as
|
|
2
|
-
import { c as
|
|
1
|
+
import { g as K, t as q, i as j, s as Me, a as P, b as z, d as Fe, f as nt, h as qe, j as ve, k as Ge, l as ut } from "./helpers-CDfJhmMS.js";
|
|
2
|
+
import { c as an, r as ln, u as fn, w as un } from "./helpers-CDfJhmMS.js";
|
|
3
3
|
import { d as B, a as Z } from "./logger-BpibrmKL.js";
|
|
4
|
-
import { j as
|
|
4
|
+
import { j as pt, g as Ne, a as ae, m as Ee, s as dt, b as Ze } from "./transitions-m6FraTTL.js";
|
|
5
5
|
import { c as dn } from "./transitions-m6FraTTL.js";
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
for (const [
|
|
6
|
+
function ht(e, r, t) {
|
|
7
|
+
if (t)
|
|
8
|
+
for (const [n, s] of Object.entries(t)) {
|
|
9
9
|
let o, i = {};
|
|
10
|
-
if (Array.isArray(s) ? (o = s[0], i = s[1] || {}) : o = s, r.set(
|
|
10
|
+
if (Array.isArray(s) ? (o = s[0], i = s[1] || {}) : o = s, r.set(n, {
|
|
11
11
|
callback: o,
|
|
12
12
|
options: i,
|
|
13
|
-
oldValue: K(e,
|
|
13
|
+
oldValue: K(e, n)
|
|
14
14
|
}), i.immediate)
|
|
15
15
|
try {
|
|
16
|
-
const c = K(e,
|
|
16
|
+
const c = K(e, n);
|
|
17
17
|
o(c, void 0, e);
|
|
18
18
|
} catch (c) {
|
|
19
|
-
B(`Error in immediate watcher for "${
|
|
19
|
+
B(`Error in immediate watcher for "${n}":`, c);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function yt(e, r, t, n) {
|
|
24
24
|
const s = (i, c) => {
|
|
25
25
|
if (i === c) return !0;
|
|
26
26
|
if (typeof i != typeof c || typeof i != "object" || i === null || c === null) return !1;
|
|
27
27
|
if (Array.isArray(i) && Array.isArray(c))
|
|
28
|
-
return i.length !== c.length ? !1 : i.every((a,
|
|
29
|
-
const
|
|
30
|
-
return _.length !== E.length ? !1 : _.every((a) => s(
|
|
31
|
-
}, o = r.get(
|
|
32
|
-
if (o && !s(
|
|
28
|
+
return i.length !== c.length ? !1 : i.every((a, g) => s(a, c[g]));
|
|
29
|
+
const u = i, p = c, _ = Object.keys(u || {}), E = Object.keys(p || {});
|
|
30
|
+
return _.length !== E.length ? !1 : _.every((a) => s(u[a], p[a]));
|
|
31
|
+
}, o = r.get(t);
|
|
32
|
+
if (o && !s(n, o.oldValue))
|
|
33
33
|
try {
|
|
34
|
-
o.callback(
|
|
34
|
+
o.callback(n, o.oldValue, e), o.oldValue = n;
|
|
35
35
|
} catch (i) {
|
|
36
|
-
B(`Error in watcher for "${
|
|
36
|
+
B(`Error in watcher for "${t}":`, i);
|
|
37
37
|
}
|
|
38
38
|
for (const [i, c] of r.entries())
|
|
39
|
-
if (c.options.deep &&
|
|
39
|
+
if (c.options.deep && t.startsWith(i + "."))
|
|
40
40
|
try {
|
|
41
|
-
const
|
|
42
|
-
s(
|
|
43
|
-
} catch (
|
|
44
|
-
B(`Error in deep watcher for "${i}":`,
|
|
41
|
+
const u = K(e, i);
|
|
42
|
+
s(u, c.oldValue) || (c.callback(u, c.oldValue, e), c.oldValue = u);
|
|
43
|
+
} catch (u) {
|
|
44
|
+
B(`Error in deep watcher for "${i}":`, u);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function xe(e, r) {
|
|
48
48
|
return r === Boolean ? e === "" || e === "true" : r === Number ? Number(e) : e;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function mt(e, r, t) {
|
|
51
51
|
if (r)
|
|
52
|
-
for (const
|
|
53
|
-
const s = r[
|
|
54
|
-
if (s.type === Function && typeof e[
|
|
55
|
-
n
|
|
52
|
+
for (const n in r) {
|
|
53
|
+
const s = r[n], o = q(n), i = e.getAttribute(o);
|
|
54
|
+
if (s.type === Function && typeof e[n] == "function")
|
|
55
|
+
t[n] = e[n];
|
|
56
56
|
else if (i !== null)
|
|
57
|
-
n
|
|
58
|
-
else if (typeof e[
|
|
57
|
+
t[n] = xe(i, s.type);
|
|
58
|
+
else if (typeof e[n] < "u")
|
|
59
59
|
try {
|
|
60
|
-
const c = e[
|
|
60
|
+
const c = e[n];
|
|
61
61
|
if (s.type === String && c && typeof c == "object")
|
|
62
62
|
try {
|
|
63
|
-
n
|
|
63
|
+
t[n] = xe(String(c), s.type);
|
|
64
64
|
} catch {
|
|
65
|
-
n
|
|
65
|
+
t[n] = c;
|
|
66
66
|
}
|
|
67
|
-
else s.type === Boolean && typeof c == "boolean" || s.type === Number && typeof c == "number" || s.type === Function && typeof c == "function" ? n
|
|
67
|
+
else s.type === Boolean && typeof c == "boolean" || s.type === Number && typeof c == "number" || s.type === Function && typeof c == "function" ? t[n] = c : t[n] = xe(String(c), s.type);
|
|
68
68
|
} catch {
|
|
69
|
-
n
|
|
69
|
+
t[n] = e[n];
|
|
70
70
|
}
|
|
71
|
-
else "default" in s && s.default !== void 0 && (n
|
|
71
|
+
else "default" in s && s.default !== void 0 && (t[n] = s.default);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function gt(e, r, t) {
|
|
75
75
|
if (!r.props) {
|
|
76
76
|
try {
|
|
77
|
-
const
|
|
77
|
+
const n = t?._hookCallbacks?.props || {}, s = Array.from(
|
|
78
78
|
/* @__PURE__ */ new Set([
|
|
79
79
|
...Object.keys(e || {}),
|
|
80
|
-
...Object.keys(
|
|
80
|
+
...Object.keys(n || {})
|
|
81
81
|
])
|
|
82
82
|
);
|
|
83
83
|
for (const o of s) {
|
|
84
84
|
if (typeof o != "string" || o.startsWith("_")) continue;
|
|
85
|
-
const i = Object.getOwnPropertyDescriptor(
|
|
85
|
+
const i = Object.getOwnPropertyDescriptor(t, o);
|
|
86
86
|
if (!(!Object.prototype.hasOwnProperty.call(
|
|
87
|
-
|
|
87
|
+
n,
|
|
88
88
|
o
|
|
89
89
|
) && i && (i.get || i.set || !i.configurable)))
|
|
90
90
|
try {
|
|
91
|
-
Object.defineProperty(
|
|
91
|
+
Object.defineProperty(t, o, {
|
|
92
92
|
enumerable: !0,
|
|
93
93
|
configurable: !0,
|
|
94
94
|
get() {
|
|
95
95
|
try {
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
-
return
|
|
96
|
+
const u = q(o), p = e.getAttribute(u);
|
|
97
|
+
if (p !== null)
|
|
98
|
+
return p;
|
|
99
99
|
const _ = e[o];
|
|
100
100
|
let E;
|
|
101
|
-
return
|
|
101
|
+
return j(_) || _ && typeof _ == "object" && "value" in _ && !(_ instanceof Node) ? E = _.value : E = _, E;
|
|
102
102
|
} catch {
|
|
103
103
|
return e[o];
|
|
104
104
|
}
|
|
@@ -111,18 +111,18 @@ function mt(e, r, n) {
|
|
|
111
111
|
}
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
mt(e, r.props, t);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
e.onConnected && !
|
|
116
|
+
function bt(e, r, t, n) {
|
|
117
|
+
e.onConnected && !t && (e.onConnected(r), n(!0));
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
e.onDisconnected && e.onDisconnected(r),
|
|
119
|
+
function vt(e, r, t, n, s, o, i, c) {
|
|
120
|
+
e.onDisconnected && e.onDisconnected(r), t.forEach((u) => u()), n(), s(), o(!1), i(null), c(!1);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
e.onAttributeChanged && e.onAttributeChanged(r,
|
|
122
|
+
function Et(e, r, t, n, s) {
|
|
123
|
+
e.onAttributeChanged && e.onAttributeChanged(r, t, n, s);
|
|
124
124
|
}
|
|
125
|
-
class
|
|
125
|
+
class _t {
|
|
126
126
|
static cache = /* @__PURE__ */ new Map();
|
|
127
127
|
static maxCacheSize = 1e3;
|
|
128
128
|
// Dangerous patterns to block
|
|
@@ -143,18 +143,18 @@ class Et {
|
|
|
143
143
|
/fetch/i,
|
|
144
144
|
/XMLHttpRequest/i
|
|
145
145
|
];
|
|
146
|
-
static evaluate(r,
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
if (!
|
|
146
|
+
static evaluate(r, t) {
|
|
147
|
+
const n = this.cache.get(r);
|
|
148
|
+
if (n) {
|
|
149
|
+
if (!n.isSecure) {
|
|
150
150
|
Z("Blocked cached dangerous expression:", r);
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
153
|
try {
|
|
154
|
-
this.cache.delete(r), this.cache.set(r,
|
|
154
|
+
this.cache.delete(r), this.cache.set(r, n);
|
|
155
155
|
} catch {
|
|
156
156
|
}
|
|
157
|
-
return
|
|
157
|
+
return n.evaluator(t);
|
|
158
158
|
}
|
|
159
159
|
const s = this.createEvaluator(r);
|
|
160
160
|
if (this.cache.size >= this.maxCacheSize) {
|
|
@@ -165,7 +165,7 @@ class Et {
|
|
|
165
165
|
Z("Blocked dangerous expression:", r);
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
return s.evaluator(
|
|
168
|
+
return s.evaluator(t);
|
|
169
169
|
}
|
|
170
170
|
static createEvaluator(r) {
|
|
171
171
|
if (this.hasDangerousPatterns(r))
|
|
@@ -176,33 +176,33 @@ class Et {
|
|
|
176
176
|
}, isSecure: !1 };
|
|
177
177
|
try {
|
|
178
178
|
return { evaluator: this.createSafeEvaluator(r), isSecure: !0 };
|
|
179
|
-
} catch (
|
|
180
|
-
return Z("Failed to create evaluator for expression:", r,
|
|
179
|
+
} catch (t) {
|
|
180
|
+
return Z("Failed to create evaluator for expression:", r, t), { evaluator: () => {
|
|
181
181
|
}, isSecure: !1 };
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
static hasDangerousPatterns(r) {
|
|
185
|
-
return this.dangerousPatterns.some((
|
|
185
|
+
return this.dangerousPatterns.some((t) => t.test(r));
|
|
186
186
|
}
|
|
187
187
|
static createSafeEvaluator(r) {
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
188
|
+
const t = r.trim();
|
|
189
|
+
if (t.startsWith("{") && t.endsWith("}"))
|
|
190
190
|
return this.createObjectEvaluator(r);
|
|
191
191
|
if (/^ctx\.[a-zA-Z0-9_.]+$/.test(r.trim())) {
|
|
192
|
-
const
|
|
193
|
-
return (s) => K(s,
|
|
192
|
+
const n = r.trim().slice(4);
|
|
193
|
+
return (s) => K(s, n);
|
|
194
194
|
}
|
|
195
|
-
return r.includes("ctx") || /[+\-*/%<>=&|?:[\]]/.test(r) ? this.createSimpleEvaluator(r) : (
|
|
195
|
+
return r.includes("ctx") || /[+\-*/%<>=&|?:[\]]/.test(r) ? this.createSimpleEvaluator(r) : (n) => K(n, r);
|
|
196
196
|
}
|
|
197
197
|
static createObjectEvaluator(r) {
|
|
198
|
-
const
|
|
198
|
+
const t = r.trim().slice(1, -1), n = this.parseObjectProperties(t);
|
|
199
199
|
return (s) => {
|
|
200
200
|
const o = {};
|
|
201
|
-
for (const { key: i, value: c } of
|
|
201
|
+
for (const { key: i, value: c } of n)
|
|
202
202
|
try {
|
|
203
203
|
if (c.startsWith("ctx.")) {
|
|
204
|
-
const
|
|
205
|
-
o[i] = K(s,
|
|
204
|
+
const u = c.slice(4);
|
|
205
|
+
o[i] = K(s, u);
|
|
206
206
|
} else
|
|
207
207
|
o[i] = this.evaluateSimpleValue(c, s);
|
|
208
208
|
} catch {
|
|
@@ -212,72 +212,72 @@ class Et {
|
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
static parseObjectProperties(r) {
|
|
215
|
-
const
|
|
216
|
-
for (const s of
|
|
215
|
+
const t = [], n = r.split(",");
|
|
216
|
+
for (const s of n) {
|
|
217
217
|
const o = s.indexOf(":");
|
|
218
218
|
if (o === -1) continue;
|
|
219
|
-
const i = s.slice(0, o).trim(), c = s.slice(o + 1).trim(),
|
|
220
|
-
|
|
219
|
+
const i = s.slice(0, o).trim(), c = s.slice(o + 1).trim(), u = i.replace(/^['"]|['"]$/g, "");
|
|
220
|
+
t.push({ key: u, value: c });
|
|
221
221
|
}
|
|
222
|
-
return
|
|
222
|
+
return t;
|
|
223
223
|
}
|
|
224
224
|
static createSimpleEvaluator(r) {
|
|
225
|
-
return (
|
|
225
|
+
return (t) => {
|
|
226
226
|
try {
|
|
227
|
-
let
|
|
227
|
+
let n = r;
|
|
228
228
|
const s = [];
|
|
229
|
-
|
|
229
|
+
n = n.replace(
|
|
230
230
|
/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,
|
|
231
231
|
(E) => `<<#${s.push(E) - 1}#>>`
|
|
232
232
|
);
|
|
233
|
-
const o =
|
|
233
|
+
const o = n.match(/ctx\.[\w.]+/g) || [];
|
|
234
234
|
for (const E of o) {
|
|
235
|
-
const a = E.slice(4),
|
|
236
|
-
if (
|
|
237
|
-
const
|
|
238
|
-
|
|
235
|
+
const a = E.slice(4), g = K(t, a);
|
|
236
|
+
if (g === void 0) return;
|
|
237
|
+
const f = s.push(JSON.stringify(g)) - 1;
|
|
238
|
+
n = n.replace(
|
|
239
239
|
new RegExp(E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
240
|
-
`<<#${
|
|
240
|
+
`<<#${f}#>>`
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
|
-
const i = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c =
|
|
243
|
+
const i = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = n.match(i) || [];
|
|
244
244
|
for (const E of c) {
|
|
245
245
|
if (E.startsWith("ctx.")) continue;
|
|
246
|
-
const a = K(
|
|
246
|
+
const a = K(t, E);
|
|
247
247
|
if (a === void 0) return;
|
|
248
|
-
const
|
|
249
|
-
|
|
248
|
+
const g = s.push(JSON.stringify(a)) - 1;
|
|
249
|
+
n = n.replace(
|
|
250
250
|
new RegExp(E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
251
|
-
`<<#${
|
|
251
|
+
`<<#${g}#>>`
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
|
-
const
|
|
255
|
-
let
|
|
254
|
+
const u = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
|
|
255
|
+
let p;
|
|
256
256
|
const _ = /* @__PURE__ */ new Set();
|
|
257
|
-
for (; (
|
|
258
|
-
const E =
|
|
257
|
+
for (; (p = u.exec(n)) !== null; ) {
|
|
258
|
+
const E = p[1];
|
|
259
259
|
if (["true", "false", "null", "undefined"].includes(E) || /^[0-9]+$/.test(E) || E === "ctx" || _.has(E)) continue;
|
|
260
260
|
_.add(E);
|
|
261
|
-
const a = K(
|
|
261
|
+
const a = K(t, E);
|
|
262
262
|
if (a === void 0) return;
|
|
263
|
-
const
|
|
264
|
-
E.includes(".") ?
|
|
263
|
+
const g = JSON.stringify(a), f = s.push(g) - 1;
|
|
264
|
+
E.includes(".") ? n = n.replace(
|
|
265
265
|
new RegExp(E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
266
|
-
`<<#${
|
|
267
|
-
) :
|
|
266
|
+
`<<#${f}#>>`
|
|
267
|
+
) : n = n.replace(
|
|
268
268
|
new RegExp(
|
|
269
269
|
"\\b" + E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b",
|
|
270
270
|
"g"
|
|
271
271
|
),
|
|
272
|
-
`<<#${
|
|
272
|
+
`<<#${f}#>>`
|
|
273
273
|
);
|
|
274
274
|
}
|
|
275
|
-
|
|
275
|
+
n = n.replace(
|
|
276
276
|
/<<#(\d+)#>>/g,
|
|
277
277
|
(E, a) => s[Number(a)]
|
|
278
278
|
);
|
|
279
279
|
try {
|
|
280
|
-
return this.evaluateBasicExpression(
|
|
280
|
+
return this.evaluateBasicExpression(n);
|
|
281
281
|
} catch {
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
@@ -292,13 +292,13 @@ class Et {
|
|
|
292
292
|
* arithmetic (+ - * / %), comparisons, logical && and ||, parentheses, and ternary `a ? b : c`.
|
|
293
293
|
*/
|
|
294
294
|
static evaluateBasicExpression(r) {
|
|
295
|
-
const
|
|
296
|
-
let
|
|
295
|
+
const t = this.tokenize(r);
|
|
296
|
+
let n = 0;
|
|
297
297
|
function s() {
|
|
298
|
-
return n
|
|
298
|
+
return t[n];
|
|
299
299
|
}
|
|
300
300
|
function o(l) {
|
|
301
|
-
const v = n
|
|
301
|
+
const v = t[n++];
|
|
302
302
|
if (l && !v)
|
|
303
303
|
throw new Error(`Unexpected token EOF, expected ${l}`);
|
|
304
304
|
if (l && v && v.type !== l && v.value !== l)
|
|
@@ -308,7 +308,7 @@ class Et {
|
|
|
308
308
|
return v;
|
|
309
309
|
}
|
|
310
310
|
function i() {
|
|
311
|
-
return
|
|
311
|
+
return f();
|
|
312
312
|
}
|
|
313
313
|
function c(l) {
|
|
314
314
|
if (typeof l == "number") return l;
|
|
@@ -317,10 +317,10 @@ class Et {
|
|
|
317
317
|
const v = Number(l);
|
|
318
318
|
return Number.isNaN(v) ? NaN : v;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function u(l, v) {
|
|
321
321
|
return typeof l == "string" || typeof v == "string" ? String(l) + String(v) : c(l) + c(v);
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function p(l, v) {
|
|
324
324
|
return c(l) - c(v);
|
|
325
325
|
}
|
|
326
326
|
function _(l, v) {
|
|
@@ -332,7 +332,7 @@ class Et {
|
|
|
332
332
|
function a(l, v) {
|
|
333
333
|
return c(l) % c(v);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function g(l, v, y) {
|
|
336
336
|
if (typeof v == "number" && typeof y == "number")
|
|
337
337
|
switch (l) {
|
|
338
338
|
case ">":
|
|
@@ -346,22 +346,22 @@ class Et {
|
|
|
346
346
|
default:
|
|
347
347
|
return !1;
|
|
348
348
|
}
|
|
349
|
-
const h = String(v),
|
|
349
|
+
const h = String(v), C = String(y);
|
|
350
350
|
switch (l) {
|
|
351
351
|
case ">":
|
|
352
|
-
return h >
|
|
352
|
+
return h > C;
|
|
353
353
|
case "<":
|
|
354
|
-
return h <
|
|
354
|
+
return h < C;
|
|
355
355
|
case ">=":
|
|
356
|
-
return h >=
|
|
356
|
+
return h >= C;
|
|
357
357
|
case "<=":
|
|
358
|
-
return h <=
|
|
358
|
+
return h <= C;
|
|
359
359
|
default:
|
|
360
360
|
return !1;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
const l =
|
|
363
|
+
function f() {
|
|
364
|
+
const l = m(), v = s();
|
|
365
365
|
if (v && v.value === "?") {
|
|
366
366
|
o("?");
|
|
367
367
|
const y = i();
|
|
@@ -371,18 +371,18 @@ class Et {
|
|
|
371
371
|
}
|
|
372
372
|
return l;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
let l =
|
|
374
|
+
function m() {
|
|
375
|
+
let l = d();
|
|
376
376
|
for (; ; ) {
|
|
377
377
|
const v = s();
|
|
378
378
|
if (!v || v.value !== "||") break;
|
|
379
379
|
o("OP");
|
|
380
|
-
const y =
|
|
380
|
+
const y = d();
|
|
381
381
|
l = l || y;
|
|
382
382
|
}
|
|
383
383
|
return l;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function d() {
|
|
386
386
|
let l = T();
|
|
387
387
|
for (; ; ) {
|
|
388
388
|
const v = s();
|
|
@@ -394,11 +394,11 @@ class Et {
|
|
|
394
394
|
return l;
|
|
395
395
|
}
|
|
396
396
|
function T() {
|
|
397
|
-
let l =
|
|
397
|
+
let l = S();
|
|
398
398
|
for (; ; ) {
|
|
399
399
|
const v = s();
|
|
400
400
|
if (!v || !["==", "!=", "===", "!=="].includes(v.value)) break;
|
|
401
|
-
const y = o("OP").value, h =
|
|
401
|
+
const y = o("OP").value, h = S();
|
|
402
402
|
switch (y) {
|
|
403
403
|
case "==":
|
|
404
404
|
l = l == h;
|
|
@@ -416,7 +416,7 @@ class Et {
|
|
|
416
416
|
}
|
|
417
417
|
return l;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function S() {
|
|
420
420
|
let l = b();
|
|
421
421
|
for (; ; ) {
|
|
422
422
|
const v = s();
|
|
@@ -424,16 +424,16 @@ class Et {
|
|
|
424
424
|
const y = o("OP").value, h = b();
|
|
425
425
|
switch (y) {
|
|
426
426
|
case ">":
|
|
427
|
-
l =
|
|
427
|
+
l = g(">", l, h);
|
|
428
428
|
break;
|
|
429
429
|
case "<":
|
|
430
|
-
l =
|
|
430
|
+
l = g("<", l, h);
|
|
431
431
|
break;
|
|
432
432
|
case ">=":
|
|
433
|
-
l =
|
|
433
|
+
l = g(">=", l, h);
|
|
434
434
|
break;
|
|
435
435
|
case "<=":
|
|
436
|
-
l =
|
|
436
|
+
l = g("<=", l, h);
|
|
437
437
|
break;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
@@ -445,7 +445,7 @@ class Et {
|
|
|
445
445
|
const v = s();
|
|
446
446
|
if (!v || v.value !== "+" && v.value !== "-") break;
|
|
447
447
|
const y = o("OP").value, h = k();
|
|
448
|
-
l = y === "+" ?
|
|
448
|
+
l = y === "+" ? u(l, h) : p(l, h);
|
|
449
449
|
}
|
|
450
450
|
return l;
|
|
451
451
|
}
|
|
@@ -477,7 +477,7 @@ class Et {
|
|
|
477
477
|
if (l && l.value === "-") {
|
|
478
478
|
o("OP");
|
|
479
479
|
const v = w();
|
|
480
|
-
return
|
|
480
|
+
return p(0, v);
|
|
481
481
|
}
|
|
482
482
|
return L();
|
|
483
483
|
}
|
|
@@ -513,21 +513,21 @@ class Et {
|
|
|
513
513
|
return i();
|
|
514
514
|
}
|
|
515
515
|
static tokenize(r) {
|
|
516
|
-
const
|
|
516
|
+
const t = [], n = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
|
|
517
517
|
let s;
|
|
518
|
-
for (; (s =
|
|
518
|
+
for (; (s = n.exec(r)) !== null; ) {
|
|
519
519
|
const o = s[1];
|
|
520
|
-
o && (/^\d/.test(o) ?
|
|
520
|
+
o && (/^\d/.test(o) ? t.push({ type: "NUMBER", value: o }) : /^"/.test(o) || /^'/.test(o) ? t.push({ type: "STRING", value: o }) : /^[a-zA-Z_]/.test(o) ? t.push({ type: "IDENT", value: o }) : /^[()?:,[\]]$/.test(o) ? t.push({ type: "PUNC", value: o }) : t.push({ type: "OP", value: o }));
|
|
521
521
|
}
|
|
522
|
-
return
|
|
522
|
+
return t;
|
|
523
523
|
}
|
|
524
|
-
static evaluateSimpleValue(r,
|
|
524
|
+
static evaluateSimpleValue(r, t) {
|
|
525
525
|
if (r === "true") return !0;
|
|
526
526
|
if (r === "false") return !1;
|
|
527
527
|
if (!isNaN(Number(r))) return Number(r);
|
|
528
528
|
if (r.startsWith("ctx.")) {
|
|
529
|
-
const
|
|
530
|
-
return K(
|
|
529
|
+
const n = r.slice(4);
|
|
530
|
+
return K(t, n);
|
|
531
531
|
}
|
|
532
532
|
return r.startsWith('"') && r.endsWith('"') || r.startsWith("'") && r.endsWith("'") ? r.slice(1, -1) : r;
|
|
533
533
|
}
|
|
@@ -543,14 +543,14 @@ class Y {
|
|
|
543
543
|
/**
|
|
544
544
|
* Add an event listener with automatic cleanup tracking
|
|
545
545
|
*/
|
|
546
|
-
static addListener(r,
|
|
547
|
-
r.addEventListener(
|
|
546
|
+
static addListener(r, t, n, s) {
|
|
547
|
+
r.addEventListener(t, n, s);
|
|
548
548
|
const i = {
|
|
549
|
-
event:
|
|
550
|
-
handler:
|
|
551
|
-
wrapper:
|
|
549
|
+
event: t,
|
|
550
|
+
handler: n,
|
|
551
|
+
wrapper: n,
|
|
552
552
|
options: s,
|
|
553
|
-
cleanup: () => r.removeEventListener(
|
|
553
|
+
cleanup: () => r.removeEventListener(t, n, s),
|
|
554
554
|
addedAt: Date.now()
|
|
555
555
|
};
|
|
556
556
|
this.cleanupFunctions.has(r) || this.cleanupFunctions.set(r, []);
|
|
@@ -560,13 +560,13 @@ class Y {
|
|
|
560
560
|
/**
|
|
561
561
|
* Remove a specific event listener
|
|
562
562
|
*/
|
|
563
|
-
static removeListener(r,
|
|
564
|
-
r.removeEventListener(
|
|
563
|
+
static removeListener(r, t, n, s) {
|
|
564
|
+
r.removeEventListener(t, n, s);
|
|
565
565
|
const o = this.cleanupFunctions.get(r);
|
|
566
566
|
if (o)
|
|
567
567
|
for (let i = 0; i < o.length; i++) {
|
|
568
568
|
const c = o[i];
|
|
569
|
-
if (c.event ===
|
|
569
|
+
if (c.event === t && c.handler === n) {
|
|
570
570
|
o.splice(i, 1), o.length === 0 && this.cleanupFunctions.delete(r);
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
@@ -576,10 +576,10 @@ class Y {
|
|
|
576
576
|
* Clean up all event listeners for an element
|
|
577
577
|
*/
|
|
578
578
|
static cleanup(r) {
|
|
579
|
-
const
|
|
580
|
-
|
|
579
|
+
const t = this.cleanupFunctions.get(r);
|
|
580
|
+
t && (t.forEach((n) => {
|
|
581
581
|
try {
|
|
582
|
-
|
|
582
|
+
n.cleanup();
|
|
583
583
|
} catch {
|
|
584
584
|
}
|
|
585
585
|
}), this.cleanupFunctions.delete(r));
|
|
@@ -594,66 +594,66 @@ class Y {
|
|
|
594
594
|
* Check if an element has any tracked event listeners
|
|
595
595
|
*/
|
|
596
596
|
static hasListeners(r) {
|
|
597
|
-
const
|
|
598
|
-
return !!(
|
|
597
|
+
const t = this.cleanupFunctions.get(r);
|
|
598
|
+
return !!(t && t.length > 0);
|
|
599
599
|
}
|
|
600
600
|
/**
|
|
601
601
|
* Get the number of tracked event listeners for an element
|
|
602
602
|
*/
|
|
603
603
|
static getListenerCount(r) {
|
|
604
|
-
const
|
|
605
|
-
return
|
|
604
|
+
const t = this.cleanupFunctions.get(r);
|
|
605
|
+
return t ? t.length : 0;
|
|
606
606
|
}
|
|
607
607
|
/**
|
|
608
608
|
* Return listener metadata stored for the element (test/debug only)
|
|
609
609
|
*/
|
|
610
610
|
static getListenerInfo(r) {
|
|
611
|
-
const
|
|
612
|
-
return
|
|
613
|
-
event:
|
|
614
|
-
handler:
|
|
615
|
-
wrapper:
|
|
616
|
-
options:
|
|
611
|
+
const t = this.cleanupFunctions.get(r);
|
|
612
|
+
return t ? t.map((n) => ({
|
|
613
|
+
event: n.event,
|
|
614
|
+
handler: n.handler,
|
|
615
|
+
wrapper: n.wrapper,
|
|
616
|
+
options: n.options
|
|
617
617
|
})) : [];
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function Oe(e, r) {
|
|
621
621
|
return Array.isArray(e) && Array.isArray(r) ? JSON.stringify([...e].sort()) !== JSON.stringify([...r].sort()) : e !== r;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function Je(e, r, t, n, s) {
|
|
624
624
|
if (e) {
|
|
625
625
|
const o = r.value;
|
|
626
626
|
if (s && typeof o == "object" && o !== null) {
|
|
627
627
|
const i = { ...o };
|
|
628
|
-
i[s] =
|
|
628
|
+
i[s] = t, r.value = i;
|
|
629
629
|
} else
|
|
630
|
-
r.value =
|
|
630
|
+
r.value = t;
|
|
631
631
|
} else {
|
|
632
|
-
const o =
|
|
633
|
-
|
|
632
|
+
const o = n._state || n;
|
|
633
|
+
Me(o, r, t);
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function $e(e, r, t, n) {
|
|
637
637
|
if (typeof e._requestRender == "function" && e._requestRender(), typeof e._triggerWatchers == "function") {
|
|
638
|
-
const s = r ? "reactiveState" :
|
|
639
|
-
e._triggerWatchers(s,
|
|
638
|
+
const s = r ? "reactiveState" : t;
|
|
639
|
+
e._triggerWatchers(s, n);
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
const
|
|
644
|
-
detail:
|
|
642
|
+
function kt(e, r, t) {
|
|
643
|
+
const n = `update:${q(r)}`, s = `update:${r}`, o = new CustomEvent(n, {
|
|
644
|
+
detail: t,
|
|
645
645
|
bubbles: !0,
|
|
646
646
|
cancelable: !0
|
|
647
647
|
}), i = new CustomEvent(s, {
|
|
648
|
-
detail:
|
|
648
|
+
detail: t,
|
|
649
649
|
bubbles: !0,
|
|
650
650
|
cancelable: !0
|
|
651
651
|
});
|
|
652
652
|
e.dispatchEvent(o), e.dispatchEvent(i);
|
|
653
653
|
}
|
|
654
|
-
function
|
|
655
|
-
const s =
|
|
656
|
-
if (
|
|
654
|
+
function Ye(e, r, t, n) {
|
|
655
|
+
const s = t;
|
|
656
|
+
if (P(() => {
|
|
657
657
|
if (typeof e.setAttribute == "function")
|
|
658
658
|
try {
|
|
659
659
|
e[r] = s;
|
|
@@ -663,200 +663,200 @@ function Je(e, r, n, t) {
|
|
|
663
663
|
e[r] = s;
|
|
664
664
|
}), s == null || typeof s == "string" || typeof s == "number" || typeof s == "boolean") {
|
|
665
665
|
const o = z(s);
|
|
666
|
-
o !== null ?
|
|
666
|
+
o !== null ? P(() => {
|
|
667
667
|
typeof e.setAttribute == "function" && e.setAttribute(q(r), o);
|
|
668
|
-
}) :
|
|
668
|
+
}) : P(() => {
|
|
669
669
|
typeof e.removeAttribute == "function" && e.removeAttribute(q(r));
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function St(e, r, t, n) {
|
|
674
674
|
if (e) {
|
|
675
675
|
const s = r.value;
|
|
676
|
-
return
|
|
676
|
+
return n && typeof s == "object" && s !== null ? s[n] : s;
|
|
677
677
|
} else {
|
|
678
|
-
const s =
|
|
678
|
+
const s = t._state || t;
|
|
679
679
|
return K(s, r);
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function fe(e) {
|
|
683
683
|
return e ? e.split(/\s+/).filter(Boolean) : [];
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function ue(e, r) {
|
|
686
686
|
if (r.length === 0) return;
|
|
687
|
-
const
|
|
688
|
-
(
|
|
687
|
+
const t = r.filter(
|
|
688
|
+
(n) => n && !e.classList.contains(n)
|
|
689
689
|
);
|
|
690
|
-
|
|
690
|
+
t.length > 0 && e.classList.add(...t);
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function le(e, r) {
|
|
693
693
|
if (r.length === 0) return;
|
|
694
|
-
const
|
|
695
|
-
|
|
694
|
+
const t = r.filter(Boolean);
|
|
695
|
+
t.length > 0 && e.classList.remove(...t);
|
|
696
696
|
}
|
|
697
|
-
let
|
|
698
|
-
async function
|
|
699
|
-
if (!
|
|
697
|
+
let He = !1;
|
|
698
|
+
async function Ct(e, r, t = 10) {
|
|
699
|
+
if (!He) {
|
|
700
700
|
if (!e.isConnected) {
|
|
701
701
|
Z("⚠️ Element not connected to DOM, skipping style wait");
|
|
702
702
|
return;
|
|
703
703
|
}
|
|
704
|
-
for (let
|
|
704
|
+
for (let n = 0; n < t; n++) {
|
|
705
705
|
const s = window.getComputedStyle(e), o = s.transform && s.transform !== "", i = s.opacity && s.opacity !== "";
|
|
706
706
|
if (o || i) {
|
|
707
|
-
|
|
707
|
+
He = !0;
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
710
|
await new Promise(
|
|
711
711
|
(c) => requestAnimationFrame(() => c(void 0))
|
|
712
712
|
);
|
|
713
713
|
}
|
|
714
|
-
|
|
714
|
+
He = !0, Z("⚠️ Styles did not load in time for transition, continuing anyway");
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
const r = window.getComputedStyle(e),
|
|
717
|
+
function At(e) {
|
|
718
|
+
const r = window.getComputedStyle(e), t = r.transitionDuration || "0s", n = r.transitionDelay || "0s", s = (o) => {
|
|
719
719
|
const i = parseFloat(o);
|
|
720
720
|
return o.includes("ms") ? i : i * 1e3;
|
|
721
721
|
};
|
|
722
|
-
return s(
|
|
722
|
+
return s(t) + s(n);
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
return new Promise((
|
|
726
|
-
const
|
|
727
|
-
if (
|
|
728
|
-
|
|
724
|
+
function rt(e, r) {
|
|
725
|
+
return new Promise((t) => {
|
|
726
|
+
const n = r ?? At(e);
|
|
727
|
+
if (n <= 0) {
|
|
728
|
+
t();
|
|
729
729
|
return;
|
|
730
730
|
}
|
|
731
731
|
let s = !1;
|
|
732
732
|
const o = () => {
|
|
733
|
-
s || (s = !0, e.removeEventListener("transitionend", i), e.removeEventListener("transitioncancel", i),
|
|
733
|
+
s || (s = !0, e.removeEventListener("transitionend", i), e.removeEventListener("transitioncancel", i), t());
|
|
734
734
|
}, i = () => o();
|
|
735
|
-
e.addEventListener("transitionend", i), e.addEventListener("transitioncancel", i), setTimeout(o,
|
|
735
|
+
e.addEventListener("transitionend", i), e.addEventListener("transitioncancel", i), setTimeout(o, n + 50);
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
|
-
async function
|
|
739
|
-
const { classes:
|
|
740
|
-
if (
|
|
738
|
+
async function _e(e, r) {
|
|
739
|
+
const { classes: t, hooks: n, css: s, duration: o } = r;
|
|
740
|
+
if (n?.onBeforeEnter)
|
|
741
741
|
try {
|
|
742
|
-
|
|
743
|
-
} catch (
|
|
744
|
-
B("Transition onBeforeEnter error:",
|
|
742
|
+
n.onBeforeEnter(e);
|
|
743
|
+
} catch (f) {
|
|
744
|
+
B("Transition onBeforeEnter error:", f);
|
|
745
745
|
}
|
|
746
746
|
if (!s)
|
|
747
|
-
return
|
|
748
|
-
const
|
|
749
|
-
typeof
|
|
750
|
-
if (
|
|
747
|
+
return n?.onEnter ? new Promise((f) => {
|
|
748
|
+
const m = n.onEnter;
|
|
749
|
+
typeof m == "function" ? m(e, () => {
|
|
750
|
+
if (n?.onAfterEnter)
|
|
751
751
|
try {
|
|
752
|
-
|
|
753
|
-
} catch (
|
|
754
|
-
B("Transition onAfterEnter error:",
|
|
752
|
+
n.onAfterEnter(e);
|
|
753
|
+
} catch (d) {
|
|
754
|
+
B("Transition onAfterEnter error:", d);
|
|
755
755
|
}
|
|
756
|
-
|
|
757
|
-
}) :
|
|
756
|
+
f();
|
|
757
|
+
}) : f();
|
|
758
758
|
}) : void 0;
|
|
759
|
-
const i =
|
|
760
|
-
|
|
761
|
-
let
|
|
762
|
-
if (
|
|
763
|
-
const
|
|
764
|
-
|
|
759
|
+
const i = fe(t?.enterFrom), c = fe(t?.enterActive), u = fe(t?.enterTo);
|
|
760
|
+
ue(e, i), e.offsetHeight, ue(e, c), e.offsetHeight;
|
|
761
|
+
let p;
|
|
762
|
+
if (n?.onEnter) {
|
|
763
|
+
const f = new Promise((m) => {
|
|
764
|
+
p = m;
|
|
765
765
|
});
|
|
766
766
|
try {
|
|
767
|
-
const
|
|
768
|
-
typeof
|
|
769
|
-
|
|
767
|
+
const m = n.onEnter;
|
|
768
|
+
typeof m == "function" && m(e, () => {
|
|
769
|
+
p && p();
|
|
770
770
|
});
|
|
771
|
-
} catch (
|
|
772
|
-
B("Transition onEnter error:",
|
|
771
|
+
} catch (m) {
|
|
772
|
+
B("Transition onEnter error:", m);
|
|
773
773
|
}
|
|
774
|
-
|
|
774
|
+
p && await f;
|
|
775
775
|
}
|
|
776
776
|
await new Promise(
|
|
777
|
-
(
|
|
777
|
+
(f) => requestAnimationFrame(() => f(void 0))
|
|
778
778
|
), e.offsetHeight;
|
|
779
779
|
const _ = window.getComputedStyle(e), E = _.transform, a = _.opacity;
|
|
780
|
-
|
|
781
|
-
(
|
|
782
|
-
), e.style.transform = "", e.style.opacity = "",
|
|
783
|
-
(
|
|
780
|
+
le(e, i), E && E !== "none" && (e.style.transform = E), a && a !== "" && (e.style.opacity = a), e.offsetHeight, await new Promise(
|
|
781
|
+
(f) => requestAnimationFrame(() => f(void 0))
|
|
782
|
+
), e.style.transform = "", e.style.opacity = "", ue(e, u), e.offsetHeight, await new Promise(
|
|
783
|
+
(f) => requestAnimationFrame(() => f(void 0))
|
|
784
784
|
);
|
|
785
|
-
let
|
|
786
|
-
if (typeof o == "number" ?
|
|
785
|
+
let g;
|
|
786
|
+
if (typeof o == "number" ? g = o : o && typeof o == "object" && "enter" in o && (g = o.enter), await rt(e, g), le(e, c), n?.onAfterEnter)
|
|
787
787
|
try {
|
|
788
|
-
|
|
789
|
-
} catch (
|
|
790
|
-
B("Transition onAfterEnter error:",
|
|
788
|
+
n.onAfterEnter(e);
|
|
789
|
+
} catch (f) {
|
|
790
|
+
B("Transition onAfterEnter error:", f);
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
|
-
async function
|
|
794
|
-
const { classes:
|
|
795
|
-
if (
|
|
793
|
+
async function Ie(e, r) {
|
|
794
|
+
const { classes: t, hooks: n, css: s, duration: o } = r;
|
|
795
|
+
if (n?.onBeforeLeave)
|
|
796
796
|
try {
|
|
797
|
-
|
|
797
|
+
n.onBeforeLeave(e);
|
|
798
798
|
} catch (E) {
|
|
799
799
|
B("Transition onBeforeLeave error:", E);
|
|
800
800
|
}
|
|
801
801
|
if (!s)
|
|
802
|
-
return
|
|
803
|
-
const a =
|
|
802
|
+
return n?.onLeave ? new Promise((E) => {
|
|
803
|
+
const a = n.onLeave;
|
|
804
804
|
typeof a == "function" ? a(e, () => {
|
|
805
|
-
if (
|
|
805
|
+
if (n?.onAfterLeave)
|
|
806
806
|
try {
|
|
807
|
-
|
|
808
|
-
} catch (
|
|
809
|
-
B("Transition onAfterLeave error:",
|
|
807
|
+
n.onAfterLeave(e);
|
|
808
|
+
} catch (g) {
|
|
809
|
+
B("Transition onAfterLeave error:", g);
|
|
810
810
|
}
|
|
811
811
|
E();
|
|
812
812
|
}) : E();
|
|
813
813
|
}) : void 0;
|
|
814
|
-
const i =
|
|
815
|
-
|
|
816
|
-
let
|
|
817
|
-
if (
|
|
814
|
+
const i = fe(t?.leaveFrom), c = fe(t?.leaveActive), u = fe(t?.leaveTo);
|
|
815
|
+
ue(e, i), e.offsetHeight, ue(e, c);
|
|
816
|
+
let p;
|
|
817
|
+
if (n?.onLeave) {
|
|
818
818
|
const E = new Promise((a) => {
|
|
819
|
-
|
|
819
|
+
p = a;
|
|
820
820
|
});
|
|
821
821
|
try {
|
|
822
|
-
const a =
|
|
822
|
+
const a = n.onLeave;
|
|
823
823
|
typeof a == "function" && a(e, () => {
|
|
824
|
-
|
|
824
|
+
p && p();
|
|
825
825
|
});
|
|
826
826
|
} catch (a) {
|
|
827
827
|
B("Transition onLeave error:", a);
|
|
828
828
|
}
|
|
829
|
-
|
|
829
|
+
p && await E;
|
|
830
830
|
}
|
|
831
831
|
await new Promise(
|
|
832
832
|
(E) => requestAnimationFrame(() => E(void 0))
|
|
833
|
-
), await
|
|
833
|
+
), await Ct(e, [...i, ...c]), le(e, i), ue(e, u);
|
|
834
834
|
let _;
|
|
835
|
-
if (typeof o == "number" ? _ = o : o && typeof o == "object" && "leave" in o && (_ = o.leave), await
|
|
835
|
+
if (typeof o == "number" ? _ = o : o && typeof o == "object" && "leave" in o && (_ = o.leave), await rt(e, _), le(e, c), le(e, u), le(e, i), n?.onAfterLeave)
|
|
836
836
|
try {
|
|
837
|
-
|
|
837
|
+
n.onAfterLeave(e);
|
|
838
838
|
} catch (E) {
|
|
839
839
|
B("Transition onAfterLeave error:", E);
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
const
|
|
843
|
-
function
|
|
842
|
+
const st = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap();
|
|
843
|
+
function je(e) {
|
|
844
844
|
if (!e) return;
|
|
845
|
-
const r =
|
|
845
|
+
const r = st.get(e);
|
|
846
846
|
if (r !== void 0) return r;
|
|
847
847
|
try {
|
|
848
|
-
const
|
|
849
|
-
if (
|
|
848
|
+
const t = e;
|
|
849
|
+
if (t && t.key != null) return String(t.key);
|
|
850
850
|
} catch {
|
|
851
851
|
}
|
|
852
852
|
if (e instanceof Element) {
|
|
853
|
-
const
|
|
854
|
-
if (
|
|
853
|
+
const t = e.getAttribute("data-anchor-key");
|
|
854
|
+
if (t) return t;
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
function V(e, r) {
|
|
858
858
|
try {
|
|
859
|
-
|
|
859
|
+
st.set(e, r);
|
|
860
860
|
} catch {
|
|
861
861
|
}
|
|
862
862
|
try {
|
|
@@ -865,26 +865,26 @@ function V(e, r) {
|
|
|
865
865
|
}
|
|
866
866
|
try {
|
|
867
867
|
if (e instanceof Element) {
|
|
868
|
-
const
|
|
869
|
-
|
|
868
|
+
const t = z(r);
|
|
869
|
+
t !== null && e.setAttribute("data-anchor-key", t);
|
|
870
870
|
}
|
|
871
871
|
} catch {
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function wt(e) {
|
|
875
875
|
if (!e) return;
|
|
876
|
-
const r =
|
|
876
|
+
const r = it.get(e);
|
|
877
877
|
if (r !== void 0) return r;
|
|
878
878
|
try {
|
|
879
|
-
const
|
|
880
|
-
if (
|
|
881
|
-
return
|
|
879
|
+
const t = e;
|
|
880
|
+
if (t && t._transitionGroup != null)
|
|
881
|
+
return t._transitionGroup;
|
|
882
882
|
} catch {
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Tt(e, r) {
|
|
886
886
|
try {
|
|
887
|
-
|
|
887
|
+
it.set(e, r);
|
|
888
888
|
} catch {
|
|
889
889
|
}
|
|
890
890
|
try {
|
|
@@ -892,102 +892,108 @@ function wt(e, r) {
|
|
|
892
892
|
} catch {
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function pe(e) {
|
|
896
896
|
return e !== null && typeof e == "object" && "value" in e;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function De(e) {
|
|
899
899
|
try {
|
|
900
|
-
if (
|
|
900
|
+
if (j(e)) return e.value;
|
|
901
901
|
} catch {
|
|
902
902
|
}
|
|
903
903
|
try {
|
|
904
|
-
if (
|
|
904
|
+
if (pe(e)) return e.value;
|
|
905
905
|
} catch {
|
|
906
906
|
}
|
|
907
907
|
return e;
|
|
908
908
|
}
|
|
909
|
+
function te(e, r, t) {
|
|
910
|
+
try {
|
|
911
|
+
e && e.attrs && (e.attrs[r] = t);
|
|
912
|
+
} catch {
|
|
913
|
+
}
|
|
914
|
+
}
|
|
909
915
|
function G(e) {
|
|
910
916
|
return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
|
|
911
917
|
}
|
|
912
918
|
function de(e) {
|
|
913
|
-
return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ?
|
|
919
|
+
return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ? j(e) || "value" in e ? !!e.value : !1 : !!e;
|
|
914
920
|
}
|
|
915
|
-
function
|
|
921
|
+
function ce(e, r) {
|
|
916
922
|
if (!r || !(e instanceof HTMLElement)) return;
|
|
917
923
|
Y.cleanup(e);
|
|
918
|
-
for (const
|
|
919
|
-
r[
|
|
920
|
-
const
|
|
921
|
-
for (let
|
|
922
|
-
|
|
924
|
+
for (const n in r)
|
|
925
|
+
r[n] === e && delete r[n];
|
|
926
|
+
const t = e.childNodes;
|
|
927
|
+
for (let n = 0; n < t.length; n++)
|
|
928
|
+
ce(t[n], r);
|
|
923
929
|
}
|
|
924
|
-
function
|
|
930
|
+
function ke(e, r, t) {
|
|
925
931
|
if (typeof e == "string") return;
|
|
926
|
-
const
|
|
927
|
-
if (
|
|
932
|
+
const n = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), s = e.props?.ref ?? (e.props?.props && e.props.props.ref);
|
|
933
|
+
if (n)
|
|
928
934
|
try {
|
|
929
|
-
if (
|
|
930
|
-
|
|
931
|
-
else if (typeof
|
|
932
|
-
|
|
933
|
-
else if (typeof
|
|
935
|
+
if (j(n) || typeof n == "object" && "value" in n)
|
|
936
|
+
n.value = r;
|
|
937
|
+
else if (typeof n == "function")
|
|
938
|
+
n(r);
|
|
939
|
+
else if (typeof n == "string" && t)
|
|
934
940
|
try {
|
|
935
|
-
const o = String(
|
|
936
|
-
|
|
941
|
+
const o = String(n);
|
|
942
|
+
t[o] = r;
|
|
937
943
|
} catch {
|
|
938
944
|
}
|
|
939
945
|
} catch {
|
|
940
946
|
}
|
|
941
|
-
else if (s &&
|
|
947
|
+
else if (s && t)
|
|
942
948
|
try {
|
|
943
949
|
const o = String(s);
|
|
944
|
-
|
|
950
|
+
t[o] = r;
|
|
945
951
|
} catch {
|
|
946
952
|
}
|
|
947
953
|
}
|
|
948
|
-
function
|
|
954
|
+
function Lt(e, r, t, n, s, o, i, c) {
|
|
949
955
|
if (!o) return;
|
|
950
|
-
const
|
|
951
|
-
if (
|
|
956
|
+
const u = r.includes("lazy"), p = r.includes("trim"), _ = r.includes("number"), E = () => {
|
|
957
|
+
if (j(e)) {
|
|
952
958
|
const k = e.value;
|
|
953
959
|
return c && i && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement) && typeof k == "object" && k !== null ? k[c] : k;
|
|
954
960
|
}
|
|
955
961
|
const b = o?._state || o;
|
|
956
962
|
return K(b, e);
|
|
957
963
|
}, a = E();
|
|
958
|
-
let
|
|
959
|
-
i instanceof HTMLInputElement ?
|
|
960
|
-
const
|
|
961
|
-
if (
|
|
964
|
+
let g = "text";
|
|
965
|
+
i instanceof HTMLInputElement ? g = n?.type || i.type || "text" : i instanceof HTMLSelectElement ? g = "select" : i instanceof HTMLTextAreaElement && (g = "textarea");
|
|
966
|
+
const f = i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement, d = f ? g === "checkbox" || g === "radio" ? "checked" : "value" : c ?? "modelValue";
|
|
967
|
+
if (g === "checkbox")
|
|
962
968
|
if (Array.isArray(a))
|
|
963
|
-
|
|
964
|
-
String(i?.getAttribute("value") ??
|
|
969
|
+
t[d] = a.includes(
|
|
970
|
+
String(i?.getAttribute("value") ?? n?.value ?? "")
|
|
965
971
|
);
|
|
966
972
|
else {
|
|
967
973
|
const b = i?.getAttribute("true-value") ?? !0;
|
|
968
|
-
|
|
974
|
+
t[d] = a === b;
|
|
969
975
|
}
|
|
970
|
-
else if (
|
|
971
|
-
|
|
972
|
-
else if (
|
|
976
|
+
else if (g === "radio")
|
|
977
|
+
t[d] = a === (n?.value ?? "");
|
|
978
|
+
else if (g === "select")
|
|
973
979
|
if (i && i.hasAttribute("multiple") && i instanceof HTMLSelectElement) {
|
|
974
980
|
const b = Array.isArray(a) ? a.map(String) : [];
|
|
975
981
|
setTimeout(() => {
|
|
976
982
|
Array.from(i.options).forEach((k) => {
|
|
977
983
|
k.selected = b.includes(k.value);
|
|
978
984
|
});
|
|
979
|
-
}, 0),
|
|
985
|
+
}, 0), t[d] = Array.isArray(a) ? a : [];
|
|
980
986
|
} else
|
|
981
|
-
|
|
987
|
+
t[d] = a;
|
|
982
988
|
else {
|
|
983
|
-
!
|
|
989
|
+
!f && j(e) ? t[d] = e : t[d] = a;
|
|
984
990
|
try {
|
|
985
|
-
const b = q(
|
|
986
|
-
|
|
991
|
+
const b = q(d);
|
|
992
|
+
n && (n[b] = a);
|
|
987
993
|
} catch {
|
|
988
994
|
}
|
|
989
995
|
}
|
|
990
|
-
const T =
|
|
996
|
+
const T = u || g === "checkbox" || g === "radio" || g === "select" ? "change" : "input", S = (b) => {
|
|
991
997
|
if (b.isComposing || s._isComposing)
|
|
992
998
|
return;
|
|
993
999
|
const k = globalThis.process, w = !!k && k.env?.NODE_ENV === "test" || typeof window < "u" && globalThis.__vitest__;
|
|
@@ -997,36 +1003,36 @@ function Tt(e, r, n, t, s, o, i, c) {
|
|
|
997
1003
|
if (!L || L._modelUpdating)
|
|
998
1004
|
return;
|
|
999
1005
|
let N = L.value;
|
|
1000
|
-
if (
|
|
1006
|
+
if (g === "checkbox") {
|
|
1001
1007
|
const y = E();
|
|
1002
1008
|
if (Array.isArray(y)) {
|
|
1003
|
-
const h = L.getAttribute("value") ?? "",
|
|
1009
|
+
const h = L.getAttribute("value") ?? "", C = Array.from(y);
|
|
1004
1010
|
if (L.checked)
|
|
1005
|
-
|
|
1011
|
+
C.includes(h) || C.push(h);
|
|
1006
1012
|
else {
|
|
1007
|
-
const $ =
|
|
1008
|
-
$ > -1 &&
|
|
1013
|
+
const $ = C.indexOf(h);
|
|
1014
|
+
$ > -1 && C.splice($, 1);
|
|
1009
1015
|
}
|
|
1010
|
-
N =
|
|
1016
|
+
N = C;
|
|
1011
1017
|
} else {
|
|
1012
|
-
const h = L.getAttribute("true-value") ?? !0,
|
|
1013
|
-
N = L.checked ? h :
|
|
1018
|
+
const h = L.getAttribute("true-value") ?? !0, C = L.getAttribute("false-value") ?? !1;
|
|
1019
|
+
N = L.checked ? h : C;
|
|
1014
1020
|
}
|
|
1015
|
-
} else if (
|
|
1021
|
+
} else if (g === "radio")
|
|
1016
1022
|
N = L.getAttribute("value") ?? L.value;
|
|
1017
|
-
else if (
|
|
1023
|
+
else if (g === "select" && L.multiple)
|
|
1018
1024
|
N = Array.from(L.selectedOptions).map(
|
|
1019
1025
|
(y) => y.value
|
|
1020
1026
|
);
|
|
1021
|
-
else if (
|
|
1027
|
+
else if (p && typeof N == "string" && (N = N.trim()), _) {
|
|
1022
1028
|
const y = Number(N);
|
|
1023
1029
|
isNaN(y) || (N = y);
|
|
1024
1030
|
}
|
|
1025
1031
|
const l = E();
|
|
1026
|
-
if (
|
|
1032
|
+
if (Oe(N, l)) {
|
|
1027
1033
|
L._modelUpdating = !0;
|
|
1028
1034
|
try {
|
|
1029
|
-
|
|
1035
|
+
Je(j(e), e, N, o, c), $e(o, j(e), e, N), L && kt(L, d, N);
|
|
1030
1036
|
} finally {
|
|
1031
1037
|
setTimeout(
|
|
1032
1038
|
() => L._modelUpdating = !1,
|
|
@@ -1035,14 +1041,14 @@ function Tt(e, r, n, t, s, o, i, c) {
|
|
|
1035
1041
|
}
|
|
1036
1042
|
}
|
|
1037
1043
|
};
|
|
1038
|
-
if (
|
|
1044
|
+
if (f) {
|
|
1039
1045
|
if (s[T]) {
|
|
1040
1046
|
const b = s[T];
|
|
1041
1047
|
i && Y.removeListener(i, T, b);
|
|
1042
1048
|
}
|
|
1043
|
-
s[T] =
|
|
1049
|
+
s[T] = S;
|
|
1044
1050
|
} else {
|
|
1045
|
-
const b = `update:${q(
|
|
1051
|
+
const b = `update:${q(d)}`, k = `update:${d}`;
|
|
1046
1052
|
if (s[b]) {
|
|
1047
1053
|
const w = s[b];
|
|
1048
1054
|
i && Y.removeListener(i, b, w);
|
|
@@ -1063,23 +1069,23 @@ function Tt(e, r, n, t, s, o, i, c) {
|
|
|
1063
1069
|
N = void 0;
|
|
1064
1070
|
}
|
|
1065
1071
|
}
|
|
1066
|
-
const l =
|
|
1067
|
-
|
|
1072
|
+
const l = St(
|
|
1073
|
+
j(e),
|
|
1068
1074
|
e,
|
|
1069
1075
|
o,
|
|
1070
1076
|
c
|
|
1071
1077
|
);
|
|
1072
|
-
if (
|
|
1073
|
-
|
|
1078
|
+
if (Oe(N, l)) {
|
|
1079
|
+
Je(j(e), e, N, o, c), $e(o, j(e), e, N);
|
|
1074
1080
|
const y = w.target;
|
|
1075
|
-
y &&
|
|
1081
|
+
y && Ye(
|
|
1076
1082
|
y,
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1083
|
+
d,
|
|
1084
|
+
j(e) ? e : N,
|
|
1085
|
+
j(e)
|
|
1080
1086
|
);
|
|
1081
1087
|
}
|
|
1082
|
-
},
|
|
1088
|
+
}, j(e) && typeof e.value == "object" && e.value !== null) {
|
|
1083
1089
|
let w = [];
|
|
1084
1090
|
try {
|
|
1085
1091
|
w = Reflect.ownKeys(e.value);
|
|
@@ -1092,49 +1098,49 @@ function Tt(e, r, n, t, s, o, i, c) {
|
|
|
1092
1098
|
for (const N of L) {
|
|
1093
1099
|
const l = String(N), v = `update:${q(l)}`, y = `update:${l}`;
|
|
1094
1100
|
s[v] || (s[v] = (h) => {
|
|
1095
|
-
const
|
|
1101
|
+
const C = h.detail !== void 0 ? h.detail : h.target?.value, $ = j(e) ? e.value[l] : K(
|
|
1096
1102
|
o?._state || o,
|
|
1097
1103
|
e
|
|
1098
1104
|
);
|
|
1099
|
-
if (!
|
|
1100
|
-
if (
|
|
1105
|
+
if (!Oe(C, $)) return;
|
|
1106
|
+
if (j(e)) {
|
|
1101
1107
|
const I = {
|
|
1102
1108
|
...e.value
|
|
1103
1109
|
};
|
|
1104
|
-
I[l] =
|
|
1110
|
+
I[l] = C, e.value = I;
|
|
1105
1111
|
} else
|
|
1106
|
-
|
|
1112
|
+
Me(
|
|
1107
1113
|
o?._state || o,
|
|
1108
1114
|
e,
|
|
1109
|
-
|
|
1115
|
+
C
|
|
1110
1116
|
);
|
|
1111
|
-
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1117
|
+
$e(o, j(e), e, C);
|
|
1118
|
+
const A = h.currentTarget || i || h.target;
|
|
1119
|
+
A && Ye(
|
|
1120
|
+
A,
|
|
1121
|
+
d,
|
|
1122
|
+
j(e) ? e : C,
|
|
1123
|
+
j(e)
|
|
1118
1124
|
);
|
|
1119
1125
|
}, s[y] = s[v]);
|
|
1120
1126
|
}
|
|
1121
1127
|
}
|
|
1122
1128
|
s[k] = s[b];
|
|
1123
1129
|
}
|
|
1124
|
-
(
|
|
1130
|
+
(g === "text" || g === "textarea") && (s.compositionstart = () => s._isComposing = !0, s.compositionend = (b) => {
|
|
1125
1131
|
s._isComposing = !1;
|
|
1126
1132
|
const k = b.target;
|
|
1127
1133
|
k && setTimeout(() => {
|
|
1128
1134
|
const w = k.value, L = o?._state || o, N = K(L, e);
|
|
1129
1135
|
let l = w;
|
|
1130
|
-
if (
|
|
1136
|
+
if (p && (l = l.trim()), _) {
|
|
1131
1137
|
const y = Number(l);
|
|
1132
1138
|
isNaN(y) || (l = y);
|
|
1133
1139
|
}
|
|
1134
|
-
if (
|
|
1140
|
+
if (Oe(l, N)) {
|
|
1135
1141
|
k._modelUpdating = !0;
|
|
1136
1142
|
try {
|
|
1137
|
-
|
|
1143
|
+
Me(L, e, l), $e(o, j(e), e, l);
|
|
1138
1144
|
} finally {
|
|
1139
1145
|
setTimeout(
|
|
1140
1146
|
() => k._modelUpdating = !1,
|
|
@@ -1145,144 +1151,144 @@ function Tt(e, r, n, t, s, o, i, c) {
|
|
|
1145
1151
|
}, 0);
|
|
1146
1152
|
});
|
|
1147
1153
|
}
|
|
1148
|
-
function
|
|
1154
|
+
function ot(e) {
|
|
1149
1155
|
const r = e.slice(2);
|
|
1150
1156
|
return r ? r.charAt(0).toLowerCase() + r.slice(1) : "";
|
|
1151
1157
|
}
|
|
1152
|
-
function
|
|
1158
|
+
function Nt(e, r, t, n, s) {
|
|
1153
1159
|
if (typeof e == "object" && e !== null)
|
|
1154
1160
|
for (const [o, i] of Object.entries(e))
|
|
1155
1161
|
if (o.startsWith("data-") || o.startsWith("aria-") || o === "class")
|
|
1156
|
-
|
|
1162
|
+
t[o] = i;
|
|
1157
1163
|
else if (o === "disabled" && s && G(s)) {
|
|
1158
1164
|
const c = i && typeof i == "object" && "value" in i;
|
|
1159
1165
|
(() => {
|
|
1160
1166
|
try {
|
|
1161
|
-
return
|
|
1167
|
+
return j(i);
|
|
1162
1168
|
} catch {
|
|
1163
1169
|
return !1;
|
|
1164
1170
|
}
|
|
1165
|
-
})() || c ? r[o] = i :
|
|
1171
|
+
})() || c ? r[o] = i : t[o] = i;
|
|
1166
1172
|
} else
|
|
1167
1173
|
r[o] = i;
|
|
1168
1174
|
else if (typeof e == "string") {
|
|
1169
|
-
if (!
|
|
1175
|
+
if (!n) return;
|
|
1170
1176
|
try {
|
|
1171
|
-
const o =
|
|
1177
|
+
const o = we(e, n);
|
|
1172
1178
|
if (typeof o == "object" && o !== null) {
|
|
1173
1179
|
for (const [i, c] of Object.entries(o))
|
|
1174
1180
|
if (i.startsWith("data-") || i.startsWith("aria-") || i === "class")
|
|
1175
|
-
|
|
1181
|
+
t[i] = c;
|
|
1176
1182
|
else if (i === "disabled" && s && G(s)) {
|
|
1177
|
-
const
|
|
1183
|
+
const u = c && typeof c == "object" && "value" in c;
|
|
1178
1184
|
(() => {
|
|
1179
1185
|
try {
|
|
1180
|
-
return
|
|
1186
|
+
return j(c);
|
|
1181
1187
|
} catch {
|
|
1182
1188
|
return !1;
|
|
1183
1189
|
}
|
|
1184
|
-
})() ||
|
|
1190
|
+
})() || u ? r[i] = c : t[i] = c;
|
|
1185
1191
|
} else
|
|
1186
1192
|
r[i] = c;
|
|
1187
1193
|
return;
|
|
1188
1194
|
} else {
|
|
1189
|
-
|
|
1195
|
+
t[e] = o;
|
|
1190
1196
|
return;
|
|
1191
1197
|
}
|
|
1192
1198
|
} catch {
|
|
1193
1199
|
const o = K(
|
|
1194
|
-
|
|
1200
|
+
n,
|
|
1195
1201
|
e
|
|
1196
1202
|
);
|
|
1197
|
-
|
|
1203
|
+
t[e] = o;
|
|
1198
1204
|
}
|
|
1199
1205
|
}
|
|
1200
1206
|
}
|
|
1201
|
-
function
|
|
1202
|
-
let
|
|
1207
|
+
function Ot(e, r, t) {
|
|
1208
|
+
let n;
|
|
1203
1209
|
if (typeof e == "string") {
|
|
1204
|
-
if (!
|
|
1205
|
-
|
|
1210
|
+
if (!t) return;
|
|
1211
|
+
n = we(e, t);
|
|
1206
1212
|
} else
|
|
1207
|
-
|
|
1213
|
+
n = e;
|
|
1208
1214
|
const s = String(r.style || "");
|
|
1209
1215
|
let o = s;
|
|
1210
|
-
if (
|
|
1216
|
+
if (n) {
|
|
1211
1217
|
if (s) {
|
|
1212
|
-
const i = String(s).split(";").map((
|
|
1213
|
-
(
|
|
1218
|
+
const i = String(s).split(";").map((u) => u.trim()).filter(Boolean), c = i.findIndex(
|
|
1219
|
+
(u) => u.startsWith("display:")
|
|
1214
1220
|
);
|
|
1215
1221
|
c >= 0 && i[c] === "display: none" && (i.splice(c, 1), o = i.length > 0 ? i.join("; ") + ";" : "");
|
|
1216
1222
|
}
|
|
1217
1223
|
} else if (s) {
|
|
1218
1224
|
const i = String(s).split(";").filter(Boolean), c = i.findIndex(
|
|
1219
|
-
(
|
|
1225
|
+
(u) => u.trim().startsWith("display:")
|
|
1220
1226
|
);
|
|
1221
1227
|
c >= 0 ? i[c] = "display: none" : i.push("display: none"), o = i.join("; ");
|
|
1222
1228
|
} else
|
|
1223
1229
|
o = "display: none";
|
|
1224
|
-
o !== s && (o ? r.style = o :
|
|
1230
|
+
o !== s && (o ? r.style = o : r.style = void 0);
|
|
1225
1231
|
}
|
|
1226
|
-
function
|
|
1227
|
-
return
|
|
1232
|
+
function we(e, r) {
|
|
1233
|
+
return _t.evaluate(e, r);
|
|
1228
1234
|
}
|
|
1229
|
-
function
|
|
1230
|
-
let
|
|
1235
|
+
function $t(e, r, t, n) {
|
|
1236
|
+
let s;
|
|
1231
1237
|
if (typeof e == "string") {
|
|
1232
|
-
if (!
|
|
1233
|
-
|
|
1238
|
+
if (!t) return;
|
|
1239
|
+
s = we(e, t);
|
|
1234
1240
|
} else
|
|
1235
|
-
|
|
1241
|
+
s = e;
|
|
1236
1242
|
try {
|
|
1237
|
-
if (
|
|
1238
|
-
if (
|
|
1239
|
-
|
|
1240
|
-
else if ("value" in
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1243
|
+
if (s && typeof s == "object") {
|
|
1244
|
+
if (j(s))
|
|
1245
|
+
s = s.value;
|
|
1246
|
+
else if ("value" in s && typeof s.value < "u") {
|
|
1247
|
+
const p = s.value;
|
|
1248
|
+
p instanceof Node || (s = p);
|
|
1243
1249
|
}
|
|
1244
1250
|
}
|
|
1245
1251
|
} catch {
|
|
1246
1252
|
}
|
|
1247
|
-
let
|
|
1248
|
-
if (typeof
|
|
1249
|
-
|
|
1250
|
-
else if (Array.isArray(
|
|
1251
|
-
|
|
1252
|
-
else if (typeof
|
|
1253
|
-
for (const [
|
|
1254
|
-
|
|
1255
|
-
const o = r.class || "",
|
|
1256
|
-
r.class =
|
|
1257
|
-
}
|
|
1258
|
-
function
|
|
1253
|
+
let o = [];
|
|
1254
|
+
if (typeof s == "string")
|
|
1255
|
+
o = [s];
|
|
1256
|
+
else if (Array.isArray(s))
|
|
1257
|
+
o = s.filter(Boolean);
|
|
1258
|
+
else if (typeof s == "object" && s !== null)
|
|
1259
|
+
for (const [p, _] of Object.entries(s))
|
|
1260
|
+
_ && o.push(p);
|
|
1261
|
+
const i = o.join(" "), c = n && n.class || r.class || "", u = c ? `${c} ${i}`.trim() : i.trim();
|
|
1262
|
+
u ? r.class = u : r.class = void 0;
|
|
1263
|
+
}
|
|
1264
|
+
function We(e) {
|
|
1259
1265
|
if (e === !0 || e === !1) return !0;
|
|
1260
1266
|
if (e == null) return !1;
|
|
1261
1267
|
if (typeof e === "string") return e === "" || e === "true" || e === "false";
|
|
1262
1268
|
try {
|
|
1263
1269
|
if (e && typeof e == "object" && "value" in e) {
|
|
1264
|
-
const
|
|
1265
|
-
return
|
|
1270
|
+
const t = e.value, n = typeof t;
|
|
1271
|
+
return n === "boolean" ? !0 : n === "string" ? t === "" || t === "true" || t === "false" : !1;
|
|
1266
1272
|
}
|
|
1267
1273
|
} catch {
|
|
1268
1274
|
}
|
|
1269
1275
|
return !1;
|
|
1270
1276
|
}
|
|
1271
|
-
function
|
|
1272
|
-
let
|
|
1277
|
+
function jt(e, r, t) {
|
|
1278
|
+
let n;
|
|
1273
1279
|
if (typeof e == "string") {
|
|
1274
|
-
if (!
|
|
1275
|
-
|
|
1280
|
+
if (!t) return;
|
|
1281
|
+
n = we(e, t);
|
|
1276
1282
|
} else
|
|
1277
|
-
|
|
1283
|
+
n = e;
|
|
1278
1284
|
let s = "";
|
|
1279
|
-
if (typeof
|
|
1280
|
-
s =
|
|
1281
|
-
else if (
|
|
1285
|
+
if (typeof n == "string")
|
|
1286
|
+
s = n;
|
|
1287
|
+
else if (n && typeof n == "object") {
|
|
1282
1288
|
const i = [];
|
|
1283
|
-
for (const [c,
|
|
1284
|
-
if (
|
|
1285
|
-
const
|
|
1289
|
+
for (const [c, u] of Object.entries(n))
|
|
1290
|
+
if (u != null && u !== "") {
|
|
1291
|
+
const p = c.replace(
|
|
1286
1292
|
/[A-Z]/g,
|
|
1287
1293
|
(a) => `-${a.toLowerCase()}`
|
|
1288
1294
|
), _ = [
|
|
@@ -1311,73 +1317,73 @@ function $t(e, r, n) {
|
|
|
1311
1317
|
"min-height",
|
|
1312
1318
|
"max-height"
|
|
1313
1319
|
];
|
|
1314
|
-
let E = String(
|
|
1315
|
-
typeof
|
|
1320
|
+
let E = String(u);
|
|
1321
|
+
typeof u == "number" && _.includes(p) && (E = `${u}px`), i.push(`${p}: ${E}`);
|
|
1316
1322
|
}
|
|
1317
1323
|
s = i.join("; ") + (i.length > 0 ? ";" : "");
|
|
1318
1324
|
}
|
|
1319
1325
|
const o = String(r.style || "");
|
|
1320
1326
|
r.style = o + (o && !o.endsWith(";") ? "; " : "") + s;
|
|
1321
1327
|
}
|
|
1322
|
-
function
|
|
1323
|
-
let
|
|
1324
|
-
typeof e == "string" &&
|
|
1328
|
+
function Mt(e, r, t) {
|
|
1329
|
+
let n = e;
|
|
1330
|
+
typeof e == "string" && t && (n = we(e, t)), j(n) ? r.reactiveRef = n : r.ref = n;
|
|
1325
1331
|
}
|
|
1326
|
-
function
|
|
1327
|
-
const s = {}, o = { ...
|
|
1328
|
-
for (const [c,
|
|
1329
|
-
const { value:
|
|
1332
|
+
function ct(e, r, t, n) {
|
|
1333
|
+
const s = {}, o = { ...n || {} }, i = {};
|
|
1334
|
+
for (const [c, u] of Object.entries(e)) {
|
|
1335
|
+
const { value: p, modifiers: _, arg: E } = u;
|
|
1330
1336
|
if (c === "model" || c.startsWith("model:")) {
|
|
1331
|
-
const a = c.split(":"),
|
|
1332
|
-
|
|
1333
|
-
|
|
1337
|
+
const a = c.split(":"), g = a.length > 1 ? a[1] : E;
|
|
1338
|
+
Lt(
|
|
1339
|
+
p,
|
|
1334
1340
|
// Pass the original value (could be string or reactive state object)
|
|
1335
1341
|
_,
|
|
1336
1342
|
s,
|
|
1337
1343
|
o,
|
|
1338
1344
|
i,
|
|
1339
1345
|
r,
|
|
1340
|
-
|
|
1341
|
-
|
|
1346
|
+
t,
|
|
1347
|
+
g
|
|
1342
1348
|
);
|
|
1343
1349
|
continue;
|
|
1344
1350
|
}
|
|
1345
1351
|
switch (c) {
|
|
1346
1352
|
case "bind":
|
|
1347
|
-
|
|
1353
|
+
Nt(p, s, o, r, t);
|
|
1348
1354
|
break;
|
|
1349
1355
|
case "show":
|
|
1350
|
-
|
|
1356
|
+
Ot(p, o, r);
|
|
1351
1357
|
break;
|
|
1352
1358
|
case "class":
|
|
1353
|
-
|
|
1359
|
+
$t(p, o, r, n);
|
|
1354
1360
|
break;
|
|
1355
1361
|
case "style":
|
|
1356
|
-
|
|
1362
|
+
jt(p, o, r);
|
|
1357
1363
|
break;
|
|
1358
1364
|
case "ref":
|
|
1359
|
-
|
|
1365
|
+
Mt(p, s, r);
|
|
1360
1366
|
break;
|
|
1361
1367
|
}
|
|
1362
1368
|
}
|
|
1363
1369
|
try {
|
|
1364
|
-
if (Object.prototype.hasOwnProperty.call(s, "disabled") &&
|
|
1365
|
-
const
|
|
1370
|
+
if (Object.prototype.hasOwnProperty.call(s, "disabled") && t && G(t)) {
|
|
1371
|
+
const u = s.disabled, p = u && typeof u == "object" && "value" in u;
|
|
1366
1372
|
let _ = !1;
|
|
1367
1373
|
try {
|
|
1368
|
-
_ =
|
|
1374
|
+
_ = j(u);
|
|
1369
1375
|
} catch {
|
|
1370
1376
|
_ = !1;
|
|
1371
1377
|
}
|
|
1372
|
-
if (!
|
|
1378
|
+
if (!p && !_)
|
|
1373
1379
|
try {
|
|
1374
|
-
o.disabled =
|
|
1380
|
+
o.disabled = u, delete s.disabled;
|
|
1375
1381
|
const E = globalThis;
|
|
1376
1382
|
E.__VDOM_DISABLED_PROMOTIONS || (E.__VDOM_DISABLED_PROMOTIONS = []), E.__VDOM_DISABLED_PROMOTIONS.push({
|
|
1377
1383
|
phase: "bind-directive:postfix-move",
|
|
1378
1384
|
location: "attrs",
|
|
1379
1385
|
key: "disabled",
|
|
1380
|
-
value:
|
|
1386
|
+
value: u,
|
|
1381
1387
|
time: Date.now(),
|
|
1382
1388
|
stack: new Error().stack
|
|
1383
1389
|
});
|
|
@@ -1388,14 +1394,14 @@ function ot(e, r, n, t) {
|
|
|
1388
1394
|
}
|
|
1389
1395
|
return { props: s, attrs: o, listeners: i };
|
|
1390
1396
|
}
|
|
1391
|
-
function
|
|
1397
|
+
function Ke(e, r) {
|
|
1392
1398
|
if (Array.isArray(e)) {
|
|
1393
1399
|
const o = /* @__PURE__ */ new Set();
|
|
1394
1400
|
return e.map((i) => {
|
|
1395
1401
|
if (!i || typeof i != "object") return i;
|
|
1396
1402
|
let c = i.props?.key ?? i.key;
|
|
1397
1403
|
if (!c) {
|
|
1398
|
-
const E = i.tag || "node",
|
|
1404
|
+
const E = i.tag || "node", g = [
|
|
1399
1405
|
// attrs (kebab-case)
|
|
1400
1406
|
i.props?.attrs?.id,
|
|
1401
1407
|
i.props?.attrs?.name,
|
|
@@ -1405,60 +1411,60 @@ function We(e, r) {
|
|
|
1405
1411
|
i.props?.props?.name,
|
|
1406
1412
|
i.props?.props?.dataKey,
|
|
1407
1413
|
i.props?.props?.["data-key"]
|
|
1408
|
-
].find((
|
|
1409
|
-
c =
|
|
1414
|
+
].find((f) => f != null) ?? "";
|
|
1415
|
+
c = g ? `${r}:${E}:${g}` : `${r}:${E}`;
|
|
1410
1416
|
}
|
|
1411
|
-
let
|
|
1412
|
-
for (; o.has(
|
|
1413
|
-
|
|
1414
|
-
o.add(
|
|
1417
|
+
let u = c, p = 1;
|
|
1418
|
+
for (; o.has(u); )
|
|
1419
|
+
u = `${c}#${p++}`;
|
|
1420
|
+
o.add(u);
|
|
1415
1421
|
let _ = i.children;
|
|
1416
|
-
return Array.isArray(_) && (_ =
|
|
1422
|
+
return Array.isArray(_) && (_ = Ke(_, u)), { ...i, key: u, children: _ };
|
|
1417
1423
|
});
|
|
1418
1424
|
}
|
|
1419
|
-
const
|
|
1420
|
-
let s =
|
|
1421
|
-
return Array.isArray(s) && (s =
|
|
1425
|
+
const t = e, n = t.props?.key ?? t.key ?? r;
|
|
1426
|
+
let s = t.children;
|
|
1427
|
+
return Array.isArray(s) && (s = Ke(s, n)), { ...t, key: n, children: s };
|
|
1422
1428
|
}
|
|
1423
|
-
function
|
|
1424
|
-
const s =
|
|
1429
|
+
function Xe(e, r, t, n) {
|
|
1430
|
+
const s = t.directives ?? {}, o = ct(
|
|
1425
1431
|
s,
|
|
1426
|
-
|
|
1432
|
+
n,
|
|
1427
1433
|
e,
|
|
1428
|
-
|
|
1434
|
+
t.attrs
|
|
1429
1435
|
), i = {
|
|
1430
1436
|
...r.props || {},
|
|
1431
|
-
...
|
|
1437
|
+
...t.props || {},
|
|
1432
1438
|
...o.props || {}
|
|
1433
1439
|
}, c = {
|
|
1434
1440
|
...r.attrs || {},
|
|
1435
|
-
...
|
|
1441
|
+
...t.attrs || {},
|
|
1436
1442
|
...o.attrs || {}
|
|
1437
|
-
},
|
|
1443
|
+
}, u = r.props ?? {}, p = i, _ = !!(t?.isCustomElement ?? r?.isCustomElement ?? !1);
|
|
1438
1444
|
let E = !1;
|
|
1439
|
-
for (const
|
|
1440
|
-
const
|
|
1441
|
-
let T =
|
|
1442
|
-
if (
|
|
1443
|
-
(
|
|
1444
|
-
}),
|
|
1445
|
-
(
|
|
1446
|
-
}), !(
|
|
1447
|
-
if (E = !0,
|
|
1448
|
-
const b =
|
|
1445
|
+
for (const f in { ...u, ...p }) {
|
|
1446
|
+
const m = u[f], d = p[f];
|
|
1447
|
+
let T = m, S = d;
|
|
1448
|
+
if (P(() => {
|
|
1449
|
+
(j(m) || pe(m)) && (T = m.value);
|
|
1450
|
+
}), P(() => {
|
|
1451
|
+
(j(d) || pe(d)) && (S = d.value);
|
|
1452
|
+
}), !(m === d && T === S))
|
|
1453
|
+
if (E = !0, f === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
|
|
1454
|
+
const b = De(d), k = b == null ? "" : String(b);
|
|
1449
1455
|
e.value !== k && (e.value = k);
|
|
1450
|
-
} else if (
|
|
1451
|
-
const b =
|
|
1456
|
+
} else if (f === "checked" && e instanceof HTMLInputElement) {
|
|
1457
|
+
const b = De(d);
|
|
1452
1458
|
e.checked = !!b;
|
|
1453
|
-
} else if (
|
|
1454
|
-
const b =
|
|
1455
|
-
typeof
|
|
1459
|
+
} else if (f.startsWith("on") && typeof d == "function") {
|
|
1460
|
+
const b = ot(f);
|
|
1461
|
+
typeof m == "function" && Y.removeListener(e, b, m), typeof d == "function" && Y.addListener(e, b, d);
|
|
1456
1462
|
try {
|
|
1457
1463
|
if (b && b.startsWith("update:")) {
|
|
1458
|
-
const k = b.split(":", 2)[1], w =
|
|
1464
|
+
const k = b.split(":", 2)[1], w = p[k];
|
|
1459
1465
|
let L = [];
|
|
1460
1466
|
try {
|
|
1461
|
-
if (
|
|
1467
|
+
if (j(w)) {
|
|
1462
1468
|
const l = w.value;
|
|
1463
1469
|
L = l && typeof l == "object" ? Object.keys(l) : [];
|
|
1464
1470
|
} else w && typeof w == "object" && (L = Object.keys(w));
|
|
@@ -1470,180 +1476,209 @@ function Ye(e, r, n, t) {
|
|
|
1470
1476
|
);
|
|
1471
1477
|
for (const l of N) {
|
|
1472
1478
|
const v = `update:${l}`, y = (h) => {
|
|
1473
|
-
const
|
|
1479
|
+
const C = h.detail !== void 0 ? h.detail : h.target instanceof HTMLInputElement || h.target instanceof HTMLTextAreaElement || h.target instanceof HTMLSelectElement ? h.target.value : void 0, O = { ...j(w) ? w.value || {} : p[k] || {}, [l]: C };
|
|
1474
1480
|
try {
|
|
1475
|
-
typeof
|
|
1476
|
-
detail:
|
|
1481
|
+
typeof d == "function" && d({
|
|
1482
|
+
detail: O
|
|
1477
1483
|
});
|
|
1478
1484
|
} catch {
|
|
1479
1485
|
}
|
|
1480
1486
|
};
|
|
1481
|
-
|
|
1487
|
+
P(() => {
|
|
1482
1488
|
Y.addListener(e, v, y);
|
|
1483
1489
|
});
|
|
1484
1490
|
}
|
|
1485
1491
|
}
|
|
1486
1492
|
} catch {
|
|
1487
1493
|
}
|
|
1488
|
-
} else if (
|
|
1489
|
-
e.removeAttribute(
|
|
1494
|
+
} else if (d == null)
|
|
1495
|
+
e.removeAttribute(f);
|
|
1490
1496
|
else {
|
|
1491
|
-
const b =
|
|
1492
|
-
if (b ||
|
|
1497
|
+
const b = t?.isCustomElement ?? r?.isCustomElement ?? !1;
|
|
1498
|
+
if (b || f in e)
|
|
1493
1499
|
try {
|
|
1494
|
-
e[
|
|
1500
|
+
e[f] = d, f === "disabled" && d === !1 && !b && G(e) && e.removeAttribute("disabled");
|
|
1495
1501
|
} catch {
|
|
1496
1502
|
}
|
|
1497
1503
|
else
|
|
1498
|
-
|
|
1504
|
+
d === !1 && e.removeAttribute(f);
|
|
1499
1505
|
}
|
|
1500
1506
|
}
|
|
1501
|
-
for (const [
|
|
1507
|
+
for (const [f, m] of Object.entries(
|
|
1502
1508
|
o.listeners || {}
|
|
1503
1509
|
)) {
|
|
1504
|
-
Y.addListener(e,
|
|
1510
|
+
Y.addListener(e, f, m);
|
|
1505
1511
|
try {
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1508
|
-
p,
|
|
1512
|
+
const d = e && e.parentElement;
|
|
1513
|
+
d && d !== e && Y.addListener(
|
|
1509
1514
|
d,
|
|
1510
|
-
|
|
1515
|
+
f,
|
|
1516
|
+
m
|
|
1511
1517
|
);
|
|
1512
1518
|
} catch {
|
|
1513
1519
|
}
|
|
1514
1520
|
}
|
|
1515
|
-
const a = r.attrs ?? {},
|
|
1516
|
-
|
|
1517
|
-
const
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1521
|
+
const a = { ...r.attrs ?? {} }, g = c;
|
|
1522
|
+
try {
|
|
1523
|
+
const f = o && o.attrs || {};
|
|
1524
|
+
if (Object.prototype.hasOwnProperty.call(f, "class") && f.class === void 0 && typeof e.getAttribute == "function") {
|
|
1525
|
+
const m = e.getAttribute("class");
|
|
1526
|
+
m !== null && (a.class = m);
|
|
1527
|
+
}
|
|
1528
|
+
if (Object.prototype.hasOwnProperty.call(f, "style") && f.style === void 0 && typeof e.getAttribute == "function") {
|
|
1529
|
+
const m = e.getAttribute("style");
|
|
1530
|
+
m !== null && (a.style = m);
|
|
1531
|
+
}
|
|
1532
|
+
try {
|
|
1533
|
+
if (typeof e.getAttribute == "function") {
|
|
1534
|
+
const m = e.getAttribute("class");
|
|
1535
|
+
try {
|
|
1536
|
+
e instanceof HTMLInputElement && e.type === "text" && m !== null && m !== a.class && (a.class = m);
|
|
1537
|
+
} catch {
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
} catch {
|
|
1541
|
+
}
|
|
1542
|
+
} catch {
|
|
1543
|
+
}
|
|
1544
|
+
for (const f in { ...a, ...g }) {
|
|
1545
|
+
const m = a[f], d = g[f];
|
|
1546
|
+
let T = m, S = d;
|
|
1547
|
+
if (j(m) && (T = m.value), j(d) && (S = d.value), T !== S)
|
|
1548
|
+
if (E = !0, S == null || S === !1)
|
|
1549
|
+
P(() => {
|
|
1550
|
+
e.removeAttribute(f);
|
|
1551
|
+
}), te(r, f, void 0), f === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? P(() => {
|
|
1524
1552
|
e.value = "";
|
|
1525
|
-
}) : e instanceof HTMLSelectElement ?
|
|
1553
|
+
}) : e instanceof HTMLSelectElement ? P(() => {
|
|
1526
1554
|
e.value = "";
|
|
1527
|
-
}) : e instanceof HTMLProgressElement &&
|
|
1555
|
+
}) : e instanceof HTMLProgressElement && P(() => {
|
|
1528
1556
|
e.value = 0;
|
|
1529
|
-
})),
|
|
1557
|
+
})), f === "checked" && e instanceof HTMLInputElement && P(() => {
|
|
1530
1558
|
e.checked = !1;
|
|
1531
|
-
}),
|
|
1559
|
+
}), f === "disabled" && G(e) && P(() => {
|
|
1532
1560
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = !1);
|
|
1533
1561
|
});
|
|
1534
1562
|
else {
|
|
1535
|
-
if (
|
|
1563
|
+
if (f === "value") {
|
|
1536
1564
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
|
|
1537
|
-
|
|
1538
|
-
e.value =
|
|
1565
|
+
P(() => {
|
|
1566
|
+
e.value = S ?? "";
|
|
1539
1567
|
});
|
|
1540
1568
|
continue;
|
|
1541
1569
|
} else if (e instanceof HTMLSelectElement) {
|
|
1542
|
-
|
|
1543
|
-
e.value =
|
|
1570
|
+
P(() => {
|
|
1571
|
+
e.value = S ?? "";
|
|
1544
1572
|
});
|
|
1545
1573
|
continue;
|
|
1546
1574
|
} else if (e instanceof HTMLProgressElement) {
|
|
1547
|
-
|
|
1548
|
-
e.value = Number(
|
|
1575
|
+
P(() => {
|
|
1576
|
+
e.value = Number(S);
|
|
1549
1577
|
});
|
|
1550
1578
|
continue;
|
|
1551
1579
|
}
|
|
1552
1580
|
}
|
|
1553
|
-
if (
|
|
1554
|
-
|
|
1555
|
-
e.checked = !!
|
|
1581
|
+
if (f === "checked" && e instanceof HTMLInputElement) {
|
|
1582
|
+
P(() => {
|
|
1583
|
+
e.checked = !!S;
|
|
1556
1584
|
});
|
|
1557
1585
|
continue;
|
|
1558
1586
|
}
|
|
1559
|
-
if (
|
|
1560
|
-
const k = z(
|
|
1561
|
-
k !== null && e.setAttribute(
|
|
1587
|
+
if (f === "style") {
|
|
1588
|
+
const k = z(S);
|
|
1589
|
+
k !== null && e.setAttribute(f, k), te(r, f, S);
|
|
1590
|
+
continue;
|
|
1591
|
+
}
|
|
1592
|
+
if (f === "class") {
|
|
1593
|
+
const k = z(S);
|
|
1594
|
+
k !== null && e.setAttribute(f, k), te(r, f, S);
|
|
1562
1595
|
continue;
|
|
1563
1596
|
}
|
|
1564
|
-
if (
|
|
1565
|
-
|
|
1566
|
-
const k = de(
|
|
1597
|
+
if (f === "disabled" && G(e)) {
|
|
1598
|
+
P(() => {
|
|
1599
|
+
const k = de(S);
|
|
1567
1600
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = k);
|
|
1568
|
-
}), de(
|
|
1569
|
-
e.setAttribute(
|
|
1570
|
-
}) :
|
|
1571
|
-
e.removeAttribute(
|
|
1601
|
+
}), de(S) ? P(() => {
|
|
1602
|
+
e.setAttribute(f, "");
|
|
1603
|
+
}) : P(() => {
|
|
1604
|
+
e.removeAttribute(f);
|
|
1572
1605
|
});
|
|
1573
1606
|
continue;
|
|
1574
1607
|
}
|
|
1575
1608
|
const b = e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1576
|
-
if (_ && !b &&
|
|
1577
|
-
if (
|
|
1578
|
-
const k = z(
|
|
1579
|
-
if (k !== null)
|
|
1609
|
+
if (_ && !b && f.includes("-"))
|
|
1610
|
+
if (nt(f)) {
|
|
1611
|
+
const k = z(d ?? S);
|
|
1612
|
+
if (k !== null) {
|
|
1580
1613
|
try {
|
|
1581
|
-
e.setAttribute(
|
|
1614
|
+
e.setAttribute(f, k);
|
|
1582
1615
|
} catch {
|
|
1583
1616
|
}
|
|
1617
|
+
te(r, f, S);
|
|
1618
|
+
}
|
|
1584
1619
|
} else {
|
|
1585
|
-
const k =
|
|
1620
|
+
const k = Fe(f);
|
|
1586
1621
|
try {
|
|
1587
1622
|
const w = e;
|
|
1588
|
-
w[k] =
|
|
1623
|
+
w[k] = j(d) ? d : S, te(r, f, S);
|
|
1589
1624
|
} catch {
|
|
1590
|
-
const w = z(
|
|
1591
|
-
w !== null && e.setAttribute(
|
|
1625
|
+
const w = z(d ?? S);
|
|
1626
|
+
w !== null && e.setAttribute(f, w);
|
|
1592
1627
|
}
|
|
1593
1628
|
}
|
|
1594
|
-
else if (!b &&
|
|
1629
|
+
else if (!b && f in e)
|
|
1595
1630
|
try {
|
|
1596
1631
|
const k = e;
|
|
1597
|
-
k[
|
|
1632
|
+
k[f] = j(d) ? d : S, te(r, f, S);
|
|
1598
1633
|
} catch {
|
|
1599
|
-
const k = z(
|
|
1600
|
-
k !== null && e.setAttribute(
|
|
1634
|
+
const k = z(S);
|
|
1635
|
+
k !== null && (e.setAttribute(f, k), te(r, f, S));
|
|
1601
1636
|
}
|
|
1602
1637
|
else {
|
|
1603
|
-
const k = z(
|
|
1604
|
-
k !== null && e.setAttribute(
|
|
1638
|
+
const k = z(S);
|
|
1639
|
+
k !== null && (e.setAttribute(f, k), te(r, f, S));
|
|
1605
1640
|
}
|
|
1606
1641
|
}
|
|
1607
1642
|
}
|
|
1608
1643
|
try {
|
|
1609
1644
|
if (G(e)) {
|
|
1610
|
-
const
|
|
1611
|
-
let
|
|
1645
|
+
const f = i.disabled;
|
|
1646
|
+
let m;
|
|
1612
1647
|
try {
|
|
1613
1648
|
const T = Object.prototype.hasOwnProperty.call(
|
|
1614
1649
|
o.props || {},
|
|
1615
1650
|
"disabled"
|
|
1616
|
-
),
|
|
1651
|
+
), S = f && typeof f == "object" && "value" in f;
|
|
1617
1652
|
let b = !1;
|
|
1618
|
-
|
|
1619
|
-
b = !!
|
|
1653
|
+
P(() => {
|
|
1654
|
+
b = !!j(f);
|
|
1620
1655
|
});
|
|
1621
|
-
const k =
|
|
1622
|
-
b ||
|
|
1656
|
+
const k = We(f);
|
|
1657
|
+
b || S || T || k ? m = f : m = c.disabled;
|
|
1623
1658
|
} catch {
|
|
1624
|
-
|
|
1659
|
+
m = c.disabled;
|
|
1625
1660
|
}
|
|
1626
|
-
const
|
|
1627
|
-
|
|
1628
|
-
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled =
|
|
1629
|
-
}),
|
|
1661
|
+
const d = de(m);
|
|
1662
|
+
P(() => {
|
|
1663
|
+
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = d);
|
|
1664
|
+
}), d ? P(() => {
|
|
1630
1665
|
e.setAttribute("disabled", "");
|
|
1631
|
-
}) :
|
|
1666
|
+
}) : P(() => {
|
|
1632
1667
|
e.removeAttribute("disabled");
|
|
1633
1668
|
});
|
|
1634
1669
|
}
|
|
1635
1670
|
} catch {
|
|
1636
1671
|
}
|
|
1637
1672
|
if (_ && E) {
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
}),
|
|
1642
|
-
typeof
|
|
1673
|
+
const f = e;
|
|
1674
|
+
P(() => {
|
|
1675
|
+
f._applyProps?.(f._cfg);
|
|
1676
|
+
}), P(() => {
|
|
1677
|
+
typeof f.requestRender == "function" ? f.requestRender() : typeof f._render == "function" && f._render?.(f._cfg);
|
|
1643
1678
|
});
|
|
1644
1679
|
}
|
|
1645
1680
|
}
|
|
1646
|
-
function U(e, r,
|
|
1681
|
+
function U(e, r, t) {
|
|
1647
1682
|
if (typeof e == "string")
|
|
1648
1683
|
return document.createTextNode(e);
|
|
1649
1684
|
if (e.tag === "#text") {
|
|
@@ -1657,181 +1692,181 @@ function U(e, r, n) {
|
|
|
1657
1692
|
return document.createRange().createContextualFragment(a);
|
|
1658
1693
|
}
|
|
1659
1694
|
if (e.tag === "#anchor") {
|
|
1660
|
-
const a = e,
|
|
1661
|
-
a.key != null && (V(
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1664
|
-
for (const T of
|
|
1665
|
-
const
|
|
1666
|
-
if (a.key != null &&
|
|
1695
|
+
const a = e, g = Array.isArray(a.children) ? a.children : [], f = document.createTextNode(""), m = document.createTextNode("");
|
|
1696
|
+
a.key != null && (V(f, `${a.key}:start`), V(m, `${a.key}:end`)), a._startNode = f, a._endNode = m;
|
|
1697
|
+
const d = document.createDocumentFragment();
|
|
1698
|
+
d.appendChild(f);
|
|
1699
|
+
for (const T of g) {
|
|
1700
|
+
const S = U(T, r);
|
|
1701
|
+
if (a.key != null && S instanceof Element && !S.hasAttribute("data-anchor-key")) {
|
|
1667
1702
|
const b = T;
|
|
1668
|
-
b && typeof b == "object" && b.key != null || V(
|
|
1703
|
+
b && typeof b == "object" && b.key != null || V(S, String(a.key));
|
|
1669
1704
|
}
|
|
1670
|
-
|
|
1705
|
+
d.appendChild(S);
|
|
1671
1706
|
}
|
|
1672
|
-
return
|
|
1707
|
+
return d.appendChild(m), d;
|
|
1673
1708
|
}
|
|
1674
|
-
const
|
|
1675
|
-
e.key != null && V(
|
|
1676
|
-
|
|
1709
|
+
const n = document.createElement(e.tag);
|
|
1710
|
+
e.key != null && V(n, e.key), e.props && e.props?._transitionGroup && Tt(
|
|
1711
|
+
n,
|
|
1677
1712
|
e.props?._transitionGroup
|
|
1678
1713
|
);
|
|
1679
|
-
const { props: s = {}, attrs: o = {}, directives: i = {} } = e.props ?? {}, c =
|
|
1714
|
+
const { props: s = {}, attrs: o = {}, directives: i = {} } = e.props ?? {}, c = ct(i, r, n, o), u = {
|
|
1680
1715
|
...s,
|
|
1681
1716
|
...c.props
|
|
1682
|
-
},
|
|
1717
|
+
}, p = {
|
|
1683
1718
|
...o,
|
|
1684
1719
|
...c.attrs
|
|
1685
1720
|
};
|
|
1686
1721
|
try {
|
|
1687
|
-
const a = (
|
|
1688
|
-
if (
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1722
|
+
const a = (p && p.class) ?? (u && u.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), g = z(a);
|
|
1723
|
+
if (g !== null) {
|
|
1724
|
+
const f = String(g).trim();
|
|
1725
|
+
f && n.setAttribute("class", f);
|
|
1691
1726
|
}
|
|
1692
1727
|
} catch {
|
|
1693
1728
|
}
|
|
1694
1729
|
try {
|
|
1695
|
-
if (
|
|
1696
|
-
const a =
|
|
1697
|
-
let
|
|
1730
|
+
if (u.disabled !== void 0 && n && G(n)) {
|
|
1731
|
+
const a = u.disabled, g = a && typeof a == "object" && "value" in a;
|
|
1732
|
+
let f = !1;
|
|
1698
1733
|
try {
|
|
1699
|
-
|
|
1734
|
+
f = j(a);
|
|
1700
1735
|
} catch {
|
|
1701
|
-
|
|
1736
|
+
f = !1;
|
|
1702
1737
|
}
|
|
1703
|
-
!
|
|
1704
|
-
|
|
1738
|
+
!g && !f && P(() => {
|
|
1739
|
+
p.disabled = a, delete u.disabled;
|
|
1705
1740
|
});
|
|
1706
1741
|
}
|
|
1707
1742
|
} catch {
|
|
1708
1743
|
}
|
|
1709
|
-
const _ =
|
|
1710
|
-
for (const a in
|
|
1711
|
-
const
|
|
1744
|
+
const _ = n.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1745
|
+
for (const a in p) {
|
|
1746
|
+
const g = p[a];
|
|
1712
1747
|
if (typeof a != "string" || /\[object Object\]/.test(a))
|
|
1713
1748
|
continue;
|
|
1714
|
-
const
|
|
1715
|
-
if (typeof
|
|
1716
|
-
|
|
1717
|
-
|
|
1749
|
+
const f = De(g);
|
|
1750
|
+
if (typeof f == "boolean")
|
|
1751
|
+
f ? n.setAttribute(a, "") : P(() => {
|
|
1752
|
+
n.removeAttribute(a);
|
|
1718
1753
|
});
|
|
1719
|
-
else if (
|
|
1720
|
-
if (a === "disabled" && G(
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
}), T ?
|
|
1725
|
-
|
|
1726
|
-
}) :
|
|
1727
|
-
|
|
1754
|
+
else if (f != null) {
|
|
1755
|
+
if (a === "disabled" && G(n)) {
|
|
1756
|
+
const m = u.disabled, d = We(m) ? m : f, T = de(d);
|
|
1757
|
+
P(() => {
|
|
1758
|
+
n.disabled = T;
|
|
1759
|
+
}), T ? P(() => {
|
|
1760
|
+
n.setAttribute(a, "");
|
|
1761
|
+
}) : P(() => {
|
|
1762
|
+
n.removeAttribute(a);
|
|
1728
1763
|
});
|
|
1729
1764
|
continue;
|
|
1730
1765
|
}
|
|
1731
|
-
if (!_ && a === "value" && (
|
|
1766
|
+
if (!_ && a === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
|
|
1732
1767
|
try {
|
|
1733
|
-
|
|
1768
|
+
n instanceof HTMLProgressElement ? n.value = Number(f) : n.value = String(f ?? "");
|
|
1734
1769
|
} catch {
|
|
1735
|
-
const
|
|
1736
|
-
|
|
1770
|
+
const m = z(f);
|
|
1771
|
+
m !== null && n.setAttribute(a, m);
|
|
1737
1772
|
}
|
|
1738
|
-
else if (!_ && a === "checked" &&
|
|
1773
|
+
else if (!_ && a === "checked" && n instanceof HTMLInputElement)
|
|
1739
1774
|
try {
|
|
1740
|
-
|
|
1775
|
+
n.checked = !!f;
|
|
1741
1776
|
} catch {
|
|
1742
|
-
const
|
|
1743
|
-
|
|
1777
|
+
const m = z(f);
|
|
1778
|
+
m !== null && n.setAttribute(a, m);
|
|
1744
1779
|
}
|
|
1745
|
-
else if (!_ && a in
|
|
1780
|
+
else if (!_ && a in n)
|
|
1746
1781
|
try {
|
|
1747
|
-
|
|
1782
|
+
n[a] = f, a === "disabled" && f === !1 && G(n) && n.removeAttribute("disabled"), te(e.props, a, f);
|
|
1748
1783
|
} catch {
|
|
1749
|
-
const
|
|
1750
|
-
|
|
1784
|
+
const m = z(f);
|
|
1785
|
+
m !== null && n.setAttribute(a, m);
|
|
1751
1786
|
}
|
|
1752
1787
|
else if ((e.props?.isCustomElement ?? !1) && !_ && a.includes("-")) {
|
|
1753
|
-
const
|
|
1788
|
+
const d = Fe(a);
|
|
1754
1789
|
try {
|
|
1755
|
-
|
|
1790
|
+
n[d] = f;
|
|
1756
1791
|
} catch {
|
|
1757
|
-
const T = z(
|
|
1758
|
-
T !== null &&
|
|
1792
|
+
const T = z(f);
|
|
1793
|
+
T !== null && n.setAttribute(a, T);
|
|
1759
1794
|
}
|
|
1760
1795
|
} else {
|
|
1761
|
-
const
|
|
1762
|
-
|
|
1796
|
+
const d = z(f);
|
|
1797
|
+
d !== null && n.setAttribute(a, d);
|
|
1763
1798
|
}
|
|
1764
1799
|
}
|
|
1765
1800
|
}
|
|
1766
|
-
for (const a in
|
|
1767
|
-
const
|
|
1801
|
+
for (const a in u) {
|
|
1802
|
+
const g = u[a];
|
|
1768
1803
|
if (!(typeof a != "string" || /\[object Object\]/.test(a)))
|
|
1769
|
-
if (a === "value" && (
|
|
1770
|
-
const
|
|
1771
|
-
|
|
1772
|
-
|
|
1804
|
+
if (a === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
|
|
1805
|
+
const f = typeof g == "object" && g !== null && pe(g) ? g.value : g;
|
|
1806
|
+
P(() => {
|
|
1807
|
+
n.value = String(f ?? "");
|
|
1773
1808
|
});
|
|
1774
|
-
} else if (a.startsWith("on") && typeof
|
|
1775
|
-
const
|
|
1776
|
-
const
|
|
1809
|
+
} else if (a.startsWith("on") && typeof g == "function") {
|
|
1810
|
+
const f = ot(a), m = f.includes(":") ? (() => {
|
|
1811
|
+
const d = f.split(":"), T = d[1];
|
|
1777
1812
|
if (T.includes("-")) {
|
|
1778
|
-
const
|
|
1813
|
+
const S = T.split("-").map(
|
|
1779
1814
|
(b, k) => k === 0 ? b : b.charAt(0).toUpperCase() + b.slice(1)
|
|
1780
1815
|
).join("");
|
|
1781
|
-
return `${
|
|
1816
|
+
return `${d[0]}:${S}`;
|
|
1782
1817
|
} else {
|
|
1783
|
-
const
|
|
1784
|
-
return `${
|
|
1818
|
+
const S = T.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1819
|
+
return `${d[0]}:${S}`;
|
|
1785
1820
|
}
|
|
1786
|
-
})() :
|
|
1787
|
-
c.listeners && (c.listeners[
|
|
1821
|
+
})() : f;
|
|
1822
|
+
c.listeners && (c.listeners[f] || c.listeners[m]) || Y.addListener(n, f, g);
|
|
1788
1823
|
} else {
|
|
1789
|
-
if (a.startsWith("on") &&
|
|
1824
|
+
if (a.startsWith("on") && g === void 0)
|
|
1790
1825
|
continue;
|
|
1791
|
-
if (
|
|
1792
|
-
|
|
1826
|
+
if (g == null || g === !1)
|
|
1827
|
+
n.removeAttribute(a);
|
|
1793
1828
|
else {
|
|
1794
|
-
const
|
|
1829
|
+
const f = e.props?.isCustomElement ?? !1, m = typeof g == "object" && g !== null && j(g) ? g : pe(g) && typeof g.value < "u" ? g.value : g;
|
|
1795
1830
|
if (a === "class" || a === "style") {
|
|
1796
1831
|
try {
|
|
1797
|
-
const
|
|
1798
|
-
|
|
1832
|
+
const d = z(m);
|
|
1833
|
+
d !== null && n.setAttribute(a, d);
|
|
1799
1834
|
} catch {
|
|
1800
1835
|
}
|
|
1801
1836
|
continue;
|
|
1802
1837
|
}
|
|
1803
|
-
if (
|
|
1838
|
+
if (f || a in n)
|
|
1804
1839
|
try {
|
|
1805
|
-
const
|
|
1806
|
-
if (a === "disabled" && G(
|
|
1807
|
-
const T =
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
}),
|
|
1811
|
-
|
|
1812
|
-
}) :
|
|
1813
|
-
|
|
1840
|
+
const d = typeof g == "object" && g !== null && j(g) ? g : pe(g) ? g.value : g;
|
|
1841
|
+
if (a === "disabled" && G(n)) {
|
|
1842
|
+
const T = u.disabled !== void 0 ? u.disabled : d, S = de(T);
|
|
1843
|
+
P(() => {
|
|
1844
|
+
n.disabled = S;
|
|
1845
|
+
}), S ? P(() => {
|
|
1846
|
+
n.setAttribute(a, "");
|
|
1847
|
+
}) : P(() => {
|
|
1848
|
+
n.removeAttribute(a);
|
|
1814
1849
|
});
|
|
1815
1850
|
continue;
|
|
1816
1851
|
}
|
|
1817
1852
|
try {
|
|
1818
|
-
if (typeof
|
|
1819
|
-
let
|
|
1820
|
-
typeof
|
|
1853
|
+
if (typeof n[a] == "boolean") {
|
|
1854
|
+
let S = d;
|
|
1855
|
+
typeof d == "string" ? d === "false" ? S = !1 : d === "true" ? S = !0 : S = !!d && d !== "" : S = !!d, n[a] = S;
|
|
1821
1856
|
} else
|
|
1822
|
-
|
|
1857
|
+
n[a] = d;
|
|
1823
1858
|
} catch {
|
|
1824
|
-
|
|
1859
|
+
n[a] = d;
|
|
1825
1860
|
}
|
|
1826
1861
|
} catch {
|
|
1827
1862
|
}
|
|
1828
1863
|
}
|
|
1829
1864
|
}
|
|
1830
1865
|
}
|
|
1831
|
-
for (const [a,
|
|
1866
|
+
for (const [a, g] of Object.entries(
|
|
1832
1867
|
c.listeners || {}
|
|
1833
1868
|
))
|
|
1834
|
-
Y.addListener(
|
|
1869
|
+
Y.addListener(n, a, g);
|
|
1835
1870
|
const E = {
|
|
1836
1871
|
...e,
|
|
1837
1872
|
props: {
|
|
@@ -1839,9 +1874,9 @@ function U(e, r, n) {
|
|
|
1839
1874
|
...c.props
|
|
1840
1875
|
}
|
|
1841
1876
|
};
|
|
1842
|
-
|
|
1877
|
+
ke(E, n, t);
|
|
1843
1878
|
try {
|
|
1844
|
-
const a =
|
|
1879
|
+
const a = n;
|
|
1845
1880
|
if (typeof a._applyProps == "function")
|
|
1846
1881
|
try {
|
|
1847
1882
|
a._applyProps(a._cfg);
|
|
@@ -1852,78 +1887,78 @@ function U(e, r, n) {
|
|
|
1852
1887
|
}
|
|
1853
1888
|
if (Array.isArray(e.children))
|
|
1854
1889
|
for (const a of e.children)
|
|
1855
|
-
|
|
1856
|
-
else typeof e.children == "string" && (
|
|
1890
|
+
n.appendChild(U(a, r, t));
|
|
1891
|
+
else typeof e.children == "string" && (n.textContent = e.children);
|
|
1857
1892
|
try {
|
|
1858
|
-
if (
|
|
1893
|
+
if (n instanceof HTMLSelectElement && p && Object.prototype.hasOwnProperty.call(p, "value"))
|
|
1859
1894
|
try {
|
|
1860
|
-
|
|
1895
|
+
n.value = String(p.value ?? "");
|
|
1861
1896
|
} catch {
|
|
1862
1897
|
}
|
|
1863
1898
|
} catch {
|
|
1864
1899
|
}
|
|
1865
1900
|
try {
|
|
1866
|
-
if (G(
|
|
1867
|
-
const a =
|
|
1868
|
-
let
|
|
1901
|
+
if (G(n)) {
|
|
1902
|
+
const a = u.disabled, g = p.disabled, f = a && typeof a == "object" && "value" in a;
|
|
1903
|
+
let m = !1;
|
|
1869
1904
|
try {
|
|
1870
|
-
|
|
1905
|
+
m = !!j(a);
|
|
1871
1906
|
} catch {
|
|
1872
|
-
|
|
1873
|
-
}
|
|
1874
|
-
const T =
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
}),
|
|
1878
|
-
|
|
1879
|
-
}) :
|
|
1880
|
-
|
|
1907
|
+
m = !1;
|
|
1908
|
+
}
|
|
1909
|
+
const T = m || f || We(a) ? a : g, S = de(T);
|
|
1910
|
+
P(() => {
|
|
1911
|
+
n.disabled = S;
|
|
1912
|
+
}), S ? P(() => {
|
|
1913
|
+
n.setAttribute("disabled", "");
|
|
1914
|
+
}) : P(() => {
|
|
1915
|
+
n.removeAttribute("disabled");
|
|
1881
1916
|
});
|
|
1882
1917
|
}
|
|
1883
1918
|
} catch {
|
|
1884
1919
|
}
|
|
1885
|
-
return
|
|
1920
|
+
return n;
|
|
1886
1921
|
}
|
|
1887
|
-
function
|
|
1888
|
-
if (typeof
|
|
1889
|
-
e.textContent !==
|
|
1922
|
+
function Pt(e, r, t, n, s) {
|
|
1923
|
+
if (typeof t == "string") {
|
|
1924
|
+
e.textContent !== t && (e.textContent = t);
|
|
1890
1925
|
return;
|
|
1891
1926
|
}
|
|
1892
|
-
if (!Array.isArray(
|
|
1927
|
+
if (!Array.isArray(t)) return;
|
|
1893
1928
|
const o = e.childNodes, i = [];
|
|
1894
|
-
for (let
|
|
1895
|
-
i.push(o[
|
|
1896
|
-
const c = Array.isArray(r) ? r : [],
|
|
1897
|
-
if (
|
|
1898
|
-
const
|
|
1929
|
+
for (let m = 0; m < o.length; m++)
|
|
1930
|
+
i.push(o[m]);
|
|
1931
|
+
const c = Array.isArray(r) ? r : [], u = wt(e);
|
|
1932
|
+
if (u) {
|
|
1933
|
+
const m = (b) => {
|
|
1899
1934
|
if (typeof b == "string")
|
|
1900
1935
|
return b.startsWith("each-") ? b.substring(5) : b;
|
|
1901
1936
|
if (typeof b == "number") return String(b);
|
|
1902
|
-
},
|
|
1903
|
-
for (const b of
|
|
1937
|
+
}, d = [], T = [];
|
|
1938
|
+
for (const b of t)
|
|
1904
1939
|
if (b && b.tag === "#anchor") {
|
|
1905
1940
|
const k = Array.isArray(b.children) ? b.children : [];
|
|
1906
1941
|
for (const w of k) {
|
|
1907
|
-
const L =
|
|
1942
|
+
const L = m(
|
|
1908
1943
|
w.key ?? b.key ?? "unknown"
|
|
1909
1944
|
);
|
|
1910
|
-
|
|
1945
|
+
d.push({ ...w, key: L });
|
|
1911
1946
|
}
|
|
1912
|
-
} else b &&
|
|
1947
|
+
} else b && d.push({ ...b, key: m(b.key) });
|
|
1913
1948
|
for (const b of c)
|
|
1914
1949
|
if (b && b.tag === "#anchor") {
|
|
1915
1950
|
const k = Array.isArray(b.children) ? b.children : [];
|
|
1916
1951
|
for (const w of k) {
|
|
1917
|
-
const L =
|
|
1952
|
+
const L = m(
|
|
1918
1953
|
w.key ?? b.key ?? "unknown"
|
|
1919
1954
|
);
|
|
1920
1955
|
T.push({ ...w, key: L });
|
|
1921
1956
|
}
|
|
1922
1957
|
} else b && T.push({
|
|
1923
1958
|
...b,
|
|
1924
|
-
key:
|
|
1959
|
+
key: m(b.key)
|
|
1925
1960
|
});
|
|
1926
|
-
if (
|
|
1961
|
+
if (d.some((b) => b && b.key != null) || T.some((b) => b && b.key != null)) {
|
|
1927
1962
|
const b = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map();
|
|
1928
1963
|
for (const y of T)
|
|
1929
1964
|
if (y && y.key != null) {
|
|
@@ -1932,90 +1967,90 @@ function jt(e, r, n, t, s) {
|
|
|
1932
1967
|
}
|
|
1933
1968
|
for (let y = 0; y < i.length; y++) {
|
|
1934
1969
|
const h = i[y];
|
|
1935
|
-
let
|
|
1936
|
-
if (
|
|
1937
|
-
let $ = typeof
|
|
1970
|
+
let C = je(h);
|
|
1971
|
+
if (C = m(C), C != null && h instanceof Element && h.nodeType === Node.ELEMENT_NODE) {
|
|
1972
|
+
let $ = typeof C == "string" && C.includes(":") ? C.substring(0, C.lastIndexOf(":")) : C;
|
|
1938
1973
|
$ = String($), k.set($, h);
|
|
1939
1974
|
}
|
|
1940
1975
|
}
|
|
1941
1976
|
const w = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Map(), N = i.length > 0;
|
|
1942
|
-
if (
|
|
1977
|
+
if (u.moveClass && N)
|
|
1943
1978
|
for (let y = 0; y < i.length; y++) {
|
|
1944
1979
|
const h = i[y];
|
|
1945
1980
|
if (h instanceof HTMLElement && h.parentElement) {
|
|
1946
|
-
const
|
|
1947
|
-
L.set(h,
|
|
1981
|
+
const C = h.getBoundingClientRect();
|
|
1982
|
+
L.set(h, C);
|
|
1948
1983
|
}
|
|
1949
1984
|
}
|
|
1950
1985
|
const l = [];
|
|
1951
|
-
for (const y of
|
|
1986
|
+
for (const y of d) {
|
|
1952
1987
|
let h = y.key;
|
|
1953
1988
|
if (h == null) continue;
|
|
1954
1989
|
h = String(h);
|
|
1955
|
-
const
|
|
1990
|
+
const C = b.get(h);
|
|
1956
1991
|
let $ = k.get(h);
|
|
1957
|
-
if ($ &&
|
|
1958
|
-
const
|
|
1992
|
+
if ($ && C) {
|
|
1993
|
+
const O = Se($, C, y, n);
|
|
1959
1994
|
w.add($);
|
|
1960
|
-
const
|
|
1961
|
-
V(
|
|
1962
|
-
node:
|
|
1995
|
+
const A = String(h);
|
|
1996
|
+
V(O, A), l.push({
|
|
1997
|
+
node: O,
|
|
1963
1998
|
key: h,
|
|
1964
1999
|
newVNode: y,
|
|
1965
|
-
oldVNode:
|
|
2000
|
+
oldVNode: C,
|
|
1966
2001
|
isNew: !1
|
|
1967
2002
|
});
|
|
1968
2003
|
} else {
|
|
1969
|
-
$ = U(y,
|
|
1970
|
-
const
|
|
1971
|
-
$ instanceof HTMLElement &&
|
|
1972
|
-
B("Enter transition error:",
|
|
2004
|
+
$ = U(y, n), V($, String(h)), e.appendChild($);
|
|
2005
|
+
const O = N || u.appear === !0;
|
|
2006
|
+
$ instanceof HTMLElement && O && _e($, u).catch((A) => {
|
|
2007
|
+
B("Enter transition error:", A);
|
|
1973
2008
|
}), l.push({ node: $, key: h, newVNode: y, isNew: !0 });
|
|
1974
2009
|
}
|
|
1975
2010
|
}
|
|
1976
2011
|
const v = [];
|
|
1977
2012
|
for (let y = 0; y < i.length; y++) {
|
|
1978
|
-
const h = i[y],
|
|
1979
|
-
if (!w.has(h) &&
|
|
1980
|
-
const
|
|
2013
|
+
const h = i[y], C = je(h);
|
|
2014
|
+
if (!w.has(h) && C != null && h instanceof HTMLElement) {
|
|
2015
|
+
const O = Ie(h, u).then(() => {
|
|
1981
2016
|
e.contains(h) && e.removeChild(h);
|
|
1982
|
-
}).catch((
|
|
1983
|
-
B("Leave transition error:",
|
|
2017
|
+
}).catch((A) => {
|
|
2018
|
+
B("Leave transition error:", A), e.contains(h) && e.removeChild(h);
|
|
1984
2019
|
});
|
|
1985
|
-
v.push(
|
|
2020
|
+
v.push(O);
|
|
1986
2021
|
}
|
|
1987
2022
|
}
|
|
1988
2023
|
if (v.length === 0) {
|
|
1989
2024
|
let y = e.firstChild;
|
|
1990
2025
|
for (const { node: h } of l)
|
|
1991
2026
|
h !== y && e.insertBefore(h, y), y = h.nextSibling;
|
|
1992
|
-
if (
|
|
2027
|
+
if (u.moveClass && L.size > 0) {
|
|
1993
2028
|
const h = [];
|
|
1994
|
-
for (const { node:
|
|
1995
|
-
if (!$ &&
|
|
1996
|
-
const
|
|
1997
|
-
if (
|
|
1998
|
-
const
|
|
2029
|
+
for (const { node: C, isNew: $ } of l)
|
|
2030
|
+
if (!$ && C instanceof HTMLElement) {
|
|
2031
|
+
const O = L.get(C);
|
|
2032
|
+
if (O) {
|
|
2033
|
+
const A = C.getBoundingClientRect(), I = O.left - A.left, x = O.top - A.top;
|
|
1999
2034
|
if (I !== 0 || x !== 0) {
|
|
2000
|
-
const X =
|
|
2001
|
-
h.push({ node:
|
|
2035
|
+
const X = u.moveClass.split(/\s+/).filter((W) => W);
|
|
2036
|
+
h.push({ node: C, deltaX: I, deltaY: x, moveClasses: X });
|
|
2002
2037
|
}
|
|
2003
2038
|
}
|
|
2004
2039
|
}
|
|
2005
2040
|
if (h.length > 0) {
|
|
2006
|
-
for (const { node:
|
|
2007
|
-
|
|
2041
|
+
for (const { node: C, deltaX: $, deltaY: O } of h)
|
|
2042
|
+
C.style.transform = `translate(${$}px, ${O}px)`, C.style.transitionProperty = "none";
|
|
2008
2043
|
e.offsetHeight, requestAnimationFrame(() => {
|
|
2009
2044
|
requestAnimationFrame(() => {
|
|
2010
|
-
for (const { node:
|
|
2011
|
-
for (const
|
|
2012
|
-
|
|
2045
|
+
for (const { node: C, moveClasses: $ } of h)
|
|
2046
|
+
for (const O of $)
|
|
2047
|
+
C.classList.add(O);
|
|
2013
2048
|
requestAnimationFrame(() => {
|
|
2014
|
-
const
|
|
2049
|
+
const C = u.moveClass || "", $ = C.match(/duration-(\d+)/), O = $ ? `${$[1]}ms` : "300ms", A = C.match(
|
|
2015
2050
|
/ease-(out|in|in-out|linear)/
|
|
2016
|
-
), I =
|
|
2051
|
+
), I = A ? `ease-${A[1]}` : "ease-out";
|
|
2017
2052
|
for (const { node: x } of h)
|
|
2018
|
-
x.style.transition = `transform ${
|
|
2053
|
+
x.style.transition = `transform ${O} ${I}`;
|
|
2019
2054
|
requestAnimationFrame(() => {
|
|
2020
2055
|
for (const { node: x, moveClasses: X } of h) {
|
|
2021
2056
|
x.style.removeProperty("transform");
|
|
@@ -2040,189 +2075,189 @@ function jt(e, r, n, t, s) {
|
|
|
2040
2075
|
return;
|
|
2041
2076
|
}
|
|
2042
2077
|
}
|
|
2043
|
-
const
|
|
2044
|
-
for (const
|
|
2045
|
-
|
|
2078
|
+
const p = /* @__PURE__ */ new Map();
|
|
2079
|
+
for (const m of c)
|
|
2080
|
+
m && m.key != null && p.set(m.key, m);
|
|
2046
2081
|
const _ = /* @__PURE__ */ new Map();
|
|
2047
|
-
for (let
|
|
2048
|
-
const
|
|
2049
|
-
T != null && _.set(T,
|
|
2082
|
+
for (let m = 0; m < i.length; m++) {
|
|
2083
|
+
const d = i[m], T = je(d);
|
|
2084
|
+
T != null && _.set(T, d);
|
|
2050
2085
|
}
|
|
2051
2086
|
const E = /* @__PURE__ */ new Set();
|
|
2052
2087
|
let a = e.firstChild;
|
|
2053
|
-
function m
|
|
2054
|
-
let T =
|
|
2055
|
-
for (; T && (E.add(T), T !==
|
|
2088
|
+
function g(m, d) {
|
|
2089
|
+
let T = m;
|
|
2090
|
+
for (; T && (E.add(T), T !== d); )
|
|
2056
2091
|
T = T.nextSibling;
|
|
2057
2092
|
}
|
|
2058
|
-
function
|
|
2093
|
+
function f(m, d, T, S, b, k = !0) {
|
|
2059
2094
|
const w = [];
|
|
2060
|
-
let L =
|
|
2061
|
-
for (; L && L !==
|
|
2095
|
+
let L = m.nextSibling;
|
|
2096
|
+
for (; L && L !== d; )
|
|
2062
2097
|
w.push(L), L = L.nextSibling;
|
|
2063
2098
|
const N = Array.isArray(T) ? T : [];
|
|
2064
|
-
if (
|
|
2099
|
+
if (S.some((v) => v && v.key != null) || N.some((v) => v && v.key != null)) {
|
|
2065
2100
|
const v = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
|
|
2066
|
-
for (const
|
|
2067
|
-
|
|
2068
|
-
for (const
|
|
2069
|
-
const
|
|
2070
|
-
|
|
2071
|
-
}
|
|
2072
|
-
const h = b && b.state === "visible" && N.length === 0 &&
|
|
2073
|
-
let $ =
|
|
2074
|
-
for (const
|
|
2075
|
-
let
|
|
2076
|
-
if (
|
|
2077
|
-
const I = v.get(
|
|
2078
|
-
|
|
2079
|
-
y.get(
|
|
2101
|
+
for (const O of N)
|
|
2102
|
+
O && O.key != null && v.set(O.key, O);
|
|
2103
|
+
for (const O of w) {
|
|
2104
|
+
const A = je(O);
|
|
2105
|
+
A != null && y.set(A, O);
|
|
2106
|
+
}
|
|
2107
|
+
const h = b && b.state === "visible" && N.length === 0 && S.length > 0, C = /* @__PURE__ */ new Set();
|
|
2108
|
+
let $ = m.nextSibling;
|
|
2109
|
+
for (const O of S) {
|
|
2110
|
+
let A;
|
|
2111
|
+
if (O.key != null && y.has(O.key)) {
|
|
2112
|
+
const I = v.get(O.key);
|
|
2113
|
+
A = Se(
|
|
2114
|
+
y.get(O.key),
|
|
2080
2115
|
I,
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
),
|
|
2116
|
+
O,
|
|
2117
|
+
n
|
|
2118
|
+
), C.add(A), b && A instanceof HTMLElement && h && b.appear && _e(A, b).catch((x) => {
|
|
2084
2119
|
B("Transition enter error (appear):", x);
|
|
2085
|
-
}),
|
|
2120
|
+
}), A !== $ && e.contains(A) && e.insertBefore(A, $);
|
|
2086
2121
|
} else
|
|
2087
|
-
|
|
2122
|
+
A = U(O, n), e.insertBefore(A, $), C.add(A), b && A instanceof HTMLElement && k && _e(A, b).catch((I) => {
|
|
2088
2123
|
B("Transition enter error:", I);
|
|
2089
2124
|
});
|
|
2090
|
-
$ =
|
|
2091
|
-
}
|
|
2092
|
-
for (const
|
|
2093
|
-
!
|
|
2094
|
-
e.contains(
|
|
2095
|
-
}).catch((
|
|
2096
|
-
B("Transition leave error:",
|
|
2097
|
-
}) : e.removeChild(
|
|
2125
|
+
$ = A.nextSibling;
|
|
2126
|
+
}
|
|
2127
|
+
for (const O of w)
|
|
2128
|
+
!C.has(O) && e.contains(O) && (b && O instanceof HTMLElement && k ? Ie(O, b).then(() => {
|
|
2129
|
+
e.contains(O) && e.removeChild(O);
|
|
2130
|
+
}).catch((A) => {
|
|
2131
|
+
B("Transition leave error:", A), e.contains(O) && e.removeChild(O);
|
|
2132
|
+
}) : e.removeChild(O));
|
|
2098
2133
|
} else {
|
|
2099
2134
|
const v = Math.min(
|
|
2100
2135
|
N.length,
|
|
2101
|
-
|
|
2136
|
+
S.length
|
|
2102
2137
|
);
|
|
2103
2138
|
for (let y = 0; y < v; y++) {
|
|
2104
|
-
const h = N[y],
|
|
2139
|
+
const h = N[y], C = S[y], $ = Se(w[y], h, C, n);
|
|
2105
2140
|
$ !== w[y] && (e.insertBefore($, w[y]), e.removeChild(w[y]));
|
|
2106
2141
|
}
|
|
2107
|
-
for (let y = v; y <
|
|
2108
|
-
const h = U(
|
|
2109
|
-
e.insertBefore(h,
|
|
2110
|
-
B("Transition enter error:",
|
|
2142
|
+
for (let y = v; y < S.length; y++) {
|
|
2143
|
+
const h = U(S[y], n);
|
|
2144
|
+
e.insertBefore(h, d), b && h instanceof HTMLElement && k && _e(h, b).catch((C) => {
|
|
2145
|
+
B("Transition enter error:", C);
|
|
2111
2146
|
});
|
|
2112
2147
|
}
|
|
2113
2148
|
for (let y = v; y < w.length; y++) {
|
|
2114
2149
|
const h = w[y];
|
|
2115
|
-
b && h instanceof HTMLElement && k ?
|
|
2150
|
+
b && h instanceof HTMLElement && k ? Ie(h, b).then(() => {
|
|
2116
2151
|
e.contains(h) && e.removeChild(h);
|
|
2117
|
-
}).catch((
|
|
2118
|
-
B("Transition leave error:",
|
|
2152
|
+
}).catch((C) => {
|
|
2153
|
+
B("Transition leave error:", C), e.contains(h) && e.removeChild(h);
|
|
2119
2154
|
}) : e.removeChild(h);
|
|
2120
2155
|
}
|
|
2121
2156
|
}
|
|
2122
2157
|
}
|
|
2123
|
-
for (const
|
|
2124
|
-
let
|
|
2125
|
-
if (
|
|
2126
|
-
const T =
|
|
2127
|
-
let k = _.get(
|
|
2128
|
-
const L = Array.isArray(
|
|
2129
|
-
if (k || (k = document.createTextNode(""), V(k,
|
|
2158
|
+
for (const m of t) {
|
|
2159
|
+
let d;
|
|
2160
|
+
if (m.tag === "#anchor") {
|
|
2161
|
+
const T = m.key, S = `${T}:start`, b = `${T}:end`;
|
|
2162
|
+
let k = _.get(S), w = _.get(b);
|
|
2163
|
+
const L = Array.isArray(m.children) ? m.children : [];
|
|
2164
|
+
if (k || (k = document.createTextNode(""), V(k, S)), w || (w = document.createTextNode(""), V(w, b)), m._startNode = k, m._endNode = w, !e.contains(k) || !e.contains(w)) {
|
|
2130
2165
|
e.insertBefore(k, a);
|
|
2131
|
-
const N =
|
|
2166
|
+
const N = m._transition, v = !(N && N.state === "visible" && L.length > 0) || N.appear;
|
|
2132
2167
|
for (const y of L) {
|
|
2133
|
-
const h = U(y,
|
|
2134
|
-
e.insertBefore(h, a), N && h instanceof HTMLElement && v &&
|
|
2135
|
-
B("Transition enter error:",
|
|
2168
|
+
const h = U(y, n);
|
|
2169
|
+
e.insertBefore(h, a), N && h instanceof HTMLElement && v && _e(h, N).catch((C) => {
|
|
2170
|
+
B("Transition enter error:", C);
|
|
2136
2171
|
});
|
|
2137
2172
|
}
|
|
2138
2173
|
e.insertBefore(w, a);
|
|
2139
2174
|
} else {
|
|
2140
|
-
const N =
|
|
2141
|
-
|
|
2175
|
+
const N = m._transition, v = p.get(T)._transition, y = v && v.state !== N?.state, h = N && N.state === "visible" && L.length > 0 && !y, C = y || !h || N?.appear === !0;
|
|
2176
|
+
f(
|
|
2142
2177
|
k,
|
|
2143
2178
|
w,
|
|
2144
|
-
|
|
2179
|
+
p.get(T)?.children,
|
|
2145
2180
|
L,
|
|
2146
2181
|
N,
|
|
2147
|
-
|
|
2182
|
+
C
|
|
2148
2183
|
);
|
|
2149
2184
|
}
|
|
2150
|
-
|
|
2185
|
+
g(k, w), a = w.nextSibling;
|
|
2151
2186
|
continue;
|
|
2152
2187
|
}
|
|
2153
|
-
if (
|
|
2154
|
-
const T =
|
|
2155
|
-
|
|
2156
|
-
_.get(
|
|
2188
|
+
if (m.key != null && _.has(m.key)) {
|
|
2189
|
+
const T = p.get(m.key);
|
|
2190
|
+
d = Se(
|
|
2191
|
+
_.get(m.key),
|
|
2157
2192
|
T,
|
|
2158
|
-
|
|
2159
|
-
|
|
2193
|
+
m,
|
|
2194
|
+
n,
|
|
2160
2195
|
s
|
|
2161
|
-
), E.add(
|
|
2196
|
+
), E.add(d), d !== a && e.contains(d) && (a && !e.contains(a) && (a = null), e.insertBefore(d, a));
|
|
2162
2197
|
} else
|
|
2163
|
-
|
|
2164
|
-
a =
|
|
2198
|
+
d = U(m, n, s), a && !e.contains(a) && (a = null), e.insertBefore(d, a), E.add(d);
|
|
2199
|
+
a = d.nextSibling;
|
|
2165
2200
|
}
|
|
2166
|
-
for (let
|
|
2167
|
-
const
|
|
2168
|
-
!E.has(
|
|
2201
|
+
for (let m = 0; m < i.length; m++) {
|
|
2202
|
+
const d = i[m];
|
|
2203
|
+
!E.has(d) && e.contains(d) && (ce(d, s), e.removeChild(d));
|
|
2169
2204
|
}
|
|
2170
2205
|
}
|
|
2171
|
-
function
|
|
2172
|
-
if (r && typeof r != "string" && r.props?.ref && s &&
|
|
2173
|
-
if (typeof
|
|
2206
|
+
function Se(e, r, t, n, s) {
|
|
2207
|
+
if (r && typeof r != "string" && r.props?.ref && s && ce(e, s), r === t) return e;
|
|
2208
|
+
if (typeof t == "string") {
|
|
2174
2209
|
if (e.nodeType === Node.TEXT_NODE)
|
|
2175
|
-
return e.textContent !==
|
|
2210
|
+
return e.textContent !== t && (e.textContent = t), e;
|
|
2176
2211
|
{
|
|
2177
|
-
const i = document.createTextNode(
|
|
2212
|
+
const i = document.createTextNode(t);
|
|
2178
2213
|
return e.parentNode?.replaceChild(i, e), i;
|
|
2179
2214
|
}
|
|
2180
2215
|
}
|
|
2181
|
-
if (
|
|
2182
|
-
const i =
|
|
2183
|
-
i.key != null && (V(
|
|
2216
|
+
if (t && typeof t != "string" && t.tag === "#anchor") {
|
|
2217
|
+
const i = t, c = Array.isArray(i.children) ? i.children : [], u = i._startNode ?? document.createTextNode(""), p = i._endNode ?? document.createTextNode("");
|
|
2218
|
+
i.key != null && (V(u, `${i.key}:start`), V(p, `${i.key}:end`)), i._startNode = u, i._endNode = p;
|
|
2184
2219
|
const _ = document.createDocumentFragment();
|
|
2185
|
-
_.appendChild(
|
|
2220
|
+
_.appendChild(u);
|
|
2186
2221
|
for (const E of c) {
|
|
2187
|
-
const a = U(E,
|
|
2222
|
+
const a = U(E, n);
|
|
2188
2223
|
_.appendChild(a);
|
|
2189
2224
|
}
|
|
2190
|
-
return _.appendChild(
|
|
2225
|
+
return _.appendChild(p), e.parentNode?.replaceChild(_, e), u;
|
|
2191
2226
|
}
|
|
2192
|
-
if (!
|
|
2193
|
-
|
|
2227
|
+
if (!t) {
|
|
2228
|
+
ce(e, s);
|
|
2194
2229
|
const i = document.createComment("removed");
|
|
2195
2230
|
return e.parentNode?.replaceChild(i, e), i;
|
|
2196
2231
|
}
|
|
2197
2232
|
if (!r || typeof r == "string") {
|
|
2198
|
-
|
|
2199
|
-
const i = U(
|
|
2200
|
-
return
|
|
2201
|
-
}
|
|
2202
|
-
if (
|
|
2203
|
-
const i = Array.isArray(
|
|
2204
|
-
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2233
|
+
ce(e, s);
|
|
2234
|
+
const i = U(t, n, s);
|
|
2235
|
+
return ke(t, i, s), e.parentNode?.replaceChild(i, e), i;
|
|
2236
|
+
}
|
|
2237
|
+
if (t.tag === "#anchor") {
|
|
2238
|
+
const i = Array.isArray(t.children) ? t.children : [], c = t._startNode ?? document.createTextNode(""), u = t._endNode ?? document.createTextNode("");
|
|
2239
|
+
t.key != null && (V(c, `${t.key}:start`), V(u, `${t.key}:end`)), t._startNode = c, t._endNode = u;
|
|
2240
|
+
const p = document.createDocumentFragment();
|
|
2241
|
+
p.appendChild(c);
|
|
2207
2242
|
for (const _ of i)
|
|
2208
|
-
|
|
2209
|
-
return
|
|
2243
|
+
p.appendChild(U(_, n));
|
|
2244
|
+
return p.appendChild(u), e.parentNode?.replaceChild(p, e), c;
|
|
2210
2245
|
}
|
|
2211
|
-
if (typeof r != "string" && typeof
|
|
2246
|
+
if (typeof r != "string" && typeof t != "string" && r.tag === t.tag && r.key === t.key) {
|
|
2212
2247
|
const i = e;
|
|
2213
|
-
return
|
|
2248
|
+
return Xe(i, r.props || {}, t.props || {}, n), Pt(i, r.children, t.children, n, s), ke(t, i, s), i;
|
|
2214
2249
|
}
|
|
2215
|
-
if (typeof r != "string" && typeof
|
|
2250
|
+
if (typeof r != "string" && typeof t != "string" && r.tag === t.tag && (r.tag && String(r.tag).includes("-") || t.props && t.props.isCustomElement || r.props && r.props.isCustomElement))
|
|
2216
2251
|
try {
|
|
2217
2252
|
const c = e;
|
|
2218
|
-
return
|
|
2253
|
+
return Xe(c, r.props || {}, t.props || {}, n), ke(t, c, s), c;
|
|
2219
2254
|
} catch {
|
|
2220
2255
|
}
|
|
2221
|
-
|
|
2222
|
-
const o = U(
|
|
2223
|
-
return
|
|
2256
|
+
ce(e, s);
|
|
2257
|
+
const o = U(t, n, s);
|
|
2258
|
+
return ke(t, o, s), e.parentNode?.replaceChild(o, e), o;
|
|
2224
2259
|
}
|
|
2225
|
-
function
|
|
2260
|
+
function xt(e, r, t, n) {
|
|
2226
2261
|
let s;
|
|
2227
2262
|
Array.isArray(r) ? r.length === 1 ? (s = r[0], s && typeof s == "object" && s.key == null && (s = { ...s, key: "__root__" })) : s = { tag: "div", key: "__root__", children: r } : (s = r, s && typeof s == "object" && s.key == null && (s = { ...s, key: "__root__" })), s && typeof s == "object" && s.tag === "#anchor" && (s = {
|
|
2228
2263
|
tag: "div",
|
|
@@ -2231,48 +2266,48 @@ function Mt(e, r, n, t) {
|
|
|
2231
2266
|
attrs: { "data-anchor-block-root": "", key: "__anchor_root__" }
|
|
2232
2267
|
},
|
|
2233
2268
|
children: [s]
|
|
2234
|
-
}), s =
|
|
2269
|
+
}), s = Ke(s, String(s.key ?? "root"));
|
|
2235
2270
|
const o = e._prevVNode ?? null, i = e._prevDom ?? e.firstChild ?? null;
|
|
2236
2271
|
let c;
|
|
2237
|
-
o && i ? typeof o != "string" && typeof s != "string" && o.tag === s.tag && o.key === s.key ? c =
|
|
2238
|
-
const
|
|
2239
|
-
for (let
|
|
2240
|
-
const _ = e.childNodes[
|
|
2241
|
-
_ !== c && _.nodeName !== "STYLE" && (
|
|
2272
|
+
o && i ? typeof o != "string" && typeof s != "string" && o.tag === s.tag && o.key === s.key ? c = Se(i, o, s, t, n) : (c = U(s, t, n), e.replaceChild(c, i)) : (c = U(s, t, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
|
|
2273
|
+
const u = [];
|
|
2274
|
+
for (let p = 0; p < e.childNodes.length; p++) {
|
|
2275
|
+
const _ = e.childNodes[p];
|
|
2276
|
+
_ !== c && _.nodeName !== "STYLE" && (ce(_, n), u.push(_));
|
|
2242
2277
|
}
|
|
2243
|
-
|
|
2278
|
+
u.forEach((p) => e.removeChild(p)), e._prevVNode = s, e._prevDom = c;
|
|
2244
2279
|
}
|
|
2245
|
-
const
|
|
2246
|
-
function
|
|
2280
|
+
const Ce = [];
|
|
2281
|
+
function Ht(e, r, t, n, s, o, i, c) {
|
|
2247
2282
|
if (e) {
|
|
2248
|
-
|
|
2283
|
+
Ce.push(t);
|
|
2249
2284
|
try {
|
|
2250
|
-
const
|
|
2251
|
-
if (
|
|
2252
|
-
o(!0),
|
|
2253
|
-
o(!1), i(null),
|
|
2254
|
-
}).catch((
|
|
2255
|
-
o(!1), i(
|
|
2285
|
+
const u = r.render(t);
|
|
2286
|
+
if (u instanceof Promise) {
|
|
2287
|
+
o(!0), u.then((p) => {
|
|
2288
|
+
o(!1), i(null), Qe(e, p, t, n, s), c(e.innerHTML);
|
|
2289
|
+
}).catch((p) => {
|
|
2290
|
+
o(!1), i(p);
|
|
2256
2291
|
});
|
|
2257
2292
|
return;
|
|
2258
2293
|
}
|
|
2259
|
-
|
|
2294
|
+
Qe(e, u, t, n, s), c(e.innerHTML);
|
|
2260
2295
|
} finally {
|
|
2261
|
-
|
|
2296
|
+
Ce.pop();
|
|
2262
2297
|
}
|
|
2263
2298
|
}
|
|
2264
2299
|
}
|
|
2265
|
-
function
|
|
2266
|
-
e && (
|
|
2300
|
+
function Qe(e, r, t, n, s) {
|
|
2301
|
+
e && (xt(
|
|
2267
2302
|
e,
|
|
2268
2303
|
Array.isArray(r) ? r : [r],
|
|
2269
|
-
|
|
2270
|
-
|
|
2304
|
+
t,
|
|
2305
|
+
n
|
|
2271
2306
|
), s(e.innerHTML));
|
|
2272
2307
|
}
|
|
2273
|
-
function
|
|
2308
|
+
function It(e, r, t, n, s, o, i) {
|
|
2274
2309
|
if (o !== null && clearTimeout(o), Date.now() - r < 16) {
|
|
2275
|
-
if (s(
|
|
2310
|
+
if (s(t + 1), t === 15)
|
|
2276
2311
|
Z(
|
|
2277
2312
|
`⚠️ Component is re-rendering rapidly. This might indicate:
|
|
2278
2313
|
Common causes:
|
|
@@ -2281,7 +2316,7 @@ function Ht(e, r, n, t, s, o, i) {
|
|
|
2281
2316
|
• Missing dependencies in computed/watch
|
|
2282
2317
|
Component rendering will be throttled to prevent browser freeze.`
|
|
2283
2318
|
);
|
|
2284
|
-
else if (
|
|
2319
|
+
else if (t > 20) {
|
|
2285
2320
|
B(
|
|
2286
2321
|
`🛑 Infinite loop detected in component render:
|
|
2287
2322
|
• This might be caused by state updates during render
|
|
@@ -2292,49 +2327,49 @@ Stopping runaway component render to prevent browser freeze`
|
|
|
2292
2327
|
}
|
|
2293
2328
|
} else
|
|
2294
2329
|
s(0);
|
|
2295
|
-
const
|
|
2330
|
+
const p = setTimeout(
|
|
2296
2331
|
() => {
|
|
2297
|
-
|
|
2332
|
+
n(Date.now()), e(), i(null);
|
|
2298
2333
|
},
|
|
2299
|
-
|
|
2334
|
+
t > 10 ? 100 : 0
|
|
2300
2335
|
);
|
|
2301
|
-
i(
|
|
2336
|
+
i(p);
|
|
2302
2337
|
}
|
|
2303
|
-
function
|
|
2338
|
+
function Rt(e, r, t, n, s) {
|
|
2304
2339
|
if (!e) return;
|
|
2305
|
-
let o =
|
|
2340
|
+
let o = t || "";
|
|
2306
2341
|
try {
|
|
2307
2342
|
if (e) {
|
|
2308
|
-
const
|
|
2343
|
+
const d = Array.from(
|
|
2309
2344
|
e.querySelectorAll("*")
|
|
2310
2345
|
);
|
|
2311
|
-
for (const T of
|
|
2346
|
+
for (const T of d)
|
|
2312
2347
|
try {
|
|
2313
|
-
const
|
|
2314
|
-
|
|
2315
|
-
` +
|
|
2348
|
+
const S = T.lastHtmlStringForJitCSS;
|
|
2349
|
+
S && typeof S == "string" && S.trim() && (o += `
|
|
2350
|
+
` + S);
|
|
2316
2351
|
} catch {
|
|
2317
2352
|
}
|
|
2318
2353
|
}
|
|
2319
2354
|
} catch {
|
|
2320
2355
|
}
|
|
2321
|
-
const i =
|
|
2356
|
+
const i = pt(o);
|
|
2322
2357
|
if ((!i || i.trim() === "") && !r._computedStyle) {
|
|
2323
2358
|
if (s(null), "adoptedStyleSheets" in e && typeof CSSStyleSheet < "u")
|
|
2324
2359
|
e.adoptedStyleSheets = [
|
|
2325
|
-
|
|
2326
|
-
|
|
2360
|
+
Ne(),
|
|
2361
|
+
ae()
|
|
2327
2362
|
];
|
|
2328
2363
|
else {
|
|
2329
|
-
const T =
|
|
2364
|
+
const T = Ee(Ze), S = ae();
|
|
2330
2365
|
let b = "";
|
|
2331
2366
|
try {
|
|
2332
|
-
|
|
2367
|
+
S && "cssRules" in S && (b = Array.from(S.cssRules).map((L) => L.cssText).join(`
|
|
2333
2368
|
`));
|
|
2334
2369
|
} catch {
|
|
2335
2370
|
b = "";
|
|
2336
2371
|
}
|
|
2337
|
-
const k =
|
|
2372
|
+
const k = Ee(`${T}
|
|
2338
2373
|
${b}`);
|
|
2339
2374
|
let w = e.querySelector(
|
|
2340
2375
|
"style[data-cer-runtime]"
|
|
@@ -2345,7 +2380,7 @@ ${b}`);
|
|
|
2345
2380
|
} catch {
|
|
2346
2381
|
}
|
|
2347
2382
|
try {
|
|
2348
|
-
e.adoptedStyleSheets = [
|
|
2383
|
+
e.adoptedStyleSheets = [Ne(), ae()];
|
|
2349
2384
|
} catch {
|
|
2350
2385
|
}
|
|
2351
2386
|
}
|
|
@@ -2353,75 +2388,75 @@ ${b}`);
|
|
|
2353
2388
|
}
|
|
2354
2389
|
let c = "";
|
|
2355
2390
|
r._computedStyle && (c = r._computedStyle ?? "");
|
|
2356
|
-
let
|
|
2391
|
+
let u = dt(`${c}
|
|
2357
2392
|
${i}
|
|
2358
2393
|
`);
|
|
2359
|
-
|
|
2360
|
-
let
|
|
2394
|
+
u = Ee(u);
|
|
2395
|
+
let p = n;
|
|
2361
2396
|
if ("adoptedStyleSheets" in e && typeof CSSStyleSheet < "u") {
|
|
2362
|
-
if (
|
|
2397
|
+
if (p || (p = new CSSStyleSheet()), p.cssRules.length === 0 || p.cssRules.length > 0 && Array.from(p.cssRules).map((T) => T.cssText).join("") !== u)
|
|
2363
2398
|
try {
|
|
2364
|
-
|
|
2399
|
+
p.replaceSync(u);
|
|
2365
2400
|
} catch {
|
|
2366
|
-
|
|
2401
|
+
p = null;
|
|
2367
2402
|
}
|
|
2368
|
-
if (
|
|
2403
|
+
if (p) {
|
|
2369
2404
|
e.adoptedStyleSheets = [
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
], s(
|
|
2405
|
+
Ne(),
|
|
2406
|
+
ae(),
|
|
2407
|
+
p
|
|
2408
|
+
], s(p);
|
|
2374
2409
|
return;
|
|
2375
2410
|
}
|
|
2376
2411
|
}
|
|
2377
|
-
const E =
|
|
2378
|
-
let
|
|
2412
|
+
const E = Ee(Ze), a = ae();
|
|
2413
|
+
let g = "";
|
|
2379
2414
|
try {
|
|
2380
|
-
a && "cssRules" in a && (
|
|
2415
|
+
a && "cssRules" in a && (g = Array.from(a.cssRules).map((d) => d.cssText).join(`
|
|
2381
2416
|
`));
|
|
2382
2417
|
} catch {
|
|
2383
|
-
|
|
2418
|
+
g = "";
|
|
2384
2419
|
}
|
|
2385
|
-
const
|
|
2386
|
-
${
|
|
2387
|
-
${
|
|
2388
|
-
let
|
|
2420
|
+
const f = Ee(`${E}
|
|
2421
|
+
${g}
|
|
2422
|
+
${u}`);
|
|
2423
|
+
let m = e.querySelector(
|
|
2389
2424
|
"style[data-cer-runtime]"
|
|
2390
2425
|
);
|
|
2391
|
-
|
|
2426
|
+
m || (m = document.createElement("style"), m.setAttribute("data-cer-runtime", "true"), e.appendChild(m));
|
|
2392
2427
|
try {
|
|
2393
|
-
|
|
2428
|
+
m.textContent = f;
|
|
2394
2429
|
} catch {
|
|
2395
2430
|
}
|
|
2396
2431
|
try {
|
|
2397
|
-
const
|
|
2398
|
-
|
|
2399
|
-
|
|
2432
|
+
const d = [
|
|
2433
|
+
Ne(),
|
|
2434
|
+
ae()
|
|
2400
2435
|
];
|
|
2401
2436
|
if (typeof CSSStyleSheet < "u")
|
|
2402
2437
|
try {
|
|
2403
2438
|
const T = new CSSStyleSheet();
|
|
2404
2439
|
try {
|
|
2405
|
-
T.replaceSync(
|
|
2440
|
+
T.replaceSync(u), d.push(T);
|
|
2406
2441
|
} catch {
|
|
2407
|
-
|
|
2442
|
+
d.push({ cssRules: [], replaceSync: () => {
|
|
2408
2443
|
} });
|
|
2409
2444
|
}
|
|
2410
2445
|
} catch {
|
|
2411
2446
|
}
|
|
2412
|
-
e.adoptedStyleSheets =
|
|
2447
|
+
e.adoptedStyleSheets = d;
|
|
2413
2448
|
} catch {
|
|
2414
2449
|
}
|
|
2415
2450
|
s(null);
|
|
2416
2451
|
}
|
|
2417
2452
|
let R = null;
|
|
2418
|
-
function
|
|
2453
|
+
function et(e) {
|
|
2419
2454
|
R = e;
|
|
2420
2455
|
}
|
|
2421
|
-
function
|
|
2456
|
+
function Re() {
|
|
2422
2457
|
R = null;
|
|
2423
2458
|
}
|
|
2424
|
-
function
|
|
2459
|
+
function Jt() {
|
|
2425
2460
|
if (!R)
|
|
2426
2461
|
throw new Error("useEmit must be called during component render");
|
|
2427
2462
|
const e = R.emit;
|
|
@@ -2430,9 +2465,9 @@ function Zt() {
|
|
|
2430
2465
|
"useEmit requires an emit function on the component context"
|
|
2431
2466
|
);
|
|
2432
2467
|
const r = e;
|
|
2433
|
-
return (
|
|
2468
|
+
return (t, n, s) => r(t, n, s);
|
|
2434
2469
|
}
|
|
2435
|
-
function
|
|
2470
|
+
function ye(e) {
|
|
2436
2471
|
e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
|
|
2437
2472
|
value: {},
|
|
2438
2473
|
writable: !0,
|
|
@@ -2440,78 +2475,78 @@ function he(e) {
|
|
|
2440
2475
|
configurable: !1
|
|
2441
2476
|
});
|
|
2442
2477
|
}
|
|
2443
|
-
function
|
|
2478
|
+
function Yt(e) {
|
|
2444
2479
|
if (!R)
|
|
2445
2480
|
throw new Error("useOnConnected must be called during component render");
|
|
2446
|
-
|
|
2481
|
+
ye(R), R._hookCallbacks.onConnected = e;
|
|
2447
2482
|
}
|
|
2448
|
-
function
|
|
2483
|
+
function Xt(e) {
|
|
2449
2484
|
if (!R)
|
|
2450
2485
|
throw new Error("useOnDisconnected must be called during component render");
|
|
2451
|
-
|
|
2486
|
+
ye(R), R._hookCallbacks.onDisconnected = e;
|
|
2452
2487
|
}
|
|
2453
|
-
function
|
|
2488
|
+
function Qt(e) {
|
|
2454
2489
|
if (!R)
|
|
2455
2490
|
throw new Error(
|
|
2456
2491
|
"useOnAttributeChanged must be called during component render"
|
|
2457
2492
|
);
|
|
2458
|
-
|
|
2493
|
+
ye(R), R._hookCallbacks.onAttributeChanged = e;
|
|
2459
2494
|
}
|
|
2460
|
-
function
|
|
2495
|
+
function en(e) {
|
|
2461
2496
|
if (!R)
|
|
2462
2497
|
throw new Error("useOnError must be called during component render");
|
|
2463
|
-
|
|
2498
|
+
ye(R), R._hookCallbacks.onError = (r) => {
|
|
2464
2499
|
try {
|
|
2465
2500
|
r instanceof Error ? e(r) : e(new Error(String(r)));
|
|
2466
2501
|
} catch {
|
|
2467
2502
|
}
|
|
2468
2503
|
};
|
|
2469
2504
|
}
|
|
2470
|
-
function
|
|
2505
|
+
function tn(e) {
|
|
2471
2506
|
if (!R)
|
|
2472
2507
|
throw new Error("useProps must be called during component render");
|
|
2473
|
-
|
|
2508
|
+
ye(R);
|
|
2474
2509
|
const r = R._hookCallbacks;
|
|
2475
2510
|
r.props = {
|
|
2476
2511
|
...r.props || {},
|
|
2477
2512
|
...e
|
|
2478
2513
|
};
|
|
2479
|
-
const
|
|
2514
|
+
const t = R;
|
|
2480
2515
|
try {
|
|
2481
2516
|
const s = Object.keys(e || {});
|
|
2482
2517
|
for (const o of s) {
|
|
2483
2518
|
if (typeof o != "string" || o.startsWith("_")) continue;
|
|
2484
|
-
const i = Object.getOwnPropertyDescriptor(
|
|
2519
|
+
const i = Object.getOwnPropertyDescriptor(t, o);
|
|
2485
2520
|
if (!(i && !i.configurable))
|
|
2486
2521
|
try {
|
|
2487
|
-
let
|
|
2488
|
-
Object.defineProperty(
|
|
2522
|
+
let u = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
|
|
2523
|
+
Object.defineProperty(t, o, {
|
|
2489
2524
|
configurable: !0,
|
|
2490
2525
|
enumerable: !0,
|
|
2491
2526
|
get() {
|
|
2492
2527
|
try {
|
|
2493
|
-
const
|
|
2494
|
-
if (
|
|
2495
|
-
const _ = q(o), E =
|
|
2528
|
+
const p = t && t._host;
|
|
2529
|
+
if (p) {
|
|
2530
|
+
const _ = q(o), E = p.getAttribute(_);
|
|
2496
2531
|
if (E !== null) {
|
|
2497
2532
|
const a = typeof e[o];
|
|
2498
2533
|
return a === "boolean" ? E === "" || E === "true" : a === "number" ? Number(E) : E;
|
|
2499
2534
|
}
|
|
2500
|
-
if (typeof
|
|
2501
|
-
const a =
|
|
2502
|
-
if (
|
|
2535
|
+
if (typeof p[o] < "u") {
|
|
2536
|
+
const a = p[o];
|
|
2537
|
+
if (j(a) || a && typeof a == "object" && "value" in a && !(a instanceof Node))
|
|
2503
2538
|
return a.value;
|
|
2504
|
-
const
|
|
2505
|
-
if (!(
|
|
2506
|
-
return
|
|
2539
|
+
const g = typeof e[o];
|
|
2540
|
+
if (!(g === "string" && a && typeof a == "object"))
|
|
2541
|
+
return g === "boolean" && typeof a == "string" ? a === "" || a === "true" : a;
|
|
2507
2542
|
}
|
|
2508
2543
|
}
|
|
2509
2544
|
} catch {
|
|
2510
2545
|
}
|
|
2511
|
-
return
|
|
2546
|
+
return u;
|
|
2512
2547
|
},
|
|
2513
|
-
set(
|
|
2514
|
-
|
|
2548
|
+
set(p) {
|
|
2549
|
+
u = p;
|
|
2515
2550
|
}
|
|
2516
2551
|
});
|
|
2517
2552
|
} catch {
|
|
@@ -2524,31 +2559,31 @@ function en(e) {
|
|
|
2524
2559
|
if (typeof o != "string") return;
|
|
2525
2560
|
const i = e[o];
|
|
2526
2561
|
try {
|
|
2527
|
-
const
|
|
2528
|
-
if (
|
|
2529
|
-
if (
|
|
2530
|
-
const _ = o.replace(/([A-Z])/g, "-$1").toLowerCase(), E =
|
|
2562
|
+
const u = t && t._host;
|
|
2563
|
+
if (u) {
|
|
2564
|
+
if (u instanceof HTMLElement || typeof u.getAttribute == "function" && typeof u.hasAttribute == "function") {
|
|
2565
|
+
const _ = o.replace(/([A-Z])/g, "-$1").toLowerCase(), E = u.getAttribute(_);
|
|
2531
2566
|
if (E !== null)
|
|
2532
2567
|
return typeof i == "boolean" ? E === "" || E === "true" : typeof i == "number" ? Number(E) : E;
|
|
2533
2568
|
}
|
|
2534
|
-
const
|
|
2535
|
-
if (typeof
|
|
2536
|
-
const _ =
|
|
2537
|
-
if (!(typeof i == "string" &&
|
|
2538
|
-
return typeof i == "boolean" && i === !1 &&
|
|
2569
|
+
const p = u[o];
|
|
2570
|
+
if (typeof p < "u" && p !== "") {
|
|
2571
|
+
const _ = p && typeof p == "object" && "value" in p && !(p instanceof Node);
|
|
2572
|
+
if (!(typeof i == "string" && p && typeof p == "object" && !_ && !j(p)))
|
|
2573
|
+
return typeof i == "boolean" && i === !1 && p === "" ? i : j(p) || _ ? p.value : typeof i == "boolean" && typeof p == "string" ? p === "true" || p !== "" && p !== "false" : typeof i == "number" && typeof p == "string" && !Number.isNaN(Number(p)) ? Number(p) : p;
|
|
2539
2574
|
}
|
|
2540
2575
|
}
|
|
2541
2576
|
} catch {
|
|
2542
2577
|
}
|
|
2543
|
-
const c =
|
|
2544
|
-
return typeof i == "boolean" && c === "" ? i === !1 ? i : !0 :
|
|
2578
|
+
const c = t[o];
|
|
2579
|
+
return typeof i == "boolean" && c === "" ? i === !1 ? i : !0 : j(c) || c && typeof c == "object" && "value" in c && !(c instanceof Node) ? c.value : c != null && c !== "" ? typeof i == "boolean" && typeof c == "string" ? c === "true" : typeof i == "number" && typeof c == "string" && !Number.isNaN(Number(c)) ? Number(c) : c : i;
|
|
2545
2580
|
},
|
|
2546
2581
|
has(s, o) {
|
|
2547
|
-
return typeof o == "string" && (o in
|
|
2582
|
+
return typeof o == "string" && (o in t || o in e);
|
|
2548
2583
|
},
|
|
2549
2584
|
ownKeys() {
|
|
2550
2585
|
return Array.from(
|
|
2551
|
-
/* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(
|
|
2586
|
+
/* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t || {})])
|
|
2552
2587
|
);
|
|
2553
2588
|
},
|
|
2554
2589
|
getOwnPropertyDescriptor() {
|
|
@@ -2556,10 +2591,10 @@ function en(e) {
|
|
|
2556
2591
|
}
|
|
2557
2592
|
});
|
|
2558
2593
|
}
|
|
2559
|
-
function
|
|
2594
|
+
function nn(e) {
|
|
2560
2595
|
if (!R)
|
|
2561
2596
|
throw new Error("useStyle must be called during component render");
|
|
2562
|
-
|
|
2597
|
+
ye(R);
|
|
2563
2598
|
try {
|
|
2564
2599
|
const r = e();
|
|
2565
2600
|
Object.defineProperty(R, "_computedStyle", {
|
|
@@ -2577,14 +2612,14 @@ function tn(e) {
|
|
|
2577
2612
|
});
|
|
2578
2613
|
}
|
|
2579
2614
|
}
|
|
2580
|
-
const
|
|
2581
|
-
function
|
|
2615
|
+
const he = /* @__PURE__ */ new Map(), tt = Symbol.for("cer.registry");
|
|
2616
|
+
function Bt() {
|
|
2582
2617
|
if (typeof window < "u") {
|
|
2583
2618
|
const e = globalThis;
|
|
2584
|
-
e[
|
|
2619
|
+
e[tt] || (e[tt] = he);
|
|
2585
2620
|
}
|
|
2586
2621
|
}
|
|
2587
|
-
function
|
|
2622
|
+
function Dt(e, r) {
|
|
2588
2623
|
if (!r.render)
|
|
2589
2624
|
throw new Error("Component must have a render function");
|
|
2590
2625
|
return typeof window > "u" ? class {
|
|
@@ -2627,8 +2662,8 @@ function Bt(e, r) {
|
|
|
2627
2662
|
_templateLoading = !1;
|
|
2628
2663
|
_templateError = null;
|
|
2629
2664
|
constructor() {
|
|
2630
|
-
super(), this.attachShadow({ mode: "open" }), this._cfg =
|
|
2631
|
-
const
|
|
2665
|
+
super(), this.attachShadow({ mode: "open" }), this._cfg = he.get(e) || r, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2666
|
+
const t = this._initContext(r), n = (o, i, c) => {
|
|
2632
2667
|
Object.defineProperty(o, i, {
|
|
2633
2668
|
value: c,
|
|
2634
2669
|
writable: !1,
|
|
@@ -2636,44 +2671,44 @@ function Bt(e, r) {
|
|
|
2636
2671
|
configurable: !1
|
|
2637
2672
|
});
|
|
2638
2673
|
};
|
|
2639
|
-
t
|
|
2640
|
-
|
|
2674
|
+
n(t, "refs", this._refs), n(
|
|
2675
|
+
t,
|
|
2641
2676
|
"requestRender",
|
|
2642
2677
|
() => this.requestRender()
|
|
2643
|
-
),
|
|
2644
|
-
|
|
2678
|
+
), n(
|
|
2679
|
+
t,
|
|
2645
2680
|
"_requestRender",
|
|
2646
2681
|
() => this._requestRender()
|
|
2647
|
-
), t
|
|
2648
|
-
|
|
2682
|
+
), n(t, "_componentId", this._componentId), n(
|
|
2683
|
+
t,
|
|
2649
2684
|
"_triggerWatchers",
|
|
2650
2685
|
(o, i) => this._triggerWatchers(o, i)
|
|
2651
|
-
), this.context =
|
|
2652
|
-
t
|
|
2653
|
-
}),
|
|
2686
|
+
), this.context = t, P(() => {
|
|
2687
|
+
n(t, "_host", this);
|
|
2688
|
+
}), n(
|
|
2654
2689
|
this.context,
|
|
2655
2690
|
"emit",
|
|
2656
2691
|
(o, i, c) => {
|
|
2657
|
-
const
|
|
2692
|
+
const u = {
|
|
2658
2693
|
detail: i,
|
|
2659
2694
|
bubbles: !0,
|
|
2660
2695
|
composed: !0,
|
|
2661
2696
|
...c || {}
|
|
2662
|
-
},
|
|
2663
|
-
this.dispatchEvent(
|
|
2697
|
+
}, p = new CustomEvent(o, u);
|
|
2698
|
+
this.dispatchEvent(p);
|
|
2664
2699
|
const _ = o.indexOf(":");
|
|
2665
2700
|
if (_ > 0) {
|
|
2666
|
-
const E = o.substring(0, _), a = o.substring(_ + 1),
|
|
2667
|
-
(
|
|
2701
|
+
const E = o.substring(0, _), a = o.substring(_ + 1), g = a.includes("-") ? `${E}:${a.split("-").map(
|
|
2702
|
+
(f, m) => m === 0 ? f : f.charAt(0).toUpperCase() + f.slice(1)
|
|
2668
2703
|
).join("")}` : `${E}:${a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
2669
|
-
|
|
2670
|
-
this.dispatchEvent(new CustomEvent(
|
|
2704
|
+
g !== o && P(() => {
|
|
2705
|
+
this.dispatchEvent(new CustomEvent(g, u));
|
|
2671
2706
|
});
|
|
2672
2707
|
}
|
|
2673
|
-
return !
|
|
2708
|
+
return !p.defaultPrevented;
|
|
2674
2709
|
}
|
|
2675
2710
|
);
|
|
2676
|
-
const s =
|
|
2711
|
+
const s = he.get(e) || r;
|
|
2677
2712
|
for (const o in s) {
|
|
2678
2713
|
const i = s[o];
|
|
2679
2714
|
typeof i == "function" && (this.context[o] = (...c) => i(...c, this.context));
|
|
@@ -2686,8 +2721,8 @@ function Bt(e, r) {
|
|
|
2686
2721
|
return i;
|
|
2687
2722
|
},
|
|
2688
2723
|
set(c) {
|
|
2689
|
-
const
|
|
2690
|
-
i = c, this.context[o] = c, this._initializing || (this._applyProps(s),
|
|
2724
|
+
const u = i;
|
|
2725
|
+
i = c, this.context[o] = c, this._initializing || (this._applyProps(s), u !== c && this._requestRender());
|
|
2691
2726
|
},
|
|
2692
2727
|
enumerable: !0,
|
|
2693
2728
|
configurable: !0
|
|
@@ -2697,14 +2732,14 @@ function Bt(e, r) {
|
|
|
2697
2732
|
}
|
|
2698
2733
|
connectedCallback() {
|
|
2699
2734
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
2700
|
-
this._applyProps(r), this._requestRender(),
|
|
2701
|
-
this._mounted =
|
|
2735
|
+
this._applyProps(r), this._requestRender(), bt(r, this.context, this._mounted, (t) => {
|
|
2736
|
+
this._mounted = t;
|
|
2702
2737
|
});
|
|
2703
2738
|
});
|
|
2704
2739
|
}
|
|
2705
2740
|
disconnectedCallback() {
|
|
2706
2741
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
2707
|
-
|
|
2742
|
+
vt(
|
|
2708
2743
|
r,
|
|
2709
2744
|
this.context,
|
|
2710
2745
|
this._listeners,
|
|
@@ -2714,44 +2749,44 @@ function Bt(e, r) {
|
|
|
2714
2749
|
() => {
|
|
2715
2750
|
this._watchers.clear();
|
|
2716
2751
|
},
|
|
2717
|
-
(
|
|
2718
|
-
this._templateLoading =
|
|
2752
|
+
(t) => {
|
|
2753
|
+
this._templateLoading = t;
|
|
2719
2754
|
},
|
|
2720
|
-
(
|
|
2721
|
-
this._templateError =
|
|
2755
|
+
(t) => {
|
|
2756
|
+
this._templateError = t;
|
|
2722
2757
|
},
|
|
2723
|
-
(
|
|
2724
|
-
this._mounted =
|
|
2758
|
+
(t) => {
|
|
2759
|
+
this._mounted = t;
|
|
2725
2760
|
}
|
|
2726
2761
|
);
|
|
2727
2762
|
});
|
|
2728
2763
|
}
|
|
2729
|
-
attributeChangedCallback(
|
|
2764
|
+
attributeChangedCallback(t, n, s) {
|
|
2730
2765
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
2731
|
-
this._applyProps(r),
|
|
2766
|
+
this._applyProps(r), n !== s && this._requestRender(), Et(r, t, n, s, this.context);
|
|
2732
2767
|
});
|
|
2733
2768
|
}
|
|
2734
2769
|
static get observedAttributes() {
|
|
2735
2770
|
return r.props ? Object.keys(r.props).map(q) : [];
|
|
2736
2771
|
}
|
|
2737
2772
|
// --- Render ---
|
|
2738
|
-
_render(
|
|
2739
|
-
this._runLogicWithinErrorBoundary(
|
|
2740
|
-
|
|
2773
|
+
_render(t) {
|
|
2774
|
+
this._runLogicWithinErrorBoundary(t, () => {
|
|
2775
|
+
Ht(
|
|
2741
2776
|
this.shadowRoot,
|
|
2742
|
-
|
|
2777
|
+
t,
|
|
2743
2778
|
this.context,
|
|
2744
2779
|
this._refs,
|
|
2745
|
-
(
|
|
2746
|
-
this._lastHtmlStringForJitCSS =
|
|
2780
|
+
(n) => {
|
|
2781
|
+
this._lastHtmlStringForJitCSS = n, typeof this.onHtmlStringUpdate == "function" && this?.onHtmlStringUpdate?.(n);
|
|
2747
2782
|
},
|
|
2748
|
-
(
|
|
2749
|
-
this._templateLoading =
|
|
2783
|
+
(n) => {
|
|
2784
|
+
this._templateLoading = n, this?.onLoadingStateChange?.(n);
|
|
2750
2785
|
},
|
|
2751
|
-
(
|
|
2752
|
-
this._templateError =
|
|
2786
|
+
(n) => {
|
|
2787
|
+
this._templateError = n, this?.onErrorStateChange?.(n);
|
|
2753
2788
|
},
|
|
2754
|
-
(
|
|
2789
|
+
(n) => this._applyStyle(t, n)
|
|
2755
2790
|
);
|
|
2756
2791
|
});
|
|
2757
2792
|
}
|
|
@@ -2760,32 +2795,32 @@ function Bt(e, r) {
|
|
|
2760
2795
|
}
|
|
2761
2796
|
_requestRender() {
|
|
2762
2797
|
this._runLogicWithinErrorBoundary(this._cfg, () => {
|
|
2763
|
-
|
|
2764
|
-
|
|
2798
|
+
ve(() => {
|
|
2799
|
+
It(
|
|
2765
2800
|
() => this._render(this._cfg),
|
|
2766
2801
|
this._lastRenderTime,
|
|
2767
2802
|
this._renderCount,
|
|
2768
|
-
(
|
|
2769
|
-
this._lastRenderTime =
|
|
2803
|
+
(t) => {
|
|
2804
|
+
this._lastRenderTime = t;
|
|
2770
2805
|
},
|
|
2771
|
-
(
|
|
2772
|
-
this._renderCount =
|
|
2806
|
+
(t) => {
|
|
2807
|
+
this._renderCount = t;
|
|
2773
2808
|
},
|
|
2774
2809
|
this._renderTimeoutId,
|
|
2775
|
-
(
|
|
2776
|
-
this._renderTimeoutId =
|
|
2810
|
+
(t) => {
|
|
2811
|
+
this._renderTimeoutId = t;
|
|
2777
2812
|
}
|
|
2778
2813
|
);
|
|
2779
2814
|
}, this._componentId);
|
|
2780
2815
|
});
|
|
2781
2816
|
}
|
|
2782
2817
|
// --- Style ---
|
|
2783
|
-
_applyStyle(
|
|
2784
|
-
this._runLogicWithinErrorBoundary(
|
|
2785
|
-
|
|
2818
|
+
_applyStyle(t, n) {
|
|
2819
|
+
this._runLogicWithinErrorBoundary(t, () => {
|
|
2820
|
+
Rt(
|
|
2786
2821
|
this.shadowRoot,
|
|
2787
2822
|
this.context,
|
|
2788
|
-
|
|
2823
|
+
n,
|
|
2789
2824
|
this._styleSheet,
|
|
2790
2825
|
(s) => {
|
|
2791
2826
|
this._styleSheet = s;
|
|
@@ -2794,39 +2829,39 @@ function Bt(e, r) {
|
|
|
2794
2829
|
});
|
|
2795
2830
|
}
|
|
2796
2831
|
// --- Error Boundary function ---
|
|
2797
|
-
_runLogicWithinErrorBoundary(
|
|
2832
|
+
_runLogicWithinErrorBoundary(t, n) {
|
|
2798
2833
|
this._hasError && (this._hasError = !1);
|
|
2799
2834
|
try {
|
|
2800
|
-
|
|
2835
|
+
n();
|
|
2801
2836
|
} catch (s) {
|
|
2802
2837
|
this._hasError = !0;
|
|
2803
2838
|
try {
|
|
2804
2839
|
const o = this.tagName?.toLowerCase?.() || "<unknown>", i = this._componentId || "<unknown-id>", c = {};
|
|
2805
|
-
if (
|
|
2806
|
-
for (const
|
|
2840
|
+
if (t && t.props)
|
|
2841
|
+
for (const u of Object.keys(t.props))
|
|
2807
2842
|
try {
|
|
2808
|
-
const
|
|
2809
|
-
|
|
2843
|
+
const p = this.context[u];
|
|
2844
|
+
p instanceof Node ? c[u] = `[DOM Node: ${p.nodeName}]` : typeof p == "object" && p !== null ? c[u] = Object.keys(p).length > 5 ? `[object(${Object.keys(p).length} keys)]` : p : c[u] = p;
|
|
2810
2845
|
} catch {
|
|
2811
|
-
c[
|
|
2846
|
+
c[u] = "[unreadable]";
|
|
2812
2847
|
}
|
|
2813
2848
|
B(`Error rendering component <${o}> (id=${i}):`, s), B("Component props snapshot:", c), Z(
|
|
2814
2849
|
"Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`)."
|
|
2815
2850
|
);
|
|
2816
2851
|
} catch {
|
|
2817
2852
|
}
|
|
2818
|
-
|
|
2853
|
+
t.onError && t.onError(s, this.context);
|
|
2819
2854
|
}
|
|
2820
2855
|
}
|
|
2821
2856
|
// --- State, props, computed ---
|
|
2822
|
-
_initContext(
|
|
2857
|
+
_initContext(t) {
|
|
2823
2858
|
try {
|
|
2824
|
-
let
|
|
2859
|
+
let n = function(o, i = "") {
|
|
2825
2860
|
if (Array.isArray(o))
|
|
2826
2861
|
return new Proxy(o, {
|
|
2827
|
-
get(c,
|
|
2828
|
-
const _ = Reflect.get(c,
|
|
2829
|
-
return typeof _ == "function" && typeof
|
|
2862
|
+
get(c, u, p) {
|
|
2863
|
+
const _ = Reflect.get(c, u, p);
|
|
2864
|
+
return typeof _ == "function" && typeof u == "string" && [
|
|
2830
2865
|
"push",
|
|
2831
2866
|
"pop",
|
|
2832
2867
|
"shift",
|
|
@@ -2834,61 +2869,61 @@ function Bt(e, r) {
|
|
|
2834
2869
|
"splice",
|
|
2835
2870
|
"sort",
|
|
2836
2871
|
"reverse"
|
|
2837
|
-
].includes(
|
|
2838
|
-
const
|
|
2872
|
+
].includes(u) ? function(...a) {
|
|
2873
|
+
const g = _.apply(c, a);
|
|
2839
2874
|
if (!s._initializing) {
|
|
2840
|
-
const
|
|
2841
|
-
s._triggerWatchers(
|
|
2842
|
-
() => s._render(
|
|
2875
|
+
const f = i || "root";
|
|
2876
|
+
s._triggerWatchers(f, c), ve(
|
|
2877
|
+
() => s._render(t),
|
|
2843
2878
|
s._componentId
|
|
2844
2879
|
);
|
|
2845
2880
|
}
|
|
2846
|
-
return
|
|
2881
|
+
return g;
|
|
2847
2882
|
} : _;
|
|
2848
2883
|
},
|
|
2849
|
-
set(c,
|
|
2850
|
-
if (c[String(
|
|
2851
|
-
const _ = i ? `${i}.${String(
|
|
2852
|
-
s._triggerWatchers(_,
|
|
2884
|
+
set(c, u, p) {
|
|
2885
|
+
if (c[String(u)] = p, !s._initializing) {
|
|
2886
|
+
const _ = i ? `${i}.${String(u)}` : String(u);
|
|
2887
|
+
s._triggerWatchers(_, p), ve(() => s._render(t), s._componentId);
|
|
2853
2888
|
}
|
|
2854
2889
|
return !0;
|
|
2855
2890
|
},
|
|
2856
|
-
deleteProperty(c,
|
|
2857
|
-
if (delete c[String(
|
|
2858
|
-
const
|
|
2859
|
-
s._triggerWatchers(
|
|
2891
|
+
deleteProperty(c, u) {
|
|
2892
|
+
if (delete c[String(u)], !s._initializing) {
|
|
2893
|
+
const p = i ? `${i}.${String(u)}` : String(u);
|
|
2894
|
+
s._triggerWatchers(p, void 0), ve(() => s._render(t), s._componentId);
|
|
2860
2895
|
}
|
|
2861
2896
|
return !0;
|
|
2862
2897
|
}
|
|
2863
2898
|
});
|
|
2864
2899
|
if (o && typeof o == "object") {
|
|
2865
|
-
if (
|
|
2900
|
+
if (j(o))
|
|
2866
2901
|
return o;
|
|
2867
2902
|
for (const c in o) {
|
|
2868
|
-
const
|
|
2869
|
-
o[c] =
|
|
2903
|
+
const u = i ? `${i}.${c}` : c;
|
|
2904
|
+
o[c] = n(o[c], u);
|
|
2870
2905
|
}
|
|
2871
2906
|
return new Proxy(o, {
|
|
2872
|
-
set(c,
|
|
2873
|
-
const _ = i ? `${i}.${String(
|
|
2874
|
-
return c[String(
|
|
2907
|
+
set(c, u, p) {
|
|
2908
|
+
const _ = i ? `${i}.${String(u)}` : String(u);
|
|
2909
|
+
return c[String(u)] = n(p, _), s._initializing || (s._triggerWatchers(
|
|
2875
2910
|
_,
|
|
2876
|
-
c[String(
|
|
2877
|
-
),
|
|
2911
|
+
c[String(u)]
|
|
2912
|
+
), ve(() => s._render(t), s._componentId)), !0;
|
|
2878
2913
|
},
|
|
2879
|
-
get(c,
|
|
2880
|
-
return Reflect.get(c,
|
|
2914
|
+
get(c, u, p) {
|
|
2915
|
+
return Reflect.get(c, u, p);
|
|
2881
2916
|
}
|
|
2882
2917
|
});
|
|
2883
2918
|
}
|
|
2884
2919
|
return o;
|
|
2885
2920
|
};
|
|
2886
2921
|
const s = this;
|
|
2887
|
-
return
|
|
2922
|
+
return n({
|
|
2888
2923
|
// For functional components, state is managed by state() function calls
|
|
2889
2924
|
// Include prop defaults in initial reactive context so prop updates trigger reactivity
|
|
2890
|
-
...
|
|
2891
|
-
Object.entries(
|
|
2925
|
+
...t.props ? Object.fromEntries(
|
|
2926
|
+
Object.entries(t.props).map(([o, i]) => [
|
|
2892
2927
|
o,
|
|
2893
2928
|
i.default
|
|
2894
2929
|
])
|
|
@@ -2898,9 +2933,9 @@ function Bt(e, r) {
|
|
|
2898
2933
|
return {};
|
|
2899
2934
|
}
|
|
2900
2935
|
}
|
|
2901
|
-
_initWatchers(
|
|
2902
|
-
this._runLogicWithinErrorBoundary(
|
|
2903
|
-
|
|
2936
|
+
_initWatchers(t) {
|
|
2937
|
+
this._runLogicWithinErrorBoundary(t, () => {
|
|
2938
|
+
ht(
|
|
2904
2939
|
this.context,
|
|
2905
2940
|
this._watchers,
|
|
2906
2941
|
{}
|
|
@@ -2908,81 +2943,81 @@ function Bt(e, r) {
|
|
|
2908
2943
|
);
|
|
2909
2944
|
});
|
|
2910
2945
|
}
|
|
2911
|
-
_triggerWatchers(
|
|
2912
|
-
|
|
2946
|
+
_triggerWatchers(t, n) {
|
|
2947
|
+
yt(this.context, this._watchers, t, n);
|
|
2913
2948
|
}
|
|
2914
|
-
_applyProps(
|
|
2915
|
-
this._runLogicWithinErrorBoundary(
|
|
2949
|
+
_applyProps(t) {
|
|
2950
|
+
this._runLogicWithinErrorBoundary(t, () => {
|
|
2916
2951
|
try {
|
|
2917
|
-
|
|
2918
|
-
} catch (
|
|
2919
|
-
this._hasError = !0,
|
|
2952
|
+
gt(this, t, this.context);
|
|
2953
|
+
} catch (n) {
|
|
2954
|
+
this._hasError = !0, t.onError && t.onError(n, this.context);
|
|
2920
2955
|
}
|
|
2921
2956
|
});
|
|
2922
2957
|
}
|
|
2923
2958
|
};
|
|
2924
2959
|
}
|
|
2925
|
-
function
|
|
2926
|
-
|
|
2927
|
-
let
|
|
2928
|
-
|
|
2929
|
-
const
|
|
2960
|
+
function rn(e, r) {
|
|
2961
|
+
Bt();
|
|
2962
|
+
let t = q(e);
|
|
2963
|
+
t.includes("-") || (t = `cer-${t}`);
|
|
2964
|
+
const n = {}, s = {
|
|
2930
2965
|
// Props are accessed via useProps() hook
|
|
2931
2966
|
props: {},
|
|
2932
2967
|
// Add lifecycle hooks from the stored functions
|
|
2933
2968
|
onConnected: () => {
|
|
2934
|
-
|
|
2969
|
+
n.onConnected && n.onConnected();
|
|
2935
2970
|
},
|
|
2936
2971
|
onDisconnected: () => {
|
|
2937
|
-
|
|
2972
|
+
n.onDisconnected && n.onDisconnected();
|
|
2938
2973
|
},
|
|
2939
2974
|
onAttributeChanged: (o, i, c) => {
|
|
2940
|
-
|
|
2975
|
+
n.onAttributeChanged && n.onAttributeChanged(o, i, c);
|
|
2941
2976
|
},
|
|
2942
2977
|
onError: (o) => {
|
|
2943
|
-
|
|
2978
|
+
n.onError && o && n.onError(o);
|
|
2944
2979
|
},
|
|
2945
2980
|
render: (o) => {
|
|
2946
|
-
const i = o, c = i._componentId || `${
|
|
2947
|
-
|
|
2981
|
+
const i = o, c = i._componentId || `${t}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2982
|
+
qe.setCurrentComponent(c, () => {
|
|
2948
2983
|
o.requestRender && o.requestRender();
|
|
2949
2984
|
});
|
|
2950
2985
|
try {
|
|
2951
|
-
|
|
2952
|
-
let
|
|
2986
|
+
et(o);
|
|
2987
|
+
let u;
|
|
2953
2988
|
try {
|
|
2954
|
-
|
|
2955
|
-
} catch (
|
|
2989
|
+
u = r();
|
|
2990
|
+
} catch (p) {
|
|
2956
2991
|
try {
|
|
2957
2992
|
const _ = i._hookCallbacks;
|
|
2958
2993
|
if (_ && typeof _.onError == "function")
|
|
2959
2994
|
try {
|
|
2960
|
-
_.onError(
|
|
2995
|
+
_.onError(p);
|
|
2961
2996
|
} catch {
|
|
2962
2997
|
}
|
|
2963
2998
|
} catch {
|
|
2964
2999
|
}
|
|
2965
|
-
throw
|
|
3000
|
+
throw p;
|
|
2966
3001
|
}
|
|
2967
3002
|
if (i._hookCallbacks) {
|
|
2968
|
-
const
|
|
2969
|
-
if (
|
|
2970
|
-
const _ =
|
|
3003
|
+
const p = i._hookCallbacks;
|
|
3004
|
+
if (p.onConnected && (n.onConnected = p.onConnected), p.onDisconnected && (n.onDisconnected = p.onDisconnected), p.onAttributeChanged && (n.onAttributeChanged = p.onAttributeChanged), p.onError && (n.onError = p.onError), p.style && (i._styleCallback = p.style), p.props) {
|
|
3005
|
+
const _ = p.props;
|
|
2971
3006
|
s.props = Object.fromEntries(
|
|
2972
3007
|
Object.entries(_).map(([E, a]) => [
|
|
2973
3008
|
E,
|
|
2974
3009
|
{ type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }
|
|
2975
3010
|
])
|
|
2976
|
-
),
|
|
3011
|
+
), he.set(t, s);
|
|
2977
3012
|
}
|
|
2978
3013
|
}
|
|
2979
|
-
return
|
|
3014
|
+
return u;
|
|
2980
3015
|
} finally {
|
|
2981
|
-
|
|
3016
|
+
Re(), qe.clearCurrentComponent();
|
|
2982
3017
|
}
|
|
2983
3018
|
}
|
|
2984
3019
|
};
|
|
2985
|
-
if (
|
|
3020
|
+
if (he.set(t, s), typeof window < "u") {
|
|
2986
3021
|
try {
|
|
2987
3022
|
const o = {
|
|
2988
3023
|
_hookCallbacks: {},
|
|
@@ -2994,7 +3029,7 @@ function nn(e, r) {
|
|
|
2994
3029
|
// instances will have a proper emit implementation.
|
|
2995
3030
|
emit: () => !0
|
|
2996
3031
|
};
|
|
2997
|
-
|
|
3032
|
+
et(o);
|
|
2998
3033
|
try {
|
|
2999
3034
|
r();
|
|
3000
3035
|
} catch (i) {
|
|
@@ -3006,47 +3041,47 @@ function nn(e, r) {
|
|
|
3006
3041
|
} catch {
|
|
3007
3042
|
}
|
|
3008
3043
|
B(
|
|
3009
|
-
`Error during component discovery render <${
|
|
3044
|
+
`Error during component discovery render <${t}>:`,
|
|
3010
3045
|
i
|
|
3011
3046
|
), Z(
|
|
3012
3047
|
"Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when()."
|
|
3013
3048
|
);
|
|
3014
3049
|
} catch {
|
|
3015
3050
|
}
|
|
3016
|
-
throw
|
|
3051
|
+
throw Re(), i;
|
|
3017
3052
|
}
|
|
3018
|
-
if (
|
|
3053
|
+
if (Re(), o._hookCallbacks?.props) {
|
|
3019
3054
|
const i = o._hookCallbacks.props;
|
|
3020
3055
|
s.props = Object.fromEntries(
|
|
3021
|
-
Object.entries(i).map(([c,
|
|
3056
|
+
Object.entries(i).map(([c, u]) => [
|
|
3022
3057
|
c,
|
|
3023
|
-
{ type: typeof
|
|
3058
|
+
{ type: typeof u == "boolean" ? Boolean : typeof u == "number" ? Number : typeof u == "string" ? String : Function, default: u }
|
|
3024
3059
|
])
|
|
3025
|
-
),
|
|
3060
|
+
), he.set(t, s);
|
|
3026
3061
|
}
|
|
3027
3062
|
} catch {
|
|
3028
3063
|
}
|
|
3029
|
-
customElements.get(
|
|
3030
|
-
|
|
3031
|
-
|
|
3064
|
+
customElements.get(t) || customElements.define(
|
|
3065
|
+
t,
|
|
3066
|
+
Dt(t, s)
|
|
3032
3067
|
);
|
|
3033
3068
|
}
|
|
3034
3069
|
}
|
|
3035
|
-
class
|
|
3070
|
+
class Wt {
|
|
3036
3071
|
map = /* @__PURE__ */ new Map();
|
|
3037
3072
|
maxSize;
|
|
3038
3073
|
constructor(r) {
|
|
3039
3074
|
this.maxSize = r;
|
|
3040
3075
|
}
|
|
3041
3076
|
get(r) {
|
|
3042
|
-
const
|
|
3043
|
-
if (
|
|
3044
|
-
return this.map.delete(r), this.map.set(r,
|
|
3077
|
+
const t = this.map.get(r);
|
|
3078
|
+
if (t !== void 0)
|
|
3079
|
+
return this.map.delete(r), this.map.set(r, t), t;
|
|
3045
3080
|
}
|
|
3046
|
-
set(r,
|
|
3047
|
-
if (this.map.delete(r), this.map.set(r,
|
|
3048
|
-
const
|
|
3049
|
-
|
|
3081
|
+
set(r, t) {
|
|
3082
|
+
if (this.map.delete(r), this.map.set(r, t), this.map.size > this.maxSize) {
|
|
3083
|
+
const n = this.map.keys().next().value;
|
|
3084
|
+
n !== void 0 && this.map.delete(n);
|
|
3050
3085
|
}
|
|
3051
3086
|
}
|
|
3052
3087
|
has(r) {
|
|
@@ -3056,8 +3091,8 @@ class Dt {
|
|
|
3056
3091
|
this.map.clear();
|
|
3057
3092
|
}
|
|
3058
3093
|
}
|
|
3059
|
-
const
|
|
3060
|
-
function
|
|
3094
|
+
const Be = new Wt(500);
|
|
3095
|
+
function Kt(e, r) {
|
|
3061
3096
|
if (e == null) {
|
|
3062
3097
|
Z(
|
|
3063
3098
|
`⚠️ Event handler for '@${r}' is ${e}. This will prevent the event from working. Use a function reference instead: @${r}="\${functionName}"`
|
|
@@ -3070,35 +3105,35 @@ function Wt(e, r) {
|
|
|
3070
3105
|
`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${r}="\${fn}" not @${r}="\${fn()}"`
|
|
3071
3106
|
);
|
|
3072
3107
|
}
|
|
3073
|
-
function
|
|
3074
|
-
const s =
|
|
3075
|
-
return { tag: e, key: s, props: r, children:
|
|
3108
|
+
function ne(e, r = {}, t, n) {
|
|
3109
|
+
const s = n ?? r.key;
|
|
3110
|
+
return { tag: e, key: s, props: r, children: t };
|
|
3076
3111
|
}
|
|
3077
|
-
function
|
|
3112
|
+
function Ae(e) {
|
|
3078
3113
|
return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
|
|
3079
3114
|
}
|
|
3080
|
-
function
|
|
3081
|
-
return typeof e == "object" && e !== null && "tag" in e && !
|
|
3115
|
+
function oe(e) {
|
|
3116
|
+
return typeof e == "object" && e !== null && "tag" in e && !Ae(e);
|
|
3082
3117
|
}
|
|
3083
|
-
function
|
|
3118
|
+
function zt(e, r) {
|
|
3084
3119
|
return e.key != null ? e : { ...e, key: r };
|
|
3085
3120
|
}
|
|
3086
|
-
function
|
|
3087
|
-
const
|
|
3088
|
-
let
|
|
3089
|
-
for (;
|
|
3090
|
-
const
|
|
3121
|
+
function Ft(e, r = [], t = {}) {
|
|
3122
|
+
const n = {}, s = {}, o = {}, i = [], c = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g;
|
|
3123
|
+
let u;
|
|
3124
|
+
for (; u = c.exec(e); ) {
|
|
3125
|
+
const p = u[1], _ = u[2];
|
|
3091
3126
|
let E = "";
|
|
3092
|
-
for (let
|
|
3093
|
-
if (
|
|
3094
|
-
E =
|
|
3127
|
+
for (let d = 3; d < u.length; d++)
|
|
3128
|
+
if (u[d] !== void 0) {
|
|
3129
|
+
E = u[d];
|
|
3095
3130
|
break;
|
|
3096
3131
|
}
|
|
3097
3132
|
E.length >= 2 && (E[0] === '"' && E[E.length - 1] === '"' || E[0] === "'" && E[E.length - 1] === "'") && (E = E.slice(1, -1));
|
|
3098
|
-
const a = !/=/.test(
|
|
3099
|
-
let
|
|
3100
|
-
|
|
3101
|
-
const
|
|
3133
|
+
const a = !/=/.test(u[0]), g = E.match(/^{{(\d+)}}$/);
|
|
3134
|
+
let f = a ? !0 : g ? r[Number(g[1])] ?? null : E;
|
|
3135
|
+
g || (f === "true" ? f = !0 : f === "false" ? f = !1 : f === "null" ? f = null : isNaN(Number(f)) || (f = Number(f)));
|
|
3136
|
+
const m = [
|
|
3102
3137
|
"model",
|
|
3103
3138
|
"bind",
|
|
3104
3139
|
"show",
|
|
@@ -3107,54 +3142,54 @@ function zt(e, r = [], n = {}) {
|
|
|
3107
3142
|
"ref",
|
|
3108
3143
|
"when"
|
|
3109
3144
|
];
|
|
3110
|
-
if (
|
|
3111
|
-
const [
|
|
3112
|
-
if (
|
|
3113
|
-
const k = [...b], w =
|
|
3145
|
+
if (p === ":") {
|
|
3146
|
+
const [d, T] = _.split(":"), [S, ...b] = d.split(".");
|
|
3147
|
+
if (m.includes(S)) {
|
|
3148
|
+
const k = [...b], w = S === "model" && T ? `model:${T}` : S;
|
|
3114
3149
|
o[w] = {
|
|
3115
|
-
value:
|
|
3150
|
+
value: f,
|
|
3116
3151
|
modifiers: k,
|
|
3117
3152
|
arg: T
|
|
3118
3153
|
};
|
|
3119
3154
|
} else if (_ === "disabled") {
|
|
3120
|
-
let k =
|
|
3121
|
-
k &&
|
|
3155
|
+
let k = f;
|
|
3156
|
+
k && j(k) && (k = k.value);
|
|
3122
3157
|
const w = typeof k;
|
|
3123
3158
|
if (k === "" || w === "boolean" || w === "string" && (k === "true" || k === "false") || k == null || w === "number")
|
|
3124
|
-
|
|
3159
|
+
n[_] = k;
|
|
3125
3160
|
else {
|
|
3126
|
-
let l =
|
|
3127
|
-
l &&
|
|
3161
|
+
let l = f;
|
|
3162
|
+
l && j(l) && (l = l.value), s[_] = l;
|
|
3128
3163
|
}
|
|
3129
3164
|
i.push(_);
|
|
3130
3165
|
} else {
|
|
3131
|
-
let k =
|
|
3132
|
-
k &&
|
|
3166
|
+
let k = f;
|
|
3167
|
+
k && j(k) && (k = k.value), s[_] = k, i.push(_);
|
|
3133
3168
|
}
|
|
3134
|
-
} else if (
|
|
3135
|
-
const [
|
|
3136
|
-
|
|
3137
|
-
const b = typeof
|
|
3169
|
+
} else if (p === "@") {
|
|
3170
|
+
const [d, ...T] = _.split("."), S = T;
|
|
3171
|
+
Kt(f, d);
|
|
3172
|
+
const b = typeof f == "function" ? f : typeof t[f] == "function" ? t[f] : void 0;
|
|
3138
3173
|
if (b) {
|
|
3139
3174
|
const k = (L) => {
|
|
3140
|
-
if (
|
|
3141
|
-
return
|
|
3142
|
-
|
|
3175
|
+
if (S.includes("prevent") && L.preventDefault(), S.includes("stop") && L.stopPropagation(), !(S.includes("self") && L.target !== L.currentTarget))
|
|
3176
|
+
return S.includes("once") && L.currentTarget?.removeEventListener(
|
|
3177
|
+
d,
|
|
3143
3178
|
k
|
|
3144
3179
|
), b(L);
|
|
3145
|
-
}, w = "on" +
|
|
3146
|
-
|
|
3180
|
+
}, w = "on" + d.charAt(0).toUpperCase() + d.slice(1);
|
|
3181
|
+
n[w] = k;
|
|
3147
3182
|
}
|
|
3148
|
-
} else _ === "ref" ?
|
|
3183
|
+
} else _ === "ref" ? n.ref = f : s[_] = f;
|
|
3149
3184
|
}
|
|
3150
|
-
return { props:
|
|
3185
|
+
return { props: n, attrs: s, directives: o, bound: i };
|
|
3151
3186
|
}
|
|
3152
|
-
function
|
|
3153
|
-
if (!
|
|
3187
|
+
function ze(e) {
|
|
3188
|
+
if (!oe(e) || Ae(e))
|
|
3154
3189
|
return e;
|
|
3155
3190
|
const r = e.props?.directives;
|
|
3156
3191
|
if (r && r.when) {
|
|
3157
|
-
const
|
|
3192
|
+
const t = r.when.value, n = j(t) ? t.value : t, s = { ...r };
|
|
3158
3193
|
delete s.when;
|
|
3159
3194
|
const o = { ...e.props };
|
|
3160
3195
|
Object.keys(s).length > 0 ? o.directives = s : delete o.directives;
|
|
@@ -3163,97 +3198,97 @@ function Ke(e) {
|
|
|
3163
3198
|
props: o
|
|
3164
3199
|
};
|
|
3165
3200
|
return Array.isArray(i.children) && (i.children = i.children.map(
|
|
3166
|
-
(
|
|
3201
|
+
(u) => typeof u == "object" && u !== null ? ze(u) : u
|
|
3167
3202
|
)), {
|
|
3168
3203
|
tag: "#anchor",
|
|
3169
3204
|
key: e.key != null ? `when-${e.key}` : `when-${e.tag}`,
|
|
3170
|
-
children:
|
|
3205
|
+
children: n ? [i] : []
|
|
3171
3206
|
};
|
|
3172
3207
|
}
|
|
3173
3208
|
if (Array.isArray(e.children)) {
|
|
3174
|
-
const
|
|
3175
|
-
(
|
|
3209
|
+
const t = e.children.map(
|
|
3210
|
+
(n) => typeof n == "object" && n !== null ? ze(n) : n
|
|
3176
3211
|
);
|
|
3177
3212
|
return {
|
|
3178
3213
|
...e,
|
|
3179
|
-
children:
|
|
3214
|
+
children: t
|
|
3180
3215
|
};
|
|
3181
3216
|
}
|
|
3182
3217
|
return e;
|
|
3183
3218
|
}
|
|
3184
|
-
function
|
|
3185
|
-
const
|
|
3219
|
+
function Vt(e, r, t) {
|
|
3220
|
+
const n = Ce.length > 0 ? Ce[Ce.length - 1] : void 0, s = t ?? n, o = !t && r.length === 0, i = o ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
3186
3221
|
if (o && i) {
|
|
3187
|
-
const l =
|
|
3222
|
+
const l = Be.get(i);
|
|
3188
3223
|
if (l) return l;
|
|
3189
3224
|
}
|
|
3190
3225
|
function c(l, v) {
|
|
3191
|
-
return
|
|
3226
|
+
return ne("#text", {}, l, v);
|
|
3192
3227
|
}
|
|
3193
|
-
function
|
|
3194
|
-
let y = typeof l == "string" ?
|
|
3195
|
-
return typeof y == "string" && /[\r\n]/.test(y) && (y = y.replace(/\s+/g, " ")),
|
|
3228
|
+
function u(l, v) {
|
|
3229
|
+
let y = typeof l == "string" ? ut(l) : l;
|
|
3230
|
+
return typeof y == "string" && /[\r\n]/.test(y) && (y = y.replace(/\s+/g, " ")), ne("#text", {}, y, v);
|
|
3196
3231
|
}
|
|
3197
|
-
let
|
|
3232
|
+
let p = "";
|
|
3198
3233
|
for (let l = 0; l < e.length; l++)
|
|
3199
|
-
|
|
3234
|
+
p += e[l], l < r.length && (p += `{{${l}}}`);
|
|
3200
3235
|
const _ = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, E = [];
|
|
3201
|
-
let a,
|
|
3202
|
-
const
|
|
3236
|
+
let a, g = [], f = null, m = {}, d, T = 0;
|
|
3237
|
+
const S = [];
|
|
3203
3238
|
function b(l) {
|
|
3204
|
-
if (!l || typeof l != "object" ||
|
|
3205
|
-
const v = l, y =
|
|
3239
|
+
if (!l || typeof l != "object" || Ae(l)) return;
|
|
3240
|
+
const v = l, y = m;
|
|
3206
3241
|
if (v.props || v.attrs) {
|
|
3207
3242
|
const h = v;
|
|
3208
|
-
h.props && (y.props || (y.props = {}), Object.assign(y.props, h.props)), h.attrs && (y.attrs || (y.attrs = {}), Object.keys(h.attrs).forEach((
|
|
3209
|
-
if (
|
|
3210
|
-
const $ = String(y.attrs.style).replace(/;?\s*$/, ""),
|
|
3211
|
-
y.attrs.style = $ + "; " +
|
|
3212
|
-
} else if (
|
|
3213
|
-
const $ = String(y.attrs.class).trim().split(/\s+/).filter(Boolean),
|
|
3214
|
-
.../* @__PURE__ */ new Set([...$, ...
|
|
3243
|
+
h.props && (y.props || (y.props = {}), Object.assign(y.props, h.props)), h.attrs && (y.attrs || (y.attrs = {}), Object.keys(h.attrs).forEach((C) => {
|
|
3244
|
+
if (C === "style" && y.attrs.style) {
|
|
3245
|
+
const $ = String(y.attrs.style).replace(/;?\s*$/, ""), O = String(h.attrs.style).replace(/^;?\s*/, "");
|
|
3246
|
+
y.attrs.style = $ + "; " + O;
|
|
3247
|
+
} else if (C === "class" && y.attrs.class) {
|
|
3248
|
+
const $ = String(y.attrs.class).trim().split(/\s+/).filter(Boolean), O = String(h.attrs.class).trim().split(/\s+/).filter(Boolean), A = [
|
|
3249
|
+
.../* @__PURE__ */ new Set([...$, ...O])
|
|
3215
3250
|
];
|
|
3216
|
-
y.attrs.class =
|
|
3251
|
+
y.attrs.class = A.join(" ");
|
|
3217
3252
|
} else
|
|
3218
|
-
y.attrs[
|
|
3253
|
+
y.attrs[C] = h.attrs[C];
|
|
3219
3254
|
}));
|
|
3220
3255
|
} else
|
|
3221
3256
|
y.props || (y.props = {}), Object.assign(y.props, v);
|
|
3222
3257
|
}
|
|
3223
3258
|
function k(l, v) {
|
|
3224
|
-
const y =
|
|
3225
|
-
if (
|
|
3226
|
-
const h = l.key ?? v,
|
|
3259
|
+
const y = f ? g : S;
|
|
3260
|
+
if (Ae(l)) {
|
|
3261
|
+
const h = l.key ?? v, C = l.children;
|
|
3227
3262
|
y.push({
|
|
3228
3263
|
...l,
|
|
3229
3264
|
key: h,
|
|
3230
|
-
children:
|
|
3265
|
+
children: C
|
|
3231
3266
|
});
|
|
3232
3267
|
return;
|
|
3233
3268
|
}
|
|
3234
|
-
if (
|
|
3235
|
-
y.push(
|
|
3269
|
+
if (oe(l)) {
|
|
3270
|
+
y.push(zt(l, void 0));
|
|
3236
3271
|
return;
|
|
3237
3272
|
}
|
|
3238
3273
|
if (Array.isArray(l)) {
|
|
3239
3274
|
if (l.length === 0) return;
|
|
3240
3275
|
for (let h = 0; h < l.length; h++) {
|
|
3241
|
-
const
|
|
3242
|
-
|
|
3243
|
-
|
|
3276
|
+
const C = l[h];
|
|
3277
|
+
Ae(C) || oe(C) || Array.isArray(C) ? k(C, `${v}-${h}`) : C !== null && typeof C == "object" ? Ge(C) ? y.push(
|
|
3278
|
+
ne(
|
|
3244
3279
|
"#raw",
|
|
3245
3280
|
{},
|
|
3246
|
-
|
|
3281
|
+
C.__rawHTML,
|
|
3247
3282
|
`${v}-${h}`
|
|
3248
3283
|
)
|
|
3249
|
-
) : b(
|
|
3284
|
+
) : b(C) : y.push(c(String(C), `${v}-${h}`));
|
|
3250
3285
|
}
|
|
3251
3286
|
return;
|
|
3252
3287
|
}
|
|
3253
3288
|
if (l !== null && typeof l == "object") {
|
|
3254
|
-
if (
|
|
3289
|
+
if (Ge(l)) {
|
|
3255
3290
|
const h = l.__rawHTML ?? "";
|
|
3256
|
-
y.push(
|
|
3291
|
+
y.push(ne("#raw", {}, h, v));
|
|
3257
3292
|
return;
|
|
3258
3293
|
}
|
|
3259
3294
|
b(l);
|
|
@@ -3277,23 +3312,23 @@ function Ft(e, r, n) {
|
|
|
3277
3312
|
"track",
|
|
3278
3313
|
"wbr"
|
|
3279
3314
|
]);
|
|
3280
|
-
for (; a = _.exec(
|
|
3315
|
+
for (; a = _.exec(p); )
|
|
3281
3316
|
if (!(a[0].startsWith("<!--") && a[0].endsWith("-->"))) {
|
|
3282
3317
|
if (a[1]) {
|
|
3283
3318
|
const l = a[1], v = a[0][1] === "/", y = a[0][a[0].length - 2] === "/" || w.has(l), {
|
|
3284
3319
|
props: h,
|
|
3285
|
-
attrs:
|
|
3320
|
+
attrs: C,
|
|
3286
3321
|
directives: $,
|
|
3287
|
-
bound:
|
|
3288
|
-
} =
|
|
3322
|
+
bound: O
|
|
3323
|
+
} = Ft(
|
|
3289
3324
|
a[2] || "",
|
|
3290
3325
|
r,
|
|
3291
3326
|
s ?? {}
|
|
3292
|
-
),
|
|
3293
|
-
for (const I in h)
|
|
3294
|
-
for (const I in
|
|
3295
|
-
|
|
3296
|
-
|
|
3327
|
+
), A = { props: {}, attrs: {} };
|
|
3328
|
+
for (const I in h) A.props[I] = h[I];
|
|
3329
|
+
for (const I in C) A.attrs[I] = C[I];
|
|
3330
|
+
A.attrs && Object.prototype.hasOwnProperty.call(A.attrs, "key") && !(A.props && Object.prototype.hasOwnProperty.call(A.props, "key")) && P(() => {
|
|
3331
|
+
A.props.key = A.attrs.key;
|
|
3297
3332
|
});
|
|
3298
3333
|
try {
|
|
3299
3334
|
const I = {
|
|
@@ -3321,50 +3356,50 @@ function Ft(e, r, n) {
|
|
|
3321
3356
|
img: ["src", "alt", "width", "height"],
|
|
3322
3357
|
button: ["type", "name", "value", "autofocus", "form"]
|
|
3323
3358
|
}, x = l.toLowerCase(), X = I[x] ?? [];
|
|
3324
|
-
if (
|
|
3359
|
+
if (A.attrs) {
|
|
3325
3360
|
for (const H of X)
|
|
3326
|
-
if (
|
|
3327
|
-
let
|
|
3328
|
-
if (
|
|
3329
|
-
|
|
3330
|
-
else if (
|
|
3361
|
+
if (O && O.includes(H) && H in A.attrs && !(A.props && H in A.props)) {
|
|
3362
|
+
let M = A.attrs[H];
|
|
3363
|
+
if (M && j(M))
|
|
3364
|
+
M = M.value, A.props[H] = M, delete A.attrs[H];
|
|
3365
|
+
else if (M && typeof M == "object" && "value" in M && !(M instanceof Node))
|
|
3331
3366
|
try {
|
|
3332
|
-
const D =
|
|
3333
|
-
|
|
3367
|
+
const D = M.value;
|
|
3368
|
+
A.props[H] = (x === "select" || x === "option") && H === "value" ? String(D) : D, delete A.attrs[H];
|
|
3334
3369
|
} catch {
|
|
3335
3370
|
}
|
|
3336
3371
|
else {
|
|
3337
|
-
const D = typeof
|
|
3372
|
+
const D = typeof M;
|
|
3338
3373
|
if (H === "disabled")
|
|
3339
|
-
(
|
|
3340
|
-
else if (
|
|
3341
|
-
const J = (x === "select" || x === "option") && H === "value" ? String(
|
|
3342
|
-
|
|
3374
|
+
(M === "" || D === "boolean" || D === "string" && (M === "true" || M === "false") || M == null || D === "number") && (A.props[H] = M, delete A.attrs[H]);
|
|
3375
|
+
else if (M === "" || D === "string" || D === "number" || D === "boolean" || M == null) {
|
|
3376
|
+
const J = (x === "select" || x === "option") && H === "value" ? String(M) : M;
|
|
3377
|
+
A.props[H] = J, delete A.attrs[H];
|
|
3343
3378
|
}
|
|
3344
3379
|
}
|
|
3345
3380
|
}
|
|
3346
3381
|
}
|
|
3347
3382
|
if (l.includes("-") || !!s?.__customElements?.has?.(l)) {
|
|
3348
|
-
if (
|
|
3383
|
+
if (A.isCustomElement = !0, O && A.attrs) {
|
|
3349
3384
|
const H = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
|
|
3350
|
-
for (const
|
|
3351
|
-
if (
|
|
3352
|
-
const D =
|
|
3353
|
-
if (
|
|
3385
|
+
for (const M of O)
|
|
3386
|
+
if (M in A.attrs && !(A.props && M in A.props)) {
|
|
3387
|
+
const D = M.includes("-") ? Fe(M) : M, J = A.attrs[M];
|
|
3388
|
+
if (A.props[D] = J, H.has(M) || nt(M))
|
|
3354
3389
|
try {
|
|
3355
|
-
const
|
|
3356
|
-
|
|
3390
|
+
const Le = z(A.attrs[M]);
|
|
3391
|
+
Le === null ? delete A.attrs[M] : A.attrs[M] = Le;
|
|
3357
3392
|
} catch {
|
|
3358
|
-
delete
|
|
3393
|
+
delete A.attrs[M];
|
|
3359
3394
|
}
|
|
3360
3395
|
else
|
|
3361
|
-
delete
|
|
3396
|
+
delete A.attrs[M];
|
|
3362
3397
|
}
|
|
3363
3398
|
}
|
|
3364
3399
|
try {
|
|
3365
|
-
if (
|
|
3366
|
-
const H =
|
|
3367
|
-
typeof H < "u" && (
|
|
3400
|
+
if (A.attrs && !(A.props && "modelValue" in A.props)) {
|
|
3401
|
+
const H = A.attrs["model-value"] ?? A.attrs.modelValue;
|
|
3402
|
+
typeof H < "u" && (A.props.modelValue = H);
|
|
3368
3403
|
}
|
|
3369
3404
|
} catch {
|
|
3370
3405
|
}
|
|
@@ -3379,54 +3414,54 @@ function Ft(e, r, n) {
|
|
|
3379
3414
|
if (!!(l.includes("-") || H || X))
|
|
3380
3415
|
for (const J of Object.keys($)) {
|
|
3381
3416
|
if (J !== "model" && !J.startsWith("model:")) continue;
|
|
3382
|
-
const
|
|
3417
|
+
const Te = $[J], Le = Te.arg ?? (J.includes(":") ? J.split(":", 2)[1] : void 0), F = Te.value, Pe = Le ?? "modelValue", Ve = K, at = Me, me = s?._state || s;
|
|
3383
3418
|
let ee;
|
|
3384
|
-
typeof F == "string" &&
|
|
3385
|
-
|
|
3419
|
+
typeof F == "string" && me ? ee = Ve(
|
|
3420
|
+
me,
|
|
3386
3421
|
F
|
|
3387
|
-
) : ee = F,
|
|
3422
|
+
) : ee = F, A.props[Pe] = ee;
|
|
3388
3423
|
try {
|
|
3389
|
-
const
|
|
3390
|
-
|
|
3424
|
+
const re = q(Pe);
|
|
3425
|
+
A.attrs || (A.attrs = {}), ee != null && (typeof ee == "string" || typeof ee == "number" || typeof ee == "boolean") && (A.attrs[re] = ee);
|
|
3391
3426
|
} catch {
|
|
3392
3427
|
}
|
|
3393
|
-
|
|
3394
|
-
const
|
|
3428
|
+
A.isCustomElement = !0;
|
|
3429
|
+
const Ue = `update:${q(Pe)}`.replace(
|
|
3395
3430
|
/-([a-z])/g,
|
|
3396
|
-
(
|
|
3397
|
-
),
|
|
3398
|
-
|
|
3399
|
-
const Q =
|
|
3400
|
-
if (
|
|
3401
|
-
if (F &&
|
|
3402
|
-
const
|
|
3403
|
-
if (Array.isArray(Q) && Array.isArray(
|
|
3431
|
+
(re, Q) => Q.toUpperCase()
|
|
3432
|
+
), lt = "on" + Ue.charAt(0).toUpperCase() + Ue.slice(1);
|
|
3433
|
+
A.props[lt] = function(re) {
|
|
3434
|
+
const Q = re.detail !== void 0 ? re.detail : re.target ? re.target.value : void 0;
|
|
3435
|
+
if (me)
|
|
3436
|
+
if (F && j(F)) {
|
|
3437
|
+
const se = F.value;
|
|
3438
|
+
if (Array.isArray(Q) && Array.isArray(se) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...se].sort()) : Q !== se) {
|
|
3404
3439
|
F.value = Q;
|
|
3405
3440
|
try {
|
|
3406
|
-
const
|
|
3407
|
-
if (
|
|
3408
|
-
const
|
|
3409
|
-
typeof
|
|
3441
|
+
const ie = s;
|
|
3442
|
+
if (ie) {
|
|
3443
|
+
const ge = ie.requestRender, be = ie._requestRender;
|
|
3444
|
+
typeof ge == "function" ? ge() : typeof be == "function" && be();
|
|
3410
3445
|
}
|
|
3411
3446
|
} catch {
|
|
3412
3447
|
}
|
|
3413
3448
|
}
|
|
3414
3449
|
} else {
|
|
3415
|
-
const
|
|
3416
|
-
|
|
3450
|
+
const se = Ve(
|
|
3451
|
+
me || {},
|
|
3417
3452
|
typeof F == "string" ? F : String(F)
|
|
3418
3453
|
);
|
|
3419
|
-
if (Array.isArray(Q) && Array.isArray(
|
|
3420
|
-
|
|
3421
|
-
|
|
3454
|
+
if (Array.isArray(Q) && Array.isArray(se) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...se].sort()) : Q !== se) {
|
|
3455
|
+
at(
|
|
3456
|
+
me || {},
|
|
3422
3457
|
typeof F == "string" ? F : String(F),
|
|
3423
3458
|
Q
|
|
3424
3459
|
);
|
|
3425
3460
|
try {
|
|
3426
|
-
const
|
|
3427
|
-
if (
|
|
3428
|
-
const
|
|
3429
|
-
typeof
|
|
3461
|
+
const ie = s;
|
|
3462
|
+
if (ie) {
|
|
3463
|
+
const ge = ie.requestRender, be = ie._requestRender;
|
|
3464
|
+
typeof ge == "function" ? ge() : typeof be == "function" && be();
|
|
3430
3465
|
}
|
|
3431
3466
|
} catch {
|
|
3432
3467
|
}
|
|
@@ -3436,90 +3471,90 @@ function Ft(e, r, n) {
|
|
|
3436
3471
|
}
|
|
3437
3472
|
} catch {
|
|
3438
3473
|
}
|
|
3439
|
-
if (Object.keys($).length > 0 && (
|
|
3440
|
-
const I =
|
|
3474
|
+
if (Object.keys($).length > 0 && (A.directives = { ...$ }), v) {
|
|
3475
|
+
const I = g.some(
|
|
3441
3476
|
(H) => typeof H == "object" && H.tag !== "#text"
|
|
3442
3477
|
);
|
|
3443
|
-
let x =
|
|
3444
|
-
if (I &&
|
|
3478
|
+
let x = g;
|
|
3479
|
+
if (I && g.length > 0) {
|
|
3445
3480
|
let H = 0;
|
|
3446
|
-
for (; H <
|
|
3447
|
-
const D =
|
|
3448
|
-
if (!
|
|
3481
|
+
for (; H < g.length; ) {
|
|
3482
|
+
const D = g[H];
|
|
3483
|
+
if (!oe(D) || D.tag !== "#text" || typeof D.children != "string" || D.children.trim() !== "")
|
|
3449
3484
|
break;
|
|
3450
3485
|
H++;
|
|
3451
3486
|
}
|
|
3452
|
-
let
|
|
3453
|
-
for (;
|
|
3454
|
-
const D =
|
|
3455
|
-
if (!
|
|
3487
|
+
let M = g.length - 1;
|
|
3488
|
+
for (; M >= 0; ) {
|
|
3489
|
+
const D = g[M];
|
|
3490
|
+
if (!oe(D) || D.tag !== "#text" || typeof D.children != "string" || D.children.trim() !== "")
|
|
3456
3491
|
break;
|
|
3457
|
-
|
|
3492
|
+
M--;
|
|
3458
3493
|
}
|
|
3459
|
-
H === 0 &&
|
|
3494
|
+
H === 0 && M === g.length - 1 ? x = g : H > M ? x = [] : x = g.slice(H, M + 1);
|
|
3460
3495
|
}
|
|
3461
|
-
const X =
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
x.length === 1 &&
|
|
3465
|
-
|
|
3496
|
+
const X = ne(
|
|
3497
|
+
f,
|
|
3498
|
+
m,
|
|
3499
|
+
x.length === 1 && oe(x[0]) && x[0].tag === "#text" ? typeof x[0].children == "string" ? x[0].children : "" : x.length ? x : void 0,
|
|
3500
|
+
d
|
|
3466
3501
|
), W = E.pop();
|
|
3467
|
-
W ? (
|
|
3468
|
-
} else y ?
|
|
3469
|
-
tag:
|
|
3470
|
-
props:
|
|
3471
|
-
children:
|
|
3472
|
-
key:
|
|
3473
|
-
}),
|
|
3502
|
+
W ? (f = W.tag, m = W.props, d = W.key, g = W.children, g.push(X)) : (S.push(X), f = null, m = {}, d = void 0, g = []);
|
|
3503
|
+
} else y ? f ? g.push(ne(l, A, void 0, void 0)) : S.push(ne(l, A, void 0, void 0)) : (f && E.push({
|
|
3504
|
+
tag: f,
|
|
3505
|
+
props: m,
|
|
3506
|
+
children: g,
|
|
3507
|
+
key: d
|
|
3508
|
+
}), f = l, m = A, g = []);
|
|
3474
3509
|
} else if (typeof a[3] < "u") {
|
|
3475
3510
|
const l = Number(a[3]), v = r[l], y = `interp-${l}`;
|
|
3476
3511
|
k(v, y);
|
|
3477
3512
|
} else if (a[4]) {
|
|
3478
|
-
const l = a[4], v =
|
|
3513
|
+
const l = a[4], v = f ? g : S, y = l.split(/({{\d+}})/);
|
|
3479
3514
|
for (const h of y) {
|
|
3480
3515
|
if (!h) continue;
|
|
3481
|
-
const
|
|
3482
|
-
if (
|
|
3483
|
-
const $ = Number(
|
|
3484
|
-
k(
|
|
3516
|
+
const C = h.match(/^{{(\d+)}}$/);
|
|
3517
|
+
if (C) {
|
|
3518
|
+
const $ = Number(C[1]), O = r[$], A = `interp-${$}`;
|
|
3519
|
+
k(O, A);
|
|
3485
3520
|
} else {
|
|
3486
3521
|
const $ = `text-${T++}`;
|
|
3487
|
-
v.push(
|
|
3522
|
+
v.push(u(h, $));
|
|
3488
3523
|
}
|
|
3489
3524
|
}
|
|
3490
3525
|
}
|
|
3491
3526
|
}
|
|
3492
|
-
const N =
|
|
3493
|
-
(l) =>
|
|
3527
|
+
const N = S.filter((l) => oe(l) && l.tag === "#text" ? typeof l.children == "string" && l.children.trim() !== "" : !0).map(
|
|
3528
|
+
(l) => ze(l)
|
|
3494
3529
|
);
|
|
3495
3530
|
if (N.length === 1) {
|
|
3496
3531
|
const l = N[0];
|
|
3497
|
-
return o && i &&
|
|
3532
|
+
return o && i && Be.set(i, l), l;
|
|
3498
3533
|
} else if (N.length > 1) {
|
|
3499
3534
|
const l = N;
|
|
3500
|
-
return o && i &&
|
|
3535
|
+
return o && i && Be.set(i, l), l;
|
|
3501
3536
|
}
|
|
3502
|
-
return
|
|
3537
|
+
return ne("div", {}, "", "fallback-root");
|
|
3503
3538
|
}
|
|
3504
|
-
function
|
|
3505
|
-
const
|
|
3506
|
-
return
|
|
3539
|
+
function sn(e, ...r) {
|
|
3540
|
+
const t = r[r.length - 1], n = typeof t == "object" && t && !Array.isArray(t) ? t : void 0;
|
|
3541
|
+
return Vt(e, r, n);
|
|
3507
3542
|
}
|
|
3508
3543
|
export {
|
|
3509
|
-
|
|
3510
|
-
|
|
3544
|
+
rn as component,
|
|
3545
|
+
an as computed,
|
|
3511
3546
|
dn as css,
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3547
|
+
ut as decodeEntities,
|
|
3548
|
+
sn as html,
|
|
3549
|
+
ln as ref,
|
|
3550
|
+
fn as unsafeHTML,
|
|
3551
|
+
Jt as useEmit,
|
|
3552
|
+
Qt as useOnAttributeChanged,
|
|
3553
|
+
Yt as useOnConnected,
|
|
3554
|
+
Xt as useOnDisconnected,
|
|
3555
|
+
en as useOnError,
|
|
3556
|
+
tn as useProps,
|
|
3557
|
+
nn as useStyle,
|
|
3558
|
+
un as watch
|
|
3524
3559
|
};
|
|
3525
3560
|
//# sourceMappingURL=custom-elements-runtime.es.js.map
|