@jasonshimmy/custom-elements-runtime 2.2.4 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { g as U, t as Z, i as j, s as xe, a as P, b as z, d as B, f as V, T as dt, h as Ve, S as ht, j as st, k as Ze, l as Se, m as Je, n as yt } from "./namespace-helpers-Vwt2Fzds.js";
2
2
  import { c as pn, r as dn, u as hn, w as yn } from "./namespace-helpers-Vwt2Fzds.js";
3
3
  import { d as D, a as Y } from "./logger-BpibrmKL.js";
4
- import { j as mt, g as $e, a as fe, m as _e, s as gt, b as Ye } from "./transitions-m6FraTTL.js";
5
- import { c as gn } from "./transitions-m6FraTTL.js";
4
+ import { j as mt, g as $e, a as fe, m as _e, s as gt, b as Ye } from "./transitions-DCIjMqzG.js";
5
+ import { c as gn } from "./transitions-DCIjMqzG.js";
6
6
  function bt(e, n, t) {
7
7
  if (t)
8
8
  for (const [s, r] of Object.entries(t)) {
@@ -26,8 +26,8 @@ function Et(e, n, t, s) {
26
26
  if (typeof i != typeof c || typeof i != "object" || i === null || c === null) return !1;
27
27
  if (Array.isArray(i) && Array.isArray(c))
28
28
  return i.length !== c.length ? !1 : i.every((m, A) => r(m, c[A]));
29
- const u = i, f = c, _ = Object.keys(u || {}), E = Object.keys(f || {});
30
- return _.length !== E.length ? !1 : _.every((m) => r(u[m], f[m]));
29
+ const f = i, u = c, _ = Object.keys(f || {}), E = Object.keys(u || {});
30
+ return _.length !== E.length ? !1 : _.every((m) => r(f[m], u[m]));
31
31
  }, o = n.get(t);
32
32
  if (o && !r(s, o.oldValue))
33
33
  try {
@@ -38,10 +38,10 @@ function Et(e, n, t, s) {
38
38
  for (const [i, c] of n.entries())
39
39
  if (c.options.deep && t.startsWith(i + "."))
40
40
  try {
41
- const u = U(e, i);
42
- r(u, c.oldValue) || (c.callback(u, c.oldValue, e), c.oldValue = u);
43
- } catch (u) {
44
- D(`Error in deep watcher for "${i}":`, u);
41
+ const f = U(e, i);
42
+ r(f, c.oldValue) || (c.callback(f, c.oldValue, e), c.oldValue = f);
43
+ } catch (f) {
44
+ D(`Error in deep watcher for "${i}":`, f);
45
45
  }
46
46
  }
47
47
  function Ie(e, n) {
@@ -93,9 +93,9 @@ function St(e, n, t) {
93
93
  configurable: !0,
94
94
  get() {
95
95
  try {
96
- const u = Z(o), f = e.getAttribute(u);
97
- if (f !== null)
98
- return f;
96
+ const f = Z(o), u = e.getAttribute(f);
97
+ if (u !== null)
98
+ return u;
99
99
  const _ = e[o];
100
100
  let E;
101
101
  return j(_) || _ && typeof _ == "object" && "value" in _ && !(_ instanceof Node) ? E = _.value : E = _, E;
@@ -117,7 +117,7 @@ function _t(e, n, t, s) {
117
117
  e.onConnected && !t && (e.onConnected(n), s(!0));
118
118
  }
119
119
  function kt(e, n, t, s, r, o, i, c) {
120
- e.onDisconnected && e.onDisconnected(n), t.forEach((u) => u()), s(), r(), o(!1), i(null), c(!1);
120
+ e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(), o(!1), i(null), c(!1);
121
121
  }
122
122
  function Ct(e, n, t, s, r) {
123
123
  e.onAttributeChanged && e.onAttributeChanged(n, t, s, r);
@@ -201,8 +201,8 @@ class At {
201
201
  for (const { key: i, value: c } of s)
202
202
  try {
203
203
  if (c.startsWith("ctx.")) {
204
- const u = c.slice(4);
205
- o[i] = U(r, u);
204
+ const f = c.slice(4);
205
+ o[i] = U(r, f);
206
206
  } else
207
207
  o[i] = this.evaluateSimpleValue(c, r);
208
208
  } catch {
@@ -216,8 +216,8 @@ class At {
216
216
  for (const r of s) {
217
217
  const o = r.indexOf(":");
218
218
  if (o === -1) continue;
219
- const i = r.slice(0, o).trim(), c = r.slice(o + 1).trim(), u = i.replace(/^['"]|['"]$/g, "");
220
- t.push({ key: u, value: c });
219
+ const i = r.slice(0, o).trim(), c = r.slice(o + 1).trim(), f = i.replace(/^['"]|['"]$/g, "");
220
+ t.push({ key: f, value: c });
221
221
  }
222
222
  return t;
223
223
  }
@@ -251,11 +251,11 @@ class At {
251
251
  `<<#${A}#>>`
252
252
  );
253
253
  }
254
- const u = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
255
- let f;
254
+ const f = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
255
+ let u;
256
256
  const _ = /* @__PURE__ */ new Set();
257
- for (; (f = u.exec(s)) !== null; ) {
258
- const E = f[1];
257
+ for (; (u = f.exec(s)) !== null; ) {
258
+ const E = u[1];
259
259
  if (["true", "false", "null", "undefined"].includes(E) || /^[0-9]+$/.test(E) || E === "ctx" || _.has(E)) continue;
260
260
  _.add(E);
261
261
  const m = U(t, E);
@@ -317,10 +317,10 @@ class At {
317
317
  const v = Number(a);
318
318
  return Number.isNaN(v) ? NaN : v;
319
319
  }
320
- function u(a, v) {
320
+ function f(a, v) {
321
321
  return typeof a == "string" || typeof v == "string" ? String(a) + String(v) : c(a) + c(v);
322
322
  }
323
- function f(a, v) {
323
+ function u(a, v) {
324
324
  return c(a) - c(v);
325
325
  }
326
326
  function _(a, v) {
@@ -445,7 +445,7 @@ class At {
445
445
  const v = r();
446
446
  if (!v || v.value !== "+" && v.value !== "-") break;
447
447
  const y = o("OP").value, h = d();
448
- a = y === "+" ? u(a, h) : f(a, h);
448
+ a = y === "+" ? f(a, h) : u(a, h);
449
449
  }
450
450
  return a;
451
451
  }
@@ -477,7 +477,7 @@ class At {
477
477
  if (a && a.value === "-") {
478
478
  o("OP");
479
479
  const v = C();
480
- return f(0, v);
480
+ return u(0, v);
481
481
  }
482
482
  return L();
483
483
  }
@@ -760,22 +760,22 @@ async function ke(e, n) {
760
760
  p();
761
761
  }) : p();
762
762
  }) : void 0;
763
- const i = pe(t?.enterFrom), c = pe(t?.enterActive), u = pe(t?.enterTo);
763
+ const i = pe(t?.enterFrom), c = pe(t?.enterActive), f = pe(t?.enterTo);
764
764
  de(e, i), e.offsetHeight, de(e, c), e.offsetHeight;
765
- let f;
765
+ let u;
766
766
  if (s?.onEnter) {
767
767
  const p = new Promise((S) => {
768
- f = S;
768
+ u = S;
769
769
  });
770
770
  try {
771
771
  const S = s.onEnter;
772
772
  typeof S == "function" && S(e, () => {
773
- f && f();
773
+ u && u();
774
774
  });
775
775
  } catch (S) {
776
776
  D("Transition onEnter error:", S);
777
777
  }
778
- f && await p;
778
+ u && await p;
779
779
  }
780
780
  await new Promise(
781
781
  (p) => requestAnimationFrame(() => p(void 0))
@@ -783,7 +783,7 @@ async function ke(e, n) {
783
783
  const _ = window.getComputedStyle(e), E = _.transform, m = _.opacity;
784
784
  ue(e, i), E && E !== "none" && (e.style.transform = E), m && m !== "" && (e.style.opacity = m), e.offsetHeight, await new Promise(
785
785
  (p) => requestAnimationFrame(() => p(void 0))
786
- ), e.style.transform = "", e.style.opacity = "", de(e, u), e.offsetHeight, await new Promise(
786
+ ), e.style.transform = "", e.style.opacity = "", de(e, f), e.offsetHeight, await new Promise(
787
787
  (p) => requestAnimationFrame(() => p(void 0))
788
788
  );
789
789
  let A;
@@ -815,28 +815,28 @@ async function Be(e, n) {
815
815
  E();
816
816
  }) : E();
817
817
  }) : void 0;
818
- const i = pe(t?.leaveFrom), c = pe(t?.leaveActive), u = pe(t?.leaveTo);
818
+ const i = pe(t?.leaveFrom), c = pe(t?.leaveActive), f = pe(t?.leaveTo);
819
819
  de(e, i), e.offsetHeight, de(e, c);
820
- let f;
820
+ let u;
821
821
  if (s?.onLeave) {
822
822
  const E = new Promise((m) => {
823
- f = m;
823
+ u = m;
824
824
  });
825
825
  try {
826
826
  const m = s.onLeave;
827
827
  typeof m == "function" && m(e, () => {
828
- f && f();
828
+ u && u();
829
829
  });
830
830
  } catch (m) {
831
831
  D("Transition onLeave error:", m);
832
832
  }
833
- f && await E;
833
+ u && await E;
834
834
  }
835
835
  await new Promise(
836
836
  (E) => requestAnimationFrame(() => E(void 0))
837
- ), await Lt(e, [...i, ...c]), ue(e, i), de(e, u);
837
+ ), await Lt(e, [...i, ...c]), ue(e, i), de(e, f);
838
838
  let _;
839
- if (typeof o == "number" ? _ = o : o && typeof o == "object" && "leave" in o && (_ = o.leave), await it(e, _), ue(e, c), ue(e, u), ue(e, i), s?.onAfterLeave)
839
+ if (typeof o == "number" ? _ = o : o && typeof o == "object" && "leave" in o && (_ = o.leave), await it(e, _), ue(e, c), ue(e, f), ue(e, i), s?.onAfterLeave)
840
840
  try {
841
841
  s.onAfterLeave(e);
842
842
  } catch (E) {
@@ -957,7 +957,7 @@ function Ce(e, n, t) {
957
957
  }
958
958
  function jt(e, n, t, s, r, o, i, c) {
959
959
  if (!o) return;
960
- const u = n.includes("lazy"), f = n.includes("trim"), _ = n.includes("number"), E = () => {
960
+ const f = n.includes("lazy"), u = n.includes("trim"), _ = n.includes("number"), E = () => {
961
961
  if (j(e)) {
962
962
  const d = e.value;
963
963
  return c && i && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement) && typeof d == "object" && d !== null ? d[c] : d;
@@ -997,7 +997,7 @@ function jt(e, n, t, s, r, o, i, c) {
997
997
  } catch {
998
998
  }
999
999
  }
1000
- const k = u || A === "checkbox" || A === "radio" || A === "select" ? "change" : "input", b = (g) => {
1000
+ const k = f || A === "checkbox" || A === "radio" || A === "select" ? "change" : "input", b = (g) => {
1001
1001
  if (g.isComposing || r._isComposing)
1002
1002
  return;
1003
1003
  const d = globalThis.process, C = !!d && d.env?.NODE_ENV === "test" || typeof window < "u" && globalThis.__vitest__;
@@ -1028,7 +1028,7 @@ function jt(e, n, t, s, r, o, i, c) {
1028
1028
  N = Array.from(L.selectedOptions).map(
1029
1029
  (y) => y.value
1030
1030
  );
1031
- else if (f && typeof N == "string" && (N = N.trim()), _) {
1031
+ else if (u && typeof N == "string" && (N = N.trim()), _) {
1032
1032
  const y = Number(N);
1033
1033
  isNaN(y) || (N = y);
1034
1034
  }
@@ -1137,7 +1137,7 @@ function jt(e, n, t, s, r, o, i, c) {
1137
1137
  d && setTimeout(() => {
1138
1138
  const C = d.value, L = o?._state || o, N = U(L, e);
1139
1139
  let a = C;
1140
- if (f && (a = a.trim()), _) {
1140
+ if (u && (a = a.trim()), _) {
1141
1141
  const y = Number(a);
1142
1142
  isNaN(y) || (a = y);
1143
1143
  }
@@ -1184,14 +1184,14 @@ function Mt(e, n, t, s, r) {
1184
1184
  if (i.startsWith("data-") || i.startsWith("aria-") || i === "class")
1185
1185
  t[i] = c;
1186
1186
  else if (i === "disabled" && r && J(r)) {
1187
- const u = c && typeof c == "object" && "value" in c;
1187
+ const f = c && typeof c == "object" && "value" in c;
1188
1188
  (() => {
1189
1189
  try {
1190
1190
  return j(c);
1191
1191
  } catch {
1192
1192
  return !1;
1193
1193
  }
1194
- })() || u ? n[i] = c : t[i] = c;
1194
+ })() || f ? n[i] = c : t[i] = c;
1195
1195
  } else
1196
1196
  n[i] = c;
1197
1197
  return;
@@ -1219,14 +1219,14 @@ function Pt(e, n, t) {
1219
1219
  let o = r;
1220
1220
  if (s) {
1221
1221
  if (r) {
1222
- const i = String(r).split(";").map((u) => u.trim()).filter(Boolean), c = i.findIndex(
1223
- (u) => u.startsWith("display:")
1222
+ const i = String(r).split(";").map((f) => f.trim()).filter(Boolean), c = i.findIndex(
1223
+ (f) => f.startsWith("display:")
1224
1224
  );
1225
1225
  c >= 0 && i[c] === "display: none" && (i.splice(c, 1), o = i.length > 0 ? i.join("; ") + ";" : "");
1226
1226
  }
1227
1227
  } else if (r) {
1228
1228
  const i = String(r).split(";").filter(Boolean), c = i.findIndex(
1229
- (u) => u.trim().startsWith("display:")
1229
+ (f) => f.trim().startsWith("display:")
1230
1230
  );
1231
1231
  c >= 0 ? i[c] = "display: none" : i.push("display: none"), o = i.join("; ");
1232
1232
  } else
@@ -1248,8 +1248,8 @@ function xt(e, n, t, s) {
1248
1248
  if (j(r))
1249
1249
  r = r.value;
1250
1250
  else if ("value" in r && typeof r.value < "u") {
1251
- const f = r.value;
1252
- f instanceof Node || (r = f);
1251
+ const u = r.value;
1252
+ u instanceof Node || (r = u);
1253
1253
  }
1254
1254
  }
1255
1255
  } catch {
@@ -1260,10 +1260,10 @@ function xt(e, n, t, s) {
1260
1260
  else if (Array.isArray(r))
1261
1261
  o = r.filter(Boolean);
1262
1262
  else if (typeof r == "object" && r !== null)
1263
- for (const [f, _] of Object.entries(r))
1264
- _ && o.push(f);
1265
- const i = o.join(" "), c = s && s.class || n.class || "", u = c ? `${c} ${i}`.trim() : i.trim();
1266
- u ? n.class = u : n.class = void 0;
1263
+ for (const [u, _] of Object.entries(r))
1264
+ _ && o.push(u);
1265
+ const i = o.join(" "), c = s && s.class || n.class || "", f = c ? `${c} ${i}`.trim() : i.trim();
1266
+ f ? n.class = f : n.class = void 0;
1267
1267
  }
1268
1268
  function Ue(e) {
1269
1269
  if (e === !0 || e === !1) return !0;
@@ -1290,9 +1290,9 @@ function Ht(e, n, t) {
1290
1290
  r = s;
1291
1291
  else if (s && typeof s == "object") {
1292
1292
  const i = [];
1293
- for (const [c, u] of Object.entries(s))
1294
- if (u != null && u !== "") {
1295
- const f = c.replace(
1293
+ for (const [c, f] of Object.entries(s))
1294
+ if (f != null && f !== "") {
1295
+ const u = c.replace(
1296
1296
  /[A-Z]/g,
1297
1297
  (m) => `-${m.toLowerCase()}`
1298
1298
  ), _ = [
@@ -1321,8 +1321,8 @@ function Ht(e, n, t) {
1321
1321
  "min-height",
1322
1322
  "max-height"
1323
1323
  ];
1324
- let E = String(u);
1325
- typeof u == "number" && _.includes(f) && (E = `${u}px`), i.push(`${f}: ${E}`);
1324
+ let E = String(f);
1325
+ typeof f == "number" && _.includes(u) && (E = `${f}px`), i.push(`${u}: ${E}`);
1326
1326
  }
1327
1327
  r = i.join("; ") + (i.length > 0 ? ";" : "");
1328
1328
  }
@@ -1335,12 +1335,12 @@ function It(e, n, t) {
1335
1335
  }
1336
1336
  function lt(e, n, t, s) {
1337
1337
  const r = {}, o = { ...s || {} }, i = {};
1338
- for (const [c, u] of Object.entries(e)) {
1339
- const { value: f, modifiers: _, arg: E } = u;
1338
+ for (const [c, f] of Object.entries(e)) {
1339
+ const { value: u, modifiers: _, arg: E } = f;
1340
1340
  if (c === "model" || c.startsWith("model:")) {
1341
1341
  const m = c.split(":"), A = m.length > 1 ? m[1] : E;
1342
1342
  jt(
1343
- f,
1343
+ u,
1344
1344
  // Pass the original value (could be string or reactive state object)
1345
1345
  _,
1346
1346
  r,
@@ -1354,40 +1354,40 @@ function lt(e, n, t, s) {
1354
1354
  }
1355
1355
  switch (c) {
1356
1356
  case "bind":
1357
- Mt(f, r, o, n, t);
1357
+ Mt(u, r, o, n, t);
1358
1358
  break;
1359
1359
  case "show":
1360
- Pt(f, o, n);
1360
+ Pt(u, o, n);
1361
1361
  break;
1362
1362
  case "class":
1363
- xt(f, o, n, s);
1363
+ xt(u, o, n, s);
1364
1364
  break;
1365
1365
  case "style":
1366
- Ht(f, o, n);
1366
+ Ht(u, o, n);
1367
1367
  break;
1368
1368
  case "ref":
1369
- It(f, r, n);
1369
+ It(u, r, n);
1370
1370
  break;
1371
1371
  }
1372
1372
  }
1373
1373
  try {
1374
1374
  if (Object.prototype.hasOwnProperty.call(r, "disabled") && t && J(t)) {
1375
- const u = r.disabled, f = u && typeof u == "object" && "value" in u;
1375
+ const f = r.disabled, u = f && typeof f == "object" && "value" in f;
1376
1376
  let _ = !1;
1377
1377
  try {
1378
- _ = j(u);
1378
+ _ = j(f);
1379
1379
  } catch {
1380
1380
  _ = !1;
1381
1381
  }
1382
- if (!f && !_)
1382
+ if (!u && !_)
1383
1383
  try {
1384
- o.disabled = u, delete r.disabled;
1384
+ o.disabled = f, delete r.disabled;
1385
1385
  const E = globalThis;
1386
1386
  E.__VDOM_DISABLED_PROMOTIONS || (E.__VDOM_DISABLED_PROMOTIONS = []), E.__VDOM_DISABLED_PROMOTIONS.push({
1387
1387
  phase: "bind-directive:postfix-move",
1388
1388
  location: "attrs",
1389
1389
  key: "disabled",
1390
- value: u,
1390
+ value: f,
1391
1391
  time: Date.now(),
1392
1392
  stack: new Error().stack
1393
1393
  });
@@ -1418,12 +1418,12 @@ function ze(e, n) {
1418
1418
  ].find((p) => p != null) ?? "";
1419
1419
  c = A ? `${n}:${E}:${A}` : `${n}:${E}`;
1420
1420
  }
1421
- let u = c, f = 1;
1422
- for (; o.has(u); )
1423
- u = `${c}#${f++}`;
1424
- o.add(u);
1421
+ let f = c, u = 1;
1422
+ for (; o.has(f); )
1423
+ f = `${c}#${u++}`;
1424
+ o.add(f);
1425
1425
  let _ = i.children;
1426
- return Array.isArray(_) && (_ = ze(_, u)), { ...i, key: u, children: _ };
1426
+ return Array.isArray(_) && (_ = ze(_, f)), { ...i, key: f, children: _ };
1427
1427
  });
1428
1428
  }
1429
1429
  const t = e, s = t.props?.key ?? t.key ?? n;
@@ -1444,10 +1444,10 @@ function et(e, n, t, s) {
1444
1444
  ...n.attrs || {},
1445
1445
  ...t.attrs || {},
1446
1446
  ...o.attrs || {}
1447
- }, u = n.props ?? {}, f = i, _ = !!(t?.isCustomElement ?? n?.isCustomElement ?? !1);
1447
+ }, f = n.props ?? {}, u = i, _ = !!(t?.isCustomElement ?? n?.isCustomElement ?? !1);
1448
1448
  let E = !1;
1449
- for (const p in { ...u, ...f }) {
1450
- const S = u[p], l = f[p];
1449
+ for (const p in { ...f, ...u }) {
1450
+ const S = f[p], l = u[p];
1451
1451
  let k = S, b = l;
1452
1452
  if (P(() => {
1453
1453
  (j(S) || he(S)) && (k = S.value);
@@ -1465,7 +1465,7 @@ function et(e, n, t, s) {
1465
1465
  typeof S == "function" && Q.removeListener(e, g, S), typeof l == "function" && Q.addListener(e, g, l);
1466
1466
  try {
1467
1467
  if (g && g.startsWith("update:")) {
1468
- const d = g.split(":", 2)[1], C = f[d];
1468
+ const d = g.split(":", 2)[1], C = u[d];
1469
1469
  let L = [];
1470
1470
  try {
1471
1471
  if (j(C)) {
@@ -1480,7 +1480,7 @@ function et(e, n, t, s) {
1480
1480
  );
1481
1481
  for (const a of N) {
1482
1482
  const v = `update:${a}`, y = (h) => {
1483
- const T = h.detail !== void 0 ? h.detail : h.target instanceof HTMLInputElement || h.target instanceof HTMLTextAreaElement || h.target instanceof HTMLSelectElement ? h.target.value : void 0, O = { ...j(C) ? C.value || {} : f[d] || {}, [a]: T };
1483
+ const T = h.detail !== void 0 ? h.detail : h.target instanceof HTMLInputElement || h.target instanceof HTMLTextAreaElement || h.target instanceof HTMLSelectElement ? h.target.value : void 0, O = { ...j(C) ? C.value || {} : u[d] || {}, [a]: T };
1484
1484
  try {
1485
1485
  typeof l == "function" && l({
1486
1486
  detail: O
@@ -1721,16 +1721,16 @@ function G(e, n, t, s = null) {
1721
1721
  c,
1722
1722
  e.props?._transitionGroup
1723
1723
  );
1724
- const { props: u = {}, attrs: f = {}, directives: _ = {} } = e.props ?? {}, E = lt(
1724
+ const { props: f = {}, attrs: u = {}, directives: _ = {} } = e.props ?? {}, E = lt(
1725
1725
  _,
1726
1726
  n,
1727
1727
  c instanceof HTMLElement ? c : void 0,
1728
- f
1728
+ u
1729
1729
  ), m = {
1730
- ...u,
1730
+ ...f,
1731
1731
  ...E.props
1732
1732
  }, A = {
1733
- ...f,
1733
+ ...u,
1734
1734
  ...E.attrs
1735
1735
  };
1736
1736
  try {
@@ -1944,8 +1944,8 @@ function Rt(e, n, t, s, r) {
1944
1944
  const o = e.childNodes, i = [];
1945
1945
  for (let S = 0; S < o.length; S++)
1946
1946
  i.push(o[S]);
1947
- const c = Array.isArray(n) ? n : [], u = Ot(e);
1948
- if (u) {
1947
+ const c = Array.isArray(n) ? n : [], f = Ot(e);
1948
+ if (f) {
1949
1949
  const S = (g) => {
1950
1950
  if (typeof g == "string")
1951
1951
  return g.startsWith("each-") ? g.substring(5) : g;
@@ -1990,7 +1990,7 @@ function Rt(e, n, t, s, r) {
1990
1990
  }
1991
1991
  }
1992
1992
  const C = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Map(), N = i.length > 0;
1993
- if (u.moveClass && N)
1993
+ if (f.moveClass && N)
1994
1994
  for (let y = 0; y < i.length; y++) {
1995
1995
  const h = i[y];
1996
1996
  if (h instanceof HTMLElement && h.parentElement) {
@@ -2023,8 +2023,8 @@ function Rt(e, n, t, s, r) {
2023
2023
  void 0,
2024
2024
  e instanceof Element ? e.namespaceURI ?? null : null
2025
2025
  ), q($, String(h)), e.appendChild($);
2026
- const O = N || u.appear === !0;
2027
- $ instanceof HTMLElement && O && ke($, u).catch((w) => {
2026
+ const O = N || f.appear === !0;
2027
+ $ instanceof HTMLElement && O && ke($, f).catch((w) => {
2028
2028
  D("Enter transition error:", w);
2029
2029
  }), a.push({ node: $, key: h, newVNode: y, isNew: !0 });
2030
2030
  }
@@ -2033,7 +2033,7 @@ function Rt(e, n, t, s, r) {
2033
2033
  for (let y = 0; y < i.length; y++) {
2034
2034
  const h = i[y], T = Pe(h);
2035
2035
  if (!C.has(h) && T != null && h instanceof HTMLElement) {
2036
- const O = Be(h, u).then(() => {
2036
+ const O = Be(h, f).then(() => {
2037
2037
  e.contains(h) && e.removeChild(h);
2038
2038
  }).catch((w) => {
2039
2039
  D("Leave transition error:", w), e.contains(h) && e.removeChild(h);
@@ -2045,7 +2045,7 @@ function Rt(e, n, t, s, r) {
2045
2045
  let y = e.firstChild;
2046
2046
  for (const { node: h } of a)
2047
2047
  h !== y && e.insertBefore(h, y), y = h.nextSibling;
2048
- if (u.moveClass && L.size > 0) {
2048
+ if (f.moveClass && L.size > 0) {
2049
2049
  const h = [];
2050
2050
  for (const { node: T, isNew: $ } of a)
2051
2051
  if (!$ && T instanceof HTMLElement) {
@@ -2053,7 +2053,7 @@ function Rt(e, n, t, s, r) {
2053
2053
  if (O) {
2054
2054
  const w = T.getBoundingClientRect(), I = O.left - w.left, x = O.top - w.top;
2055
2055
  if (I !== 0 || x !== 0) {
2056
- const ee = u.moveClass.split(/\s+/).filter((K) => K);
2056
+ const ee = f.moveClass.split(/\s+/).filter((K) => K);
2057
2057
  h.push({ node: T, deltaX: I, deltaY: x, moveClasses: ee });
2058
2058
  }
2059
2059
  }
@@ -2067,7 +2067,7 @@ function Rt(e, n, t, s, r) {
2067
2067
  for (const O of $)
2068
2068
  T.classList.add(O);
2069
2069
  requestAnimationFrame(() => {
2070
- const T = u.moveClass || "", $ = T.match(/duration-(\d+)/), O = $ ? `${$[1]}ms` : "300ms", w = T.match(
2070
+ const T = f.moveClass || "", $ = T.match(/duration-(\d+)/), O = $ ? `${$[1]}ms` : "300ms", w = T.match(
2071
2071
  /ease-(out|in|in-out|linear)/
2072
2072
  ), I = w ? `ease-${w[1]}` : "ease-out";
2073
2073
  for (const { node: x } of h)
@@ -2096,9 +2096,9 @@ function Rt(e, n, t, s, r) {
2096
2096
  return;
2097
2097
  }
2098
2098
  }
2099
- const f = /* @__PURE__ */ new Map();
2099
+ const u = /* @__PURE__ */ new Map();
2100
2100
  for (const S of c)
2101
- S && S.key != null && f.set(S.key, S);
2101
+ S && S.key != null && u.set(S.key, S);
2102
2102
  const _ = /* @__PURE__ */ new Map();
2103
2103
  for (let S = 0; S < i.length; S++) {
2104
2104
  const l = i[S], k = Pe(l);
@@ -2208,11 +2208,11 @@ function Rt(e, n, t, s, r) {
2208
2208
  }
2209
2209
  e.insertBefore(C, m);
2210
2210
  } else {
2211
- const N = S._transition, v = f.get(k)._transition, y = v && v.state !== N?.state, h = N && N.state === "visible" && L.length > 0 && !y, T = y || !h || N?.appear === !0;
2211
+ const N = S._transition, v = u.get(k)._transition, y = v && v.state !== N?.state, h = N && N.state === "visible" && L.length > 0 && !y, T = y || !h || N?.appear === !0;
2212
2212
  p(
2213
2213
  d,
2214
2214
  C,
2215
- f.get(k)?.children,
2215
+ u.get(k)?.children,
2216
2216
  L,
2217
2217
  N,
2218
2218
  T
@@ -2222,7 +2222,7 @@ function Rt(e, n, t, s, r) {
2222
2222
  continue;
2223
2223
  }
2224
2224
  if (S.key != null && _.has(S.key)) {
2225
- const k = f.get(S.key);
2225
+ const k = u.get(S.key);
2226
2226
  l = Ae(
2227
2227
  _.get(S.key),
2228
2228
  k,
@@ -2255,10 +2255,10 @@ function Ae(e, n, t, s, r) {
2255
2255
  }
2256
2256
  }
2257
2257
  if (t && typeof t != "string" && t.tag === "#anchor") {
2258
- const i = t, c = Array.isArray(i.children) ? i.children : [], u = i._startNode ?? document.createTextNode(""), f = i._endNode ?? document.createTextNode("");
2259
- i.key != null && (q(u, `${i.key}:start`), q(f, `${i.key}:end`)), i._startNode = u, i._endNode = f;
2258
+ const i = t, c = Array.isArray(i.children) ? i.children : [], f = i._startNode ?? document.createTextNode(""), u = i._endNode ?? document.createTextNode("");
2259
+ i.key != null && (q(f, `${i.key}:start`), q(u, `${i.key}:end`)), i._startNode = f, i._endNode = u;
2260
2260
  const _ = document.createDocumentFragment();
2261
- _.appendChild(u);
2261
+ _.appendChild(f);
2262
2262
  for (const E of c) {
2263
2263
  const m = G(
2264
2264
  E,
@@ -2268,7 +2268,7 @@ function Ae(e, n, t, s, r) {
2268
2268
  );
2269
2269
  _.appendChild(m);
2270
2270
  }
2271
- return _.appendChild(f), e.parentNode?.replaceChild(_, e), u;
2271
+ return _.appendChild(u), e.parentNode?.replaceChild(_, e), f;
2272
2272
  }
2273
2273
  if (!t) {
2274
2274
  le(e, r);
@@ -2286,12 +2286,12 @@ function Ae(e, n, t, s, r) {
2286
2286
  return Ce(t, i, r), e.parentNode?.replaceChild(i, e), i;
2287
2287
  }
2288
2288
  if (t.tag === "#anchor") {
2289
- const i = Array.isArray(t.children) ? t.children : [], c = t._startNode ?? document.createTextNode(""), u = t._endNode ?? document.createTextNode("");
2290
- t.key != null && (q(c, `${t.key}:start`), q(u, `${t.key}:end`)), t._startNode = c, t._endNode = u;
2291
- const f = document.createDocumentFragment();
2292
- f.appendChild(c);
2289
+ const i = Array.isArray(t.children) ? t.children : [], c = t._startNode ?? document.createTextNode(""), f = t._endNode ?? document.createTextNode("");
2290
+ t.key != null && (q(c, `${t.key}:start`), q(f, `${t.key}:end`)), t._startNode = c, t._endNode = f;
2291
+ const u = document.createDocumentFragment();
2292
+ u.appendChild(c);
2293
2293
  for (const _ of i)
2294
- f.appendChild(
2294
+ u.appendChild(
2295
2295
  G(
2296
2296
  _,
2297
2297
  s,
@@ -2299,7 +2299,7 @@ function Ae(e, n, t, s, r) {
2299
2299
  e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
2300
2300
  )
2301
2301
  );
2302
- return f.appendChild(u), e.parentNode?.replaceChild(f, e), c;
2302
+ return u.appendChild(f), e.parentNode?.replaceChild(u, e), c;
2303
2303
  }
2304
2304
  if (typeof n != "string" && typeof t != "string" && n.tag === t.tag && n.key === t.key) {
2305
2305
  const i = e;
@@ -2343,28 +2343,28 @@ function Bt(e, n, t, s) {
2343
2343
  s,
2344
2344
  e.host instanceof Element ? e.host.namespaceURI ?? null : null
2345
2345
  ), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
2346
- const u = [];
2347
- for (let f = 0; f < e.childNodes.length; f++) {
2348
- const _ = e.childNodes[f];
2349
- _ !== c && _.nodeName !== "STYLE" && (le(_, s), u.push(_));
2346
+ const f = [];
2347
+ for (let u = 0; u < e.childNodes.length; u++) {
2348
+ const _ = e.childNodes[u];
2349
+ _ !== c && _.nodeName !== "STYLE" && (le(_, s), f.push(_));
2350
2350
  }
2351
- u.forEach((f) => e.removeChild(f)), e._prevVNode = r, e._prevDom = c;
2351
+ f.forEach((u) => e.removeChild(u)), e._prevVNode = r, e._prevDom = c;
2352
2352
  }
2353
2353
  const Te = [];
2354
2354
  function Dt(e, n, t, s, r, o, i, c) {
2355
2355
  if (e) {
2356
2356
  Te.push(t);
2357
2357
  try {
2358
- const u = n.render(t);
2359
- if (u instanceof Promise) {
2360
- o(!0), u.then((f) => {
2361
- o(!1), i(null), tt(e, f, t, s, r), c(e.innerHTML);
2362
- }).catch((f) => {
2363
- o(!1), i(f);
2358
+ const f = n.render(t);
2359
+ if (f instanceof Promise) {
2360
+ o(!0), f.then((u) => {
2361
+ o(!1), i(null), tt(e, u, t, s, r), c(e.innerHTML);
2362
+ }).catch((u) => {
2363
+ o(!1), i(u);
2364
2364
  });
2365
2365
  return;
2366
2366
  }
2367
- tt(e, u, t, s, r), c(e.innerHTML);
2367
+ tt(e, f, t, s, r), c(e.innerHTML);
2368
2368
  } finally {
2369
2369
  Te.pop();
2370
2370
  }
@@ -2400,13 +2400,13 @@ Stopping runaway component render to prevent browser freeze`
2400
2400
  }
2401
2401
  } else
2402
2402
  r(0);
2403
- const f = setTimeout(
2403
+ const u = setTimeout(
2404
2404
  () => {
2405
2405
  s(Date.now()), e(), i(null);
2406
2406
  },
2407
2407
  t > 10 ? 100 : 0
2408
2408
  );
2409
- i(f);
2409
+ i(u);
2410
2410
  }
2411
2411
  function Kt(e, n, t, s, r) {
2412
2412
  if (!e) return;
@@ -2461,24 +2461,24 @@ ${g}`);
2461
2461
  }
2462
2462
  let c = "";
2463
2463
  n._computedStyle && (c = n._computedStyle ?? "");
2464
- let u = gt(`${c}
2464
+ let f = gt(`${c}
2465
2465
  ${i}
2466
2466
  `);
2467
- u = _e(u);
2468
- let f = s;
2467
+ f = _e(f);
2468
+ let u = s;
2469
2469
  if ("adoptedStyleSheets" in e && typeof CSSStyleSheet < "u") {
2470
- if (f || (f = new CSSStyleSheet()), f.cssRules.length === 0 || f.cssRules.length > 0 && Array.from(f.cssRules).map((k) => k.cssText).join("") !== u)
2470
+ if (u || (u = new CSSStyleSheet()), u.cssRules.length === 0 || u.cssRules.length > 0 && Array.from(u.cssRules).map((k) => k.cssText).join("") !== f)
2471
2471
  try {
2472
- f.replaceSync(u);
2472
+ u.replaceSync(f);
2473
2473
  } catch {
2474
- f = null;
2474
+ u = null;
2475
2475
  }
2476
- if (f) {
2476
+ if (u) {
2477
2477
  e.adoptedStyleSheets = [
2478
2478
  $e(),
2479
2479
  fe(),
2480
- f
2481
- ], r(f);
2480
+ u
2481
+ ], r(u);
2482
2482
  return;
2483
2483
  }
2484
2484
  }
@@ -2492,7 +2492,7 @@ ${i}
2492
2492
  }
2493
2493
  const p = _e(`${E}
2494
2494
  ${A}
2495
- ${u}`);
2495
+ ${f}`);
2496
2496
  let S = e.querySelector(
2497
2497
  "style[data-cer-runtime]"
2498
2498
  );
@@ -2510,7 +2510,7 @@ ${u}`);
2510
2510
  try {
2511
2511
  const k = new CSSStyleSheet();
2512
2512
  try {
2513
- k.replaceSync(u), l.push(k);
2513
+ k.replaceSync(f), l.push(k);
2514
2514
  } catch {
2515
2515
  l.push({ cssRules: [], replaceSync: () => {
2516
2516
  } });
@@ -2592,21 +2592,21 @@ function on(e) {
2592
2592
  const i = Object.getOwnPropertyDescriptor(t, o);
2593
2593
  if (!(i && !i.configurable))
2594
2594
  try {
2595
- let u = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
2595
+ let f = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
2596
2596
  Object.defineProperty(t, o, {
2597
2597
  configurable: !0,
2598
2598
  enumerable: !0,
2599
2599
  get() {
2600
2600
  try {
2601
- const f = t && t._host;
2602
- if (f) {
2603
- const _ = Z(o), E = f.getAttribute(_);
2601
+ const u = t && t._host;
2602
+ if (u) {
2603
+ const _ = Z(o), E = u.getAttribute(_);
2604
2604
  if (E !== null) {
2605
2605
  const m = typeof e[o];
2606
2606
  return m === "boolean" ? E === "" || E === "true" : m === "number" ? Number(E) : E;
2607
2607
  }
2608
- if (typeof f[o] < "u") {
2609
- const m = f[o];
2608
+ if (typeof u[o] < "u") {
2609
+ const m = u[o];
2610
2610
  if (j(m) || m && typeof m == "object" && "value" in m && !(m instanceof Node))
2611
2611
  return m.value;
2612
2612
  const A = typeof e[o];
@@ -2616,10 +2616,10 @@ function on(e) {
2616
2616
  }
2617
2617
  } catch {
2618
2618
  }
2619
- return u;
2619
+ return f;
2620
2620
  },
2621
- set(f) {
2622
- u = f;
2621
+ set(u) {
2622
+ f = u;
2623
2623
  }
2624
2624
  });
2625
2625
  } catch {
@@ -2632,18 +2632,18 @@ function on(e) {
2632
2632
  if (typeof o != "string") return;
2633
2633
  const i = e[o];
2634
2634
  try {
2635
- const u = t && t._host;
2636
- if (u) {
2637
- if (u instanceof HTMLElement || typeof u.getAttribute == "function" && typeof u.hasAttribute == "function") {
2638
- const _ = o.replace(/([A-Z])/g, "-$1").toLowerCase(), E = u.getAttribute(_);
2635
+ const f = t && t._host;
2636
+ if (f) {
2637
+ if (f instanceof HTMLElement || typeof f.getAttribute == "function" && typeof f.hasAttribute == "function") {
2638
+ const _ = o.replace(/([A-Z])/g, "-$1").toLowerCase(), E = f.getAttribute(_);
2639
2639
  if (E !== null)
2640
2640
  return typeof i == "boolean" ? E === "" || E === "true" : typeof i == "number" ? Number(E) : E;
2641
2641
  }
2642
- const f = u[o];
2643
- if (typeof f < "u" && f !== "") {
2644
- const _ = f && typeof f == "object" && "value" in f && !(f instanceof Node);
2645
- if (!(typeof i == "string" && f && typeof f == "object" && !_ && !j(f)))
2646
- return typeof i == "boolean" && i === !1 && f === "" ? i : j(f) || _ ? f.value : typeof i == "boolean" && typeof f == "string" ? f === "true" || f !== "" && f !== "false" : typeof i == "number" && typeof f == "string" && !Number.isNaN(Number(f)) ? Number(f) : f;
2642
+ const u = f[o];
2643
+ if (typeof u < "u" && u !== "") {
2644
+ const _ = u && typeof u == "object" && "value" in u && !(u instanceof Node);
2645
+ if (!(typeof i == "string" && u && typeof u == "object" && !_ && !j(u)))
2646
+ return typeof i == "boolean" && i === !1 && u === "" ? i : j(u) || _ ? u.value : typeof i == "boolean" && typeof u == "string" ? u === "true" || u !== "" && u !== "false" : typeof i == "number" && typeof u == "string" && !Number.isNaN(Number(u)) ? Number(u) : u;
2647
2647
  }
2648
2648
  }
2649
2649
  } catch {
@@ -2762,23 +2762,23 @@ function zt(e, n) {
2762
2762
  this.context,
2763
2763
  "emit",
2764
2764
  (o, i, c) => {
2765
- const u = {
2765
+ const f = {
2766
2766
  detail: i,
2767
2767
  bubbles: !0,
2768
2768
  composed: !0,
2769
2769
  ...c || {}
2770
- }, f = new CustomEvent(o, u);
2771
- this.dispatchEvent(f);
2770
+ }, u = new CustomEvent(o, f);
2771
+ this.dispatchEvent(u);
2772
2772
  const _ = o.indexOf(":");
2773
2773
  if (_ > 0) {
2774
2774
  const E = o.substring(0, _), m = o.substring(_ + 1), A = m.includes("-") ? `${E}:${m.split("-").map(
2775
2775
  (p, S) => S === 0 ? p : p.charAt(0).toUpperCase() + p.slice(1)
2776
2776
  ).join("")}` : `${E}:${m.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
2777
2777
  A !== o && P(() => {
2778
- this.dispatchEvent(new CustomEvent(A, u));
2778
+ this.dispatchEvent(new CustomEvent(A, f));
2779
2779
  });
2780
2780
  }
2781
- return !f.defaultPrevented;
2781
+ return !u.defaultPrevented;
2782
2782
  }
2783
2783
  );
2784
2784
  const r = me.get(e) || n;
@@ -2794,8 +2794,8 @@ function zt(e, n) {
2794
2794
  return i;
2795
2795
  },
2796
2796
  set(c) {
2797
- const u = i;
2798
- i = c, this.context[o] = c, this._initializing || (this._applyProps(r), u !== c && this._requestRender());
2797
+ const f = i;
2798
+ i = c, this.context[o] = c, this._initializing || (this._applyProps(r), f !== c && this._requestRender());
2799
2799
  },
2800
2800
  enumerable: !0,
2801
2801
  configurable: !0
@@ -2911,12 +2911,12 @@ function zt(e, n) {
2911
2911
  try {
2912
2912
  const o = this.tagName?.toLowerCase?.() || "<unknown>", i = this._componentId || "<unknown-id>", c = {};
2913
2913
  if (t && t.props)
2914
- for (const u of Object.keys(t.props))
2914
+ for (const f of Object.keys(t.props))
2915
2915
  try {
2916
- const f = this.context[u];
2917
- f instanceof Node ? c[u] = `[DOM Node: ${f.nodeName}]` : typeof f == "object" && f !== null ? c[u] = Object.keys(f).length > 5 ? `[object(${Object.keys(f).length} keys)]` : f : c[u] = f;
2916
+ const u = this.context[f];
2917
+ u instanceof Node ? c[f] = `[DOM Node: ${u.nodeName}]` : typeof u == "object" && u !== null ? c[f] = Object.keys(u).length > 5 ? `[object(${Object.keys(u).length} keys)]` : u : c[f] = u;
2918
2918
  } catch {
2919
- c[u] = "[unreadable]";
2919
+ c[f] = "[unreadable]";
2920
2920
  }
2921
2921
  D(`Error rendering component <${o}> (id=${i}):`, r), D("Component props snapshot:", c), Y(
2922
2922
  "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`...`)."
@@ -2932,9 +2932,9 @@ function zt(e, n) {
2932
2932
  let s = function(o, i = "") {
2933
2933
  if (Array.isArray(o))
2934
2934
  return new Proxy(o, {
2935
- get(c, u, f) {
2936
- const _ = Reflect.get(c, u, f);
2937
- return typeof _ == "function" && typeof u == "string" && [
2935
+ get(c, f, u) {
2936
+ const _ = Reflect.get(c, f, u);
2937
+ return typeof _ == "function" && typeof f == "string" && [
2938
2938
  "push",
2939
2939
  "pop",
2940
2940
  "shift",
@@ -2942,7 +2942,7 @@ function zt(e, n) {
2942
2942
  "splice",
2943
2943
  "sort",
2944
2944
  "reverse"
2945
- ].includes(u) ? function(...m) {
2945
+ ].includes(f) ? function(...m) {
2946
2946
  const A = _.apply(c, m);
2947
2947
  if (!r._initializing) {
2948
2948
  const p = i || "root";
@@ -2954,17 +2954,17 @@ function zt(e, n) {
2954
2954
  return A;
2955
2955
  } : _;
2956
2956
  },
2957
- set(c, u, f) {
2958
- if (c[String(u)] = f, !r._initializing) {
2959
- const _ = i ? `${i}.${String(u)}` : String(u);
2960
- r._triggerWatchers(_, f), Se(() => r._render(t), r._componentId);
2957
+ set(c, f, u) {
2958
+ if (c[String(f)] = u, !r._initializing) {
2959
+ const _ = i ? `${i}.${String(f)}` : String(f);
2960
+ r._triggerWatchers(_, u), Se(() => r._render(t), r._componentId);
2961
2961
  }
2962
2962
  return !0;
2963
2963
  },
2964
- deleteProperty(c, u) {
2965
- if (delete c[String(u)], !r._initializing) {
2966
- const f = i ? `${i}.${String(u)}` : String(u);
2967
- r._triggerWatchers(f, void 0), Se(() => r._render(t), r._componentId);
2964
+ deleteProperty(c, f) {
2965
+ if (delete c[String(f)], !r._initializing) {
2966
+ const u = i ? `${i}.${String(f)}` : String(f);
2967
+ r._triggerWatchers(u, void 0), Se(() => r._render(t), r._componentId);
2968
2968
  }
2969
2969
  return !0;
2970
2970
  }
@@ -2973,19 +2973,19 @@ function zt(e, n) {
2973
2973
  if (j(o))
2974
2974
  return o;
2975
2975
  for (const c in o) {
2976
- const u = i ? `${i}.${c}` : c;
2977
- o[c] = s(o[c], u);
2976
+ const f = i ? `${i}.${c}` : c;
2977
+ o[c] = s(o[c], f);
2978
2978
  }
2979
2979
  return new Proxy(o, {
2980
- set(c, u, f) {
2981
- const _ = i ? `${i}.${String(u)}` : String(u);
2982
- return c[String(u)] = s(f, _), r._initializing || (r._triggerWatchers(
2980
+ set(c, f, u) {
2981
+ const _ = i ? `${i}.${String(f)}` : String(f);
2982
+ return c[String(f)] = s(u, _), r._initializing || (r._triggerWatchers(
2983
2983
  _,
2984
- c[String(u)]
2984
+ c[String(f)]
2985
2985
  ), Se(() => r._render(t), r._componentId)), !0;
2986
2986
  },
2987
- get(c, u, f) {
2988
- return Reflect.get(c, u, f);
2987
+ get(c, f, u) {
2988
+ return Reflect.get(c, f, u);
2989
2989
  }
2990
2990
  });
2991
2991
  }
@@ -3038,17 +3038,33 @@ function an(e, n) {
3038
3038
  // Props are accessed via useProps() hook
3039
3039
  props: {},
3040
3040
  // Add lifecycle hooks from the stored functions
3041
- onConnected: () => {
3042
- s.onConnected && s.onConnected();
3041
+ onConnected: (o) => {
3042
+ if (s.onConnected)
3043
+ try {
3044
+ s.onConnected(o);
3045
+ } catch {
3046
+ }
3043
3047
  },
3044
- onDisconnected: () => {
3045
- s.onDisconnected && s.onDisconnected();
3048
+ onDisconnected: (o) => {
3049
+ if (s.onDisconnected)
3050
+ try {
3051
+ s.onDisconnected(o);
3052
+ } catch {
3053
+ }
3046
3054
  },
3047
- onAttributeChanged: (o, i, c) => {
3048
- s.onAttributeChanged && s.onAttributeChanged(o, i, c);
3055
+ onAttributeChanged: (o, i, c, f) => {
3056
+ if (s.onAttributeChanged)
3057
+ try {
3058
+ s.onAttributeChanged(o, i, c, f);
3059
+ } catch {
3060
+ }
3049
3061
  },
3050
- onError: (o) => {
3051
- s.onError && o && s.onError(o);
3062
+ onError: (o, i) => {
3063
+ if (s.onError && o)
3064
+ try {
3065
+ s.onError(o, i);
3066
+ } catch {
3067
+ }
3052
3068
  },
3053
3069
  render: (o) => {
3054
3070
  const i = o, c = i._componentId || `${t}-${Math.random().toString(36).substr(2, 9)}`;
@@ -3057,25 +3073,25 @@ function an(e, n) {
3057
3073
  });
3058
3074
  try {
3059
3075
  nt(o);
3060
- let u;
3076
+ let f;
3061
3077
  try {
3062
- u = n();
3063
- } catch (f) {
3078
+ f = n();
3079
+ } catch (u) {
3064
3080
  try {
3065
3081
  const _ = i._hookCallbacks;
3066
3082
  if (_ && typeof _.onError == "function")
3067
3083
  try {
3068
- _.onError(f);
3084
+ _.onError(u);
3069
3085
  } catch {
3070
3086
  }
3071
3087
  } catch {
3072
3088
  }
3073
- throw f;
3089
+ throw u;
3074
3090
  }
3075
3091
  if (i._hookCallbacks) {
3076
- const f = i._hookCallbacks;
3077
- if (f.onConnected && (s.onConnected = f.onConnected), f.onDisconnected && (s.onDisconnected = f.onDisconnected), f.onAttributeChanged && (s.onAttributeChanged = f.onAttributeChanged), f.onError && (s.onError = f.onError), f.style && (i._styleCallback = f.style), f.props) {
3078
- const _ = f.props;
3092
+ const u = i._hookCallbacks;
3093
+ if (u.onConnected && (s.onConnected = u.onConnected), u.onDisconnected && (s.onDisconnected = u.onDisconnected), u.onAttributeChanged && (s.onAttributeChanged = u.onAttributeChanged), u.onError && (s.onError = u.onError), u.style && (i._styleCallback = u.style), u.props) {
3094
+ const _ = u.props;
3079
3095
  r.props = Object.fromEntries(
3080
3096
  Object.entries(_).map(([E, m]) => [
3081
3097
  E,
@@ -3084,7 +3100,7 @@ function an(e, n) {
3084
3100
  ), me.set(t, r);
3085
3101
  }
3086
3102
  }
3087
- return u;
3103
+ return f;
3088
3104
  } finally {
3089
3105
  De(), Ze.clearCurrentComponent();
3090
3106
  }
@@ -3126,9 +3142,9 @@ function an(e, n) {
3126
3142
  if (De(), o._hookCallbacks?.props) {
3127
3143
  const i = o._hookCallbacks.props;
3128
3144
  r.props = Object.fromEntries(
3129
- Object.entries(i).map(([c, u]) => [
3145
+ Object.entries(i).map(([c, f]) => [
3130
3146
  c,
3131
- { type: typeof u == "boolean" ? Boolean : typeof u == "number" ? Number : typeof u == "string" ? String : Function, default: u }
3147
+ { type: typeof f == "boolean" ? Boolean : typeof f == "number" ? Number : typeof f == "string" ? String : Function, default: f }
3132
3148
  ])
3133
3149
  ), me.set(t, r);
3134
3150
  }
@@ -3193,17 +3209,17 @@ function qt(e, n) {
3193
3209
  }
3194
3210
  function Gt(e, n = [], t = {}) {
3195
3211
  const s = {}, r = {}, o = {}, i = [], c = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g;
3196
- let u;
3197
- for (; u = c.exec(e); ) {
3198
- const f = u[1], _ = u[2];
3212
+ let f;
3213
+ for (; f = c.exec(e); ) {
3214
+ const u = f[1], _ = f[2];
3199
3215
  let E = "";
3200
- for (let l = 3; l < u.length; l++)
3201
- if (u[l] !== void 0) {
3202
- E = u[l];
3216
+ for (let l = 3; l < f.length; l++)
3217
+ if (f[l] !== void 0) {
3218
+ E = f[l];
3203
3219
  break;
3204
3220
  }
3205
3221
  E.length >= 2 && (E[0] === '"' && E[E.length - 1] === '"' || E[0] === "'" && E[E.length - 1] === "'") && (E = E.slice(1, -1));
3206
- const m = !/=/.test(u[0]), A = E.match(/^{{(\d+)}}$/);
3222
+ const m = !/=/.test(f[0]), A = E.match(/^{{(\d+)}}$/);
3207
3223
  let p = m ? !0 : A ? n[Number(A[1])] ?? null : E;
3208
3224
  A || (p === "true" ? p = !0 : p === "false" ? p = !1 : p === "null" ? p = null : isNaN(Number(p)) || (p = Number(p)));
3209
3225
  const S = [
@@ -3215,7 +3231,7 @@ function Gt(e, n = [], t = {}) {
3215
3231
  "ref",
3216
3232
  "when"
3217
3233
  ];
3218
- if (f === ":") {
3234
+ if (u === ":") {
3219
3235
  const [l, k] = _.split(":"), [b, ...g] = l.split(".");
3220
3236
  if (S.includes(b)) {
3221
3237
  const d = [...g], C = b === "model" && k ? `model:${k}` : b;
@@ -3239,7 +3255,7 @@ function Gt(e, n = [], t = {}) {
3239
3255
  let d = p;
3240
3256
  d && j(d) && (d = d.value), r[_] = d, i.push(_);
3241
3257
  }
3242
- } else if (f === "@") {
3258
+ } else if (u === "@") {
3243
3259
  const [l, ...k] = _.split("."), b = k;
3244
3260
  Vt(p, l);
3245
3261
  const g = typeof p == "function" ? p : typeof t[p] == "function" ? t[p] : void 0;
@@ -3271,7 +3287,7 @@ function Fe(e) {
3271
3287
  props: o
3272
3288
  };
3273
3289
  return Array.isArray(i.children) && (i.children = i.children.map(
3274
- (u) => typeof u == "object" && u !== null ? Fe(u) : u
3290
+ (f) => typeof f == "object" && f !== null ? Fe(f) : f
3275
3291
  )), {
3276
3292
  tag: "#anchor",
3277
3293
  key: e.key != null ? `when-${e.key}` : `when-${e.tag}`,
@@ -3298,13 +3314,13 @@ function Zt(e, n, t) {
3298
3314
  function c(a, v) {
3299
3315
  return se("#text", {}, a, v);
3300
3316
  }
3301
- function u(a, v) {
3317
+ function f(a, v) {
3302
3318
  let y = typeof a == "string" ? yt(a) : a;
3303
3319
  return typeof y == "string" && /[\r\n]/.test(y) && (y = y.replace(/\s+/g, " ")), se("#text", {}, y, v);
3304
3320
  }
3305
- let f = "";
3321
+ let u = "";
3306
3322
  for (let a = 0; a < e.length; a++)
3307
- f += e[a], a < n.length && (f += `{{${a}}}`);
3323
+ u += e[a], a < n.length && (u += `{{${a}}}`);
3308
3324
  const _ = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, E = [];
3309
3325
  let m, A = [], p = null, S = {}, l, k = 0;
3310
3326
  const b = [];
@@ -3385,7 +3401,7 @@ function Zt(e, n, t) {
3385
3401
  "track",
3386
3402
  "wbr"
3387
3403
  ]);
3388
- for (; m = _.exec(f); )
3404
+ for (; m = _.exec(u); )
3389
3405
  if (!(m[0].startsWith("<!--") && m[0].endsWith("-->"))) {
3390
3406
  if (m[1]) {
3391
3407
  const a = m[1], v = m[0][1] === "/", y = m[0][m[0].length - 2] === "/" || C.has(a), {
@@ -3592,7 +3608,7 @@ function Zt(e, n, t) {
3592
3608
  d(O, w);
3593
3609
  } else {
3594
3610
  const $ = `text-${k++}`;
3595
- v.push(u(h, $));
3611
+ v.push(f(h, $));
3596
3612
  }
3597
3613
  }
3598
3614
  }