@tempots/beatui 0.94.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ar-CuI1Jgt6.cjs +1 -0
- package/dist/{ar-8Cko5i-Z.js → ar-DaKbK_t8.js} +88 -11
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-Rt0WDKAe.js → auth-divider-BQIhr3-R.js} +99 -98
- package/dist/auth-divider-DvnUModP.cjs +1 -0
- package/dist/beatui.css +1628 -541
- package/dist/beatui.tailwind.css +1629 -542
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +9 -9
- package/dist/codehighlight/index.cjs.js +22 -0
- package/dist/codehighlight/index.es.js +76 -0
- package/dist/colors-B-p6IzX9.cjs +1 -0
- package/dist/{colors-BY0Ja_bf.js → colors-DwufPN8S.js} +18 -18
- package/dist/{de-Bt-d2iKj.js → de-3MTPDS1i.js} +83 -6
- package/dist/de-DthHehbh.cjs +1 -0
- package/dist/{deep-merge-CoLO4id0.js → deep-merge-BzIheQtH.js} +511 -517
- package/dist/deep-merge-EkjEgK0N.cjs +1 -0
- package/dist/{duration-input-47x7nbGh.cjs → duration-input-ClgYjeBa.cjs} +1 -1
- package/dist/{duration-input-DrVonjKK.js → duration-input-DGzmIImj.js} +5 -5
- package/dist/{editor-toolbar-group-CzdBZ1yr.js → editor-toolbar-group-Crlu1QJw.js} +3 -3
- package/dist/{editor-toolbar-group-DhKJdqER.cjs → editor-toolbar-group-mkL4QozO.cjs} +1 -1
- package/dist/es-B6GJLk9h.cjs +1 -0
- package/dist/{es-2llfNFX2.js → es-DwMUvBeU.js} +95 -18
- package/dist/{fa-CQVIBjKP.js → fa-0rvQiKrJ.js} +88 -11
- package/dist/fa-BwgP93iV.cjs +1 -0
- package/dist/{fr-CC3smTlW.js → fr-B4i6NzLl.js} +87 -10
- package/dist/fr-CQzk5zqY.cjs +1 -0
- package/dist/{he-CZilsN75.js → he-C71n-hsn.js} +88 -11
- package/dist/he-DcxxvRfs.cjs +1 -0
- package/dist/hi-D-KHVWg4.cjs +1 -0
- package/dist/{hi-CAZjwGv-.js → hi-xmrXpeVU.js} +88 -11
- package/dist/index-B5MAsOC-.cjs +1 -0
- package/dist/{index-B8cqD9ny.js → index-C3o9GSH6.js} +106 -105
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +8055 -5285
- package/dist/input-container-BvEcp7FU.js +275 -0
- package/dist/input-container-Di1YvVB_.cjs +1 -0
- package/dist/{it-D6RXFIL6.js → it-CDZTtOBC.js} +84 -7
- package/dist/it-D344Dutu.cjs +1 -0
- package/dist/ja-BNgnDZ27.cjs +1 -0
- package/dist/{ja-D7zsz4Ij.js → ja-Zz1LzidW.js} +92 -15
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +261 -257
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +2 -2
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +132 -133
- package/dist/{ko-taN2Npr4.js → ko-9laUsZDL.js} +91 -14
- package/dist/ko-D-WJ9NK7.cjs +1 -0
- package/dist/lexical/index.cjs.js +2 -39
- package/dist/lexical/index.es.js +2102 -20521
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +41 -4
- package/dist/{menu-CV85y3Xf.js → menu-B8yoDMRS.js} +23 -23
- package/dist/menu-B92oSDct.cjs +1 -0
- package/dist/modal-BT0jjDqX.cjs +1 -0
- package/dist/{modal-ZitwUeXx.js → modal-DBguyX-b.js} +9 -9
- package/dist/monaco/index.cjs.js +2 -2
- package/dist/monaco/index.es.js +7 -7
- package/dist/nl-CrqUlFie.cjs +1 -0
- package/dist/{nl-CRC6r4Q4.js → nl-Dcll9fVA.js} +87 -10
- package/dist/{notice-E_p2hg1G.js → notice-E19wu9lA.js} +51 -51
- package/dist/notice-_9XhdrFw.cjs +1 -0
- package/dist/oneof-branch-detection-J_DYEEcD.js +1077 -0
- package/dist/oneof-branch-detection-ZUBZ6hqy.cjs +1 -0
- package/dist/pl-9UksIrvX.cjs +1 -0
- package/dist/{pl-C6qNs0Lq.js → pl-Dm9N9Gbr.js} +84 -7
- package/dist/prosemirror/index.cjs.js +3 -1
- package/dist/prosemirror/index.es.js +636 -4
- package/dist/{pt-CcWPLqBh.js → pt-CFi5cn0k.js} +89 -12
- package/dist/pt-_kfdzwqi.cjs +1 -0
- package/dist/{ru-Dt9-9m0E.js → ru-CEhZUw8R.js} +92 -15
- package/dist/ru-CW1WNNlr.cjs +1 -0
- package/dist/stack-BLMteGTn.js +15 -0
- package/dist/stack-dwLevGa2.cjs +1 -0
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +2 -2
- package/dist/tailwind/vite-plugin.cjs.js +1 -1
- package/dist/tailwind/vite-plugin.es.js +1 -1
- package/dist/text-input-DfqXolVe.js +55 -0
- package/dist/text-input-X_q01NsY.cjs +1 -0
- package/dist/toolbar-DY0ax2Qd.js +130 -0
- package/dist/toolbar-DoKdYXIL.cjs +1 -0
- package/dist/tr-B6GIRegf.cjs +1 -0
- package/dist/{tr-CDTWeRY0.js → tr-ZmnVDhLP.js} +83 -6
- package/dist/{translations-NBY7SubC.js → translations-A4kR7CW8.js} +1 -1
- package/dist/{translations-CiBhB2FV.js → translations-B1_yyDUK.js} +185 -106
- package/dist/{translations-BdCtLBZt.cjs → translations-C81buKAw.cjs} +1 -1
- package/dist/translations-Dbx7L7Q1.cjs +1 -0
- package/dist/types/beatui-i18n/default.d.ts +72 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +72 -0
- package/dist/types/beatui-i18n/translations.d.ts +72 -0
- package/dist/types/codehighlight/code-highlight.d.ts +21 -0
- package/dist/types/codehighlight/index.d.ts +14 -0
- package/dist/types/components/button/toggle-button.d.ts +4 -4
- package/dist/types/components/data/avatar.d.ts +3 -1
- package/dist/types/components/data/badge.d.ts +10 -18
- package/dist/types/components/data/column-filter-panel.d.ts +31 -0
- package/dist/types/components/data/column-filter.d.ts +110 -0
- package/dist/types/components/data/column-header-menu.d.ts +42 -0
- package/dist/types/components/data/data-source.d.ts +190 -0
- package/dist/types/components/data/data-table-body.d.ts +12 -0
- package/dist/types/components/data/data-table-column-toggle.d.ts +4 -0
- package/dist/types/components/data/data-table-context.d.ts +53 -0
- package/dist/types/components/data/data-table-header.d.ts +6 -0
- package/dist/types/components/data/data-table-resolve.d.ts +26 -0
- package/dist/types/components/data/data-table-types.d.ts +201 -0
- package/dist/types/components/data/data-table.d.ts +38 -0
- package/dist/types/components/data/data-toolbar.d.ts +44 -0
- package/dist/types/components/data/date-picker-shared.d.ts +55 -0
- package/dist/types/components/data/date-picker.d.ts +58 -0
- package/dist/types/components/data/date-range-picker.d.ts +56 -0
- package/dist/types/components/data/filter.d.ts +268 -0
- package/dist/types/components/data/index.d.ts +13 -4
- package/dist/types/components/data/indicator.d.ts +41 -0
- package/dist/types/components/data/progress-bar.d.ts +2 -2
- package/dist/types/components/data/selection-checkbox.d.ts +63 -0
- package/dist/types/components/data/skeleton.d.ts +1 -1
- package/dist/types/components/data/sortable-header.d.ts +55 -0
- package/dist/types/components/data/unstyled-drop-zone.d.ts +2 -2
- package/dist/types/components/form/control/control.d.ts +9 -9
- package/dist/types/components/form/input/advanced-slider.d.ts +6 -6
- package/dist/types/components/form/input/appearance-selector.d.ts +9 -2
- package/dist/types/components/form/input/checkbox-input.d.ts +6 -7
- package/dist/types/components/form/input/color-input.d.ts +1 -1
- package/dist/types/components/form/input/color-swatch-input.d.ts +3 -3
- package/dist/types/components/form/input/combobox-input.d.ts +5 -5
- package/dist/types/components/form/input/combobox-tags-input.d.ts +5 -5
- package/dist/types/components/form/input/create-nullable-string-input.d.ts +2 -2
- package/dist/types/components/form/input/date-input.d.ts +4 -4
- package/dist/types/components/form/input/dropdown-input.d.ts +5 -5
- package/dist/types/components/form/input/editable-text.d.ts +2 -2
- package/dist/types/components/form/input/email-input.d.ts +4 -4
- package/dist/types/components/form/input/index.d.ts +1 -0
- package/dist/types/components/form/input/input-container.d.ts +1 -1
- package/dist/types/components/form/input/input-options.d.ts +28 -1
- package/dist/types/components/form/input/mask-input.d.ts +8 -2
- package/dist/types/components/form/input/native-select.d.ts +3 -3
- package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
- package/dist/types/components/form/input/nullable-email-input.d.ts +3 -3
- package/dist/types/components/form/input/nullable-rating-input.d.ts +8 -8
- package/dist/types/components/form/input/nullable-uuid-input.d.ts +4 -4
- package/dist/types/components/form/input/number-input.d.ts +3 -3
- package/dist/types/components/form/input/otp-input.d.ts +12 -12
- package/dist/types/components/form/input/rating-input.d.ts +7 -8
- package/dist/types/components/form/input/select-tags-input.d.ts +5 -5
- package/dist/types/components/form/input/switch.d.ts +2 -2
- package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +82 -0
- package/dist/types/components/form/input/uuid-input.d.ts +2 -2
- package/dist/types/components/json-structure/controls/uuid-control.d.ts +1 -1
- package/dist/types/components/layout/card.d.ts +66 -0
- package/dist/types/components/layout/collapse.d.ts +2 -2
- package/dist/types/components/layout/flex.d.ts +26 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/lexical/floating/slash-command-palette.d.ts +2 -2
- package/dist/types/components/lexical/toolbar/toolbar-registry.d.ts +2 -1
- package/dist/types/components/media/pdf-page-viewer.d.ts +8 -5
- package/dist/types/components/misc/index.d.ts +1 -0
- package/dist/types/components/misc/loading-overlay.d.ts +29 -0
- package/dist/types/components/misc/notice.d.ts +4 -4
- package/dist/types/components/misc/notification-provider.d.ts +9 -3
- package/dist/types/components/misc/notification.d.ts +9 -9
- package/dist/types/components/navigation/breadcrumbs.d.ts +1 -1
- package/dist/types/components/navigation/menu.d.ts +6 -6
- package/dist/types/components/navigation/pagination.d.ts +17 -4
- package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +2 -2
- package/dist/types/components/navigation/tabs/tabs.d.ts +17 -8
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +12 -6
- package/dist/types/components/overlay/announcement-bar.d.ts +12 -4
- package/dist/types/components/overlay/dialogs.d.ts +2 -2
- package/dist/types/components/overlay/modal.d.ts +9 -2
- package/dist/types/components/overlay/tooltip.d.ts +6 -6
- package/dist/types/components/theme/types.d.ts +15 -4
- package/dist/types/lexical/index.d.ts +2 -2
- package/dist/types/lexical/plugins/index.d.ts +1 -1
- package/dist/types/lexical/plugins/slash-commands.d.ts +1 -1
- package/dist/types/lexical/plugins/text.d.ts +5 -0
- package/dist/types/lexical/types.d.ts +126 -5
- package/dist/types/lexical-i18n/default.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ar.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/de.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/en.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/es.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/fa.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/fr.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/he.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/hi.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/it.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ja.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ko.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/nl.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/pl.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/pt.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ru.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/tr.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ur.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/vi.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/zh.d.ts +1 -0
- package/dist/types/tokens/z-index.d.ts +18 -18
- package/dist/types/utils/use-animated-toggle.d.ts +12 -4
- package/dist/ur-CtFl_tz6.cjs +1 -0
- package/dist/{ur-CLrK5FPQ.js → ur-yYgj3NmT.js} +88 -11
- package/dist/use-animated-toggle-C3asw_Sg.js +207 -0
- package/dist/use-animated-toggle-cKcuItmz.cjs +1 -0
- package/dist/use-form-CaW192gw.cjs +2 -0
- package/dist/{use-form-BQRVnIp9.js → use-form-Dn6v2tEh.js} +153 -152
- package/dist/utils-DmEuG3Np.cjs +1 -0
- package/dist/utils-vUtP6iPG.js +165 -0
- package/dist/{vi-B1_QDUQJ.js → vi-D5u4CLQO.js} +89 -12
- package/dist/vi-DyCZSpsk.cjs +1 -0
- package/dist/widget-customization-DgW1SXN6.cjs +1 -0
- package/dist/{widget-customization-C-fSx3RB.js → widget-customization-Dkx7kNSe.js} +413 -398
- package/dist/{zh-rDtQ92Pp.js → zh-B0kwMMer.js} +91 -14
- package/dist/zh-C3ZxMQKb.cjs +1 -0
- package/package.json +209 -38
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/ar-D2DjoXta.cjs +0 -1
- package/dist/auth-divider-C3E16pml.cjs +0 -1
- package/dist/colors-BI0YhONJ.cjs +0 -1
- package/dist/de-Cdf3432J.cjs +0 -1
- package/dist/deep-merge-Blrucd-E.cjs +0 -1
- package/dist/es-6fFPkKHL.cjs +0 -1
- package/dist/fa-GXyNzAXz.cjs +0 -1
- package/dist/fr-C6EYTwSH.cjs +0 -1
- package/dist/he-CJUgxvi8.cjs +0 -1
- package/dist/hi-DqIR4VtX.cjs +0 -1
- package/dist/hls.light.min-C6xKDzRR.cjs +0 -27
- package/dist/hls.light.min-hEMf_E8u.js +0 -8311
- package/dist/index-1JaBwDB-.js +0 -921
- package/dist/index-B-cwxUsP.cjs +0 -1
- package/dist/index-BFzxpY7y.js +0 -68
- package/dist/index-BOC0cVoY.cjs +0 -36
- package/dist/index-CN10Cyqr.cjs +0 -1
- package/dist/index-CTcbhnPw.cjs +0 -4
- package/dist/index-DF7RFzD9.cjs +0 -1
- package/dist/index-DJ9YIJcG.js +0 -14308
- package/dist/index-DfPkCwdC.js +0 -2709
- package/dist/input-container-9r1F3KuX.js +0 -263
- package/dist/input-container-DiYEl_y8.cjs +0 -1
- package/dist/it-BvHsJ7fH.cjs +0 -1
- package/dist/ja-B2gP7OHY.cjs +0 -1
- package/dist/ko-BddhddIA.cjs +0 -1
- package/dist/menu-De_-sGeb.cjs +0 -1
- package/dist/modal-DUlqGUW7.cjs +0 -1
- package/dist/nl-COrtZUnH.cjs +0 -1
- package/dist/notice-DAVOTnfA.cjs +0 -1
- package/dist/oneof-branch-detection-D6Xa8qNR.cjs +0 -8
- package/dist/oneof-branch-detection-DCPwyutI.js +0 -6290
- package/dist/pl-BHI4zBgV.cjs +0 -1
- package/dist/pt-BGzC9MhU.cjs +0 -1
- package/dist/ru-CXeFbIPb.cjs +0 -1
- package/dist/stack-4VUGISn6.cjs +0 -1
- package/dist/stack-Bm-UZosx.js +0 -879
- package/dist/string-B9vVyfq3.cjs +0 -1
- package/dist/string-DYyMxBl-.js +0 -19
- package/dist/text-input-BgPx8BbG.js +0 -45
- package/dist/text-input-DUnhBUd6.cjs +0 -1
- package/dist/timer-BJHOsuS6.cjs +0 -1
- package/dist/timer-Rd2sKnvH.js +0 -65
- package/dist/toolbar-DKOh_gbA.js +0 -118
- package/dist/toolbar-Dkc2y1dI.cjs +0 -1
- package/dist/tr-CdOtQAtA.cjs +0 -1
- package/dist/translations-Cy9hoMGV.cjs +0 -1
- package/dist/types/components/data/calendar-shared.d.ts +0 -59
- package/dist/types/components/data/calendar.d.ts +0 -107
- package/dist/types/components/data/icon-badge.d.ts +0 -14
- package/dist/types/components/data/range-calendar.d.ts +0 -104
- package/dist/types/components/data/tag.d.ts +0 -51
- package/dist/ur-C7itXvnC.cjs +0 -1
- package/dist/use-animated-toggle-C7PTmnZi.js +0 -195
- package/dist/use-animated-toggle-DrqK7nUS.cjs +0 -1
- package/dist/use-form-DTyNw0kM.cjs +0 -2
- package/dist/utils-DEbsp9Q9.js +0 -129
- package/dist/utils-DIUEhA-Z.cjs +0 -1
- package/dist/vi-CQrUWB3y.cjs +0 -1
- package/dist/widget-customization-xEBfEPhQ.cjs +0 -1
- package/dist/zh-DWswYYTS.cjs +0 -1
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { Task as ye, Use as O, Value as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
let pe = null;
|
|
1
|
+
import { Task as ye, Use as O, Value as f, prop as ae, html as g, attr as l, on as C, WithElement as te, Empty as M, aria as J, bind as ie, OnDispose as ne, coalesce as Ne, ForEach as ee, Fragment as N, Ensure as Pe, OneOfType as je, computedOf as A, input as se, emitValue as P, emitValueAsNumber as we, style as _e, When as U, NotEmpty as We, Repeat as Ze, signal as ke } from "@tempots/dom";
|
|
2
|
+
import { I as W, a as He, B as be } from "./input-container-BvEcp7FU.js";
|
|
3
|
+
import { C as q, m as qe } from "./text-input-DfqXolVe.js";
|
|
4
|
+
import { I as Ae, m as Ye, c as Ge, C as oe, d as pe, e as Ce } from "./use-form-Dn6v2tEh.js";
|
|
5
|
+
import { B as F, d as ce, I as E, b as De, f as Ie } from "./translations-B1_yyDUK.js";
|
|
6
|
+
import { S as Le } from "./stack-BLMteGTn.js";
|
|
7
|
+
import { objectEntries as Je, delayedAnimationFrame as Xe, strictEqual as K } from "@tempots/std";
|
|
8
|
+
import { ElementRect as Qe } from "@tempots/ui";
|
|
9
|
+
let fe = null;
|
|
11
10
|
async function he() {
|
|
12
11
|
const t = globalThis;
|
|
13
|
-
return t.Temporal ? t.Temporal : (
|
|
12
|
+
return t.Temporal ? t.Temporal : (fe || (fe = import("./index.esm-By0m3ki1.js").then((e) => {
|
|
14
13
|
const n = e.Temporal;
|
|
15
14
|
return t.Temporal || (t.Temporal = n), n;
|
|
16
|
-
})),
|
|
15
|
+
})), fe);
|
|
17
16
|
}
|
|
18
17
|
const Ke = (t, e) => e ? ye(he, {
|
|
19
18
|
then: t,
|
|
@@ -29,17 +28,17 @@ function de({
|
|
|
29
28
|
disabled: h = !1,
|
|
30
29
|
allowMultiple: o
|
|
31
30
|
}) {
|
|
32
|
-
return O(F, (
|
|
33
|
-
const b =
|
|
31
|
+
return O(F, (d) => {
|
|
32
|
+
const b = f.deriveProp(e ?? []), w = ae(!1), p = (a) => {
|
|
34
33
|
a.preventDefault(), a.stopPropagation(), w.value = !0;
|
|
35
|
-
},
|
|
34
|
+
}, m = (a) => {
|
|
36
35
|
a.preventDefault(), a.stopPropagation(), (!a.currentTarget || !a.currentTarget.contains(a.relatedTarget)) && (w.value = !1);
|
|
37
|
-
},
|
|
36
|
+
}, v = (a) => {
|
|
38
37
|
a.preventDefault(), a.stopPropagation(), w.value = !1;
|
|
39
|
-
const
|
|
40
|
-
|
|
38
|
+
const x = Array.from(a.dataTransfer?.files || []);
|
|
39
|
+
x.length > 0 && (b.value = x, t(x, "dragdrop"));
|
|
41
40
|
}, i = (a) => {
|
|
42
|
-
|
|
41
|
+
f.get(s) && a.currentTarget.querySelector(
|
|
43
42
|
'input[type="file"]'
|
|
44
43
|
)?.click();
|
|
45
44
|
};
|
|
@@ -49,17 +48,17 @@ function de({
|
|
|
49
48
|
const a = Array.from(u.files ?? []);
|
|
50
49
|
a.length > 0 && (b.value = a, t(a, "click")), u.value = "";
|
|
51
50
|
}, S = (a) => {
|
|
52
|
-
|
|
51
|
+
f.get(s) && (a.key === "Enter" || a.key === " ") && (a.preventDefault(), i(a));
|
|
53
52
|
};
|
|
54
53
|
return g.div(
|
|
55
54
|
l.role("button"),
|
|
56
55
|
l.tabindex(
|
|
57
|
-
|
|
56
|
+
f.map(s, (a) => a ? 0 : -1)
|
|
58
57
|
),
|
|
59
58
|
l.style("position: relative;"),
|
|
60
|
-
C.dragover(
|
|
61
|
-
C.dragleave(
|
|
62
|
-
C.drop(
|
|
59
|
+
C.dragover(p),
|
|
60
|
+
C.dragleave(m),
|
|
61
|
+
C.drop(v),
|
|
63
62
|
C.click(i),
|
|
64
63
|
C.keydown(S),
|
|
65
64
|
// Hidden file input
|
|
@@ -72,16 +71,16 @@ function de({
|
|
|
72
71
|
"position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
|
|
73
72
|
),
|
|
74
73
|
C.change(D),
|
|
75
|
-
te((a) => (u = a, b.on((
|
|
74
|
+
te((a) => (u = a, b.on((x) => {
|
|
76
75
|
const $ = globalThis.DataTransfer;
|
|
77
76
|
if ($ != null) {
|
|
78
77
|
const I = new $();
|
|
79
|
-
|
|
78
|
+
x.forEach((V) => I.items.add(V)), a.files = I.files;
|
|
80
79
|
}
|
|
81
80
|
}), M))
|
|
82
81
|
),
|
|
83
82
|
// Screen reader instructions
|
|
84
|
-
J.label(ie(
|
|
83
|
+
J.label(ie(d.$.dropZoneInstructions)(s)),
|
|
85
84
|
// Content
|
|
86
85
|
r({
|
|
87
86
|
files: b,
|
|
@@ -91,19 +90,249 @@ function de({
|
|
|
91
90
|
);
|
|
92
91
|
});
|
|
93
92
|
}
|
|
94
|
-
|
|
93
|
+
const ge = "$$tts-exp-", et = (t, e) => te((n) => {
|
|
94
|
+
const s = `${ge}${t}`;
|
|
95
|
+
return ne(f.on(e, (r) => Reflect.set(n, s, r)));
|
|
96
|
+
}), $t = (t, e) => {
|
|
97
|
+
const n = `${ge}${t}`;
|
|
98
|
+
return (s) => {
|
|
99
|
+
e(Reflect.get(s.target, n));
|
|
100
|
+
};
|
|
101
|
+
}, $e = (t, e) => {
|
|
102
|
+
const n = `${ge}${t}`;
|
|
103
|
+
return (s) => {
|
|
104
|
+
const r = s.target, h = r.selectedIndex, o = r.options[h];
|
|
105
|
+
e(Reflect.get(o, n));
|
|
106
|
+
};
|
|
107
|
+
}, Ue = (t, e, n) => Pe(
|
|
108
|
+
t,
|
|
109
|
+
(s) => je(s, {
|
|
110
|
+
value: (r) => {
|
|
111
|
+
const h = A(
|
|
112
|
+
r,
|
|
113
|
+
n
|
|
114
|
+
)((o, d) => e(o.value, d));
|
|
115
|
+
return g.option(
|
|
116
|
+
l.selected(h),
|
|
117
|
+
et("value", r.$.value),
|
|
118
|
+
r.$.label
|
|
119
|
+
);
|
|
120
|
+
},
|
|
121
|
+
group: (r) => g.optgroup(
|
|
122
|
+
l.label(r.$.group),
|
|
123
|
+
ee(
|
|
124
|
+
r.$.options,
|
|
125
|
+
(h) => Ue(
|
|
126
|
+
h,
|
|
127
|
+
e,
|
|
128
|
+
n
|
|
129
|
+
)
|
|
130
|
+
)
|
|
131
|
+
),
|
|
132
|
+
break: () => g.hr()
|
|
133
|
+
})
|
|
134
|
+
), tt = (t) => {
|
|
135
|
+
const {
|
|
136
|
+
value: e,
|
|
137
|
+
onBlur: n,
|
|
138
|
+
onChange: s,
|
|
139
|
+
onInput: r,
|
|
140
|
+
options: h,
|
|
141
|
+
unselectedLabel: o,
|
|
142
|
+
equality: d = (p, m) => p === m,
|
|
143
|
+
after: b
|
|
144
|
+
} = t;
|
|
145
|
+
let w;
|
|
146
|
+
return W(
|
|
147
|
+
{
|
|
148
|
+
...t,
|
|
149
|
+
after: N(
|
|
150
|
+
He({
|
|
151
|
+
icon: "ph:caret-down-bold",
|
|
152
|
+
color: "neutral",
|
|
153
|
+
size: "sm"
|
|
154
|
+
}),
|
|
155
|
+
b
|
|
156
|
+
),
|
|
157
|
+
input: g.select(
|
|
158
|
+
te((p) => {
|
|
159
|
+
w = p;
|
|
160
|
+
const m = new MutationObserver((v) => {
|
|
161
|
+
const { removedNodes: i } = v[0];
|
|
162
|
+
i.length > 0 && (w.selectedIndex = 0);
|
|
163
|
+
});
|
|
164
|
+
return m.observe(p, { childList: !0 }), ne(() => m.disconnect());
|
|
165
|
+
}),
|
|
166
|
+
q(t),
|
|
167
|
+
l.class("bc-native-select bc-input"),
|
|
168
|
+
O(
|
|
169
|
+
F,
|
|
170
|
+
(p) => g.option(
|
|
171
|
+
l.hidden("hidden"),
|
|
172
|
+
Ne(o, p.$.selectOne)
|
|
173
|
+
)
|
|
174
|
+
),
|
|
175
|
+
ee(h, (p) => Ue(p, d, e)),
|
|
176
|
+
n != null ? C.blur(n) : M,
|
|
177
|
+
s != null ? C.change($e("value", (p) => s(p))) : M,
|
|
178
|
+
r != null ? C.input($e("value", (p) => r(p))) : M
|
|
179
|
+
)
|
|
180
|
+
},
|
|
181
|
+
C.click(() => {
|
|
182
|
+
if (w?.focus(), typeof w?.showPicker == "function")
|
|
183
|
+
try {
|
|
184
|
+
w.showPicker();
|
|
185
|
+
} catch {
|
|
186
|
+
}
|
|
187
|
+
})
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
function nt(t) {
|
|
191
|
+
const { controller: e, onChange: n, onBlur: s, ...r } = t;
|
|
192
|
+
return tt({
|
|
193
|
+
...r,
|
|
194
|
+
value: e.signal,
|
|
195
|
+
onChange: Ge(e, n),
|
|
196
|
+
onBlur: Ye(e, s)
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function Mt(t) {
|
|
200
|
+
return Ae({
|
|
201
|
+
...t,
|
|
202
|
+
content: nt(t)
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
function Ee(t, e, n) {
|
|
206
|
+
const s = f.map(t, (o) => o != null), r = A(
|
|
207
|
+
s,
|
|
208
|
+
e ?? !1
|
|
209
|
+
)((o, d) => !o || d), h = ce.clearValue;
|
|
210
|
+
return g.button(
|
|
211
|
+
l.type("button"),
|
|
212
|
+
l.class("bc-input-container__reset"),
|
|
213
|
+
J.label(h),
|
|
214
|
+
l.title(h),
|
|
215
|
+
l.disabled(r),
|
|
216
|
+
E({ icon: "mdi:close", size: "sm" }),
|
|
217
|
+
C.click((o) => {
|
|
218
|
+
o.stopPropagation(), n?.(null);
|
|
219
|
+
})
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
function Me(...t) {
|
|
223
|
+
return g.div(l.class("bc-group"), ...t);
|
|
224
|
+
}
|
|
225
|
+
function st(t) {
|
|
226
|
+
const e = String(t), n = e.indexOf(".");
|
|
227
|
+
return n === -1 ? 0 : e.length - n - 1;
|
|
228
|
+
}
|
|
229
|
+
function G(t, e) {
|
|
230
|
+
const n = st(e);
|
|
231
|
+
if (n === 0) return Math.round(t);
|
|
232
|
+
const s = Math.pow(10, n);
|
|
233
|
+
return Math.round(t * s) / s;
|
|
234
|
+
}
|
|
235
|
+
const St = (t) => {
|
|
236
|
+
const { value: e, step: n, min: s, max: r, onBlur: h, onChange: o, onInput: d, after: b } = t, w = (v) => {
|
|
237
|
+
const i = s != null ? f.get(s) : void 0, u = r != null ? f.get(r) : void 0;
|
|
238
|
+
return i != null && v < i ? i : u != null && v > u ? u : v;
|
|
239
|
+
}, p = n != null ? O(F, (v) => {
|
|
240
|
+
const i = A(
|
|
241
|
+
e,
|
|
242
|
+
s
|
|
243
|
+
)((a, x) => x == null ? !0 : (a ?? 0) > x), u = A(
|
|
244
|
+
e,
|
|
245
|
+
r
|
|
246
|
+
)((a, x) => x == null ? !0 : (a ?? 0) < x), D = (a) => {
|
|
247
|
+
const x = f.get(e) ?? 0, $ = f.get(n), I = a?.shiftKey ? 10 : 1, V = G(
|
|
248
|
+
x - $ * I,
|
|
249
|
+
$
|
|
250
|
+
), k = s != null ? f.get(s) : void 0;
|
|
251
|
+
if (k != null && V < k)
|
|
252
|
+
return;
|
|
253
|
+
const c = w(V);
|
|
254
|
+
c !== x && (o?.(c), d?.(c));
|
|
255
|
+
}, S = (a) => {
|
|
256
|
+
const x = f.get(e) ?? 0, $ = f.get(n), I = a?.shiftKey ? 10 : 1, V = G(
|
|
257
|
+
x + $ * I,
|
|
258
|
+
$
|
|
259
|
+
), k = r != null ? f.get(r) : void 0;
|
|
260
|
+
if (k != null && V > k)
|
|
261
|
+
return;
|
|
262
|
+
const c = w(V);
|
|
263
|
+
c !== x && (o?.(c), d?.(c));
|
|
264
|
+
};
|
|
265
|
+
return Le(
|
|
266
|
+
l.class("bc-number-input-steppers"),
|
|
267
|
+
// Increment second
|
|
268
|
+
g.button(
|
|
269
|
+
l.type("button"),
|
|
270
|
+
l.class(
|
|
271
|
+
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
272
|
+
),
|
|
273
|
+
l.disabled(
|
|
274
|
+
A(
|
|
275
|
+
u,
|
|
276
|
+
t.disabled ?? !1
|
|
277
|
+
)((a, x) => !a || x)
|
|
278
|
+
),
|
|
279
|
+
C.click((a) => S(a)),
|
|
280
|
+
J.label(v.$.incrementValue),
|
|
281
|
+
E({ icon: "line-md:plus", size: "xs" })
|
|
282
|
+
),
|
|
283
|
+
// Decrement first (matches tests expecting first button to be decrement)
|
|
284
|
+
g.button(
|
|
285
|
+
l.type("button"),
|
|
286
|
+
l.class(
|
|
287
|
+
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
288
|
+
),
|
|
289
|
+
l.disabled(
|
|
290
|
+
A(
|
|
291
|
+
i,
|
|
292
|
+
t.disabled ?? !1
|
|
293
|
+
)((a, x) => !a || x)
|
|
294
|
+
),
|
|
295
|
+
C.click((a) => D(a)),
|
|
296
|
+
J.label(v.$.decrementValue),
|
|
297
|
+
E({ icon: "line-md:minus", size: "xs" })
|
|
298
|
+
)
|
|
299
|
+
);
|
|
300
|
+
}) : null, m = b != null && p != null ? N(p, b) : b ?? p;
|
|
301
|
+
return W({
|
|
302
|
+
...t,
|
|
303
|
+
input: se.number(
|
|
304
|
+
s != null ? l.min(s) : M,
|
|
305
|
+
r != null ? l.max(r) : M,
|
|
306
|
+
q(t),
|
|
307
|
+
l.valueAsNumber(e),
|
|
308
|
+
l.step(n),
|
|
309
|
+
l.class("bc-input bc-number-input"),
|
|
310
|
+
h != null ? C.blur(P(h)) : M,
|
|
311
|
+
o != null ? C.change(we(o)) : M,
|
|
312
|
+
d != null ? C.input(we(d)) : M,
|
|
313
|
+
// Add wheel event support when step is defined
|
|
314
|
+
n != null ? C.wheel((v) => {
|
|
315
|
+
v.preventDefault();
|
|
316
|
+
const i = f.get(e) ?? 0, u = f.get(n), D = v.shiftKey ? 10 : 1, S = v.deltaY < 0 ? u * D : -u * D, a = w(G(i + S, u));
|
|
317
|
+
a !== i && (o?.(a), d?.(a));
|
|
318
|
+
}) : M
|
|
319
|
+
),
|
|
320
|
+
after: m
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
function lt(t, e) {
|
|
95
324
|
return t.length === e.length && t.every((n, s) => n === e[s]);
|
|
96
325
|
}
|
|
97
|
-
function
|
|
326
|
+
function rt(t, e, n) {
|
|
98
327
|
const s = ["bc-segmented-input", `bc-segmented-input--size-${t}`];
|
|
99
328
|
return n === "squared" && s.push("bc-segmented-input--squared"), e && s.push("bc-segmented-input--disabled"), s.join(" ");
|
|
100
329
|
}
|
|
101
|
-
function
|
|
330
|
+
function it(t) {
|
|
102
331
|
if (t == null) return "";
|
|
103
|
-
const e = /* @__PURE__ */ new Map(), n =
|
|
332
|
+
const e = /* @__PURE__ */ new Map(), n = De(t, "solid", "light"), s = De(t, "solid", "dark");
|
|
104
333
|
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
334
|
}
|
|
106
|
-
function
|
|
335
|
+
function Tt({
|
|
107
336
|
options: t,
|
|
108
337
|
value: e,
|
|
109
338
|
onChange: n,
|
|
@@ -111,100 +340,100 @@ function Mt({
|
|
|
111
340
|
disabled: r = !1,
|
|
112
341
|
variant: h = "pill",
|
|
113
342
|
color: o
|
|
114
|
-
}, ...
|
|
115
|
-
const b =
|
|
343
|
+
}, ...d) {
|
|
344
|
+
const b = Je(t).map(([w, p]) => ({
|
|
116
345
|
key: w,
|
|
117
|
-
label:
|
|
346
|
+
label: p
|
|
118
347
|
}));
|
|
119
348
|
return te(() => {
|
|
120
349
|
const w = Object.fromEntries(
|
|
121
|
-
b.map((
|
|
122
|
-
),
|
|
350
|
+
b.map((m, v) => [m.key, v])
|
|
351
|
+
), p = ae(
|
|
123
352
|
b.map(() => ({ left: 0, width: 0 })),
|
|
124
|
-
|
|
353
|
+
lt
|
|
125
354
|
);
|
|
126
355
|
return g.div(
|
|
127
356
|
l.class(
|
|
128
|
-
|
|
357
|
+
A(
|
|
129
358
|
s,
|
|
130
359
|
r,
|
|
131
360
|
h
|
|
132
361
|
)(
|
|
133
|
-
(
|
|
134
|
-
|
|
135
|
-
|
|
362
|
+
(m, v, i) => rt(
|
|
363
|
+
m ?? "md",
|
|
364
|
+
v ?? !1,
|
|
136
365
|
i ?? "pill"
|
|
137
366
|
)
|
|
138
367
|
)
|
|
139
368
|
),
|
|
140
369
|
l.style(
|
|
141
|
-
o != null ?
|
|
370
|
+
o != null ? f.map(o, (m) => it(m)) : ""
|
|
142
371
|
),
|
|
143
372
|
g.div(
|
|
144
373
|
l.class("bc-segmented-input__container"),
|
|
145
374
|
g.div(
|
|
146
375
|
l.class("bc-segmented-input__indicator"),
|
|
147
|
-
|
|
148
|
-
|
|
376
|
+
_e.width(
|
|
377
|
+
A(
|
|
149
378
|
e,
|
|
150
|
-
|
|
151
|
-
)((
|
|
152
|
-
const { width: i } =
|
|
379
|
+
p
|
|
380
|
+
)((m, v) => {
|
|
381
|
+
const { width: i } = v[w[m] ?? 0];
|
|
153
382
|
return `${i}px`;
|
|
154
383
|
})
|
|
155
384
|
),
|
|
156
|
-
|
|
157
|
-
|
|
385
|
+
_e.left(
|
|
386
|
+
A(
|
|
158
387
|
e,
|
|
159
|
-
|
|
160
|
-
)((
|
|
161
|
-
const { left: i } =
|
|
388
|
+
p
|
|
389
|
+
)((m, v) => {
|
|
390
|
+
const { left: i } = v[w[m] ?? 0];
|
|
162
391
|
return `${i}px`;
|
|
163
392
|
})
|
|
164
393
|
)
|
|
165
394
|
),
|
|
166
395
|
// clickable buttons
|
|
167
|
-
b.map(({ label:
|
|
396
|
+
b.map(({ label: m, key: v }, i) => g.button(
|
|
168
397
|
l.type("button"),
|
|
169
398
|
C.click((u) => {
|
|
170
|
-
u.preventDefault(),
|
|
399
|
+
u.preventDefault(), f.get(r) || n?.(v);
|
|
171
400
|
}),
|
|
172
401
|
l.disabled(r),
|
|
173
402
|
l.class("bc-segmented-input__segment"),
|
|
174
403
|
l.class(
|
|
175
|
-
|
|
404
|
+
f.map(e, (u) => u === v ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
|
|
176
405
|
),
|
|
177
|
-
|
|
406
|
+
Qe((u) => {
|
|
178
407
|
function D() {
|
|
179
|
-
|
|
180
|
-
const
|
|
181
|
-
return
|
|
408
|
+
p.update((a) => {
|
|
409
|
+
const x = [...a];
|
|
410
|
+
return x[i] = {
|
|
182
411
|
width: u.value.width,
|
|
183
412
|
left: u.value.localLeft
|
|
184
|
-
},
|
|
413
|
+
}, x;
|
|
185
414
|
});
|
|
186
415
|
}
|
|
187
|
-
const S =
|
|
416
|
+
const S = Xe(D);
|
|
188
417
|
return ne(S, u.on(D));
|
|
189
418
|
}),
|
|
190
|
-
|
|
419
|
+
m
|
|
191
420
|
))
|
|
192
421
|
),
|
|
193
|
-
...
|
|
422
|
+
...d
|
|
194
423
|
);
|
|
195
424
|
});
|
|
196
425
|
}
|
|
197
|
-
function
|
|
426
|
+
function ot(t) {
|
|
198
427
|
const e = t.type.toLowerCase();
|
|
199
428
|
return e.startsWith("image/") && (e.includes("jpeg") || e.includes("jpg") || e.includes("png") || e.includes("gif") || e.includes("webp") || e.includes("svg"));
|
|
200
429
|
}
|
|
201
|
-
function
|
|
430
|
+
function ct(t) {
|
|
202
431
|
const e = t.type.toLowerCase();
|
|
203
432
|
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
433
|
}
|
|
205
434
|
function me(t) {
|
|
206
435
|
return U(
|
|
207
|
-
t.map(
|
|
436
|
+
t.map(ot),
|
|
208
437
|
() => {
|
|
209
438
|
const e = ae(null);
|
|
210
439
|
return t.on((n) => {
|
|
@@ -223,37 +452,37 @@ function me(t) {
|
|
|
223
452
|
)
|
|
224
453
|
);
|
|
225
454
|
},
|
|
226
|
-
() => E({ icon: t.map(
|
|
455
|
+
() => E({ icon: t.map(ct) })
|
|
227
456
|
);
|
|
228
457
|
}
|
|
229
|
-
const
|
|
458
|
+
const zt = (t, ...e) => {
|
|
230
459
|
const {
|
|
231
460
|
value: n = ae([]),
|
|
232
461
|
accept: s = "*/*",
|
|
233
462
|
maxFiles: r,
|
|
234
463
|
maxFileSize: h,
|
|
235
464
|
onChange: o,
|
|
236
|
-
onBlur:
|
|
465
|
+
onBlur: d,
|
|
237
466
|
disabled: b,
|
|
238
467
|
hasError: w,
|
|
239
|
-
mode:
|
|
240
|
-
showFileList:
|
|
241
|
-
...
|
|
242
|
-
} = t, i = n, u =
|
|
468
|
+
mode: p = "default",
|
|
469
|
+
showFileList: m = !0,
|
|
470
|
+
...v
|
|
471
|
+
} = t, i = n, u = f.map(p, (k) => k === "input"), D = f.map(p, (k) => k === "compact"), S = (k) => {
|
|
243
472
|
let c = k;
|
|
244
473
|
if (r != null) {
|
|
245
|
-
const y =
|
|
474
|
+
const y = f.get(r);
|
|
246
475
|
c = c.slice(0, y);
|
|
247
476
|
}
|
|
248
477
|
if (h) {
|
|
249
|
-
const y =
|
|
478
|
+
const y = f.get(h);
|
|
250
479
|
c = c.filter((T) => T.size <= y);
|
|
251
480
|
}
|
|
252
481
|
o?.(c);
|
|
253
482
|
}, a = (k) => {
|
|
254
483
|
const y = i.value.filter((T, z) => z !== k);
|
|
255
484
|
o?.(y);
|
|
256
|
-
},
|
|
485
|
+
}, x = () => {
|
|
257
486
|
o?.([]);
|
|
258
487
|
}, $ = ({
|
|
259
488
|
files: k,
|
|
@@ -305,12 +534,12 @@ const St = (t, ...e) => {
|
|
|
305
534
|
),
|
|
306
535
|
g.div(
|
|
307
536
|
l.class("bc-file-input__compact-file-meta"),
|
|
308
|
-
|
|
537
|
+
A(
|
|
309
538
|
y.$.size,
|
|
310
539
|
c.$.fileSizeUnits
|
|
311
|
-
)((_, B) =>
|
|
540
|
+
)((_, B) => Ie(_, { units: B })),
|
|
312
541
|
" • ",
|
|
313
|
-
|
|
542
|
+
A(
|
|
314
543
|
y.$.type,
|
|
315
544
|
c.$.unknownType
|
|
316
545
|
)((_, B) => _ || B)
|
|
@@ -342,7 +571,7 @@ const St = (t, ...e) => {
|
|
|
342
571
|
)
|
|
343
572
|
)
|
|
344
573
|
)
|
|
345
|
-
),
|
|
574
|
+
), V = ({
|
|
346
575
|
files: k
|
|
347
576
|
}) => O(
|
|
348
577
|
F,
|
|
@@ -381,7 +610,7 @@ const St = (t, ...e) => {
|
|
|
381
610
|
F,
|
|
382
611
|
(k) => W(
|
|
383
612
|
{
|
|
384
|
-
baseContainer:
|
|
613
|
+
baseContainer: f.map(u, (c) => !c),
|
|
385
614
|
disabled: b,
|
|
386
615
|
hasError: w,
|
|
387
616
|
after: U(
|
|
@@ -393,13 +622,13 @@ const St = (t, ...e) => {
|
|
|
393
622
|
size: "sm",
|
|
394
623
|
label: k.$.clearAllFiles,
|
|
395
624
|
disabled: b,
|
|
396
|
-
onClick:
|
|
625
|
+
onClick: x
|
|
397
626
|
},
|
|
398
627
|
l.class("bc-file-input__compact-clear")
|
|
399
628
|
)
|
|
400
629
|
)
|
|
401
630
|
),
|
|
402
|
-
...
|
|
631
|
+
...v,
|
|
403
632
|
input: U(
|
|
404
633
|
u,
|
|
405
634
|
() => g.div(
|
|
@@ -408,10 +637,10 @@ const St = (t, ...e) => {
|
|
|
408
637
|
value: i,
|
|
409
638
|
accept: s,
|
|
410
639
|
enableClick: !0,
|
|
411
|
-
allowMultiple:
|
|
640
|
+
allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
|
|
412
641
|
disabled: b,
|
|
413
642
|
onChange: S,
|
|
414
|
-
content:
|
|
643
|
+
content: V
|
|
415
644
|
})
|
|
416
645
|
),
|
|
417
646
|
() => U(
|
|
@@ -422,7 +651,7 @@ const St = (t, ...e) => {
|
|
|
422
651
|
value: i,
|
|
423
652
|
accept: s,
|
|
424
653
|
enableClick: !0,
|
|
425
|
-
allowMultiple:
|
|
654
|
+
allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
|
|
426
655
|
disabled: b,
|
|
427
656
|
onChange: S,
|
|
428
657
|
content: I
|
|
@@ -434,14 +663,14 @@ const St = (t, ...e) => {
|
|
|
434
663
|
value: i,
|
|
435
664
|
accept: s,
|
|
436
665
|
enableClick: !0,
|
|
437
|
-
allowMultiple:
|
|
666
|
+
allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
|
|
438
667
|
disabled: b,
|
|
439
668
|
onChange: S,
|
|
440
669
|
content: $
|
|
441
670
|
}),
|
|
442
671
|
U(
|
|
443
|
-
|
|
444
|
-
() =>
|
|
672
|
+
m,
|
|
673
|
+
() => We(
|
|
445
674
|
i,
|
|
446
675
|
() => N(
|
|
447
676
|
g.div(
|
|
@@ -463,14 +692,14 @@ const St = (t, ...e) => {
|
|
|
463
692
|
),
|
|
464
693
|
g.div(
|
|
465
694
|
l.class("bc-file-input__file-meta"),
|
|
466
|
-
|
|
695
|
+
A(
|
|
467
696
|
c.$.size,
|
|
468
697
|
k.$.fileSizeUnits
|
|
469
698
|
)(
|
|
470
|
-
(z, _) =>
|
|
699
|
+
(z, _) => Ie(z, { units: _ })
|
|
471
700
|
),
|
|
472
701
|
" • ",
|
|
473
|
-
|
|
702
|
+
A(
|
|
474
703
|
c.$.type,
|
|
475
704
|
k.$.unknownType
|
|
476
705
|
)((z, _) => z || _)
|
|
@@ -500,7 +729,7 @@ const St = (t, ...e) => {
|
|
|
500
729
|
l.disabled(b),
|
|
501
730
|
k.$.clearAllFiles,
|
|
502
731
|
C.click((c) => {
|
|
503
|
-
c.preventDefault(), c.stopPropagation(),
|
|
732
|
+
c.preventDefault(), c.stopPropagation(), x();
|
|
504
733
|
})
|
|
505
734
|
)
|
|
506
735
|
)
|
|
@@ -516,140 +745,7 @@ const St = (t, ...e) => {
|
|
|
516
745
|
)
|
|
517
746
|
);
|
|
518
747
|
};
|
|
519
|
-
function
|
|
520
|
-
const s = p.map(t, (o) => o != null), r = V(
|
|
521
|
-
s,
|
|
522
|
-
e ?? !1
|
|
523
|
-
)((o, m) => !o || m), h = ce.clearValue;
|
|
524
|
-
return g.button(
|
|
525
|
-
l.type("button"),
|
|
526
|
-
l.class("bc-input-container__reset"),
|
|
527
|
-
J.label(h),
|
|
528
|
-
l.title(h),
|
|
529
|
-
l.disabled(r),
|
|
530
|
-
E({ icon: "mdi:close", size: "sm" }),
|
|
531
|
-
C.click((o) => {
|
|
532
|
-
o.stopPropagation(), n?.(null);
|
|
533
|
-
})
|
|
534
|
-
);
|
|
535
|
-
}
|
|
536
|
-
const ge = "$$tts-exp-", rt = (t, e) => te((n) => {
|
|
537
|
-
const s = `${ge}${t}`;
|
|
538
|
-
return ne(p.on(e, (r) => Reflect.set(n, s, r)));
|
|
539
|
-
}), Tt = (t, e) => {
|
|
540
|
-
const n = `${ge}${t}`;
|
|
541
|
-
return (s) => {
|
|
542
|
-
e(Reflect.get(s.target, n));
|
|
543
|
-
};
|
|
544
|
-
}, $e = (t, e) => {
|
|
545
|
-
const n = `${ge}${t}`;
|
|
546
|
-
return (s) => {
|
|
547
|
-
const r = s.target, h = r.selectedIndex, o = r.options[h];
|
|
548
|
-
e(Reflect.get(o, n));
|
|
549
|
-
};
|
|
550
|
-
};
|
|
551
|
-
function Me(...t) {
|
|
552
|
-
return g.div(l.class("bc-group"), ...t);
|
|
553
|
-
}
|
|
554
|
-
const Ee = (t, e, n) => je(
|
|
555
|
-
t,
|
|
556
|
-
(s) => We(s, {
|
|
557
|
-
value: (r) => {
|
|
558
|
-
const h = V(
|
|
559
|
-
r,
|
|
560
|
-
n
|
|
561
|
-
)((o, m) => e(o.value, m));
|
|
562
|
-
return g.option(
|
|
563
|
-
l.selected(h),
|
|
564
|
-
rt("value", r.$.value),
|
|
565
|
-
r.$.label
|
|
566
|
-
);
|
|
567
|
-
},
|
|
568
|
-
group: (r) => g.optgroup(
|
|
569
|
-
l.label(r.$.group),
|
|
570
|
-
ee(
|
|
571
|
-
r.$.options,
|
|
572
|
-
(h) => Ee(
|
|
573
|
-
h,
|
|
574
|
-
e,
|
|
575
|
-
n
|
|
576
|
-
)
|
|
577
|
-
)
|
|
578
|
-
),
|
|
579
|
-
break: () => g.hr()
|
|
580
|
-
})
|
|
581
|
-
), it = (t) => {
|
|
582
|
-
const {
|
|
583
|
-
value: e,
|
|
584
|
-
onBlur: n,
|
|
585
|
-
onChange: s,
|
|
586
|
-
onInput: r,
|
|
587
|
-
options: h,
|
|
588
|
-
unselectedLabel: o,
|
|
589
|
-
equality: m = (f, d) => f === d,
|
|
590
|
-
after: b
|
|
591
|
-
} = t;
|
|
592
|
-
let w;
|
|
593
|
-
return W(
|
|
594
|
-
{
|
|
595
|
-
...t,
|
|
596
|
-
after: N(
|
|
597
|
-
Ge({
|
|
598
|
-
icon: "ph:caret-down-bold",
|
|
599
|
-
color: "neutral",
|
|
600
|
-
size: "sm"
|
|
601
|
-
}),
|
|
602
|
-
b
|
|
603
|
-
),
|
|
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);
|
|
610
|
-
});
|
|
611
|
-
return d.observe(f, { childList: !0 }), ne(() => d.disconnect());
|
|
612
|
-
}),
|
|
613
|
-
q(t),
|
|
614
|
-
l.class("bc-native-select bc-input"),
|
|
615
|
-
O(
|
|
616
|
-
F,
|
|
617
|
-
(f) => g.option(
|
|
618
|
-
l.hidden("hidden"),
|
|
619
|
-
Pe(o, f.$.selectOne)
|
|
620
|
-
)
|
|
621
|
-
),
|
|
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
|
|
626
|
-
)
|
|
627
|
-
},
|
|
628
|
-
C.click(() => {
|
|
629
|
-
if (w?.focus(), typeof w?.showPicker == "function")
|
|
630
|
-
try {
|
|
631
|
-
w.showPicker();
|
|
632
|
-
} catch {
|
|
633
|
-
}
|
|
634
|
-
})
|
|
635
|
-
);
|
|
636
|
-
};
|
|
637
|
-
function ot(t) {
|
|
638
|
-
const { controller: e, onChange: n, onBlur: s, ...r } = t;
|
|
639
|
-
return it({
|
|
640
|
-
...r,
|
|
641
|
-
value: e.signal,
|
|
642
|
-
onChange: Qe(e, n),
|
|
643
|
-
onBlur: Xe(e, s)
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
|
-
function zt(t) {
|
|
647
|
-
return Ae({
|
|
648
|
-
...t,
|
|
649
|
-
content: ot(t)
|
|
650
|
-
});
|
|
651
|
-
}
|
|
652
|
-
function ct(t, e, n) {
|
|
748
|
+
function at(t, e, n) {
|
|
653
749
|
const s = t.length.map((r) => r);
|
|
654
750
|
return Ze(
|
|
655
751
|
s,
|
|
@@ -657,15 +753,15 @@ function ct(t, e, n) {
|
|
|
657
753
|
const h = t.item(r.index), o = [];
|
|
658
754
|
return N(
|
|
659
755
|
ne(() => {
|
|
660
|
-
o.forEach((
|
|
756
|
+
o.forEach((d) => d());
|
|
661
757
|
}),
|
|
662
758
|
e({
|
|
663
759
|
list: t,
|
|
664
760
|
item: h,
|
|
665
761
|
position: r,
|
|
666
762
|
remove: () => t.removeAt(r.index),
|
|
667
|
-
move: (
|
|
668
|
-
switch (
|
|
763
|
+
move: (d) => {
|
|
764
|
+
switch (d) {
|
|
669
765
|
case "up":
|
|
670
766
|
if (r.index === 0) return;
|
|
671
767
|
t.move(r.index, r.index - 1);
|
|
@@ -681,22 +777,22 @@ function ct(t, e, n) {
|
|
|
681
777
|
t.move(r.index, t.length.value - 1);
|
|
682
778
|
}
|
|
683
779
|
},
|
|
684
|
-
canMove: (
|
|
780
|
+
canMove: (d) => {
|
|
685
781
|
const b = (() => {
|
|
686
|
-
switch (
|
|
782
|
+
switch (d) {
|
|
687
783
|
case "up":
|
|
688
|
-
return
|
|
784
|
+
return ke(r.index > 0);
|
|
689
785
|
case "down":
|
|
690
786
|
return t.length.map((w) => r.index < w - 1);
|
|
691
787
|
}
|
|
692
788
|
})();
|
|
693
789
|
return o.push(() => b.dispose()), b;
|
|
694
790
|
},
|
|
695
|
-
cannotMove: (
|
|
791
|
+
cannotMove: (d) => {
|
|
696
792
|
const b = (() => {
|
|
697
|
-
switch (
|
|
793
|
+
switch (d) {
|
|
698
794
|
case "up":
|
|
699
|
-
return
|
|
795
|
+
return ke(r.index === 0);
|
|
700
796
|
case "down":
|
|
701
797
|
return t.length.map((w) => r.index === w - 1);
|
|
702
798
|
}
|
|
@@ -713,12 +809,12 @@ const Se = {
|
|
|
713
809
|
9: { pattern: /^[0-9]$/ },
|
|
714
810
|
A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
|
|
715
811
|
"*": { pattern: /^.$/ }
|
|
716
|
-
},
|
|
812
|
+
}, ut = (t) => t instanceof RegExp;
|
|
717
813
|
function Oe(t, e, n) {
|
|
718
814
|
if (t == null) return [];
|
|
719
|
-
const s = n ? { ...Se, ...e } : e ?? Se, r = (o,
|
|
720
|
-
const b = s[
|
|
721
|
-
b ? o.push({ type: "pattern", name:
|
|
815
|
+
const s = n ? { ...Se, ...e } : e ?? Se, r = (o, d) => {
|
|
816
|
+
const b = s[d];
|
|
817
|
+
b ? o.push({ type: "pattern", name: d, ...b }) : o.push({ type: "literal", char: d });
|
|
722
818
|
}, h = [];
|
|
723
819
|
if (typeof t == "string") {
|
|
724
820
|
for (const o of t) r(h, o);
|
|
@@ -727,11 +823,11 @@ function Oe(t, e, n) {
|
|
|
727
823
|
for (const o of t)
|
|
728
824
|
if (typeof o == "string")
|
|
729
825
|
if (o.length <= 1) r(h, o);
|
|
730
|
-
else for (const
|
|
731
|
-
else
|
|
826
|
+
else for (const d of o) r(h, d);
|
|
827
|
+
else ut(o) ? h.push({ type: "pattern", pattern: o }) : typeof o == "object" && o && h.push(o);
|
|
732
828
|
return h;
|
|
733
829
|
}
|
|
734
|
-
function
|
|
830
|
+
function pt(t, e) {
|
|
735
831
|
return (n) => {
|
|
736
832
|
switch (t) {
|
|
737
833
|
case "digits":
|
|
@@ -753,36 +849,36 @@ function Te(t, e, n, s, r, h) {
|
|
|
753
849
|
previousConformed: e,
|
|
754
850
|
cursor: r ?? t.length,
|
|
755
851
|
completed: !1
|
|
756
|
-
},
|
|
852
|
+
}, d = s.definitions ?? {}, b = typeof n == "function" ? n(t, o) : n, w = Oe(
|
|
757
853
|
b,
|
|
758
|
-
|
|
854
|
+
d,
|
|
759
855
|
s.useDefaultDefinitions ?? !0
|
|
760
|
-
),
|
|
761
|
-
for (const _ of w) _.type === "literal" &&
|
|
762
|
-
if (s.prefix) for (const _ of s.prefix)
|
|
763
|
-
if (s.suffix) for (const _ of s.suffix)
|
|
764
|
-
const
|
|
765
|
-
if (
|
|
856
|
+
), p = pt(s.allowMode, s.allow), m = /* @__PURE__ */ new Set();
|
|
857
|
+
for (const _ of w) _.type === "literal" && m.add(_.char);
|
|
858
|
+
if (s.prefix) for (const _ of s.prefix) m.add(_);
|
|
859
|
+
if (s.suffix) for (const _ of s.suffix) m.add(_);
|
|
860
|
+
const v = Array.from(t).filter((_) => p(_) && !m.has(_));
|
|
861
|
+
if (v.length === 0) return { value: "", cursor: 0, completed: !1 };
|
|
766
862
|
const i = [], u = [];
|
|
767
|
-
let D = 0, S = 0, a = 0,
|
|
863
|
+
let D = 0, S = 0, a = 0, x = -1;
|
|
768
864
|
for (const _ of w) {
|
|
769
865
|
if (_.type === "literal") {
|
|
770
866
|
i.push(_.char), u.push({ kind: "literal", filled: !0 });
|
|
771
867
|
continue;
|
|
772
868
|
}
|
|
773
869
|
S += _.optional ? 0 : 1;
|
|
774
|
-
const B =
|
|
870
|
+
const B = v[D];
|
|
775
871
|
if (B == null)
|
|
776
872
|
break;
|
|
777
873
|
if (_.type === "any") {
|
|
778
|
-
a++, i.push(_.transform ? _.transform(B) : B), u.push({ kind: "slot", filled: !0 }),
|
|
874
|
+
a++, i.push(_.transform ? _.transform(B) : B), u.push({ kind: "slot", filled: !0 }), x = u.length - 1, D++;
|
|
779
875
|
continue;
|
|
780
876
|
}
|
|
781
877
|
if (_.type === "pattern")
|
|
782
878
|
if (_.pattern.test(B)) {
|
|
783
879
|
a++;
|
|
784
880
|
const R = _.transform ? _.transform(B) : B;
|
|
785
|
-
i.push(R), u.push({ kind: "slot", filled: !0 }),
|
|
881
|
+
i.push(R), u.push({ kind: "slot", filled: !0 }), x = u.length - 1, D++;
|
|
786
882
|
} else {
|
|
787
883
|
D++;
|
|
788
884
|
continue;
|
|
@@ -790,8 +886,8 @@ function Te(t, e, n, s, r, h) {
|
|
|
790
886
|
}
|
|
791
887
|
const $ = i.join(""), I = (s.prefix ?? "") + $ + (s.suffix ?? "");
|
|
792
888
|
let k = (s.prefix ?? "").length;
|
|
793
|
-
if (
|
|
794
|
-
let _ =
|
|
889
|
+
if (x >= 0) {
|
|
890
|
+
let _ = x + 1;
|
|
795
891
|
if ((h?.policy ?? "smart") !== "sticky")
|
|
796
892
|
for (; _ < u.length && u[_].kind === "literal"; ) _++;
|
|
797
893
|
k += _;
|
|
@@ -812,28 +908,28 @@ const Fe = (t) => {
|
|
|
812
908
|
onInput: r,
|
|
813
909
|
onAccept: h,
|
|
814
910
|
onComplete: o,
|
|
815
|
-
mask:
|
|
911
|
+
mask: d,
|
|
816
912
|
definitions: b,
|
|
817
913
|
useDefaultDefinitions: w,
|
|
818
|
-
extraLiterals:
|
|
819
|
-
prefix:
|
|
820
|
-
suffix:
|
|
914
|
+
extraLiterals: p,
|
|
915
|
+
prefix: m,
|
|
916
|
+
suffix: v,
|
|
821
917
|
autofix: i,
|
|
822
918
|
pipe: u,
|
|
823
919
|
completion: D,
|
|
824
920
|
unmask: S,
|
|
825
921
|
allowMode: a,
|
|
826
|
-
allow:
|
|
922
|
+
allow: x,
|
|
827
923
|
placeholder: $,
|
|
828
924
|
placeholderOptions: I
|
|
829
|
-
} = t,
|
|
925
|
+
} = t, V = A(
|
|
830
926
|
e,
|
|
831
|
-
|
|
927
|
+
d,
|
|
832
928
|
b,
|
|
833
929
|
w,
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
930
|
+
p,
|
|
931
|
+
m,
|
|
932
|
+
v,
|
|
837
933
|
i,
|
|
838
934
|
D,
|
|
839
935
|
S,
|
|
@@ -849,11 +945,11 @@ const Fe = (t) => {
|
|
|
849
945
|
pipe: u ?? ((L) => L),
|
|
850
946
|
unmask: Y ?? { strategy: "none" },
|
|
851
947
|
allowMode: Z ?? "all",
|
|
852
|
-
allow:
|
|
948
|
+
allow: x,
|
|
853
949
|
prefix: B,
|
|
854
950
|
suffix: R
|
|
855
951
|
}).value : c ?? ""), k = (c, y) => {
|
|
856
|
-
const T = c.value ?? "", z =
|
|
952
|
+
const T = c.value ?? "", z = f.get(e) ?? "", _ = d != null ? f.get(d) : null, B = b != null ? f.get(b) : void 0, R = w != null ? f.get(w) : void 0, X = p != null ? f.get(p) : void 0, Q = i != null ? f.get(i) : void 0, Y = D != null ? f.get(D) : void 0, Z = S != null ? f.get(S) : void 0, le = a != null ? f.get(a) : void 0, j = m != null ? f.get(m) : void 0, L = v != null ? f.get(v) : void 0, {
|
|
857
953
|
value: H,
|
|
858
954
|
cursor: ue,
|
|
859
955
|
completed: ve
|
|
@@ -870,12 +966,12 @@ const Fe = (t) => {
|
|
|
870
966
|
pipe: u ?? ((Re) => Re),
|
|
871
967
|
unmask: Z ?? { strategy: "none" },
|
|
872
968
|
allowMode: le ?? "all",
|
|
873
|
-
allow:
|
|
969
|
+
allow: x,
|
|
874
970
|
prefix: j,
|
|
875
971
|
suffix: L
|
|
876
972
|
},
|
|
877
973
|
c.selectionStart ?? T.length,
|
|
878
|
-
t.cursor ?
|
|
974
|
+
t.cursor ? f.get(t.cursor) : void 0
|
|
879
975
|
) : { value: T, cursor: T.length, completed: !0 };
|
|
880
976
|
if (H !== T) {
|
|
881
977
|
c.value = H;
|
|
@@ -896,7 +992,7 @@ const Fe = (t) => {
|
|
|
896
992
|
...t,
|
|
897
993
|
input: se.text(
|
|
898
994
|
q(t),
|
|
899
|
-
l.value(
|
|
995
|
+
l.value(V),
|
|
900
996
|
l.class("bc-input"),
|
|
901
997
|
n != null ? C.blur(n) : M,
|
|
902
998
|
te(
|
|
@@ -904,12 +1000,12 @@ const Fe = (t) => {
|
|
|
904
1000
|
C.input(() => k(c, "input")),
|
|
905
1001
|
C.change(() => k(c, "change")),
|
|
906
1002
|
C.keydown((y) => {
|
|
907
|
-
if (y.key !== "Backspace" || !(t.cursor ?
|
|
1003
|
+
if (y.key !== "Backspace" || !(t.cursor ? f.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
|
|
908
1004
|
const z = c.selectionStart ?? 0, _ = c.selectionEnd ?? z;
|
|
909
1005
|
if (z !== _ || z <= 0) return;
|
|
910
|
-
const B = c.value ?? "", R =
|
|
1006
|
+
const B = c.value ?? "", R = d != null ? f.get(d) : null;
|
|
911
1007
|
if (!R) return;
|
|
912
|
-
const X = b != null ?
|
|
1008
|
+
const X = b != null ? f.get(b) : void 0, Q = w != null ? f.get(w) : !0, Y = m != null ? f.get(m) : void 0, Z = v != null ? f.get(v) : void 0, le = Oe(
|
|
913
1009
|
typeof R == "function" ? R(B, {
|
|
914
1010
|
raw: B,
|
|
915
1011
|
previousConformed: B,
|
|
@@ -936,17 +1032,8 @@ const Fe = (t) => {
|
|
|
936
1032
|
}, Bt = (t) => {
|
|
937
1033
|
const { value: e, onBlur: n, onChange: s, onInput: r, rows: h } = t;
|
|
938
1034
|
return W({
|
|
939
|
-
baseContainer: !0,
|
|
940
1035
|
...t,
|
|
941
1036
|
input: g.textarea(
|
|
942
|
-
l.class(
|
|
943
|
-
V(t.size ?? "md")(
|
|
944
|
-
(o) => Je(
|
|
945
|
-
!1,
|
|
946
|
-
o ?? "md"
|
|
947
|
-
)
|
|
948
|
-
)
|
|
949
|
-
),
|
|
950
1037
|
q(t),
|
|
951
1038
|
l.rows(h ?? 3),
|
|
952
1039
|
l.value(e),
|
|
@@ -956,138 +1043,40 @@ const Fe = (t) => {
|
|
|
956
1043
|
r != null ? C.input(P(r)) : M
|
|
957
1044
|
)
|
|
958
1045
|
});
|
|
959
|
-
};
|
|
960
|
-
function pt(t) {
|
|
961
|
-
const e = String(t), n = e.indexOf(".");
|
|
962
|
-
return n === -1 ? 0 : e.length - n - 1;
|
|
963
|
-
}
|
|
964
|
-
function G(t, e) {
|
|
965
|
-
const n = pt(e);
|
|
966
|
-
if (n === 0) return Math.round(t);
|
|
967
|
-
const s = Math.pow(10, n);
|
|
968
|
-
return Math.round(t * s) / s;
|
|
969
|
-
}
|
|
970
|
-
const Vt = (t) => {
|
|
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(
|
|
976
|
-
e,
|
|
977
|
-
s
|
|
978
|
-
)((a, v) => v == null ? !0 : (a ?? 0) > v), u = V(
|
|
979
|
-
e,
|
|
980
|
-
r
|
|
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,
|
|
984
|
-
$
|
|
985
|
-
), k = s != null ? p.get(s) : void 0;
|
|
986
|
-
if (k != null && A < k)
|
|
987
|
-
return;
|
|
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,
|
|
993
|
-
$
|
|
994
|
-
), k = r != null ? p.get(r) : void 0;
|
|
995
|
-
if (k != null && A > k)
|
|
996
|
-
return;
|
|
997
|
-
const c = w(A);
|
|
998
|
-
c !== v && (o?.(c), m?.(c));
|
|
999
|
-
};
|
|
1000
|
-
return Le(
|
|
1001
|
-
l.class("bc-number-input-steppers"),
|
|
1002
|
-
// Increment second
|
|
1003
|
-
g.button(
|
|
1004
|
-
l.type("button"),
|
|
1005
|
-
l.class(
|
|
1006
|
-
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
1007
|
-
),
|
|
1008
|
-
l.disabled(
|
|
1009
|
-
V(
|
|
1010
|
-
u,
|
|
1011
|
-
t.disabled ?? !1
|
|
1012
|
-
)((a, v) => !a || v)
|
|
1013
|
-
),
|
|
1014
|
-
C.click((a) => S(a)),
|
|
1015
|
-
J.label(x.$.incrementValue),
|
|
1016
|
-
E({ icon: "line-md:plus", size: "xs" })
|
|
1017
|
-
),
|
|
1018
|
-
// Decrement first (matches tests expecting first button to be decrement)
|
|
1019
|
-
g.button(
|
|
1020
|
-
l.type("button"),
|
|
1021
|
-
l.class(
|
|
1022
|
-
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
1023
|
-
),
|
|
1024
|
-
l.disabled(
|
|
1025
|
-
V(
|
|
1026
|
-
i,
|
|
1027
|
-
t.disabled ?? !1
|
|
1028
|
-
)((a, v) => !a || v)
|
|
1029
|
-
),
|
|
1030
|
-
C.click((a) => D(a)),
|
|
1031
|
-
J.label(x.$.decrementValue),
|
|
1032
|
-
E({ icon: "line-md:minus", size: "xs" })
|
|
1033
|
-
)
|
|
1034
|
-
);
|
|
1035
|
-
}) : null, d = b != null && f != null ? N(f, b) : b ?? f;
|
|
1036
|
-
return W({
|
|
1037
|
-
...t,
|
|
1038
|
-
input: se.number(
|
|
1039
|
-
s != null ? l.min(s) : M,
|
|
1040
|
-
r != null ? l.max(r) : M,
|
|
1041
|
-
q(t),
|
|
1042
|
-
l.valueAsNumber(e),
|
|
1043
|
-
l.step(n),
|
|
1044
|
-
l.class("bc-input bc-number-input"),
|
|
1045
|
-
h != null ? C.blur(P(h)) : M,
|
|
1046
|
-
o != null ? C.change(ke(o)) : M,
|
|
1047
|
-
m != null ? C.input(ke(m)) : M,
|
|
1048
|
-
// Add wheel event support when step is defined
|
|
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
|
|
1054
|
-
),
|
|
1055
|
-
after: d
|
|
1056
|
-
});
|
|
1057
1046
|
}, ze = (t) => {
|
|
1058
1047
|
if (t == null || t === "") return null;
|
|
1059
1048
|
const e = Number(t);
|
|
1060
1049
|
return Number.isNaN(e) ? null : e;
|
|
1061
|
-
},
|
|
1062
|
-
const { value: e, step: n, min: s, max: r, onBlur: h, onChange: o, onInput:
|
|
1063
|
-
const u = s != null ?
|
|
1050
|
+
}, Vt = (t) => {
|
|
1051
|
+
const { value: e, step: n, min: s, max: r, onBlur: h, onChange: o, onInput: d, after: b } = t, w = (i) => {
|
|
1052
|
+
const u = s != null ? f.get(s) : void 0, D = r != null ? f.get(r) : void 0;
|
|
1064
1053
|
return u != null && i < u ? u : D != null && i > D ? D : i;
|
|
1065
|
-
},
|
|
1054
|
+
}, p = (() => {
|
|
1066
1055
|
if (n == null) return null;
|
|
1067
|
-
const i =
|
|
1056
|
+
const i = A(
|
|
1068
1057
|
e,
|
|
1069
1058
|
s
|
|
1070
|
-
)((
|
|
1071
|
-
const I =
|
|
1059
|
+
)((x, $) => {
|
|
1060
|
+
const I = x ?? 0;
|
|
1072
1061
|
return $ == null ? !0 : I > $;
|
|
1073
|
-
}), u =
|
|
1062
|
+
}), u = A(
|
|
1074
1063
|
e,
|
|
1075
1064
|
r
|
|
1076
|
-
)((
|
|
1077
|
-
const I =
|
|
1065
|
+
)((x, $) => {
|
|
1066
|
+
const I = x ?? 0;
|
|
1078
1067
|
return $ == null ? !0 : I < $;
|
|
1079
|
-
}), D = (
|
|
1080
|
-
const $ =
|
|
1068
|
+
}), D = (x) => {
|
|
1069
|
+
const $ = f.get(e) ?? 0, I = f.get(n), V = x?.shiftKey ? 10 : 1, k = G($ - I * V, I), c = s != null ? f.get(s) : void 0;
|
|
1081
1070
|
if (c != null && k < c) return;
|
|
1082
1071
|
const y = w(k);
|
|
1083
|
-
y !== $ && (o?.(y),
|
|
1084
|
-
}, S = (
|
|
1085
|
-
const $ =
|
|
1072
|
+
y !== $ && (o?.(y), d?.(y));
|
|
1073
|
+
}, S = (x) => {
|
|
1074
|
+
const $ = f.get(e) ?? 0, I = f.get(n), V = x?.shiftKey ? 10 : 1, k = G($ + I * V, I), c = r != null ? f.get(r) : void 0;
|
|
1086
1075
|
if (c != null && k > c) return;
|
|
1087
1076
|
const y = w(k);
|
|
1088
|
-
y !== $ && (o?.(y),
|
|
1077
|
+
y !== $ && (o?.(y), d?.(y));
|
|
1089
1078
|
};
|
|
1090
|
-
return ((
|
|
1079
|
+
return ((x, $) => Le(
|
|
1091
1080
|
l.class("bc-number-input-steppers"),
|
|
1092
1081
|
g.button(
|
|
1093
1082
|
l.type("button"),
|
|
@@ -1095,13 +1084,13 @@ const Vt = (t) => {
|
|
|
1095
1084
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
1096
1085
|
),
|
|
1097
1086
|
l.disabled(
|
|
1098
|
-
|
|
1087
|
+
A(
|
|
1099
1088
|
u,
|
|
1100
1089
|
t.disabled ?? !1
|
|
1101
|
-
)((I,
|
|
1090
|
+
)((I, V) => !I || V)
|
|
1102
1091
|
),
|
|
1103
1092
|
C.click((I) => S(I)),
|
|
1104
|
-
J.label(
|
|
1093
|
+
J.label(x),
|
|
1105
1094
|
E({ icon: "line-md:plus", size: "xs" })
|
|
1106
1095
|
),
|
|
1107
1096
|
g.button(
|
|
@@ -1110,10 +1099,10 @@ const Vt = (t) => {
|
|
|
1110
1099
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
1111
1100
|
),
|
|
1112
1101
|
l.disabled(
|
|
1113
|
-
|
|
1102
|
+
A(
|
|
1114
1103
|
i,
|
|
1115
1104
|
t.disabled ?? !1
|
|
1116
|
-
)((I,
|
|
1105
|
+
)((I, V) => !I || V)
|
|
1117
1106
|
),
|
|
1118
1107
|
C.click((I) => D(I)),
|
|
1119
1108
|
J.label($),
|
|
@@ -1123,11 +1112,11 @@ const Vt = (t) => {
|
|
|
1123
1112
|
ce.incrementValue,
|
|
1124
1113
|
ce.decrementValue
|
|
1125
1114
|
);
|
|
1126
|
-
})(),
|
|
1115
|
+
})(), m = Ee(
|
|
1127
1116
|
e,
|
|
1128
1117
|
t.disabled,
|
|
1129
|
-
o ??
|
|
1130
|
-
),
|
|
1118
|
+
o ?? d
|
|
1119
|
+
), v = b != null && p != null ? N(p, m, b) : b != null ? N(m, b) : p != null ? N(p, m) : m;
|
|
1131
1120
|
return W({
|
|
1132
1121
|
...t,
|
|
1133
1122
|
input: se.number(
|
|
@@ -1136,7 +1125,7 @@ const Vt = (t) => {
|
|
|
1136
1125
|
r != null ? l.max(r) : M,
|
|
1137
1126
|
q(t),
|
|
1138
1127
|
// Represent null as empty string so the field can be cleared
|
|
1139
|
-
l.value(
|
|
1128
|
+
l.value(f.map(e, (i) => i == null ? "" : String(i))),
|
|
1140
1129
|
l.step(n),
|
|
1141
1130
|
l.class("bc-input bc-number-input"),
|
|
1142
1131
|
h != null ? C.blur(P(h)) : M,
|
|
@@ -1146,22 +1135,22 @@ const Vt = (t) => {
|
|
|
1146
1135
|
o(u);
|
|
1147
1136
|
})
|
|
1148
1137
|
) : M,
|
|
1149
|
-
|
|
1138
|
+
d != null ? C.input(
|
|
1150
1139
|
P((i) => {
|
|
1151
1140
|
const u = ze(i);
|
|
1152
|
-
|
|
1141
|
+
d(u);
|
|
1153
1142
|
})
|
|
1154
1143
|
) : M,
|
|
1155
1144
|
// Wheel support when step is defined
|
|
1156
1145
|
n != null ? C.wheel((i) => {
|
|
1157
1146
|
i.preventDefault();
|
|
1158
|
-
const u =
|
|
1159
|
-
|
|
1147
|
+
const u = f.get(e) ?? 0, D = f.get(n), S = i.shiftKey ? 10 : 1, a = i.deltaY < 0 ? D * S : -D * S, x = w(G(u + a, D));
|
|
1148
|
+
x !== u && (o?.(x), d?.(x));
|
|
1160
1149
|
}) : M
|
|
1161
1150
|
),
|
|
1162
|
-
after:
|
|
1151
|
+
after: v
|
|
1163
1152
|
});
|
|
1164
|
-
},
|
|
1153
|
+
}, At = (t) => {
|
|
1165
1154
|
const e = {
|
|
1166
1155
|
type: "pattern",
|
|
1167
1156
|
pattern: /[0-9A-Fa-f]/,
|
|
@@ -1241,36 +1230,41 @@ const Be = (t, e) => {
|
|
|
1241
1230
|
} catch {
|
|
1242
1231
|
return null;
|
|
1243
1232
|
}
|
|
1244
|
-
},
|
|
1245
|
-
const { value: e, onChange: n, onInput: s, after: r, disabled: h, onBlur: o } = t,
|
|
1246
|
-
const
|
|
1247
|
-
return r != null ? N(
|
|
1233
|
+
}, Lt = (t) => {
|
|
1234
|
+
const { value: e, onChange: n, onInput: s, after: r, disabled: h, onBlur: o } = t, d = () => {
|
|
1235
|
+
const p = Ee(e, h, n ?? s);
|
|
1236
|
+
return r != null ? N(p, r) : p;
|
|
1248
1237
|
}, b = t.placeholder != null ? M : l.placeholder("P0DT0H0M0S");
|
|
1249
1238
|
return Ke(
|
|
1250
|
-
(
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1239
|
+
(p) => {
|
|
1240
|
+
const m = qe(
|
|
1241
|
+
t,
|
|
1242
|
+
(v) => v?.toString() ?? "",
|
|
1243
|
+
(v) => v === "" ? null : p.Duration.from(v)
|
|
1244
|
+
);
|
|
1245
|
+
return Fe({
|
|
1246
|
+
...m,
|
|
1247
|
+
onInput: void 0,
|
|
1248
|
+
...bt(p.Duration.from),
|
|
1249
|
+
placeholder: "P0DT0H0M0S",
|
|
1250
|
+
after: d()
|
|
1251
|
+
});
|
|
1252
|
+
},
|
|
1259
1253
|
{ pending: () => {
|
|
1260
|
-
const
|
|
1261
|
-
const u =
|
|
1254
|
+
const p = (m) => (v) => {
|
|
1255
|
+
const u = v.currentTarget?.value ?? "";
|
|
1262
1256
|
if (u === "") {
|
|
1263
|
-
|
|
1257
|
+
m(null);
|
|
1264
1258
|
return;
|
|
1265
1259
|
}
|
|
1266
1260
|
const D = globalThis.Temporal, S = Be(D, u);
|
|
1267
1261
|
if (S != null) {
|
|
1268
|
-
|
|
1262
|
+
m(S);
|
|
1269
1263
|
return;
|
|
1270
1264
|
}
|
|
1271
1265
|
he().then((a) => {
|
|
1272
|
-
const
|
|
1273
|
-
|
|
1266
|
+
const x = Be(a, u);
|
|
1267
|
+
x != null && m(x);
|
|
1274
1268
|
}).catch(() => {
|
|
1275
1269
|
});
|
|
1276
1270
|
};
|
|
@@ -1278,18 +1272,18 @@ const Be = (t, e) => {
|
|
|
1278
1272
|
...t,
|
|
1279
1273
|
input: se.text(
|
|
1280
1274
|
q(t),
|
|
1281
|
-
l.value(
|
|
1275
|
+
l.value(f.map(e, (m) => m?.toString() ?? "")),
|
|
1282
1276
|
l.class("bc-input"),
|
|
1283
1277
|
b,
|
|
1284
1278
|
o != null ? C.blur(() => o()) : M,
|
|
1285
|
-
n != null ? C.change(
|
|
1286
|
-
s != null ? C.input(
|
|
1279
|
+
n != null ? C.change(p(n)) : M,
|
|
1280
|
+
s != null ? C.input(p(s)) : M
|
|
1287
1281
|
),
|
|
1288
|
-
after:
|
|
1282
|
+
after: d()
|
|
1289
1283
|
});
|
|
1290
1284
|
} }
|
|
1291
1285
|
);
|
|
1292
|
-
},
|
|
1286
|
+
}, Ut = (t) => {
|
|
1293
1287
|
const { value: e, onBlur: n, onChange: s, onInput: r } = t;
|
|
1294
1288
|
return W({
|
|
1295
1289
|
...t,
|
|
@@ -1310,11 +1304,11 @@ function ht(t, e) {
|
|
|
1310
1304
|
cannotMoveDown: r,
|
|
1311
1305
|
onRemove: h,
|
|
1312
1306
|
showMove: o = !0,
|
|
1313
|
-
showRemove:
|
|
1307
|
+
showRemove: d = !0,
|
|
1314
1308
|
removeDisabled: b,
|
|
1315
1309
|
showMoveButtons: w = !0,
|
|
1316
|
-
layout:
|
|
1317
|
-
} = t,
|
|
1310
|
+
layout: p = "aside"
|
|
1311
|
+
} = t, m = f.toSignal(p).map((u) => u === "aside"), v = U(
|
|
1318
1312
|
o,
|
|
1319
1313
|
() => g.div(
|
|
1320
1314
|
l.class("bc-list-item-controls__move"),
|
|
@@ -1354,12 +1348,12 @@ function ht(t, e) {
|
|
|
1354
1348
|
)
|
|
1355
1349
|
)
|
|
1356
1350
|
), i = U(
|
|
1357
|
-
|
|
1351
|
+
d,
|
|
1358
1352
|
() => O(
|
|
1359
1353
|
F,
|
|
1360
1354
|
(u) => oe({
|
|
1361
1355
|
size: "xs",
|
|
1362
|
-
label:
|
|
1356
|
+
label: f.map(u.$.removeItem, (D) => D.toLowerCase()),
|
|
1363
1357
|
color: "danger",
|
|
1364
1358
|
disabled: b,
|
|
1365
1359
|
onClick: h
|
|
@@ -1367,13 +1361,13 @@ function ht(t, e) {
|
|
|
1367
1361
|
)
|
|
1368
1362
|
);
|
|
1369
1363
|
return U(
|
|
1370
|
-
|
|
1364
|
+
m,
|
|
1371
1365
|
() => g.div(
|
|
1372
1366
|
l.class("bc-list-item-controls bc-list-item-controls--aside"),
|
|
1373
1367
|
g.div(l.class("bc-list-item-controls__content"), e),
|
|
1374
1368
|
g.div(
|
|
1375
1369
|
l.class("bc-list-item-controls__actions"),
|
|
1376
|
-
U(w, () =>
|
|
1370
|
+
U(w, () => v),
|
|
1377
1371
|
i
|
|
1378
1372
|
)
|
|
1379
1373
|
),
|
|
@@ -1384,7 +1378,7 @@ function ht(t, e) {
|
|
|
1384
1378
|
l.class("bc-list-item-controls__actions"),
|
|
1385
1379
|
U(
|
|
1386
1380
|
w,
|
|
1387
|
-
() =>
|
|
1381
|
+
() => v,
|
|
1388
1382
|
() => g.div()
|
|
1389
1383
|
),
|
|
1390
1384
|
i
|
|
@@ -1400,13 +1394,13 @@ const gt = (t) => {
|
|
|
1400
1394
|
showMove: r = !0,
|
|
1401
1395
|
showRemove: h = !0,
|
|
1402
1396
|
showAdd: o = !0,
|
|
1403
|
-
createItem:
|
|
1397
|
+
createItem: d,
|
|
1404
1398
|
addLabel: b,
|
|
1405
1399
|
controlsLayout: w = "aside",
|
|
1406
|
-
removeDisabled:
|
|
1407
|
-
addDisabled:
|
|
1408
|
-
} = t,
|
|
1409
|
-
|
|
1400
|
+
removeDisabled: p,
|
|
1401
|
+
addDisabled: m
|
|
1402
|
+
} = t, v = U(
|
|
1403
|
+
A(o, d)((i, u) => i && u != null),
|
|
1410
1404
|
() => Me(
|
|
1411
1405
|
l.class(
|
|
1412
1406
|
"bc-group--gap-2 bc-group--align-center bc-group--justify-center"
|
|
@@ -1415,10 +1409,10 @@ const gt = (t) => {
|
|
|
1415
1409
|
{
|
|
1416
1410
|
size: "sm",
|
|
1417
1411
|
variant: "filled",
|
|
1418
|
-
onClick: () => e.push(
|
|
1419
|
-
disabled:
|
|
1412
|
+
onClick: () => e.push(d()),
|
|
1413
|
+
disabled: A(
|
|
1420
1414
|
e.disabled,
|
|
1421
|
-
|
|
1415
|
+
m ?? !1
|
|
1422
1416
|
)(
|
|
1423
1417
|
(i, u) => i || u
|
|
1424
1418
|
)
|
|
@@ -1435,7 +1429,7 @@ const gt = (t) => {
|
|
|
1435
1429
|
)
|
|
1436
1430
|
);
|
|
1437
1431
|
return N(
|
|
1438
|
-
|
|
1432
|
+
at(
|
|
1439
1433
|
e,
|
|
1440
1434
|
(i) => ht(
|
|
1441
1435
|
{
|
|
@@ -1445,7 +1439,7 @@ const gt = (t) => {
|
|
|
1445
1439
|
onRemove: i.remove,
|
|
1446
1440
|
showMove: r,
|
|
1447
1441
|
showRemove: h,
|
|
1448
|
-
removeDisabled:
|
|
1442
|
+
removeDisabled: p,
|
|
1449
1443
|
showMoveButtons: e.signal.map((u) => u.length > 1),
|
|
1450
1444
|
layout: w
|
|
1451
1445
|
},
|
|
@@ -1453,21 +1447,21 @@ const gt = (t) => {
|
|
|
1453
1447
|
),
|
|
1454
1448
|
s
|
|
1455
1449
|
),
|
|
1456
|
-
|
|
1450
|
+
v
|
|
1457
1451
|
);
|
|
1458
|
-
},
|
|
1452
|
+
}, Et = (t, ...e) => {
|
|
1459
1453
|
const {
|
|
1460
1454
|
controller: n,
|
|
1461
1455
|
element: s,
|
|
1462
1456
|
separator: r,
|
|
1463
1457
|
showMove: h,
|
|
1464
1458
|
showRemove: o,
|
|
1465
|
-
showAdd:
|
|
1459
|
+
showAdd: d,
|
|
1466
1460
|
createItem: b,
|
|
1467
1461
|
addLabel: w,
|
|
1468
|
-
controlsLayout:
|
|
1469
|
-
removeDisabled:
|
|
1470
|
-
addDisabled:
|
|
1462
|
+
controlsLayout: p,
|
|
1463
|
+
removeDisabled: m,
|
|
1464
|
+
addDisabled: v,
|
|
1471
1465
|
...i
|
|
1472
1466
|
} = t;
|
|
1473
1467
|
return Ae(
|
|
@@ -1479,18 +1473,18 @@ const gt = (t) => {
|
|
|
1479
1473
|
separator: r,
|
|
1480
1474
|
showMove: h,
|
|
1481
1475
|
showRemove: o,
|
|
1482
|
-
showAdd:
|
|
1476
|
+
showAdd: d,
|
|
1483
1477
|
createItem: b,
|
|
1484
1478
|
addLabel: w,
|
|
1485
|
-
controlsLayout:
|
|
1486
|
-
removeDisabled:
|
|
1487
|
-
addDisabled:
|
|
1479
|
+
controlsLayout: p,
|
|
1480
|
+
removeDisabled: m,
|
|
1481
|
+
addDisabled: v
|
|
1488
1482
|
})
|
|
1489
1483
|
},
|
|
1490
1484
|
...e
|
|
1491
1485
|
);
|
|
1492
1486
|
};
|
|
1493
|
-
class
|
|
1487
|
+
class Ot extends pe {
|
|
1494
1488
|
/** The immutable list of branch definitions for this union */
|
|
1495
1489
|
branches;
|
|
1496
1490
|
/** Reactive signal containing the key of the currently active branch */
|
|
@@ -1510,45 +1504,45 @@ class Ft extends fe {
|
|
|
1510
1504
|
* @param branches - Array of branch definitions describing the possible value types
|
|
1511
1505
|
* @param equals - Optional equality function for comparing values. Defaults to `strictEqual`.
|
|
1512
1506
|
*/
|
|
1513
|
-
constructor(e, n, s, r, h, o,
|
|
1514
|
-
super(e, n, s, r, h,
|
|
1515
|
-
const b = (
|
|
1516
|
-
for (const
|
|
1517
|
-
if (
|
|
1518
|
-
return
|
|
1507
|
+
constructor(e, n, s, r, h, o, d = K) {
|
|
1508
|
+
super(e, n, s, r, h, d), this.branches = o;
|
|
1509
|
+
const b = (p) => {
|
|
1510
|
+
for (const m of o)
|
|
1511
|
+
if (m.detect(p))
|
|
1512
|
+
return m.key;
|
|
1519
1513
|
return o[0]?.key ?? "unknown";
|
|
1520
1514
|
};
|
|
1521
1515
|
this.activeBranch = s.map(b, K);
|
|
1522
|
-
const w = (
|
|
1523
|
-
if (this.#e.has(
|
|
1524
|
-
return this.#e.get(
|
|
1525
|
-
const
|
|
1526
|
-
if (!
|
|
1527
|
-
throw new Error(`Unknown branch: ${
|
|
1528
|
-
const
|
|
1529
|
-
[...e,
|
|
1516
|
+
const w = (p) => {
|
|
1517
|
+
if (this.#e.has(p))
|
|
1518
|
+
return this.#e.get(p);
|
|
1519
|
+
const m = o.find((i) => i.key === p);
|
|
1520
|
+
if (!m)
|
|
1521
|
+
throw new Error(`Unknown branch: ${p}`);
|
|
1522
|
+
const v = new pe(
|
|
1523
|
+
[...e, p],
|
|
1530
1524
|
(i) => {
|
|
1531
1525
|
this.change(i);
|
|
1532
1526
|
},
|
|
1533
1527
|
this.signal.map(
|
|
1534
|
-
(i) =>
|
|
1535
|
-
|
|
1528
|
+
(i) => m.detect(i) ? i : m.defaultValue(),
|
|
1529
|
+
d
|
|
1536
1530
|
),
|
|
1537
|
-
r.map(
|
|
1531
|
+
r.map(Ce([p])),
|
|
1538
1532
|
{
|
|
1539
1533
|
disabled: this.disabled,
|
|
1540
1534
|
validationMode: this.parent.validationMode
|
|
1541
1535
|
},
|
|
1542
|
-
|
|
1536
|
+
d
|
|
1543
1537
|
);
|
|
1544
|
-
return this.#e.set(
|
|
1538
|
+
return this.#e.set(p, v), v;
|
|
1545
1539
|
};
|
|
1546
1540
|
this.#t = this.activeBranch.map(
|
|
1547
|
-
(
|
|
1541
|
+
(p) => w(p),
|
|
1548
1542
|
K
|
|
1549
1543
|
), this.onDispose(() => {
|
|
1550
|
-
for (const
|
|
1551
|
-
|
|
1544
|
+
for (const p of this.#e.values())
|
|
1545
|
+
p.dispose();
|
|
1552
1546
|
this.#e.clear(), this.activeBranch.dispose(), this.#t.dispose();
|
|
1553
1547
|
});
|
|
1554
1548
|
}
|
|
@@ -1561,7 +1555,7 @@ class Ft extends fe {
|
|
|
1561
1555
|
* @returns The `Controller<unknown>` for the active branch
|
|
1562
1556
|
*/
|
|
1563
1557
|
get activeController() {
|
|
1564
|
-
return
|
|
1558
|
+
return f.get(this.#t);
|
|
1565
1559
|
}
|
|
1566
1560
|
/**
|
|
1567
1561
|
* Gets or creates a controller for a specific branch by key.
|
|
@@ -1578,7 +1572,7 @@ class Ft extends fe {
|
|
|
1578
1572
|
throw new Error(`Unknown branch: ${e}`);
|
|
1579
1573
|
if (this.#e.has(e))
|
|
1580
1574
|
return this.#e.get(e);
|
|
1581
|
-
const s = new
|
|
1575
|
+
const s = new pe(
|
|
1582
1576
|
[...this.path, e],
|
|
1583
1577
|
(r) => {
|
|
1584
1578
|
this.change(r);
|
|
@@ -1587,7 +1581,7 @@ class Ft extends fe {
|
|
|
1587
1581
|
(r) => n.detect(r) ? r : n.defaultValue(),
|
|
1588
1582
|
K
|
|
1589
1583
|
),
|
|
1590
|
-
this.status.map(
|
|
1584
|
+
this.status.map(Ce([e])),
|
|
1591
1585
|
{
|
|
1592
1586
|
disabled: this.disabled,
|
|
1593
1587
|
validationMode: this.parent.validationMode
|
|
@@ -1614,7 +1608,7 @@ class Ft extends fe {
|
|
|
1614
1608
|
const s = this.branches.find((o) => o.key === e);
|
|
1615
1609
|
if (!s)
|
|
1616
1610
|
throw new Error(`Unknown branch: ${e}`);
|
|
1617
|
-
const r =
|
|
1611
|
+
const r = f.get(this.signal);
|
|
1618
1612
|
if (s.detect(r))
|
|
1619
1613
|
return !0;
|
|
1620
1614
|
if (s.convert) {
|
|
@@ -1633,23 +1627,23 @@ class Ft extends fe {
|
|
|
1633
1627
|
* @returns The active branch definition, or `undefined` if no branch matches
|
|
1634
1628
|
*/
|
|
1635
1629
|
get activeBranchDefinition() {
|
|
1636
|
-
const e =
|
|
1630
|
+
const e = f.get(this.activeBranch);
|
|
1637
1631
|
return this.branches.find((n) => n.key === e);
|
|
1638
1632
|
}
|
|
1639
1633
|
}
|
|
1640
|
-
function
|
|
1634
|
+
function Ft(t) {
|
|
1641
1635
|
return t.transform(
|
|
1642
1636
|
(e) => e ?? null,
|
|
1643
1637
|
(e) => e ?? void 0
|
|
1644
1638
|
);
|
|
1645
1639
|
}
|
|
1646
|
-
function
|
|
1640
|
+
function Rt(t) {
|
|
1647
1641
|
return t.transform(
|
|
1648
1642
|
(e) => e ?? "",
|
|
1649
1643
|
(e) => e === "" ? void 0 : e
|
|
1650
1644
|
);
|
|
1651
1645
|
}
|
|
1652
|
-
function
|
|
1646
|
+
function Nt(t) {
|
|
1653
1647
|
return t.transform(
|
|
1654
1648
|
(e) => e ?? void 0,
|
|
1655
1649
|
(e) => e ?? null
|
|
@@ -1676,34 +1670,34 @@ function Ve(t) {
|
|
|
1676
1670
|
}
|
|
1677
1671
|
export {
|
|
1678
1672
|
gt as B,
|
|
1679
|
-
|
|
1680
|
-
|
|
1673
|
+
et as E,
|
|
1674
|
+
zt as F,
|
|
1681
1675
|
Me as G,
|
|
1682
|
-
|
|
1676
|
+
Et as L,
|
|
1683
1677
|
Fe as M,
|
|
1684
|
-
|
|
1685
|
-
|
|
1678
|
+
Ee as N,
|
|
1679
|
+
Tt as S,
|
|
1686
1680
|
Bt as T,
|
|
1687
|
-
|
|
1681
|
+
At as U,
|
|
1688
1682
|
Ke as W,
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1683
|
+
Ut as a,
|
|
1684
|
+
tt as b,
|
|
1685
|
+
Lt as c,
|
|
1692
1686
|
bt as d,
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1687
|
+
Rt as e,
|
|
1688
|
+
Vt as f,
|
|
1689
|
+
St as g,
|
|
1690
|
+
Mt as h,
|
|
1691
|
+
Ot as i,
|
|
1698
1692
|
vt as j,
|
|
1699
|
-
|
|
1700
|
-
|
|
1693
|
+
nt as k,
|
|
1694
|
+
at as l,
|
|
1701
1695
|
ht as m,
|
|
1702
1696
|
de as n,
|
|
1703
|
-
|
|
1697
|
+
$t as o,
|
|
1704
1698
|
$e as p,
|
|
1705
1699
|
he as q,
|
|
1706
1700
|
G as r,
|
|
1707
|
-
|
|
1708
|
-
|
|
1701
|
+
Nt as s,
|
|
1702
|
+
Ft as t
|
|
1709
1703
|
};
|