@tempots/beatui 0.61.5 → 0.61.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +1025 -1004
- package/dist/json-schema/index.cjs.js +2 -2
- package/dist/json-schema/index.es.js +2 -2
- package/dist/utils-Bzo19jHw.cjs +1 -0
- package/dist/{utils-DplD1EWi.js → utils-sMnCjVjS.js} +594 -582
- package/package.json +1 -1
- package/dist/utils-DKHQo6zE.cjs +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Use as P, Value as p, prop as tt, html as y, attr as l, on as
|
|
1
|
+
import { Use as P, Value as p, prop as tt, html as y, attr as l, on as k, WithElement as ut, Empty as D, aria as R, bind as ft, computedOf as B, style as ht, OnDispose as G, When as L, NotEmpty as te, Fragment as z, ForEach as ot, svg as At, svgAttr as bt, emitValue as j, coalesce as ee, Ensure as ne, OneOfType as se, Repeat as Wt, signal as Vt, input as Q, emitValueAsNullableDate as Bt, emitValueAsNullableDateTime as Lt, emitValueAsNumber as Y, emit as re, Task as zt } from "@tempots/dom";
|
|
2
2
|
import { f as ae } from "./colors-pQZlNrwM.js";
|
|
3
3
|
import { g as le } from "./timer-DzWb416P.js";
|
|
4
|
-
import { ElementRect as
|
|
5
|
-
import { a as W, b as O, f as
|
|
6
|
-
import { C as mt, m as fe, d as me, I as
|
|
7
|
-
function
|
|
4
|
+
import { ElementRect as Zt, AutoSelect as oe } from "@tempots/ui";
|
|
5
|
+
import { a as W, b as O, f as Et, I as U, C as H, c as ce, d as kt, T as ie, g as ue, L as pe, e as Rt, h as de, B as vt } from "./translations-BUTBIDsS.js";
|
|
6
|
+
import { C as mt, m as fe, d as me, I as Yt, E as he, P as ge, S as ct, s as be, e as xt, O as rt, f as Ut } from "./notice-BH_pePhd.js";
|
|
7
|
+
function Xt(t) {
|
|
8
8
|
if (typeof t != "string") return !1;
|
|
9
9
|
const e = t.startsWith("#") ? t.slice(1) : t;
|
|
10
10
|
return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(e);
|
|
@@ -31,10 +31,10 @@ function we(t) {
|
|
|
31
31
|
return a >= 0 && a <= 360 && i >= 0 && i <= 100 && o >= 0 && o <= 100;
|
|
32
32
|
}
|
|
33
33
|
function vn(t) {
|
|
34
|
-
return
|
|
34
|
+
return Xt(t) || ve(t) || xe(t) || we(t);
|
|
35
35
|
}
|
|
36
36
|
function _e(t) {
|
|
37
|
-
if (!
|
|
37
|
+
if (!Xt(t)) return null;
|
|
38
38
|
let e = t.startsWith("#") ? t.slice(1) : t;
|
|
39
39
|
return e.length === 3 && (e = e.split("").map((s) => s + s).join("")), `#${e.toLowerCase()}`;
|
|
40
40
|
}
|
|
@@ -58,9 +58,9 @@ function it(t) {
|
|
|
58
58
|
function xn(t, e) {
|
|
59
59
|
const s = it(t), n = it(e);
|
|
60
60
|
if (!s || !n) return null;
|
|
61
|
-
const r = (u, d,
|
|
62
|
-
const [
|
|
63
|
-
return 0.2126 *
|
|
61
|
+
const r = (u, d, h) => {
|
|
62
|
+
const [b, f, w] = [u, d, h].map(($) => ($ = $ / 255, $ <= 0.03928 ? $ / 12.92 : Math.pow(($ + 0.055) / 1.055, 2.4)));
|
|
63
|
+
return 0.2126 * b + 0.7152 * f + 0.0722 * w;
|
|
64
64
|
}, c = r(s.r, s.g, s.b), a = r(n.r, n.g, n.b), i = Math.max(c, a), o = Math.min(c, a);
|
|
65
65
|
return (i + 0.05) / (o + 0.05);
|
|
66
66
|
}
|
|
@@ -72,8 +72,8 @@ function $e(t) {
|
|
|
72
72
|
if (s) {
|
|
73
73
|
const u = s[1];
|
|
74
74
|
if (u.length === 8) {
|
|
75
|
-
const d = parseInt(u.slice(0, 2), 16),
|
|
76
|
-
return [d,
|
|
75
|
+
const d = parseInt(u.slice(0, 2), 16), h = parseInt(u.slice(2, 4), 16), b = parseInt(u.slice(4, 6), 16), f = parseInt(u.slice(6, 8), 16) / 255;
|
|
76
|
+
return [d, h, b, f];
|
|
77
77
|
}
|
|
78
78
|
if (u.length === 6)
|
|
79
79
|
return [
|
|
@@ -83,12 +83,12 @@ function $e(t) {
|
|
|
83
83
|
1
|
|
84
84
|
];
|
|
85
85
|
if (u.length === 4) {
|
|
86
|
-
const d = parseInt(u[0] + u[0], 16),
|
|
87
|
-
return [d,
|
|
86
|
+
const d = parseInt(u[0] + u[0], 16), h = parseInt(u[1] + u[1], 16), b = parseInt(u[2] + u[2], 16), f = parseInt(u[3] + u[3], 16) / 255;
|
|
87
|
+
return [d, h, b, f];
|
|
88
88
|
}
|
|
89
89
|
if (u.length === 3) {
|
|
90
|
-
const d = parseInt(u[0] + u[0], 16),
|
|
91
|
-
return [d,
|
|
90
|
+
const d = parseInt(u[0] + u[0], 16), h = parseInt(u[1] + u[1], 16), b = parseInt(u[2] + u[2], 16);
|
|
91
|
+
return [d, h, b, 1];
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
const n = t.match(
|
|
@@ -110,22 +110,22 @@ function $e(t) {
|
|
|
110
110
|
/^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i
|
|
111
111
|
);
|
|
112
112
|
if (c) {
|
|
113
|
-
const u = parseFloat(c[1]), d = parseFloat(c[2]),
|
|
114
|
-
return [f, w,
|
|
113
|
+
const u = parseFloat(c[1]), d = parseFloat(c[2]), h = parseFloat(c[3]), b = c[4] != null ? parseFloat(c[4]) : 1, [f, w, $] = qt(u, d / 100, h / 100);
|
|
114
|
+
return [f, w, $, b];
|
|
115
115
|
}
|
|
116
116
|
const a = t.match(
|
|
117
117
|
/^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i
|
|
118
118
|
);
|
|
119
119
|
if (a) {
|
|
120
|
-
const u = parseFloat(a[1]), d = parseFloat(a[2]) / 100,
|
|
121
|
-
return [f, w,
|
|
120
|
+
const u = parseFloat(a[1]), d = parseFloat(a[2]) / 100, h = parseFloat(a[3]) / 100, b = a[4] != null ? parseFloat(a[4]) : 1, [f, w, $] = ke(u, d, h);
|
|
121
|
+
return [f, w, $, b];
|
|
122
122
|
}
|
|
123
123
|
const i = t.match(
|
|
124
124
|
/^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i
|
|
125
125
|
);
|
|
126
126
|
if (i) {
|
|
127
|
-
const u = i[1], d = parseFloat(i[2]),
|
|
128
|
-
return [w, _,
|
|
127
|
+
const u = i[1], d = parseFloat(i[2]), h = parseFloat(i[3]), b = i[4] != null ? parseFloat(i[4]) : 1, f = u.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(u) / 100)) : Math.max(0, Math.min(1, parseFloat(u))), [w, $, _] = Me(f, d, h);
|
|
128
|
+
return [w, $, _, b];
|
|
129
129
|
}
|
|
130
130
|
const o = it(t);
|
|
131
131
|
return o ? [o.r, o.g, o.b, 1] : [0, 0, 0, 1];
|
|
@@ -136,13 +136,13 @@ function ye(t, e, s, n) {
|
|
|
136
136
|
Math.min(1, Math.round(n * 100) / 100)
|
|
137
137
|
)})`;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Ie(t) {
|
|
140
140
|
let e = t + 1831565813;
|
|
141
141
|
return function() {
|
|
142
142
|
return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function qt(t, e, s) {
|
|
146
146
|
t = (t % 360 + 360) % 360;
|
|
147
147
|
const n = (1 - Math.abs(2 * s - 1)) * e, r = n * (1 - Math.abs(t / 60 % 2 - 1)), c = s - n / 2;
|
|
148
148
|
let a = 0, i = 0, o = 0;
|
|
@@ -152,11 +152,11 @@ function Yt(t, e, s) {
|
|
|
152
152
|
Math.round((o + c) * 255)
|
|
153
153
|
];
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function ke(t, e, s) {
|
|
156
156
|
t = (t % 360 + 360) % 360;
|
|
157
157
|
const n = e + s;
|
|
158
158
|
n > 1 && (e /= n, s /= n);
|
|
159
|
-
const [r, c, a] =
|
|
159
|
+
const [r, c, a] = qt(t, 1, 0.5).map((h) => h / 255), i = 1 - e - s, o = r * i + e, u = c * i + e, d = a * i + e;
|
|
160
160
|
return [Math.round(o * 255), Math.round(u * 255), Math.round(d * 255)];
|
|
161
161
|
}
|
|
162
162
|
function Mt(t, e, s) {
|
|
@@ -192,13 +192,13 @@ function _t(t) {
|
|
|
192
192
|
return Math.round(Math.max(0, Math.min(1, e)) * 255);
|
|
193
193
|
}
|
|
194
194
|
function Me(t, e, s) {
|
|
195
|
-
const n = s * Math.PI / 180, r = Math.cos(n) * e, c = Math.sin(n) * e, a = t + 0.3963377774 * r + 0.2158037573 * c, i = t - 0.1055613458 * r - 0.0638541728 * c, o = t - 0.0894841775 * r - 1.291485548 * c, u = a * a * a, d = i * i * i,
|
|
196
|
-
return [_t(
|
|
195
|
+
const n = s * Math.PI / 180, r = Math.cos(n) * e, c = Math.sin(n) * e, a = t + 0.3963377774 * r + 0.2158037573 * c, i = t - 0.1055613458 * r - 0.0638541728 * c, o = t - 0.0894841775 * r - 1.291485548 * c, u = a * a * a, d = i * i * i, h = o * o * o, b = 4.0767416621 * u - 3.3077115913 * d + 0.2309699292 * h, f = -1.2684380046 * u + 2.6097574011 * d - 0.3413193965 * h, w = -0.0041960863 * u - 0.7034186147 * d + 1.707614701 * h;
|
|
196
|
+
return [_t(b), _t(f), _t(w)];
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
const n = wt(t), r = wt(e), c = wt(s), a = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * c, i = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * c, o = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * c, u = Math.cbrt(a), d = Math.cbrt(i),
|
|
200
|
-
let
|
|
201
|
-
return
|
|
198
|
+
function Se(t, e, s) {
|
|
199
|
+
const n = wt(t), r = wt(e), c = wt(s), a = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * c, i = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * c, o = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * c, u = Math.cbrt(a), d = Math.cbrt(i), h = Math.cbrt(o), b = 0.2104542553 * u + 0.793617785 * d - 0.0040720468 * h, f = 1.9779984951 * u - 2.428592205 * d + 0.4505937099 * h, w = 0.0259040371 * u + 0.7827717662 * d - 0.808675766 * h, $ = Math.sqrt(f * f + w * w);
|
|
200
|
+
let _ = Math.atan2(w, f) * 180 / Math.PI;
|
|
201
|
+
return _ < 0 && (_ += 360), [b, $, _];
|
|
202
202
|
}
|
|
203
203
|
function at(t, e, s, n, r, c) {
|
|
204
204
|
switch (r) {
|
|
@@ -225,15 +225,15 @@ function at(t, e, s, n, r, c) {
|
|
|
225
225
|
return n < 1 ? `hwb(${a} ${i}% ${o}% / ${Math.round(n * 100) / 100})` : `hwb(${a} ${i}% ${o}%)`;
|
|
226
226
|
}
|
|
227
227
|
case "oklch": {
|
|
228
|
-
const [a, i, o] =
|
|
229
|
-
return c || n < 1 ? `oklch(${u} ${d} ${
|
|
228
|
+
const [a, i, o] = Se(t, e, s), u = (Math.round(a * 1e3) / 1e3).toFixed(3), d = (Math.round(i * 1e3) / 1e3).toFixed(3), h = (Math.round(o * 10) / 10).toFixed(1), b = Math.round(n * 100) / 100;
|
|
229
|
+
return c || n < 1 ? `oklch(${u} ${d} ${h} / ${b})` : `oklch(${u} ${d} ${h})`;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
function lt(t, e) {
|
|
234
234
|
return e ? t === "rgb" ? "rgba" : t === "hsl" ? "hsla" : t : t === "rgba" ? "rgb" : t === "hsla" ? "hsl" : t;
|
|
235
235
|
}
|
|
236
|
-
class
|
|
236
|
+
class De extends Error {
|
|
237
237
|
constructor(e = "Missing implementation") {
|
|
238
238
|
super(e), this.name = "MissingImplementationError";
|
|
239
239
|
}
|
|
@@ -243,7 +243,7 @@ const wn = (t) => Te(t).split("_").join(" "), Te = (t) => (t = t.replace(/::/g,
|
|
|
243
243
|
return Buffer.from(t, "base64").toString("utf8");
|
|
244
244
|
if (typeof atob < "u")
|
|
245
245
|
return atob(t);
|
|
246
|
-
throw new
|
|
246
|
+
throw new De(
|
|
247
247
|
"No implementation found for base64 decoding"
|
|
248
248
|
);
|
|
249
249
|
};
|
|
@@ -257,38 +257,38 @@ function $t({
|
|
|
257
257
|
allowMultiple: a
|
|
258
258
|
}) {
|
|
259
259
|
return P(W, (i) => {
|
|
260
|
-
const o = p.deriveProp(e ?? []), u = tt(!1), d = (
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
const m = Array.from(
|
|
260
|
+
const o = p.deriveProp(e ?? []), u = tt(!1), d = (v) => {
|
|
261
|
+
v.preventDefault(), v.stopPropagation(), u.value = !0;
|
|
262
|
+
}, h = (v) => {
|
|
263
|
+
v.preventDefault(), v.stopPropagation(), (!v.currentTarget || !v.currentTarget.contains(v.relatedTarget)) && (u.value = !1);
|
|
264
|
+
}, b = (v) => {
|
|
265
|
+
v.preventDefault(), v.stopPropagation(), u.value = !1;
|
|
266
|
+
const m = Array.from(v.dataTransfer?.files || []);
|
|
267
267
|
m.length > 0 && (o.value = m, t(m, "dragdrop"));
|
|
268
|
-
}, f = (
|
|
269
|
-
p.get(n) &&
|
|
268
|
+
}, f = (v) => {
|
|
269
|
+
p.get(n) && v.currentTarget.querySelector(
|
|
270
270
|
'input[type="file"]'
|
|
271
271
|
)?.click();
|
|
272
272
|
};
|
|
273
273
|
let w = null;
|
|
274
|
-
const
|
|
274
|
+
const $ = () => {
|
|
275
275
|
if (w == null) return;
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
},
|
|
279
|
-
p.get(n) && (
|
|
276
|
+
const v = Array.from(w.files ?? []);
|
|
277
|
+
v.length > 0 && (o.value = v, t(v, "click")), w.value = "";
|
|
278
|
+
}, _ = (v) => {
|
|
279
|
+
p.get(n) && (v.key === "Enter" || v.key === " ") && (v.preventDefault(), f(v));
|
|
280
280
|
};
|
|
281
281
|
return y.div(
|
|
282
282
|
l.role("button"),
|
|
283
283
|
l.tabindex(
|
|
284
|
-
p.map(n, (
|
|
284
|
+
p.map(n, (v) => v ? 0 : -1)
|
|
285
285
|
),
|
|
286
286
|
l.style("position: relative;"),
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
287
|
+
k.dragover(d),
|
|
288
|
+
k.dragleave(h),
|
|
289
|
+
k.drop(b),
|
|
290
|
+
k.click(f),
|
|
291
|
+
k.keydown(_),
|
|
292
292
|
// Hidden file input
|
|
293
293
|
y.input(
|
|
294
294
|
l.type("file"),
|
|
@@ -298,14 +298,14 @@ function $t({
|
|
|
298
298
|
l.style(
|
|
299
299
|
"position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
|
|
300
300
|
),
|
|
301
|
-
|
|
302
|
-
ut((
|
|
301
|
+
k.change($),
|
|
302
|
+
ut((v) => (w = v, o.on((m) => {
|
|
303
303
|
const M = globalThis.DataTransfer;
|
|
304
304
|
if (M != null) {
|
|
305
|
-
const
|
|
306
|
-
m.forEach((
|
|
305
|
+
const S = new M();
|
|
306
|
+
m.forEach((T) => S.items.add(T)), v.files = S.files;
|
|
307
307
|
}
|
|
308
|
-
}),
|
|
308
|
+
}), D))
|
|
309
309
|
),
|
|
310
310
|
// Screen reader instructions
|
|
311
311
|
R.label(ft(i.$.dropZoneInstructions)(n)),
|
|
@@ -357,8 +357,8 @@ function $n({
|
|
|
357
357
|
e,
|
|
358
358
|
o
|
|
359
359
|
)((u, d) => {
|
|
360
|
-
const { width:
|
|
361
|
-
return `${
|
|
360
|
+
const { width: h } = d[i[u] ?? 0];
|
|
361
|
+
return `${h}px`;
|
|
362
362
|
})
|
|
363
363
|
),
|
|
364
364
|
ht.left(
|
|
@@ -366,34 +366,34 @@ function $n({
|
|
|
366
366
|
e,
|
|
367
367
|
o
|
|
368
368
|
)((u, d) => {
|
|
369
|
-
const { left:
|
|
370
|
-
return `${
|
|
369
|
+
const { left: h } = d[i[u] ?? 0];
|
|
370
|
+
return `${h}px`;
|
|
371
371
|
})
|
|
372
372
|
)
|
|
373
373
|
),
|
|
374
374
|
// clickable buttons
|
|
375
|
-
a.map(({ label: u, key: d },
|
|
375
|
+
a.map(({ label: u, key: d }, h) => y.button(
|
|
376
376
|
l.type("button"),
|
|
377
|
-
|
|
378
|
-
|
|
377
|
+
k.click((b) => {
|
|
378
|
+
b.preventDefault(), p.get(r) || s?.(d);
|
|
379
379
|
}),
|
|
380
380
|
l.disabled(r),
|
|
381
381
|
l.class("bc-segmented-input__segment"),
|
|
382
382
|
l.class(
|
|
383
|
-
p.map(e, (
|
|
383
|
+
p.map(e, (b) => b === d ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
|
|
384
384
|
),
|
|
385
|
-
|
|
385
|
+
Zt((b) => {
|
|
386
386
|
function f() {
|
|
387
|
-
o.update((
|
|
388
|
-
const
|
|
389
|
-
return
|
|
390
|
-
width:
|
|
391
|
-
left:
|
|
392
|
-
},
|
|
387
|
+
o.update(($) => {
|
|
388
|
+
const _ = [...$];
|
|
389
|
+
return _[h] = {
|
|
390
|
+
width: b.value.width,
|
|
391
|
+
left: b.value.localLeft
|
|
392
|
+
}, _;
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
395
|
const w = le(f);
|
|
396
|
-
return
|
|
396
|
+
return G(w, b.on(f));
|
|
397
397
|
}),
|
|
398
398
|
u
|
|
399
399
|
))
|
|
@@ -420,7 +420,7 @@ function yt(t) {
|
|
|
420
420
|
const n = URL.createObjectURL(s);
|
|
421
421
|
e.value = n;
|
|
422
422
|
}), y.div(
|
|
423
|
-
|
|
423
|
+
G(() => {
|
|
424
424
|
e.value && URL.revokeObjectURL(e.value);
|
|
425
425
|
}),
|
|
426
426
|
l.class("bc-file-input__thumbnail-container"),
|
|
@@ -445,31 +445,31 @@ const ze = (t, ...e) => {
|
|
|
445
445
|
disabled: o,
|
|
446
446
|
hasError: u,
|
|
447
447
|
mode: d = "default",
|
|
448
|
-
showFileList:
|
|
449
|
-
...
|
|
450
|
-
} = t, f = s, w = p.map(d, (
|
|
451
|
-
let
|
|
448
|
+
showFileList: h = !0,
|
|
449
|
+
...b
|
|
450
|
+
} = t, f = s, w = p.map(d, (x) => x === "input"), $ = p.map(d, (x) => x === "compact"), _ = (x) => {
|
|
451
|
+
let g = x;
|
|
452
452
|
if (r != null) {
|
|
453
|
-
const
|
|
454
|
-
|
|
453
|
+
const I = p.get(r);
|
|
454
|
+
g = g.slice(0, I);
|
|
455
455
|
}
|
|
456
456
|
if (c) {
|
|
457
|
-
const
|
|
458
|
-
|
|
457
|
+
const I = p.get(c);
|
|
458
|
+
g = g.filter((F) => F.size <= I);
|
|
459
459
|
}
|
|
460
|
-
a?.(
|
|
461
|
-
},
|
|
462
|
-
const
|
|
463
|
-
a?.(
|
|
460
|
+
a?.(g);
|
|
461
|
+
}, v = (x) => {
|
|
462
|
+
const I = f.value.filter((F, A) => A !== x);
|
|
463
|
+
a?.(I);
|
|
464
464
|
}, m = () => {
|
|
465
465
|
a?.([]);
|
|
466
466
|
}, M = ({
|
|
467
|
-
files:
|
|
468
|
-
clear:
|
|
469
|
-
change:
|
|
467
|
+
files: x,
|
|
468
|
+
clear: g,
|
|
469
|
+
change: I
|
|
470
470
|
}) => P(
|
|
471
471
|
W,
|
|
472
|
-
(
|
|
472
|
+
(F) => y.div(
|
|
473
473
|
l.class("bc-file-input__drop-zone"),
|
|
474
474
|
y.div(
|
|
475
475
|
l.class(
|
|
@@ -478,58 +478,58 @@ const ze = (t, ...e) => {
|
|
|
478
478
|
U({ icon: "mdi:cloud-upload-outline", size: "xl" }),
|
|
479
479
|
y.div(
|
|
480
480
|
l.class("bc-file-input__drop-zone-text"),
|
|
481
|
-
ft(
|
|
481
|
+
ft(F.$.filesInputInstructions)(
|
|
482
482
|
r,
|
|
483
483
|
c,
|
|
484
|
-
|
|
484
|
+
F.$.fileSizeUnits.value
|
|
485
485
|
)
|
|
486
486
|
)
|
|
487
487
|
)
|
|
488
488
|
)
|
|
489
|
-
),
|
|
490
|
-
files:
|
|
489
|
+
), S = ({
|
|
490
|
+
files: x
|
|
491
491
|
}) => P(
|
|
492
492
|
W,
|
|
493
|
-
(
|
|
493
|
+
(g) => y.div(
|
|
494
494
|
l.class("bc-file-input__compact-drop-zone"),
|
|
495
495
|
L(
|
|
496
|
-
|
|
496
|
+
x.map((I) => I.length > 0),
|
|
497
497
|
() => y.div(
|
|
498
498
|
l.class("bc-file-input__compact-file-list"),
|
|
499
|
-
ot(
|
|
500
|
-
const A =
|
|
499
|
+
ot(x, (I, F) => {
|
|
500
|
+
const A = F.index;
|
|
501
501
|
return y.div(
|
|
502
502
|
l.class("bc-file-input__compact-file-item"),
|
|
503
503
|
y.div(
|
|
504
504
|
l.class("bc-file-input__compact-file-icon"),
|
|
505
|
-
yt(
|
|
505
|
+
yt(I)
|
|
506
506
|
),
|
|
507
507
|
y.div(
|
|
508
508
|
l.class("bc-file-input__compact-file-info"),
|
|
509
509
|
y.div(
|
|
510
510
|
l.class("bc-file-input__compact-file-name"),
|
|
511
|
-
l.title(
|
|
512
|
-
|
|
511
|
+
l.title(I.$.name),
|
|
512
|
+
I.$.name
|
|
513
513
|
),
|
|
514
514
|
y.div(
|
|
515
515
|
l.class("bc-file-input__compact-file-meta"),
|
|
516
516
|
B(
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
)((C, V) =>
|
|
517
|
+
I.$.size,
|
|
518
|
+
g.$.fileSizeUnits
|
|
519
|
+
)((C, V) => Et(C, { units: V })),
|
|
520
520
|
" • ",
|
|
521
521
|
B(
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
I.$.type,
|
|
523
|
+
g.$.unknownType
|
|
524
524
|
)((C, V) => C || V)
|
|
525
525
|
)
|
|
526
526
|
),
|
|
527
527
|
mt(
|
|
528
528
|
{
|
|
529
529
|
size: "sm",
|
|
530
|
-
label:
|
|
530
|
+
label: g.$.removeFile,
|
|
531
531
|
disabled: o,
|
|
532
|
-
onClick: () =>
|
|
532
|
+
onClick: () => v(A)
|
|
533
533
|
},
|
|
534
534
|
l.class("bc-file-input__compact-remove-button")
|
|
535
535
|
)
|
|
@@ -541,33 +541,33 @@ const ze = (t, ...e) => {
|
|
|
541
541
|
U({ icon: "mdi:cloud-upload-outline", size: "lg" }),
|
|
542
542
|
y.div(
|
|
543
543
|
l.class("bc-file-input__compact-placeholder-text"),
|
|
544
|
-
ft(
|
|
544
|
+
ft(g.$.filesInputInstructions)(
|
|
545
545
|
r,
|
|
546
546
|
c,
|
|
547
|
-
|
|
547
|
+
g.$.fileSizeUnits.value
|
|
548
548
|
)
|
|
549
549
|
)
|
|
550
550
|
)
|
|
551
551
|
)
|
|
552
552
|
)
|
|
553
|
-
),
|
|
554
|
-
files:
|
|
553
|
+
), T = ({
|
|
554
|
+
files: x
|
|
555
555
|
}) => P(
|
|
556
556
|
W,
|
|
557
|
-
(
|
|
557
|
+
(g) => y.div(
|
|
558
558
|
l.class("bc-file-input__compact-input"),
|
|
559
559
|
L(
|
|
560
|
-
|
|
560
|
+
x.map((I) => I.length > 0),
|
|
561
561
|
() => y.span(
|
|
562
562
|
l.class("bc-file-input__compact-value"),
|
|
563
563
|
ot(
|
|
564
|
-
|
|
565
|
-
(
|
|
564
|
+
x,
|
|
565
|
+
(I) => y.span(
|
|
566
566
|
l.class("bc-file-input__compact-value-item"),
|
|
567
|
-
yt(
|
|
567
|
+
yt(I),
|
|
568
568
|
y.span(
|
|
569
569
|
l.class("bc-file-input__compact-value-item-name"),
|
|
570
|
-
|
|
570
|
+
I.$.name
|
|
571
571
|
)
|
|
572
572
|
)
|
|
573
573
|
)
|
|
@@ -576,10 +576,10 @@ const ze = (t, ...e) => {
|
|
|
576
576
|
l.class("bc-file-input__compact-placeholder"),
|
|
577
577
|
U({ icon: "mdi:cloud-upload-outline", size: "md" }),
|
|
578
578
|
" ",
|
|
579
|
-
ft(
|
|
579
|
+
ft(g.$.filesInputInstructions)(
|
|
580
580
|
r,
|
|
581
581
|
c,
|
|
582
|
-
|
|
582
|
+
g.$.fileSizeUnits.value
|
|
583
583
|
)
|
|
584
584
|
)
|
|
585
585
|
)
|
|
@@ -587,19 +587,19 @@ const ze = (t, ...e) => {
|
|
|
587
587
|
);
|
|
588
588
|
return P(
|
|
589
589
|
W,
|
|
590
|
-
(
|
|
590
|
+
(x) => O(
|
|
591
591
|
{
|
|
592
|
-
baseContainer: p.map(w, (
|
|
592
|
+
baseContainer: p.map(w, (g) => !g),
|
|
593
593
|
disabled: o,
|
|
594
594
|
hasError: u,
|
|
595
595
|
after: L(
|
|
596
596
|
w,
|
|
597
597
|
() => L(
|
|
598
|
-
f.map(({ length:
|
|
598
|
+
f.map(({ length: g }) => g > 0),
|
|
599
599
|
() => mt(
|
|
600
600
|
{
|
|
601
601
|
size: "sm",
|
|
602
|
-
label:
|
|
602
|
+
label: x.$.clearAllFiles,
|
|
603
603
|
disabled: o,
|
|
604
604
|
onClick: m
|
|
605
605
|
},
|
|
@@ -607,7 +607,7 @@ const ze = (t, ...e) => {
|
|
|
607
607
|
)
|
|
608
608
|
)
|
|
609
609
|
),
|
|
610
|
-
...
|
|
610
|
+
...b,
|
|
611
611
|
input: L(
|
|
612
612
|
w,
|
|
613
613
|
() => y.div(
|
|
@@ -616,24 +616,24 @@ const ze = (t, ...e) => {
|
|
|
616
616
|
value: f,
|
|
617
617
|
accept: n,
|
|
618
618
|
enableClick: !0,
|
|
619
|
-
allowMultiple: p.map(r ?? 1 / 0, (
|
|
619
|
+
allowMultiple: p.map(r ?? 1 / 0, (g) => g > 1),
|
|
620
620
|
disabled: o,
|
|
621
|
-
onChange:
|
|
622
|
-
content:
|
|
621
|
+
onChange: _,
|
|
622
|
+
content: T
|
|
623
623
|
})
|
|
624
624
|
),
|
|
625
625
|
() => L(
|
|
626
|
-
|
|
626
|
+
$,
|
|
627
627
|
() => y.div(
|
|
628
628
|
l.class("bc-file-input bc-file-input--compact"),
|
|
629
629
|
$t({
|
|
630
630
|
value: f,
|
|
631
631
|
accept: n,
|
|
632
632
|
enableClick: !0,
|
|
633
|
-
allowMultiple: p.map(r ?? 1 / 0, (
|
|
633
|
+
allowMultiple: p.map(r ?? 1 / 0, (g) => g > 1),
|
|
634
634
|
disabled: o,
|
|
635
|
-
onChange:
|
|
636
|
-
content:
|
|
635
|
+
onChange: _,
|
|
636
|
+
content: S
|
|
637
637
|
})
|
|
638
638
|
),
|
|
639
639
|
() => y.div(
|
|
@@ -642,54 +642,54 @@ const ze = (t, ...e) => {
|
|
|
642
642
|
value: f,
|
|
643
643
|
accept: n,
|
|
644
644
|
enableClick: !0,
|
|
645
|
-
allowMultiple: p.map(r ?? 1 / 0, (
|
|
645
|
+
allowMultiple: p.map(r ?? 1 / 0, (g) => g > 1),
|
|
646
646
|
disabled: o,
|
|
647
|
-
onChange:
|
|
647
|
+
onChange: _,
|
|
648
648
|
content: M
|
|
649
649
|
}),
|
|
650
650
|
L(
|
|
651
|
-
|
|
652
|
-
() =>
|
|
651
|
+
h,
|
|
652
|
+
() => te(
|
|
653
653
|
f,
|
|
654
654
|
() => z(
|
|
655
655
|
y.div(
|
|
656
656
|
l.class("bc-file-input__file-list"),
|
|
657
|
-
ot(f, (
|
|
658
|
-
const
|
|
657
|
+
ot(f, (g, I) => {
|
|
658
|
+
const F = I.index;
|
|
659
659
|
return y.div(
|
|
660
660
|
l.class("bc-file-input__file-item"),
|
|
661
661
|
y.div(
|
|
662
662
|
l.class("bc-file-input__file-icon"),
|
|
663
|
-
yt(
|
|
663
|
+
yt(g)
|
|
664
664
|
),
|
|
665
665
|
y.div(
|
|
666
666
|
l.class("bc-file-input__file-info"),
|
|
667
667
|
y.div(
|
|
668
668
|
l.class("bc-file-input__file-name"),
|
|
669
|
-
l.title(
|
|
670
|
-
|
|
669
|
+
l.title(g.$.name),
|
|
670
|
+
g.$.name
|
|
671
671
|
),
|
|
672
672
|
y.div(
|
|
673
673
|
l.class("bc-file-input__file-meta"),
|
|
674
674
|
B(
|
|
675
|
-
|
|
676
|
-
|
|
675
|
+
g.$.size,
|
|
676
|
+
x.$.fileSizeUnits
|
|
677
677
|
)(
|
|
678
|
-
(A, C) =>
|
|
678
|
+
(A, C) => Et(A, { units: C })
|
|
679
679
|
),
|
|
680
680
|
" • ",
|
|
681
681
|
B(
|
|
682
|
-
|
|
683
|
-
|
|
682
|
+
g.$.type,
|
|
683
|
+
x.$.unknownType
|
|
684
684
|
)((A, C) => A || C)
|
|
685
685
|
)
|
|
686
686
|
),
|
|
687
687
|
mt(
|
|
688
688
|
{
|
|
689
689
|
size: "sm",
|
|
690
|
-
label:
|
|
690
|
+
label: x.$.removeFile,
|
|
691
691
|
disabled: o,
|
|
692
|
-
onClick: () =>
|
|
692
|
+
onClick: () => v(F)
|
|
693
693
|
},
|
|
694
694
|
l.class("bc-file-input__remove-button")
|
|
695
695
|
)
|
|
@@ -697,7 +697,7 @@ const ze = (t, ...e) => {
|
|
|
697
697
|
})
|
|
698
698
|
),
|
|
699
699
|
L(
|
|
700
|
-
f.map(({ length:
|
|
700
|
+
f.map(({ length: g }) => g > 1),
|
|
701
701
|
() => y.div(
|
|
702
702
|
l.class(
|
|
703
703
|
"bc-file-input__clear-all-button-container"
|
|
@@ -706,9 +706,9 @@ const ze = (t, ...e) => {
|
|
|
706
706
|
l.type("button"),
|
|
707
707
|
l.class("bc-file-input__clear-all-button"),
|
|
708
708
|
l.disabled(o),
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
709
|
+
x.$.clearAllFiles,
|
|
710
|
+
k.click((g) => {
|
|
711
|
+
g.preventDefault(), g.stopPropagation(), m();
|
|
712
712
|
})
|
|
713
713
|
)
|
|
714
714
|
)
|
|
@@ -763,17 +763,17 @@ function Oe(t) {
|
|
|
763
763
|
onChange: s,
|
|
764
764
|
onInput: n,
|
|
765
765
|
...r
|
|
766
|
-
} = t, c = /* @__PURE__ */ new Map(), a = p.toSignal(e).map((d) => d.map((
|
|
767
|
-
const f = c.get(
|
|
766
|
+
} = t, c = /* @__PURE__ */ new Map(), a = p.toSignal(e).map((d) => d.map((h, b) => {
|
|
767
|
+
const f = c.get(h), w = Ne(h ?? ""), $ = f?.type || Ue(w), _ = f?.name ?? `file-${b}`, v = w.buffer.slice(
|
|
768
768
|
w.byteOffset,
|
|
769
769
|
w.byteOffset + w.byteLength
|
|
770
|
-
), m = new Blob([
|
|
771
|
-
return new File([m],
|
|
772
|
-
})), i = (d) => (
|
|
773
|
-
d && Re(
|
|
774
|
-
for (const [f, w] of
|
|
775
|
-
c.set(w, { name:
|
|
776
|
-
d(
|
|
770
|
+
), m = new Blob([v], { type: $ });
|
|
771
|
+
return new File([m], _, { type: $ });
|
|
772
|
+
})), i = (d) => (h) => {
|
|
773
|
+
d && Re(h).then((b) => {
|
|
774
|
+
for (const [f, w] of b.entries())
|
|
775
|
+
c.set(w, { name: h[f].name, type: h[f].type });
|
|
776
|
+
d(b);
|
|
777
777
|
});
|
|
778
778
|
}, o = i(s), u = i(n);
|
|
779
779
|
return ze({
|
|
@@ -803,60 +803,60 @@ function yn(t) {
|
|
|
803
803
|
});
|
|
804
804
|
}
|
|
805
805
|
function Pe(t, e) {
|
|
806
|
-
const [s, n, r] = t, c = s << 16 ^ n << 8 ^ r, a =
|
|
806
|
+
const [s, n, r] = t, c = s << 16 ^ n << 8 ^ r, a = Ie(c), i = 6 + Math.floor(a() * 5), o = 0.18 + a() * 0.06, u = [];
|
|
807
807
|
for (let f = 0; f < i; f++) {
|
|
808
|
-
const w = f / i * Math.PI * 2,
|
|
809
|
-
u.push({ x:
|
|
808
|
+
const w = f / i * Math.PI * 2, $ = e * (1 + (a() * 2 - 1) * o), _ = Math.cos(w) * $, v = Math.sin(w) * $;
|
|
809
|
+
u.push({ x: _, y: v });
|
|
810
810
|
}
|
|
811
|
-
const d = (u[0].x + u[i - 1].x) / 2,
|
|
812
|
-
let
|
|
811
|
+
const d = (u[0].x + u[i - 1].x) / 2, h = (u[0].y + u[i - 1].y) / 2;
|
|
812
|
+
let b = `M ${d.toFixed(3)} ${h.toFixed(3)}`;
|
|
813
813
|
for (let f = 0; f < i; f++) {
|
|
814
|
-
const w = u[f],
|
|
815
|
-
|
|
814
|
+
const w = u[f], $ = u[(f + 1) % i], _ = (w.x + $.x) / 2, v = (w.y + $.y) / 2;
|
|
815
|
+
b += ` Q ${w.x.toFixed(3)} ${w.y.toFixed(3)} ${_.toFixed(3)} ${v.toFixed(3)}`;
|
|
816
816
|
}
|
|
817
|
-
return
|
|
817
|
+
return b += " Z", b;
|
|
818
818
|
}
|
|
819
|
-
const
|
|
820
|
-
const { value: e, onBlur: s, onChange: n, onInput: r, displayValue: c, size: a, withAlpha: i } = t, o = p.map(a ?? 32, (
|
|
819
|
+
const In = (t) => {
|
|
820
|
+
const { value: e, onBlur: s, onChange: n, onInput: r, displayValue: c, size: a, withAlpha: i } = t, o = p.map(a ?? 32, (x) => x), u = p.map(e, (x) => $e(x ?? "#000000")), d = p.map(
|
|
821
821
|
u,
|
|
822
|
-
([
|
|
823
|
-
),
|
|
822
|
+
([x, g, I]) => [x, g, I]
|
|
823
|
+
), h = p.map(u, ([, , , x]) => x), b = tt(p.get(h) ?? 1), f = p.map(i ?? !1, (x) => x), w = p.map(
|
|
824
824
|
t.colorTextFormat ?? "rgb",
|
|
825
|
-
(
|
|
826
|
-
),
|
|
825
|
+
(x) => x
|
|
826
|
+
), $ = B(
|
|
827
827
|
d,
|
|
828
|
-
|
|
828
|
+
b,
|
|
829
829
|
w,
|
|
830
830
|
f
|
|
831
831
|
)(
|
|
832
|
-
([
|
|
833
|
-
),
|
|
832
|
+
([x, g, I], F, A, C) => at(x, g, I, F ?? 1, lt(A, C), C)
|
|
833
|
+
), _ = p.map(
|
|
834
834
|
t.colorTextFormat ?? "hex",
|
|
835
|
-
(
|
|
836
|
-
),
|
|
835
|
+
(x) => x
|
|
836
|
+
), v = p.map(o, (x) => `${-x / 2} ${-x / 2} ${x} ${x}`), m = B(
|
|
837
837
|
d,
|
|
838
838
|
o
|
|
839
|
-
)((
|
|
839
|
+
)((x, g) => Pe(x, g / 2)), M = B(
|
|
840
840
|
d,
|
|
841
|
-
|
|
841
|
+
b,
|
|
842
842
|
f
|
|
843
843
|
)(
|
|
844
|
-
([
|
|
845
|
-
),
|
|
844
|
+
([x, g, I], F, A) => A || F < 1 ? ye(x, g, I, F) : Ct(x, g, I)
|
|
845
|
+
), S = y.div(
|
|
846
846
|
l.class("bc-color-swatch-input__control"),
|
|
847
847
|
l.class(
|
|
848
848
|
p.map(
|
|
849
849
|
f,
|
|
850
|
-
(
|
|
850
|
+
(x) => x ? "bc-color-swatch-input__control--alpha" : ""
|
|
851
851
|
)
|
|
852
852
|
),
|
|
853
853
|
l.style(
|
|
854
|
-
B(o)((
|
|
854
|
+
B(o)((x) => `min-width:${x + 2}px;height:${x + 2}px`)
|
|
855
855
|
),
|
|
856
856
|
// The SVG blob preview
|
|
857
857
|
At.svg(
|
|
858
858
|
l.class("bc-color-swatch-input__svg"),
|
|
859
|
-
bt.viewBox(
|
|
859
|
+
bt.viewBox(v),
|
|
860
860
|
At.path(bt.d(m), bt.fill(M))
|
|
861
861
|
),
|
|
862
862
|
// Invisible native input overlays the blob for picker and accessibility
|
|
@@ -864,31 +864,31 @@ const kn = (t) => {
|
|
|
864
864
|
l.type("color"),
|
|
865
865
|
H(t),
|
|
866
866
|
// Native color input needs hex without alpha
|
|
867
|
-
l.value(p.map(d, ([
|
|
867
|
+
l.value(p.map(d, ([x, g, I]) => Ct(x, g, I))),
|
|
868
868
|
l.class(
|
|
869
869
|
"bc-input bc-color-swatch-input bc-color-swatch-input__native"
|
|
870
870
|
),
|
|
871
|
-
s != null ?
|
|
872
|
-
n != null ?
|
|
873
|
-
const
|
|
871
|
+
s != null ? k.blur(s) : D,
|
|
872
|
+
n != null ? k.change((x) => {
|
|
873
|
+
const g = x.target.value;
|
|
874
874
|
if (!n) return;
|
|
875
|
-
const { r:
|
|
876
|
-
p.get(
|
|
875
|
+
const { r: I, g: F, b: A } = it(g) ?? { r: 0, g: 0, b: 0 }, C = p.get(b) ?? 1, V = lt(
|
|
876
|
+
p.get(_),
|
|
877
877
|
p.get(f)
|
|
878
|
-
), N = at(
|
|
878
|
+
), N = at(I, F, A, C, V, p.get(f));
|
|
879
879
|
n(N);
|
|
880
|
-
}) :
|
|
881
|
-
r != null ?
|
|
882
|
-
const
|
|
880
|
+
}) : D,
|
|
881
|
+
r != null ? k.input((x) => {
|
|
882
|
+
const g = x.target.value;
|
|
883
883
|
if (!r) return;
|
|
884
|
-
const { r:
|
|
885
|
-
p.get(
|
|
884
|
+
const { r: I, g: F, b: A } = it(g) ?? { r: 0, g: 0, b: 0 }, C = p.get(b) ?? 1, V = lt(
|
|
885
|
+
p.get(_),
|
|
886
886
|
p.get(f)
|
|
887
|
-
), N = at(
|
|
887
|
+
), N = at(I, F, A, C, V, p.get(f));
|
|
888
888
|
r(N);
|
|
889
|
-
}) :
|
|
889
|
+
}) : D
|
|
890
890
|
)
|
|
891
|
-
),
|
|
891
|
+
), T = L(
|
|
892
892
|
f,
|
|
893
893
|
() => y.input(
|
|
894
894
|
l.type("range"),
|
|
@@ -896,24 +896,24 @@ const kn = (t) => {
|
|
|
896
896
|
l.min(0),
|
|
897
897
|
l.max(1),
|
|
898
898
|
l.step(0.01),
|
|
899
|
-
l.value(p.map(
|
|
899
|
+
l.value(p.map(b, (x) => String(x ?? 1))),
|
|
900
900
|
l.disabled(t.disabled),
|
|
901
|
-
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
const [
|
|
905
|
-
p.get(
|
|
901
|
+
k.input((x) => {
|
|
902
|
+
const g = parseFloat(x.target.value);
|
|
903
|
+
b.set(g);
|
|
904
|
+
const [I, F, A] = p.get(d), C = lt(
|
|
905
|
+
p.get(_),
|
|
906
906
|
p.get(f)
|
|
907
|
-
), V = at(
|
|
907
|
+
), V = at(I, F, A, g, C, p.get(f));
|
|
908
908
|
r?.(V);
|
|
909
909
|
}),
|
|
910
|
-
|
|
911
|
-
const
|
|
912
|
-
|
|
913
|
-
const [
|
|
914
|
-
p.get(
|
|
910
|
+
k.change((x) => {
|
|
911
|
+
const g = parseFloat(x.target.value);
|
|
912
|
+
b.set(g);
|
|
913
|
+
const [I, F, A] = p.get(d), C = lt(
|
|
914
|
+
p.get(_),
|
|
915
915
|
p.get(f)
|
|
916
|
-
), V = at(
|
|
916
|
+
), V = at(I, F, A, g, C, p.get(f));
|
|
917
917
|
n?.(V);
|
|
918
918
|
})
|
|
919
919
|
)
|
|
@@ -923,27 +923,27 @@ const kn = (t) => {
|
|
|
923
923
|
...t,
|
|
924
924
|
// ensure our control does not try to grow
|
|
925
925
|
growInput: !1,
|
|
926
|
-
input:
|
|
926
|
+
input: S,
|
|
927
927
|
// If caller provided an `after`, append RGB before it
|
|
928
928
|
after: z(
|
|
929
929
|
L(
|
|
930
930
|
c ?? !1,
|
|
931
|
-
() => y.span(l.class("bc-color-swatch-input__rgb"),
|
|
931
|
+
() => y.span(l.class("bc-color-swatch-input__rgb"), $)
|
|
932
932
|
),
|
|
933
|
-
|
|
933
|
+
T,
|
|
934
934
|
t.after
|
|
935
935
|
)
|
|
936
936
|
});
|
|
937
|
-
},
|
|
938
|
-
const n = `${
|
|
939
|
-
return
|
|
940
|
-
}),
|
|
941
|
-
const s = `${
|
|
937
|
+
}, Dt = "$$tts-exp-", je = (t, e) => ut((s) => {
|
|
938
|
+
const n = `${Dt}${t}`;
|
|
939
|
+
return G(p.on(e, (r) => Reflect.set(s, n, r)));
|
|
940
|
+
}), kn = (t, e) => {
|
|
941
|
+
const s = `${Dt}${t}`;
|
|
942
942
|
return (n) => {
|
|
943
943
|
e(Reflect.get(n.target, s));
|
|
944
944
|
};
|
|
945
945
|
}, He = (t, e) => {
|
|
946
|
-
const s = `${
|
|
946
|
+
const s = `${Dt}${t}`;
|
|
947
947
|
return (n) => {
|
|
948
948
|
const r = n.target, c = r.selectedIndex, a = r.options[c];
|
|
949
949
|
e(Reflect.get(a, s));
|
|
@@ -998,10 +998,10 @@ const Mn = ({
|
|
|
998
998
|
l.value(e),
|
|
999
999
|
l.class("bc-editable-text__input"),
|
|
1000
1000
|
oe(),
|
|
1001
|
-
|
|
1001
|
+
k.keydown((o) => {
|
|
1002
1002
|
o.key === "Enter" ? c.set(!1) : o.key === "Escape" && (a.set(!0), c.set(!1));
|
|
1003
1003
|
}),
|
|
1004
|
-
|
|
1004
|
+
k.blur(
|
|
1005
1005
|
j((o) => {
|
|
1006
1006
|
if (c.set(!1), a.value) {
|
|
1007
1007
|
a.set(!1);
|
|
@@ -1012,7 +1012,7 @@ const Mn = ({
|
|
|
1012
1012
|
)
|
|
1013
1013
|
),
|
|
1014
1014
|
() => y.span(
|
|
1015
|
-
|
|
1015
|
+
k.click(() => {
|
|
1016
1016
|
p.get(i) || c.set(!0);
|
|
1017
1017
|
}),
|
|
1018
1018
|
l.class("bc-editable-text__display"),
|
|
@@ -1030,16 +1030,16 @@ const Mn = ({
|
|
|
1030
1030
|
l.type("button"),
|
|
1031
1031
|
l.class("bc-editable-text__edit-button"),
|
|
1032
1032
|
P(W, (o) => R.label(o.$.editLabel)),
|
|
1033
|
-
|
|
1033
|
+
k.click(() => c.set(!0)),
|
|
1034
1034
|
U({ icon: "line-md/pencil", color: "neutral" })
|
|
1035
1035
|
)
|
|
1036
1036
|
)
|
|
1037
1037
|
)
|
|
1038
1038
|
)
|
|
1039
1039
|
);
|
|
1040
|
-
},
|
|
1040
|
+
}, Gt = (t, e, s) => ne(
|
|
1041
1041
|
t,
|
|
1042
|
-
(n) =>
|
|
1042
|
+
(n) => se(n, {
|
|
1043
1043
|
value: (r) => {
|
|
1044
1044
|
const c = B(
|
|
1045
1045
|
r,
|
|
@@ -1055,7 +1055,7 @@ const Mn = ({
|
|
|
1055
1055
|
l.label(r.$.group),
|
|
1056
1056
|
ot(
|
|
1057
1057
|
r.$.options,
|
|
1058
|
-
(c) =>
|
|
1058
|
+
(c) => Gt(
|
|
1059
1059
|
c,
|
|
1060
1060
|
e,
|
|
1061
1061
|
s
|
|
@@ -1089,11 +1089,11 @@ const Mn = ({
|
|
|
1089
1089
|
input: y.select(
|
|
1090
1090
|
ut((u) => {
|
|
1091
1091
|
o = u;
|
|
1092
|
-
const d = new MutationObserver((
|
|
1093
|
-
const { removedNodes:
|
|
1094
|
-
|
|
1092
|
+
const d = new MutationObserver((h) => {
|
|
1093
|
+
const { removedNodes: b } = h[0];
|
|
1094
|
+
b.length > 0 && (o.selectedIndex = 0);
|
|
1095
1095
|
});
|
|
1096
|
-
return d.observe(u, { childList: !0 }),
|
|
1096
|
+
return d.observe(u, { childList: !0 }), G(() => d.disconnect());
|
|
1097
1097
|
}),
|
|
1098
1098
|
H(t),
|
|
1099
1099
|
l.class("bc-native-select bc-input"),
|
|
@@ -1101,15 +1101,15 @@ const Mn = ({
|
|
|
1101
1101
|
W,
|
|
1102
1102
|
(u) => y.option(
|
|
1103
1103
|
l.hidden("hidden"),
|
|
1104
|
-
|
|
1104
|
+
ee(c, u.$.selectOne)
|
|
1105
1105
|
)
|
|
1106
1106
|
),
|
|
1107
|
-
ot(r, (u) =>
|
|
1108
|
-
s != null ?
|
|
1109
|
-
n != null ?
|
|
1107
|
+
ot(r, (u) => Gt(u, a, e)),
|
|
1108
|
+
s != null ? k.blur(s) : D,
|
|
1109
|
+
n != null ? k.change(He("value", (u) => n(u))) : D
|
|
1110
1110
|
)
|
|
1111
1111
|
},
|
|
1112
|
-
|
|
1112
|
+
k.click(() => {
|
|
1113
1113
|
o?.focus(), typeof o?.showPicker == "function" && o.showPicker();
|
|
1114
1114
|
})
|
|
1115
1115
|
);
|
|
@@ -1123,8 +1123,8 @@ function Ye(t) {
|
|
|
1123
1123
|
onBlur: fe(e, n)
|
|
1124
1124
|
});
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1127
|
-
return
|
|
1126
|
+
function Sn(t) {
|
|
1127
|
+
return Yt({
|
|
1128
1128
|
...t,
|
|
1129
1129
|
content: Ye(t)
|
|
1130
1130
|
});
|
|
@@ -1132,12 +1132,12 @@ function Dn(t) {
|
|
|
1132
1132
|
function Xe(t, e, s) {
|
|
1133
1133
|
const n = t.length.map((r) => r);
|
|
1134
1134
|
return z(
|
|
1135
|
-
|
|
1135
|
+
Wt(
|
|
1136
1136
|
n,
|
|
1137
1137
|
(r) => {
|
|
1138
1138
|
const c = t.item(r.index), a = [];
|
|
1139
1139
|
return z(
|
|
1140
|
-
|
|
1140
|
+
G(() => {
|
|
1141
1141
|
a.forEach((i) => i());
|
|
1142
1142
|
}),
|
|
1143
1143
|
e({
|
|
@@ -1191,14 +1191,14 @@ function Xe(t, e, s) {
|
|
|
1191
1191
|
)
|
|
1192
1192
|
);
|
|
1193
1193
|
}
|
|
1194
|
-
const
|
|
1194
|
+
const Nt = {
|
|
1195
1195
|
9: { pattern: /^[0-9]$/ },
|
|
1196
1196
|
A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
|
|
1197
1197
|
"*": { pattern: /^.$/ }
|
|
1198
1198
|
}, qe = (t) => t instanceof RegExp;
|
|
1199
|
-
function
|
|
1199
|
+
function Qt(t, e, s) {
|
|
1200
1200
|
if (t == null) return [];
|
|
1201
|
-
const n = s ? { ...
|
|
1201
|
+
const n = s ? { ...Nt, ...e } : e ?? Nt, r = (a, i) => {
|
|
1202
1202
|
const o = n[i];
|
|
1203
1203
|
o ? a.push({ type: "pattern", name: i, ...o }) : a.push({ type: "literal", char: i });
|
|
1204
1204
|
}, c = [];
|
|
@@ -1229,64 +1229,64 @@ function Ge(t, e) {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function Ot(t, e, s, n, r, c) {
|
|
1233
1233
|
const a = {
|
|
1234
1234
|
raw: t,
|
|
1235
1235
|
previousConformed: e,
|
|
1236
1236
|
cursor: r ?? t.length,
|
|
1237
1237
|
completed: !1
|
|
1238
|
-
}, i = n.definitions ?? {}, o = typeof s == "function" ? s(t, a) : s, u =
|
|
1238
|
+
}, i = n.definitions ?? {}, o = typeof s == "function" ? s(t, a) : s, u = Qt(
|
|
1239
1239
|
o,
|
|
1240
1240
|
i,
|
|
1241
1241
|
n.useDefaultDefinitions ?? !0
|
|
1242
|
-
), d = Ge(n.allowMode, n.allow),
|
|
1243
|
-
for (const C of u) C.type === "literal" &&
|
|
1244
|
-
if (n.prefix) for (const C of n.prefix)
|
|
1245
|
-
if (n.suffix) for (const C of n.suffix)
|
|
1246
|
-
const
|
|
1247
|
-
if (
|
|
1242
|
+
), d = Ge(n.allowMode, n.allow), h = /* @__PURE__ */ new Set();
|
|
1243
|
+
for (const C of u) C.type === "literal" && h.add(C.char);
|
|
1244
|
+
if (n.prefix) for (const C of n.prefix) h.add(C);
|
|
1245
|
+
if (n.suffix) for (const C of n.suffix) h.add(C);
|
|
1246
|
+
const b = Array.from(t).filter((C) => d(C) && !h.has(C));
|
|
1247
|
+
if (b.length === 0) return { value: "", cursor: 0, completed: !1 };
|
|
1248
1248
|
const f = [], w = [];
|
|
1249
|
-
let
|
|
1249
|
+
let $ = 0, _ = 0, v = 0, m = -1;
|
|
1250
1250
|
for (const C of u) {
|
|
1251
1251
|
if (C.type === "literal") {
|
|
1252
1252
|
f.push(C.char), w.push({ kind: "literal", filled: !0 });
|
|
1253
1253
|
continue;
|
|
1254
1254
|
}
|
|
1255
|
-
|
|
1256
|
-
const V =
|
|
1255
|
+
_ += C.optional ? 0 : 1;
|
|
1256
|
+
const V = b[$];
|
|
1257
1257
|
if (V == null)
|
|
1258
1258
|
break;
|
|
1259
1259
|
if (C.type === "any") {
|
|
1260
|
-
|
|
1260
|
+
v++, f.push(C.transform ? C.transform(V) : V), w.push({ kind: "slot", filled: !0 }), m = w.length - 1, $++;
|
|
1261
1261
|
continue;
|
|
1262
1262
|
}
|
|
1263
1263
|
if (C.type === "pattern")
|
|
1264
1264
|
if (C.pattern.test(V)) {
|
|
1265
|
-
|
|
1265
|
+
v++;
|
|
1266
1266
|
const N = C.transform ? C.transform(V) : V;
|
|
1267
|
-
f.push(N), w.push({ kind: "slot", filled: !0 }), m = w.length - 1,
|
|
1267
|
+
f.push(N), w.push({ kind: "slot", filled: !0 }), m = w.length - 1, $++;
|
|
1268
1268
|
} else {
|
|
1269
|
-
|
|
1269
|
+
$++;
|
|
1270
1270
|
continue;
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
1273
|
-
const M = f.join(""),
|
|
1274
|
-
let
|
|
1273
|
+
const M = f.join(""), S = (n.prefix ?? "") + M + (n.suffix ?? "");
|
|
1274
|
+
let x = (n.prefix ?? "").length;
|
|
1275
1275
|
if (m >= 0) {
|
|
1276
1276
|
let C = m + 1;
|
|
1277
1277
|
if ((c?.policy ?? "smart") !== "sticky")
|
|
1278
1278
|
for (; C < w.length && w[C].kind === "literal"; ) C++;
|
|
1279
|
-
|
|
1279
|
+
x += C;
|
|
1280
1280
|
}
|
|
1281
|
-
const
|
|
1282
|
-
let
|
|
1283
|
-
return
|
|
1281
|
+
const g = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= v : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(S) : _ > 0 && v >= _, I = n.pipe?.(S, { ...a, completed: g });
|
|
1282
|
+
let F, A = x;
|
|
1283
|
+
return I === !1 ? (F = e, A = e.length) : typeof I == "string" ? (F = I, A = I.length) : typeof I == "object" && I ? (F = I.value, A = I.cursor ?? I.value.length) : F = S, { value: F, cursor: A, completed: g };
|
|
1284
1284
|
}
|
|
1285
1285
|
function Qe(t, e) {
|
|
1286
1286
|
const s = e?.strategy ?? "none";
|
|
1287
1287
|
return s === "custom" && e?.unmask ? e.unmask(t) : s === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
|
|
1288
1288
|
}
|
|
1289
|
-
const
|
|
1289
|
+
const Jt = (t) => {
|
|
1290
1290
|
const {
|
|
1291
1291
|
value: e,
|
|
1292
1292
|
onBlur: s,
|
|
@@ -1298,49 +1298,49 @@ const Gt = (t) => {
|
|
|
1298
1298
|
definitions: o,
|
|
1299
1299
|
useDefaultDefinitions: u,
|
|
1300
1300
|
extraLiterals: d,
|
|
1301
|
-
prefix:
|
|
1302
|
-
suffix:
|
|
1301
|
+
prefix: h,
|
|
1302
|
+
suffix: b,
|
|
1303
1303
|
autofix: f,
|
|
1304
1304
|
pipe: w,
|
|
1305
|
-
completion:
|
|
1306
|
-
unmask:
|
|
1307
|
-
allowMode:
|
|
1305
|
+
completion: $,
|
|
1306
|
+
unmask: _,
|
|
1307
|
+
allowMode: v,
|
|
1308
1308
|
allow: m,
|
|
1309
1309
|
placeholder: M,
|
|
1310
|
-
placeholderOptions:
|
|
1311
|
-
} = t,
|
|
1310
|
+
placeholderOptions: S
|
|
1311
|
+
} = t, T = B(
|
|
1312
1312
|
e,
|
|
1313
1313
|
i,
|
|
1314
1314
|
o,
|
|
1315
1315
|
u,
|
|
1316
1316
|
d,
|
|
1317
|
+
h,
|
|
1317
1318
|
b,
|
|
1318
|
-
g,
|
|
1319
1319
|
f,
|
|
1320
|
-
_,
|
|
1321
1320
|
$,
|
|
1322
|
-
|
|
1321
|
+
_,
|
|
1322
|
+
v,
|
|
1323
1323
|
M,
|
|
1324
|
-
|
|
1325
|
-
)((
|
|
1326
|
-
definitions:
|
|
1324
|
+
S
|
|
1325
|
+
)((g, I, F, A, C, V, N, nt, st, K, X, pt, Z) => I ? Ot(g ?? "", "", I, {
|
|
1326
|
+
definitions: F ?? {},
|
|
1327
1327
|
useDefaultDefinitions: A ?? !0,
|
|
1328
1328
|
extraLiterals: C ?? [],
|
|
1329
1329
|
autofix: nt ?? "none",
|
|
1330
1330
|
completion: st ?? { mode: "mask" },
|
|
1331
1331
|
pipe: w ?? ((E) => E),
|
|
1332
1332
|
unmask: K ?? { strategy: "none" },
|
|
1333
|
-
allowMode:
|
|
1333
|
+
allowMode: X ?? "all",
|
|
1334
1334
|
allow: m,
|
|
1335
1335
|
prefix: V,
|
|
1336
1336
|
suffix: N
|
|
1337
|
-
}).value :
|
|
1338
|
-
const
|
|
1339
|
-
value:
|
|
1337
|
+
}).value : g ?? ""), x = (g, I) => {
|
|
1338
|
+
const F = g.value ?? "", A = p.get(e) ?? "", C = i != null ? p.get(i) : null, V = o != null ? p.get(o) : void 0, N = u != null ? p.get(u) : void 0, nt = d != null ? p.get(d) : void 0, st = f != null ? p.get(f) : void 0, K = $ != null ? p.get($) : void 0, X = _ != null ? p.get(_) : void 0, pt = v != null ? p.get(v) : void 0, Z = h != null ? p.get(h) : void 0, E = b != null ? p.get(b) : void 0, {
|
|
1339
|
+
value: q,
|
|
1340
1340
|
cursor: gt,
|
|
1341
1341
|
completed: Tt
|
|
1342
|
-
} = C ?
|
|
1343
|
-
|
|
1342
|
+
} = C ? Ot(
|
|
1343
|
+
F,
|
|
1344
1344
|
A,
|
|
1345
1345
|
C,
|
|
1346
1346
|
{
|
|
@@ -1349,50 +1349,50 @@ const Gt = (t) => {
|
|
|
1349
1349
|
extraLiterals: nt ?? [],
|
|
1350
1350
|
autofix: st ?? "none",
|
|
1351
1351
|
completion: K ?? { mode: "mask" },
|
|
1352
|
-
pipe: w ?? ((
|
|
1353
|
-
unmask:
|
|
1352
|
+
pipe: w ?? ((Kt) => Kt),
|
|
1353
|
+
unmask: X ?? { strategy: "none" },
|
|
1354
1354
|
allowMode: pt ?? "all",
|
|
1355
1355
|
allow: m,
|
|
1356
1356
|
prefix: Z,
|
|
1357
1357
|
suffix: E
|
|
1358
1358
|
},
|
|
1359
|
-
|
|
1359
|
+
g.selectionStart ?? F.length,
|
|
1360
1360
|
t.cursor ? p.get(t.cursor) : void 0
|
|
1361
|
-
) : { value:
|
|
1362
|
-
if (
|
|
1363
|
-
|
|
1361
|
+
) : { value: F, cursor: F.length, completed: !0 };
|
|
1362
|
+
if (q !== F) {
|
|
1363
|
+
g.value = q;
|
|
1364
1364
|
try {
|
|
1365
|
-
|
|
1365
|
+
g.setSelectionRange(gt, gt);
|
|
1366
1366
|
} catch {
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
|
-
const Ft = Qe(
|
|
1369
|
+
const Ft = Qe(q, X);
|
|
1370
1370
|
c?.({
|
|
1371
1371
|
raw: Ft,
|
|
1372
|
-
conformed:
|
|
1372
|
+
conformed: q,
|
|
1373
1373
|
completed: Tt,
|
|
1374
1374
|
cursor: gt
|
|
1375
|
-
}),
|
|
1375
|
+
}), I === "input" ? r?.(q) : (n?.(q), Tt && a?.({ raw: Ft, conformed: q }));
|
|
1376
1376
|
};
|
|
1377
1377
|
return z(
|
|
1378
1378
|
O({
|
|
1379
1379
|
...t,
|
|
1380
1380
|
input: Q.text(
|
|
1381
1381
|
H(t),
|
|
1382
|
-
l.value(
|
|
1382
|
+
l.value(T),
|
|
1383
1383
|
l.class("bc-input"),
|
|
1384
|
-
s != null ?
|
|
1384
|
+
s != null ? k.blur(s) : D,
|
|
1385
1385
|
ut(
|
|
1386
|
-
(
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
if (
|
|
1391
|
-
const A =
|
|
1386
|
+
(g) => g instanceof HTMLInputElement ? z(
|
|
1387
|
+
k.input(() => x(g, "input")),
|
|
1388
|
+
k.change(() => x(g, "change")),
|
|
1389
|
+
k.keydown((I) => {
|
|
1390
|
+
if (I.key !== "Backspace" || !(t.cursor ? p.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
|
|
1391
|
+
const A = g.selectionStart ?? 0, C = g.selectionEnd ?? A;
|
|
1392
1392
|
if (A !== C || A <= 0) return;
|
|
1393
|
-
const V =
|
|
1393
|
+
const V = g.value ?? "", N = i != null ? p.get(i) : null;
|
|
1394
1394
|
if (!N) return;
|
|
1395
|
-
const nt = o != null ? p.get(o) : void 0, st = u != null ? p.get(u) : !0, K =
|
|
1395
|
+
const nt = o != null ? p.get(o) : void 0, st = u != null ? p.get(u) : !0, K = h != null ? p.get(h) : void 0, X = b != null ? p.get(b) : void 0, pt = Qt(
|
|
1396
1396
|
typeof N == "function" ? N(V, {
|
|
1397
1397
|
raw: V,
|
|
1398
1398
|
previousConformed: V,
|
|
@@ -1405,23 +1405,22 @@ const Gt = (t) => {
|
|
|
1405
1405
|
for (const E of pt)
|
|
1406
1406
|
E.type === "literal" && Z.add(E.char);
|
|
1407
1407
|
if (K) for (const E of K) Z.add(E);
|
|
1408
|
-
if (
|
|
1408
|
+
if (X) for (const E of X) Z.add(E);
|
|
1409
1409
|
if (Z.has(V[A - 1])) {
|
|
1410
1410
|
let E = A - 1;
|
|
1411
1411
|
for (; E >= 0 && Z.has(V[E]); ) E--;
|
|
1412
|
-
E >= 0 && (
|
|
1412
|
+
E >= 0 && (I.preventDefault(), I.stopPropagation(), g.value = V.slice(0, E) + V.slice(E + 1), x(g, "input"));
|
|
1413
1413
|
}
|
|
1414
1414
|
})
|
|
1415
|
-
) :
|
|
1415
|
+
) : D
|
|
1416
1416
|
)
|
|
1417
1417
|
)
|
|
1418
1418
|
})
|
|
1419
1419
|
);
|
|
1420
1420
|
};
|
|
1421
1421
|
function J(t, e, s) {
|
|
1422
|
-
const n = p.map(t, (c) => c != null), r =
|
|
1422
|
+
const n = p.map(t, (c) => c != null), r = kt.clearValue;
|
|
1423
1423
|
return z(
|
|
1424
|
-
X(() => p.dispose(n)),
|
|
1425
1424
|
L(
|
|
1426
1425
|
n,
|
|
1427
1426
|
() => y.button(
|
|
@@ -1431,52 +1430,54 @@ function J(t, e, s) {
|
|
|
1431
1430
|
l.title(r),
|
|
1432
1431
|
l.disabled(e ?? !1),
|
|
1433
1432
|
U({ icon: "mdi:close", size: "sm" }),
|
|
1434
|
-
|
|
1435
|
-
c.
|
|
1433
|
+
k.click((c) => {
|
|
1434
|
+
c.stopPropagation(), s?.(null);
|
|
1436
1435
|
})
|
|
1437
1436
|
)
|
|
1438
1437
|
)
|
|
1439
1438
|
);
|
|
1440
1439
|
}
|
|
1441
|
-
const
|
|
1442
|
-
const { value: e, onBlur: s, onChange: n,
|
|
1440
|
+
const Dn = (t) => {
|
|
1441
|
+
const { value: e, onBlur: s, onChange: n, onInput: r, after: c, disabled: a } = t, i = J(e, a, n ?? r);
|
|
1443
1442
|
return O({
|
|
1444
1443
|
...t,
|
|
1445
1444
|
input: Q.date(
|
|
1446
1445
|
H(t),
|
|
1447
1446
|
l.valueAsDate(e),
|
|
1448
1447
|
l.class("bc-input"),
|
|
1449
|
-
s != null ?
|
|
1450
|
-
n != null ?
|
|
1448
|
+
s != null ? k.blur(j(s)) : D,
|
|
1449
|
+
n != null ? k.change(Bt(n)) : D,
|
|
1450
|
+
r != null ? k.input(Bt(r)) : D
|
|
1451
1451
|
),
|
|
1452
|
-
after:
|
|
1452
|
+
after: c != null ? z(i, c) : i
|
|
1453
1453
|
});
|
|
1454
1454
|
}, Je = (t) => {
|
|
1455
1455
|
const e = t.getFullYear(), s = t.getMonth() + 1, n = t.getDate(), r = t.getHours(), c = t.getMinutes(), a = t.getSeconds();
|
|
1456
1456
|
return `${e}-${s.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${r.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
|
|
1457
1457
|
}, Tn = (t) => {
|
|
1458
|
-
const { value: e, onBlur: s, onChange: n,
|
|
1458
|
+
const { value: e, onBlur: s, onChange: n, onInput: r, after: c, disabled: a } = t, i = p.map(e, (u) => u != null ? Je(u) : null), o = J(e, a, n ?? r);
|
|
1459
1459
|
return O({
|
|
1460
1460
|
...t,
|
|
1461
1461
|
input: Q["datetime-local"](
|
|
1462
1462
|
H(t),
|
|
1463
|
-
l.value(p.map(
|
|
1463
|
+
l.value(p.map(i, (u) => u ?? null)),
|
|
1464
1464
|
l.class("bc-input"),
|
|
1465
|
-
s != null ?
|
|
1466
|
-
n != null ?
|
|
1465
|
+
s != null ? k.blur(j(s)) : D,
|
|
1466
|
+
n != null ? k.change(Lt(n)) : D,
|
|
1467
|
+
r != null ? k.input(Lt(r)) : D
|
|
1467
1468
|
),
|
|
1468
|
-
after:
|
|
1469
|
+
after: c != null ? z(o, c) : o
|
|
1469
1470
|
});
|
|
1470
|
-
},
|
|
1471
|
+
}, Pt = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ke = (t) => t ?? "";
|
|
1471
1472
|
function et(t) {
|
|
1472
1473
|
return (e) => {
|
|
1473
|
-
const { value: s, onBlur: n, onChange: r, onInput: c, after: a, disabled: i, ...o } = e, u = J(s, i, r);
|
|
1474
|
+
const { value: s, onBlur: n, onChange: r, onInput: c, after: a, disabled: i, ...o } = e, u = J(s, i, r ?? c);
|
|
1474
1475
|
return t({
|
|
1475
1476
|
...o,
|
|
1476
1477
|
disabled: i,
|
|
1477
1478
|
value: p.map(s, Ke),
|
|
1478
|
-
onChange: r != null ? (d) => r(
|
|
1479
|
-
onInput: c != null ? (d) => c(
|
|
1479
|
+
onChange: r != null ? (d) => r(Pt(d)) : void 0,
|
|
1480
|
+
onInput: c != null ? (d) => c(Pt(d)) : void 0,
|
|
1480
1481
|
onBlur: n,
|
|
1481
1482
|
after: a != null ? z(u, a) : u
|
|
1482
1483
|
});
|
|
@@ -1500,36 +1501,36 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1500
1501
|
l.rows(c ?? 3),
|
|
1501
1502
|
l.value(e),
|
|
1502
1503
|
l.class("bc-input"),
|
|
1503
|
-
s != null ?
|
|
1504
|
-
n != null ?
|
|
1505
|
-
r != null ?
|
|
1504
|
+
s != null ? k.blur(j(s)) : D,
|
|
1505
|
+
n != null ? k.change(j(n)) : D,
|
|
1506
|
+
r != null ? k.input(j(r)) : D
|
|
1506
1507
|
)
|
|
1507
1508
|
});
|
|
1508
1509
|
}, Bn = et(
|
|
1509
1510
|
tn
|
|
1510
1511
|
), Ln = (t) => {
|
|
1511
|
-
const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (
|
|
1512
|
+
const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (b) => {
|
|
1512
1513
|
const f = n != null ? p.get(n) : void 0, w = r != null ? p.get(r) : void 0;
|
|
1513
|
-
return f != null &&
|
|
1514
|
-
}, d = s != null ? P(W, (
|
|
1514
|
+
return f != null && b < f ? f : w != null && b > w ? w : b;
|
|
1515
|
+
}, d = s != null ? P(W, (b) => {
|
|
1515
1516
|
const f = B(
|
|
1516
1517
|
e,
|
|
1517
1518
|
n
|
|
1518
|
-
)((
|
|
1519
|
+
)((v, m) => m == null ? !0 : (v ?? 0) > m), w = B(
|
|
1519
1520
|
e,
|
|
1520
1521
|
r
|
|
1521
|
-
)((
|
|
1522
|
-
const m = p.get(e) ?? 0, M = p.get(s),
|
|
1523
|
-
if (
|
|
1522
|
+
)((v, m) => m == null ? !0 : (v ?? 0) < m), $ = (v) => {
|
|
1523
|
+
const m = p.get(e) ?? 0, M = p.get(s), S = v?.shiftKey ? 10 : 1, T = m - M * S, x = n != null ? p.get(n) : void 0;
|
|
1524
|
+
if (x != null && T < x)
|
|
1524
1525
|
return;
|
|
1525
|
-
const
|
|
1526
|
-
|
|
1527
|
-
},
|
|
1528
|
-
const m = p.get(e) ?? 0, M = p.get(s),
|
|
1529
|
-
if (
|
|
1526
|
+
const g = u(T);
|
|
1527
|
+
g !== m && a && a(g);
|
|
1528
|
+
}, _ = (v) => {
|
|
1529
|
+
const m = p.get(e) ?? 0, M = p.get(s), S = v?.shiftKey ? 10 : 1, T = m + M * S, x = r != null ? p.get(r) : void 0;
|
|
1530
|
+
if (x != null && T > x)
|
|
1530
1531
|
return;
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1532
|
+
const g = u(T);
|
|
1533
|
+
g !== m && a && a(g);
|
|
1533
1534
|
};
|
|
1534
1535
|
return ct(
|
|
1535
1536
|
l.class("bc-number-input-steppers"),
|
|
@@ -1543,10 +1544,10 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1543
1544
|
B(
|
|
1544
1545
|
w,
|
|
1545
1546
|
t.disabled ?? !1
|
|
1546
|
-
)((
|
|
1547
|
+
)((v, m) => !v || m)
|
|
1547
1548
|
),
|
|
1548
|
-
|
|
1549
|
-
R.label(
|
|
1549
|
+
k.click((v) => _(v)),
|
|
1550
|
+
R.label(b.$.incrementValue),
|
|
1550
1551
|
U({ icon: "line-md:plus", size: "xs" })
|
|
1551
1552
|
),
|
|
1552
1553
|
// Decrement first (matches tests expecting first button to be decrement)
|
|
@@ -1559,81 +1560,81 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1559
1560
|
B(
|
|
1560
1561
|
f,
|
|
1561
1562
|
t.disabled ?? !1
|
|
1562
|
-
)((
|
|
1563
|
+
)((v, m) => !v || m)
|
|
1563
1564
|
),
|
|
1564
|
-
|
|
1565
|
-
R.label(
|
|
1565
|
+
k.click((v) => $(v)),
|
|
1566
|
+
R.label(b.$.decrementValue),
|
|
1566
1567
|
U({ icon: "line-md:minus", size: "xs" })
|
|
1567
1568
|
)
|
|
1568
1569
|
);
|
|
1569
|
-
}) : null,
|
|
1570
|
+
}) : null, h = o != null && d != null ? z(d, o) : o ?? d;
|
|
1570
1571
|
return O({
|
|
1571
1572
|
...t,
|
|
1572
1573
|
input: Q.number(
|
|
1573
1574
|
n != null ? z(
|
|
1574
1575
|
l.min(n),
|
|
1575
|
-
|
|
1576
|
-
p.on(n, (
|
|
1577
|
-
|
|
1576
|
+
G(
|
|
1577
|
+
p.on(n, (b) => {
|
|
1578
|
+
b < p.get(e);
|
|
1578
1579
|
})
|
|
1579
1580
|
)
|
|
1580
|
-
) :
|
|
1581
|
+
) : D,
|
|
1581
1582
|
r != null ? z(
|
|
1582
1583
|
l.max(r),
|
|
1583
|
-
|
|
1584
|
-
p.on(r, (
|
|
1585
|
-
|
|
1584
|
+
G(
|
|
1585
|
+
p.on(r, (b) => {
|
|
1586
|
+
b > p.get(e);
|
|
1586
1587
|
})
|
|
1587
1588
|
)
|
|
1588
|
-
) :
|
|
1589
|
+
) : D,
|
|
1589
1590
|
H(t),
|
|
1590
1591
|
l.valueAsNumber(e),
|
|
1591
1592
|
l.step(s),
|
|
1592
1593
|
l.class("bc-input bc-number-input"),
|
|
1593
|
-
c != null ?
|
|
1594
|
-
a != null ?
|
|
1595
|
-
i != null ?
|
|
1594
|
+
c != null ? k.blur(j(c)) : D,
|
|
1595
|
+
a != null ? k.change(Y(a)) : D,
|
|
1596
|
+
i != null ? k.input(Y(i)) : D,
|
|
1596
1597
|
// Add wheel event support when step is defined
|
|
1597
|
-
s != null ?
|
|
1598
|
-
|
|
1599
|
-
const f = p.get(e) ?? 0, w = p.get(s),
|
|
1600
|
-
|
|
1601
|
-
}) :
|
|
1598
|
+
s != null ? k.wheel((b) => {
|
|
1599
|
+
b.preventDefault();
|
|
1600
|
+
const f = p.get(e) ?? 0, w = p.get(s), $ = b.shiftKey ? 10 : 1, _ = b.deltaY < 0 ? w * $ : -w * $, v = u(f + _);
|
|
1601
|
+
v !== f && a && a(v);
|
|
1602
|
+
}) : D
|
|
1602
1603
|
),
|
|
1603
|
-
after:
|
|
1604
|
+
after: h
|
|
1604
1605
|
});
|
|
1605
|
-
},
|
|
1606
|
+
}, jt = (t) => {
|
|
1606
1607
|
if (t == null || t === "") return null;
|
|
1607
1608
|
const e = Number(t);
|
|
1608
1609
|
return Number.isNaN(e) ? null : e;
|
|
1609
1610
|
}, zn = (t) => {
|
|
1610
1611
|
const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (f) => {
|
|
1611
|
-
const w = n != null ? p.get(n) : void 0,
|
|
1612
|
-
return w != null && f < w ? w :
|
|
1612
|
+
const w = n != null ? p.get(n) : void 0, $ = r != null ? p.get(r) : void 0;
|
|
1613
|
+
return w != null && f < w ? w : $ != null && f > $ ? $ : f;
|
|
1613
1614
|
}, d = (() => {
|
|
1614
1615
|
if (s == null) return null;
|
|
1615
1616
|
const f = B(
|
|
1616
1617
|
e,
|
|
1617
1618
|
n
|
|
1618
1619
|
)((m, M) => {
|
|
1619
|
-
const
|
|
1620
|
-
return M == null ? !0 :
|
|
1620
|
+
const S = m ?? 0;
|
|
1621
|
+
return M == null ? !0 : S > M;
|
|
1621
1622
|
}), w = B(
|
|
1622
1623
|
e,
|
|
1623
1624
|
r
|
|
1624
1625
|
)((m, M) => {
|
|
1625
|
-
const
|
|
1626
|
-
return M == null ? !0 :
|
|
1627
|
-
}),
|
|
1628
|
-
const M = p.get(e) ?? 0,
|
|
1629
|
-
if (
|
|
1630
|
-
const
|
|
1631
|
-
|
|
1632
|
-
},
|
|
1633
|
-
const M = p.get(e) ?? 0,
|
|
1634
|
-
if (
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1626
|
+
const S = m ?? 0;
|
|
1627
|
+
return M == null ? !0 : S < M;
|
|
1628
|
+
}), $ = (m) => {
|
|
1629
|
+
const M = p.get(e) ?? 0, S = p.get(s), T = m?.shiftKey ? 10 : 1, x = M - S * T, g = n != null ? p.get(n) : void 0;
|
|
1630
|
+
if (g != null && x < g) return;
|
|
1631
|
+
const I = u(x);
|
|
1632
|
+
I !== M && a && a(I);
|
|
1633
|
+
}, _ = (m) => {
|
|
1634
|
+
const M = p.get(e) ?? 0, S = p.get(s), T = m?.shiftKey ? 10 : 1, x = M + S * T, g = r != null ? p.get(r) : void 0;
|
|
1635
|
+
if (g != null && x > g) return;
|
|
1636
|
+
const I = u(x);
|
|
1637
|
+
I !== M && a && a(I);
|
|
1637
1638
|
};
|
|
1638
1639
|
return ((m, M) => ct(
|
|
1639
1640
|
l.class("bc-number-input-steppers"),
|
|
@@ -1646,9 +1647,9 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1646
1647
|
B(
|
|
1647
1648
|
w,
|
|
1648
1649
|
t.disabled ?? !1
|
|
1649
|
-
)((
|
|
1650
|
+
)((S, T) => !S || T)
|
|
1650
1651
|
),
|
|
1651
|
-
|
|
1652
|
+
k.click((S) => _(S)),
|
|
1652
1653
|
R.label(m),
|
|
1653
1654
|
U({ icon: "line-md:plus", size: "xs" })
|
|
1654
1655
|
),
|
|
@@ -1661,49 +1662,53 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1661
1662
|
B(
|
|
1662
1663
|
f,
|
|
1663
1664
|
t.disabled ?? !1
|
|
1664
|
-
)((
|
|
1665
|
+
)((S, T) => !S || T)
|
|
1665
1666
|
),
|
|
1666
|
-
|
|
1667
|
+
k.click((S) => $(S)),
|
|
1667
1668
|
R.label(M),
|
|
1668
1669
|
U({ icon: "line-md:minus", size: "xs" })
|
|
1669
1670
|
)
|
|
1670
1671
|
))(
|
|
1671
|
-
|
|
1672
|
-
|
|
1672
|
+
kt.incrementValue,
|
|
1673
|
+
kt.decrementValue
|
|
1673
1674
|
);
|
|
1674
|
-
})(),
|
|
1675
|
+
})(), h = J(
|
|
1676
|
+
e,
|
|
1677
|
+
t.disabled,
|
|
1678
|
+
a ?? i
|
|
1679
|
+
), b = o != null && d != null ? z(d, h, o) : o != null ? z(h, o) : d != null ? z(d, h) : h;
|
|
1675
1680
|
return O({
|
|
1676
1681
|
...t,
|
|
1677
1682
|
input: Q.number(
|
|
1678
1683
|
// min/max attributes and reactive watchers (no forced correction)
|
|
1679
|
-
n != null ? l.min(n) :
|
|
1680
|
-
r != null ? l.max(r) :
|
|
1684
|
+
n != null ? l.min(n) : D,
|
|
1685
|
+
r != null ? l.max(r) : D,
|
|
1681
1686
|
H(t),
|
|
1682
1687
|
// Represent null as empty string so the field can be cleared
|
|
1683
1688
|
l.value(p.map(e, (f) => f == null ? "" : String(f))),
|
|
1684
1689
|
l.step(s),
|
|
1685
1690
|
l.class("bc-input bc-number-input"),
|
|
1686
|
-
c != null ?
|
|
1687
|
-
a != null ?
|
|
1691
|
+
c != null ? k.blur(j(c)) : D,
|
|
1692
|
+
a != null ? k.change(
|
|
1688
1693
|
j((f) => {
|
|
1689
|
-
const w =
|
|
1694
|
+
const w = jt(f);
|
|
1690
1695
|
a(w);
|
|
1691
1696
|
})
|
|
1692
|
-
) :
|
|
1693
|
-
i != null ?
|
|
1697
|
+
) : D,
|
|
1698
|
+
i != null ? k.input(
|
|
1694
1699
|
j((f) => {
|
|
1695
|
-
const w =
|
|
1700
|
+
const w = jt(f);
|
|
1696
1701
|
i(w);
|
|
1697
1702
|
})
|
|
1698
|
-
) :
|
|
1703
|
+
) : D,
|
|
1699
1704
|
// Wheel support when step is defined
|
|
1700
|
-
s != null ?
|
|
1705
|
+
s != null ? k.wheel((f) => {
|
|
1701
1706
|
f.preventDefault();
|
|
1702
|
-
const w = p.get(e) ?? 0,
|
|
1707
|
+
const w = p.get(e) ?? 0, $ = p.get(s), _ = f.shiftKey ? 10 : 1, v = f.deltaY < 0 ? $ * _ : -$ * _, m = u(w + v);
|
|
1703
1708
|
m !== w && a && a(m);
|
|
1704
|
-
}) :
|
|
1709
|
+
}) : D
|
|
1705
1710
|
),
|
|
1706
|
-
after:
|
|
1711
|
+
after: b
|
|
1707
1712
|
});
|
|
1708
1713
|
}, En = ({
|
|
1709
1714
|
value: t,
|
|
@@ -1718,26 +1723,26 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1718
1723
|
color: u = "primary",
|
|
1719
1724
|
tabIndex: d = 0
|
|
1720
1725
|
}) => {
|
|
1721
|
-
const
|
|
1722
|
-
function
|
|
1726
|
+
const h = o ?? be("switch");
|
|
1727
|
+
function b(_, v) {
|
|
1723
1728
|
const m = [
|
|
1724
1729
|
"bc-switch",
|
|
1725
|
-
`bc-switch--size-${
|
|
1726
|
-
`bc-switch--${
|
|
1730
|
+
`bc-switch--size-${v}`,
|
|
1731
|
+
`bc-switch--${v}`
|
|
1727
1732
|
];
|
|
1728
|
-
return
|
|
1733
|
+
return _ && m.push("bc-switch--disabled"), m.join(" ");
|
|
1729
1734
|
}
|
|
1730
|
-
function f(
|
|
1731
|
-
const
|
|
1732
|
-
return m.set("--switch-track-on-bg", M.backgroundColor), m.set("--switch-track-on-label", M.textColor), m.set("--switch-track-on-bg-dark",
|
|
1735
|
+
function f(_) {
|
|
1736
|
+
const v = _ ?? "primary", m = /* @__PURE__ */ new Map(), M = Rt(v, "solid", "light"), S = Rt(v, "solid", "dark");
|
|
1737
|
+
return m.set("--switch-track-on-bg", M.backgroundColor), m.set("--switch-track-on-label", M.textColor), m.set("--switch-track-on-bg-dark", S.backgroundColor), m.set("--switch-track-on-label-dark", S.textColor), m.set(
|
|
1733
1738
|
"--switch-track-on-border-dark",
|
|
1734
|
-
de(
|
|
1735
|
-
), Array.from(m.entries()).map(([
|
|
1739
|
+
de(v, "dark")
|
|
1740
|
+
), Array.from(m.entries()).map(([T, x]) => `${T}: ${x}`).join("; ");
|
|
1736
1741
|
}
|
|
1737
1742
|
const w = () => {
|
|
1738
1743
|
p.get(a) || (e?.(!p.get(t)), s?.(!p.get(t)));
|
|
1739
|
-
},
|
|
1740
|
-
p.get(a) || (
|
|
1744
|
+
}, $ = (_) => {
|
|
1745
|
+
p.get(a) || (_.key === " " || _.key === "Enter") && (_.preventDefault(), w());
|
|
1741
1746
|
};
|
|
1742
1747
|
return y.div(
|
|
1743
1748
|
l.class(
|
|
@@ -1745,33 +1750,33 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1745
1750
|
a ?? !1,
|
|
1746
1751
|
i
|
|
1747
1752
|
)(
|
|
1748
|
-
(
|
|
1753
|
+
(_, v) => b(_ ?? !1, v ?? "md")
|
|
1749
1754
|
)
|
|
1750
1755
|
),
|
|
1751
1756
|
l.style(
|
|
1752
1757
|
B(u)(
|
|
1753
|
-
(
|
|
1758
|
+
(_) => f(_)
|
|
1754
1759
|
)
|
|
1755
1760
|
),
|
|
1756
|
-
l.id(
|
|
1761
|
+
l.id(h),
|
|
1757
1762
|
l.role("switch"),
|
|
1758
1763
|
l.tabindex(
|
|
1759
1764
|
B(
|
|
1760
1765
|
a ?? !1,
|
|
1761
1766
|
d
|
|
1762
|
-
)((
|
|
1767
|
+
)((_, v) => _ ? -1 : v ?? 0)
|
|
1763
1768
|
),
|
|
1764
1769
|
R.checked(t),
|
|
1765
1770
|
R.disabled(a),
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
n != null ?
|
|
1771
|
+
k.click(w),
|
|
1772
|
+
k.keydown($),
|
|
1773
|
+
n != null ? k.blur(n) : null,
|
|
1769
1774
|
y.div(
|
|
1770
1775
|
l.class("bc-switch__track"),
|
|
1771
1776
|
l.class(
|
|
1772
1777
|
p.map(
|
|
1773
1778
|
t,
|
|
1774
|
-
(
|
|
1779
|
+
(_) => _ ? "bc-switch__track--on" : "bc-switch__track--off"
|
|
1775
1780
|
)
|
|
1776
1781
|
),
|
|
1777
1782
|
r != null ? y.div(
|
|
@@ -1780,7 +1785,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1780
1785
|
l.class(
|
|
1781
1786
|
p.map(
|
|
1782
1787
|
t,
|
|
1783
|
-
(
|
|
1788
|
+
(_) => _ ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
|
|
1784
1789
|
)
|
|
1785
1790
|
),
|
|
1786
1791
|
r
|
|
@@ -1790,15 +1795,15 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1790
1795
|
l.class(
|
|
1791
1796
|
p.map(
|
|
1792
1797
|
t,
|
|
1793
|
-
(
|
|
1798
|
+
(_) => _ ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
|
|
1794
1799
|
)
|
|
1795
1800
|
),
|
|
1796
1801
|
c
|
|
1797
1802
|
) : null,
|
|
1798
|
-
|
|
1799
|
-
(
|
|
1803
|
+
Zt(
|
|
1804
|
+
(_) => P(
|
|
1800
1805
|
pe,
|
|
1801
|
-
({ direction:
|
|
1806
|
+
({ direction: v }) => y.div(
|
|
1802
1807
|
l.class("bc-switch__thumb"),
|
|
1803
1808
|
l.class(
|
|
1804
1809
|
p.map(
|
|
@@ -1809,12 +1814,12 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1809
1814
|
ht.transform(
|
|
1810
1815
|
B(
|
|
1811
1816
|
t,
|
|
1812
|
-
|
|
1817
|
+
_,
|
|
1813
1818
|
i,
|
|
1814
|
-
|
|
1815
|
-
)((m, { width: M },
|
|
1816
|
-
const
|
|
1817
|
-
switch (
|
|
1819
|
+
v
|
|
1820
|
+
)((m, { width: M }, S, T) => {
|
|
1821
|
+
const x = (() => {
|
|
1822
|
+
switch (S) {
|
|
1818
1823
|
case "xs":
|
|
1819
1824
|
return 5;
|
|
1820
1825
|
case "sm":
|
|
@@ -1826,8 +1831,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1826
1831
|
case "xl":
|
|
1827
1832
|
return 8;
|
|
1828
1833
|
}
|
|
1829
|
-
})(),
|
|
1830
|
-
return m ? `translateX(${
|
|
1834
|
+
})(), g = T === "rtl" ? `calc((var(--spacing-base) * ${x}) - ${M}px)` : `calc(${M}px - (var(--spacing-base) * ${x}))`;
|
|
1835
|
+
return m ? `translateX(${g})` : "translateX(0)";
|
|
1831
1836
|
})
|
|
1832
1837
|
)
|
|
1833
1838
|
)
|
|
@@ -1841,7 +1846,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1841
1846
|
pattern: /[0-9A-Fa-f]/,
|
|
1842
1847
|
transform: (n) => n.toLowerCase()
|
|
1843
1848
|
};
|
|
1844
|
-
return
|
|
1849
|
+
return Jt({
|
|
1845
1850
|
...t,
|
|
1846
1851
|
mask: [
|
|
1847
1852
|
e,
|
|
@@ -1896,40 +1901,40 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1896
1901
|
emptyIcon: o = sn,
|
|
1897
1902
|
size: u = "md",
|
|
1898
1903
|
onBlur: d,
|
|
1899
|
-
rounding:
|
|
1900
|
-
} = t,
|
|
1901
|
-
const m = p.get(
|
|
1904
|
+
rounding: h = 1
|
|
1905
|
+
} = t, b = () => {
|
|
1906
|
+
const m = p.get(h);
|
|
1902
1907
|
return m > 0 ? m : 1;
|
|
1903
1908
|
}, f = (m) => Math.min(Math.max(m, 0), p.get(r)), w = (m, M) => {
|
|
1904
1909
|
if (p.get(n ?? !1)) return;
|
|
1905
|
-
const
|
|
1910
|
+
const T = m.currentTarget.getBoundingClientRect(), x = (m.clientX - T.left) / T.width, g = M - 1 + x, I = b(), F = Math.ceil(g / I) * I, A = f(F);
|
|
1906
1911
|
s?.(A);
|
|
1907
|
-
},
|
|
1912
|
+
}, $ = (m) => {
|
|
1908
1913
|
if (p.get(n ?? !1)) return;
|
|
1909
|
-
const M =
|
|
1910
|
-
let
|
|
1914
|
+
const M = b(), S = p.get(e) ?? 0;
|
|
1915
|
+
let T;
|
|
1911
1916
|
switch (m.key) {
|
|
1912
1917
|
case "ArrowRight":
|
|
1913
1918
|
case "ArrowUp":
|
|
1914
|
-
|
|
1919
|
+
T = f(S + M);
|
|
1915
1920
|
break;
|
|
1916
1921
|
case "ArrowLeft":
|
|
1917
1922
|
case "ArrowDown":
|
|
1918
|
-
|
|
1923
|
+
T = f(S - M);
|
|
1919
1924
|
break;
|
|
1920
1925
|
case "Home":
|
|
1921
|
-
|
|
1926
|
+
T = 0;
|
|
1922
1927
|
break;
|
|
1923
1928
|
case "End":
|
|
1924
|
-
|
|
1929
|
+
T = p.get(r);
|
|
1925
1930
|
break;
|
|
1926
1931
|
default:
|
|
1927
1932
|
return;
|
|
1928
1933
|
}
|
|
1929
|
-
m.preventDefault(), s?.(
|
|
1930
|
-
},
|
|
1934
|
+
m.preventDefault(), s?.(T);
|
|
1935
|
+
}, _ = p.map(u, (m) => `bc-icon--${m}`), v = ({ index: m, counter: M }) => y.span(
|
|
1931
1936
|
l.class("bc-rating-input__icon-container"),
|
|
1932
|
-
l.class(
|
|
1937
|
+
l.class(_),
|
|
1933
1938
|
U(
|
|
1934
1939
|
{
|
|
1935
1940
|
icon: o,
|
|
@@ -1941,11 +1946,11 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1941
1946
|
),
|
|
1942
1947
|
y.span(
|
|
1943
1948
|
l.class("bc-rating-input__icon-clipper"),
|
|
1944
|
-
l.class(
|
|
1949
|
+
l.class(_),
|
|
1945
1950
|
ht.width(
|
|
1946
|
-
p.map(e, (
|
|
1947
|
-
const
|
|
1948
|
-
return
|
|
1951
|
+
p.map(e, (S) => {
|
|
1952
|
+
const T = Math.floor(S);
|
|
1953
|
+
return T > m ? "100%" : T < m ? "0%" : `${(S - m) * 100}%`;
|
|
1949
1954
|
})
|
|
1950
1955
|
),
|
|
1951
1956
|
U(
|
|
@@ -1958,8 +1963,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1958
1963
|
l.class("bc-rating-input__icon-full")
|
|
1959
1964
|
)
|
|
1960
1965
|
),
|
|
1961
|
-
|
|
1962
|
-
re((
|
|
1966
|
+
k.click(
|
|
1967
|
+
re((S) => w(S, M), {
|
|
1963
1968
|
preventDefault: !0,
|
|
1964
1969
|
stopPropagation: !0
|
|
1965
1970
|
})
|
|
@@ -1986,26 +1991,27 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1986
1991
|
e,
|
|
1987
1992
|
r
|
|
1988
1993
|
)((m, M) => {
|
|
1989
|
-
const
|
|
1990
|
-
return `${String(
|
|
1994
|
+
const S = m ?? 0, T = M ?? 0;
|
|
1995
|
+
return `${String(S)} / ${String(T)}`;
|
|
1991
1996
|
})
|
|
1992
1997
|
),
|
|
1993
1998
|
// Keyboard & focus handlers
|
|
1994
|
-
|
|
1995
|
-
d != null ?
|
|
1996
|
-
|
|
1999
|
+
k.keydown($),
|
|
2000
|
+
d != null ? k.blur(d) : null,
|
|
2001
|
+
Wt(r, v)
|
|
1997
2002
|
)
|
|
1998
2003
|
});
|
|
1999
2004
|
}, Un = (t) => {
|
|
2000
|
-
const { value: e, onChange: s,
|
|
2005
|
+
const { value: e, onChange: s, onInput: n, onBlur: r, after: c, disabled: a, ...i } = t, o = J(e, a, s ?? n);
|
|
2001
2006
|
return rn({
|
|
2002
|
-
...
|
|
2007
|
+
...i,
|
|
2003
2008
|
// Map null -> 0 for display so the control shows as empty when null
|
|
2004
|
-
value: p.map(e, (
|
|
2009
|
+
value: p.map(e, (u) => u ?? 0),
|
|
2005
2010
|
// Pass through numeric changes; clear button will call onChange(null)
|
|
2006
2011
|
onChange: s,
|
|
2007
|
-
|
|
2008
|
-
|
|
2012
|
+
onInput: n,
|
|
2013
|
+
onBlur: r,
|
|
2014
|
+
after: c != null ? z(o, c) : o
|
|
2009
2015
|
});
|
|
2010
2016
|
}, Nn = (t) => {
|
|
2011
2017
|
const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t;
|
|
@@ -2022,19 +2028,21 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
2022
2028
|
// Using value as number to keep it in sync
|
|
2023
2029
|
l.valueAsNumber(e),
|
|
2024
2030
|
l.class("bc-input bc-slider-input"),
|
|
2025
|
-
c != null ?
|
|
2026
|
-
a != null ?
|
|
2027
|
-
i != null ?
|
|
2031
|
+
c != null ? k.blur(Y(c)) : D,
|
|
2032
|
+
a != null ? k.change(Y(a)) : D,
|
|
2033
|
+
i != null ? k.input(Y(i)) : D
|
|
2028
2034
|
)
|
|
2029
2035
|
});
|
|
2030
2036
|
}, On = (t) => {
|
|
2031
2037
|
const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t, o = p.map(e, (d) => {
|
|
2032
2038
|
if (d != null) return d;
|
|
2033
|
-
const
|
|
2034
|
-
return typeof
|
|
2035
|
-
}), u = J(
|
|
2036
|
-
|
|
2037
|
-
|
|
2039
|
+
const h = n != null ? p.get(n) : void 0;
|
|
2040
|
+
return typeof h == "number" ? h : 0;
|
|
2041
|
+
}), u = J(
|
|
2042
|
+
e,
|
|
2043
|
+
t.disabled,
|
|
2044
|
+
a ?? i
|
|
2045
|
+
);
|
|
2038
2046
|
return O(
|
|
2039
2047
|
{
|
|
2040
2048
|
...t,
|
|
@@ -2048,36 +2056,36 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
2048
2056
|
l.step(s),
|
|
2049
2057
|
l.valueAsNumber(o),
|
|
2050
2058
|
l.class("bc-input bc-slider-input"),
|
|
2051
|
-
c != null ?
|
|
2052
|
-
a != null ?
|
|
2059
|
+
c != null ? k.blur(Y(c)) : D,
|
|
2060
|
+
a != null ? k.change(
|
|
2053
2061
|
Y((d) => {
|
|
2054
2062
|
a(d);
|
|
2055
2063
|
})
|
|
2056
|
-
) :
|
|
2057
|
-
i != null ?
|
|
2064
|
+
) : D,
|
|
2065
|
+
i != null ? k.input(
|
|
2058
2066
|
Y((d) => {
|
|
2059
2067
|
i(d);
|
|
2060
2068
|
})
|
|
2061
|
-
) :
|
|
2069
|
+
) : D
|
|
2062
2070
|
)
|
|
2063
2071
|
},
|
|
2064
2072
|
// Ensure container grows input naturally
|
|
2065
2073
|
z()
|
|
2066
2074
|
);
|
|
2067
2075
|
};
|
|
2068
|
-
let
|
|
2069
|
-
async function
|
|
2076
|
+
let It = null;
|
|
2077
|
+
async function St() {
|
|
2070
2078
|
const t = globalThis;
|
|
2071
|
-
return t.Temporal ? t.Temporal : (
|
|
2079
|
+
return t.Temporal ? t.Temporal : (It || (It = import("./index.esm-DPNh6inz.js").then((e) => {
|
|
2072
2080
|
const s = e.Temporal;
|
|
2073
2081
|
return t.Temporal || (t.Temporal = s), s;
|
|
2074
|
-
})),
|
|
2082
|
+
})), It);
|
|
2075
2083
|
}
|
|
2076
|
-
const an = (t, e) => e ?
|
|
2084
|
+
const an = (t, e) => e ? zt(St, {
|
|
2077
2085
|
then: t,
|
|
2078
2086
|
pending: e.pending,
|
|
2079
2087
|
error: e.error
|
|
2080
|
-
}) :
|
|
2088
|
+
}) : zt(St, t), ln = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, on = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
|
|
2081
2089
|
function cn(t) {
|
|
2082
2090
|
return {
|
|
2083
2091
|
mask: null,
|
|
@@ -2101,7 +2109,7 @@ function cn(t) {
|
|
|
2101
2109
|
}
|
|
2102
2110
|
};
|
|
2103
2111
|
}
|
|
2104
|
-
const
|
|
2112
|
+
const Ht = (t, e) => {
|
|
2105
2113
|
if (t == null) return null;
|
|
2106
2114
|
try {
|
|
2107
2115
|
return t.Duration.from(e);
|
|
@@ -2109,48 +2117,52 @@ const Pt = (t, e) => {
|
|
|
2109
2117
|
return null;
|
|
2110
2118
|
}
|
|
2111
2119
|
}, Pn = (t) => {
|
|
2112
|
-
const { value: e, onChange: s,
|
|
2113
|
-
const
|
|
2114
|
-
return
|
|
2115
|
-
},
|
|
2120
|
+
const { value: e, onChange: s, onInput: n, after: r, disabled: c, onBlur: a } = t, i = () => {
|
|
2121
|
+
const d = J(e, c, s ?? n);
|
|
2122
|
+
return r != null ? z(d, r) : d;
|
|
2123
|
+
}, o = t.placeholder != null ? D : l.placeholder("P0DT0H0M0S");
|
|
2116
2124
|
return an(
|
|
2117
|
-
(
|
|
2125
|
+
(d) => Jt({
|
|
2118
2126
|
...t,
|
|
2119
|
-
value: p.map(e, (
|
|
2120
|
-
onChange: s ? (
|
|
2127
|
+
value: p.map(e, (h) => h?.toString() ?? ""),
|
|
2128
|
+
onChange: s ? (h) => s(h === "" ? null : d.Duration.from(h)) : void 0,
|
|
2121
2129
|
onInput: void 0,
|
|
2122
|
-
...cn(
|
|
2130
|
+
...cn(d.Duration.from),
|
|
2123
2131
|
placeholder: "P0DT0H0M0S",
|
|
2124
|
-
after:
|
|
2132
|
+
after: i()
|
|
2125
2133
|
}),
|
|
2126
|
-
{ pending: () =>
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2134
|
+
{ pending: () => {
|
|
2135
|
+
const d = (h) => (b) => {
|
|
2136
|
+
const w = b.currentTarget?.value ?? "";
|
|
2137
|
+
if (w === "") {
|
|
2138
|
+
h(null);
|
|
2139
|
+
return;
|
|
2140
|
+
}
|
|
2141
|
+
const $ = globalThis.Temporal, _ = Ht($, w);
|
|
2142
|
+
if (_ != null) {
|
|
2143
|
+
h(_);
|
|
2144
|
+
return;
|
|
2145
|
+
}
|
|
2146
|
+
St().then((v) => {
|
|
2147
|
+
const m = Ht(v, w);
|
|
2148
|
+
m != null && h(m);
|
|
2149
|
+
}).catch(() => {
|
|
2150
|
+
});
|
|
2151
|
+
};
|
|
2152
|
+
return O({
|
|
2153
|
+
...t,
|
|
2154
|
+
input: Q.text(
|
|
2155
|
+
H(t),
|
|
2156
|
+
l.value(p.map(e, (h) => h?.toString() ?? "")),
|
|
2157
|
+
l.class("bc-input"),
|
|
2158
|
+
o,
|
|
2159
|
+
a != null ? k.blur(() => a()) : D,
|
|
2160
|
+
s != null ? k.change(d(s)) : D,
|
|
2161
|
+
n != null ? k.input(d(n)) : D
|
|
2162
|
+
),
|
|
2163
|
+
after: i()
|
|
2164
|
+
});
|
|
2165
|
+
} }
|
|
2154
2166
|
);
|
|
2155
2167
|
}, un = (t) => {
|
|
2156
2168
|
const { value: e, onBlur: s, onChange: n, onInput: r } = t;
|
|
@@ -2160,9 +2172,9 @@ const Pt = (t, e) => {
|
|
|
2160
2172
|
H(t),
|
|
2161
2173
|
l.value(e),
|
|
2162
2174
|
l.class("bc-input"),
|
|
2163
|
-
s != null ?
|
|
2164
|
-
n != null ?
|
|
2165
|
-
r != null ?
|
|
2175
|
+
s != null ? k.blur(j(s)) : D,
|
|
2176
|
+
n != null ? k.change(j(n)) : D,
|
|
2177
|
+
r != null ? k.input(j(r)) : D
|
|
2166
2178
|
)
|
|
2167
2179
|
});
|
|
2168
2180
|
}, jn = et(un), pn = (t) => {
|
|
@@ -2177,14 +2189,14 @@ const Pt = (t, e) => {
|
|
|
2177
2189
|
addLabel: o,
|
|
2178
2190
|
controlsLayout: u = "aside",
|
|
2179
2191
|
removeDisabled: d,
|
|
2180
|
-
addDisabled:
|
|
2181
|
-
} = t,
|
|
2182
|
-
const
|
|
2192
|
+
addDisabled: h
|
|
2193
|
+
} = t, b = p.toSignal(u).map(($) => $ === "aside"), f = ($) => {
|
|
2194
|
+
const _ = L(
|
|
2183
2195
|
r ?? !1,
|
|
2184
2196
|
() => y.div(
|
|
2185
2197
|
l.class("bc-group--align-center"),
|
|
2186
2198
|
l.class(
|
|
2187
|
-
|
|
2199
|
+
b.map(
|
|
2188
2200
|
(m) => m ? "bc-group--direction-column bc-group--gap-1" : "bc-group--direction-row bc-group--gap-1"
|
|
2189
2201
|
)
|
|
2190
2202
|
),
|
|
@@ -2193,8 +2205,8 @@ const Pt = (t, e) => {
|
|
|
2193
2205
|
size: "xs",
|
|
2194
2206
|
roundedness: "full",
|
|
2195
2207
|
variant: "text",
|
|
2196
|
-
onClick: () =>
|
|
2197
|
-
disabled:
|
|
2208
|
+
onClick: () => $.move("up"),
|
|
2209
|
+
disabled: $.cannotMove("up")
|
|
2198
2210
|
},
|
|
2199
2211
|
P(
|
|
2200
2212
|
W,
|
|
@@ -2210,8 +2222,8 @@ const Pt = (t, e) => {
|
|
|
2210
2222
|
size: "xs",
|
|
2211
2223
|
roundedness: "full",
|
|
2212
2224
|
variant: "text",
|
|
2213
|
-
onClick: () =>
|
|
2214
|
-
disabled:
|
|
2225
|
+
onClick: () => $.move("down"),
|
|
2226
|
+
disabled: $.cannotMove("down")
|
|
2215
2227
|
},
|
|
2216
2228
|
P(
|
|
2217
2229
|
W,
|
|
@@ -2223,7 +2235,7 @@ const Pt = (t, e) => {
|
|
|
2223
2235
|
)
|
|
2224
2236
|
)
|
|
2225
2237
|
)
|
|
2226
|
-
),
|
|
2238
|
+
), v = L(
|
|
2227
2239
|
c,
|
|
2228
2240
|
() => P(
|
|
2229
2241
|
W,
|
|
@@ -2233,12 +2245,12 @@ const Pt = (t, e) => {
|
|
|
2233
2245
|
label: p.map(m.$.removeItem, (M) => M.toLowerCase()),
|
|
2234
2246
|
color: "danger",
|
|
2235
2247
|
disabled: d,
|
|
2236
|
-
onClick:
|
|
2248
|
+
onClick: $.remove
|
|
2237
2249
|
})
|
|
2238
2250
|
)
|
|
2239
2251
|
);
|
|
2240
2252
|
return (m) => L(
|
|
2241
|
-
|
|
2253
|
+
b,
|
|
2242
2254
|
() => dt(
|
|
2243
2255
|
l.class("bc-group--gap-1 bc-group--align-center"),
|
|
2244
2256
|
ct(l.class("bc-stack--grow"), m),
|
|
@@ -2246,9 +2258,9 @@ const Pt = (t, e) => {
|
|
|
2246
2258
|
l.class("bc-stack--align-center"),
|
|
2247
2259
|
L(
|
|
2248
2260
|
e.signal.map((M) => M.length > 1),
|
|
2249
|
-
() =>
|
|
2261
|
+
() => _
|
|
2250
2262
|
),
|
|
2251
|
-
|
|
2263
|
+
v
|
|
2252
2264
|
)
|
|
2253
2265
|
),
|
|
2254
2266
|
() => ct(
|
|
@@ -2258,15 +2270,15 @@ const Pt = (t, e) => {
|
|
|
2258
2270
|
l.class("bc-group--gap-2 bc-group--justify-between"),
|
|
2259
2271
|
L(
|
|
2260
2272
|
e.signal.map((M) => M.length > 1),
|
|
2261
|
-
() =>
|
|
2273
|
+
() => _,
|
|
2262
2274
|
() => y.div()
|
|
2263
2275
|
),
|
|
2264
|
-
|
|
2276
|
+
v
|
|
2265
2277
|
)
|
|
2266
2278
|
)
|
|
2267
2279
|
);
|
|
2268
2280
|
}, w = L(
|
|
2269
|
-
B(a, i)((_
|
|
2281
|
+
B(a, i)(($, _) => $ && _ != null),
|
|
2270
2282
|
() => dt(
|
|
2271
2283
|
l.class(
|
|
2272
2284
|
"bc-group--gap-2 bc-group--align-center bc-group--justify-center"
|
|
@@ -2278,17 +2290,17 @@ const Pt = (t, e) => {
|
|
|
2278
2290
|
onClick: () => e.push(i()),
|
|
2279
2291
|
disabled: B(
|
|
2280
2292
|
e.disabled,
|
|
2281
|
-
|
|
2293
|
+
h ?? !1
|
|
2282
2294
|
)(
|
|
2283
|
-
(_
|
|
2295
|
+
($, _) => $ || _
|
|
2284
2296
|
)
|
|
2285
2297
|
},
|
|
2286
2298
|
P(
|
|
2287
2299
|
W,
|
|
2288
|
-
(
|
|
2300
|
+
($) => dt(
|
|
2289
2301
|
l.class("bc-group--gap-2"),
|
|
2290
2302
|
U({ icon: "line-md:plus" }),
|
|
2291
|
-
o ??
|
|
2303
|
+
o ?? $.$.addLabel
|
|
2292
2304
|
)
|
|
2293
2305
|
)
|
|
2294
2306
|
)
|
|
@@ -2297,7 +2309,7 @@ const Pt = (t, e) => {
|
|
|
2297
2309
|
return z(
|
|
2298
2310
|
Xe(
|
|
2299
2311
|
e,
|
|
2300
|
-
(
|
|
2312
|
+
($) => f($)(s($)),
|
|
2301
2313
|
n
|
|
2302
2314
|
),
|
|
2303
2315
|
w
|
|
@@ -2313,11 +2325,11 @@ const Pt = (t, e) => {
|
|
|
2313
2325
|
createItem: o,
|
|
2314
2326
|
addLabel: u,
|
|
2315
2327
|
controlsLayout: d,
|
|
2316
|
-
removeDisabled:
|
|
2317
|
-
addDisabled:
|
|
2328
|
+
removeDisabled: h,
|
|
2329
|
+
addDisabled: b,
|
|
2318
2330
|
...f
|
|
2319
2331
|
} = t;
|
|
2320
|
-
return
|
|
2332
|
+
return Yt(
|
|
2321
2333
|
{
|
|
2322
2334
|
...f,
|
|
2323
2335
|
content: pn({
|
|
@@ -2330,8 +2342,8 @@ const Pt = (t, e) => {
|
|
|
2330
2342
|
createItem: o,
|
|
2331
2343
|
addLabel: u,
|
|
2332
2344
|
controlsLayout: d,
|
|
2333
|
-
removeDisabled:
|
|
2334
|
-
addDisabled:
|
|
2345
|
+
removeDisabled: h,
|
|
2346
|
+
addDisabled: b
|
|
2335
2347
|
})
|
|
2336
2348
|
},
|
|
2337
2349
|
...e
|
|
@@ -2345,35 +2357,35 @@ class Wn extends xt {
|
|
|
2345
2357
|
constructor(e, s, n, r, c, a, i = rt) {
|
|
2346
2358
|
super(e, s, n, r, c, i), this.branches = a;
|
|
2347
2359
|
const o = (d) => {
|
|
2348
|
-
for (const
|
|
2349
|
-
if (
|
|
2350
|
-
return
|
|
2360
|
+
for (const h of a)
|
|
2361
|
+
if (h.detect(d))
|
|
2362
|
+
return h.key;
|
|
2351
2363
|
return a[0]?.key ?? "unknown";
|
|
2352
2364
|
};
|
|
2353
2365
|
this.activeBranch = n.map(o, rt);
|
|
2354
2366
|
const u = (d) => {
|
|
2355
2367
|
if (this.#t.has(d))
|
|
2356
2368
|
return this.#t.get(d);
|
|
2357
|
-
const
|
|
2358
|
-
if (!
|
|
2369
|
+
const h = a.find((f) => f.key === d);
|
|
2370
|
+
if (!h)
|
|
2359
2371
|
throw new Error(`Unknown branch: ${d}`);
|
|
2360
|
-
const
|
|
2372
|
+
const b = new xt(
|
|
2361
2373
|
[...e, d],
|
|
2362
2374
|
(f) => {
|
|
2363
2375
|
this.change(f);
|
|
2364
2376
|
},
|
|
2365
2377
|
this.signal.map(
|
|
2366
|
-
(f) =>
|
|
2378
|
+
(f) => h.detect(f) ? f : h.defaultValue(),
|
|
2367
2379
|
i
|
|
2368
2380
|
),
|
|
2369
|
-
r.map(
|
|
2381
|
+
r.map(Ut([d])),
|
|
2370
2382
|
{
|
|
2371
2383
|
disabled: this.disabled,
|
|
2372
2384
|
validationMode: this.parent.validationMode
|
|
2373
2385
|
},
|
|
2374
2386
|
i
|
|
2375
2387
|
);
|
|
2376
|
-
return this.#t.set(d,
|
|
2388
|
+
return this.#t.set(d, b), b;
|
|
2377
2389
|
};
|
|
2378
2390
|
this.#e = this.activeBranch.map(
|
|
2379
2391
|
(d) => u(d),
|
|
@@ -2408,7 +2420,7 @@ class Wn extends xt {
|
|
|
2408
2420
|
(r) => s.detect(r) ? r : s.defaultValue(),
|
|
2409
2421
|
rt
|
|
2410
2422
|
),
|
|
2411
|
-
this.status.map(
|
|
2423
|
+
this.status.map(Ut([e])),
|
|
2412
2424
|
{
|
|
2413
2425
|
disabled: this.disabled,
|
|
2414
2426
|
validationMode: this.parent.validationMode
|
|
@@ -2469,7 +2481,7 @@ export {
|
|
|
2469
2481
|
we as $,
|
|
2470
2482
|
En as A,
|
|
2471
2483
|
pn as B,
|
|
2472
|
-
|
|
2484
|
+
In as C,
|
|
2473
2485
|
en as D,
|
|
2474
2486
|
je as E,
|
|
2475
2487
|
ze as F,
|
|
@@ -2479,7 +2491,7 @@ export {
|
|
|
2479
2491
|
Nn as J,
|
|
2480
2492
|
On as K,
|
|
2481
2493
|
Hn as L,
|
|
2482
|
-
|
|
2494
|
+
Jt as M,
|
|
2483
2495
|
Ze as N,
|
|
2484
2496
|
Pn as O,
|
|
2485
2497
|
un as P,
|
|
@@ -2490,7 +2502,7 @@ export {
|
|
|
2490
2502
|
$t as U,
|
|
2491
2503
|
Cn as V,
|
|
2492
2504
|
an as W,
|
|
2493
|
-
|
|
2505
|
+
kn as X,
|
|
2494
2506
|
He as Y,
|
|
2495
2507
|
ve as Z,
|
|
2496
2508
|
xe as _,
|
|
@@ -2500,24 +2512,24 @@ export {
|
|
|
2500
2512
|
xn as a2,
|
|
2501
2513
|
$e as a3,
|
|
2502
2514
|
ye as a4,
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2515
|
+
Ie as a5,
|
|
2516
|
+
qt as a6,
|
|
2517
|
+
ke as a7,
|
|
2506
2518
|
Mt as a8,
|
|
2507
2519
|
Ce as a9,
|
|
2508
2520
|
wt as aa,
|
|
2509
2521
|
_t as ab,
|
|
2510
2522
|
Me as ac,
|
|
2511
|
-
|
|
2523
|
+
Se as ad,
|
|
2512
2524
|
at as ae,
|
|
2513
2525
|
lt as af,
|
|
2514
|
-
|
|
2526
|
+
St as ag,
|
|
2515
2527
|
_n as ah,
|
|
2516
2528
|
wn as ai,
|
|
2517
|
-
|
|
2529
|
+
Xt as b,
|
|
2518
2530
|
_e as c,
|
|
2519
2531
|
cn as d,
|
|
2520
|
-
|
|
2532
|
+
Pt as e,
|
|
2521
2533
|
Wn as f,
|
|
2522
2534
|
Yn as g,
|
|
2523
2535
|
Xn as h,
|
|
@@ -2529,8 +2541,8 @@ export {
|
|
|
2529
2541
|
Ke as n,
|
|
2530
2542
|
Xe as o,
|
|
2531
2543
|
Ye as p,
|
|
2532
|
-
|
|
2533
|
-
|
|
2544
|
+
Sn as q,
|
|
2545
|
+
Dn as r,
|
|
2534
2546
|
Tn as s,
|
|
2535
2547
|
Zn as t,
|
|
2536
2548
|
Fn as u,
|