@iyulab/u-widgets 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/u-widgets.js CHANGED
@@ -3,7 +3,7 @@ import { p as Nt, r as Ft } from "./formdown-BWJ6QGJs.js";
3
3
  import { i as we } from "./infer-CNOiD2dS.js";
4
4
  import { t as b, n as ye } from "./tokens-x1kDxgG8.js";
5
5
  import { css as w, LitElement as y, nothing as l, html as o } from "lit";
6
- import { property as m, customElement as x, state as S } from "lit/decorators.js";
6
+ import { property as f, customElement as x, state as S } from "lit/decorators.js";
7
7
  const xe = /* @__PURE__ */ new Set([
8
8
  "text",
9
9
  "email",
@@ -21,7 +21,7 @@ const xe = /* @__PURE__ */ new Set([
21
21
  "range",
22
22
  "radio",
23
23
  "checkbox"
24
- ]), ie = 10, $e = /* @__PURE__ */ new Set([
24
+ ]), le = 10, $e = /* @__PURE__ */ new Set([
25
25
  "stat-group",
26
26
  "table",
27
27
  "list",
@@ -41,15 +41,15 @@ const xe = /* @__PURE__ */ new Set([
41
41
  ]), _e = /* @__PURE__ */ new Set(["metric", "gauge", "progress", "header", "code", "rating", "video"]);
42
42
  function Y(e, t = 0) {
43
43
  const a = [], r = [];
44
- if (t > ie)
45
- return { valid: !1, errors: ["compose children exceed maximum nesting depth (" + ie + ")"], warnings: r };
44
+ if (t > le)
45
+ return { valid: !1, errors: ["compose children exceed maximum nesting depth (" + le + ")"], warnings: r };
46
46
  if (e == null || typeof e != "object")
47
47
  return { valid: !1, errors: ["Spec must be a non-null object"], warnings: r };
48
48
  const i = e;
49
49
  if (typeof i.widget != "string" || i.widget.length === 0)
50
50
  return a.push('Required field "widget" must be a non-empty string'), { valid: !1, errors: a, warnings: r };
51
51
  const s = i.widget;
52
- if (i.type !== void 0 && i.type !== "u-widget" && a.push('"type" must be "u-widget" if specified'), i.fields !== void 0 && i.formdown !== void 0 && a.push('"fields" and "formdown" are mutually exclusive'), i.data !== void 0 && ($e.has(s) && !Array.isArray(i.data) && a.push(`"${s}" expects "data" to be an array, got ${typeof i.data}`), _e.has(s) && (Array.isArray(i.data) || typeof i.data != "object") && a.push(`"${s}" expects "data" to be an object, got ${Array.isArray(i.data) ? "array" : typeof i.data}`)), s === "compose") {
52
+ if (t === 0 && i.type !== void 0 && i.type !== "u-widget" && a.push('"type" must be "u-widget" if specified'), i.fields !== void 0 && i.formdown !== void 0 && a.push('"fields" and "formdown" are mutually exclusive'), i.data !== void 0 && ($e.has(s) && !Array.isArray(i.data) && a.push(`"${s}" expects "data" to be an array, got ${typeof i.data}`), _e.has(s) && (Array.isArray(i.data) || typeof i.data != "object") && a.push(`"${s}" expects "data" to be an object, got ${Array.isArray(i.data) ? "array" : typeof i.data}`)), s === "compose") {
53
53
  if (!Array.isArray(i.children))
54
54
  a.push('"compose" widget requires a "children" array');
55
55
  else
@@ -104,7 +104,7 @@ function ke(e) {
104
104
  function Dt(e) {
105
105
  return Y(e).valid;
106
106
  }
107
- const se = ["B", "KB", "MB", "GB", "TB"], ze = /* @__PURE__ */ new Set([
107
+ const ce = ["B", "KB", "MB", "GB", "TB"], ze = /* @__PURE__ */ new Set([
108
108
  "KRW",
109
109
  "JPY",
110
110
  "VND",
@@ -124,7 +124,7 @@ const se = ["B", "KB", "MB", "GB", "TB"], ze = /* @__PURE__ */ new Set([
124
124
  "XOF",
125
125
  "XPF"
126
126
  ]);
127
- function pe(e, t, a) {
127
+ function he(e, t, a) {
128
128
  if (e == null) return "";
129
129
  const [r, i] = t?.split(":") ?? [];
130
130
  switch (r) {
@@ -223,9 +223,9 @@ function Oe(e) {
223
223
  if (isNaN(t)) return String(e);
224
224
  const a = t < 0 ? "-" : "";
225
225
  let r = Math.abs(t), i = 0;
226
- for (; r >= 1024 && i < se.length - 1; )
226
+ for (; r >= 1024 && i < ce.length - 1; )
227
227
  r /= 1024, i++;
228
- return a + (i === 0 ? r : r.toFixed(1)) + " " + se[i];
228
+ return a + (i === 0 ? r : r.toFixed(1)) + " " + ce[i];
229
229
  }
230
230
  const Ee = [
231
231
  "chart.bar",
@@ -298,7 +298,7 @@ function Le(e, t) {
298
298
  }
299
299
  return i[r];
300
300
  }
301
- const R = {
301
+ const K = {
302
302
  // UI chrome
303
303
  prev: "Prev",
304
304
  next: "Next",
@@ -320,14 +320,14 @@ const R = {
320
320
  invalidPattern: "{label} format is invalid"
321
321
  }, L = /* @__PURE__ */ new Map();
322
322
  function jt(e, t) {
323
- L.set(e.toLowerCase(), { ...R, ...t });
323
+ L.set(e.toLowerCase(), { ...K, ...t });
324
324
  }
325
- function ue(e) {
326
- if (!e) return R;
325
+ function me(e) {
326
+ if (!e) return K;
327
327
  const t = e.toLowerCase();
328
328
  if (L.has(t)) return L.get(t);
329
329
  const a = t.split("-")[0];
330
- return a !== t && L.has(a) ? L.get(a) : R;
330
+ return a !== t && L.has(a) ? L.get(a) : K;
331
331
  }
332
332
  function A(e, t) {
333
333
  return e.replace(
@@ -336,30 +336,30 @@ function A(e, t) {
336
336
  );
337
337
  }
338
338
  function Ot() {
339
- return { ...R };
339
+ return { ...K };
340
340
  }
341
- let q;
341
+ let V;
342
342
  function Et(e) {
343
- q = e;
343
+ V = e;
344
344
  }
345
345
  function Pt() {
346
- return q;
346
+ return V;
347
347
  }
348
348
  function Ie(e) {
349
349
  if (e) return e;
350
- if (q) return q;
350
+ if (V) return V;
351
351
  if (typeof document < "u" && document.documentElement?.lang)
352
352
  return document.documentElement.lang;
353
353
  }
354
- var Ne = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, ge = (e, t, a, r) => {
354
+ var Ne = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, Z = (e, t, a, r) => {
355
355
  for (var i = r > 1 ? void 0 : r ? Fe(t, a) : t, s = e.length - 1, n; s >= 0; s--)
356
356
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
357
357
  return r && i && Ne(t, a, i), i;
358
358
  };
359
- function ne(e, t) {
359
+ function de(e, t) {
360
360
  const a = e.value, r = e.format;
361
361
  return {
362
- value: r ? pe(a, r, t) : a ?? 0,
362
+ value: r ? he(a, r, t) : a ?? 0,
363
363
  label: e.label,
364
364
  unit: e.unit,
365
365
  prefix: e.prefix,
@@ -372,20 +372,20 @@ function ne(e, t) {
372
372
  variant: e.variant
373
373
  };
374
374
  }
375
- let B = class extends y {
375
+ let I = class extends y {
376
376
  constructor() {
377
- super(...arguments), this.spec = null;
377
+ super(...arguments), this.spec = null, this.theme = null;
378
378
  }
379
379
  render() {
380
380
  if (!this.spec?.data) return l;
381
381
  const e = this.spec.options?.locale;
382
- return this.spec.widget === "stat-group" ? this.renderStatGroup(e) : this.renderMetric(ne(this.spec.data, e));
382
+ return this.spec.widget === "stat-group" ? this.renderStatGroup(e) : this.renderMetric(de(this.spec.data, e));
383
383
  }
384
384
  renderStatGroup(e) {
385
385
  const t = this.spec.data;
386
386
  return Array.isArray(t) ? o`
387
387
  <div class="stat-group" part="stat-group">
388
- ${t.map((a) => this.renderMetric(ne(a, e)))}
388
+ ${t.map((a) => this.renderMetric(de(a, e)))}
389
389
  </div>
390
390
  ` : l;
391
391
  }
@@ -406,7 +406,7 @@ let B = class extends y {
406
406
  `;
407
407
  }
408
408
  };
409
- B.styles = [b, w`
409
+ I.styles = [b, w`
410
410
  :host {
411
411
  display: block;
412
412
  font-family: system-ui, -apple-system, sans-serif;
@@ -513,13 +513,16 @@ B.styles = [b, w`
513
513
  }
514
514
  }
515
515
  `];
516
- ge([
517
- m({ type: Object })
518
- ], B.prototype, "spec", 2);
519
- B = ge([
516
+ Z([
517
+ f({ type: Object })
518
+ ], I.prototype, "spec", 2);
519
+ Z([
520
+ f({ type: String, reflect: !0 })
521
+ ], I.prototype, "theme", 2);
522
+ I = Z([
520
523
  x("u-metric")
521
- ], B);
522
- var Me = Object.defineProperty, Te = Object.getOwnPropertyDescriptor, fe = (e, t, a, r) => {
524
+ ], I);
525
+ var Me = Object.defineProperty, Te = Object.getOwnPropertyDescriptor, Q = (e, t, a, r) => {
523
526
  for (var i = r > 1 ? void 0 : r ? Te(t, a) : t, s = e.length - 1, n; s >= 0; s--)
524
527
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
525
528
  return r && i && Me(t, a, i), i;
@@ -537,16 +540,16 @@ const Ue = {
537
540
  blue: "#2563eb",
538
541
  gray: "#6b7280"
539
542
  };
540
- function oe(e) {
543
+ function pe(e) {
541
544
  return Re[e] ?? e;
542
545
  }
543
- function le(e, t, a, r, i) {
544
- const s = (r - 90) * Math.PI / 180, n = (i - 90) * Math.PI / 180, d = e + a * Math.cos(s), c = t + a * Math.sin(s), p = e + a * Math.cos(n), g = t + a * Math.sin(n), h = i - r > 180 ? 1 : 0;
545
- return `M ${d} ${c} A ${a} ${a} 0 ${h} 1 ${p} ${g}`;
546
+ function ue(e, t, a, r, i) {
547
+ const s = (r - 90) * Math.PI / 180, n = (i - 90) * Math.PI / 180, d = e + a * Math.cos(s), c = t + a * Math.sin(s), p = e + a * Math.cos(n), g = t + a * Math.sin(n), m = i - r > 180 ? 1 : 0;
548
+ return `M ${d} ${c} A ${a} ${a} 0 ${m} 1 ${p} ${g}`;
546
549
  }
547
- let W = class extends y {
550
+ let N = class extends y {
548
551
  constructor() {
549
- super(...arguments), this.spec = null;
552
+ super(...arguments), this.spec = null, this.theme = null;
550
553
  }
551
554
  render() {
552
555
  return this.spec?.data ? this.spec.widget === "progress" ? this.renderProgress() : this.renderGauge() : l;
@@ -560,14 +563,14 @@ let W = class extends y {
560
563
  return Number(e.value ?? 0);
561
564
  }
562
565
  renderGauge() {
563
- const e = this.getOptions(), t = this.getValue(), a = e.max - e.min, r = a > 0 ? Math.max(0, Math.min(1, (t - e.min) / a)) : 0, i = this.getThresholdColor(t, e), s = 100, n = 100, d = 80, c = 150, p = 240, g = c + p * r, h = le(s, n, d, c, c + p), u = r > 0 ? le(s, n, d, c, g) : null, f = typeof this.spec.title == "string" ? this.spec.title : "Gauge", v = `${t}${e.unit}`;
566
+ const e = this.getOptions(), t = this.getValue(), a = e.max - e.min, r = a > 0 ? Math.max(0, Math.min(1, (t - e.min) / a)) : 0, i = this.getThresholdColor(t, e), s = 100, n = 100, d = 80, c = 150, p = 240, g = c + p * r, m = ue(s, n, d, c, c + p), u = r > 0 ? ue(s, n, d, c, g) : null, h = typeof this.spec.title == "string" ? this.spec.title : "Gauge", v = `${t}${e.unit}`;
564
567
  return o`
565
568
  <div class="gauge-container" part="gauge"
566
569
  role="meter"
567
570
  aria-valuenow=${t}
568
571
  aria-valuemin=${e.min}
569
572
  aria-valuemax=${e.max}
570
- aria-label=${f}
573
+ aria-label=${h}
571
574
  aria-valuetext=${v}
572
575
  >
573
576
  <div class="gauge-wrapper">
@@ -576,7 +579,7 @@ let W = class extends y {
576
579
  ${e.unit ? o`<div class="gauge-unit" part="unit">${e.unit}</div>` : l}
577
580
  </div>
578
581
  <svg class="gauge-svg" viewBox="0 0 200 195" role="presentation" aria-hidden="true">
579
- <path class="gauge-track" d="${h}" fill="none" stroke-width="12" stroke-linecap="round"></path>
582
+ <path class="gauge-track" d="${m}" fill="none" stroke-width="12" stroke-linecap="round"></path>
580
583
  <path class="gauge-fill" d="${u ?? "M0 0"}" fill="none" stroke="${u ? i : "none"}" stroke-width="12" stroke-linecap="round"></path>
581
584
  </svg>
582
585
  </div>
@@ -615,11 +618,11 @@ let W = class extends y {
615
618
  if (!t.thresholds?.length) return "var(--u-widget-primary, #4f46e5)";
616
619
  const a = [...t.thresholds].sort((r, i) => r.to - i.to);
617
620
  for (const r of a)
618
- if (e <= r.to) return oe(r.color);
619
- return oe(a[a.length - 1].color);
621
+ if (e <= r.to) return pe(r.color);
622
+ return pe(a[a.length - 1].color);
620
623
  }
621
624
  };
622
- W.styles = [b, w`
625
+ N.styles = [b, w`
623
626
  :host {
624
627
  display: block;
625
628
  font-family: system-ui, -apple-system, sans-serif;
@@ -716,20 +719,23 @@ W.styles = [b, w`
716
719
  }
717
720
  }
718
721
  `];
719
- fe([
720
- m({ type: Object })
721
- ], W.prototype, "spec", 2);
722
- W = fe([
722
+ Q([
723
+ f({ type: Object })
724
+ ], N.prototype, "spec", 2);
725
+ Q([
726
+ f({ type: String, reflect: !0 })
727
+ ], N.prototype, "theme", 2);
728
+ N = Q([
723
729
  x("u-gauge")
724
- ], W);
730
+ ], N);
725
731
  var qe = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, C = (e, t, a, r) => {
726
732
  for (var i = r > 1 ? void 0 : r ? Be(t, a) : t, s = e.length - 1, n; s >= 0; s--)
727
733
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
728
734
  return r && i && qe(t, a, i), i;
729
735
  };
730
- let z = class extends y {
736
+ let _ = class extends y {
731
737
  constructor() {
732
- super(...arguments), this.spec = null, this._sortField = null, this._sortDir = null, this._page = 0, this._searchQuery = "", this._focusedIdx = 0, this._onTableKeydown = (e) => {
738
+ super(...arguments), this.spec = null, this.theme = null, this._sortField = null, this._sortDir = null, this._page = 0, this._searchQuery = "", this._focusedIdx = 0, this._onTableKeydown = (e) => {
733
739
  const a = e.target.closest("tr");
734
740
  if (!a) return;
735
741
  const r = a.parentElement;
@@ -793,10 +799,10 @@ let z = class extends y {
793
799
  }
794
800
  get _locale() {
795
801
  const e = this.spec?.options?.locale;
796
- return ue(typeof e == "string" ? e : void 0);
802
+ return me(typeof e == "string" ? e : void 0);
797
803
  }
798
804
  renderTable() {
799
- const e = this.spec.data, t = this.getColumns(e), a = this._locale, r = this.spec.options?.sortable !== !1, i = !!this.spec.options?.searchable, s = !!this.spec.options?.compact, n = Number(this.spec.options?.pageSize) || 0, d = this._searchQuery ? this.filterData(e, t) : e, c = this._sortField && this._sortDir ? this.sortData(d) : d, p = n > 0 ? Math.max(1, Math.ceil(c.length / n)) : 1, g = Math.min(this._page, p - 1), h = n > 0 ? c.slice(g * n, (g + 1) * n) : c, u = i ? o`
805
+ const e = this.spec.data, t = this.getColumns(e), a = this._locale, r = this.spec.options?.sortable !== !1, i = !!this.spec.options?.searchable, s = !!this.spec.options?.compact, n = Number(this.spec.options?.pageSize) || 0, d = this._searchQuery ? this.filterData(e, t) : e, c = this._sortField && this._sortDir ? this.sortData(d) : d, p = n > 0 ? Math.max(1, Math.ceil(c.length / n)) : 1, g = Math.min(this._page, p - 1), m = n > 0 ? c.slice(g * n, (g + 1) * n) : c, u = i ? o`
800
806
  <div class="search-box" part="search">
801
807
  <input
802
808
  class="search-input"
@@ -807,7 +813,7 @@ let z = class extends y {
807
813
  @input=${this._onSearch}
808
814
  />
809
815
  </div>
810
- ` : l, f = n > 0 && p > 1 ? o`
816
+ ` : l, h = n > 0 && p > 1 ? o`
811
817
  <nav class="pagination" part="pagination" aria-label=${a.tablePagination}>
812
818
  <button aria-label=${a.previousPage} ?disabled=${g === 0} @click=${() => this._onPageChange(g - 1)}>${a.prev}</button>
813
819
  <span aria-live="polite">${g + 1} / ${p}</span>
@@ -837,18 +843,18 @@ let z = class extends y {
837
843
  </tr>
838
844
  </thead>
839
845
  <tbody @keydown=${this._onTableKeydown}>
840
- ${h.map(
846
+ ${m.map(
841
847
  (v, $) => o`
842
848
  <tr part="tr"
843
849
  tabindex=${$ === this._focusedIdx ? "0" : "-1"}
844
850
  @click=${() => this._onRowClick(v, n > 0 ? g * n + $ : $)}
845
- @keydown=${(_) => {
846
- (_.key === "Enter" || _.key === " ") && (_.preventDefault(), this._onRowClick(v, n > 0 ? g * n + $ : $));
851
+ @keydown=${(k) => {
852
+ (k.key === "Enter" || k.key === " ") && (k.preventDefault(), this._onRowClick(v, n > 0 ? g * n + $ : $));
847
853
  }}
848
854
  >
849
855
  ${t.map(
850
- (_) => o`<td data-align=${_.align ?? "left"} part="td"
851
- >${pe(v[_.field], _.format, typeof this.spec.options?.locale == "string" ? this.spec.options.locale : void 0)}</td
856
+ (k) => o`<td data-align=${k.align ?? "left"} part="td"
857
+ >${he(v[k.field], k.format, typeof this.spec.options?.locale == "string" ? this.spec.options.locale : void 0)}</td
852
858
  >`
853
859
  )}
854
860
  </tr>
@@ -857,7 +863,7 @@ let z = class extends y {
857
863
  </tbody>
858
864
  </table>
859
865
  </div>
860
- ${f}
866
+ ${h}
861
867
  </div>`;
862
868
  }
863
869
  _onPageChange(e) {
@@ -900,8 +906,8 @@ let z = class extends y {
900
906
  <div class="list-item" part="list-item"
901
907
  tabindex=${g === this._focusedIdx ? "0" : "-1"}
902
908
  @click=${() => this._onRowClick(p, g)}
903
- @keydown=${(h) => {
904
- (h.key === "Enter" || h.key === " ") && (h.preventDefault(), this._onRowClick(p, g));
909
+ @keydown=${(m) => {
910
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), this._onRowClick(p, g));
905
911
  }}
906
912
  >
907
913
  ${n && p[n] ? o`<img class="list-avatar" src=${String(p[n])} alt="" part="avatar" />` : s ? o`<div class="list-icon" part="icon">${this.getIconLetter(p[s])}</div>` : l}
@@ -948,7 +954,7 @@ let z = class extends y {
948
954
  return String(e ?? "").charAt(0).toUpperCase();
949
955
  }
950
956
  };
951
- z.styles = [b, w`
957
+ _.styles = [b, w`
952
958
  :host {
953
959
  display: block;
954
960
  font-family: system-ui, -apple-system, sans-serif;
@@ -1258,34 +1264,37 @@ z.styles = [b, w`
1258
1264
  }
1259
1265
  `];
1260
1266
  C([
1261
- m({ type: Object })
1262
- ], z.prototype, "spec", 2);
1267
+ f({ type: Object })
1268
+ ], _.prototype, "spec", 2);
1269
+ C([
1270
+ f({ type: String, reflect: !0 })
1271
+ ], _.prototype, "theme", 2);
1263
1272
  C([
1264
1273
  S()
1265
- ], z.prototype, "_sortField", 2);
1274
+ ], _.prototype, "_sortField", 2);
1266
1275
  C([
1267
1276
  S()
1268
- ], z.prototype, "_sortDir", 2);
1277
+ ], _.prototype, "_sortDir", 2);
1269
1278
  C([
1270
1279
  S()
1271
- ], z.prototype, "_page", 2);
1280
+ ], _.prototype, "_page", 2);
1272
1281
  C([
1273
1282
  S()
1274
- ], z.prototype, "_searchQuery", 2);
1283
+ ], _.prototype, "_searchQuery", 2);
1275
1284
  C([
1276
1285
  S()
1277
- ], z.prototype, "_focusedIdx", 2);
1278
- z = C([
1286
+ ], _.prototype, "_focusedIdx", 2);
1287
+ _ = C([
1279
1288
  x("u-table")
1280
- ], z);
1281
- var We = Object.defineProperty, He = Object.getOwnPropertyDescriptor, V = (e, t, a, r) => {
1289
+ ], _);
1290
+ var We = Object.defineProperty, He = Object.getOwnPropertyDescriptor, H = (e, t, a, r) => {
1282
1291
  for (var i = r > 1 ? void 0 : r ? He(t, a) : t, s = e.length - 1, n; s >= 0; s--)
1283
1292
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
1284
1293
  return r && i && We(t, a, i), i;
1285
1294
  };
1286
- let j = class extends y {
1295
+ let D = class extends y {
1287
1296
  constructor() {
1288
- super(...arguments), this.spec = null, this._formData = {}, this._errors = {}, this._onFormSubmit = (e) => {
1297
+ super(...arguments), this.spec = null, this.theme = null, this._formData = {}, this._errors = {}, this._onFormSubmit = (e) => {
1289
1298
  e.preventDefault();
1290
1299
  const t = (this.spec?.actions ?? []).find((a) => a.action === "submit");
1291
1300
  t ? this._onAction(t) : this._validate() && this._emitEvent({
@@ -1511,7 +1520,7 @@ let j = class extends y {
1511
1520
  }
1512
1521
  get _locale() {
1513
1522
  const e = this.spec?.options?.locale;
1514
- return ue(typeof e == "string" ? e : void 0);
1523
+ return me(typeof e == "string" ? e : void 0);
1515
1524
  }
1516
1525
  _validate() {
1517
1526
  const e = this.spec?.fields ?? [], t = {}, a = this._locale;
@@ -1575,7 +1584,7 @@ let j = class extends y {
1575
1584
  );
1576
1585
  }
1577
1586
  };
1578
- j.styles = [b, w`
1587
+ D.styles = [b, w`
1579
1588
  :host {
1580
1589
  display: block;
1581
1590
  font-family: system-ui, -apple-system, sans-serif;
@@ -1793,24 +1802,27 @@ j.styles = [b, w`
1793
1802
  }
1794
1803
  }
1795
1804
  `];
1796
- V([
1797
- m({ type: Object })
1798
- ], j.prototype, "spec", 2);
1799
- V([
1805
+ H([
1806
+ f({ type: Object })
1807
+ ], D.prototype, "spec", 2);
1808
+ H([
1809
+ f({ type: String, reflect: !0 })
1810
+ ], D.prototype, "theme", 2);
1811
+ H([
1800
1812
  S()
1801
- ], j.prototype, "_formData", 2);
1802
- V([
1813
+ ], D.prototype, "_formData", 2);
1814
+ H([
1803
1815
  S()
1804
- ], j.prototype, "_errors", 2);
1805
- j = V([
1816
+ ], D.prototype, "_errors", 2);
1817
+ D = H([
1806
1818
  x("u-form")
1807
- ], j);
1808
- var Ke = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, Z = (e, t, a, r) => {
1819
+ ], D);
1820
+ var Ke = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, ee = (e, t, a, r) => {
1809
1821
  for (var i = r > 1 ? void 0 : r ? Ve(t, a) : t, s = e.length - 1, n; s >= 0; s--)
1810
1822
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
1811
1823
  return r && i && Ke(t, a, i), i;
1812
1824
  };
1813
- let I = class extends y {
1825
+ let F = class extends y {
1814
1826
  constructor() {
1815
1827
  super(...arguments), this.spec = null, this.theme = null;
1816
1828
  }
@@ -1850,7 +1862,7 @@ let I = class extends y {
1850
1862
  return r ? o`<div class=${d} style=${r} part="child">${n}</div>` : o`<div class=${d} part="child">${n}</div>`;
1851
1863
  }
1852
1864
  };
1853
- I.styles = [b, w`
1865
+ F.styles = [b, w`
1854
1866
  :host {
1855
1867
  display: block;
1856
1868
  container: u-compose / inline-size;
@@ -1951,23 +1963,23 @@ I.styles = [b, w`
1951
1963
  }
1952
1964
  }
1953
1965
  `];
1954
- Z([
1955
- m({ type: Object })
1956
- ], I.prototype, "spec", 2);
1957
- Z([
1958
- m({ type: String, reflect: !0 })
1959
- ], I.prototype, "theme", 2);
1960
- I = Z([
1966
+ ee([
1967
+ f({ type: Object })
1968
+ ], F.prototype, "spec", 2);
1969
+ ee([
1970
+ f({ type: String, reflect: !0 })
1971
+ ], F.prototype, "theme", 2);
1972
+ F = ee([
1961
1973
  x("u-compose")
1962
- ], I);
1963
- var Ge = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, he = (e, t, a, r) => {
1974
+ ], F);
1975
+ var Ge = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, te = (e, t, a, r) => {
1964
1976
  for (var i = r > 1 ? void 0 : r ? Xe(t, a) : t, s = e.length - 1, n; s >= 0; s--)
1965
1977
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
1966
1978
  return r && i && Ge(t, a, i), i;
1967
1979
  };
1968
- let H = class extends y {
1980
+ let M = class extends y {
1969
1981
  constructor() {
1970
- super(...arguments), this.spec = null;
1982
+ super(...arguments), this.spec = null, this.theme = null;
1971
1983
  }
1972
1984
  render() {
1973
1985
  if (!this.spec) return l;
@@ -2015,9 +2027,9 @@ let H = class extends y {
2015
2027
  return t = t.replace(/^#### (.+)$/gm, "<h4>$1</h4>"), t = t.replace(/^### (.+)$/gm, "<h3>$1</h3>"), t = t.replace(/^## (.+)$/gm, "<h2>$1</h2>"), t = t.replace(/^# (.+)$/gm, "<h1>$1</h1>"), t = t.replace(/^---$/gm, "<hr>"), t = t.replace(/```[\s\S]*?```/g, (a) => `<pre><code>${a.slice(3, -3).replace(/^\w*\n/, "")}</code></pre>`), t = t.replace(
2016
2028
  /^(\|.+\|)\n(\|[\s:|-]+\|)\n((?:\|.+\|\n?)+)/gm,
2017
2029
  (a, r, i, s) => {
2018
- const n = (u) => u.split("|").slice(1, -1).map((f) => f.trim()), d = n(r), c = n(i).map((u) => u.startsWith(":") && u.endsWith(":") ? "center" : u.endsWith(":") ? "right" : "left"), p = s.trim().split(`
2019
- `).map(n), g = d.map((u, f) => `<th scope="col" style="text-align:${c[f] ?? "left"}">${u}</th>`).join(""), h = p.map((u) => "<tr>" + u.map((f, v) => `<td style="text-align:${c[v] ?? "left"}">${f}</td>`).join("") + "</tr>").join("");
2020
- return `<table><thead><tr>${g}</tr></thead><tbody>${h}</tbody></table>`;
2030
+ const n = (u) => u.split("|").slice(1, -1).map((h) => h.trim()), d = n(r), c = n(i).map((u) => u.startsWith(":") && u.endsWith(":") ? "center" : u.endsWith(":") ? "right" : "left"), p = s.trim().split(`
2031
+ `).map(n), g = d.map((u, h) => `<th scope="col" style="text-align:${c[h] ?? "left"}">${u}</th>`).join(""), m = p.map((u) => "<tr>" + u.map((h, v) => `<td style="text-align:${c[v] ?? "left"}">${h}</td>`).join("") + "</tr>").join("");
2032
+ return `<table><thead><tr>${g}</tr></thead><tbody>${m}</tbody></table>`;
2021
2033
  }
2022
2034
  ), t = t.replace(/`([^`]+)`/g, "<code>$1</code>"), t = t.replace(/\*\*\*(.+?)\*\*\*/g, "<strong><em>$1</em></strong>"), t = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/\*(.+?)\*/g, "<em>$1</em>"), t = t.replace(
2023
2035
  /\[([^\]]+)\]\(([^)]+)\)/g,
@@ -2033,7 +2045,7 @@ let H = class extends y {
2033
2045
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
2034
2046
  }
2035
2047
  };
2036
- H.styles = [b, w`
2048
+ M.styles = [b, w`
2037
2049
  :host {
2038
2050
  display: block;
2039
2051
  font-family: system-ui, -apple-system, sans-serif;
@@ -2210,20 +2222,23 @@ H.styles = [b, w`
2210
2222
  }
2211
2223
  }
2212
2224
  `];
2213
- he([
2214
- m({ type: Object })
2215
- ], H.prototype, "spec", 2);
2216
- H = he([
2225
+ te([
2226
+ f({ type: Object })
2227
+ ], M.prototype, "spec", 2);
2228
+ te([
2229
+ f({ type: String, reflect: !0 })
2230
+ ], M.prototype, "theme", 2);
2231
+ M = te([
2217
2232
  x("u-content")
2218
- ], H);
2219
- var Je = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, me = (e, t, a, r) => {
2233
+ ], M);
2234
+ var Je = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, re = (e, t, a, r) => {
2220
2235
  for (var i = r > 1 ? void 0 : r ? Ye(t, a) : t, s = e.length - 1, n; s >= 0; s--)
2221
2236
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
2222
2237
  return r && i && Je(t, a, i), i;
2223
2238
  };
2224
- let K = class extends y {
2239
+ let T = class extends y {
2225
2240
  constructor() {
2226
- super(...arguments), this.spec = null;
2241
+ super(...arguments), this.spec = null, this.theme = null;
2227
2242
  }
2228
2243
  render() {
2229
2244
  if (!this.spec) return l;
@@ -2252,7 +2267,7 @@ let K = class extends y {
2252
2267
  return e ? Array.isArray(e) ? e.filter((t) => t != null && typeof t == "object" && "key" in t && "value" in t).map((t) => [String(t.key), t.value]) : typeof e == "object" ? Object.entries(e) : [] : [];
2253
2268
  }
2254
2269
  };
2255
- K.styles = [b, w`
2270
+ T.styles = [b, w`
2256
2271
  :host {
2257
2272
  display: block;
2258
2273
  font-family: system-ui, -apple-system, sans-serif;
@@ -2346,12 +2361,15 @@ K.styles = [b, w`
2346
2361
  }
2347
2362
  }
2348
2363
  `];
2349
- me([
2350
- m({ type: Object })
2351
- ], K.prototype, "spec", 2);
2352
- K = me([
2364
+ re([
2365
+ f({ type: Object })
2366
+ ], T.prototype, "spec", 2);
2367
+ re([
2368
+ f({ type: String, reflect: !0 })
2369
+ ], T.prototype, "theme", 2);
2370
+ T = re([
2353
2371
  x("u-kv")
2354
- ], K);
2372
+ ], T);
2355
2373
  var Ze = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, G = (e, t, a, r) => {
2356
2374
  for (var i = r > 1 ? void 0 : r ? Qe(t, a) : t, s = e.length - 1, n; s >= 0; s--)
2357
2375
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
@@ -2398,20 +2416,20 @@ const et = {
2398
2416
  jsonc: "json",
2399
2417
  psql: "sql",
2400
2418
  mysql: "sql"
2401
- }, ce = /* @__PURE__ */ new Map();
2419
+ }, ge = /* @__PURE__ */ new Map();
2402
2420
  function at(e) {
2403
- let t = ce.get(e);
2421
+ let t = ge.get(e);
2404
2422
  if (!t) {
2405
2423
  const a = tt[e] || "";
2406
- t = a ? new Set(a.split(" ")) : /* @__PURE__ */ new Set(), ce.set(e, t);
2424
+ t = a ? new Set(a.split(" ")) : /* @__PURE__ */ new Set(), ge.set(e, t);
2407
2425
  }
2408
2426
  return t;
2409
2427
  }
2410
- function k(e) {
2428
+ function z(e) {
2411
2429
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
2412
2430
  }
2413
- function D(e, t) {
2414
- const a = k(e);
2431
+ function j(e, t) {
2432
+ const a = z(e);
2415
2433
  return a.includes(`
2416
2434
  `) ? a.split(`
2417
2435
  `).map((r) => `<span class="hl-${t}">${r}</span>`).join(`
@@ -2432,7 +2450,7 @@ function ve(e, t, a) {
2432
2450
  return e.length;
2433
2451
  }
2434
2452
  function it(e, t) {
2435
- if (!t) return k(e);
2453
+ if (!t) return z(e);
2436
2454
  const a = rt[t] || t;
2437
2455
  if (a === "json") return st(e);
2438
2456
  const r = at(a), i = et[a], s = i?.[0], n = i?.[1], d = a === "javascript" || a === "typescript";
@@ -2440,50 +2458,50 @@ function it(e, t) {
2440
2458
  const g = e.length;
2441
2459
  for (; p < g; ) {
2442
2460
  if (n && e.startsWith(n[0], p)) {
2443
- const u = e.indexOf(n[1], p + n[0].length), f = u === -1 ? e.slice(p) : e.slice(p, u + n[1].length);
2444
- c += D(f, "c"), p += f.length;
2461
+ const u = e.indexOf(n[1], p + n[0].length), h = u === -1 ? e.slice(p) : e.slice(p, u + n[1].length);
2462
+ c += j(h, "c"), p += h.length;
2445
2463
  continue;
2446
2464
  }
2447
2465
  if (s && e.startsWith(s, p)) {
2448
2466
  const u = e.indexOf(`
2449
- `, p), f = u === -1 ? e.slice(p) : e.slice(p, u);
2450
- c += D(f, "c"), p += f.length;
2467
+ `, p), h = u === -1 ? e.slice(p) : e.slice(p, u);
2468
+ c += j(h, "c"), p += h.length;
2451
2469
  continue;
2452
2470
  }
2453
- const h = e[p];
2454
- if (h === '"' || h === "'" || h === "`" && d) {
2455
- const u = ve(e, p, h);
2456
- c += D(e.slice(p, u), "s"), p = u;
2471
+ const m = e[p];
2472
+ if (m === '"' || m === "'" || m === "`" && d) {
2473
+ const u = ve(e, p, m);
2474
+ c += j(e.slice(p, u), "s"), p = u;
2457
2475
  continue;
2458
2476
  }
2459
- if (/\d/.test(h) && (p === 0 || !/[a-zA-Z_$]/.test(e[p - 1]))) {
2477
+ if (/\d/.test(m) && (p === 0 || !/[a-zA-Z_$]/.test(e[p - 1]))) {
2460
2478
  let u = p + 1;
2461
2479
  for (; u < g && /[0-9a-fA-FxXoObBeE._]/.test(e[u]); ) u++;
2462
- c += D(e.slice(p, u), "n"), p = u;
2480
+ c += j(e.slice(p, u), "n"), p = u;
2463
2481
  continue;
2464
2482
  }
2465
- if (/[a-zA-Z_$]/.test(h)) {
2483
+ if (/[a-zA-Z_$]/.test(m)) {
2466
2484
  let u = p + 1;
2467
2485
  for (; u < g && /[a-zA-Z0-9_$]/.test(e[u]); ) u++;
2468
- const f = e.slice(p, u);
2469
- c += r.has(f) ? `<span class="hl-k">${k(f)}</span>` : k(f), p = u;
2486
+ const h = e.slice(p, u);
2487
+ c += r.has(h) ? `<span class="hl-k">${z(h)}</span>` : z(h), p = u;
2470
2488
  continue;
2471
2489
  }
2472
- if (a === "html" && h === "<" && p + 1 < g && /[a-zA-Z/!]/.test(e[p + 1])) {
2490
+ if (a === "html" && m === "<" && p + 1 < g && /[a-zA-Z/!]/.test(e[p + 1])) {
2473
2491
  const u = e.indexOf(">", p);
2474
2492
  if (u !== -1) {
2475
- c += `<span class="hl-k">${k(e.slice(p, u + 1))}</span>`, p = u + 1;
2493
+ c += `<span class="hl-k">${z(e.slice(p, u + 1))}</span>`, p = u + 1;
2476
2494
  continue;
2477
2495
  }
2478
2496
  }
2479
- if (a === "css" && /[a-z-]/.test(h)) {
2497
+ if (a === "css" && /[a-z-]/.test(m)) {
2480
2498
  let u = p + 1;
2481
2499
  for (; u < g && /[a-z-]/.test(e[u]); ) u++;
2482
- const f = e.slice(p, u);
2483
- e.slice(u).trimStart()[0] === ":" ? c += `<span class="hl-k">${k(f)}</span>` : c += k(f), p = u;
2500
+ const h = e.slice(p, u);
2501
+ e.slice(u).trimStart()[0] === ":" ? c += `<span class="hl-k">${z(h)}</span>` : c += z(h), p = u;
2484
2502
  continue;
2485
2503
  }
2486
- c += k(h), p++;
2504
+ c += z(m), p++;
2487
2505
  }
2488
2506
  return c;
2489
2507
  }
@@ -2494,13 +2512,13 @@ function st(e) {
2494
2512
  const i = e[a];
2495
2513
  if (i === '"') {
2496
2514
  const n = ve(e, a, '"'), d = e.slice(a, n), c = e.slice(n).trimStart();
2497
- t += D(d, c[0] === ":" ? "k" : "s"), a = n;
2515
+ t += j(d, c[0] === ":" ? "k" : "s"), a = n;
2498
2516
  continue;
2499
2517
  }
2500
2518
  if (/[\d-]/.test(i) && (a === 0 || /[\s,:\[{]/.test(e[a - 1]))) {
2501
2519
  let n = a + 1;
2502
2520
  for (; n < r && /[0-9.eE+\-]/.test(e[n]); ) n++;
2503
- t += D(e.slice(a, n), "n"), a = n;
2521
+ t += j(e.slice(a, n), "n"), a = n;
2504
2522
  continue;
2505
2523
  }
2506
2524
  let s = !1;
@@ -2509,7 +2527,7 @@ function st(e) {
2509
2527
  t += `<span class="hl-k">${n}</span>`, a += n.length, s = !0;
2510
2528
  break;
2511
2529
  }
2512
- s || (t += k(i), a++);
2530
+ s || (t += z(i), a++);
2513
2531
  }
2514
2532
  return t;
2515
2533
  }
@@ -2526,10 +2544,10 @@ let O = class extends y {
2526
2544
  const a = String(e.language ?? "").toLowerCase(), r = this.spec.options ?? {}, i = r.lineNumbers !== !1, s = !!(r.wrap ?? !1), n = r.maxHeight ? String(r.maxHeight) : void 0, d = new Set(
2527
2545
  Array.isArray(r.highlight) ? r.highlight : []
2528
2546
  ), g = it(t, a).split(`
2529
- `).map((u, f) => {
2530
- const v = f + 1, $ = d.has(v) ? " line-hl" : "", _ = i ? `<span class="line-no">${v}</span>` : "";
2531
- return `<span class="line${$}">${_}${u || " "}</span>`;
2532
- }).join(""), h = n ? `max-height: ${n}` : "";
2547
+ `).map((u, h) => {
2548
+ const v = h + 1, $ = d.has(v) ? " line-hl" : "", k = i ? `<span class="line-no">${v}</span>` : "";
2549
+ return `<span class="line${$}">${k}${u || " "}</span>`;
2550
+ }).join(""), m = n ? `max-height: ${n}` : "";
2533
2551
  return o`
2534
2552
  <div class="code-block" part="code">
2535
2553
  <div class="code-header" part="code-header">
@@ -2541,7 +2559,7 @@ let O = class extends y {
2541
2559
  @click=${this._copyCode}
2542
2560
  >${this._copied ? "Copied!" : "Copy"}</button>
2543
2561
  </div>
2544
- <div class="code-body" part="code-body" style=${h}>
2562
+ <div class="code-body" part="code-body" style=${m}>
2545
2563
  <pre data-wrap=${String(s)}><code .innerHTML=${g}></code></pre>
2546
2564
  </div>
2547
2565
  </div>
@@ -2664,10 +2682,10 @@ O.styles = [b, w`
2664
2682
  }
2665
2683
  `];
2666
2684
  G([
2667
- m({ type: Object })
2685
+ f({ type: Object })
2668
2686
  ], O.prototype, "spec", 2);
2669
2687
  G([
2670
- m({ type: String, reflect: !0 })
2688
+ f({ type: String, reflect: !0 })
2671
2689
  ], O.prototype, "theme", 2);
2672
2690
  G([
2673
2691
  S()
@@ -2675,12 +2693,12 @@ G([
2675
2693
  O = G([
2676
2694
  x("u-code")
2677
2695
  ], O);
2678
- var nt = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, Q = (e, t, a, r) => {
2696
+ var nt = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, ae = (e, t, a, r) => {
2679
2697
  for (var i = r > 1 ? void 0 : r ? ot(t, a) : t, s = e.length - 1, n; s >= 0; s--)
2680
2698
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
2681
2699
  return r && i && nt(t, a, i), i;
2682
2700
  };
2683
- let N = class extends y {
2701
+ let U = class extends y {
2684
2702
  constructor() {
2685
2703
  super(...arguments), this.spec = null, this.theme = null;
2686
2704
  }
@@ -2767,7 +2785,7 @@ let N = class extends y {
2767
2785
  return [];
2768
2786
  }
2769
2787
  };
2770
- N.styles = [b, w`
2788
+ U.styles = [b, w`
2771
2789
  :host {
2772
2790
  display: block;
2773
2791
  font-family: system-ui, -apple-system, sans-serif;
@@ -2864,16 +2882,16 @@ N.styles = [b, w`
2864
2882
  .cite-snippet { font-size: 0.75rem; }
2865
2883
  }
2866
2884
  `];
2867
- Q([
2868
- m({ type: Object })
2869
- ], N.prototype, "spec", 2);
2870
- Q([
2871
- m({ type: String, reflect: !0 })
2872
- ], N.prototype, "theme", 2);
2873
- N = Q([
2885
+ ae([
2886
+ f({ type: Object })
2887
+ ], U.prototype, "spec", 2);
2888
+ ae([
2889
+ f({ type: String, reflect: !0 })
2890
+ ], U.prototype, "theme", 2);
2891
+ U = ae([
2874
2892
  x("u-citation")
2875
- ], N);
2876
- var lt = Object.defineProperty, ct = Object.getOwnPropertyDescriptor, ee = (e, t, a, r) => {
2893
+ ], U);
2894
+ var lt = Object.defineProperty, ct = Object.getOwnPropertyDescriptor, ie = (e, t, a, r) => {
2877
2895
  for (var i = r > 1 ? void 0 : r ? ct(t, a) : t, s = e.length - 1, n; s >= 0; s--)
2878
2896
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
2879
2897
  return r && i && lt(t, a, i), i;
@@ -2890,7 +2908,7 @@ const dt = /* @__PURE__ */ new Set(["info", "success", "warning", "error", "neut
2890
2908
  neutral: "○"
2891
2909
  // ○
2892
2910
  };
2893
- let F = class extends y {
2911
+ let R = class extends y {
2894
2912
  constructor() {
2895
2913
  super(...arguments), this.spec = null, this.theme = null;
2896
2914
  }
@@ -2935,7 +2953,7 @@ let F = class extends y {
2935
2953
  return dt.has(t) ? t : "info";
2936
2954
  }
2937
2955
  };
2938
- F.styles = [b, w`
2956
+ R.styles = [b, w`
2939
2957
  :host {
2940
2958
  display: block;
2941
2959
  font-family: system-ui, -apple-system, sans-serif;
@@ -3000,22 +3018,22 @@ F.styles = [b, w`
3000
3018
  .status-item { font-size: 0.8125rem; }
3001
3019
  }
3002
3020
  `];
3003
- ee([
3004
- m({ type: Object })
3005
- ], F.prototype, "spec", 2);
3006
- ee([
3007
- m({ type: String, reflect: !0 })
3008
- ], F.prototype, "theme", 2);
3009
- F = ee([
3021
+ ie([
3022
+ f({ type: Object })
3023
+ ], R.prototype, "spec", 2);
3024
+ ie([
3025
+ f({ type: String, reflect: !0 })
3026
+ ], R.prototype, "theme", 2);
3027
+ R = ie([
3010
3028
  x("u-status")
3011
- ], F);
3012
- var ut = Object.defineProperty, gt = Object.getOwnPropertyDescriptor, te = (e, t, a, r) => {
3029
+ ], R);
3030
+ var ut = Object.defineProperty, gt = Object.getOwnPropertyDescriptor, se = (e, t, a, r) => {
3013
3031
  for (var i = r > 1 ? void 0 : r ? gt(t, a) : t, s = e.length - 1, n; s >= 0; s--)
3014
3032
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
3015
3033
  return r && i && ut(t, a, i), i;
3016
3034
  };
3017
3035
  const ft = /* @__PURE__ */ new Set(["done", "active", "pending", "error"]);
3018
- function de(e, t) {
3036
+ function fe(e, t) {
3019
3037
  if (t) return o`<span class="step-icon-text">${t}</span>`;
3020
3038
  switch (e) {
3021
3039
  case "done":
@@ -3028,7 +3046,7 @@ function de(e, t) {
3028
3046
  return o`<svg class="step-svg" viewBox="0 0 16 16" fill="currentColor"><path d="M4.47 4.47a.75.75 0 0 1 1.06 0L8 6.94l2.47-2.47a.75.75 0 1 1 1.06 1.06L9.06 8l2.47 2.47a.75.75 0 1 1-1.06 1.06L8 9.06l-2.47 2.47a.75.75 0 0 1-1.06-1.06L6.94 8 4.47 5.53a.75.75 0 0 1 0-1.06Z"/></svg>`;
3029
3047
  }
3030
3048
  }
3031
- let M = class extends y {
3049
+ let q = class extends y {
3032
3050
  constructor() {
3033
3051
  super(...arguments), this.spec = null, this.theme = null;
3034
3052
  }
@@ -3046,7 +3064,7 @@ let M = class extends y {
3046
3064
  ${e.map((a) => o`
3047
3065
  <div class="step-v" part="step" role="listitem" data-status=${a.status}>
3048
3066
  <div class="step-track">
3049
- <span class="step-icon" part="step-icon" aria-hidden="true">${de(a.status, a.icon)}</span>
3067
+ <span class="step-icon" part="step-icon" aria-hidden="true">${fe(a.status, a.icon)}</span>
3050
3068
  <div class="step-line"></div>
3051
3069
  </div>
3052
3070
  <div class="step-body">
@@ -3068,7 +3086,7 @@ let M = class extends y {
3068
3086
  <div class="step-h" part="step" role="listitem" data-status=${a.status}>
3069
3087
  <div class="step-h-top">
3070
3088
  <div class="step-h-line" ?data-done=${i}></div>
3071
- <span class="step-icon" part="step-icon" aria-hidden="true">${de(a.status, a.icon)}</span>
3089
+ <span class="step-icon" part="step-icon" aria-hidden="true">${fe(a.status, a.icon)}</span>
3072
3090
  <div class="step-h-line" ?data-done=${s}></div>
3073
3091
  </div>
3074
3092
  <div class="step-label" part="step-label">${a.label}</div>
@@ -3094,7 +3112,7 @@ let M = class extends y {
3094
3112
  return ft.has(t) ? t : "pending";
3095
3113
  }
3096
3114
  };
3097
- M.styles = [b, w`
3115
+ q.styles = [b, w`
3098
3116
  :host {
3099
3117
  display: block;
3100
3118
  font-family: system-ui, -apple-system, sans-serif;
@@ -3326,15 +3344,15 @@ M.styles = [b, w`
3326
3344
  }
3327
3345
  }
3328
3346
  `];
3329
- te([
3330
- m({ type: Object })
3331
- ], M.prototype, "spec", 2);
3332
- te([
3333
- m({ type: String, reflect: !0 })
3334
- ], M.prototype, "theme", 2);
3335
- M = te([
3347
+ se([
3348
+ f({ type: Object })
3349
+ ], q.prototype, "spec", 2);
3350
+ se([
3351
+ f({ type: String, reflect: !0 })
3352
+ ], q.prototype, "theme", 2);
3353
+ q = se([
3336
3354
  x("u-steps")
3337
- ], M);
3355
+ ], q);
3338
3356
  var ht = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, X = (e, t, a, r) => {
3339
3357
  for (var i = r > 1 ? void 0 : r ? mt(t, a) : t, s = e.length - 1, n; s >= 0; s--)
3340
3358
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
@@ -3363,7 +3381,7 @@ let E = class extends y {
3363
3381
  @mouseleave=${i ? () => {
3364
3382
  this._hoverIdx = -1;
3365
3383
  } : void 0}>
3366
- ${Array.from({ length: r }, (g, h) => this._renderIcon(h, p, c, s, i))}
3384
+ ${Array.from({ length: r }, (g, m) => this._renderIcon(m, p, c, s, i))}
3367
3385
  </div>
3368
3386
  ${!i && a > 0 ? o`<span class="rating-value" part="rating-value">${a}</span>` : l}
3369
3387
  ${d != null ? o`<span class="rating-count" part="rating-count">(${d})</span>` : l}
@@ -3533,10 +3551,10 @@ E.styles = [b, w`
3533
3551
  }
3534
3552
  `];
3535
3553
  X([
3536
- m({ type: Object })
3554
+ f({ type: Object })
3537
3555
  ], E.prototype, "spec", 2);
3538
3556
  X([
3539
- m({ type: String, reflect: !0 })
3557
+ f({ type: String, reflect: !0 })
3540
3558
  ], E.prototype, "theme", 2);
3541
3559
  X([
3542
3560
  S()
@@ -3544,12 +3562,12 @@ X([
3544
3562
  E = X([
3545
3563
  x("u-rating")
3546
3564
  ], E);
3547
- var bt = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, re = (e, t, a, r) => {
3565
+ var bt = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, ne = (e, t, a, r) => {
3548
3566
  for (var i = r > 1 ? void 0 : r ? wt(t, a) : t, s = e.length - 1, n; s >= 0; s--)
3549
3567
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
3550
3568
  return r && i && bt(t, a, i), i;
3551
3569
  };
3552
- let T = class extends y {
3570
+ let B = class extends y {
3553
3571
  constructor() {
3554
3572
  super(...arguments), this.spec = null, this.theme = null;
3555
3573
  }
@@ -3583,7 +3601,7 @@ let T = class extends y {
3583
3601
  return /^(javascript|data|vbscript):/i.test(t) ? "" : e;
3584
3602
  }
3585
3603
  };
3586
- T.styles = [b, w`
3604
+ B.styles = [b, w`
3587
3605
  :host {
3588
3606
  display: block;
3589
3607
  font-family: system-ui, -apple-system, sans-serif;
@@ -3617,21 +3635,21 @@ T.styles = [b, w`
3617
3635
  }
3618
3636
  }
3619
3637
  `];
3620
- re([
3621
- m({ type: Object })
3622
- ], T.prototype, "spec", 2);
3623
- re([
3624
- m({ type: String, reflect: !0 })
3625
- ], T.prototype, "theme", 2);
3626
- T = re([
3638
+ ne([
3639
+ f({ type: Object })
3640
+ ], B.prototype, "spec", 2);
3641
+ ne([
3642
+ f({ type: String, reflect: !0 })
3643
+ ], B.prototype, "theme", 2);
3644
+ B = ne([
3627
3645
  x("u-video")
3628
- ], T);
3629
- var yt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, ae = (e, t, a, r) => {
3646
+ ], B);
3647
+ var yt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, oe = (e, t, a, r) => {
3630
3648
  for (var i = r > 1 ? void 0 : r ? xt(t, a) : t, s = e.length - 1, n; s >= 0; s--)
3631
3649
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
3632
3650
  return r && i && yt(t, a, i), i;
3633
3651
  };
3634
- let U = class extends y {
3652
+ let W = class extends y {
3635
3653
  constructor() {
3636
3654
  super(...arguments), this.spec = null, this.theme = null;
3637
3655
  }
@@ -3672,7 +3690,7 @@ let U = class extends y {
3672
3690
  return /^(javascript|data|vbscript):/i.test(t) ? "" : e;
3673
3691
  }
3674
3692
  };
3675
- U.styles = [b, w`
3693
+ W.styles = [b, w`
3676
3694
  :host {
3677
3695
  display: block;
3678
3696
  font-family: system-ui, -apple-system, sans-serif;
@@ -3710,15 +3728,15 @@ U.styles = [b, w`
3710
3728
  }
3711
3729
  }
3712
3730
  `];
3713
- ae([
3714
- m({ type: Object })
3715
- ], U.prototype, "spec", 2);
3716
- ae([
3717
- m({ type: String, reflect: !0 })
3718
- ], U.prototype, "theme", 2);
3719
- U = ae([
3731
+ oe([
3732
+ f({ type: Object })
3733
+ ], W.prototype, "spec", 2);
3734
+ oe([
3735
+ f({ type: String, reflect: !0 })
3736
+ ], W.prototype, "theme", 2);
3737
+ W = oe([
3720
3738
  x("u-gallery")
3721
- ], U);
3739
+ ], W);
3722
3740
  var $t = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, J = (e, t, a, r) => {
3723
3741
  for (var i = r > 1 ? void 0 : r ? _t(t, a) : t, s = e.length - 1, n; s >= 0; s--)
3724
3742
  (n = e[s]) && (i = (r ? n(t, a, i) : n(i)) || i);
@@ -3828,13 +3846,13 @@ let P = class extends y {
3828
3846
  }
3829
3847
  const g = !(t === "header" || t === "actions" || t === "divider" || t === "compose") && r.title ? o`<div class="widget-title" part="title">${r.title}</div>` : l;
3830
3848
  if (!!r.options?.card ? c = o`<div class="card-container" part="card">${g}${c}</div>` : g !== l && (c = o`${g}${c}`), d.length > 0) {
3831
- const u = d.map((f) => o`
3849
+ const u = d.map((h) => o`
3832
3850
  <button
3833
- data-style=${f.style ?? "default"}
3834
- ?disabled=${f.disabled}
3835
- @click=${() => this._dispatchAction(r, f)}
3851
+ data-style=${h.style ?? "default"}
3852
+ ?disabled=${h.disabled}
3853
+ @click=${() => this._dispatchAction(r, h)}
3836
3854
  part="action-btn"
3837
- >${f.label}</button>
3855
+ >${h.label}</button>
3838
3856
  `);
3839
3857
  return o`<div part="widget-container">${c}<div class="global-actions" part="actions">${u}</div></div>`;
3840
3858
  }
@@ -4100,7 +4118,7 @@ P.styles = [
4100
4118
  `
4101
4119
  ];
4102
4120
  J([
4103
- m({
4121
+ f({
4104
4122
  type: Object,
4105
4123
  converter: {
4106
4124
  fromAttribute(e) {
@@ -4115,10 +4133,10 @@ J([
4115
4133
  })
4116
4134
  ], P.prototype, "spec", 2);
4117
4135
  J([
4118
- m({ type: String, reflect: !0 })
4136
+ f({ type: String, reflect: !0 })
4119
4137
  ], P.prototype, "theme", 2);
4120
4138
  J([
4121
- m({ type: String, reflect: !0 })
4139
+ f({ type: String, reflect: !0 })
4122
4140
  ], P.prototype, "locale", 2);
4123
4141
  P = J([
4124
4142
  x("u-widget")
@@ -4126,11 +4144,11 @@ P = J([
4126
4144
  export {
4127
4145
  P as UWidget,
4128
4146
  A as formatTemplate,
4129
- pe as formatValue,
4147
+ he as formatValue,
4130
4148
  Ot as getDefaultLocale,
4131
4149
  Pt as getEffectiveLocale,
4132
4150
  be as getFormdownParser,
4133
- ue as getLocaleStrings,
4151
+ me as getLocaleStrings,
4134
4152
  we as infer,
4135
4153
  Dt as isWidgetSpec,
4136
4154
  ye as normalize,