@jasonshimmy/custom-elements-runtime 1.0.2 → 1.0.4

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.
@@ -5,9 +5,9 @@ class dt {
5
5
  * Schedule an update to be executed in the next microtask
6
6
  * Uses component identity to deduplicate multiple render requests for the same component
7
7
  */
8
- schedule(t, n) {
9
- const r = n || t.toString();
10
- this.pendingUpdates.set(r, t), this.isFlushScheduled || (this.isFlushScheduled = !0, typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && (window.__vitest__ || window.Cypress) ? this.flush() : queueMicrotask(() => this.flush()));
8
+ schedule(t, r) {
9
+ const n = r || t.toString();
10
+ this.pendingUpdates.set(n, t), this.isFlushScheduled || (this.isFlushScheduled = !0, typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && (window.__vitest__ || window.Cypress) ? this.flush() : queueMicrotask(() => this.flush()));
11
11
  }
12
12
  /**
13
13
  * Execute all pending updates
@@ -15,11 +15,11 @@ class dt {
15
15
  flush() {
16
16
  const t = Array.from(this.pendingUpdates.values());
17
17
  this.pendingUpdates.clear(), this.isFlushScheduled = !1;
18
- for (const n of t)
18
+ for (const r of t)
19
19
  try {
20
- n();
21
- } catch (r) {
22
- typeof console < "u" && console.error && console.error("Error in batched update:", r);
20
+ r();
21
+ } catch (n) {
22
+ typeof console < "u" && console.error && console.error("Error in batched update:", n);
23
23
  }
24
24
  }
25
25
  /**
@@ -41,13 +41,13 @@ class ht {
41
41
  /**
42
42
  * Get or create a reactive proxy for an object
43
43
  */
44
- static getOrCreateProxy(t, n, r = !1) {
44
+ static getOrCreateProxy(t, r, n = !1) {
45
45
  const i = this.cache.get(t);
46
46
  if (i)
47
47
  return i;
48
- const s = r ? this.getOrCreateArrayHandler(n) : this.getOrCreateObjectHandler(n), o = new Proxy(t, s);
48
+ const s = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
49
49
  try {
50
- rt.markAsProxy(o);
50
+ nt.markAsProxy(o);
51
51
  } catch {
52
52
  }
53
53
  return this.cache.set(t, o), o;
@@ -57,9 +57,9 @@ class ht {
57
57
  */
58
58
  static getOrCreateArrayHandler(t) {
59
59
  if (!this.arrayHandlerCache.has(t)) {
60
- const n = {
61
- get: (r, i, s) => {
62
- const o = Reflect.get(r, i, s);
60
+ const r = {
61
+ get: (n, i, s) => {
62
+ const o = Reflect.get(n, i, s);
63
63
  return typeof o == "function" && typeof i == "string" && [
64
64
  "push",
65
65
  "pop",
@@ -71,14 +71,14 @@ class ht {
71
71
  "fill",
72
72
  "copyWithin"
73
73
  ].includes(i) ? function(...u) {
74
- const y = o.apply(r, u);
75
- return t.triggerUpdate(), y;
74
+ const m = o.apply(n, u);
75
+ return t.triggerUpdate(), m;
76
76
  } : o;
77
77
  },
78
- set: (r, i, s) => (r[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
79
- deleteProperty: (r, i) => (delete r[i], t.triggerUpdate(), !0)
78
+ set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
79
+ deleteProperty: (n, i) => (delete n[i], t.triggerUpdate(), !0)
80
80
  };
81
- this.arrayHandlerCache.set(t, n);
81
+ this.arrayHandlerCache.set(t, r);
82
82
  }
83
83
  return this.arrayHandlerCache.get(t);
84
84
  }
@@ -87,12 +87,12 @@ class ht {
87
87
  */
88
88
  static getOrCreateObjectHandler(t) {
89
89
  if (!this.objectHandlerCache.has(t)) {
90
- const n = {
91
- get: (r, i, s) => Reflect.get(r, i, s),
92
- set: (r, i, s) => (r[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
93
- deleteProperty: (r, i) => (delete r[i], t.triggerUpdate(), !0)
90
+ const r = {
91
+ get: (n, i, s) => Reflect.get(n, i, s),
92
+ set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
93
+ deleteProperty: (n, i) => (delete n[i], t.triggerUpdate(), !0)
94
94
  };
95
- this.objectHandlerCache.set(t, n);
95
+ this.objectHandlerCache.set(t, r);
96
96
  }
97
97
  return this.objectHandlerCache.get(t);
98
98
  }
@@ -118,7 +118,7 @@ class ht {
118
118
  };
119
119
  }
120
120
  }
121
- class rt {
121
+ class nt {
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
@@ -127,19 +127,19 @@ class rt {
127
127
  /**
128
128
  * Create an optimized reactive proxy with minimal overhead
129
129
  */
130
- static createReactiveProxy(t, n, r) {
130
+ static createReactiveProxy(t, r, n) {
131
131
  try {
132
132
  if (Fe.has(t)) return t;
133
133
  } catch {
134
134
  }
135
135
  const i = Array.isArray(t);
136
- let s = this.contextCache.get(n);
137
- s || (s = /* @__PURE__ */ new WeakMap(), this.contextCache.set(n, s));
138
- let o = s.get(r);
136
+ let s = this.contextCache.get(r);
137
+ s || (s = /* @__PURE__ */ new WeakMap(), this.contextCache.set(r, s));
138
+ let o = s.get(n);
139
139
  return o || (o = {
140
- triggerUpdate: n,
141
- makeReactiveValue: r
142
- }, s.set(r, o)), ht.getOrCreateProxy(t, o, i);
140
+ triggerUpdate: r,
141
+ makeReactiveValue: n
142
+ }, s.set(n, o)), ht.getOrCreateProxy(t, o, i);
143
143
  }
144
144
  /**
145
145
  * Mark an object as a proxy (for optimization)
@@ -165,8 +165,8 @@ class gt {
165
165
  /**
166
166
  * Set the current component being rendered for dependency tracking
167
167
  */
168
- setCurrentComponent(t, n) {
169
- this.currentComponent = t, this.componentRenderFunctions.set(t, n), this.componentDependencies.has(t) || this.componentDependencies.set(t, /* @__PURE__ */ new Set()), this.stateIndexCounter.set(t, 0);
168
+ setCurrentComponent(t, r) {
169
+ this.currentComponent = t, this.componentRenderFunctions.set(t, r), this.componentDependencies.has(t) || this.componentDependencies.set(t, /* @__PURE__ */ new Set()), this.stateIndexCounter.set(t, 0);
170
170
  }
171
171
  /**
172
172
  * Clear the current component after rendering
@@ -198,19 +198,19 @@ class gt {
198
198
  */
199
199
  shouldEmitRenderWarning() {
200
200
  if (!this.currentComponent) return !0;
201
- const t = this.currentComponent, n = this.lastWarningTime.get(t) || 0, r = Date.now();
202
- return r - n < 1e3 ? !1 : (this.lastWarningTime.set(t, r), !0);
201
+ const t = this.currentComponent, r = this.lastWarningTime.get(t) || 0, n = Date.now();
202
+ return n - r < 1e3 ? !1 : (this.lastWarningTime.set(t, n), !0);
203
203
  }
204
204
  /**
205
205
  * Execute a function with tracking disabled
206
206
  */
207
207
  withoutTracking(t) {
208
- const n = this.trackingDisabled;
208
+ const r = this.trackingDisabled;
209
209
  this.trackingDisabled = !0;
210
210
  try {
211
211
  return t();
212
212
  } finally {
213
- this.trackingDisabled = n;
213
+ this.trackingDisabled = r;
214
214
  }
215
215
  }
216
216
  /**
@@ -219,8 +219,8 @@ class gt {
219
219
  getOrCreateState(t) {
220
220
  if (!this.currentComponent)
221
221
  return new He(t);
222
- const n = this.currentComponent, r = this.stateIndexCounter.get(n) || 0, i = `${n}:${r}`;
223
- if (this.stateIndexCounter.set(n, r + 1), this.stateStorage.has(i))
222
+ const r = this.currentComponent, n = this.stateIndexCounter.get(r) || 0, i = `${r}:${n}`;
223
+ if (this.stateIndexCounter.set(r, n + 1), this.stateStorage.has(i))
224
224
  return this.stateStorage.get(i);
225
225
  const s = new He(t);
226
226
  return this.stateStorage.set(i, s), s;
@@ -235,19 +235,19 @@ class gt {
235
235
  * Trigger updates for all components that depend on a state
236
236
  */
237
237
  triggerUpdate(t) {
238
- t.getDependents().forEach((n) => {
239
- const r = this.componentRenderFunctions.get(n);
240
- r && fe(r, n);
238
+ t.getDependents().forEach((r) => {
239
+ const n = this.componentRenderFunctions.get(r);
240
+ n && fe(n, r);
241
241
  });
242
242
  }
243
243
  /**
244
244
  * Clean up component dependencies when component is destroyed
245
245
  */
246
246
  cleanup(t) {
247
- const n = this.componentDependencies.get(t);
248
- n && (n.forEach((r) => r.removeDependent(t)), this.componentDependencies.delete(t)), this.componentRenderFunctions.delete(t);
249
- for (const r of Array.from(this.stateStorage.keys()))
250
- r.startsWith(t + ":") && this.stateStorage.delete(r);
247
+ const r = this.componentDependencies.get(t);
248
+ r && (r.forEach((n) => n.removeDependent(t)), this.componentDependencies.delete(t)), this.componentRenderFunctions.delete(t);
249
+ for (const n of Array.from(this.stateStorage.keys()))
250
+ n.startsWith(t + ":") && this.stateStorage.delete(n);
251
251
  this.stateIndexCounter.delete(t);
252
252
  }
253
253
  }
@@ -258,8 +258,8 @@ class He {
258
258
  constructor(t) {
259
259
  this._value = this.makeReactive(t);
260
260
  try {
261
- const n = Symbol.for("@cer/ReactiveState");
262
- Object.defineProperty(this, n, { value: !0, enumerable: !1, configurable: !1 });
261
+ const r = Symbol.for("@cer/ReactiveState");
262
+ Object.defineProperty(this, r, { value: !0, enumerable: !1, configurable: !1 });
263
263
  } catch {
264
264
  }
265
265
  }
@@ -284,14 +284,14 @@ class He {
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 : rt.createReactiveProxy(
287
+ return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : nt.createReactiveProxy(
288
288
  t,
289
289
  () => F.triggerUpdate(this),
290
- (n) => this.makeReactive(n)
290
+ (r) => this.makeReactive(r)
291
291
  );
292
292
  }
293
293
  }
294
- function fn(e) {
294
+ function ur(e) {
295
295
  return F.getOrCreateState(e === void 0 ? null : e);
296
296
  }
297
297
  function ee(e) {
@@ -307,7 +307,7 @@ function ee(e) {
307
307
  return !1;
308
308
  }
309
309
  }
310
- function dn(e) {
310
+ function fr(e) {
311
311
  const t = new He(e());
312
312
  return {
313
313
  get value() {
@@ -315,20 +315,20 @@ function dn(e) {
315
315
  }
316
316
  };
317
317
  }
318
- function pn(e, t, n = {}) {
319
- let r = e();
320
- n.immediate && t(r, r);
318
+ function dr(e, t, r = {}) {
319
+ let n = e();
320
+ r.immediate && t(n, n);
321
321
  const i = `watch-${Math.random().toString(36).substr(2, 9)}`, s = () => {
322
322
  F.setCurrentComponent(i, s);
323
323
  const o = e();
324
- F.clearCurrentComponent(), o !== r && (t(o, r), r = o);
324
+ F.clearCurrentComponent(), o !== n && (t(o, n), n = o);
325
325
  };
326
326
  return F.setCurrentComponent(i, s), e(), F.clearCurrentComponent(), () => {
327
327
  F.cleanup(i);
328
328
  };
329
329
  }
330
330
  const xe = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map(), Ue = 500;
331
- function ne(e) {
331
+ function re(e) {
332
332
  if (xe.has(e))
333
333
  return xe.get(e);
334
334
  const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
@@ -337,7 +337,7 @@ function ne(e) {
337
337
  function it(e) {
338
338
  if (ve.has(e))
339
339
  return ve.get(e);
340
- const t = e.replace(/-([a-z])/g, (n, r) => r.toUpperCase());
340
+ const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
341
341
  return ve.size < Ue && ve.set(e, t), t;
342
342
  }
343
343
  function ie(e) {
@@ -346,13 +346,13 @@ function ie(e) {
346
346
  return ke.get(e);
347
347
  const t = e.replace(
348
348
  /[&<>"']/g,
349
- (n) => ({
349
+ (r) => ({
350
350
  "&": "&amp;",
351
351
  "<": "&lt;",
352
352
  ">": "&gt;",
353
353
  '"': "&quot;",
354
354
  "'": "&#39;"
355
- })[n]
355
+ })[r]
356
356
  );
357
357
  return t !== e && ke.size < Ue && ke.set(e, t), t;
358
358
  }
@@ -360,16 +360,16 @@ function ie(e) {
360
360
  }
361
361
  function H(e, t) {
362
362
  if (typeof t == "string") {
363
- const n = t.split(".").reduce((r, i) => r?.[i], e);
364
- return ee(n) ? n.value : n;
363
+ const r = t.split(".").reduce((n, i) => n?.[i], e);
364
+ return ee(r) ? r.value : r;
365
365
  }
366
366
  return t;
367
367
  }
368
- function Ee(e, t, n) {
369
- const r = String(t).split("."), i = r.pop();
368
+ function Ee(e, t, r) {
369
+ const n = String(t).split("."), i = n.pop();
370
370
  if (!i) return;
371
- const s = r.reduce((o, a) => (o[a] == null && (o[a] = {}), o[a]), e);
372
- ee(s[i]) ? s[i].value = n : s[i] = n;
371
+ const s = n.reduce((o, a) => (o[a] == null && (o[a] = {}), o[a]), e);
372
+ ee(s[i]) ? s[i].value = r : s[i] = r;
373
373
  }
374
374
  const st = typeof process < "u" && process.env?.NODE_ENV !== "production";
375
375
  function se(e, ...t) {
@@ -378,40 +378,40 @@ function se(e, ...t) {
378
378
  function Oe(e, ...t) {
379
379
  st && console.warn(e, ...t);
380
380
  }
381
- function yt(e, t, n) {
382
- if (n)
383
- for (const [r, i] of Object.entries(n)) {
381
+ function mt(e, t, r) {
382
+ if (r)
383
+ for (const [n, i] of Object.entries(r)) {
384
384
  let s, o = {};
385
- if (Array.isArray(i) ? (s = i[0], o = i[1] || {}) : s = i, t.set(r, {
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: H(e, r)
388
+ oldValue: H(e, n)
389
389
  }), o.immediate)
390
390
  try {
391
- const a = H(e, r);
391
+ const a = H(e, n);
392
392
  s(a, void 0, e);
393
393
  } catch (a) {
394
- se(`Error in immediate watcher for "${r}":`, a);
394
+ se(`Error in immediate watcher for "${n}":`, a);
395
395
  }
396
396
  }
397
397
  }
398
- function mt(e, t, n, r) {
398
+ function yt(e, t, r, n) {
399
399
  const i = (o, a) => {
400
400
  if (o === a) return !0;
401
401
  if (typeof o != typeof a || typeof o != "object" || o === null || a === null) return !1;
402
402
  if (Array.isArray(o) && Array.isArray(a))
403
403
  return o.length !== a.length ? !1 : o.every((g, b) => i(g, a[b]));
404
- const u = Object.keys(o), y = Object.keys(a);
405
- return u.length !== y.length ? !1 : u.every((g) => i(o[g], a[g]));
406
- }, s = t.get(n);
407
- if (s && !i(r, s.oldValue))
404
+ const u = Object.keys(o), m = Object.keys(a);
405
+ return u.length !== m.length ? !1 : u.every((g) => i(o[g], a[g]));
406
+ }, s = t.get(r);
407
+ if (s && !i(n, s.oldValue))
408
408
  try {
409
- s.callback(r, s.oldValue, e), s.oldValue = r;
409
+ s.callback(n, s.oldValue, e), s.oldValue = n;
410
410
  } catch (o) {
411
- se(`Error in watcher for "${n}":`, o);
411
+ se(`Error in watcher for "${r}":`, o);
412
412
  }
413
413
  for (const [o, a] of t.entries())
414
- if (a.options.deep && n.startsWith(o + "."))
414
+ if (a.options.deep && r.startsWith(o + "."))
415
415
  try {
416
416
  const u = H(e, o);
417
417
  i(u, a.oldValue) || (a.callback(u, a.oldValue, e), a.oldValue = u);
@@ -422,32 +422,32 @@ function mt(e, t, n, r) {
422
422
  function Ke(e, t) {
423
423
  return t === Boolean ? e === "true" : t === Number ? Number(e) : e;
424
424
  }
425
- function bt(e, t, n) {
426
- t && Object.entries(t).forEach(([r, i]) => {
427
- const s = ne(r), o = e.getAttribute(s);
428
- if (i.type === Function && typeof e[r] == "function")
429
- n[r] = e[r];
430
- else if (typeof e[r] < "u")
425
+ function bt(e, t, r) {
426
+ t && Object.entries(t).forEach(([n, i]) => {
427
+ const s = re(n), o = e.getAttribute(s);
428
+ if (i.type === Function && typeof e[n] == "function")
429
+ r[n] = e[n];
430
+ else if (typeof e[n] < "u")
431
431
  try {
432
- const a = e[r];
433
- i.type === Boolean && typeof a == "boolean" || i.type === Number && typeof a == "number" || i.type === Function && typeof a == "function" ? n[r] = a : n[r] = ie(Ke(String(a), i.type));
432
+ const a = e[n];
433
+ i.type === Boolean && typeof a == "boolean" || i.type === Number && typeof a == "number" || i.type === Function && typeof a == "function" ? r[n] = a : r[n] = ie(Ke(String(a), i.type));
434
434
  } catch {
435
- n[r] = e[r];
435
+ r[n] = e[n];
436
436
  }
437
- else o !== null ? n[r] = ie(Ke(o, i.type)) : "default" in i && i.default !== void 0 && (n[r] = ie(i.default));
437
+ else o !== null ? r[n] = ie(Ke(o, i.type)) : "default" in i && i.default !== void 0 && (r[n] = ie(i.default));
438
438
  });
439
439
  }
440
- function wt(e, t, n) {
441
- t.props && bt(e, t.props, n);
440
+ function wt(e, t, r) {
441
+ t.props && bt(e, t.props, r);
442
442
  }
443
- function xt(e, t, n, r) {
444
- e.onConnected && !n && (e.onConnected(t), r(!0));
443
+ function xt(e, t, r, n) {
444
+ e.onConnected && !r && (e.onConnected(t), n(!0));
445
445
  }
446
- function vt(e, t, n, r, i, s, o, a) {
447
- e.onDisconnected && e.onDisconnected(t), n.forEach((u) => u()), r(), i(), s(!1), o(null), a(!1);
446
+ function vt(e, t, r, n, i, s, o, a) {
447
+ e.onDisconnected && e.onDisconnected(t), r.forEach((u) => u()), n(), i(), s(!1), o(null), a(!1);
448
448
  }
449
- function kt(e, t, n, r, i) {
450
- e.onAttributeChanged && e.onAttributeChanged(t, n, r, i);
449
+ function kt(e, t, r, n, i) {
450
+ e.onAttributeChanged && e.onAttributeChanged(t, r, n, i);
451
451
  }
452
452
  class Ct {
453
453
  static cache = /* @__PURE__ */ new Map();
@@ -470,14 +470,14 @@ class Ct {
470
470
  /fetch/i,
471
471
  /XMLHttpRequest/i
472
472
  ];
473
- static evaluate(t, n) {
474
- const r = this.cache.get(t);
475
- if (r) {
476
- if (!r.isSecure) {
473
+ static evaluate(t, r) {
474
+ const n = this.cache.get(t);
475
+ if (n) {
476
+ if (!n.isSecure) {
477
477
  Oe("Blocked cached dangerous expression:", t);
478
478
  return;
479
479
  }
480
- return r.evaluator(n);
480
+ return n.evaluator(r);
481
481
  }
482
482
  const i = this.createEvaluator(t);
483
483
  if (this.cache.size >= this.maxCacheSize) {
@@ -488,7 +488,7 @@ class Ct {
488
488
  Oe("Blocked dangerous expression:", t);
489
489
  return;
490
490
  }
491
- return i.evaluator(n);
491
+ return i.evaluator(r);
492
492
  }
493
493
  static createEvaluator(t) {
494
494
  if (this.hasDangerousPatterns(t))
@@ -499,28 +499,28 @@ class Ct {
499
499
  }, isSecure: !1 };
500
500
  try {
501
501
  return { evaluator: this.createSafeEvaluator(t), isSecure: !0 };
502
- } catch (n) {
503
- return Oe("Failed to create evaluator for expression:", t, n), { evaluator: () => {
502
+ } catch (r) {
503
+ return Oe("Failed to create evaluator for expression:", t, r), { evaluator: () => {
504
504
  }, isSecure: !1 };
505
505
  }
506
506
  }
507
507
  static hasDangerousPatterns(t) {
508
- return this.dangerousPatterns.some((n) => n.test(t));
508
+ return this.dangerousPatterns.some((r) => r.test(t));
509
509
  }
510
510
  static createSafeEvaluator(t) {
511
511
  if (t.trim().startsWith("{") && t.trim().endsWith("}"))
512
512
  return this.createObjectEvaluator(t);
513
513
  if (/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())) {
514
- const n = t.trim().slice(4);
515
- return (r) => H(r, n);
514
+ const r = t.trim().slice(4);
515
+ return (n) => H(n, r);
516
516
  }
517
- return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (n) => H(n, t);
517
+ return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => H(r, t);
518
518
  }
519
519
  static createObjectEvaluator(t) {
520
- const n = t.trim().slice(1, -1), r = this.parseObjectProperties(n);
520
+ const r = t.trim().slice(1, -1), n = this.parseObjectProperties(r);
521
521
  return (i) => {
522
522
  const s = {};
523
- for (const { key: o, value: a } of r)
523
+ for (const { key: o, value: a } of n)
524
524
  try {
525
525
  if (a.startsWith("ctx.")) {
526
526
  const u = a.slice(4);
@@ -534,51 +534,51 @@ class Ct {
534
534
  };
535
535
  }
536
536
  static parseObjectProperties(t) {
537
- const n = [], r = t.split(",");
538
- for (const i of r) {
537
+ const r = [], n = t.split(",");
538
+ for (const i of n) {
539
539
  const s = i.indexOf(":");
540
540
  if (s === -1) continue;
541
541
  const o = i.slice(0, s).trim(), a = i.slice(s + 1).trim(), u = o.replace(/^['"]|['"]$/g, "");
542
- n.push({ key: u, value: a });
542
+ r.push({ key: u, value: a });
543
543
  }
544
- return n;
544
+ return r;
545
545
  }
546
546
  static createSimpleEvaluator(t) {
547
- return (n) => {
547
+ return (r) => {
548
548
  try {
549
- let r = t;
549
+ let n = t;
550
550
  const i = [];
551
- r = r.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${i.push(b) - 1}#>>`);
552
- const s = r.match(/ctx\.[\w.]+/g) || [];
551
+ n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${i.push(b) - 1}#>>`);
552
+ const s = n.match(/ctx\.[\w.]+/g) || [];
553
553
  for (const b of s) {
554
- const h = b.slice(4), l = H(n, h);
554
+ const h = b.slice(4), l = H(r, h);
555
555
  if (l === void 0) return;
556
556
  const d = i.push(JSON.stringify(l)) - 1;
557
- r = r.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
557
+ n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
558
558
  }
559
- const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, a = r.match(o) || [];
559
+ const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, a = n.match(o) || [];
560
560
  for (const b of a) {
561
561
  if (b.startsWith("ctx.")) continue;
562
- const h = H(n, b);
562
+ const h = H(r, b);
563
563
  if (h === void 0) return;
564
564
  const l = i.push(JSON.stringify(h)) - 1;
565
- r = r.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${l}#>>`);
565
+ n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${l}#>>`);
566
566
  }
567
567
  const u = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
568
- let y;
568
+ let m;
569
569
  const g = /* @__PURE__ */ new Set();
570
- for (; (y = u.exec(r)) !== null; ) {
571
- const b = y[1];
570
+ for (; (m = u.exec(n)) !== null; ) {
571
+ const b = m[1];
572
572
  if (["true", "false", "null", "undefined"].includes(b) || /^[0-9]+$/.test(b) || b === "ctx" || g.has(b)) continue;
573
573
  g.add(b);
574
- const h = H(n, b);
574
+ const h = H(r, b);
575
575
  if (h === void 0) return;
576
576
  const l = JSON.stringify(h), d = i.push(l) - 1;
577
- b.includes(".") ? r = r.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`) : r = r.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${d}#>>`);
577
+ b.includes(".") ? n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`) : n = n.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${d}#>>`);
578
578
  }
579
- r = r.replace(/<<#(\d+)#>>/g, (b, h) => i[Number(h)]);
579
+ n = n.replace(/<<#(\d+)#>>/g, (b, h) => i[Number(h)]);
580
580
  try {
581
- return this.evaluateBasicExpression(r);
581
+ return this.evaluateBasicExpression(n);
582
582
  } catch {
583
583
  return;
584
584
  }
@@ -593,13 +593,13 @@ class Ct {
593
593
  * arithmetic (+ - * / %), comparisons, logical && and ||, parentheses, and ternary `a ? b : c`.
594
594
  */
595
595
  static evaluateBasicExpression(t) {
596
- const n = this.tokenize(t);
597
- let r = 0;
596
+ const r = this.tokenize(t);
597
+ let n = 0;
598
598
  function i() {
599
- return n[r];
599
+ return r[n];
600
600
  }
601
601
  function s(c) {
602
- const p = n[r++];
602
+ const p = r[n++];
603
603
  if (c && !p)
604
604
  throw new Error(`Unexpected token EOF, expected ${c}`);
605
605
  if (c && p && p.type !== c && p.value !== c)
@@ -615,21 +615,21 @@ class Ct {
615
615
  s("?");
616
616
  const p = o();
617
617
  s(":");
618
- const m = o();
619
- return c ? p : m;
618
+ const y = o();
619
+ return c ? p : y;
620
620
  }
621
621
  return c;
622
622
  }
623
623
  function u() {
624
- let c = y();
624
+ let c = m();
625
625
  for (; i() && i().value === "||"; ) {
626
626
  s("OP");
627
- const p = y();
627
+ const p = m();
628
628
  c = c || p;
629
629
  }
630
630
  return c;
631
631
  }
632
- function y() {
632
+ function m() {
633
633
  let c = g();
634
634
  for (; i() && i().value === "&&"; ) {
635
635
  s("OP");
@@ -641,19 +641,19 @@ class Ct {
641
641
  function g() {
642
642
  let c = b();
643
643
  for (; i() && ["==", "!=", "===", "!=="].includes(i().value); ) {
644
- const p = s("OP").value, m = b();
644
+ const p = s("OP").value, y = b();
645
645
  switch (p) {
646
646
  case "==":
647
- c = c == m;
647
+ c = c == y;
648
648
  break;
649
649
  case "!=":
650
- c = c != m;
650
+ c = c != y;
651
651
  break;
652
652
  case "===":
653
- c = c === m;
653
+ c = c === y;
654
654
  break;
655
655
  case "!==":
656
- c = c !== m;
656
+ c = c !== y;
657
657
  break;
658
658
  }
659
659
  }
@@ -662,19 +662,19 @@ class Ct {
662
662
  function b() {
663
663
  let c = h();
664
664
  for (; i() && [">", "<", ">=", "<="].includes(i().value); ) {
665
- const p = s("OP").value, m = h();
665
+ const p = s("OP").value, y = h();
666
666
  switch (p) {
667
667
  case ">":
668
- c = c > m;
668
+ c = c > y;
669
669
  break;
670
670
  case "<":
671
- c = c < m;
671
+ c = c < y;
672
672
  break;
673
673
  case ">=":
674
- c = c >= m;
674
+ c = c >= y;
675
675
  break;
676
676
  case "<=":
677
- c = c <= m;
677
+ c = c <= y;
678
678
  break;
679
679
  }
680
680
  }
@@ -683,24 +683,24 @@ class Ct {
683
683
  function h() {
684
684
  let c = l();
685
685
  for (; i() && (i().value === "+" || i().value === "-"); ) {
686
- const p = s("OP").value, m = l();
687
- c = p === "+" ? c + m : c - m;
686
+ const p = s("OP").value, y = l();
687
+ c = p === "+" ? c + y : c - y;
688
688
  }
689
689
  return c;
690
690
  }
691
691
  function l() {
692
692
  let c = d();
693
693
  for (; i() && (i().value === "*" || i().value === "/" || i().value === "%"); ) {
694
- const p = s("OP").value, m = d();
694
+ const p = s("OP").value, y = d();
695
695
  switch (p) {
696
696
  case "*":
697
- c = c * m;
697
+ c = c * y;
698
698
  break;
699
699
  case "/":
700
- c = c / m;
700
+ c = c / y;
701
701
  break;
702
702
  case "%":
703
- c = c % m;
703
+ c = c % y;
704
704
  break;
705
705
  }
706
706
  }
@@ -736,21 +736,21 @@ class Ct {
736
736
  return o();
737
737
  }
738
738
  static tokenize(t) {
739
- const n = [], r = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
739
+ const r = [], n = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
740
740
  let i;
741
- for (; (i = r.exec(t)) !== null; ) {
741
+ for (; (i = n.exec(t)) !== null; ) {
742
742
  const s = i[1];
743
- s && (/^\d/.test(s) ? n.push({ type: "NUMBER", value: s }) : /^"/.test(s) || /^'/.test(s) ? n.push({ type: "STRING", value: s }) : /^[a-zA-Z_]/.test(s) ? n.push({ type: "IDENT", value: s }) : /^[()?:,\[\]]$/.test(s) ? n.push({ type: "PUNC", value: s }) : n.push({ type: "OP", value: s }));
743
+ s && (/^\d/.test(s) ? r.push({ type: "NUMBER", value: s }) : /^"/.test(s) || /^'/.test(s) ? r.push({ type: "STRING", value: s }) : /^[a-zA-Z_]/.test(s) ? r.push({ type: "IDENT", value: s }) : /^[()?:,\[\]]$/.test(s) ? r.push({ type: "PUNC", value: s }) : r.push({ type: "OP", value: s }));
744
744
  }
745
- return n;
745
+ return r;
746
746
  }
747
- static evaluateSimpleValue(t, n) {
747
+ static evaluateSimpleValue(t, r) {
748
748
  if (t === "true") return !0;
749
749
  if (t === "false") return !1;
750
750
  if (!isNaN(Number(t))) return Number(t);
751
751
  if (t.startsWith("ctx.")) {
752
- const r = t.slice(4);
753
- return H(n, r);
752
+ const n = t.slice(4);
753
+ return H(r, n);
754
754
  }
755
755
  return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : t;
756
756
  }
@@ -766,9 +766,9 @@ class oe {
766
766
  /**
767
767
  * Add an event listener with automatic cleanup tracking
768
768
  */
769
- static addListener(t, n, r, i) {
770
- t.addEventListener(n, r, i);
771
- const o = { event: n, handler: r, options: i, cleanup: () => t.removeEventListener(n, r, i), addedAt: Date.now() };
769
+ static addListener(t, r, n, i) {
770
+ t.addEventListener(r, n, i);
771
+ const o = { event: r, handler: n, options: i, cleanup: () => t.removeEventListener(r, n, i), addedAt: Date.now() };
772
772
  this.cleanupFunctions.has(t) || this.cleanupFunctions.set(t, []);
773
773
  const a = this.cleanupFunctions.get(t);
774
774
  a.push(o), this.cleanupFunctions.get(t).__metaList = a;
@@ -776,13 +776,13 @@ class oe {
776
776
  /**
777
777
  * Remove a specific event listener
778
778
  */
779
- static removeListener(t, n, r, i) {
780
- t.removeEventListener(n, r, i);
779
+ static removeListener(t, r, n, i) {
780
+ t.removeEventListener(r, n, i);
781
781
  const s = this.cleanupFunctions.get(t);
782
782
  if (s) {
783
783
  const o = s.__metaList || null;
784
784
  if (o) {
785
- const a = o.findIndex((u) => u.event === n && u.handler === r && JSON.stringify(u.options) === JSON.stringify(i));
785
+ const a = o.findIndex((u) => u.event === r && u.handler === n && JSON.stringify(u.options) === JSON.stringify(i));
786
786
  if (a >= 0) {
787
787
  try {
788
788
  o[a].cleanup();
@@ -801,8 +801,8 @@ class oe {
801
801
  * Clean up all event listeners for an element
802
802
  */
803
803
  static cleanup(t) {
804
- const n = this.cleanupFunctions.get(t);
805
- n && ((n.__metaList || n).forEach((i) => {
804
+ const r = this.cleanupFunctions.get(t);
805
+ r && ((r.__metaList || r).forEach((i) => {
806
806
  try {
807
807
  typeof i == "function" ? i() : i && typeof i.cleanup == "function" && i.cleanup();
808
808
  } catch (s) {
@@ -824,34 +824,34 @@ class oe {
824
824
  * Check if an element has any tracked event listeners
825
825
  */
826
826
  static hasListeners(t) {
827
- const n = this.cleanupFunctions.get(t), r = n ? n.__metaList || n : void 0;
828
- return !!(r && r.length > 0);
827
+ const r = this.cleanupFunctions.get(t), n = r ? r.__metaList || r : void 0;
828
+ return !!(n && n.length > 0);
829
829
  }
830
830
  /**
831
831
  * Get the number of tracked event listeners for an element
832
832
  */
833
833
  static getListenerCount(t) {
834
- const n = this.cleanupFunctions.get(t), r = n ? n.__metaList || n : void 0;
835
- return r ? r.length : 0;
834
+ const r = this.cleanupFunctions.get(t), n = r ? r.__metaList || r : void 0;
835
+ return n ? n.length : 0;
836
836
  }
837
837
  }
838
838
  function ue(e, t) {
839
839
  if (t && e instanceof HTMLElement) {
840
840
  oe.cleanup(e);
841
- for (const n in t)
842
- t[n] === e && delete t[n];
843
- for (const n of Array.from(e.childNodes))
844
- ue(n, t);
841
+ for (const r in t)
842
+ t[r] === e && delete t[r];
843
+ for (const r of Array.from(e.childNodes))
844
+ ue(r, t);
845
845
  }
846
846
  }
847
- function he(e, t, n) {
847
+ function he(e, t, r) {
848
848
  if (typeof e == "string") return;
849
- const r = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
850
- r ? r.value = t : i && n && (n[i] = t);
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
+ n ? n.value = t : i && r && (r[i] = t);
851
851
  }
852
- function _t(e, t, n, r, i, s, o, a) {
852
+ function _t(e, t, r, n, i, s, o, a) {
853
853
  if (!s) return;
854
- const u = t.includes("lazy"), y = t.includes("trim"), g = t.includes("number"), b = e && typeof e == "object" && "value" in e && typeof e.value < "u", h = () => {
854
+ const u = t.includes("lazy"), m = t.includes("trim"), g = t.includes("number"), b = e && typeof e == "object" && "value" in e && typeof e.value < "u", h = () => {
855
855
  if (b) {
856
856
  const C = e.value;
857
857
  return a && typeof C == "object" && C !== null ? C[a] : C;
@@ -859,17 +859,17 @@ function _t(e, t, n, r, i, s, o, a) {
859
859
  return H(s._state || s, e);
860
860
  }, l = h();
861
861
  let d = "text";
862
- o instanceof HTMLInputElement ? d = r?.type || o.type || "text" : o instanceof HTMLSelectElement ? d = "select" : o instanceof HTMLTextAreaElement && (d = "textarea");
862
+ o instanceof HTMLInputElement ? d = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? d = "select" : o instanceof HTMLTextAreaElement && (d = "textarea");
863
863
  const x = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, c = x ? d === "checkbox" || d === "radio" ? "checked" : "value" : a ?? "modelValue";
864
864
  if (d === "checkbox")
865
865
  if (Array.isArray(l))
866
- n[c] = l.includes(String(o?.getAttribute("value") ?? r?.value ?? ""));
866
+ r[c] = l.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
867
867
  else {
868
868
  const C = o?.getAttribute("true-value") ?? !0;
869
- n[c] = l === C;
869
+ r[c] = l === C;
870
870
  }
871
871
  else if (d === "radio")
872
- n[c] = l === (r?.value ?? "");
872
+ r[c] = l === (n?.value ?? "");
873
873
  else if (d === "select")
874
874
  if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
875
875
  const C = Array.isArray(l) ? l.map(String) : [];
@@ -877,18 +877,18 @@ function _t(e, t, n, r, i, s, o, a) {
877
877
  Array.from(o.options).forEach((k) => {
878
878
  k.selected = C.includes(k.value);
879
879
  });
880
- }, 0), n[c] = Array.isArray(l) ? l : [];
880
+ }, 0), r[c] = Array.isArray(l) ? l : [];
881
881
  } else
882
- n[c] = l;
882
+ r[c] = l;
883
883
  else {
884
- n[c] = l;
884
+ r[c] = l;
885
885
  try {
886
- const C = ne(c);
887
- r && (r[C] = l);
886
+ const C = re(c);
887
+ n && (n[C] = l);
888
888
  } catch {
889
889
  }
890
890
  }
891
- const p = u || d === "checkbox" || d === "radio" || d === "select" ? "change" : "input", m = (C) => {
891
+ const p = u || d === "checkbox" || d === "radio" || d === "select" ? "change" : "input", y = (C) => {
892
892
  if (C.isComposing || i._isComposing) return;
893
893
  const k = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
894
894
  if (C.isTrusted === !1 && !k) return;
@@ -914,7 +914,7 @@ function _t(e, t, n, r, i, s, o, a) {
914
914
  v = f.getAttribute("value") ?? f.value;
915
915
  else if (d === "select" && f.multiple)
916
916
  v = Array.from(f.selectedOptions).map((T) => T.value);
917
- else if (y && typeof v == "string" && (v = v.trim()), g) {
917
+ else if (m && typeof v == "string" && (v = v.trim()), g) {
918
918
  const T = Number(v);
919
919
  isNaN(T) || (v = T);
920
920
  }
@@ -935,7 +935,7 @@ function _t(e, t, n, r, i, s, o, a) {
935
935
  s._triggerWatchers(T, v);
936
936
  }
937
937
  if (f) {
938
- const T = `update:${ne(c)}`, R = new CustomEvent(T, {
938
+ const T = `update:${re(c)}`, R = new CustomEvent(T, {
939
939
  detail: v,
940
940
  bubbles: !0,
941
941
  composed: !0
@@ -952,9 +952,9 @@ function _t(e, t, n, r, i, s, o, a) {
952
952
  const C = i[p];
953
953
  o && oe.removeListener(o, p, C);
954
954
  }
955
- i[p] = m;
955
+ i[p] = y;
956
956
  } else {
957
- const C = `update:${ne(c)}`;
957
+ const C = `update:${re(c)}`;
958
958
  if (i[C]) {
959
959
  const k = i[C];
960
960
  o && oe.removeListener(o, C, k);
@@ -967,7 +967,7 @@ function _t(e, t, n, r, i, s, o, a) {
967
967
  if ($) {
968
968
  $[c] = v;
969
969
  try {
970
- const T = ne(c);
970
+ const T = re(c);
971
971
  typeof v == "boolean" ? v ? $.setAttribute(T, "true") : $.setAttribute(T, "false") : $.setAttribute(T, String(v));
972
972
  } catch {
973
973
  }
@@ -984,7 +984,7 @@ function _t(e, t, n, r, i, s, o, a) {
984
984
  k && setTimeout(() => {
985
985
  const f = k.value, v = s._state || s, A = H(v, e);
986
986
  let _ = f;
987
- if (y && (_ = _.trim()), g) {
987
+ if (m && (_ = _.trim()), g) {
988
988
  const T = Number(_);
989
989
  isNaN(T) || (_ = T);
990
990
  }
@@ -1003,38 +1003,38 @@ function ot(e) {
1003
1003
  const t = e.slice(2);
1004
1004
  return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
1005
1005
  }
1006
- function Et(e, t, n, r) {
1006
+ function Et(e, t, r, n) {
1007
1007
  if (typeof e == "object" && e !== null)
1008
1008
  for (const [i, s] of Object.entries(e))
1009
- i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? n[i] = s : t[i] = s;
1009
+ i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? r[i] = s : t[i] = s;
1010
1010
  else if (typeof e == "string") {
1011
- if (!r) return;
1011
+ if (!n) return;
1012
1012
  try {
1013
- const i = ye(e, r);
1013
+ const i = me(e, n);
1014
1014
  if (typeof i == "object" && i !== null) {
1015
1015
  for (const [s, o] of Object.entries(i))
1016
- s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? n[s] = o : t[s] = o;
1016
+ s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? r[s] = o : t[s] = o;
1017
1017
  return;
1018
1018
  } else {
1019
- n[e] = i;
1019
+ r[e] = i;
1020
1020
  return;
1021
1021
  }
1022
1022
  } catch {
1023
- const i = H(r, e);
1024
- n[e] = i;
1023
+ const i = H(n, e);
1024
+ r[e] = i;
1025
1025
  }
1026
1026
  }
1027
1027
  }
1028
- function $t(e, t, n) {
1029
- let r;
1028
+ function $t(e, t, r) {
1029
+ let n;
1030
1030
  if (typeof e == "string") {
1031
- if (!n) return;
1032
- r = ye(e, n);
1031
+ if (!r) return;
1032
+ n = me(e, r);
1033
1033
  } else
1034
- r = e;
1034
+ n = e;
1035
1035
  const i = t.style || "";
1036
1036
  let s = i;
1037
- if (r) {
1037
+ if (n) {
1038
1038
  if (i) {
1039
1039
  const o = i.split(";").map((u) => u.trim()).filter(Boolean), a = o.findIndex(
1040
1040
  (u) => u.startsWith("display:")
@@ -1050,36 +1050,36 @@ function $t(e, t, n) {
1050
1050
  s = "display: none";
1051
1051
  s !== i && (s ? t.style = s : delete t.style);
1052
1052
  }
1053
- function ye(e, t) {
1053
+ function me(e, t) {
1054
1054
  return Ct.evaluate(e, t);
1055
1055
  }
1056
- function St(e, t, n) {
1057
- let r;
1056
+ function St(e, t, r) {
1057
+ let n;
1058
1058
  if (typeof e == "string") {
1059
- if (!n) return;
1060
- r = ye(e, n);
1059
+ if (!r) return;
1060
+ n = me(e, r);
1061
1061
  } else
1062
- r = e;
1062
+ n = e;
1063
1063
  let i = [];
1064
- typeof r == "string" ? i = [r] : Array.isArray(r) ? i = r.filter(Boolean) : typeof r == "object" && r !== null && (i = Object.entries(r).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
1064
+ typeof n == "string" ? i = [n] : Array.isArray(n) ? i = n.filter(Boolean) : typeof n == "object" && n !== null && (i = Object.entries(n).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
1065
1065
  const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
1066
1066
  o && (t.class = o);
1067
1067
  }
1068
- function At(e, t, n) {
1069
- let r;
1068
+ function At(e, t, r) {
1069
+ let n;
1070
1070
  if (typeof e == "string") {
1071
- if (!n) return;
1072
- r = ye(e, n);
1071
+ if (!r) return;
1072
+ n = me(e, r);
1073
1073
  } else
1074
- r = e;
1074
+ n = e;
1075
1075
  let i = "";
1076
- if (typeof r == "string")
1077
- i = r;
1078
- else if (r && typeof r == "object") {
1076
+ if (typeof n == "string")
1077
+ i = n;
1078
+ else if (n && typeof n == "object") {
1079
1079
  const o = [];
1080
- for (const [a, u] of Object.entries(r))
1080
+ for (const [a, u] of Object.entries(n))
1081
1081
  if (u != null && u !== "") {
1082
- const y = a.replace(
1082
+ const m = a.replace(
1083
1083
  /[A-Z]/g,
1084
1084
  (h) => `-${h.toLowerCase()}`
1085
1085
  ), g = [
@@ -1109,51 +1109,51 @@ function At(e, t, n) {
1109
1109
  "max-height"
1110
1110
  ];
1111
1111
  let b = String(u);
1112
- typeof u == "number" && g.includes(y) && (b = `${u}px`), o.push(`${y}: ${b}`);
1112
+ typeof u == "number" && g.includes(m) && (b = `${u}px`), o.push(`${m}: ${b}`);
1113
1113
  }
1114
1114
  i = o.join("; ") + (o.length > 0 ? ";" : "");
1115
1115
  }
1116
1116
  const s = t.style || "";
1117
1117
  t.style = s + (s && !s.endsWith(";") ? "; " : "") + i;
1118
1118
  }
1119
- function Tt(e, t, n) {
1120
- let r = e;
1121
- typeof e == "string" && n && (r = ye(e, n)), ee(r) ? t.reactiveRef = r : t.ref = r;
1119
+ function Tt(e, t, r) {
1120
+ let n = e;
1121
+ typeof e == "string" && r && (n = me(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
1122
1122
  }
1123
- function at(e, t, n, r) {
1124
- const i = {}, s = { ...r || {} }, o = {};
1123
+ function at(e, t, r, n) {
1124
+ const i = {}, s = { ...n || {} }, o = {};
1125
1125
  for (const [a, u] of Object.entries(e)) {
1126
- const { value: y, modifiers: g, arg: b } = u;
1126
+ const { value: m, modifiers: g, arg: b } = u;
1127
1127
  if (a === "model" || a.startsWith("model:")) {
1128
1128
  const h = a.split(":"), l = h.length > 1 ? h[1] : b;
1129
1129
  _t(
1130
- y,
1130
+ m,
1131
1131
  // Pass the original value (could be string or reactive state object)
1132
1132
  g,
1133
1133
  i,
1134
1134
  s,
1135
1135
  o,
1136
1136
  t,
1137
- n,
1137
+ r,
1138
1138
  l
1139
1139
  );
1140
1140
  continue;
1141
1141
  }
1142
1142
  switch (a) {
1143
1143
  case "bind":
1144
- Et(y, i, s, t);
1144
+ Et(m, i, s, t);
1145
1145
  break;
1146
1146
  case "show":
1147
- $t(y, s, t);
1147
+ $t(m, s, t);
1148
1148
  break;
1149
1149
  case "class":
1150
- St(y, s, t);
1150
+ St(m, s, t);
1151
1151
  break;
1152
1152
  case "style":
1153
- At(y, s, t);
1153
+ At(m, s, t);
1154
1154
  break;
1155
1155
  case "ref":
1156
- Tt(y, i, t);
1156
+ Tt(m, i, t);
1157
1157
  break;
1158
1158
  }
1159
1159
  }
@@ -1179,36 +1179,36 @@ function Be(e, t) {
1179
1179
  ].find((d) => d != null) ?? "";
1180
1180
  a = l ? `${t}:${b}:${l}` : `${t}:${b}`;
1181
1181
  }
1182
- let u = a, y = 1;
1182
+ let u = a, m = 1;
1183
1183
  for (; s.has(u); )
1184
- u = `${a}#${y++}`;
1184
+ u = `${a}#${m++}`;
1185
1185
  s.add(u);
1186
1186
  let g = o.children;
1187
1187
  return Array.isArray(g) && (g = Be(g, u)), { ...o, key: u, children: g };
1188
1188
  });
1189
1189
  }
1190
- const n = e;
1191
- let r = n.props?.key ?? n.key ?? t, i = n.children;
1192
- return Array.isArray(i) && (i = Be(i, r)), { ...n, key: r, children: i };
1190
+ const r = e;
1191
+ let n = r.props?.key ?? r.key ?? t, i = r.children;
1192
+ return Array.isArray(i) && (i = Be(i, n)), { ...r, key: n, children: i };
1193
1193
  }
1194
- function Ve(e, t, n, r) {
1195
- const i = n.directives ?? {}, s = at(
1194
+ function Ve(e, t, r, n) {
1195
+ const i = r.directives ?? {}, s = at(
1196
1196
  i,
1197
- r,
1197
+ n,
1198
1198
  e,
1199
- n.attrs
1199
+ r.attrs
1200
1200
  ), o = {
1201
1201
  ...t.props,
1202
- ...n.props,
1202
+ ...r.props,
1203
1203
  ...s.props
1204
1204
  }, a = {
1205
1205
  ...t.attrs,
1206
- ...n.attrs,
1206
+ ...r.attrs,
1207
1207
  ...s.attrs
1208
- }, u = t.props ?? {}, y = o, g = n?.isCustomElement ?? t?.isCustomElement ?? !1;
1208
+ }, u = t.props ?? {}, m = o, g = r?.isCustomElement ?? t?.isCustomElement ?? !1;
1209
1209
  let b = !1;
1210
- for (const d in { ...u, ...y }) {
1211
- const x = u[d], w = y[d];
1210
+ for (const d in { ...u, ...m }) {
1211
+ const x = u[d], w = m[d];
1212
1212
  if (x !== w)
1213
1213
  if (b = !0, d === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1214
1214
  e.value !== w && (e.value = w ?? "");
@@ -1219,7 +1219,7 @@ function Ve(e, t, n, r) {
1219
1219
  typeof x == "function" && oe.removeListener(e, c, x), oe.addListener(e, c, w);
1220
1220
  } else if (w == null)
1221
1221
  e.removeAttribute(d);
1222
- else if ((n?.isCustomElement ?? t?.isCustomElement ?? !1) || d in e)
1222
+ else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || d in e)
1223
1223
  try {
1224
1224
  e[d] = w;
1225
1225
  } catch {
@@ -1298,15 +1298,15 @@ function Ve(e, t, n, r) {
1298
1298
  e.setAttribute(d, String(p));
1299
1299
  continue;
1300
1300
  }
1301
- const m = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
- if (g && !m && d.includes("-")) {
1301
+ const y = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
+ if (g && !y && d.includes("-")) {
1303
1303
  const C = it(d);
1304
1304
  try {
1305
1305
  e[C] = p;
1306
1306
  } catch {
1307
1307
  e.setAttribute(d, String(p));
1308
1308
  }
1309
- } else if (!m && d in e)
1309
+ } else if (!y && d in e)
1310
1310
  try {
1311
1311
  e[d] = p;
1312
1312
  } catch {
@@ -1327,7 +1327,7 @@ function Ve(e, t, n, r) {
1327
1327
  } catch {
1328
1328
  }
1329
1329
  }
1330
- function X(e, t, n) {
1330
+ function X(e, t, r) {
1331
1331
  if (typeof e == "string")
1332
1332
  return document.createTextNode(e);
1333
1333
  if (e.tag === "#text") {
@@ -1347,70 +1347,70 @@ function X(e, t, n) {
1347
1347
  }
1348
1348
  return w.appendChild(x), w;
1349
1349
  }
1350
- const r = document.createElement(e.tag);
1351
- e.key != null && (r.key = e.key);
1352
- const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, a = at(o, t, r, s), u = {
1350
+ const n = document.createElement(e.tag);
1351
+ e.key != null && (n.key = e.key);
1352
+ const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, a = at(o, t, n, s), u = {
1353
1353
  ...i,
1354
1354
  ...a.props
1355
- }, y = {
1355
+ }, m = {
1356
1356
  ...s,
1357
1357
  ...a.attrs
1358
- }, g = r.namespaceURI === "http://www.w3.org/2000/svg";
1359
- for (const h in y) {
1360
- const l = y[h];
1358
+ }, g = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
+ for (const h in m) {
1360
+ const l = m[h];
1361
1361
  if (!(typeof h != "string" || /\[object Object\]/.test(h))) {
1362
1362
  if (typeof l == "boolean")
1363
- l && r.setAttribute(h, "");
1363
+ l && n.setAttribute(h, "");
1364
1364
  else if (l != null)
1365
- if (!g && h === "value" && (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement || r instanceof HTMLProgressElement))
1365
+ if (!g && h === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1366
1366
  try {
1367
- r instanceof HTMLProgressElement ? r.value = Number(l) : r.value = l ?? "";
1367
+ n instanceof HTMLProgressElement ? n.value = Number(l) : n.value = l ?? "";
1368
1368
  } catch {
1369
- r.setAttribute(h, String(l));
1369
+ n.setAttribute(h, String(l));
1370
1370
  }
1371
- else if (!g && h === "checked" && r instanceof HTMLInputElement)
1371
+ else if (!g && h === "checked" && n instanceof HTMLInputElement)
1372
1372
  try {
1373
- r.checked = !!l;
1373
+ n.checked = !!l;
1374
1374
  } catch {
1375
- r.setAttribute(h, String(l));
1375
+ n.setAttribute(h, String(l));
1376
1376
  }
1377
- else if (!g && h in r)
1377
+ else if (!g && h in n)
1378
1378
  try {
1379
- r[h] = l;
1379
+ n[h] = l;
1380
1380
  } catch {
1381
- r.setAttribute(h, String(l));
1381
+ n.setAttribute(h, String(l));
1382
1382
  }
1383
1383
  else if ((e.props?.isCustomElement ?? !1) && !g && h.includes("-")) {
1384
1384
  const x = it(h);
1385
1385
  try {
1386
- r[x] = l;
1386
+ n[x] = l;
1387
1387
  } catch {
1388
- r.setAttribute(h, String(l));
1388
+ n.setAttribute(h, String(l));
1389
1389
  }
1390
1390
  } else
1391
- r.setAttribute(h, String(l));
1391
+ n.setAttribute(h, String(l));
1392
1392
  }
1393
1393
  }
1394
1394
  for (const h in u) {
1395
1395
  const l = u[h];
1396
1396
  if (!(typeof h != "string" || /\[object Object\]/.test(h)))
1397
- if (h === "value" && (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement)) {
1397
+ if (h === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1398
1398
  const d = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1399
- r.value = d ?? "";
1400
- } else if (h === "checked" && r instanceof HTMLInputElement) {
1399
+ n.value = d ?? "";
1400
+ } else if (h === "checked" && n instanceof HTMLInputElement) {
1401
1401
  const d = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1402
- r.checked = !!d;
1402
+ n.checked = !!d;
1403
1403
  } else if (h.startsWith("on") && typeof l == "function")
1404
- oe.addListener(r, ot(h), l);
1404
+ oe.addListener(n, ot(h), l);
1405
1405
  else {
1406
1406
  if (h.startsWith("on") && l === void 0)
1407
1407
  continue;
1408
1408
  if (l == null || l === !1)
1409
- r.removeAttribute(h);
1410
- else if ((e.props?.isCustomElement ?? !1) || h in r)
1409
+ n.removeAttribute(h);
1410
+ else if ((e.props?.isCustomElement ?? !1) || h in n)
1411
1411
  try {
1412
1412
  const x = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1413
- r[h] = x;
1413
+ n[h] = x;
1414
1414
  } catch {
1415
1415
  }
1416
1416
  }
@@ -1418,7 +1418,7 @@ function X(e, t, n) {
1418
1418
  for (const [h, l] of Object.entries(
1419
1419
  a.listeners || {}
1420
1420
  ))
1421
- oe.addListener(r, h, l);
1421
+ oe.addListener(n, h, l);
1422
1422
  const b = {
1423
1423
  ...e,
1424
1424
  props: {
@@ -1426,36 +1426,36 @@ function X(e, t, n) {
1426
1426
  ...a.props
1427
1427
  }
1428
1428
  };
1429
- he(b, r, n);
1429
+ he(b, n, r);
1430
1430
  try {
1431
- if (typeof r._applyProps == "function")
1431
+ if (typeof n._applyProps == "function")
1432
1432
  try {
1433
- r._applyProps(r._cfg);
1433
+ n._applyProps(n._cfg);
1434
1434
  } catch {
1435
1435
  }
1436
- typeof r.requestRender == "function" ? r.requestRender() : typeof r._render == "function" && r._render(r._cfg);
1436
+ typeof n.requestRender == "function" ? n.requestRender() : typeof n._render == "function" && n._render(n._cfg);
1437
1437
  } catch {
1438
1438
  }
1439
1439
  if (Array.isArray(e.children))
1440
1440
  for (const h of e.children)
1441
- r.appendChild(X(h, t, n));
1442
- else typeof e.children == "string" && (r.textContent = e.children);
1441
+ n.appendChild(X(h, t, r));
1442
+ else typeof e.children == "string" && (n.textContent = e.children);
1443
1443
  try {
1444
- if (r instanceof HTMLSelectElement && y && y.hasOwnProperty("value"))
1444
+ if (n instanceof HTMLSelectElement && m && m.hasOwnProperty("value"))
1445
1445
  try {
1446
- r.value = y.value ?? "";
1446
+ n.value = m.value ?? "";
1447
1447
  } catch {
1448
1448
  }
1449
1449
  } catch {
1450
1450
  }
1451
- return r;
1451
+ return n;
1452
1452
  }
1453
- function Rt(e, t, n, r, i) {
1454
- if (typeof n == "string") {
1455
- e.textContent !== n && (e.textContent = n);
1453
+ function Rt(e, t, r, n, i) {
1454
+ if (typeof r == "string") {
1455
+ e.textContent !== r && (e.textContent = r);
1456
1456
  return;
1457
1457
  }
1458
- if (!Array.isArray(n)) return;
1458
+ if (!Array.isArray(r)) return;
1459
1459
  const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
1460
1460
  for (const l of o)
1461
1461
  l && l.key != null && a.set(l.key, l);
@@ -1464,11 +1464,11 @@ function Rt(e, t, n, r, i) {
1464
1464
  const d = l.key;
1465
1465
  d != null && u.set(d, l);
1466
1466
  }
1467
- const y = /* @__PURE__ */ new Set();
1467
+ const m = /* @__PURE__ */ new Set();
1468
1468
  let g = e.firstChild;
1469
1469
  function b(l, d) {
1470
1470
  let x = l;
1471
- for (; x && (y.add(x), x !== d); )
1471
+ for (; x && (m.add(x), x !== d); )
1472
1472
  x = x.nextSibling;
1473
1473
  }
1474
1474
  function h(l, d, x, w) {
@@ -1476,10 +1476,10 @@ function Rt(e, t, n, r, i) {
1476
1476
  let p = l.nextSibling;
1477
1477
  for (; p && p !== d; )
1478
1478
  c.push(p), p = p.nextSibling;
1479
- const m = Array.isArray(x) ? x : [];
1480
- if (w.some((k) => k && k.key != null) || m.some((k) => k && k.key != null)) {
1479
+ const y = Array.isArray(x) ? x : [];
1480
+ if (w.some((k) => k && k.key != null) || y.some((k) => k && k.key != null)) {
1481
1481
  const k = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1482
- for (const _ of m)
1482
+ for (const _ of y)
1483
1483
  _ && _.key != null && k.set(_.key, _);
1484
1484
  for (const _ of c) {
1485
1485
  const $ = _.key;
@@ -1495,48 +1495,48 @@ function Rt(e, t, n, r, i) {
1495
1495
  f.get(_.key),
1496
1496
  T,
1497
1497
  _,
1498
- r
1498
+ n
1499
1499
  ), v.add($), $ !== A && e.contains($) && e.insertBefore($, A);
1500
1500
  } else
1501
- $ = X(_, r), e.insertBefore($, A), v.add($);
1501
+ $ = X(_, n), e.insertBefore($, A), v.add($);
1502
1502
  A = $.nextSibling;
1503
1503
  }
1504
1504
  for (const _ of c)
1505
1505
  !v.has(_) && e.contains(_) && e.removeChild(_);
1506
1506
  } else {
1507
1507
  const k = Math.min(
1508
- m.length,
1508
+ y.length,
1509
1509
  w.length
1510
1510
  );
1511
1511
  for (let f = 0; f < k; f++) {
1512
- const v = m[f], A = w[f], _ = $e(c[f], v, A, r);
1512
+ const v = y[f], A = w[f], _ = $e(c[f], v, A, n);
1513
1513
  _ !== c[f] && (e.insertBefore(_, c[f]), e.removeChild(c[f]));
1514
1514
  }
1515
1515
  for (let f = k; f < w.length; f++)
1516
- e.insertBefore(X(w[f], r), d);
1516
+ e.insertBefore(X(w[f], n), d);
1517
1517
  for (let f = k; f < c.length; f++)
1518
1518
  e.removeChild(c[f]);
1519
1519
  }
1520
1520
  }
1521
- for (const l of n) {
1521
+ for (const l of r) {
1522
1522
  let d;
1523
1523
  if (l.tag === "#anchor") {
1524
1524
  const x = l.key, w = `${x}:start`, c = `${x}:end`;
1525
- let p = u.get(w), m = u.get(c);
1525
+ let p = u.get(w), y = u.get(c);
1526
1526
  const C = Array.isArray(l.children) ? l.children : [];
1527
- if (p || (p = document.createTextNode(""), p.key = w), m || (m = document.createTextNode(""), m.key = c), l._startNode = p, l._endNode = m, !e.contains(p) || !e.contains(m)) {
1527
+ if (p || (p = document.createTextNode(""), p.key = w), y || (y = document.createTextNode(""), y.key = c), l._startNode = p, l._endNode = y, !e.contains(p) || !e.contains(y)) {
1528
1528
  e.insertBefore(p, g);
1529
1529
  for (const k of C)
1530
- e.insertBefore(X(k, r), g);
1531
- e.insertBefore(m, g);
1530
+ e.insertBefore(X(k, n), g);
1531
+ e.insertBefore(y, g);
1532
1532
  } else
1533
1533
  h(
1534
1534
  p,
1535
- m,
1535
+ y,
1536
1536
  a.get(x)?.children,
1537
1537
  C
1538
1538
  );
1539
- b(p, m), g = m.nextSibling;
1539
+ b(p, y), g = y.nextSibling;
1540
1540
  continue;
1541
1541
  }
1542
1542
  if (l.key != null && u.has(l.key)) {
@@ -1545,71 +1545,71 @@ function Rt(e, t, n, r, i) {
1545
1545
  u.get(l.key),
1546
1546
  x,
1547
1547
  l,
1548
- r,
1548
+ n,
1549
1549
  i
1550
- ), y.add(d), d !== g && e.contains(d) && (g && !e.contains(g) && (g = null), e.insertBefore(d, g));
1550
+ ), m.add(d), d !== g && e.contains(d) && (g && !e.contains(g) && (g = null), e.insertBefore(d, g));
1551
1551
  } else
1552
- d = X(l, r, i), g && !e.contains(g) && (g = null), e.insertBefore(d, g), y.add(d);
1552
+ d = X(l, n, i), g && !e.contains(g) && (g = null), e.insertBefore(d, g), m.add(d);
1553
1553
  g = d.nextSibling;
1554
1554
  }
1555
1555
  for (const l of s)
1556
- !y.has(l) && e.contains(l) && (ue(l, i), e.removeChild(l));
1556
+ !m.has(l) && e.contains(l) && (ue(l, i), e.removeChild(l));
1557
1557
  }
1558
- function $e(e, t, n, r, i) {
1559
- if (t && typeof t != "string" && t.props?.ref && i && ue(e, i), t === n) return e;
1560
- if (typeof n == "string") {
1558
+ function $e(e, t, r, n, i) {
1559
+ if (t && typeof t != "string" && t.props?.ref && i && ue(e, i), t === r) return e;
1560
+ if (typeof r == "string") {
1561
1561
  if (e.nodeType === Node.TEXT_NODE)
1562
- return e.textContent !== n && (e.textContent = n), e;
1562
+ return e.textContent !== r && (e.textContent = r), e;
1563
1563
  {
1564
- const o = document.createTextNode(n);
1564
+ const o = document.createTextNode(r);
1565
1565
  return e.parentNode?.replaceChild(o, e), o;
1566
1566
  }
1567
1567
  }
1568
- if (n && typeof n != "string" && n.tag === "#anchor") {
1569
- const o = n, a = Array.isArray(o.children) ? o.children : [], u = o._startNode ?? document.createTextNode(""), y = o._endNode ?? document.createTextNode("");
1570
- o.key != null && (u.key = `${o.key}:start`, y.key = `${o.key}:end`), o._startNode = u, o._endNode = y;
1568
+ if (r && typeof r != "string" && r.tag === "#anchor") {
1569
+ const o = r, a = Array.isArray(o.children) ? o.children : [], u = o._startNode ?? document.createTextNode(""), m = o._endNode ?? document.createTextNode("");
1570
+ o.key != null && (u.key = `${o.key}:start`, m.key = `${o.key}:end`), o._startNode = u, o._endNode = m;
1571
1571
  const g = document.createDocumentFragment();
1572
1572
  g.appendChild(u);
1573
1573
  for (const b of a) {
1574
- const h = X(b, r);
1574
+ const h = X(b, n);
1575
1575
  g.appendChild(h);
1576
1576
  }
1577
- return g.appendChild(y), e.parentNode?.replaceChild(g, e), u;
1577
+ return g.appendChild(m), e.parentNode?.replaceChild(g, e), u;
1578
1578
  }
1579
- if (!n) {
1579
+ if (!r) {
1580
1580
  ue(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
1585
  ue(e, i);
1586
- const o = X(n, r, i);
1587
- return he(n, o, i), e.parentNode?.replaceChild(o, e), o;
1588
- }
1589
- if (n.tag === "#anchor") {
1590
- const o = Array.isArray(n.children) ? n.children : [], a = n._startNode ?? document.createTextNode(""), u = n._endNode ?? document.createTextNode("");
1591
- n.key != null && (a.key = `${n.key}:start`, u.key = `${n.key}:end`), n._startNode = a, n._endNode = u;
1592
- const y = document.createDocumentFragment();
1593
- y.appendChild(a);
1586
+ const o = X(r, n, i);
1587
+ return he(r, o, i), e.parentNode?.replaceChild(o, e), o;
1588
+ }
1589
+ if (r.tag === "#anchor") {
1590
+ const o = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), u = r._endNode ?? document.createTextNode("");
1591
+ r.key != null && (a.key = `${r.key}:start`, u.key = `${r.key}:end`), r._startNode = a, r._endNode = u;
1592
+ const m = document.createDocumentFragment();
1593
+ m.appendChild(a);
1594
1594
  for (const g of o)
1595
- y.appendChild(X(g, r));
1596
- return y.appendChild(u), e.parentNode?.replaceChild(y, e), a;
1595
+ m.appendChild(X(g, n));
1596
+ return m.appendChild(u), e.parentNode?.replaceChild(m, e), a;
1597
1597
  }
1598
- if (typeof t != "string" && typeof n != "string" && t.tag === n.tag && t.key === n.key) {
1598
+ if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
1599
1599
  const o = e;
1600
- return Ve(o, t.props || {}, n.props || {}, r), Rt(o, t.children, n.children, r, i), he(n, o, i), o;
1600
+ return Ve(o, t.props || {}, r.props || {}, n), Rt(o, t.children, r.children, n, i), he(r, o, i), o;
1601
1601
  }
1602
- if (typeof t != "string" && typeof n != "string" && t.tag === n.tag && (t.tag && String(t.tag).includes("-") || n.props && n.props.isCustomElement || t.props && t.props.isCustomElement))
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 a = e;
1605
- return Ve(a, t.props || {}, n.props || {}, r), he(n, a, i), a;
1605
+ return Ve(a, t.props || {}, r.props || {}, n), he(r, a, i), a;
1606
1606
  } catch {
1607
1607
  }
1608
1608
  ue(e, i);
1609
- const s = X(n, r, i);
1610
- return he(n, s, i), e.parentNode?.replaceChild(s, e), s;
1609
+ const s = X(r, n, i);
1610
+ return he(r, s, i), e.parentNode?.replaceChild(s, e), s;
1611
1611
  }
1612
- function Ot(e, t, n, r) {
1612
+ function Ot(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",
@@ -1619,13 +1619,13 @@ function Ot(e, t, n, r) {
1619
1619
  }), i = Be(i, String(i.key ?? "root"));
1620
1620
  const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
1621
1621
  let a;
1622
- s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? a = $e(o, s, i, n, r) : (a = X(i, n, r), e.replaceChild(a, o)) : (a = X(i, n, r), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
1622
+ s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? a = $e(o, s, i, r, n) : (a = X(i, r, n), e.replaceChild(a, o)) : (a = X(i, r, n), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
1623
1623
  const u = [];
1624
- for (let y = 0; y < e.childNodes.length; y++) {
1625
- const g = e.childNodes[y];
1626
- g !== a && g.nodeName !== "STYLE" && (ue(g, r), u.push(g));
1624
+ for (let m = 0; m < e.childNodes.length; m++) {
1625
+ const g = e.childNodes[m];
1626
+ g !== a && g.nodeName !== "STYLE" && (ue(g, n), u.push(g));
1627
1627
  }
1628
- u.forEach((y) => e.removeChild(y)), e._prevVNode = i, e._prevDom = a;
1628
+ u.forEach((m) => e.removeChild(m)), e._prevVNode = i, e._prevDom = a;
1629
1629
  }
1630
1630
  function Pe(e) {
1631
1631
  if (typeof e == "string") return ie(e);
@@ -1635,16 +1635,16 @@ function Pe(e) {
1635
1635
  return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Pe).join("");
1636
1636
  let t = "";
1637
1637
  e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${ie(String(s))}"`).join(""));
1638
- let n = "";
1639
- e.props && (n = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${ie(String(s))}"`).join(""));
1640
- const r = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? ie(e.children) : e.children ? Pe(e.children) : "";
1641
- return `<${e.tag}${t}${n}>${r}</${e.tag}>`;
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}="${ie(String(s))}"`).join(""));
1640
+ const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? ie(e.children) : e.children ? Pe(e.children) : "";
1641
+ return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
1642
1642
  }
1643
1643
  function Pt(e, ...t) {
1644
- let n = "";
1645
- for (let r = 0; r < e.length; r++)
1646
- n += e[r], r < t.length && (n += t[r]);
1647
- return n;
1644
+ let r = "";
1645
+ for (let n = 0; n < e.length; n++)
1646
+ r += e[n], n < t.length && (r += t[n]);
1647
+ return r;
1648
1648
  }
1649
1649
  function ct(e) {
1650
1650
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
@@ -1814,9 +1814,9 @@ const Mt = Pt`
1814
1814
  Object.entries(jt).map(([e, t]) => [
1815
1815
  e,
1816
1816
  Object.fromEntries(
1817
- Object.entries(t).map(([n, r]) => [
1818
- n,
1819
- `var(--color-${e}${n === "DEFAULT" ? "" : `-${n}`}, ${r})`
1817
+ Object.entries(t).map(([r, n]) => [
1818
+ r,
1819
+ `var(--color-${e}${r === "DEFAULT" ? "" : `-${r}`}, ${n})`
1820
1820
  ])
1821
1821
  )
1822
1822
  ])
@@ -1850,8 +1850,8 @@ const Mt = Pt`
1850
1850
  "7xl": 320
1851
1851
  }, zt = () => {
1852
1852
  const e = {};
1853
- for (const [t, n] of Object.entries(Wt))
1854
- e[`max-w-${t}`] = `max-width:calc(${le} * ${n});`, e[`min-w-${t}`] = `min-width:calc(${le} * ${n});`, e[`w-${t}`] = `width:calc(${le} * ${n});`, e[`max-h-${t}`] = `max-height:calc(${le} * ${n});`, e[`min-h-${t}`] = `min-height:calc(${le} * ${n});`, e[`h-${t}`] = `height:calc(${le} * ${n});`;
1853
+ for (const [t, r] of Object.entries(Wt))
1854
+ e[`max-w-${t}`] = `max-width:calc(${le} * ${r});`, e[`min-w-${t}`] = `min-width:calc(${le} * ${r});`, e[`w-${t}`] = `width:calc(${le} * ${r});`, e[`max-h-${t}`] = `max-height:calc(${le} * ${r});`, e[`min-h-${t}`] = `min-height:calc(${le} * ${r});`, e[`h-${t}`] = `height:calc(${le} * ${r});`;
1855
1855
  return e;
1856
1856
  }, Dt = () => {
1857
1857
  const e = {};
@@ -1878,6 +1878,8 @@ const Mt = Pt`
1878
1878
  "max-h-screen": "max-height:100dvh;",
1879
1879
  "min-w-0": "min-width:0;",
1880
1880
  "min-h-0": "min-height:0;",
1881
+ "min-w-screen": "min-width:100dvw;",
1882
+ "min-h-screen": "min-height:100dvh;",
1881
1883
  ...zt(),
1882
1884
  "m-auto": "margin:auto;",
1883
1885
  "mx-auto": "margin-inline:auto;",
@@ -1932,20 +1934,62 @@ const Mt = Pt`
1932
1934
  "text-8xl": "font-size:6rem;line-height:1",
1933
1935
  /* Borders */
1934
1936
  border: "border-width:1px;",
1937
+ "border-t": "border-top-width:1px;",
1938
+ "border-r": "border-right-width:1px;",
1939
+ "border-b": "border-bottom-width:1px;",
1940
+ "border-l": "border-left-width:1px;",
1941
+ "border-x": "border-inline-width:1px;",
1942
+ "border-y": "border-block-width:1px;",
1935
1943
  "border-2": "border-width:2px;",
1936
1944
  "border-4": "border-width:4px;",
1937
1945
  "border-6": "border-width:6px;",
1938
1946
  "border-8": "border-width:8px;",
1939
1947
  "rounded-none": "border-radius:0;",
1940
1948
  "rounded-xs": "border-radius:0.125rem;",
1949
+ "rounded-t-xs": "border-top-left-radius:0.125rem;border-top-right-radius:0.125rem;",
1950
+ "rounded-r-xs": "border-top-right-radius:0.125rem;border-bottom-right-radius:0.125rem;",
1951
+ "rounded-b-xs": "border-bottom-left-radius:0.125rem;border-bottom-right-radius:0.125rem;",
1952
+ "rounded-l-xs": "border-top-left-radius:0.125rem;border-bottom-left-radius:0.125rem;",
1941
1953
  "rounded-sm": "border-radius:0.25rem;",
1954
+ "rounded-t-sm": "border-top-left-radius:0.25rem;border-top-right-radius:0.25rem;",
1955
+ "rounded-r-sm": "border-top-right-radius:0.25rem;border-bottom-right-radius:0.25rem;",
1956
+ "rounded-b-sm": "border-bottom-left-radius:0.25rem;border-bottom-right-radius:0.25rem;",
1957
+ "rounded-l-sm": "border-top-left-radius:0.25rem;border-bottom-left-radius:0.25rem;",
1942
1958
  "rounded-md": "border-radius:0.375rem;",
1959
+ "rounded-t-md": "border-top-left-radius:0.375rem;border-top-right-radius:0.375rem;",
1960
+ "rounded-r-md": "border-top-right-radius:0.375rem;border-bottom-right-radius:0.375rem;",
1961
+ "rounded-b-md": "border-bottom-left-radius:0.375rem;border-bottom-right-radius:0.375rem;",
1962
+ "rounded-l-md": "border-top-left-radius:0.375rem;border-bottom-left-radius:0.375rem;",
1943
1963
  "rounded-lg": "border-radius:0.5rem;",
1964
+ "rounded-t-lg": "border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;",
1965
+ "rounded-r-lg": "border-top-right-radius:0.5rem;border-bottom-right-radius:0.5rem;",
1966
+ "rounded-b-lg": "border-bottom-left-radius:0.5rem;border-bottom-right-radius:0.5rem;",
1967
+ "rounded-l-lg": "border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem;",
1944
1968
  "rounded-xl": "border-radius:0.75rem;",
1969
+ "rounded-t-xl": "border-top-left-radius:0.75rem;border-top-right-radius:0.75rem;",
1970
+ "rounded-r-xl": "border-top-right-radius:0.75rem;border-bottom-right-radius:0.75rem;",
1971
+ "rounded-b-xl": "border-bottom-left-radius:0.75rem;border-bottom-right-radius:0.75rem;",
1972
+ "rounded-l-xl": "border-top-left-radius:0.75rem;border-bottom-left-radius:0.75rem;",
1945
1973
  "rounded-2xl": "border-radius:1rem;",
1974
+ "rounded-t-2xl": "border-top-left-radius:1rem;border-top-right-radius:1rem;",
1975
+ "rounded-r-2xl": "border-top-right-radius:1rem;border-bottom-right-radius:1rem;",
1976
+ "rounded-b-2xl": "border-bottom-left-radius:1rem;border-bottom-right-radius:1rem;",
1977
+ "rounded-l-2xl": "border-top-left-radius:1rem;border-bottom-left-radius:1rem;",
1946
1978
  "rounded-3xl": "border-radius:1.5rem;",
1979
+ "rounded-t-3xl": "border-top-left-radius:1.5rem;border-top-right-radius:1.5rem;",
1980
+ "rounded-r-3xl": "border-top-right-radius:1.5rem;border-bottom-right-radius:1.5rem;",
1981
+ "rounded-b-3xl": "border-bottom-left-radius:1.5rem;border-bottom-right-radius:1.5rem;",
1982
+ "rounded-l-3xl": "border-top-left-radius:1.5rem;border-bottom-left-radius:1.5rem;",
1947
1983
  "rounded-4xl": "border-radius:2rem;",
1984
+ "rounded-t-4xl": "border-top-left-radius:2rem;border-top-right-radius:2rem;",
1985
+ "rounded-r-4xl": "border-top-right-radius:2rem;border-bottom-right-radius:2rem;",
1986
+ "rounded-b-4xl": "border-bottom-left-radius:2rem;border-bottom-right-radius:2rem;",
1987
+ "rounded-l-4xl": "border-top-left-radius:2rem;border-bottom-left-radius:2rem;",
1948
1988
  "rounded-full": "border-radius:9999px;",
1989
+ "rounded-t-full": "border-top-left-radius:9999px;border-top-right-radius:9999px;",
1990
+ "rounded-r-full": "border-top-right-radius:9999px;border-bottom-right-radius:9999px;",
1991
+ "rounded-b-full": "border-bottom-left-radius:9999px;border-bottom-right-radius:9999px;",
1992
+ "rounded-l-full": "border-top-left-radius:9999px;border-bottom-left-radius:9999px;",
1949
1993
  /* Shadow and effects */
1950
1994
  // Shadows use a CSS variable for color so color utilities can modify --ce-shadow-color
1951
1995
  "shadow-none": "--ce-shadow-color: rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
@@ -2062,14 +2106,14 @@ const Mt = Pt`
2062
2106
  "gap-y": ["row-gap"]
2063
2107
  };
2064
2108
  function G(e, t) {
2065
- let n = 0, r = 0;
2109
+ let r = 0, n = 0;
2066
2110
  for (let i = 0; i < e.length; i++) {
2067
2111
  const s = e[i];
2068
- if (s === "[") n++;
2069
- else if (s === "]" && n > 0) n--;
2070
- else if (s === "(") r++;
2071
- else if (s === ")" && r > 0) r--;
2072
- else if (n === 0 && r === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
2112
+ if (s === "[") r++;
2113
+ else if (s === "]" && r > 0) r--;
2114
+ else if (s === "(") n++;
2115
+ else if (s === ")" && n > 0) n--;
2116
+ else if (r === 0 && n === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
2073
2117
  return e.slice(0, i) + t + e.slice(i);
2074
2118
  }
2075
2119
  return e + t;
@@ -2108,23 +2152,23 @@ const It = {
2108
2152
  dark: "(prefers-color-scheme: dark)"
2109
2153
  }, je = ["sm", "md", "lg", "xl", "2xl"];
2110
2154
  function Ne(e) {
2111
- const t = e.startsWith("-"), r = (t ? e.slice(1) : e).split("-");
2112
- if (r.length < 2) return null;
2113
- const i = r.slice(0, -1).join("-"), s = r[r.length - 1], o = parseFloat(s);
2155
+ const t = e.startsWith("-"), n = (t ? e.slice(1) : e).split("-");
2156
+ if (n.length < 2) return null;
2157
+ const i = n.slice(0, -1).join("-"), s = n[n.length - 1], o = parseFloat(s);
2114
2158
  if (Number.isNaN(o) || !Ze[i]) return null;
2115
2159
  const a = t ? "-" : "";
2116
2160
  return Ze[i].map((u) => `${u}:calc(${a}${le} * ${o});`).join("");
2117
2161
  }
2118
2162
  function Ge(e) {
2119
- const t = e.replace("#", ""), n = parseInt(t, 16), r = n >> 16 & 255, i = n >> 8 & 255, s = n & 255;
2120
- return `${r} ${i} ${s}`;
2163
+ const t = e.replace("#", ""), r = parseInt(t, 16), n = r >> 16 & 255, i = r >> 8 & 255, s = r & 255;
2164
+ return `${n} ${i} ${s}`;
2121
2165
  }
2122
2166
  function Ht(e) {
2123
2167
  const t = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
2124
2168
  if (!t) return null;
2125
- const [, n, r, i = "DEFAULT"] = t, s = Nt[r]?.[i];
2169
+ const [, r, n, i = "DEFAULT"] = t, s = Nt[n]?.[i];
2126
2170
  if (!s) return null;
2127
- if (n === "shadow") return `--ce-shadow-color:${s};`;
2171
+ if (r === "shadow") return `--ce-shadow-color:${s};`;
2128
2172
  const a = {
2129
2173
  bg: "background-color",
2130
2174
  decoration: "text-decoration-color",
@@ -2135,33 +2179,33 @@ function Ht(e) {
2135
2179
  accent: "accent-color",
2136
2180
  fill: "fill",
2137
2181
  stroke: "stroke"
2138
- }[n];
2182
+ }[r];
2139
2183
  return a ? `${a}:${s};` : null;
2140
2184
  }
2141
2185
  function Bt(e) {
2142
- const [t, n] = e.split("/");
2143
- if (!n) return { base: t };
2144
- const r = parseInt(n, 10);
2145
- return isNaN(r) || r < 0 || r > 100 ? { base: t } : { base: t, opacity: r / 100 };
2186
+ const [t, r] = e.split("/");
2187
+ if (!r) return { base: t };
2188
+ const n = parseInt(r, 10);
2189
+ return isNaN(n) || n < 0 || n > 100 ? { base: t } : { base: t, opacity: n / 100 };
2146
2190
  }
2147
2191
  function We(e) {
2148
- const { base: t, opacity: n } = Bt(e), r = Ht(t);
2149
- if (r) {
2150
- if (n !== void 0) {
2151
- const s = /#([0-9a-f]{6})/i.exec(r);
2192
+ const { base: t, opacity: r } = Bt(e), n = Ht(t);
2193
+ if (n) {
2194
+ if (r !== void 0) {
2195
+ const s = /#([0-9a-f]{6})/i.exec(n);
2152
2196
  if (s) {
2153
2197
  const o = Ge(s[0]);
2154
- return r.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${n})`);
2198
+ return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2155
2199
  }
2156
2200
  }
2157
- return r;
2201
+ return n;
2158
2202
  }
2159
2203
  const i = Se(t);
2160
- if (i && n !== void 0) {
2204
+ if (i && r !== void 0) {
2161
2205
  const s = /#([0-9a-f]{6})/i.exec(i);
2162
2206
  if (s) {
2163
2207
  const o = Ge(s[0]);
2164
- return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${n})`);
2208
+ return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2165
2209
  }
2166
2210
  }
2167
2211
  return i;
@@ -2169,8 +2213,8 @@ function We(e) {
2169
2213
  function ze(e) {
2170
2214
  const t = /^opacity-(\d{1,3})$/.exec(e);
2171
2215
  if (!t) return null;
2172
- const n = parseInt(t[1], 10);
2173
- return n < 0 || n > 100 ? null : `opacity:${n / 100};`;
2216
+ const r = parseInt(t[1], 10);
2217
+ return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
2174
2218
  }
2175
2219
  function Se(e) {
2176
2220
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
@@ -2182,9 +2226,9 @@ function Se(e) {
2182
2226
  }
2183
2227
  return null;
2184
2228
  }
2185
- const t = e.indexOf("-["), n = e.endsWith("]");
2186
- if (t > 0 && n) {
2187
- const r = e.slice(0, t);
2229
+ const t = e.indexOf("-["), r = e.endsWith("]");
2230
+ if (t > 0 && r) {
2231
+ const n = e.slice(0, t);
2188
2232
  let i = e.slice(t + 2, -1);
2189
2233
  i = i.replace(/_/g, " ");
2190
2234
  const s = {
@@ -2203,12 +2247,12 @@ function Se(e) {
2203
2247
  "max-w": "max-width",
2204
2248
  "min-h": "min-height",
2205
2249
  "max-h": "max-height",
2206
- "border-t": "border-top",
2207
- "border-b": "border-bottom",
2208
- "border-l": "border-left",
2209
- "border-r": "border-right",
2210
- "border-x": "border-inline",
2211
- "border-y": "border-block",
2250
+ "border-t": "border-top-width",
2251
+ "border-b": "border-bottom-width",
2252
+ "border-l": "border-left-width",
2253
+ "border-r": "border-right-width",
2254
+ "border-x": "border-inline-width",
2255
+ "border-y": "border-block-width",
2212
2256
  "grid-cols": "grid-template-columns",
2213
2257
  "grid-rows": "grid-template-rows",
2214
2258
  transition: "transition-property",
@@ -2231,22 +2275,22 @@ function Se(e) {
2231
2275
  leading: "line-height",
2232
2276
  z: "z-index"
2233
2277
  };
2234
- if (r === "rotate")
2278
+ if (n === "rotate")
2235
2279
  return `transform:rotate(${i});`;
2236
- const o = s[r] ?? r.replace(/_/g, "-");
2280
+ const o = s[n] ?? n.replace(/_/g, "-");
2237
2281
  if (o && i) return `${o}:${i};`;
2238
2282
  }
2239
2283
  return null;
2240
2284
  }
2241
2285
  function Ut(e) {
2242
2286
  if (e.startsWith("[") && e.endsWith("]")) {
2243
- const n = e.slice(1, -1);
2244
- return n.includes("&") ? n : e;
2287
+ const r = e.slice(1, -1);
2288
+ return r.includes("&") ? r : e;
2245
2289
  }
2246
2290
  const t = e.indexOf("-[");
2247
2291
  if (t > 0 && e.endsWith("]")) {
2248
- const n = e.slice(t + 2, -1).replace(/_/g, "-");
2249
- return n.includes("&") ? n : e.replace(/_/g, "-");
2292
+ const r = e.slice(t + 2, -1).replace(/_/g, "-");
2293
+ return r.includes("&") ? r : e.replace(/_/g, "-");
2250
2294
  }
2251
2295
  return null;
2252
2296
  }
@@ -2254,35 +2298,35 @@ function qt(e) {
2254
2298
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
2255
2299
  }
2256
2300
  function Ft(e) {
2257
- const t = /class\s*=\s*(['"])(.*?)\1/g, n = [];
2258
- let r;
2259
- for (; r = t.exec(e); ) {
2260
- const i = r[2].split(/\s+/).filter(Boolean);
2261
- i.length && n.push(...i);
2301
+ const t = /class\s*=\s*(['"])(.*?)\1/g, r = [];
2302
+ let n;
2303
+ for (; n = t.exec(e); ) {
2304
+ const i = n[2].split(/\s+/).filter(Boolean);
2305
+ i.length && r.push(...i);
2262
2306
  }
2263
- return n.filter(Boolean);
2307
+ return r.filter(Boolean);
2264
2308
  }
2265
2309
  const Xe = /* @__PURE__ */ new Map(), Kt = 16;
2266
2310
  function Vt(e) {
2267
- const t = Date.now(), n = Xe.get(e);
2268
- if (n && t - n.timestamp < Kt) return n.css;
2269
- const r = Ft(e), i = new Set(r), s = [], o = [], a = [], u = [], y = {};
2311
+ const t = Date.now(), r = Xe.get(e);
2312
+ if (r && t - r.timestamp < Kt) return r.css;
2313
+ const n = Ft(e), i = new Set(n), s = [], o = [], a = [], u = [], m = {};
2270
2314
  function g(w, c = !1) {
2271
2315
  const p = (c ? "dark|" : "") + w;
2272
- if (p in y) return y[p];
2273
- const m = d(w, c);
2274
- return y[p] = m, m;
2316
+ if (p in m) return m[p];
2317
+ const y = d(w, c);
2318
+ return m[p] = y, y;
2275
2319
  }
2276
2320
  function b(w) {
2277
- const c = w.some((m) => je.includes(m)), p = w.includes("dark");
2321
+ const c = w.some((y) => je.includes(y)), p = w.includes("dark");
2278
2322
  return w.length === 0 ? 1 : !c && !p ? 2 : c && !p ? 3 : 4;
2279
2323
  }
2280
2324
  function h(w) {
2281
2325
  const c = [];
2282
- let p = "", m = 0, C = 0;
2326
+ let p = "", y = 0, C = 0;
2283
2327
  for (let k = 0; k < w.length; k++) {
2284
2328
  const f = w[k];
2285
- f === "[" ? m++ : f === "]" && m > 0 ? m-- : f === "(" ? C++ : f === ")" && C > 0 && C--, f === ":" && m === 0 && C === 0 ? (c.push(p), p = "") : p += f;
2329
+ f === "[" ? y++ : f === "]" && y > 0 ? y-- : f === "(" ? C++ : f === ")" && C > 0 && C--, f === ":" && y === 0 && C === 0 ? (c.push(p), p = "") : p += f;
2286
2330
  }
2287
2331
  return p && c.push(p), c;
2288
2332
  }
@@ -2318,15 +2362,15 @@ function Vt(e) {
2318
2362
  }
2319
2363
  function d(w, c = !1) {
2320
2364
  const p = h(w);
2321
- let m = !1;
2322
- const C = p.find((E) => (E.startsWith("!") && (m = !0, E = E.slice(1)), Le[E] || Ne(E) || ze(E) || We(E) || Se(E)));
2365
+ let y = !1;
2366
+ const C = p.find((E) => (E.startsWith("!") && (y = !0, E = E.slice(1)), Le[E] || Ne(E) || ze(E) || We(E) || Se(E)));
2323
2367
  if (!C) return null;
2324
2368
  const k = C.replace(/^!/, ""), f = Le[k] ?? Ne(k) ?? ze(k) ?? We(k) ?? Se(k);
2325
2369
  if (!f) return null;
2326
2370
  const v = p.indexOf(C);
2327
2371
  let A = v >= 0 ? p.slice(0, v) : [];
2328
2372
  c && (A = A.filter((E) => E !== "dark"));
2329
- const _ = `.${qt(w)}`, $ = "__SUBJECT__", T = m ? f.replace(/;$/, " !important;") : f;
2373
+ const _ = `.${qt(w)}`, $ = "__SUBJECT__", T = y ? f.replace(/;$/, " !important;") : f;
2330
2374
  let R = $;
2331
2375
  const S = [];
2332
2376
  for (const E of A)
@@ -2393,7 +2437,7 @@ function Vt(e) {
2393
2437
  (f) => Le[f] || Ne(f) || ze(f) || We(f) || Se(f)
2394
2438
  );
2395
2439
  if (!p) continue;
2396
- const m = c.indexOf(p), C = m >= 0 ? c.slice(0, m) : [], k = b(C);
2440
+ const y = c.indexOf(p), C = y >= 0 ? c.slice(0, y) : [], k = b(C);
2397
2441
  if (k === 4) {
2398
2442
  const f = g(w, !0);
2399
2443
  f && u.push(f);
@@ -2406,36 +2450,36 @@ function Vt(e) {
2406
2450
  return Xe.set(e, { css: x, timestamp: t }), x;
2407
2451
  }
2408
2452
  const ge = [];
2409
- function Jt(e, t, n, r, i, s, o, a) {
2453
+ function Jt(e, t, r, n, i, s, o, a) {
2410
2454
  if (e) {
2411
- ge.push(n);
2455
+ ge.push(r);
2412
2456
  try {
2413
- const u = t.render(n);
2457
+ const u = t.render(r);
2414
2458
  if (u instanceof Promise) {
2415
- s(!0), u.then((y) => {
2416
- s(!1), o(null), Ye(e, y, n, r, i), a(e.innerHTML);
2417
- }).catch((y) => {
2418
- s(!1), o(y);
2459
+ s(!0), u.then((m) => {
2460
+ s(!1), o(null), Ye(e, m, r, n, i), a(e.innerHTML);
2461
+ }).catch((m) => {
2462
+ s(!1), o(m);
2419
2463
  });
2420
2464
  return;
2421
2465
  }
2422
- Ye(e, u, n, r, i), a(e.innerHTML);
2466
+ Ye(e, u, r, n, i), a(e.innerHTML);
2423
2467
  } finally {
2424
2468
  ge.pop();
2425
2469
  }
2426
2470
  }
2427
2471
  }
2428
- function Ye(e, t, n, r, i) {
2472
+ function Ye(e, t, r, n, i) {
2429
2473
  e && (Ot(
2430
2474
  e,
2431
2475
  Array.isArray(t) ? t : [t],
2432
- n,
2433
- r
2476
+ r,
2477
+ n
2434
2478
  ), i(e.innerHTML));
2435
2479
  }
2436
- function Zt(e, t, n, r, i, s, o) {
2480
+ function Zt(e, t, r, n, i, s, o) {
2437
2481
  if (s !== null && clearTimeout(s), Date.now() - t < 16) {
2438
- if (i(n + 1), n === 15)
2482
+ if (i(r + 1), r === 15)
2439
2483
  console.warn(
2440
2484
  `⚠️ Component is re-rendering rapidly. This might indicate:
2441
2485
  Common causes:
@@ -2444,7 +2488,7 @@ function Zt(e, t, n, r, i, s, o) {
2444
2488
  • Missing dependencies in computed/watch
2445
2489
  Component rendering will be throttled to prevent browser freeze.`
2446
2490
  );
2447
- else if (n > 20) {
2491
+ else if (r > 20) {
2448
2492
  console.error(
2449
2493
  `🛑 Infinite loop detected in component render:
2450
2494
  • This might be caused by state updates during render
@@ -2455,14 +2499,14 @@ Stopping runaway component render to prevent browser freeze`
2455
2499
  }
2456
2500
  } else
2457
2501
  i(0);
2458
- const y = setTimeout(() => {
2459
- r(Date.now()), e(), o(null);
2460
- }, n > 10 ? 100 : 0);
2461
- o(y);
2502
+ const m = setTimeout(() => {
2503
+ n(Date.now()), e(), o(null);
2504
+ }, r > 10 ? 100 : 0);
2505
+ o(m);
2462
2506
  }
2463
- function Gt(e, t, n, r, i) {
2507
+ function Gt(e, t, r, n, i) {
2464
2508
  if (!e) return;
2465
- const s = Vt(n);
2509
+ const s = Vt(r);
2466
2510
  if ((!s || s.trim() === "") && !t._computedStyle) {
2467
2511
  i(null), e.adoptedStyleSheets = [Je()];
2468
2512
  return;
@@ -2473,7 +2517,7 @@ function Gt(e, t, n, r, i) {
2473
2517
  ${s}
2474
2518
  `);
2475
2519
  a = ct(a);
2476
- let u = r;
2520
+ let u = n;
2477
2521
  u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== a) && u.replaceSync(a), e.adoptedStyleSheets = [Je(), u], i(u);
2478
2522
  }
2479
2523
  let N = null;
@@ -2483,13 +2527,13 @@ function Xt(e) {
2483
2527
  function Yt() {
2484
2528
  N = null;
2485
2529
  }
2486
- function hn() {
2530
+ function pr() {
2487
2531
  if (!N)
2488
2532
  throw new Error("useEmit must be called during component render");
2489
2533
  const e = N.emit;
2490
- return (t, n) => e(t, n);
2534
+ return (t, r) => e(t, r);
2491
2535
  }
2492
- function me(e) {
2536
+ function ye(e) {
2493
2537
  e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
2494
2538
  value: {},
2495
2539
  writable: !0,
@@ -2497,30 +2541,30 @@ function me(e) {
2497
2541
  configurable: !1
2498
2542
  });
2499
2543
  }
2500
- function gn(e) {
2544
+ function hr(e) {
2501
2545
  if (!N)
2502
2546
  throw new Error("useOnConnected must be called during component render");
2503
- me(N), N._hookCallbacks.onConnected = e;
2547
+ ye(N), N._hookCallbacks.onConnected = e;
2504
2548
  }
2505
- function yn(e) {
2549
+ function gr(e) {
2506
2550
  if (!N)
2507
2551
  throw new Error("useOnDisconnected must be called during component render");
2508
- me(N), N._hookCallbacks.onDisconnected = e;
2552
+ ye(N), N._hookCallbacks.onDisconnected = e;
2509
2553
  }
2510
- function mn(e) {
2554
+ function mr(e) {
2511
2555
  if (!N)
2512
2556
  throw new Error("useOnAttributeChanged must be called during component render");
2513
- me(N), N._hookCallbacks.onAttributeChanged = e;
2557
+ ye(N), N._hookCallbacks.onAttributeChanged = e;
2514
2558
  }
2515
- function bn(e) {
2559
+ function yr(e) {
2516
2560
  if (!N)
2517
2561
  throw new Error("useOnError must be called during component render");
2518
- me(N), N._hookCallbacks.onError = e;
2562
+ ye(N), N._hookCallbacks.onError = e;
2519
2563
  }
2520
- function wn(e) {
2564
+ function br(e) {
2521
2565
  if (!N)
2522
2566
  throw new Error("useStyle must be called during component render");
2523
- me(N);
2567
+ ye(N);
2524
2568
  try {
2525
2569
  const t = e();
2526
2570
  Object.defineProperty(N, "_computedStyle", {
@@ -2589,33 +2633,33 @@ function Qt(e, t) {
2589
2633
  _templateError = null;
2590
2634
  constructor() {
2591
2635
  super(), this.attachShadow({ mode: "open" }), this._cfg = Te.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
2592
- const n = this._initContext(t);
2593
- Object.defineProperty(n, "refs", {
2636
+ const r = this._initContext(t);
2637
+ Object.defineProperty(r, "refs", {
2594
2638
  value: this._refs,
2595
2639
  writable: !1,
2596
2640
  enumerable: !1,
2597
2641
  configurable: !1
2598
- }), Object.defineProperty(n, "requestRender", {
2642
+ }), Object.defineProperty(r, "requestRender", {
2599
2643
  value: () => this.requestRender(),
2600
2644
  writable: !1,
2601
2645
  enumerable: !1,
2602
2646
  configurable: !1
2603
- }), Object.defineProperty(n, "_requestRender", {
2647
+ }), Object.defineProperty(r, "_requestRender", {
2604
2648
  value: () => this._requestRender(),
2605
2649
  writable: !1,
2606
2650
  enumerable: !1,
2607
2651
  configurable: !1
2608
- }), Object.defineProperty(n, "_componentId", {
2652
+ }), Object.defineProperty(r, "_componentId", {
2609
2653
  value: this._componentId,
2610
2654
  writable: !1,
2611
2655
  enumerable: !1,
2612
2656
  configurable: !1
2613
- }), Object.defineProperty(n, "_triggerWatchers", {
2657
+ }), Object.defineProperty(r, "_triggerWatchers", {
2614
2658
  value: (i, s) => this._triggerWatchers(i, s),
2615
2659
  writable: !1,
2616
2660
  enumerable: !1,
2617
2661
  configurable: !1
2618
- }), this.context = n, Object.defineProperty(this.context, "emit", {
2662
+ }), this.context = r, Object.defineProperty(this.context, "emit", {
2619
2663
  value: (i, s, o) => {
2620
2664
  const a = new CustomEvent(i, {
2621
2665
  detail: s,
@@ -2629,11 +2673,11 @@ function Qt(e, t) {
2629
2673
  enumerable: !1,
2630
2674
  configurable: !1
2631
2675
  });
2632
- const r = Te.get(e) || t;
2633
- Object.keys(r).forEach((i) => {
2634
- const s = r[i];
2676
+ const n = Te.get(e) || t;
2677
+ Object.keys(n).forEach((i) => {
2678
+ const s = n[i];
2635
2679
  typeof s == "function" && (this.context[i] = (...o) => s(...o, this.context));
2636
- }), this._applyComputed(r), r.props && Object.keys(r.props).forEach((i) => {
2680
+ }), this._applyComputed(n), n.props && Object.keys(n.props).forEach((i) => {
2637
2681
  let s = this[i];
2638
2682
  Object.defineProperty(this, i, {
2639
2683
  get() {
@@ -2641,12 +2685,12 @@ function Qt(e, t) {
2641
2685
  },
2642
2686
  set(o) {
2643
2687
  const a = s;
2644
- s = o, this.context[i] = o, this._initializing || (this._applyProps(r), a !== o && this._requestRender());
2688
+ s = o, this.context[i] = o, this._initializing || (this._applyProps(n), a !== o && this._requestRender());
2645
2689
  },
2646
2690
  enumerable: !0,
2647
2691
  configurable: !0
2648
2692
  });
2649
- }), this._initializing = !1, this._initWatchers(r), this._applyProps(r), this._render(r);
2693
+ }), this._initializing = !1, this._initWatchers(n), this._applyProps(n), this._render(n);
2650
2694
  }
2651
2695
  connectedCallback() {
2652
2696
  this._runLogicWithinErrorBoundary(t, () => {
@@ -2654,8 +2698,8 @@ function Qt(e, t) {
2654
2698
  t,
2655
2699
  this.context,
2656
2700
  this._mounted,
2657
- (n) => {
2658
- this._mounted = n;
2701
+ (r) => {
2702
+ this._mounted = r;
2659
2703
  }
2660
2704
  );
2661
2705
  });
@@ -2672,52 +2716,52 @@ function Qt(e, t) {
2672
2716
  () => {
2673
2717
  this._watchers.clear();
2674
2718
  },
2675
- (n) => {
2676
- this._templateLoading = n;
2719
+ (r) => {
2720
+ this._templateLoading = r;
2677
2721
  },
2678
- (n) => {
2679
- this._templateError = n;
2722
+ (r) => {
2723
+ this._templateError = r;
2680
2724
  },
2681
- (n) => {
2682
- this._mounted = n;
2725
+ (r) => {
2726
+ this._mounted = r;
2683
2727
  }
2684
2728
  );
2685
2729
  });
2686
2730
  }
2687
- attributeChangedCallback(n, r, i) {
2731
+ attributeChangedCallback(r, n, i) {
2688
2732
  this._runLogicWithinErrorBoundary(t, () => {
2689
- this._applyProps(t), r !== i && this._requestRender(), kt(
2733
+ this._applyProps(t), n !== i && this._requestRender(), kt(
2690
2734
  t,
2691
- n,
2692
2735
  r,
2736
+ n,
2693
2737
  i,
2694
2738
  this.context
2695
2739
  );
2696
2740
  });
2697
2741
  }
2698
2742
  static get observedAttributes() {
2699
- return t.props ? Object.keys(t.props).map(ne) : [];
2743
+ return t.props ? Object.keys(t.props).map(re) : [];
2700
2744
  }
2701
- _applyComputed(n) {
2745
+ _applyComputed(r) {
2702
2746
  }
2703
2747
  // --- Render ---
2704
- _render(n) {
2705
- this._runLogicWithinErrorBoundary(n, () => {
2748
+ _render(r) {
2749
+ this._runLogicWithinErrorBoundary(r, () => {
2706
2750
  Jt(
2707
2751
  this.shadowRoot,
2708
- n,
2752
+ r,
2709
2753
  this.context,
2710
2754
  this._refs,
2711
- (r) => {
2712
- this._lastHtmlStringForJitCSS = r, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(r);
2755
+ (n) => {
2756
+ this._lastHtmlStringForJitCSS = n, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(n);
2713
2757
  },
2714
- (r) => {
2715
- this._templateLoading = r, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(r);
2758
+ (n) => {
2759
+ this._templateLoading = n, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(n);
2716
2760
  },
2717
- (r) => {
2718
- this._templateError = r, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(r);
2761
+ (n) => {
2762
+ this._templateError = n, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(n);
2719
2763
  },
2720
- (r) => this._applyStyle(n, r)
2764
+ (n) => this._applyStyle(r, n)
2721
2765
  );
2722
2766
  });
2723
2767
  }
@@ -2731,27 +2775,27 @@ function Qt(e, t) {
2731
2775
  () => this._render(this._cfg),
2732
2776
  this._lastRenderTime,
2733
2777
  this._renderCount,
2734
- (n) => {
2735
- this._lastRenderTime = n;
2778
+ (r) => {
2779
+ this._lastRenderTime = r;
2736
2780
  },
2737
- (n) => {
2738
- this._renderCount = n;
2781
+ (r) => {
2782
+ this._renderCount = r;
2739
2783
  },
2740
2784
  this._renderTimeoutId,
2741
- (n) => {
2742
- this._renderTimeoutId = n;
2785
+ (r) => {
2786
+ this._renderTimeoutId = r;
2743
2787
  }
2744
2788
  );
2745
2789
  }, this._componentId);
2746
2790
  });
2747
2791
  }
2748
2792
  // --- Style ---
2749
- _applyStyle(n, r) {
2750
- this._runLogicWithinErrorBoundary(n, () => {
2793
+ _applyStyle(r, n) {
2794
+ this._runLogicWithinErrorBoundary(r, () => {
2751
2795
  Gt(
2752
2796
  this.shadowRoot,
2753
2797
  this.context,
2754
- r,
2798
+ n,
2755
2799
  this._styleSheet,
2756
2800
  (i) => {
2757
2801
  this._styleSheet = i;
@@ -2760,21 +2804,21 @@ function Qt(e, t) {
2760
2804
  });
2761
2805
  }
2762
2806
  // --- Error Boundary function ---
2763
- _runLogicWithinErrorBoundary(n, r) {
2807
+ _runLogicWithinErrorBoundary(r, n) {
2764
2808
  this._hasError && (this._hasError = !1);
2765
2809
  try {
2766
- r();
2810
+ n();
2767
2811
  } catch (i) {
2768
- this._hasError = !0, n.onError && n.onError(i, this.context);
2812
+ this._hasError = !0, r.onError && r.onError(i, this.context);
2769
2813
  }
2770
2814
  }
2771
2815
  // --- State, props, computed ---
2772
- _initContext(n) {
2816
+ _initContext(r) {
2773
2817
  try {
2774
- let r = function(s, o = "") {
2818
+ let n = function(s, o = "") {
2775
2819
  return Array.isArray(s) ? new Proxy(s, {
2776
- get(a, u, y) {
2777
- const g = Reflect.get(a, u, y);
2820
+ get(a, u, m) {
2821
+ const g = Reflect.get(a, u, m);
2778
2822
  return typeof g == "function" && typeof u == "string" && [
2779
2823
  "push",
2780
2824
  "pop",
@@ -2787,56 +2831,56 @@ function Qt(e, t) {
2787
2831
  const l = g.apply(a, h);
2788
2832
  if (!i._initializing) {
2789
2833
  const d = o || "root";
2790
- i._triggerWatchers(d, a), fe(() => i._render(n), i._componentId);
2834
+ i._triggerWatchers(d, a), fe(() => i._render(r), i._componentId);
2791
2835
  }
2792
2836
  return l;
2793
2837
  } : g;
2794
2838
  },
2795
- set(a, u, y) {
2796
- if (a[u] = y, !i._initializing) {
2839
+ set(a, u, m) {
2840
+ if (a[u] = m, !i._initializing) {
2797
2841
  const g = o ? `${o}.${String(u)}` : String(u);
2798
- i._triggerWatchers(g, y), fe(() => i._render(n), i._componentId);
2842
+ i._triggerWatchers(g, m), fe(() => i._render(r), i._componentId);
2799
2843
  }
2800
2844
  return !0;
2801
2845
  },
2802
2846
  deleteProperty(a, u) {
2803
2847
  if (delete a[u], !i._initializing) {
2804
- const y = o ? `${o}.${String(u)}` : String(u);
2805
- i._triggerWatchers(y, void 0), fe(() => i._render(n), i._componentId);
2848
+ const m = o ? `${o}.${String(u)}` : String(u);
2849
+ i._triggerWatchers(m, void 0), fe(() => i._render(r), i._componentId);
2806
2850
  }
2807
2851
  return !0;
2808
2852
  }
2809
2853
  }) : s && typeof s == "object" ? s.constructor && s.constructor.name === "ReactiveState" ? s : (Object.keys(s).forEach((a) => {
2810
2854
  const u = o ? `${o}.${a}` : a;
2811
- s[a] = r(s[a], u);
2855
+ s[a] = n(s[a], u);
2812
2856
  }), new Proxy(s, {
2813
- set(a, u, y) {
2857
+ set(a, u, m) {
2814
2858
  const g = o ? `${o}.${String(u)}` : String(u);
2815
- return a[u] = r(y, g), i._initializing || (i._triggerWatchers(
2859
+ return a[u] = n(m, g), i._initializing || (i._triggerWatchers(
2816
2860
  g,
2817
2861
  a[u]
2818
- ), fe(() => i._render(n), i._componentId)), !0;
2862
+ ), fe(() => i._render(r), i._componentId)), !0;
2819
2863
  },
2820
- get(a, u, y) {
2821
- return Reflect.get(a, u, y);
2864
+ get(a, u, m) {
2865
+ return Reflect.get(a, u, m);
2822
2866
  }
2823
2867
  })) : s;
2824
2868
  };
2825
2869
  const i = this;
2826
- return r({
2870
+ return n({
2827
2871
  // For functional components, state is managed by state() function calls
2828
2872
  // Include prop defaults in initial reactive context so prop updates trigger reactivity
2829
- ...n.props ? Object.fromEntries(
2830
- Object.entries(n.props).map(([s, o]) => [s, o.default])
2873
+ ...r.props ? Object.fromEntries(
2874
+ Object.entries(r.props).map(([s, o]) => [s, o.default])
2831
2875
  ) : {}
2832
2876
  });
2833
2877
  } catch {
2834
2878
  return {};
2835
2879
  }
2836
2880
  }
2837
- _initWatchers(n) {
2838
- this._runLogicWithinErrorBoundary(n, () => {
2839
- yt(
2881
+ _initWatchers(r) {
2882
+ this._runLogicWithinErrorBoundary(r, () => {
2883
+ mt(
2840
2884
  this.context,
2841
2885
  this._watchers,
2842
2886
  {}
@@ -2844,41 +2888,41 @@ function Qt(e, t) {
2844
2888
  );
2845
2889
  });
2846
2890
  }
2847
- _triggerWatchers(n, r) {
2848
- mt(this.context, this._watchers, n, r);
2891
+ _triggerWatchers(r, n) {
2892
+ yt(this.context, this._watchers, r, n);
2849
2893
  }
2850
- _applyProps(n) {
2851
- this._runLogicWithinErrorBoundary(n, () => {
2894
+ _applyProps(r) {
2895
+ this._runLogicWithinErrorBoundary(r, () => {
2852
2896
  try {
2853
- wt(this, n, this.context);
2854
- } catch (r) {
2855
- this._hasError = !0, n.onError && n.onError(r, this.context);
2897
+ wt(this, r, this.context);
2898
+ } catch (n) {
2899
+ this._hasError = !0, r.onError && r.onError(n, this.context);
2856
2900
  }
2857
2901
  });
2858
2902
  }
2859
2903
  };
2860
2904
  }
2861
2905
  function et(e, t) {
2862
- let n = ne(e);
2863
- n.includes("-") || (n = `cer-${n}`);
2864
- let r = {};
2906
+ let r = re(e);
2907
+ r.includes("-") || (r = `cer-${r}`);
2908
+ let n = {};
2865
2909
  if (typeof window < "u")
2866
2910
  try {
2867
2911
  const a = t.toString().match(/\(\s*{\s*([^}]+)\s*}/);
2868
2912
  if (a) {
2869
- const y = a[1].split(",").map((g) => g.trim());
2870
- for (const g of y) {
2913
+ const m = a[1].split(",").map((g) => g.trim());
2914
+ for (const g of m) {
2871
2915
  const b = g.indexOf("=");
2872
2916
  if (b !== -1) {
2873
2917
  const h = g.substring(0, b).trim(), l = g.substring(b + 1).trim();
2874
2918
  try {
2875
- l === "true" ? r[h] = !0 : l === "false" ? r[h] = !1 : l === "[]" ? r[h] = [] : l === "{}" ? r[h] = {} : /^\d+$/.test(l) ? r[h] = parseInt(l) : /^'.*'$/.test(l) || /^".*"$/.test(l) ? r[h] = l.slice(1, -1) : r[h] = l;
2919
+ l === "true" ? n[h] = !0 : l === "false" ? n[h] = !1 : l === "[]" ? n[h] = [] : l === "{}" ? n[h] = {} : /^\d+$/.test(l) ? n[h] = parseInt(l) : /^'.*'$/.test(l) || /^".*"$/.test(l) ? n[h] = l.slice(1, -1) : n[h] = l;
2876
2920
  } catch {
2877
- r[h] = "";
2921
+ n[h] = "";
2878
2922
  }
2879
2923
  } else {
2880
2924
  const h = g.split(":")[0].trim();
2881
- h && !h.includes("}") && (r[h] = "");
2925
+ h && !h.includes("}") && (n[h] = "");
2882
2926
  }
2883
2927
  }
2884
2928
  }
@@ -2888,7 +2932,7 @@ function et(e, t) {
2888
2932
  const s = {
2889
2933
  // Generate props config from defaults
2890
2934
  props: Object.fromEntries(
2891
- Object.entries(r).map(([o, a]) => [o, { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }])
2935
+ Object.entries(n).map(([o, a]) => [o, { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }])
2892
2936
  ),
2893
2937
  // Add lifecycle hooks from the stored functions
2894
2938
  onConnected: (o) => {
@@ -2897,55 +2941,55 @@ function et(e, t) {
2897
2941
  onDisconnected: (o) => {
2898
2942
  i.onDisconnected && i.onDisconnected();
2899
2943
  },
2900
- onAttributeChanged: (o, a, u, y) => {
2944
+ onAttributeChanged: (o, a, u, m) => {
2901
2945
  i.onAttributeChanged && i.onAttributeChanged(o, a, u);
2902
2946
  },
2903
2947
  onError: (o, a) => {
2904
2948
  i.onError && o && i.onError(o);
2905
2949
  },
2906
2950
  render: (o) => {
2907
- const a = o._componentId || `${n}-${Math.random().toString(36).substr(2, 9)}`;
2951
+ const a = o._componentId || `${r}-${Math.random().toString(36).substr(2, 9)}`;
2908
2952
  F.setCurrentComponent(a, () => {
2909
2953
  o.requestRender && o.requestRender();
2910
2954
  });
2911
2955
  try {
2912
2956
  Xt(o);
2913
- const u = Object.keys(r).length > 0;
2914
- let y;
2957
+ const u = Object.keys(n).length > 0;
2958
+ let m;
2915
2959
  if (u) {
2916
2960
  const g = {};
2917
- Object.keys(r).forEach((b) => {
2918
- g[b] = o[b] ?? r[b];
2919
- }), y = t(g);
2961
+ Object.keys(n).forEach((b) => {
2962
+ g[b] = o[b] ?? n[b];
2963
+ }), m = t(g);
2920
2964
  } else
2921
- y = t();
2965
+ m = t();
2922
2966
  if (o._hookCallbacks) {
2923
2967
  const g = o._hookCallbacks;
2924
2968
  g.onConnected && (i.onConnected = g.onConnected), g.onDisconnected && (i.onDisconnected = g.onDisconnected), g.onAttributeChanged && (i.onAttributeChanged = g.onAttributeChanged), g.onError && (i.onError = g.onError), g.style && (o._styleCallback = g.style);
2925
2969
  }
2926
- return y;
2970
+ return m;
2927
2971
  } finally {
2928
2972
  Yt(), F.clearCurrentComponent();
2929
2973
  }
2930
2974
  }
2931
2975
  };
2932
- Te.set(n, s), typeof window < "u" && (customElements.get(n) || customElements.define(n, Qt(n, s)));
2976
+ Te.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(r, Qt(r, s)));
2933
2977
  }
2934
- class en {
2978
+ class er {
2935
2979
  map = /* @__PURE__ */ new Map();
2936
2980
  maxSize;
2937
2981
  constructor(t) {
2938
2982
  this.maxSize = t;
2939
2983
  }
2940
2984
  get(t) {
2941
- const n = this.map.get(t);
2942
- if (n !== void 0)
2943
- return this.map.delete(t), this.map.set(t, n), n;
2985
+ const r = this.map.get(t);
2986
+ if (r !== void 0)
2987
+ return this.map.delete(t), this.map.set(t, r), r;
2944
2988
  }
2945
- set(t, n) {
2946
- if (this.map.has(t) && this.map.delete(t), this.map.set(t, n), this.map.size > this.maxSize) {
2947
- const r = this.map.keys().next().value;
2948
- r !== void 0 && this.map.delete(r);
2989
+ set(t, r) {
2990
+ if (this.map.has(t) && this.map.delete(t), this.map.set(t, r), this.map.size > this.maxSize) {
2991
+ const n = this.map.keys().next().value;
2992
+ n !== void 0 && this.map.delete(n);
2949
2993
  }
2950
2994
  }
2951
2995
  has(t) {
@@ -2955,8 +2999,8 @@ class en {
2955
2999
  this.map.clear();
2956
3000
  }
2957
3001
  }
2958
- const De = new en(500);
2959
- function tn(e, t) {
3002
+ const De = new er(500);
3003
+ function tr(e, t) {
2960
3004
  if (e == null) {
2961
3005
  console.warn(
2962
3006
  `⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`
@@ -2969,9 +3013,9 @@ function tn(e, t) {
2969
3013
  `💡 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()}"`
2970
3014
  );
2971
3015
  }
2972
- function pe(e, t = {}, n, r) {
2973
- const i = r ?? t.key;
2974
- return { tag: e, key: i, props: t, children: n };
3016
+ function pe(e, t = {}, r, n) {
3017
+ const i = n ?? t.key;
3018
+ return { tag: e, key: i, props: t, children: r };
2975
3019
  }
2976
3020
  function Ae(e) {
2977
3021
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
@@ -2979,47 +3023,47 @@ function Ae(e) {
2979
3023
  function _e(e) {
2980
3024
  return typeof e == "object" && e !== null && "tag" in e && !Ae(e);
2981
3025
  }
2982
- function nn(e, t) {
3026
+ function rr(e, t) {
2983
3027
  return e.key != null ? e : { ...e, key: t };
2984
3028
  }
2985
- function rn(e, t = [], n = {}) {
2986
- const r = {}, i = {}, s = {}, o = [], a = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
3029
+ function nr(e, t = [], r = {}) {
3030
+ const n = {}, i = {}, s = {}, o = [], a = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
2987
3031
  let u;
2988
3032
  for (; u = a.exec(e); ) {
2989
- const y = u[1], g = u[2], b = (u[4] || u[6]) ?? "", h = b.match(/^{{(\d+)}}$/);
3033
+ const m = u[1], g = u[2], b = (u[4] || u[6]) ?? "", h = b.match(/^{{(\d+)}}$/);
2990
3034
  let l = h ? t[Number(h[1])] ?? null : b;
2991
3035
  h || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
2992
3036
  const d = ["model", "bind", "show", "class", "style", "ref"];
2993
- if (y === ":") {
3037
+ if (m === ":") {
2994
3038
  const [x, w] = g.split(":"), [c, ...p] = x.split(".");
2995
3039
  if (d.includes(c)) {
2996
- const m = [...p], C = c === "model" && w ? `model:${w}` : c;
3040
+ const y = [...p], C = c === "model" && w ? `model:${w}` : c;
2997
3041
  s[C] = {
2998
3042
  value: l,
2999
- modifiers: m,
3043
+ modifiers: y,
3000
3044
  arg: w
3001
3045
  };
3002
3046
  } else {
3003
- let m = l;
3004
- m && ee(m) && (m = m.value), i[g] = m, o.push(g);
3047
+ let y = l;
3048
+ y && ee(y) && (y = y.value), i[g] = y, o.push(g);
3005
3049
  }
3006
- } else if (y === "@") {
3050
+ } else if (m === "@") {
3007
3051
  const [x, ...w] = g.split("."), c = w;
3008
- tn(l, x);
3009
- const p = typeof l == "function" ? l : typeof n[l] == "function" ? n[l] : void 0;
3052
+ tr(l, x);
3053
+ const p = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
3010
3054
  if (p) {
3011
- const m = (k) => {
3055
+ const y = (k) => {
3012
3056
  if (c.includes("prevent") && k.preventDefault(), c.includes("stop") && k.stopPropagation(), !(c.includes("self") && k.target !== k.currentTarget))
3013
- return c.includes("once") && k.currentTarget?.removeEventListener(x, m), p(k);
3057
+ return c.includes("once") && k.currentTarget?.removeEventListener(x, y), p(k);
3014
3058
  }, C = "on" + x.charAt(0).toUpperCase() + x.slice(1);
3015
- r[C] = m;
3059
+ n[C] = y;
3016
3060
  }
3017
- } else g === "ref" ? r.ref = l : i[g] = l;
3061
+ } else g === "ref" ? n.ref = l : i[g] = l;
3018
3062
  }
3019
- return { props: r, attrs: i, directives: s, bound: o };
3063
+ return { props: n, attrs: i, directives: s, bound: o };
3020
3064
  }
3021
- function sn(e, t, n) {
3022
- const r = ge.length > 0 ? ge[ge.length - 1] : void 0, i = n ?? r, s = !n && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3065
+ function ir(e, t, r) {
3066
+ const n = ge.length > 0 ? ge[ge.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3023
3067
  if (s && o) {
3024
3068
  const f = De.get(o);
3025
3069
  if (f) return f;
@@ -3030,7 +3074,7 @@ function sn(e, t, n) {
3030
3074
  let u = "";
3031
3075
  for (let f = 0; f < e.length; f++)
3032
3076
  u += e[f], f < t.length && (u += `{{${f}}}`);
3033
- const y = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, g = [];
3077
+ const m = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, g = [];
3034
3078
  let b, h = [], l = null, d = {}, x, w = 0, c = [];
3035
3079
  function p(f) {
3036
3080
  !f || typeof f != "object" || Ae(f) || (f.props || f.attrs ? (f.props && (d.props || (d.props = {}), Object.assign(d.props, f.props)), f.attrs && (d.attrs || (d.attrs = {}), Object.keys(f.attrs).forEach((v) => {
@@ -3049,7 +3093,7 @@ function sn(e, t, n) {
3049
3093
  d.attrs[v] = f.attrs[v];
3050
3094
  }))) : (d.props || (d.props = {}), Object.assign(d.props, f)));
3051
3095
  }
3052
- function m(f, v) {
3096
+ function y(f, v) {
3053
3097
  const A = l ? h : c;
3054
3098
  if (Ae(f)) {
3055
3099
  const _ = f.key ?? v;
@@ -3062,14 +3106,14 @@ function sn(e, t, n) {
3062
3106
  return;
3063
3107
  }
3064
3108
  if (_e(f)) {
3065
- A.push(nn(f, void 0));
3109
+ A.push(rr(f, void 0));
3066
3110
  return;
3067
3111
  }
3068
3112
  if (Array.isArray(f)) {
3069
3113
  if (f.length === 0) return;
3070
3114
  for (let _ = 0; _ < f.length; _++) {
3071
3115
  const $ = f[_];
3072
- Ae($) || _e($) || Array.isArray($) ? m($, `${v}-${_}`) : $ !== null && typeof $ == "object" ? p($) : A.push(a(String($), `${v}-${_}`));
3116
+ Ae($) || _e($) || Array.isArray($) ? y($, `${v}-${_}`) : $ !== null && typeof $ == "object" ? p($) : A.push(a(String($), `${v}-${_}`));
3073
3117
  }
3074
3118
  return;
3075
3119
  }
@@ -3095,7 +3139,7 @@ function sn(e, t, n) {
3095
3139
  "track",
3096
3140
  "wbr"
3097
3141
  ]);
3098
- for (; b = y.exec(u); )
3142
+ for (; b = m.exec(u); )
3099
3143
  if (!(b[0].startsWith("<!--") && b[0].endsWith("-->"))) {
3100
3144
  if (b[1]) {
3101
3145
  const f = b[1], v = b[0][1] === "/", A = b[0][b[0].length - 2] === "/" || C.has(f), {
@@ -3103,7 +3147,7 @@ function sn(e, t, n) {
3103
3147
  attrs: $,
3104
3148
  directives: T,
3105
3149
  bound: R
3106
- } = rn(b[2] || "", t, i), S = { props: {}, attrs: {} };
3150
+ } = nr(b[2] || "", t, i), S = { props: {}, attrs: {} };
3107
3151
  for (const P in _) S.props[P] = _[P];
3108
3152
  for (const P in $) S.attrs[P] = $[P];
3109
3153
  if (S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")))
@@ -3150,14 +3194,14 @@ function sn(e, t, n) {
3150
3194
  let O;
3151
3195
  typeof z == "string" && i ? O = U(W, z) : (O = z, O && ee(O) && (O = O.value)), S.props[E] = O;
3152
3196
  try {
3153
- const re = ne(E);
3154
- S.attrs || (S.attrs = {}), O !== void 0 && (S.attrs[re] = O);
3197
+ const ne = re(E);
3198
+ S.attrs || (S.attrs = {}), O !== void 0 && (S.attrs[ne] = O);
3155
3199
  } catch {
3156
3200
  }
3157
3201
  S.isCustomElement = !0;
3158
- const qe = `update:${ne(E)}`.replace(/-([a-z])/g, (re, Y) => Y.toUpperCase()), ut = "on" + qe.charAt(0).toUpperCase() + qe.slice(1);
3159
- S.props[ut] = function(re) {
3160
- const Y = re.detail !== void 0 ? re.detail : re.target ? re.target.value : void 0;
3202
+ const qe = `update:${re(E)}`.replace(/-([a-z])/g, (ne, Y) => Y.toUpperCase()), ut = "on" + qe.charAt(0).toUpperCase() + qe.slice(1);
3203
+ S.props[ut] = function(ne) {
3204
+ const Y = ne.detail !== void 0 ? ne.detail : ne.target ? ne.target.value : void 0;
3161
3205
  if (W)
3162
3206
  if (z && ee(z)) {
3163
3207
  const ae = z.value;
@@ -3186,7 +3230,7 @@ function sn(e, t, n) {
3186
3230
  }), l = f, d = S, h = []);
3187
3231
  } else if (typeof b[3] < "u") {
3188
3232
  const f = Number(b[3]), v = t[f], A = `interp-${f}`;
3189
- m(v, A);
3233
+ y(v, A);
3190
3234
  } else if (b[4]) {
3191
3235
  const f = b[4], v = l ? h : c, A = f.split(/({{\d+}})/);
3192
3236
  for (const _ of A) {
@@ -3194,7 +3238,7 @@ function sn(e, t, n) {
3194
3238
  const $ = _.match(/^{{(\d+)}}$/);
3195
3239
  if ($) {
3196
3240
  const T = Number($[1]), R = t[T], S = `interp-${T}`;
3197
- m(R, S);
3241
+ y(R, S);
3198
3242
  } else {
3199
3243
  const T = `text-${w++}`;
3200
3244
  v.push(a(_, T));
@@ -3213,94 +3257,94 @@ function sn(e, t, n) {
3213
3257
  return pe("div", {}, "", "fallback-root");
3214
3258
  }
3215
3259
  function ce(e, ...t) {
3216
- const n = t[t.length - 1], r = typeof n == "object" && n && !Array.isArray(n) ? n : void 0;
3217
- return sn(e, t, r);
3260
+ const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
3261
+ return ir(e, t, n);
3218
3262
  }
3219
3263
  function Re(e, t) {
3220
3264
  return j(e ? t : [], "when-block");
3221
3265
  }
3222
- function xn(e, t) {
3223
- return e.map((n, r) => {
3224
- const i = typeof n == "object" ? n?.key ?? n?.id ?? `idx-${r}` : String(n);
3225
- return j(t(n, r), `each-${i}`);
3266
+ function wr(e, t) {
3267
+ return e.map((r, n) => {
3268
+ const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
3269
+ return j(t(r, n), `each-${i}`);
3226
3270
  });
3227
3271
  }
3228
- function on() {
3272
+ function sr() {
3229
3273
  const e = [];
3230
3274
  return {
3231
- when(t, n) {
3232
- return e.push([t, n]), this;
3275
+ when(t, r) {
3276
+ return e.push([t, r]), this;
3233
3277
  },
3234
3278
  otherwise(t) {
3235
3279
  return e.push([!0, t]), this;
3236
3280
  },
3237
3281
  done() {
3238
- return an(...e);
3282
+ return or(...e);
3239
3283
  }
3240
3284
  };
3241
3285
  }
3242
- function an(...e) {
3286
+ function or(...e) {
3243
3287
  for (let t = 0; t < e.length; t++) {
3244
- const [n, r] = e[t];
3245
- if (n) return [j(r, `whenChain-branch-${t}`)];
3288
+ const [r, n] = e[t];
3289
+ if (r) return [j(n, `whenChain-branch-${t}`)];
3246
3290
  }
3247
3291
  return [j([], "whenChain-empty")];
3248
3292
  }
3249
3293
  function j(e, t) {
3250
- const n = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
3294
+ const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
3251
3295
  return {
3252
3296
  tag: "#anchor",
3253
3297
  key: t,
3254
- children: n
3298
+ children: r
3255
3299
  };
3256
3300
  }
3257
- function vn(e, t) {
3301
+ function xr(e, t) {
3258
3302
  return Re(!e, t);
3259
3303
  }
3260
- function kn(e, t) {
3261
- const n = !e || e.length === 0;
3262
- return Re(n, t);
3304
+ function vr(e, t) {
3305
+ const r = !e || e.length === 0;
3306
+ return Re(r, t);
3263
3307
  }
3264
- function Cn(e, t) {
3265
- const n = !!(e && e.length > 0);
3266
- return Re(n, t);
3308
+ function kr(e, t) {
3309
+ const r = !!(e && e.length > 0);
3310
+ return Re(r, t);
3267
3311
  }
3268
- function _n(e, t, n) {
3269
- const r = [];
3312
+ function Cr(e, t, r) {
3313
+ const n = [];
3270
3314
  return e.forEach((i, s) => {
3271
- t(i, s) && r.push({ item: i, originalIndex: s });
3272
- }), r.map(({ item: i, originalIndex: s }, o) => {
3315
+ t(i, s) && n.push({ item: i, originalIndex: s });
3316
+ }), n.map(({ item: i, originalIndex: s }, o) => {
3273
3317
  const a = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
3274
- return j(n(i, s, o), `each-where-${a}`);
3318
+ return j(r(i, s, o), `each-where-${a}`);
3275
3319
  });
3276
3320
  }
3277
- function En(e, t) {
3278
- const n = e?.length ?? 0;
3279
- return n === 0 && t.empty ? j(t.empty, "switch-length-empty") : n === 1 && t.one ? j(t.one(e[0]), "switch-length-one") : t.exactly?.[n] ? j(t.exactly[n](e), `switch-length-${n}`) : n > 1 && t.many ? j(t.many(e), "switch-length-many") : j([], "switch-length-fallback");
3321
+ function _r(e, t) {
3322
+ const r = e?.length ?? 0;
3323
+ return r === 0 && t.empty ? j(t.empty, "switch-length-empty") : r === 1 && t.one ? j(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? j(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? j(t.many(e), "switch-length-many") : j([], "switch-length-fallback");
3280
3324
  }
3281
- function $n(e, t, n) {
3282
- const r = /* @__PURE__ */ new Map();
3325
+ function Er(e, t, r) {
3326
+ const n = /* @__PURE__ */ new Map();
3283
3327
  return e.forEach((i) => {
3284
3328
  const s = t(i);
3285
- r.has(s) || r.set(s, []), r.get(s).push(i);
3286
- }), Array.from(r.entries()).map(([i, s], o) => j(
3287
- n(i, s, o),
3329
+ n.has(s) || n.set(s, []), n.get(s).push(i);
3330
+ }), Array.from(n.entries()).map(([i, s], o) => j(
3331
+ r(i, s, o),
3288
3332
  `each-group-${i}`
3289
3333
  ));
3290
3334
  }
3291
- function Sn(e, t, n, r) {
3292
- const i = n * t, s = Math.min(i + t, e.length);
3335
+ function $r(e, t, r, n) {
3336
+ const i = r * t, s = Math.min(i + t, e.length);
3293
3337
  return e.slice(i, s).map((a, u) => {
3294
- const y = i + u, g = typeof a == "object" && a != null ? a?.key ?? a?.id ?? `page-${y}` : `page-${y}`;
3295
- return j(r(a, y, u), `each-page-${g}`);
3338
+ const m = i + u, g = typeof a == "object" && a != null ? a?.key ?? a?.id ?? `page-${m}` : `page-${m}`;
3339
+ return j(n(a, m, u), `each-page-${g}`);
3296
3340
  });
3297
3341
  }
3298
- function An(e, t) {
3342
+ function Sr(e, t) {
3299
3343
  return e.loading && t.loading ? j(t.loading, "promise-loading") : e.error && t.error ? j(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? j(t.success(e.data), "promise-success") : t.idle ? j(t.idle, "promise-idle") : j([], "promise-fallback");
3300
3344
  }
3301
3345
  function q(e, t) {
3302
- const n = typeof window < "u" && window.matchMedia?.(e)?.matches;
3303
- return Re(!!n, t);
3346
+ const r = typeof window < "u" && window.matchMedia?.(e)?.matches;
3347
+ return Re(!!r, t);
3304
3348
  }
3305
3349
  const te = {
3306
3350
  // Responsive breakpoints (matching style.ts)
@@ -3311,7 +3355,7 @@ const te = {
3311
3355
  "2xl": "(min-width:1536px)",
3312
3356
  // Dark mode (matching style.ts)
3313
3357
  dark: "(prefers-color-scheme: dark)"
3314
- }, lt = ["sm", "md", "lg", "xl", "2xl"], cn = {
3358
+ }, lt = ["sm", "md", "lg", "xl", "2xl"], ar = {
3315
3359
  // Breakpoint-based rendering (matching style.ts exactly)
3316
3360
  sm: (e) => q(te.sm, e),
3317
3361
  md: (e) => q(te.md, e),
@@ -3330,44 +3374,44 @@ const te = {
3330
3374
  portrait: (e) => q("(orientation: portrait)", e),
3331
3375
  landscape: (e) => q("(orientation: landscape)", e)
3332
3376
  };
3333
- function Tn(e, t) {
3334
- const n = [];
3335
- e.includes("dark") ? n.push(te.dark) : e.includes("light") && n.push("(prefers-color-scheme: light)");
3336
- const r = e.filter(
3377
+ function Ar(e, t) {
3378
+ const r = [];
3379
+ e.includes("dark") ? r.push(te.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
3380
+ const n = e.filter(
3337
3381
  (o) => lt.includes(o)
3338
- ), i = r[r.length - 1];
3339
- i && i in te && n.push(te[i]);
3340
- const s = n.length > 0 ? n.join(" and ") : "all";
3382
+ ), i = n[n.length - 1];
3383
+ i && i in te && r.push(te[i]);
3384
+ const s = r.length > 0 ? r.join(" and ") : "all";
3341
3385
  return q(s, t);
3342
3386
  }
3343
- function Rn(e) {
3387
+ function Tr(e) {
3344
3388
  const t = [];
3345
- return e.base && t.push(j(e.base, "responsive-base")), lt.forEach((n) => {
3346
- const r = e[n];
3347
- r && t.push(cn[n](r));
3389
+ return e.base && t.push(j(e.base, "responsive-base")), lt.forEach((r) => {
3390
+ const n = e[r];
3391
+ n && t.push(ar[r](n));
3348
3392
  }), t;
3349
3393
  }
3350
- function On(e) {
3394
+ function Rr(e) {
3351
3395
  const t = [];
3352
- let n = null;
3396
+ let r = null;
3353
3397
  return {
3354
- case(r, i) {
3355
- const s = typeof r == "function" ? r : (o) => o === r;
3398
+ case(n, i) {
3399
+ const s = typeof n == "function" ? n : (o) => o === n;
3356
3400
  return t.push({ condition: s, content: i }), this;
3357
3401
  },
3358
- when(r, i) {
3359
- return t.push({ condition: r, content: i }), this;
3402
+ when(n, i) {
3403
+ return t.push({ condition: n, content: i }), this;
3360
3404
  },
3361
- otherwise(r) {
3362
- return n = r, this;
3405
+ otherwise(n) {
3406
+ return r = n, this;
3363
3407
  },
3364
3408
  done() {
3365
- for (let r = 0; r < t.length; r++) {
3366
- const { condition: i, content: s } = t[r];
3409
+ for (let n = 0; n < t.length; n++) {
3410
+ const { condition: i, content: s } = t[n];
3367
3411
  if (i(e))
3368
- return j(s, `switch-case-${r}`);
3412
+ return j(s, `switch-case-${n}`);
3369
3413
  }
3370
- return j(n || [], "switch-otherwise");
3414
+ return j(r || [], "switch-otherwise");
3371
3415
  }
3372
3416
  };
3373
3417
  }
@@ -3386,14 +3430,14 @@ class de extends EventTarget {
3386
3430
  * @param eventName - Name of the event
3387
3431
  * @param data - Optional event payload
3388
3432
  */
3389
- emit(t, n) {
3390
- const r = Date.now(), i = this.eventCounters.get(t);
3391
- if (!i || r - i.window > 1e3)
3392
- this.eventCounters.set(t, { count: 1, window: r });
3433
+ emit(t, r) {
3434
+ const n = Date.now(), i = this.eventCounters.get(t);
3435
+ if (!i || n - i.window > 1e3)
3436
+ this.eventCounters.set(t, { count: 1, window: n });
3393
3437
  else if (i.count++, i.count > 50 && i.count > 100)
3394
3438
  return;
3395
3439
  this.dispatchEvent(new CustomEvent(t, {
3396
- detail: n,
3440
+ detail: r,
3397
3441
  bubbles: !1,
3398
3442
  // Global events don't need to bubble
3399
3443
  cancelable: !0
@@ -3401,7 +3445,7 @@ class de extends EventTarget {
3401
3445
  const s = this.handlers[t];
3402
3446
  s && s.forEach((o) => {
3403
3447
  try {
3404
- o(n);
3448
+ o(r);
3405
3449
  } catch (a) {
3406
3450
  se(`Error in global event handler for "${t}":`, a);
3407
3451
  }
@@ -3412,17 +3456,17 @@ class de extends EventTarget {
3412
3456
  * @param eventName - Name of the event
3413
3457
  * @param handler - Handler function
3414
3458
  */
3415
- on(t, n) {
3416
- return this.handlers[t] || (this.handlers[t] = /* @__PURE__ */ new Set()), this.handlers[t].add(n), () => this.off(t, n);
3459
+ on(t, r) {
3460
+ return this.handlers[t] || (this.handlers[t] = /* @__PURE__ */ new Set()), this.handlers[t].add(r), () => this.off(t, r);
3417
3461
  }
3418
3462
  /**
3419
3463
  * Remove a specific handler for a global event.
3420
3464
  * @param eventName - Name of the event
3421
3465
  * @param handler - Handler function to remove
3422
3466
  */
3423
- off(t, n) {
3424
- const r = this.handlers[t];
3425
- r && r.delete(n);
3467
+ off(t, r) {
3468
+ const n = this.handlers[t];
3469
+ n && n.delete(r);
3426
3470
  }
3427
3471
  /**
3428
3472
  * Remove all handlers for a specific event.
@@ -3437,18 +3481,18 @@ class de extends EventTarget {
3437
3481
  * @param handler - CustomEvent handler
3438
3482
  * @param options - AddEventListener options
3439
3483
  */
3440
- listen(t, n, r) {
3441
- return this.addEventListener(t, n, r), () => this.removeEventListener(t, n);
3484
+ listen(t, r, n) {
3485
+ return this.addEventListener(t, r, n), () => this.removeEventListener(t, r);
3442
3486
  }
3443
3487
  /**
3444
3488
  * Register a one-time event handler. Returns a promise that resolves with the event data.
3445
3489
  * @param eventName - Name of the event
3446
3490
  * @param handler - Handler function
3447
3491
  */
3448
- once(t, n) {
3449
- return new Promise((r) => {
3492
+ once(t, r) {
3493
+ return new Promise((n) => {
3450
3494
  const i = this.on(t, (s) => {
3451
- i(), n(s), r(s);
3495
+ i(), r(s), n(s);
3452
3496
  });
3453
3497
  });
3454
3498
  }
@@ -3478,10 +3522,10 @@ class de extends EventTarget {
3478
3522
  */
3479
3523
  getEventStats() {
3480
3524
  const t = {};
3481
- for (const [n, r] of this.eventCounters.entries())
3482
- t[n] = {
3483
- count: r.count,
3484
- handlersCount: this.getHandlerCount(n)
3525
+ for (const [r, n] of this.eventCounters.entries())
3526
+ t[r] = {
3527
+ count: n.count,
3528
+ handlersCount: this.getHandlerCount(r)
3485
3529
  };
3486
3530
  return t;
3487
3531
  }
@@ -3492,12 +3536,12 @@ class de extends EventTarget {
3492
3536
  this.eventCounters.clear();
3493
3537
  }
3494
3538
  }
3495
- const be = de.getInstance(), Pn = (e, t) => be.emit(e, t), Ln = (e, t) => be.on(e, t), Mn = (e, t) => be.off(e, t), jn = (e, t) => be.once(e, t), Nn = (e, t, n) => be.listen(e, t, n);
3539
+ const be = de.getInstance(), Or = (e, t) => be.emit(e, t), Pr = (e, t) => be.on(e, t), Lr = (e, t) => be.off(e, t), Mr = (e, t) => be.once(e, t), jr = (e, t, r) => be.listen(e, t, r);
3496
3540
  function tt(e) {
3497
3541
  let t = { ...e };
3498
- const n = [];
3499
- function r(a) {
3500
- n.push(a), a(t);
3542
+ const r = [];
3543
+ function n(a) {
3544
+ r.push(a), a(t);
3501
3545
  }
3502
3546
  function i() {
3503
3547
  return t;
@@ -3507,23 +3551,23 @@ function tt(e) {
3507
3551
  t = { ...t, ...u }, o();
3508
3552
  }
3509
3553
  function o() {
3510
- n.forEach((a) => a(t));
3554
+ r.forEach((a) => a(t));
3511
3555
  }
3512
- return { subscribe: r, getState: i, setState: s };
3556
+ return { subscribe: n, getState: i, setState: s };
3513
3557
  }
3514
- const nt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Q = (e, t) => {
3515
- for (const n of e) {
3516
- const r = [], i = n.path.replace(/:[^/]+/g, (a) => (r.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
3558
+ const rt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Q = (e, t) => {
3559
+ for (const r of e) {
3560
+ const n = [], i = r.path.replace(/:[^/]+/g, (a) => (n.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
3517
3561
  if (o) {
3518
3562
  const a = {};
3519
- return r.forEach((u, y) => {
3520
- a[u] = o[y + 1];
3521
- }), { route: n, params: a };
3563
+ return n.forEach((u, m) => {
3564
+ a[u] = o[m + 1];
3565
+ }), { route: r, params: a };
3522
3566
  }
3523
3567
  }
3524
3568
  return { route: null, params: {} };
3525
3569
  }, Ie = {};
3526
- async function ln(e) {
3570
+ async function cr(e) {
3527
3571
  if (e.component) return e.component;
3528
3572
  if (e.load) {
3529
3573
  if (Ie[e.path]) return Ie[e.path];
@@ -3536,9 +3580,9 @@ async function ln(e) {
3536
3580
  }
3537
3581
  throw new Error(`No component or loader defined for route: ${e.path}`);
3538
3582
  }
3539
- function un(e) {
3540
- const { routes: t, base: n = "", initialUrl: r } = e;
3541
- let i, s, o, a, u, y, g;
3583
+ function lr(e) {
3584
+ const { routes: t, base: r = "", initialUrl: n } = e;
3585
+ let i, s, o, a, u, m, g;
3542
3586
  const b = async (x, w) => {
3543
3587
  const c = t.find((p) => Q([p], x.path).route !== null);
3544
3588
  if (c?.beforeEnter)
@@ -3570,24 +3614,24 @@ function un(e) {
3570
3614
  }, d = async (x, w = !1) => {
3571
3615
  try {
3572
3616
  const c = {
3573
- path: x.replace(n, "") || "/",
3617
+ path: x.replace(r, "") || "/",
3574
3618
  query: {}
3575
3619
  }, p = Q(t, c.path);
3576
3620
  if (!p) throw new Error(`No route found for ${c.path}`);
3577
- const m = o.getState(), C = {
3621
+ const y = o.getState(), C = {
3578
3622
  path: c.path,
3579
3623
  params: p.params,
3580
3624
  query: c.query
3581
3625
  };
3582
- if (!await b(C, m) || !await h(C, m)) return;
3583
- typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", n + x) : window.history.pushState({}, "", n + x)), o.setState(C), l(C, m);
3626
+ if (!await b(C, y) || !await h(C, y)) return;
3627
+ typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + x) : window.history.pushState({}, "", r + x)), o.setState(C), l(C, y);
3584
3628
  } catch (c) {
3585
3629
  se("Navigation error:", c);
3586
3630
  }
3587
3631
  };
3588
- if (typeof window < "u" && typeof document < "u" && typeof r > "u") {
3632
+ if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
3589
3633
  i = () => {
3590
- const w = new URL(window.location.href), c = w.pathname.replace(n, "") || "/", p = nt(w.search);
3634
+ const w = new URL(window.location.href), c = w.pathname.replace(r, "") || "/", p = rt(w.search);
3591
3635
  return { path: c, query: p };
3592
3636
  }, s = i();
3593
3637
  const x = Q(t, s.path);
@@ -3598,11 +3642,11 @@ function un(e) {
3598
3642
  }), a = async (w = !1) => {
3599
3643
  const c = i();
3600
3644
  await d(c.path, w);
3601
- }, window.addEventListener("popstate", () => a(!0)), u = (w) => d(w, !1), y = (w) => d(w, !0), g = () => window.history.back();
3645
+ }, window.addEventListener("popstate", () => a(!0)), u = (w) => d(w, !1), m = (w) => d(w, !0), g = () => window.history.back();
3602
3646
  } else {
3603
3647
  i = () => {
3604
- const c = new URL(r || "/", "http://localhost"), p = c.pathname.replace(n, "") || "/", m = nt(c.search);
3605
- return { path: p, query: m };
3648
+ const c = new URL(n || "/", "http://localhost"), p = c.pathname.replace(r, "") || "/", y = rt(c.search);
3649
+ return { path: p, query: y };
3606
3650
  }, s = i();
3607
3651
  const x = Q(t, s.path);
3608
3652
  o = tt({
@@ -3616,13 +3660,13 @@ function un(e) {
3616
3660
  const w = async (c) => {
3617
3661
  try {
3618
3662
  const p = {
3619
- path: c.replace(n, "") || "/",
3663
+ path: c.replace(r, "") || "/",
3620
3664
  query: {}
3621
- }, m = Q(t, p.path);
3622
- if (!m) throw new Error(`No route found for ${p.path}`);
3665
+ }, y = Q(t, p.path);
3666
+ if (!y) throw new Error(`No route found for ${p.path}`);
3623
3667
  const C = o.getState(), k = {
3624
3668
  path: p.path,
3625
- params: m.params,
3669
+ params: y.params,
3626
3670
  query: p.query
3627
3671
  }, f = t.find((v) => Q([v], k.path).route !== null);
3628
3672
  if (f?.beforeEnter)
@@ -3655,27 +3699,27 @@ function un(e) {
3655
3699
  } catch {
3656
3700
  }
3657
3701
  };
3658
- u = async (c) => w(c), y = async (c) => w(c), g = () => {
3702
+ u = async (c) => w(c), m = async (c) => w(c), g = () => {
3659
3703
  };
3660
3704
  }
3661
3705
  return {
3662
3706
  store: o,
3663
3707
  push: u,
3664
- replace: y,
3708
+ replace: m,
3665
3709
  back: g,
3666
3710
  subscribe: o.subscribe,
3667
3711
  matchRoute: (x) => Q(t, x),
3668
3712
  getCurrent: () => o.getState(),
3669
- resolveRouteComponent: ln
3713
+ resolveRouteComponent: cr
3670
3714
  };
3671
3715
  }
3672
- function Wn(e, t) {
3716
+ function Nr(e, t) {
3673
3717
  return Q(e, t);
3674
3718
  }
3675
- function zn(e) {
3676
- const t = un(e);
3677
- return et("router-view", (n = {}, r = {}) => {
3678
- const { onConnected: i } = r;
3719
+ function Wr(e) {
3720
+ const t = lr(e);
3721
+ return et("router-view", (r = {}, n = {}) => {
3722
+ const { onConnected: i } = n;
3679
3723
  if (i && i(() => {
3680
3724
  t && typeof t.subscribe == "function" && t.subscribe(() => {
3681
3725
  });
@@ -3685,30 +3729,30 @@ function zn(e) {
3685
3729
  if (typeof u == "string")
3686
3730
  return { tag: u, props: {}, children: [] };
3687
3731
  if (typeof u == "function") {
3688
- const y = u();
3689
- return (y instanceof Promise ? y : Promise.resolve(y)).then((b) => typeof b == "string" ? { tag: b, props: {}, children: [] } : b);
3732
+ const m = u();
3733
+ return (m instanceof Promise ? m : Promise.resolve(m)).then((b) => typeof b == "string" ? { tag: b, props: {}, children: [] } : b);
3690
3734
  }
3691
3735
  return ce`<div>Invalid route component</div>`;
3692
3736
  }).catch(() => ce`<div>Invalid route component</div>`) : ce`<div>Not found</div>`;
3693
- }), et("router-link", (n = {}, r = {}) => {
3737
+ }), et("router-link", (r = {}, n = {}) => {
3694
3738
  const {
3695
3739
  to: i = "",
3696
3740
  tag: s = "a",
3697
3741
  replace: o = !1,
3698
3742
  exact: a = !1,
3699
3743
  activeClass: u = "active",
3700
- exactActiveClass: y = "exact-active",
3744
+ exactActiveClass: m = "exact-active",
3701
3745
  ariaCurrentValue: g = "page",
3702
3746
  disabled: b = !1,
3703
3747
  external: h = !1,
3704
3748
  class: l = ""
3705
- } = n, d = t.getCurrent(), x = d.path === i, w = a ? x : d && typeof d.path == "string" ? d.path.startsWith(i) : !1, c = x ? `aria-current="${g}"` : "", p = (l || "").split(/\s+/).filter(Boolean), m = {};
3706
- for (const _ of p) m[_] = !0;
3749
+ } = r, d = t.getCurrent(), x = d.path === i, w = a ? x : d && typeof d.path == "string" ? d.path.startsWith(i) : !1, c = x ? `aria-current="${g}"` : "", p = (l || "").split(/\s+/).filter(Boolean), y = {};
3750
+ for (const _ of p) y[_] = !0;
3707
3751
  const C = {
3708
- ...m,
3752
+ ...y,
3709
3753
  // Also include the configurable names (may duplicate the above)
3710
3754
  [u]: w,
3711
- [y]: x
3755
+ [m]: x
3712
3756
  }, k = s === "button", f = b ? k ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", v = h && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", A = (_) => {
3713
3757
  if (b) {
3714
3758
  _.preventDefault();
@@ -3717,7 +3761,7 @@ function zn(e) {
3717
3761
  h && (s === "a" || !s) || (_.preventDefault(), o ? t.replace(i) : t.push(i));
3718
3762
  };
3719
3763
  return ce`
3720
- ${on().when(k, ce`
3764
+ ${sr().when(k, ce`
3721
3765
  <button
3722
3766
  part="button"
3723
3767
  :class="${C}"
@@ -3744,48 +3788,48 @@ export {
3744
3788
  de as GlobalEventBus,
3745
3789
  j as anchorBlock,
3746
3790
  et as component,
3747
- dn as computed,
3791
+ fr as computed,
3748
3792
  tt as createStore,
3749
3793
  Pt as css,
3750
- xn as each,
3751
- $n as eachGroup,
3752
- Sn as eachPage,
3753
- _n as eachWhere,
3754
- Pn as emit,
3794
+ wr as each,
3795
+ Er as eachGroup,
3796
+ $r as eachPage,
3797
+ Cr as eachWhere,
3798
+ Or as emit,
3755
3799
  be as eventBus,
3756
3800
  ce as html,
3757
- zn as initRouter,
3758
- Nn as listen,
3759
- on as match,
3801
+ Wr as initRouter,
3802
+ jr as listen,
3803
+ sr as match,
3760
3804
  Q as matchRoute,
3761
- Wn as matchRouteSSR,
3805
+ Nr as matchRouteSSR,
3762
3806
  te as mediaVariants,
3763
- Mn as off,
3764
- Ln as on,
3765
- jn as once,
3766
- nt as parseQuery,
3767
- fn as ref,
3807
+ Lr as off,
3808
+ Pr as on,
3809
+ Mr as once,
3810
+ rt as parseQuery,
3811
+ ur as ref,
3768
3812
  Pe as renderToString,
3769
- ln as resolveRouteComponent,
3770
- cn as responsive,
3813
+ cr as resolveRouteComponent,
3814
+ ar as responsive,
3771
3815
  lt as responsiveOrder,
3772
- Rn as responsiveSwitch,
3773
- On as switchOn,
3774
- En as switchOnLength,
3775
- An as switchOnPromise,
3776
- vn as unless,
3777
- hn as useEmit,
3778
- mn as useOnAttributeChanged,
3779
- gn as useOnConnected,
3780
- yn as useOnDisconnected,
3781
- bn as useOnError,
3782
- un as useRouter,
3783
- wn as useStyle,
3784
- pn as watch,
3816
+ Tr as responsiveSwitch,
3817
+ Rr as switchOn,
3818
+ _r as switchOnLength,
3819
+ Sr as switchOnPromise,
3820
+ xr as unless,
3821
+ pr as useEmit,
3822
+ mr as useOnAttributeChanged,
3823
+ hr as useOnConnected,
3824
+ gr as useOnDisconnected,
3825
+ yr as useOnError,
3826
+ lr as useRouter,
3827
+ br as useStyle,
3828
+ dr as watch,
3785
3829
  Re as when,
3786
- kn as whenEmpty,
3830
+ vr as whenEmpty,
3787
3831
  q as whenMedia,
3788
- Cn as whenNotEmpty,
3789
- Tn as whenVariants
3832
+ kr as whenNotEmpty,
3833
+ Ar as whenVariants
3790
3834
  };
3791
3835
  //# sourceMappingURL=custom-elements-runtime.es.js.map