@jasonshimmy/custom-elements-runtime 1.0.9 → 1.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.
@@ -1,4 +1,4 @@
1
- class mt {
1
+ class yt {
2
2
  pendingUpdates = /* @__PURE__ */ new Map();
3
3
  isFlushScheduled = !1;
4
4
  /**
@@ -29,12 +29,12 @@ class mt {
29
29
  return this.pendingUpdates.size;
30
30
  }
31
31
  }
32
- const yt = new mt();
33
- function fe(e, t) {
34
- yt.schedule(e, t);
32
+ const bt = new yt();
33
+ function de(e, t) {
34
+ bt.schedule(e, t);
35
35
  }
36
- const Ke = /* @__PURE__ */ new WeakSet();
37
- class bt {
36
+ const Je = /* @__PURE__ */ new WeakSet();
37
+ class wt {
38
38
  static cache = /* @__PURE__ */ new WeakMap();
39
39
  static arrayHandlerCache = /* @__PURE__ */ new WeakMap();
40
40
  static objectHandlerCache = /* @__PURE__ */ new WeakMap();
@@ -47,7 +47,7 @@ class bt {
47
47
  return i;
48
48
  const s = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
49
49
  try {
50
- ot.markAsProxy(o);
50
+ ct.markAsProxy(o);
51
51
  } catch {
52
52
  }
53
53
  return this.cache.set(t, o), o;
@@ -71,8 +71,8 @@ class bt {
71
71
  "fill",
72
72
  "copyWithin"
73
73
  ].includes(i) ? function(...a) {
74
- const p = o.apply(n, a);
75
- return t.triggerUpdate(), p;
74
+ const h = o.apply(n, a);
75
+ return t.triggerUpdate(), h;
76
76
  } : o;
77
77
  },
78
78
  set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
@@ -118,7 +118,7 @@ class bt {
118
118
  };
119
119
  }
120
120
  }
121
- class ot {
121
+ class ct {
122
122
  // Cache a stable reactiveContext object keyed by onUpdate -> makeReactive
123
123
  // This allows handler caches in ReactiveProxyCache to reuse handlers
124
124
  // for identical reactive contexts instead of creating a new context object
@@ -129,7 +129,7 @@ class ot {
129
129
  */
130
130
  static createReactiveProxy(t, r, n) {
131
131
  try {
132
- if (Ke.has(t)) return t;
132
+ if (Je.has(t)) return t;
133
133
  } catch {
134
134
  }
135
135
  const i = Array.isArray(t);
@@ -139,7 +139,7 @@ class ot {
139
139
  return o || (o = {
140
140
  triggerUpdate: r,
141
141
  makeReactiveValue: n
142
- }, s.set(n, o)), bt.getOrCreateProxy(t, o, i);
142
+ }, s.set(n, o)), wt.getOrCreateProxy(t, o, i);
143
143
  }
144
144
  /**
145
145
  * Mark an object as a proxy (for optimization)
@@ -147,12 +147,12 @@ class ot {
147
147
  static markAsProxy(t) {
148
148
  if (t)
149
149
  try {
150
- Ke.add(t);
150
+ Je.add(t);
151
151
  } catch {
152
152
  }
153
153
  }
154
154
  }
155
- class wt {
155
+ class xt {
156
156
  currentComponent = null;
157
157
  componentDependencies = /* @__PURE__ */ new Map();
158
158
  componentRenderFunctions = /* @__PURE__ */ new Map();
@@ -218,11 +218,11 @@ class wt {
218
218
  */
219
219
  getOrCreateState(t) {
220
220
  if (!this.currentComponent)
221
- return new Ue(t);
221
+ return new Fe(t);
222
222
  const r = this.currentComponent, n = this.stateIndexCounter.get(r) || 0, i = `${r}:${n}`;
223
223
  if (this.stateIndexCounter.set(r, n + 1), this.stateStorage.has(i))
224
224
  return this.stateStorage.get(i);
225
- const s = new Ue(t);
225
+ const s = new Fe(t);
226
226
  return this.stateStorage.set(i, s), s;
227
227
  }
228
228
  /**
@@ -237,7 +237,7 @@ class wt {
237
237
  triggerUpdate(t) {
238
238
  t.getDependents().forEach((r) => {
239
239
  const n = this.componentRenderFunctions.get(r);
240
- n && fe(n, r);
240
+ n && de(n, r);
241
241
  });
242
242
  }
243
243
  /**
@@ -251,8 +251,8 @@ class wt {
251
251
  this.stateIndexCounter.delete(t);
252
252
  }
253
253
  }
254
- const F = new wt();
255
- class Ue {
254
+ const F = new xt();
255
+ class Fe {
256
256
  _value;
257
257
  dependents = /* @__PURE__ */ new Set();
258
258
  constructor(t) {
@@ -284,7 +284,7 @@ class Ue {
284
284
  return this.dependents;
285
285
  }
286
286
  makeReactive(t) {
287
- return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : ot.createReactiveProxy(
287
+ return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : ct.createReactiveProxy(
288
288
  t,
289
289
  () => F.triggerUpdate(this),
290
290
  (r) => this.makeReactive(r)
@@ -308,7 +308,7 @@ function ee(e) {
308
308
  }
309
309
  }
310
310
  function mr(e) {
311
- const t = new Ue(e());
311
+ const t = new Fe(e());
312
312
  return {
313
313
  get value() {
314
314
  return F.trackDependency(t), e();
@@ -327,23 +327,23 @@ function yr(e, t, r = {}) {
327
327
  F.cleanup(i);
328
328
  };
329
329
  }
330
- const $e = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), Fe = 500;
331
- function re(e) {
332
- if ($e.has(e))
333
- return $e.get(e);
334
- const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
335
- return $e.size < Fe && $e.set(e, t), t;
336
- }
337
- function at(e) {
330
+ const ke = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map(), Ve = 500;
331
+ function ie(e) {
338
332
  if (ke.has(e))
339
333
  return ke.get(e);
334
+ const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
335
+ return ke.size < Ve && ke.set(e, t), t;
336
+ }
337
+ function lt(e) {
338
+ if (Ce.has(e))
339
+ return Ce.get(e);
340
340
  const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
341
- return ke.size < Fe && ke.set(e, t), t;
341
+ return Ce.size < Ve && Ce.set(e, t), t;
342
342
  }
343
- function pe(e) {
343
+ function ge(e) {
344
344
  if (typeof e == "string") {
345
- if (Ce.has(e))
346
- return Ce.get(e);
345
+ if (_e.has(e))
346
+ return _e.get(e);
347
347
  const t = e.replace(
348
348
  /[&<>"']/g,
349
349
  (r) => ({
@@ -354,102 +354,102 @@ function pe(e) {
354
354
  "'": "&#39;"
355
355
  })[r]
356
356
  );
357
- return t !== e && Ce.size < Fe && Ce.set(e, t), t;
357
+ return t !== e && _e.size < Ve && _e.set(e, t), t;
358
358
  }
359
359
  return e;
360
360
  }
361
- function B(e, t) {
361
+ function U(e, t) {
362
362
  if (typeof t == "string") {
363
363
  const r = t.split(".").reduce((n, i) => n?.[i], e);
364
364
  return ee(r) ? r.value : r;
365
365
  }
366
366
  return t;
367
367
  }
368
- function Se(e, t, r) {
368
+ function Ae(e, t, r) {
369
369
  const n = String(t).split("."), i = n.pop();
370
370
  if (!i) return;
371
371
  const s = n.reduce((o, c) => (o[c] == null && (o[c] = {}), o[c]), e);
372
372
  ee(s[i]) ? s[i].value = r : s[i] = r;
373
373
  }
374
- const ct = typeof process < "u" && process.env?.NODE_ENV !== "production";
375
- function se(e, ...t) {
376
- ct && console.error(e, ...t);
374
+ const ut = typeof process < "u" && process.env?.NODE_ENV !== "production";
375
+ function oe(e, ...t) {
376
+ ut && console.error(e, ...t);
377
377
  }
378
378
  function Le(e, ...t) {
379
- ct && console.warn(e, ...t);
379
+ ut && console.warn(e, ...t);
380
380
  }
381
- function xt(e, t, r) {
381
+ function vt(e, t, r) {
382
382
  if (r)
383
383
  for (const [n, i] of Object.entries(r)) {
384
384
  let s, o = {};
385
385
  if (Array.isArray(i) ? (s = i[0], o = i[1] || {}) : s = i, t.set(n, {
386
386
  callback: s,
387
387
  options: o,
388
- oldValue: B(e, n)
388
+ oldValue: U(e, n)
389
389
  }), o.immediate)
390
390
  try {
391
- const c = B(e, n);
391
+ const c = U(e, n);
392
392
  s(c, void 0, e);
393
393
  } catch (c) {
394
- se(`Error in immediate watcher for "${n}":`, c);
394
+ oe(`Error in immediate watcher for "${n}":`, c);
395
395
  }
396
396
  }
397
397
  }
398
- function vt(e, t, r, n) {
398
+ function $t(e, t, r, n) {
399
399
  const i = (o, c) => {
400
400
  if (o === c) return !0;
401
401
  if (typeof o != typeof c || typeof o != "object" || o === null || c === null) return !1;
402
402
  if (Array.isArray(o) && Array.isArray(c))
403
- return o.length !== c.length ? !1 : o.every((h, b) => i(h, c[b]));
404
- const a = Object.keys(o), p = Object.keys(c);
405
- return a.length !== p.length ? !1 : a.every((h) => i(o[h], c[h]));
403
+ return o.length !== c.length ? !1 : o.every((p, x) => i(p, c[x]));
404
+ const a = Object.keys(o), h = Object.keys(c);
405
+ return a.length !== h.length ? !1 : a.every((p) => i(o[p], c[p]));
406
406
  }, s = t.get(r);
407
407
  if (s && !i(n, s.oldValue))
408
408
  try {
409
409
  s.callback(n, s.oldValue, e), s.oldValue = n;
410
410
  } catch (o) {
411
- se(`Error in watcher for "${r}":`, o);
411
+ oe(`Error in watcher for "${r}":`, o);
412
412
  }
413
413
  for (const [o, c] of t.entries())
414
414
  if (c.options.deep && r.startsWith(o + "."))
415
415
  try {
416
- const a = B(e, o);
416
+ const a = U(e, o);
417
417
  i(a, c.oldValue) || (c.callback(a, c.oldValue, e), c.oldValue = a);
418
418
  } catch (a) {
419
- se(`Error in deep watcher for "${o}":`, a);
419
+ oe(`Error in deep watcher for "${o}":`, a);
420
420
  }
421
421
  }
422
- function Ve(e, t) {
422
+ function Ze(e, t) {
423
423
  return t === Boolean ? e === "true" : t === Number ? Number(e) : e;
424
424
  }
425
- function $t(e, t, r) {
425
+ function kt(e, t, r) {
426
426
  t && Object.entries(t).forEach(([n, i]) => {
427
- const s = re(n), o = e.getAttribute(s);
427
+ const s = ie(n), o = e.getAttribute(s);
428
428
  if (i.type === Function && typeof e[n] == "function")
429
429
  r[n] = e[n];
430
430
  else if (typeof e[n] < "u")
431
431
  try {
432
432
  const c = e[n];
433
- i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] = Ve(String(c), i.type);
433
+ i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] = Ze(String(c), i.type);
434
434
  } catch {
435
435
  r[n] = e[n];
436
436
  }
437
- else o !== null ? r[n] = Ve(o, i.type) : "default" in i && i.default !== void 0 && (r[n] = i.default);
437
+ else o !== null ? r[n] = Ze(o, i.type) : "default" in i && i.default !== void 0 && (r[n] = i.default);
438
438
  });
439
439
  }
440
- function kt(e, t, r) {
441
- t.props && $t(e, t.props, r);
440
+ function Ct(e, t, r) {
441
+ t.props && kt(e, t.props, r);
442
442
  }
443
- function Ct(e, t, r, n) {
443
+ function _t(e, t, r, n) {
444
444
  e.onConnected && !r && (e.onConnected(t), n(!0));
445
445
  }
446
- function _t(e, t, r, n, i, s, o, c) {
446
+ function Et(e, t, r, n, i, s, o, c) {
447
447
  e.onDisconnected && e.onDisconnected(t), r.forEach((a) => a()), n(), i(), s(!1), o(null), c(!1);
448
448
  }
449
- function Et(e, t, r, n, i) {
449
+ function St(e, t, r, n, i) {
450
450
  e.onAttributeChanged && e.onAttributeChanged(t, r, n, i);
451
451
  }
452
- class St {
452
+ class At {
453
453
  static cache = /* @__PURE__ */ new Map();
454
454
  static maxCacheSize = 1e3;
455
455
  // Dangerous patterns to block
@@ -512,9 +512,9 @@ class St {
512
512
  return this.createObjectEvaluator(t);
513
513
  if (/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())) {
514
514
  const r = t.trim().slice(4);
515
- return (n) => B(n, r);
515
+ return (n) => U(n, r);
516
516
  }
517
- return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => B(r, t);
517
+ return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => U(r, t);
518
518
  }
519
519
  static createObjectEvaluator(t) {
520
520
  const r = t.trim().slice(1, -1), n = this.parseObjectProperties(r);
@@ -524,7 +524,7 @@ class St {
524
524
  try {
525
525
  if (c.startsWith("ctx.")) {
526
526
  const a = c.slice(4);
527
- s[o] = B(i, a);
527
+ s[o] = U(i, a);
528
528
  } else
529
529
  s[o] = this.evaluateSimpleValue(c, i);
530
530
  } catch {
@@ -548,35 +548,35 @@ class St {
548
548
  try {
549
549
  let n = t;
550
550
  const i = [];
551
- n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${i.push(b) - 1}#>>`);
551
+ n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (x) => `<<#${i.push(x) - 1}#>>`);
552
552
  const s = n.match(/ctx\.[\w.]+/g) || [];
553
- for (const b of s) {
554
- const g = b.slice(4), u = B(r, g);
555
- if (u === void 0) return;
556
- const f = i.push(JSON.stringify(u)) - 1;
557
- n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`);
553
+ for (const x of s) {
554
+ const m = x.slice(4), d = U(r, m);
555
+ if (d === void 0) return;
556
+ const u = i.push(JSON.stringify(d)) - 1;
557
+ n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`);
558
558
  }
559
559
  const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = n.match(o) || [];
560
- for (const b of c) {
561
- if (b.startsWith("ctx.")) continue;
562
- const g = B(r, b);
563
- if (g === void 0) return;
564
- const u = i.push(JSON.stringify(g)) - 1;
565
- n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`);
560
+ for (const x of c) {
561
+ if (x.startsWith("ctx.")) continue;
562
+ const m = U(r, x);
563
+ if (m === void 0) return;
564
+ const d = i.push(JSON.stringify(m)) - 1;
565
+ n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
566
566
  }
567
567
  const a = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
568
- let p;
569
- const h = /* @__PURE__ */ new Set();
570
- for (; (p = a.exec(n)) !== null; ) {
571
- const b = p[1];
572
- if (["true", "false", "null", "undefined"].includes(b) || /^[0-9]+$/.test(b) || b === "ctx" || h.has(b)) continue;
573
- h.add(b);
574
- const g = B(r, b);
575
- if (g === void 0) return;
576
- const u = JSON.stringify(g), f = i.push(u) - 1;
577
- b.includes(".") ? n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`) : n = n.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${f}#>>`);
568
+ let h;
569
+ const p = /* @__PURE__ */ new Set();
570
+ for (; (h = a.exec(n)) !== null; ) {
571
+ const x = h[1];
572
+ if (["true", "false", "null", "undefined"].includes(x) || /^[0-9]+$/.test(x) || x === "ctx" || p.has(x)) continue;
573
+ p.add(x);
574
+ const m = U(r, x);
575
+ if (m === void 0) return;
576
+ const d = JSON.stringify(m), u = i.push(d) - 1;
577
+ x.includes(".") ? n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`) : n = n.replace(new RegExp("\\b" + x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${u}#>>`);
578
578
  }
579
- n = n.replace(/<<#(\d+)#>>/g, (b, g) => i[Number(g)]);
579
+ n = n.replace(/<<#(\d+)#>>/g, (x, m) => i[Number(m)]);
580
580
  try {
581
581
  return this.evaluateBasicExpression(n);
582
582
  } catch {
@@ -599,12 +599,12 @@ class St {
599
599
  return r[n];
600
600
  }
601
601
  function s(l) {
602
- const d = r[n++];
603
- if (l && !d)
602
+ const f = r[n++];
603
+ if (l && !f)
604
604
  throw new Error(`Unexpected token EOF, expected ${l}`);
605
- if (l && d && d.type !== l && d.value !== l)
606
- throw new Error(`Unexpected token ${d.type}/${d.value}, expected ${l}`);
607
- return d;
605
+ if (l && f && f.type !== l && f.value !== l)
606
+ throw new Error(`Unexpected token ${f.type}/${f.value}, expected ${l}`);
607
+ return f;
608
608
  }
609
609
  function o() {
610
610
  return c();
@@ -613,101 +613,101 @@ class St {
613
613
  let l = a();
614
614
  if (i() && i().value === "?") {
615
615
  s("?");
616
- const d = o();
616
+ const f = o();
617
617
  s(":");
618
- const w = o();
619
- return l ? d : w;
618
+ const b = o();
619
+ return l ? f : b;
620
620
  }
621
621
  return l;
622
622
  }
623
623
  function a() {
624
- let l = p();
624
+ let l = h();
625
625
  for (; i() && i().value === "||"; ) {
626
626
  s("OP");
627
- const d = p();
628
- l = l || d;
627
+ const f = h();
628
+ l = l || f;
629
629
  }
630
630
  return l;
631
631
  }
632
- function p() {
633
- let l = h();
632
+ function h() {
633
+ let l = p();
634
634
  for (; i() && i().value === "&&"; ) {
635
635
  s("OP");
636
- const d = h();
637
- l = l && d;
636
+ const f = p();
637
+ l = l && f;
638
638
  }
639
639
  return l;
640
640
  }
641
- function h() {
642
- let l = b();
641
+ function p() {
642
+ let l = x();
643
643
  for (; i() && ["==", "!=", "===", "!=="].includes(i().value); ) {
644
- const d = s("OP").value, w = b();
645
- switch (d) {
644
+ const f = s("OP").value, b = x();
645
+ switch (f) {
646
646
  case "==":
647
- l = l == w;
647
+ l = l == b;
648
648
  break;
649
649
  case "!=":
650
- l = l != w;
650
+ l = l != b;
651
651
  break;
652
652
  case "===":
653
- l = l === w;
653
+ l = l === b;
654
654
  break;
655
655
  case "!==":
656
- l = l !== w;
656
+ l = l !== b;
657
657
  break;
658
658
  }
659
659
  }
660
660
  return l;
661
661
  }
662
- function b() {
663
- let l = g();
662
+ function x() {
663
+ let l = m();
664
664
  for (; i() && [">", "<", ">=", "<="].includes(i().value); ) {
665
- const d = s("OP").value, w = g();
666
- switch (d) {
665
+ const f = s("OP").value, b = m();
666
+ switch (f) {
667
667
  case ">":
668
- l = l > w;
668
+ l = l > b;
669
669
  break;
670
670
  case "<":
671
- l = l < w;
671
+ l = l < b;
672
672
  break;
673
673
  case ">=":
674
- l = l >= w;
674
+ l = l >= b;
675
675
  break;
676
676
  case "<=":
677
- l = l <= w;
677
+ l = l <= b;
678
678
  break;
679
679
  }
680
680
  }
681
681
  return l;
682
682
  }
683
- function g() {
684
- let l = u();
683
+ function m() {
684
+ let l = d();
685
685
  for (; i() && (i().value === "+" || i().value === "-"); ) {
686
- const d = s("OP").value, w = u();
687
- l = d === "+" ? l + w : l - w;
686
+ const f = s("OP").value, b = d();
687
+ l = f === "+" ? l + b : l - b;
688
688
  }
689
689
  return l;
690
690
  }
691
- function u() {
692
- let l = f();
691
+ function d() {
692
+ let l = u();
693
693
  for (; i() && (i().value === "*" || i().value === "/" || i().value === "%"); ) {
694
- const d = s("OP").value, w = f();
695
- switch (d) {
694
+ const f = s("OP").value, b = u();
695
+ switch (f) {
696
696
  case "*":
697
- l = l * w;
697
+ l = l * b;
698
698
  break;
699
699
  case "/":
700
- l = l / w;
700
+ l = l / b;
701
701
  break;
702
702
  case "%":
703
- l = l % w;
703
+ l = l % b;
704
704
  break;
705
705
  }
706
706
  }
707
707
  return l;
708
708
  }
709
- function f() {
710
- return i() && i().value === "!" ? (s("OP"), !f()) : i() && i().value === "-" ? (s("OP"), -f()) : y();
709
+ function u() {
710
+ return i() && i().value === "!" ? (s("OP"), !u()) : i() && i().value === "-" ? (s("OP"), -u()) : y();
711
711
  }
712
712
  function y() {
713
713
  const l = i();
@@ -720,15 +720,15 @@ class St {
720
720
  return s("IDENT"), l.value === "true" ? !0 : l.value === "false" ? !1 : l.value === "null" ? null : void 0;
721
721
  if (l.value === "[") {
722
722
  s("PUNC");
723
- const d = [];
723
+ const f = [];
724
724
  for (; i() && i().value !== "]"; )
725
- d.push(o()), i() && i().value === "," && s("PUNC");
726
- return s("PUNC"), d;
725
+ f.push(o()), i() && i().value === "," && s("PUNC");
726
+ return s("PUNC"), f;
727
727
  }
728
728
  if (l.value === "(") {
729
729
  s("PUNC");
730
- const d = o();
731
- return s("PUNC"), d;
730
+ const f = o();
731
+ return s("PUNC"), f;
732
732
  }
733
733
  throw new Error("Unexpected token in expression");
734
734
  }
@@ -750,7 +750,7 @@ class St {
750
750
  if (!isNaN(Number(t))) return Number(t);
751
751
  if (t.startsWith("ctx.")) {
752
752
  const n = t.slice(4);
753
- return B(r, n);
753
+ return U(r, n);
754
754
  }
755
755
  return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : t;
756
756
  }
@@ -761,7 +761,7 @@ class St {
761
761
  return this.cache.size;
762
762
  }
763
763
  }
764
- class oe {
764
+ class ae {
765
765
  static cleanupFunctions = /* @__PURE__ */ new WeakMap();
766
766
  /**
767
767
  * Add an event listener with automatic cleanup tracking
@@ -835,163 +835,163 @@ class oe {
835
835
  return n ? n.length : 0;
836
836
  }
837
837
  }
838
- function ue(e, t) {
838
+ function fe(e, t) {
839
839
  if (t && e instanceof HTMLElement) {
840
- oe.cleanup(e);
840
+ ae.cleanup(e);
841
841
  for (const r in t)
842
842
  t[r] === e && delete t[r];
843
843
  for (const r of Array.from(e.childNodes))
844
- ue(r, t);
844
+ fe(r, t);
845
845
  }
846
846
  }
847
- function ye(e, t, r) {
847
+ function be(e, t, r) {
848
848
  if (typeof e == "string") return;
849
849
  const n = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
850
850
  n ? n.value = t : i && r && (r[i] = t);
851
851
  }
852
- function At(e, t, r, n, i, s, o, c) {
852
+ function jt(e, t, r, n, i, s, o, c) {
853
853
  if (!s) return;
854
- const a = t.includes("lazy"), p = t.includes("trim"), h = t.includes("number"), b = e && typeof e == "object" && "value" in e && typeof e.value < "u", g = () => {
855
- if (b) {
854
+ const a = t.includes("lazy"), h = t.includes("trim"), p = t.includes("number"), x = e && typeof e == "object" && "value" in e && typeof e.value < "u", m = () => {
855
+ if (x) {
856
856
  const k = e.value;
857
857
  return c && typeof k == "object" && k !== null ? k[c] : k;
858
858
  }
859
- return B(s._state || s, e);
860
- }, u = g();
861
- let f = "text";
862
- o instanceof HTMLInputElement ? f = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? f = "select" : o instanceof HTMLTextAreaElement && (f = "textarea");
863
- const y = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, l = y ? f === "checkbox" || f === "radio" ? "checked" : "value" : c ?? "modelValue";
864
- if (f === "checkbox")
865
- if (Array.isArray(u))
866
- r[l] = u.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
859
+ return U(s._state || s, e);
860
+ }, d = m();
861
+ let u = "text";
862
+ o instanceof HTMLInputElement ? u = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? u = "select" : o instanceof HTMLTextAreaElement && (u = "textarea");
863
+ const y = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, l = y ? u === "checkbox" || u === "radio" ? "checked" : "value" : c ?? "modelValue";
864
+ if (u === "checkbox")
865
+ if (Array.isArray(d))
866
+ r[l] = d.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
867
867
  else {
868
868
  const k = o?.getAttribute("true-value") ?? !0;
869
- r[l] = u === k;
869
+ r[l] = d === k;
870
870
  }
871
- else if (f === "radio")
872
- r[l] = u === (n?.value ?? "");
873
- else if (f === "select")
871
+ else if (u === "radio")
872
+ r[l] = d === (n?.value ?? "");
873
+ else if (u === "select")
874
874
  if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
875
- const k = Array.isArray(u) ? u.map(String) : [];
875
+ const k = Array.isArray(d) ? d.map(String) : [];
876
876
  setTimeout(() => {
877
877
  Array.from(o.options).forEach((C) => {
878
878
  C.selected = k.includes(C.value);
879
879
  });
880
- }, 0), r[l] = Array.isArray(u) ? u : [];
880
+ }, 0), r[l] = Array.isArray(d) ? d : [];
881
881
  } else
882
- r[l] = u;
882
+ r[l] = d;
883
883
  else {
884
- r[l] = u;
884
+ r[l] = d;
885
885
  try {
886
- const k = re(l);
887
- n && (n[k] = u);
886
+ const k = ie(l);
887
+ n && (n[k] = d);
888
888
  } catch {
889
889
  }
890
890
  }
891
- const d = a || f === "checkbox" || f === "radio" || f === "select" ? "change" : "input", w = (k) => {
891
+ const f = a || u === "checkbox" || u === "radio" || u === "select" ? "change" : "input", b = (k) => {
892
892
  if (k.isComposing || i._isComposing) return;
893
893
  const C = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
894
894
  if (k.isTrusted === !1 && !C) return;
895
- const m = k.target;
896
- if (!m || m._modelUpdating) return;
897
- let $ = m.value;
898
- if (f === "checkbox") {
899
- const j = g();
900
- if (Array.isArray(j)) {
901
- const N = m.getAttribute("value") ?? "", E = Array.from(j);
902
- if (m.checked)
903
- E.includes(N) || E.push(N);
895
+ const g = k.target;
896
+ if (!g || g._modelUpdating) return;
897
+ let $ = g.value;
898
+ if (u === "checkbox") {
899
+ const A = m();
900
+ if (Array.isArray(A)) {
901
+ const D = g.getAttribute("value") ?? "", S = Array.from(A);
902
+ if (g.checked)
903
+ S.includes(D) || S.push(D);
904
904
  else {
905
- const O = E.indexOf(N);
906
- O > -1 && E.splice(O, 1);
905
+ const O = S.indexOf(D);
906
+ O > -1 && S.splice(O, 1);
907
907
  }
908
- $ = E;
908
+ $ = S;
909
909
  } else {
910
- const N = m.getAttribute("true-value") ?? !0, E = m.getAttribute("false-value") ?? !1;
911
- $ = m.checked ? N : E;
910
+ const D = g.getAttribute("true-value") ?? !0, S = g.getAttribute("false-value") ?? !1;
911
+ $ = g.checked ? D : S;
912
912
  }
913
- } else if (f === "radio")
914
- $ = m.getAttribute("value") ?? m.value;
915
- else if (f === "select" && m.multiple)
916
- $ = Array.from(m.selectedOptions).map((j) => j.value);
917
- else if (p && typeof $ == "string" && ($ = $.trim()), h) {
918
- const j = Number($);
919
- isNaN(j) || ($ = j);
913
+ } else if (u === "radio")
914
+ $ = g.getAttribute("value") ?? g.value;
915
+ else if (u === "select" && g.multiple)
916
+ $ = Array.from(g.selectedOptions).map((A) => A.value);
917
+ else if (h && typeof $ == "string" && ($ = $.trim()), p) {
918
+ const A = Number($);
919
+ isNaN(A) || ($ = A);
920
920
  }
921
- const S = s._state || s, v = g();
921
+ const j = s._state || s, v = m();
922
922
  if (Array.isArray($) && Array.isArray(v) ? JSON.stringify([...$].sort()) !== JSON.stringify([...v].sort()) : $ !== v) {
923
- m._modelUpdating = !0;
923
+ g._modelUpdating = !0;
924
924
  try {
925
- if (b)
925
+ if (x)
926
926
  if (c && typeof e.value == "object" && e.value !== null) {
927
- const j = { ...e.value };
928
- j[c] = $, e.value = j;
927
+ const A = { ...e.value };
928
+ A[c] = $, e.value = A;
929
929
  } else
930
930
  e.value = $;
931
931
  else
932
- Se(S, e, $);
932
+ Ae(j, e, $);
933
933
  if (s._requestRender && s._requestRender(), s._triggerWatchers) {
934
- const j = b ? "reactiveState" : e;
935
- s._triggerWatchers(j, $);
934
+ const A = x ? "reactiveState" : e;
935
+ s._triggerWatchers(A, $);
936
936
  }
937
- if (m) {
938
- const j = `update:${re(l)}`, N = new CustomEvent(j, {
937
+ if (g) {
938
+ const A = `update:${ie(l)}`, D = new CustomEvent(A, {
939
939
  detail: $,
940
940
  bubbles: !0,
941
941
  composed: !0
942
942
  });
943
- m.dispatchEvent(N);
943
+ g.dispatchEvent(D);
944
944
  }
945
945
  } finally {
946
- setTimeout(() => m._modelUpdating = !1, 0);
946
+ setTimeout(() => g._modelUpdating = !1, 0);
947
947
  }
948
948
  }
949
949
  };
950
950
  if (y) {
951
- if (i[d]) {
952
- const k = i[d];
953
- o && oe.removeListener(o, d, k);
951
+ if (i[f]) {
952
+ const k = i[f];
953
+ o && ae.removeListener(o, f, k);
954
954
  }
955
- i[d] = w;
955
+ i[f] = b;
956
956
  } else {
957
- const k = `update:${re(l)}`;
957
+ const k = `update:${ie(l)}`;
958
958
  if (i[k]) {
959
959
  const C = i[k];
960
- o && oe.removeListener(o, k, C);
960
+ o && ae.removeListener(o, k, C);
961
961
  }
962
962
  i[k] = (C) => {
963
- const m = s._state || s, $ = C.detail !== void 0 ? C.detail : C.target?.value, S = B(m, e);
964
- if (Array.isArray($) && Array.isArray(S) ? JSON.stringify([...$].sort()) !== JSON.stringify([...S].sort()) : $ !== S) {
965
- Se(m, e, $), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, $);
966
- const A = C.target;
967
- if (A) {
968
- A[l] = $;
963
+ const g = s._state || s, $ = C.detail !== void 0 ? C.detail : C.target?.value, j = U(g, e);
964
+ if (Array.isArray($) && Array.isArray(j) ? JSON.stringify([...$].sort()) !== JSON.stringify([...j].sort()) : $ !== j) {
965
+ Ae(g, e, $), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, $);
966
+ const _ = C.target;
967
+ if (_) {
968
+ _[l] = $;
969
969
  try {
970
- const j = re(l);
971
- typeof $ == "boolean" ? $ ? A.setAttribute(j, "true") : A.setAttribute(j, "false") : A.setAttribute(j, String($));
970
+ const A = ie(l);
971
+ typeof $ == "boolean" ? $ ? _.setAttribute(A, "true") : _.setAttribute(A, "false") : _.setAttribute(A, String($));
972
972
  } catch {
973
973
  }
974
974
  queueMicrotask(() => {
975
- typeof A._applyProps == "function" && A._applyProps(A._cfg), typeof A._requestRender == "function" && A._requestRender();
975
+ typeof _._applyProps == "function" && _._applyProps(_._cfg), typeof _._requestRender == "function" && _._requestRender();
976
976
  });
977
977
  }
978
978
  }
979
979
  };
980
980
  }
981
- (f === "text" || f === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = (k) => {
981
+ (u === "text" || u === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = (k) => {
982
982
  i._isComposing = !1;
983
983
  const C = k.target;
984
984
  C && setTimeout(() => {
985
- const m = C.value, $ = s._state || s, S = B($, e);
986
- let v = m;
987
- if (p && (v = v.trim()), h) {
988
- const j = Number(v);
989
- isNaN(j) || (v = j);
985
+ const g = C.value, $ = s._state || s, j = U($, e);
986
+ let v = g;
987
+ if (h && (v = v.trim()), p) {
988
+ const A = Number(v);
989
+ isNaN(A) || (v = A);
990
990
  }
991
- if (Array.isArray(v) && Array.isArray(S) ? JSON.stringify([...v].sort()) !== JSON.stringify([...S].sort()) : v !== S) {
991
+ if (Array.isArray(v) && Array.isArray(j) ? JSON.stringify([...v].sort()) !== JSON.stringify([...j].sort()) : v !== j) {
992
992
  C._modelUpdating = !0;
993
993
  try {
994
- Se($, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
994
+ Ae($, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
995
995
  } finally {
996
996
  setTimeout(() => C._modelUpdating = !1, 0);
997
997
  }
@@ -999,18 +999,18 @@ function At(e, t, r, n, i, s, o, c) {
999
999
  }, 0);
1000
1000
  });
1001
1001
  }
1002
- function lt(e) {
1002
+ function ft(e) {
1003
1003
  const t = e.slice(2);
1004
1004
  return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
1005
1005
  }
1006
- function jt(e, t, r, n) {
1006
+ function Ot(e, t, r, n) {
1007
1007
  if (typeof e == "object" && e !== null)
1008
1008
  for (const [i, s] of Object.entries(e))
1009
1009
  i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? r[i] = s : t[i] = s;
1010
1010
  else if (typeof e == "string") {
1011
1011
  if (!n) return;
1012
1012
  try {
1013
- const i = we(e, n);
1013
+ const i = xe(e, n);
1014
1014
  if (typeof i == "object" && i !== null) {
1015
1015
  for (const [s, o] of Object.entries(i))
1016
1016
  s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? r[s] = o : t[s] = o;
@@ -1020,16 +1020,16 @@ function jt(e, t, r, n) {
1020
1020
  return;
1021
1021
  }
1022
1022
  } catch {
1023
- const i = B(n, e);
1023
+ const i = U(n, e);
1024
1024
  r[e] = i;
1025
1025
  }
1026
1026
  }
1027
1027
  }
1028
- function Ot(e, t, r) {
1028
+ function Tt(e, t, r) {
1029
1029
  let n;
1030
1030
  if (typeof e == "string") {
1031
1031
  if (!r) return;
1032
- n = we(e, r);
1032
+ n = xe(e, r);
1033
1033
  } else
1034
1034
  n = e;
1035
1035
  const i = t.style || "";
@@ -1050,14 +1050,14 @@ function Ot(e, t, r) {
1050
1050
  s = "display: none";
1051
1051
  s !== i && (s ? t.style = s : delete t.style);
1052
1052
  }
1053
- function we(e, t) {
1054
- return St.evaluate(e, t);
1053
+ function xe(e, t) {
1054
+ return At.evaluate(e, t);
1055
1055
  }
1056
- function Tt(e, t, r) {
1056
+ function Rt(e, t, r) {
1057
1057
  let n;
1058
1058
  if (typeof e == "string") {
1059
1059
  if (!r) return;
1060
- n = we(e, r);
1060
+ n = xe(e, r);
1061
1061
  } else
1062
1062
  n = e;
1063
1063
  let i = [];
@@ -1065,11 +1065,11 @@ function Tt(e, t, r) {
1065
1065
  const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
1066
1066
  o && (t.class = o);
1067
1067
  }
1068
- function Rt(e, t, r) {
1068
+ function Pt(e, t, r) {
1069
1069
  let n;
1070
1070
  if (typeof e == "string") {
1071
1071
  if (!r) return;
1072
- n = we(e, r);
1072
+ n = xe(e, r);
1073
1073
  } else
1074
1074
  n = e;
1075
1075
  let i = "";
@@ -1079,10 +1079,10 @@ function Rt(e, t, r) {
1079
1079
  const o = [];
1080
1080
  for (const [c, a] of Object.entries(n))
1081
1081
  if (a != null && a !== "") {
1082
- const p = c.replace(
1082
+ const h = c.replace(
1083
1083
  /[A-Z]/g,
1084
- (g) => `-${g.toLowerCase()}`
1085
- ), h = [
1084
+ (m) => `-${m.toLowerCase()}`
1085
+ ), p = [
1086
1086
  "width",
1087
1087
  "height",
1088
1088
  "top",
@@ -1108,8 +1108,8 @@ function Rt(e, t, r) {
1108
1108
  "min-height",
1109
1109
  "max-height"
1110
1110
  ];
1111
- let b = String(a);
1112
- typeof a == "number" && h.includes(p) && (b = `${a}px`), o.push(`${p}: ${b}`);
1111
+ let x = String(a);
1112
+ typeof a == "number" && p.includes(h) && (x = `${a}px`), o.push(`${h}: ${x}`);
1113
1113
  }
1114
1114
  i = o.join("; ") + (o.length > 0 ? ";" : "");
1115
1115
  }
@@ -1118,55 +1118,55 @@ function Rt(e, t, r) {
1118
1118
  }
1119
1119
  function Lt(e, t, r) {
1120
1120
  let n = e;
1121
- typeof e == "string" && r && (n = we(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
1121
+ typeof e == "string" && r && (n = xe(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
1122
1122
  }
1123
- function ut(e, t, r, n) {
1123
+ function dt(e, t, r, n) {
1124
1124
  const i = {}, s = { ...n || {} }, o = {};
1125
1125
  for (const [c, a] of Object.entries(e)) {
1126
- const { value: p, modifiers: h, arg: b } = a;
1126
+ const { value: h, modifiers: p, arg: x } = a;
1127
1127
  if (c === "model" || c.startsWith("model:")) {
1128
- const g = c.split(":"), u = g.length > 1 ? g[1] : b;
1129
- At(
1130
- p,
1131
- // Pass the original value (could be string or reactive state object)
1128
+ const m = c.split(":"), d = m.length > 1 ? m[1] : x;
1129
+ jt(
1132
1130
  h,
1131
+ // Pass the original value (could be string or reactive state object)
1132
+ p,
1133
1133
  i,
1134
1134
  s,
1135
1135
  o,
1136
1136
  t,
1137
1137
  r,
1138
- u
1138
+ d
1139
1139
  );
1140
1140
  continue;
1141
1141
  }
1142
1142
  switch (c) {
1143
1143
  case "bind":
1144
- jt(p, i, s, t);
1144
+ Ot(h, i, s, t);
1145
1145
  break;
1146
1146
  case "show":
1147
- Ot(p, s, t);
1147
+ Tt(h, s, t);
1148
1148
  break;
1149
1149
  case "class":
1150
- Tt(p, s, t);
1150
+ Rt(h, s, t);
1151
1151
  break;
1152
1152
  case "style":
1153
- Rt(p, s, t);
1153
+ Pt(h, s, t);
1154
1154
  break;
1155
1155
  case "ref":
1156
- Lt(p, i, t);
1156
+ Lt(h, i, t);
1157
1157
  break;
1158
1158
  }
1159
1159
  }
1160
1160
  return { props: i, attrs: s, listeners: o };
1161
1161
  }
1162
- function qe(e, t) {
1162
+ function Ke(e, t) {
1163
1163
  if (Array.isArray(e)) {
1164
1164
  const s = /* @__PURE__ */ new Set();
1165
1165
  return e.map((o) => {
1166
1166
  if (!o || typeof o != "object") return o;
1167
1167
  let c = o.props?.key ?? o.key;
1168
1168
  if (!c) {
1169
- const b = o.tag || "node", u = [
1169
+ const x = o.tag || "node", d = [
1170
1170
  // attrs (kebab-case)
1171
1171
  o.props?.attrs?.id,
1172
1172
  o.props?.attrs?.name,
@@ -1176,23 +1176,23 @@ function qe(e, t) {
1176
1176
  o.props?.props?.name,
1177
1177
  o.props?.props?.dataKey,
1178
1178
  o.props?.props?.["data-key"]
1179
- ].find((f) => f != null) ?? "";
1180
- c = u ? `${t}:${b}:${u}` : `${t}:${b}`;
1179
+ ].find((u) => u != null) ?? "";
1180
+ c = d ? `${t}:${x}:${d}` : `${t}:${x}`;
1181
1181
  }
1182
- let a = c, p = 1;
1182
+ let a = c, h = 1;
1183
1183
  for (; s.has(a); )
1184
- a = `${c}#${p++}`;
1184
+ a = `${c}#${h++}`;
1185
1185
  s.add(a);
1186
- let h = o.children;
1187
- return Array.isArray(h) && (h = qe(h, a)), { ...o, key: a, children: h };
1186
+ let p = o.children;
1187
+ return Array.isArray(p) && (p = Ke(p, a)), { ...o, key: a, children: p };
1188
1188
  });
1189
1189
  }
1190
1190
  const r = e;
1191
1191
  let n = r.props?.key ?? r.key ?? t, i = r.children;
1192
- return Array.isArray(i) && (i = qe(i, n)), { ...r, key: n, children: i };
1192
+ return Array.isArray(i) && (i = Ke(i, n)), { ...r, key: n, children: i };
1193
1193
  }
1194
- function Je(e, t, r, n) {
1195
- const i = r.directives ?? {}, s = ut(
1194
+ function Ge(e, t, r, n) {
1195
+ const i = r.directives ?? {}, s = dt(
1196
1196
  i,
1197
1197
  n,
1198
1198
  e,
@@ -1205,39 +1205,39 @@ function Je(e, t, r, n) {
1205
1205
  ...t.attrs,
1206
1206
  ...r.attrs,
1207
1207
  ...s.attrs
1208
- }, a = t.props ?? {}, p = o, h = r?.isCustomElement ?? t?.isCustomElement ?? !1;
1209
- let b = !1;
1210
- for (const f in { ...a, ...p }) {
1211
- const y = a[f], x = p[f];
1212
- if (y !== x)
1213
- if (b = !0, f === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1214
- e.value !== x && (e.value = x ?? "");
1215
- else if (f === "checked" && e instanceof HTMLInputElement)
1216
- e.checked = !!x;
1217
- else if (f.startsWith("on") && typeof x == "function") {
1218
- const l = lt(f);
1219
- typeof y == "function" && oe.removeListener(e, l, y), oe.addListener(e, l, x);
1220
- } else if (x == null)
1221
- e.removeAttribute(f);
1222
- else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || f in e)
1208
+ }, a = t.props ?? {}, h = o, p = r?.isCustomElement ?? t?.isCustomElement ?? !1;
1209
+ let x = !1;
1210
+ for (const u in { ...a, ...h }) {
1211
+ const y = a[u], w = h[u];
1212
+ if (y !== w)
1213
+ if (x = !0, u === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1214
+ e.value !== w && (e.value = w ?? "");
1215
+ else if (u === "checked" && e instanceof HTMLInputElement)
1216
+ e.checked = !!w;
1217
+ else if (u.startsWith("on") && typeof w == "function") {
1218
+ const l = ft(u);
1219
+ typeof y == "function" && ae.removeListener(e, l, y), ae.addListener(e, l, w);
1220
+ } else if (w == null)
1221
+ e.removeAttribute(u);
1222
+ else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || u in e)
1223
1223
  try {
1224
- e[f] = x;
1224
+ e[u] = w;
1225
1225
  } catch {
1226
1226
  }
1227
1227
  else
1228
- x === !1 && e.removeAttribute(f);
1228
+ w === !1 && e.removeAttribute(u);
1229
1229
  }
1230
- for (const [f, y] of Object.entries(
1230
+ for (const [u, y] of Object.entries(
1231
1231
  s.listeners || {}
1232
1232
  ))
1233
- oe.addListener(e, f, y);
1234
- const g = t.attrs ?? {}, u = c;
1235
- for (const f in { ...g, ...u }) {
1236
- const y = g[f], x = u[f];
1237
- let l = y, d = x;
1238
- if (ee(y) && (l = y.value), ee(x) && (d = x.value), l !== d)
1239
- if (b = !0, d == null || d === !1) {
1240
- if (e.removeAttribute(f), f === "value") {
1233
+ ae.addListener(e, u, y);
1234
+ const m = t.attrs ?? {}, d = c;
1235
+ for (const u in { ...m, ...d }) {
1236
+ const y = m[u], w = d[u];
1237
+ let l = y, f = w;
1238
+ if (ee(y) && (l = y.value), ee(w) && (f = w.value), l !== f)
1239
+ if (x = !0, f == null || f === !1) {
1240
+ if (e.removeAttribute(u), u === "value") {
1241
1241
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement)
1242
1242
  try {
1243
1243
  e.value = "";
@@ -1254,69 +1254,69 @@ function Je(e, t, r, n) {
1254
1254
  } catch {
1255
1255
  }
1256
1256
  }
1257
- if (f === "checked" && e instanceof HTMLInputElement)
1257
+ if (u === "checked" && e instanceof HTMLInputElement)
1258
1258
  try {
1259
1259
  e.checked = !1;
1260
1260
  } catch {
1261
1261
  }
1262
- if (f === "disabled")
1262
+ if (u === "disabled")
1263
1263
  try {
1264
1264
  e.disabled = !1;
1265
1265
  } catch {
1266
1266
  }
1267
1267
  } else {
1268
- if (f === "value") {
1268
+ if (u === "value") {
1269
1269
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
1270
1270
  try {
1271
- e.value = d ?? "";
1271
+ e.value = f ?? "";
1272
1272
  } catch {
1273
- e.setAttribute(f, String(d));
1273
+ e.setAttribute(u, String(f));
1274
1274
  }
1275
1275
  continue;
1276
1276
  } else if (e instanceof HTMLSelectElement) {
1277
1277
  try {
1278
- e.value = d ?? "";
1278
+ e.value = f ?? "";
1279
1279
  } catch {
1280
1280
  }
1281
1281
  continue;
1282
1282
  } else if (e instanceof HTMLProgressElement) {
1283
1283
  try {
1284
- e.value = Number(d);
1284
+ e.value = Number(f);
1285
1285
  } catch {
1286
1286
  }
1287
1287
  continue;
1288
1288
  }
1289
1289
  }
1290
- if (f === "checked" && e instanceof HTMLInputElement) {
1290
+ if (u === "checked" && e instanceof HTMLInputElement) {
1291
1291
  try {
1292
- e.checked = !!d;
1292
+ e.checked = !!f;
1293
1293
  } catch {
1294
1294
  }
1295
1295
  continue;
1296
1296
  }
1297
- if (f === "style") {
1298
- e.setAttribute(f, String(d));
1297
+ if (u === "style") {
1298
+ e.setAttribute(u, String(f));
1299
1299
  continue;
1300
1300
  }
1301
- const w = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
- if (h && !w && f.includes("-")) {
1303
- const k = at(f);
1301
+ const b = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
+ if (p && !b && u.includes("-")) {
1303
+ const k = lt(u);
1304
1304
  try {
1305
- e[k] = d;
1305
+ e[k] = f;
1306
1306
  } catch {
1307
- e.setAttribute(f, String(d));
1307
+ e.setAttribute(u, String(f));
1308
1308
  }
1309
- } else if (!w && f in e)
1309
+ } else if (!b && u in e)
1310
1310
  try {
1311
- e[f] = d;
1311
+ e[u] = f;
1312
1312
  } catch {
1313
- e.setAttribute(f, String(d));
1313
+ e.setAttribute(u, String(f));
1314
1314
  }
1315
1315
  else
1316
- e.setAttribute(f, String(d));
1316
+ e.setAttribute(u, String(f));
1317
1317
  }
1318
1318
  }
1319
- if (h && b)
1319
+ if (p && x)
1320
1320
  try {
1321
1321
  if (typeof e._applyProps == "function")
1322
1322
  try {
@@ -1331,102 +1331,102 @@ function Z(e, t, r) {
1331
1331
  if (typeof e == "string")
1332
1332
  return document.createTextNode(e);
1333
1333
  if (e.tag === "#text") {
1334
- const g = document.createTextNode(
1334
+ const m = document.createTextNode(
1335
1335
  typeof e.children == "string" ? e.children : ""
1336
1336
  );
1337
- return e.key != null && (g.key = e.key), g;
1337
+ return e.key != null && (m.key = e.key), m;
1338
1338
  }
1339
1339
  if (e.tag === "#anchor") {
1340
- const g = e, u = Array.isArray(g.children) ? g.children : [], f = document.createTextNode(""), y = document.createTextNode("");
1341
- g.key != null && (f.key = `${g.key}:start`, y.key = `${g.key}:end`), g._startNode = f, g._endNode = y;
1342
- const x = document.createDocumentFragment();
1343
- x.appendChild(f);
1344
- for (const l of u) {
1345
- const d = Z(l, t);
1346
- x.appendChild(d);
1340
+ const m = e, d = Array.isArray(m.children) ? m.children : [], u = document.createTextNode(""), y = document.createTextNode("");
1341
+ m.key != null && (u.key = `${m.key}:start`, y.key = `${m.key}:end`), m._startNode = u, m._endNode = y;
1342
+ const w = document.createDocumentFragment();
1343
+ w.appendChild(u);
1344
+ for (const l of d) {
1345
+ const f = Z(l, t);
1346
+ w.appendChild(f);
1347
1347
  }
1348
- return x.appendChild(y), x;
1348
+ return w.appendChild(y), w;
1349
1349
  }
1350
1350
  const n = document.createElement(e.tag);
1351
1351
  e.key != null && (n.key = e.key);
1352
- const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c = ut(o, t, n, s), a = {
1352
+ const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c = dt(o, t, n, s), a = {
1353
1353
  ...i,
1354
1354
  ...c.props
1355
- }, p = {
1355
+ }, h = {
1356
1356
  ...s,
1357
1357
  ...c.attrs
1358
- }, h = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
- for (const g in p) {
1360
- const u = p[g];
1361
- if (!(typeof g != "string" || /\[object Object\]/.test(g))) {
1362
- if (typeof u == "boolean")
1363
- u && n.setAttribute(g, "");
1364
- else if (u != null)
1365
- if (!h && g === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1358
+ }, p = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
+ for (const m in h) {
1360
+ const d = h[m];
1361
+ if (!(typeof m != "string" || /\[object Object\]/.test(m))) {
1362
+ if (typeof d == "boolean")
1363
+ d && n.setAttribute(m, "");
1364
+ else if (d != null)
1365
+ if (!p && m === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1366
1366
  try {
1367
- n instanceof HTMLProgressElement ? n.value = Number(u) : n.value = u ?? "";
1367
+ n instanceof HTMLProgressElement ? n.value = Number(d) : n.value = d ?? "";
1368
1368
  } catch {
1369
- n.setAttribute(g, String(u));
1369
+ n.setAttribute(m, String(d));
1370
1370
  }
1371
- else if (!h && g === "checked" && n instanceof HTMLInputElement)
1371
+ else if (!p && m === "checked" && n instanceof HTMLInputElement)
1372
1372
  try {
1373
- n.checked = !!u;
1373
+ n.checked = !!d;
1374
1374
  } catch {
1375
- n.setAttribute(g, String(u));
1375
+ n.setAttribute(m, String(d));
1376
1376
  }
1377
- else if (!h && g in n)
1377
+ else if (!p && m in n)
1378
1378
  try {
1379
- n[g] = u;
1379
+ n[m] = d;
1380
1380
  } catch {
1381
- n.setAttribute(g, String(u));
1381
+ n.setAttribute(m, String(d));
1382
1382
  }
1383
- else if ((e.props?.isCustomElement ?? !1) && !h && g.includes("-")) {
1384
- const y = at(g);
1383
+ else if ((e.props?.isCustomElement ?? !1) && !p && m.includes("-")) {
1384
+ const y = lt(m);
1385
1385
  try {
1386
- n[y] = u;
1386
+ n[y] = d;
1387
1387
  } catch {
1388
- n.setAttribute(g, String(u));
1388
+ n.setAttribute(m, String(d));
1389
1389
  }
1390
1390
  } else
1391
- n.setAttribute(g, String(u));
1391
+ n.setAttribute(m, String(d));
1392
1392
  }
1393
1393
  }
1394
- for (const g in a) {
1395
- const u = a[g];
1396
- if (!(typeof g != "string" || /\[object Object\]/.test(g)))
1397
- if (g === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1398
- const f = typeof u == "object" && u !== null && typeof u.value < "u" ? u.value : u;
1399
- n.value = f ?? "";
1400
- } else if (g === "checked" && n instanceof HTMLInputElement) {
1401
- const f = typeof u == "object" && u !== null && typeof u.value < "u" ? u.value : u;
1402
- n.checked = !!f;
1403
- } else if (g.startsWith("on") && typeof u == "function")
1404
- oe.addListener(n, lt(g), u);
1394
+ for (const m in a) {
1395
+ const d = a[m];
1396
+ if (!(typeof m != "string" || /\[object Object\]/.test(m)))
1397
+ if (m === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1398
+ const u = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
1399
+ n.value = u ?? "";
1400
+ } else if (m === "checked" && n instanceof HTMLInputElement) {
1401
+ const u = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
1402
+ n.checked = !!u;
1403
+ } else if (m.startsWith("on") && typeof d == "function")
1404
+ ae.addListener(n, ft(m), d);
1405
1405
  else {
1406
- if (g.startsWith("on") && u === void 0)
1406
+ if (m.startsWith("on") && d === void 0)
1407
1407
  continue;
1408
- if (u == null || u === !1)
1409
- n.removeAttribute(g);
1410
- else if ((e.props?.isCustomElement ?? !1) || g in n)
1408
+ if (d == null || d === !1)
1409
+ n.removeAttribute(m);
1410
+ else if ((e.props?.isCustomElement ?? !1) || m in n)
1411
1411
  try {
1412
- const y = typeof u == "object" && u !== null && typeof u.value < "u" ? u.value : u;
1413
- n[g] = y;
1412
+ const y = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
1413
+ n[m] = y;
1414
1414
  } catch {
1415
1415
  }
1416
1416
  }
1417
1417
  }
1418
- for (const [g, u] of Object.entries(
1418
+ for (const [m, d] of Object.entries(
1419
1419
  c.listeners || {}
1420
1420
  ))
1421
- oe.addListener(n, g, u);
1422
- const b = {
1421
+ ae.addListener(n, m, d);
1422
+ const x = {
1423
1423
  ...e,
1424
1424
  props: {
1425
1425
  ...e.props,
1426
1426
  ...c.props
1427
1427
  }
1428
1428
  };
1429
- ye(b, n, r);
1429
+ be(x, n, r);
1430
1430
  try {
1431
1431
  if (typeof n._applyProps == "function")
1432
1432
  try {
@@ -1437,126 +1437,126 @@ function Z(e, t, r) {
1437
1437
  } catch {
1438
1438
  }
1439
1439
  if (Array.isArray(e.children))
1440
- for (const g of e.children)
1441
- n.appendChild(Z(g, t, r));
1440
+ for (const m of e.children)
1441
+ n.appendChild(Z(m, t, r));
1442
1442
  else typeof e.children == "string" && (n.textContent = e.children);
1443
1443
  try {
1444
- if (n instanceof HTMLSelectElement && p && p.hasOwnProperty("value"))
1444
+ if (n instanceof HTMLSelectElement && h && h.hasOwnProperty("value"))
1445
1445
  try {
1446
- n.value = p.value ?? "";
1446
+ n.value = h.value ?? "";
1447
1447
  } catch {
1448
1448
  }
1449
1449
  } catch {
1450
1450
  }
1451
1451
  return n;
1452
1452
  }
1453
- function Pt(e, t, r, n, i) {
1453
+ function Mt(e, t, r, n, i) {
1454
1454
  if (typeof r == "string") {
1455
1455
  e.textContent !== r && (e.textContent = r);
1456
1456
  return;
1457
1457
  }
1458
1458
  if (!Array.isArray(r)) return;
1459
1459
  const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], c = /* @__PURE__ */ new Map();
1460
- for (const u of o)
1461
- u && u.key != null && c.set(u.key, u);
1460
+ for (const d of o)
1461
+ d && d.key != null && c.set(d.key, d);
1462
1462
  const a = /* @__PURE__ */ new Map();
1463
- for (const u of s) {
1464
- const f = u.key;
1465
- f != null && a.set(f, u);
1466
- }
1467
- const p = /* @__PURE__ */ new Set();
1468
- let h = e.firstChild;
1469
- function b(u, f) {
1470
- let y = u;
1471
- for (; y && (p.add(y), y !== f); )
1463
+ for (const d of s) {
1464
+ const u = d.key;
1465
+ u != null && a.set(u, d);
1466
+ }
1467
+ const h = /* @__PURE__ */ new Set();
1468
+ let p = e.firstChild;
1469
+ function x(d, u) {
1470
+ let y = d;
1471
+ for (; y && (h.add(y), y !== u); )
1472
1472
  y = y.nextSibling;
1473
1473
  }
1474
- function g(u, f, y, x) {
1474
+ function m(d, u, y, w) {
1475
1475
  const l = [];
1476
- let d = u.nextSibling;
1477
- for (; d && d !== f; )
1478
- l.push(d), d = d.nextSibling;
1479
- const w = Array.isArray(y) ? y : [];
1480
- if (x.some((C) => C && C.key != null) || w.some((C) => C && C.key != null)) {
1481
- const C = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
1482
- for (const v of w)
1476
+ let f = d.nextSibling;
1477
+ for (; f && f !== u; )
1478
+ l.push(f), f = f.nextSibling;
1479
+ const b = Array.isArray(y) ? y : [];
1480
+ if (w.some((C) => C && C.key != null) || b.some((C) => C && C.key != null)) {
1481
+ const C = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
1482
+ for (const v of b)
1483
1483
  v && v.key != null && C.set(v.key, v);
1484
1484
  for (const v of l) {
1485
- const A = v.key;
1486
- A != null && m.set(A, v);
1485
+ const _ = v.key;
1486
+ _ != null && g.set(_, v);
1487
1487
  }
1488
1488
  const $ = /* @__PURE__ */ new Set();
1489
- let S = u.nextSibling;
1490
- for (const v of x) {
1491
- let A;
1492
- if (v.key != null && m.has(v.key)) {
1493
- const j = C.get(v.key);
1494
- A = Ae(
1495
- m.get(v.key),
1496
- j,
1489
+ let j = d.nextSibling;
1490
+ for (const v of w) {
1491
+ let _;
1492
+ if (v.key != null && g.has(v.key)) {
1493
+ const A = C.get(v.key);
1494
+ _ = je(
1495
+ g.get(v.key),
1496
+ A,
1497
1497
  v,
1498
1498
  n
1499
- ), $.add(A), A !== S && e.contains(A) && e.insertBefore(A, S);
1499
+ ), $.add(_), _ !== j && e.contains(_) && e.insertBefore(_, j);
1500
1500
  } else
1501
- A = Z(v, n), e.insertBefore(A, S), $.add(A);
1502
- S = A.nextSibling;
1501
+ _ = Z(v, n), e.insertBefore(_, j), $.add(_);
1502
+ j = _.nextSibling;
1503
1503
  }
1504
1504
  for (const v of l)
1505
1505
  !$.has(v) && e.contains(v) && e.removeChild(v);
1506
1506
  } else {
1507
1507
  const C = Math.min(
1508
- w.length,
1509
- x.length
1508
+ b.length,
1509
+ w.length
1510
1510
  );
1511
- for (let m = 0; m < C; m++) {
1512
- const $ = w[m], S = x[m], v = Ae(l[m], $, S, n);
1513
- v !== l[m] && (e.insertBefore(v, l[m]), e.removeChild(l[m]));
1511
+ for (let g = 0; g < C; g++) {
1512
+ const $ = b[g], j = w[g], v = je(l[g], $, j, n);
1513
+ v !== l[g] && (e.insertBefore(v, l[g]), e.removeChild(l[g]));
1514
1514
  }
1515
- for (let m = C; m < x.length; m++)
1516
- e.insertBefore(Z(x[m], n), f);
1517
- for (let m = C; m < l.length; m++)
1518
- e.removeChild(l[m]);
1515
+ for (let g = C; g < w.length; g++)
1516
+ e.insertBefore(Z(w[g], n), u);
1517
+ for (let g = C; g < l.length; g++)
1518
+ e.removeChild(l[g]);
1519
1519
  }
1520
1520
  }
1521
- for (const u of r) {
1522
- let f;
1523
- if (u.tag === "#anchor") {
1524
- const y = u.key, x = `${y}:start`, l = `${y}:end`;
1525
- let d = a.get(x), w = a.get(l);
1526
- const k = Array.isArray(u.children) ? u.children : [];
1527
- if (d || (d = document.createTextNode(""), d.key = x), w || (w = document.createTextNode(""), w.key = l), u._startNode = d, u._endNode = w, !e.contains(d) || !e.contains(w)) {
1528
- e.insertBefore(d, h);
1521
+ for (const d of r) {
1522
+ let u;
1523
+ if (d.tag === "#anchor") {
1524
+ const y = d.key, w = `${y}:start`, l = `${y}:end`;
1525
+ let f = a.get(w), b = a.get(l);
1526
+ const k = Array.isArray(d.children) ? d.children : [];
1527
+ if (f || (f = document.createTextNode(""), f.key = w), b || (b = document.createTextNode(""), b.key = l), d._startNode = f, d._endNode = b, !e.contains(f) || !e.contains(b)) {
1528
+ e.insertBefore(f, p);
1529
1529
  for (const C of k)
1530
- e.insertBefore(Z(C, n), h);
1531
- e.insertBefore(w, h);
1530
+ e.insertBefore(Z(C, n), p);
1531
+ e.insertBefore(b, p);
1532
1532
  } else
1533
- g(
1534
- d,
1535
- w,
1533
+ m(
1534
+ f,
1535
+ b,
1536
1536
  c.get(y)?.children,
1537
1537
  k
1538
1538
  );
1539
- b(d, w), h = w.nextSibling;
1539
+ x(f, b), p = b.nextSibling;
1540
1540
  continue;
1541
1541
  }
1542
- if (u.key != null && a.has(u.key)) {
1543
- const y = c.get(u.key);
1544
- f = Ae(
1545
- a.get(u.key),
1542
+ if (d.key != null && a.has(d.key)) {
1543
+ const y = c.get(d.key);
1544
+ u = je(
1545
+ a.get(d.key),
1546
1546
  y,
1547
- u,
1547
+ d,
1548
1548
  n,
1549
1549
  i
1550
- ), p.add(f), f !== h && e.contains(f) && (h && !e.contains(h) && (h = null), e.insertBefore(f, h));
1550
+ ), h.add(u), u !== p && e.contains(u) && (p && !e.contains(p) && (p = null), e.insertBefore(u, p));
1551
1551
  } else
1552
- f = Z(u, n, i), h && !e.contains(h) && (h = null), e.insertBefore(f, h), p.add(f);
1553
- h = f.nextSibling;
1552
+ u = Z(d, n, i), p && !e.contains(p) && (p = null), e.insertBefore(u, p), h.add(u);
1553
+ p = u.nextSibling;
1554
1554
  }
1555
- for (const u of s)
1556
- !p.has(u) && e.contains(u) && (ue(u, i), e.removeChild(u));
1555
+ for (const d of s)
1556
+ !h.has(d) && e.contains(d) && (fe(d, i), e.removeChild(d));
1557
1557
  }
1558
- function Ae(e, t, r, n, i) {
1559
- if (t && typeof t != "string" && t.props?.ref && i && ue(e, i), t === r) return e;
1558
+ function je(e, t, r, n, i) {
1559
+ if (t && typeof t != "string" && t.props?.ref && i && fe(e, i), t === r) return e;
1560
1560
  if (typeof r == "string") {
1561
1561
  if (e.nodeType === Node.TEXT_NODE)
1562
1562
  return e.textContent !== r && (e.textContent = r), e;
@@ -1566,97 +1566,97 @@ function Ae(e, t, r, n, i) {
1566
1566
  }
1567
1567
  }
1568
1568
  if (r && typeof r != "string" && r.tag === "#anchor") {
1569
- const o = r, c = Array.isArray(o.children) ? o.children : [], a = o._startNode ?? document.createTextNode(""), p = o._endNode ?? document.createTextNode("");
1570
- o.key != null && (a.key = `${o.key}:start`, p.key = `${o.key}:end`), o._startNode = a, o._endNode = p;
1571
- const h = document.createDocumentFragment();
1572
- h.appendChild(a);
1573
- for (const b of c) {
1574
- const g = Z(b, n);
1575
- h.appendChild(g);
1569
+ const o = r, c = Array.isArray(o.children) ? o.children : [], a = o._startNode ?? document.createTextNode(""), h = o._endNode ?? document.createTextNode("");
1570
+ o.key != null && (a.key = `${o.key}:start`, h.key = `${o.key}:end`), o._startNode = a, o._endNode = h;
1571
+ const p = document.createDocumentFragment();
1572
+ p.appendChild(a);
1573
+ for (const x of c) {
1574
+ const m = Z(x, n);
1575
+ p.appendChild(m);
1576
1576
  }
1577
- return h.appendChild(p), e.parentNode?.replaceChild(h, e), a;
1577
+ return p.appendChild(h), e.parentNode?.replaceChild(p, e), a;
1578
1578
  }
1579
1579
  if (!r) {
1580
- ue(e, i);
1580
+ fe(e, i);
1581
1581
  const o = document.createComment("removed");
1582
1582
  return e.parentNode?.replaceChild(o, e), o;
1583
1583
  }
1584
1584
  if (!t || typeof t == "string") {
1585
- ue(e, i);
1585
+ fe(e, i);
1586
1586
  const o = Z(r, n, i);
1587
- return ye(r, o, i), e.parentNode?.replaceChild(o, e), o;
1587
+ return be(r, o, i), e.parentNode?.replaceChild(o, e), o;
1588
1588
  }
1589
1589
  if (r.tag === "#anchor") {
1590
1590
  const o = Array.isArray(r.children) ? r.children : [], c = r._startNode ?? document.createTextNode(""), a = r._endNode ?? document.createTextNode("");
1591
1591
  r.key != null && (c.key = `${r.key}:start`, a.key = `${r.key}:end`), r._startNode = c, r._endNode = a;
1592
- const p = document.createDocumentFragment();
1593
- p.appendChild(c);
1594
- for (const h of o)
1595
- p.appendChild(Z(h, n));
1596
- return p.appendChild(a), e.parentNode?.replaceChild(p, e), c;
1592
+ const h = document.createDocumentFragment();
1593
+ h.appendChild(c);
1594
+ for (const p of o)
1595
+ h.appendChild(Z(p, n));
1596
+ return h.appendChild(a), e.parentNode?.replaceChild(h, e), c;
1597
1597
  }
1598
1598
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
1599
1599
  const o = e;
1600
- return Je(o, t.props || {}, r.props || {}, n), Pt(o, t.children, r.children, n, i), ye(r, o, i), o;
1600
+ return Ge(o, t.props || {}, r.props || {}, n), Mt(o, t.children, r.children, n, i), be(r, o, i), o;
1601
1601
  }
1602
1602
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && (t.tag && String(t.tag).includes("-") || r.props && r.props.isCustomElement || t.props && t.props.isCustomElement))
1603
1603
  try {
1604
1604
  const c = e;
1605
- return Je(c, t.props || {}, r.props || {}, n), ye(r, c, i), c;
1605
+ return Ge(c, t.props || {}, r.props || {}, n), be(r, c, i), c;
1606
1606
  } catch {
1607
1607
  }
1608
- ue(e, i);
1608
+ fe(e, i);
1609
1609
  const s = Z(r, n, i);
1610
- return ye(r, s, i), e.parentNode?.replaceChild(s, e), s;
1610
+ return be(r, s, i), e.parentNode?.replaceChild(s, e), s;
1611
1611
  }
1612
- function Mt(e, t, r, n) {
1612
+ function Wt(e, t, r, n) {
1613
1613
  let i;
1614
1614
  Array.isArray(t) ? t.length === 1 ? (i = t[0], i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })) : i = { tag: "div", key: "__root__", children: t } : (i = t, i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })), i && typeof i == "object" && i.tag === "#anchor" && (i = {
1615
1615
  tag: "div",
1616
1616
  key: "__anchor_root__",
1617
1617
  props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
1618
1618
  children: [i]
1619
- }), i = qe(i, String(i.key ?? "root"));
1619
+ }), i = Ke(i, String(i.key ?? "root"));
1620
1620
  const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
1621
1621
  let c;
1622
- s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = Ae(o, s, i, r, n) : (c = Z(i, r, n), e.replaceChild(c, o)) : (c = Z(i, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
1622
+ s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = je(o, s, i, r, n) : (c = Z(i, r, n), e.replaceChild(c, o)) : (c = Z(i, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
1623
1623
  const a = [];
1624
- for (let p = 0; p < e.childNodes.length; p++) {
1625
- const h = e.childNodes[p];
1626
- h !== c && h.nodeName !== "STYLE" && (ue(h, n), a.push(h));
1624
+ for (let h = 0; h < e.childNodes.length; h++) {
1625
+ const p = e.childNodes[h];
1626
+ p !== c && p.nodeName !== "STYLE" && (fe(p, n), a.push(p));
1627
1627
  }
1628
- a.forEach((p) => e.removeChild(p)), e._prevVNode = i, e._prevDom = c;
1628
+ a.forEach((h) => e.removeChild(h)), e._prevVNode = i, e._prevDom = c;
1629
1629
  }
1630
- function Pe(e) {
1631
- if (typeof e == "string") return pe(e);
1630
+ function Me(e) {
1631
+ if (typeof e == "string") return ge(e);
1632
1632
  if (e.tag === "#text")
1633
- return typeof e.children == "string" ? pe(e.children) : "";
1633
+ return typeof e.children == "string" ? ge(e.children) : "";
1634
1634
  if (e.tag === "#anchor")
1635
- return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Pe).join("");
1635
+ return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Me).join("");
1636
1636
  let t = "";
1637
- e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${pe(String(s))}"`).join(""));
1637
+ e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${ge(String(s))}"`).join(""));
1638
1638
  let r = "";
1639
- e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${pe(String(s))}"`).join(""));
1640
- const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? pe(e.children) : e.children ? Pe(e.children) : "";
1639
+ e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${ge(String(s))}"`).join(""));
1640
+ const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Me).join("") : typeof e.children == "string" ? ge(e.children) : e.children ? Me(e.children) : "";
1641
1641
  return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
1642
1642
  }
1643
- function Wt(e, ...t) {
1643
+ function Dt(e, ...t) {
1644
1644
  let r = "";
1645
1645
  for (let n = 0; n < e.length; n++)
1646
1646
  r += e[n], n < t.length && (r += t[n]);
1647
1647
  return r;
1648
1648
  }
1649
- function ft(e) {
1649
+ function pt(e) {
1650
1650
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
1651
1651
  }
1652
- let _e = null;
1653
- function Ze() {
1654
- return _e || (_e = new CSSStyleSheet(), _e.replaceSync(ft(It))), _e;
1652
+ let Ee = null;
1653
+ function Xe() {
1654
+ return Ee || (Ee = new CSSStyleSheet(), Ee.replaceSync(pt(Nt))), Ee;
1655
1655
  }
1656
- function Dt(e) {
1656
+ function It(e) {
1657
1657
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
1658
1658
  }
1659
- const It = Wt`
1659
+ const Nt = Dt`
1660
1660
  :host,
1661
1661
  *,
1662
1662
  ::before,
@@ -1677,6 +1677,13 @@ const It = Wt`
1677
1677
  font: 16px/1.5 var(--font-sans, ui-sans-serif, system-ui, sans-serif);
1678
1678
  -webkit-text-size-adjust: 100%;
1679
1679
  text-size-adjust: 100%;
1680
+ /* Default gradient variables to avoid undefined var() usage in generated utilities */
1681
+ --tw-gradient-from-position: 0%;
1682
+ --tw-gradient-to-position: 100%;
1683
+ --tw-gradient-via-position: 50%;
1684
+ --tw-gradient-from: rgba(255,255,255,0);
1685
+ --tw-gradient-to: rgba(255,255,255,0);
1686
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1680
1687
  }
1681
1688
  button,
1682
1689
  input,
@@ -1760,7 +1767,7 @@ const It = Wt`
1760
1767
  [hidden] {
1761
1768
  display: none;
1762
1769
  }
1763
- `, Nt = {
1770
+ `, Ht = {
1764
1771
  // Existing semantic colors
1765
1772
  neutral: {
1766
1773
  50: "#fafafa",
@@ -1858,8 +1865,8 @@ const It = Wt`
1858
1865
  black: { DEFAULT: "#000000" },
1859
1866
  transparent: { DEFAULT: "transparent" },
1860
1867
  current: { DEFAULT: "currentColor" }
1861
- }, dt = Object.fromEntries(
1862
- Object.entries(Nt).map(([e, t]) => [
1868
+ }, ht = Object.fromEntries(
1869
+ Object.entries(Ht).map(([e, t]) => [
1863
1870
  e,
1864
1871
  Object.fromEntries(
1865
1872
  Object.entries(t).map(([r, n]) => [
@@ -1868,7 +1875,7 @@ const It = Wt`
1868
1875
  ])
1869
1876
  )
1870
1877
  ])
1871
- ), le = "0.25rem", Ht = {
1878
+ ), ue = "0.25rem", Bt = {
1872
1879
  "3xs": 64,
1873
1880
  "2xs": 72,
1874
1881
  xs: 80,
@@ -1882,7 +1889,7 @@ const It = Wt`
1882
1889
  "5xl": 256,
1883
1890
  "6xl": 288,
1884
1891
  "7xl": 320
1885
- }, Ge = {
1892
+ }, Qe = {
1886
1893
  m: ["margin"],
1887
1894
  mx: ["margin-inline"],
1888
1895
  my: ["margin-block"],
@@ -2037,8 +2044,8 @@ const It = Wt`
2037
2044
  ["text-7xl", "4.5rem", "1"],
2038
2045
  ["text-8xl", "6rem", "1"],
2039
2046
  ["text-9xl", "8rem", "1"]
2040
- ].forEach(([a, p, h]) => {
2041
- e[a] = `font-size:${p};line-height:${h};`;
2047
+ ].forEach(([a, h, p]) => {
2048
+ e[a] = `font-size:${h};line-height:${p};`;
2042
2049
  }), [
2043
2050
  ["tracking-tighter", "-0.05em"],
2044
2051
  ["tracking-tight", "-0.025em"],
@@ -2046,8 +2053,8 @@ const It = Wt`
2046
2053
  ["tracking-wide", "0.025em"],
2047
2054
  ["tracking-wider", "0.05em"],
2048
2055
  ["tracking-widest", "0.1em"]
2049
- ].forEach(([a, p]) => {
2050
- e[a] = `letter-spacing:${p};`;
2056
+ ].forEach(([a, h]) => {
2057
+ e[a] = `letter-spacing:${h};`;
2051
2058
  }), [
2052
2059
  ["leading-3", "0.75rem"],
2053
2060
  ["leading-4", "1rem"],
@@ -2063,15 +2070,15 @@ const It = Wt`
2063
2070
  ["leading-normal", "1.5"],
2064
2071
  ["leading-relaxed", "1.625"],
2065
2072
  ["leading-loose", "2"]
2066
- ].forEach(([a, p]) => {
2067
- e[a] = `line-height:${p};`;
2073
+ ].forEach(([a, h]) => {
2074
+ e[a] = `line-height:${h};`;
2068
2075
  }), Object.assign(e, {
2069
2076
  "font-sans": "font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);",
2070
2077
  "font-serif": "font-family:var(--font-serif, ui-serif,Georgia,serif);",
2071
2078
  "font-mono": "font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);"
2072
2079
  }), [0, 1, 2, 4, 6, 8].forEach((a) => {
2073
- const p = `${a}px`;
2074
- e[`border-${a}`] = `border-width:${p};`, e[`border-t-${a}`] = `border-top-width:${p};`, e[`border-r-${a}`] = `border-right-width:${p};`, e[`border-b-${a}`] = `border-bottom-width:${p};`, e[`border-l-${a}`] = `border-left-width:${p};`, e[`border-x-${a}`] = `border-left-width:${p};border-right-width:${p};`, e[`border-y-${a}`] = `border-top-width:${p};border-bottom-width:${p};`;
2080
+ const h = `${a}px`;
2081
+ e[`border-${a}`] = `border-width:${h};`, e[`border-t-${a}`] = `border-top-width:${h};`, e[`border-r-${a}`] = `border-right-width:${h};`, e[`border-b-${a}`] = `border-bottom-width:${h};`, e[`border-l-${a}`] = `border-left-width:${h};`, e[`border-x-${a}`] = `border-left-width:${h};border-right-width:${h};`, e[`border-y-${a}`] = `border-top-width:${h};border-bottom-width:${h};`;
2075
2082
  }), e.border = "border-width:1px;", e["border-t"] = "border-top-width:1px;", e["border-r"] = "border-right-width:1px;", e["border-b"] = "border-bottom-width:1px;", e["border-l"] = "border-left-width:1px;", e["border-x"] = "border-left-width:1px;border-right-width:1px;", e["border-y"] = "border-top-width:1px;border-bottom-width:1px;", Object.assign(e, {
2076
2083
  "border-solid": "border-style:solid;",
2077
2084
  "border-dashed": "border-style:dashed;",
@@ -2089,9 +2096,9 @@ const It = Wt`
2089
2096
  "3xl": 24,
2090
2097
  "4xl": 32,
2091
2098
  full: 9999
2092
- }).forEach(([a, p]) => {
2093
- const h = p === 9999 ? "9999px" : `${p / 16}rem`;
2094
- e[`rounded-${a}`] = `border-radius:${h};`, e[`rounded-t-${a}`] = `border-top-left-radius:${h};border-top-right-radius:${h};`, e[`rounded-r-${a}`] = `border-top-right-radius:${h};border-bottom-right-radius:${h};`, e[`rounded-b-${a}`] = `border-bottom-left-radius:${h};border-bottom-right-radius:${h};`, e[`rounded-l-${a}`] = `border-top-left-radius:${h};border-bottom-left-radius:${h};`, e[`rounded-tl-${a}`] = `border-top-left-radius:${h};`, e[`rounded-tr-${a}`] = `border-top-right-radius:${h};`, e[`rounded-br-${a}`] = `border-bottom-right-radius:${h};`, e[`rounded-bl-${a}`] = `border-bottom-left-radius:${h};`;
2099
+ }).forEach(([a, h]) => {
2100
+ const p = h === 9999 ? "9999px" : `${h / 16}rem`;
2101
+ e[`rounded-${a}`] = `border-radius:${p};`, e[`rounded-t-${a}`] = `border-top-left-radius:${p};border-top-right-radius:${p};`, e[`rounded-r-${a}`] = `border-top-right-radius:${p};border-bottom-right-radius:${p};`, e[`rounded-b-${a}`] = `border-bottom-left-radius:${p};border-bottom-right-radius:${p};`, e[`rounded-l-${a}`] = `border-top-left-radius:${p};border-bottom-left-radius:${p};`, e[`rounded-tl-${a}`] = `border-top-left-radius:${p};`, e[`rounded-tr-${a}`] = `border-top-right-radius:${p};`, e[`rounded-br-${a}`] = `border-bottom-right-radius:${p};`, e[`rounded-bl-${a}`] = `border-bottom-left-radius:${p};`;
2095
2102
  }), Object.assign(e, {
2096
2103
  "shadow-none": "--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
2097
2104
  "shadow-xs": "--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));",
@@ -2169,8 +2176,8 @@ const It = Wt`
2169
2176
  "m-auto": "margin:auto;",
2170
2177
  "mx-auto": "margin-inline:auto;",
2171
2178
  "my-auto": "margin-block:auto;"
2172
- }), Object.entries(Ht).forEach(([a, p]) => {
2173
- e[`max-w-${a}`] = `max-width:calc(${le} * ${p});`, e[`min-w-${a}`] = `min-width:calc(${le} * ${p});`, e[`w-${a}`] = `width:calc(${le} * ${p});`, e[`max-h-${a}`] = `max-height:calc(${le} * ${p});`, e[`min-h-${a}`] = `min-height:calc(${le} * ${p});`, e[`h-${a}`] = `height:calc(${le} * ${p});`;
2179
+ }), Object.entries(Bt).forEach(([a, h]) => {
2180
+ e[`max-w-${a}`] = `max-width:calc(${ue} * ${h});`, e[`min-w-${a}`] = `min-width:calc(${ue} * ${h});`, e[`w-${a}`] = `width:calc(${ue} * ${h});`, e[`max-h-${a}`] = `max-height:calc(${ue} * ${h});`, e[`min-h-${a}`] = `min-height:calc(${ue} * ${h});`, e[`h-${a}`] = `height:calc(${ue} * ${h});`;
2174
2181
  }), Object.assign(e, {
2175
2182
  transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
2176
2183
  "transition-none": "transition-property:none;",
@@ -2257,7 +2264,7 @@ const It = Wt`
2257
2264
  "bg-gradient-to-l": "background-image:linear-gradient(to left, var(--tw-gradient-stops));",
2258
2265
  "bg-gradient-to-tl": "background-image:linear-gradient(to top left, var(--tw-gradient-stops));"
2259
2266
  }), e;
2260
- }, Me = zt();
2267
+ }, We = zt();
2261
2268
  function J(e, t) {
2262
2269
  let r = 0;
2263
2270
  for (let n = 0; n < e.length; n++) {
@@ -2269,7 +2276,7 @@ function J(e, t) {
2269
2276
  }
2270
2277
  return e + t;
2271
2278
  }
2272
- const Bt = {
2279
+ const Ut = {
2273
2280
  before: (e, t) => `${e}::before{${t}}`,
2274
2281
  after: (e, t) => `${e}::after{${t}}`,
2275
2282
  hover: (e, t) => `${J(e, ":hover")}{${t}}`,
@@ -2292,14 +2299,14 @@ const Bt = {
2292
2299
  "peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
2293
2300
  "peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
2294
2301
  "peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
2295
- }, Xe = {
2302
+ }, Ye = {
2296
2303
  sm: "(min-width:640px)",
2297
2304
  md: "(min-width:768px)",
2298
2305
  lg: "(min-width:1024px)",
2299
2306
  xl: "(min-width:1280px)",
2300
2307
  "2xl": "(min-width:1536px)",
2301
2308
  dark: "(prefers-color-scheme: dark)"
2302
- }, Ut = {
2309
+ }, qt = {
2303
2310
  xs: "(min-width:20rem)",
2304
2311
  sm: "(min-width:24rem)",
2305
2312
  md: "(min-width:28rem)",
@@ -2311,7 +2318,7 @@ const Bt = {
2311
2318
  "5xl": "(min-width:64rem)",
2312
2319
  "6xl": "(min-width:72rem)",
2313
2320
  "7xl": "(min-width:80rem)"
2314
- }, We = ["sm", "md", "lg", "xl", "2xl"], De = [
2321
+ }, De = ["sm", "md", "lg", "xl", "2xl"], Ie = [
2315
2322
  "xs",
2316
2323
  "sm",
2317
2324
  "md",
@@ -2324,19 +2331,19 @@ const Bt = {
2324
2331
  "6xl",
2325
2332
  "7xl"
2326
2333
  ];
2327
- function Ie(e) {
2334
+ function Ne(e) {
2328
2335
  const t = e.startsWith("-"), r = t ? e.slice(1) : e, n = r.lastIndexOf("-");
2329
2336
  if (n === -1) return null;
2330
2337
  const i = r.slice(0, n), s = r.slice(n + 1), o = parseFloat(s);
2331
- if (Number.isNaN(o) || !Ge[i]) return null;
2338
+ if (Number.isNaN(o) || !Qe[i]) return null;
2332
2339
  const c = t ? "-" : "";
2333
- return Ge[i].map((a) => `${a}:calc(${c}${le} * ${o});`).join("");
2340
+ return Qe[i].map((a) => `${a}:calc(${c}${ue} * ${o});`).join("");
2334
2341
  }
2335
- function Qe(e) {
2342
+ function et(e) {
2336
2343
  const t = e.replace("#", ""), r = parseInt(t, 16);
2337
2344
  return `${r >> 16 & 255} ${r >> 8 & 255} ${r & 255}`;
2338
2345
  }
2339
- const qt = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Ft = {
2346
+ const Ft = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Kt = {
2340
2347
  bg: "background-color",
2341
2348
  decoration: "text-decoration-color",
2342
2349
  text: "color",
@@ -2347,36 +2354,36 @@ const qt = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
2347
2354
  fill: "fill",
2348
2355
  stroke: "stroke"
2349
2356
  };
2350
- function Kt(e) {
2351
- const t = qt.exec(e);
2357
+ function Vt(e) {
2358
+ const t = Ft.exec(e);
2352
2359
  if (!t) return null;
2353
- const [, r, n, i = "DEFAULT"] = t, s = dt[n]?.[i];
2360
+ const [, r, n, i = "DEFAULT"] = t, s = ht[n]?.[i];
2354
2361
  if (!s) return null;
2355
2362
  if (r === "shadow") return `--ce-shadow-color:${s};`;
2356
- const o = Ft[r];
2363
+ const o = Kt[r];
2357
2364
  return o ? `${o}:${s};` : null;
2358
2365
  }
2359
- function Vt(e) {
2366
+ function Jt(e) {
2360
2367
  const t = e.indexOf("/");
2361
2368
  if (t === -1) return { base: e };
2362
2369
  const r = e.slice(0, t), n = e.slice(t + 1), i = parseInt(n, 10);
2363
2370
  return isNaN(i) || i < 0 || i > 100 ? { base: r } : { base: r, opacity: i / 100 };
2364
2371
  }
2365
- function Ne(e) {
2366
- const { base: t, opacity: r } = Vt(e), n = Kt(t);
2372
+ function He(e) {
2373
+ const { base: t, opacity: r } = Jt(e), n = Vt(t);
2367
2374
  if (n && r !== void 0) {
2368
2375
  const s = /#([0-9a-f]{6})/i.exec(n);
2369
2376
  if (s) {
2370
- const o = Qe(s[0]);
2377
+ const o = et(s[0]);
2371
2378
  return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2372
2379
  }
2373
2380
  }
2374
2381
  if (n) return n;
2375
- const i = je(t);
2382
+ const i = Oe(t);
2376
2383
  if (i && r !== void 0) {
2377
2384
  const s = /#([0-9a-f]{6})/i.exec(i);
2378
2385
  if (s) {
2379
- const o = Qe(s[0]);
2386
+ const o = et(s[0]);
2380
2387
  return i.replace(
2381
2388
  /#([0-9a-f]{6})/i,
2382
2389
  `rgb(${o} / ${r})`
@@ -2385,10 +2392,10 @@ function Ne(e) {
2385
2392
  }
2386
2393
  return i;
2387
2394
  }
2388
- function Ye(e) {
2395
+ function Be(e) {
2389
2396
  const t = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
2390
2397
  if (!t) return null;
2391
- const [, r, n, i = "DEFAULT"] = t, s = dt[n]?.[i];
2398
+ const [, r, n, i = "DEFAULT"] = t, s = ht[n]?.[i];
2392
2399
  if (!s) return null;
2393
2400
  switch (r) {
2394
2401
  case "from":
@@ -2401,19 +2408,19 @@ function Ye(e) {
2401
2408
  return null;
2402
2409
  }
2403
2410
  }
2404
- function He(e) {
2411
+ function ze(e) {
2405
2412
  const t = /^opacity-(\d{1,3})$/.exec(e);
2406
2413
  if (!t) return null;
2407
2414
  const r = parseInt(t[1], 10);
2408
2415
  return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
2409
2416
  }
2410
- function je(e) {
2417
+ function Oe(e) {
2411
2418
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
2412
2419
  const o = e.slice(1, -1).trim(), c = o.indexOf(":");
2413
2420
  if (c === -1) return null;
2414
2421
  const a = o.slice(0, c).trim();
2415
- let p = o.slice(c + 1).trim();
2416
- return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (p = p.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), p = p.replace(/^'([^']*)'$/g, '"$1"'), `${a}:${p};`) : null;
2422
+ let h = o.slice(c + 1).trim();
2423
+ return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (h = h.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), h = h.replace(/^'([^']*)'$/g, '"$1"'), `${a}:${h};`) : null;
2417
2424
  }
2418
2425
  const t = e.indexOf("-[");
2419
2426
  if (t <= 0 || !e.endsWith("]")) return null;
@@ -2468,7 +2475,7 @@ function je(e) {
2468
2475
  const s = i[r] ?? r.replace(/_/g, "-");
2469
2476
  return s && n ? `${s}:${n};` : null;
2470
2477
  }
2471
- function Jt(e) {
2478
+ function Zt(e) {
2472
2479
  if (e.startsWith("[") && e.endsWith("]")) {
2473
2480
  const r = e.slice(1, -1);
2474
2481
  return r.includes("&") ? r : e;
@@ -2480,7 +2487,7 @@ function Jt(e) {
2480
2487
  }
2481
2488
  return null;
2482
2489
  }
2483
- function Zt(e) {
2490
+ function tt(e) {
2484
2491
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
2485
2492
  }
2486
2493
  function Gt(e) {
@@ -2492,31 +2499,31 @@ function Gt(e) {
2492
2499
  }
2493
2500
  return r;
2494
2501
  }
2495
- const ge = /* @__PURE__ */ new Map(), Xt = 16, et = 1e3;
2502
+ const me = /* @__PURE__ */ new Map(), Xt = 16, rt = 1e3;
2496
2503
  function Qt(e) {
2497
- const t = Date.now(), r = ge.get(e);
2504
+ const t = Date.now(), r = me.get(e);
2498
2505
  if (r && t - r.timestamp < Xt) return r.css;
2499
2506
  const n = Gt(e);
2500
2507
  if (!n.length) return "";
2501
- const i = new Set(n), s = [[], [], [], []], o = {}, c = (u, f = !1) => {
2502
- const y = f ? `dark|${u}` : u;
2503
- if (y in o) return o[y];
2504
- const x = b(u, f);
2505
- return o[y] = x, x;
2508
+ const i = new Set(n), s = [[], [], [], []], o = {}, c = (u, y = !1) => {
2509
+ const w = y ? `dark|${u}` : u;
2510
+ if (w in o) return o[w];
2511
+ const l = x(u, y);
2512
+ return o[w] = l, l;
2506
2513
  }, a = (u) => {
2507
- const f = u.some((l) => We.includes(l)), y = u.some(
2508
- (l) => l.startsWith("@") && (De.includes(l.slice(1)) || l.match(/^@\[.+\]$/))
2509
- ), x = u.includes("dark");
2510
- return u.length ? !f && !x && !y ? 1 : x && (f || y) ? 3 : 2 : 0;
2511
- }, p = (u) => {
2512
- const f = [];
2513
- let y = "", x = 0;
2514
- for (let l = 0; l < u.length; l++) {
2515
- const d = u[l];
2516
- d === "[" || d === "(" ? x++ : (d === "]" || d === ")") && x--, d === ":" && x === 0 ? (f.push(y), y = "") : y += d;
2514
+ const y = u.some((f) => De.includes(f)), w = u.some(
2515
+ (f) => f.startsWith("@") && (Ie.includes(f.slice(1)) || f.match(/^@\[.+\]$/))
2516
+ ), l = u.includes("dark");
2517
+ return u.length ? !y && !l && !w ? 1 : l && (y || w) ? 3 : 2 : 0;
2518
+ }, h = (u) => {
2519
+ const y = [];
2520
+ let w = "", l = 0;
2521
+ for (let f = 0; f < u.length; f++) {
2522
+ const b = u[f];
2523
+ b === "[" || b === "(" ? l++ : (b === "]" || b === ")") && l--, b === ":" && l === 0 ? (y.push(w), w = "") : w += b;
2517
2524
  }
2518
- return y && f.push(y), f;
2519
- }, h = {
2525
+ return w && y.push(w), y;
2526
+ }, p = {
2520
2527
  hover: ":hover",
2521
2528
  focus: ":focus",
2522
2529
  active: ":active",
@@ -2529,151 +2536,158 @@ function Qt(e) {
2529
2536
  even: ":nth-child(even)",
2530
2537
  "focus-within": ":focus-within",
2531
2538
  "focus-visible": ":focus-visible"
2532
- }, b = (u, f = !1) => {
2533
- const y = p(u);
2534
- let x = "", l = !1;
2535
- for (const _ of y) {
2536
- let L = _;
2537
- if (L.startsWith("!") && (l = !0, L = L.slice(1)), Me[L] || Ie(L) || He(L) || Ne(L) || je(L)) {
2538
- x = _;
2539
+ }, x = (u, y = !1) => {
2540
+ const w = h(u);
2541
+ let l = "", f = !1;
2542
+ for (const E of w) {
2543
+ let T = E;
2544
+ if (T.startsWith("!") && (f = !0, T = T.slice(1)), We[T] || Ne(T) || ze(T) || He(T) || Be(T) || Oe(T)) {
2545
+ l = E;
2539
2546
  break;
2540
2547
  }
2541
2548
  }
2542
- if (!x) return null;
2543
- const d = x.replace(/^!/, ""), w = Me[d] ?? Ie(d) ?? He(d) ?? Ne(d) ?? Ye(d) ?? je(d);
2544
- if (!w) return null;
2545
- const k = y.indexOf(x);
2546
- let C = k >= 0 ? y.slice(0, k) : [];
2547
- f && (C = C.filter((_) => _ !== "dark"));
2548
- const m = `.${Zt(u)}`, $ = l ? w.replace(/;/g, " !important;") : w, S = "__SUBJECT__";
2549
- let v = S;
2549
+ if (!l) return null;
2550
+ const b = l.replace(/^!/, ""), k = We[b] ?? Ne(b) ?? ze(b) ?? He(b) ?? Be(b) ?? Oe(b);
2551
+ if (!k) return null;
2552
+ const C = w.indexOf(l);
2553
+ let g = C >= 0 ? w.slice(0, C) : [];
2554
+ y && (g = g.filter((E) => E !== "dark"));
2555
+ const $ = `.${tt(u)}`, j = f ? k.replace(/;/g, " !important;") : k, v = "__SUBJECT__";
2556
+ let _ = v;
2550
2557
  const A = [];
2551
- for (const _ of C)
2552
- _.startsWith("group-") ? (v = `.group:${_.slice(6)} ${v}`, A.push(_)) : _.startsWith("peer-") && (v = v.replace(
2553
- S,
2554
- `.peer:${_.slice(5)}~${S}`
2555
- ), A.push(_));
2556
- C = C.filter((_) => !A.includes(_));
2557
- const j = [], N = [];
2558
- let E = null;
2559
- for (const _ of C) {
2560
- if (_ === "dark" || We.includes(_) || _.startsWith("@") && (De.includes(_.slice(1)) || _.match(/^@\[.+\]$/)))
2558
+ for (const E of g)
2559
+ E.startsWith("group-") ? (_ = `.group:${E.slice(6)} ${_}`, A.push(E)) : E.startsWith("peer-") && (_ = _.replace(
2560
+ v,
2561
+ `.peer:${E.slice(5)}~${v}`
2562
+ ), A.push(E));
2563
+ g = g.filter((E) => !A.includes(E));
2564
+ const D = [], S = [];
2565
+ let O = null;
2566
+ for (const E of g) {
2567
+ if (E === "dark" || De.includes(E) || E.startsWith("@") && (Ie.includes(E.slice(1)) || E.match(/^@\[.+\]$/)))
2561
2568
  continue;
2562
- const L = Jt(_);
2563
- if (L) {
2564
- E = L;
2569
+ const T = Zt(E);
2570
+ if (T) {
2571
+ O = T;
2565
2572
  continue;
2566
2573
  }
2567
- const M = h[_];
2568
- if (M) {
2569
- E ? N.push(M) : j.push(M);
2574
+ const R = p[E];
2575
+ if (R) {
2576
+ O ? S.push(R) : D.push(R);
2570
2577
  continue;
2571
2578
  }
2572
- const T = Bt[_];
2573
- typeof T == "function" && (v = T(v, $).split("{")[0]);
2579
+ const B = Ut[E];
2580
+ typeof B == "function" && (_ = B(_, j).split("{")[0]);
2574
2581
  }
2575
- const O = j.join(""), H = N.join("");
2576
- function he(_, L) {
2577
- if (!L) return _;
2578
- let M = 0, T = 0;
2579
- if (_.length && (_[0] === ">" || _[0] === "+" || _[0] === "~" || _[0] === " ")) {
2580
- let P = 1;
2581
- for (; P < _.length && _[P] === " "; ) P++;
2582
- for (; P < _.length; P++) {
2583
- const z = _[P];
2584
- if (z === "[" ? M++ : z === "]" && M > 0 ? M-- : z === "(" ? T++ : z === ")" && T > 0 && T--, M === 0 && T === 0 && (_[P] === ">" || _[P] === "+" || _[P] === "~" || _[P] === " "))
2585
- return _.slice(0, P) + L + _.slice(P);
2582
+ const H = D.join(""), te = S.join("");
2583
+ function $e(E, T) {
2584
+ if (!T) return E;
2585
+ let R = 0, B = 0;
2586
+ if (E.length && (E[0] === ">" || E[0] === "+" || E[0] === "~" || E[0] === " ")) {
2587
+ let L = 1;
2588
+ for (; L < E.length && E[L] === " "; ) L++;
2589
+ for (; L < E.length; L++) {
2590
+ const z = E[L];
2591
+ if (z === "[" ? R++ : z === "]" && R > 0 ? R-- : z === "(" ? B++ : z === ")" && B > 0 && B--, R === 0 && B === 0 && (E[L] === ">" || E[L] === "+" || E[L] === "~" || E[L] === " "))
2592
+ return E.slice(0, L) + T + E.slice(L);
2586
2593
  }
2587
- return _ + L;
2594
+ return E + T;
2588
2595
  }
2589
- for (let P = 0; P < _.length; P++) {
2590
- const z = _[P];
2591
- if (z === "[" ? M++ : z === "]" && M > 0 ? M-- : z === "(" ? T++ : z === ")" && T > 0 && T--, M === 0 && T === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
2592
- return _.slice(0, P) + L + _.slice(P);
2596
+ for (let L = 0; L < E.length; L++) {
2597
+ const z = E[L];
2598
+ if (z === "[" ? R++ : z === "]" && R > 0 ? R-- : z === "(" ? B++ : z === ")" && B > 0 && B--, R === 0 && B === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
2599
+ return E.slice(0, L) + T + E.slice(L);
2593
2600
  }
2594
- return _ + L;
2601
+ return E + T;
2595
2602
  }
2596
- if (E)
2597
- if (E.includes("&")) {
2598
- const _ = E.indexOf("&"), L = E.slice(0, _), M = E.slice(_ + 1), T = S + O;
2599
- if (j.length === 0)
2600
- v = v.replace(
2601
- S,
2602
- L + T + H + M
2603
+ if (O)
2604
+ if (O.includes("&")) {
2605
+ const E = O.indexOf("&"), T = O.slice(0, E), R = O.slice(E + 1), B = v + H;
2606
+ if (D.length === 0)
2607
+ _ = _.replace(
2608
+ v,
2609
+ T + B + te + R
2603
2610
  );
2604
2611
  else {
2605
- const P = he(M, H);
2606
- v = v.replace(
2607
- S,
2608
- L + T + P
2612
+ const L = $e(R, te);
2613
+ _ = _.replace(
2614
+ v,
2615
+ T + B + L
2609
2616
  );
2610
2617
  }
2611
2618
  } else
2612
- v = v.replace(
2613
- S,
2614
- `${E}${S + O}`
2615
- ), H && (v = v.replace(S, `${S}${H}`));
2619
+ _ = _.replace(
2620
+ v,
2621
+ `${O}${v + H}`
2622
+ ), te && (_ = _.replace(v, `${v}${te}`));
2616
2623
  else
2617
- v = v.replace(
2618
- S,
2619
- S + O + H
2624
+ _ = _.replace(
2625
+ v,
2626
+ v + H + te
2620
2627
  );
2621
- v = v.replace(new RegExp(S, "g"), m);
2622
- let G = `${v}{${$}}`;
2623
- const K = C.filter(
2624
- (_) => We.includes(_)
2625
- ), I = C.filter(
2626
- (_) => _.startsWith("@") && (De.includes(_.slice(1)) || _.match(/^@\[.+\]$/))
2627
- ), V = K.length ? K[K.length - 1] : null, U = I.length ? I[I.length - 1] : null, ne = C.includes("dark");
2628
- let R = "", X = "";
2629
- if (ne && V ? R = `@media (prefers-color-scheme: dark) and ${Xe[V]}` : ne ? R = "@media (prefers-color-scheme: dark)" : V && (R = `@media ${Xe[V]}`), U)
2630
- if (U.startsWith("@[") && U.endsWith("]")) {
2631
- const _ = U.slice(2, -1);
2632
- if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(_))
2628
+ _ = _.replace(new RegExp(v, "g"), $);
2629
+ let N = `${_}{${j}}`;
2630
+ const W = g.filter(
2631
+ (E) => De.includes(E)
2632
+ ), V = g.filter(
2633
+ (E) => E.startsWith("@") && (Ie.includes(E.slice(1)) || E.match(/^@\[.+\]$/))
2634
+ ), K = W.length ? W[W.length - 1] : null, G = V.length ? V[V.length - 1] : null, I = g.includes("dark");
2635
+ let X = "", re = "";
2636
+ if (I && K ? X = `@media (prefers-color-scheme: dark) and ${Ye[K]}` : I ? X = "@media (prefers-color-scheme: dark)" : K && (X = `@media ${Ye[K]}`), G)
2637
+ if (G.startsWith("@[") && G.endsWith("]")) {
2638
+ const E = G.slice(2, -1);
2639
+ if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(E))
2633
2640
  return null;
2634
- X = `@container (min-width:${_})`;
2641
+ re = `@container (min-width:${E})`;
2635
2642
  } else {
2636
- const _ = U.slice(1);
2637
- X = `@container ${Ut[_] || `(min-width:${_})`}`;
2643
+ const E = G.slice(1);
2644
+ re = `@container ${qt[E] || `(min-width:${E})`}`;
2638
2645
  }
2639
- return R && X ? G = `${R}${X}{${G}}` : R ? G = `${R}{${G}}` : X && (G = `${X}{${G}}`), G;
2646
+ return X && re ? N = `${X}${re}{${N}}` : X ? N = `${X}{${N}}` : re && (N = `${re}{${N}}`), N;
2640
2647
  };
2641
2648
  for (const u of i) {
2642
- const f = p(u), y = f.find(
2643
- (k) => Me[k.replace(/^!/, "")] || Ie(k.replace(/^!/, "")) || He(k.replace(/^!/, "")) || Ne(k.replace(/^!/, "")) || Ye(k.replace(/^!/, "")) || je(k.replace(/^!/, ""))
2649
+ const y = h(u), w = y.find(
2650
+ (C) => We[C.replace(/^!/, "")] || Ne(C.replace(/^!/, "")) || ze(C.replace(/^!/, "")) || He(C.replace(/^!/, "")) || Be(C.replace(/^!/, "")) || Oe(C.replace(/^!/, ""))
2644
2651
  );
2645
- if (!y) continue;
2646
- const x = f.indexOf(y), l = x >= 0 ? f.slice(0, x) : [], d = a(l), w = c(u);
2647
- w && s[d].push(w);
2648
- }
2649
- const g = s.flat().join("");
2650
- return ge.size >= et && Array.from(ge.keys()).slice(
2652
+ if (!w) continue;
2653
+ const l = y.indexOf(w), f = l >= 0 ? y.slice(0, l) : [], b = a(f), k = c(u);
2654
+ k && s[b].push(k);
2655
+ }
2656
+ const m = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
2657
+ for (const u of i)
2658
+ if (m.test(u)) {
2659
+ if (s.flat().join("").includes(`.${tt(u)}`)) continue;
2660
+ const w = c(u);
2661
+ w && s[0].push(w);
2662
+ }
2663
+ const d = s.flat().join("");
2664
+ return me.size >= rt && Array.from(me.keys()).slice(
2651
2665
  0,
2652
- Math.floor(et / 2)
2653
- ).forEach((f) => ge.delete(f)), ge.set(e, { css: g, timestamp: t }), g;
2666
+ Math.floor(rt / 2)
2667
+ ).forEach((y) => me.delete(y)), me.set(e, { css: d, timestamp: t }), d;
2654
2668
  }
2655
- const be = [];
2669
+ const we = [];
2656
2670
  function Yt(e, t, r, n, i, s, o, c) {
2657
2671
  if (e) {
2658
- be.push(r);
2672
+ we.push(r);
2659
2673
  try {
2660
2674
  const a = t.render(r);
2661
2675
  if (a instanceof Promise) {
2662
- s(!0), a.then((p) => {
2663
- s(!1), o(null), tt(e, p, r, n, i), c(e.innerHTML);
2664
- }).catch((p) => {
2665
- s(!1), o(p);
2676
+ s(!0), a.then((h) => {
2677
+ s(!1), o(null), nt(e, h, r, n, i), c(e.innerHTML);
2678
+ }).catch((h) => {
2679
+ s(!1), o(h);
2666
2680
  });
2667
2681
  return;
2668
2682
  }
2669
- tt(e, a, r, n, i), c(e.innerHTML);
2683
+ nt(e, a, r, n, i), c(e.innerHTML);
2670
2684
  } finally {
2671
- be.pop();
2685
+ we.pop();
2672
2686
  }
2673
2687
  }
2674
2688
  }
2675
- function tt(e, t, r, n, i) {
2676
- e && (Mt(
2689
+ function nt(e, t, r, n, i) {
2690
+ e && (Wt(
2677
2691
  e,
2678
2692
  Array.isArray(t) ? t : [t],
2679
2693
  r,
@@ -2702,41 +2716,41 @@ Stopping runaway component render to prevent browser freeze`
2702
2716
  }
2703
2717
  } else
2704
2718
  i(0);
2705
- const p = setTimeout(() => {
2719
+ const h = setTimeout(() => {
2706
2720
  n(Date.now()), e(), o(null);
2707
2721
  }, r > 10 ? 100 : 0);
2708
- o(p);
2722
+ o(h);
2709
2723
  }
2710
2724
  function tr(e, t, r, n, i) {
2711
2725
  if (!e) return;
2712
2726
  const s = Qt(r);
2713
2727
  if ((!s || s.trim() === "") && !t._computedStyle) {
2714
- i(null), e.adoptedStyleSheets = [Ze()];
2728
+ i(null), e.adoptedStyleSheets = [Xe()];
2715
2729
  return;
2716
2730
  }
2717
2731
  let o = "";
2718
2732
  t._computedStyle && (o = t._computedStyle);
2719
- let c = Dt(`${o}
2733
+ let c = It(`${o}
2720
2734
  ${s}
2721
2735
  `);
2722
- c = ft(c);
2736
+ c = pt(c);
2723
2737
  let a = n;
2724
- a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [Ze(), a], i(a);
2738
+ a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [Xe(), a], i(a);
2725
2739
  }
2726
- let D = null;
2740
+ let P = null;
2727
2741
  function rr(e) {
2728
- D = e;
2742
+ P = e;
2729
2743
  }
2730
2744
  function nr() {
2731
- D = null;
2745
+ P = null;
2732
2746
  }
2733
2747
  function br() {
2734
- if (!D)
2748
+ if (!P)
2735
2749
  throw new Error("useEmit must be called during component render");
2736
- const e = D.emit;
2750
+ const e = P.emit;
2737
2751
  return (t, r) => e(t, r);
2738
2752
  }
2739
- function xe(e) {
2753
+ function he(e) {
2740
2754
  e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
2741
2755
  value: {},
2742
2756
  writable: !0,
@@ -2745,39 +2759,58 @@ function xe(e) {
2745
2759
  });
2746
2760
  }
2747
2761
  function wr(e) {
2748
- if (!D)
2762
+ if (!P)
2749
2763
  throw new Error("useOnConnected must be called during component render");
2750
- xe(D), D._hookCallbacks.onConnected = e;
2764
+ he(P), P._hookCallbacks.onConnected = e;
2751
2765
  }
2752
2766
  function xr(e) {
2753
- if (!D)
2767
+ if (!P)
2754
2768
  throw new Error("useOnDisconnected must be called during component render");
2755
- xe(D), D._hookCallbacks.onDisconnected = e;
2769
+ he(P), P._hookCallbacks.onDisconnected = e;
2756
2770
  }
2757
2771
  function vr(e) {
2758
- if (!D)
2772
+ if (!P)
2759
2773
  throw new Error("useOnAttributeChanged must be called during component render");
2760
- xe(D), D._hookCallbacks.onAttributeChanged = e;
2774
+ he(P), P._hookCallbacks.onAttributeChanged = e;
2761
2775
  }
2762
2776
  function $r(e) {
2763
- if (!D)
2777
+ if (!P)
2764
2778
  throw new Error("useOnError must be called during component render");
2765
- xe(D), D._hookCallbacks.onError = e;
2779
+ he(P), P._hookCallbacks.onError = e;
2766
2780
  }
2767
2781
  function kr(e) {
2768
- if (!D)
2782
+ if (!P)
2783
+ throw new Error("useProps must be called during component render");
2784
+ he(P), P._hookCallbacks.props = {
2785
+ ...P._hookCallbacks.props || {},
2786
+ ...e
2787
+ };
2788
+ const t = P, r = {};
2789
+ return Object.keys(e).forEach((n) => {
2790
+ Object.defineProperty(r, n, {
2791
+ enumerable: !0,
2792
+ configurable: !0,
2793
+ get() {
2794
+ const i = t[n];
2795
+ return i != null && i !== "" ? i : e[n];
2796
+ }
2797
+ });
2798
+ }), r;
2799
+ }
2800
+ function Cr(e) {
2801
+ if (!P)
2769
2802
  throw new Error("useStyle must be called during component render");
2770
- xe(D);
2803
+ he(P);
2771
2804
  try {
2772
2805
  const t = e();
2773
- Object.defineProperty(D, "_computedStyle", {
2806
+ Object.defineProperty(P, "_computedStyle", {
2774
2807
  value: t,
2775
2808
  writable: !0,
2776
2809
  enumerable: !1,
2777
2810
  configurable: !0
2778
2811
  });
2779
2812
  } catch (t) {
2780
- console.warn("Error in useStyle callback:", t), Object.defineProperty(D, "_computedStyle", {
2813
+ console.warn("Error in useStyle callback:", t), Object.defineProperty(P, "_computedStyle", {
2781
2814
  value: "",
2782
2815
  writable: !0,
2783
2816
  enumerable: !1,
@@ -2785,10 +2818,10 @@ function kr(e) {
2785
2818
  });
2786
2819
  }
2787
2820
  }
2788
- const Te = /* @__PURE__ */ new Map(), rt = Symbol.for("cer.registry");
2821
+ const Re = /* @__PURE__ */ new Map(), it = Symbol.for("cer.registry");
2789
2822
  if (typeof window < "u") {
2790
2823
  const e = globalThis;
2791
- e[rt] || (e[rt] = Te);
2824
+ e[it] || (e[it] = Re);
2792
2825
  }
2793
2826
  function ir(e, t) {
2794
2827
  if (!t.render)
@@ -2833,7 +2866,7 @@ function ir(e, t) {
2833
2866
  _templateLoading = !1;
2834
2867
  _templateError = null;
2835
2868
  constructor() {
2836
- super(), this.attachShadow({ mode: "open" }), this._cfg = Te.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
2869
+ super(), this.attachShadow({ mode: "open" }), this._cfg = Re.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
2837
2870
  const r = this._initContext(t);
2838
2871
  Object.defineProperty(r, "refs", {
2839
2872
  value: this._refs,
@@ -2874,7 +2907,7 @@ function ir(e, t) {
2874
2907
  enumerable: !1,
2875
2908
  configurable: !1
2876
2909
  });
2877
- const n = Te.get(e) || t;
2910
+ const n = Re.get(e) || t;
2878
2911
  Object.keys(n).forEach((i) => {
2879
2912
  const s = n[i];
2880
2913
  typeof s == "function" && (this.context[i] = (...o) => s(...o, this.context));
@@ -2895,14 +2928,14 @@ function ir(e, t) {
2895
2928
  }
2896
2929
  connectedCallback() {
2897
2930
  this._runLogicWithinErrorBoundary(t, () => {
2898
- this._applyProps(t), this._requestRender(), Ct(t, this.context, this._mounted, (r) => {
2931
+ this._applyProps(t), this._requestRender(), _t(t, this.context, this._mounted, (r) => {
2899
2932
  this._mounted = r;
2900
2933
  });
2901
2934
  });
2902
2935
  }
2903
2936
  disconnectedCallback() {
2904
2937
  this._runLogicWithinErrorBoundary(t, () => {
2905
- _t(
2938
+ Et(
2906
2939
  t,
2907
2940
  this.context,
2908
2941
  this._listeners,
@@ -2926,11 +2959,11 @@ function ir(e, t) {
2926
2959
  }
2927
2960
  attributeChangedCallback(r, n, i) {
2928
2961
  this._runLogicWithinErrorBoundary(t, () => {
2929
- this._applyProps(t), n !== i && this._requestRender(), Et(t, r, n, i, this.context);
2962
+ this._applyProps(t), n !== i && this._requestRender(), St(t, r, n, i, this.context);
2930
2963
  });
2931
2964
  }
2932
2965
  static get observedAttributes() {
2933
- return t.props ? Object.keys(t.props).map(re) : [];
2966
+ return t.props ? Object.keys(t.props).map(ie) : [];
2934
2967
  }
2935
2968
  _applyComputed(r) {
2936
2969
  }
@@ -2960,7 +2993,7 @@ function ir(e, t) {
2960
2993
  }
2961
2994
  _requestRender() {
2962
2995
  this._runLogicWithinErrorBoundary(this._cfg, () => {
2963
- fe(() => {
2996
+ de(() => {
2964
2997
  er(
2965
2998
  () => this._render(this._cfg),
2966
2999
  this._lastRenderTime,
@@ -3007,9 +3040,9 @@ function ir(e, t) {
3007
3040
  try {
3008
3041
  let n = function(s, o = "") {
3009
3042
  return Array.isArray(s) ? new Proxy(s, {
3010
- get(c, a, p) {
3011
- const h = Reflect.get(c, a, p);
3012
- return typeof h == "function" && typeof a == "string" && [
3043
+ get(c, a, h) {
3044
+ const p = Reflect.get(c, a, h);
3045
+ return typeof p == "function" && typeof a == "string" && [
3013
3046
  "push",
3014
3047
  "pop",
3015
3048
  "shift",
@@ -3017,29 +3050,29 @@ function ir(e, t) {
3017
3050
  "splice",
3018
3051
  "sort",
3019
3052
  "reverse"
3020
- ].includes(a) ? function(...g) {
3021
- const u = h.apply(c, g);
3053
+ ].includes(a) ? function(...m) {
3054
+ const d = p.apply(c, m);
3022
3055
  if (!i._initializing) {
3023
- const f = o || "root";
3024
- i._triggerWatchers(f, c), fe(
3056
+ const u = o || "root";
3057
+ i._triggerWatchers(u, c), de(
3025
3058
  () => i._render(r),
3026
3059
  i._componentId
3027
3060
  );
3028
3061
  }
3029
- return u;
3030
- } : h;
3062
+ return d;
3063
+ } : p;
3031
3064
  },
3032
- set(c, a, p) {
3033
- if (c[a] = p, !i._initializing) {
3034
- const h = o ? `${o}.${String(a)}` : String(a);
3035
- i._triggerWatchers(h, p), fe(() => i._render(r), i._componentId);
3065
+ set(c, a, h) {
3066
+ if (c[a] = h, !i._initializing) {
3067
+ const p = o ? `${o}.${String(a)}` : String(a);
3068
+ i._triggerWatchers(p, h), de(() => i._render(r), i._componentId);
3036
3069
  }
3037
3070
  return !0;
3038
3071
  },
3039
3072
  deleteProperty(c, a) {
3040
3073
  if (delete c[a], !i._initializing) {
3041
- const p = o ? `${o}.${String(a)}` : String(a);
3042
- i._triggerWatchers(p, void 0), fe(() => i._render(r), i._componentId);
3074
+ const h = o ? `${o}.${String(a)}` : String(a);
3075
+ i._triggerWatchers(h, void 0), de(() => i._render(r), i._componentId);
3043
3076
  }
3044
3077
  return !0;
3045
3078
  }
@@ -3047,12 +3080,12 @@ function ir(e, t) {
3047
3080
  const a = o ? `${o}.${c}` : c;
3048
3081
  s[c] = n(s[c], a);
3049
3082
  }), new Proxy(s, {
3050
- set(c, a, p) {
3051
- const h = o ? `${o}.${String(a)}` : String(a);
3052
- return c[a] = n(p, h), i._initializing || (i._triggerWatchers(h, c[a]), fe(() => i._render(r), i._componentId)), !0;
3083
+ set(c, a, h) {
3084
+ const p = o ? `${o}.${String(a)}` : String(a);
3085
+ return c[a] = n(h, p), i._initializing || (i._triggerWatchers(p, c[a]), de(() => i._render(r), i._componentId)), !0;
3053
3086
  },
3054
- get(c, a, p) {
3055
- return Reflect.get(c, a, p);
3087
+ get(c, a, h) {
3088
+ return Reflect.get(c, a, h);
3056
3089
  }
3057
3090
  })) : s;
3058
3091
  };
@@ -3073,7 +3106,7 @@ function ir(e, t) {
3073
3106
  }
3074
3107
  _initWatchers(r) {
3075
3108
  this._runLogicWithinErrorBoundary(r, () => {
3076
- xt(
3109
+ vt(
3077
3110
  this.context,
3078
3111
  this._watchers,
3079
3112
  {}
@@ -3082,12 +3115,12 @@ function ir(e, t) {
3082
3115
  });
3083
3116
  }
3084
3117
  _triggerWatchers(r, n) {
3085
- vt(this.context, this._watchers, r, n);
3118
+ $t(this.context, this._watchers, r, n);
3086
3119
  }
3087
3120
  _applyProps(r) {
3088
3121
  this._runLogicWithinErrorBoundary(r, () => {
3089
3122
  try {
3090
- kt(this, r, this.context);
3123
+ Ct(this, r, this.context);
3091
3124
  } catch (n) {
3092
3125
  this._hasError = !0, r.onError && r.onError(n, this.context);
3093
3126
  }
@@ -3095,8 +3128,8 @@ function ir(e, t) {
3095
3128
  }
3096
3129
  };
3097
3130
  }
3098
- function nt(e, t) {
3099
- let r = re(e);
3131
+ function st(e, t) {
3132
+ let r = ie(e);
3100
3133
  r.includes("-") || (r = `cer-${r}`);
3101
3134
  let n = {};
3102
3135
  if (typeof window < "u")
@@ -3105,150 +3138,150 @@ function nt(e, t) {
3105
3138
  let c = null;
3106
3139
  const a = o.indexOf("({");
3107
3140
  if (a !== -1) {
3108
- let p = 0, h = !1, b = null, g = !1, u = -1;
3109
- for (let f = a + 2; f < o.length; f++) {
3110
- const y = o[f];
3111
- if (g) {
3112
- g = !1;
3141
+ let h = 0, p = !1, x = null, m = !1, d = -1;
3142
+ for (let u = a + 2; u < o.length; u++) {
3143
+ const y = o[u];
3144
+ if (m) {
3145
+ m = !1;
3113
3146
  continue;
3114
3147
  }
3115
3148
  if (y === "\\") {
3116
- g = !0;
3149
+ m = !0;
3117
3150
  continue;
3118
3151
  }
3119
- if (!h && (y === '"' || y === "'" || y === "`")) {
3120
- h = !0, b = y;
3152
+ if (!p && (y === '"' || y === "'" || y === "`")) {
3153
+ p = !0, x = y;
3121
3154
  continue;
3122
3155
  }
3123
- if (h && y === b) {
3124
- h = !1, b = null;
3156
+ if (p && y === x) {
3157
+ p = !1, x = null;
3125
3158
  continue;
3126
3159
  }
3127
- if (!h) {
3160
+ if (!p) {
3128
3161
  if (y === "{")
3129
- p++;
3162
+ h++;
3130
3163
  else if (y === "}") {
3131
- if (p === 0) {
3132
- u = f;
3164
+ if (h === 0) {
3165
+ d = u;
3133
3166
  break;
3134
3167
  }
3135
- p--;
3168
+ h--;
3136
3169
  }
3137
3170
  }
3138
3171
  }
3139
- if (u !== -1) {
3140
- const f = o.substring(a, u + 2), y = o.substring(a + 2, u).trim();
3141
- c = [f, y];
3172
+ if (d !== -1) {
3173
+ const u = o.substring(a, d + 2), y = o.substring(a + 2, d).trim();
3174
+ c = [u, y];
3142
3175
  }
3143
3176
  }
3144
3177
  if (c) {
3145
- const p = c[1];
3146
- let h = "", b = "", g = !0, u = 0, f = null, y = !1, x = 0;
3147
- for (; x < p.length; ) {
3148
- const l = p[x];
3178
+ const h = c[1];
3179
+ let p = "", x = "", m = !0, d = 0, u = null, y = !1, w = 0;
3180
+ for (; w < h.length; ) {
3181
+ const l = h[w];
3149
3182
  if (y) {
3150
- g ? h += l : b += l, y = !1, x++;
3183
+ m ? p += l : x += l, y = !1, w++;
3151
3184
  continue;
3152
3185
  }
3153
3186
  if (l === "\\") {
3154
- y = !0, g ? h += l : b += l, x++;
3187
+ y = !0, m ? p += l : x += l, w++;
3155
3188
  continue;
3156
3189
  }
3157
- if ((l === '"' || l === "'" || l === "`") && !f) {
3158
- f = l, g ? h += l : b += l, x++;
3190
+ if ((l === '"' || l === "'" || l === "`") && !u) {
3191
+ u = l, m ? p += l : x += l, w++;
3159
3192
  continue;
3160
3193
  }
3161
- if (l === f) {
3162
- f = null, g ? h += l : b += l, x++;
3194
+ if (l === u) {
3195
+ u = null, m ? p += l : x += l, w++;
3163
3196
  continue;
3164
3197
  }
3165
- if (f) {
3166
- g ? h += l : b += l, x++;
3198
+ if (u) {
3199
+ m ? p += l : x += l, w++;
3167
3200
  continue;
3168
3201
  }
3169
3202
  if (l === "{" || l === "[") {
3170
- u++, g ? h += l : b += l, x++;
3203
+ d++, m ? p += l : x += l, w++;
3171
3204
  continue;
3172
3205
  }
3173
3206
  if (l === "}" || l === "]") {
3174
- u--, g ? h += l : b += l, x++;
3207
+ d--, m ? p += l : x += l, w++;
3175
3208
  continue;
3176
3209
  }
3177
- if (l === "=" && u === 0 && g) {
3178
- g = !1, x++;
3210
+ if (l === "=" && d === 0 && m) {
3211
+ m = !1, w++;
3179
3212
  continue;
3180
3213
  }
3181
- if (l === "," && u === 0) {
3182
- if (h.trim() && b.trim()) {
3183
- const d = h.trim(), w = b.trim();
3214
+ if (l === "," && d === 0) {
3215
+ if (p.trim() && x.trim()) {
3216
+ const f = p.trim(), b = x.trim();
3184
3217
  try {
3185
- if (w === "true") n[d] = !0;
3186
- else if (w === "false") n[d] = !1;
3187
- else if (w === "[]") n[d] = [];
3188
- else if (w === "{}") n[d] = {};
3189
- else if (/^\d+$/.test(w))
3190
- n[d] = parseInt(w);
3191
- else if (/^'.*'$/s.test(w))
3192
- n[d] = w.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3193
- else if (/^".*"$/s.test(w))
3194
- n[d] = w.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3195
- else if (/^`.*`$/s.test(w)) {
3196
- const k = w.slice(1, -1);
3218
+ if (b === "true") n[f] = !0;
3219
+ else if (b === "false") n[f] = !1;
3220
+ else if (b === "[]") n[f] = [];
3221
+ else if (b === "{}") n[f] = {};
3222
+ else if (/^\d+$/.test(b))
3223
+ n[f] = parseInt(b);
3224
+ else if (/^'.*'$/s.test(b))
3225
+ n[f] = b.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3226
+ else if (/^".*"$/s.test(b))
3227
+ n[f] = b.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3228
+ else if (/^`.*`$/s.test(b)) {
3229
+ const k = b.slice(1, -1);
3197
3230
  if (k.includes("${"))
3198
3231
  try {
3199
- n[d] = new Function(
3232
+ n[f] = new Function(
3200
3233
  `return \`${k}\`;`
3201
3234
  )();
3202
3235
  } catch {
3203
- n[d] = k;
3236
+ n[f] = k;
3204
3237
  }
3205
3238
  else
3206
- n[d] = k;
3239
+ n[f] = k;
3207
3240
  } else
3208
- n[d] = w;
3241
+ n[f] = b;
3209
3242
  } catch {
3210
- n[d] = "";
3243
+ n[f] = "";
3211
3244
  }
3212
- } else if (h.trim()) {
3213
- const d = h.split(":")[0].trim();
3214
- d && !d.includes("}") && (n[d] = "");
3245
+ } else if (p.trim()) {
3246
+ const f = p.split(":")[0].trim();
3247
+ f && !f.includes("}") && (n[f] = "");
3215
3248
  }
3216
- h = "", b = "", g = !0, x++;
3249
+ p = "", x = "", m = !0, w++;
3217
3250
  continue;
3218
3251
  }
3219
- g ? h += l : b += l, x++;
3252
+ m ? p += l : x += l, w++;
3220
3253
  }
3221
- if (h.trim() && b.trim()) {
3222
- const l = h.trim(), d = b.trim();
3254
+ if (p.trim() && x.trim()) {
3255
+ const l = p.trim(), f = x.trim();
3223
3256
  try {
3224
- if (d === "true") n[l] = !0;
3225
- else if (d === "false") n[l] = !1;
3226
- else if (d === "[]") n[l] = [];
3227
- else if (d === "{}") n[l] = {};
3228
- else if (/^\d+$/.test(d)) n[l] = parseInt(d);
3229
- else if (/^'.*'$/s.test(d))
3230
- n[l] = d.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3231
- else if (/^".*"$/s.test(d))
3232
- n[l] = d.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3233
- else if (/^`.*`$/s.test(d)) {
3234
- const w = d.slice(1, -1);
3235
- if (w.includes("${"))
3257
+ if (f === "true") n[l] = !0;
3258
+ else if (f === "false") n[l] = !1;
3259
+ else if (f === "[]") n[l] = [];
3260
+ else if (f === "{}") n[l] = {};
3261
+ else if (/^\d+$/.test(f)) n[l] = parseInt(f);
3262
+ else if (/^'.*'$/s.test(f))
3263
+ n[l] = f.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3264
+ else if (/^".*"$/s.test(f))
3265
+ n[l] = f.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3266
+ else if (/^`.*`$/s.test(f)) {
3267
+ const b = f.slice(1, -1);
3268
+ if (b.includes("${"))
3236
3269
  try {
3237
3270
  n[l] = new Function(
3238
- `return \`${w}\`;`
3271
+ `return \`${b}\`;`
3239
3272
  )();
3240
3273
  } catch {
3241
- n[l] = w;
3274
+ n[l] = b;
3242
3275
  }
3243
3276
  else
3244
- n[l] = w;
3277
+ n[l] = b;
3245
3278
  } else
3246
- n[l] = d;
3279
+ n[l] = f;
3247
3280
  } catch {
3248
3281
  n[l] = "";
3249
3282
  }
3250
- } else if (h.trim()) {
3251
- const l = h.split(":")[0].trim();
3283
+ } else if (p.trim()) {
3284
+ const l = p.split(":")[0].trim();
3252
3285
  l && !l.includes("}") && (n[l] = "");
3253
3286
  }
3254
3287
  }
@@ -3267,7 +3300,7 @@ function nt(e, t) {
3267
3300
  onDisconnected: (o) => {
3268
3301
  i.onDisconnected && i.onDisconnected();
3269
3302
  },
3270
- onAttributeChanged: (o, c, a, p) => {
3303
+ onAttributeChanged: (o, c, a, h) => {
3271
3304
  i.onAttributeChanged && i.onAttributeChanged(o, c, a);
3272
3305
  },
3273
3306
  onError: (o, c) => {
@@ -3281,26 +3314,26 @@ function nt(e, t) {
3281
3314
  try {
3282
3315
  rr(o);
3283
3316
  const a = Object.keys(n).length > 0;
3284
- let p;
3317
+ let h;
3285
3318
  if (a) {
3286
- const h = {};
3287
- Object.keys(n).forEach((b) => {
3288
- const g = o[b], u = n[b];
3289
- h[b] = g != null && g !== "" ? g : u;
3290
- }), p = t(h);
3319
+ const p = {};
3320
+ Object.keys(n).forEach((x) => {
3321
+ const m = o[x], d = n[x];
3322
+ p[x] = m != null && m !== "" ? m : d;
3323
+ }), h = t(p);
3291
3324
  } else
3292
- p = t();
3325
+ h = t();
3293
3326
  if (o._hookCallbacks) {
3294
- const h = o._hookCallbacks;
3295
- h.onConnected && (i.onConnected = h.onConnected), h.onDisconnected && (i.onDisconnected = h.onDisconnected), h.onAttributeChanged && (i.onAttributeChanged = h.onAttributeChanged), h.onError && (i.onError = h.onError), h.style && (o._styleCallback = h.style);
3327
+ const p = o._hookCallbacks;
3328
+ p.onConnected && (i.onConnected = p.onConnected), p.onDisconnected && (i.onDisconnected = p.onDisconnected), p.onAttributeChanged && (i.onAttributeChanged = p.onAttributeChanged), p.onError && (i.onError = p.onError), p.style && (o._styleCallback = p.style);
3296
3329
  }
3297
- return p;
3330
+ return h;
3298
3331
  } finally {
3299
3332
  nr(), F.clearCurrentComponent();
3300
3333
  }
3301
3334
  }
3302
3335
  };
3303
- Te.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(
3336
+ Re.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(
3304
3337
  r,
3305
3338
  ir(r, s)
3306
3339
  ));
@@ -3329,7 +3362,7 @@ class sr {
3329
3362
  this.map.clear();
3330
3363
  }
3331
3364
  }
3332
- const ze = new sr(500);
3365
+ const Ue = new sr(500);
3333
3366
  function or(e, t) {
3334
3367
  if (e == null) {
3335
3368
  console.warn(
@@ -3343,15 +3376,15 @@ function or(e, t) {
3343
3376
  `💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`
3344
3377
  );
3345
3378
  }
3346
- function me(e, t = {}, r, n) {
3379
+ function ye(e, t = {}, r, n) {
3347
3380
  const i = n ?? t.key;
3348
3381
  return { tag: e, key: i, props: t, children: r };
3349
3382
  }
3350
- function Oe(e) {
3383
+ function Te(e) {
3351
3384
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
3352
3385
  }
3353
- function Ee(e) {
3354
- return typeof e == "object" && e !== null && "tag" in e && !Oe(e);
3386
+ function Se(e) {
3387
+ return typeof e == "object" && e !== null && "tag" in e && !Te(e);
3355
3388
  }
3356
3389
  function ar(e, t) {
3357
3390
  return e.key != null ? e : { ...e, key: t };
@@ -3360,98 +3393,98 @@ function cr(e, t = [], r = {}) {
3360
3393
  const n = {}, i = {}, s = {}, o = [], c = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
3361
3394
  let a;
3362
3395
  for (; a = c.exec(e); ) {
3363
- const p = a[1], h = a[2], b = (a[4] || a[6]) ?? "", g = b.match(/^{{(\d+)}}$/);
3364
- let u = g ? t[Number(g[1])] ?? null : b;
3365
- g || (u === "true" ? u = !0 : u === "false" ? u = !1 : u === "null" ? u = null : isNaN(Number(u)) || (u = Number(u)));
3366
- const f = ["model", "bind", "show", "class", "style", "ref"];
3367
- if (p === ":") {
3368
- const [y, x] = h.split(":"), [l, ...d] = y.split(".");
3369
- if (f.includes(l)) {
3370
- const w = [...d], k = l === "model" && x ? `model:${x}` : l;
3396
+ const h = a[1], p = a[2], x = (a[4] || a[6]) ?? "", m = x.match(/^{{(\d+)}}$/);
3397
+ let d = m ? t[Number(m[1])] ?? null : x;
3398
+ m || (d === "true" ? d = !0 : d === "false" ? d = !1 : d === "null" ? d = null : isNaN(Number(d)) || (d = Number(d)));
3399
+ const u = ["model", "bind", "show", "class", "style", "ref"];
3400
+ if (h === ":") {
3401
+ const [y, w] = p.split(":"), [l, ...f] = y.split(".");
3402
+ if (u.includes(l)) {
3403
+ const b = [...f], k = l === "model" && w ? `model:${w}` : l;
3371
3404
  s[k] = {
3372
- value: u,
3373
- modifiers: w,
3374
- arg: x
3405
+ value: d,
3406
+ modifiers: b,
3407
+ arg: w
3375
3408
  };
3376
3409
  } else {
3377
- let w = u;
3378
- w && ee(w) && (w = w.value), i[h] = w, o.push(h);
3410
+ let b = d;
3411
+ b && ee(b) && (b = b.value), i[p] = b, o.push(p);
3379
3412
  }
3380
- } else if (p === "@") {
3381
- const [y, ...x] = h.split("."), l = x;
3382
- or(u, y);
3383
- const d = typeof u == "function" ? u : typeof r[u] == "function" ? r[u] : void 0;
3384
- if (d) {
3385
- const w = (C) => {
3413
+ } else if (h === "@") {
3414
+ const [y, ...w] = p.split("."), l = w;
3415
+ or(d, y);
3416
+ const f = typeof d == "function" ? d : typeof r[d] == "function" ? r[d] : void 0;
3417
+ if (f) {
3418
+ const b = (C) => {
3386
3419
  if (l.includes("prevent") && C.preventDefault(), l.includes("stop") && C.stopPropagation(), !(l.includes("self") && C.target !== C.currentTarget))
3387
- return l.includes("once") && C.currentTarget?.removeEventListener(y, w), d(C);
3420
+ return l.includes("once") && C.currentTarget?.removeEventListener(y, b), f(C);
3388
3421
  }, k = "on" + y.charAt(0).toUpperCase() + y.slice(1);
3389
- n[k] = w;
3422
+ n[k] = b;
3390
3423
  }
3391
- } else h === "ref" ? n.ref = u : i[h] = u;
3424
+ } else p === "ref" ? n.ref = d : i[p] = d;
3392
3425
  }
3393
3426
  return { props: n, attrs: i, directives: s, bound: o };
3394
3427
  }
3395
3428
  function lr(e, t, r) {
3396
- const n = be.length > 0 ? be[be.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3429
+ const n = we.length > 0 ? we[we.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3397
3430
  if (s && o) {
3398
- const m = ze.get(o);
3399
- if (m) return m;
3431
+ const g = Ue.get(o);
3432
+ if (g) return g;
3400
3433
  }
3401
- function c(m, $) {
3402
- return me("#text", {}, m, $);
3434
+ function c(g, $) {
3435
+ return ye("#text", {}, g, $);
3403
3436
  }
3404
3437
  let a = "";
3405
- for (let m = 0; m < e.length; m++)
3406
- a += e[m], m < t.length && (a += `{{${m}}}`);
3407
- const p = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, h = [];
3408
- let b, g = [], u = null, f = {}, y, x = 0, l = [];
3409
- function d(m) {
3410
- !m || typeof m != "object" || Oe(m) || (m.props || m.attrs ? (m.props && (f.props || (f.props = {}), Object.assign(f.props, m.props)), m.attrs && (f.attrs || (f.attrs = {}), Object.keys(m.attrs).forEach(($) => {
3411
- if ($ === "style" && f.attrs.style) {
3412
- const S = f.attrs.style.replace(
3438
+ for (let g = 0; g < e.length; g++)
3439
+ a += e[g], g < t.length && (a += `{{${g}}}`);
3440
+ const h = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, p = [];
3441
+ let x, m = [], d = null, u = {}, y, w = 0, l = [];
3442
+ function f(g) {
3443
+ !g || typeof g != "object" || Te(g) || (g.props || g.attrs ? (g.props && (u.props || (u.props = {}), Object.assign(u.props, g.props)), g.attrs && (u.attrs || (u.attrs = {}), Object.keys(g.attrs).forEach(($) => {
3444
+ if ($ === "style" && u.attrs.style) {
3445
+ const j = u.attrs.style.replace(
3413
3446
  /;?\s*$/,
3414
3447
  ""
3415
- ), v = m.attrs.style.replace(/^;?\s*/, "");
3416
- f.attrs.style = S + "; " + v;
3417
- } else if ($ === "class" && f.attrs.class) {
3418
- const S = f.attrs.class.trim().split(/\s+/).filter(Boolean), v = m.attrs.class.trim().split(/\s+/).filter(Boolean), A = [
3419
- .../* @__PURE__ */ new Set([...S, ...v])
3448
+ ), v = g.attrs.style.replace(/^;?\s*/, "");
3449
+ u.attrs.style = j + "; " + v;
3450
+ } else if ($ === "class" && u.attrs.class) {
3451
+ const j = u.attrs.class.trim().split(/\s+/).filter(Boolean), v = g.attrs.class.trim().split(/\s+/).filter(Boolean), _ = [
3452
+ .../* @__PURE__ */ new Set([...j, ...v])
3420
3453
  ];
3421
- f.attrs.class = A.join(" ");
3454
+ u.attrs.class = _.join(" ");
3422
3455
  } else
3423
- f.attrs[$] = m.attrs[$];
3424
- }))) : (f.props || (f.props = {}), Object.assign(f.props, m)));
3425
- }
3426
- function w(m, $) {
3427
- const S = u ? g : l;
3428
- if (Oe(m)) {
3429
- const v = m.key ?? $;
3430
- let A = m.children;
3431
- S.push({
3432
- ...m,
3456
+ u.attrs[$] = g.attrs[$];
3457
+ }))) : (u.props || (u.props = {}), Object.assign(u.props, g)));
3458
+ }
3459
+ function b(g, $) {
3460
+ const j = d ? m : l;
3461
+ if (Te(g)) {
3462
+ const v = g.key ?? $;
3463
+ let _ = g.children;
3464
+ j.push({
3465
+ ...g,
3433
3466
  key: v,
3434
- children: A
3467
+ children: _
3435
3468
  });
3436
3469
  return;
3437
3470
  }
3438
- if (Ee(m)) {
3439
- S.push(ar(m, void 0));
3471
+ if (Se(g)) {
3472
+ j.push(ar(g, void 0));
3440
3473
  return;
3441
3474
  }
3442
- if (Array.isArray(m)) {
3443
- if (m.length === 0) return;
3444
- for (let v = 0; v < m.length; v++) {
3445
- const A = m[v];
3446
- Oe(A) || Ee(A) || Array.isArray(A) ? w(A, `${$}-${v}`) : A !== null && typeof A == "object" ? d(A) : S.push(c(String(A), `${$}-${v}`));
3475
+ if (Array.isArray(g)) {
3476
+ if (g.length === 0) return;
3477
+ for (let v = 0; v < g.length; v++) {
3478
+ const _ = g[v];
3479
+ Te(_) || Se(_) || Array.isArray(_) ? b(_, `${$}-${v}`) : _ !== null && typeof _ == "object" ? f(_) : j.push(c(String(_), `${$}-${v}`));
3447
3480
  }
3448
3481
  return;
3449
3482
  }
3450
- if (m !== null && typeof m == "object") {
3451
- d(m);
3483
+ if (g !== null && typeof g == "object") {
3484
+ f(g);
3452
3485
  return;
3453
3486
  }
3454
- S.push(c(String(m), $));
3487
+ j.push(c(String(g), $));
3455
3488
  }
3456
3489
  const k = /* @__PURE__ */ new Set([
3457
3490
  "area",
@@ -3469,20 +3502,20 @@ function lr(e, t, r) {
3469
3502
  "track",
3470
3503
  "wbr"
3471
3504
  ]);
3472
- for (; b = p.exec(a); )
3473
- if (!(b[0].startsWith("<!--") && b[0].endsWith("-->"))) {
3474
- if (b[1]) {
3475
- const m = b[1], $ = b[0][1] === "/", S = b[0][b[0].length - 2] === "/" || k.has(m), {
3505
+ for (; x = h.exec(a); )
3506
+ if (!(x[0].startsWith("<!--") && x[0].endsWith("-->"))) {
3507
+ if (x[1]) {
3508
+ const g = x[1], $ = x[0][1] === "/", j = x[0][x[0].length - 2] === "/" || k.has(g), {
3476
3509
  props: v,
3477
- attrs: A,
3478
- directives: j,
3479
- bound: N
3480
- } = cr(b[2] || "", t, i), E = { props: {}, attrs: {} };
3481
- for (const O in v) E.props[O] = v[O];
3482
- for (const O in A) E.attrs[O] = A[O];
3483
- if (E.attrs && Object.prototype.hasOwnProperty.call(E.attrs, "key") && !(E.props && Object.prototype.hasOwnProperty.call(E.props, "key")))
3510
+ attrs: _,
3511
+ directives: A,
3512
+ bound: D
3513
+ } = cr(x[2] || "", t, i), S = { props: {}, attrs: {} };
3514
+ for (const O in v) S.props[O] = v[O];
3515
+ for (const O in _) S.attrs[O] = _[O];
3516
+ if (S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")))
3484
3517
  try {
3485
- E.props.key = E.attrs.key;
3518
+ S.props.key = S.attrs.key;
3486
3519
  } catch {
3487
3520
  }
3488
3521
  try {
@@ -3495,108 +3528,108 @@ function lr(e, t, r) {
3495
3528
  audio: ["muted", "autoplay", "controls", "loop"],
3496
3529
  img: ["src", "alt", "width", "height"],
3497
3530
  button: ["type", "name", "value", "disabled", "autofocus", "form"]
3498
- }, H = m.toLowerCase(), he = O[H] ?? [];
3499
- if (E.attrs) {
3500
- for (const K of he)
3501
- if (N && N.includes(K) && K in E.attrs && !(E.props && K in E.props)) {
3502
- let I = E.attrs[K];
3503
- I && ee(I) && (I = I.value), E.props[K] = I, delete E.attrs[K];
3531
+ }, H = g.toLowerCase(), te = O[H] ?? [];
3532
+ if (S.attrs) {
3533
+ for (const N of te)
3534
+ if (D && D.includes(N) && N in S.attrs && !(S.props && N in S.props)) {
3535
+ let W = S.attrs[N];
3536
+ W && ee(W) && (W = W.value), S.props[N] = W, delete S.attrs[N];
3504
3537
  }
3505
3538
  }
3506
- if ((m.includes("-") || !!i?.__customElements?.has?.(m)) && (E.isCustomElement = !0, N && E.attrs)) {
3507
- const K = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3508
- for (const I of N)
3509
- if (I in E.attrs && !(E.props && I in E.props)) {
3510
- const V = I.includes("-") ? I.split("-").map((ne, R) => R === 0 ? ne : ne.charAt(0).toUpperCase() + ne.slice(1)).join("") : I;
3511
- let U = E.attrs[I];
3512
- U && ee(U) && (U = U.value), E.props[V] = U, K.has(I) || delete E.attrs[I];
3539
+ if ((g.includes("-") || !!i?.__customElements?.has?.(g)) && (S.isCustomElement = !0, D && S.attrs)) {
3540
+ const N = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3541
+ for (const W of D)
3542
+ if (W in S.attrs && !(S.props && W in S.props)) {
3543
+ const V = W.includes("-") ? W.split("-").map((G, I) => I === 0 ? G : G.charAt(0).toUpperCase() + G.slice(1)).join("") : W;
3544
+ let K = S.attrs[W];
3545
+ K && ee(K) && (K = K.value), S.props[V] = K, N.has(W) || delete S.attrs[W];
3513
3546
  }
3514
3547
  }
3515
3548
  } catch {
3516
3549
  }
3517
- if (j && Object.keys(j).some((O) => O === "model" || O.startsWith("model:")))
3550
+ if (A && Object.keys(A).some((O) => O === "model" || O.startsWith("model:")))
3518
3551
  try {
3519
- const O = Symbol.for("cer.registry"), H = globalThis[O], he = !!(H && typeof H.has == "function" && H.has(m)), G = !!(i && (i.__customElements instanceof Set && i.__customElements.has(m) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(m)));
3520
- if (!!(m.includes("-") || G || he))
3521
- for (const V of Object.keys(j)) {
3552
+ const O = Symbol.for("cer.registry"), H = globalThis[O], te = !!(H && typeof H.has == "function" && H.has(g)), $e = !!(i && (i.__customElements instanceof Set && i.__customElements.has(g) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(g)));
3553
+ if (!!(g.includes("-") || $e || te))
3554
+ for (const V of Object.keys(A)) {
3522
3555
  if (V !== "model" && !V.startsWith("model:")) continue;
3523
- const U = j[V], ne = U.arg ?? (V.includes(":") ? V.split(":", 2)[1] : void 0), R = U.value, X = ne ?? "modelValue", _ = B, L = Se, M = i ? i._state || i : void 0;
3524
- let T;
3525
- typeof R == "string" && i ? T = _(M, R) : (T = R, T && ee(T) && (T = T.value)), E.props[X] = T;
3556
+ const K = A[V], G = K.arg ?? (V.includes(":") ? V.split(":", 2)[1] : void 0), I = K.value, X = G ?? "modelValue", re = U, E = Ae, T = i ? i._state || i : void 0;
3557
+ let R;
3558
+ typeof I == "string" && i ? R = re(T, I) : (R = I, R && ee(R) && (R = R.value)), S.props[X] = R;
3526
3559
  try {
3527
- const ie = re(X);
3528
- E.attrs || (E.attrs = {}), T !== void 0 && (E.attrs[ie] = T);
3560
+ const se = ie(X);
3561
+ S.attrs || (S.attrs = {}), R !== void 0 && (S.attrs[se] = R);
3529
3562
  } catch {
3530
3563
  }
3531
- E.isCustomElement = !0;
3532
- const z = `update:${re(X)}`.replace(/-([a-z])/g, (ie, Q) => Q.toUpperCase()), pt = "on" + z.charAt(0).toUpperCase() + z.slice(1);
3533
- E.props[pt] = function(ie) {
3534
- const Q = ie.detail !== void 0 ? ie.detail : ie.target ? ie.target.value : void 0;
3535
- if (M)
3536
- if (R && ee(R)) {
3537
- const ae = R.value;
3538
- (Array.isArray(Q) && Array.isArray(ae) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ae].sort()) : Q !== ae) && (R.value = Q, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3564
+ S.isCustomElement = !0;
3565
+ const L = `update:${ie(X)}`.replace(/-([a-z])/g, (se, Q) => Q.toUpperCase()), z = "on" + L.charAt(0).toUpperCase() + L.slice(1);
3566
+ S.props[z] = function(se) {
3567
+ const Q = se.detail !== void 0 ? se.detail : se.target ? se.target.value : void 0;
3568
+ if (T)
3569
+ if (I && ee(I)) {
3570
+ const ce = I.value;
3571
+ (Array.isArray(Q) && Array.isArray(ce) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ce].sort()) : Q !== ce) && (I.value = Q, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3539
3572
  } else {
3540
- const ae = _(M, typeof R == "string" ? R : String(R));
3541
- (Array.isArray(Q) && Array.isArray(ae) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ae].sort()) : Q !== ae) && (L(M, typeof R == "string" ? R : String(R), Q), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3573
+ const ce = re(T, typeof I == "string" ? I : String(I));
3574
+ (Array.isArray(Q) && Array.isArray(ce) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ce].sort()) : Q !== ce) && (E(T, typeof I == "string" ? I : String(I), Q), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3542
3575
  }
3543
- }, delete j[V];
3576
+ }, delete A[V];
3544
3577
  }
3545
3578
  } catch {
3546
3579
  }
3547
- if (Object.keys(j).length > 0 && (E.directives = { ...j }), $) {
3548
- const O = me(
3580
+ if (Object.keys(A).length > 0 && (S.directives = { ...A }), $) {
3581
+ const O = ye(
3582
+ d,
3549
3583
  u,
3550
- f,
3551
- g.length === 1 && Ee(g[0]) && g[0].tag === "#text" ? typeof g[0].children == "string" ? g[0].children : "" : g.length ? g : void 0,
3584
+ m.length === 1 && Se(m[0]) && m[0].tag === "#text" ? typeof m[0].children == "string" ? m[0].children : "" : m.length ? m : void 0,
3552
3585
  y
3553
- ), H = h.pop();
3554
- H ? (u = H.tag, f = H.props, y = H.key, g = H.children, g.push(O)) : (l.push(O), u = null, f = {}, y = void 0, g = []);
3555
- } else S ? u ? g.push(me(m, E, void 0, void 0)) : l.push(me(m, E, void 0, void 0)) : (u && h.push({
3556
- tag: u,
3557
- props: f,
3558
- children: g,
3586
+ ), H = p.pop();
3587
+ H ? (d = H.tag, u = H.props, y = H.key, m = H.children, m.push(O)) : (l.push(O), d = null, u = {}, y = void 0, m = []);
3588
+ } else j ? d ? m.push(ye(g, S, void 0, void 0)) : l.push(ye(g, S, void 0, void 0)) : (d && p.push({
3589
+ tag: d,
3590
+ props: u,
3591
+ children: m,
3559
3592
  key: y
3560
- }), u = m, f = E, g = []);
3561
- } else if (typeof b[3] < "u") {
3562
- const m = Number(b[3]), $ = t[m], S = `interp-${m}`;
3563
- w($, S);
3564
- } else if (b[4]) {
3565
- const m = b[4], $ = u ? g : l, S = m.split(/({{\d+}})/);
3566
- for (const v of S) {
3593
+ }), d = g, u = S, m = []);
3594
+ } else if (typeof x[3] < "u") {
3595
+ const g = Number(x[3]), $ = t[g], j = `interp-${g}`;
3596
+ b($, j);
3597
+ } else if (x[4]) {
3598
+ const g = x[4], $ = d ? m : l, j = g.split(/({{\d+}})/);
3599
+ for (const v of j) {
3567
3600
  if (!v) continue;
3568
- const A = v.match(/^{{(\d+)}}$/);
3569
- if (A) {
3570
- const j = Number(A[1]), N = t[j], E = `interp-${j}`;
3571
- w(N, E);
3601
+ const _ = v.match(/^{{(\d+)}}$/);
3602
+ if (_) {
3603
+ const A = Number(_[1]), D = t[A], S = `interp-${A}`;
3604
+ b(D, S);
3572
3605
  } else {
3573
- const j = `text-${x++}`;
3574
- $.push(c(v, j));
3606
+ const A = `text-${w++}`;
3607
+ $.push(c(v, A));
3575
3608
  }
3576
3609
  }
3577
3610
  }
3578
3611
  }
3579
- const C = l.filter((m) => Ee(m) && m.tag === "#text" ? typeof m.children == "string" && m.children.trim() !== "" : !0);
3612
+ const C = l.filter((g) => Se(g) && g.tag === "#text" ? typeof g.children == "string" && g.children.trim() !== "" : !0);
3580
3613
  if (C.length === 1) {
3581
- const m = C[0];
3582
- return s && o && ze.set(o, m), m;
3614
+ const g = C[0];
3615
+ return s && o && Ue.set(o, g), g;
3583
3616
  } else if (C.length > 1) {
3584
- const m = C;
3585
- return s && o && ze.set(o, m), m;
3617
+ const g = C;
3618
+ return s && o && Ue.set(o, g), g;
3586
3619
  }
3587
- return me("div", {}, "", "fallback-root");
3620
+ return ye("div", {}, "", "fallback-root");
3588
3621
  }
3589
- function ce(e, ...t) {
3622
+ function le(e, ...t) {
3590
3623
  const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
3591
3624
  return lr(e, t, n);
3592
3625
  }
3593
- function Re(e, t) {
3594
- return W(e ? t : [], "when-block");
3626
+ function Pe(e, t) {
3627
+ return M(e ? t : [], "when-block");
3595
3628
  }
3596
- function Cr(e, t) {
3629
+ function _r(e, t) {
3597
3630
  return e.map((r, n) => {
3598
3631
  const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
3599
- return W(t(r, n), `each-${i}`);
3632
+ return M(t(r, n), `each-${i}`);
3600
3633
  });
3601
3634
  }
3602
3635
  function ur() {
@@ -3616,11 +3649,11 @@ function ur() {
3616
3649
  function fr(...e) {
3617
3650
  for (let t = 0; t < e.length; t++) {
3618
3651
  const [r, n] = e[t];
3619
- if (r) return [W(n, `whenChain-branch-${t}`)];
3652
+ if (r) return [M(n, `whenChain-branch-${t}`)];
3620
3653
  }
3621
- return [W([], "whenChain-empty")];
3654
+ return [M([], "whenChain-empty")];
3622
3655
  }
3623
- function W(e, t) {
3656
+ function M(e, t) {
3624
3657
  const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
3625
3658
  return {
3626
3659
  tag: "#anchor",
@@ -3628,55 +3661,55 @@ function W(e, t) {
3628
3661
  children: r
3629
3662
  };
3630
3663
  }
3631
- function _r(e, t) {
3632
- return Re(!e, t);
3633
- }
3634
3664
  function Er(e, t) {
3635
- const r = !e || e.length === 0;
3636
- return Re(r, t);
3665
+ return Pe(!e, t);
3637
3666
  }
3638
3667
  function Sr(e, t) {
3668
+ const r = !e || e.length === 0;
3669
+ return Pe(r, t);
3670
+ }
3671
+ function Ar(e, t) {
3639
3672
  const r = !!(e && e.length > 0);
3640
- return Re(r, t);
3673
+ return Pe(r, t);
3641
3674
  }
3642
- function Ar(e, t, r) {
3675
+ function jr(e, t, r) {
3643
3676
  const n = [];
3644
3677
  return e.forEach((i, s) => {
3645
3678
  t(i, s) && n.push({ item: i, originalIndex: s });
3646
3679
  }), n.map(({ item: i, originalIndex: s }, o) => {
3647
3680
  const c = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
3648
- return W(r(i, s, o), `each-where-${c}`);
3681
+ return M(r(i, s, o), `each-where-${c}`);
3649
3682
  });
3650
3683
  }
3651
- function jr(e, t) {
3684
+ function Or(e, t) {
3652
3685
  const r = e?.length ?? 0;
3653
- return r === 0 && t.empty ? W(t.empty, "switch-length-empty") : r === 1 && t.one ? W(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? W(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? W(t.many(e), "switch-length-many") : W([], "switch-length-fallback");
3686
+ return r === 0 && t.empty ? M(t.empty, "switch-length-empty") : r === 1 && t.one ? M(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? M(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? M(t.many(e), "switch-length-many") : M([], "switch-length-fallback");
3654
3687
  }
3655
- function Or(e, t, r) {
3688
+ function Tr(e, t, r) {
3656
3689
  const n = /* @__PURE__ */ new Map();
3657
3690
  return e.forEach((i) => {
3658
3691
  const s = t(i);
3659
3692
  n.has(s) || n.set(s, []), n.get(s).push(i);
3660
- }), Array.from(n.entries()).map(([i, s], o) => W(
3693
+ }), Array.from(n.entries()).map(([i, s], o) => M(
3661
3694
  r(i, s, o),
3662
3695
  `each-group-${i}`
3663
3696
  ));
3664
3697
  }
3665
- function Tr(e, t, r, n) {
3698
+ function Rr(e, t, r, n) {
3666
3699
  const i = r * t, s = Math.min(i + t, e.length);
3667
3700
  return e.slice(i, s).map((c, a) => {
3668
- const p = i + a, h = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${p}` : `page-${p}`;
3669
- return W(n(c, p, a), `each-page-${h}`);
3701
+ const h = i + a, p = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${h}` : `page-${h}`;
3702
+ return M(n(c, h, a), `each-page-${p}`);
3670
3703
  });
3671
3704
  }
3672
- function Rr(e, t) {
3673
- return e.loading && t.loading ? W(t.loading, "promise-loading") : e.error && t.error ? W(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? W(t.success(e.data), "promise-success") : t.idle ? W(t.idle, "promise-idle") : W([], "promise-fallback");
3705
+ function Pr(e, t) {
3706
+ return e.loading && t.loading ? M(t.loading, "promise-loading") : e.error && t.error ? M(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? M(t.success(e.data), "promise-success") : t.idle ? M(t.idle, "promise-idle") : M([], "promise-fallback");
3674
3707
  }
3675
3708
  function q(e, t) {
3676
3709
  const r = typeof window < "u" && window.matchMedia?.(e)?.matches;
3677
- return Re(!!r, t);
3710
+ return Pe(!!r, t);
3678
3711
  }
3679
- const te = {
3712
+ const ne = {
3680
3713
  // Responsive breakpoints (matching style.ts)
3681
3714
  sm: "(min-width:640px)",
3682
3715
  md: "(min-width:768px)",
@@ -3685,15 +3718,15 @@ const te = {
3685
3718
  "2xl": "(min-width:1536px)",
3686
3719
  // Dark mode (matching style.ts)
3687
3720
  dark: "(prefers-color-scheme: dark)"
3688
- }, ht = ["sm", "md", "lg", "xl", "2xl"], dr = {
3721
+ }, gt = ["sm", "md", "lg", "xl", "2xl"], dr = {
3689
3722
  // Breakpoint-based rendering (matching style.ts exactly)
3690
- sm: (e) => q(te.sm, e),
3691
- md: (e) => q(te.md, e),
3692
- lg: (e) => q(te.lg, e),
3693
- xl: (e) => q(te.xl, e),
3694
- "2xl": (e) => q(te["2xl"], e),
3723
+ sm: (e) => q(ne.sm, e),
3724
+ md: (e) => q(ne.md, e),
3725
+ lg: (e) => q(ne.lg, e),
3726
+ xl: (e) => q(ne.xl, e),
3727
+ "2xl": (e) => q(ne["2xl"], e),
3695
3728
  // Dark mode (matching style.ts)
3696
- dark: (e) => q(te.dark, e),
3729
+ dark: (e) => q(ne.dark, e),
3697
3730
  light: (e) => q("(prefers-color-scheme: light)", e),
3698
3731
  // Accessibility and interaction preferences
3699
3732
  touch: (e) => q("(hover: none) and (pointer: coarse)", e),
@@ -3706,22 +3739,22 @@ const te = {
3706
3739
  };
3707
3740
  function Lr(e, t) {
3708
3741
  const r = [];
3709
- e.includes("dark") ? r.push(te.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
3742
+ e.includes("dark") ? r.push(ne.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
3710
3743
  const n = e.filter(
3711
- (o) => ht.includes(o)
3744
+ (o) => gt.includes(o)
3712
3745
  ), i = n[n.length - 1];
3713
- i && i in te && r.push(te[i]);
3746
+ i && i in ne && r.push(ne[i]);
3714
3747
  const s = r.length > 0 ? r.join(" and ") : "all";
3715
3748
  return q(s, t);
3716
3749
  }
3717
- function Pr(e) {
3750
+ function Mr(e) {
3718
3751
  const t = [];
3719
- return e.base && t.push(W(e.base, "responsive-base")), ht.forEach((r) => {
3752
+ return e.base && t.push(M(e.base, "responsive-base")), gt.forEach((r) => {
3720
3753
  const n = e[r];
3721
3754
  n && t.push(dr[r](n));
3722
3755
  }), t;
3723
3756
  }
3724
- function Mr(e) {
3757
+ function Wr(e) {
3725
3758
  const t = [];
3726
3759
  let r = null;
3727
3760
  return {
@@ -3739,13 +3772,13 @@ function Mr(e) {
3739
3772
  for (let n = 0; n < t.length; n++) {
3740
3773
  const { condition: i, content: s } = t[n];
3741
3774
  if (i(e))
3742
- return W(s, `switch-case-${n}`);
3775
+ return M(s, `switch-case-${n}`);
3743
3776
  }
3744
- return W(r || [], "switch-otherwise");
3777
+ return M(r || [], "switch-otherwise");
3745
3778
  }
3746
3779
  };
3747
3780
  }
3748
- class de extends EventTarget {
3781
+ class pe extends EventTarget {
3749
3782
  handlers = {};
3750
3783
  static instance;
3751
3784
  eventCounters = /* @__PURE__ */ new Map();
@@ -3753,7 +3786,7 @@ class de extends EventTarget {
3753
3786
  * Returns the singleton instance of GlobalEventBus
3754
3787
  */
3755
3788
  static getInstance() {
3756
- return de.instance || (de.instance = new de()), de.instance;
3789
+ return pe.instance || (pe.instance = new pe()), pe.instance;
3757
3790
  }
3758
3791
  /**
3759
3792
  * Emit a global event with optional data. Includes event storm protection.
@@ -3777,7 +3810,7 @@ class de extends EventTarget {
3777
3810
  try {
3778
3811
  o(r);
3779
3812
  } catch (c) {
3780
- se(`Error in global event handler for "${t}":`, c);
3813
+ oe(`Error in global event handler for "${t}":`, c);
3781
3814
  }
3782
3815
  });
3783
3816
  }
@@ -3866,8 +3899,8 @@ class de extends EventTarget {
3866
3899
  this.eventCounters.clear();
3867
3900
  }
3868
3901
  }
3869
- const ve = de.getInstance(), Wr = (e, t) => ve.emit(e, t), Dr = (e, t) => ve.on(e, t), Ir = (e, t) => ve.off(e, t), Nr = (e, t) => ve.once(e, t), Hr = (e, t, r) => ve.listen(e, t, r);
3870
- function it(e) {
3902
+ const ve = pe.getInstance(), Dr = (e, t) => ve.emit(e, t), Ir = (e, t) => ve.on(e, t), Nr = (e, t) => ve.off(e, t), Hr = (e, t) => ve.once(e, t), Br = (e, t, r) => ve.listen(e, t, r);
3903
+ function ot(e) {
3871
3904
  let t = { ...e };
3872
3905
  const r = [];
3873
3906
  function n(c) {
@@ -3885,281 +3918,282 @@ function it(e) {
3885
3918
  }
3886
3919
  return { subscribe: n, getState: i, setState: s };
3887
3920
  }
3888
- const st = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Y = (e, t) => {
3921
+ const at = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Y = (e, t) => {
3889
3922
  for (const r of e) {
3890
3923
  const n = [], i = r.path.replace(/:[^/]+/g, (c) => (n.push(c.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
3891
3924
  if (o) {
3892
3925
  const c = {};
3893
- return n.forEach((a, p) => {
3894
- c[a] = o[p + 1];
3926
+ return n.forEach((a, h) => {
3927
+ c[a] = o[h + 1];
3895
3928
  }), { route: r, params: c };
3896
3929
  }
3897
3930
  }
3898
3931
  return { route: null, params: {} };
3899
- }, Be = {};
3900
- async function hr(e) {
3932
+ }, qe = {};
3933
+ async function pr(e) {
3901
3934
  if (e.component) return e.component;
3902
3935
  if (e.load) {
3903
- if (Be[e.path]) return Be[e.path];
3936
+ if (qe[e.path]) return qe[e.path];
3904
3937
  try {
3905
3938
  const t = await e.load();
3906
- return Be[e.path] = t.default, t.default;
3939
+ return qe[e.path] = t.default, t.default;
3907
3940
  } catch {
3908
3941
  throw new Error(`Failed to load component for route: ${e.path}`);
3909
3942
  }
3910
3943
  }
3911
3944
  throw new Error(`No component or loader defined for route: ${e.path}`);
3912
3945
  }
3913
- function pr(e) {
3946
+ function hr(e) {
3914
3947
  const { routes: t, base: r = "", initialUrl: n } = e;
3915
- let i, s, o, c, a, p, h;
3916
- const b = async (y, x) => {
3917
- const l = t.find((d) => Y([d], y.path).route !== null);
3948
+ let i, s, o, c, a, h, p;
3949
+ const x = async (y, w) => {
3950
+ const l = t.find((f) => Y([f], y.path).route !== null);
3918
3951
  if (l?.beforeEnter)
3919
3952
  try {
3920
- const d = await l.beforeEnter(y, x);
3921
- return typeof d == "string" ? (await f(d, !0), !1) : d !== !1;
3922
- } catch (d) {
3923
- return se("beforeEnter error", d), !1;
3953
+ const f = await l.beforeEnter(y, w);
3954
+ return typeof f == "string" ? (await u(f, !0), !1) : f !== !1;
3955
+ } catch (f) {
3956
+ return oe("beforeEnter error", f), !1;
3924
3957
  }
3925
3958
  return !0;
3926
- }, g = async (y, x) => {
3927
- const l = t.find((d) => Y([d], y.path).route !== null);
3959
+ }, m = async (y, w) => {
3960
+ const l = t.find((f) => Y([f], y.path).route !== null);
3928
3961
  if (l?.onEnter)
3929
3962
  try {
3930
- const d = await l.onEnter(y, x);
3931
- return typeof d == "string" ? (await f(d, !0), !1) : d !== !1;
3932
- } catch (d) {
3933
- return se("onEnter error", d), !1;
3963
+ const f = await l.onEnter(y, w);
3964
+ return typeof f == "string" ? (await u(f, !0), !1) : f !== !1;
3965
+ } catch (f) {
3966
+ return oe("onEnter error", f), !1;
3934
3967
  }
3935
3968
  return !0;
3936
- }, u = (y, x) => {
3937
- const l = t.find((d) => Y([d], y.path).route !== null);
3969
+ }, d = (y, w) => {
3970
+ const l = t.find((f) => Y([f], y.path).route !== null);
3938
3971
  if (l?.afterEnter)
3939
3972
  try {
3940
- l.afterEnter(y, x);
3941
- } catch (d) {
3942
- se("afterEnter error", d);
3973
+ l.afterEnter(y, w);
3974
+ } catch (f) {
3975
+ oe("afterEnter error", f);
3943
3976
  }
3944
- }, f = async (y, x = !1) => {
3977
+ }, u = async (y, w = !1) => {
3945
3978
  try {
3946
3979
  const l = {
3947
3980
  path: y.replace(r, "") || "/",
3948
3981
  query: {}
3949
- }, d = Y(t, l.path);
3950
- if (!d) throw new Error(`No route found for ${l.path}`);
3951
- const w = o.getState(), k = {
3982
+ }, f = Y(t, l.path);
3983
+ if (!f) throw new Error(`No route found for ${l.path}`);
3984
+ const b = o.getState(), k = {
3952
3985
  path: l.path,
3953
- params: d.params,
3986
+ params: f.params,
3954
3987
  query: l.query
3955
3988
  };
3956
- if (!await b(k, w) || !await g(k, w)) return;
3957
- typeof window < "u" && typeof document < "u" && (x ? window.history.replaceState({}, "", r + y) : window.history.pushState({}, "", r + y)), o.setState(k), u(k, w);
3989
+ if (!await x(k, b) || !await m(k, b)) return;
3990
+ typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + y) : window.history.pushState({}, "", r + y)), o.setState(k), d(k, b);
3958
3991
  } catch (l) {
3959
- se("Navigation error:", l);
3992
+ oe("Navigation error:", l);
3960
3993
  }
3961
3994
  };
3962
3995
  if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
3963
3996
  i = () => {
3964
- const x = new URL(window.location.href), l = x.pathname.replace(r, "") || "/", d = st(x.search);
3965
- return { path: l, query: d };
3997
+ const w = new URL(window.location.href), l = w.pathname.replace(r, "") || "/", f = at(w.search);
3998
+ return { path: l, query: f };
3966
3999
  }, s = i();
3967
4000
  const y = Y(t, s.path);
3968
- o = it({
4001
+ o = ot({
3969
4002
  path: s.path,
3970
4003
  params: y.params,
3971
4004
  query: s.query
3972
- }), c = async (x = !1) => {
4005
+ }), c = async (w = !1) => {
3973
4006
  const l = i();
3974
- await f(l.path, x);
3975
- }, window.addEventListener("popstate", () => c(!0)), a = (x) => f(x, !1), p = (x) => f(x, !0), h = () => window.history.back();
4007
+ await u(l.path, w);
4008
+ }, window.addEventListener("popstate", () => c(!0)), a = (w) => u(w, !1), h = (w) => u(w, !0), p = () => window.history.back();
3976
4009
  } else {
3977
4010
  i = () => {
3978
- const l = new URL(n || "/", "http://localhost"), d = l.pathname.replace(r, "") || "/", w = st(l.search);
3979
- return { path: d, query: w };
4011
+ const l = new URL(n || "/", "http://localhost"), f = l.pathname.replace(r, "") || "/", b = at(l.search);
4012
+ return { path: f, query: b };
3980
4013
  }, s = i();
3981
4014
  const y = Y(t, s.path);
3982
- o = it({
4015
+ o = ot({
3983
4016
  path: s.path,
3984
4017
  params: y.params,
3985
4018
  query: s.query
3986
4019
  }), c = async () => {
3987
4020
  const l = i();
3988
- await x(l.path);
4021
+ await w(l.path);
3989
4022
  };
3990
- const x = async (l) => {
4023
+ const w = async (l) => {
3991
4024
  try {
3992
- const d = {
4025
+ const f = {
3993
4026
  path: l.replace(r, "") || "/",
3994
4027
  query: {}
3995
- }, w = Y(t, d.path);
3996
- if (!w) throw new Error(`No route found for ${d.path}`);
4028
+ }, b = Y(t, f.path);
4029
+ if (!b) throw new Error(`No route found for ${f.path}`);
3997
4030
  const k = o.getState(), C = {
3998
- path: d.path,
3999
- params: w.params,
4000
- query: d.query
4001
- }, m = t.find(($) => Y([$], C.path).route !== null);
4002
- if (m?.beforeEnter)
4031
+ path: f.path,
4032
+ params: b.params,
4033
+ query: f.query
4034
+ }, g = t.find(($) => Y([$], C.path).route !== null);
4035
+ if (g?.beforeEnter)
4003
4036
  try {
4004
- const $ = await m.beforeEnter(C, k);
4037
+ const $ = await g.beforeEnter(C, k);
4005
4038
  if (typeof $ == "string") {
4006
- await x($);
4039
+ await w($);
4007
4040
  return;
4008
4041
  }
4009
4042
  if ($ === !1) return;
4010
4043
  } catch {
4011
4044
  return;
4012
4045
  }
4013
- if (m?.onEnter)
4046
+ if (g?.onEnter)
4014
4047
  try {
4015
- const $ = await m.onEnter(C, k);
4048
+ const $ = await g.onEnter(C, k);
4016
4049
  if (typeof $ == "string") {
4017
- await x($);
4050
+ await w($);
4018
4051
  return;
4019
4052
  }
4020
4053
  if ($ === !1) return;
4021
4054
  } catch {
4022
4055
  return;
4023
4056
  }
4024
- if (o.setState(C), m?.afterEnter)
4057
+ if (o.setState(C), g?.afterEnter)
4025
4058
  try {
4026
- m.afterEnter(C, k);
4059
+ g.afterEnter(C, k);
4027
4060
  } catch {
4028
4061
  }
4029
4062
  } catch {
4030
4063
  }
4031
4064
  };
4032
- a = async (l) => x(l), p = async (l) => x(l), h = () => {
4065
+ a = async (l) => w(l), h = async (l) => w(l), p = () => {
4033
4066
  };
4034
4067
  }
4035
4068
  return {
4036
4069
  store: o,
4037
4070
  push: a,
4038
- replace: p,
4039
- back: h,
4071
+ replace: h,
4072
+ back: p,
4040
4073
  subscribe: o.subscribe,
4041
4074
  matchRoute: (y) => Y(t, y),
4042
4075
  getCurrent: () => o.getState(),
4043
- resolveRouteComponent: hr
4076
+ resolveRouteComponent: pr
4044
4077
  };
4045
4078
  }
4046
4079
  function zr(e, t) {
4047
4080
  return Y(e, t);
4048
4081
  }
4049
- function Br(e) {
4050
- const t = pr(e);
4051
- return nt("router-view", (r = {}, n = {}) => {
4082
+ function Ur(e) {
4083
+ const t = hr(e);
4084
+ return st("router-view", (r = {}, n = {}) => {
4052
4085
  const { onConnected: i } = n;
4053
4086
  if (i && i(() => {
4054
4087
  t && typeof t.subscribe == "function" && t.subscribe(() => {
4055
4088
  });
4056
- }), !t) return ce`<div>Router not initialized.</div>`;
4089
+ }), !t) return le`<div>Router not initialized.</div>`;
4057
4090
  const s = t.getCurrent(), { path: o } = s, c = t.matchRoute(o);
4058
4091
  return c.route ? t.resolveRouteComponent(c.route).then((a) => {
4059
4092
  if (typeof a == "string")
4060
4093
  return { tag: a, props: {}, children: [] };
4061
4094
  if (typeof a == "function") {
4062
- const p = a();
4063
- return (p instanceof Promise ? p : Promise.resolve(p)).then((b) => typeof b == "string" ? { tag: b, props: {}, children: [] } : b);
4095
+ const h = a();
4096
+ return (h instanceof Promise ? h : Promise.resolve(h)).then((x) => typeof x == "string" ? { tag: x, props: {}, children: [] } : x);
4064
4097
  }
4065
- return ce`<div>Invalid route component</div>`;
4066
- }).catch(() => ce`<div>Invalid route component</div>`) : ce`<div>Not found</div>`;
4067
- }), nt("router-link", (r = {}, n = {}) => {
4098
+ return le`<div>Invalid route component</div>`;
4099
+ }).catch(() => le`<div>Invalid route component</div>`) : le`<div>Not found</div>`;
4100
+ }), st("router-link", (r = {}, n = {}) => {
4068
4101
  const {
4069
4102
  to: i = "",
4070
4103
  tag: s = "a",
4071
4104
  replace: o = !1,
4072
4105
  exact: c = !1,
4073
4106
  activeClass: a = "active",
4074
- exactActiveClass: p = "exact-active",
4075
- ariaCurrentValue: h = "page",
4076
- disabled: b = !1,
4077
- external: g = !1,
4078
- class: u = ""
4079
- } = r, f = t.getCurrent(), y = f.path === i, x = c ? y : f && typeof f.path == "string" ? f.path.startsWith(i) : !1, l = y ? `aria-current="${h}"` : "", d = (u || "").split(/\s+/).filter(Boolean), w = {};
4080
- for (const v of d) w[v] = !0;
4107
+ exactActiveClass: h = "exact-active",
4108
+ ariaCurrentValue: p = "page",
4109
+ disabled: x = !1,
4110
+ external: m = !1,
4111
+ class: d = ""
4112
+ } = r, u = t.getCurrent(), y = u.path === i, w = c ? y : u && typeof u.path == "string" ? u.path.startsWith(i) : !1, l = y ? `aria-current="${p}"` : "", f = (d || "").split(/\s+/).filter(Boolean), b = {};
4113
+ for (const v of f) b[v] = !0;
4081
4114
  const k = {
4082
- ...w,
4115
+ ...b,
4083
4116
  // Also include the configurable names (may duplicate the above)
4084
- [a]: x,
4085
- [p]: y
4086
- }, C = s === "button", m = b ? C ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", $ = g && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", S = (v) => {
4087
- if (b) {
4117
+ [a]: w,
4118
+ [h]: y
4119
+ }, C = s === "button", g = x ? C ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", $ = m && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", j = (v) => {
4120
+ if (x) {
4088
4121
  v.preventDefault();
4089
4122
  return;
4090
4123
  }
4091
- g && (s === "a" || !s) || (v.preventDefault(), o ? t.replace(i) : t.push(i));
4124
+ m && (s === "a" || !s) || (v.preventDefault(), o ? t.replace(i) : t.push(i));
4092
4125
  };
4093
- return ce`
4094
- ${ur().when(C, ce`
4126
+ return le`
4127
+ ${ur().when(C, le`
4095
4128
  <button
4096
4129
  part="button"
4097
4130
  :class="${k}"
4098
4131
  ${l}
4099
- ${m}
4132
+ ${g}
4100
4133
  ${$}
4101
- @click="${S}"
4134
+ @click="${j}"
4102
4135
  ><slot></slot></button>
4103
- `).otherwise(ce`
4136
+ `).otherwise(le`
4104
4137
  <a
4105
4138
  part="link"
4106
4139
  href="${i}"
4107
4140
  :class="${k}"
4108
4141
  ${l}
4109
- ${m}
4142
+ ${g}
4110
4143
  ${$}
4111
- @click="${S}"
4144
+ @click="${j}"
4112
4145
  ><slot></slot></a>
4113
4146
  `).done()}
4114
4147
  `;
4115
4148
  }), t;
4116
4149
  }
4117
4150
  export {
4118
- de as GlobalEventBus,
4119
- W as anchorBlock,
4120
- nt as component,
4151
+ pe as GlobalEventBus,
4152
+ M as anchorBlock,
4153
+ st as component,
4121
4154
  mr as computed,
4122
- it as createStore,
4123
- Wt as css,
4124
- Cr as each,
4125
- Or as eachGroup,
4126
- Tr as eachPage,
4127
- Ar as eachWhere,
4128
- Wr as emit,
4155
+ ot as createStore,
4156
+ Dt as css,
4157
+ _r as each,
4158
+ Tr as eachGroup,
4159
+ Rr as eachPage,
4160
+ jr as eachWhere,
4161
+ Dr as emit,
4129
4162
  ve as eventBus,
4130
- ce as html,
4131
- Br as initRouter,
4132
- Hr as listen,
4163
+ le as html,
4164
+ Ur as initRouter,
4165
+ Br as listen,
4133
4166
  ur as match,
4134
4167
  Y as matchRoute,
4135
4168
  zr as matchRouteSSR,
4136
- te as mediaVariants,
4137
- Ir as off,
4138
- Dr as on,
4139
- Nr as once,
4140
- st as parseQuery,
4169
+ ne as mediaVariants,
4170
+ Nr as off,
4171
+ Ir as on,
4172
+ Hr as once,
4173
+ at as parseQuery,
4141
4174
  gr as ref,
4142
- Pe as renderToString,
4143
- hr as resolveRouteComponent,
4175
+ Me as renderToString,
4176
+ pr as resolveRouteComponent,
4144
4177
  dr as responsive,
4145
- ht as responsiveOrder,
4146
- Pr as responsiveSwitch,
4147
- Mr as switchOn,
4148
- jr as switchOnLength,
4149
- Rr as switchOnPromise,
4150
- _r as unless,
4178
+ gt as responsiveOrder,
4179
+ Mr as responsiveSwitch,
4180
+ Wr as switchOn,
4181
+ Or as switchOnLength,
4182
+ Pr as switchOnPromise,
4183
+ Er as unless,
4151
4184
  br as useEmit,
4152
4185
  vr as useOnAttributeChanged,
4153
4186
  wr as useOnConnected,
4154
4187
  xr as useOnDisconnected,
4155
4188
  $r as useOnError,
4156
- pr as useRouter,
4157
- kr as useStyle,
4189
+ kr as useProps,
4190
+ hr as useRouter,
4191
+ Cr as useStyle,
4158
4192
  yr as watch,
4159
- Re as when,
4160
- Er as whenEmpty,
4193
+ Pe as when,
4194
+ Sr as whenEmpty,
4161
4195
  q as whenMedia,
4162
- Sr as whenNotEmpty,
4196
+ Ar as whenNotEmpty,
4163
4197
  Lr as whenVariants
4164
4198
  };
4165
4199
  //# sourceMappingURL=custom-elements-runtime.es.js.map