@jasonshimmy/custom-elements-runtime 0.0.14 → 0.0.16

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,4 +1,4 @@
1
- function Ne(e) {
1
+ function ze(e) {
2
2
  let t = new Proxy(e, {
3
3
  set: (o, c, d) => (o[c] = d, s(), !0)
4
4
  });
@@ -138,21 +138,21 @@ class R extends EventTarget {
138
138
  this.eventCounters.clear();
139
139
  }
140
140
  }
141
- const je = R.getInstance();
141
+ const Re = R.getInstance();
142
142
  function P(e, t = {}, r, n) {
143
143
  const i = n ?? t.key;
144
144
  return { tag: e, key: i, props: t, children: r };
145
145
  }
146
- function V(e) {
146
+ function I(e) {
147
147
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
148
148
  }
149
149
  function z(e) {
150
- return typeof e == "object" && e !== null && "tag" in e && !V(e);
150
+ return typeof e == "object" && e !== null && "tag" in e && !I(e);
151
151
  }
152
- function oe(e, t) {
152
+ function le(e, t) {
153
153
  return e.key != null ? e : { ...e, key: t };
154
154
  }
155
- function se(e, t = [], r = {}) {
155
+ function ce(e, t = [], r = {}) {
156
156
  const n = {}, i = {}, s = {}, o = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
157
157
  let c;
158
158
  for (; c = o.exec(e); ) {
@@ -164,14 +164,14 @@ function se(e, t = [], r = {}) {
164
164
  const w = "on" + a.charAt(0).toUpperCase() + a.slice(1);
165
165
  n[w] = typeof f == "function" ? f : typeof r[f] == "function" ? r[f] : void 0;
166
166
  } else if (d === "#") {
167
- const [w, ...p] = a.split("."), C = [...p];
168
- let g = f, l = [...C];
167
+ const [w, ...p] = a.split("."), S = [...p];
168
+ let g = f, l = [...S];
169
169
  if (w === "model" && typeof g == "string" && g.includes(".")) {
170
170
  const b = ["trim", "number", "lazy"], m = g.split(".");
171
171
  let h = g;
172
172
  const x = [];
173
- for (let S = m.length - 1; S > 0 && b.includes(m[S]); S--)
174
- x.unshift(m[S]), h = m.slice(0, S).join(".");
173
+ for (let C = m.length - 1; C > 0 && b.includes(m[C]); C--)
174
+ x.unshift(m[C]), h = m.slice(0, C).join(".");
175
175
  g = h, l.push(...x);
176
176
  }
177
177
  s[w] = {
@@ -183,7 +183,7 @@ function se(e, t = [], r = {}) {
183
183
  }
184
184
  return { props: n, attrs: i, directives: s };
185
185
  }
186
- function ae(e, t, r) {
186
+ function fe(e, t, r) {
187
187
  function n(l, b) {
188
188
  return P("#text", {}, l, b);
189
189
  }
@@ -192,8 +192,8 @@ function ae(e, t, r) {
192
192
  i += e[l], l < t.length && (i += `{{${l}}}`);
193
193
  const s = /<\/?([a-zA-Z0-9-]+)([^>]*)\/?>|{{(\d+)}}|([^<]+)/g, o = [];
194
194
  let c = null, d, a = [], u = null, y = {}, f, w = 0, p = [];
195
- function C(l) {
196
- !l || typeof l != "object" || V(l) || (l.props || l.attrs ? (l.props && (y.props || (y.props = {}), Object.assign(y.props, l.props)), l.attrs && (y.attrs || (y.attrs = {}), Object.keys(l.attrs).forEach((b) => {
195
+ function S(l) {
196
+ !l || typeof l != "object" || I(l) || (l.props || l.attrs ? (l.props && (y.props || (y.props = {}), Object.assign(y.props, l.props)), l.attrs && (y.attrs || (y.attrs = {}), Object.keys(l.attrs).forEach((b) => {
197
197
  if (b === "style" && y.attrs.style) {
198
198
  const m = y.attrs.style.replace(
199
199
  /;?\s*$/,
@@ -211,7 +211,7 @@ function ae(e, t, r) {
211
211
  }
212
212
  function g(l, b) {
213
213
  const m = u ? a : p;
214
- if (V(l)) {
214
+ if (I(l)) {
215
215
  const h = l.key ?? b;
216
216
  let x = l.children;
217
217
  m.push({
@@ -222,19 +222,19 @@ function ae(e, t, r) {
222
222
  return;
223
223
  }
224
224
  if (z(l)) {
225
- m.push(oe(l, void 0));
225
+ m.push(le(l, void 0));
226
226
  return;
227
227
  }
228
228
  if (Array.isArray(l)) {
229
229
  if (l.length === 0) return;
230
230
  for (let h = 0; h < l.length; h++) {
231
231
  const x = l[h];
232
- V(x) || z(x) || Array.isArray(x) ? g(x, `${b}-${h}`) : x !== null && typeof x == "object" ? C(x) : m.push(n(String(x), `${b}-${h}`));
232
+ I(x) || z(x) || Array.isArray(x) ? g(x, `${b}-${h}`) : x !== null && typeof x == "object" ? S(x) : m.push(n(String(x), `${b}-${h}`));
233
233
  }
234
234
  return;
235
235
  }
236
236
  if (l !== null && typeof l == "object") {
237
- C(l);
237
+ S(l);
238
238
  return;
239
239
  }
240
240
  m.push(n(String(l), b));
@@ -244,11 +244,11 @@ function ae(e, t, r) {
244
244
  const l = d[1], b = d[0][1] === "/", m = d[0][d[0].length - 2] === "/", {
245
245
  props: h,
246
246
  attrs: x,
247
- directives: S
248
- } = se(d[2] || "", t, r), k = { props: {}, attrs: {} };
247
+ directives: C
248
+ } = ce(d[2] || "", t, r), k = { props: {}, attrs: {} };
249
249
  for (const _ in h) k.props[_] = h[_];
250
250
  for (const _ in x) k.attrs[_] = x[_];
251
- for (const [_, $] of Object.entries(S))
251
+ for (const [_, $] of Object.entries(C))
252
252
  if (_ === "bind")
253
253
  if (typeof $.value == "object" && $.value !== null)
254
254
  for (const [A, E] of Object.entries($.value))
@@ -263,15 +263,15 @@ function ae(e, t, r) {
263
263
  if (typeof A == "string")
264
264
  E = A.split(/\s+/).filter(Boolean);
265
265
  else if (Array.isArray(A)) {
266
- for (const L of A)
267
- if (typeof L == "string")
268
- E.push(...L.split(/\s+/).filter(Boolean));
269
- else if (L && typeof L == "object")
270
- for (const [N, M] of Object.entries(L))
271
- M && E.push(...N.split(/\s+/).filter(Boolean));
266
+ for (const j of A)
267
+ if (typeof j == "string")
268
+ E.push(...j.split(/\s+/).filter(Boolean));
269
+ else if (j && typeof j == "object")
270
+ for (const [L, M] of Object.entries(j))
271
+ M && E.push(...L.split(/\s+/).filter(Boolean));
272
272
  } else if (A && typeof A == "object")
273
- for (const [L, N] of Object.entries(A))
274
- N && E.push(...L.split(/\s+/).filter(Boolean));
273
+ for (const [j, L] of Object.entries(A))
274
+ L && E.push(...j.split(/\s+/).filter(Boolean));
275
275
  const B = k.attrs.class || "", O = [
276
276
  .../* @__PURE__ */ new Set([
277
277
  ...B.split(/\s+/).filter(Boolean),
@@ -286,12 +286,12 @@ function ae(e, t, r) {
286
286
  E = A;
287
287
  else if (A && typeof A == "object") {
288
288
  const O = [];
289
- for (const [L, N] of Object.entries(A))
290
- if (N != null && N !== "") {
291
- const M = L.replace(
289
+ for (const [j, L] of Object.entries(A))
290
+ if (L != null && L !== "") {
291
+ const M = j.replace(
292
292
  /[A-Z]/g,
293
- (ie) => `-${ie.toLowerCase()}`
294
- ), ne = [
293
+ (ae) => `-${ae.toLowerCase()}`
294
+ ), se = [
295
295
  "width",
296
296
  "height",
297
297
  "top",
@@ -317,8 +317,8 @@ function ae(e, t, r) {
317
317
  "min-height",
318
318
  "max-height"
319
319
  ];
320
- let Q = String(N);
321
- typeof N == "number" && ne.includes(M) && (Q = `${N}px`), O.push(`${M}: ${Q}`);
320
+ let X = String(L);
321
+ typeof L == "number" && se.includes(M) && (X = `${L}px`), O.push(`${M}: ${X}`);
322
322
  }
323
323
  E = O.join("; ") + (O.length > 0 ? ";" : "");
324
324
  }
@@ -326,7 +326,7 @@ function ae(e, t, r) {
326
326
  k.attrs.style = B + (B && !B.endsWith(";") ? "; " : "") + E;
327
327
  }
328
328
  const v = {};
329
- for (const [_, $] of Object.entries(S))
329
+ for (const [_, $] of Object.entries(C))
330
330
  ["bind", "show", "class", "style"].includes(_) || (v[_] = $);
331
331
  if (Object.keys(v).length > 0 && (k.directives = v), b) {
332
332
  const _ = P(
@@ -351,11 +351,11 @@ function ae(e, t, r) {
351
351
  if (!h) continue;
352
352
  const x = h.match(/^{{(\d+)}}$/);
353
353
  if (x) {
354
- const S = Number(x[1]), k = t[S], v = `interp-${S}`;
354
+ const C = Number(x[1]), k = t[C], v = `interp-${C}`;
355
355
  g(k, v);
356
356
  } else {
357
- const S = `text-${w++}`;
358
- b.push(n(h, S));
357
+ const C = `text-${w++}`;
358
+ b.push(n(h, C));
359
359
  }
360
360
  }
361
361
  }
@@ -372,20 +372,20 @@ function ae(e, t, r) {
372
372
  }
373
373
  return P("div", {}, "", "fallback-root");
374
374
  }
375
- function ze(e, ...t) {
375
+ function Be(e, ...t) {
376
376
  const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
377
- return ae(e, t, n);
377
+ return fe(e, t, n);
378
378
  }
379
- function Re(e, t) {
380
- return H(e ? t : [], "when-block");
379
+ function Oe(e, t) {
380
+ return W(e ? t : [], "when-block");
381
381
  }
382
- function Be(e, t) {
382
+ function Me(e, t) {
383
383
  return e.map((r, n) => {
384
384
  const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
385
- return H(t(r, n), `each-${i}`);
385
+ return W(t(r, n), `each-${i}`);
386
386
  });
387
387
  }
388
- function Oe() {
388
+ function Pe() {
389
389
  const e = [];
390
390
  return {
391
391
  when(t, r) {
@@ -395,18 +395,18 @@ function Oe() {
395
395
  return e.push([!0, t]), this;
396
396
  },
397
397
  done() {
398
- return le(...e);
398
+ return de(...e);
399
399
  }
400
400
  };
401
401
  }
402
- function le(...e) {
402
+ function de(...e) {
403
403
  for (let t = 0; t < e.length; t++) {
404
404
  const [r, n] = e[t];
405
- if (r) return [H(n, `whenChain-branch-${t}`)];
405
+ if (r) return [W(n, `whenChain-branch-${t}`)];
406
406
  }
407
- return [H([], "whenChain-empty")];
407
+ return [W([], "whenChain-empty")];
408
408
  }
409
- function H(e, t) {
409
+ function W(e, t) {
410
410
  const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
411
411
  return {
412
412
  tag: "#anchor",
@@ -414,20 +414,20 @@ function H(e, t) {
414
414
  children: r
415
415
  };
416
416
  }
417
- function j(e, t) {
417
+ function N(e, t) {
418
418
  return t.split(".").reduce((r, n) => r?.[n], e);
419
419
  }
420
- function X(e, t, r) {
420
+ function Y(e, t, r) {
421
421
  const n = t.split("."), i = n.pop();
422
422
  if (!i) return;
423
423
  const s = n.reduce((o, c) => (c in o || (o[c] = {}), o[c]), e);
424
424
  s[i] = r;
425
425
  }
426
- function ce(e, t, r, n, i, s, o) {
426
+ function ue(e, t, r, n, i, s, o) {
427
427
  if (!s) return;
428
428
  const c = t.includes("lazy"), d = t.includes("trim"), a = t.includes("number"), u = () => {
429
429
  const g = s._state || s;
430
- return j(g, e);
430
+ return N(g, e);
431
431
  }, y = u();
432
432
  let f = "text";
433
433
  const w = n?.type;
@@ -459,7 +459,7 @@ function ce(e, t, r, n, i, s, o) {
459
459
  const g = String(y ?? "");
460
460
  (!o || o.value !== g) && (r.value = y);
461
461
  }
462
- const p = c || f === "checkbox" || f === "radio" || f === "select" ? "change" : "input", C = (g) => {
462
+ const p = c || f === "checkbox" || f === "radio" || f === "select" ? "change" : "input", S = (g) => {
463
463
  if (g.isComposing || i._isComposing || g.isTrusted === !1) return;
464
464
  const l = g.target;
465
465
  if (l._modelUpdating) return;
@@ -490,15 +490,15 @@ function ce(e, t, r, n, i, s, o) {
490
490
  const k = Number(m);
491
491
  isNaN(k) || (m = k);
492
492
  }
493
- const h = s._state || s, x = j(h, e);
493
+ const h = s._state || s, x = N(h, e);
494
494
  if (Array.isArray(m) && Array.isArray(x) ? JSON.stringify([...m].sort()) !== JSON.stringify([...x].sort()) : m !== x) {
495
495
  const k = g.target;
496
- k._modelUpdating = !0, X(h, e, m), setTimeout(() => {
496
+ k._modelUpdating = !0, Y(h, e, m), setTimeout(() => {
497
497
  k._modelUpdating = !1;
498
498
  }, 0), s._requestRender && s._requestRender();
499
499
  }
500
500
  };
501
- if (i[p] = C, f === "text" || f === "textarea") {
501
+ if (i[p] = S, f === "text" || f === "textarea") {
502
502
  const g = () => {
503
503
  i._isComposing = !0;
504
504
  }, l = (b) => {
@@ -511,17 +511,17 @@ function ce(e, t, r, n, i, s, o) {
511
511
  const v = Number(h);
512
512
  isNaN(v) || (h = v);
513
513
  }
514
- const x = s._state || s, S = j(x, e);
515
- (Array.isArray(h) && Array.isArray(S) ? JSON.stringify([...h].sort()) !== JSON.stringify([...S].sort()) : h !== S) && (m && (m._modelUpdating = !0, setTimeout(() => {
514
+ const x = s._state || s, C = N(x, e);
515
+ (Array.isArray(h) && Array.isArray(C) ? JSON.stringify([...h].sort()) !== JSON.stringify([...C].sort()) : h !== C) && (m && (m._modelUpdating = !0, setTimeout(() => {
516
516
  m._modelUpdating = !1;
517
- }, 0)), X(x, e, h), s._requestRender && s._requestRender());
517
+ }, 0)), Y(x, e, h), s._requestRender && s._requestRender());
518
518
  }
519
519
  }, 0);
520
520
  };
521
521
  i.compositionstart = g, i.compositionend = l;
522
522
  }
523
523
  }
524
- function fe(e, t, r, n) {
524
+ function he(e, t, r, n) {
525
525
  if (n)
526
526
  try {
527
527
  const i = JSON.parse(e);
@@ -529,13 +529,13 @@ function fe(e, t, r, n) {
529
529
  for (const [s, o] of Object.entries(i))
530
530
  t[s] = o;
531
531
  } catch {
532
- const i = j(n, e);
532
+ const i = N(n, e);
533
533
  r[e] = i;
534
534
  }
535
535
  }
536
- function de(e, t, r) {
536
+ function pe(e, t, r) {
537
537
  if (!r) return;
538
- const n = j(r, e), i = t.style || "", s = n ? "" : "none";
538
+ const n = N(r, e), i = t.style || "", s = n ? "" : "none";
539
539
  if (i) {
540
540
  const o = i.split(";").filter(Boolean), c = o.findIndex(
541
541
  (d) => d.trim().startsWith("display:")
@@ -544,19 +544,19 @@ function de(e, t, r) {
544
544
  } else
545
545
  t.style = `display: ${s}`;
546
546
  }
547
- function ue(e, t, r) {
547
+ function ge(e, t, r) {
548
548
  if (!r) return;
549
- const n = j(r, e);
549
+ const n = N(r, e);
550
550
  let i = [];
551
551
  typeof n == "string" ? i = [n] : Array.isArray(n) ? i = n.filter(Boolean) : typeof n == "object" && (i = Object.entries(n).filter(([, c]) => !!c).map(([c]) => c));
552
552
  const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
553
553
  o && (t.class = o);
554
554
  }
555
- function he(e, t, r) {
555
+ function me(e, t, r) {
556
556
  let n;
557
557
  if (typeof e == "string") {
558
558
  if (!r) return;
559
- n = j(r, e);
559
+ n = N(r, e);
560
560
  } else
561
561
  n = e;
562
562
  let i = "";
@@ -603,13 +603,13 @@ function he(e, t, r) {
603
603
  const s = t.style || "";
604
604
  t.style = s + (s && !s.endsWith(";") ? "; " : "") + i;
605
605
  }
606
- function re(e, t, r, n) {
606
+ function ie(e, t, r, n) {
607
607
  const i = {}, s = { ...n || {} }, o = {};
608
608
  for (const [c, d] of Object.entries(e)) {
609
609
  const { value: a, modifiers: u } = d;
610
610
  switch (c) {
611
611
  case "model":
612
- ce(
612
+ ue(
613
613
  typeof a == "string" ? a : String(a),
614
614
  u,
615
615
  i,
@@ -620,22 +620,22 @@ function re(e, t, r, n) {
620
620
  );
621
621
  break;
622
622
  case "bind":
623
- fe(a, i, s, t);
623
+ he(a, i, s, t);
624
624
  break;
625
625
  case "show":
626
- de(a, s, t);
626
+ pe(a, s, t);
627
627
  break;
628
628
  case "class":
629
- ue(a, s, t);
629
+ ge(a, s, t);
630
630
  break;
631
631
  case "style":
632
- he(a, s, t);
632
+ me(a, s, t);
633
633
  break;
634
634
  }
635
635
  }
636
636
  return { props: i, attrs: s, listeners: o };
637
637
  }
638
- function J(e, t) {
638
+ function Z(e, t) {
639
639
  if (Array.isArray(e)) {
640
640
  const s = /* @__PURE__ */ new Set();
641
641
  return e.map((o) => {
@@ -650,15 +650,15 @@ function J(e, t) {
650
650
  d = `${c}#${a++}`;
651
651
  s.add(d);
652
652
  let u = o.children;
653
- return Array.isArray(u) && (u = J(u, d)), { ...o, key: d, children: u };
653
+ return Array.isArray(u) && (u = Z(u, d)), { ...o, key: d, children: u };
654
654
  });
655
655
  }
656
656
  const r = e;
657
657
  let n = r.props?.key ?? r.key ?? t, i = r.children;
658
- return Array.isArray(i) && (i = J(i, n)), { ...r, key: n, children: i };
658
+ return Array.isArray(i) && (i = Z(i, n)), { ...r, key: n, children: i };
659
659
  }
660
- function pe(e, t, r, n) {
661
- const i = r.directives ?? {}, s = re(
660
+ function ye(e, t, r, n) {
661
+ const i = r.directives ?? {}, s = ie(
662
662
  i,
663
663
  n,
664
664
  e,
@@ -706,7 +706,7 @@ function T(e, t) {
706
706
  }
707
707
  const r = document.createElement(e.tag);
708
708
  e.key != null && (r.key = e.key);
709
- const { props: n = {}, attrs: i = {}, directives: s = {} } = e.props ?? {}, o = re(s, t, r, i), c = {
709
+ const { props: n = {}, attrs: i = {}, directives: s = {} } = e.props ?? {}, o = ie(s, t, r, i), c = {
710
710
  ...n,
711
711
  ...o.props
712
712
  }, d = {
@@ -741,7 +741,7 @@ function T(e, t) {
741
741
  else typeof e.children == "string" && (r.textContent = e.children);
742
742
  return r;
743
743
  }
744
- function ge(e, t, r, n) {
744
+ function be(e, t, r, n) {
745
745
  if (typeof r == "string") {
746
746
  e.textContent !== r && (e.textContent = r);
747
747
  return;
@@ -762,13 +762,13 @@ function ge(e, t, r, n) {
762
762
  for (; p && (d.add(p), p !== w); )
763
763
  p = p.nextSibling;
764
764
  }
765
- function y(f, w, p, C) {
765
+ function y(f, w, p, S) {
766
766
  const g = [];
767
767
  let l = f.nextSibling;
768
768
  for (; l && l !== w; )
769
769
  g.push(l), l = l.nextSibling;
770
770
  const b = Array.isArray(p) ? p : [];
771
- if (C.some((h) => h && h.key != null) || b.some((h) => h && h.key != null)) {
771
+ if (S.some((h) => h && h.key != null) || b.some((h) => h && h.key != null)) {
772
772
  const h = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
773
773
  for (const v of b)
774
774
  v && v.key != null && h.set(v.key, v);
@@ -776,35 +776,35 @@ function ge(e, t, r, n) {
776
776
  const _ = v.key;
777
777
  _ != null && x.set(_, v);
778
778
  }
779
- const S = /* @__PURE__ */ new Set();
779
+ const C = /* @__PURE__ */ new Set();
780
780
  let k = f.nextSibling;
781
- for (const v of C) {
781
+ for (const v of S) {
782
782
  let _;
783
783
  if (v.key != null && x.has(v.key)) {
784
784
  const $ = h.get(v.key);
785
- _ = I(
785
+ _ = D(
786
786
  x.get(v.key),
787
787
  $,
788
788
  v,
789
789
  n
790
- ), S.add(_), _ !== k && e.contains(_) && e.insertBefore(_, k);
790
+ ), C.add(_), _ !== k && e.contains(_) && e.insertBefore(_, k);
791
791
  } else
792
- _ = T(v, n), e.insertBefore(_, k), S.add(_);
792
+ _ = T(v, n), e.insertBefore(_, k), C.add(_);
793
793
  k = _.nextSibling;
794
794
  }
795
795
  for (const v of g)
796
- !S.has(v) && e.contains(v) && e.removeChild(v);
796
+ !C.has(v) && e.contains(v) && e.removeChild(v);
797
797
  } else {
798
798
  const h = Math.min(
799
799
  b.length,
800
- C.length
800
+ S.length
801
801
  );
802
802
  for (let x = 0; x < h; x++) {
803
- const S = b[x], k = C[x], v = I(g[x], S, k, n);
803
+ const C = b[x], k = S[x], v = D(g[x], C, k, n);
804
804
  v !== g[x] && (e.insertBefore(v, g[x]), e.removeChild(g[x]));
805
805
  }
806
- for (let x = h; x < C.length; x++)
807
- e.insertBefore(T(C[x], n), w);
806
+ for (let x = h; x < S.length; x++)
807
+ e.insertBefore(T(S[x], n), w);
808
808
  for (let x = h; x < g.length; x++)
809
809
  e.removeChild(g[x]);
810
810
  }
@@ -812,10 +812,10 @@ function ge(e, t, r, n) {
812
812
  for (const f of r) {
813
813
  let w;
814
814
  if (f.tag === "#anchor") {
815
- const p = f.key, C = `${p}:start`, g = `${p}:end`;
816
- let l = c.get(C), b = c.get(g);
815
+ const p = f.key, S = `${p}:start`, g = `${p}:end`;
816
+ let l = c.get(S), b = c.get(g);
817
817
  const m = Array.isArray(f.children) ? f.children : [];
818
- if (l || (l = document.createTextNode(""), l.key = C), b || (b = document.createTextNode(""), b.key = g), f._startNode = l, f._endNode = b, !e.contains(l) || !e.contains(b)) {
818
+ if (l || (l = document.createTextNode(""), l.key = S), b || (b = document.createTextNode(""), b.key = g), f._startNode = l, f._endNode = b, !e.contains(l) || !e.contains(b)) {
819
819
  e.insertBefore(l, a);
820
820
  for (const h of m)
821
821
  e.insertBefore(T(h, n), a);
@@ -832,7 +832,7 @@ function ge(e, t, r, n) {
832
832
  }
833
833
  if (f.key != null && c.has(f.key)) {
834
834
  const p = o.get(f.key);
835
- w = I(
835
+ w = D(
836
836
  c.get(f.key),
837
837
  p,
838
838
  f,
@@ -845,7 +845,7 @@ function ge(e, t, r, n) {
845
845
  for (const f of i)
846
846
  !d.has(f) && e.contains(f) && e.removeChild(f);
847
847
  }
848
- function I(e, t, r, n) {
848
+ function D(e, t, r, n) {
849
849
  if (t === r) return e;
850
850
  if (typeof r == "string") {
851
851
  if (e.nodeType === Node.TEXT_NODE)
@@ -883,18 +883,18 @@ function I(e, t, r, n) {
883
883
  }
884
884
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
885
885
  const s = e;
886
- return pe(s, t.props || {}, r.props || {}, n), ge(s, t.children, r.children, n), s;
886
+ return ye(s, t.props || {}, r.props || {}, n), be(s, t.children, r.children, n), s;
887
887
  }
888
888
  const i = T(r, n);
889
889
  return e.parentNode?.replaceChild(i, e), i;
890
890
  }
891
- function me(e, t, r) {
891
+ function xe(e, t, r) {
892
892
  const n = (a) => a.key == null ? { ...a, key: "__root__" } : a;
893
893
  let i = Array.isArray(t) ? { tag: "div", key: "__root__", children: t } : n(t);
894
- i = J(i, String(i.key ?? "root"));
894
+ i = Z(i, String(i.key ?? "root"));
895
895
  const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
896
896
  let c;
897
- s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = I(o, s, i, r) : (c = T(i, r), e.replaceChild(c, o)) : (c = T(i, r), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
897
+ s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = D(o, s, i, r) : (c = T(i, r), e.replaceChild(c, o)) : (c = T(i, r), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
898
898
  const d = [];
899
899
  for (let a = 0; a < e.childNodes.length; a++) {
900
900
  const u = e.childNodes[a];
@@ -902,24 +902,141 @@ function me(e, t, r) {
902
902
  }
903
903
  d.forEach((a) => e.removeChild(a)), e._prevVNode = i, e._prevDom = c;
904
904
  }
905
- function ye(e) {
905
+ function oe(e) {
906
906
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
907
907
  }
908
- const be = `
908
+ let V = null;
909
+ function G() {
910
+ return V || (V = new CSSStyleSheet(), V.replaceSync(oe(we))), V;
911
+ }
912
+ function ve(e) {
913
+ return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
914
+ }
915
+ const we = `
916
+ :host, *, ::before, ::after {
917
+ box-sizing: border-box;
918
+ border-width: 0;
919
+ border-style: solid;
920
+ border-color: currentColor;
921
+ }
909
922
  :host {
910
- box-sizing:border-box;
911
- line-height:1.5;
912
- font-family:ui-sans-serif,system-ui,sans-serif;
913
- -webkit-text-size-adjust:100%;
914
- text-size-adjust:100%;
915
- }
916
- *,::before,::after {
917
- box-sizing:inherit;
918
- margin:0;
919
- padding:0;
920
- border:0 solid currentColor;
921
- }
922
- `, xe = {
923
+ font-size: 16px;
924
+ line-height: 1.5;
925
+ font-family: ui-sans-serif, system-ui, sans-serif;
926
+ -webkit-text-size-adjust: 100%;
927
+ text-size-adjust: 100%;
928
+ color: inherit;
929
+ background-color: transparent;
930
+ }
931
+ *, ::before, ::after {
932
+ -webkit-tap-highlight-color: transparent;
933
+ margin: 0;
934
+ padding: 0;
935
+ font: inherit;
936
+ vertical-align: baseline;
937
+ background: transparent;
938
+ color: inherit;
939
+ }
940
+ button, input, optgroup, select, textarea {
941
+ font: inherit;
942
+ color: inherit;
943
+ background: transparent;
944
+ border: none;
945
+ outline: none;
946
+ margin: 0;
947
+ padding: 0;
948
+ }
949
+ textarea {
950
+ resize: vertical;
951
+ }
952
+ progress {
953
+ vertical-align: baseline;
954
+ }
955
+ button, textarea {
956
+ overflow: visible;
957
+ }
958
+ input[type="search"]::-webkit-search-decoration,
959
+ input[type="search"]::-webkit-search-cancel-button,
960
+ input[type="search"]::-webkit-search-results-button,
961
+ input[type="search"]::-webkit-search-results-decoration {
962
+ -webkit-appearance: none;
963
+ }
964
+ img, svg, video, canvas, audio, iframe, embed, object {
965
+ display: block;
966
+ max-width: 100%;
967
+ height: auto;
968
+ vertical-align: middle;
969
+ }
970
+ select {
971
+ text-transform: none;
972
+ }
973
+ optgroup {
974
+ font-weight: bold;
975
+ }
976
+ fieldset {
977
+ border: none;
978
+ }
979
+ svg {
980
+ fill: currentColor;
981
+ stroke: none;
982
+ }
983
+ a {
984
+ color: inherit;
985
+ text-decoration: inherit;
986
+ }
987
+ a, button {
988
+ cursor: pointer;
989
+ }
990
+ input[type="file"] {
991
+ border: 0;
992
+ }
993
+ button, [type="button"], [type="reset"], [type="submit"] {
994
+ appearance: button;
995
+ background-color: transparent;
996
+ background-image: none;
997
+ }
998
+ [type='button'], [type='reset'], [type='submit'] {
999
+ -webkit-user-select: none;
1000
+ user-select: none;
1001
+ }
1002
+ ::-webkit-input-placeholder { color: inherit; opacity: 0.5; }
1003
+ ::placeholder { color: inherit; opacity: 0.5; }
1004
+ *:focus {
1005
+ outline: 2px solid #3b82f6;
1006
+ outline-offset: 2px;
1007
+ }
1008
+ ol, ul {
1009
+ list-style: none;
1010
+ }
1011
+ table {
1012
+ border-collapse: collapse;
1013
+ border-spacing: 0;
1014
+ }
1015
+ strong {
1016
+ font-weight: bolder;
1017
+ }
1018
+ sub, sup {
1019
+ font-size: 0.75em;
1020
+ line-height: 0;
1021
+ position: relative;
1022
+ vertical-align: baseline;
1023
+ }
1024
+ sub {
1025
+ bottom: -0.25em;
1026
+ }
1027
+ sup {
1028
+ top: -0.5em;
1029
+ }
1030
+ [disabled] {
1031
+ cursor: not-allowed;
1032
+ }
1033
+ [hidden] {
1034
+ display: none;
1035
+ }
1036
+ [aria-disabled="true"] {
1037
+ cursor: not-allowed;
1038
+ }
1039
+ `, ke = {
923
1040
  gray: {
924
1041
  50: "var(--color-gray-50, #f9fafb)",
925
1042
  100: "var(--color-gray-100, #f3f4f6)",
@@ -1042,7 +1159,7 @@ const be = `
1042
1159
  },
1043
1160
  white: { DEFAULT: "var(--color-white, #ffffff)" },
1044
1161
  black: { DEFAULT: "var(--color-black, #000000)" }
1045
- }, W = {
1162
+ }, K = {
1046
1163
  /* Display */
1047
1164
  block: "display:block;",
1048
1165
  inline: "display:inline;",
@@ -1121,6 +1238,7 @@ const be = `
1121
1238
  border: "border-width:1px;",
1122
1239
  "rounded-none": "border-radius:0;",
1123
1240
  "rounded-xs": "border-radius:0.125rem;",
1241
+ rounded: "border-radius:0.25rem;",
1124
1242
  "rounded-sm": "border-radius:0.25rem;",
1125
1243
  "rounded-md": "border-radius:0.375rem;",
1126
1244
  "rounded-lg": "border-radius:0.5rem;",
@@ -1147,6 +1265,16 @@ const be = `
1147
1265
  visible: "visibility:visible;",
1148
1266
  invisible: "visibility:hidden;",
1149
1267
  /* Flex Grow/Shrink/Basis */
1268
+ "items-center": "align-items:center;",
1269
+ "items-start": "align-items:flex-start;",
1270
+ "items-end": "align-items:flex-end;",
1271
+ "items-baseline": "align-items:baseline;",
1272
+ "items-stretch": "align-items:stretch;",
1273
+ "justify-center": "justify-content:center;",
1274
+ "justify-start": "justify-content:flex-start;",
1275
+ "justify-end": "justify-content:flex-end;",
1276
+ "flex-col": "flex-direction:column;",
1277
+ "flex-row": "flex-direction:row;",
1150
1278
  grow: "flex-grow:1;",
1151
1279
  shrink: "flex-shrink:1;",
1152
1280
  "grow-0": "flex-grow:0;",
@@ -1164,7 +1292,7 @@ const be = `
1164
1292
  "transition-colors": "transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;",
1165
1293
  "transition-opacity": "transition-property:opacity;",
1166
1294
  "transition-transform": "transition-property:transform;"
1167
- }, ve = "0.25rem", Y = {
1295
+ }, _e = "0.25rem", ee = {
1168
1296
  m: ["margin"],
1169
1297
  mx: ["margin-inline"],
1170
1298
  my: ["margin-block"],
@@ -1189,7 +1317,7 @@ const be = `
1189
1317
  gap: ["gap"],
1190
1318
  "gap-x": ["column-gap"],
1191
1319
  "gap-y": ["row-gap"]
1192
- }, we = {
1320
+ }, $e = {
1193
1321
  // State variants
1194
1322
  before: (e, t) => `${e}::before{${t}}`,
1195
1323
  after: (e, t) => `${e}::after{${t}}`,
@@ -1215,7 +1343,7 @@ const be = `
1215
1343
  "peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
1216
1344
  "peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
1217
1345
  "peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
1218
- }, G = {
1346
+ }, te = {
1219
1347
  // Responsive
1220
1348
  sm: "(min-width:640px)",
1221
1349
  md: "(min-width:768px)",
@@ -1224,23 +1352,23 @@ const be = `
1224
1352
  "2xl": "(min-width:1536px)",
1225
1353
  // Dark mode (now plain string)
1226
1354
  dark: "(prefers-color-scheme: dark)"
1227
- }, K = ["sm", "md", "lg", "xl", "2xl"];
1228
- function F(e) {
1355
+ }, F = ["sm", "md", "lg", "xl", "2xl"];
1356
+ function U(e) {
1229
1357
  const t = e.startsWith("-"), n = (t ? e.slice(1) : e).split("-");
1230
1358
  if (n.length < 2) return null;
1231
1359
  const i = n.slice(0, -1).join("-"), s = n[n.length - 1], o = parseFloat(s);
1232
- if (Number.isNaN(o) || !Y[i]) return null;
1360
+ if (Number.isNaN(o) || !ee[i]) return null;
1233
1361
  const c = t ? "-" : "";
1234
- return Y[i].map((d) => `${d}:calc(${c}${ve} * ${o});`).join("");
1362
+ return ee[i].map((d) => `${d}:calc(${c}${_e} * ${o});`).join("");
1235
1363
  }
1236
- function ee(e) {
1364
+ function re(e) {
1237
1365
  const t = e.replace("#", ""), r = parseInt(t, 16), n = r >> 16 & 255, i = r >> 8 & 255, s = r & 255;
1238
1366
  return `${n} ${i} ${s}`;
1239
1367
  }
1240
- function ke(e) {
1368
+ function Se(e) {
1241
1369
  const t = /^(bg|text|border|shadow|outline|caret|accent)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
1242
1370
  if (!t) return null;
1243
- const [, r, n, i = "DEFAULT"] = t, s = xe[n]?.[i];
1371
+ const [, r, n, i = "DEFAULT"] = t, s = ke[n]?.[i];
1244
1372
  return s ? `${{
1245
1373
  bg: "background-color",
1246
1374
  text: "color",
@@ -1251,35 +1379,35 @@ function ke(e) {
1251
1379
  accent: "accent-color"
1252
1380
  }[r]}:${s};` : null;
1253
1381
  }
1254
- function _e(e) {
1382
+ function Ce(e) {
1255
1383
  const [t, r] = e.split("/");
1256
1384
  if (!r) return { base: t };
1257
1385
  const n = parseInt(r, 10);
1258
1386
  return isNaN(n) || n < 0 || n > 100 ? { base: t } : { base: t, opacity: n / 100 };
1259
1387
  }
1260
- function U(e) {
1261
- const { base: t, opacity: r } = _e(e), n = ke(t);
1388
+ function q(e) {
1389
+ const { base: t, opacity: r } = Ce(e), n = Se(t);
1262
1390
  if (n) {
1263
1391
  if (r !== void 0) {
1264
1392
  const s = /#([0-9a-f]{6})/i.exec(n);
1265
1393
  if (s) {
1266
- const o = ee(s[0]);
1394
+ const o = re(s[0]);
1267
1395
  return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
1268
1396
  }
1269
1397
  }
1270
1398
  return n;
1271
1399
  }
1272
- const i = D(t);
1400
+ const i = H(t);
1273
1401
  if (i && r !== void 0) {
1274
1402
  const s = /#([0-9a-f]{6})/i.exec(i);
1275
1403
  if (s) {
1276
- const o = ee(s[0]);
1404
+ const o = re(s[0]);
1277
1405
  return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
1278
1406
  }
1279
1407
  }
1280
1408
  return i;
1281
1409
  }
1282
- function D(e) {
1410
+ function H(e) {
1283
1411
  const t = e.indexOf("-["), r = e.endsWith("]");
1284
1412
  if (t > 0 && r) {
1285
1413
  const n = e.slice(0, t);
@@ -1329,10 +1457,10 @@ function D(e) {
1329
1457
  }
1330
1458
  return null;
1331
1459
  }
1332
- function $e(e) {
1460
+ function Ae(e) {
1333
1461
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
1334
1462
  }
1335
- function Ce(e) {
1463
+ function Ee(e) {
1336
1464
  const t = /class\s*=\s*["']([^"']+)["']/g, r = [];
1337
1465
  let n;
1338
1466
  for (; n = t.exec(e); ) {
@@ -1343,47 +1471,47 @@ function Ce(e) {
1343
1471
  }
1344
1472
  return r.filter(Boolean);
1345
1473
  }
1346
- const te = /* @__PURE__ */ new Map(), Se = 16;
1347
- function Ae(e) {
1348
- const t = Date.now(), r = te.get(e);
1349
- if (r && t - r.timestamp < Se) return r.css;
1350
- const n = Ce(e), i = new Set(n), s = [], o = [], c = [], d = [], a = {};
1351
- function u(p, C = !1) {
1352
- const g = (C ? "dark|" : "") + p;
1474
+ const ne = /* @__PURE__ */ new Map(), Te = 16;
1475
+ function je(e) {
1476
+ const t = Date.now(), r = ne.get(e);
1477
+ if (r && t - r.timestamp < Te) return r.css;
1478
+ const n = Ee(e), i = new Set(n), s = [], o = [], c = [], d = [], a = {};
1479
+ function u(p, S = !1) {
1480
+ const g = (S ? "dark|" : "") + p;
1353
1481
  if (g in a) return a[g];
1354
- const l = f(p, C);
1482
+ const l = f(p, S);
1355
1483
  return a[g] = l, l;
1356
1484
  }
1357
1485
  function y(p) {
1358
- const C = p.some((l) => K.includes(l)), g = p.includes("dark");
1359
- return p.length === 0 ? 1 : !C && !g ? 2 : C && !g ? 3 : 4;
1486
+ const S = p.some((l) => F.includes(l)), g = p.includes("dark");
1487
+ return p.length === 0 ? 1 : !S && !g ? 2 : S && !g ? 3 : 4;
1360
1488
  }
1361
- function f(p, C = !1) {
1489
+ function f(p, S = !1) {
1362
1490
  const g = p.split(":"), l = g.find(
1363
- ($) => W[$] || F($) || U($) || D($)
1491
+ ($) => K[$] || U($) || q($) || H($)
1364
1492
  );
1365
1493
  if (!l) return null;
1366
- const b = W[l] ?? F(l) ?? U(l) ?? D(l);
1494
+ const b = K[l] ?? U(l) ?? q(l) ?? H(l);
1367
1495
  if (!b) return null;
1368
- let m = `.${$e(p)}`, h = b;
1496
+ let m = `.${Ae(p)}`, h = b;
1369
1497
  const x = g.indexOf(l);
1370
- let S = x >= 0 ? g.slice(0, x) : [];
1371
- C && (S = S.filter(($) => $ !== "dark"));
1372
- const k = S.filter(($) => K.includes($)), v = k.length ? k[k.length - 1] : null;
1373
- for (const $ of S) {
1374
- if (K.includes($)) continue;
1375
- const A = we[$];
1498
+ let C = x >= 0 ? g.slice(0, x) : [];
1499
+ S && (C = C.filter(($) => $ !== "dark"));
1500
+ const k = C.filter(($) => F.includes($)), v = k.length ? k[k.length - 1] : null;
1501
+ for (const $ of C) {
1502
+ if (F.includes($)) continue;
1503
+ const A = $e[$];
1376
1504
  typeof A == "function" && (m = A(m, h).replace(/\{.*$/, ""));
1377
1505
  }
1378
1506
  let _ = `${m}{${h}}`;
1379
- return C && v ? _ = `@media (prefers-color-scheme: dark) and ${G[v]}{${_}}` : C ? _ = `@media (prefers-color-scheme: dark){${_}}` : v && (_ = `@media ${G[v]}{${_}}`), _;
1507
+ return S && v ? _ = `@media (prefers-color-scheme: dark) and ${te[v]}{${_}}` : S ? _ = `@media (prefers-color-scheme: dark){${_}}` : v && (_ = `@media ${te[v]}{${_}}`), _;
1380
1508
  }
1381
1509
  for (const p of i) {
1382
- const C = p.split(":"), g = C.find(
1383
- (h) => W[h] || F(h) || U(h) || D(h)
1510
+ const S = p.split(":"), g = S.find(
1511
+ (h) => K[h] || U(h) || q(h) || H(h)
1384
1512
  );
1385
1513
  if (!g) continue;
1386
- const l = C.indexOf(g), b = l >= 0 ? C.slice(0, l) : [], m = y(b);
1514
+ const l = S.indexOf(g), b = l >= 0 ? S.slice(0, l) : [], m = y(b);
1387
1515
  if (m === 4) {
1388
1516
  const h = u(p, !0);
1389
1517
  h && d.push(h);
@@ -1393,13 +1521,13 @@ function Ae(e) {
1393
1521
  }
1394
1522
  }
1395
1523
  const w = [...s, ...o, ...c, ...d].join("");
1396
- return te.set(e, { css: w, timestamp: t }), w;
1524
+ return ne.set(e, { css: w, timestamp: t }), w;
1397
1525
  }
1398
- const Ee = /* @__PURE__ */ new Map();
1399
- function Z(e) {
1526
+ const Le = /* @__PURE__ */ new Map();
1527
+ function Q(e) {
1400
1528
  return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
1401
1529
  }
1402
- function q(e) {
1530
+ function J(e) {
1403
1531
  return typeof e == "string" ? e.replace(
1404
1532
  /[&<>"']/g,
1405
1533
  (t) => ({
@@ -1411,24 +1539,21 @@ function q(e) {
1411
1539
  })[t]
1412
1540
  ) : e;
1413
1541
  }
1414
- function Te(e) {
1415
- return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
1416
- }
1417
- function Me(e, ...t) {
1542
+ function Ve(e, ...t) {
1418
1543
  let r = "";
1419
1544
  for (let n = 0; n < e.length; n++)
1420
1545
  r += e[n], n < t.length && (r += t[n]);
1421
1546
  return r;
1422
1547
  }
1423
- function Pe(e, t, r) {
1424
- let n = Z(e);
1548
+ function Ie(e, t, r) {
1549
+ let n = Q(e);
1425
1550
  n.includes("-") || (n = `cer-${n}`);
1426
1551
  let i;
1427
1552
  typeof t == "function" ? i = { ...r, render: t } : i = t, typeof i.onError != "function" && (i.onError = (s, o) => {
1428
1553
  console.error(`[${n}] Error:`, s, o);
1429
- }), Ee.set(n, i), typeof window < "u" && !customElements.get(n) && customElements.define(n, Le(i));
1554
+ }), Le.set(n, i), typeof window < "u" && !customElements.get(n) && customElements.define(n, Ne(i));
1430
1555
  }
1431
- function Le(e) {
1556
+ function Ne(e) {
1432
1557
  if (!e.render)
1433
1558
  throw new Error(
1434
1559
  "Component must have a render function"
@@ -1479,7 +1604,7 @@ function Le(e) {
1479
1604
  });
1480
1605
  }
1481
1606
  static get observedAttributes() {
1482
- return e.props ? Object.keys(e.props).map(Z) : [];
1607
+ return e.props ? Object.keys(e.props).map(Q) : [];
1483
1608
  }
1484
1609
  _applyComputed(t) {
1485
1610
  this._runLogicWithinErrorBoundary(e, () => {
@@ -1487,7 +1612,7 @@ function Le(e) {
1487
1612
  Object.defineProperty(this.context, r, {
1488
1613
  get: () => {
1489
1614
  const i = n(this.context);
1490
- return q(i);
1615
+ return J(i);
1491
1616
  },
1492
1617
  enumerable: !0
1493
1618
  });
@@ -1535,7 +1660,7 @@ function Le(e) {
1535
1660
  return n[i] = s, !0;
1536
1661
  }
1537
1662
  });
1538
- me(
1663
+ xe(
1539
1664
  this.shadowRoot,
1540
1665
  Array.isArray(t) ? t : [t],
1541
1666
  r
@@ -1559,18 +1684,17 @@ function Le(e) {
1559
1684
  _applyStyle(t) {
1560
1685
  this._runLogicWithinErrorBoundary(t, () => {
1561
1686
  if (!this.shadowRoot) return;
1562
- const r = Ae(this._lastHtmlStringForJitCSS);
1687
+ const r = je(this._lastHtmlStringForJitCSS);
1563
1688
  if (!t.style && (!r || r.trim() === "")) {
1564
- this._styleSheet = null;
1689
+ this._styleSheet = null, this.shadowRoot.adoptedStyleSheets = [G()];
1565
1690
  return;
1566
1691
  }
1567
1692
  let n = "";
1568
1693
  t.style && (typeof t.style == "string" ? n = t.style : typeof t.style == "function" && (n = t.style(this.context)));
1569
- let i = Te(`${be}
1570
- ${n}
1694
+ let i = ve(`${n}
1571
1695
  ${r}
1572
1696
  `);
1573
- t.minifyCSS && (i = ye(i)), this._styleSheet || (this._styleSheet = new CSSStyleSheet()), this._styleSheet.replaceSync(i), this.shadowRoot.adoptedStyleSheets = [this._styleSheet];
1697
+ i = oe(i), this._styleSheet || (this._styleSheet = new CSSStyleSheet()), (this._styleSheet.cssRules.length === 0 || this._styleSheet.toString() !== i) && this._styleSheet.replaceSync(i), this.shadowRoot.adoptedStyleSheets = [G(), this._styleSheet];
1574
1698
  });
1575
1699
  }
1576
1700
  // --- Error Boundary function ---
@@ -1699,10 +1823,10 @@ ${r}
1699
1823
  };
1700
1824
  if (!t.props) return;
1701
1825
  Object.entries(t.props).forEach(([n, i]) => {
1702
- const s = this.getAttribute(Z(n));
1703
- s !== null ? this.context[n] = q(
1826
+ const s = this.getAttribute(Q(n));
1827
+ s !== null ? this.context[n] = J(
1704
1828
  r(s, i.type)
1705
- ) : "default" in i && i.default !== void 0 && (this.context[n] = q(i.default));
1829
+ ) : "default" in i && i.default !== void 0 && (this.context[n] = J(i.default));
1706
1830
  });
1707
1831
  } catch (r) {
1708
1832
  this._hasError = !0, t.onError && t.onError(r, this.context), t.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = t.errorFallback(
@@ -1714,14 +1838,14 @@ ${r}
1714
1838
  };
1715
1839
  }
1716
1840
  export {
1717
- Pe as component,
1718
- Le as createElementClass,
1719
- Ne as createStore,
1720
- Me as css,
1721
- Be as each,
1722
- je as eventBus,
1723
- ze as html,
1724
- Oe as match,
1725
- Re as when
1841
+ Ie as component,
1842
+ Ne as createElementClass,
1843
+ ze as createStore,
1844
+ Ve as css,
1845
+ Me as each,
1846
+ Re as eventBus,
1847
+ Be as html,
1848
+ Pe as match,
1849
+ Oe as when
1726
1850
  };
1727
1851
  //# sourceMappingURL=custom-elements-runtime.es.js.map