@tempots/beatui 0.92.0 → 0.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/auth/index.cjs.js +1 -1
  2. package/dist/auth/index.es.js +1 -1
  3. package/dist/{auth-divider-VzrKnv2d.cjs → auth-divider-C3E16pml.cjs} +1 -1
  4. package/dist/{auth-divider-B4n8lGx5.js → auth-divider-Rt0WDKAe.js} +3 -3
  5. package/dist/better-auth/index.cjs.js +1 -1
  6. package/dist/better-auth/index.es.js +2 -2
  7. package/dist/deep-merge-Blrucd-E.cjs +1 -0
  8. package/dist/{deep-merge-DxUvbsBl.js → deep-merge-CoLO4id0.js} +591 -589
  9. package/dist/duration-input-47x7nbGh.cjs +1 -0
  10. package/dist/{duration-input-DQTX3S_A.js → duration-input-DrVonjKK.js} +42 -42
  11. package/dist/index.cjs.js +2 -2
  12. package/dist/index.es.js +692 -691
  13. package/dist/json-schema/index.cjs.js +1 -1
  14. package/dist/json-schema/index.es.js +5 -5
  15. package/dist/json-structure/index.cjs.js +1 -1
  16. package/dist/json-structure/index.es.js +3 -3
  17. package/dist/lexical/index.cjs.js +30 -30
  18. package/dist/lexical/index.es.js +2086 -2001
  19. package/dist/{modal-C-d5Btti.cjs → modal-DUlqGUW7.cjs} +1 -1
  20. package/dist/{modal-DTz98Dk7.js → modal-ZitwUeXx.js} +1 -1
  21. package/dist/{notice-BDTfBGtx.cjs → notice-DAVOTnfA.cjs} +1 -1
  22. package/dist/{notice-CZuh-h6a.js → notice-E_p2hg1G.js} +1 -1
  23. package/dist/types/lexical/index.d.ts +1 -1
  24. package/dist/types/lexical/plugins/element-style.d.ts +28 -0
  25. package/dist/types/lexical/plugins/index.d.ts +1 -1
  26. package/dist/{use-form-Cd8YFWaN.js → use-form-BQRVnIp9.js} +167 -166
  27. package/dist/use-form-DTyNw0kM.cjs +2 -0
  28. package/dist/{widget-customization-Cs422IGY.js → widget-customization-C-fSx3RB.js} +307 -306
  29. package/dist/widget-customization-xEBfEPhQ.cjs +1 -0
  30. package/package.json +1 -1
  31. package/dist/deep-merge-CI1g9sjh.cjs +0 -1
  32. package/dist/duration-input-a1fCTfKl.cjs +0 -1
  33. package/dist/use-form-DQVN_Zjb.cjs +0 -2
  34. package/dist/widget-customization-eyQ2pxvu.cjs +0 -1
@@ -1,12 +1,12 @@
1
- import { Task as ye, Use as O, Value as f, prop as ae, html as h, attr as l, on as C, WithElement as te, Empty as S, aria as J, bind as ie, computedOf as V, style as we, OnDispose as ne, When as U, NotEmpty as Re, Fragment as N, ForEach as ee, coalesce as Ne, Ensure as Pe, OneOfType as je, Repeat as We, signal as _e, input as se, emitValue as P, emitValueAsNumber as ke } from "@tempots/dom";
1
+ import { Task as ye, Use as O, Value as p, prop as ae, html as g, attr as l, on as C, WithElement as te, Empty as M, aria as J, bind as ie, computedOf as V, style as we, OnDispose as ne, When as U, NotEmpty as Ne, Fragment as N, ForEach as ee, coalesce as Pe, Ensure as je, OneOfType as We, Repeat as Ze, signal as _e, input as se, emitValue as P, emitValueAsNumber as ke } from "@tempots/dom";
2
2
  import { B as F, b as Ce, f as De, I as E, d as ce } from "./translations-CiBhB2FV.js";
3
- import { l as Ze } from "./colors-BY0Ja_bf.js";
4
- import { g as He } from "./timer-Rd2sKnvH.js";
5
- import { ElementRect as qe } from "@tempots/ui";
6
- import { I as W, a as Ye, g as Ge, B as be } from "./input-container-9r1F3KuX.js";
7
- import { C as oe, I as Ve, m as Je, c as Xe, d as fe, O as K, e as Ie } from "./use-form-Cd8YFWaN.js";
3
+ import { l as He } from "./colors-BY0Ja_bf.js";
4
+ import { g as qe } from "./timer-Rd2sKnvH.js";
5
+ import { ElementRect as Ye } from "@tempots/ui";
6
+ import { I as W, a as Ge, g as Je, B as be } from "./input-container-9r1F3KuX.js";
7
+ import { C as oe, I as Ae, m as Xe, c as Qe, d as fe, O as K, e as Ie } from "./use-form-BQRVnIp9.js";
8
8
  import { C as q } from "./text-input-BgPx8BbG.js";
9
- import { S as Ae } from "./stack-Bm-UZosx.js";
9
+ import { S as Le } from "./stack-Bm-UZosx.js";
10
10
  let pe = null;
11
11
  async function he() {
12
12
  const t = globalThis;
@@ -15,7 +15,7 @@ async function he() {
15
15
  return t.Temporal || (t.Temporal = n), n;
16
16
  })), pe);
17
17
  }
18
- const Qe = (t, e) => e ? ye(he, {
18
+ const Ke = (t, e) => e ? ye(he, {
19
19
  then: t,
20
20
  pending: e.pending,
21
21
  error: e.error
@@ -26,82 +26,82 @@ function de({
26
26
  accept: n = "*/*",
27
27
  enableClick: s = !0,
28
28
  content: r,
29
- disabled: b = !1,
30
- allowMultiple: i
29
+ disabled: h = !1,
30
+ allowMultiple: o
31
31
  }) {
32
- return O(F, (g) => {
33
- const p = f.deriveProp(e ?? []), v = ae(!1), d = (u) => {
34
- u.preventDefault(), u.stopPropagation(), v.value = !0;
35
- }, m = (u) => {
36
- u.preventDefault(), u.stopPropagation(), (!u.currentTarget || !u.currentTarget.contains(u.relatedTarget)) && (v.value = !1);
37
- }, y = (u) => {
38
- u.preventDefault(), u.stopPropagation(), v.value = !1;
39
- const x = Array.from(u.dataTransfer?.files || []);
40
- x.length > 0 && (p.value = x, t(x, "dragdrop"));
41
- }, o = (u) => {
42
- f.get(s) && u.currentTarget.querySelector(
32
+ return O(F, (m) => {
33
+ const b = p.deriveProp(e ?? []), w = ae(!1), f = (a) => {
34
+ a.preventDefault(), a.stopPropagation(), w.value = !0;
35
+ }, d = (a) => {
36
+ a.preventDefault(), a.stopPropagation(), (!a.currentTarget || !a.currentTarget.contains(a.relatedTarget)) && (w.value = !1);
37
+ }, x = (a) => {
38
+ a.preventDefault(), a.stopPropagation(), w.value = !1;
39
+ const v = Array.from(a.dataTransfer?.files || []);
40
+ v.length > 0 && (b.value = v, t(v, "dragdrop"));
41
+ }, i = (a) => {
42
+ p.get(s) && a.currentTarget.querySelector(
43
43
  'input[type="file"]'
44
44
  )?.click();
45
45
  };
46
- let a = null;
46
+ let u = null;
47
47
  const D = () => {
48
- if (a == null) return;
49
- const u = Array.from(a.files ?? []);
50
- u.length > 0 && (p.value = u, t(u, "click")), a.value = "";
51
- }, M = (u) => {
52
- f.get(s) && (u.key === "Enter" || u.key === " ") && (u.preventDefault(), o(u));
48
+ if (u == null) return;
49
+ const a = Array.from(u.files ?? []);
50
+ a.length > 0 && (b.value = a, t(a, "click")), u.value = "";
51
+ }, S = (a) => {
52
+ p.get(s) && (a.key === "Enter" || a.key === " ") && (a.preventDefault(), i(a));
53
53
  };
54
- return h.div(
54
+ return g.div(
55
55
  l.role("button"),
56
56
  l.tabindex(
57
- f.map(s, (u) => u ? 0 : -1)
57
+ p.map(s, (a) => a ? 0 : -1)
58
58
  ),
59
59
  l.style("position: relative;"),
60
- C.dragover(d),
61
- C.dragleave(m),
62
- C.drop(y),
63
- C.click(o),
64
- C.keydown(M),
60
+ C.dragover(f),
61
+ C.dragleave(d),
62
+ C.drop(x),
63
+ C.click(i),
64
+ C.keydown(S),
65
65
  // Hidden file input
66
- h.input(
66
+ g.input(
67
67
  l.type("file"),
68
- l.disabled(b),
68
+ l.disabled(h),
69
69
  l.accept(n),
70
- l.multiple(i),
70
+ l.multiple(o),
71
71
  l.style(
72
72
  "position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
73
73
  ),
74
74
  C.change(D),
75
- te((u) => (a = u, p.on((x) => {
75
+ te((a) => (u = a, b.on((v) => {
76
76
  const $ = globalThis.DataTransfer;
77
77
  if ($ != null) {
78
78
  const I = new $();
79
- x.forEach((A) => I.items.add(A)), u.files = I.files;
79
+ v.forEach((A) => I.items.add(A)), a.files = I.files;
80
80
  }
81
- }), S))
81
+ }), M))
82
82
  ),
83
83
  // Screen reader instructions
84
- J.label(ie(g.$.dropZoneInstructions)(s)),
84
+ J.label(ie(m.$.dropZoneInstructions)(s)),
85
85
  // Content
86
86
  r({
87
- files: p,
88
- clear: () => p.value = [],
89
- change: (u) => p.set(u)
87
+ files: b,
88
+ clear: () => b.value = [],
89
+ change: (a) => b.set(a)
90
90
  })
91
91
  );
92
92
  });
93
93
  }
94
- function Ke(t, e) {
94
+ function et(t, e) {
95
95
  return t.length === e.length && t.every((n, s) => n === e[s]);
96
96
  }
97
- function et(t, e, n) {
97
+ function tt(t, e, n) {
98
98
  const s = ["bc-segmented-input", `bc-segmented-input--size-${t}`];
99
99
  return n === "squared" && s.push("bc-segmented-input--squared"), e && s.push("bc-segmented-input--disabled"), s.join(" ");
100
100
  }
101
- function tt(t) {
101
+ function nt(t) {
102
102
  if (t == null) return "";
103
103
  const e = /* @__PURE__ */ new Map(), n = Ce(t, "solid", "light"), s = Ce(t, "solid", "dark");
104
- return e.set("--si-indicator-bg", n.backgroundColor), e.set("--si-active-text", n.textColor), e.set("--si-indicator-bg-dark", s.backgroundColor), e.set("--si-active-text-dark", s.textColor), Array.from(e.entries()).map(([r, b]) => `${r}: ${b}`).join("; ");
104
+ return e.set("--si-indicator-bg", n.backgroundColor), e.set("--si-active-text", n.textColor), e.set("--si-indicator-bg-dark", s.backgroundColor), e.set("--si-active-text-dark", s.textColor), Array.from(e.entries()).map(([r, h]) => `${r}: ${h}`).join("; ");
105
105
  }
106
106
  function Mt({
107
107
  options: t,
@@ -109,121 +109,121 @@ function Mt({
109
109
  onChange: n,
110
110
  size: s = "md",
111
111
  disabled: r = !1,
112
- variant: b = "pill",
113
- color: i
114
- }, ...g) {
115
- const p = Ze(t).map(([v, d]) => ({
116
- key: v,
117
- label: d
112
+ variant: h = "pill",
113
+ color: o
114
+ }, ...m) {
115
+ const b = He(t).map(([w, f]) => ({
116
+ key: w,
117
+ label: f
118
118
  }));
119
119
  return te(() => {
120
- const v = Object.fromEntries(
121
- p.map((m, y) => [m.key, y])
122
- ), d = ae(
123
- p.map(() => ({ left: 0, width: 0 })),
124
- Ke
120
+ const w = Object.fromEntries(
121
+ b.map((d, x) => [d.key, x])
122
+ ), f = ae(
123
+ b.map(() => ({ left: 0, width: 0 })),
124
+ et
125
125
  );
126
- return h.div(
126
+ return g.div(
127
127
  l.class(
128
128
  V(
129
129
  s,
130
130
  r,
131
- b
131
+ h
132
132
  )(
133
- (m, y, o) => et(
134
- m ?? "md",
135
- y ?? !1,
136
- o ?? "pill"
133
+ (d, x, i) => tt(
134
+ d ?? "md",
135
+ x ?? !1,
136
+ i ?? "pill"
137
137
  )
138
138
  )
139
139
  ),
140
140
  l.style(
141
- i != null ? f.map(i, (m) => tt(m)) : ""
141
+ o != null ? p.map(o, (d) => nt(d)) : ""
142
142
  ),
143
- h.div(
143
+ g.div(
144
144
  l.class("bc-segmented-input__container"),
145
- h.div(
145
+ g.div(
146
146
  l.class("bc-segmented-input__indicator"),
147
147
  we.width(
148
148
  V(
149
149
  e,
150
- d
151
- )((m, y) => {
152
- const { width: o } = y[v[m] ?? 0];
153
- return `${o}px`;
150
+ f
151
+ )((d, x) => {
152
+ const { width: i } = x[w[d] ?? 0];
153
+ return `${i}px`;
154
154
  })
155
155
  ),
156
156
  we.left(
157
157
  V(
158
158
  e,
159
- d
160
- )((m, y) => {
161
- const { left: o } = y[v[m] ?? 0];
162
- return `${o}px`;
159
+ f
160
+ )((d, x) => {
161
+ const { left: i } = x[w[d] ?? 0];
162
+ return `${i}px`;
163
163
  })
164
164
  )
165
165
  ),
166
166
  // clickable buttons
167
- p.map(({ label: m, key: y }, o) => h.button(
167
+ b.map(({ label: d, key: x }, i) => g.button(
168
168
  l.type("button"),
169
- C.click((a) => {
170
- a.preventDefault(), f.get(r) || n?.(y);
169
+ C.click((u) => {
170
+ u.preventDefault(), p.get(r) || n?.(x);
171
171
  }),
172
172
  l.disabled(r),
173
173
  l.class("bc-segmented-input__segment"),
174
174
  l.class(
175
- f.map(e, (a) => a === y ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
175
+ p.map(e, (u) => u === x ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
176
176
  ),
177
- qe((a) => {
177
+ Ye((u) => {
178
178
  function D() {
179
- d.update((u) => {
180
- const x = [...u];
181
- return x[o] = {
182
- width: a.value.width,
183
- left: a.value.localLeft
184
- }, x;
179
+ f.update((a) => {
180
+ const v = [...a];
181
+ return v[i] = {
182
+ width: u.value.width,
183
+ left: u.value.localLeft
184
+ }, v;
185
185
  });
186
186
  }
187
- const M = He(D);
188
- return ne(M, a.on(D));
187
+ const S = qe(D);
188
+ return ne(S, u.on(D));
189
189
  }),
190
- m
190
+ d
191
191
  ))
192
192
  ),
193
- ...g
193
+ ...m
194
194
  );
195
195
  });
196
196
  }
197
- function nt(t) {
197
+ function st(t) {
198
198
  const e = t.type.toLowerCase();
199
199
  return e.startsWith("image/") && (e.includes("jpeg") || e.includes("jpg") || e.includes("png") || e.includes("gif") || e.includes("webp") || e.includes("svg"));
200
200
  }
201
- function st(t) {
201
+ function lt(t) {
202
202
  const e = t.type.toLowerCase();
203
203
  return e.startsWith("image/") ? "vscode-icons:file-type-image" : e.startsWith("video/") ? "vscode-icons:file-type-video" : e.startsWith("audio/") ? "vscode-icons:file-type-audio" : e.includes("pdf") ? "vscode-icons:file-type-pdf2" : e.includes("word") || e.includes("document") ? "vscode-icons:file-type-word" : e.includes("excel") || e.includes("spreadsheet") ? "vscode-icons:file-type-excel" : e.includes("powerpoint") || e.includes("presentation") ? "vscode-icons:file-type-powerpoint" : e.includes("zip") || e.includes("archive") ? "vscode-icons:file-type-zip" : e.includes("text") ? "vscode-icons:file-type-text" : e.includes("json") ? "vscode-icons:file-type-json-official" : e.includes("csv") ? "vscode-icons:file-type-csv" : e.includes("xml") ? "vscode-icons:file-type-xml" : e.includes("yaml") ? "vscode-icons:file-type-yaml-official" : "vscode-icons:file-type-binary";
204
204
  }
205
205
  function me(t) {
206
206
  return U(
207
- t.map(nt),
207
+ t.map(st),
208
208
  () => {
209
209
  const e = ae(null);
210
210
  return t.on((n) => {
211
211
  e.value && URL.revokeObjectURL(e.value);
212
212
  const s = URL.createObjectURL(n);
213
213
  e.value = s;
214
- }), h.div(
214
+ }), g.div(
215
215
  ne(() => {
216
216
  e.value && URL.revokeObjectURL(e.value);
217
217
  }),
218
218
  l.class("bc-file-input__thumbnail-container"),
219
- h.img(
219
+ g.img(
220
220
  l.src(e),
221
221
  l.alt(t.map((n) => n.name)),
222
222
  l.class("bc-file-input__thumbnail")
223
223
  )
224
224
  );
225
225
  },
226
- () => E({ icon: t.map(st) })
226
+ () => E({ icon: t.map(lt) })
227
227
  );
228
228
  }
229
229
  const St = (t, ...e) => {
@@ -231,48 +231,48 @@ const St = (t, ...e) => {
231
231
  value: n = ae([]),
232
232
  accept: s = "*/*",
233
233
  maxFiles: r,
234
- maxFileSize: b,
235
- onChange: i,
236
- onBlur: g,
237
- disabled: p,
238
- hasError: v,
239
- mode: d = "default",
240
- showFileList: m = !0,
241
- ...y
242
- } = t, o = n, a = f.map(d, (k) => k === "input"), D = f.map(d, (k) => k === "compact"), M = (k) => {
234
+ maxFileSize: h,
235
+ onChange: o,
236
+ onBlur: m,
237
+ disabled: b,
238
+ hasError: w,
239
+ mode: f = "default",
240
+ showFileList: d = !0,
241
+ ...x
242
+ } = t, i = n, u = p.map(f, (k) => k === "input"), D = p.map(f, (k) => k === "compact"), S = (k) => {
243
243
  let c = k;
244
244
  if (r != null) {
245
- const w = f.get(r);
246
- c = c.slice(0, w);
245
+ const y = p.get(r);
246
+ c = c.slice(0, y);
247
247
  }
248
- if (b) {
249
- const w = f.get(b);
250
- c = c.filter((T) => T.size <= w);
248
+ if (h) {
249
+ const y = p.get(h);
250
+ c = c.filter((T) => T.size <= y);
251
251
  }
252
- i?.(c);
253
- }, u = (k) => {
254
- const w = o.value.filter((T, z) => z !== k);
255
- i?.(w);
256
- }, x = () => {
257
- i?.([]);
252
+ o?.(c);
253
+ }, a = (k) => {
254
+ const y = i.value.filter((T, z) => z !== k);
255
+ o?.(y);
256
+ }, v = () => {
257
+ o?.([]);
258
258
  }, $ = ({
259
259
  files: k,
260
260
  clear: c,
261
- change: w
261
+ change: y
262
262
  }) => O(
263
263
  F,
264
- (T) => h.div(
264
+ (T) => g.div(
265
265
  l.class("bc-file-input__drop-zone"),
266
- h.div(
266
+ g.div(
267
267
  l.class(
268
268
  "bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
269
269
  ),
270
270
  E({ icon: "mdi:cloud-upload-outline", size: "xl" }),
271
- h.div(
271
+ g.div(
272
272
  l.class("bc-file-input__drop-zone-text"),
273
273
  ie(T.$.filesInputInstructions)(
274
274
  r,
275
- b,
275
+ h,
276
276
  T.$.fileSizeUnits.value
277
277
  )
278
278
  )
@@ -282,36 +282,36 @@ const St = (t, ...e) => {
282
282
  files: k
283
283
  }) => O(
284
284
  F,
285
- (c) => h.div(
285
+ (c) => g.div(
286
286
  l.class("bc-file-input__compact-drop-zone"),
287
287
  U(
288
- k.map((w) => w.length > 0),
289
- () => h.div(
288
+ k.map((y) => y.length > 0),
289
+ () => g.div(
290
290
  l.class("bc-file-input__compact-file-list"),
291
- ee(k, (w, T) => {
291
+ ee(k, (y, T) => {
292
292
  const z = T.index;
293
- return h.div(
293
+ return g.div(
294
294
  l.class("bc-file-input__compact-file-item"),
295
- h.div(
295
+ g.div(
296
296
  l.class("bc-file-input__compact-file-icon"),
297
- me(w)
297
+ me(y)
298
298
  ),
299
- h.div(
299
+ g.div(
300
300
  l.class("bc-file-input__compact-file-info"),
301
- h.div(
301
+ g.div(
302
302
  l.class("bc-file-input__compact-file-name"),
303
- l.title(w.$.name),
304
- w.$.name
303
+ l.title(y.$.name),
304
+ y.$.name
305
305
  ),
306
- h.div(
306
+ g.div(
307
307
  l.class("bc-file-input__compact-file-meta"),
308
308
  V(
309
- w.$.size,
309
+ y.$.size,
310
310
  c.$.fileSizeUnits
311
311
  )((_, B) => De(_, { units: B })),
312
312
  " • ",
313
313
  V(
314
- w.$.type,
314
+ y.$.type,
315
315
  c.$.unknownType
316
316
  )((_, B) => _ || B)
317
317
  )
@@ -320,22 +320,22 @@ const St = (t, ...e) => {
320
320
  {
321
321
  size: "sm",
322
322
  label: c.$.removeFile,
323
- disabled: p,
324
- onClick: () => u(z)
323
+ disabled: b,
324
+ onClick: () => a(z)
325
325
  },
326
326
  l.class("bc-file-input__compact-remove-button")
327
327
  )
328
328
  );
329
329
  })
330
330
  ),
331
- () => h.div(
331
+ () => g.div(
332
332
  l.class("bc-file-input__compact-placeholder"),
333
333
  E({ icon: "mdi:cloud-upload-outline", size: "lg" }),
334
- h.div(
334
+ g.div(
335
335
  l.class("bc-file-input__compact-placeholder-text"),
336
336
  ie(c.$.filesInputInstructions)(
337
337
  r,
338
- b,
338
+ h,
339
339
  c.$.fileSizeUnits.value
340
340
  )
341
341
  )
@@ -346,31 +346,31 @@ const St = (t, ...e) => {
346
346
  files: k
347
347
  }) => O(
348
348
  F,
349
- (c) => h.div(
349
+ (c) => g.div(
350
350
  l.class("bc-file-input__compact-input"),
351
351
  U(
352
- k.map((w) => w.length > 0),
353
- () => h.span(
352
+ k.map((y) => y.length > 0),
353
+ () => g.span(
354
354
  l.class("bc-file-input__compact-value"),
355
355
  ee(
356
356
  k,
357
- (w) => h.span(
357
+ (y) => g.span(
358
358
  l.class("bc-file-input__compact-value-item"),
359
- me(w),
360
- h.span(
359
+ me(y),
360
+ g.span(
361
361
  l.class("bc-file-input__compact-value-item-name"),
362
- w.$.name
362
+ y.$.name
363
363
  )
364
364
  )
365
365
  )
366
366
  ),
367
- () => h.span(
367
+ () => g.span(
368
368
  l.class("bc-file-input__compact-placeholder"),
369
369
  E({ icon: "mdi:cloud-upload-outline", size: "md" }),
370
370
  " ",
371
371
  ie(c.$.filesInputInstructions)(
372
372
  r,
373
- b,
373
+ h,
374
374
  c.$.fileSizeUnits.value
375
375
  )
376
376
  )
@@ -381,87 +381,87 @@ const St = (t, ...e) => {
381
381
  F,
382
382
  (k) => W(
383
383
  {
384
- baseContainer: f.map(a, (c) => !c),
385
- disabled: p,
386
- hasError: v,
384
+ baseContainer: p.map(u, (c) => !c),
385
+ disabled: b,
386
+ hasError: w,
387
387
  after: U(
388
- a,
388
+ u,
389
389
  () => U(
390
- o.map(({ length: c }) => c > 0),
390
+ i.map(({ length: c }) => c > 0),
391
391
  () => oe(
392
392
  {
393
393
  size: "sm",
394
394
  label: k.$.clearAllFiles,
395
- disabled: p,
396
- onClick: x
395
+ disabled: b,
396
+ onClick: v
397
397
  },
398
398
  l.class("bc-file-input__compact-clear")
399
399
  )
400
400
  )
401
401
  ),
402
- ...y,
402
+ ...x,
403
403
  input: U(
404
- a,
405
- () => h.div(
404
+ u,
405
+ () => g.div(
406
406
  l.class("bc-file-input bc-file-input--input"),
407
407
  de({
408
- value: o,
408
+ value: i,
409
409
  accept: s,
410
410
  enableClick: !0,
411
- allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
412
- disabled: p,
413
- onChange: M,
411
+ allowMultiple: p.map(r ?? 1 / 0, (c) => c > 1),
412
+ disabled: b,
413
+ onChange: S,
414
414
  content: A
415
415
  })
416
416
  ),
417
417
  () => U(
418
418
  D,
419
- () => h.div(
419
+ () => g.div(
420
420
  l.class("bc-file-input bc-file-input--compact"),
421
421
  de({
422
- value: o,
422
+ value: i,
423
423
  accept: s,
424
424
  enableClick: !0,
425
- allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
426
- disabled: p,
427
- onChange: M,
425
+ allowMultiple: p.map(r ?? 1 / 0, (c) => c > 1),
426
+ disabled: b,
427
+ onChange: S,
428
428
  content: I
429
429
  })
430
430
  ),
431
- () => h.div(
431
+ () => g.div(
432
432
  l.class("bc-file-input"),
433
433
  de({
434
- value: o,
434
+ value: i,
435
435
  accept: s,
436
436
  enableClick: !0,
437
- allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
438
- disabled: p,
439
- onChange: M,
437
+ allowMultiple: p.map(r ?? 1 / 0, (c) => c > 1),
438
+ disabled: b,
439
+ onChange: S,
440
440
  content: $
441
441
  }),
442
442
  U(
443
- m,
444
- () => Re(
445
- o,
443
+ d,
444
+ () => Ne(
445
+ i,
446
446
  () => N(
447
- h.div(
447
+ g.div(
448
448
  l.class("bc-file-input__file-list"),
449
- ee(o, (c, w) => {
450
- const T = w.index;
451
- return h.div(
449
+ ee(i, (c, y) => {
450
+ const T = y.index;
451
+ return g.div(
452
452
  l.class("bc-file-input__file-item"),
453
- h.div(
453
+ g.div(
454
454
  l.class("bc-file-input__file-icon"),
455
455
  me(c)
456
456
  ),
457
- h.div(
457
+ g.div(
458
458
  l.class("bc-file-input__file-info"),
459
- h.div(
459
+ g.div(
460
460
  l.class("bc-file-input__file-name"),
461
461
  l.title(c.$.name),
462
462
  c.$.name
463
463
  ),
464
- h.div(
464
+ g.div(
465
465
  l.class("bc-file-input__file-meta"),
466
466
  V(
467
467
  c.$.size,
@@ -480,8 +480,8 @@ const St = (t, ...e) => {
480
480
  {
481
481
  size: "sm",
482
482
  label: k.$.removeFile,
483
- disabled: p,
484
- onClick: () => u(T)
483
+ disabled: b,
484
+ onClick: () => a(T)
485
485
  },
486
486
  l.class("bc-file-input__remove-button")
487
487
  )
@@ -489,18 +489,18 @@ const St = (t, ...e) => {
489
489
  })
490
490
  ),
491
491
  U(
492
- o.map(({ length: c }) => c > 1),
493
- () => h.div(
492
+ i.map(({ length: c }) => c > 1),
493
+ () => g.div(
494
494
  l.class(
495
495
  "bc-file-input__clear-all-button-container"
496
496
  ),
497
- h.button(
497
+ g.button(
498
498
  l.type("button"),
499
499
  l.class("bc-file-input__clear-all-button"),
500
- l.disabled(p),
500
+ l.disabled(b),
501
501
  k.$.clearAllFiles,
502
502
  C.click((c) => {
503
- c.preventDefault(), c.stopPropagation(), x();
503
+ c.preventDefault(), c.stopPropagation(), v();
504
504
  })
505
505
  )
506
506
  )
@@ -516,117 +516,119 @@ const St = (t, ...e) => {
516
516
  )
517
517
  );
518
518
  };
519
- function Le(t, e, n) {
520
- const s = f.map(t, (i) => i != null), r = V(
519
+ function Ue(t, e, n) {
520
+ const s = p.map(t, (o) => o != null), r = V(
521
521
  s,
522
522
  e ?? !1
523
- )((i, g) => !i || g), b = ce.clearValue;
524
- return h.button(
523
+ )((o, m) => !o || m), h = ce.clearValue;
524
+ return g.button(
525
525
  l.type("button"),
526
526
  l.class("bc-input-container__reset"),
527
- J.label(b),
528
- l.title(b),
527
+ J.label(h),
528
+ l.title(h),
529
529
  l.disabled(r),
530
530
  E({ icon: "mdi:close", size: "sm" }),
531
- C.click((i) => {
532
- i.stopPropagation(), n?.(null);
531
+ C.click((o) => {
532
+ o.stopPropagation(), n?.(null);
533
533
  })
534
534
  );
535
535
  }
536
- const ge = "$$tts-exp-", lt = (t, e) => te((n) => {
536
+ const ge = "$$tts-exp-", rt = (t, e) => te((n) => {
537
537
  const s = `${ge}${t}`;
538
- return ne(f.on(e, (r) => Reflect.set(n, s, r)));
538
+ return ne(p.on(e, (r) => Reflect.set(n, s, r)));
539
539
  }), Tt = (t, e) => {
540
540
  const n = `${ge}${t}`;
541
541
  return (s) => {
542
542
  e(Reflect.get(s.target, n));
543
543
  };
544
- }, rt = (t, e) => {
544
+ }, $e = (t, e) => {
545
545
  const n = `${ge}${t}`;
546
546
  return (s) => {
547
- const r = s.target, b = r.selectedIndex, i = r.options[b];
548
- e(Reflect.get(i, n));
547
+ const r = s.target, h = r.selectedIndex, o = r.options[h];
548
+ e(Reflect.get(o, n));
549
549
  };
550
550
  };
551
- function $e(...t) {
552
- return h.div(l.class("bc-group"), ...t);
551
+ function Me(...t) {
552
+ return g.div(l.class("bc-group"), ...t);
553
553
  }
554
- const Ue = (t, e, n) => Pe(
554
+ const Ee = (t, e, n) => je(
555
555
  t,
556
- (s) => je(s, {
556
+ (s) => We(s, {
557
557
  value: (r) => {
558
- const b = V(
558
+ const h = V(
559
559
  r,
560
560
  n
561
- )((i, g) => e(i.value, g));
562
- return h.option(
563
- l.selected(b),
564
- lt("value", r.$.value),
561
+ )((o, m) => e(o.value, m));
562
+ return g.option(
563
+ l.selected(h),
564
+ rt("value", r.$.value),
565
565
  r.$.label
566
566
  );
567
567
  },
568
- group: (r) => h.optgroup(
568
+ group: (r) => g.optgroup(
569
569
  l.label(r.$.group),
570
570
  ee(
571
571
  r.$.options,
572
- (b) => Ue(
573
- b,
572
+ (h) => Ee(
573
+ h,
574
574
  e,
575
575
  n
576
576
  )
577
577
  )
578
578
  ),
579
- break: () => h.hr()
579
+ break: () => g.hr()
580
580
  })
581
581
  ), it = (t) => {
582
582
  const {
583
583
  value: e,
584
584
  onBlur: n,
585
585
  onChange: s,
586
- options: r,
587
- unselectedLabel: b,
588
- equality: i = (v, d) => v === d,
589
- after: g
586
+ onInput: r,
587
+ options: h,
588
+ unselectedLabel: o,
589
+ equality: m = (f, d) => f === d,
590
+ after: b
590
591
  } = t;
591
- let p;
592
+ let w;
592
593
  return W(
593
594
  {
594
595
  ...t,
595
596
  after: N(
596
- Ye({
597
+ Ge({
597
598
  icon: "ph:caret-down-bold",
598
599
  color: "neutral",
599
600
  size: "sm"
600
601
  }),
601
- g
602
+ b
602
603
  ),
603
- input: h.select(
604
- te((v) => {
605
- p = v;
606
- const d = new MutationObserver((m) => {
607
- const { removedNodes: y } = m[0];
608
- y.length > 0 && (p.selectedIndex = 0);
604
+ input: g.select(
605
+ te((f) => {
606
+ w = f;
607
+ const d = new MutationObserver((x) => {
608
+ const { removedNodes: i } = x[0];
609
+ i.length > 0 && (w.selectedIndex = 0);
609
610
  });
610
- return d.observe(v, { childList: !0 }), ne(() => d.disconnect());
611
+ return d.observe(f, { childList: !0 }), ne(() => d.disconnect());
611
612
  }),
612
613
  q(t),
613
614
  l.class("bc-native-select bc-input"),
614
615
  O(
615
616
  F,
616
- (v) => h.option(
617
+ (f) => g.option(
617
618
  l.hidden("hidden"),
618
- Ne(b, v.$.selectOne)
619
+ Pe(o, f.$.selectOne)
619
620
  )
620
621
  ),
621
- ee(r, (v) => Ue(v, i, e)),
622
- n != null ? C.blur(n) : S,
623
- s != null ? C.change(rt("value", (v) => s(v))) : S
622
+ ee(h, (f) => Ee(f, m, e)),
623
+ n != null ? C.blur(n) : M,
624
+ s != null ? C.change($e("value", (f) => s(f))) : M,
625
+ r != null ? C.input($e("value", (f) => r(f))) : M
624
626
  )
625
627
  },
626
628
  C.click(() => {
627
- if (p?.focus(), typeof p?.showPicker == "function")
629
+ if (w?.focus(), typeof w?.showPicker == "function")
628
630
  try {
629
- p.showPicker();
631
+ w.showPicker();
630
632
  } catch {
631
633
  }
632
634
  })
@@ -637,33 +639,33 @@ function ot(t) {
637
639
  return it({
638
640
  ...r,
639
641
  value: e.signal,
640
- onChange: Xe(e, n),
641
- onBlur: Je(e, s)
642
+ onChange: Qe(e, n),
643
+ onBlur: Xe(e, s)
642
644
  });
643
645
  }
644
646
  function zt(t) {
645
- return Ve({
647
+ return Ae({
646
648
  ...t,
647
649
  content: ot(t)
648
650
  });
649
651
  }
650
652
  function ct(t, e, n) {
651
653
  const s = t.length.map((r) => r);
652
- return We(
654
+ return Ze(
653
655
  s,
654
656
  (r) => {
655
- const b = t.item(r.index), i = [];
657
+ const h = t.item(r.index), o = [];
656
658
  return N(
657
659
  ne(() => {
658
- i.forEach((g) => g());
660
+ o.forEach((m) => m());
659
661
  }),
660
662
  e({
661
663
  list: t,
662
- item: b,
664
+ item: h,
663
665
  position: r,
664
666
  remove: () => t.removeAt(r.index),
665
- move: (g) => {
666
- switch (g) {
667
+ move: (m) => {
668
+ switch (m) {
667
669
  case "up":
668
670
  if (r.index === 0) return;
669
671
  t.move(r.index, r.index - 1);
@@ -679,27 +681,27 @@ function ct(t, e, n) {
679
681
  t.move(r.index, t.length.value - 1);
680
682
  }
681
683
  },
682
- canMove: (g) => {
683
- const p = (() => {
684
- switch (g) {
684
+ canMove: (m) => {
685
+ const b = (() => {
686
+ switch (m) {
685
687
  case "up":
686
688
  return _e(r.index > 0);
687
689
  case "down":
688
- return t.length.map((v) => r.index < v - 1);
690
+ return t.length.map((w) => r.index < w - 1);
689
691
  }
690
692
  })();
691
- return i.push(() => p.dispose()), p;
693
+ return o.push(() => b.dispose()), b;
692
694
  },
693
- cannotMove: (g) => {
694
- const p = (() => {
695
- switch (g) {
695
+ cannotMove: (m) => {
696
+ const b = (() => {
697
+ switch (m) {
696
698
  case "up":
697
699
  return _e(r.index === 0);
698
700
  case "down":
699
- return t.length.map((v) => r.index === v - 1);
701
+ return t.length.map((w) => r.index === w - 1);
700
702
  }
701
703
  })();
702
- return i.push(() => p.dispose()), p;
704
+ return o.push(() => b.dispose()), b;
703
705
  }
704
706
  })
705
707
  );
@@ -707,27 +709,27 @@ function ct(t, e, n) {
707
709
  n
708
710
  );
709
711
  }
710
- const Me = {
712
+ const Se = {
711
713
  9: { pattern: /^[0-9]$/ },
712
714
  A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
713
715
  "*": { pattern: /^.$/ }
714
716
  }, at = (t) => t instanceof RegExp;
715
- function Ee(t, e, n) {
717
+ function Oe(t, e, n) {
716
718
  if (t == null) return [];
717
- const s = n ? { ...Me, ...e } : e ?? Me, r = (i, g) => {
718
- const p = s[g];
719
- p ? i.push({ type: "pattern", name: g, ...p }) : i.push({ type: "literal", char: g });
720
- }, b = [];
719
+ const s = n ? { ...Se, ...e } : e ?? Se, r = (o, m) => {
720
+ const b = s[m];
721
+ b ? o.push({ type: "pattern", name: m, ...b }) : o.push({ type: "literal", char: m });
722
+ }, h = [];
721
723
  if (typeof t == "string") {
722
- for (const i of t) r(b, i);
723
- return b;
724
+ for (const o of t) r(h, o);
725
+ return h;
724
726
  }
725
- for (const i of t)
726
- if (typeof i == "string")
727
- if (i.length <= 1) r(b, i);
728
- else for (const g of i) r(b, g);
729
- else at(i) ? b.push({ type: "pattern", pattern: i }) : typeof i == "object" && i && b.push(i);
730
- return b;
727
+ for (const o of t)
728
+ if (typeof o == "string")
729
+ if (o.length <= 1) r(h, o);
730
+ else for (const m of o) r(h, m);
731
+ else at(o) ? h.push({ type: "pattern", pattern: o }) : typeof o == "object" && o && h.push(o);
732
+ return h;
731
733
  }
732
734
  function ut(t, e) {
733
735
  return (n) => {
@@ -745,117 +747,117 @@ function ut(t, e) {
745
747
  }
746
748
  };
747
749
  }
748
- function Se(t, e, n, s, r, b) {
749
- const i = {
750
+ function Te(t, e, n, s, r, h) {
751
+ const o = {
750
752
  raw: t,
751
753
  previousConformed: e,
752
754
  cursor: r ?? t.length,
753
755
  completed: !1
754
- }, g = s.definitions ?? {}, p = typeof n == "function" ? n(t, i) : n, v = Ee(
755
- p,
756
- g,
756
+ }, m = s.definitions ?? {}, b = typeof n == "function" ? n(t, o) : n, w = Oe(
757
+ b,
758
+ m,
757
759
  s.useDefaultDefinitions ?? !0
758
- ), d = ut(s.allowMode, s.allow), m = /* @__PURE__ */ new Set();
759
- for (const _ of v) _.type === "literal" && m.add(_.char);
760
- if (s.prefix) for (const _ of s.prefix) m.add(_);
761
- if (s.suffix) for (const _ of s.suffix) m.add(_);
762
- const y = Array.from(t).filter((_) => d(_) && !m.has(_));
763
- if (y.length === 0) return { value: "", cursor: 0, completed: !1 };
764
- const o = [], a = [];
765
- let D = 0, M = 0, u = 0, x = -1;
766
- for (const _ of v) {
760
+ ), f = ut(s.allowMode, s.allow), d = /* @__PURE__ */ new Set();
761
+ for (const _ of w) _.type === "literal" && d.add(_.char);
762
+ if (s.prefix) for (const _ of s.prefix) d.add(_);
763
+ if (s.suffix) for (const _ of s.suffix) d.add(_);
764
+ const x = Array.from(t).filter((_) => f(_) && !d.has(_));
765
+ if (x.length === 0) return { value: "", cursor: 0, completed: !1 };
766
+ const i = [], u = [];
767
+ let D = 0, S = 0, a = 0, v = -1;
768
+ for (const _ of w) {
767
769
  if (_.type === "literal") {
768
- o.push(_.char), a.push({ kind: "literal", filled: !0 });
770
+ i.push(_.char), u.push({ kind: "literal", filled: !0 });
769
771
  continue;
770
772
  }
771
- M += _.optional ? 0 : 1;
772
- const B = y[D];
773
+ S += _.optional ? 0 : 1;
774
+ const B = x[D];
773
775
  if (B == null)
774
776
  break;
775
777
  if (_.type === "any") {
776
- u++, o.push(_.transform ? _.transform(B) : B), a.push({ kind: "slot", filled: !0 }), x = a.length - 1, D++;
778
+ a++, i.push(_.transform ? _.transform(B) : B), u.push({ kind: "slot", filled: !0 }), v = u.length - 1, D++;
777
779
  continue;
778
780
  }
779
781
  if (_.type === "pattern")
780
782
  if (_.pattern.test(B)) {
781
- u++;
783
+ a++;
782
784
  const R = _.transform ? _.transform(B) : B;
783
- o.push(R), a.push({ kind: "slot", filled: !0 }), x = a.length - 1, D++;
785
+ i.push(R), u.push({ kind: "slot", filled: !0 }), v = u.length - 1, D++;
784
786
  } else {
785
787
  D++;
786
788
  continue;
787
789
  }
788
790
  }
789
- const $ = o.join(""), I = (s.prefix ?? "") + $ + (s.suffix ?? "");
791
+ const $ = i.join(""), I = (s.prefix ?? "") + $ + (s.suffix ?? "");
790
792
  let k = (s.prefix ?? "").length;
791
- if (x >= 0) {
792
- let _ = x + 1;
793
- if ((b?.policy ?? "smart") !== "sticky")
794
- for (; _ < a.length && a[_].kind === "literal"; ) _++;
793
+ if (v >= 0) {
794
+ let _ = v + 1;
795
+ if ((h?.policy ?? "smart") !== "sticky")
796
+ for (; _ < u.length && u[_].kind === "literal"; ) _++;
795
797
  k += _;
796
798
  }
797
- const c = s.completion?.mode === "min" ? (s.completion.minChars ?? 0) <= u : s.completion?.mode === "custom" ? !!s.completion.isComplete?.(I) : M > 0 && u >= M, w = s.pipe?.(I, { ...i, completed: c });
799
+ const c = s.completion?.mode === "min" ? (s.completion.minChars ?? 0) <= a : s.completion?.mode === "custom" ? !!s.completion.isComplete?.(I) : S > 0 && a >= S, y = s.pipe?.(I, { ...o, completed: c });
798
800
  let T, z = k;
799
- return w === !1 ? (T = e, z = e.length) : typeof w == "string" ? (T = w, z = w.length) : typeof w == "object" && w ? (T = w.value, z = w.cursor ?? w.value.length) : T = I, { value: T, cursor: z, completed: c };
801
+ return y === !1 ? (T = e, z = e.length) : typeof y == "string" ? (T = y, z = y.length) : typeof y == "object" && y ? (T = y.value, z = y.cursor ?? y.value.length) : T = I, { value: T, cursor: z, completed: c };
800
802
  }
801
803
  function ft(t, e) {
802
804
  const n = e?.strategy ?? "none";
803
805
  return n === "custom" && e?.unmask ? e.unmask(t) : n === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
804
806
  }
805
- const Oe = (t) => {
807
+ const Fe = (t) => {
806
808
  const {
807
809
  value: e,
808
810
  onBlur: n,
809
811
  onChange: s,
810
812
  onInput: r,
811
- onAccept: b,
812
- onComplete: i,
813
- mask: g,
814
- definitions: p,
815
- useDefaultDefinitions: v,
816
- extraLiterals: d,
817
- prefix: m,
818
- suffix: y,
819
- autofix: o,
820
- pipe: a,
813
+ onAccept: h,
814
+ onComplete: o,
815
+ mask: m,
816
+ definitions: b,
817
+ useDefaultDefinitions: w,
818
+ extraLiterals: f,
819
+ prefix: d,
820
+ suffix: x,
821
+ autofix: i,
822
+ pipe: u,
821
823
  completion: D,
822
- unmask: M,
823
- allowMode: u,
824
- allow: x,
824
+ unmask: S,
825
+ allowMode: a,
826
+ allow: v,
825
827
  placeholder: $,
826
828
  placeholderOptions: I
827
829
  } = t, A = V(
828
830
  e,
829
- g,
830
- p,
831
- v,
832
- d,
833
831
  m,
834
- y,
835
- o,
832
+ b,
833
+ w,
834
+ f,
835
+ d,
836
+ x,
837
+ i,
836
838
  D,
837
- M,
838
- u,
839
+ S,
840
+ a,
839
841
  $,
840
842
  I
841
- )((c, w, T, z, _, B, R, X, Q, Y, Z, le, j) => w ? Se(c ?? "", "", w, {
843
+ )((c, y, T, z, _, B, R, X, Q, Y, Z, le, j) => y ? Te(c ?? "", "", y, {
842
844
  definitions: T ?? {},
843
845
  useDefaultDefinitions: z ?? !0,
844
846
  extraLiterals: _ ?? [],
845
847
  autofix: X ?? "none",
846
848
  completion: Q ?? { mode: "mask" },
847
- pipe: a ?? ((L) => L),
849
+ pipe: u ?? ((L) => L),
848
850
  unmask: Y ?? { strategy: "none" },
849
851
  allowMode: Z ?? "all",
850
- allow: x,
852
+ allow: v,
851
853
  prefix: B,
852
854
  suffix: R
853
- }).value : c ?? ""), k = (c, w) => {
854
- const T = c.value ?? "", z = f.get(e) ?? "", _ = g != null ? f.get(g) : null, B = p != null ? f.get(p) : void 0, R = v != null ? f.get(v) : void 0, X = d != null ? f.get(d) : void 0, Q = o != null ? f.get(o) : void 0, Y = D != null ? f.get(D) : void 0, Z = M != null ? f.get(M) : void 0, le = u != null ? f.get(u) : void 0, j = m != null ? f.get(m) : void 0, L = y != null ? f.get(y) : void 0, {
855
+ }).value : c ?? ""), k = (c, y) => {
856
+ const T = c.value ?? "", z = p.get(e) ?? "", _ = m != null ? p.get(m) : null, B = b != null ? p.get(b) : void 0, R = w != null ? p.get(w) : void 0, X = f != null ? p.get(f) : void 0, Q = i != null ? p.get(i) : void 0, Y = D != null ? p.get(D) : void 0, Z = S != null ? p.get(S) : void 0, le = a != null ? p.get(a) : void 0, j = d != null ? p.get(d) : void 0, L = x != null ? p.get(x) : void 0, {
855
857
  value: H,
856
858
  cursor: ue,
857
859
  completed: ve
858
- } = _ ? Se(
860
+ } = _ ? Te(
859
861
  T,
860
862
  z,
861
863
  _,
@@ -865,15 +867,15 @@ const Oe = (t) => {
865
867
  extraLiterals: X ?? [],
866
868
  autofix: Q ?? "none",
867
869
  completion: Y ?? { mode: "mask" },
868
- pipe: a ?? ((Fe) => Fe),
870
+ pipe: u ?? ((Re) => Re),
869
871
  unmask: Z ?? { strategy: "none" },
870
872
  allowMode: le ?? "all",
871
- allow: x,
873
+ allow: v,
872
874
  prefix: j,
873
875
  suffix: L
874
876
  },
875
877
  c.selectionStart ?? T.length,
876
- t.cursor ? f.get(t.cursor) : void 0
878
+ t.cursor ? p.get(t.cursor) : void 0
877
879
  ) : { value: T, cursor: T.length, completed: !0 };
878
880
  if (H !== T) {
879
881
  c.value = H;
@@ -883,12 +885,12 @@ const Oe = (t) => {
883
885
  }
884
886
  }
885
887
  const xe = ft(H, Z);
886
- b?.({
888
+ h?.({
887
889
  raw: xe,
888
890
  conformed: H,
889
891
  completed: ve,
890
892
  cursor: ue
891
- }), w === "input" ? r?.(H) : (s?.(H), ve && i?.({ raw: xe, conformed: H }));
893
+ }), y === "input" ? r?.(H) : (s?.(H), ve && o?.({ raw: xe, conformed: H }));
892
894
  };
893
895
  return W({
894
896
  ...t,
@@ -896,18 +898,18 @@ const Oe = (t) => {
896
898
  q(t),
897
899
  l.value(A),
898
900
  l.class("bc-input"),
899
- n != null ? C.blur(n) : S,
901
+ n != null ? C.blur(n) : M,
900
902
  te(
901
903
  (c) => c instanceof HTMLInputElement ? N(
902
904
  C.input(() => k(c, "input")),
903
905
  C.change(() => k(c, "change")),
904
- C.keydown((w) => {
905
- if (w.key !== "Backspace" || !(t.cursor ? f.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
906
+ C.keydown((y) => {
907
+ if (y.key !== "Backspace" || !(t.cursor ? p.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
906
908
  const z = c.selectionStart ?? 0, _ = c.selectionEnd ?? z;
907
909
  if (z !== _ || z <= 0) return;
908
- const B = c.value ?? "", R = g != null ? f.get(g) : null;
910
+ const B = c.value ?? "", R = m != null ? p.get(m) : null;
909
911
  if (!R) return;
910
- const X = p != null ? f.get(p) : void 0, Q = v != null ? f.get(v) : !0, Y = m != null ? f.get(m) : void 0, Z = y != null ? f.get(y) : void 0, le = Ee(
912
+ const X = b != null ? p.get(b) : void 0, Q = w != null ? p.get(w) : !0, Y = d != null ? p.get(d) : void 0, Z = x != null ? p.get(x) : void 0, le = Oe(
911
913
  typeof R == "function" ? R(B, {
912
914
  raw: B,
913
915
  previousConformed: B,
@@ -924,34 +926,34 @@ const Oe = (t) => {
924
926
  if (j.has(B[z - 1])) {
925
927
  let L = z - 1;
926
928
  for (; L >= 0 && j.has(B[L]); ) L--;
927
- L >= 0 && (w.preventDefault(), w.stopPropagation(), c.value = B.slice(0, L) + B.slice(L + 1), k(c, "input"));
929
+ L >= 0 && (y.preventDefault(), y.stopPropagation(), c.value = B.slice(0, L) + B.slice(L + 1), k(c, "input"));
928
930
  }
929
931
  })
930
- ) : S
932
+ ) : M
931
933
  )
932
934
  )
933
935
  });
934
936
  }, Bt = (t) => {
935
- const { value: e, onBlur: n, onChange: s, onInput: r, rows: b } = t;
937
+ const { value: e, onBlur: n, onChange: s, onInput: r, rows: h } = t;
936
938
  return W({
937
939
  baseContainer: !0,
938
940
  ...t,
939
- input: h.textarea(
941
+ input: g.textarea(
940
942
  l.class(
941
943
  V(t.size ?? "md")(
942
- (i) => Ge(
944
+ (o) => Je(
943
945
  !1,
944
- i ?? "md"
946
+ o ?? "md"
945
947
  )
946
948
  )
947
949
  ),
948
950
  q(t),
949
- l.rows(b ?? 3),
951
+ l.rows(h ?? 3),
950
952
  l.value(e),
951
953
  l.class("bc-input"),
952
- n != null ? C.blur(P(n)) : S,
953
- s != null ? C.change(P(s)) : S,
954
- r != null ? C.input(P(r)) : S
954
+ n != null ? C.blur(P(n)) : M,
955
+ s != null ? C.change(P(s)) : M,
956
+ r != null ? C.input(P(r)) : M
955
957
  )
956
958
  });
957
959
  };
@@ -966,150 +968,150 @@ function G(t, e) {
966
968
  return Math.round(t * s) / s;
967
969
  }
968
970
  const Vt = (t) => {
969
- const { value: e, step: n, min: s, max: r, onBlur: b, onChange: i, onInput: g, after: p } = t, v = (y) => {
970
- const o = s != null ? f.get(s) : void 0, a = r != null ? f.get(r) : void 0;
971
- return o != null && y < o ? o : a != null && y > a ? a : y;
972
- }, d = n != null ? O(F, (y) => {
973
- const o = V(
971
+ const { value: e, step: n, min: s, max: r, onBlur: h, onChange: o, onInput: m, after: b } = t, w = (x) => {
972
+ const i = s != null ? p.get(s) : void 0, u = r != null ? p.get(r) : void 0;
973
+ return i != null && x < i ? i : u != null && x > u ? u : x;
974
+ }, f = n != null ? O(F, (x) => {
975
+ const i = V(
974
976
  e,
975
977
  s
976
- )((u, x) => x == null ? !0 : (u ?? 0) > x), a = V(
978
+ )((a, v) => v == null ? !0 : (a ?? 0) > v), u = V(
977
979
  e,
978
980
  r
979
- )((u, x) => x == null ? !0 : (u ?? 0) < x), D = (u) => {
980
- const x = f.get(e) ?? 0, $ = f.get(n), I = u?.shiftKey ? 10 : 1, A = G(
981
- x - $ * I,
981
+ )((a, v) => v == null ? !0 : (a ?? 0) < v), D = (a) => {
982
+ const v = p.get(e) ?? 0, $ = p.get(n), I = a?.shiftKey ? 10 : 1, A = G(
983
+ v - $ * I,
982
984
  $
983
- ), k = s != null ? f.get(s) : void 0;
985
+ ), k = s != null ? p.get(s) : void 0;
984
986
  if (k != null && A < k)
985
987
  return;
986
- const c = v(A);
987
- c !== x && i && i(c);
988
- }, M = (u) => {
989
- const x = f.get(e) ?? 0, $ = f.get(n), I = u?.shiftKey ? 10 : 1, A = G(
990
- x + $ * I,
988
+ const c = w(A);
989
+ c !== v && (o?.(c), m?.(c));
990
+ }, S = (a) => {
991
+ const v = p.get(e) ?? 0, $ = p.get(n), I = a?.shiftKey ? 10 : 1, A = G(
992
+ v + $ * I,
991
993
  $
992
- ), k = r != null ? f.get(r) : void 0;
994
+ ), k = r != null ? p.get(r) : void 0;
993
995
  if (k != null && A > k)
994
996
  return;
995
- const c = v(A);
996
- c !== x && i && i(c);
997
+ const c = w(A);
998
+ c !== v && (o?.(c), m?.(c));
997
999
  };
998
- return Ae(
1000
+ return Le(
999
1001
  l.class("bc-number-input-steppers"),
1000
1002
  // Increment second
1001
- h.button(
1003
+ g.button(
1002
1004
  l.type("button"),
1003
1005
  l.class(
1004
1006
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1005
1007
  ),
1006
1008
  l.disabled(
1007
1009
  V(
1008
- a,
1010
+ u,
1009
1011
  t.disabled ?? !1
1010
- )((u, x) => !u || x)
1012
+ )((a, v) => !a || v)
1011
1013
  ),
1012
- C.click((u) => M(u)),
1013
- J.label(y.$.incrementValue),
1014
+ C.click((a) => S(a)),
1015
+ J.label(x.$.incrementValue),
1014
1016
  E({ icon: "line-md:plus", size: "xs" })
1015
1017
  ),
1016
1018
  // Decrement first (matches tests expecting first button to be decrement)
1017
- h.button(
1019
+ g.button(
1018
1020
  l.type("button"),
1019
1021
  l.class(
1020
1022
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1021
1023
  ),
1022
1024
  l.disabled(
1023
1025
  V(
1024
- o,
1026
+ i,
1025
1027
  t.disabled ?? !1
1026
- )((u, x) => !u || x)
1028
+ )((a, v) => !a || v)
1027
1029
  ),
1028
- C.click((u) => D(u)),
1029
- J.label(y.$.decrementValue),
1030
+ C.click((a) => D(a)),
1031
+ J.label(x.$.decrementValue),
1030
1032
  E({ icon: "line-md:minus", size: "xs" })
1031
1033
  )
1032
1034
  );
1033
- }) : null, m = p != null && d != null ? N(d, p) : p ?? d;
1035
+ }) : null, d = b != null && f != null ? N(f, b) : b ?? f;
1034
1036
  return W({
1035
1037
  ...t,
1036
1038
  input: se.number(
1037
- s != null ? l.min(s) : S,
1038
- r != null ? l.max(r) : S,
1039
+ s != null ? l.min(s) : M,
1040
+ r != null ? l.max(r) : M,
1039
1041
  q(t),
1040
1042
  l.valueAsNumber(e),
1041
1043
  l.step(n),
1042
1044
  l.class("bc-input bc-number-input"),
1043
- b != null ? C.blur(P(b)) : S,
1044
- i != null ? C.change(ke(i)) : S,
1045
- g != null ? C.input(ke(g)) : S,
1045
+ h != null ? C.blur(P(h)) : M,
1046
+ o != null ? C.change(ke(o)) : M,
1047
+ m != null ? C.input(ke(m)) : M,
1046
1048
  // Add wheel event support when step is defined
1047
- n != null ? C.wheel((y) => {
1048
- y.preventDefault();
1049
- const o = f.get(e) ?? 0, a = f.get(n), D = y.shiftKey ? 10 : 1, M = y.deltaY < 0 ? a * D : -a * D, u = v(G(o + M, a));
1050
- u !== o && i && i(u);
1051
- }) : S
1049
+ n != null ? C.wheel((x) => {
1050
+ x.preventDefault();
1051
+ const i = p.get(e) ?? 0, u = p.get(n), D = x.shiftKey ? 10 : 1, S = x.deltaY < 0 ? u * D : -u * D, a = w(G(i + S, u));
1052
+ a !== i && (o?.(a), m?.(a));
1053
+ }) : M
1052
1054
  ),
1053
- after: m
1055
+ after: d
1054
1056
  });
1055
- }, Te = (t) => {
1057
+ }, ze = (t) => {
1056
1058
  if (t == null || t === "") return null;
1057
1059
  const e = Number(t);
1058
1060
  return Number.isNaN(e) ? null : e;
1059
1061
  }, At = (t) => {
1060
- const { value: e, step: n, min: s, max: r, onBlur: b, onChange: i, onInput: g, after: p } = t, v = (o) => {
1061
- const a = s != null ? f.get(s) : void 0, D = r != null ? f.get(r) : void 0;
1062
- return a != null && o < a ? a : D != null && o > D ? D : o;
1063
- }, d = (() => {
1062
+ const { value: e, step: n, min: s, max: r, onBlur: h, onChange: o, onInput: m, after: b } = t, w = (i) => {
1063
+ const u = s != null ? p.get(s) : void 0, D = r != null ? p.get(r) : void 0;
1064
+ return u != null && i < u ? u : D != null && i > D ? D : i;
1065
+ }, f = (() => {
1064
1066
  if (n == null) return null;
1065
- const o = V(
1067
+ const i = V(
1066
1068
  e,
1067
1069
  s
1068
- )((x, $) => {
1069
- const I = x ?? 0;
1070
+ )((v, $) => {
1071
+ const I = v ?? 0;
1070
1072
  return $ == null ? !0 : I > $;
1071
- }), a = V(
1073
+ }), u = V(
1072
1074
  e,
1073
1075
  r
1074
- )((x, $) => {
1075
- const I = x ?? 0;
1076
+ )((v, $) => {
1077
+ const I = v ?? 0;
1076
1078
  return $ == null ? !0 : I < $;
1077
- }), D = (x) => {
1078
- const $ = f.get(e) ?? 0, I = f.get(n), A = x?.shiftKey ? 10 : 1, k = G($ - I * A, I), c = s != null ? f.get(s) : void 0;
1079
+ }), D = (v) => {
1080
+ const $ = p.get(e) ?? 0, I = p.get(n), A = v?.shiftKey ? 10 : 1, k = G($ - I * A, I), c = s != null ? p.get(s) : void 0;
1079
1081
  if (c != null && k < c) return;
1080
- const w = v(k);
1081
- w !== $ && i && i(w);
1082
- }, M = (x) => {
1083
- const $ = f.get(e) ?? 0, I = f.get(n), A = x?.shiftKey ? 10 : 1, k = G($ + I * A, I), c = r != null ? f.get(r) : void 0;
1082
+ const y = w(k);
1083
+ y !== $ && (o?.(y), m?.(y));
1084
+ }, S = (v) => {
1085
+ const $ = p.get(e) ?? 0, I = p.get(n), A = v?.shiftKey ? 10 : 1, k = G($ + I * A, I), c = r != null ? p.get(r) : void 0;
1084
1086
  if (c != null && k > c) return;
1085
- const w = v(k);
1086
- w !== $ && i && i(w);
1087
+ const y = w(k);
1088
+ y !== $ && (o?.(y), m?.(y));
1087
1089
  };
1088
- return ((x, $) => Ae(
1090
+ return ((v, $) => Le(
1089
1091
  l.class("bc-number-input-steppers"),
1090
- h.button(
1092
+ g.button(
1091
1093
  l.type("button"),
1092
1094
  l.class(
1093
1095
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1094
1096
  ),
1095
1097
  l.disabled(
1096
1098
  V(
1097
- a,
1099
+ u,
1098
1100
  t.disabled ?? !1
1099
1101
  )((I, A) => !I || A)
1100
1102
  ),
1101
- C.click((I) => M(I)),
1102
- J.label(x),
1103
+ C.click((I) => S(I)),
1104
+ J.label(v),
1103
1105
  E({ icon: "line-md:plus", size: "xs" })
1104
1106
  ),
1105
- h.button(
1107
+ g.button(
1106
1108
  l.type("button"),
1107
1109
  l.class(
1108
1110
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1109
1111
  ),
1110
1112
  l.disabled(
1111
1113
  V(
1112
- o,
1114
+ i,
1113
1115
  t.disabled ?? !1
1114
1116
  )((I, A) => !I || A)
1115
1117
  ),
@@ -1121,43 +1123,43 @@ const Vt = (t) => {
1121
1123
  ce.incrementValue,
1122
1124
  ce.decrementValue
1123
1125
  );
1124
- })(), m = Le(
1126
+ })(), d = Ue(
1125
1127
  e,
1126
1128
  t.disabled,
1127
- i ?? g
1128
- ), y = p != null && d != null ? N(d, m, p) : p != null ? N(m, p) : d != null ? N(d, m) : m;
1129
+ o ?? m
1130
+ ), x = b != null && f != null ? N(f, d, b) : b != null ? N(d, b) : f != null ? N(f, d) : d;
1129
1131
  return W({
1130
1132
  ...t,
1131
1133
  input: se.number(
1132
1134
  // min/max attributes and reactive watchers (no forced correction)
1133
- s != null ? l.min(s) : S,
1134
- r != null ? l.max(r) : S,
1135
+ s != null ? l.min(s) : M,
1136
+ r != null ? l.max(r) : M,
1135
1137
  q(t),
1136
1138
  // Represent null as empty string so the field can be cleared
1137
- l.value(f.map(e, (o) => o == null ? "" : String(o))),
1139
+ l.value(p.map(e, (i) => i == null ? "" : String(i))),
1138
1140
  l.step(n),
1139
1141
  l.class("bc-input bc-number-input"),
1140
- b != null ? C.blur(P(b)) : S,
1141
- i != null ? C.change(
1142
- P((o) => {
1143
- const a = Te(o);
1144
- i(a);
1142
+ h != null ? C.blur(P(h)) : M,
1143
+ o != null ? C.change(
1144
+ P((i) => {
1145
+ const u = ze(i);
1146
+ o(u);
1145
1147
  })
1146
- ) : S,
1147
- g != null ? C.input(
1148
- P((o) => {
1149
- const a = Te(o);
1150
- g(a);
1148
+ ) : M,
1149
+ m != null ? C.input(
1150
+ P((i) => {
1151
+ const u = ze(i);
1152
+ m(u);
1151
1153
  })
1152
- ) : S,
1154
+ ) : M,
1153
1155
  // Wheel support when step is defined
1154
- n != null ? C.wheel((o) => {
1155
- o.preventDefault();
1156
- const a = f.get(e) ?? 0, D = f.get(n), M = o.shiftKey ? 10 : 1, u = o.deltaY < 0 ? D * M : -D * M, x = v(G(a + u, D));
1157
- x !== a && i && i(x);
1158
- }) : S
1156
+ n != null ? C.wheel((i) => {
1157
+ i.preventDefault();
1158
+ const u = p.get(e) ?? 0, D = p.get(n), S = i.shiftKey ? 10 : 1, a = i.deltaY < 0 ? D * S : -D * S, v = w(G(u + a, D));
1159
+ v !== u && (o?.(v), m?.(v));
1160
+ }) : M
1159
1161
  ),
1160
- after: y
1162
+ after: x
1161
1163
  });
1162
1164
  }, Lt = (t) => {
1163
1165
  const e = {
@@ -1165,7 +1167,7 @@ const Vt = (t) => {
1165
1167
  pattern: /[0-9A-Fa-f]/,
1166
1168
  transform: (s) => s.toLowerCase()
1167
1169
  };
1168
- return Oe({
1170
+ return Fe({
1169
1171
  ...t,
1170
1172
  mask: [
1171
1173
  e,
@@ -1232,7 +1234,7 @@ function bt(t) {
1232
1234
  }
1233
1235
  };
1234
1236
  }
1235
- const ze = (t, e) => {
1237
+ const Be = (t, e) => {
1236
1238
  if (t == null) return null;
1237
1239
  try {
1238
1240
  return t.Duration.from(e);
@@ -1240,35 +1242,35 @@ const ze = (t, e) => {
1240
1242
  return null;
1241
1243
  }
1242
1244
  }, Ut = (t) => {
1243
- const { value: e, onChange: n, onInput: s, after: r, disabled: b, onBlur: i } = t, g = () => {
1244
- const d = Le(e, b, n ?? s);
1245
- return r != null ? N(d, r) : d;
1246
- }, p = t.placeholder != null ? S : l.placeholder("P0DT0H0M0S");
1247
- return Qe(
1248
- (d) => Oe({
1245
+ const { value: e, onChange: n, onInput: s, after: r, disabled: h, onBlur: o } = t, m = () => {
1246
+ const f = Ue(e, h, n ?? s);
1247
+ return r != null ? N(f, r) : f;
1248
+ }, b = t.placeholder != null ? M : l.placeholder("P0DT0H0M0S");
1249
+ return Ke(
1250
+ (f) => Fe({
1249
1251
  ...t,
1250
- value: f.map(e, (m) => m?.toString() ?? ""),
1251
- onChange: n ? (m) => n(m === "" ? null : d.Duration.from(m)) : void 0,
1252
+ value: p.map(e, (d) => d?.toString() ?? ""),
1253
+ onChange: n ? (d) => n(d === "" ? null : f.Duration.from(d)) : void 0,
1252
1254
  onInput: void 0,
1253
- ...bt(d.Duration.from),
1255
+ ...bt(f.Duration.from),
1254
1256
  placeholder: "P0DT0H0M0S",
1255
- after: g()
1257
+ after: m()
1256
1258
  }),
1257
1259
  { pending: () => {
1258
- const d = (m) => (y) => {
1259
- const a = y.currentTarget?.value ?? "";
1260
- if (a === "") {
1261
- m(null);
1260
+ const f = (d) => (x) => {
1261
+ const u = x.currentTarget?.value ?? "";
1262
+ if (u === "") {
1263
+ d(null);
1262
1264
  return;
1263
1265
  }
1264
- const D = globalThis.Temporal, M = ze(D, a);
1265
- if (M != null) {
1266
- m(M);
1266
+ const D = globalThis.Temporal, S = Be(D, u);
1267
+ if (S != null) {
1268
+ d(S);
1267
1269
  return;
1268
1270
  }
1269
- he().then((u) => {
1270
- const x = ze(u, a);
1271
- x != null && m(x);
1271
+ he().then((a) => {
1272
+ const v = Be(a, u);
1273
+ v != null && d(v);
1272
1274
  }).catch(() => {
1273
1275
  });
1274
1276
  };
@@ -1276,14 +1278,14 @@ const ze = (t, e) => {
1276
1278
  ...t,
1277
1279
  input: se.text(
1278
1280
  q(t),
1279
- l.value(f.map(e, (m) => m?.toString() ?? "")),
1281
+ l.value(p.map(e, (d) => d?.toString() ?? "")),
1280
1282
  l.class("bc-input"),
1281
- p,
1282
- i != null ? C.blur(() => i()) : S,
1283
- n != null ? C.change(d(n)) : S,
1284
- s != null ? C.input(d(s)) : S
1283
+ b,
1284
+ o != null ? C.blur(() => o()) : M,
1285
+ n != null ? C.change(f(n)) : M,
1286
+ s != null ? C.input(f(s)) : M
1285
1287
  ),
1286
- after: g()
1288
+ after: m()
1287
1289
  });
1288
1290
  } }
1289
1291
  );
@@ -1295,9 +1297,9 @@ const ze = (t, e) => {
1295
1297
  q(t),
1296
1298
  l.value(e),
1297
1299
  l.class("bc-input"),
1298
- n != null ? C.blur(P(n)) : S,
1299
- s != null ? C.change(P(s)) : S,
1300
- r != null ? C.input(P(r)) : S
1300
+ n != null ? C.blur(P(n)) : M,
1301
+ s != null ? C.change(P(s)) : M,
1302
+ r != null ? C.input(P(r)) : M
1301
1303
  )
1302
1304
  });
1303
1305
  };
@@ -1306,15 +1308,15 @@ function ht(t, e) {
1306
1308
  onMove: n,
1307
1309
  cannotMoveUp: s,
1308
1310
  cannotMoveDown: r,
1309
- onRemove: b,
1310
- showMove: i = !0,
1311
- showRemove: g = !0,
1312
- removeDisabled: p,
1313
- showMoveButtons: v = !0,
1314
- layout: d = "aside"
1315
- } = t, m = f.toSignal(d).map((a) => a === "aside"), y = U(
1316
- i,
1317
- () => h.div(
1311
+ onRemove: h,
1312
+ showMove: o = !0,
1313
+ showRemove: m = !0,
1314
+ removeDisabled: b,
1315
+ showMoveButtons: w = !0,
1316
+ layout: f = "aside"
1317
+ } = t, d = p.toSignal(f).map((u) => u === "aside"), x = U(
1318
+ o,
1319
+ () => g.div(
1318
1320
  l.class("bc-list-item-controls__move"),
1319
1321
  be(
1320
1322
  {
@@ -1326,10 +1328,10 @@ function ht(t, e) {
1326
1328
  },
1327
1329
  O(
1328
1330
  F,
1329
- (a) => E({
1331
+ (u) => E({
1330
1332
  size: "xs",
1331
1333
  icon: "line-md:arrow-up",
1332
- title: a.$.incrementValue
1334
+ title: u.$.incrementValue
1333
1335
  })
1334
1336
  )
1335
1337
  ),
@@ -1343,49 +1345,49 @@ function ht(t, e) {
1343
1345
  },
1344
1346
  O(
1345
1347
  F,
1346
- (a) => E({
1348
+ (u) => E({
1347
1349
  size: "xs",
1348
1350
  icon: "line-md:arrow-down",
1349
- title: a.$.decrementValue
1351
+ title: u.$.decrementValue
1350
1352
  })
1351
1353
  )
1352
1354
  )
1353
1355
  )
1354
- ), o = U(
1355
- g,
1356
+ ), i = U(
1357
+ m,
1356
1358
  () => O(
1357
1359
  F,
1358
- (a) => oe({
1360
+ (u) => oe({
1359
1361
  size: "xs",
1360
- label: f.map(a.$.removeItem, (D) => D.toLowerCase()),
1362
+ label: p.map(u.$.removeItem, (D) => D.toLowerCase()),
1361
1363
  color: "danger",
1362
- disabled: p,
1363
- onClick: b
1364
+ disabled: b,
1365
+ onClick: h
1364
1366
  })
1365
1367
  )
1366
1368
  );
1367
1369
  return U(
1368
- m,
1369
- () => h.div(
1370
+ d,
1371
+ () => g.div(
1370
1372
  l.class("bc-list-item-controls bc-list-item-controls--aside"),
1371
- h.div(l.class("bc-list-item-controls__content"), e),
1372
- h.div(
1373
+ g.div(l.class("bc-list-item-controls__content"), e),
1374
+ g.div(
1373
1375
  l.class("bc-list-item-controls__actions"),
1374
- U(v, () => y),
1375
- o
1376
+ U(w, () => x),
1377
+ i
1376
1378
  )
1377
1379
  ),
1378
- () => h.div(
1380
+ () => g.div(
1379
1381
  l.class("bc-list-item-controls bc-list-item-controls--below"),
1380
- h.div(l.class("bc-list-item-controls__content"), e),
1381
- h.div(
1382
+ g.div(l.class("bc-list-item-controls__content"), e),
1383
+ g.div(
1382
1384
  l.class("bc-list-item-controls__actions"),
1383
1385
  U(
1384
- v,
1385
- () => y,
1386
- () => h.div()
1386
+ w,
1387
+ () => x,
1388
+ () => g.div()
1387
1389
  ),
1388
- o
1390
+ i
1389
1391
  )
1390
1392
  )
1391
1393
  );
@@ -1396,16 +1398,16 @@ const gt = (t) => {
1396
1398
  element: n,
1397
1399
  separator: s,
1398
1400
  showMove: r = !0,
1399
- showRemove: b = !0,
1400
- showAdd: i = !0,
1401
- createItem: g,
1402
- addLabel: p,
1403
- controlsLayout: v = "aside",
1404
- removeDisabled: d,
1405
- addDisabled: m
1406
- } = t, y = U(
1407
- V(i, g)((o, a) => o && a != null),
1408
- () => $e(
1401
+ showRemove: h = !0,
1402
+ showAdd: o = !0,
1403
+ createItem: m,
1404
+ addLabel: b,
1405
+ controlsLayout: w = "aside",
1406
+ removeDisabled: f,
1407
+ addDisabled: d
1408
+ } = t, x = U(
1409
+ V(o, m)((i, u) => i && u != null),
1410
+ () => Me(
1409
1411
  l.class(
1410
1412
  "bc-group--gap-2 bc-group--align-center bc-group--justify-center"
1411
1413
  ),
@@ -1413,20 +1415,20 @@ const gt = (t) => {
1413
1415
  {
1414
1416
  size: "sm",
1415
1417
  variant: "filled",
1416
- onClick: () => e.push(g()),
1418
+ onClick: () => e.push(m()),
1417
1419
  disabled: V(
1418
1420
  e.disabled,
1419
- m ?? !1
1421
+ d ?? !1
1420
1422
  )(
1421
- (o, a) => o || a
1423
+ (i, u) => i || u
1422
1424
  )
1423
1425
  },
1424
1426
  O(
1425
1427
  F,
1426
- (o) => $e(
1428
+ (i) => Me(
1427
1429
  l.class("bc-group--gap-2"),
1428
1430
  E({ icon: "line-md:plus" }),
1429
- p ?? o.$.addLabel
1431
+ b ?? i.$.addLabel
1430
1432
  )
1431
1433
  )
1432
1434
  )
@@ -1435,54 +1437,54 @@ const gt = (t) => {
1435
1437
  return N(
1436
1438
  ct(
1437
1439
  e,
1438
- (o) => ht(
1440
+ (i) => ht(
1439
1441
  {
1440
- onMove: o.move,
1441
- cannotMoveUp: o.cannotMove("up"),
1442
- cannotMoveDown: o.cannotMove("down"),
1443
- onRemove: o.remove,
1442
+ onMove: i.move,
1443
+ cannotMoveUp: i.cannotMove("up"),
1444
+ cannotMoveDown: i.cannotMove("down"),
1445
+ onRemove: i.remove,
1444
1446
  showMove: r,
1445
- showRemove: b,
1446
- removeDisabled: d,
1447
- showMoveButtons: e.signal.map((a) => a.length > 1),
1448
- layout: v
1447
+ showRemove: h,
1448
+ removeDisabled: f,
1449
+ showMoveButtons: e.signal.map((u) => u.length > 1),
1450
+ layout: w
1449
1451
  },
1450
- n(o)
1452
+ n(i)
1451
1453
  ),
1452
1454
  s
1453
1455
  ),
1454
- y
1456
+ x
1455
1457
  );
1456
1458
  }, Ot = (t, ...e) => {
1457
1459
  const {
1458
1460
  controller: n,
1459
1461
  element: s,
1460
1462
  separator: r,
1461
- showMove: b,
1462
- showRemove: i,
1463
- showAdd: g,
1464
- createItem: p,
1465
- addLabel: v,
1466
- controlsLayout: d,
1467
- removeDisabled: m,
1468
- addDisabled: y,
1469
- ...o
1463
+ showMove: h,
1464
+ showRemove: o,
1465
+ showAdd: m,
1466
+ createItem: b,
1467
+ addLabel: w,
1468
+ controlsLayout: f,
1469
+ removeDisabled: d,
1470
+ addDisabled: x,
1471
+ ...i
1470
1472
  } = t;
1471
- return Ve(
1473
+ return Ae(
1472
1474
  {
1473
- ...o,
1475
+ ...i,
1474
1476
  content: gt({
1475
1477
  controller: n,
1476
1478
  element: s,
1477
1479
  separator: r,
1478
- showMove: b,
1479
- showRemove: i,
1480
- showAdd: g,
1481
- createItem: p,
1482
- addLabel: v,
1483
- controlsLayout: d,
1484
- removeDisabled: m,
1485
- addDisabled: y
1480
+ showMove: h,
1481
+ showRemove: o,
1482
+ showAdd: m,
1483
+ createItem: b,
1484
+ addLabel: w,
1485
+ controlsLayout: f,
1486
+ removeDisabled: d,
1487
+ addDisabled: x
1486
1488
  })
1487
1489
  },
1488
1490
  ...e
@@ -1508,45 +1510,45 @@ class Ft extends fe {
1508
1510
  * @param branches - Array of branch definitions describing the possible value types
1509
1511
  * @param equals - Optional equality function for comparing values. Defaults to `strictEqual`.
1510
1512
  */
1511
- constructor(e, n, s, r, b, i, g = K) {
1512
- super(e, n, s, r, b, g), this.branches = i;
1513
- const p = (d) => {
1514
- for (const m of i)
1515
- if (m.detect(d))
1516
- return m.key;
1517
- return i[0]?.key ?? "unknown";
1513
+ constructor(e, n, s, r, h, o, m = K) {
1514
+ super(e, n, s, r, h, m), this.branches = o;
1515
+ const b = (f) => {
1516
+ for (const d of o)
1517
+ if (d.detect(f))
1518
+ return d.key;
1519
+ return o[0]?.key ?? "unknown";
1518
1520
  };
1519
- this.activeBranch = s.map(p, K);
1520
- const v = (d) => {
1521
- if (this.#e.has(d))
1522
- return this.#e.get(d);
1523
- const m = i.find((o) => o.key === d);
1524
- if (!m)
1525
- throw new Error(`Unknown branch: ${d}`);
1526
- const y = new fe(
1527
- [...e, d],
1528
- (o) => {
1529
- this.change(o);
1521
+ this.activeBranch = s.map(b, K);
1522
+ const w = (f) => {
1523
+ if (this.#e.has(f))
1524
+ return this.#e.get(f);
1525
+ const d = o.find((i) => i.key === f);
1526
+ if (!d)
1527
+ throw new Error(`Unknown branch: ${f}`);
1528
+ const x = new fe(
1529
+ [...e, f],
1530
+ (i) => {
1531
+ this.change(i);
1530
1532
  },
1531
1533
  this.signal.map(
1532
- (o) => m.detect(o) ? o : m.defaultValue(),
1533
- g
1534
+ (i) => d.detect(i) ? i : d.defaultValue(),
1535
+ m
1534
1536
  ),
1535
- r.map(Ie([d])),
1537
+ r.map(Ie([f])),
1536
1538
  {
1537
1539
  disabled: this.disabled,
1538
1540
  validationMode: this.parent.validationMode
1539
1541
  },
1540
- g
1542
+ m
1541
1543
  );
1542
- return this.#e.set(d, y), y;
1544
+ return this.#e.set(f, x), x;
1543
1545
  };
1544
1546
  this.#t = this.activeBranch.map(
1545
- (d) => v(d),
1547
+ (f) => w(f),
1546
1548
  K
1547
1549
  ), this.onDispose(() => {
1548
- for (const d of this.#e.values())
1549
- d.dispose();
1550
+ for (const f of this.#e.values())
1551
+ f.dispose();
1550
1552
  this.#e.clear(), this.activeBranch.dispose(), this.#t.dispose();
1551
1553
  });
1552
1554
  }
@@ -1559,7 +1561,7 @@ class Ft extends fe {
1559
1561
  * @returns The `Controller<unknown>` for the active branch
1560
1562
  */
1561
1563
  get activeController() {
1562
- return f.get(this.#t);
1564
+ return p.get(this.#t);
1563
1565
  }
1564
1566
  /**
1565
1567
  * Gets or creates a controller for a specific branch by key.
@@ -1609,21 +1611,21 @@ class Ft extends fe {
1609
1611
  * @throws Error if the branch key is not found in the branches array
1610
1612
  */
1611
1613
  switchToBranch(e, n = !1) {
1612
- const s = this.branches.find((i) => i.key === e);
1614
+ const s = this.branches.find((o) => o.key === e);
1613
1615
  if (!s)
1614
1616
  throw new Error(`Unknown branch: ${e}`);
1615
- const r = f.get(this.signal);
1617
+ const r = p.get(this.signal);
1616
1618
  if (s.detect(r))
1617
1619
  return !0;
1618
1620
  if (s.convert) {
1619
- const i = s.convert(r);
1620
- if (i.ok)
1621
- return this.change(i.value), !0;
1621
+ const o = s.convert(r);
1622
+ if (o.ok)
1623
+ return this.change(o.value), !0;
1622
1624
  }
1623
1625
  if (n && typeof window == "object" && typeof window.confirm == "function" && !window.confirm(ce.changeTypeConfirmation))
1624
1626
  return !1;
1625
- const b = s.defaultValue();
1626
- return this.change(b), !0;
1627
+ const h = s.defaultValue();
1628
+ return this.change(h), !0;
1627
1629
  }
1628
1630
  /**
1629
1631
  * Gets the {@link UnionBranch} definition for the currently active branch.
@@ -1631,7 +1633,7 @@ class Ft extends fe {
1631
1633
  * @returns The active branch definition, or `undefined` if no branch matches
1632
1634
  */
1633
1635
  get activeBranchDefinition() {
1634
- const e = f.get(this.activeBranch);
1636
+ const e = p.get(this.activeBranch);
1635
1637
  return this.branches.find((n) => n.key === e);
1636
1638
  }
1637
1639
  }
@@ -1658,32 +1660,32 @@ function re(t) {
1658
1660
  }
1659
1661
  function vt(t, e) {
1660
1662
  if (e == null)
1661
- return Be(t);
1663
+ return Ve(t);
1662
1664
  if (t == null)
1663
1665
  return e;
1664
1666
  if (re(t) && re(e)) {
1665
1667
  const n = { ...e };
1666
1668
  for (const s of Object.keys(t))
1667
- n[s] === void 0 ? n[s] = Be(t[s]) : re(t[s]) && re(n[s]) && (n[s] = vt(t[s], n[s]));
1669
+ n[s] === void 0 ? n[s] = Ve(t[s]) : re(t[s]) && re(n[s]) && (n[s] = vt(t[s], n[s]));
1668
1670
  return n;
1669
1671
  }
1670
1672
  return e;
1671
1673
  }
1672
- function Be(t) {
1674
+ function Ve(t) {
1673
1675
  return typeof structuredClone == "function" ? structuredClone(t) : JSON.parse(JSON.stringify(t));
1674
1676
  }
1675
1677
  export {
1676
1678
  gt as B,
1677
- lt as E,
1679
+ rt as E,
1678
1680
  St as F,
1679
- $e as G,
1681
+ Me as G,
1680
1682
  Ot as L,
1681
- Oe as M,
1682
- Le as N,
1683
+ Fe as M,
1684
+ Ue as N,
1683
1685
  Mt as S,
1684
1686
  Bt as T,
1685
1687
  Lt as U,
1686
- Qe as W,
1688
+ Ke as W,
1687
1689
  Et as a,
1688
1690
  it as b,
1689
1691
  Ut as c,
@@ -1699,7 +1701,7 @@ export {
1699
1701
  ht as m,
1700
1702
  de as n,
1701
1703
  Tt as o,
1702
- rt as p,
1704
+ $e as p,
1703
1705
  he as q,
1704
1706
  G as r,
1705
1707
  Pt as s,