@jasonshimmy/custom-elements-runtime 3.0.0 → 3.1.0

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