@tempots/beatui 0.58.0 → 0.60.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.
Files changed (75) hide show
  1. package/dist/{2019-B4jrQ2Q8.cjs → 2019-CSG1mHKh.cjs} +1 -1
  2. package/dist/{2019-DH5GYJC9.js → 2019-xRoq64Hq.js} +2 -2
  3. package/dist/{2020-C3vh26yT.js → 2020-BxLJruSu.js} +2 -2
  4. package/dist/{2020-BVrVGeh-.cjs → 2020-CySfMcC9.cjs} +1 -1
  5. package/dist/{ar-x9O6JsRN.cjs → ar-B7Vs1jtG.cjs} +1 -1
  6. package/dist/{ar-CKheF7Rb.js → ar-BOqk-mzn.js} +1 -1
  7. package/dist/auth/index.cjs.js +1 -1
  8. package/dist/auth/index.es.js +4 -4
  9. package/dist/beatui.css +213 -55
  10. package/dist/beatui.tailwind.css +213 -55
  11. package/dist/{de-CqFnIl0Y.js → de-CviZ-p_4.js} +1 -1
  12. package/dist/{de-C0nhZh4a.cjs → de-DNjhUbYu.cjs} +1 -1
  13. package/dist/{es-C3c1-2iA.cjs → es-D82T2KKm.cjs} +1 -1
  14. package/dist/{es-Cv9ZSjqz.js → es-DxuZQTVE.js} +1 -1
  15. package/dist/{fa-CG8B9M9O.js → fa-BBySqLUh.js} +1 -1
  16. package/dist/{fa-BbV4_mYi.cjs → fa-C7eY3MZF.cjs} +1 -1
  17. package/dist/{fr-B2f1Pmal.js → fr-DBCblSme.js} +1 -1
  18. package/dist/{fr-DlFsnCqK.cjs → fr-DlXc2xhl.cjs} +1 -1
  19. package/dist/{he-DwQ2QMJE.cjs → he-1Czj0G0s.cjs} +1 -1
  20. package/dist/{he-BmHa696l.js → he-DUrHwGF6.js} +1 -1
  21. package/dist/{hi-DNII_Adz.js → hi-BdJqIhvL.js} +1 -1
  22. package/dist/{hi-DaHMe_1C.cjs → hi-DyWQTexo.cjs} +1 -1
  23. package/dist/{index-Dd3PocYl.js → index-B6myFAz5.js} +1 -1
  24. package/dist/{index-ZRQP8j2O.cjs → index-BLTlhUPG.cjs} +1 -1
  25. package/dist/{index-DjLKVVL-.cjs → index-CMIeO1pS.cjs} +1 -1
  26. package/dist/{index-Dhaodhgr.cjs → index-Cok4rljj.cjs} +2 -2
  27. package/dist/{index-DCOaDJ8f.js → index-D6_EcuJG.js} +1 -1
  28. package/dist/{index-gZaps7_A.js → index-DGQhsTxm.js} +6 -6
  29. package/dist/{index-COM8WyaG.cjs → index-Duw9TkLf.cjs} +1 -1
  30. package/dist/{index-BYflP18C.js → index-yhjOw19A.js} +3 -3
  31. package/dist/index.cjs.js +2 -2
  32. package/dist/index.es.js +10 -10
  33. package/dist/{it-894w7K0i.js → it-B7HY_G0n.js} +1 -1
  34. package/dist/{it-Cli1u40l.cjs → it-BhqBuhZq.cjs} +1 -1
  35. package/dist/{ja-DY7Zij7O.cjs → ja-Be1SXGQn.cjs} +1 -1
  36. package/dist/{ja-j4AV8eVy.js → ja-DavHeIBC.js} +1 -1
  37. package/dist/json-schema/index.cjs.js +1 -1
  38. package/dist/json-schema/index.es.js +1 -1
  39. package/dist/{ko-CNZqypvW.js → ko-Be3o52et.js} +1 -1
  40. package/dist/{ko-CHlprpVP.cjs → ko-BuyoVlmH.cjs} +1 -1
  41. package/dist/{modal-1Y-q1wDn.js → modal-BT2LwYlK.js} +2 -2
  42. package/dist/{modal-D765-SiT.cjs → modal-DT3cH1Kz.cjs} +1 -1
  43. package/dist/{nl-CzTp9ds0.js → nl-DJIY4R0b.js} +1 -1
  44. package/dist/{nl-CgMv4O0P.cjs → nl-FD8OAOWL.cjs} +1 -1
  45. package/dist/{notice-D8w_39td.cjs → notice-CUTUN2Kh.cjs} +1 -1
  46. package/dist/{notice-DJ-olOQx.js → notice-Cs95CTP3.js} +1 -1
  47. package/dist/{pl-DQid7ctL.js → pl-Bqoq63Fm.js} +1 -1
  48. package/dist/{pl-Cm8Lerxg.cjs → pl-weZLWcSD.cjs} +1 -1
  49. package/dist/prosemirror/index.cjs.js +1 -1
  50. package/dist/prosemirror/index.es.js +1 -1
  51. package/dist/{pt-BAU0nrtN.js → pt-7g4YVboz.js} +1 -1
  52. package/dist/{pt-k6sIkC0v.cjs → pt-BuBrXOmS.cjs} +1 -1
  53. package/dist/{ru-Dioznrt_.cjs → ru-Br9Wedcu.cjs} +1 -1
  54. package/dist/{ru-CtYj3NlJ.js → ru-hvj4lu1_.js} +1 -1
  55. package/dist/{toolbar-BMzapKW0.cjs → toolbar-Bk_vLHOS.cjs} +1 -1
  56. package/dist/{toolbar-Bo4GA6tM.js → toolbar-ReCF2tBa.js} +1 -1
  57. package/dist/{tr-CwCsfbe5.cjs → tr-BSuvz1N5.cjs} +1 -1
  58. package/dist/{tr-wS-zWzvh.js → tr-qxangEut.js} +1 -1
  59. package/dist/{translations-Dm7vjy7D.js → translations-BtsgtW4T.js} +1 -1
  60. package/dist/translations-CGTcEchB.cjs +1 -0
  61. package/dist/{translations-Do71ycSR.js → translations-D5WRSMhS.js} +245 -239
  62. package/dist/{translations-CD_Qi9EQ.cjs → translations-DmVvxPlr.cjs} +1 -1
  63. package/dist/types/components/button/button.d.ts +7 -1
  64. package/dist/types/components/form/input/files-input.d.ts +1 -1
  65. package/dist/{ur-8NSFWrMo.js → ur-CCcFf5OU.js} +1 -1
  66. package/dist/{ur-D3nkqfyQ.cjs → ur-DBg2MZvK.cjs} +1 -1
  67. package/dist/utils-3Mm1sj4Q.cjs +1 -0
  68. package/dist/{utils-DzKhEJ__.js → utils-CutcxfzK.js} +976 -898
  69. package/dist/{vi-CngHpCNM.js → vi-BAHqe-lr.js} +1 -1
  70. package/dist/{vi-BAAJHs3a.cjs → vi-DeH8SXUt.cjs} +1 -1
  71. package/dist/{zh-Bkxc6ZmR.js → zh-B-ZsrhFY.js} +1 -1
  72. package/dist/{zh-CRWrZhUp.cjs → zh-Ceo_KGzC.cjs} +1 -1
  73. package/package.json +1 -1
  74. package/dist/translations-t-neYabN.cjs +0 -1
  75. package/dist/utils-dY__yBXk.cjs +0 -1
@@ -1,27 +1,27 @@
1
- import { Use as H, Value as p, prop as tt, html as I, attr as l, on as C, WithElement as it, Empty as T, aria as z, bind as _t, OnDispose as Z, computedOf as V, style as ft, When as E, NotEmpty as Qt, Fragment as L, ForEach as dt, svg as Tt, svgAttr as ht, emitValue as P, coalesce as Jt, Ensure as Kt, OneOfType as te, Repeat as Pt, signal as Ft, input as Q, emitValueAsNullableDate as ee, emitValueAsNullableDateTime as ne, emitValueAsNumber as X, emit as se, Task as At } from "@tempots/dom";
2
- import { f as re } from "./colors-pQZlNrwM.js";
3
- import { g as ae } from "./timer-DzWb416P.js";
4
- import { ElementRect as jt, AutoSelect as le } from "@tempots/ui";
5
- import { a as W, b as O, f as oe, I as N, C as j, c as ce, d as $t, T as ie, g as ue, L as pe, e as Vt, h as fe, B as gt } from "./translations-Do71ycSR.js";
6
- import { C as yt, m as de, d as me, I as Ht, E as he, P as ge, S as ot, s as be, e as bt, O as rt, f as Bt } from "./notice-DJ-olOQx.js";
7
- function Wt(t) {
1
+ import { Use as P, Value as p, prop as tt, html as y, attr as l, on as I, WithElement as ut, Empty as F, aria as R, bind as ft, computedOf as B, style as ht, OnDispose as X, When as L, NotEmpty as Jt, Fragment as z, ForEach as ot, svg as At, svgAttr as bt, emitValue as j, coalesce as Kt, Ensure as te, OneOfType as ee, Repeat as jt, signal as Vt, input as Q, emitValueAsNullableDate as ne, emitValueAsNullableDateTime as se, emitValueAsNumber as Y, emit as re, Task as Bt } from "@tempots/dom";
2
+ import { f as ae } from "./colors-pQZlNrwM.js";
3
+ import { g as le } from "./timer-DzWb416P.js";
4
+ import { ElementRect as Ht, AutoSelect as oe } from "@tempots/ui";
5
+ import { a as W, b as O, f as Lt, I as U, C as H, c as ce, d as It, T as ie, g as ue, L as pe, e as zt, h as de, B as vt } from "./translations-D5WRSMhS.js";
6
+ import { C as mt, m as fe, d as me, I as Wt, E as he, P as ge, S as ct, s as be, e as xt, O as rt, f as Et } from "./notice-Cs95CTP3.js";
7
+ function Zt(t) {
8
8
  if (typeof t != "string") return !1;
9
9
  const e = t.startsWith("#") ? t.slice(1) : t;
10
10
  return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(e);
11
11
  }
12
- function xe(t) {
12
+ function ve(t) {
13
13
  if (typeof t != "string") return !1;
14
14
  const e = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i, s = t.match(e);
15
15
  if (!s) return !1;
16
16
  const [, n, r, c] = s, a = parseInt(n, 10), i = parseInt(r, 10), o = parseInt(c, 10);
17
17
  return a >= 0 && a <= 255 && i >= 0 && i <= 255 && o >= 0 && o <= 255;
18
18
  }
19
- function ve(t) {
19
+ function xe(t) {
20
20
  if (typeof t != "string") return !1;
21
21
  const e = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0|1|0?\.\d+)\s*\)$/i, s = t.match(e);
22
22
  if (!s) return !1;
23
- const [, n, r, c, a] = s, i = parseInt(n, 10), o = parseInt(r, 10), u = parseInt(c, 10), f = parseFloat(a);
24
- return i >= 0 && i <= 255 && o >= 0 && o <= 255 && u >= 0 && u <= 255 && f >= 0 && f <= 1;
23
+ const [, n, r, c, a] = s, i = parseInt(n, 10), o = parseInt(r, 10), u = parseInt(c, 10), d = parseFloat(a);
24
+ return i >= 0 && i <= 255 && o >= 0 && o <= 255 && u >= 0 && u <= 255 && d >= 0 && d <= 1;
25
25
  }
26
26
  function we(t) {
27
27
  if (typeof t != "string") return !1;
@@ -30,22 +30,22 @@ function we(t) {
30
30
  const [, n, r, c] = s, a = parseInt(n, 10), i = parseInt(r, 10), o = parseInt(c, 10);
31
31
  return a >= 0 && a <= 360 && i >= 0 && i <= 100 && o >= 0 && o <= 100;
32
32
  }
33
- function xn(t) {
34
- return Wt(t) || xe(t) || ve(t) || we(t);
33
+ function vn(t) {
34
+ return Zt(t) || ve(t) || xe(t) || we(t);
35
35
  }
36
36
  function _e(t) {
37
- if (!Wt(t)) return null;
37
+ if (!Zt(t)) return null;
38
38
  let e = t.startsWith("#") ? t.slice(1) : t;
39
39
  return e.length === 3 && (e = e.split("").map((s) => s + s).join("")), `#${e.toLowerCase()}`;
40
40
  }
41
- function kt(t, e, s) {
41
+ function Ct(t, e, s) {
42
42
  const n = (r) => {
43
43
  const c = Math.round(Math.max(0, Math.min(255, r))).toString(16);
44
44
  return c.length === 1 ? "0" + c : c;
45
45
  };
46
46
  return `#${n(t)}${n(e)}${n(s)}`;
47
47
  }
48
- function ct(t) {
48
+ function it(t) {
49
49
  const e = _e(t);
50
50
  if (!e) return null;
51
51
  const s = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
@@ -55,12 +55,12 @@ function ct(t) {
55
55
  b: parseInt(s[3], 16)
56
56
  } : null;
57
57
  }
58
- function vn(t, e) {
59
- const s = ct(t), n = ct(e);
58
+ function xn(t, e) {
59
+ const s = it(t), n = it(e);
60
60
  if (!s || !n) return null;
61
- const r = (u, f, g) => {
62
- const [h, d, x] = [u, f, g].map((w) => (w = w / 255, w <= 0.03928 ? w / 12.92 : Math.pow((w + 0.055) / 1.055, 2.4)));
63
- return 0.2126 * h + 0.7152 * d + 0.0722 * x;
61
+ const r = (u, d, b) => {
62
+ const [g, f, w] = [u, d, b].map((_) => (_ = _ / 255, _ <= 0.03928 ? _ / 12.92 : Math.pow((_ + 0.055) / 1.055, 2.4)));
63
+ return 0.2126 * g + 0.7152 * f + 0.0722 * w;
64
64
  }, c = r(s.r, s.g, s.b), a = r(n.r, n.g, n.b), i = Math.max(c, a), o = Math.min(c, a);
65
65
  return (i + 0.05) / (o + 0.05);
66
66
  }
@@ -72,8 +72,8 @@ function $e(t) {
72
72
  if (s) {
73
73
  const u = s[1];
74
74
  if (u.length === 8) {
75
- const f = parseInt(u.slice(0, 2), 16), g = parseInt(u.slice(2, 4), 16), h = parseInt(u.slice(4, 6), 16), d = parseInt(u.slice(6, 8), 16) / 255;
76
- return [f, g, h, d];
75
+ const d = parseInt(u.slice(0, 2), 16), b = parseInt(u.slice(2, 4), 16), g = parseInt(u.slice(4, 6), 16), f = parseInt(u.slice(6, 8), 16) / 255;
76
+ return [d, b, g, f];
77
77
  }
78
78
  if (u.length === 6)
79
79
  return [
@@ -83,12 +83,12 @@ function $e(t) {
83
83
  1
84
84
  ];
85
85
  if (u.length === 4) {
86
- const f = parseInt(u[0] + u[0], 16), g = parseInt(u[1] + u[1], 16), h = parseInt(u[2] + u[2], 16), d = parseInt(u[3] + u[3], 16) / 255;
87
- return [f, g, h, d];
86
+ const d = parseInt(u[0] + u[0], 16), b = parseInt(u[1] + u[1], 16), g = parseInt(u[2] + u[2], 16), f = parseInt(u[3] + u[3], 16) / 255;
87
+ return [d, b, g, f];
88
88
  }
89
89
  if (u.length === 3) {
90
- const f = parseInt(u[0] + u[0], 16), g = parseInt(u[1] + u[1], 16), h = parseInt(u[2] + u[2], 16);
91
- return [f, g, h, 1];
90
+ const d = parseInt(u[0] + u[0], 16), b = parseInt(u[1] + u[1], 16), g = parseInt(u[2] + u[2], 16);
91
+ return [d, b, g, 1];
92
92
  }
93
93
  }
94
94
  const n = t.match(
@@ -110,24 +110,24 @@ function $e(t) {
110
110
  /^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i
111
111
  );
112
112
  if (c) {
113
- const u = parseFloat(c[1]), f = parseFloat(c[2]), g = parseFloat(c[3]), h = c[4] != null ? parseFloat(c[4]) : 1, [d, x, w] = Zt(u, f / 100, g / 100);
114
- return [d, x, w, h];
113
+ const u = parseFloat(c[1]), d = parseFloat(c[2]), b = parseFloat(c[3]), g = c[4] != null ? parseFloat(c[4]) : 1, [f, w, _] = Yt(u, d / 100, b / 100);
114
+ return [f, w, _, g];
115
115
  }
116
116
  const a = t.match(
117
117
  /^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i
118
118
  );
119
119
  if (a) {
120
- const u = parseFloat(a[1]), f = parseFloat(a[2]) / 100, g = parseFloat(a[3]) / 100, h = a[4] != null ? parseFloat(a[4]) : 1, [d, x, w] = Ie(u, f, g);
121
- return [d, x, w, h];
120
+ const u = parseFloat(a[1]), d = parseFloat(a[2]) / 100, b = parseFloat(a[3]) / 100, g = a[4] != null ? parseFloat(a[4]) : 1, [f, w, _] = Ie(u, d, b);
121
+ return [f, w, _, g];
122
122
  }
123
123
  const i = t.match(
124
124
  /^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i
125
125
  );
126
126
  if (i) {
127
- const u = i[1], f = parseFloat(i[2]), g = parseFloat(i[3]), h = i[4] != null ? parseFloat(i[4]) : 1, d = u.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(u) / 100)) : Math.max(0, Math.min(1, parseFloat(u))), [x, w, _] = Me(d, f, g);
128
- return [x, w, _, h];
127
+ const u = i[1], d = parseFloat(i[2]), b = parseFloat(i[3]), g = i[4] != null ? parseFloat(i[4]) : 1, f = u.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(u) / 100)) : Math.max(0, Math.min(1, parseFloat(u))), [w, _, $] = Me(f, d, b);
128
+ return [w, _, $, g];
129
129
  }
130
- const o = ct(t);
130
+ const o = it(t);
131
131
  return o ? [o.r, o.g, o.b, 1] : [0, 0, 0, 1];
132
132
  }
133
133
  function ye(t, e, s, n) {
@@ -142,7 +142,7 @@ function ke(t) {
142
142
  return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
143
143
  };
144
144
  }
145
- function Zt(t, e, s) {
145
+ function Yt(t, e, s) {
146
146
  t = (t % 360 + 360) % 360;
147
147
  const n = (1 - Math.abs(2 * s - 1)) * e, r = n * (1 - Math.abs(t / 60 % 2 - 1)), c = s - n / 2;
148
148
  let a = 0, i = 0, o = 0;
@@ -156,10 +156,10 @@ function Ie(t, e, s) {
156
156
  t = (t % 360 + 360) % 360;
157
157
  const n = e + s;
158
158
  n > 1 && (e /= n, s /= n);
159
- const [r, c, a] = Zt(t, 1, 0.5).map((g) => g / 255), i = 1 - e - s, o = r * i + e, u = c * i + e, f = a * i + e;
160
- return [Math.round(o * 255), Math.round(u * 255), Math.round(f * 255)];
159
+ const [r, c, a] = Yt(t, 1, 0.5).map((b) => b / 255), i = 1 - e - s, o = r * i + e, u = c * i + e, d = a * i + e;
160
+ return [Math.round(o * 255), Math.round(u * 255), Math.round(d * 255)];
161
161
  }
162
- function It(t, e, s) {
162
+ function Mt(t, e, s) {
163
163
  t /= 255, e /= 255, s /= 255;
164
164
  const n = Math.max(t, e, s), r = Math.min(t, e, s);
165
165
  let c = 0, a = 0;
@@ -180,25 +180,25 @@ function It(t, e, s) {
180
180
  return [Math.round(c), Math.round(a * 100), Math.round(i * 100)];
181
181
  }
182
182
  function Ce(t, e, s) {
183
- const [n] = It(t, e, s), r = t / 255, c = e / 255, a = s / 255, i = Math.min(r, c, a), o = 1 - Math.max(r, c, a);
183
+ const [n] = Mt(t, e, s), r = t / 255, c = e / 255, a = s / 255, i = Math.min(r, c, a), o = 1 - Math.max(r, c, a);
184
184
  return [n, Math.round(i * 100), Math.round(o * 100)];
185
185
  }
186
- function xt(t) {
186
+ function wt(t) {
187
187
  const e = t / 255;
188
188
  return e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
189
189
  }
190
- function vt(t) {
190
+ function _t(t) {
191
191
  const e = t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 0.4166666666666667) - 0.055;
192
192
  return Math.round(Math.max(0, Math.min(1, e)) * 255);
193
193
  }
194
194
  function Me(t, e, s) {
195
- const n = s * Math.PI / 180, r = Math.cos(n) * e, c = Math.sin(n) * e, a = t + 0.3963377774 * r + 0.2158037573 * c, i = t - 0.1055613458 * r - 0.0638541728 * c, o = t - 0.0894841775 * r - 1.291485548 * c, u = a * a * a, f = i * i * i, g = o * o * o, h = 4.0767416621 * u - 3.3077115913 * f + 0.2309699292 * g, d = -1.2684380046 * u + 2.6097574011 * f - 0.3413193965 * g, x = -0.0041960863 * u - 0.7034186147 * f + 1.707614701 * g;
196
- return [vt(h), vt(d), vt(x)];
195
+ const n = s * Math.PI / 180, r = Math.cos(n) * e, c = Math.sin(n) * e, a = t + 0.3963377774 * r + 0.2158037573 * c, i = t - 0.1055613458 * r - 0.0638541728 * c, o = t - 0.0894841775 * r - 1.291485548 * c, u = a * a * a, d = i * i * i, b = o * o * o, g = 4.0767416621 * u - 3.3077115913 * d + 0.2309699292 * b, f = -1.2684380046 * u + 2.6097574011 * d - 0.3413193965 * b, w = -0.0041960863 * u - 0.7034186147 * d + 1.707614701 * b;
196
+ return [_t(g), _t(f), _t(w)];
197
197
  }
198
198
  function De(t, e, s) {
199
- const n = xt(t), r = xt(e), c = xt(s), a = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * c, i = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * c, o = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * c, u = Math.cbrt(a), f = Math.cbrt(i), g = Math.cbrt(o), h = 0.2104542553 * u + 0.793617785 * f - 0.0040720468 * g, d = 1.9779984951 * u - 2.428592205 * f + 0.4505937099 * g, x = 0.0259040371 * u + 0.7827717662 * f - 0.808675766 * g, w = Math.sqrt(d * d + x * x);
200
- let _ = Math.atan2(x, d) * 180 / Math.PI;
201
- return _ < 0 && (_ += 360), [h, w, _];
199
+ const n = wt(t), r = wt(e), c = wt(s), a = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * c, i = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * c, o = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * c, u = Math.cbrt(a), d = Math.cbrt(i), b = Math.cbrt(o), g = 0.2104542553 * u + 0.793617785 * d - 0.0040720468 * b, f = 1.9779984951 * u - 2.428592205 * d + 0.4505937099 * b, w = 0.0259040371 * u + 0.7827717662 * d - 0.808675766 * b, _ = Math.sqrt(f * f + w * w);
200
+ let $ = Math.atan2(w, f) * 180 / Math.PI;
201
+ return $ < 0 && ($ += 360), [g, _, $];
202
202
  }
203
203
  function at(t, e, s, n, r, c) {
204
204
  switch (r) {
@@ -207,17 +207,17 @@ function at(t, e, s, n, r, c) {
207
207
  const a = (o) => o.toString(16).padStart(2, "0"), i = Math.max(0, Math.min(255, Math.round(n * 255)));
208
208
  return `#${a(t)}${a(e)}${a(s)}${a(i)}`;
209
209
  }
210
- return kt(t, e, s);
210
+ return Ct(t, e, s);
211
211
  case "rgb":
212
212
  return `rgb(${t}, ${e}, ${s})`;
213
213
  case "rgba":
214
214
  return `rgba(${t}, ${e}, ${s}, ${Math.round(n * 100) / 100})`;
215
215
  case "hsl": {
216
- const [a, i, o] = It(t, e, s);
216
+ const [a, i, o] = Mt(t, e, s);
217
217
  return `hsl(${a}, ${i}%, ${o}%)`;
218
218
  }
219
219
  case "hsla": {
220
- const [a, i, o] = It(t, e, s);
220
+ const [a, i, o] = Mt(t, e, s);
221
221
  return `hsla(${a}, ${i}%, ${o}%, ${Math.round(n * 100) / 100})`;
222
222
  }
223
223
  case "hwb": {
@@ -225,8 +225,8 @@ function at(t, e, s, n, r, c) {
225
225
  return n < 1 ? `hwb(${a} ${i}% ${o}% / ${Math.round(n * 100) / 100})` : `hwb(${a} ${i}% ${o}%)`;
226
226
  }
227
227
  case "oklch": {
228
- const [a, i, o] = De(t, e, s), u = (Math.round(a * 1e3) / 1e3).toFixed(3), f = (Math.round(i * 1e3) / 1e3).toFixed(3), g = (Math.round(o * 10) / 10).toFixed(1), h = Math.round(n * 100) / 100;
229
- return c || n < 1 ? `oklch(${u} ${f} ${g} / ${h})` : `oklch(${u} ${f} ${g})`;
228
+ const [a, i, o] = De(t, e, s), u = (Math.round(a * 1e3) / 1e3).toFixed(3), d = (Math.round(i * 1e3) / 1e3).toFixed(3), b = (Math.round(o * 10) / 10).toFixed(1), g = Math.round(n * 100) / 100;
229
+ return c || n < 1 ? `oklch(${u} ${d} ${b} / ${g})` : `oklch(${u} ${d} ${b})`;
230
230
  }
231
231
  }
232
232
  }
@@ -247,7 +247,7 @@ const wn = (t) => Te(t).split("_").join(" "), Te = (t) => (t = t.replace(/::/g,
247
247
  "No implementation found for base64 decoding"
248
248
  );
249
249
  };
250
- function Lt({
250
+ function $t({
251
251
  onChange: t,
252
252
  value: e,
253
253
  accept: s = "*/*",
@@ -256,41 +256,41 @@ function Lt({
256
256
  disabled: c = !1,
257
257
  allowMultiple: a
258
258
  }) {
259
- return H(W, (i) => {
260
- const o = p.deriveProp(e ?? []), u = tt(!1), f = (b) => {
261
- b.preventDefault(), b.stopPropagation(), u.value = !0;
262
- }, g = (b) => {
263
- b.preventDefault(), b.stopPropagation(), (!b.currentTarget || !b.currentTarget.contains(b.relatedTarget)) && (u.value = !1);
264
- }, h = (b) => {
265
- b.preventDefault(), b.stopPropagation(), u.value = !1;
266
- const m = Array.from(b.dataTransfer?.files || []);
259
+ return P(W, (i) => {
260
+ const o = p.deriveProp(e ?? []), u = tt(!1), d = (x) => {
261
+ x.preventDefault(), x.stopPropagation(), u.value = !0;
262
+ }, b = (x) => {
263
+ x.preventDefault(), x.stopPropagation(), (!x.currentTarget || !x.currentTarget.contains(x.relatedTarget)) && (u.value = !1);
264
+ }, g = (x) => {
265
+ x.preventDefault(), x.stopPropagation(), u.value = !1;
266
+ const m = Array.from(x.dataTransfer?.files || []);
267
267
  m.length > 0 && (o.value = m, t(m, "dragdrop"));
268
- }, d = (b) => {
269
- p.get(n) && b.currentTarget.querySelector(
268
+ }, f = (x) => {
269
+ p.get(n) && x.currentTarget.querySelector(
270
270
  'input[type="file"]'
271
271
  )?.click();
272
272
  };
273
- let x = null;
274
- const w = () => {
275
- if (x == null) return;
276
- const b = Array.from(x.files ?? []);
277
- b.length > 0 && (o.value = b, t(b, "click")), x.value = "";
278
- }, _ = (b) => {
279
- p.get(n) && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), d(b));
273
+ let w = null;
274
+ const _ = () => {
275
+ if (w == null) return;
276
+ const x = Array.from(w.files ?? []);
277
+ x.length > 0 && (o.value = x, t(x, "click")), w.value = "";
278
+ }, $ = (x) => {
279
+ p.get(n) && (x.key === "Enter" || x.key === " ") && (x.preventDefault(), f(x));
280
280
  };
281
- return I.div(
281
+ return y.div(
282
282
  l.role("button"),
283
283
  l.tabindex(
284
- p.map(n, (b) => b ? 0 : -1)
284
+ p.map(n, (x) => x ? 0 : -1)
285
285
  ),
286
286
  l.style("position: relative;"),
287
- C.dragover(f),
288
- C.dragleave(g),
289
- C.drop(h),
290
- C.click(d),
291
- C.keydown(_),
287
+ I.dragover(d),
288
+ I.dragleave(b),
289
+ I.drop(g),
290
+ I.click(f),
291
+ I.keydown($),
292
292
  // Hidden file input
293
- I.input(
293
+ y.input(
294
294
  l.type("file"),
295
295
  l.disabled(c),
296
296
  l.accept(s),
@@ -298,17 +298,17 @@ function Lt({
298
298
  l.style(
299
299
  "position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
300
300
  ),
301
- C.change(w),
302
- it((b) => (x = b, o.on((m) => {
301
+ I.change(_),
302
+ ut((x) => (w = x, o.on((m) => {
303
303
  const M = globalThis.DataTransfer;
304
304
  if (M != null) {
305
- const k = new M();
306
- m.forEach(($) => k.items.add($)), b.files = k.files;
305
+ const D = new M();
306
+ m.forEach((S) => D.items.add(S)), x.files = D.files;
307
307
  }
308
- }), T))
308
+ }), F))
309
309
  ),
310
310
  // Screen reader instructions
311
- z.label(_t(i.$.dropZoneInstructions)(n)),
311
+ R.label(ft(i.$.dropZoneInstructions)(n)),
312
312
  // Content
313
313
  r({ files: o, clear: () => o.value = [], change: o.set })
314
314
  );
@@ -318,8 +318,8 @@ function Ae(t, e) {
318
318
  return t.length === e.length && t.every((s, n) => s === e[n]);
319
319
  }
320
320
  function Ve(t, e) {
321
- const s = ["bc-segmented-control", `bc-segmented-control--size-${t}`];
322
- return e && s.push("bc-segmented-control--disabled"), s.join(" ");
321
+ const s = ["bc-segmented-input", `bc-segmented-input--size-${t}`];
322
+ return e && s.push("bc-segmented-input--disabled"), s.join(" ");
323
323
  }
324
324
  function $n({
325
325
  options: t,
@@ -328,73 +328,72 @@ function $n({
328
328
  size: n = "md",
329
329
  disabled: r = !1
330
330
  }, ...c) {
331
- const a = re(t).map(([i, o]) => ({
331
+ const a = ae(t).map(([i, o]) => ({
332
332
  key: i,
333
333
  label: o
334
334
  }));
335
- return it(() => {
335
+ return ut(() => {
336
336
  const i = Object.fromEntries(
337
- a.map((u, f) => [u.key, f])
337
+ a.map((u, d) => [u.key, d])
338
338
  ), o = tt(
339
339
  a.map(() => ({ left: 0, width: 0 })),
340
340
  Ae
341
341
  );
342
- return I.div(
343
- Z(o),
342
+ return y.div(
344
343
  l.class(
345
- V(
344
+ B(
346
345
  n,
347
346
  r
348
347
  )(
349
- (u, f) => Ve(u ?? "md", f ?? !1)
348
+ (u, d) => Ve(u ?? "md", d ?? !1)
350
349
  )
351
350
  ),
352
- I.div(
353
- l.class("bc-segmented-control__container"),
354
- I.div(
355
- l.class("bc-segmented-control__indicator"),
356
- ft.width(
357
- V(
351
+ y.div(
352
+ l.class("bc-segmented-input__container"),
353
+ y.div(
354
+ l.class("bc-segmented-input__indicator"),
355
+ ht.width(
356
+ B(
358
357
  e,
359
358
  o
360
- )((u, f) => {
361
- const { width: g } = f[i[u] ?? 0];
362
- return `${g}px`;
359
+ )((u, d) => {
360
+ const { width: b } = d[i[u] ?? 0];
361
+ return `${b}px`;
363
362
  })
364
363
  ),
365
- ft.left(
366
- V(
364
+ ht.left(
365
+ B(
367
366
  e,
368
367
  o
369
- )((u, f) => {
370
- const { left: g } = f[i[u] ?? 0];
371
- return `${g}px`;
368
+ )((u, d) => {
369
+ const { left: b } = d[i[u] ?? 0];
370
+ return `${b}px`;
372
371
  })
373
372
  )
374
373
  ),
375
374
  // clickable buttons
376
- a.map(({ label: u, key: f }, g) => I.button(
375
+ a.map(({ label: u, key: d }, b) => y.button(
377
376
  l.type("button"),
378
- C.click((h) => {
379
- h.preventDefault(), p.get(r) || s?.(f);
377
+ I.click((g) => {
378
+ g.preventDefault(), p.get(r) || s?.(d);
380
379
  }),
381
380
  l.disabled(r),
382
- l.class("bc-segmented-control__segment"),
381
+ l.class("bc-segmented-input__segment"),
383
382
  l.class(
384
- p.map(e, (h) => h === f ? "bc-segmented-control__segment--active" : "bc-segmented-control__segment--inactive")
383
+ p.map(e, (g) => g === d ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
385
384
  ),
386
- jt((h) => {
387
- function d() {
388
- o.update((w) => {
389
- const _ = [...w];
390
- return _[g] = {
391
- width: h.value.width,
392
- left: h.value.localLeft
393
- }, _;
385
+ Ht((g) => {
386
+ function f() {
387
+ o.update((_) => {
388
+ const $ = [..._];
389
+ return $[b] = {
390
+ width: g.value.width,
391
+ left: g.value.localLeft
392
+ }, $;
394
393
  });
395
394
  }
396
- const x = ae(d);
397
- return Z(x, h.on(d));
395
+ const w = le(f);
396
+ return X(w, g.on(f));
398
397
  }),
399
398
  u
400
399
  ))
@@ -411,8 +410,8 @@ function Le(t) {
411
410
  const e = t.type.toLowerCase();
412
411
  return e.startsWith("image/") ? "vscode-icons:file-type-image" : e.startsWith("video/") ? "vscode-icons:file-type-video" : e.startsWith("audio/") ? "vscode-icons:file-type-audio" : e.includes("pdf") ? "vscode-icons:file-type-pdf2" : e.includes("word") || e.includes("document") ? "vscode-icons:file-type-word" : e.includes("excel") || e.includes("spreadsheet") ? "vscode-icons:file-type-excel" : e.includes("powerpoint") || e.includes("presentation") ? "vscode-icons:file-type-powerpoint" : e.includes("zip") || e.includes("archive") ? "vscode-icons:file-type-zip" : e.includes("text") ? "vscode-icons:file-type-text" : e.includes("json") ? "vscode-icons:file-type-json-official" : e.includes("csv") ? "vscode-icons:file-type-csv" : e.includes("xml") ? "vscode-icons:file-type-xml" : e.includes("yaml") ? "vscode-icons:file-type-yaml-official" : "vscode-icons:file-type-binary";
413
412
  }
414
- function Et(t) {
415
- return E(
413
+ function yt(t) {
414
+ return L(
416
415
  t.map(Be),
417
416
  () => {
418
417
  const e = tt(null);
@@ -420,22 +419,22 @@ function Et(t) {
420
419
  e.value && URL.revokeObjectURL(e.value);
421
420
  const n = URL.createObjectURL(s);
422
421
  e.value = n;
423
- }), I.div(
424
- Z(() => {
422
+ }), y.div(
423
+ X(() => {
425
424
  e.value && URL.revokeObjectURL(e.value);
426
425
  }),
427
426
  l.class("bc-file-input__thumbnail-container"),
428
- I.img(
427
+ y.img(
429
428
  l.src(e),
430
429
  l.alt(t.map((s) => s.name)),
431
430
  l.class("bc-file-input__thumbnail")
432
431
  )
433
432
  );
434
433
  },
435
- () => N({ icon: t.map(Le) })
434
+ () => U({ icon: t.map(Le) })
436
435
  );
437
436
  }
438
- const Ee = (t, ...e) => {
437
+ const ze = (t, ...e) => {
439
438
  const {
440
439
  value: s = tt([]),
441
440
  accept: n = "*/*",
@@ -445,194 +444,273 @@ const Ee = (t, ...e) => {
445
444
  onBlur: i,
446
445
  disabled: o,
447
446
  hasError: u,
448
- mode: f = "default",
449
- showFileList: g = !0,
450
- ...h
451
- } = t, d = s, x = p.map(f, (k) => k === "compact"), w = (k) => {
452
- let $ = k;
447
+ mode: d = "default",
448
+ showFileList: b = !0,
449
+ ...g
450
+ } = t, f = s, w = p.map(d, (v) => v === "input"), _ = p.map(d, (v) => v === "compact"), $ = (v) => {
451
+ let h = v;
453
452
  if (r != null) {
454
- const v = p.get(r);
455
- $ = $.slice(0, v);
453
+ const k = p.get(r);
454
+ h = h.slice(0, k);
456
455
  }
457
456
  if (c) {
458
- const v = p.get(c);
459
- $ = $.filter((y) => y.size <= v);
457
+ const k = p.get(c);
458
+ h = h.filter((T) => T.size <= k);
460
459
  }
461
- a?.($);
462
- }, _ = (k) => {
463
- const v = d.value.filter((y, D) => D !== k);
464
- a?.(v);
465
- }, b = () => {
460
+ a?.(h);
461
+ }, x = (v) => {
462
+ const k = f.value.filter((T, A) => A !== v);
463
+ a?.(k);
464
+ }, m = () => {
466
465
  a?.([]);
467
- }, m = ({
468
- files: k,
469
- clear: $,
470
- change: v
471
- }) => H(
466
+ }, M = ({
467
+ files: v,
468
+ clear: h,
469
+ change: k
470
+ }) => P(
472
471
  W,
473
- (y) => I.div(
472
+ (T) => y.div(
474
473
  l.class("bc-file-input__drop-zone"),
475
- I.div(
474
+ y.div(
476
475
  l.class(
477
476
  "bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
478
477
  ),
479
- N({ icon: "mdi:cloud-upload-outline", size: "xl" }),
480
- I.div(
478
+ U({ icon: "mdi:cloud-upload-outline", size: "xl" }),
479
+ y.div(
481
480
  l.class("bc-file-input__drop-zone-text"),
482
- _t(y.$.filesInputInstructions)(
481
+ ft(T.$.filesInputInstructions)(
483
482
  r,
484
483
  c,
485
- y.$.fileSizeUnits.value
484
+ T.$.fileSizeUnits.value
486
485
  )
487
486
  )
488
487
  )
489
488
  )
490
- ), M = ({
491
- files: k
492
- }) => H(
489
+ ), D = ({
490
+ files: v
491
+ }) => P(
493
492
  W,
494
- ($) => I.div(
493
+ (h) => y.div(
494
+ l.class("bc-file-input__compact-drop-zone"),
495
+ L(
496
+ v.map((k) => k.length > 0),
497
+ () => y.div(
498
+ l.class("bc-file-input__compact-file-list"),
499
+ ot(v, (k, T) => {
500
+ const A = T.index;
501
+ return y.div(
502
+ l.class("bc-file-input__compact-file-item"),
503
+ y.div(
504
+ l.class("bc-file-input__compact-file-icon"),
505
+ yt(k)
506
+ ),
507
+ y.div(
508
+ l.class("bc-file-input__compact-file-info"),
509
+ y.div(
510
+ l.class("bc-file-input__compact-file-name"),
511
+ l.title(k.$.name),
512
+ k.$.name
513
+ ),
514
+ y.div(
515
+ l.class("bc-file-input__compact-file-meta"),
516
+ B(
517
+ k.$.size,
518
+ h.$.fileSizeUnits
519
+ )((C, V) => Lt(C, { units: V })),
520
+ " • ",
521
+ B(
522
+ k.$.type,
523
+ h.$.unknownType
524
+ )((C, V) => C || V)
525
+ )
526
+ ),
527
+ mt(
528
+ {
529
+ size: "sm",
530
+ label: h.$.removeFile,
531
+ disabled: o,
532
+ onClick: () => x(A)
533
+ },
534
+ l.class("bc-file-input__compact-remove-button")
535
+ )
536
+ );
537
+ })
538
+ ),
539
+ () => y.div(
540
+ l.class("bc-file-input__compact-placeholder"),
541
+ U({ icon: "mdi:cloud-upload-outline", size: "lg" }),
542
+ y.div(
543
+ l.class("bc-file-input__compact-placeholder-text"),
544
+ ft(h.$.filesInputInstructions)(
545
+ r,
546
+ c,
547
+ h.$.fileSizeUnits.value
548
+ )
549
+ )
550
+ )
551
+ )
552
+ )
553
+ ), S = ({
554
+ files: v
555
+ }) => P(
556
+ W,
557
+ (h) => y.div(
495
558
  l.class("bc-file-input__compact-input"),
496
- E(
497
- k.map((v) => v.length > 0),
498
- () => I.span(
559
+ L(
560
+ v.map((k) => k.length > 0),
561
+ () => y.span(
499
562
  l.class("bc-file-input__compact-value"),
500
- dt(
501
- k,
502
- (v) => I.span(
563
+ ot(
564
+ v,
565
+ (k) => y.span(
503
566
  l.class("bc-file-input__compact-value-item"),
504
- Et(v),
505
- I.span(
567
+ yt(k),
568
+ y.span(
506
569
  l.class("bc-file-input__compact-value-item-name"),
507
- v.$.name
570
+ k.$.name
508
571
  )
509
572
  )
510
573
  )
511
574
  ),
512
- () => I.span(
575
+ () => y.span(
513
576
  l.class("bc-file-input__compact-placeholder"),
514
- N({ icon: "mdi:cloud-upload-outline", size: "md" }),
577
+ U({ icon: "mdi:cloud-upload-outline", size: "md" }),
515
578
  " ",
516
- _t($.$.filesInputInstructions)(
579
+ ft(h.$.filesInputInstructions)(
517
580
  r,
518
581
  c,
519
- $.$.fileSizeUnits.value
582
+ h.$.fileSizeUnits.value
520
583
  )
521
584
  )
522
585
  )
523
586
  )
524
587
  );
525
- return H(
588
+ return P(
526
589
  W,
527
- (k) => O(
590
+ (v) => O(
528
591
  {
529
- baseContainer: p.map(x, ($) => !$),
592
+ baseContainer: p.map(w, (h) => !h),
530
593
  disabled: o,
531
594
  hasError: u,
532
- after: E(
533
- x,
534
- () => E(
535
- d.map(({ length: $ }) => $ > 0),
536
- () => yt(
595
+ after: L(
596
+ w,
597
+ () => L(
598
+ f.map(({ length: h }) => h > 0),
599
+ () => mt(
537
600
  {
538
601
  size: "sm",
539
- label: k.$.clearAllFiles,
602
+ label: v.$.clearAllFiles,
540
603
  disabled: o,
541
- onClick: b
604
+ onClick: m
542
605
  },
543
606
  l.class("bc-file-input__compact-clear")
544
607
  )
545
608
  )
546
609
  ),
547
- ...h,
548
- input: E(
549
- x,
550
- () => I.div(
551
- l.class("bc-file-input bc-file-input--compact"),
552
- Lt({
553
- value: d,
610
+ ...g,
611
+ input: L(
612
+ w,
613
+ () => y.div(
614
+ l.class("bc-file-input bc-file-input--input"),
615
+ $t({
616
+ value: f,
554
617
  accept: n,
555
618
  enableClick: !0,
556
- allowMultiple: p.map(r ?? 1 / 0, ($) => $ > 1),
619
+ allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
557
620
  disabled: o,
558
- onChange: w,
559
- content: M
621
+ onChange: $,
622
+ content: S
560
623
  })
561
624
  ),
562
- () => I.div(
563
- l.class("bc-file-input"),
564
- Lt({
565
- value: d,
566
- accept: n,
567
- enableClick: !0,
568
- allowMultiple: p.map(r ?? 1 / 0, ($) => $ > 1),
569
- disabled: o,
570
- onChange: w,
571
- content: m
572
- }),
573
- E(
574
- g,
575
- () => Qt(
576
- d,
577
- () => L(
578
- I.div(
579
- l.class("bc-file-input__file-list"),
580
- dt(d, ($, v) => {
581
- const y = v.index;
582
- return I.div(
583
- l.class("bc-file-input__file-item"),
584
- I.div(
585
- l.class("bc-file-input__file-icon"),
586
- Et($)
587
- ),
588
- I.div(
589
- l.class("bc-file-input__file-info"),
590
- I.div(
591
- l.class("bc-file-input__file-name"),
592
- l.title($.$.name),
593
- $.$.name
625
+ () => L(
626
+ _,
627
+ () => y.div(
628
+ l.class("bc-file-input bc-file-input--compact"),
629
+ $t({
630
+ value: f,
631
+ accept: n,
632
+ enableClick: !0,
633
+ allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
634
+ disabled: o,
635
+ onChange: $,
636
+ content: D
637
+ })
638
+ ),
639
+ () => y.div(
640
+ l.class("bc-file-input"),
641
+ $t({
642
+ value: f,
643
+ accept: n,
644
+ enableClick: !0,
645
+ allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
646
+ disabled: o,
647
+ onChange: $,
648
+ content: M
649
+ }),
650
+ L(
651
+ b,
652
+ () => Jt(
653
+ f,
654
+ () => z(
655
+ y.div(
656
+ l.class("bc-file-input__file-list"),
657
+ ot(f, (h, k) => {
658
+ const T = k.index;
659
+ return y.div(
660
+ l.class("bc-file-input__file-item"),
661
+ y.div(
662
+ l.class("bc-file-input__file-icon"),
663
+ yt(h)
594
664
  ),
595
- I.div(
596
- l.class("bc-file-input__file-meta"),
597
- V(
598
- $.$.size,
599
- k.$.fileSizeUnits
600
- )(
601
- (D, F) => oe(D, { units: F })
665
+ y.div(
666
+ l.class("bc-file-input__file-info"),
667
+ y.div(
668
+ l.class("bc-file-input__file-name"),
669
+ l.title(h.$.name),
670
+ h.$.name
602
671
  ),
603
- " • ",
604
- V(
605
- $.$.type,
606
- k.$.unknownType
607
- )((D, F) => D || F)
672
+ y.div(
673
+ l.class("bc-file-input__file-meta"),
674
+ B(
675
+ h.$.size,
676
+ v.$.fileSizeUnits
677
+ )(
678
+ (A, C) => Lt(A, { units: C })
679
+ ),
680
+ " • ",
681
+ B(
682
+ h.$.type,
683
+ v.$.unknownType
684
+ )((A, C) => A || C)
685
+ )
686
+ ),
687
+ mt(
688
+ {
689
+ size: "sm",
690
+ label: v.$.removeFile,
691
+ disabled: o,
692
+ onClick: () => x(T)
693
+ },
694
+ l.class("bc-file-input__remove-button")
608
695
  )
696
+ );
697
+ })
698
+ ),
699
+ L(
700
+ f.map(({ length: h }) => h > 1),
701
+ () => y.div(
702
+ l.class(
703
+ "bc-file-input__clear-all-button-container"
609
704
  ),
610
- yt(
611
- {
612
- size: "sm",
613
- label: k.$.removeFile,
614
- disabled: o,
615
- onClick: () => _(y)
616
- },
617
- l.class("bc-file-input__remove-button")
705
+ y.button(
706
+ l.type("button"),
707
+ l.class("bc-file-input__clear-all-button"),
708
+ l.disabled(o),
709
+ v.$.clearAllFiles,
710
+ I.click((h) => {
711
+ h.preventDefault(), h.stopPropagation(), m();
712
+ })
618
713
  )
619
- );
620
- })
621
- ),
622
- E(
623
- d.map(({ length: $ }) => $ > 1),
624
- () => I.div(
625
- l.class(
626
- "bc-file-input__clear-all-button-container"
627
- ),
628
- I.button(
629
- l.type("button"),
630
- l.class("bc-file-input__clear-all-button"),
631
- l.disabled(o),
632
- k.$.clearAllFiles,
633
- C.click(($) => {
634
- $.preventDefault(), $.stopPropagation(), b();
635
- })
636
714
  )
637
715
  )
638
716
  )
@@ -646,7 +724,7 @@ const Ee = (t, ...e) => {
646
724
  )
647
725
  );
648
726
  };
649
- async function Re(t) {
727
+ async function Ee(t) {
650
728
  return new Promise((e, s) => {
651
729
  const n = new FileReader();
652
730
  n.readAsDataURL(t), n.onload = () => {
@@ -655,8 +733,8 @@ async function Re(t) {
655
733
  }, n.onerror = (r) => s(r);
656
734
  });
657
735
  }
658
- function ze(t) {
659
- return Promise.all(t.map(Re));
736
+ function Re(t) {
737
+ return Promise.all(t.map(Ee));
660
738
  }
661
739
  function Ue(t) {
662
740
  if (t.length >= 4) {
@@ -685,20 +763,20 @@ function Oe(t) {
685
763
  onChange: s,
686
764
  onInput: n,
687
765
  ...r
688
- } = t, c = /* @__PURE__ */ new Map(), a = p.toSignal(e).map((f) => f.map((g, h) => {
689
- const d = c.get(g), x = Ne(g ?? ""), w = d?.type || Ue(x), _ = d?.name ?? `file-${h}`, b = x.buffer.slice(
690
- x.byteOffset,
691
- x.byteOffset + x.byteLength
692
- ), m = new Blob([b], { type: w });
693
- return new File([m], _, { type: w });
694
- })), i = (f) => (g) => {
695
- f && ze(g).then((h) => {
696
- for (const [d, x] of h.entries())
697
- c.set(x, { name: g[d].name, type: g[d].type });
698
- f(h);
766
+ } = t, c = /* @__PURE__ */ new Map(), a = p.toSignal(e).map((d) => d.map((b, g) => {
767
+ const f = c.get(b), w = Ne(b ?? ""), _ = f?.type || Ue(w), $ = f?.name ?? `file-${g}`, x = w.buffer.slice(
768
+ w.byteOffset,
769
+ w.byteOffset + w.byteLength
770
+ ), m = new Blob([x], { type: _ });
771
+ return new File([m], $, { type: _ });
772
+ })), i = (d) => (b) => {
773
+ d && Re(b).then((g) => {
774
+ for (const [f, w] of g.entries())
775
+ c.set(w, { name: b[f].name, type: b[f].type });
776
+ d(g);
699
777
  });
700
778
  }, o = i(s), u = i(n);
701
- return Ee({
779
+ return ze({
702
780
  ...r,
703
781
  value: a,
704
782
  onChange: o,
@@ -726,117 +804,117 @@ function yn(t) {
726
804
  }
727
805
  function Pe(t, e) {
728
806
  const [s, n, r] = t, c = s << 16 ^ n << 8 ^ r, a = ke(c), i = 6 + Math.floor(a() * 5), o = 0.18 + a() * 0.06, u = [];
729
- for (let d = 0; d < i; d++) {
730
- const x = d / i * Math.PI * 2, w = e * (1 + (a() * 2 - 1) * o), _ = Math.cos(x) * w, b = Math.sin(x) * w;
731
- u.push({ x: _, y: b });
807
+ for (let f = 0; f < i; f++) {
808
+ const w = f / i * Math.PI * 2, _ = e * (1 + (a() * 2 - 1) * o), $ = Math.cos(w) * _, x = Math.sin(w) * _;
809
+ u.push({ x: $, y: x });
732
810
  }
733
- const f = (u[0].x + u[i - 1].x) / 2, g = (u[0].y + u[i - 1].y) / 2;
734
- let h = `M ${f.toFixed(3)} ${g.toFixed(3)}`;
735
- for (let d = 0; d < i; d++) {
736
- const x = u[d], w = u[(d + 1) % i], _ = (x.x + w.x) / 2, b = (x.y + w.y) / 2;
737
- h += ` Q ${x.x.toFixed(3)} ${x.y.toFixed(3)} ${_.toFixed(3)} ${b.toFixed(3)}`;
811
+ const d = (u[0].x + u[i - 1].x) / 2, b = (u[0].y + u[i - 1].y) / 2;
812
+ let g = `M ${d.toFixed(3)} ${b.toFixed(3)}`;
813
+ for (let f = 0; f < i; f++) {
814
+ const w = u[f], _ = u[(f + 1) % i], $ = (w.x + _.x) / 2, x = (w.y + _.y) / 2;
815
+ g += ` Q ${w.x.toFixed(3)} ${w.y.toFixed(3)} ${$.toFixed(3)} ${x.toFixed(3)}`;
738
816
  }
739
- return h += " Z", h;
817
+ return g += " Z", g;
740
818
  }
741
819
  const kn = (t) => {
742
- const { value: e, onBlur: s, onChange: n, onInput: r, displayValue: c, size: a, withAlpha: i } = t, o = p.map(a ?? 32, (v) => v), u = p.map(e, (v) => $e(v ?? "#000000")), f = p.map(
820
+ const { value: e, onBlur: s, onChange: n, onInput: r, displayValue: c, size: a, withAlpha: i } = t, o = p.map(a ?? 32, (v) => v), u = p.map(e, (v) => $e(v ?? "#000000")), d = p.map(
743
821
  u,
744
- ([v, y, D]) => [v, y, D]
745
- ), g = p.map(u, ([, , , v]) => v), h = tt(p.get(g) ?? 1), d = p.map(i ?? !1, (v) => v), x = p.map(
822
+ ([v, h, k]) => [v, h, k]
823
+ ), b = p.map(u, ([, , , v]) => v), g = tt(p.get(b) ?? 1), f = p.map(i ?? !1, (v) => v), w = p.map(
746
824
  t.colorTextFormat ?? "rgb",
747
825
  (v) => v
748
- ), w = V(
749
- f,
750
- h,
751
- x,
752
- d
826
+ ), _ = B(
827
+ d,
828
+ g,
829
+ w,
830
+ f
753
831
  )(
754
- ([v, y, D], F, A, S) => at(v, y, D, F ?? 1, lt(A, S), S)
755
- ), _ = p.map(
832
+ ([v, h, k], T, A, C) => at(v, h, k, T ?? 1, lt(A, C), C)
833
+ ), $ = p.map(
756
834
  t.colorTextFormat ?? "hex",
757
835
  (v) => v
758
- ), b = p.map(o, (v) => `${-v / 2} ${-v / 2} ${v} ${v}`), m = V(
759
- f,
836
+ ), x = p.map(o, (v) => `${-v / 2} ${-v / 2} ${v} ${v}`), m = B(
837
+ d,
760
838
  o
761
- )((v, y) => Pe(v, y / 2)), M = V(
762
- f,
763
- h,
764
- d
839
+ )((v, h) => Pe(v, h / 2)), M = B(
840
+ d,
841
+ g,
842
+ f
765
843
  )(
766
- ([v, y, D], F, A) => A || F < 1 ? ye(v, y, D, F) : kt(v, y, D)
767
- ), k = I.div(
844
+ ([v, h, k], T, A) => A || T < 1 ? ye(v, h, k, T) : Ct(v, h, k)
845
+ ), D = y.div(
768
846
  l.class("bc-color-swatch-input__control"),
769
847
  l.class(
770
848
  p.map(
771
- d,
849
+ f,
772
850
  (v) => v ? "bc-color-swatch-input__control--alpha" : ""
773
851
  )
774
852
  ),
775
853
  l.style(
776
- V(o)((v) => `min-width:${v + 2}px;height:${v + 2}px`)
854
+ B(o)((v) => `min-width:${v + 2}px;height:${v + 2}px`)
777
855
  ),
778
856
  // The SVG blob preview
779
- Tt.svg(
857
+ At.svg(
780
858
  l.class("bc-color-swatch-input__svg"),
781
- ht.viewBox(b),
782
- Tt.path(ht.d(m), ht.fill(M))
859
+ bt.viewBox(x),
860
+ At.path(bt.d(m), bt.fill(M))
783
861
  ),
784
862
  // Invisible native input overlays the blob for picker and accessibility
785
- I.input(
863
+ y.input(
786
864
  l.type("color"),
787
- j(t),
865
+ H(t),
788
866
  // Native color input needs hex without alpha
789
- l.value(p.map(f, ([v, y, D]) => kt(v, y, D))),
867
+ l.value(p.map(d, ([v, h, k]) => Ct(v, h, k))),
790
868
  l.class(
791
869
  "bc-input bc-color-swatch-input bc-color-swatch-input__native"
792
870
  ),
793
- s != null ? C.blur(s) : T,
794
- n != null ? C.change((v) => {
795
- const y = v.target.value;
871
+ s != null ? I.blur(s) : F,
872
+ n != null ? I.change((v) => {
873
+ const h = v.target.value;
796
874
  if (!n) return;
797
- const { r: D, g: F, b: A } = ct(y) ?? { r: 0, g: 0, b: 0 }, S = p.get(h) ?? 1, B = lt(
798
- p.get(_),
799
- p.get(d)
800
- ), U = at(D, F, A, S, B, p.get(d));
801
- n(U);
802
- }) : T,
803
- r != null ? C.input((v) => {
804
- const y = v.target.value;
875
+ const { r: k, g: T, b: A } = it(h) ?? { r: 0, g: 0, b: 0 }, C = p.get(g) ?? 1, V = lt(
876
+ p.get($),
877
+ p.get(f)
878
+ ), N = at(k, T, A, C, V, p.get(f));
879
+ n(N);
880
+ }) : F,
881
+ r != null ? I.input((v) => {
882
+ const h = v.target.value;
805
883
  if (!r) return;
806
- const { r: D, g: F, b: A } = ct(y) ?? { r: 0, g: 0, b: 0 }, S = p.get(h) ?? 1, B = lt(
807
- p.get(_),
808
- p.get(d)
809
- ), U = at(D, F, A, S, B, p.get(d));
810
- r(U);
811
- }) : T
884
+ const { r: k, g: T, b: A } = it(h) ?? { r: 0, g: 0, b: 0 }, C = p.get(g) ?? 1, V = lt(
885
+ p.get($),
886
+ p.get(f)
887
+ ), N = at(k, T, A, C, V, p.get(f));
888
+ r(N);
889
+ }) : F
812
890
  )
813
- ), $ = E(
814
- d,
815
- () => I.input(
891
+ ), S = L(
892
+ f,
893
+ () => y.input(
816
894
  l.type("range"),
817
895
  l.class("bc-color-swatch-input__alpha"),
818
896
  l.min(0),
819
897
  l.max(1),
820
898
  l.step(0.01),
821
- l.value(p.map(h, (v) => String(v ?? 1))),
899
+ l.value(p.map(g, (v) => String(v ?? 1))),
822
900
  l.disabled(t.disabled),
823
- C.input((v) => {
824
- const y = parseFloat(v.target.value);
825
- h.set(y);
826
- const [D, F, A] = p.get(f), S = lt(
827
- p.get(_),
828
- p.get(d)
829
- ), B = at(D, F, A, y, S, p.get(d));
830
- r?.(B);
901
+ I.input((v) => {
902
+ const h = parseFloat(v.target.value);
903
+ g.set(h);
904
+ const [k, T, A] = p.get(d), C = lt(
905
+ p.get($),
906
+ p.get(f)
907
+ ), V = at(k, T, A, h, C, p.get(f));
908
+ r?.(V);
831
909
  }),
832
- C.change((v) => {
833
- const y = parseFloat(v.target.value);
834
- h.set(y);
835
- const [D, F, A] = p.get(f), S = lt(
836
- p.get(_),
837
- p.get(d)
838
- ), B = at(D, F, A, y, S, p.get(d));
839
- n?.(B);
910
+ I.change((v) => {
911
+ const h = parseFloat(v.target.value);
912
+ g.set(h);
913
+ const [k, T, A] = p.get(d), C = lt(
914
+ p.get($),
915
+ p.get(f)
916
+ ), V = at(k, T, A, h, C, p.get(f));
917
+ n?.(V);
840
918
  })
841
919
  )
842
920
  );
@@ -845,27 +923,27 @@ const kn = (t) => {
845
923
  ...t,
846
924
  // ensure our control does not try to grow
847
925
  growInput: !1,
848
- input: k,
926
+ input: D,
849
927
  // If caller provided an `after`, append RGB before it
850
- after: L(
851
- E(
928
+ after: z(
929
+ L(
852
930
  c ?? !1,
853
- () => I.span(l.class("bc-color-swatch-input__rgb"), w)
931
+ () => y.span(l.class("bc-color-swatch-input__rgb"), _)
854
932
  ),
855
- $,
933
+ S,
856
934
  t.after
857
935
  )
858
936
  });
859
- }, Mt = "$$tts-exp-", je = (t, e) => it((s) => {
860
- const n = `${Mt}${t}`;
861
- return Z(p.on(e, (r) => Reflect.set(s, n, r)));
937
+ }, St = "$$tts-exp-", je = (t, e) => ut((s) => {
938
+ const n = `${St}${t}`;
939
+ return X(p.on(e, (r) => Reflect.set(s, n, r)));
862
940
  }), In = (t, e) => {
863
- const s = `${Mt}${t}`;
941
+ const s = `${St}${t}`;
864
942
  return (n) => {
865
943
  e(Reflect.get(n.target, s));
866
944
  };
867
945
  }, He = (t, e) => {
868
- const s = `${Mt}${t}`;
946
+ const s = `${St}${t}`;
869
947
  return (n) => {
870
948
  const r = n.target, c = r.selectedIndex, a = r.options[c];
871
949
  e(Reflect.get(a, s));
@@ -876,9 +954,9 @@ function We(t, e, s) {
876
954
  return t !== "default" && n.push(`bc-card--${t}`), e !== "md" && n.push(`bc-card--padding-${e}`), s !== "lg" && n.push(`bc-card--rounded-${s}`), n.join(" ");
877
955
  }
878
956
  function Cn({ variant: t = "default", size: e = "md", roundedness: s = "lg" } = {}, ...n) {
879
- return I.div(
957
+ return y.div(
880
958
  l.class(
881
- V(
959
+ B(
882
960
  t,
883
961
  e,
884
962
  s
@@ -893,8 +971,8 @@ function Cn({ variant: t = "default", size: e = "md", roundedness: s = "lg" } =
893
971
  ...n
894
972
  );
895
973
  }
896
- function pt(...t) {
897
- return I.div(l.class("bc-group"), ...t);
974
+ function dt(...t) {
975
+ return y.div(l.class("bc-group"), ...t);
898
976
  }
899
977
  const Mn = ({
900
978
  startEditing: t,
@@ -904,7 +982,7 @@ const Mn = ({
904
982
  disabled: r
905
983
  }) => {
906
984
  const c = p.deriveProp(t ?? !1), a = tt(!1), i = p.map(r ?? !1, (o) => o);
907
- return I.div(
985
+ return y.div(
908
986
  l.class("bc-editable-text"),
909
987
  l.class(
910
988
  p.map(
@@ -912,19 +990,19 @@ const Mn = ({
912
990
  (o) => o ? "bc-editable-text--disabled" : ""
913
991
  )
914
992
  ),
915
- z.disabled(i),
916
- E(
993
+ R.disabled(i),
994
+ L(
917
995
  c,
918
- () => I.input(
996
+ () => y.input(
919
997
  l.placeholder(n),
920
998
  l.value(e),
921
999
  l.class("bc-editable-text__input"),
922
- le(),
923
- C.keydown((o) => {
1000
+ oe(),
1001
+ I.keydown((o) => {
924
1002
  o.key === "Enter" ? c.set(!1) : o.key === "Escape" && (a.set(!0), c.set(!1));
925
1003
  }),
926
- C.blur(
927
- P((o) => {
1004
+ I.blur(
1005
+ j((o) => {
928
1006
  if (c.set(!1), a.value) {
929
1007
  a.set(!1);
930
1008
  return;
@@ -933,58 +1011,58 @@ const Mn = ({
933
1011
  })
934
1012
  )
935
1013
  ),
936
- () => I.span(
937
- C.click(() => {
1014
+ () => y.span(
1015
+ I.click(() => {
938
1016
  p.get(i) || c.set(!0);
939
1017
  }),
940
1018
  l.class("bc-editable-text__display"),
941
- E(
1019
+ L(
942
1020
  p.map(e, (o) => o != null && o.trim() !== ""),
943
- () => I.span(l.class("bc-editable-text__text"), e),
944
- () => I.span(
1021
+ () => y.span(l.class("bc-editable-text__text"), e),
1022
+ () => y.span(
945
1023
  l.class("bc-editable-text__placeholder"),
946
1024
  n
947
1025
  )
948
1026
  ),
949
- E(
1027
+ L(
950
1028
  p.map(i, (o) => !o),
951
- () => I.button(
1029
+ () => y.button(
952
1030
  l.type("button"),
953
1031
  l.class("bc-editable-text__edit-button"),
954
- H(W, (o) => z.label(o.$.editLabel)),
955
- C.click(() => c.set(!0)),
956
- N({ icon: "line-md/pencil", color: "neutral" })
1032
+ P(W, (o) => R.label(o.$.editLabel)),
1033
+ I.click(() => c.set(!0)),
1034
+ U({ icon: "line-md/pencil", color: "neutral" })
957
1035
  )
958
1036
  )
959
1037
  )
960
1038
  )
961
1039
  );
962
- }, Yt = (t, e, s) => Kt(
1040
+ }, Xt = (t, e, s) => te(
963
1041
  t,
964
- (n) => te(n, {
1042
+ (n) => ee(n, {
965
1043
  value: (r) => {
966
- const c = V(
1044
+ const c = B(
967
1045
  r,
968
1046
  s
969
1047
  )((a, i) => e(a.value, i));
970
- return I.option(
1048
+ return y.option(
971
1049
  l.selected(c),
972
1050
  je("value", r.$.value),
973
1051
  r.$.label
974
1052
  );
975
1053
  },
976
- group: (r) => I.optgroup(
1054
+ group: (r) => y.optgroup(
977
1055
  l.label(r.$.group),
978
- dt(
1056
+ ot(
979
1057
  r.$.options,
980
- (c) => Yt(
1058
+ (c) => Xt(
981
1059
  c,
982
1060
  e,
983
1061
  s
984
1062
  )
985
1063
  )
986
1064
  ),
987
- break: () => I.hr()
1065
+ break: () => y.hr()
988
1066
  })
989
1067
  ), Ze = (t) => {
990
1068
  const {
@@ -993,14 +1071,14 @@ const Mn = ({
993
1071
  onChange: n,
994
1072
  options: r,
995
1073
  unselectedLabel: c,
996
- equality: a = (u, f) => u === f,
1074
+ equality: a = (u, d) => u === d,
997
1075
  after: i
998
1076
  } = t;
999
1077
  let o;
1000
1078
  return O(
1001
1079
  {
1002
1080
  ...t,
1003
- after: L(
1081
+ after: z(
1004
1082
  ce({
1005
1083
  icon: "ph:caret-down-bold",
1006
1084
  color: "neutral",
@@ -1008,30 +1086,30 @@ const Mn = ({
1008
1086
  }),
1009
1087
  i
1010
1088
  ),
1011
- input: I.select(
1012
- it((u) => {
1089
+ input: y.select(
1090
+ ut((u) => {
1013
1091
  o = u;
1014
- const f = new MutationObserver((g) => {
1015
- const { removedNodes: h } = g[0];
1016
- h.length > 0 && (o.selectedIndex = 0);
1092
+ const d = new MutationObserver((b) => {
1093
+ const { removedNodes: g } = b[0];
1094
+ g.length > 0 && (o.selectedIndex = 0);
1017
1095
  });
1018
- return f.observe(u, { childList: !0 }), Z(() => f.disconnect());
1096
+ return d.observe(u, { childList: !0 }), X(() => d.disconnect());
1019
1097
  }),
1020
- j(t),
1098
+ H(t),
1021
1099
  l.class("bc-native-select bc-input"),
1022
- H(
1100
+ P(
1023
1101
  W,
1024
- (u) => I.option(
1102
+ (u) => y.option(
1025
1103
  l.hidden("hidden"),
1026
- Jt(c, u.$.selectOne)
1104
+ Kt(c, u.$.selectOne)
1027
1105
  )
1028
1106
  ),
1029
- dt(r, (u) => Yt(u, a, e)),
1030
- s != null ? C.blur(s) : T,
1031
- n != null ? C.change(He("value", (u) => n(u))) : T
1107
+ ot(r, (u) => Xt(u, a, e)),
1108
+ s != null ? I.blur(s) : F,
1109
+ n != null ? I.change(He("value", (u) => n(u))) : F
1032
1110
  )
1033
1111
  },
1034
- C.click(() => {
1112
+ I.click(() => {
1035
1113
  o?.focus(), typeof o?.showPicker == "function" && o.showPicker();
1036
1114
  })
1037
1115
  );
@@ -1042,24 +1120,24 @@ function Ye(t) {
1042
1120
  ...r,
1043
1121
  value: e.signal,
1044
1122
  onChange: me(e, s),
1045
- onBlur: de(e, n)
1123
+ onBlur: fe(e, n)
1046
1124
  });
1047
1125
  }
1048
1126
  function Dn(t) {
1049
- return Ht({
1127
+ return Wt({
1050
1128
  ...t,
1051
1129
  content: Ye(t)
1052
1130
  });
1053
1131
  }
1054
1132
  function Xe(t, e, s) {
1055
1133
  const n = t.length.map((r) => r);
1056
- return L(
1057
- Pt(
1134
+ return z(
1135
+ jt(
1058
1136
  n,
1059
1137
  (r) => {
1060
1138
  const c = t.item(r.index), a = [];
1061
- return L(
1062
- Z(() => {
1139
+ return z(
1140
+ X(() => {
1063
1141
  a.forEach((i) => i());
1064
1142
  }),
1065
1143
  e({
@@ -1088,7 +1166,7 @@ function Xe(t, e, s) {
1088
1166
  const o = (() => {
1089
1167
  switch (i) {
1090
1168
  case "up":
1091
- return Ft(r.index > 0);
1169
+ return Vt(r.index > 0);
1092
1170
  case "down":
1093
1171
  return t.length.map((u) => r.index < u - 1);
1094
1172
  }
@@ -1099,7 +1177,7 @@ function Xe(t, e, s) {
1099
1177
  const o = (() => {
1100
1178
  switch (i) {
1101
1179
  case "up":
1102
- return Ft(r.index === 0);
1180
+ return Vt(r.index === 0);
1103
1181
  case "down":
1104
1182
  return t.length.map((u) => r.index === u - 1);
1105
1183
  }
@@ -1118,7 +1196,7 @@ const Rt = {
1118
1196
  A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
1119
1197
  "*": { pattern: /^.$/ }
1120
1198
  }, qe = (t) => t instanceof RegExp;
1121
- function Xt(t, e, s) {
1199
+ function qt(t, e, s) {
1122
1200
  if (t == null) return [];
1123
1201
  const n = s ? { ...Rt, ...e } : e ?? Rt, r = (a, i) => {
1124
1202
  const o = n[i];
@@ -1151,64 +1229,64 @@ function Ge(t, e) {
1151
1229
  }
1152
1230
  };
1153
1231
  }
1154
- function zt(t, e, s, n, r, c) {
1232
+ function Ut(t, e, s, n, r, c) {
1155
1233
  const a = {
1156
1234
  raw: t,
1157
1235
  previousConformed: e,
1158
1236
  cursor: r ?? t.length,
1159
1237
  completed: !1
1160
- }, i = n.definitions ?? {}, o = typeof s == "function" ? s(t, a) : s, u = Xt(
1238
+ }, i = n.definitions ?? {}, o = typeof s == "function" ? s(t, a) : s, u = qt(
1161
1239
  o,
1162
1240
  i,
1163
1241
  n.useDefaultDefinitions ?? !0
1164
- ), f = Ge(n.allowMode, n.allow), g = /* @__PURE__ */ new Set();
1165
- for (const S of u) S.type === "literal" && g.add(S.char);
1166
- if (n.prefix) for (const S of n.prefix) g.add(S);
1167
- if (n.suffix) for (const S of n.suffix) g.add(S);
1168
- const h = Array.from(t).filter((S) => f(S) && !g.has(S));
1169
- if (h.length === 0) return { value: "", cursor: 0, completed: !1 };
1170
- const d = [], x = [];
1171
- let w = 0, _ = 0, b = 0, m = -1;
1172
- for (const S of u) {
1173
- if (S.type === "literal") {
1174
- d.push(S.char), x.push({ kind: "literal", filled: !0 });
1242
+ ), d = Ge(n.allowMode, n.allow), b = /* @__PURE__ */ new Set();
1243
+ for (const C of u) C.type === "literal" && b.add(C.char);
1244
+ if (n.prefix) for (const C of n.prefix) b.add(C);
1245
+ if (n.suffix) for (const C of n.suffix) b.add(C);
1246
+ const g = Array.from(t).filter((C) => d(C) && !b.has(C));
1247
+ if (g.length === 0) return { value: "", cursor: 0, completed: !1 };
1248
+ const f = [], w = [];
1249
+ let _ = 0, $ = 0, x = 0, m = -1;
1250
+ for (const C of u) {
1251
+ if (C.type === "literal") {
1252
+ f.push(C.char), w.push({ kind: "literal", filled: !0 });
1175
1253
  continue;
1176
1254
  }
1177
- _ += S.optional ? 0 : 1;
1178
- const B = h[w];
1179
- if (B == null)
1255
+ $ += C.optional ? 0 : 1;
1256
+ const V = g[_];
1257
+ if (V == null)
1180
1258
  break;
1181
- if (S.type === "any") {
1182
- b++, d.push(S.transform ? S.transform(B) : B), x.push({ kind: "slot", filled: !0 }), m = x.length - 1, w++;
1259
+ if (C.type === "any") {
1260
+ x++, f.push(C.transform ? C.transform(V) : V), w.push({ kind: "slot", filled: !0 }), m = w.length - 1, _++;
1183
1261
  continue;
1184
1262
  }
1185
- if (S.type === "pattern")
1186
- if (S.pattern.test(B)) {
1187
- b++;
1188
- const U = S.transform ? S.transform(B) : B;
1189
- d.push(U), x.push({ kind: "slot", filled: !0 }), m = x.length - 1, w++;
1263
+ if (C.type === "pattern")
1264
+ if (C.pattern.test(V)) {
1265
+ x++;
1266
+ const N = C.transform ? C.transform(V) : V;
1267
+ f.push(N), w.push({ kind: "slot", filled: !0 }), m = w.length - 1, _++;
1190
1268
  } else {
1191
- w++;
1269
+ _++;
1192
1270
  continue;
1193
1271
  }
1194
1272
  }
1195
- const M = d.join(""), k = (n.prefix ?? "") + M + (n.suffix ?? "");
1273
+ const M = f.join(""), D = (n.prefix ?? "") + M + (n.suffix ?? "");
1196
1274
  let v = (n.prefix ?? "").length;
1197
1275
  if (m >= 0) {
1198
- let S = m + 1;
1276
+ let C = m + 1;
1199
1277
  if ((c?.policy ?? "smart") !== "sticky")
1200
- for (; S < x.length && x[S].kind === "literal"; ) S++;
1201
- v += S;
1278
+ for (; C < w.length && w[C].kind === "literal"; ) C++;
1279
+ v += C;
1202
1280
  }
1203
- const y = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= b : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(k) : _ > 0 && b >= _, D = n.pipe?.(k, { ...a, completed: y });
1204
- let F, A = v;
1205
- return D === !1 ? (F = e, A = e.length) : typeof D == "string" ? (F = D, A = D.length) : typeof D == "object" && D ? (F = D.value, A = D.cursor ?? D.value.length) : F = k, { value: F, cursor: A, completed: y };
1281
+ const h = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= x : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(D) : $ > 0 && x >= $, k = n.pipe?.(D, { ...a, completed: h });
1282
+ let T, A = v;
1283
+ return k === !1 ? (T = e, A = e.length) : typeof k == "string" ? (T = k, A = k.length) : typeof k == "object" && k ? (T = k.value, A = k.cursor ?? k.value.length) : T = D, { value: T, cursor: A, completed: h };
1206
1284
  }
1207
1285
  function Qe(t, e) {
1208
1286
  const s = e?.strategy ?? "none";
1209
1287
  return s === "custom" && e?.unmask ? e.unmask(t) : s === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
1210
1288
  }
1211
- const qt = (t) => {
1289
+ const Gt = (t) => {
1212
1290
  const {
1213
1291
  value: e,
1214
1292
  onBlur: s,
@@ -1219,141 +1297,141 @@ const qt = (t) => {
1219
1297
  mask: i,
1220
1298
  definitions: o,
1221
1299
  useDefaultDefinitions: u,
1222
- extraLiterals: f,
1223
- prefix: g,
1224
- suffix: h,
1225
- autofix: d,
1226
- pipe: x,
1227
- completion: w,
1228
- unmask: _,
1229
- allowMode: b,
1300
+ extraLiterals: d,
1301
+ prefix: b,
1302
+ suffix: g,
1303
+ autofix: f,
1304
+ pipe: w,
1305
+ completion: _,
1306
+ unmask: $,
1307
+ allowMode: x,
1230
1308
  allow: m,
1231
1309
  placeholder: M,
1232
- placeholderOptions: k
1233
- } = t, $ = V(
1310
+ placeholderOptions: D
1311
+ } = t, S = B(
1234
1312
  e,
1235
1313
  i,
1236
1314
  o,
1237
1315
  u,
1238
- f,
1239
- g,
1240
- h,
1241
1316
  d,
1242
- w,
1243
- _,
1244
1317
  b,
1318
+ g,
1319
+ f,
1320
+ _,
1321
+ $,
1322
+ x,
1245
1323
  M,
1246
- k
1247
- )((y, D, F, A, S, B, U, nt, st, K, q, ut, Y) => D ? zt(y ?? "", "", D, {
1248
- definitions: F ?? {},
1324
+ D
1325
+ )((h, k, T, A, C, V, N, nt, st, K, q, pt, Z) => k ? Ut(h ?? "", "", k, {
1326
+ definitions: T ?? {},
1249
1327
  useDefaultDefinitions: A ?? !0,
1250
- extraLiterals: S ?? [],
1328
+ extraLiterals: C ?? [],
1251
1329
  autofix: nt ?? "none",
1252
1330
  completion: st ?? { mode: "mask" },
1253
- pipe: x ?? ((R) => R),
1331
+ pipe: w ?? ((E) => E),
1254
1332
  unmask: K ?? { strategy: "none" },
1255
1333
  allowMode: q ?? "all",
1256
1334
  allow: m,
1257
- prefix: B,
1258
- suffix: U
1259
- }).value : y ?? ""), v = (y, D) => {
1260
- const F = y.value ?? "", A = p.get(e) ?? "", S = i != null ? p.get(i) : null, B = o != null ? p.get(o) : void 0, U = u != null ? p.get(u) : void 0, nt = f != null ? p.get(f) : void 0, st = d != null ? p.get(d) : void 0, K = w != null ? p.get(w) : void 0, q = _ != null ? p.get(_) : void 0, ut = b != null ? p.get(b) : void 0, Y = g != null ? p.get(g) : void 0, R = h != null ? p.get(h) : void 0, {
1335
+ prefix: V,
1336
+ suffix: N
1337
+ }).value : h ?? ""), v = (h, k) => {
1338
+ const T = h.value ?? "", A = p.get(e) ?? "", C = i != null ? p.get(i) : null, V = o != null ? p.get(o) : void 0, N = u != null ? p.get(u) : void 0, nt = d != null ? p.get(d) : void 0, st = f != null ? p.get(f) : void 0, K = _ != null ? p.get(_) : void 0, q = $ != null ? p.get($) : void 0, pt = x != null ? p.get(x) : void 0, Z = b != null ? p.get(b) : void 0, E = g != null ? p.get(g) : void 0, {
1261
1339
  value: G,
1262
- cursor: mt,
1263
- completed: Dt
1264
- } = S ? zt(
1265
- F,
1340
+ cursor: gt,
1341
+ completed: Tt
1342
+ } = C ? Ut(
1343
+ T,
1266
1344
  A,
1267
- S,
1345
+ C,
1268
1346
  {
1269
- definitions: B ?? {},
1270
- useDefaultDefinitions: U ?? !0,
1347
+ definitions: V ?? {},
1348
+ useDefaultDefinitions: N ?? !0,
1271
1349
  extraLiterals: nt ?? [],
1272
1350
  autofix: st ?? "none",
1273
1351
  completion: K ?? { mode: "mask" },
1274
- pipe: x ?? ((Gt) => Gt),
1352
+ pipe: w ?? ((Qt) => Qt),
1275
1353
  unmask: q ?? { strategy: "none" },
1276
- allowMode: ut ?? "all",
1354
+ allowMode: pt ?? "all",
1277
1355
  allow: m,
1278
- prefix: Y,
1279
- suffix: R
1356
+ prefix: Z,
1357
+ suffix: E
1280
1358
  },
1281
- y.selectionStart ?? F.length,
1359
+ h.selectionStart ?? T.length,
1282
1360
  t.cursor ? p.get(t.cursor) : void 0
1283
- ) : { value: F, cursor: F.length, completed: !0 };
1284
- if (G !== F) {
1285
- y.value = G;
1361
+ ) : { value: T, cursor: T.length, completed: !0 };
1362
+ if (G !== T) {
1363
+ h.value = G;
1286
1364
  try {
1287
- y.setSelectionRange(mt, mt);
1365
+ h.setSelectionRange(gt, gt);
1288
1366
  } catch {
1289
1367
  }
1290
1368
  }
1291
- const St = Qe(G, q);
1369
+ const Ft = Qe(G, q);
1292
1370
  c?.({
1293
- raw: St,
1371
+ raw: Ft,
1294
1372
  conformed: G,
1295
- completed: Dt,
1296
- cursor: mt
1297
- }), D === "input" ? r?.(G) : (n?.(G), Dt && a?.({ raw: St, conformed: G }));
1373
+ completed: Tt,
1374
+ cursor: gt
1375
+ }), k === "input" ? r?.(G) : (n?.(G), Tt && a?.({ raw: Ft, conformed: G }));
1298
1376
  };
1299
- return L(
1377
+ return z(
1300
1378
  O({
1301
1379
  ...t,
1302
1380
  input: Q.text(
1303
- j(t),
1304
- l.value($),
1381
+ H(t),
1382
+ l.value(S),
1305
1383
  l.class("bc-input"),
1306
- s != null ? C.blur(s) : T,
1307
- it(
1308
- (y) => y instanceof HTMLInputElement ? L(
1309
- C.input(() => v(y, "input")),
1310
- C.change(() => v(y, "change")),
1311
- C.keydown((D) => {
1312
- if (D.key !== "Backspace" || !(t.cursor ? p.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1313
- const A = y.selectionStart ?? 0, S = y.selectionEnd ?? A;
1314
- if (A !== S || A <= 0) return;
1315
- const B = y.value ?? "", U = i != null ? p.get(i) : null;
1316
- if (!U) return;
1317
- const nt = o != null ? p.get(o) : void 0, st = u != null ? p.get(u) : !0, K = g != null ? p.get(g) : void 0, q = h != null ? p.get(h) : void 0, ut = Xt(
1318
- typeof U == "function" ? U(B, {
1319
- raw: B,
1320
- previousConformed: B,
1384
+ s != null ? I.blur(s) : F,
1385
+ ut(
1386
+ (h) => h instanceof HTMLInputElement ? z(
1387
+ I.input(() => v(h, "input")),
1388
+ I.change(() => v(h, "change")),
1389
+ I.keydown((k) => {
1390
+ if (k.key !== "Backspace" || !(t.cursor ? p.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1391
+ const A = h.selectionStart ?? 0, C = h.selectionEnd ?? A;
1392
+ if (A !== C || A <= 0) return;
1393
+ const V = h.value ?? "", N = i != null ? p.get(i) : null;
1394
+ if (!N) return;
1395
+ const nt = o != null ? p.get(o) : void 0, st = u != null ? p.get(u) : !0, K = b != null ? p.get(b) : void 0, q = g != null ? p.get(g) : void 0, pt = qt(
1396
+ typeof N == "function" ? N(V, {
1397
+ raw: V,
1398
+ previousConformed: V,
1321
1399
  cursor: A,
1322
1400
  completed: !1
1323
- }) : U,
1401
+ }) : N,
1324
1402
  nt ?? {},
1325
1403
  st ?? !0
1326
- ), Y = /* @__PURE__ */ new Set();
1327
- for (const R of ut)
1328
- R.type === "literal" && Y.add(R.char);
1329
- if (K) for (const R of K) Y.add(R);
1330
- if (q) for (const R of q) Y.add(R);
1331
- if (Y.has(B[A - 1])) {
1332
- let R = A - 1;
1333
- for (; R >= 0 && Y.has(B[R]); ) R--;
1334
- R >= 0 && (D.preventDefault(), D.stopPropagation(), y.value = B.slice(0, R) + B.slice(R + 1), v(y, "input"));
1404
+ ), Z = /* @__PURE__ */ new Set();
1405
+ for (const E of pt)
1406
+ E.type === "literal" && Z.add(E.char);
1407
+ if (K) for (const E of K) Z.add(E);
1408
+ if (q) for (const E of q) Z.add(E);
1409
+ if (Z.has(V[A - 1])) {
1410
+ let E = A - 1;
1411
+ for (; E >= 0 && Z.has(V[E]); ) E--;
1412
+ E >= 0 && (k.preventDefault(), k.stopPropagation(), h.value = V.slice(0, E) + V.slice(E + 1), v(h, "input"));
1335
1413
  }
1336
1414
  })
1337
- ) : T
1415
+ ) : F
1338
1416
  )
1339
1417
  )
1340
1418
  })
1341
1419
  );
1342
1420
  };
1343
1421
  function J(t, e, s) {
1344
- const n = p.map(t, (c) => c != null), r = $t.clearValue;
1345
- return L(
1346
- Z(() => p.dispose(n)),
1347
- E(
1422
+ const n = p.map(t, (c) => c != null), r = It.clearValue;
1423
+ return z(
1424
+ X(() => p.dispose(n)),
1425
+ L(
1348
1426
  n,
1349
- () => I.button(
1427
+ () => y.button(
1350
1428
  l.type("button"),
1351
1429
  l.class("bc-input-container__reset"),
1352
- z.label(r),
1430
+ R.label(r),
1353
1431
  l.title(r),
1354
1432
  l.disabled(e ?? !1),
1355
- N({ icon: "mdi:close", size: "sm" }),
1356
- C.click((c) => {
1433
+ U({ icon: "mdi:close", size: "sm" }),
1434
+ I.click((c) => {
1357
1435
  c.preventDefault(), c.stopPropagation(), s?.(null);
1358
1436
  })
1359
1437
  )
@@ -1365,13 +1443,13 @@ const Sn = (t) => {
1365
1443
  return O({
1366
1444
  ...t,
1367
1445
  input: Q.date(
1368
- j(t),
1446
+ H(t),
1369
1447
  l.valueAsDate(e),
1370
1448
  l.class("bc-input"),
1371
- s != null ? C.blur(P(s)) : T,
1372
- n != null ? C.change(ee(n)) : T
1449
+ s != null ? I.blur(j(s)) : F,
1450
+ n != null ? I.change(ne(n)) : F
1373
1451
  ),
1374
- after: r != null ? L(a, r) : a
1452
+ after: r != null ? z(a, r) : a
1375
1453
  });
1376
1454
  }, Je = (t) => {
1377
1455
  const e = t.getFullYear(), s = t.getMonth() + 1, n = t.getDate(), r = t.getHours(), c = t.getMinutes(), a = t.getSeconds();
@@ -1381,15 +1459,15 @@ const Sn = (t) => {
1381
1459
  return O({
1382
1460
  ...t,
1383
1461
  input: Q["datetime-local"](
1384
- j(t),
1462
+ H(t),
1385
1463
  l.value(p.map(a, (o) => o ?? null)),
1386
1464
  l.class("bc-input"),
1387
- s != null ? C.blur(P(s)) : T,
1388
- n != null ? C.change(ne(n)) : T
1465
+ s != null ? I.blur(j(s)) : F,
1466
+ n != null ? I.change(se(n)) : F
1389
1467
  ),
1390
- after: r != null ? L(i, r) : i
1468
+ after: r != null ? z(i, r) : i
1391
1469
  });
1392
- }, Ut = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ke = (t) => t ?? "";
1470
+ }, Nt = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ke = (t) => t ?? "";
1393
1471
  function et(t) {
1394
1472
  return (e) => {
1395
1473
  const { value: s, onBlur: n, onChange: r, onInput: c, after: a, disabled: i, ...o } = e, u = J(s, i, r);
@@ -1397,10 +1475,10 @@ function et(t) {
1397
1475
  ...o,
1398
1476
  disabled: i,
1399
1477
  value: p.map(s, Ke),
1400
- onChange: r != null ? (f) => r(Ut(f)) : void 0,
1401
- onInput: c != null ? (f) => c(Ut(f)) : void 0,
1478
+ onChange: r != null ? (d) => r(Nt(d)) : void 0,
1479
+ onInput: c != null ? (d) => c(Nt(d)) : void 0,
1402
1480
  onBlur: n,
1403
- after: a != null ? L(u, a) : u
1481
+ after: a != null ? z(u, a) : u
1404
1482
  });
1405
1483
  };
1406
1484
  }
@@ -1409,225 +1487,225 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1409
1487
  return O({
1410
1488
  baseContainer: !0,
1411
1489
  ...t,
1412
- input: I.textarea(
1490
+ input: y.textarea(
1413
1491
  l.class(
1414
- V(t.size ?? "md")(
1492
+ B(t.size ?? "md")(
1415
1493
  (a) => ue(
1416
1494
  !1,
1417
1495
  a ?? "md"
1418
1496
  )
1419
1497
  )
1420
1498
  ),
1421
- j(t),
1499
+ H(t),
1422
1500
  l.rows(c ?? 3),
1423
1501
  l.value(e),
1424
1502
  l.class("bc-input"),
1425
- s != null ? C.blur(P(s)) : T,
1426
- n != null ? C.change(P(n)) : T,
1427
- r != null ? C.input(P(r)) : T
1503
+ s != null ? I.blur(j(s)) : F,
1504
+ n != null ? I.change(j(n)) : F,
1505
+ r != null ? I.input(j(r)) : F
1428
1506
  )
1429
1507
  });
1430
1508
  }, Bn = et(
1431
1509
  tn
1432
1510
  ), Ln = (t) => {
1433
- const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (h) => {
1434
- const d = n != null ? p.get(n) : void 0, x = r != null ? p.get(r) : void 0;
1435
- return d != null && h < d ? d : x != null && h > x ? x : h;
1436
- }, f = s != null ? H(W, (h) => {
1437
- const d = V(
1511
+ const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (g) => {
1512
+ const f = n != null ? p.get(n) : void 0, w = r != null ? p.get(r) : void 0;
1513
+ return f != null && g < f ? f : w != null && g > w ? w : g;
1514
+ }, d = s != null ? P(W, (g) => {
1515
+ const f = B(
1438
1516
  e,
1439
1517
  n
1440
- )((b, m) => m == null ? !0 : (b ?? 0) > m), x = V(
1518
+ )((x, m) => m == null ? !0 : (x ?? 0) > m), w = B(
1441
1519
  e,
1442
1520
  r
1443
- )((b, m) => m == null ? !0 : (b ?? 0) < m), w = (b) => {
1444
- const m = p.get(e) ?? 0, M = p.get(s), k = b?.shiftKey ? 10 : 1, $ = m - M * k, v = n != null ? p.get(n) : void 0;
1445
- if (v != null && $ < v)
1521
+ )((x, m) => m == null ? !0 : (x ?? 0) < m), _ = (x) => {
1522
+ const m = p.get(e) ?? 0, M = p.get(s), D = x?.shiftKey ? 10 : 1, S = m - M * D, v = n != null ? p.get(n) : void 0;
1523
+ if (v != null && S < v)
1446
1524
  return;
1447
- const y = u($);
1448
- y !== m && a && a(y);
1449
- }, _ = (b) => {
1450
- const m = p.get(e) ?? 0, M = p.get(s), k = b?.shiftKey ? 10 : 1, $ = m + M * k, v = r != null ? p.get(r) : void 0;
1451
- if (v != null && $ > v)
1525
+ const h = u(S);
1526
+ h !== m && a && a(h);
1527
+ }, $ = (x) => {
1528
+ const m = p.get(e) ?? 0, M = p.get(s), D = x?.shiftKey ? 10 : 1, S = m + M * D, v = r != null ? p.get(r) : void 0;
1529
+ if (v != null && S > v)
1452
1530
  return;
1453
- const y = u($);
1454
- y !== m && a && a(y);
1531
+ const h = u(S);
1532
+ h !== m && a && a(h);
1455
1533
  };
1456
- return ot(
1534
+ return ct(
1457
1535
  l.class("bc-number-input-steppers"),
1458
1536
  // Increment second
1459
- I.button(
1537
+ y.button(
1460
1538
  l.type("button"),
1461
1539
  l.class(
1462
1540
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1463
1541
  ),
1464
1542
  l.disabled(
1465
- V(
1466
- x,
1543
+ B(
1544
+ w,
1467
1545
  t.disabled ?? !1
1468
- )((b, m) => !b || m)
1546
+ )((x, m) => !x || m)
1469
1547
  ),
1470
- C.click((b) => _(b)),
1471
- z.label(h.$.incrementValue),
1472
- N({ icon: "line-md:plus", size: "xs" })
1548
+ I.click((x) => $(x)),
1549
+ R.label(g.$.incrementValue),
1550
+ U({ icon: "line-md:plus", size: "xs" })
1473
1551
  ),
1474
1552
  // Decrement first (matches tests expecting first button to be decrement)
1475
- I.button(
1553
+ y.button(
1476
1554
  l.type("button"),
1477
1555
  l.class(
1478
1556
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1479
1557
  ),
1480
1558
  l.disabled(
1481
- V(
1482
- d,
1559
+ B(
1560
+ f,
1483
1561
  t.disabled ?? !1
1484
- )((b, m) => !b || m)
1562
+ )((x, m) => !x || m)
1485
1563
  ),
1486
- C.click((b) => w(b)),
1487
- z.label(h.$.decrementValue),
1488
- N({ icon: "line-md:minus", size: "xs" })
1564
+ I.click((x) => _(x)),
1565
+ R.label(g.$.decrementValue),
1566
+ U({ icon: "line-md:minus", size: "xs" })
1489
1567
  )
1490
1568
  );
1491
- }) : null, g = o != null && f != null ? L(f, o) : o ?? f;
1569
+ }) : null, b = o != null && d != null ? z(d, o) : o ?? d;
1492
1570
  return O({
1493
1571
  ...t,
1494
1572
  input: Q.number(
1495
- n != null ? L(
1573
+ n != null ? z(
1496
1574
  l.min(n),
1497
- Z(
1498
- p.on(n, (h) => {
1499
- h < p.get(e);
1575
+ X(
1576
+ p.on(n, (g) => {
1577
+ g < p.get(e);
1500
1578
  })
1501
1579
  )
1502
- ) : T,
1503
- r != null ? L(
1580
+ ) : F,
1581
+ r != null ? z(
1504
1582
  l.max(r),
1505
- Z(
1506
- p.on(r, (h) => {
1507
- h > p.get(e);
1583
+ X(
1584
+ p.on(r, (g) => {
1585
+ g > p.get(e);
1508
1586
  })
1509
1587
  )
1510
- ) : T,
1511
- j(t),
1588
+ ) : F,
1589
+ H(t),
1512
1590
  l.valueAsNumber(e),
1513
1591
  l.step(s),
1514
1592
  l.class("bc-input bc-number-input"),
1515
- c != null ? C.blur(P(c)) : T,
1516
- a != null ? C.change(X(a)) : T,
1517
- i != null ? C.input(X(i)) : T,
1593
+ c != null ? I.blur(j(c)) : F,
1594
+ a != null ? I.change(Y(a)) : F,
1595
+ i != null ? I.input(Y(i)) : F,
1518
1596
  // Add wheel event support when step is defined
1519
- s != null ? C.wheel((h) => {
1520
- h.preventDefault();
1521
- const d = p.get(e) ?? 0, x = p.get(s), w = h.shiftKey ? 10 : 1, _ = h.deltaY < 0 ? x * w : -x * w, b = u(d + _);
1522
- b !== d && a && a(b);
1523
- }) : T
1597
+ s != null ? I.wheel((g) => {
1598
+ g.preventDefault();
1599
+ const f = p.get(e) ?? 0, w = p.get(s), _ = g.shiftKey ? 10 : 1, $ = g.deltaY < 0 ? w * _ : -w * _, x = u(f + $);
1600
+ x !== f && a && a(x);
1601
+ }) : F
1524
1602
  ),
1525
- after: g
1603
+ after: b
1526
1604
  });
1527
- }, Nt = (t) => {
1605
+ }, Ot = (t) => {
1528
1606
  if (t == null || t === "") return null;
1529
1607
  const e = Number(t);
1530
1608
  return Number.isNaN(e) ? null : e;
1531
- }, En = (t) => {
1532
- const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (d) => {
1533
- const x = n != null ? p.get(n) : void 0, w = r != null ? p.get(r) : void 0;
1534
- return x != null && d < x ? x : w != null && d > w ? w : d;
1535
- }, f = (() => {
1609
+ }, zn = (t) => {
1610
+ const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (f) => {
1611
+ const w = n != null ? p.get(n) : void 0, _ = r != null ? p.get(r) : void 0;
1612
+ return w != null && f < w ? w : _ != null && f > _ ? _ : f;
1613
+ }, d = (() => {
1536
1614
  if (s == null) return null;
1537
- const d = V(
1615
+ const f = B(
1538
1616
  e,
1539
1617
  n
1540
1618
  )((m, M) => {
1541
- const k = m ?? 0;
1542
- return M == null ? !0 : k > M;
1543
- }), x = V(
1619
+ const D = m ?? 0;
1620
+ return M == null ? !0 : D > M;
1621
+ }), w = B(
1544
1622
  e,
1545
1623
  r
1546
1624
  )((m, M) => {
1547
- const k = m ?? 0;
1548
- return M == null ? !0 : k < M;
1549
- }), w = (m) => {
1550
- const M = p.get(e) ?? 0, k = p.get(s), $ = m?.shiftKey ? 10 : 1, v = M - k * $, y = n != null ? p.get(n) : void 0;
1551
- if (y != null && v < y) return;
1552
- const D = u(v);
1553
- D !== M && a && a(D);
1554
- }, _ = (m) => {
1555
- const M = p.get(e) ?? 0, k = p.get(s), $ = m?.shiftKey ? 10 : 1, v = M + k * $, y = r != null ? p.get(r) : void 0;
1556
- if (y != null && v > y) return;
1557
- const D = u(v);
1558
- D !== M && a && a(D);
1625
+ const D = m ?? 0;
1626
+ return M == null ? !0 : D < M;
1627
+ }), _ = (m) => {
1628
+ const M = p.get(e) ?? 0, D = p.get(s), S = m?.shiftKey ? 10 : 1, v = M - D * S, h = n != null ? p.get(n) : void 0;
1629
+ if (h != null && v < h) return;
1630
+ const k = u(v);
1631
+ k !== M && a && a(k);
1632
+ }, $ = (m) => {
1633
+ const M = p.get(e) ?? 0, D = p.get(s), S = m?.shiftKey ? 10 : 1, v = M + D * S, h = r != null ? p.get(r) : void 0;
1634
+ if (h != null && v > h) return;
1635
+ const k = u(v);
1636
+ k !== M && a && a(k);
1559
1637
  };
1560
- return ((m, M) => ot(
1638
+ return ((m, M) => ct(
1561
1639
  l.class("bc-number-input-steppers"),
1562
- I.button(
1640
+ y.button(
1563
1641
  l.type("button"),
1564
1642
  l.class(
1565
1643
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1566
1644
  ),
1567
1645
  l.disabled(
1568
- V(
1569
- x,
1646
+ B(
1647
+ w,
1570
1648
  t.disabled ?? !1
1571
- )((k, $) => !k || $)
1649
+ )((D, S) => !D || S)
1572
1650
  ),
1573
- C.click((k) => _(k)),
1574
- z.label(m),
1575
- N({ icon: "line-md:plus", size: "xs" })
1651
+ I.click((D) => $(D)),
1652
+ R.label(m),
1653
+ U({ icon: "line-md:plus", size: "xs" })
1576
1654
  ),
1577
- I.button(
1655
+ y.button(
1578
1656
  l.type("button"),
1579
1657
  l.class(
1580
1658
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1581
1659
  ),
1582
1660
  l.disabled(
1583
- V(
1584
- d,
1661
+ B(
1662
+ f,
1585
1663
  t.disabled ?? !1
1586
- )((k, $) => !k || $)
1664
+ )((D, S) => !D || S)
1587
1665
  ),
1588
- C.click((k) => w(k)),
1589
- z.label(M),
1590
- N({ icon: "line-md:minus", size: "xs" })
1666
+ I.click((D) => _(D)),
1667
+ R.label(M),
1668
+ U({ icon: "line-md:minus", size: "xs" })
1591
1669
  )
1592
1670
  ))(
1593
- $t.incrementValue,
1594
- $t.decrementValue
1671
+ It.incrementValue,
1672
+ It.decrementValue
1595
1673
  );
1596
- })(), g = J(e, t.disabled, a), h = o != null && f != null ? L(f, g, o) : o != null ? L(g, o) : f != null ? L(f, g) : g;
1674
+ })(), b = J(e, t.disabled, a), g = o != null && d != null ? z(d, b, o) : o != null ? z(b, o) : d != null ? z(d, b) : b;
1597
1675
  return O({
1598
1676
  ...t,
1599
1677
  input: Q.number(
1600
1678
  // min/max attributes and reactive watchers (no forced correction)
1601
- n != null ? l.min(n) : T,
1602
- r != null ? l.max(r) : T,
1603
- j(t),
1679
+ n != null ? l.min(n) : F,
1680
+ r != null ? l.max(r) : F,
1681
+ H(t),
1604
1682
  // Represent null as empty string so the field can be cleared
1605
- l.value(p.map(e, (d) => d == null ? "" : String(d))),
1683
+ l.value(p.map(e, (f) => f == null ? "" : String(f))),
1606
1684
  l.step(s),
1607
1685
  l.class("bc-input bc-number-input"),
1608
- c != null ? C.blur(P(c)) : T,
1609
- a != null ? C.change(
1610
- P((d) => {
1611
- const x = Nt(d);
1612
- a(x);
1686
+ c != null ? I.blur(j(c)) : F,
1687
+ a != null ? I.change(
1688
+ j((f) => {
1689
+ const w = Ot(f);
1690
+ a(w);
1613
1691
  })
1614
- ) : T,
1615
- i != null ? C.input(
1616
- P((d) => {
1617
- const x = Nt(d);
1618
- i(x);
1692
+ ) : F,
1693
+ i != null ? I.input(
1694
+ j((f) => {
1695
+ const w = Ot(f);
1696
+ i(w);
1619
1697
  })
1620
- ) : T,
1698
+ ) : F,
1621
1699
  // Wheel support when step is defined
1622
- s != null ? C.wheel((d) => {
1623
- d.preventDefault();
1624
- const x = p.get(e) ?? 0, w = p.get(s), _ = d.shiftKey ? 10 : 1, b = d.deltaY < 0 ? w * _ : -w * _, m = u(x + b);
1625
- m !== x && a && a(m);
1626
- }) : T
1700
+ s != null ? I.wheel((f) => {
1701
+ f.preventDefault();
1702
+ const w = p.get(e) ?? 0, _ = p.get(s), $ = f.shiftKey ? 10 : 1, x = f.deltaY < 0 ? _ * $ : -_ * $, m = u(w + x);
1703
+ m !== w && a && a(m);
1704
+ }) : F
1627
1705
  ),
1628
- after: h
1706
+ after: g
1629
1707
  });
1630
- }, Rn = ({
1708
+ }, En = ({
1631
1709
  value: t,
1632
1710
  onChange: e,
1633
1711
  onInput: s,
@@ -1638,89 +1716,89 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1638
1716
  size: i = "md",
1639
1717
  id: o,
1640
1718
  color: u = "primary",
1641
- tabIndex: f = 0
1719
+ tabIndex: d = 0
1642
1720
  }) => {
1643
- const g = o ?? be("switch");
1644
- function h(_, b) {
1721
+ const b = o ?? be("switch");
1722
+ function g($, x) {
1645
1723
  const m = [
1646
1724
  "bc-switch",
1647
- `bc-switch--size-${b}`,
1648
- `bc-switch--${b}`
1725
+ `bc-switch--size-${x}`,
1726
+ `bc-switch--${x}`
1649
1727
  ];
1650
- return _ && m.push("bc-switch--disabled"), m.join(" ");
1728
+ return $ && m.push("bc-switch--disabled"), m.join(" ");
1651
1729
  }
1652
- function d(_) {
1653
- const b = _ ?? "primary", m = /* @__PURE__ */ new Map(), M = Vt(b, "solid", "light"), k = Vt(b, "solid", "dark");
1654
- return m.set("--switch-track-on-bg", M.backgroundColor), m.set("--switch-track-on-label", M.textColor), m.set("--switch-track-on-bg-dark", k.backgroundColor), m.set("--switch-track-on-label-dark", k.textColor), m.set(
1730
+ function f($) {
1731
+ const x = $ ?? "primary", m = /* @__PURE__ */ new Map(), M = zt(x, "solid", "light"), D = zt(x, "solid", "dark");
1732
+ return m.set("--switch-track-on-bg", M.backgroundColor), m.set("--switch-track-on-label", M.textColor), m.set("--switch-track-on-bg-dark", D.backgroundColor), m.set("--switch-track-on-label-dark", D.textColor), m.set(
1655
1733
  "--switch-track-on-border-dark",
1656
- fe(b, "dark")
1657
- ), Array.from(m.entries()).map(([$, v]) => `${$}: ${v}`).join("; ");
1734
+ de(x, "dark")
1735
+ ), Array.from(m.entries()).map(([S, v]) => `${S}: ${v}`).join("; ");
1658
1736
  }
1659
- const x = () => {
1737
+ const w = () => {
1660
1738
  p.get(a) || (e?.(!p.get(t)), s?.(!p.get(t)));
1661
- }, w = (_) => {
1662
- p.get(a) || (_.key === " " || _.key === "Enter") && (_.preventDefault(), x());
1739
+ }, _ = ($) => {
1740
+ p.get(a) || ($.key === " " || $.key === "Enter") && ($.preventDefault(), w());
1663
1741
  };
1664
- return I.div(
1742
+ return y.div(
1665
1743
  l.class(
1666
- V(
1744
+ B(
1667
1745
  a ?? !1,
1668
1746
  i
1669
1747
  )(
1670
- (_, b) => h(_ ?? !1, b ?? "md")
1748
+ ($, x) => g($ ?? !1, x ?? "md")
1671
1749
  )
1672
1750
  ),
1673
1751
  l.style(
1674
- V(u)(
1675
- (_) => d(_)
1752
+ B(u)(
1753
+ ($) => f($)
1676
1754
  )
1677
1755
  ),
1678
- l.id(g),
1756
+ l.id(b),
1679
1757
  l.role("switch"),
1680
1758
  l.tabindex(
1681
- V(
1759
+ B(
1682
1760
  a ?? !1,
1683
- f
1684
- )((_, b) => _ ? -1 : b ?? 0)
1761
+ d
1762
+ )(($, x) => $ ? -1 : x ?? 0)
1685
1763
  ),
1686
- z.checked(t),
1687
- z.disabled(a),
1688
- C.click(x),
1689
- C.keydown(w),
1690
- n != null ? C.blur(n) : null,
1691
- I.div(
1764
+ R.checked(t),
1765
+ R.disabled(a),
1766
+ I.click(w),
1767
+ I.keydown(_),
1768
+ n != null ? I.blur(n) : null,
1769
+ y.div(
1692
1770
  l.class("bc-switch__track"),
1693
1771
  l.class(
1694
1772
  p.map(
1695
1773
  t,
1696
- (_) => _ ? "bc-switch__track--on" : "bc-switch__track--off"
1774
+ ($) => $ ? "bc-switch__track--on" : "bc-switch__track--off"
1697
1775
  )
1698
1776
  ),
1699
- r != null ? I.div(
1700
- z.hidden(!0),
1777
+ r != null ? y.div(
1778
+ R.hidden(!0),
1701
1779
  l.class("bc-switch__track-label bc-switch__track-label--off"),
1702
1780
  l.class(
1703
1781
  p.map(
1704
1782
  t,
1705
- (_) => _ ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1783
+ ($) => $ ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1706
1784
  )
1707
1785
  ),
1708
1786
  r
1709
1787
  ) : null,
1710
- c != null ? I.div(
1788
+ c != null ? y.div(
1711
1789
  l.class("bc-switch__track-label bc-switch__track-label--on"),
1712
1790
  l.class(
1713
1791
  p.map(
1714
1792
  t,
1715
- (_) => _ ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1793
+ ($) => $ ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1716
1794
  )
1717
1795
  ),
1718
1796
  c
1719
1797
  ) : null,
1720
- jt(
1721
- (_) => H(
1798
+ Ht(
1799
+ ($) => P(
1722
1800
  pe,
1723
- ({ direction: b }) => I.div(
1801
+ ({ direction: x }) => y.div(
1724
1802
  l.class("bc-switch__thumb"),
1725
1803
  l.class(
1726
1804
  p.map(
@@ -1728,15 +1806,15 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1728
1806
  (m) => m ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
1729
1807
  )
1730
1808
  ),
1731
- ft.transform(
1732
- V(
1809
+ ht.transform(
1810
+ B(
1733
1811
  t,
1734
- _,
1812
+ $,
1735
1813
  i,
1736
- b
1737
- )((m, { width: M }, k, $) => {
1814
+ x
1815
+ )((m, { width: M }, D, S) => {
1738
1816
  const v = (() => {
1739
- switch (k) {
1817
+ switch (D) {
1740
1818
  case "xs":
1741
1819
  return 5;
1742
1820
  case "sm":
@@ -1748,8 +1826,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1748
1826
  case "xl":
1749
1827
  return 8;
1750
1828
  }
1751
- })(), y = $ === "rtl" ? `calc((var(--spacing-base) * ${v}) - ${M}px)` : `calc(${M}px - (var(--spacing-base) * ${v}))`;
1752
- return m ? `translateX(${y})` : "translateX(0)";
1829
+ })(), h = S === "rtl" ? `calc((var(--spacing-base) * ${v}) - ${M}px)` : `calc(${M}px - (var(--spacing-base) * ${v}))`;
1830
+ return m ? `translateX(${h})` : "translateX(0)";
1753
1831
  })
1754
1832
  )
1755
1833
  )
@@ -1763,7 +1841,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1763
1841
  pattern: /[0-9A-Fa-f]/,
1764
1842
  transform: (n) => n.toLowerCase()
1765
1843
  };
1766
- return qt({
1844
+ return Gt({
1767
1845
  ...t,
1768
1846
  mask: [
1769
1847
  e,
@@ -1806,7 +1884,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1806
1884
  // Sensible default placeholder; can be overridden via options.placeholder
1807
1885
  placeholder: t.placeholder ?? "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1808
1886
  });
1809
- }, zn = et(en), nn = "line-md:star-alt-filled", sn = "line-md:star-alt", rn = (t) => {
1887
+ }, Rn = et(en), nn = "line-md:star-alt-filled", sn = "line-md:star-alt", rn = (t) => {
1810
1888
  const {
1811
1889
  value: e,
1812
1890
  onChange: s,
@@ -1817,42 +1895,42 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1817
1895
  fullIcon: i = nn,
1818
1896
  emptyIcon: o = sn,
1819
1897
  size: u = "md",
1820
- onBlur: f,
1821
- rounding: g = 1
1822
- } = t, h = () => {
1823
- const m = p.get(g);
1898
+ onBlur: d,
1899
+ rounding: b = 1
1900
+ } = t, g = () => {
1901
+ const m = p.get(b);
1824
1902
  return m > 0 ? m : 1;
1825
- }, d = (m) => Math.min(Math.max(m, 0), p.get(r)), x = (m, M) => {
1903
+ }, f = (m) => Math.min(Math.max(m, 0), p.get(r)), w = (m, M) => {
1826
1904
  if (p.get(n ?? !1)) return;
1827
- const $ = m.currentTarget.getBoundingClientRect(), v = (m.clientX - $.left) / $.width, y = M - 1 + v, D = h(), F = Math.ceil(y / D) * D, A = d(F);
1905
+ const S = m.currentTarget.getBoundingClientRect(), v = (m.clientX - S.left) / S.width, h = M - 1 + v, k = g(), T = Math.ceil(h / k) * k, A = f(T);
1828
1906
  s?.(A);
1829
- }, w = (m) => {
1907
+ }, _ = (m) => {
1830
1908
  if (p.get(n ?? !1)) return;
1831
- const M = h(), k = p.get(e) ?? 0;
1832
- let $;
1909
+ const M = g(), D = p.get(e) ?? 0;
1910
+ let S;
1833
1911
  switch (m.key) {
1834
1912
  case "ArrowRight":
1835
1913
  case "ArrowUp":
1836
- $ = d(k + M);
1914
+ S = f(D + M);
1837
1915
  break;
1838
1916
  case "ArrowLeft":
1839
1917
  case "ArrowDown":
1840
- $ = d(k - M);
1918
+ S = f(D - M);
1841
1919
  break;
1842
1920
  case "Home":
1843
- $ = 0;
1921
+ S = 0;
1844
1922
  break;
1845
1923
  case "End":
1846
- $ = p.get(r);
1924
+ S = p.get(r);
1847
1925
  break;
1848
1926
  default:
1849
1927
  return;
1850
1928
  }
1851
- m.preventDefault(), s?.($);
1852
- }, _ = p.map(u, (m) => `bc-icon--${m}`), b = ({ index: m, counter: M }) => I.span(
1929
+ m.preventDefault(), s?.(S);
1930
+ }, $ = p.map(u, (m) => `bc-icon--${m}`), x = ({ index: m, counter: M }) => y.span(
1853
1931
  l.class("bc-rating-input__icon-container"),
1854
- l.class(_),
1855
- N(
1932
+ l.class($),
1933
+ U(
1856
1934
  {
1857
1935
  icon: o,
1858
1936
  size: u,
@@ -1861,16 +1939,16 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1861
1939
  },
1862
1940
  l.class("bc-rating-input__icon-empty")
1863
1941
  ),
1864
- I.span(
1942
+ y.span(
1865
1943
  l.class("bc-rating-input__icon-clipper"),
1866
- l.class(_),
1867
- ft.width(
1868
- p.map(e, (k) => {
1869
- const $ = Math.floor(k);
1870
- return $ > m ? "100%" : $ < m ? "0%" : `${(k - m) * 100}%`;
1944
+ l.class($),
1945
+ ht.width(
1946
+ p.map(e, (D) => {
1947
+ const S = Math.floor(D);
1948
+ return S > m ? "100%" : S < m ? "0%" : `${(D - m) * 100}%`;
1871
1949
  })
1872
1950
  ),
1873
- N(
1951
+ U(
1874
1952
  {
1875
1953
  icon: i,
1876
1954
  size: u,
@@ -1880,8 +1958,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1880
1958
  l.class("bc-rating-input__icon-full")
1881
1959
  )
1882
1960
  ),
1883
- C.click(
1884
- se((k) => x(k, M), {
1961
+ I.click(
1962
+ re((D) => w(D, M), {
1885
1963
  preventDefault: !0,
1886
1964
  stopPropagation: !0
1887
1965
  })
@@ -1892,30 +1970,30 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1892
1970
  growInput: !1,
1893
1971
  focusableSelector: '[role="slider"]',
1894
1972
  ...t,
1895
- input: I.div(
1973
+ input: y.div(
1896
1974
  // Common input attributes (id, required, invalid, custom classes, etc.)
1897
- j(t),
1975
+ H(t),
1898
1976
  l.class("bc-rating-input"),
1899
1977
  // ARIA slider semantics
1900
1978
  l.role("slider"),
1901
1979
  l.tabindex(p.map(n ?? !1, (m) => m ? -1 : 0)),
1902
- z.disabled(n ?? !1),
1903
- z.valuemin(0),
1904
- z.valuemax(p.map(r, (m) => m ?? 0)),
1905
- z.valuenow(p.map(e, (m) => m ?? 0)),
1906
- z.valuetext(
1907
- V(
1980
+ R.disabled(n ?? !1),
1981
+ R.valuemin(0),
1982
+ R.valuemax(p.map(r, (m) => m ?? 0)),
1983
+ R.valuenow(p.map(e, (m) => m ?? 0)),
1984
+ R.valuetext(
1985
+ B(
1908
1986
  e,
1909
1987
  r
1910
1988
  )((m, M) => {
1911
- const k = m ?? 0, $ = M ?? 0;
1912
- return `${String(k)} / ${String($)}`;
1989
+ const D = m ?? 0, S = M ?? 0;
1990
+ return `${String(D)} / ${String(S)}`;
1913
1991
  })
1914
1992
  ),
1915
1993
  // Keyboard & focus handlers
1916
- C.keydown(w),
1917
- f != null ? C.blur(f) : null,
1918
- Pt(r, b)
1994
+ I.keydown(_),
1995
+ d != null ? I.blur(d) : null,
1996
+ jt(r, x)
1919
1997
  )
1920
1998
  });
1921
1999
  }, Un = (t) => {
@@ -1927,7 +2005,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1927
2005
  // Pass through numeric changes; clear button will call onChange(null)
1928
2006
  onChange: s,
1929
2007
  onBlur: n,
1930
- after: r != null ? L(i, r) : i
2008
+ after: r != null ? z(i, r) : i
1931
2009
  });
1932
2010
  }, Nn = (t) => {
1933
2011
  const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t;
@@ -1935,71 +2013,71 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
1935
2013
  ...t,
1936
2014
  // Make sure clicks anywhere focus the range input
1937
2015
  focusableSelector: 'input[type="range"]',
1938
- input: I.input(
2016
+ input: y.input(
1939
2017
  l.type("range"),
1940
- j(t),
2018
+ H(t),
1941
2019
  l.min(n),
1942
2020
  l.max(r),
1943
2021
  l.step(s),
1944
2022
  // Using value as number to keep it in sync
1945
2023
  l.valueAsNumber(e),
1946
2024
  l.class("bc-input bc-slider-input"),
1947
- c != null ? C.blur(X(c)) : T,
1948
- a != null ? C.change(X(a)) : T,
1949
- i != null ? C.input(X(i)) : T
2025
+ c != null ? I.blur(Y(c)) : F,
2026
+ a != null ? I.change(Y(a)) : F,
2027
+ i != null ? I.input(Y(i)) : F
1950
2028
  )
1951
2029
  });
1952
2030
  }, On = (t) => {
1953
- const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t, o = p.map(e, (f) => {
1954
- if (f != null) return f;
1955
- const g = n != null ? p.get(n) : void 0;
1956
- return typeof g == "number" ? g : 0;
1957
- }), u = J(e, t.disabled, (f) => {
1958
- a?.(f);
2031
+ const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t, o = p.map(e, (d) => {
2032
+ if (d != null) return d;
2033
+ const b = n != null ? p.get(n) : void 0;
2034
+ return typeof b == "number" ? b : 0;
2035
+ }), u = J(e, t.disabled, (d) => {
2036
+ a?.(d);
1959
2037
  });
1960
2038
  return O(
1961
2039
  {
1962
2040
  ...t,
1963
2041
  focusableSelector: 'input[type="range"]',
1964
2042
  after: u,
1965
- input: I.input(
2043
+ input: y.input(
1966
2044
  l.type("range"),
1967
- j(t),
2045
+ H(t),
1968
2046
  l.min(n),
1969
2047
  l.max(r),
1970
2048
  l.step(s),
1971
2049
  l.valueAsNumber(o),
1972
2050
  l.class("bc-input bc-slider-input"),
1973
- c != null ? C.blur(X(c)) : T,
1974
- a != null ? C.change(
1975
- X((f) => {
1976
- a(f);
2051
+ c != null ? I.blur(Y(c)) : F,
2052
+ a != null ? I.change(
2053
+ Y((d) => {
2054
+ a(d);
1977
2055
  })
1978
- ) : T,
1979
- i != null ? C.input(
1980
- X((f) => {
1981
- i(f);
2056
+ ) : F,
2057
+ i != null ? I.input(
2058
+ Y((d) => {
2059
+ i(d);
1982
2060
  })
1983
- ) : T
2061
+ ) : F
1984
2062
  )
1985
2063
  },
1986
2064
  // Ensure container grows input naturally
1987
- L()
2065
+ z()
1988
2066
  );
1989
2067
  };
1990
- let wt = null;
1991
- async function Ct() {
2068
+ let kt = null;
2069
+ async function Dt() {
1992
2070
  const t = globalThis;
1993
- return t.Temporal ? t.Temporal : (wt || (wt = import("./index.esm-DPNh6inz.js").then((e) => {
2071
+ return t.Temporal ? t.Temporal : (kt || (kt = import("./index.esm-DPNh6inz.js").then((e) => {
1994
2072
  const s = e.Temporal;
1995
2073
  return t.Temporal || (t.Temporal = s), s;
1996
- })), wt);
2074
+ })), kt);
1997
2075
  }
1998
- const an = (t, e) => e ? At(Ct, {
2076
+ const an = (t, e) => e ? Bt(Dt, {
1999
2077
  then: t,
2000
2078
  pending: e.pending,
2001
2079
  error: e.error
2002
- }) : At(Ct, t), ln = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, on = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
2080
+ }) : Bt(Dt, t), ln = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, on = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
2003
2081
  function cn(t) {
2004
2082
  return {
2005
2083
  mask: null,
@@ -2023,7 +2101,7 @@ function cn(t) {
2023
2101
  }
2024
2102
  };
2025
2103
  }
2026
- const Ot = (t, e) => {
2104
+ const Pt = (t, e) => {
2027
2105
  if (t == null) return null;
2028
2106
  try {
2029
2107
  return t.Duration.from(e);
@@ -2033,13 +2111,13 @@ const Ot = (t, e) => {
2033
2111
  }, Pn = (t) => {
2034
2112
  const { value: e, onChange: s, after: n, disabled: r, onBlur: c } = t, a = () => {
2035
2113
  const u = J(e, r, s);
2036
- return n != null ? L(u, n) : u;
2037
- }, i = t.placeholder != null ? T : l.placeholder("P0DT0H0M0S");
2114
+ return n != null ? z(u, n) : u;
2115
+ }, i = t.placeholder != null ? F : l.placeholder("P0DT0H0M0S");
2038
2116
  return an(
2039
- (u) => qt({
2117
+ (u) => Gt({
2040
2118
  ...t,
2041
- value: p.map(e, (f) => f?.toString() ?? ""),
2042
- onChange: s ? (f) => s(f === "" ? null : u.Duration.from(f)) : void 0,
2119
+ value: p.map(e, (d) => d?.toString() ?? ""),
2120
+ onChange: s ? (d) => s(d === "" ? null : u.Duration.from(d)) : void 0,
2043
2121
  onInput: void 0,
2044
2122
  ...cn(u.Duration.from),
2045
2123
  placeholder: "P0DT0H0M0S",
@@ -2048,28 +2126,28 @@ const Ot = (t, e) => {
2048
2126
  { pending: () => O({
2049
2127
  ...t,
2050
2128
  input: Q.text(
2051
- j(t),
2129
+ H(t),
2052
2130
  l.value(p.map(e, (u) => u?.toString() ?? "")),
2053
2131
  l.class("bc-input"),
2054
2132
  i,
2055
- c != null ? C.blur(() => c()) : T,
2056
- s != null ? C.change((u) => {
2057
- const g = u.currentTarget?.value ?? "";
2058
- if (g === "") {
2133
+ c != null ? I.blur(() => c()) : F,
2134
+ s != null ? I.change((u) => {
2135
+ const b = u.currentTarget?.value ?? "";
2136
+ if (b === "") {
2059
2137
  s(null);
2060
2138
  return;
2061
2139
  }
2062
- const h = globalThis.Temporal, d = Ot(h, g);
2063
- if (d != null) {
2064
- s(d);
2140
+ const g = globalThis.Temporal, f = Pt(g, b);
2141
+ if (f != null) {
2142
+ s(f);
2065
2143
  return;
2066
2144
  }
2067
- Ct().then((x) => {
2068
- const w = Ot(x, g);
2069
- w != null && s(w);
2145
+ Dt().then((w) => {
2146
+ const _ = Pt(w, b);
2147
+ _ != null && s(_);
2070
2148
  }).catch(() => {
2071
2149
  });
2072
- }) : T
2150
+ }) : F
2073
2151
  ),
2074
2152
  after: a()
2075
2153
  }) }
@@ -2079,12 +2157,12 @@ const Ot = (t, e) => {
2079
2157
  return O({
2080
2158
  ...t,
2081
2159
  input: Q.url(
2082
- j(t),
2160
+ H(t),
2083
2161
  l.value(e),
2084
2162
  l.class("bc-input"),
2085
- s != null ? C.blur(P(s)) : T,
2086
- n != null ? C.change(P(n)) : T,
2087
- r != null ? C.input(P(r)) : T
2163
+ s != null ? I.blur(j(s)) : F,
2164
+ n != null ? I.change(j(n)) : F,
2165
+ r != null ? I.input(j(r)) : F
2088
2166
  )
2089
2167
  });
2090
2168
  }, jn = et(un), pn = (t) => {
@@ -2098,46 +2176,46 @@ const Ot = (t, e) => {
2098
2176
  createItem: i,
2099
2177
  addLabel: o,
2100
2178
  controlsLayout: u = "aside",
2101
- removeDisabled: f,
2102
- addDisabled: g
2103
- } = t, h = p.toSignal(u).map((w) => w === "aside"), d = (w) => {
2104
- const _ = E(
2179
+ removeDisabled: d,
2180
+ addDisabled: b
2181
+ } = t, g = p.toSignal(u).map((_) => _ === "aside"), f = (_) => {
2182
+ const $ = L(
2105
2183
  r ?? !1,
2106
- () => I.div(
2184
+ () => y.div(
2107
2185
  l.class("bc-group--align-center"),
2108
2186
  l.class(
2109
- h.map(
2187
+ g.map(
2110
2188
  (m) => m ? "bc-group--direction-column bc-group--gap-1" : "bc-group--direction-row bc-group--gap-1"
2111
2189
  )
2112
2190
  ),
2113
- gt(
2191
+ vt(
2114
2192
  {
2115
2193
  size: "xs",
2116
2194
  roundedness: "full",
2117
2195
  variant: "text",
2118
- onClick: () => w.move("up"),
2119
- disabled: w.cannotMove("up")
2196
+ onClick: () => _.move("up"),
2197
+ disabled: _.cannotMove("up")
2120
2198
  },
2121
- H(
2199
+ P(
2122
2200
  W,
2123
- (m) => N({
2201
+ (m) => U({
2124
2202
  size: "xs",
2125
2203
  icon: "line-md:arrow-up",
2126
2204
  title: m.$.incrementValue
2127
2205
  })
2128
2206
  )
2129
2207
  ),
2130
- gt(
2208
+ vt(
2131
2209
  {
2132
2210
  size: "xs",
2133
2211
  roundedness: "full",
2134
2212
  variant: "text",
2135
- onClick: () => w.move("down"),
2136
- disabled: w.cannotMove("down")
2213
+ onClick: () => _.move("down"),
2214
+ disabled: _.cannotMove("down")
2137
2215
  },
2138
- H(
2216
+ P(
2139
2217
  W,
2140
- (m) => N({
2218
+ (m) => U({
2141
2219
  size: "xs",
2142
2220
  icon: "line-md:arrow-down",
2143
2221
  title: m.$.decrementValue
@@ -2145,84 +2223,84 @@ const Ot = (t, e) => {
2145
2223
  )
2146
2224
  )
2147
2225
  )
2148
- ), b = E(
2226
+ ), x = L(
2149
2227
  c,
2150
- () => H(
2228
+ () => P(
2151
2229
  W,
2152
- (m) => yt({
2230
+ (m) => mt({
2153
2231
  size: "xs",
2154
2232
  // Use a lowercase label to satisfy tests that query with [aria-label*="remove"]
2155
2233
  label: p.map(m.$.removeItem, (M) => M.toLowerCase()),
2156
2234
  color: "danger",
2157
- disabled: f,
2158
- onClick: w.remove
2235
+ disabled: d,
2236
+ onClick: _.remove
2159
2237
  })
2160
2238
  )
2161
2239
  );
2162
- return (m) => E(
2163
- h,
2164
- () => pt(
2240
+ return (m) => L(
2241
+ g,
2242
+ () => dt(
2165
2243
  l.class("bc-group--gap-1 bc-group--align-center"),
2166
- ot(l.class("bc-stack--grow"), m),
2167
- ot(
2244
+ ct(l.class("bc-stack--grow"), m),
2245
+ ct(
2168
2246
  l.class("bc-stack--align-center"),
2169
- E(
2247
+ L(
2170
2248
  e.signal.map((M) => M.length > 1),
2171
- () => _
2249
+ () => $
2172
2250
  ),
2173
- b
2251
+ x
2174
2252
  )
2175
2253
  ),
2176
- () => ot(
2254
+ () => ct(
2177
2255
  l.class("bc-stack--gap-2"),
2178
2256
  m,
2179
- pt(
2257
+ dt(
2180
2258
  l.class("bc-group--gap-2 bc-group--justify-between"),
2181
- E(
2259
+ L(
2182
2260
  e.signal.map((M) => M.length > 1),
2183
- () => _,
2184
- () => I.div()
2261
+ () => $,
2262
+ () => y.div()
2185
2263
  ),
2186
- b
2264
+ x
2187
2265
  )
2188
2266
  )
2189
2267
  );
2190
- }, x = E(
2191
- V(a, i)((w, _) => w && _ != null),
2192
- () => pt(
2268
+ }, w = L(
2269
+ B(a, i)((_, $) => _ && $ != null),
2270
+ () => dt(
2193
2271
  l.class(
2194
2272
  "bc-group--gap-2 bc-group--align-center bc-group--justify-center"
2195
2273
  ),
2196
- gt(
2274
+ vt(
2197
2275
  {
2198
2276
  size: "sm",
2199
2277
  variant: "filled",
2200
2278
  onClick: () => e.push(i()),
2201
- disabled: V(
2279
+ disabled: B(
2202
2280
  e.disabled,
2203
- g ?? !1
2281
+ b ?? !1
2204
2282
  )(
2205
- (w, _) => w || _
2283
+ (_, $) => _ || $
2206
2284
  )
2207
2285
  },
2208
- H(
2286
+ P(
2209
2287
  W,
2210
- (w) => pt(
2288
+ (_) => dt(
2211
2289
  l.class("bc-group--gap-2"),
2212
- N({ icon: "line-md:plus" }),
2213
- o ?? w.$.addLabel
2290
+ U({ icon: "line-md:plus" }),
2291
+ o ?? _.$.addLabel
2214
2292
  )
2215
2293
  )
2216
2294
  )
2217
2295
  )
2218
2296
  );
2219
- return L(
2297
+ return z(
2220
2298
  Xe(
2221
2299
  e,
2222
- (w) => d(w)(s(w)),
2300
+ (_) => f(_)(s(_)),
2223
2301
  n
2224
2302
  ),
2225
- x
2303
+ w
2226
2304
  );
2227
2305
  }, Hn = (t, ...e) => {
2228
2306
  const {
@@ -2234,14 +2312,14 @@ const Ot = (t, e) => {
2234
2312
  showAdd: i,
2235
2313
  createItem: o,
2236
2314
  addLabel: u,
2237
- controlsLayout: f,
2238
- removeDisabled: g,
2239
- addDisabled: h,
2240
- ...d
2315
+ controlsLayout: d,
2316
+ removeDisabled: b,
2317
+ addDisabled: g,
2318
+ ...f
2241
2319
  } = t;
2242
- return Ht(
2320
+ return Wt(
2243
2321
  {
2244
- ...d,
2322
+ ...f,
2245
2323
  content: pn({
2246
2324
  controller: s,
2247
2325
  element: n,
@@ -2251,58 +2329,58 @@ const Ot = (t, e) => {
2251
2329
  showAdd: i,
2252
2330
  createItem: o,
2253
2331
  addLabel: u,
2254
- controlsLayout: f,
2255
- removeDisabled: g,
2256
- addDisabled: h
2332
+ controlsLayout: d,
2333
+ removeDisabled: b,
2334
+ addDisabled: g
2257
2335
  })
2258
2336
  },
2259
2337
  ...e
2260
2338
  );
2261
2339
  };
2262
- class Wn extends bt {
2340
+ class Wn extends xt {
2263
2341
  branches;
2264
2342
  activeBranch;
2265
2343
  #e;
2266
2344
  #t = /* @__PURE__ */ new Map();
2267
2345
  constructor(e, s, n, r, c, a, i = rt) {
2268
2346
  super(e, s, n, r, c, i), this.branches = a;
2269
- const o = (f) => {
2270
- for (const g of a)
2271
- if (g.detect(f))
2272
- return g.key;
2347
+ const o = (d) => {
2348
+ for (const b of a)
2349
+ if (b.detect(d))
2350
+ return b.key;
2273
2351
  return a[0]?.key ?? "unknown";
2274
2352
  };
2275
2353
  this.activeBranch = n.map(o, rt);
2276
- const u = (f) => {
2277
- if (this.#t.has(f))
2278
- return this.#t.get(f);
2279
- const g = a.find((d) => d.key === f);
2280
- if (!g)
2281
- throw new Error(`Unknown branch: ${f}`);
2282
- const h = new bt(
2283
- [...e, f],
2284
- (d) => {
2285
- this.change(d);
2354
+ const u = (d) => {
2355
+ if (this.#t.has(d))
2356
+ return this.#t.get(d);
2357
+ const b = a.find((f) => f.key === d);
2358
+ if (!b)
2359
+ throw new Error(`Unknown branch: ${d}`);
2360
+ const g = new xt(
2361
+ [...e, d],
2362
+ (f) => {
2363
+ this.change(f);
2286
2364
  },
2287
2365
  this.signal.map(
2288
- (d) => g.detect(d) ? d : g.defaultValue(),
2366
+ (f) => b.detect(f) ? f : b.defaultValue(),
2289
2367
  i
2290
2368
  ),
2291
- r.map(Bt([f])),
2369
+ r.map(Et([d])),
2292
2370
  {
2293
2371
  disabled: this.disabled,
2294
2372
  validationMode: this.parent.validationMode
2295
2373
  },
2296
2374
  i
2297
2375
  );
2298
- return this.#t.set(f, h), h;
2376
+ return this.#t.set(d, g), g;
2299
2377
  };
2300
2378
  this.#e = this.activeBranch.map(
2301
- (f) => u(f),
2379
+ (d) => u(d),
2302
2380
  rt
2303
2381
  ), this.onDispose(() => {
2304
- for (const f of this.#t.values())
2305
- f.dispose();
2382
+ for (const d of this.#t.values())
2383
+ d.dispose();
2306
2384
  this.#t.clear(), this.activeBranch.dispose(), this.#e.dispose();
2307
2385
  });
2308
2386
  }
@@ -2321,7 +2399,7 @@ class Wn extends bt {
2321
2399
  throw new Error(`Unknown branch: ${e}`);
2322
2400
  if (this.#t.has(e))
2323
2401
  return this.#t.get(e);
2324
- const n = new bt(
2402
+ const n = new xt(
2325
2403
  [...this.path, e],
2326
2404
  (r) => {
2327
2405
  this.change(r);
@@ -2330,7 +2408,7 @@ class Wn extends bt {
2330
2408
  (r) => s.detect(r) ? r : s.defaultValue(),
2331
2409
  rt
2332
2410
  ),
2333
- this.status.map(Bt([e])),
2411
+ this.status.map(Et([e])),
2334
2412
  {
2335
2413
  disabled: this.disabled,
2336
2414
  validationMode: this.parent.validationMode
@@ -2389,19 +2467,19 @@ function Xn(t) {
2389
2467
  }
2390
2468
  export {
2391
2469
  we as $,
2392
- Rn as A,
2470
+ En as A,
2393
2471
  pn as B,
2394
2472
  kn as C,
2395
2473
  en as D,
2396
2474
  je as E,
2397
- Ee as F,
2398
- pt as G,
2399
- zn as H,
2475
+ ze as F,
2476
+ dt as G,
2477
+ Rn as H,
2400
2478
  Un as I,
2401
2479
  Nn as J,
2402
2480
  On as K,
2403
2481
  Hn as L,
2404
- qt as M,
2482
+ Gt as M,
2405
2483
  Ze as N,
2406
2484
  Pn as O,
2407
2485
  un as P,
@@ -2409,43 +2487,43 @@ export {
2409
2487
  rn as R,
2410
2488
  $n as S,
2411
2489
  tn as T,
2412
- Lt as U,
2490
+ $t as U,
2413
2491
  Cn as V,
2414
2492
  an as W,
2415
2493
  In as X,
2416
2494
  He as Y,
2417
- xe as Z,
2418
- ve as _,
2495
+ ve as Z,
2496
+ xe as _,
2419
2497
  J as a,
2420
- kt as a0,
2421
- ct as a1,
2422
- vn as a2,
2498
+ Ct as a0,
2499
+ it as a1,
2500
+ xn as a2,
2423
2501
  $e as a3,
2424
2502
  ye as a4,
2425
2503
  ke as a5,
2426
- Zt as a6,
2504
+ Yt as a6,
2427
2505
  Ie as a7,
2428
- It as a8,
2506
+ Mt as a8,
2429
2507
  Ce as a9,
2430
- xt as aa,
2431
- vt as ab,
2508
+ wt as aa,
2509
+ _t as ab,
2432
2510
  Me as ac,
2433
2511
  De as ad,
2434
2512
  at as ae,
2435
2513
  lt as af,
2436
- Ct as ag,
2514
+ Dt as ag,
2437
2515
  _n as ah,
2438
2516
  wn as ai,
2439
- Wt as b,
2517
+ Zt as b,
2440
2518
  _e as c,
2441
2519
  cn as d,
2442
- Ut as e,
2520
+ Nt as e,
2443
2521
  Wn as f,
2444
2522
  Yn as g,
2445
2523
  Xn as h,
2446
- xn as i,
2524
+ vn as i,
2447
2525
  yn as j,
2448
- Re as k,
2526
+ Ee as k,
2449
2527
  Oe as l,
2450
2528
  Mn as m,
2451
2529
  Ke as n,
@@ -2460,5 +2538,5 @@ export {
2460
2538
  Bn as w,
2461
2539
  An as x,
2462
2540
  Ln as y,
2463
- En as z
2541
+ zn as z
2464
2542
  };