@tempots/beatui 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { Use as R, Value as i, prop as K, html as $, attr as l, on as k, WithElement as ne, OnDispose as j, aria as O, bind as $e, computedOf as V, style as pe, When as E, NotEmpty as Ye, Fragment as L, ForEach as de, svg as De, svgAttr as be, Empty as D, emitValue as P, coalesce as Xe, Ensure as Ne, OneOfType as qe, Repeat as ze, signal as Ae, input as se, emitValueAsNullableDate as Ge, emitValueAsNullableDateTime as Qe, emitValueAsNumber as G, emit as Je, Task as Ke, Unless as et } from "@tempots/dom";
1
+ import { Use as O, Value as u, prop as K, html as $, attr as a, on as k, WithElement as ie, OnDispose as W, aria as N, bind as $e, computedOf as B, style as pe, When as E, NotEmpty as Ye, Fragment as L, ForEach as de, svg as Se, svgAttr as be, Empty as S, emitValue as P, coalesce as Xe, Ensure as Ne, OneOfType as qe, Repeat as Re, signal as Ae, input as ne, emitValueAsNullableDate as Ge, emitValueAsNullableDateTime as Qe, emitValueAsNumber as G, emit as Je, Task as Ke, Unless as et } from "@tempots/dom";
2
2
  import { g as tt } from "./timer-CQlK5LhW.js";
3
- import { ElementRect as Re, AutoSelect as nt } from "@tempots/ui";
4
- import { B as W, e as H, f as st, C as me, I as N, g as Y, h as rt, i as at, j as Oe, k as ye, T as lt, E as ot, P as ct, S as te, s as it, L as ut, l as ft, G as fe, a as ge, n as ve, O as oe, o as Fe } from "./translations-ClgoCEFC.js";
3
+ import { ElementRect as ze, AutoSelect as nt } from "@tempots/ui";
4
+ import { B as H, e as j, f as st, C as me, I as R, g as Y, h as rt, i as lt, j as Oe, k as ye, T as at, E as ot, P as ct, S as te, s as it, L as ut, l as ft, G as fe, a as ge, n as ve, O as ae, o as Fe } from "./translations-ClgoCEFC.js";
5
5
  const pt = (e) => Object.entries(e);
6
6
  class dt extends Error {
7
7
  constructor(t = "Missing implementation") {
@@ -24,36 +24,36 @@ function Be({
24
24
  enableClick: n = !0,
25
25
  content: s,
26
26
  disabled: o = !1,
27
- allowMultiple: a
27
+ allowMultiple: l
28
28
  }) {
29
- return R(W, (u) => {
30
- const c = i.deriveProp(t ?? []), p = K(!1), h = (b) => {
29
+ return O(H, (i) => {
30
+ const c = u.deriveProp(t ?? []), p = K(!1), h = (b) => {
31
31
  b.preventDefault(), b.stopPropagation(), p.value = !0;
32
32
  }, d = (b) => {
33
33
  b.preventDefault(), b.stopPropagation(), (!b.currentTarget || !b.currentTarget.contains(b.relatedTarget)) && (p.value = !1);
34
34
  }, g = (b) => {
35
35
  b.preventDefault(), b.stopPropagation(), p.value = !1;
36
- const x = Array.from(b.dataTransfer?.files || []);
37
- x.length > 0 && (c.value = x, e(x));
36
+ const v = Array.from(b.dataTransfer?.files || []);
37
+ v.length > 0 && (c.value = v, e(v));
38
38
  }, f = (b) => {
39
- i.get(n) && b.currentTarget.querySelector(
39
+ u.get(n) && b.currentTarget.querySelector(
40
40
  'input[type="file"]'
41
41
  )?.click();
42
42
  };
43
43
  let m = null;
44
- const w = () => {
44
+ const x = () => {
45
45
  if (m == null) return;
46
46
  const b = Array.from(m.files ?? []);
47
47
  b.length > 0 && (c.value = b, e(b)), m.value = "";
48
48
  }, _ = (b) => {
49
- i.get(n) && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), f(b));
49
+ u.get(n) && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), f(b));
50
50
  };
51
51
  return $.div(
52
- l.role("button"),
53
- l.tabindex(
54
- i.map(n, (b) => b ? 0 : -1)
52
+ a.role("button"),
53
+ a.tabindex(
54
+ u.map(n, (b) => b ? 0 : -1)
55
55
  ),
56
- l.style("position: relative;"),
56
+ a.style("position: relative;"),
57
57
  k.dragover(h),
58
58
  k.dragleave(d),
59
59
  k.drop(g),
@@ -61,26 +61,26 @@ function Be({
61
61
  k.keydown(_),
62
62
  // Hidden file input
63
63
  $.input(
64
- l.type("file"),
65
- l.disabled(o),
66
- l.accept(r),
67
- l.multiple(a),
68
- l.style(
64
+ a.type("file"),
65
+ a.disabled(o),
66
+ a.accept(r),
67
+ a.multiple(l),
68
+ a.style(
69
69
  "position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
70
70
  ),
71
- k.change(w),
72
- ne((b) => (m = b, j(
73
- c.on((x) => {
74
- const S = globalThis.DataTransfer;
75
- if (S != null) {
76
- const C = new S();
77
- x.forEach((y) => C.items.add(y)), b.files = C.files;
71
+ k.change(x),
72
+ ie((b) => (m = b, W(
73
+ c.on((v) => {
74
+ const T = globalThis.DataTransfer;
75
+ if (T != null) {
76
+ const I = new T();
77
+ v.forEach((y) => I.items.add(y)), b.files = I.files;
78
78
  }
79
79
  })
80
80
  )))
81
81
  ),
82
82
  // Screen reader instructions
83
- O.label($e(u.$.dropZoneInstructions)(n)),
83
+ N.label($e(i.$.dropZoneInstructions)(n)),
84
84
  // Content
85
85
  s({ files: c, clear: () => c.value = [], change: c.set })
86
86
  );
@@ -104,20 +104,20 @@ function fn({
104
104
  size: n = "md",
105
105
  disabled: s = !1
106
106
  }, ...o) {
107
- const a = pt(e).map(([u, c]) => ({
108
- key: u,
107
+ const l = pt(e).map(([i, c]) => ({
108
+ key: i,
109
109
  label: c
110
110
  }));
111
- return ne(() => {
112
- const u = Object.fromEntries(
113
- a.map((p, h) => [p.key, h])
111
+ return ie(() => {
112
+ const i = Object.fromEntries(
113
+ l.map((p, h) => [p.key, h])
114
114
  ), c = K(
115
- a.map(() => ({ left: 0, width: 0 })),
115
+ l.map(() => ({ left: 0, width: 0 })),
116
116
  bt
117
117
  );
118
118
  return $.div(
119
- l.class(
120
- V(
119
+ a.class(
120
+ B(
121
121
  n,
122
122
  s
123
123
  )(
@@ -125,42 +125,42 @@ function fn({
125
125
  )
126
126
  ),
127
127
  $.div(
128
- l.class("bc-segmented-control__container"),
128
+ a.class("bc-segmented-control__container"),
129
129
  $.div(
130
- l.class("bc-segmented-control__indicator"),
130
+ a.class("bc-segmented-control__indicator"),
131
131
  pe.width(
132
- V(
132
+ B(
133
133
  t,
134
134
  c
135
135
  )((p, h) => {
136
- const { width: d } = h[u[p] ?? 0];
136
+ const { width: d } = h[i[p] ?? 0];
137
137
  return `${d}px`;
138
138
  })
139
139
  ),
140
140
  pe.left(
141
- V(
141
+ B(
142
142
  t,
143
143
  c
144
144
  )((p, h) => {
145
- const { left: d } = h[u[p] ?? 0];
145
+ const { left: d } = h[i[p] ?? 0];
146
146
  return `${d}px`;
147
147
  })
148
148
  )
149
149
  ),
150
150
  // clickable buttons
151
- a.map(({ label: p, key: h }, d) => $.button(
151
+ l.map(({ label: p, key: h }, d) => $.button(
152
152
  k.click((g) => {
153
- g.preventDefault(), i.get(s) || r?.(h);
153
+ g.preventDefault(), u.get(s) || r?.(h);
154
154
  }),
155
- l.disabled(s),
156
- l.class("bc-segmented-control__segment"),
157
- l.class(
158
- i.map(t, (g) => g === h ? "bc-segmented-control__segment--active" : "bc-segmented-control__segment--inactive")
155
+ a.disabled(s),
156
+ a.class("bc-segmented-control__segment"),
157
+ a.class(
158
+ u.map(t, (g) => g === h ? "bc-segmented-control__segment--active" : "bc-segmented-control__segment--inactive")
159
159
  ),
160
- Re((g) => {
160
+ ze((g) => {
161
161
  function f() {
162
- c.update((w) => {
163
- const _ = [...w];
162
+ c.update((x) => {
163
+ const _ = [...x];
164
164
  return _[d] = {
165
165
  width: g.value.width,
166
166
  left: g.value.localLeft
@@ -168,7 +168,7 @@ function fn({
168
168
  });
169
169
  }
170
170
  const m = tt(f);
171
- return j(m, g.on(f));
171
+ return W(m, g.on(f));
172
172
  }),
173
173
  p
174
174
  ))
@@ -195,18 +195,18 @@ function Ve(e) {
195
195
  const n = URL.createObjectURL(r);
196
196
  t.value = n;
197
197
  }), $.div(
198
- l.class("bc-file-input__thumbnail-container"),
198
+ a.class("bc-file-input__thumbnail-container"),
199
199
  $.img(
200
- l.src(t),
201
- l.alt(e.map((r) => r.name)),
202
- l.class("bc-file-input__thumbnail"),
203
- j(() => {
200
+ a.src(t),
201
+ a.alt(e.map((r) => r.name)),
202
+ a.class("bc-file-input__thumbnail"),
203
+ W(() => {
204
204
  t.value && URL.revokeObjectURL(t.value);
205
205
  })
206
206
  )
207
207
  );
208
208
  },
209
- () => N({ icon: e.map(xt) })
209
+ () => R({ icon: e.map(xt) })
210
210
  );
211
211
  }
212
212
  const wt = (e, ...t) => {
@@ -215,77 +215,77 @@ const wt = (e, ...t) => {
215
215
  accept: n = "*/*",
216
216
  maxFiles: s,
217
217
  maxFileSize: o,
218
- onChange: a,
219
- onBlur: u,
218
+ onChange: l,
219
+ onBlur: i,
220
220
  disabled: c,
221
221
  hasError: p,
222
222
  mode: h = "default",
223
223
  showFileList: d = !0,
224
224
  ...g
225
- } = e, f = r, m = i.map(h, (C) => C === "compact"), w = (C) => {
226
- let y = C;
225
+ } = e, f = r, m = u.map(h, (I) => I === "compact"), x = (I) => {
226
+ let y = I;
227
227
  if (s != null) {
228
- const v = i.get(s);
229
- y = y.slice(0, v);
228
+ const w = u.get(s);
229
+ y = y.slice(0, w);
230
230
  }
231
231
  if (o) {
232
- const v = i.get(o);
233
- y = y.filter((I) => I.size <= v);
232
+ const w = u.get(o);
233
+ y = y.filter((C) => C.size <= w);
234
234
  }
235
- a?.(y);
236
- }, _ = (C) => {
237
- const v = f.value.filter((I, M) => M !== C);
238
- a?.(v);
235
+ l?.(y);
236
+ }, _ = (I) => {
237
+ const w = f.value.filter((C, M) => M !== I);
238
+ l?.(w);
239
239
  }, b = () => {
240
- a?.([]);
241
- }, x = ({
242
- files: C,
240
+ l?.([]);
241
+ }, v = ({
242
+ files: I,
243
243
  clear: y,
244
- change: v
245
- }) => R(
246
- W,
247
- (I) => $.div(
248
- l.class("bc-file-input__drop-zone"),
244
+ change: w
245
+ }) => O(
246
+ H,
247
+ (C) => $.div(
248
+ a.class("bc-file-input__drop-zone"),
249
249
  $.div(
250
- l.class(
250
+ a.class(
251
251
  "bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
252
252
  ),
253
- N({ icon: "mdi:cloud-upload-outline", size: "xl" }),
253
+ R({ icon: "mdi:cloud-upload-outline", size: "xl" }),
254
254
  $.div(
255
- l.class("bc-file-input__drop-zone-text"),
256
- $e(I.$.filesInputInstructions)(
255
+ a.class("bc-file-input__drop-zone-text"),
256
+ $e(C.$.filesInputInstructions)(
257
257
  s,
258
258
  o,
259
- I.$.fileSizeUnits.value
259
+ C.$.fileSizeUnits.value
260
260
  )
261
261
  )
262
262
  )
263
263
  )
264
- ), S = ({
265
- files: C
266
- }) => R(
267
- W,
264
+ ), T = ({
265
+ files: I
266
+ }) => O(
267
+ H,
268
268
  (y) => $.div(
269
- l.class("bc-file-input__compact-input"),
269
+ a.class("bc-file-input__compact-input"),
270
270
  E(
271
- C.map((v) => v.length > 0),
271
+ I.map((w) => w.length > 0),
272
272
  () => $.span(
273
- l.class("bc-file-input__compact-value"),
273
+ a.class("bc-file-input__compact-value"),
274
274
  de(
275
- C,
276
- (v) => $.span(
277
- l.class("bc-file-input__compact-value-item"),
278
- Ve(v),
275
+ I,
276
+ (w) => $.span(
277
+ a.class("bc-file-input__compact-value-item"),
278
+ Ve(w),
279
279
  $.span(
280
- l.class("bc-file-input__compact-value-item-name"),
281
- v.$.name
280
+ a.class("bc-file-input__compact-value-item-name"),
281
+ w.$.name
282
282
  )
283
283
  )
284
284
  )
285
285
  ),
286
286
  () => $.span(
287
- l.class("bc-file-input__compact-placeholder"),
288
- N({ icon: "mdi:cloud-upload-outline", size: "sm" }),
287
+ a.class("bc-file-input__compact-placeholder"),
288
+ R({ icon: "mdi:cloud-upload-outline", size: "sm" }),
289
289
  " ",
290
290
  $e(y.$.filesInputInstructions)(
291
291
  s,
@@ -296,11 +296,11 @@ const wt = (e, ...t) => {
296
296
  )
297
297
  )
298
298
  );
299
- return R(
300
- W,
301
- (C) => H(
299
+ return O(
300
+ H,
301
+ (I) => j(
302
302
  {
303
- baseContainer: i.map(m, (y) => !y),
303
+ baseContainer: u.map(m, (y) => !y),
304
304
  disabled: c,
305
305
  hasError: p,
306
306
  after: E(
@@ -310,11 +310,11 @@ const wt = (e, ...t) => {
310
310
  () => me(
311
311
  {
312
312
  size: "sm",
313
- label: C.$.clearAllFiles,
313
+ label: I.$.clearAllFiles,
314
314
  disabled: c,
315
315
  onClick: b
316
316
  },
317
- l.class("bc-file-input__compact-clear")
317
+ a.class("bc-file-input__compact-clear")
318
318
  )
319
319
  )
320
320
  ),
@@ -322,27 +322,27 @@ const wt = (e, ...t) => {
322
322
  input: E(
323
323
  m,
324
324
  () => $.div(
325
- l.class("bc-file-input bc-file-input--compact"),
325
+ a.class("bc-file-input bc-file-input--compact"),
326
326
  Be({
327
327
  value: f,
328
328
  accept: n,
329
329
  enableClick: !0,
330
- allowMultiple: i.map(s ?? 1 / 0, (y) => y > 1),
330
+ allowMultiple: u.map(s ?? 1 / 0, (y) => y > 1),
331
331
  disabled: c,
332
- onChange: w,
333
- content: S
332
+ onChange: x,
333
+ content: T
334
334
  })
335
335
  ),
336
336
  () => $.div(
337
- l.class("bc-file-input"),
337
+ a.class("bc-file-input"),
338
338
  Be({
339
339
  value: f,
340
340
  accept: n,
341
341
  enableClick: !0,
342
- allowMultiple: i.map(s ?? 1 / 0, (y) => y > 1),
342
+ allowMultiple: u.map(s ?? 1 / 0, (y) => y > 1),
343
343
  disabled: c,
344
- onChange: w,
345
- content: x
344
+ onChange: x,
345
+ content: v
346
346
  }),
347
347
  E(
348
348
  d,
@@ -350,45 +350,45 @@ const wt = (e, ...t) => {
350
350
  f,
351
351
  () => L(
352
352
  $.div(
353
- l.class("bc-file-input__file-list"),
354
- de(f, (y, v) => {
355
- const I = v.index;
353
+ a.class("bc-file-input__file-list"),
354
+ de(f, (y, w) => {
355
+ const C = w.index;
356
356
  return $.div(
357
- l.class("bc-file-input__file-item"),
357
+ a.class("bc-file-input__file-item"),
358
358
  $.div(
359
- l.class("bc-file-input__file-icon"),
359
+ a.class("bc-file-input__file-icon"),
360
360
  Ve(y)
361
361
  ),
362
362
  $.div(
363
- l.class("bc-file-input__file-info"),
363
+ a.class("bc-file-input__file-info"),
364
364
  $.div(
365
- l.class("bc-file-input__file-name"),
366
- l.title(y.$.name),
365
+ a.class("bc-file-input__file-name"),
366
+ a.title(y.$.name),
367
367
  y.$.name
368
368
  ),
369
369
  $.div(
370
- l.class("bc-file-input__file-meta"),
371
- V(
370
+ a.class("bc-file-input__file-meta"),
371
+ B(
372
372
  y.$.size,
373
- C.$.fileSizeUnits
373
+ I.$.fileSizeUnits
374
374
  )(
375
375
  (M, A) => st(M, { units: A })
376
376
  ),
377
377
  " • ",
378
- V(
378
+ B(
379
379
  y.$.type,
380
- C.$.unknownType
380
+ I.$.unknownType
381
381
  )((M, A) => M || A)
382
382
  )
383
383
  ),
384
384
  me(
385
385
  {
386
386
  size: "sm",
387
- label: C.$.removeFile,
387
+ label: I.$.removeFile,
388
388
  disabled: c,
389
- onClick: () => _(I)
389
+ onClick: () => _(C)
390
390
  },
391
- l.class("bc-file-input__remove-button")
391
+ a.class("bc-file-input__remove-button")
392
392
  )
393
393
  );
394
394
  })
@@ -396,14 +396,14 @@ const wt = (e, ...t) => {
396
396
  E(
397
397
  f.map(({ length: y }) => y > 1),
398
398
  () => $.div(
399
- l.class(
399
+ a.class(
400
400
  "bc-file-input__clear-all-button-container"
401
401
  ),
402
402
  $.button(
403
- l.type("button"),
404
- l.class("bc-file-input__clear-all-button"),
405
- l.disabled(c),
406
- C.$.clearAllFiles,
403
+ a.type("button"),
404
+ a.class("bc-file-input__clear-all-button"),
405
+ a.disabled(c),
406
+ I.$.clearAllFiles,
407
407
  k.click((y) => {
408
408
  y.preventDefault(), y.stopPropagation(), b();
409
409
  })
@@ -459,22 +459,22 @@ function Ct(e) {
459
459
  onChange: r,
460
460
  onInput: n,
461
461
  ...s
462
- } = e, o = /* @__PURE__ */ new Map(), a = i.toSignal(t).map((h) => h.map((d, g) => {
463
- const f = o.get(d), m = It(d ?? ""), w = f?.type || yt(m), _ = f?.name ?? `file-${g}`, b = m.buffer.slice(
462
+ } = e, o = /* @__PURE__ */ new Map(), l = u.toSignal(t).map((h) => h.map((d, g) => {
463
+ const f = o.get(d), m = It(d ?? ""), x = f?.type || yt(m), _ = f?.name ?? `file-${g}`, b = m.buffer.slice(
464
464
  m.byteOffset,
465
465
  m.byteOffset + m.byteLength
466
- ), x = new Blob([b], { type: w });
467
- return new File([x], _, { type: w });
468
- })), u = (h) => (d) => {
466
+ ), v = new Blob([b], { type: x });
467
+ return new File([v], _, { type: x });
468
+ })), i = (h) => (d) => {
469
469
  h && $t(d).then((g) => {
470
470
  for (const [f, m] of g.entries())
471
471
  o.set(m, { name: d[f].name, type: d[f].type });
472
472
  h(g);
473
473
  });
474
- }, c = u(r), p = u(n);
474
+ }, c = i(r), p = i(n);
475
475
  return wt({
476
476
  ...s,
477
- value: a,
477
+ value: l,
478
478
  onChange: c,
479
479
  onInput: p
480
480
  });
@@ -489,7 +489,7 @@ function pn(e) {
489
489
  return Ct({
490
490
  ...s,
491
491
  maxFiles: 1,
492
- value: i.map(t, (o) => o == null ? [] : [o]),
492
+ value: u.map(t, (o) => o == null ? [] : [o]),
493
493
  onChange: (o) => {
494
494
  n?.(o[0]);
495
495
  },
@@ -516,8 +516,8 @@ function kt(e) {
516
516
  if (r) {
517
517
  const d = r[1];
518
518
  if (d.length === 8) {
519
- const g = parseInt(d.slice(0, 2), 16), f = parseInt(d.slice(2, 4), 16), m = parseInt(d.slice(4, 6), 16), w = parseInt(d.slice(6, 8), 16) / 255;
520
- return [g, f, m, w];
519
+ const g = parseInt(d.slice(0, 2), 16), f = parseInt(d.slice(2, 4), 16), m = parseInt(d.slice(4, 6), 16), x = parseInt(d.slice(6, 8), 16) / 255;
520
+ return [g, f, m, x];
521
521
  }
522
522
  if (d.length === 6)
523
523
  return [
@@ -527,8 +527,8 @@ function kt(e) {
527
527
  1
528
528
  ];
529
529
  if (d.length === 4) {
530
- const g = parseInt(d[0] + d[0], 16), f = parseInt(d[1] + d[1], 16), m = parseInt(d[2] + d[2], 16), w = parseInt(d[3] + d[3], 16) / 255;
531
- return [g, f, m, w];
530
+ const g = parseInt(d[0] + d[0], 16), f = parseInt(d[1] + d[1], 16), m = parseInt(d[2] + d[2], 16), x = parseInt(d[3] + d[3], 16) / 255;
531
+ return [g, f, m, x];
532
532
  }
533
533
  if (d.length === 3) {
534
534
  const g = parseInt(d[0] + d[0], 16), f = parseInt(d[1] + d[1], 16), m = parseInt(d[2] + d[2], 16);
@@ -554,22 +554,22 @@ function kt(e) {
554
554
  /^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i
555
555
  );
556
556
  if (o) {
557
- const d = parseFloat(o[1]), g = parseFloat(o[2]), f = parseFloat(o[3]), m = o[4] != null ? parseFloat(o[4]) : 1, [w, _, b] = Pe(d, g / 100, f / 100);
558
- return [w, _, b, m];
557
+ const d = parseFloat(o[1]), g = parseFloat(o[2]), f = parseFloat(o[3]), m = o[4] != null ? parseFloat(o[4]) : 1, [x, _, b] = Pe(d, g / 100, f / 100);
558
+ return [x, _, b, m];
559
559
  }
560
- const a = e.match(
560
+ const l = e.match(
561
561
  /^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i
562
562
  );
563
- if (a) {
564
- const d = parseFloat(a[1]), g = parseFloat(a[2]) / 100, f = parseFloat(a[3]) / 100, m = a[4] != null ? parseFloat(a[4]) : 1, [w, _, b] = Tt(d, g, f);
565
- return [w, _, b, m];
563
+ if (l) {
564
+ const d = parseFloat(l[1]), g = parseFloat(l[2]) / 100, f = parseFloat(l[3]) / 100, m = l[4] != null ? parseFloat(l[4]) : 1, [x, _, b] = Dt(d, g, f);
565
+ return [x, _, b, m];
566
566
  }
567
- const u = e.match(
567
+ const i = e.match(
568
568
  /^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i
569
569
  );
570
- if (u) {
571
- const d = u[1], g = parseFloat(u[2]), f = parseFloat(u[3]), m = u[4] != null ? parseFloat(u[4]) : 1, w = d.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(d) / 100)) : Math.max(0, Math.min(1, parseFloat(d))), [_, b, x] = At(w, g, f);
572
- return [_, b, x, m];
570
+ if (i) {
571
+ const d = i[1], g = parseFloat(i[2]), f = parseFloat(i[3]), m = i[4] != null ? parseFloat(i[4]) : 1, x = d.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(d) / 100)) : Math.max(0, Math.min(1, parseFloat(d))), [_, b, v] = At(x, g, f);
572
+ return [_, b, v, m];
573
573
  }
574
574
  const [c, p, h] = Ie(e);
575
575
  return [c, p, h, 1];
@@ -578,7 +578,7 @@ const Mt = (e, t, r, n) => `rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.roun
578
578
  0,
579
579
  Math.min(1, Math.round(n * 100) / 100)
580
580
  )})`;
581
- function St(e) {
581
+ function Tt(e) {
582
582
  let t = e + 1831565813;
583
583
  return function() {
584
584
  return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
@@ -587,27 +587,27 @@ function St(e) {
587
587
  function Pe(e, t, r) {
588
588
  e = (e % 360 + 360) % 360;
589
589
  const n = (1 - Math.abs(2 * r - 1)) * t, s = n * (1 - Math.abs(e / 60 % 2 - 1)), o = r - n / 2;
590
- let a = 0, u = 0, c = 0;
591
- return 0 <= e && e < 60 ? [a, u, c] = [n, s, 0] : 60 <= e && e < 120 ? [a, u, c] = [s, n, 0] : 120 <= e && e < 180 ? [a, u, c] = [0, n, s] : 180 <= e && e < 240 ? [a, u, c] = [0, s, n] : 240 <= e && e < 300 ? [a, u, c] = [s, 0, n] : [a, u, c] = [n, 0, s], [
592
- Math.round((a + o) * 255),
593
- Math.round((u + o) * 255),
590
+ let l = 0, i = 0, c = 0;
591
+ return 0 <= e && e < 60 ? [l, i, c] = [n, s, 0] : 60 <= e && e < 120 ? [l, i, c] = [s, n, 0] : 120 <= e && e < 180 ? [l, i, c] = [0, n, s] : 180 <= e && e < 240 ? [l, i, c] = [0, s, n] : 240 <= e && e < 300 ? [l, i, c] = [s, 0, n] : [l, i, c] = [n, 0, s], [
592
+ Math.round((l + o) * 255),
593
+ Math.round((i + o) * 255),
594
594
  Math.round((c + o) * 255)
595
595
  ];
596
596
  }
597
- function Tt(e, t, r) {
597
+ function Dt(e, t, r) {
598
598
  e = (e % 360 + 360) % 360;
599
599
  const n = t + r;
600
600
  n > 1 && (t /= n, r /= n);
601
- const [s, o, a] = Pe(e, 1, 0.5).map((d) => d / 255), u = 1 - t - r, c = s * u + t, p = o * u + t, h = a * u + t;
601
+ const [s, o, l] = Pe(e, 1, 0.5).map((d) => d / 255), i = 1 - t - r, c = s * i + t, p = o * i + t, h = l * i + t;
602
602
  return [Math.round(c * 255), Math.round(p * 255), Math.round(h * 255)];
603
603
  }
604
604
  function ke(e, t, r) {
605
605
  e /= 255, t /= 255, r /= 255;
606
606
  const n = Math.max(e, t, r), s = Math.min(e, t, r);
607
- let o = 0, a = 0;
608
- const u = (n + s) / 2, c = n - s;
607
+ let o = 0, l = 0;
608
+ const i = (n + s) / 2, c = n - s;
609
609
  if (c !== 0) {
610
- switch (a = u > 0.5 ? c / (2 - n - s) : c / (n + s), n) {
610
+ switch (l = i > 0.5 ? c / (2 - n - s) : c / (n + s), n) {
611
611
  case e:
612
612
  o = (t - r) / c + (t < r ? 6 : 0);
613
613
  break;
@@ -619,11 +619,11 @@ function ke(e, t, r) {
619
619
  }
620
620
  o *= 60;
621
621
  }
622
- return [Math.round(o), Math.round(a * 100), Math.round(u * 100)];
622
+ return [Math.round(o), Math.round(l * 100), Math.round(i * 100)];
623
623
  }
624
- function Dt(e, t, r) {
625
- const [n] = ke(e, t, r), s = e / 255, o = t / 255, a = r / 255, u = Math.min(s, o, a), c = 1 - Math.max(s, o, a);
626
- return [n, Math.round(u * 100), Math.round(c * 100)];
624
+ function St(e, t, r) {
625
+ const [n] = ke(e, t, r), s = e / 255, o = t / 255, l = r / 255, i = Math.min(s, o, l), c = 1 - Math.max(s, o, l);
626
+ return [n, Math.round(i * 100), Math.round(c * 100)];
627
627
  }
628
628
  function xe(e) {
629
629
  const t = e / 255;
@@ -634,20 +634,20 @@ function we(e) {
634
634
  return Math.round(Math.max(0, Math.min(1, t)) * 255);
635
635
  }
636
636
  function At(e, t, r) {
637
- const n = r * Math.PI / 180, s = Math.cos(n) * t, o = Math.sin(n) * t, a = e + 0.3963377774 * s + 0.2158037573 * o, u = e - 0.1055613458 * s - 0.0638541728 * o, c = e - 0.0894841775 * s - 1.291485548 * o, p = a * a * a, h = u * u * u, d = c * c * c, g = 4.0767416621 * p - 3.3077115913 * h + 0.2309699292 * d, f = -1.2684380046 * p + 2.6097574011 * h - 0.3413193965 * d, m = -0.0041960863 * p - 0.7034186147 * h + 1.707614701 * d;
637
+ const n = r * Math.PI / 180, s = Math.cos(n) * t, o = Math.sin(n) * t, l = e + 0.3963377774 * s + 0.2158037573 * o, i = e - 0.1055613458 * s - 0.0638541728 * o, c = e - 0.0894841775 * s - 1.291485548 * o, p = l * l * l, h = i * i * i, d = c * c * c, g = 4.0767416621 * p - 3.3077115913 * h + 0.2309699292 * d, f = -1.2684380046 * p + 2.6097574011 * h - 0.3413193965 * d, m = -0.0041960863 * p - 0.7034186147 * h + 1.707614701 * d;
638
638
  return [we(g), we(f), we(m)];
639
639
  }
640
640
  function Ft(e, t, r) {
641
- const n = xe(e), s = xe(t), o = xe(r), a = 0.4122214708 * n + 0.5363325363 * s + 0.0514459929 * o, u = 0.2119034982 * n + 0.6806995451 * s + 0.1073969566 * o, c = 0.0883024619 * n + 0.2817188376 * s + 0.6299787005 * o, p = Math.cbrt(a), h = Math.cbrt(u), d = Math.cbrt(c), g = 0.2104542553 * p + 0.793617785 * h - 0.0040720468 * d, f = 1.9779984951 * p - 2.428592205 * h + 0.4505937099 * d, m = 0.0259040371 * p + 0.7827717662 * h - 0.808675766 * d, w = Math.sqrt(f * f + m * m);
641
+ const n = xe(e), s = xe(t), o = xe(r), l = 0.4122214708 * n + 0.5363325363 * s + 0.0514459929 * o, i = 0.2119034982 * n + 0.6806995451 * s + 0.1073969566 * o, c = 0.0883024619 * n + 0.2817188376 * s + 0.6299787005 * o, p = Math.cbrt(l), h = Math.cbrt(i), d = Math.cbrt(c), g = 0.2104542553 * p + 0.793617785 * h - 0.0040720468 * d, f = 1.9779984951 * p - 2.428592205 * h + 0.4505937099 * d, m = 0.0259040371 * p + 0.7827717662 * h - 0.808675766 * d, x = Math.sqrt(f * f + m * m);
642
642
  let _ = Math.atan2(m, f) * 180 / Math.PI;
643
- return _ < 0 && (_ += 360), [g, w, _];
643
+ return _ < 0 && (_ += 360), [g, x, _];
644
644
  }
645
- function ce(e, t, r, n, s, o) {
645
+ function oe(e, t, r, n, s, o) {
646
646
  switch (s) {
647
647
  case "hex":
648
648
  if (o) {
649
- const a = (c) => c.toString(16).padStart(2, "0"), u = Math.max(0, Math.min(255, Math.round(n * 255)));
650
- return `#${a(e)}${a(t)}${a(r)}${a(u)}`;
649
+ const l = (c) => c.toString(16).padStart(2, "0"), i = Math.max(0, Math.min(255, Math.round(n * 255)));
650
+ return `#${l(e)}${l(t)}${l(r)}${l(i)}`;
651
651
  }
652
652
  return Ce(e, t, r);
653
653
  case "rgb":
@@ -655,157 +655,157 @@ function ce(e, t, r, n, s, o) {
655
655
  case "rgba":
656
656
  return `rgba(${e}, ${t}, ${r}, ${Math.round(n * 100) / 100})`;
657
657
  case "hsl": {
658
- const [a, u, c] = ke(e, t, r);
659
- return `hsl(${a}, ${u}%, ${c}%)`;
658
+ const [l, i, c] = ke(e, t, r);
659
+ return `hsl(${l}, ${i}%, ${c}%)`;
660
660
  }
661
661
  case "hsla": {
662
- const [a, u, c] = ke(e, t, r);
663
- return `hsla(${a}, ${u}%, ${c}%, ${Math.round(n * 100) / 100})`;
662
+ const [l, i, c] = ke(e, t, r);
663
+ return `hsla(${l}, ${i}%, ${c}%, ${Math.round(n * 100) / 100})`;
664
664
  }
665
665
  case "hwb": {
666
- const [a, u, c] = Dt(e, t, r);
667
- return n < 1 ? `hwb(${a} ${u}% ${c}% / ${Math.round(n * 100) / 100})` : `hwb(${a} ${u}% ${c}%)`;
666
+ const [l, i, c] = St(e, t, r);
667
+ return n < 1 ? `hwb(${l} ${i}% ${c}% / ${Math.round(n * 100) / 100})` : `hwb(${l} ${i}% ${c}%)`;
668
668
  }
669
669
  case "oklch": {
670
- const [a, u, c] = Ft(e, t, r), p = (Math.round(a * 1e3) / 1e3).toFixed(3), h = (Math.round(u * 1e3) / 1e3).toFixed(3), d = (Math.round(c * 10) / 10).toFixed(1), g = Math.round(n * 100) / 100;
670
+ const [l, i, c] = Ft(e, t, r), p = (Math.round(l * 1e3) / 1e3).toFixed(3), h = (Math.round(i * 1e3) / 1e3).toFixed(3), d = (Math.round(c * 10) / 10).toFixed(1), g = Math.round(n * 100) / 100;
671
671
  return o || n < 1 ? `oklch(${p} ${h} ${d} / ${g})` : `oklch(${p} ${h} ${d})`;
672
672
  }
673
673
  }
674
674
  }
675
- function ie(e, t) {
675
+ function ce(e, t) {
676
676
  return t ? e === "rgb" ? "rgba" : e === "hsl" ? "hsla" : e : e === "rgba" ? "rgb" : e === "hsla" ? "hsl" : e;
677
677
  }
678
678
  function Bt(e, t) {
679
- const [r, n, s] = e, o = r << 16 ^ n << 8 ^ s, a = St(o), u = 6 + Math.floor(a() * 5), c = 0.18 + a() * 0.06, p = [];
680
- for (let f = 0; f < u; f++) {
681
- const m = f / u * Math.PI * 2, w = t * (1 + (a() * 2 - 1) * c), _ = Math.cos(m) * w, b = Math.sin(m) * w;
679
+ const [r, n, s] = e, o = r << 16 ^ n << 8 ^ s, l = Tt(o), i = 6 + Math.floor(l() * 5), c = 0.18 + l() * 0.06, p = [];
680
+ for (let f = 0; f < i; f++) {
681
+ const m = f / i * Math.PI * 2, x = t * (1 + (l() * 2 - 1) * c), _ = Math.cos(m) * x, b = Math.sin(m) * x;
682
682
  p.push({ x: _, y: b });
683
683
  }
684
- const h = (p[0].x + p[u - 1].x) / 2, d = (p[0].y + p[u - 1].y) / 2;
684
+ const h = (p[0].x + p[i - 1].x) / 2, d = (p[0].y + p[i - 1].y) / 2;
685
685
  let g = `M ${h.toFixed(3)} ${d.toFixed(3)}`;
686
- for (let f = 0; f < u; f++) {
687
- const m = p[f], w = p[(f + 1) % u], _ = (m.x + w.x) / 2, b = (m.y + w.y) / 2;
686
+ for (let f = 0; f < i; f++) {
687
+ const m = p[f], x = p[(f + 1) % i], _ = (m.x + x.x) / 2, b = (m.y + x.y) / 2;
688
688
  g += ` Q ${m.x.toFixed(3)} ${m.y.toFixed(3)} ${_.toFixed(3)} ${b.toFixed(3)}`;
689
689
  }
690
690
  return g += " Z", g;
691
691
  }
692
692
  const dn = (e) => {
693
- const { value: t, onBlur: r, onChange: n, onInput: s, displayValue: o, size: a, withAlpha: u } = e, c = i.map(a ?? 32, (v) => v), p = i.map(t, (v) => kt(v ?? "#000000")), h = i.map(
693
+ const { value: t, onBlur: r, onChange: n, onInput: s, displayValue: o, size: l, withAlpha: i } = e, c = u.map(l ?? 32, (w) => w), p = u.map(t, (w) => kt(w ?? "#000000")), h = u.map(
694
694
  p,
695
- ([v, I, M]) => [v, I, M]
696
- ), d = i.map(p, ([, , , v]) => v), g = K(i.get(d) ?? 1), f = i.map(u ?? !1, (v) => v), m = i.map(
695
+ ([w, C, M]) => [w, C, M]
696
+ ), d = u.map(p, ([, , , w]) => w), g = K(u.get(d) ?? 1), f = u.map(i ?? !1, (w) => w), m = u.map(
697
697
  e.colorTextFormat ?? "rgb",
698
- (v) => v
699
- ), w = V(
698
+ (w) => w
699
+ ), x = B(
700
700
  h,
701
701
  g,
702
702
  m,
703
703
  f
704
704
  )(
705
- ([v, I, M], A, F, T) => ce(v, I, M, A ?? 1, ie(F, T), T)
706
- ), _ = i.map(
705
+ ([w, C, M], A, F, D) => oe(w, C, M, A ?? 1, ce(F, D), D)
706
+ ), _ = u.map(
707
707
  e.colorTextFormat ?? "hex",
708
- (v) => v
709
- ), b = i.map(c, (v) => `-${v / 2} -${v / 2} ${v} ${v}`), x = V(
708
+ (w) => w
709
+ ), b = u.map(c, (w) => `-${w / 2} -${w / 2} ${w} ${w}`), v = B(
710
710
  h,
711
711
  c
712
- )((v, I) => Bt(v, I / 2)), S = V(
712
+ )((w, C) => Bt(w, C / 2)), T = B(
713
713
  h,
714
714
  g,
715
715
  f
716
716
  )(
717
- ([v, I, M], A, F) => F || A < 1 ? Mt(v, I, M, A) : Ce(v, I, M)
718
- ), C = $.div(
719
- l.class("bc-color-input__control"),
720
- l.class(
721
- i.map(
717
+ ([w, C, M], A, F) => F || A < 1 ? Mt(w, C, M, A) : Ce(w, C, M)
718
+ ), I = $.div(
719
+ a.class("bc-color-input__control"),
720
+ a.class(
721
+ u.map(
722
722
  f,
723
- (v) => v ? "bc-color-input__control--alpha" : ""
723
+ (w) => w ? "bc-color-input__control--alpha" : ""
724
724
  )
725
725
  ),
726
- l.style(V(c)((v) => `width:${v}px;height:${v}px`)),
726
+ a.style(B(c)((w) => `width:${w}px;height:${w}px`)),
727
727
  // The SVG blob preview
728
- De.svg(
729
- l.class("bc-color-input__svg"),
728
+ Se.svg(
729
+ a.class("bc-color-input__svg"),
730
730
  be.viewBox(b),
731
- De.path(be.d(x), be.fill(S))
731
+ Se.path(be.d(v), be.fill(T))
732
732
  ),
733
733
  // Invisible native input overlays the blob for picker and accessibility
734
734
  $.input(
735
- l.type("color"),
735
+ a.type("color"),
736
736
  Y(e),
737
737
  // Native color input needs hex without alpha
738
- l.value(i.map(h, ([v, I, M]) => Ce(v, I, M))),
739
- l.class("bc-input bc-color-input bc-color-input__native"),
740
- r != null ? k.blur(r) : D,
741
- n != null ? k.change((v) => {
742
- const I = v.target.value;
738
+ a.value(u.map(h, ([w, C, M]) => Ce(w, C, M))),
739
+ a.class("bc-input bc-color-input bc-color-input__native"),
740
+ r != null ? k.blur(r) : S,
741
+ n != null ? k.change((w) => {
742
+ const C = w.target.value;
743
743
  if (!n) return;
744
- const [M, A, F] = Ie(I), T = i.get(g) ?? 1, B = ie(
745
- i.get(_),
746
- i.get(f)
747
- ), z = ce(M, A, F, T, B, i.get(f));
744
+ const [M, A, F] = Ie(C), D = u.get(g) ?? 1, V = ce(
745
+ u.get(_),
746
+ u.get(f)
747
+ ), z = oe(M, A, F, D, V, u.get(f));
748
748
  n(z);
749
- }) : D,
750
- s != null ? k.input((v) => {
751
- const I = v.target.value;
749
+ }) : S,
750
+ s != null ? k.input((w) => {
751
+ const C = w.target.value;
752
752
  if (!s) return;
753
- const [M, A, F] = Ie(I), T = i.get(g) ?? 1, B = ie(
754
- i.get(_),
755
- i.get(f)
756
- ), z = ce(M, A, F, T, B, i.get(f));
753
+ const [M, A, F] = Ie(C), D = u.get(g) ?? 1, V = ce(
754
+ u.get(_),
755
+ u.get(f)
756
+ ), z = oe(M, A, F, D, V, u.get(f));
757
757
  s(z);
758
- }) : D
758
+ }) : S
759
759
  )
760
760
  ), y = E(
761
761
  f,
762
762
  () => $.input(
763
- l.type("range"),
764
- l.class("bc-color-input__alpha"),
765
- l.min(0),
766
- l.max(1),
767
- l.step(0.01),
768
- l.value(i.map(g, (v) => String(v ?? 1))),
769
- l.disabled(e.disabled),
770
- k.input((v) => {
771
- const I = parseFloat(v.target.value);
772
- g.set(I);
773
- const [M, A, F] = i.get(h), T = ie(
774
- i.get(_),
775
- i.get(f)
776
- ), B = ce(M, A, F, I, T, i.get(f));
777
- s?.(B);
763
+ a.type("range"),
764
+ a.class("bc-color-input__alpha"),
765
+ a.min(0),
766
+ a.max(1),
767
+ a.step(0.01),
768
+ a.value(u.map(g, (w) => String(w ?? 1))),
769
+ a.disabled(e.disabled),
770
+ k.input((w) => {
771
+ const C = parseFloat(w.target.value);
772
+ g.set(C);
773
+ const [M, A, F] = u.get(h), D = ce(
774
+ u.get(_),
775
+ u.get(f)
776
+ ), V = oe(M, A, F, C, D, u.get(f));
777
+ s?.(V);
778
778
  }),
779
- k.change((v) => {
780
- const I = parseFloat(v.target.value);
781
- g.set(I);
782
- const [M, A, F] = i.get(h), T = ie(
783
- i.get(_),
784
- i.get(f)
785
- ), B = ce(M, A, F, I, T, i.get(f));
786
- n?.(B);
779
+ k.change((w) => {
780
+ const C = parseFloat(w.target.value);
781
+ g.set(C);
782
+ const [M, A, F] = u.get(h), D = ce(
783
+ u.get(_),
784
+ u.get(f)
785
+ ), V = oe(M, A, F, C, D, u.get(f));
786
+ n?.(V);
787
787
  })
788
788
  )
789
789
  );
790
- return H({
790
+ return j({
791
791
  baseContainer: !0,
792
792
  ...e,
793
793
  // ensure our control does not try to grow
794
794
  growInput: !1,
795
- input: C,
795
+ input: I,
796
796
  // If caller provided an `after`, append RGB before it
797
797
  after: L(
798
798
  E(
799
799
  o ?? !1,
800
- () => $.span(l.class("bc-color-input__rgb"), w)
800
+ () => $.span(a.class("bc-color-input__rgb"), x)
801
801
  ),
802
802
  y,
803
803
  e.after
804
804
  )
805
805
  });
806
- }, Me = "$$tts-exp-", Vt = (e, t) => ne((r) => {
806
+ }, Me = "$$tts-exp-", Vt = (e, t) => ie((r) => {
807
807
  const n = `${Me}${e}`;
808
- return j(i.on(t, (s) => Reflect.set(r, n, s)));
808
+ return W(u.on(t, (s) => Reflect.set(r, n, s)));
809
809
  }), mn = (e, t) => {
810
810
  const r = `${Me}${e}`;
811
811
  return (n) => {
@@ -814,8 +814,8 @@ const dn = (e) => {
814
814
  }, Lt = (e, t) => {
815
815
  const r = `${Me}${e}`;
816
816
  return (n) => {
817
- const s = n.target, o = s.selectedIndex, a = s.options[o];
818
- t(Reflect.get(a, r));
817
+ const s = n.target, o = s.selectedIndex, l = s.options[o];
818
+ t(Reflect.get(l, r));
819
819
  };
820
820
  };
821
821
  function Et(e, t, r) {
@@ -824,16 +824,16 @@ function Et(e, t, r) {
824
824
  }
825
825
  function hn({ variant: e = "default", size: t = "md", roundedness: r = "lg" } = {}, ...n) {
826
826
  return $.div(
827
- l.class(
828
- V(
827
+ a.class(
828
+ B(
829
829
  e,
830
830
  t,
831
831
  r
832
832
  )(
833
- (s, o, a) => Et(
833
+ (s, o, l) => Et(
834
834
  s ?? "default",
835
835
  o ?? "md",
836
- a ?? "lg"
836
+ l ?? "lg"
837
837
  )
838
838
  )
839
839
  ),
@@ -847,30 +847,30 @@ const bn = ({
847
847
  placeholder: n,
848
848
  disabled: s
849
849
  }) => {
850
- const o = i.deriveProp(e ?? !1), a = K(!1), u = i.map(s ?? !1, (c) => c);
850
+ const o = u.deriveProp(e ?? !1), l = K(!1), i = u.map(s ?? !1, (c) => c);
851
851
  return $.div(
852
- l.class("bc-editable-text"),
853
- l.class(
854
- i.map(
855
- u,
852
+ a.class("bc-editable-text"),
853
+ a.class(
854
+ u.map(
855
+ i,
856
856
  (c) => c ? "bc-editable-text--disabled" : ""
857
857
  )
858
858
  ),
859
- O.disabled(u),
859
+ N.disabled(i),
860
860
  E(
861
861
  o,
862
862
  () => $.input(
863
- l.placeholder(n),
864
- l.value(t),
865
- l.class("bc-editable-text__input"),
863
+ a.placeholder(n),
864
+ a.value(t),
865
+ a.class("bc-editable-text__input"),
866
866
  nt(),
867
867
  k.keydown((c) => {
868
- c.key === "Enter" ? o.set(!1) : c.key === "Escape" && (a.set(!0), o.set(!1));
868
+ c.key === "Enter" ? o.set(!1) : c.key === "Escape" && (l.set(!0), o.set(!1));
869
869
  }),
870
870
  k.blur(
871
871
  P((c) => {
872
- if (o.set(!1), a.value) {
873
- a.set(!1);
872
+ if (o.set(!1), l.value) {
873
+ l.set(!1);
874
874
  return;
875
875
  }
876
876
  r(c);
@@ -879,24 +879,24 @@ const bn = ({
879
879
  ),
880
880
  () => $.span(
881
881
  k.click(() => {
882
- i.get(u) || o.set(!0);
882
+ u.get(i) || o.set(!0);
883
883
  }),
884
- l.class("bc-editable-text__display"),
884
+ a.class("bc-editable-text__display"),
885
885
  E(
886
- i.map(t, (c) => c != null && c.trim() !== ""),
887
- () => $.span(l.class("bc-editable-text__text"), t),
886
+ u.map(t, (c) => c != null && c.trim() !== ""),
887
+ () => $.span(a.class("bc-editable-text__text"), t),
888
888
  () => $.span(
889
- l.class("bc-editable-text__placeholder"),
889
+ a.class("bc-editable-text__placeholder"),
890
890
  n
891
891
  )
892
892
  ),
893
893
  E(
894
- i.map(u, (c) => !c),
894
+ u.map(i, (c) => !c),
895
895
  () => $.button(
896
- l.class("bc-editable-text__edit-button"),
897
- R(W, (c) => O.label(c.$.editLabel)),
896
+ a.class("bc-editable-text__edit-button"),
897
+ O(H, (c) => N.label(c.$.editLabel)),
898
898
  k.click(() => o.set(!0)),
899
- N({ icon: "line-md/pencil", color: "neutral" })
899
+ R({ icon: "line-md/pencil", color: "neutral" })
900
900
  )
901
901
  )
902
902
  )
@@ -906,19 +906,19 @@ const bn = ({
906
906
  e,
907
907
  (n) => qe(n, {
908
908
  value: (s) => {
909
- const o = V(
909
+ const o = B(
910
910
  s,
911
911
  r
912
- )((a, u) => t(a.value, u));
912
+ )((l, i) => t(l.value, i));
913
913
  return $.option(
914
- j(o.dispose),
915
- l.selected(o),
914
+ W(o.dispose),
915
+ a.selected(o),
916
916
  Vt("value", s.$.value),
917
917
  s.$.label
918
918
  );
919
919
  },
920
920
  group: (s) => $.optgroup(
921
- l.label(s.$.group),
921
+ a.label(s.$.group),
922
922
  de(
923
923
  s.$.options,
924
924
  (o) => je(
@@ -937,42 +937,42 @@ const bn = ({
937
937
  onChange: n,
938
938
  options: s,
939
939
  unselectedLabel: o,
940
- equality: a = (p, h) => p === h,
941
- after: u
940
+ equality: l = (p, h) => p === h,
941
+ after: i
942
942
  } = e;
943
943
  let c;
944
- return H(
944
+ return j(
945
945
  {
946
946
  ...e,
947
947
  after: L(
948
- N({
948
+ R({
949
949
  icon: "ph:caret-down-bold",
950
950
  color: "neutral",
951
951
  size: "sm"
952
952
  }),
953
- u
953
+ i
954
954
  ),
955
955
  input: $.select(
956
- ne((p) => {
956
+ ie((p) => {
957
957
  c = p;
958
958
  const h = new MutationObserver((d) => {
959
959
  const { removedNodes: g } = d[0];
960
960
  g.length > 0 && (c.selectedIndex = 0);
961
961
  });
962
- return h.observe(p, { childList: !0 }), j(() => h.disconnect());
962
+ return h.observe(p, { childList: !0 }), W(() => h.disconnect());
963
963
  }),
964
964
  Y(e),
965
- l.class("bc-native-select bc-input bu-w-full"),
966
- R(
967
- W,
965
+ a.class("bc-native-select bc-input bu-w-full"),
966
+ O(
967
+ H,
968
968
  (p) => $.option(
969
- l.hidden("hidden"),
969
+ a.hidden("hidden"),
970
970
  Xe(o, p.$.selectOne)
971
971
  )
972
972
  ),
973
- de(s, (p) => je(p, a, t)),
974
- r != null ? k.blur(r) : D,
975
- n != null ? k.change(Lt("value", (p) => n(p))) : D
973
+ de(s, (p) => je(p, l, t)),
974
+ r != null ? k.blur(r) : S,
975
+ n != null ? k.change(Lt("value", (p) => n(p))) : S
976
976
  )
977
977
  },
978
978
  k.click(() => {
@@ -985,7 +985,7 @@ function Nt(e) {
985
985
  return Ut({
986
986
  ...s,
987
987
  value: t.value,
988
- onChange: at(t, r),
988
+ onChange: lt(t, r),
989
989
  onBlur: rt(t, n)
990
990
  });
991
991
  }
@@ -995,25 +995,25 @@ function gn(e) {
995
995
  content: Nt(e)
996
996
  });
997
997
  }
998
- function zt(e, t, r) {
998
+ function Rt(e, t, r) {
999
999
  const n = e.length.map((s) => s);
1000
1000
  return L(
1001
- j(() => n.dispose()),
1002
- ze(
1001
+ W(() => n.dispose()),
1002
+ Re(
1003
1003
  n,
1004
1004
  (s) => {
1005
- const o = e.item(s.index), a = [];
1005
+ const o = e.item(s.index), l = [];
1006
1006
  return L(
1007
- j(() => {
1008
- o.dispose(), a.forEach((u) => u());
1007
+ W(() => {
1008
+ o.dispose(), l.forEach((i) => i());
1009
1009
  }),
1010
1010
  t({
1011
1011
  list: e,
1012
1012
  item: o,
1013
1013
  position: s,
1014
1014
  remove: () => e.removeAt(s.index),
1015
- move: (u) => {
1016
- switch (u) {
1015
+ move: (i) => {
1016
+ switch (i) {
1017
1017
  case "up":
1018
1018
  if (s.index === 0) return;
1019
1019
  e.move(s.index, s.index - 1);
@@ -1029,27 +1029,27 @@ function zt(e, t, r) {
1029
1029
  e.move(s.index, e.length.value - 1);
1030
1030
  }
1031
1031
  },
1032
- canMove: (u) => {
1032
+ canMove: (i) => {
1033
1033
  const c = (() => {
1034
- switch (u) {
1034
+ switch (i) {
1035
1035
  case "up":
1036
1036
  return Ae(s.index > 0);
1037
1037
  case "down":
1038
1038
  return e.length.map((p) => s.index < p - 1);
1039
1039
  }
1040
1040
  })();
1041
- return a.push(() => c.dispose()), c;
1041
+ return l.push(() => c.dispose()), c;
1042
1042
  },
1043
- cannotMove: (u) => {
1043
+ cannotMove: (i) => {
1044
1044
  const c = (() => {
1045
- switch (u) {
1045
+ switch (i) {
1046
1046
  case "up":
1047
1047
  return Ae(s.index === 0);
1048
1048
  case "down":
1049
1049
  return e.length.map((p) => s.index === p - 1);
1050
1050
  }
1051
1051
  })();
1052
- return a.push(() => c.dispose()), c;
1052
+ return l.push(() => c.dispose()), c;
1053
1053
  }
1054
1054
  })
1055
1055
  );
@@ -1062,22 +1062,22 @@ const Le = {
1062
1062
  9: { pattern: /^[0-9]$/ },
1063
1063
  A: { pattern: /^[A-Za-z]$/, transform: (e) => e.toUpperCase() },
1064
1064
  "*": { pattern: /^.$/ }
1065
- }, Rt = (e) => e instanceof RegExp;
1065
+ }, zt = (e) => e instanceof RegExp;
1066
1066
  function He(e, t, r) {
1067
1067
  if (e == null) return [];
1068
- const n = r ? { ...Le, ...t } : t ?? Le, s = (a, u) => {
1069
- const c = n[u];
1070
- c ? a.push({ type: "pattern", name: u, ...c }) : a.push({ type: "literal", char: u });
1068
+ const n = r ? { ...Le, ...t } : t ?? Le, s = (l, i) => {
1069
+ const c = n[i];
1070
+ c ? l.push({ type: "pattern", name: i, ...c }) : l.push({ type: "literal", char: i });
1071
1071
  }, o = [];
1072
1072
  if (typeof e == "string") {
1073
- for (const a of e) s(o, a);
1073
+ for (const l of e) s(o, l);
1074
1074
  return o;
1075
1075
  }
1076
- for (const a of e)
1077
- if (typeof a == "string")
1078
- if (a.length <= 1) s(o, a);
1079
- else for (const u of a) s(o, u);
1080
- else Rt(a) ? o.push({ type: "pattern", pattern: a }) : typeof a == "object" && a && o.push(a);
1076
+ for (const l of e)
1077
+ if (typeof l == "string")
1078
+ if (l.length <= 1) s(o, l);
1079
+ else for (const i of l) s(o, i);
1080
+ else zt(l) ? o.push({ type: "pattern", pattern: l }) : typeof l == "object" && l && o.push(l);
1081
1081
  return o;
1082
1082
  }
1083
1083
  function Ot(e, t) {
@@ -1097,57 +1097,57 @@ function Ot(e, t) {
1097
1097
  };
1098
1098
  }
1099
1099
  function Ee(e, t, r, n, s, o) {
1100
- const a = {
1100
+ const l = {
1101
1101
  raw: e,
1102
1102
  previousConformed: t,
1103
1103
  cursor: s ?? e.length,
1104
1104
  completed: !1
1105
- }, u = n.definitions ?? {}, c = typeof r == "function" ? r(e, a) : r, p = He(
1105
+ }, i = n.definitions ?? {}, c = typeof r == "function" ? r(e, l) : r, p = He(
1106
1106
  c,
1107
- u,
1107
+ i,
1108
1108
  n.useDefaultDefinitions ?? !0
1109
1109
  ), h = Ot(n.allowMode, n.allow), d = /* @__PURE__ */ new Set();
1110
- for (const T of p) T.type === "literal" && d.add(T.char);
1111
- if (n.prefix) for (const T of n.prefix) d.add(T);
1112
- if (n.suffix) for (const T of n.suffix) d.add(T);
1113
- const g = Array.from(e).filter((T) => h(T) && !d.has(T));
1110
+ for (const D of p) D.type === "literal" && d.add(D.char);
1111
+ if (n.prefix) for (const D of n.prefix) d.add(D);
1112
+ if (n.suffix) for (const D of n.suffix) d.add(D);
1113
+ const g = Array.from(e).filter((D) => h(D) && !d.has(D));
1114
1114
  if (g.length === 0) return { value: "", cursor: 0, completed: !1 };
1115
1115
  const f = [], m = [];
1116
- let w = 0, _ = 0, b = 0, x = -1;
1117
- for (const T of p) {
1118
- if (T.type === "literal") {
1119
- f.push(T.char), m.push({ kind: "literal", filled: !0 });
1116
+ let x = 0, _ = 0, b = 0, v = -1;
1117
+ for (const D of p) {
1118
+ if (D.type === "literal") {
1119
+ f.push(D.char), m.push({ kind: "literal", filled: !0 });
1120
1120
  continue;
1121
1121
  }
1122
- _ += T.optional ? 0 : 1;
1123
- const B = g[w];
1124
- if (B == null)
1122
+ _ += D.optional ? 0 : 1;
1123
+ const V = g[x];
1124
+ if (V == null)
1125
1125
  break;
1126
- if (T.type === "any") {
1127
- b++, f.push(T.transform ? T.transform(B) : B), m.push({ kind: "slot", filled: !0 }), x = m.length - 1, w++;
1126
+ if (D.type === "any") {
1127
+ b++, f.push(D.transform ? D.transform(V) : V), m.push({ kind: "slot", filled: !0 }), v = m.length - 1, x++;
1128
1128
  continue;
1129
1129
  }
1130
- if (T.type === "pattern")
1131
- if (T.pattern.test(B)) {
1130
+ if (D.type === "pattern")
1131
+ if (D.pattern.test(V)) {
1132
1132
  b++;
1133
- const z = T.transform ? T.transform(B) : B;
1134
- f.push(z), m.push({ kind: "slot", filled: !0 }), x = m.length - 1, w++;
1133
+ const z = D.transform ? D.transform(V) : V;
1134
+ f.push(z), m.push({ kind: "slot", filled: !0 }), v = m.length - 1, x++;
1135
1135
  } else {
1136
- w++;
1136
+ x++;
1137
1137
  continue;
1138
1138
  }
1139
1139
  }
1140
- const S = f.join(""), C = (n.prefix ?? "") + S + (n.suffix ?? "");
1141
- let v = (n.prefix ?? "").length;
1142
- if (x >= 0) {
1143
- let T = x + 1;
1140
+ const T = f.join(""), I = (n.prefix ?? "") + T + (n.suffix ?? "");
1141
+ let w = (n.prefix ?? "").length;
1142
+ if (v >= 0) {
1143
+ let D = v + 1;
1144
1144
  if ((o?.policy ?? "smart") !== "sticky")
1145
- for (; T < m.length && m[T].kind === "literal"; ) T++;
1146
- v += T;
1145
+ for (; D < m.length && m[D].kind === "literal"; ) D++;
1146
+ w += D;
1147
1147
  }
1148
- const I = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= b : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(C) : _ > 0 && b >= _, M = n.pipe?.(C, { ...a, completed: I });
1149
- let A, F = v;
1150
- return M === !1 ? (A = t, F = t.length) : typeof M == "string" ? (A = M, F = M.length) : typeof M == "object" && M ? (A = M.value, F = M.cursor ?? M.value.length) : A = C, { value: A, cursor: F, completed: I };
1148
+ const C = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= b : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(I) : _ > 0 && b >= _, M = n.pipe?.(I, { ...l, completed: C });
1149
+ let A, F = w;
1150
+ return M === !1 ? (A = t, F = t.length) : typeof M == "string" ? (A = M, F = M.length) : typeof M == "object" && M ? (A = M.value, F = M.cursor ?? M.value.length) : A = I, { value: A, cursor: F, completed: C };
1151
1151
  }
1152
1152
  function Pt(e, t) {
1153
1153
  const r = t?.strategy ?? "none";
@@ -1160,8 +1160,8 @@ const We = (e) => {
1160
1160
  onChange: n,
1161
1161
  onInput: s,
1162
1162
  onAccept: o,
1163
- onComplete: a,
1164
- mask: u,
1163
+ onComplete: l,
1164
+ mask: i,
1165
1165
  definitions: c,
1166
1166
  useDefaultDefinitions: p,
1167
1167
  extraLiterals: h,
@@ -1169,131 +1169,131 @@ const We = (e) => {
1169
1169
  suffix: g,
1170
1170
  autofix: f,
1171
1171
  pipe: m,
1172
- completion: w,
1172
+ completion: x,
1173
1173
  unmask: _,
1174
1174
  allowMode: b,
1175
- allow: x,
1176
- placeholder: S,
1177
- placeholderOptions: C
1178
- } = e, y = V(
1175
+ allow: v,
1176
+ placeholder: T,
1177
+ placeholderOptions: I
1178
+ } = e, y = B(
1179
1179
  t,
1180
- u,
1180
+ i,
1181
1181
  c,
1182
1182
  p,
1183
1183
  h,
1184
1184
  d,
1185
1185
  g,
1186
1186
  f,
1187
- w,
1187
+ x,
1188
1188
  _,
1189
1189
  b,
1190
- S,
1191
- C
1192
- )((I, M, A, F, T, B, z, ae, le, ee, Q, ue, q) => M ? Ee(I ?? "", "", M, {
1190
+ T,
1191
+ I
1192
+ )((C, M, A, F, D, V, z, re, le, ee, Q, ue, q) => M ? Ee(C ?? "", "", M, {
1193
1193
  definitions: A ?? {},
1194
1194
  useDefaultDefinitions: F ?? !0,
1195
- extraLiterals: T ?? [],
1196
- autofix: ae ?? "none",
1195
+ extraLiterals: D ?? [],
1196
+ autofix: re ?? "none",
1197
1197
  completion: le ?? { mode: "mask" },
1198
1198
  pipe: m ?? ((U) => U),
1199
1199
  unmask: ee ?? { strategy: "none" },
1200
1200
  allowMode: Q ?? "all",
1201
- allow: x,
1202
- prefix: B,
1201
+ allow: v,
1202
+ prefix: V,
1203
1203
  suffix: z
1204
- }).value : I ?? ""), v = (I, M) => {
1205
- const A = I.value ?? "", F = i.get(t) ?? "", T = u != null ? i.get(u) : null, B = c != null ? i.get(c) : void 0, z = p != null ? i.get(p) : void 0, ae = h != null ? i.get(h) : void 0, le = f != null ? i.get(f) : void 0, ee = w != null ? i.get(w) : void 0, Q = _ != null ? i.get(_) : void 0, ue = b != null ? i.get(b) : void 0, q = d != null ? i.get(d) : void 0, U = g != null ? i.get(g) : void 0, {
1204
+ }).value : C ?? ""), w = (C, M) => {
1205
+ const A = C.value ?? "", F = u.get(t) ?? "", D = i != null ? u.get(i) : null, V = c != null ? u.get(c) : void 0, z = p != null ? u.get(p) : void 0, re = h != null ? u.get(h) : void 0, le = f != null ? u.get(f) : void 0, ee = x != null ? u.get(x) : void 0, Q = _ != null ? u.get(_) : void 0, ue = b != null ? u.get(b) : void 0, q = d != null ? u.get(d) : void 0, U = g != null ? u.get(g) : void 0, {
1206
1206
  value: J,
1207
1207
  cursor: he,
1208
- completed: Se
1209
- } = T ? Ee(
1208
+ completed: Te
1209
+ } = D ? Ee(
1210
1210
  A,
1211
1211
  F,
1212
- T,
1212
+ D,
1213
1213
  {
1214
- definitions: B ?? {},
1214
+ definitions: V ?? {},
1215
1215
  useDefaultDefinitions: z ?? !0,
1216
- extraLiterals: ae ?? [],
1216
+ extraLiterals: re ?? [],
1217
1217
  autofix: le ?? "none",
1218
1218
  completion: ee ?? { mode: "mask" },
1219
1219
  pipe: m ?? ((Ze) => Ze),
1220
1220
  unmask: Q ?? { strategy: "none" },
1221
1221
  allowMode: ue ?? "all",
1222
- allow: x,
1222
+ allow: v,
1223
1223
  prefix: q,
1224
1224
  suffix: U
1225
1225
  },
1226
- I.selectionStart ?? A.length,
1227
- e.cursor ? i.get(e.cursor) : void 0
1226
+ C.selectionStart ?? A.length,
1227
+ e.cursor ? u.get(e.cursor) : void 0
1228
1228
  ) : { value: A, cursor: A.length, completed: !0 };
1229
1229
  if (J !== A) {
1230
- I.value = J;
1230
+ C.value = J;
1231
1231
  try {
1232
- I.setSelectionRange(he, he);
1232
+ C.setSelectionRange(he, he);
1233
1233
  } catch {
1234
1234
  }
1235
1235
  }
1236
- const Te = Pt(J, Q);
1236
+ const De = Pt(J, Q);
1237
1237
  o?.({
1238
- raw: Te,
1238
+ raw: De,
1239
1239
  conformed: J,
1240
- completed: Se,
1240
+ completed: Te,
1241
1241
  cursor: he
1242
- }), M === "input" ? s?.(J) : (n?.(J), Se && a?.({ raw: Te, conformed: J }));
1242
+ }), M === "input" ? s?.(J) : (n?.(J), Te && l?.({ raw: De, conformed: J }));
1243
1243
  };
1244
- return H({
1244
+ return j({
1245
1245
  ...e,
1246
- input: se.text(
1246
+ input: ne.text(
1247
1247
  Y(e),
1248
- l.value(y),
1249
- l.class("bc-input"),
1250
- r != null ? k.blur(r) : D,
1251
- ne(
1252
- (I) => I instanceof HTMLInputElement ? L(
1253
- k.input(() => v(I, "input")),
1254
- k.change(() => v(I, "change")),
1248
+ a.value(y),
1249
+ a.class("bc-input"),
1250
+ r != null ? k.blur(r) : S,
1251
+ ie(
1252
+ (C) => C instanceof HTMLInputElement ? L(
1253
+ k.input(() => w(C, "input")),
1254
+ k.change(() => w(C, "change")),
1255
1255
  k.keydown((M) => {
1256
- if (M.key !== "Backspace" || !(e.cursor ? i.get(e.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1257
- const F = I.selectionStart ?? 0, T = I.selectionEnd ?? F;
1258
- if (F !== T || F <= 0) return;
1259
- const B = I.value ?? "", z = u != null ? i.get(u) : null;
1256
+ if (M.key !== "Backspace" || !(e.cursor ? u.get(e.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1257
+ const F = C.selectionStart ?? 0, D = C.selectionEnd ?? F;
1258
+ if (F !== D || F <= 0) return;
1259
+ const V = C.value ?? "", z = i != null ? u.get(i) : null;
1260
1260
  if (!z) return;
1261
- const ae = c != null ? i.get(c) : void 0, le = p != null ? i.get(p) : !0, ee = d != null ? i.get(d) : void 0, Q = g != null ? i.get(g) : void 0, ue = He(
1262
- typeof z == "function" ? z(B, {
1263
- raw: B,
1264
- previousConformed: B,
1261
+ const re = c != null ? u.get(c) : void 0, le = p != null ? u.get(p) : !0, ee = d != null ? u.get(d) : void 0, Q = g != null ? u.get(g) : void 0, ue = He(
1262
+ typeof z == "function" ? z(V, {
1263
+ raw: V,
1264
+ previousConformed: V,
1265
1265
  cursor: F,
1266
1266
  completed: !1
1267
1267
  }) : z,
1268
- ae ?? {},
1268
+ re ?? {},
1269
1269
  le ?? !0
1270
1270
  ), q = /* @__PURE__ */ new Set();
1271
1271
  for (const U of ue)
1272
1272
  U.type === "literal" && q.add(U.char);
1273
1273
  if (ee) for (const U of ee) q.add(U);
1274
1274
  if (Q) for (const U of Q) q.add(U);
1275
- if (q.has(B[F - 1])) {
1275
+ if (q.has(V[F - 1])) {
1276
1276
  let U = F - 1;
1277
- for (; U >= 0 && q.has(B[U]); ) U--;
1278
- U >= 0 && (M.preventDefault(), M.stopPropagation(), I.value = B.slice(0, U) + B.slice(U + 1), v(I, "input"));
1277
+ for (; U >= 0 && q.has(V[U]); ) U--;
1278
+ U >= 0 && (M.preventDefault(), M.stopPropagation(), C.value = V.slice(0, U) + V.slice(U + 1), w(C, "input"));
1279
1279
  }
1280
1280
  })
1281
- ) : D
1281
+ ) : S
1282
1282
  )
1283
1283
  )
1284
1284
  });
1285
1285
  };
1286
1286
  function X(e, t, r) {
1287
- const n = i.map(e, (o) => o != null), s = ye.clearValue;
1287
+ const n = u.map(e, (o) => o != null), s = ye.clearValue;
1288
1288
  return E(
1289
1289
  n,
1290
1290
  () => $.button(
1291
- l.type("button"),
1292
- l.class("bc-input-container__reset bu-text-light-gray"),
1293
- O.label(s),
1294
- l.title(s),
1295
- l.disabled(t ?? !1),
1296
- N({ icon: "mdi:close", size: "sm" }),
1291
+ a.type("button"),
1292
+ a.class("bc-input-container__reset bu-text-light-gray"),
1293
+ N.label(s),
1294
+ a.title(s),
1295
+ a.disabled(t ?? !1),
1296
+ R({ icon: "mdi:close", size: "sm" }),
1297
1297
  k.click((o) => {
1298
1298
  o.preventDefault(), o.stopPropagation(), r?.(null);
1299
1299
  })
@@ -1301,59 +1301,59 @@ function X(e, t, r) {
1301
1301
  );
1302
1302
  }
1303
1303
  const vn = (e) => {
1304
- const { value: t, onBlur: r, onChange: n, after: s, disabled: o } = e, a = X(t, o, n);
1305
- return H({
1304
+ const { value: t, onBlur: r, onChange: n, after: s, disabled: o } = e, l = X(t, o, n);
1305
+ return j({
1306
1306
  ...e,
1307
- input: se.date(
1307
+ input: ne.date(
1308
1308
  Y(e),
1309
- l.valueAsDate(t),
1310
- l.class("bc-input"),
1311
- r != null ? k.blur(P(r)) : D,
1312
- n != null ? k.change(Ge(n)) : D
1309
+ a.valueAsDate(t),
1310
+ a.class("bc-input"),
1311
+ r != null ? k.blur(P(r)) : S,
1312
+ n != null ? k.change(Ge(n)) : S
1313
1313
  ),
1314
- after: s != null ? L(a, s) : a
1314
+ after: s != null ? L(l, s) : l
1315
1315
  });
1316
1316
  }, jt = (e) => {
1317
- const t = e.getFullYear(), r = e.getMonth() + 1, n = e.getDate(), s = e.getHours(), o = e.getMinutes(), a = e.getSeconds();
1318
- return `${t}-${r.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${s.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
1317
+ const t = e.getFullYear(), r = e.getMonth() + 1, n = e.getDate(), s = e.getHours(), o = e.getMinutes(), l = e.getSeconds();
1318
+ return `${t}-${r.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${s.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}`;
1319
1319
  }, xn = (e) => {
1320
- const { value: t, onBlur: r, onChange: n, after: s, disabled: o } = e, a = i.map(t, (c) => c != null ? jt(c) : null), u = X(t, o, n);
1321
- return H({
1320
+ const { value: t, onBlur: r, onChange: n, after: s, disabled: o } = e, l = u.map(t, (c) => c != null ? jt(c) : null), i = X(t, o, n);
1321
+ return j({
1322
1322
  ...e,
1323
- input: se["datetime-local"](
1323
+ input: ne["datetime-local"](
1324
1324
  Y(e),
1325
- l.value(i.map(a, (c) => c ?? null)),
1326
- l.class("bc-input"),
1327
- r != null ? k.blur(P(r)) : D,
1328
- n != null ? k.change(Qe(n)) : D
1325
+ a.value(u.map(l, (c) => c ?? null)),
1326
+ a.class("bc-input"),
1327
+ r != null ? k.blur(P(r)) : S,
1328
+ n != null ? k.change(Qe(n)) : S
1329
1329
  ),
1330
- after: s != null ? L(u, s) : u
1330
+ after: s != null ? L(i, s) : i
1331
1331
  });
1332
- }, Z = (e) => typeof e == "string" && e.trim() === "" ? null : e, re = (e) => e ?? "", wn = (e) => {
1333
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: a, ...u } = e, c = X(t, a, n);
1334
- return lt({
1335
- ...u,
1336
- value: i.map(t, re),
1332
+ }, Z = (e) => typeof e == "string" && e.trim() === "" ? null : e, se = (e) => e ?? "", wn = (e) => {
1333
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = X(t, l, n);
1334
+ return at({
1335
+ ...i,
1336
+ value: u.map(t, se),
1337
1337
  onChange: n != null ? (p) => n(Z(p)) : void 0,
1338
1338
  onInput: s != null ? (p) => s(Z(p)) : void 0,
1339
1339
  onBlur: r,
1340
1340
  after: o != null ? L(c, o) : c
1341
1341
  });
1342
1342
  }, _n = (e) => {
1343
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: a, ...u } = e, c = X(t, a, n);
1343
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = X(t, l, n);
1344
1344
  return ot({
1345
- ...u,
1346
- value: i.map(t, re),
1345
+ ...i,
1346
+ value: u.map(t, se),
1347
1347
  onChange: n != null ? (p) => n(Z(p)) : void 0,
1348
1348
  onInput: s != null ? (p) => s(Z(p)) : void 0,
1349
1349
  onBlur: r,
1350
1350
  after: o != null ? L(c, o) : c
1351
1351
  });
1352
1352
  }, $n = (e) => {
1353
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: a, ...u } = e, c = X(t, a, n);
1353
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = X(t, l, n);
1354
1354
  return ct({
1355
- ...u,
1356
- value: i.map(t, re),
1355
+ ...i,
1356
+ value: u.map(t, se),
1357
1357
  onChange: n != null ? (p) => n(Z(p)) : void 0,
1358
1358
  onInput: s != null ? (p) => s(Z(p)) : void 0,
1359
1359
  onBlur: r,
@@ -1361,118 +1361,118 @@ const vn = (e) => {
1361
1361
  });
1362
1362
  }, Ht = (e) => {
1363
1363
  const { value: t, onBlur: r, onChange: n, onInput: s, rows: o } = e;
1364
- return H({
1364
+ return j({
1365
1365
  ...e,
1366
1366
  input: $.textarea(
1367
1367
  Y(e),
1368
- l.rows(o ?? 3),
1369
- l.value(t),
1370
- l.class("bc-input"),
1371
- r != null ? k.blur(P(r)) : D,
1372
- n != null ? k.change(P(n)) : D,
1373
- s != null ? k.input(P(s)) : D
1368
+ a.rows(o ?? 3),
1369
+ a.value(t),
1370
+ a.class("bc-input"),
1371
+ r != null ? k.blur(P(r)) : S,
1372
+ n != null ? k.change(P(n)) : S,
1373
+ s != null ? k.input(P(s)) : S
1374
1374
  )
1375
1375
  });
1376
1376
  }, yn = (e) => {
1377
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: a, ...u } = e, c = X(t, a, n);
1377
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = X(t, l, n);
1378
1378
  return Ht({
1379
- ...u,
1380
- value: i.map(t, re),
1379
+ ...i,
1380
+ value: u.map(t, se),
1381
1381
  onChange: n != null ? (p) => n(Z(p)) : void 0,
1382
1382
  onInput: s != null ? (p) => s(Z(p)) : void 0,
1383
1383
  onBlur: r,
1384
1384
  after: o != null ? L(c, o) : c
1385
1385
  });
1386
1386
  }, In = (e) => {
1387
- const { value: t, step: r, min: n, max: s, onBlur: o, onChange: a, onInput: u, after: c } = e, p = (g) => {
1388
- const f = n != null ? i.get(n) : void 0, m = s != null ? i.get(s) : void 0;
1387
+ const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: i, after: c } = e, p = (g) => {
1388
+ const f = n != null ? u.get(n) : void 0, m = s != null ? u.get(s) : void 0;
1389
1389
  return f != null && g < f ? f : m != null && g > m ? m : g;
1390
- }, h = r != null ? R(W, (g) => {
1391
- const f = V(
1390
+ }, h = r != null ? O(H, (g) => {
1391
+ const f = B(
1392
1392
  t,
1393
1393
  n
1394
- )((b, x) => x == null ? !0 : (b ?? 0) > x), m = V(
1394
+ )((b, v) => v == null ? !0 : (b ?? 0) > v), m = B(
1395
1395
  t,
1396
1396
  s
1397
- )((b, x) => x == null ? !0 : (b ?? 0) < x), w = (b) => {
1398
- const x = i.get(t) ?? 0, S = i.get(r), C = b?.shiftKey ? 10 : 1, y = x - S * C, v = n != null ? i.get(n) : void 0;
1399
- if (v != null && y < v)
1397
+ )((b, v) => v == null ? !0 : (b ?? 0) < v), x = (b) => {
1398
+ const v = u.get(t) ?? 0, T = u.get(r), I = b?.shiftKey ? 10 : 1, y = v - T * I, w = n != null ? u.get(n) : void 0;
1399
+ if (w != null && y < w)
1400
1400
  return;
1401
- const I = p(y);
1402
- I !== x && a && a(I);
1401
+ const C = p(y);
1402
+ C !== v && l && l(C);
1403
1403
  }, _ = (b) => {
1404
- const x = i.get(t) ?? 0, S = i.get(r), C = b?.shiftKey ? 10 : 1, y = x + S * C, v = s != null ? i.get(s) : void 0;
1405
- if (v != null && y > v)
1404
+ const v = u.get(t) ?? 0, T = u.get(r), I = b?.shiftKey ? 10 : 1, y = v + T * I, w = s != null ? u.get(s) : void 0;
1405
+ if (w != null && y > w)
1406
1406
  return;
1407
- const I = p(y);
1408
- I !== x && a && a(I);
1407
+ const C = p(y);
1408
+ C !== v && l && l(C);
1409
1409
  };
1410
1410
  return te(
1411
- l.class("bc-number-input-steppers"),
1411
+ a.class("bc-number-input-steppers"),
1412
1412
  // Increment second
1413
1413
  $.button(
1414
- l.class(
1414
+ a.class(
1415
1415
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1416
1416
  ),
1417
- l.disabled(
1418
- V(
1417
+ a.disabled(
1418
+ B(
1419
1419
  m,
1420
1420
  e.disabled ?? !1
1421
- )((b, x) => !b || x)
1421
+ )((b, v) => !b || v)
1422
1422
  ),
1423
1423
  k.click((b) => _(b)),
1424
- O.label(g.$.incrementValue),
1425
- N({ icon: "line-md:plus", size: "xs" })
1424
+ N.label(g.$.incrementValue),
1425
+ R({ icon: "line-md:plus", size: "xs" })
1426
1426
  ),
1427
1427
  // Decrement first (matches tests expecting first button to be decrement)
1428
1428
  $.button(
1429
- l.class(
1429
+ a.class(
1430
1430
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1431
1431
  ),
1432
- l.disabled(
1433
- V(
1432
+ a.disabled(
1433
+ B(
1434
1434
  f,
1435
1435
  e.disabled ?? !1
1436
- )((b, x) => !b || x)
1436
+ )((b, v) => !b || v)
1437
1437
  ),
1438
- k.click((b) => w(b)),
1439
- O.label(g.$.decrementValue),
1440
- N({ icon: "line-md:minus", size: "xs" })
1438
+ k.click((b) => x(b)),
1439
+ N.label(g.$.decrementValue),
1440
+ R({ icon: "line-md:minus", size: "xs" })
1441
1441
  )
1442
1442
  );
1443
1443
  }) : null, d = c != null && h != null ? L(h, c) : c ?? h;
1444
- return H({
1444
+ return j({
1445
1445
  ...e,
1446
- input: se.number(
1446
+ input: ne.number(
1447
1447
  n != null ? L(
1448
- l.min(n),
1449
- j(
1450
- i.on(n, (g) => {
1451
- g < i.get(t);
1448
+ a.min(n),
1449
+ W(
1450
+ u.on(n, (g) => {
1451
+ g < u.get(t);
1452
1452
  })
1453
1453
  )
1454
- ) : D,
1454
+ ) : S,
1455
1455
  s != null ? L(
1456
- l.max(s),
1457
- j(
1458
- i.on(s, (g) => {
1459
- g > i.get(t);
1456
+ a.max(s),
1457
+ W(
1458
+ u.on(s, (g) => {
1459
+ g > u.get(t);
1460
1460
  })
1461
1461
  )
1462
- ) : D,
1462
+ ) : S,
1463
1463
  Y(e),
1464
- l.valueAsNumber(t),
1465
- l.step(r),
1466
- l.class("bc-input bc-number-input"),
1467
- o != null ? k.blur(P(o)) : D,
1468
- a != null ? k.change(G(a)) : D,
1469
- u != null ? k.input(G(u)) : D,
1464
+ a.valueAsNumber(t),
1465
+ a.step(r),
1466
+ a.class("bc-input bc-number-input"),
1467
+ o != null ? k.blur(P(o)) : S,
1468
+ l != null ? k.change(G(l)) : S,
1469
+ i != null ? k.input(G(i)) : S,
1470
1470
  // Add wheel event support when step is defined
1471
1471
  r != null ? k.wheel((g) => {
1472
1472
  g.preventDefault();
1473
- const f = i.get(t) ?? 0, m = i.get(r), w = g.shiftKey ? 10 : 1, _ = g.deltaY < 0 ? m * w : -m * w, b = p(f + _);
1474
- b !== f && a && a(b);
1475
- }) : D
1473
+ const f = u.get(t) ?? 0, m = u.get(r), x = g.shiftKey ? 10 : 1, _ = g.deltaY < 0 ? m * x : -m * x, b = p(f + _);
1474
+ b !== f && l && l(b);
1475
+ }) : S
1476
1476
  ),
1477
1477
  after: d
1478
1478
  });
@@ -1481,111 +1481,111 @@ const vn = (e) => {
1481
1481
  const t = Number(e);
1482
1482
  return Number.isNaN(t) ? null : t;
1483
1483
  }, Cn = (e) => {
1484
- const { value: t, step: r, min: n, max: s, onBlur: o, onChange: a, onInput: u, after: c } = e, p = (f) => {
1485
- const m = n != null ? i.get(n) : void 0, w = s != null ? i.get(s) : void 0;
1486
- return m != null && f < m ? m : w != null && f > w ? w : f;
1484
+ const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: i, after: c } = e, p = (f) => {
1485
+ const m = n != null ? u.get(n) : void 0, x = s != null ? u.get(s) : void 0;
1486
+ return m != null && f < m ? m : x != null && f > x ? x : f;
1487
1487
  }, h = (() => {
1488
1488
  if (r == null) return null;
1489
- const f = V(
1489
+ const f = B(
1490
1490
  t,
1491
1491
  n
1492
- )((x, S) => {
1493
- const C = x ?? 0;
1494
- return S == null ? !0 : C > S;
1495
- }), m = V(
1492
+ )((v, T) => {
1493
+ const I = v ?? 0;
1494
+ return T == null ? !0 : I > T;
1495
+ }), m = B(
1496
1496
  t,
1497
1497
  s
1498
- )((x, S) => {
1499
- const C = x ?? 0;
1500
- return S == null ? !0 : C < S;
1501
- }), w = (x) => {
1502
- const S = i.get(t) ?? 0, C = i.get(r), y = x?.shiftKey ? 10 : 1, v = S - C * y, I = n != null ? i.get(n) : void 0;
1503
- if (I != null && v < I) return;
1504
- const M = p(v);
1505
- M !== S && a && a(M);
1506
- }, _ = (x) => {
1507
- const S = i.get(t) ?? 0, C = i.get(r), y = x?.shiftKey ? 10 : 1, v = S + C * y, I = s != null ? i.get(s) : void 0;
1508
- if (I != null && v > I) return;
1509
- const M = p(v);
1510
- M !== S && a && a(M);
1498
+ )((v, T) => {
1499
+ const I = v ?? 0;
1500
+ return T == null ? !0 : I < T;
1501
+ }), x = (v) => {
1502
+ const T = u.get(t) ?? 0, I = u.get(r), y = v?.shiftKey ? 10 : 1, w = T - I * y, C = n != null ? u.get(n) : void 0;
1503
+ if (C != null && w < C) return;
1504
+ const M = p(w);
1505
+ M !== T && l && l(M);
1506
+ }, _ = (v) => {
1507
+ const T = u.get(t) ?? 0, I = u.get(r), y = v?.shiftKey ? 10 : 1, w = T + I * y, C = s != null ? u.get(s) : void 0;
1508
+ if (C != null && w > C) return;
1509
+ const M = p(w);
1510
+ M !== T && l && l(M);
1511
1511
  };
1512
- return ((x, S) => te(
1513
- l.class("bc-number-input-steppers"),
1512
+ return ((v, T) => te(
1513
+ a.class("bc-number-input-steppers"),
1514
1514
  $.button(
1515
- l.class(
1515
+ a.class(
1516
1516
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1517
1517
  ),
1518
- l.disabled(
1519
- V(
1518
+ a.disabled(
1519
+ B(
1520
1520
  m,
1521
1521
  e.disabled ?? !1
1522
- )((C, y) => !C || y)
1522
+ )((I, y) => !I || y)
1523
1523
  ),
1524
- k.click((C) => _(C)),
1525
- O.label(x),
1526
- N({ icon: "line-md:plus", size: "xs" })
1524
+ k.click((I) => _(I)),
1525
+ N.label(v),
1526
+ R({ icon: "line-md:plus", size: "xs" })
1527
1527
  ),
1528
1528
  $.button(
1529
- l.class(
1529
+ a.class(
1530
1530
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1531
1531
  ),
1532
- l.disabled(
1533
- V(
1532
+ a.disabled(
1533
+ B(
1534
1534
  f,
1535
1535
  e.disabled ?? !1
1536
- )((C, y) => !C || y)
1536
+ )((I, y) => !I || y)
1537
1537
  ),
1538
- k.click((C) => w(C)),
1539
- O.label(S),
1540
- N({ icon: "line-md:minus", size: "xs" })
1538
+ k.click((I) => x(I)),
1539
+ N.label(T),
1540
+ R({ icon: "line-md:minus", size: "xs" })
1541
1541
  )
1542
1542
  ))(
1543
1543
  ye.incrementValue,
1544
1544
  ye.decrementValue
1545
1545
  );
1546
- })(), d = X(t, e.disabled, a), g = c != null && h != null ? L(h, d, c) : c != null ? L(d, c) : h != null ? L(h, d) : d;
1547
- return H({
1546
+ })(), d = X(t, e.disabled, l), g = c != null && h != null ? L(h, d, c) : c != null ? L(d, c) : h != null ? L(h, d) : d;
1547
+ return j({
1548
1548
  ...e,
1549
- input: se.number(
1549
+ input: ne.number(
1550
1550
  // min/max attributes and reactive watchers (no forced correction)
1551
1551
  n != null ? L(
1552
- l.min(n),
1553
- j(
1554
- i.on(n, (f) => {
1552
+ a.min(n),
1553
+ W(
1554
+ u.on(n, (f) => {
1555
1555
  })
1556
1556
  )
1557
- ) : D,
1557
+ ) : S,
1558
1558
  s != null ? L(
1559
- l.max(s),
1560
- j(
1561
- i.on(s, (f) => {
1559
+ a.max(s),
1560
+ W(
1561
+ u.on(s, (f) => {
1562
1562
  })
1563
1563
  )
1564
- ) : D,
1564
+ ) : S,
1565
1565
  Y(e),
1566
1566
  // Represent null as empty string so the field can be cleared
1567
- l.value(i.map(t, (f) => f == null ? "" : String(f))),
1568
- l.step(r),
1569
- l.class("bc-input bc-number-input"),
1570
- o != null ? k.blur(P(o)) : D,
1571
- a != null ? k.change(
1567
+ a.value(u.map(t, (f) => f == null ? "" : String(f))),
1568
+ a.step(r),
1569
+ a.class("bc-input bc-number-input"),
1570
+ o != null ? k.blur(P(o)) : S,
1571
+ l != null ? k.change(
1572
1572
  P((f) => {
1573
1573
  const m = Ue(f);
1574
- a(m);
1574
+ l(m);
1575
1575
  })
1576
- ) : D,
1577
- u != null ? k.input(
1576
+ ) : S,
1577
+ i != null ? k.input(
1578
1578
  P((f) => {
1579
1579
  const m = Ue(f);
1580
- u(m);
1580
+ i(m);
1581
1581
  })
1582
- ) : D,
1582
+ ) : S,
1583
1583
  // Wheel support when step is defined
1584
1584
  r != null ? k.wheel((f) => {
1585
1585
  f.preventDefault();
1586
- const m = i.get(t) ?? 0, w = i.get(r), _ = f.shiftKey ? 10 : 1, b = f.deltaY < 0 ? w * _ : -w * _, x = p(m + b);
1587
- x !== m && a && a(x);
1588
- }) : D
1586
+ const m = u.get(t) ?? 0, x = u.get(r), _ = f.shiftKey ? 10 : 1, b = f.deltaY < 0 ? x * _ : -x * _, v = p(m + b);
1587
+ v !== m && l && l(v);
1588
+ }) : S
1589
1589
  ),
1590
1590
  after: g
1591
1591
  });
@@ -1596,52 +1596,52 @@ const vn = (e) => {
1596
1596
  onLabel: n,
1597
1597
  label: s,
1598
1598
  disabled: o = !1,
1599
- size: a = "md",
1600
- id: u
1599
+ size: l = "md",
1600
+ id: i
1601
1601
  }) => {
1602
- const c = u ?? it("switch"), p = `${c}-label`;
1602
+ const c = i ?? it("switch"), p = `${c}-label`;
1603
1603
  function h(f, m) {
1604
- const w = ["bc-switch", `bu-text-${m}`, `bc-switch--${m}`];
1605
- return f && w.push("bc-switch--disabled"), w.join(" ");
1604
+ const x = ["bc-switch", `bu-text-${m}`, `bc-switch--${m}`];
1605
+ return f && x.push("bc-switch--disabled"), x.join(" ");
1606
1606
  }
1607
1607
  const d = () => {
1608
- i.get(o) || t(!i.get(e));
1608
+ u.get(o) || t(!u.get(e));
1609
1609
  }, g = (f) => {
1610
- i.get(o) || (f.key === " " || f.key === "Enter") && (f.preventDefault(), d());
1610
+ u.get(o) || (f.key === " " || f.key === "Enter") && (f.preventDefault(), d());
1611
1611
  };
1612
1612
  return $.div(
1613
- l.class(
1614
- V(
1613
+ a.class(
1614
+ B(
1615
1615
  o ?? !1,
1616
- a
1616
+ l
1617
1617
  )(
1618
1618
  (f, m) => h(f ?? !1, m ?? "md")
1619
1619
  )
1620
1620
  ),
1621
- l.id(c),
1622
- l.role("switch"),
1623
- l.tabindex(
1624
- i.map(o, (f) => f ? -1 : 0)
1621
+ a.id(c),
1622
+ a.role("switch"),
1623
+ a.tabindex(
1624
+ u.map(o, (f) => f ? -1 : 0)
1625
1625
  ),
1626
- O.checked(e),
1627
- O.disabled(o),
1628
- O.labelledby(s != null ? p : void 0),
1626
+ N.checked(e),
1627
+ N.disabled(o),
1628
+ N.labelledby(s != null ? p : void 0),
1629
1629
  k.click(d),
1630
1630
  k.keydown(g),
1631
- s != null ? ut(l.id(p), l.class(`bu-text-${a} bu-nowrap`), s) : null,
1631
+ s != null ? ut(a.id(p), a.class(`bu-text-${l} bu-nowrap`), s) : null,
1632
1632
  $.div(
1633
- l.class("bc-switch__track"),
1634
- l.class(
1635
- i.map(
1633
+ a.class("bc-switch__track"),
1634
+ a.class(
1635
+ u.map(
1636
1636
  e,
1637
1637
  (f) => f ? "bc-switch__track--on" : "bc-switch__track--off"
1638
1638
  )
1639
1639
  ),
1640
1640
  r != null ? $.div(
1641
- O.hidden(!0),
1642
- l.class("bc-switch__track-label bc-switch__track-label--off"),
1643
- l.class(
1644
- i.map(
1641
+ N.hidden(!0),
1642
+ a.class("bc-switch__track-label bc-switch__track-label--off"),
1643
+ a.class(
1644
+ u.map(
1645
1645
  e,
1646
1646
  (f) => f ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1647
1647
  )
@@ -1649,34 +1649,34 @@ const vn = (e) => {
1649
1649
  r
1650
1650
  ) : null,
1651
1651
  n != null ? $.div(
1652
- l.class("bc-switch__track-label bc-switch__track-label--on"),
1653
- l.class(
1654
- i.map(
1652
+ a.class("bc-switch__track-label bc-switch__track-label--on"),
1653
+ a.class(
1654
+ u.map(
1655
1655
  e,
1656
1656
  (f) => f ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1657
1657
  )
1658
1658
  ),
1659
1659
  n
1660
1660
  ) : null,
1661
- Re(
1662
- (f) => R(
1661
+ ze(
1662
+ (f) => O(
1663
1663
  ft,
1664
1664
  ({ direction: m }) => $.div(
1665
- l.class("bc-switch__thumb"),
1666
- l.class(
1667
- i.map(
1665
+ a.class("bc-switch__thumb"),
1666
+ a.class(
1667
+ u.map(
1668
1668
  e,
1669
- (w) => w ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
1669
+ (x) => x ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
1670
1670
  )
1671
1671
  ),
1672
1672
  pe.transform(
1673
- V(
1673
+ B(
1674
1674
  e,
1675
1675
  f,
1676
- a,
1676
+ l,
1677
1677
  m
1678
- )((w, { width: _ }, b, x) => {
1679
- const S = (() => {
1678
+ )((x, { width: _ }, b, v) => {
1679
+ const T = (() => {
1680
1680
  switch (b) {
1681
1681
  case "xs":
1682
1682
  return 5;
@@ -1689,8 +1689,8 @@ const vn = (e) => {
1689
1689
  case "xl":
1690
1690
  return 8;
1691
1691
  }
1692
- })(), C = x === "rtl" ? `calc((var(--spacing-base) * ${S}) - ${_}px)` : `calc(${_}px - (var(--spacing-base) * ${S}))`;
1693
- return w ? `translateX(${C})` : "translateX(0)";
1692
+ })(), I = v === "rtl" ? `calc((var(--spacing-base) * ${T}) - ${_}px)` : `calc(${_}px - (var(--spacing-base) * ${T}))`;
1693
+ return x ? `translateX(${I})` : "translateX(0)";
1694
1694
  })
1695
1695
  )
1696
1696
  )
@@ -1748,10 +1748,10 @@ const vn = (e) => {
1748
1748
  placeholder: e.placeholder ?? "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1749
1749
  });
1750
1750
  }, Mn = (e) => {
1751
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: a, ...u } = e, c = X(t, a, n);
1751
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = X(t, l, n);
1752
1752
  return Wt({
1753
- ...u,
1754
- value: i.map(t, re),
1753
+ ...i,
1754
+ value: u.map(t, se),
1755
1755
  onChange: n != null ? (p) => n(Z(p)) : void 0,
1756
1756
  onInput: s != null ? (p) => s(Z(p)) : void 0,
1757
1757
  onBlur: r,
@@ -1764,70 +1764,70 @@ const vn = (e) => {
1764
1764
  disabled: n,
1765
1765
  max: s = 5,
1766
1766
  fullColor: o = "yellow",
1767
- emptyColor: a = "neutral",
1768
- fullIcon: u = Zt,
1767
+ emptyColor: l = "neutral",
1768
+ fullIcon: i = Zt,
1769
1769
  emptyIcon: c = Yt,
1770
1770
  size: p = "md",
1771
1771
  onBlur: h,
1772
1772
  rounding: d = 1
1773
1773
  } = e, g = () => {
1774
- const x = i.get(d);
1775
- return x > 0 ? x : 1;
1776
- }, f = (x) => Math.min(Math.max(x, 0), i.get(s)), m = (x, S) => {
1777
- if (i.get(n ?? !1)) return;
1778
- const y = x.currentTarget.getBoundingClientRect(), v = (x.clientX - y.left) / y.width, I = S - 1 + v, M = g(), A = Math.ceil(I / M) * M, F = f(A);
1774
+ const v = u.get(d);
1775
+ return v > 0 ? v : 1;
1776
+ }, f = (v) => Math.min(Math.max(v, 0), u.get(s)), m = (v, T) => {
1777
+ if (u.get(n ?? !1)) return;
1778
+ const y = v.currentTarget.getBoundingClientRect(), w = (v.clientX - y.left) / y.width, C = T - 1 + w, M = g(), A = Math.ceil(C / M) * M, F = f(A);
1779
1779
  r?.(F);
1780
- }, w = (x) => {
1781
- if (i.get(n ?? !1)) return;
1782
- const S = g(), C = i.get(t) ?? 0;
1780
+ }, x = (v) => {
1781
+ if (u.get(n ?? !1)) return;
1782
+ const T = g(), I = u.get(t) ?? 0;
1783
1783
  let y;
1784
- switch (x.key) {
1784
+ switch (v.key) {
1785
1785
  case "ArrowRight":
1786
1786
  case "ArrowUp":
1787
- y = f(C + S);
1787
+ y = f(I + T);
1788
1788
  break;
1789
1789
  case "ArrowLeft":
1790
1790
  case "ArrowDown":
1791
- y = f(C - S);
1791
+ y = f(I - T);
1792
1792
  break;
1793
1793
  case "Home":
1794
1794
  y = 0;
1795
1795
  break;
1796
1796
  case "End":
1797
- y = i.get(s);
1797
+ y = u.get(s);
1798
1798
  break;
1799
1799
  default:
1800
1800
  return;
1801
1801
  }
1802
- x.preventDefault(), r?.(y);
1803
- }, _ = i.map(p, (x) => `bc-icon--${x}`), b = ({ index: x, counter: S }) => $.span(
1804
- l.class("bc-rating-input__icon-container"),
1805
- l.class(_),
1806
- N(
1802
+ v.preventDefault(), r?.(y);
1803
+ }, _ = u.map(p, (v) => `bc-icon--${v}`), b = ({ index: v, counter: T }) => $.span(
1804
+ a.class("bc-rating-input__icon-container"),
1805
+ a.class(_),
1806
+ R(
1807
1807
  { icon: c, size: p },
1808
- l.class("bc-rating-input__icon-empty"),
1809
- l.class(i.map(a, (C) => `bu-fg-soft-${C}`))
1808
+ a.class("bc-rating-input__icon-empty"),
1809
+ a.class(u.map(l, (I) => `bu-fg-soft-${I}`))
1810
1810
  ),
1811
1811
  $.span(
1812
- l.class("bc-rating-input__icon-clipper"),
1813
- l.class(_),
1814
- l.class(i.map(o, (C) => `bu-fg-soft-${C}`)),
1812
+ a.class("bc-rating-input__icon-clipper"),
1813
+ a.class(_),
1814
+ a.class(u.map(o, (I) => `bu-fg-soft-${I}`)),
1815
1815
  pe.width(
1816
- i.map(t, (C) => {
1817
- const y = Math.floor(C);
1818
- return y > x ? "100%" : y < x ? "0%" : `${(C - x) * 100}%`;
1816
+ u.map(t, (I) => {
1817
+ const y = Math.floor(I);
1818
+ return y > v ? "100%" : y < v ? "0%" : `${(I - v) * 100}%`;
1819
1819
  })
1820
1820
  ),
1821
- N({ icon: u, size: p }, l.class("bc-rating-input__icon-full"))
1821
+ R({ icon: i, size: p }, a.class("bc-rating-input__icon-full"))
1822
1822
  ),
1823
1823
  k.click(
1824
- Je((C) => m(C, S), {
1824
+ Je((I) => m(I, T), {
1825
1825
  preventDefault: !0,
1826
1826
  stopPropagation: !0
1827
1827
  })
1828
1828
  )
1829
1829
  );
1830
- return H({
1830
+ return j({
1831
1831
  baseContainer: !0,
1832
1832
  growInput: !1,
1833
1833
  focusableSelector: '[role="slider"]',
@@ -1835,94 +1835,92 @@ const vn = (e) => {
1835
1835
  input: $.div(
1836
1836
  // Common input attributes (id, required, invalid, custom classes, etc.)
1837
1837
  Y(e),
1838
- l.class("bc-rating-input"),
1838
+ a.class("bc-rating-input"),
1839
1839
  // ARIA slider semantics
1840
- l.role("slider"),
1841
- l.tabindex(i.map(n ?? !1, (x) => x ? -1 : 0)),
1842
- O.disabled(n ?? !1),
1840
+ a.role("slider"),
1841
+ a.tabindex(u.map(n ?? !1, (v) => v ? -1 : 0)),
1842
+ N.disabled(n ?? !1),
1843
+ N.valuemin(0),
1844
+ N.valuemax(u.map(s, (v) => v ?? 0)),
1845
+ N.valuenow(u.map(t, (v) => v ?? 0)),
1846
+ N.valuetext(
1847
+ B(
1848
+ t,
1849
+ s
1850
+ )((v, T) => {
1851
+ const I = v ?? 0, y = T ?? 0;
1852
+ return `${String(I)} / ${String(y)}`;
1853
+ })
1854
+ ),
1843
1855
  // Keyboard & focus handlers
1844
- k.keydown(w),
1856
+ k.keydown(x),
1845
1857
  h != null ? k.blur(h) : null,
1846
- // Reactive ARIA value attributes
1847
- ne((x) => {
1848
- const S = (v, I) => x.setAttribute(v, I);
1849
- S("aria-valuemin", "0"), S("aria-valuemax", String(i.get(s))), S("aria-valuenow", String(i.get(t) ?? 0)), S(
1850
- "aria-valuetext",
1851
- `${String(i.get(t) ?? 0)} / ${String(i.get(s))}`
1852
- );
1853
- const C = i.on(s, (v) => S("aria-valuemax", String(v))), y = i.on(t, (v) => {
1854
- S("aria-valuenow", String(v ?? 0)), S("aria-valuetext", `${String(v ?? 0)} / ${String(i.get(s))}`);
1855
- });
1856
- return j(() => {
1857
- C(), y();
1858
- });
1859
- }),
1860
- ze(s, b)
1858
+ Re(s, b)
1861
1859
  )
1862
1860
  });
1863
- }, Sn = (e) => {
1864
- const { value: t, onChange: r, onBlur: n, after: s, disabled: o, ...a } = e, u = X(t, o, r);
1861
+ }, Tn = (e) => {
1862
+ const { value: t, onChange: r, onBlur: n, after: s, disabled: o, ...l } = e, i = X(t, o, r);
1865
1863
  return Xt({
1866
- ...a,
1864
+ ...l,
1867
1865
  // Map null -> 0 for display so the control shows as empty when null
1868
- value: i.map(t, (c) => c ?? 0),
1866
+ value: u.map(t, (c) => c ?? 0),
1869
1867
  // Pass through numeric changes; clear button will call onChange(null)
1870
1868
  onChange: r,
1871
1869
  onBlur: n,
1872
- after: s != null ? L(u, s) : u
1870
+ after: s != null ? L(i, s) : i
1873
1871
  });
1874
- }, Tn = (e) => {
1875
- const { value: t, step: r, min: n, max: s, onBlur: o, onChange: a, onInput: u } = e;
1876
- return H({
1872
+ }, Dn = (e) => {
1873
+ const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: i } = e;
1874
+ return j({
1877
1875
  ...e,
1878
1876
  // Make sure clicks anywhere focus the range input
1879
1877
  focusableSelector: 'input[type="range"]',
1880
1878
  input: $.input(
1881
- l.type("range"),
1879
+ a.type("range"),
1882
1880
  Y(e),
1883
- l.min(n),
1884
- l.max(s),
1885
- l.step(r),
1881
+ a.min(n),
1882
+ a.max(s),
1883
+ a.step(r),
1886
1884
  // Using value as number to keep it in sync
1887
- l.valueAsNumber(t),
1888
- l.class("bc-input bc-slider-input"),
1889
- o != null ? k.blur(G(o)) : D,
1890
- a != null ? k.change(G(a)) : D,
1891
- u != null ? k.input(G(u)) : D
1885
+ a.valueAsNumber(t),
1886
+ a.class("bc-input bc-slider-input"),
1887
+ o != null ? k.blur(G(o)) : S,
1888
+ l != null ? k.change(G(l)) : S,
1889
+ i != null ? k.input(G(i)) : S
1892
1890
  )
1893
1891
  });
1894
- }, Dn = (e) => {
1895
- const { value: t, step: r, min: n, max: s, onBlur: o, onChange: a, onInput: u } = e, c = i.map(t, (h) => {
1892
+ }, Sn = (e) => {
1893
+ const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: i } = e, c = u.map(t, (h) => {
1896
1894
  if (h != null) return h;
1897
- const d = n != null ? i.get(n) : void 0;
1895
+ const d = n != null ? u.get(n) : void 0;
1898
1896
  return typeof d == "number" ? d : 0;
1899
1897
  }), p = X(t, e.disabled, (h) => {
1900
- a?.(h);
1898
+ l?.(h);
1901
1899
  });
1902
- return H(
1900
+ return j(
1903
1901
  {
1904
1902
  ...e,
1905
1903
  focusableSelector: 'input[type="range"]',
1906
1904
  after: p,
1907
1905
  input: $.input(
1908
- l.type("range"),
1906
+ a.type("range"),
1909
1907
  Y(e),
1910
- l.min(n),
1911
- l.max(s),
1912
- l.step(r),
1913
- l.valueAsNumber(c),
1914
- l.class("bc-input bc-slider-input"),
1915
- o != null ? k.blur(G(o)) : D,
1916
- a != null ? k.change(
1908
+ a.min(n),
1909
+ a.max(s),
1910
+ a.step(r),
1911
+ a.valueAsNumber(c),
1912
+ a.class("bc-input bc-slider-input"),
1913
+ o != null ? k.blur(G(o)) : S,
1914
+ l != null ? k.change(
1917
1915
  G((h) => {
1918
- a(h);
1916
+ l(h);
1919
1917
  })
1920
- ) : D,
1921
- u != null ? k.input(
1918
+ ) : S,
1919
+ i != null ? k.input(
1922
1920
  G((h) => {
1923
- u(h);
1921
+ i(h);
1924
1922
  })
1925
- ) : D
1923
+ ) : S
1926
1924
  )
1927
1925
  },
1928
1926
  // Ensure container grows input naturally
@@ -1964,34 +1962,34 @@ function Kt(e) {
1964
1962
  const An = (e) => {
1965
1963
  const { value: t, onChange: r, after: n, disabled: s } = e, o = X(t, s, r);
1966
1964
  return Gt(
1967
- (a) => We({
1965
+ (l) => We({
1968
1966
  ...e,
1969
- value: i.map(t, (u) => u?.toString() ?? ""),
1970
- onChange: r ? (u) => r(u === "" ? null : a.Duration.from(u)) : void 0,
1967
+ value: u.map(t, (i) => i?.toString() ?? ""),
1968
+ onChange: r ? (i) => r(i === "" ? null : l.Duration.from(i)) : void 0,
1971
1969
  onInput: void 0,
1972
- ...Kt(a.Duration.from),
1970
+ ...Kt(l.Duration.from),
1973
1971
  placeholder: "P0DT0H0M0S",
1974
1972
  after: n != null ? L(o, n) : o
1975
1973
  })
1976
1974
  );
1977
1975
  }, en = (e) => {
1978
1976
  const { value: t, onBlur: r, onChange: n, onInput: s } = e;
1979
- return H({
1977
+ return j({
1980
1978
  ...e,
1981
- input: se.url(
1979
+ input: ne.url(
1982
1980
  Y(e),
1983
- l.value(t),
1984
- l.class("bc-input"),
1985
- r != null ? k.blur(P(r)) : D,
1986
- n != null ? k.change(P(n)) : D,
1987
- s != null ? k.input(P(s)) : D
1981
+ a.value(t),
1982
+ a.class("bc-input"),
1983
+ r != null ? k.blur(P(r)) : S,
1984
+ n != null ? k.change(P(n)) : S,
1985
+ s != null ? k.input(P(s)) : S
1988
1986
  )
1989
1987
  });
1990
1988
  }, Fn = (e) => {
1991
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: a, ...u } = e, c = X(t, a, n);
1989
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = X(t, l, n);
1992
1990
  return en({
1993
- ...u,
1994
- value: i.map(t, re),
1991
+ ...i,
1992
+ value: u.map(t, se),
1995
1993
  onChange: n != null ? (p) => n(Z(p)) : void 0,
1996
1994
  onInput: s != null ? (p) => s(Z(p)) : void 0,
1997
1995
  onBlur: r,
@@ -2003,17 +2001,17 @@ const An = (e) => {
2003
2001
  separator: n,
2004
2002
  showMove: s = !0,
2005
2003
  showRemove: o = !0,
2006
- showAdd: a = !0,
2007
- createItem: u,
2004
+ showAdd: l = !0,
2005
+ createItem: i,
2008
2006
  addLabel: c,
2009
2007
  controlsLayout: p = "aside",
2010
2008
  ...h
2011
- } = e, d = i.toSignal(p).map((m) => m === "aside"), g = (m) => {
2012
- const w = E(
2009
+ } = e, d = u.toSignal(p).map((m) => m === "aside"), g = (m) => {
2010
+ const x = E(
2013
2011
  s ?? !1,
2014
2012
  () => $.div(
2015
- l.class("bu-items-center"),
2016
- l.class(
2013
+ a.class("bu-items-center"),
2014
+ a.class(
2017
2015
  d.map(
2018
2016
  (b) => b ? "bu-flex-col" : "bu-flex-row bu-gap-1"
2019
2017
  )
@@ -2026,9 +2024,9 @@ const An = (e) => {
2026
2024
  onClick: () => m.move("up"),
2027
2025
  disabled: m.cannotMove("up")
2028
2026
  },
2029
- R(
2030
- W,
2031
- (b) => N({
2027
+ O(
2028
+ H,
2029
+ (b) => R({
2032
2030
  size: "xs",
2033
2031
  icon: "line-md:arrow-up",
2034
2032
  title: b.$.incrementValue
@@ -2043,9 +2041,9 @@ const An = (e) => {
2043
2041
  onClick: () => m.move("down"),
2044
2042
  disabled: m.cannotMove("down")
2045
2043
  },
2046
- R(
2047
- W,
2048
- (b) => N({
2044
+ O(
2045
+ H,
2046
+ (b) => R({
2049
2047
  size: "xs",
2050
2048
  icon: "line-md:arrow-down",
2051
2049
  title: b.$.decrementValue
@@ -2055,12 +2053,12 @@ const An = (e) => {
2055
2053
  )
2056
2054
  ), _ = E(
2057
2055
  o,
2058
- () => R(
2059
- W,
2056
+ () => O(
2057
+ H,
2060
2058
  (b) => me({
2061
2059
  size: "xs",
2062
2060
  // Use a lowercase label to satisfy tests that query with [aria-label*="remove"]
2063
- label: i.map(b.$.removeItem, (x) => x.toLowerCase()),
2061
+ label: u.map(b.$.removeItem, (v) => v.toLowerCase()),
2064
2062
  color: "error",
2065
2063
  disabled: e.removeDisabled,
2066
2064
  onClick: m.remove
@@ -2070,25 +2068,25 @@ const An = (e) => {
2070
2068
  return (b) => E(
2071
2069
  d,
2072
2070
  () => fe(
2073
- l.class("bu-gap-1 bu-items-center"),
2074
- te(l.class("bu-flex-grow"), b),
2071
+ a.class("bu-gap-1 bu-items-center"),
2072
+ te(a.class("bu-flex-grow"), b),
2075
2073
  te(
2076
- l.class("bu-items-center"),
2074
+ a.class("bu-items-center"),
2077
2075
  E(
2078
- e.controller.value.map((x) => x.length > 1),
2079
- () => w
2076
+ e.controller.value.map((v) => v.length > 1),
2077
+ () => x
2080
2078
  ),
2081
2079
  _
2082
2080
  )
2083
2081
  ),
2084
2082
  () => te(
2085
- l.class("bu-gap-2"),
2083
+ a.class("bu-gap-2"),
2086
2084
  b,
2087
2085
  fe(
2088
- l.class("bu-gap-2 bu-justify-between"),
2086
+ a.class("bu-gap-2 bu-justify-between"),
2089
2087
  E(
2090
- e.controller.value.map((x) => x.length > 1),
2091
- () => w,
2088
+ e.controller.value.map((v) => v.length > 1),
2089
+ () => x,
2092
2090
  () => $.div()
2093
2091
  ),
2094
2092
  _
@@ -2096,24 +2094,24 @@ const An = (e) => {
2096
2094
  )
2097
2095
  );
2098
2096
  }, f = E(
2099
- V(a, u)((m, w) => m && w != null),
2097
+ B(l, i)((m, x) => m && x != null),
2100
2098
  () => fe(
2101
- l.class("bu-gap-2 bu-items-center bu-justify-center"),
2099
+ a.class("bu-gap-2 bu-items-center bu-justify-center"),
2102
2100
  ge(
2103
2101
  {
2104
2102
  size: "sm",
2105
2103
  variant: "filled",
2106
- onClick: () => h.controller.push(u()),
2107
- disabled: V(
2104
+ onClick: () => h.controller.push(i()),
2105
+ disabled: B(
2108
2106
  h.controller.disabled,
2109
2107
  e.addDisabled ?? !1
2110
- )((m, w) => m || w)
2108
+ )((m, x) => m || x)
2111
2109
  },
2112
- R(
2113
- W,
2110
+ O(
2111
+ H,
2114
2112
  (m) => fe(
2115
- l.class("bu-gap-2"),
2116
- N({ icon: "line-md:plus" }),
2113
+ a.class("bu-gap-2"),
2114
+ R({ icon: "line-md:plus" }),
2117
2115
  c ?? m.$.addLabel
2118
2116
  )
2119
2117
  )
@@ -2124,8 +2122,8 @@ const An = (e) => {
2124
2122
  {
2125
2123
  ...h,
2126
2124
  content: te(
2127
- l.class("bu-gap-2"),
2128
- zt(
2125
+ a.class("bu-gap-2"),
2126
+ Rt(
2129
2127
  h.controller,
2130
2128
  (m) => g(m)(r(m)),
2131
2129
  n
@@ -2141,19 +2139,19 @@ class Vn extends ve {
2141
2139
  activeBranch;
2142
2140
  #t;
2143
2141
  #e = /* @__PURE__ */ new Map();
2144
- constructor(t, r, n, s, o, a, u = oe) {
2145
- super(t, r, n, s, o, u), this.branches = a;
2142
+ constructor(t, r, n, s, o, l, i = ae) {
2143
+ super(t, r, n, s, o, i), this.branches = l;
2146
2144
  const c = (h) => {
2147
- for (const d of a)
2145
+ for (const d of l)
2148
2146
  if (d.detect(h))
2149
2147
  return d.key;
2150
- return a[0]?.key ?? "unknown";
2148
+ return l[0]?.key ?? "unknown";
2151
2149
  };
2152
- this.activeBranch = n.map(c, oe);
2150
+ this.activeBranch = n.map(c, ae);
2153
2151
  const p = (h) => {
2154
2152
  if (this.#e.has(h))
2155
2153
  return this.#e.get(h);
2156
- const d = a.find((f) => f.key === h);
2154
+ const d = l.find((f) => f.key === h);
2157
2155
  if (!d)
2158
2156
  throw new Error(`Unknown branch: ${h}`);
2159
2157
  const g = new ve(
@@ -2163,20 +2161,20 @@ class Vn extends ve {
2163
2161
  },
2164
2162
  n.map(
2165
2163
  (f) => d.detect(f) ? f : d.defaultValue(),
2166
- u
2164
+ i
2167
2165
  ),
2168
2166
  s.map(Fe([h])),
2169
2167
  {
2170
2168
  disabled: this.disabled,
2171
2169
  validationMode: this.parent.validationMode
2172
2170
  },
2173
- u
2171
+ i
2174
2172
  );
2175
2173
  return this.#e.set(h, g), g;
2176
2174
  };
2177
2175
  this.#t = this.activeBranch.map(
2178
2176
  (h) => p(h),
2179
- oe
2177
+ ae
2180
2178
  ), this.onDispose(() => {
2181
2179
  for (const h of this.#e.values())
2182
2180
  h.dispose();
@@ -2187,7 +2185,7 @@ class Vn extends ve {
2187
2185
  * Get the controller for the currently active branch
2188
2186
  */
2189
2187
  get activeController() {
2190
- return i.get(this.#t);
2188
+ return u.get(this.#t);
2191
2189
  }
2192
2190
  /**
2193
2191
  * Get a controller for a specific branch
@@ -2205,14 +2203,14 @@ class Vn extends ve {
2205
2203
  },
2206
2204
  this.value.map(
2207
2205
  (s) => r.detect(s) ? s : r.defaultValue(),
2208
- oe
2206
+ ae
2209
2207
  ),
2210
2208
  this.status.map(Fe([t])),
2211
2209
  {
2212
2210
  disabled: this.disabled,
2213
2211
  validationMode: this.parent.validationMode
2214
2212
  },
2215
- oe
2213
+ ae
2216
2214
  );
2217
2215
  return this.#e.set(t, n), n;
2218
2216
  }
@@ -2220,16 +2218,16 @@ class Vn extends ve {
2220
2218
  * Switch to a different branch
2221
2219
  */
2222
2220
  switchToBranch(t, r = !1) {
2223
- const n = this.branches.find((a) => a.key === t);
2221
+ const n = this.branches.find((l) => l.key === t);
2224
2222
  if (!n)
2225
2223
  throw new Error(`Unknown branch: ${t}`);
2226
- const s = i.get(this.value);
2224
+ const s = u.get(this.value);
2227
2225
  if (n.detect(s))
2228
2226
  return !0;
2229
2227
  if (n.convert) {
2230
- const a = n.convert(s);
2231
- if (a.ok)
2232
- return this.change(a.value), !0;
2228
+ const l = n.convert(s);
2229
+ if (l.ok)
2230
+ return this.change(l.value), !0;
2233
2231
  }
2234
2232
  if (r && typeof window == "object" && typeof window.confirm == "function" && !window.confirm(
2235
2233
  "Changing type will clear the current value. Continue?"
@@ -2242,7 +2240,7 @@ class Vn extends ve {
2242
2240
  * Get the current active branch definition
2243
2241
  */
2244
2242
  get activeBranchDefinition() {
2245
- const t = i.get(this.activeBranch);
2243
+ const t = u.get(this.activeBranch);
2246
2244
  return this.branches.find((r) => r.key === t);
2247
2245
  }
2248
2246
  }
@@ -2305,54 +2303,54 @@ function Nn({
2305
2303
  title: n,
2306
2304
  icon: s,
2307
2305
  closable: o = !1,
2308
- onDismiss: a,
2309
- class: u
2306
+ onDismiss: l,
2307
+ class: i
2310
2308
  }, ...c) {
2311
- const p = i.map(
2309
+ const p = u.map(
2312
2310
  o,
2313
- (w) => !!w || a != null
2314
- ), h = i.map(e, (w) => w ?? "info"), d = i.map(t, (w) => w ?? "subtle"), g = V(
2311
+ (x) => !!x || l != null
2312
+ ), h = u.map(e, (x) => x ?? "info"), d = u.map(t, (x) => x ?? "subtle"), g = B(
2315
2313
  r,
2316
2314
  h
2317
- )((w, _) => w ?? (_ === "error" ? "alert" : "status")), f = K(!0), m = R(
2318
- W,
2319
- (w) => $.div(
2320
- l.class(
2321
- V(
2315
+ )((x, _) => x ?? (_ === "error" ? "alert" : "status")), f = K(!0), m = O(
2316
+ H,
2317
+ (x) => $.div(
2318
+ a.class(
2319
+ B(
2322
2320
  h,
2323
2321
  d,
2324
2322
  p,
2325
- u
2326
- )((_, b, x, S) => sn(_, b, x, S))
2323
+ i
2324
+ )((_, b, v, T) => sn(_, b, v, T))
2327
2325
  ),
2328
2326
  // Accessibility role mapping (always defined)
2329
- l.role(i.map(g, (_) => _)),
2327
+ a.role(u.map(g, (_) => _)),
2330
2328
  et(
2331
- i.map(s, (_) => _ === !1),
2329
+ u.map(s, (_) => _ === !1),
2332
2330
  () => $.div(
2333
- l.class("bc-notice__icon"),
2334
- N({
2335
- icon: V(
2331
+ a.class("bc-notice__icon"),
2332
+ R({
2333
+ icon: B(
2336
2334
  s,
2337
2335
  h
2338
2336
  )((_, b) => _ === void 0 ? tn(b) : String(_)),
2339
2337
  size: "md",
2340
- color: i.map(h, nn)
2338
+ color: u.map(h, nn)
2341
2339
  })
2342
2340
  )
2343
2341
  ),
2344
2342
  $.div(
2345
- l.class("bc-notice__body"),
2346
- Ne(n, (_) => $.div(l.class("bc-notice__title"), _)),
2347
- $.div(l.class("bc-notice__content"), ...c)
2343
+ a.class("bc-notice__body"),
2344
+ Ne(n, (_) => $.div(a.class("bc-notice__title"), _)),
2345
+ $.div(a.class("bc-notice__content"), ...c)
2348
2346
  ),
2349
2347
  E(
2350
2348
  p,
2351
2349
  () => me({
2352
2350
  size: "xs",
2353
- label: w.$.closeModal,
2351
+ label: x.$.closeModal,
2354
2352
  onClick: () => {
2355
- f.set(!1), a?.();
2353
+ f.set(!1), l?.();
2356
2354
  }
2357
2355
  })
2358
2356
  )
@@ -2361,13 +2359,13 @@ function Nn({
2361
2359
  return E(f, () => m);
2362
2360
  }
2363
2361
  export {
2364
- Sn as A,
2362
+ Tn as A,
2365
2363
  pn as B,
2366
2364
  dn as C,
2367
- Tn as D,
2365
+ Dn as D,
2368
2366
  Vt as E,
2369
2367
  wt as F,
2370
- Dn as G,
2368
+ Sn as G,
2371
2369
  An as H,
2372
2370
  en as I,
2373
2371
  Fn as J,
@@ -2396,10 +2394,10 @@ export {
2396
2394
  _t as h,
2397
2395
  Ct as i,
2398
2396
  bn as j,
2399
- zt as k,
2397
+ Rt as k,
2400
2398
  Nt as l,
2401
2399
  gn as m,
2402
- re as n,
2400
+ se as n,
2403
2401
  vn as o,
2404
2402
  xn as p,
2405
2403
  _n as q,