@jasonshimmy/custom-elements-runtime 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- function Xe(e, t) {
2
- return F(e ? t : [], "when-block");
1
+ function tt(e, t) {
2
+ return U(e ? t : [], "when-block");
3
3
  }
4
- function Ye(e, t) {
4
+ function rt(e, t) {
5
5
  return e.map((r, n) => {
6
6
  const o = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
7
- return F(t(r, n), `each-${o}`);
7
+ return U(t(r, n), `each-${o}`);
8
8
  });
9
9
  }
10
- function pe() {
10
+ function be() {
11
11
  const e = [];
12
12
  return {
13
13
  when(t, r) {
@@ -17,18 +17,18 @@ function pe() {
17
17
  return e.push([!0, t]), this;
18
18
  },
19
19
  done() {
20
- return he(...e);
20
+ return ve(...e);
21
21
  }
22
22
  };
23
23
  }
24
- function he(...e) {
24
+ function ve(...e) {
25
25
  for (let t = 0; t < e.length; t++) {
26
26
  const [r, n] = e[t];
27
- if (r) return [F(n, `whenChain-branch-${t}`)];
27
+ if (r) return [U(n, `whenChain-branch-${t}`)];
28
28
  }
29
- return [F([], "whenChain-empty")];
29
+ return [U([], "whenChain-empty")];
30
30
  }
31
- function F(e, t) {
31
+ function U(e, t) {
32
32
  const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
33
33
  return {
34
34
  tag: "#anchor",
@@ -36,7 +36,7 @@ function F(e, t) {
36
36
  children: r
37
37
  };
38
38
  }
39
- class N extends EventTarget {
39
+ class O extends EventTarget {
40
40
  handlers = {};
41
41
  static instance;
42
42
  eventCounters = /* @__PURE__ */ new Map();
@@ -44,7 +44,7 @@ class N extends EventTarget {
44
44
  * Returns the singleton instance of GlobalEventBus
45
45
  */
46
46
  static getInstance() {
47
- return N.instance || (N.instance = new N()), N.instance;
47
+ return O.instance || (O.instance = new O()), O.instance;
48
48
  }
49
49
  // Enhanced emit method with better typing and event storm protection
50
50
  /**
@@ -160,8 +160,8 @@ class N extends EventTarget {
160
160
  this.eventCounters.clear();
161
161
  }
162
162
  }
163
- const P = N.getInstance(), Ge = (e, t) => P.emit(e, t), et = (e, t) => P.on(e, t), tt = (e, t) => P.off(e, t), rt = (e, t) => P.once(e, t), nt = (e, t, r) => P.listen(e, t, r);
164
- function te(e) {
163
+ const D = O.getInstance(), nt = (e, t) => D.emit(e, t), ot = (e, t) => D.on(e, t), it = (e, t) => D.off(e, t), st = (e, t) => D.once(e, t), at = (e, t, r) => D.listen(e, t, r);
164
+ function se(e) {
165
165
  let t = { ...e };
166
166
  const r = [];
167
167
  function n(a) {
@@ -179,10 +179,10 @@ function te(e) {
179
179
  }
180
180
  return { subscribe: n, getState: o, setState: s };
181
181
  }
182
- function ee(e) {
182
+ function ne(e) {
183
183
  return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
184
184
  }
185
- function X(e) {
185
+ function ee(e) {
186
186
  return typeof e == "string" ? e.replace(
187
187
  /[&<>"']/g,
188
188
  (t) => ({
@@ -194,34 +194,34 @@ function X(e) {
194
194
  })[t]
195
195
  ) : e;
196
196
  }
197
- function ge(e, t, r) {
197
+ function xe(e, t, r) {
198
198
  if (r)
199
199
  for (const [n, o] of Object.entries(r)) {
200
200
  let s, i = {};
201
201
  if (Array.isArray(o) ? (s = o[0], i = o[1] || {}) : s = o, t.set(n, {
202
202
  callback: s,
203
203
  options: i,
204
- oldValue: Y(e, n)
204
+ oldValue: te(e, n)
205
205
  }), i.immediate)
206
206
  try {
207
- const a = Y(e, n);
207
+ const a = te(e, n);
208
208
  s(a, void 0, e);
209
209
  } catch (a) {
210
210
  console.error(`Error in immediate watcher for "${n}":`, a);
211
211
  }
212
212
  }
213
213
  }
214
- function Y(e, t) {
214
+ function te(e, t) {
215
215
  return t.split(".").reduce((r, n) => r?.[n], e);
216
216
  }
217
- function ye(e, t, r, n) {
217
+ function we(e, t, r, n) {
218
218
  const o = (i, a) => {
219
219
  if (i === a) return !0;
220
220
  if (typeof i != typeof a || typeof i != "object" || i === null || a === null) return !1;
221
221
  if (Array.isArray(i) && Array.isArray(a))
222
- return i.length !== a.length ? !1 : i.every((h, p) => o(h, a[p]));
222
+ return i.length !== a.length ? !1 : i.every((y, h) => o(y, a[h]));
223
223
  const c = Object.keys(i), f = Object.keys(a);
224
- return c.length !== f.length ? !1 : c.every((h) => o(i[h], a[h]));
224
+ return c.length !== f.length ? !1 : c.every((y) => o(i[y], a[y]));
225
225
  }, s = t.get(r);
226
226
  if (s && !o(n, s.oldValue))
227
227
  try {
@@ -232,13 +232,13 @@ function ye(e, t, r, n) {
232
232
  for (const [i, a] of t.entries())
233
233
  if (a.options.deep && r.startsWith(i + "."))
234
234
  try {
235
- const c = Y(e, i);
235
+ const c = te(e, i);
236
236
  o(c, a.oldValue) || (a.callback(c, a.oldValue, e), a.oldValue = c);
237
237
  } catch (c) {
238
238
  console.error(`Error in deep watcher for "${i}":`, c);
239
239
  }
240
240
  }
241
- function me(e, t, r) {
241
+ function ke(e, t, r) {
242
242
  if (!t.props) return;
243
243
  function n(o, s) {
244
244
  return s === Boolean ? o === "true" : s === Number ? Number(o) : o;
@@ -247,136 +247,136 @@ function me(e, t, r) {
247
247
  if (s.type === Function && typeof e[o] == "function")
248
248
  r[o] = e[o];
249
249
  else {
250
- const i = e.getAttribute(ee(o));
251
- i !== null ? r[o] = X(n(i, s.type)) : "default" in s && s.default !== void 0 && (r[o] = X(s.default));
250
+ const i = e.getAttribute(ne(o));
251
+ i !== null ? r[o] = ee(n(i, s.type)) : "default" in s && s.default !== void 0 && (r[o] = ee(s.default));
252
252
  }
253
253
  });
254
254
  }
255
- function be(e, t, r, n) {
255
+ function $e(e, t, r, n) {
256
256
  e.onConnected && !r && (e.onConnected(t), n(!0));
257
257
  }
258
- function ve(e, t, r, n, o, s, i, a) {
258
+ function _e(e, t, r, n, o, s, i, a) {
259
259
  e.onDisconnected && e.onDisconnected(t), r.forEach((c) => c()), n(), o(), s(!1), i(null), a(!1);
260
260
  }
261
- function xe(e, t, r, n, o) {
261
+ function Se(e, t, r, n, o) {
262
262
  e.onAttributeChanged && e.onAttributeChanged(t, r, n, o);
263
263
  }
264
- function j(e, t) {
264
+ function B(e, t) {
265
265
  if (t && e instanceof HTMLElement) {
266
266
  for (const r in t)
267
267
  t[r] === e && delete t[r];
268
268
  for (const r of Array.from(e.childNodes))
269
- j(r, t);
269
+ B(r, t);
270
270
  }
271
271
  }
272
- function z(e, t) {
272
+ function R(e, t) {
273
273
  return typeof t == "string" ? t.split(".").reduce((r, n) => r?.[n], e) : t;
274
274
  }
275
- function re(e, t, r) {
275
+ function ae(e, t, r) {
276
276
  const n = t.split("."), o = n.pop();
277
277
  if (!o) return;
278
278
  const s = n.reduce((i, a) => (a in i || (i[a] = {}), i[a]), e);
279
279
  s[o] = r;
280
280
  }
281
- function we(e, t, r, n, o, s, i) {
281
+ function Ce(e, t, r, n, o, s, i) {
282
282
  if (!s) return;
283
- const a = t.includes("lazy"), c = t.includes("trim"), f = t.includes("number"), h = () => {
283
+ const a = t.includes("lazy"), c = t.includes("trim"), f = t.includes("number"), y = () => {
284
284
  const g = s._state || s;
285
- return z(g, e);
286
- }, p = h();
285
+ return R(g, e);
286
+ }, h = y();
287
287
  let l = "text";
288
- const x = n?.type;
289
- if (i instanceof HTMLInputElement ? l = x || i.type || "text" : i instanceof HTMLSelectElement ? l = "select" : i instanceof HTMLTextAreaElement && (l = "textarea"), l === "checkbox")
290
- if (Array.isArray(p)) {
291
- const g = i?.getAttribute("value") || n?.value || "", u = p.includes(g);
288
+ const v = n?.type;
289
+ if (i instanceof HTMLInputElement ? l = v || i.type || "text" : i instanceof HTMLSelectElement ? l = "select" : i instanceof HTMLTextAreaElement && (l = "textarea"), l === "checkbox")
290
+ if (Array.isArray(h)) {
291
+ const g = i?.getAttribute("value") || n?.value || "", u = h.includes(g);
292
292
  i && i.checked !== u && (r.checked = u);
293
293
  } else {
294
- const g = i?.getAttribute("true-value") || !0, u = p === g;
294
+ const g = i?.getAttribute("true-value") || !0, u = h === g;
295
295
  i && i.checked !== u && (r.checked = u);
296
296
  }
297
297
  else if (l === "radio") {
298
- const g = n?.value || "", u = p === g;
298
+ const g = n?.value || "", u = h === g;
299
299
  i && i.checked !== u && (r.checked = u);
300
300
  } else if (l === "select")
301
301
  if (i && i.hasAttribute("multiple")) {
302
- const g = i, u = Array.isArray(p) ? p : [];
302
+ const g = i, u = Array.isArray(h) ? h : [];
303
303
  setTimeout(() => {
304
- Array.from(g.options).forEach((m) => {
305
- const v = u.includes(m.value);
306
- m.selected !== v && (m.selected = v);
304
+ Array.from(g.options).forEach((p) => {
305
+ const w = u.includes(p.value);
306
+ p.selected !== w && (p.selected = w);
307
307
  });
308
308
  }, 0);
309
309
  } else
310
310
  setTimeout(() => {
311
- i instanceof HTMLSelectElement && i.value !== String(p) && (i.value = String(p));
311
+ i instanceof HTMLSelectElement && i.value !== String(h) && (i.value = String(h));
312
312
  }, 0);
313
313
  else {
314
- const g = String(p ?? "");
315
- (!i || i.value !== g) && (r.value = p);
314
+ const g = String(h ?? "");
315
+ (!i || i.value !== g) && (r.value = h);
316
316
  }
317
- const y = a || l === "checkbox" || l === "radio" || l === "select" ? "change" : "input", b = (g) => {
317
+ const x = a || l === "checkbox" || l === "radio" || l === "select" ? "change" : "input", m = (g) => {
318
318
  if (g.isComposing || o._isComposing || g.isTrusted === !1) return;
319
319
  const u = g.target;
320
320
  if (u._modelUpdating) return;
321
- const m = h();
322
- let v = u.value;
321
+ const p = y();
322
+ let w = u.value;
323
323
  if (l === "checkbox")
324
- if (Array.isArray(m)) {
325
- const w = u.getAttribute("value") || "", _ = [...m];
324
+ if (Array.isArray(p)) {
325
+ const k = u.getAttribute("value") || "", _ = [...p];
326
326
  if (u.checked)
327
- _.includes(w) || _.push(w);
327
+ _.includes(k) || _.push(k);
328
328
  else {
329
- const S = _.indexOf(w);
329
+ const S = _.indexOf(k);
330
330
  S > -1 && _.splice(S, 1);
331
331
  }
332
- v = _;
332
+ w = _;
333
333
  } else {
334
- const w = u.getAttribute("true-value") || !0, _ = u.getAttribute("false-value") || !1;
335
- v = u.checked ? w : _;
334
+ const k = u.getAttribute("true-value") || !0, _ = u.getAttribute("false-value") || !1;
335
+ w = u.checked ? k : _;
336
336
  }
337
337
  else if (l === "radio")
338
- v = u.getAttribute("value") || u.value;
338
+ w = u.getAttribute("value") || u.value;
339
339
  else if (l === "select" && u.multiple) {
340
- const w = u;
341
- v = Array.from(w.selectedOptions).map(
340
+ const k = u;
341
+ w = Array.from(k.selectedOptions).map(
342
342
  (_) => _.value
343
343
  );
344
- } else if (c && (v = v.trim()), f) {
345
- const w = Number(v);
346
- isNaN(w) || (v = w);
344
+ } else if (c && (w = w.trim()), f) {
345
+ const k = Number(w);
346
+ isNaN(k) || (w = k);
347
347
  }
348
- const d = s._state || s, $ = z(d, e);
349
- if (Array.isArray(v) && Array.isArray($) ? JSON.stringify([...v].sort()) !== JSON.stringify([...$].sort()) : v !== $) {
350
- const w = g.target;
351
- w._modelUpdating = !0, re(d, e, v), setTimeout(() => {
352
- w._modelUpdating = !1;
348
+ const d = s._state || s, b = R(d, e);
349
+ if (Array.isArray(w) && Array.isArray(b) ? JSON.stringify([...w].sort()) !== JSON.stringify([...b].sort()) : w !== b) {
350
+ const k = g.target;
351
+ k._modelUpdating = !0, ae(d, e, w), setTimeout(() => {
352
+ k._modelUpdating = !1;
353
353
  }, 0), s._requestRender && s._requestRender();
354
354
  }
355
355
  };
356
- if (o[y] = b, l === "text" || l === "textarea") {
356
+ if (o[x] = m, l === "text" || l === "textarea") {
357
357
  const g = () => {
358
358
  o._isComposing = !0;
359
- }, u = (m) => {
359
+ }, u = (p) => {
360
360
  o._isComposing = !1;
361
- const v = m.target;
361
+ const w = p.target;
362
362
  setTimeout(() => {
363
- if (v) {
364
- let d = v.value;
363
+ if (w) {
364
+ let d = w.value;
365
365
  if (c && (d = d.trim()), f) {
366
366
  const _ = Number(d);
367
367
  isNaN(_) || (d = _);
368
368
  }
369
- const $ = s._state || s, k = z($, e);
370
- (Array.isArray(d) && Array.isArray(k) ? JSON.stringify([...d].sort()) !== JSON.stringify([...k].sort()) : d !== k) && (v && (v._modelUpdating = !0, setTimeout(() => {
371
- v._modelUpdating = !1;
372
- }, 0)), re($, e, d), s._requestRender && s._requestRender());
369
+ const b = s._state || s, $ = R(b, e);
370
+ (Array.isArray(d) && Array.isArray($) ? JSON.stringify([...d].sort()) !== JSON.stringify([...$].sort()) : d !== $) && (w && (w._modelUpdating = !0, setTimeout(() => {
371
+ w._modelUpdating = !1;
372
+ }, 0)), ae(b, e, d), s._requestRender && s._requestRender());
373
373
  }
374
374
  }, 0);
375
375
  };
376
376
  o.compositionstart = g, o.compositionend = u;
377
377
  }
378
378
  }
379
- function ke(e, t, r, n) {
379
+ function Ee(e, t, r, n) {
380
380
  if (n) {
381
381
  if (typeof e == "object" && e !== null)
382
382
  for (const [o, s] of Object.entries(e))
@@ -390,14 +390,14 @@ function ke(e, t, r, n) {
390
390
  return;
391
391
  }
392
392
  } catch {
393
- const o = z(n, e);
393
+ const o = R(n, e);
394
394
  r[e] = o;
395
395
  }
396
396
  }
397
397
  }
398
- function $e(e, t, r) {
398
+ function Ae(e, t, r) {
399
399
  if (!r) return;
400
- const n = z(r, e), o = t.style || "", s = n ? "" : "none";
400
+ const n = R(r, e), o = t.style || "", s = n ? "" : "none";
401
401
  if (o) {
402
402
  const i = o.split(";").filter(Boolean), a = i.findIndex(
403
403
  (c) => c.trim().startsWith("display:")
@@ -406,19 +406,19 @@ function $e(e, t, r) {
406
406
  } else
407
407
  t.style = `display: ${s}`;
408
408
  }
409
- function _e(e, t, r) {
409
+ function Te(e, t, r) {
410
410
  if (!r) return;
411
- const n = z(r, e);
411
+ const n = R(r, e);
412
412
  let o = [];
413
413
  typeof n == "string" ? o = [n] : Array.isArray(n) ? o = n.filter(Boolean) : typeof n == "object" && (o = Object.entries(n).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
414
414
  const s = t.class || "", i = s ? `${s} ${o.join(" ")}`.trim() : o.join(" ");
415
415
  i && (t.class = i);
416
416
  }
417
- function Se(e, t, r) {
417
+ function Le(e, t, r) {
418
418
  let n;
419
419
  if (typeof e == "string") {
420
420
  if (!r) return;
421
- n = z(r, e);
421
+ n = R(r, e);
422
422
  } else
423
423
  n = e;
424
424
  let o = "";
@@ -431,7 +431,7 @@ function Se(e, t, r) {
431
431
  const f = a.replace(
432
432
  /[A-Z]/g,
433
433
  (l) => `-${l.toLowerCase()}`
434
- ), h = [
434
+ ), y = [
435
435
  "width",
436
436
  "height",
437
437
  "top",
@@ -457,23 +457,23 @@ function Se(e, t, r) {
457
457
  "min-height",
458
458
  "max-height"
459
459
  ];
460
- let p = String(c);
461
- typeof c == "number" && h.includes(f) && (p = `${c}px`), i.push(`${f}: ${p}`);
460
+ let h = String(c);
461
+ typeof c == "number" && y.includes(f) && (h = `${c}px`), i.push(`${f}: ${h}`);
462
462
  }
463
463
  o = i.join("; ") + (i.length > 0 ? ";" : "");
464
464
  }
465
465
  const s = t.style || "";
466
466
  t.style = s + (s && !s.endsWith(";") ? "; " : "") + o;
467
467
  }
468
- function fe(e, t, r, n) {
468
+ function ge(e, t, r, n) {
469
469
  const o = {}, s = { ...n || {} }, i = {};
470
470
  for (const [a, c] of Object.entries(e)) {
471
- const { value: f, modifiers: h } = c;
471
+ const { value: f, modifiers: y } = c;
472
472
  switch (a) {
473
473
  case "model":
474
- we(
474
+ Ce(
475
475
  typeof f == "string" ? f : String(f),
476
- h,
476
+ y,
477
477
  o,
478
478
  s,
479
479
  i,
@@ -482,45 +482,45 @@ function fe(e, t, r, n) {
482
482
  );
483
483
  break;
484
484
  case "bind":
485
- ke(f, o, s, t);
485
+ Ee(f, o, s, t);
486
486
  break;
487
487
  case "show":
488
- $e(f, s, t);
488
+ Ae(f, s, t);
489
489
  break;
490
490
  case "class":
491
- _e(f, s, t);
491
+ Te(f, s, t);
492
492
  break;
493
493
  case "style":
494
- Se(f, s, t);
494
+ Le(f, s, t);
495
495
  break;
496
496
  }
497
497
  }
498
498
  return { props: o, attrs: s, listeners: i };
499
499
  }
500
- function G(e, t) {
500
+ function re(e, t) {
501
501
  if (Array.isArray(e)) {
502
502
  const s = /* @__PURE__ */ new Set();
503
503
  return e.map((i) => {
504
504
  if (!i || typeof i != "object") return i;
505
505
  let a = i.props?.key ?? i.key;
506
506
  if (!a) {
507
- const p = i.tag || "node", l = i.props?.attrs?.id ?? i.props?.attrs?.name ?? i.props?.attrs?.["data-key"] ?? "";
508
- a = l ? `${t}:${p}:${l}` : `${t}:${p}`;
507
+ const h = i.tag || "node", l = i.props?.attrs?.id ?? i.props?.attrs?.name ?? i.props?.attrs?.["data-key"] ?? "";
508
+ a = l ? `${t}:${h}:${l}` : `${t}:${h}`;
509
509
  }
510
510
  let c = a, f = 1;
511
511
  for (; s.has(c); )
512
512
  c = `${a}#${f++}`;
513
513
  s.add(c);
514
- let h = i.children;
515
- return Array.isArray(h) && (h = G(h, c)), { ...i, key: c, children: h };
514
+ let y = i.children;
515
+ return Array.isArray(y) && (y = re(y, c)), { ...i, key: c, children: y };
516
516
  });
517
517
  }
518
518
  const r = e;
519
519
  let n = r.props?.key ?? r.key ?? t, o = r.children;
520
- return Array.isArray(o) && (o = G(o, n)), { ...r, key: n, children: o };
520
+ return Array.isArray(o) && (o = re(o, n)), { ...r, key: n, children: o };
521
521
  }
522
- function Ce(e, t, r, n) {
523
- const o = r.directives ?? {}, s = fe(
522
+ function je(e, t, r, n) {
523
+ const o = r.directives ?? {}, s = ge(
524
524
  o,
525
525
  n,
526
526
  e,
@@ -535,192 +535,192 @@ function Ce(e, t, r, n) {
535
535
  ...s.attrs
536
536
  }, c = t.props ?? {}, f = i;
537
537
  for (const l in { ...c, ...f }) {
538
- const x = c[l], y = f[l];
539
- x !== y && (l === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) ? e.value !== y && (e.value = y ?? "") : l === "checked" && e instanceof HTMLInputElement ? e.checked = !!y : l.startsWith("on") && typeof y == "function" ? (typeof x == "function" && e.removeEventListener(l.slice(2).toLowerCase(), x), e.addEventListener(l.slice(2).toLowerCase(), y)) : y == null || y === !1 ? e.removeAttribute(l) : e.setAttribute(l, String(y)));
538
+ const v = c[l], x = f[l];
539
+ v !== x && (l === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) ? e.value !== x && (e.value = x ?? "") : l === "checked" && e instanceof HTMLInputElement ? e.checked = !!x : l.startsWith("on") && typeof x == "function" ? (typeof v == "function" && e.removeEventListener(l.slice(2).toLowerCase(), v), e.addEventListener(l.slice(2).toLowerCase(), x)) : x == null || x === !1 ? e.removeAttribute(l) : e.setAttribute(l, String(x)));
540
540
  }
541
- for (const [l, x] of Object.entries(
541
+ for (const [l, v] of Object.entries(
542
542
  s.listeners || {}
543
543
  ))
544
- e.addEventListener(l, x);
545
- const h = t.attrs ?? {}, p = a;
546
- for (const l in { ...h, ...p }) {
547
- const x = h[l], y = p[l];
548
- x !== y && (y == null || y === !1 ? e.removeAttribute(l) : e.setAttribute(l, String(y)));
544
+ e.addEventListener(l, v);
545
+ const y = t.attrs ?? {}, h = a;
546
+ for (const l in { ...y, ...h }) {
547
+ const v = y[l], x = h[l];
548
+ v !== x && (x == null || x === !1 ? e.removeAttribute(l) : e.setAttribute(l, String(x)));
549
549
  }
550
550
  }
551
- function A(e, t, r) {
551
+ function j(e, t, r) {
552
552
  if (typeof e == "string")
553
553
  return document.createTextNode(e);
554
554
  if (e.tag === "#text") {
555
- const p = document.createTextNode(
555
+ const h = document.createTextNode(
556
556
  typeof e.children == "string" ? e.children : ""
557
557
  );
558
- return e.key != null && (p.key = e.key), p;
558
+ return e.key != null && (h.key = e.key), h;
559
559
  }
560
560
  if (e.tag === "#anchor") {
561
- const p = e, l = Array.isArray(p.children) ? p.children : [], x = document.createTextNode(""), y = document.createTextNode("");
562
- p.key != null && (x.key = `${p.key}:start`, y.key = `${p.key}:end`), p._startNode = x, p._endNode = y;
563
- const b = document.createDocumentFragment();
564
- b.appendChild(x);
561
+ const h = e, l = Array.isArray(h.children) ? h.children : [], v = document.createTextNode(""), x = document.createTextNode("");
562
+ h.key != null && (v.key = `${h.key}:start`, x.key = `${h.key}:end`), h._startNode = v, h._endNode = x;
563
+ const m = document.createDocumentFragment();
564
+ m.appendChild(v);
565
565
  for (const g of l) {
566
- const u = A(g, t);
567
- b.appendChild(u);
566
+ const u = j(g, t);
567
+ m.appendChild(u);
568
568
  }
569
- return b.appendChild(y), b;
569
+ return m.appendChild(x), m;
570
570
  }
571
571
  const n = document.createElement(e.tag);
572
572
  e.key != null && (n.key = e.key);
573
- const { props: o = {}, attrs: s = {}, directives: i = {} } = e.props ?? {}, a = fe(i, t, n, s), c = {
573
+ const { props: o = {}, attrs: s = {}, directives: i = {} } = e.props ?? {}, a = ge(i, t, n, s), c = {
574
574
  ...o,
575
575
  ...a.props
576
576
  }, f = {
577
577
  ...s,
578
578
  ...a.attrs
579
579
  };
580
- for (const p in f) {
581
- const l = f[p];
582
- if (typeof p != "string" || /\[object Object\]/.test(p)) {
583
- typeof window < "u" && window.console && console.warn("Skipping invalid attribute key:", p, l);
580
+ for (const h in f) {
581
+ const l = f[h];
582
+ if (typeof h != "string" || /\[object Object\]/.test(h)) {
583
+ typeof window < "u" && window.console && console.warn("Skipping invalid attribute key:", h, l);
584
584
  continue;
585
585
  }
586
- typeof l == "boolean" ? l && n.setAttribute(p, "") : l != null && n.setAttribute(p, l);
586
+ typeof l == "boolean" ? l && n.setAttribute(h, "") : l != null && n.setAttribute(h, l);
587
587
  }
588
- for (const p in c) {
589
- const l = c[p];
590
- if (typeof p != "string" || /\[object Object\]/.test(p)) {
591
- typeof window < "u" && window.console && console.warn("Skipping invalid prop key:", p, l);
588
+ for (const h in c) {
589
+ const l = c[h];
590
+ if (typeof h != "string" || /\[object Object\]/.test(h)) {
591
+ typeof window < "u" && window.console && console.warn("Skipping invalid prop key:", h, l);
592
592
  continue;
593
593
  }
594
- if (p === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement))
594
+ if (h === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement))
595
595
  n.value = l ?? "";
596
- else if (p === "checked" && n instanceof HTMLInputElement)
596
+ else if (h === "checked" && n instanceof HTMLInputElement)
597
597
  n.checked = !!l;
598
- else if (p.startsWith("on") && typeof l == "function")
599
- n.addEventListener(p.slice(2).toLowerCase(), l);
598
+ else if (h.startsWith("on") && typeof l == "function")
599
+ n.addEventListener(h.slice(2).toLowerCase(), l);
600
600
  else {
601
- if (p.startsWith("on") && l === void 0)
601
+ if (h.startsWith("on") && l === void 0)
602
602
  continue;
603
- l == null || l === !1 ? n.removeAttribute(p) : n.setAttribute(p, String(l));
603
+ l == null || l === !1 ? n.removeAttribute(h) : n.setAttribute(h, String(l));
604
604
  }
605
605
  }
606
- for (const [p, l] of Object.entries(
606
+ for (const [h, l] of Object.entries(
607
607
  a.listeners || {}
608
608
  ))
609
- n.addEventListener(p, l);
610
- const h = e.props?.ref ?? (e.props?.props && e.props.props.ref);
611
- if (typeof e != "string" && h && r && (r[h] = n), Array.isArray(e.children))
612
- for (const p of e.children)
613
- n.appendChild(A(p, t, r));
609
+ n.addEventListener(h, l);
610
+ const y = e.props?.ref ?? (e.props?.props && e.props.props.ref);
611
+ if (typeof e != "string" && y && r && (r[y] = n), Array.isArray(e.children))
612
+ for (const h of e.children)
613
+ n.appendChild(j(h, t, r));
614
614
  else typeof e.children == "string" && (n.textContent = e.children);
615
615
  return n;
616
616
  }
617
- function Ee(e, t, r, n, o) {
617
+ function ze(e, t, r, n, o) {
618
618
  if (typeof r == "string") {
619
619
  e.textContent !== r && (e.textContent = r);
620
620
  return;
621
621
  }
622
622
  if (!Array.isArray(r)) return;
623
623
  const s = Array.from(e.childNodes), i = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
624
- for (const x of i)
625
- x && x.key != null && a.set(x.key, x);
624
+ for (const v of i)
625
+ v && v.key != null && a.set(v.key, v);
626
626
  const c = /* @__PURE__ */ new Map();
627
- for (const x of s) {
628
- const y = x.key;
629
- y != null && c.set(y, x);
627
+ for (const v of s) {
628
+ const x = v.key;
629
+ x != null && c.set(x, v);
630
630
  }
631
631
  const f = /* @__PURE__ */ new Set();
632
- let h = e.firstChild;
633
- function p(x, y) {
634
- let b = x;
635
- for (; b && (f.add(b), b !== y); )
636
- b = b.nextSibling;
632
+ let y = e.firstChild;
633
+ function h(v, x) {
634
+ let m = v;
635
+ for (; m && (f.add(m), m !== x); )
636
+ m = m.nextSibling;
637
637
  }
638
- function l(x, y, b, g) {
638
+ function l(v, x, m, g) {
639
639
  const u = [];
640
- let m = x.nextSibling;
641
- for (; m && m !== y; )
642
- u.push(m), m = m.nextSibling;
643
- const v = Array.isArray(b) ? b : [];
644
- if (g.some(($) => $ && $.key != null) || v.some(($) => $ && $.key != null)) {
645
- const $ = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map();
646
- for (const S of v)
647
- S && S.key != null && $.set(S.key, S);
640
+ let p = v.nextSibling;
641
+ for (; p && p !== x; )
642
+ u.push(p), p = p.nextSibling;
643
+ const w = Array.isArray(m) ? m : [];
644
+ if (g.some((b) => b && b.key != null) || w.some((b) => b && b.key != null)) {
645
+ const b = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
646
+ for (const S of w)
647
+ S && S.key != null && b.set(S.key, S);
648
648
  for (const S of u) {
649
649
  const C = S.key;
650
- C != null && k.set(C, S);
650
+ C != null && $.set(C, S);
651
651
  }
652
- const w = /* @__PURE__ */ new Set();
653
- let _ = x.nextSibling;
652
+ const k = /* @__PURE__ */ new Set();
653
+ let _ = v.nextSibling;
654
654
  for (const S of g) {
655
655
  let C;
656
- if (S.key != null && k.has(S.key)) {
657
- const E = $.get(S.key);
658
- C = H(
659
- k.get(S.key),
660
- E,
656
+ if (S.key != null && $.has(S.key)) {
657
+ const A = b.get(S.key);
658
+ C = I(
659
+ $.get(S.key),
660
+ A,
661
661
  S,
662
662
  n
663
- ), w.add(C), C !== _ && e.contains(C) && e.insertBefore(C, _);
663
+ ), k.add(C), C !== _ && e.contains(C) && e.insertBefore(C, _);
664
664
  } else
665
- C = A(S, n), e.insertBefore(C, _), w.add(C);
665
+ C = j(S, n), e.insertBefore(C, _), k.add(C);
666
666
  _ = C.nextSibling;
667
667
  }
668
668
  for (const S of u)
669
- !w.has(S) && e.contains(S) && e.removeChild(S);
669
+ !k.has(S) && e.contains(S) && e.removeChild(S);
670
670
  } else {
671
- const $ = Math.min(
672
- v.length,
671
+ const b = Math.min(
672
+ w.length,
673
673
  g.length
674
674
  );
675
- for (let k = 0; k < $; k++) {
676
- const w = v[k], _ = g[k], S = H(u[k], w, _, n);
677
- S !== u[k] && (e.insertBefore(S, u[k]), e.removeChild(u[k]));
675
+ for (let $ = 0; $ < b; $++) {
676
+ const k = w[$], _ = g[$], S = I(u[$], k, _, n);
677
+ S !== u[$] && (e.insertBefore(S, u[$]), e.removeChild(u[$]));
678
678
  }
679
- for (let k = $; k < g.length; k++)
680
- e.insertBefore(A(g[k], n), y);
681
- for (let k = $; k < u.length; k++)
682
- e.removeChild(u[k]);
679
+ for (let $ = b; $ < g.length; $++)
680
+ e.insertBefore(j(g[$], n), x);
681
+ for (let $ = b; $ < u.length; $++)
682
+ e.removeChild(u[$]);
683
683
  }
684
684
  }
685
- for (const x of r) {
686
- let y;
687
- if (x.tag === "#anchor") {
688
- const b = x.key, g = `${b}:start`, u = `${b}:end`;
689
- let m = c.get(g), v = c.get(u);
690
- const d = Array.isArray(x.children) ? x.children : [];
691
- if (m || (m = document.createTextNode(""), m.key = g), v || (v = document.createTextNode(""), v.key = u), x._startNode = m, x._endNode = v, !e.contains(m) || !e.contains(v)) {
692
- e.insertBefore(m, h);
693
- for (const $ of d)
694
- e.insertBefore(A($, n), h);
695
- e.insertBefore(v, h);
685
+ for (const v of r) {
686
+ let x;
687
+ if (v.tag === "#anchor") {
688
+ const m = v.key, g = `${m}:start`, u = `${m}:end`;
689
+ let p = c.get(g), w = c.get(u);
690
+ const d = Array.isArray(v.children) ? v.children : [];
691
+ if (p || (p = document.createTextNode(""), p.key = g), w || (w = document.createTextNode(""), w.key = u), v._startNode = p, v._endNode = w, !e.contains(p) || !e.contains(w)) {
692
+ e.insertBefore(p, y);
693
+ for (const b of d)
694
+ e.insertBefore(j(b, n), y);
695
+ e.insertBefore(w, y);
696
696
  } else
697
697
  l(
698
- m,
699
- v,
700
- a.get(b)?.children,
698
+ p,
699
+ w,
700
+ a.get(m)?.children,
701
701
  d
702
702
  );
703
- p(m, v), h = v.nextSibling;
703
+ h(p, w), y = w.nextSibling;
704
704
  continue;
705
705
  }
706
- if (x.key != null && c.has(x.key)) {
707
- const b = a.get(x.key);
708
- y = H(
709
- c.get(x.key),
710
- b,
711
- x,
706
+ if (v.key != null && c.has(v.key)) {
707
+ const m = a.get(v.key);
708
+ x = I(
709
+ c.get(v.key),
710
+ m,
711
+ v,
712
712
  n,
713
713
  o
714
- ), f.add(y), y !== h && e.contains(y) && (h && !e.contains(h) && (h = null), e.insertBefore(y, h));
714
+ ), f.add(x), x !== y && e.contains(x) && (y && !e.contains(y) && (y = null), e.insertBefore(x, y));
715
715
  } else
716
- y = A(x, n, o), h && !e.contains(h) && (h = null), e.insertBefore(y, h), f.add(y);
717
- h = y.nextSibling;
716
+ x = j(v, n, o), y && !e.contains(y) && (y = null), e.insertBefore(x, y), f.add(x);
717
+ y = x.nextSibling;
718
718
  }
719
- for (const x of s)
720
- !f.has(x) && e.contains(x) && (j(x, o), e.removeChild(x));
719
+ for (const v of s)
720
+ !f.has(v) && e.contains(v) && (B(v, o), e.removeChild(v));
721
721
  }
722
- function H(e, t, r, n, o) {
723
- if (t && typeof t != "string" && t.props?.ref && o && j(e, o), t === r) return e;
722
+ function I(e, t, r, n, o) {
723
+ if (t && typeof t != "string" && t.props?.ref && o && B(e, o), t === r) return e;
724
724
  if (typeof r == "string") {
725
725
  if (e.nodeType === Node.TEXT_NODE)
726
726
  return e.textContent !== r && (e.textContent = r), e;
@@ -732,22 +732,22 @@ function H(e, t, r, n, o) {
732
732
  if (r && typeof r != "string" && r.tag === "#anchor") {
733
733
  const i = r, a = Array.isArray(i.children) ? i.children : [], c = i._startNode ?? document.createTextNode(""), f = i._endNode ?? document.createTextNode("");
734
734
  i.key != null && (c.key = `${i.key}:start`, f.key = `${i.key}:end`), i._startNode = c, i._endNode = f;
735
- const h = document.createDocumentFragment();
736
- h.appendChild(c);
737
- for (const p of a) {
738
- const l = A(p, n);
739
- h.appendChild(l);
735
+ const y = document.createDocumentFragment();
736
+ y.appendChild(c);
737
+ for (const h of a) {
738
+ const l = j(h, n);
739
+ y.appendChild(l);
740
740
  }
741
- return h.appendChild(f), e.parentNode?.replaceChild(h, e), c;
741
+ return y.appendChild(f), e.parentNode?.replaceChild(y, e), c;
742
742
  }
743
743
  if (!r) {
744
- j(e, o);
744
+ B(e, o);
745
745
  const i = document.createComment("removed");
746
746
  return e.parentNode?.replaceChild(i, e), i;
747
747
  }
748
748
  if (!t || typeof t == "string") {
749
- j(e, o);
750
- const i = A(r, n, o);
749
+ B(e, o);
750
+ const i = j(r, n, o);
751
751
  return typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = i), e.parentNode?.replaceChild(i, e), i;
752
752
  }
753
753
  if (r.tag === "#anchor") {
@@ -755,53 +755,53 @@ function H(e, t, r, n, o) {
755
755
  r.key != null && (a.key = `${r.key}:start`, c.key = `${r.key}:end`), r._startNode = a, r._endNode = c;
756
756
  const f = document.createDocumentFragment();
757
757
  f.appendChild(a);
758
- for (const h of i)
759
- f.appendChild(A(h, n));
758
+ for (const y of i)
759
+ f.appendChild(j(y, n));
760
760
  return f.appendChild(c), e.parentNode?.replaceChild(f, e), a;
761
761
  }
762
762
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
763
763
  const i = e;
764
- return Ce(i, t.props || {}, r.props || {}, n), Ee(i, t.children, r.children, n, o), typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = i), i;
764
+ return je(i, t.props || {}, r.props || {}, n), ze(i, t.children, r.children, n, o), typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = i), i;
765
765
  }
766
- j(e, o);
767
- const s = A(r, n, o);
766
+ B(e, o);
767
+ const s = j(r, n, o);
768
768
  return typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = s), e.parentNode?.replaceChild(s, e), s;
769
769
  }
770
- function Ae(e, t, r, n) {
770
+ function Be(e, t, r, n) {
771
771
  let o;
772
772
  Array.isArray(t) ? t.length === 1 ? (o = t[0], o && typeof o == "object" && o.key == null && (o = { ...o, key: "__root__" })) : o = { tag: "div", key: "__root__", children: t } : (o = t, o && typeof o == "object" && o.key == null && (o = { ...o, key: "__root__" })), o && typeof o == "object" && o.tag === "#anchor" && (o = {
773
773
  tag: "div",
774
774
  key: "__anchor_root__",
775
775
  props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
776
776
  children: [o]
777
- }), o = G(o, String(o.key ?? "root"));
777
+ }), o = re(o, String(o.key ?? "root"));
778
778
  const s = e._prevVNode ?? null, i = e._prevDom ?? e.firstChild ?? null;
779
779
  let a;
780
- s && i ? typeof s != "string" && typeof o != "string" && s.tag === o.tag && s.key === o.key ? a = H(i, s, o, r, n) : (a = A(o, r, n), e.replaceChild(a, i)) : (a = A(o, r, n), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
780
+ s && i ? typeof s != "string" && typeof o != "string" && s.tag === o.tag && s.key === o.key ? a = I(i, s, o, r, n) : (a = j(o, r, n), e.replaceChild(a, i)) : (a = j(o, r, n), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
781
781
  const c = [];
782
782
  for (let f = 0; f < e.childNodes.length; f++) {
783
- const h = e.childNodes[f];
784
- h !== a && h.nodeName !== "STYLE" && (j(h, n), c.push(h));
783
+ const y = e.childNodes[f];
784
+ y !== a && y.nodeName !== "STYLE" && (B(y, n), c.push(y));
785
785
  }
786
786
  c.forEach((f) => e.removeChild(f)), e._prevVNode = o, e._prevDom = a;
787
787
  }
788
- function ue(e, ...t) {
788
+ function ye(e, ...t) {
789
789
  let r = "";
790
790
  for (let n = 0; n < e.length; n++)
791
791
  r += e[n], n < t.length && (r += t[n]);
792
792
  return r;
793
793
  }
794
- function de(e) {
794
+ function me(e) {
795
795
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
796
796
  }
797
- let W = null;
798
- function ne() {
799
- return W || (W = new CSSStyleSheet(), W.replaceSync(de(Le))), W;
797
+ let H = null;
798
+ function le() {
799
+ return H || (H = new CSSStyleSheet(), H.replaceSync(me(Ne))), H;
800
800
  }
801
- function Te(e) {
801
+ function Re(e) {
802
802
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
803
803
  }
804
- const Le = ue`
804
+ const Ne = ye`
805
805
  :host, *, ::before, ::after {
806
806
  all: isolate;
807
807
  box-sizing: border-box;
@@ -859,7 +859,7 @@ const Le = ue`
859
859
  sup { top: -.5em }
860
860
  [disabled], [aria-disabled=true] { cursor: not-allowed }
861
861
  [hidden] { display: none }
862
- `, je = {
862
+ `, Me = {
863
863
  gray: {
864
864
  50: "var(--color-gray-50, #f9fafb)",
865
865
  100: "var(--color-gray-100, #f3f4f6)",
@@ -994,7 +994,7 @@ const Le = ue`
994
994
  },
995
995
  white: { DEFAULT: "var(--color-white, #ffffff)" },
996
996
  black: { DEFAULT: "var(--color-black, #000000)" }
997
- }, K = {
997
+ }, V = {
998
998
  /* Display */
999
999
  block: "display:block;",
1000
1000
  inline: "display:inline;",
@@ -1175,7 +1175,7 @@ const Le = ue`
1175
1175
  "z-30": "z-index:30;",
1176
1176
  "z-40": "z-index:40;",
1177
1177
  "z-50": "z-index:50;"
1178
- }, ze = "0.25rem", oe = {
1178
+ }, Oe = "0.25rem", ce = {
1179
1179
  m: ["margin"],
1180
1180
  mx: ["margin-inline"],
1181
1181
  my: ["margin-block"],
@@ -1206,22 +1206,34 @@ const Le = ue`
1206
1206
  gap: ["gap"],
1207
1207
  "gap-x": ["column-gap"],
1208
1208
  "gap-y": ["row-gap"]
1209
- }, Re = {
1209
+ };
1210
+ function L(e, t) {
1211
+ let r = 0;
1212
+ for (let n = 0; n < e.length; n++) {
1213
+ const o = e[n];
1214
+ if (o === "[") r++;
1215
+ else if (o === "]") r--;
1216
+ else if (r === 0 && (o === ">" || o === "+" || o === "~" || o === " "))
1217
+ return e.slice(0, n) + t + e.slice(n);
1218
+ }
1219
+ return e + t;
1220
+ }
1221
+ const Pe = {
1210
1222
  // State variants
1211
1223
  before: (e, t) => `${e}::before{${t}}`,
1212
1224
  after: (e, t) => `${e}::after{${t}}`,
1213
- hover: (e, t) => `${e}:hover{${t}}`,
1214
- focus: (e, t) => `${e}:focus{${t}}`,
1215
- active: (e, t) => `${e}:active{${t}}`,
1216
- disabled: (e, t) => `${e}:disabled{${t}}`,
1217
- visited: (e, t) => `${e}:visited{${t}}`,
1218
- checked: (e, t) => `${e}:checked{${t}}`,
1219
- first: (e, t) => `${e}:first-child{${t}}`,
1220
- last: (e, t) => `${e}:last-child{${t}}`,
1221
- odd: (e, t) => `${e}:nth-child(odd){${t}}`,
1222
- even: (e, t) => `${e}:nth-child(even){${t}}`,
1223
- "focus-within": (e, t) => `${e}:focus-within{${t}}`,
1224
- "focus-visible": (e, t) => `${e}:focus-visible{${t}}`,
1225
+ hover: (e, t) => `${L(e, ":hover")}{${t}}`,
1226
+ focus: (e, t) => `${L(e, ":focus")}{${t}}`,
1227
+ active: (e, t) => `${L(e, ":active")}{${t}}`,
1228
+ disabled: (e, t) => `${L(e, ":disabled")}{${t}}`,
1229
+ visited: (e, t) => `${L(e, ":visited")}{${t}}`,
1230
+ checked: (e, t) => `${L(e, ":checked")}{${t}}`,
1231
+ first: (e, t) => `${L(e, ":first-child")}{${t}}`,
1232
+ last: (e, t) => `${L(e, ":last-child")}{${t}}`,
1233
+ odd: (e, t) => `${L(e, ":nth-child(odd)")}{${t}}`,
1234
+ even: (e, t) => `${L(e, ":nth-child(even)")}{${t}}`,
1235
+ "focus-within": (e, t) => `${L(e, ":focus-within")}{${t}}`,
1236
+ "focus-visible": (e, t) => `${L(e, ":focus-visible")}{${t}}`,
1225
1237
  // Group variants
1226
1238
  "group-hover": (e, t) => `.group:hover ${e}{${t}}`,
1227
1239
  "group-focus": (e, t) => `.group:focus ${e}{${t}}`,
@@ -1232,7 +1244,7 @@ const Le = ue`
1232
1244
  "peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
1233
1245
  "peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
1234
1246
  "peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
1235
- }, ie = {
1247
+ }, J = {
1236
1248
  // Responsive
1237
1249
  sm: "(min-width:640px)",
1238
1250
  md: "(min-width:768px)",
@@ -1241,23 +1253,23 @@ const Le = ue`
1241
1253
  "2xl": "(min-width:1536px)",
1242
1254
  // Dark mode (now plain string)
1243
1255
  dark: "(prefers-color-scheme: dark)"
1244
- }, U = ["sm", "md", "lg", "xl", "2xl"];
1245
- function V(e) {
1256
+ }, Q = ["sm", "md", "lg", "xl", "2xl"];
1257
+ function Z(e) {
1246
1258
  const t = e.startsWith("-"), n = (t ? e.slice(1) : e).split("-");
1247
1259
  if (n.length < 2) return null;
1248
1260
  const o = n.slice(0, -1).join("-"), s = n[n.length - 1], i = parseFloat(s);
1249
- if (Number.isNaN(i) || !oe[o]) return null;
1261
+ if (Number.isNaN(i) || !ce[o]) return null;
1250
1262
  const a = t ? "-" : "";
1251
- return oe[o].map((c) => `${c}:calc(${a}${ze} * ${i});`).join("");
1263
+ return ce[o].map((c) => `${c}:calc(${a}${Oe} * ${i});`).join("");
1252
1264
  }
1253
- function se(e) {
1265
+ function fe(e) {
1254
1266
  const t = e.replace("#", ""), r = parseInt(t, 16), n = r >> 16 & 255, o = r >> 8 & 255, s = r & 255;
1255
1267
  return `${n} ${o} ${s}`;
1256
1268
  }
1257
- function Be(e) {
1269
+ function We(e) {
1258
1270
  const t = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
1259
1271
  if (!t) return null;
1260
- const [, r, n, o = "DEFAULT"] = t, s = je[n]?.[o];
1272
+ const [, r, n, o = "DEFAULT"] = t, s = Me[n]?.[o];
1261
1273
  return s ? `${{
1262
1274
  bg: "background-color",
1263
1275
  decoration: "text-decoration-color",
@@ -1272,41 +1284,41 @@ function Be(e) {
1272
1284
  stroke: "stroke-color"
1273
1285
  }[r]}:${s};` : null;
1274
1286
  }
1275
- function Ne(e) {
1287
+ function De(e) {
1276
1288
  const [t, r] = e.split("/");
1277
1289
  if (!r) return { base: t };
1278
1290
  const n = parseInt(r, 10);
1279
1291
  return isNaN(n) || n < 0 || n > 100 ? { base: t } : { base: t, opacity: n / 100 };
1280
1292
  }
1281
- function J(e) {
1282
- const { base: t, opacity: r } = Ne(e), n = Be(t);
1293
+ function X(e) {
1294
+ const { base: t, opacity: r } = De(e), n = We(t);
1283
1295
  if (n) {
1284
1296
  if (r !== void 0) {
1285
1297
  const s = /#([0-9a-f]{6})/i.exec(n);
1286
1298
  if (s) {
1287
- const i = se(s[0]);
1299
+ const i = fe(s[0]);
1288
1300
  return n.replace(/#([0-9a-f]{6})/i, `rgb(${i} / ${r})`);
1289
1301
  }
1290
1302
  }
1291
1303
  return n;
1292
1304
  }
1293
- const o = q(t);
1305
+ const o = F(t);
1294
1306
  if (o && r !== void 0) {
1295
1307
  const s = /#([0-9a-f]{6})/i.exec(o);
1296
1308
  if (s) {
1297
- const i = se(s[0]);
1309
+ const i = fe(s[0]);
1298
1310
  return o.replace(/#([0-9a-f]{6})/i, `rgb(${i} / ${r})`);
1299
1311
  }
1300
1312
  }
1301
1313
  return o;
1302
1314
  }
1303
- function Q(e) {
1315
+ function Y(e) {
1304
1316
  const t = /^opacity-(\d{1,3})$/.exec(e);
1305
1317
  if (!t) return null;
1306
1318
  const r = parseInt(t[1], 10);
1307
1319
  return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
1308
1320
  }
1309
- function q(e) {
1321
+ function F(e) {
1310
1322
  const t = e.indexOf("-["), r = e.endsWith("]");
1311
1323
  if (t > 0 && r) {
1312
1324
  const n = e.slice(0, t);
@@ -1356,13 +1368,22 @@ function q(e) {
1356
1368
  }
1357
1369
  return null;
1358
1370
  }
1359
- function Me(e) {
1360
- return e.startsWith("[") && e.endsWith("]") ? e : e.indexOf("-[") > 0 && e.endsWith("]") ? e.replace(/_/g, "-") : null;
1371
+ function ue(e) {
1372
+ if (e.startsWith("[") && e.endsWith("]")) {
1373
+ const r = e.slice(1, -1);
1374
+ return r.includes("&") ? r : e;
1375
+ }
1376
+ const t = e.indexOf("-[");
1377
+ if (t > 0 && e.endsWith("]")) {
1378
+ const r = e.slice(t + 2, -1).replace(/_/g, "-");
1379
+ return r.includes("&") ? r : e.replace(/_/g, "-");
1380
+ }
1381
+ return null;
1361
1382
  }
1362
- function Oe(e) {
1383
+ function He(e) {
1363
1384
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
1364
1385
  }
1365
- function Pe(e) {
1386
+ function qe(e) {
1366
1387
  const t = /class\s*=\s*["']([^"']+)["']/g, r = [];
1367
1388
  let n;
1368
1389
  for (; n = t.exec(e); ) {
@@ -1371,100 +1392,111 @@ function Pe(e) {
1371
1392
  }
1372
1393
  return r.filter(Boolean);
1373
1394
  }
1374
- const ae = /* @__PURE__ */ new Map(), We = 16;
1375
- function De(e) {
1376
- const t = Date.now(), r = ae.get(e);
1377
- if (r && t - r.timestamp < We) return r.css;
1378
- const n = Pe(e), o = new Set(n), s = [], i = [], a = [], c = [], f = {};
1379
- function h(y, b = !1) {
1380
- const g = (b ? "dark|" : "") + y;
1381
- if (g in f) return f[g];
1382
- const u = l(y, b);
1383
- return f[g] = u, u;
1384
- }
1385
- function p(y) {
1386
- const b = y.some((u) => U.includes(u)), g = y.includes("dark");
1387
- return y.length === 0 ? 1 : !b && !g ? 2 : b && !g ? 3 : 4;
1388
- }
1389
- function l(y, b = !1) {
1390
- const g = y.split(":"), u = g.find(
1391
- (C) => K[C] || V(C) || Q(C) || J(C) || q(C)
1395
+ const de = /* @__PURE__ */ new Map(), Ie = 16;
1396
+ function Fe(e) {
1397
+ const t = Date.now(), r = de.get(e);
1398
+ if (r && t - r.timestamp < Ie) return r.css;
1399
+ const n = qe(e), o = new Set(n), s = [], i = [], a = [], c = [], f = {};
1400
+ function y(m, g = !1) {
1401
+ const u = (g ? "dark|" : "") + m;
1402
+ if (u in f) return f[u];
1403
+ const p = v(m, g);
1404
+ return f[u] = p, p;
1405
+ }
1406
+ function h(m) {
1407
+ const g = m.some((p) => Q.includes(p)), u = m.includes("dark");
1408
+ return m.length === 0 ? 1 : !g && !u ? 2 : g && !u ? 3 : 4;
1409
+ }
1410
+ function l(m) {
1411
+ const g = [];
1412
+ let u = "", p = 0;
1413
+ for (let w = 0; w < m.length; w++) {
1414
+ const d = m[w];
1415
+ d === "[" && p++, d === "]" && p > 0 && p--, d === ":" && p === 0 ? (g.push(u), u = "") : u += d;
1416
+ }
1417
+ return u && g.push(u), g;
1418
+ }
1419
+ function v(m, g = !1) {
1420
+ const u = l(m), p = u.find(
1421
+ (E) => V[E] || Z(E) || Y(E) || X(E) || F(E)
1392
1422
  );
1393
- if (!u) return null;
1394
- const m = K[u] ?? V(u) ?? Q(u) ?? J(u) ?? q(u);
1395
- if (!m) return null;
1396
- let v = `.${Oe(y)}`, d = m;
1397
- const $ = g.indexOf(u);
1398
- let k = $ >= 0 ? g.slice(0, $) : [];
1399
- b && (k = k.filter((C) => C !== "dark"));
1400
- const w = k.filter((C) => U.includes(C)), _ = w.length ? w[w.length - 1] : null;
1401
- for (const C of k) {
1402
- const E = Me(C);
1403
- if (E) {
1404
- v = `${E}${v}`;
1405
- continue;
1406
- }
1407
- if (U.includes(C)) continue;
1408
- const L = Re[C];
1409
- typeof L == "function" && (v = L(v, d).replace(/\{.*$/, ""));
1423
+ if (!p) return null;
1424
+ const w = V[p] ?? Z(p) ?? Y(p) ?? X(p) ?? F(p);
1425
+ if (!w) return null;
1426
+ const d = u.indexOf(p);
1427
+ let b = d >= 0 ? u.slice(0, d) : [];
1428
+ g && (b = b.filter((E) => E !== "dark"));
1429
+ const $ = b.find((E) => ue(E)), k = `.${He(m)}`;
1430
+ let _;
1431
+ const S = w;
1432
+ if ($) {
1433
+ const E = ue($);
1434
+ E ? E.includes("&") ? _ = E.replace(/&/g, k) : _ = `${E}${k}` : _ = k;
1435
+ } else
1436
+ _ = k;
1437
+ for (const E of b) {
1438
+ if (Q.includes(E) || E === "dark" || E === $) continue;
1439
+ const ie = Pe[E];
1440
+ typeof ie == "function" && (_ = ie(_, S).replace(/\{.*$/, ""));
1410
1441
  }
1411
- let S = `${v}{${d}}`;
1412
- return b && _ ? S = `@media (prefers-color-scheme: dark) and ${ie[_]}{${S}}` : b ? S = `@media (prefers-color-scheme: dark){${S}}` : _ && (S = `@media ${ie[_]}{${S}}`), S;
1442
+ let C = `${_}{${S}}`;
1443
+ const A = b.filter((E) => Q.includes(E)), T = A.length ? A[A.length - 1] : null, oe = b.includes("dark");
1444
+ return g && T ? C = `@media (prefers-color-scheme: dark) and ${J[T]}{${C}}` : g ? C = `@media (prefers-color-scheme: dark){${C}}` : oe && T ? C = `@media (prefers-color-scheme: dark) and ${J[T]}{${C}}` : oe ? C = `@media (prefers-color-scheme: dark){${C}}` : T && (C = `@media ${J[T]}{${C}}`), C;
1413
1445
  }
1414
- for (const y of o) {
1415
- const b = y.split(":"), g = b.find(
1416
- (d) => K[d] || V(d) || Q(d) || J(d) || q(d)
1446
+ for (const m of o) {
1447
+ const g = m.split(":"), u = g.find(
1448
+ (b) => V[b] || Z(b) || Y(b) || X(b) || F(b)
1417
1449
  );
1418
- if (!g) continue;
1419
- const u = b.indexOf(g), m = u >= 0 ? b.slice(0, u) : [], v = p(m);
1420
- if (v === 4) {
1421
- const d = h(y, !0);
1422
- d && c.push(d);
1450
+ if (!u) continue;
1451
+ const p = g.indexOf(u), w = p >= 0 ? g.slice(0, p) : [], d = h(w);
1452
+ if (d === 4) {
1453
+ const b = y(m, !0);
1454
+ b && c.push(b);
1423
1455
  } else {
1424
- const d = h(y);
1425
- d && (v === 1 ? s.push(d) : v === 2 ? i.push(d) : v === 3 && a.push(d));
1456
+ const b = y(m);
1457
+ b && (d === 1 ? s.push(b) : d === 2 ? i.push(b) : d === 3 && a.push(b));
1426
1458
  }
1427
1459
  }
1428
1460
  const x = [...s, ...i, ...a, ...c].join("");
1429
- return ae.set(e, { css: x, timestamp: t }), x;
1461
+ return de.set(e, { css: x, timestamp: t }), x;
1430
1462
  }
1431
- const O = [];
1432
- function He(e, t, r, n, o, s, i, a) {
1463
+ const W = [];
1464
+ function Ke(e, t, r, n, o, s, i, a) {
1433
1465
  if (e) {
1434
- O.push(r);
1466
+ W.push(r);
1435
1467
  try {
1436
1468
  if (t.loadingTemplate && r.isLoading) {
1437
- R(e, t.loadingTemplate(r), r, n, o);
1469
+ N(e, t.loadingTemplate(r), r, n, o);
1438
1470
  return;
1439
1471
  }
1440
1472
  if (t.errorTemplate && r.hasError) {
1441
- r.error instanceof Error && R(e, t.errorTemplate(r.error, r), r, n, o);
1473
+ r.error instanceof Error && N(e, t.errorTemplate(r.error, r), r, n, o);
1442
1474
  return;
1443
1475
  }
1444
1476
  const c = t.render(r);
1445
1477
  if (c instanceof Promise) {
1446
1478
  s(!0), c.then((f) => {
1447
- s(!1), i(null), R(e, f, r, n, o), a(e.innerHTML);
1479
+ s(!1), i(null), N(e, f, r, n, o), a(e.innerHTML);
1448
1480
  }).catch((f) => {
1449
- s(!1), i(f), t.errorTemplate && R(e, t.errorTemplate(f, r), r, n, o);
1450
- }), t.loadingTemplate && R(e, t.loadingTemplate(r), r, n, o);
1481
+ s(!1), i(f), t.errorTemplate && N(e, t.errorTemplate(f, r), r, n, o);
1482
+ }), t.loadingTemplate && N(e, t.loadingTemplate(r), r, n, o);
1451
1483
  return;
1452
1484
  }
1453
- R(e, c, r, n, o), a(e.innerHTML);
1485
+ N(e, c, r, n, o), a(e.innerHTML);
1454
1486
  } finally {
1455
- O.pop();
1487
+ W.pop();
1456
1488
  }
1457
1489
  }
1458
1490
  }
1459
- function R(e, t, r, n, o) {
1460
- e && (Ae(
1491
+ function N(e, t, r, n, o) {
1492
+ e && (Be(
1461
1493
  e,
1462
1494
  Array.isArray(t) ? t : [t],
1463
1495
  r,
1464
1496
  n
1465
1497
  ), o(e.innerHTML));
1466
1498
  }
1467
- function qe(e, t, r, n, o, s, i) {
1499
+ function Ue(e, t, r, n, o, s, i) {
1468
1500
  if (s !== null && clearTimeout(s), Date.now() - t < 16) {
1469
1501
  if (o(r + 1), r > 10) {
1470
1502
  console.warn("Potential infinite render loop detected. Skipping render."), i(null);
@@ -1477,32 +1509,32 @@ function qe(e, t, r, n, o, s, i) {
1477
1509
  }, 0);
1478
1510
  i(c);
1479
1511
  }
1480
- function Ie(e, t, r, n, o, s) {
1512
+ function Ve(e, t, r, n, o, s) {
1481
1513
  if (!e) return;
1482
- const i = De(n);
1514
+ const i = Fe(n);
1483
1515
  if (!t.style && (!i || i.trim() === "")) {
1484
- s(null), e.adoptedStyleSheets = [ne()];
1516
+ s(null), e.adoptedStyleSheets = [le()];
1485
1517
  return;
1486
1518
  }
1487
1519
  let a = "";
1488
1520
  t.style && (typeof t.style == "string" ? a = t.style : typeof t.style == "function" && (a = t.style(r)));
1489
- let c = Te(`${a}
1521
+ let c = Re(`${a}
1490
1522
  ${i}
1491
1523
  `);
1492
- c = de(c);
1524
+ c = me(c);
1493
1525
  let f = o;
1494
- f || (f = new CSSStyleSheet()), (f.cssRules.length === 0 || f.toString() !== c) && f.replaceSync(c), e.adoptedStyleSheets = [ne(), f], s(f);
1526
+ f || (f = new CSSStyleSheet()), (f.cssRules.length === 0 || f.toString() !== c) && f.replaceSync(c), e.adoptedStyleSheets = [le(), f], s(f);
1495
1527
  }
1496
- const Fe = /* @__PURE__ */ new Map();
1497
- function le(e, t, r) {
1498
- let n = ee(e);
1528
+ const Je = /* @__PURE__ */ new Map();
1529
+ function pe(e, t, r) {
1530
+ let n = ne(e);
1499
1531
  n.includes("-") || (n = `cer-${n}`);
1500
1532
  let o;
1501
1533
  typeof t == "function" ? o = { ...r, render: t } : o = t, typeof o.onError != "function" && (o.onError = (s, i) => {
1502
1534
  console.error(`[${n}] Error:`, s, i);
1503
- }), Fe.set(n, o), typeof window < "u" && !customElements.get(n) && customElements.define(n, Ke(o));
1535
+ }), Je.set(n, o), typeof window < "u" && !customElements.get(n) && customElements.define(n, Qe(o));
1504
1536
  }
1505
- function Ke(e) {
1537
+ function Qe(e) {
1506
1538
  if (!e.render)
1507
1539
  throw new Error(
1508
1540
  "Component must have a render function"
@@ -1589,7 +1621,7 @@ function Ke(e) {
1589
1621
  }
1590
1622
  connectedCallback() {
1591
1623
  this._runLogicWithinErrorBoundary(e, () => {
1592
- be(
1624
+ $e(
1593
1625
  e,
1594
1626
  this.context,
1595
1627
  this._mounted,
@@ -1601,7 +1633,7 @@ function Ke(e) {
1601
1633
  }
1602
1634
  disconnectedCallback() {
1603
1635
  this._runLogicWithinErrorBoundary(e, () => {
1604
- ve(
1636
+ _e(
1605
1637
  e,
1606
1638
  this.context,
1607
1639
  this._listeners,
@@ -1625,7 +1657,7 @@ function Ke(e) {
1625
1657
  }
1626
1658
  attributeChangedCallback(t, r, n) {
1627
1659
  this._runLogicWithinErrorBoundary(e, () => {
1628
- this._applyProps(e), xe(
1660
+ this._applyProps(e), Se(
1629
1661
  e,
1630
1662
  t,
1631
1663
  r,
@@ -1635,7 +1667,7 @@ function Ke(e) {
1635
1667
  });
1636
1668
  }
1637
1669
  static get observedAttributes() {
1638
- return e.props ? Object.keys(e.props).map(ee) : [];
1670
+ return e.props ? Object.keys(e.props).map(ne) : [];
1639
1671
  }
1640
1672
  _applyComputed(t) {
1641
1673
  this._runLogicWithinErrorBoundary(e, () => {
@@ -1643,7 +1675,7 @@ function Ke(e) {
1643
1675
  Object.defineProperty(this.context, r, {
1644
1676
  get: () => {
1645
1677
  const o = n(this.context);
1646
- return X(o);
1678
+ return ee(o);
1647
1679
  },
1648
1680
  enumerable: !0
1649
1681
  });
@@ -1653,7 +1685,7 @@ function Ke(e) {
1653
1685
  // --- Render ---
1654
1686
  _render(t) {
1655
1687
  this._runLogicWithinErrorBoundary(t, () => {
1656
- He(
1688
+ Ke(
1657
1689
  this.shadowRoot,
1658
1690
  t,
1659
1691
  this.context,
@@ -1676,7 +1708,7 @@ function Ke(e) {
1676
1708
  }
1677
1709
  _requestRender() {
1678
1710
  this._runLogicWithinErrorBoundary(this._cfg, () => {
1679
- qe(
1711
+ Ue(
1680
1712
  () => this._render(this._cfg),
1681
1713
  this._lastRenderTime,
1682
1714
  this._renderCount,
@@ -1696,7 +1728,7 @@ function Ke(e) {
1696
1728
  // --- Style ---
1697
1729
  _applyStyle(t, r) {
1698
1730
  this._runLogicWithinErrorBoundary(t, () => {
1699
- Ie(
1731
+ Ve(
1700
1732
  this.shadowRoot,
1701
1733
  t,
1702
1734
  this.context,
@@ -1735,11 +1767,11 @@ function Ke(e) {
1735
1767
  "splice",
1736
1768
  "sort",
1737
1769
  "reverse"
1738
- ].includes(a) ? function(...p) {
1739
- const l = f.apply(i, p);
1770
+ ].includes(a) ? function(...h) {
1771
+ const l = f.apply(i, h);
1740
1772
  if (!n._initializing) {
1741
- const x = s || "root";
1742
- n._triggerWatchers(x, i), n._render(t);
1773
+ const v = s || "root";
1774
+ n._triggerWatchers(v, i), n._render(t);
1743
1775
  }
1744
1776
  return l;
1745
1777
  } : f;
@@ -1782,7 +1814,7 @@ function Ke(e) {
1782
1814
  }
1783
1815
  _initWatchers(t) {
1784
1816
  this._runLogicWithinErrorBoundary(t, () => {
1785
- ge(
1817
+ xe(
1786
1818
  this.context,
1787
1819
  this._watchers,
1788
1820
  t.watch || {}
@@ -1790,12 +1822,12 @@ function Ke(e) {
1790
1822
  });
1791
1823
  }
1792
1824
  _triggerWatchers(t, r) {
1793
- ye(this.context, this._watchers, t, r);
1825
+ we(this.context, this._watchers, t, r);
1794
1826
  }
1795
1827
  _applyProps(t) {
1796
1828
  this._runLogicWithinErrorBoundary(t, () => {
1797
1829
  try {
1798
- me(this, t, this.context);
1830
+ ke(this, t, this.context);
1799
1831
  } catch (r) {
1800
1832
  this._hasError = !0, t.onError && t.onError(r, this.context), t.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = t.errorFallback(r, this.context));
1801
1833
  }
@@ -1803,92 +1835,92 @@ function Ke(e) {
1803
1835
  }
1804
1836
  };
1805
1837
  }
1806
- function M(e, t = {}, r, n) {
1838
+ function P(e, t = {}, r, n) {
1807
1839
  const o = n ?? t.key;
1808
1840
  return { tag: e, key: o, props: t, children: r };
1809
1841
  }
1810
- function I(e) {
1842
+ function K(e) {
1811
1843
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
1812
1844
  }
1813
- function D(e) {
1814
- return typeof e == "object" && e !== null && "tag" in e && !I(e);
1845
+ function q(e) {
1846
+ return typeof e == "object" && e !== null && "tag" in e && !K(e);
1815
1847
  }
1816
- function Ue(e, t) {
1848
+ function Ze(e, t) {
1817
1849
  return e.key != null ? e : { ...e, key: t };
1818
1850
  }
1819
- function Ve(e, t = [], r = {}) {
1851
+ function Xe(e, t = [], r = {}) {
1820
1852
  const n = {}, o = {}, s = {}, i = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
1821
1853
  let a;
1822
1854
  for (; a = i.exec(e); ) {
1823
- const c = a[1], f = a[2], h = (a[4] || a[6]) ?? "", p = h.match(/^{{(\d+)}}$/);
1824
- let l = p ? t[Number(p[1])] ?? null : h;
1825
- p || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
1826
- const x = ["model", "bind", "show", "class", "style"];
1855
+ const c = a[1], f = a[2], y = (a[4] || a[6]) ?? "", h = y.match(/^{{(\d+)}}$/);
1856
+ let l = h ? t[Number(h[1])] ?? null : y;
1857
+ h || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
1858
+ const v = ["model", "bind", "show", "class", "style"];
1827
1859
  if (c === ":") {
1828
- const [y, ...b] = f.split(".");
1829
- if (x.includes(y)) {
1830
- const g = [...b];
1831
- s[y] = {
1860
+ const [x, ...m] = f.split(".");
1861
+ if (v.includes(x)) {
1862
+ const g = [...m];
1863
+ s[x] = {
1832
1864
  value: l,
1833
1865
  modifiers: g
1834
1866
  };
1835
1867
  } else
1836
1868
  o[f] = l;
1837
1869
  } else if (c === "@") {
1838
- const y = "on" + f.charAt(0).toUpperCase() + f.slice(1);
1839
- n[y] = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
1870
+ const x = "on" + f.charAt(0).toUpperCase() + f.slice(1);
1871
+ n[x] = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
1840
1872
  } else f === "ref" ? n.ref = l : o[f] = l;
1841
1873
  }
1842
1874
  return { props: n, attrs: o, directives: s };
1843
1875
  }
1844
- function Je(e, t, r) {
1845
- const n = O.length > 0 ? O[O.length - 1] : void 0, o = r ?? n;
1846
- function s(d, $) {
1847
- return M("#text", {}, d, $);
1876
+ function Ye(e, t, r) {
1877
+ const n = W.length > 0 ? W[W.length - 1] : void 0, o = r ?? n;
1878
+ function s(d, b) {
1879
+ return P("#text", {}, d, b);
1848
1880
  }
1849
1881
  let i = "";
1850
1882
  for (let d = 0; d < e.length; d++)
1851
1883
  i += e[d], d < t.length && (i += `{{${d}}}`);
1852
1884
  const a = /<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, c = [];
1853
- let f, h = [], p = null, l = {}, x, y = 0, b = [];
1885
+ let f, y = [], h = null, l = {}, v, x = 0, m = [];
1854
1886
  function g(d) {
1855
- !d || typeof d != "object" || I(d) || (d.props || d.attrs ? (d.props && (l.props || (l.props = {}), Object.assign(l.props, d.props)), d.attrs && (l.attrs || (l.attrs = {}), Object.keys(d.attrs).forEach(($) => {
1856
- if ($ === "style" && l.attrs.style) {
1857
- const k = l.attrs.style.replace(
1887
+ !d || typeof d != "object" || K(d) || (d.props || d.attrs ? (d.props && (l.props || (l.props = {}), Object.assign(l.props, d.props)), d.attrs && (l.attrs || (l.attrs = {}), Object.keys(d.attrs).forEach((b) => {
1888
+ if (b === "style" && l.attrs.style) {
1889
+ const $ = l.attrs.style.replace(
1858
1890
  /;?\s*$/,
1859
1891
  ""
1860
- ), w = d.attrs.style.replace(/^;?\s*/, "");
1861
- l.attrs.style = k + "; " + w;
1862
- } else if ($ === "class" && l.attrs.class) {
1863
- const k = l.attrs.class.trim().split(/\s+/).filter(Boolean), w = d.attrs.class.trim().split(/\s+/).filter(Boolean), _ = [
1864
- .../* @__PURE__ */ new Set([...k, ...w])
1892
+ ), k = d.attrs.style.replace(/^;?\s*/, "");
1893
+ l.attrs.style = $ + "; " + k;
1894
+ } else if (b === "class" && l.attrs.class) {
1895
+ const $ = l.attrs.class.trim().split(/\s+/).filter(Boolean), k = d.attrs.class.trim().split(/\s+/).filter(Boolean), _ = [
1896
+ .../* @__PURE__ */ new Set([...$, ...k])
1865
1897
  ];
1866
1898
  l.attrs.class = _.join(" ");
1867
1899
  } else
1868
- l.attrs[$] = d.attrs[$];
1900
+ l.attrs[b] = d.attrs[b];
1869
1901
  }))) : (l.props || (l.props = {}), Object.assign(l.props, d)));
1870
1902
  }
1871
- function u(d, $) {
1872
- const k = p ? h : b;
1873
- if (I(d)) {
1874
- const w = d.key ?? $;
1903
+ function u(d, b) {
1904
+ const $ = h ? y : m;
1905
+ if (K(d)) {
1906
+ const k = d.key ?? b;
1875
1907
  let _ = d.children;
1876
- k.push({
1908
+ $.push({
1877
1909
  ...d,
1878
- key: w,
1910
+ key: k,
1879
1911
  children: _
1880
1912
  });
1881
1913
  return;
1882
1914
  }
1883
- if (D(d)) {
1884
- k.push(Ue(d, void 0));
1915
+ if (q(d)) {
1916
+ $.push(Ze(d, void 0));
1885
1917
  return;
1886
1918
  }
1887
1919
  if (Array.isArray(d)) {
1888
1920
  if (d.length === 0) return;
1889
- for (let w = 0; w < d.length; w++) {
1890
- const _ = d[w];
1891
- I(_) || D(_) || Array.isArray(_) ? u(_, `${$}-${w}`) : _ !== null && typeof _ == "object" ? g(_) : k.push(s(String(_), `${$}-${w}`));
1921
+ for (let k = 0; k < d.length; k++) {
1922
+ const _ = d[k];
1923
+ K(_) || q(_) || Array.isArray(_) ? u(_, `${b}-${k}`) : _ !== null && typeof _ == "object" ? g(_) : $.push(s(String(_), `${b}-${k}`));
1892
1924
  }
1893
1925
  return;
1894
1926
  }
@@ -1896,9 +1928,9 @@ function Je(e, t, r) {
1896
1928
  g(d);
1897
1929
  return;
1898
1930
  }
1899
- k.push(s(String(d), $));
1931
+ $.push(s(String(d), b));
1900
1932
  }
1901
- const m = /* @__PURE__ */ new Set([
1933
+ const p = /* @__PURE__ */ new Set([
1902
1934
  "area",
1903
1935
  "base",
1904
1936
  "br",
@@ -1916,52 +1948,52 @@ function Je(e, t, r) {
1916
1948
  ]);
1917
1949
  for (; f = a.exec(i); )
1918
1950
  if (f[1]) {
1919
- const d = f[1], $ = f[0][1] === "/", k = f[0][f[0].length - 2] === "/" || m.has(d), {
1920
- props: w,
1951
+ const d = f[1], b = f[0][1] === "/", $ = f[0][f[0].length - 2] === "/" || p.has(d), {
1952
+ props: k,
1921
1953
  attrs: _,
1922
1954
  directives: S
1923
- } = Ve(f[2] || "", t, o), C = { props: {}, attrs: {} };
1924
- for (const E in w) C.props[E] = w[E];
1925
- for (const E in _) C.attrs[E] = _[E];
1926
- if (Object.keys(S).length > 0 && (C.directives = { ...S }), $) {
1927
- const E = M(
1928
- p,
1955
+ } = Xe(f[2] || "", t, o), C = { props: {}, attrs: {} };
1956
+ for (const A in k) C.props[A] = k[A];
1957
+ for (const A in _) C.attrs[A] = _[A];
1958
+ if (Object.keys(S).length > 0 && (C.directives = { ...S }), b) {
1959
+ const A = P(
1960
+ h,
1929
1961
  l,
1930
- h.length === 1 && D(h[0]) && h[0].tag === "#text" ? typeof h[0].children == "string" ? h[0].children : "" : h.length ? h : void 0,
1931
- x
1932
- ), L = c.pop();
1933
- L ? (p = L.tag, l = L.props, x = L.key, h = L.children, h.push(E)) : (b.push(E), p = null, l = {}, x = void 0, h = []);
1934
- } else k ? p ? h.push(M(d, C, void 0, void 0)) : b.push(M(d, C, void 0, void 0)) : (p && c.push({
1935
- tag: p,
1962
+ y.length === 1 && q(y[0]) && y[0].tag === "#text" ? typeof y[0].children == "string" ? y[0].children : "" : y.length ? y : void 0,
1963
+ v
1964
+ ), T = c.pop();
1965
+ T ? (h = T.tag, l = T.props, v = T.key, y = T.children, y.push(A)) : (m.push(A), h = null, l = {}, v = void 0, y = []);
1966
+ } else $ ? h ? y.push(P(d, C, void 0, void 0)) : m.push(P(d, C, void 0, void 0)) : (h && c.push({
1967
+ tag: h,
1936
1968
  props: l,
1937
- children: h,
1938
- key: x
1939
- }), p = d, l = C, h = []);
1969
+ children: y,
1970
+ key: v
1971
+ }), h = d, l = C, y = []);
1940
1972
  } else if (typeof f[3] < "u") {
1941
- const d = Number(f[3]), $ = t[d], k = `interp-${d}`;
1942
- u($, k);
1973
+ const d = Number(f[3]), b = t[d], $ = `interp-${d}`;
1974
+ u(b, $);
1943
1975
  } else if (f[4]) {
1944
- const d = f[4], $ = p ? h : b, k = d.split(/({{\d+}})/);
1945
- for (const w of k) {
1946
- if (!w) continue;
1947
- const _ = w.match(/^{{(\d+)}}$/);
1976
+ const d = f[4], b = h ? y : m, $ = d.split(/({{\d+}})/);
1977
+ for (const k of $) {
1978
+ if (!k) continue;
1979
+ const _ = k.match(/^{{(\d+)}}$/);
1948
1980
  if (_) {
1949
- const S = Number(_[1]), C = t[S], E = `interp-${S}`;
1950
- u(C, E);
1981
+ const S = Number(_[1]), C = t[S], A = `interp-${S}`;
1982
+ u(C, A);
1951
1983
  } else {
1952
- const S = `text-${y++}`;
1953
- $.push(s(w, S));
1984
+ const S = `text-${x++}`;
1985
+ b.push(s(k, S));
1954
1986
  }
1955
1987
  }
1956
1988
  }
1957
- const v = b.filter((d) => D(d) && d.tag === "#text" ? typeof d.children == "string" && d.children.trim() !== "" : !0);
1958
- return v.length === 1 ? v[0] : v.length > 1 ? v : M("div", {}, "", "fallback-root");
1989
+ const w = m.filter((d) => q(d) && d.tag === "#text" ? typeof d.children == "string" && d.children.trim() !== "" : !0);
1990
+ return w.length === 1 ? w[0] : w.length > 1 ? w : P("div", {}, "", "fallback-root");
1959
1991
  }
1960
- function B(e, ...t) {
1992
+ function M(e, ...t) {
1961
1993
  const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
1962
- return Je(e, t, n);
1994
+ return Ye(e, t, n);
1963
1995
  }
1964
- const ce = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, T = (e, t) => {
1996
+ const he = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, z = (e, t) => {
1965
1997
  for (const r of e) {
1966
1998
  const n = [], o = r.path.replace(/:[^/]+/g, (a) => (n.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${o}$`), i = t.match(s);
1967
1999
  if (i) {
@@ -1972,92 +2004,92 @@ const ce = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new
1972
2004
  }
1973
2005
  }
1974
2006
  return { route: null, params: {} };
1975
- }, Z = {};
1976
- async function Qe(e) {
2007
+ }, G = {};
2008
+ async function Ge(e) {
1977
2009
  if (e.component) return e.component;
1978
2010
  if (e.load) {
1979
- if (Z[e.path]) return Z[e.path];
2011
+ if (G[e.path]) return G[e.path];
1980
2012
  try {
1981
2013
  const t = await e.load();
1982
- return Z[e.path] = t.default, t.default;
2014
+ return G[e.path] = t.default, t.default;
1983
2015
  } catch {
1984
2016
  throw new Error(`Failed to load component for route: ${e.path}`);
1985
2017
  }
1986
2018
  }
1987
2019
  throw new Error(`No component or loader defined for route: ${e.path}`);
1988
2020
  }
1989
- function Ze(e) {
2021
+ function et(e) {
1990
2022
  const { routes: t, base: r = "", initialUrl: n } = e;
1991
- let o, s, i, a, c, f, h;
1992
- const p = async (b, g) => {
1993
- const u = t.find((m) => T([m], b.path).route !== null);
2023
+ let o, s, i, a, c, f, y;
2024
+ const h = async (m, g) => {
2025
+ const u = t.find((p) => z([p], m.path).route !== null);
1994
2026
  if (u?.beforeEnter)
1995
2027
  try {
1996
- const m = await u.beforeEnter(b, g);
1997
- return typeof m == "string" ? (await y(m, !0), !1) : m !== !1;
1998
- } catch (m) {
1999
- return console.error("beforeEnter error", m), !1;
2028
+ const p = await u.beforeEnter(m, g);
2029
+ return typeof p == "string" ? (await x(p, !0), !1) : p !== !1;
2030
+ } catch (p) {
2031
+ return console.error("beforeEnter error", p), !1;
2000
2032
  }
2001
2033
  return !0;
2002
- }, l = async (b, g) => {
2003
- const u = t.find((m) => T([m], b.path).route !== null);
2034
+ }, l = async (m, g) => {
2035
+ const u = t.find((p) => z([p], m.path).route !== null);
2004
2036
  if (u?.onEnter)
2005
2037
  try {
2006
- const m = await u.onEnter(b, g);
2007
- return typeof m == "string" ? (await y(m, !0), !1) : m !== !1;
2008
- } catch (m) {
2009
- return console.error("onEnter error", m), !1;
2038
+ const p = await u.onEnter(m, g);
2039
+ return typeof p == "string" ? (await x(p, !0), !1) : p !== !1;
2040
+ } catch (p) {
2041
+ return console.error("onEnter error", p), !1;
2010
2042
  }
2011
2043
  return !0;
2012
- }, x = (b, g) => {
2013
- const u = t.find((m) => T([m], b.path).route !== null);
2044
+ }, v = (m, g) => {
2045
+ const u = t.find((p) => z([p], m.path).route !== null);
2014
2046
  if (u?.afterEnter)
2015
2047
  try {
2016
- u.afterEnter(b, g);
2017
- } catch (m) {
2018
- console.error("afterEnter error", m);
2048
+ u.afterEnter(m, g);
2049
+ } catch (p) {
2050
+ console.error("afterEnter error", p);
2019
2051
  }
2020
- }, y = async (b, g = !1) => {
2052
+ }, x = async (m, g = !1) => {
2021
2053
  try {
2022
2054
  const u = {
2023
- path: b.replace(r, "") || "/",
2055
+ path: m.replace(r, "") || "/",
2024
2056
  query: {}
2025
- }, m = T(t, u.path);
2026
- if (!m) throw new Error(`No route found for ${u.path}`);
2027
- const v = i.getState(), d = {
2057
+ }, p = z(t, u.path);
2058
+ if (!p) throw new Error(`No route found for ${u.path}`);
2059
+ const w = i.getState(), d = {
2028
2060
  path: u.path,
2029
- params: m.params,
2061
+ params: p.params,
2030
2062
  query: u.query
2031
2063
  };
2032
- if (!await p(d, v) || !await l(d, v)) return;
2033
- typeof window < "u" && typeof document < "u" && (g ? window.history.replaceState({}, "", r + b) : window.history.pushState({}, "", r + b)), i.setState(d), x(d, v);
2064
+ if (!await h(d, w) || !await l(d, w)) return;
2065
+ typeof window < "u" && typeof document < "u" && (g ? window.history.replaceState({}, "", r + m) : window.history.pushState({}, "", r + m)), i.setState(d), v(d, w);
2034
2066
  } catch (u) {
2035
2067
  console.error("Navigation error:", u);
2036
2068
  }
2037
2069
  };
2038
2070
  if (typeof window < "u" && typeof document < "u") {
2039
2071
  o = () => {
2040
- const g = new URL(window.location.href), u = g.pathname.replace(r, "") || "/", m = ce(g.search);
2041
- return { path: u, query: m };
2072
+ const g = new URL(window.location.href), u = g.pathname.replace(r, "") || "/", p = he(g.search);
2073
+ return { path: u, query: p };
2042
2074
  }, s = o();
2043
- const b = T(t, s.path);
2044
- i = te({
2075
+ const m = z(t, s.path);
2076
+ i = se({
2045
2077
  path: s.path,
2046
- params: b.params,
2078
+ params: m.params,
2047
2079
  query: s.query
2048
2080
  }), a = async (g = !1) => {
2049
2081
  const u = o();
2050
- await y(u.path, g);
2051
- }, window.addEventListener("popstate", () => a(!0)), c = (g) => y(g, !1), f = (g) => y(g, !0), h = () => window.history.back();
2082
+ await x(u.path, g);
2083
+ }, window.addEventListener("popstate", () => a(!0)), c = (g) => x(g, !1), f = (g) => x(g, !0), y = () => window.history.back();
2052
2084
  } else {
2053
2085
  o = () => {
2054
- const u = new URL(n || "/", "http://localhost"), m = u.pathname.replace(r, "") || "/", v = ce(u.search);
2055
- return { path: m, query: v };
2086
+ const u = new URL(n || "/", "http://localhost"), p = u.pathname.replace(r, "") || "/", w = he(u.search);
2087
+ return { path: p, query: w };
2056
2088
  }, s = o();
2057
- const b = T(t, s.path);
2058
- i = te({
2089
+ const m = z(t, s.path);
2090
+ i = se({
2059
2091
  path: s.path,
2060
- params: b.params,
2092
+ params: m.params,
2061
2093
  query: s.query
2062
2094
  }), a = async () => {
2063
2095
  const u = o();
@@ -2065,83 +2097,83 @@ function Ze(e) {
2065
2097
  };
2066
2098
  const g = async (u) => {
2067
2099
  try {
2068
- const m = {
2100
+ const p = {
2069
2101
  path: u.replace(r, "") || "/",
2070
2102
  query: {}
2071
- }, v = T(t, m.path);
2072
- if (!v) throw new Error(`No route found for ${m.path}`);
2073
- const d = i.getState(), $ = {
2074
- path: m.path,
2075
- params: v.params,
2076
- query: m.query
2077
- }, k = t.find((w) => T([w], $.path).route !== null);
2078
- if (k?.beforeEnter)
2103
+ }, w = z(t, p.path);
2104
+ if (!w) throw new Error(`No route found for ${p.path}`);
2105
+ const d = i.getState(), b = {
2106
+ path: p.path,
2107
+ params: w.params,
2108
+ query: p.query
2109
+ }, $ = t.find((k) => z([k], b.path).route !== null);
2110
+ if ($?.beforeEnter)
2079
2111
  try {
2080
- const w = await k.beforeEnter($, d);
2081
- if (typeof w == "string") {
2082
- await g(w);
2112
+ const k = await $.beforeEnter(b, d);
2113
+ if (typeof k == "string") {
2114
+ await g(k);
2083
2115
  return;
2084
2116
  }
2085
- if (w === !1) return;
2117
+ if (k === !1) return;
2086
2118
  } catch {
2087
2119
  return;
2088
2120
  }
2089
- if (k?.onEnter)
2121
+ if ($?.onEnter)
2090
2122
  try {
2091
- const w = await k.onEnter($, d);
2092
- if (typeof w == "string") {
2093
- await g(w);
2123
+ const k = await $.onEnter(b, d);
2124
+ if (typeof k == "string") {
2125
+ await g(k);
2094
2126
  return;
2095
2127
  }
2096
- if (w === !1) return;
2128
+ if (k === !1) return;
2097
2129
  } catch {
2098
2130
  return;
2099
2131
  }
2100
- if (i.setState($), k?.afterEnter)
2132
+ if (i.setState(b), $?.afterEnter)
2101
2133
  try {
2102
- k.afterEnter($, d);
2134
+ $.afterEnter(b, d);
2103
2135
  } catch {
2104
2136
  }
2105
2137
  } catch {
2106
2138
  }
2107
2139
  };
2108
- c = async (u) => g(u), f = async (u) => g(u), h = () => {
2140
+ c = async (u) => g(u), f = async (u) => g(u), y = () => {
2109
2141
  };
2110
2142
  }
2111
2143
  return {
2112
2144
  store: i,
2113
2145
  push: c,
2114
2146
  replace: f,
2115
- back: h,
2147
+ back: y,
2116
2148
  subscribe: i.subscribe,
2117
- matchRoute: (b) => T(t, b),
2149
+ matchRoute: (m) => z(t, m),
2118
2150
  getCurrent: () => i.getState(),
2119
- resolveRouteComponent: Qe
2151
+ resolveRouteComponent: Ge
2120
2152
  };
2121
2153
  }
2122
- function ot(e, t) {
2123
- return T(e, t);
2154
+ function lt(e, t) {
2155
+ return z(e, t);
2124
2156
  }
2125
- function it(e) {
2126
- const t = Ze(e);
2127
- return le("router-view", {
2157
+ function ct(e) {
2158
+ const t = et(e);
2159
+ return pe("router-view", {
2128
2160
  async render() {
2129
- if (!t) return B`<div>Router not initialized.</div>`;
2161
+ if (!t) return M`<div>Router not initialized.</div>`;
2130
2162
  const r = t.getCurrent(), { path: n } = r, o = t.matchRoute(n);
2131
- if (!o.route) return B`<div>Not found</div>`;
2163
+ if (!o.route) return M`<div>Not found</div>`;
2132
2164
  let s = o.route.component;
2133
2165
  if (o.route.load) {
2134
2166
  const i = await o.route.load();
2135
2167
  typeof i.default == "string" && (s = i.default);
2136
2168
  }
2137
- return typeof s == "string" ? { tag: s, props: {}, children: [] } : B`<div>Invalid route component</div>`;
2169
+ return typeof s == "string" ? { tag: s, props: {}, children: [] } : M`<div>Invalid route component</div>`;
2138
2170
  },
2139
2171
  onConnected(r) {
2140
2172
  t && typeof t.subscribe == "function" && t.subscribe(() => {
2141
2173
  typeof r.requestRender == "function" && r.requestRender();
2142
2174
  });
2143
2175
  }
2144
- }), le("router-link", {
2176
+ }), pe("router-link", {
2145
2177
  state: {},
2146
2178
  props: {
2147
2179
  to: { type: String, default: "" },
@@ -2154,7 +2186,7 @@ function it(e) {
2154
2186
  disabled: { type: Boolean, default: !1 },
2155
2187
  external: { type: Boolean, default: !1 },
2156
2188
  class: { type: String, default: "" },
2157
- style: { type: String, default: ue`
2189
+ style: { type: String, default: ye`
2158
2190
  [aria-disabled="true"] {
2159
2191
  pointer-events: none;
2160
2192
  opacity: 0.5;
@@ -2163,25 +2195,25 @@ function it(e) {
2163
2195
  },
2164
2196
  style: (r) => r.style,
2165
2197
  render: (r) => {
2166
- const n = t.getCurrent(), o = r.to, s = r.exact, i = r.exactActiveClass, a = r.activeClass, c = r.ariaCurrentValue, f = r.tag, h = r.disabled, p = r.external, l = n.path === o, x = s ? l : n && typeof n.path == "string" ? n.path.startsWith(o) : !1, y = l ? i : x ? a : "", b = l ? `aria-current="${c}"` : "", g = f === "button", u = h ? g ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", m = p && (f === "a" || !f) ? 'target="_blank" rel="noopener noreferrer"' : "";
2167
- return B`
2168
- ${pe().when(g, B`
2198
+ const n = t.getCurrent(), o = r.to, s = r.exact, i = r.exactActiveClass, a = r.activeClass, c = r.ariaCurrentValue, f = r.tag, y = r.disabled, h = r.external, l = n.path === o, v = s ? l : n && typeof n.path == "string" ? n.path.startsWith(o) : !1, x = l ? i : v ? a : "", m = l ? `aria-current="${c}"` : "", g = f === "button", u = y ? g ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", p = h && (f === "a" || !f) ? 'target="_blank" rel="noopener noreferrer"' : "";
2199
+ return M`
2200
+ ${be().when(g, M`
2169
2201
  <button
2170
2202
  part="button"
2171
- :class="${r.class} ${y}"
2172
- ${b}
2173
- ${u}
2203
+ :class="${r.class} ${x}"
2174
2204
  ${m}
2205
+ ${u}
2206
+ ${p}
2175
2207
  @click="navigate"
2176
2208
  ><slot></slot></button>
2177
- `).otherwise(B`
2209
+ `).otherwise(M`
2178
2210
  <a
2179
2211
  part="link"
2180
2212
  href="${o}"
2181
- :class="${r.class} ${y}"
2182
- ${b}
2183
- ${u}
2213
+ :class="${r.class} ${x}"
2184
2214
  ${m}
2215
+ ${u}
2216
+ ${p}
2185
2217
  @click="navigate"
2186
2218
  ><slot></slot></a>
2187
2219
  `).done()}
@@ -2197,25 +2229,25 @@ function it(e) {
2197
2229
  }), t;
2198
2230
  }
2199
2231
  export {
2200
- N as GlobalEventBus,
2201
- le as component,
2202
- te as createStore,
2203
- ue as css,
2204
- Ye as each,
2205
- Ge as emit,
2206
- P as eventBus,
2207
- B as html,
2208
- it as initRouter,
2209
- nt as listen,
2210
- pe as match,
2211
- T as matchRoute,
2212
- ot as matchRouteSSR,
2213
- tt as off,
2214
- et as on,
2215
- rt as once,
2216
- ce as parseQuery,
2217
- Qe as resolveRouteComponent,
2218
- Ze as useRouter,
2219
- Xe as when
2232
+ O as GlobalEventBus,
2233
+ pe as component,
2234
+ se as createStore,
2235
+ ye as css,
2236
+ rt as each,
2237
+ nt as emit,
2238
+ D as eventBus,
2239
+ M as html,
2240
+ ct as initRouter,
2241
+ at as listen,
2242
+ be as match,
2243
+ z as matchRoute,
2244
+ lt as matchRouteSSR,
2245
+ it as off,
2246
+ ot as on,
2247
+ st as once,
2248
+ he as parseQuery,
2249
+ Ge as resolveRouteComponent,
2250
+ et as useRouter,
2251
+ tt as when
2220
2252
  };
2221
2253
  //# sourceMappingURL=custom-elements-runtime.es.js.map