dawn-ui-react 1.0.0-alpha.2 → 1.0.0-alpha.20
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/CompositeItem-CH9gluPn.js +45 -0
- package/dist/CompositeListContext-DMNULDos.js +15 -0
- package/dist/FieldItemContext-D1iEutzE.js +9 -0
- package/dist/FormContext-DmYxHG1e.js +26 -0
- package/dist/{Input-DXDwtOqf.js → Input-DXQc6T_w.js} +16 -10
- package/dist/LabelableContext-mL6rBiul.js +85 -0
- package/dist/RadioGroupContext-zHzEliyD.js +9 -0
- package/dist/clamp-63kvPeUJ.js +801 -0
- package/dist/{cn-CXogf8HW.js → cn-BSNuKelt.js} +349 -307
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.types.d.ts +1 -0
- package/dist/components/chart/chart-container.d.ts +5 -0
- package/dist/components/chart/chart-legend-content.d.ts +8 -0
- package/dist/components/chart/chart-legend-icon.d.ts +2 -0
- package/dist/components/chart/chart-legend-indicator.d.ts +2 -0
- package/dist/components/chart/chart-legend-label.d.ts +2 -0
- package/dist/components/chart/chart-legend.d.ts +2 -0
- package/dist/components/chart/chart-linear-gradient.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-content.d.ts +3 -0
- package/dist/components/chart/chart-tooltip-icon.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-indicator.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-label.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-name.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-payload.d.ts +4 -0
- package/dist/components/chart/chart-tooltip-value.d.ts +2 -0
- package/dist/components/chart/chart-tooltip.d.ts +2 -0
- package/dist/components/chart/chart.types.d.ts +50 -0
- package/dist/components/chart/chart.utils.d.ts +11 -0
- package/dist/components/chart/index.d.ts +19 -0
- package/dist/components/code-block/code-block-actions.d.ts +2 -0
- package/dist/components/code-block/code-block-copy.d.ts +2 -0
- package/dist/components/code-block/code-block-download.d.ts +2 -0
- package/dist/components/code-block/code-block-header.d.ts +3 -0
- package/dist/components/code-block/code-block-name.d.ts +2 -0
- package/dist/components/code-block/code-block-select.d.ts +2 -0
- package/dist/components/code-block/code-block-tabs.d.ts +2 -0
- package/dist/components/code-block/code-block-window.d.ts +2 -0
- package/dist/components/code-block/code-block.d.ts +3 -0
- package/dist/components/code-block/code-block.types.d.ts +26 -0
- package/dist/components/code-block/index.d.ts +10 -0
- package/dist/components/combobox/combobox-virtualized-list.d.ts +2 -0
- package/dist/components/combobox/combobox.types.d.ts +9 -0
- package/dist/components/combobox/index.d.ts +2 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/drawer/drawer-close.d.ts +2 -0
- package/dist/components/drawer/drawer-content.d.ts +2 -0
- package/dist/components/drawer/drawer-description.d.ts +2 -0
- package/dist/components/drawer/drawer-header.d.ts +2 -0
- package/dist/components/drawer/drawer-popup.d.ts +2 -0
- package/dist/components/drawer/drawer-provider.d.ts +2 -0
- package/dist/components/drawer/drawer-title.d.ts +2 -0
- package/dist/components/drawer/drawer-trigger.d.ts +2 -0
- package/dist/components/drawer/drawer.d.ts +2 -0
- package/dist/components/drawer/drawer.types.d.ts +10 -0
- package/dist/components/drawer/index.d.ts +10 -0
- package/dist/components/field/field-radio.d.ts +2 -0
- package/dist/components/field/field-set.d.ts +2 -0
- package/dist/components/field/field.types.d.ts +3 -1
- package/dist/components/field/index.d.ts +5 -1
- package/dist/components/form/form-context.d.ts +56 -14
- package/dist/components/index.d.ts +3 -0
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/input.types.d.ts +3 -1
- package/dist/components/input-otp/index.d.ts +2 -1
- package/dist/components/input-otp/input-otp-separator.d.ts +2 -0
- package/dist/components/input-otp/input-otp-slot.d.ts +1 -1
- package/dist/components/input-otp/input-otp.types.d.ts +4 -3
- package/dist/components/layer-tree/index.d.ts +5 -1
- package/dist/components/layer-tree/layer-tree-body.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-footer.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree-node-toggle.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-node.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-row.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-search.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-sort.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree-utils.d.ts +83 -0
- package/dist/components/layer-tree/layer-tree.d.ts +9 -4
- package/dist/components/layer-tree/layer-tree.types.d.ts +16 -5
- package/dist/components/number-field/number-field.d.ts +1 -1
- package/dist/components/popover/index.d.ts +2 -1
- package/dist/components/popover/popover-button.d.ts +2 -0
- package/dist/components/popover/popover.types.d.ts +2 -0
- package/dist/components/profile/index.d.ts +5 -1
- package/dist/components/profile/profile-action.d.ts +2 -0
- package/dist/components/profile/profile-content.d.ts +2 -0
- package/dist/components/profile/profile-name.d.ts +2 -0
- package/dist/components/profile/profile-subname.d.ts +2 -0
- package/dist/components/profile/profile.d.ts +1 -1
- package/dist/components/profile/profile.types.d.ts +6 -14
- package/dist/components/scroll-area/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area/scroll-area.types.d.ts +6 -2
- package/dist/components/select/select.types.d.ts +5 -0
- package/dist/components/separator/separator.d.ts +1 -1
- package/dist/components/separator/separator.types.d.ts +3 -1
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/slider.types.d.ts +7 -1
- package/dist/components/table/index.d.ts +15 -2
- package/dist/components/table/table-body.d.ts +1 -1
- package/dist/components/table/table-column-toggle.d.ts +2 -0
- package/dist/components/table/table-container.d.ts +2 -0
- package/dist/components/table/table-data-set-select.d.ts +2 -0
- package/dist/components/table/table-data-set-tabs.d.ts +2 -0
- package/dist/components/table/table-filter-form.d.ts +3 -0
- package/dist/components/table/table-filter.d.ts +1 -1
- package/dist/components/table/table-filters.d.ts +2 -0
- package/dist/components/table/table-pagination.d.ts +1 -1
- package/dist/components/table/table-paging.d.ts +2 -0
- package/dist/components/table/table-row-grid.d.ts +1 -1
- package/dist/components/table/table-row-list.d.ts +1 -1
- package/dist/components/table/table-sort.d.ts +1 -1
- package/dist/components/table/table-toolbar.d.ts +2 -0
- package/dist/components/table/table.constants.d.ts +64 -0
- package/dist/components/table/table.d.ts +14 -5
- package/dist/components/table/table.types.d.ts +73 -15
- package/dist/components/table/table.utils.d.ts +4 -0
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.types.d.ts +4 -1
- package/dist/components/toggle-group/toggle-group.d.ts +1 -1
- package/dist/components/toggle-group/toggle-group.types.d.ts +1 -0
- package/dist/composite-8Z1YCmUf.js +161 -0
- package/dist/composite-DTxBFZq_.js +328 -0
- package/dist/createBaseUIEventDetails-BHkB1IRT.js +36 -0
- package/dist/dawn-ui-react.js +38096 -11606
- package/dist/dawn-ui-react.umd.cjs +176 -27
- package/dist/{form-context-DqrRdk0d.js → form-context-CpevRrMx.js} +541 -515
- package/dist/input.types-DDZuq7AK.js +21 -0
- package/dist/label-C57cQsPN.js +50 -0
- package/dist/owner-CZ-bExcn.js +6 -0
- package/dist/serializeValue-DadF0djs.js +12 -0
- package/dist/shadowDom-nxuQhD_O.js +25 -0
- package/dist/styles.css +149 -118
- package/dist/useBaseUiId-DJ56dhex.js +25 -0
- package/dist/useCompositeListItem-CuKiOJnK.js +53 -0
- package/dist/useControlled-kefeIBTp.js +48 -0
- package/dist/useLabelableId-Cb5S9nao.js +39 -0
- package/dist/useOpenChangeComplete-D1bYAEWf.js +178 -0
- package/dist/useRegisterFieldControl-I4gdfodR.js +27 -0
- package/dist/visuallyHidden-C0MRt467.js +21 -0
- package/package.json +42 -37
- package/dist/clamp-CYKyjuJR.js +0 -3033
- package/dist/field-description-BDRJXMS8.js +0 -12
- package/dist/field-errors-DVQtEKG3.js +0 -19
- package/dist/field-input-Doplzz0V.js +0 -58
- package/dist/field-input-group-CzX_hAjq.js +0 -18
- package/dist/field-input-group-input-micw-J2Y.js +0 -20
- package/dist/field-label-C2atREm0.js +0 -16
- package/dist/field-select--mY7GbNz.js +0 -2149
- package/dist/field-slider-D54-Z8Ds.js +0 -2167
- package/dist/input-group-DgFUfXr7.js +0 -12
- package/dist/input-group-input-DNZQ6g-3.js +0 -11
- package/dist/input.types-D8b-1Bcm.js +0 -21
- package/dist/rolldown-runtime-CAFD8bLK.js +0 -11
- package/dist/useLabelableId-BaWKrZ8_.js +0 -271
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { n as e, t } from "./cn-
|
|
1
|
+
import { n as e, t } from "./cn-BSNuKelt.js";
|
|
2
2
|
import * as n from "react";
|
|
3
3
|
import { createContext as r, createElement as i, lazy as a, useCallback as o, useContext as s, useEffect as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
4
4
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
5
5
|
import { useSyncExternalStoreWithSelector as g } from "use-sync-external-store/shim/with-selector";
|
|
6
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
6
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/error.js
|
|
7
7
|
var _;
|
|
8
8
|
process.env.NODE_ENV !== "production" && (_ = /* @__PURE__ */ new Set());
|
|
9
|
-
function
|
|
9
|
+
function ee(...e) {
|
|
10
10
|
if (process.env.NODE_ENV !== "production") {
|
|
11
11
|
let t = e.join(" ");
|
|
12
12
|
_.has(t) || (_.add(t), console.error(`Base UI: ${t}`));
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
let r = n.useRef(
|
|
20
|
-
return r.current ===
|
|
16
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/useRefWithInit.js
|
|
17
|
+
var te = {};
|
|
18
|
+
function v(e, t) {
|
|
19
|
+
let r = n.useRef(te);
|
|
20
|
+
return r.current === te && (r.current = e(t)), r;
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
24
|
-
var
|
|
25
|
-
function
|
|
26
|
-
let t =
|
|
27
|
-
return t.next = e,
|
|
23
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/useStableCallback.js
|
|
24
|
+
var y = n[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)], ne = y && y !== n.useLayoutEffect ? y : (e) => e();
|
|
25
|
+
function re(e) {
|
|
26
|
+
let t = v(ie).current;
|
|
27
|
+
return t.next = e, ne(t.effect), t.trampoline;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function ie() {
|
|
30
30
|
let e = {
|
|
31
31
|
next: void 0,
|
|
32
|
-
callback:
|
|
32
|
+
callback: ae,
|
|
33
33
|
trampoline: (...t) => e.callback?.(...t),
|
|
34
34
|
effect: () => {
|
|
35
35
|
e.callback = e.next;
|
|
@@ -37,55 +37,55 @@ function re() {
|
|
|
37
37
|
};
|
|
38
38
|
return e;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ae() {
|
|
41
41
|
if (process.env.NODE_ENV !== "production") throw Error("Base UI: Cannot call an event handler while rendering.");
|
|
42
42
|
}
|
|
43
|
-
var
|
|
44
|
-
process.env.NODE_ENV !== "production" && (
|
|
45
|
-
function
|
|
43
|
+
var oe = typeof document < "u" ? n.useLayoutEffect : () => {}, se;
|
|
44
|
+
process.env.NODE_ENV !== "production" && (se = /* @__PURE__ */ new Set());
|
|
45
|
+
function ce(...e) {
|
|
46
46
|
if (process.env.NODE_ENV !== "production") {
|
|
47
47
|
let t = e.join(" ");
|
|
48
|
-
|
|
48
|
+
se.has(t) || (se.add(t), console.warn(`Base UI: ${t}`));
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
53
|
-
function
|
|
52
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/formatErrorMessage.js
|
|
53
|
+
function le(e, t) {
|
|
54
54
|
return function(n, ...r) {
|
|
55
55
|
let i = new URL(e);
|
|
56
56
|
return i.searchParams.set("code", n.toString()), r.forEach((e) => i.searchParams.append("args[]", e)), `${t} error #${n}; visit ${i} for the full message.`;
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
var
|
|
59
|
+
var ue = le("https://base-ui.com/production-error", "Base UI");
|
|
60
60
|
//#endregion
|
|
61
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
62
|
-
function
|
|
63
|
-
let i =
|
|
64
|
-
return
|
|
61
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/useMergedRefs.js
|
|
62
|
+
function de(e, t, n, r) {
|
|
63
|
+
let i = v(pe).current;
|
|
64
|
+
return me(i, e, t, n, r) && ge(i, [
|
|
65
65
|
e,
|
|
66
66
|
t,
|
|
67
67
|
n,
|
|
68
68
|
r
|
|
69
69
|
]), i.callback;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
let t =
|
|
73
|
-
return
|
|
71
|
+
function fe(e) {
|
|
72
|
+
let t = v(pe).current;
|
|
73
|
+
return he(t, e) && ge(t, e), t.callback;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function pe() {
|
|
76
76
|
return {
|
|
77
77
|
callback: null,
|
|
78
78
|
cleanup: null,
|
|
79
79
|
refs: []
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function me(e, t, n, r, i) {
|
|
83
83
|
return e.refs[0] !== t || e.refs[1] !== n || e.refs[2] !== r || e.refs[3] !== i;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function he(e, t) {
|
|
86
86
|
return e.refs.length !== t.length || e.refs.some((e, n) => e !== t[n]);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function ge(e, t) {
|
|
89
89
|
if (e.refs = t, t.every((e) => e == null)) {
|
|
90
90
|
e.callback = null;
|
|
91
91
|
return;
|
|
@@ -127,21 +127,21 @@ function he(e, t) {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
131
|
-
var
|
|
132
|
-
function
|
|
133
|
-
return
|
|
130
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/reactVersion.js
|
|
131
|
+
var _e = parseInt(n.version, 10);
|
|
132
|
+
function ve(e) {
|
|
133
|
+
return _e >= e;
|
|
134
134
|
}
|
|
135
135
|
//#endregion
|
|
136
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
137
|
-
function
|
|
136
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/getReactElementRef.js
|
|
137
|
+
function ye(e) {
|
|
138
138
|
if (!/* @__PURE__ */ n.isValidElement(e)) return null;
|
|
139
139
|
let t = e, r = t.props;
|
|
140
|
-
return (
|
|
140
|
+
return (ve(19) ? r?.ref : t.ref) ?? null;
|
|
141
141
|
}
|
|
142
142
|
//#endregion
|
|
143
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
144
|
-
function
|
|
143
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/mergeObjects.js
|
|
144
|
+
function be(e, t) {
|
|
145
145
|
if (e && !t) return e;
|
|
146
146
|
if (!e && t) return t;
|
|
147
147
|
if (e || t) return {
|
|
@@ -150,12 +150,12 @@ function ye(e, t) {
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
//#endregion
|
|
153
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
154
|
-
function
|
|
155
|
-
var
|
|
153
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/empty.js
|
|
154
|
+
function xe() {}
|
|
155
|
+
var Se = Object.freeze([]), b = Object.freeze({});
|
|
156
156
|
//#endregion
|
|
157
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@
|
|
158
|
-
function
|
|
157
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
|
|
158
|
+
function Ce(e, t) {
|
|
159
159
|
let n = {};
|
|
160
160
|
for (let r in e) {
|
|
161
161
|
let i = e[r];
|
|
@@ -169,139 +169,139 @@ function Se(e, t) {
|
|
|
169
169
|
return n;
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@
|
|
173
|
-
function
|
|
172
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/utils/resolveClassName.js
|
|
173
|
+
function we(e, t) {
|
|
174
174
|
return typeof e == "function" ? e(t) : e;
|
|
175
175
|
}
|
|
176
176
|
//#endregion
|
|
177
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@
|
|
178
|
-
function
|
|
177
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/utils/resolveStyle.js
|
|
178
|
+
function Te(e, t) {
|
|
179
179
|
return typeof e == "function" ? e(t) : e;
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@
|
|
183
|
-
var
|
|
184
|
-
function
|
|
185
|
-
if (!n && !r && !i && !e) return
|
|
186
|
-
let a =
|
|
187
|
-
return t && (a =
|
|
188
|
-
}
|
|
189
|
-
function
|
|
190
|
-
if (e.length === 0) return
|
|
191
|
-
if (e.length === 1) return
|
|
192
|
-
let t =
|
|
193
|
-
for (let n = 1; n < e.length; n += 1) t =
|
|
182
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/merge-props/mergeProps.js
|
|
183
|
+
var Ee = {};
|
|
184
|
+
function De(e, t, n, r, i) {
|
|
185
|
+
if (!n && !r && !i && !e) return x(t);
|
|
186
|
+
let a = x(e);
|
|
187
|
+
return t && (a = S(a, t)), n && (a = S(a, n)), r && (a = S(a, r)), i && (a = S(a, i)), a;
|
|
188
|
+
}
|
|
189
|
+
function Oe(e) {
|
|
190
|
+
if (e.length === 0) return Ee;
|
|
191
|
+
if (e.length === 1) return x(e[0]);
|
|
192
|
+
let t = x(e[0]);
|
|
193
|
+
for (let n = 1; n < e.length; n += 1) t = S(t, e[n]);
|
|
194
194
|
return t;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
197
|
-
return
|
|
196
|
+
function x(e) {
|
|
197
|
+
return Me(e) ? { ...Ne(e, Ee) } : ke(e);
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
return
|
|
199
|
+
function S(e, t) {
|
|
200
|
+
return Me(t) ? Ne(t, e) : Ae(e, t);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function ke(e) {
|
|
203
203
|
let t = { ...e };
|
|
204
204
|
for (let e in t) {
|
|
205
205
|
let n = t[e];
|
|
206
|
-
|
|
206
|
+
je(e, n) && (t[e] = Fe(n));
|
|
207
207
|
}
|
|
208
208
|
return t;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Ae(e, t) {
|
|
211
211
|
if (!t) return e;
|
|
212
212
|
for (let n in t) {
|
|
213
213
|
let r = t[n];
|
|
214
214
|
switch (n) {
|
|
215
215
|
case "style":
|
|
216
|
-
e[n] =
|
|
216
|
+
e[n] = be(e.style, r);
|
|
217
217
|
break;
|
|
218
218
|
case "className":
|
|
219
|
-
e[n] =
|
|
219
|
+
e[n] = Ie(e.className, r);
|
|
220
220
|
break;
|
|
221
|
-
default:
|
|
221
|
+
default: je(n, r) ? e[n] = Pe(e[n], r) : e[n] = r;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
return e;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function je(e, t) {
|
|
227
227
|
let n = e.charCodeAt(0), r = e.charCodeAt(1), i = e.charCodeAt(2);
|
|
228
228
|
return n === 111 && r === 110 && i >= 65 && i <= 90 && (typeof t == "function" || t === void 0);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Me(e) {
|
|
231
231
|
return typeof e == "function";
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
return
|
|
233
|
+
function Ne(e, t) {
|
|
234
|
+
return Me(e) ? e(t) : e ?? Ee;
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function Pe(e, t) {
|
|
237
237
|
return t ? e ? (...n) => {
|
|
238
238
|
let r = n[0];
|
|
239
|
-
if (
|
|
239
|
+
if (Le(r)) {
|
|
240
240
|
let i = r;
|
|
241
|
-
|
|
241
|
+
C(i);
|
|
242
242
|
let a = t(...n);
|
|
243
243
|
return i.baseUIHandlerPrevented || e?.(...n), a;
|
|
244
244
|
}
|
|
245
245
|
let i = t(...n);
|
|
246
246
|
return e?.(...n), i;
|
|
247
|
-
} :
|
|
247
|
+
} : Fe(t) : e;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function Fe(e) {
|
|
250
250
|
return e && ((...t) => {
|
|
251
251
|
let n = t[0];
|
|
252
|
-
return
|
|
252
|
+
return Le(n) && C(n), e(...t);
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function C(e) {
|
|
256
256
|
return e.preventBaseUIHandler = () => {
|
|
257
257
|
e.baseUIHandlerPrevented = !0;
|
|
258
258
|
}, e;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function Ie(e, t) {
|
|
261
261
|
return t ? e ? t + " " + e : t : e;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function Le(e) {
|
|
264
264
|
return typeof e == "object" && !!e && "nativeEvent" in e;
|
|
265
265
|
}
|
|
266
266
|
//#endregion
|
|
267
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@
|
|
268
|
-
function
|
|
269
|
-
let r = t.render, i =
|
|
270
|
-
return n.enabled === !1 ? null :
|
|
271
|
-
}
|
|
272
|
-
function
|
|
273
|
-
let { className: n, style: r, render: i } = e, { state: a =
|
|
274
|
-
return typeof document < "u" && (l ? Array.isArray(o) ? m.ref =
|
|
267
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/internals/useRenderElement.js
|
|
268
|
+
function Re(e, t, n = {}) {
|
|
269
|
+
let r = t.render, i = ze(t, n);
|
|
270
|
+
return n.enabled === !1 ? null : We(e, r, i, n.state ?? b);
|
|
271
|
+
}
|
|
272
|
+
function ze(e, t = {}) {
|
|
273
|
+
let { className: n, style: r, render: i } = e, { state: a = b, ref: o, props: s, stateAttributesMapping: c, enabled: l = !0 } = t, u = l ? we(n, a) : void 0, d = l ? Te(r, a) : void 0, f = l ? Ce(a, c) : b, p = l && s ? Be(s) : void 0, m = l ? be(f, p) ?? {} : b;
|
|
274
|
+
return typeof document < "u" && (l ? Array.isArray(o) ? m.ref = fe([
|
|
275
275
|
m.ref,
|
|
276
|
-
|
|
276
|
+
ye(i),
|
|
277
277
|
...o
|
|
278
|
-
]) : m.ref =
|
|
278
|
+
]) : m.ref = de(m.ref, ye(i), o) : de(null, null)), l ? (u !== void 0 && (m.className = Ie(m.className, u)), d !== void 0 && (m.style = be(m.style, d)), m) : b;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
return Array.isArray(e) ?
|
|
280
|
+
function Be(e) {
|
|
281
|
+
return Array.isArray(e) ? Oe(e) : De(void 0, e);
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
function
|
|
283
|
+
var Ve = Symbol.for("react.lazy"), He = /^[A-Z][A-Za-z0-9$]*$/, Ue = /[a-z]/;
|
|
284
|
+
function We(e, t, r, i) {
|
|
285
285
|
if (t) {
|
|
286
|
-
if (typeof t == "function") return process.env.NODE_ENV !== "production" &&
|
|
287
|
-
let e =
|
|
286
|
+
if (typeof t == "function") return process.env.NODE_ENV !== "production" && Ge(t), t(r, i);
|
|
287
|
+
let e = De(r, t.props);
|
|
288
288
|
e.ref = r.ref;
|
|
289
289
|
let a = t;
|
|
290
|
-
if (a?.$$typeof ===
|
|
290
|
+
if (a?.$$typeof === Ve && (a = n.Children.toArray(t)[0]), process.env.NODE_ENV !== "production" && !/* @__PURE__ */ n.isValidElement(a)) throw Error([
|
|
291
291
|
"Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.",
|
|
292
292
|
"A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",
|
|
293
293
|
"https://base-ui.com/r/invalid-render-prop"
|
|
294
294
|
].join("\n"));
|
|
295
295
|
return /* @__PURE__ */ n.cloneElement(a, e);
|
|
296
296
|
}
|
|
297
|
-
if (e && typeof e == "string") return
|
|
298
|
-
throw Error(process.env.NODE_ENV === "production" ?
|
|
297
|
+
if (e && typeof e == "string") return Ke(e, r);
|
|
298
|
+
throw Error(process.env.NODE_ENV === "production" ? ue(8) : "Base UI: Render element or function are not defined.");
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Ge(e) {
|
|
301
301
|
let t = e.name;
|
|
302
|
-
t.length !== 0 &&
|
|
302
|
+
t.length !== 0 && He.test(t) && Ue.test(t) && ce(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function Ke(e, t) {
|
|
305
305
|
return e === "button" ? /* @__PURE__ */ i("button", {
|
|
306
306
|
type: "button",
|
|
307
307
|
...t,
|
|
@@ -313,43 +313,43 @@ function We(e, t) {
|
|
|
313
313
|
}) : /* @__PURE__ */ n.createElement(e, t);
|
|
314
314
|
}
|
|
315
315
|
//#endregion
|
|
316
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.
|
|
317
|
-
var
|
|
316
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/safeReact.js
|
|
317
|
+
var qe = { ...n };
|
|
318
318
|
//#endregion
|
|
319
319
|
//#region node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
320
|
-
function
|
|
320
|
+
function Je() {
|
|
321
321
|
return typeof window < "u";
|
|
322
322
|
}
|
|
323
|
-
function
|
|
324
|
-
return
|
|
323
|
+
function Ye(e) {
|
|
324
|
+
return Ze(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function w(e) {
|
|
327
327
|
var t;
|
|
328
328
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
329
329
|
}
|
|
330
|
-
function Je(e) {
|
|
331
|
-
return ((Ye(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
332
|
-
}
|
|
333
|
-
function Ye(e) {
|
|
334
|
-
return Ke() ? e instanceof Node || e instanceof E(e).Node : !1;
|
|
335
|
-
}
|
|
336
330
|
function Xe(e) {
|
|
337
|
-
return
|
|
331
|
+
return ((Ze(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
338
332
|
}
|
|
339
333
|
function Ze(e) {
|
|
340
|
-
return
|
|
334
|
+
return Je() ? e instanceof Node || e instanceof w(e).Node : !1;
|
|
341
335
|
}
|
|
342
336
|
function Qe(e) {
|
|
343
|
-
return
|
|
337
|
+
return Je() ? e instanceof Element || e instanceof w(e).Element : !1;
|
|
344
338
|
}
|
|
345
339
|
function $e(e) {
|
|
346
|
-
|
|
347
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
340
|
+
return Je() ? e instanceof HTMLElement || e instanceof w(e).HTMLElement : !1;
|
|
348
341
|
}
|
|
349
342
|
function et(e) {
|
|
350
|
-
return
|
|
343
|
+
return !Je() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof w(e).ShadowRoot;
|
|
351
344
|
}
|
|
352
345
|
function tt(e) {
|
|
346
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = dt(e);
|
|
347
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
348
|
+
}
|
|
349
|
+
function nt(e) {
|
|
350
|
+
return /^(table|td|th)$/.test(Ye(e));
|
|
351
|
+
}
|
|
352
|
+
function rt(e) {
|
|
353
353
|
try {
|
|
354
354
|
if (e.matches(":popover-open")) return !0;
|
|
355
355
|
} catch {}
|
|
@@ -359,31 +359,31 @@ function tt(e) {
|
|
|
359
359
|
return !1;
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
var
|
|
363
|
-
function
|
|
364
|
-
let t =
|
|
365
|
-
return
|
|
362
|
+
var it = /transform|translate|scale|rotate|perspective|filter/, at = /paint|layout|strict|content/, T = (e) => !!e && e !== "none", ot;
|
|
363
|
+
function st(e) {
|
|
364
|
+
let t = Qe(e) ? dt(e) : e;
|
|
365
|
+
return T(t.transform) || T(t.translate) || T(t.scale) || T(t.rotate) || T(t.perspective) || !lt() && (T(t.backdropFilter) || T(t.filter)) || it.test(t.willChange || "") || at.test(t.contain || "");
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
let t =
|
|
369
|
-
for (;
|
|
370
|
-
if (
|
|
371
|
-
if (
|
|
372
|
-
t =
|
|
367
|
+
function ct(e) {
|
|
368
|
+
let t = E(e);
|
|
369
|
+
for (; $e(t) && !ut(t);) {
|
|
370
|
+
if (st(t)) return t;
|
|
371
|
+
if (rt(t)) return null;
|
|
372
|
+
t = E(t);
|
|
373
373
|
}
|
|
374
374
|
return null;
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
return
|
|
376
|
+
function lt() {
|
|
377
|
+
return ot ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), ot;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
return /^(html|body|#document)$/.test(
|
|
379
|
+
function ut(e) {
|
|
380
|
+
return /^(html|body|#document)$/.test(Ye(e));
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
return
|
|
382
|
+
function dt(e) {
|
|
383
|
+
return w(e).getComputedStyle(e);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
return
|
|
385
|
+
function ft(e) {
|
|
386
|
+
return Qe(e) ? {
|
|
387
387
|
scrollLeft: e.scrollLeft,
|
|
388
388
|
scrollTop: e.scrollTop
|
|
389
389
|
} : {
|
|
@@ -391,38 +391,38 @@ function ut(e) {
|
|
|
391
391
|
scrollTop: e.scrollY
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
if (
|
|
396
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
397
|
-
return
|
|
394
|
+
function E(e) {
|
|
395
|
+
if (Ye(e) === "html") return e;
|
|
396
|
+
let t = e.assignedSlot || e.parentNode || et(e) && e.host || Xe(e);
|
|
397
|
+
return et(t) ? t.host : t;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
let t =
|
|
401
|
-
return
|
|
399
|
+
function pt(e) {
|
|
400
|
+
let t = E(e);
|
|
401
|
+
return ut(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : $e(t) && tt(t) ? t : pt(t);
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function mt(e, t, n) {
|
|
404
404
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
405
|
-
let r =
|
|
405
|
+
let r = pt(e), i = r === e.ownerDocument?.body, a = w(r);
|
|
406
406
|
if (i) {
|
|
407
|
-
let e =
|
|
408
|
-
return t.concat(a, a.visualViewport || [],
|
|
409
|
-
} else return t.concat(r,
|
|
407
|
+
let e = ht(a);
|
|
408
|
+
return t.concat(a, a.visualViewport || [], tt(r) ? r : [], e && n ? mt(e) : []);
|
|
409
|
+
} else return t.concat(r, mt(r, [], n));
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function ht(e) {
|
|
412
412
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
413
413
|
}
|
|
414
414
|
//#endregion
|
|
415
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@
|
|
416
|
-
var
|
|
417
|
-
process.env.NODE_ENV !== "production" && (
|
|
418
|
-
function
|
|
419
|
-
let t = n.useContext(
|
|
420
|
-
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ?
|
|
415
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/internals/composite/root/CompositeRootContext.js
|
|
416
|
+
var gt = /* @__PURE__ */ n.createContext(void 0);
|
|
417
|
+
process.env.NODE_ENV !== "production" && (gt.displayName = "CompositeRootContext");
|
|
418
|
+
function _t(e = !1) {
|
|
419
|
+
let t = n.useContext(gt);
|
|
420
|
+
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? ue(16) : "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");
|
|
421
421
|
return t;
|
|
422
422
|
}
|
|
423
423
|
//#endregion
|
|
424
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@
|
|
425
|
-
function
|
|
424
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/utils/useFocusableWhenDisabled.js
|
|
425
|
+
function vt(e) {
|
|
426
426
|
let { focusableWhenDisabled: t, disabled: r, composite: i = !1, tabIndex: a = 0, isNativeButton: o } = e, s = i && t !== !1, c = i && t === !1;
|
|
427
427
|
return { props: n.useMemo(() => {
|
|
428
428
|
let e = { onKeyDown(e) {
|
|
@@ -440,9 +440,9 @@ function gt(e) {
|
|
|
440
440
|
]) };
|
|
441
441
|
}
|
|
442
442
|
//#endregion
|
|
443
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@
|
|
444
|
-
function
|
|
445
|
-
let { disabled: t = !1, focusableWhenDisabled: r, tabIndex: i = 0, native: a = !0, composite: o } = e, s = n.useRef(null), c =
|
|
443
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/internals/use-button/useButton.js
|
|
444
|
+
function yt(e = {}) {
|
|
445
|
+
let { disabled: t = !1, focusableWhenDisabled: r, tabIndex: i = 0, native: a = !0, composite: o } = e, s = n.useRef(null), c = _t(!0), l = o ?? c !== void 0, { props: u } = vt({
|
|
446
446
|
focusableWhenDisabled: r,
|
|
447
447
|
disabled: t,
|
|
448
448
|
composite: l,
|
|
@@ -451,21 +451,21 @@ function _t(e = {}) {
|
|
|
451
451
|
});
|
|
452
452
|
process.env.NODE_ENV !== "production" && n.useEffect(() => {
|
|
453
453
|
if (!s.current) return;
|
|
454
|
-
let e =
|
|
455
|
-
a ? e ||
|
|
454
|
+
let e = D(s.current);
|
|
455
|
+
a ? e || ee(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${qe.captureOwnerStack?.() || ""}`) : e && ee(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${qe.captureOwnerStack?.() || ""}`);
|
|
456
456
|
}, [a]);
|
|
457
457
|
let d = n.useCallback(() => {
|
|
458
458
|
let e = s.current;
|
|
459
|
-
|
|
459
|
+
D(e) && l && t && u.disabled === void 0 && e.disabled && (e.disabled = !1);
|
|
460
460
|
}, [
|
|
461
461
|
t,
|
|
462
462
|
u.disabled,
|
|
463
463
|
l
|
|
464
464
|
]);
|
|
465
|
-
return
|
|
465
|
+
return oe(d, [d]), {
|
|
466
466
|
getButtonProps: n.useCallback((e = {}) => {
|
|
467
467
|
let { onClick: n, onMouseDown: r, onKeyUp: i, onKeyDown: o, onPointerDown: s, ...c } = e;
|
|
468
|
-
return
|
|
468
|
+
return De({
|
|
469
469
|
type: a ? "button" : void 0,
|
|
470
470
|
onClick(e) {
|
|
471
471
|
if (t) {
|
|
@@ -478,8 +478,8 @@ function _t(e = {}) {
|
|
|
478
478
|
t || r?.(e);
|
|
479
479
|
},
|
|
480
480
|
onKeyDown(e) {
|
|
481
|
-
if (t || (
|
|
482
|
-
let r = e.target === e.currentTarget, i = e.currentTarget, s =
|
|
481
|
+
if (t || (C(e), o?.(e), e.baseUIHandlerPrevented)) return;
|
|
482
|
+
let r = e.target === e.currentTarget, i = e.currentTarget, s = D(i), c = !a && bt(i), u = r && (a ? s : !c), d = e.key === "Enter", f = e.key === " ", p = i.getAttribute("role"), m = p?.startsWith("menuitem") || p === "option" || p === "gridcell";
|
|
483
483
|
if (r && l && f) {
|
|
484
484
|
if (e.defaultPrevented && m) return;
|
|
485
485
|
e.preventDefault(), c || a && s ? (i.click(), e.preventBaseUIHandler()) : u && (n?.(e), e.preventBaseUIHandler());
|
|
@@ -489,7 +489,7 @@ function _t(e = {}) {
|
|
|
489
489
|
},
|
|
490
490
|
onKeyUp(e) {
|
|
491
491
|
if (!t) {
|
|
492
|
-
if (
|
|
492
|
+
if (C(e), i?.(e), e.target === e.currentTarget && a && l && D(e.currentTarget) && e.key === " ") {
|
|
493
493
|
e.preventDefault();
|
|
494
494
|
return;
|
|
495
495
|
}
|
|
@@ -510,31 +510,31 @@ function _t(e = {}) {
|
|
|
510
510
|
l,
|
|
511
511
|
a
|
|
512
512
|
]),
|
|
513
|
-
buttonRef:
|
|
513
|
+
buttonRef: re((e) => {
|
|
514
514
|
s.current = e, d();
|
|
515
515
|
})
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
return
|
|
518
|
+
function D(e) {
|
|
519
|
+
return $e(e) && e.tagName === "BUTTON";
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function bt(e) {
|
|
522
522
|
return !!(e?.tagName === "A" && e?.href);
|
|
523
523
|
}
|
|
524
524
|
//#endregion
|
|
525
525
|
//#region node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
|
|
526
|
-
var
|
|
527
|
-
if (t?.variants == null) return
|
|
526
|
+
var xt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, St = e, Ct = (e, t) => (n) => {
|
|
527
|
+
if (t?.variants == null) return St(e, n?.class, n?.className);
|
|
528
528
|
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
529
529
|
let t = n?.[e], a = i?.[e];
|
|
530
530
|
if (t === null) return null;
|
|
531
|
-
let o =
|
|
531
|
+
let o = xt(t) || xt(a);
|
|
532
532
|
return r[e][o];
|
|
533
533
|
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
534
534
|
let [n, r] = t;
|
|
535
535
|
return r === void 0 || (e[n] = r), e;
|
|
536
536
|
}, {});
|
|
537
|
-
return
|
|
537
|
+
return St(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
538
538
|
let { class: n, className: r, ...a } = t;
|
|
539
539
|
return Object.entries(a).every((e) => {
|
|
540
540
|
let [t, n] = e;
|
|
@@ -551,7 +551,7 @@ var bt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, xt = e, St =
|
|
|
551
551
|
r
|
|
552
552
|
] : e;
|
|
553
553
|
}, []), n?.class, n?.className);
|
|
554
|
-
},
|
|
554
|
+
}, wt = Ct("group flex items-center justify-start gap-sm rounded-xl border px-md py-sm transition-all [&>svg]:size-lg", {
|
|
555
555
|
variants: { tone: {
|
|
556
556
|
brand: "border-brand-border bg-brand-container [&_[data-description]]:text-brand-on-container-muted [&_[data-title]]:text-brand-on-container [&_svg]:text-brand-on-container",
|
|
557
557
|
accent: "border-accent-border bg-accent-container [&_[data-description]]:text-accent-on-container-muted [&_[data-title]]:text-accent-on-container [&_svg]:text-accent-on-container",
|
|
@@ -562,41 +562,41 @@ var bt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, xt = e, St =
|
|
|
562
562
|
warning: "border-warning-border bg-warning-container [&_[data-description]]:text-warning-on-container-muted [&_[data-title]]:text-warning-on-container [&_svg]:text-warning-on-container"
|
|
563
563
|
} },
|
|
564
564
|
defaultVariants: { tone: "brand" }
|
|
565
|
-
}),
|
|
566
|
-
className: t(
|
|
565
|
+
}), Tt = ({ tone: e, className: n, children: r, ref: i, ...a }) => /* @__PURE__ */ m("div", {
|
|
566
|
+
className: t(wt({
|
|
567
567
|
tone: e,
|
|
568
568
|
className: n
|
|
569
569
|
})),
|
|
570
570
|
ref: i,
|
|
571
571
|
...a,
|
|
572
572
|
children: r
|
|
573
|
-
}),
|
|
573
|
+
}), Et = ({ className: e, children: n, ref: r, ...i }) => /* @__PURE__ */ m("div", {
|
|
574
574
|
className: t("style-text-prose-0", e),
|
|
575
575
|
"data-description": !0,
|
|
576
576
|
ref: r,
|
|
577
577
|
...i,
|
|
578
578
|
children: n
|
|
579
|
-
}),
|
|
579
|
+
}), Dt = ({ className: e, children: n, ref: r, ...i }) => /* @__PURE__ */ m("div", {
|
|
580
580
|
className: t("", e),
|
|
581
581
|
ref: r,
|
|
582
582
|
...i,
|
|
583
583
|
children: n
|
|
584
|
-
}),
|
|
585
|
-
let { render: n, className: r, disabled: i = !1, focusableWhenDisabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { getButtonProps: l, buttonRef: u } =
|
|
584
|
+
}), Ot = /* @__PURE__ */ n.forwardRef(function(e, t) {
|
|
585
|
+
let { render: n, className: r, disabled: i = !1, focusableWhenDisabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { getButtonProps: l, buttonRef: u } = yt({
|
|
586
586
|
disabled: i,
|
|
587
587
|
focusableWhenDisabled: a,
|
|
588
588
|
native: o
|
|
589
589
|
});
|
|
590
|
-
return
|
|
590
|
+
return Re("button", e, {
|
|
591
591
|
state: { disabled: i },
|
|
592
592
|
ref: [t, u],
|
|
593
593
|
props: [c, l]
|
|
594
594
|
});
|
|
595
595
|
});
|
|
596
|
-
process.env.NODE_ENV !== "production" && (
|
|
596
|
+
process.env.NODE_ENV !== "production" && (Ot.displayName = "Button");
|
|
597
597
|
//#endregion
|
|
598
598
|
//#region src/components/button/button.types.ts
|
|
599
|
-
var
|
|
599
|
+
var kt = Ct("inline-flex cursor-pointer items-center justify-center rounded-full whitespace-nowrap transition-all select-none disabled:pointer-events-none disabled:opacity-50 [&>svg]:shrink-0", {
|
|
600
600
|
variants: {
|
|
601
601
|
tone: {
|
|
602
602
|
brand: "",
|
|
@@ -807,9 +807,9 @@ var Ot = St("inline-flex cursor-pointer items-center justify-center rounded-full
|
|
|
807
807
|
className: "bg-warning-container text-warning-on-container not-active:hover:bg-warning-container-high"
|
|
808
808
|
}
|
|
809
809
|
]
|
|
810
|
-
}),
|
|
810
|
+
}), At = ({ tone: e, variant: n, size: r, className: i, children: a, ...o }) => /* @__PURE__ */ m(Ot, {
|
|
811
811
|
"data-size": r,
|
|
812
|
-
className: t(
|
|
812
|
+
className: t(kt({
|
|
813
813
|
tone: e,
|
|
814
814
|
variant: n,
|
|
815
815
|
size: r,
|
|
@@ -817,7 +817,7 @@ var Ot = St("inline-flex cursor-pointer items-center justify-center rounded-full
|
|
|
817
817
|
})),
|
|
818
818
|
...o,
|
|
819
819
|
children: a
|
|
820
|
-
}),
|
|
820
|
+
}), jt = /* @__PURE__ */ new Map([
|
|
821
821
|
["bold", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z" }))],
|
|
822
822
|
["duotone", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", {
|
|
823
823
|
d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",
|
|
@@ -827,7 +827,7 @@ var Ot = St("inline-flex cursor-pointer items-center justify-center rounded-full
|
|
|
827
827
|
["light", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z" }))],
|
|
828
828
|
["regular", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z" }))],
|
|
829
829
|
["thin", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z" }))]
|
|
830
|
-
]),
|
|
830
|
+
]), Mt = /* @__PURE__ */ new Map([
|
|
831
831
|
["bold", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z" }))],
|
|
832
832
|
["duotone", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", {
|
|
833
833
|
d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",
|
|
@@ -837,13 +837,13 @@ var Ot = St("inline-flex cursor-pointer items-center justify-center rounded-full
|
|
|
837
837
|
["light", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z" }))],
|
|
838
838
|
["regular", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" }))],
|
|
839
839
|
["thin", /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z" }))]
|
|
840
|
-
]),
|
|
840
|
+
]), Nt = r({
|
|
841
841
|
color: "currentColor",
|
|
842
842
|
size: "1em",
|
|
843
843
|
weight: "regular",
|
|
844
844
|
mirrored: !1
|
|
845
|
-
}),
|
|
846
|
-
let { alt: r, color: i, size: a, weight: o, mirrored: s, children: c, weights: l, ...u } = e, { color: d = "currentColor", size: f, weight: p = "regular", mirrored: m = !1, ...h } = n.useContext(
|
|
845
|
+
}), Pt = n.forwardRef((e, t) => {
|
|
846
|
+
let { alt: r, color: i, size: a, weight: o, mirrored: s, children: c, weights: l, ...u } = e, { color: d = "currentColor", size: f, weight: p = "regular", mirrored: m = !1, ...h } = n.useContext(Nt);
|
|
847
847
|
return /* @__PURE__ */ n.createElement("svg", {
|
|
848
848
|
ref: t,
|
|
849
849
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -856,28 +856,28 @@ var Ot = St("inline-flex cursor-pointer items-center justify-center rounded-full
|
|
|
856
856
|
...u
|
|
857
857
|
}, !!r && /* @__PURE__ */ n.createElement("title", null, r), c, l.get(o ?? p));
|
|
858
858
|
});
|
|
859
|
-
|
|
859
|
+
Pt.displayName = "IconBase";
|
|
860
860
|
//#endregion
|
|
861
|
-
//#region node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.
|
|
862
|
-
var
|
|
861
|
+
//#region node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@phosphor-icons/react/dist/csr/CircleNotch.es.js
|
|
862
|
+
var Ft = n.forwardRef((e, t) => /* @__PURE__ */ n.createElement(Pt, {
|
|
863
863
|
ref: t,
|
|
864
864
|
...e,
|
|
865
|
-
weights:
|
|
865
|
+
weights: jt
|
|
866
866
|
}));
|
|
867
|
-
|
|
867
|
+
Ft.displayName = "CircleNotchIcon";
|
|
868
868
|
//#endregion
|
|
869
|
-
//#region node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.
|
|
870
|
-
var
|
|
869
|
+
//#region node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@phosphor-icons/react/dist/csr/XCircle.es.js
|
|
870
|
+
var It = n.forwardRef((e, t) => /* @__PURE__ */ n.createElement(Pt, {
|
|
871
871
|
ref: t,
|
|
872
872
|
...e,
|
|
873
|
-
weights:
|
|
873
|
+
weights: Mt
|
|
874
874
|
}));
|
|
875
|
-
|
|
875
|
+
It.displayName = "XCircleIcon";
|
|
876
876
|
//#endregion
|
|
877
877
|
//#region node_modules/.pnpm/@tanstack+store@0.9.3/node_modules/@tanstack/store/dist/esm/alien.js
|
|
878
|
-
var
|
|
878
|
+
var O = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Mutable = 1] = "Mutable", e[e.Watching = 2] = "Watching", e[e.RecursedCheck = 4] = "RecursedCheck", e[e.Recursed = 8] = "Recursed", e[e.Dirty = 16] = "Dirty", e[e.Pending = 32] = "Pending", e))(O || {});
|
|
879
879
|
/* @__NO_SIDE_EFFECTS__ */
|
|
880
|
-
function
|
|
880
|
+
function Lt({ update: e, notify: t, unwatched: n }) {
|
|
881
881
|
return {
|
|
882
882
|
link: r,
|
|
883
883
|
unlink: i,
|
|
@@ -996,7 +996,7 @@ function Ft({ update: e, notify: t, unwatched: n }) {
|
|
|
996
996
|
}
|
|
997
997
|
//#endregion
|
|
998
998
|
//#region node_modules/.pnpm/@tanstack+store@0.9.3/node_modules/@tanstack/store/dist/esm/atom.js
|
|
999
|
-
function
|
|
999
|
+
function Rt(e, t, n) {
|
|
1000
1000
|
let r = typeof e == "object", i = r ? e : void 0;
|
|
1001
1001
|
return {
|
|
1002
1002
|
next: (r ? e.next : e)?.bind(i),
|
|
@@ -1004,50 +1004,50 @@ function It(e, t, n) {
|
|
|
1004
1004
|
complete: (r ? e.complete : n)?.bind(i)
|
|
1005
1005
|
};
|
|
1006
1006
|
}
|
|
1007
|
-
var
|
|
1007
|
+
var zt = [], k = 0, { link: Bt, unlink: Vt, propagate: Ht, checkDirty: Ut, shallowPropagate: Wt } = /* @__PURE__ */ Lt({
|
|
1008
1008
|
update(e) {
|
|
1009
1009
|
return e._update();
|
|
1010
1010
|
},
|
|
1011
1011
|
notify(e) {
|
|
1012
|
-
|
|
1012
|
+
zt[Gt++] = e, e.flags &= ~O.Watching;
|
|
1013
1013
|
},
|
|
1014
1014
|
unwatched(e) {
|
|
1015
|
-
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags =
|
|
1015
|
+
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = O.Mutable | O.Dirty, qt(e));
|
|
1016
1016
|
}
|
|
1017
|
-
}),
|
|
1018
|
-
function
|
|
1017
|
+
}), A = 0, Gt = 0, j, Kt = 0;
|
|
1018
|
+
function M(e) {
|
|
1019
1019
|
try {
|
|
1020
|
-
++
|
|
1020
|
+
++Kt, e();
|
|
1021
1021
|
} finally {
|
|
1022
|
-
--
|
|
1022
|
+
--Kt || Jt();
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function qt(e) {
|
|
1026
1026
|
let t = e.depsTail, n = t === void 0 ? e.deps : t.nextDep;
|
|
1027
|
-
for (; n !== void 0;) n =
|
|
1027
|
+
for (; n !== void 0;) n = Vt(n, e);
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1030
|
-
if (!(
|
|
1031
|
-
for (;
|
|
1032
|
-
let e =
|
|
1033
|
-
|
|
1029
|
+
function Jt() {
|
|
1030
|
+
if (!(Kt > 0)) {
|
|
1031
|
+
for (; A < Gt;) {
|
|
1032
|
+
let e = zt[A];
|
|
1033
|
+
zt[A++] = void 0, e.notify();
|
|
1034
1034
|
}
|
|
1035
|
-
|
|
1035
|
+
A = 0, Gt = 0;
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function Yt(e, t) {
|
|
1039
1039
|
let n = typeof e == "function", r = e, i = {
|
|
1040
1040
|
_snapshot: n ? void 0 : e,
|
|
1041
1041
|
subs: void 0,
|
|
1042
1042
|
subsTail: void 0,
|
|
1043
1043
|
deps: void 0,
|
|
1044
1044
|
depsTail: void 0,
|
|
1045
|
-
flags: n ?
|
|
1045
|
+
flags: n ? O.None : O.Mutable,
|
|
1046
1046
|
get() {
|
|
1047
|
-
return
|
|
1047
|
+
return j !== void 0 && Bt(i, j, k), i._snapshot;
|
|
1048
1048
|
},
|
|
1049
1049
|
subscribe(e) {
|
|
1050
|
-
let t =
|
|
1050
|
+
let t = Rt(e), n = { current: !1 }, r = Xt(() => {
|
|
1051
1051
|
i.get(), n.current ? t.next?.(i._snapshot) : n.current = !0;
|
|
1052
1052
|
});
|
|
1053
1053
|
return { unsubscribe: () => {
|
|
@@ -1055,64 +1055,64 @@ function Jt(e, t) {
|
|
|
1055
1055
|
} };
|
|
1056
1056
|
},
|
|
1057
1057
|
_update(e) {
|
|
1058
|
-
let a =
|
|
1059
|
-
if (n)
|
|
1058
|
+
let a = j, o = t?.compare ?? Object.is;
|
|
1059
|
+
if (n) j = i, ++k, i.depsTail = void 0;
|
|
1060
1060
|
else if (e === void 0) return !1;
|
|
1061
|
-
n && (i.flags =
|
|
1061
|
+
n && (i.flags = O.Mutable | O.RecursedCheck);
|
|
1062
1062
|
try {
|
|
1063
1063
|
let t = i._snapshot, a = typeof e == "function" ? e(t) : e === void 0 && n ? r(t) : e;
|
|
1064
1064
|
return t === void 0 || !o(t, a) ? (i._snapshot = a, !0) : !1;
|
|
1065
1065
|
} finally {
|
|
1066
|
-
|
|
1066
|
+
j = a, n && (i.flags &= ~O.RecursedCheck), qt(i);
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
1069
|
};
|
|
1070
|
-
return n ? (i.flags =
|
|
1070
|
+
return n ? (i.flags = O.Mutable | O.Dirty, i.get = function() {
|
|
1071
1071
|
let e = i.flags;
|
|
1072
|
-
if (e &
|
|
1072
|
+
if (e & O.Dirty || e & O.Pending && Ut(i.deps, i)) {
|
|
1073
1073
|
if (i._update()) {
|
|
1074
1074
|
let e = i.subs;
|
|
1075
|
-
e !== void 0 &&
|
|
1075
|
+
e !== void 0 && Wt(e);
|
|
1076
1076
|
}
|
|
1077
|
-
} else e &
|
|
1078
|
-
return
|
|
1077
|
+
} else e & O.Pending && (i.flags = e & ~O.Pending);
|
|
1078
|
+
return j !== void 0 && Bt(i, j, k), i._snapshot;
|
|
1079
1079
|
}) : i.set = function(e) {
|
|
1080
1080
|
if (i._update(e)) {
|
|
1081
1081
|
let e = i.subs;
|
|
1082
|
-
e !== void 0 && (
|
|
1082
|
+
e !== void 0 && (Ht(e), Wt(e), Jt());
|
|
1083
1083
|
}
|
|
1084
1084
|
}, i;
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function Xt(e) {
|
|
1087
1087
|
let t = () => {
|
|
1088
|
-
let t =
|
|
1089
|
-
|
|
1088
|
+
let t = j;
|
|
1089
|
+
j = n, ++k, n.depsTail = void 0, n.flags = O.Watching | O.RecursedCheck;
|
|
1090
1090
|
try {
|
|
1091
1091
|
return e();
|
|
1092
1092
|
} finally {
|
|
1093
|
-
|
|
1093
|
+
j = t, n.flags &= ~O.RecursedCheck, qt(n);
|
|
1094
1094
|
}
|
|
1095
1095
|
}, n = {
|
|
1096
1096
|
deps: void 0,
|
|
1097
1097
|
depsTail: void 0,
|
|
1098
1098
|
subs: void 0,
|
|
1099
1099
|
subsTail: void 0,
|
|
1100
|
-
flags:
|
|
1100
|
+
flags: O.Watching | O.RecursedCheck,
|
|
1101
1101
|
notify() {
|
|
1102
1102
|
let e = this.flags;
|
|
1103
|
-
e &
|
|
1103
|
+
e & O.Dirty || e & O.Pending && Ut(this.deps, this) ? t() : this.flags = O.Watching;
|
|
1104
1104
|
},
|
|
1105
1105
|
stop() {
|
|
1106
|
-
this.flags =
|
|
1106
|
+
this.flags = O.None, this.depsTail = void 0, qt(this);
|
|
1107
1107
|
}
|
|
1108
1108
|
};
|
|
1109
1109
|
return t(), n;
|
|
1110
1110
|
}
|
|
1111
1111
|
//#endregion
|
|
1112
1112
|
//#region node_modules/.pnpm/@tanstack+store@0.9.3/node_modules/@tanstack/store/dist/esm/store.js
|
|
1113
|
-
var
|
|
1113
|
+
var Zt = class {
|
|
1114
1114
|
constructor(e) {
|
|
1115
|
-
this.atom =
|
|
1115
|
+
this.atom = Yt(e);
|
|
1116
1116
|
}
|
|
1117
1117
|
setState(e) {
|
|
1118
1118
|
this.atom.set(e);
|
|
@@ -1124,11 +1124,11 @@ var Xt = class {
|
|
|
1124
1124
|
return this.state;
|
|
1125
1125
|
}
|
|
1126
1126
|
subscribe(e) {
|
|
1127
|
-
return this.atom.subscribe(
|
|
1127
|
+
return this.atom.subscribe(Rt(e));
|
|
1128
1128
|
}
|
|
1129
|
-
},
|
|
1129
|
+
}, Qt = class {
|
|
1130
1130
|
constructor(e) {
|
|
1131
|
-
this.atom =
|
|
1131
|
+
this.atom = Yt(e);
|
|
1132
1132
|
}
|
|
1133
1133
|
get state() {
|
|
1134
1134
|
return this.atom.get();
|
|
@@ -1137,15 +1137,15 @@ var Xt = class {
|
|
|
1137
1137
|
return this.state;
|
|
1138
1138
|
}
|
|
1139
1139
|
subscribe(e) {
|
|
1140
|
-
return this.atom.subscribe(
|
|
1140
|
+
return this.atom.subscribe(Rt(e));
|
|
1141
1141
|
}
|
|
1142
1142
|
};
|
|
1143
|
-
function
|
|
1144
|
-
return typeof e == "function" ? new
|
|
1143
|
+
function N(e) {
|
|
1144
|
+
return typeof e == "function" ? new Qt(e) : new Zt(e);
|
|
1145
1145
|
}
|
|
1146
1146
|
//#endregion
|
|
1147
1147
|
//#region node_modules/.pnpm/@tanstack+pacer-lite@0.1.1/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js
|
|
1148
|
-
var
|
|
1148
|
+
var $t = class {
|
|
1149
1149
|
constructor(e, t) {
|
|
1150
1150
|
this.fn = e, this.options = t, this.lastExecutionTime = 0, this.isPending = !1, this.maybeExecute = (...e) => {
|
|
1151
1151
|
let t = Date.now() - this.lastExecutionTime;
|
|
@@ -1167,12 +1167,12 @@ var Qt = class {
|
|
|
1167
1167
|
}, this.options.leading === void 0 && this.options.trailing === void 0 && (this.options.leading = !0, this.options.trailing = !0);
|
|
1168
1168
|
}
|
|
1169
1169
|
};
|
|
1170
|
-
function
|
|
1171
|
-
return new
|
|
1170
|
+
function en(e, t) {
|
|
1171
|
+
return new $t(e, t).maybeExecute;
|
|
1172
1172
|
}
|
|
1173
1173
|
//#endregion
|
|
1174
1174
|
//#region node_modules/.pnpm/@tanstack+devtools-event-client@0.4.3/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js
|
|
1175
|
-
var
|
|
1175
|
+
var tn = class {
|
|
1176
1176
|
#e = !0;
|
|
1177
1177
|
#t;
|
|
1178
1178
|
#n;
|
|
@@ -1292,7 +1292,7 @@ var en = class {
|
|
|
1292
1292
|
};
|
|
1293
1293
|
return this.#n().addEventListener("tanstack-devtools-global", t), () => this.#n().removeEventListener("tanstack-devtools-global", t);
|
|
1294
1294
|
}
|
|
1295
|
-
},
|
|
1295
|
+
}, P = new class extends tn {
|
|
1296
1296
|
constructor() {
|
|
1297
1297
|
super({
|
|
1298
1298
|
pluginId: "form-devtools",
|
|
@@ -1301,20 +1301,20 @@ var en = class {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
}();
|
|
1303
1303
|
//#endregion
|
|
1304
|
-
//#region node_modules/.pnpm/@tanstack+form-core@1.
|
|
1305
|
-
function
|
|
1304
|
+
//#region node_modules/.pnpm/@tanstack+form-core@1.32.0/node_modules/@tanstack/form-core/dist/esm/utils.js
|
|
1305
|
+
function F(e, t) {
|
|
1306
1306
|
return typeof e == "function" ? e(t) : e;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1309
|
-
return
|
|
1308
|
+
function I(e, t) {
|
|
1309
|
+
return z(t).reduce((e, t) => {
|
|
1310
1310
|
if (e === null) return null;
|
|
1311
1311
|
if (e !== void 0) return e[t];
|
|
1312
1312
|
}, e);
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1315
|
-
let r =
|
|
1314
|
+
function L(e, t, n) {
|
|
1315
|
+
let r = z(t);
|
|
1316
1316
|
function i(e) {
|
|
1317
|
-
if (!r.length) return
|
|
1317
|
+
if (!r.length) return F(n, e);
|
|
1318
1318
|
let t = r.shift();
|
|
1319
1319
|
if (typeof t == "string" || typeof t == "number" && !Array.isArray(e)) return typeof e == "object" ? (e === null && (e = {}), {
|
|
1320
1320
|
...e,
|
|
@@ -1332,8 +1332,8 @@ function R(e, t, n) {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
return i(e);
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1336
|
-
let n =
|
|
1335
|
+
function nn(e, t) {
|
|
1336
|
+
let n = z(t);
|
|
1337
1337
|
function r(e) {
|
|
1338
1338
|
if (!e) return;
|
|
1339
1339
|
if (n.length === 1) {
|
|
@@ -1360,25 +1360,25 @@ function tn(e, t) {
|
|
|
1360
1360
|
}
|
|
1361
1361
|
return r(e);
|
|
1362
1362
|
}
|
|
1363
|
-
var
|
|
1364
|
-
function
|
|
1363
|
+
var rn = /^(\d+)$/gm, an = /\.(\d+)(?=\.)/gm, on = /^(\d+)\./gm, sn = /\.(\d+$)/gm, cn = /\.{2,}/gm, ln = "__int__", R = `${ln}$1`;
|
|
1364
|
+
function z(e) {
|
|
1365
1365
|
if (Array.isArray(e)) return [...e];
|
|
1366
1366
|
if (typeof e != "string") throw Error("Path must be a string.");
|
|
1367
|
-
return e.replace(/(^\[)|]/gm, "").replace(/\[/g, ".").replace(
|
|
1368
|
-
if (e.startsWith(
|
|
1367
|
+
return e.replace(/(^\[)|]/gm, "").replace(/\[/g, ".").replace(rn, R).replace(an, `.${R}.`).replace(on, `${R}.`).replace(sn, `.${R}`).replace(cn, ".").split(".").map((e) => {
|
|
1368
|
+
if (e.startsWith(ln)) {
|
|
1369
1369
|
let t = e.substring(7), n = parseInt(t, 10);
|
|
1370
1370
|
return String(n) === t ? n : t;
|
|
1371
1371
|
}
|
|
1372
1372
|
return e;
|
|
1373
1373
|
});
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function un(e, t) {
|
|
1376
1376
|
return e.length === 0 ? t : t.length === 0 ? e : t.startsWith("[") || t.startsWith(".") ? e + t : `${e}.${t}`;
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function dn(e) {
|
|
1379
1379
|
return !(Array.isArray(e) && e.length === 0);
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function fn(e, t) {
|
|
1382
1382
|
return t.validationLogic({
|
|
1383
1383
|
form: t.form,
|
|
1384
1384
|
validators: t.validators,
|
|
@@ -1393,7 +1393,7 @@ function dn(e, t) {
|
|
|
1393
1393
|
}))
|
|
1394
1394
|
});
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function pn(e, t) {
|
|
1397
1397
|
let { asyncDebounceMs: n } = t, { onBlurAsyncDebounceMs: r, onChangeAsyncDebounceMs: i, onDynamicAsyncDebounceMs: a } = t.validators || {}, o = n ?? 0;
|
|
1398
1398
|
return t.validationLogic({
|
|
1399
1399
|
form: t.form,
|
|
@@ -1427,8 +1427,8 @@ function fn(e, t) {
|
|
|
1427
1427
|
})
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
|
-
var
|
|
1431
|
-
function
|
|
1430
|
+
var B = (e) => !!e && typeof e == "object" && "fields" in e;
|
|
1431
|
+
function V(e, t) {
|
|
1432
1432
|
if (Object.is(e, t)) return !0;
|
|
1433
1433
|
if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
|
|
1434
1434
|
if (e instanceof Date && t instanceof Date) return e.getTime() === t.getTime();
|
|
@@ -1443,11 +1443,11 @@ function H(e, t) {
|
|
|
1443
1443
|
return !0;
|
|
1444
1444
|
}
|
|
1445
1445
|
let n = Object.keys(e), r = Object.keys(t);
|
|
1446
|
-
if (n.length !== r.length) return !1;
|
|
1447
|
-
for (let i of n) if (!r.includes(i) || !
|
|
1446
|
+
if (n.length !== r.length || n.length === 0 && !Array.isArray(e) && !Array.isArray(t) && (Object.getPrototypeOf(e) !== Object.prototype || Object.getPrototypeOf(t) !== Object.prototype)) return !1;
|
|
1447
|
+
for (let i of n) if (!r.includes(i) || !V(e[i], t[i])) return !1;
|
|
1448
1448
|
return !0;
|
|
1449
1449
|
}
|
|
1450
|
-
var
|
|
1450
|
+
var mn = ({ newFormValidatorError: e, isPreviousErrorFromFormValidator: t, previousErrorValue: n }) => e ? {
|
|
1451
1451
|
newErrorValue: e,
|
|
1452
1452
|
newSource: "form"
|
|
1453
1453
|
} : t ? {
|
|
@@ -1459,7 +1459,7 @@ var pn = ({ newFormValidatorError: e, isPreviousErrorFromFormValidator: t, previ
|
|
|
1459
1459
|
} : {
|
|
1460
1460
|
newErrorValue: void 0,
|
|
1461
1461
|
newSource: void 0
|
|
1462
|
-
},
|
|
1462
|
+
}, hn = ({ formLevelError: e, fieldLevelError: t }) => t ? {
|
|
1463
1463
|
newErrorValue: t,
|
|
1464
1464
|
newSource: "field"
|
|
1465
1465
|
} : e ? {
|
|
@@ -1469,53 +1469,53 @@ var pn = ({ newFormValidatorError: e, isPreviousErrorFromFormValidator: t, previ
|
|
|
1469
1469
|
newErrorValue: void 0,
|
|
1470
1470
|
newSource: void 0
|
|
1471
1471
|
};
|
|
1472
|
-
function
|
|
1472
|
+
function H(e, t) {
|
|
1473
1473
|
return e == null ? t : {
|
|
1474
1474
|
...e,
|
|
1475
1475
|
...t
|
|
1476
1476
|
};
|
|
1477
1477
|
}
|
|
1478
|
-
for (var
|
|
1479
|
-
function
|
|
1478
|
+
for (var U = 256, W = [], G; U--;) W[U] = (U + 256).toString(16).substring(1);
|
|
1479
|
+
function gn() {
|
|
1480
1480
|
let e = 0, t, n = "";
|
|
1481
|
-
if (!
|
|
1482
|
-
for (
|
|
1483
|
-
e = 0,
|
|
1481
|
+
if (!G || U + 16 > 256) {
|
|
1482
|
+
for (G = Array(256), e = 256; e--;) G[e] = 256 * Math.random() | 0;
|
|
1483
|
+
e = 0, U = 0;
|
|
1484
1484
|
}
|
|
1485
|
-
for (; e < 16; e++) t =
|
|
1486
|
-
return
|
|
1485
|
+
for (; e < 16; e++) t = G[U + e], e === 6 ? n += W[t & 15 | 64] : e === 8 ? n += W[t & 63 | 128] : n += W[t], e & 1 && e > 1 && e < 11 && (n += "-");
|
|
1486
|
+
return U++, n;
|
|
1487
1487
|
}
|
|
1488
|
-
var
|
|
1488
|
+
var _n = en((e) => P.emit("form-state", {
|
|
1489
1489
|
id: e.formId,
|
|
1490
1490
|
state: e.store.state
|
|
1491
1491
|
}), { wait: 300 });
|
|
1492
|
-
function
|
|
1492
|
+
function K(e) {
|
|
1493
1493
|
if (typeof e != "object" || !e) return e;
|
|
1494
1494
|
if (e instanceof Date) return new Date(e.getTime());
|
|
1495
1495
|
if (Array.isArray(e)) {
|
|
1496
1496
|
let t = [];
|
|
1497
|
-
for (let n = 0; n < e.length; n++) t[n] =
|
|
1497
|
+
for (let n = 0; n < e.length; n++) t[n] = K(e[n]);
|
|
1498
1498
|
return t;
|
|
1499
1499
|
}
|
|
1500
1500
|
if (e instanceof Map) {
|
|
1501
1501
|
let t = /* @__PURE__ */ new Map();
|
|
1502
1502
|
return e.forEach((e, n) => {
|
|
1503
|
-
t.set(n,
|
|
1503
|
+
t.set(n, K(e));
|
|
1504
1504
|
}), t;
|
|
1505
1505
|
}
|
|
1506
1506
|
if (e instanceof Set) {
|
|
1507
1507
|
let t = /* @__PURE__ */ new Set();
|
|
1508
1508
|
return e.forEach((e) => {
|
|
1509
|
-
t.add(
|
|
1509
|
+
t.add(K(e));
|
|
1510
1510
|
}), t;
|
|
1511
1511
|
}
|
|
1512
1512
|
let t = {};
|
|
1513
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
1513
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = K(e[n]));
|
|
1514
1514
|
return t;
|
|
1515
1515
|
}
|
|
1516
1516
|
//#endregion
|
|
1517
|
-
//#region node_modules/.pnpm/@tanstack+form-core@1.
|
|
1518
|
-
var
|
|
1517
|
+
//#region node_modules/.pnpm/@tanstack+form-core@1.32.0/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js
|
|
1518
|
+
var q = (e) => {
|
|
1519
1519
|
if (!e.validators) return e.runValidation({
|
|
1520
1520
|
validators: [],
|
|
1521
1521
|
form: e.form
|
|
@@ -1566,8 +1566,8 @@ var J = (e) => {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
};
|
|
1568
1568
|
//#endregion
|
|
1569
|
-
//#region node_modules/.pnpm/@tanstack+form-core@1.
|
|
1570
|
-
function
|
|
1569
|
+
//#region node_modules/.pnpm/@tanstack+form-core@1.32.0/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js
|
|
1570
|
+
function vn(e, t) {
|
|
1571
1571
|
let n = /* @__PURE__ */ new Map();
|
|
1572
1572
|
for (let r of e) {
|
|
1573
1573
|
let e = r.path ?? [], i = t, a = "";
|
|
@@ -1581,23 +1581,23 @@ function _n(e, t) {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
return Object.fromEntries(n);
|
|
1583
1583
|
}
|
|
1584
|
-
var
|
|
1585
|
-
let n =
|
|
1584
|
+
var yn = (e, t) => {
|
|
1585
|
+
let n = vn(e, t);
|
|
1586
1586
|
return {
|
|
1587
1587
|
form: n,
|
|
1588
1588
|
fields: n
|
|
1589
1589
|
};
|
|
1590
|
-
},
|
|
1590
|
+
}, J = {
|
|
1591
1591
|
validate({ value: e, validationSource: t }, n) {
|
|
1592
1592
|
let r = n["~standard"].validate(e);
|
|
1593
1593
|
if (r instanceof Promise) throw Error("async function passed to sync validator");
|
|
1594
|
-
if (r.issues) return t === "field" ? r.issues :
|
|
1594
|
+
if (r.issues) return t === "field" ? r.issues : yn(r.issues, e);
|
|
1595
1595
|
},
|
|
1596
1596
|
async validateAsync({ value: e, validationSource: t }, n) {
|
|
1597
1597
|
let r = await n["~standard"].validate(e);
|
|
1598
|
-
if (r.issues) return t === "field" ? r.issues :
|
|
1598
|
+
if (r.issues) return t === "field" ? r.issues : yn(r.issues, e);
|
|
1599
1599
|
}
|
|
1600
|
-
},
|
|
1600
|
+
}, bn = (e) => !!e && "~standard" in e, Y = {
|
|
1601
1601
|
isValidating: !1,
|
|
1602
1602
|
isTouched: !1,
|
|
1603
1603
|
isBlurred: !1,
|
|
@@ -1607,78 +1607,89 @@ var vn = (e, t) => {
|
|
|
1607
1607
|
isDefaultValue: !0,
|
|
1608
1608
|
errors: [],
|
|
1609
1609
|
errorMap: {},
|
|
1610
|
-
errorSourceMap: {}
|
|
1610
|
+
errorSourceMap: {},
|
|
1611
|
+
_arrayVersion: 0
|
|
1611
1612
|
};
|
|
1612
|
-
function
|
|
1613
|
-
function t(t
|
|
1614
|
-
let
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
let o = i.replace(a(t, r), a(t, n)), s = u.get(o);
|
|
1619
|
-
s && e.setFieldMeta(i, s);
|
|
1613
|
+
function X(e) {
|
|
1614
|
+
function t(t) {
|
|
1615
|
+
let n = e.getFieldMeta(t) ?? Y;
|
|
1616
|
+
e.setFieldMeta(t, {
|
|
1617
|
+
...n,
|
|
1618
|
+
_arrayVersion: (n._arrayVersion || 0) + 1
|
|
1620
1619
|
});
|
|
1621
1620
|
}
|
|
1622
|
-
function n(
|
|
1623
|
-
|
|
1621
|
+
function n(n, r, i) {
|
|
1622
|
+
t(n);
|
|
1623
|
+
let a = s(n, r, "move", i), c = Math.min(r, i), u = Math.max(r, i);
|
|
1624
|
+
for (let e = c; e <= u; e++) a.push(o(n, e));
|
|
1625
|
+
let d = Object.keys(e.fieldInfo).reduce((t, i) => (i.startsWith(o(n, r)) && t.set(i, e.getFieldMeta(i)), t), /* @__PURE__ */ new Map());
|
|
1626
|
+
l(a, r < i ? "up" : "down"), Object.keys(e.fieldInfo).filter((e) => e.startsWith(o(n, i))).forEach((t) => {
|
|
1627
|
+
let a = t.replace(o(n, i), o(n, r)), s = d.get(a);
|
|
1628
|
+
s && e.setFieldMeta(t, s);
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
function r(e, n) {
|
|
1632
|
+
t(e), l(s(e, n, "remove"), "up");
|
|
1624
1633
|
}
|
|
1625
|
-
function
|
|
1626
|
-
|
|
1627
|
-
if (!
|
|
1628
|
-
let
|
|
1629
|
-
s && e.setFieldMeta(
|
|
1634
|
+
function i(n, r, i) {
|
|
1635
|
+
t(n), s(n, r, "swap", i).forEach((t) => {
|
|
1636
|
+
if (!t.toString().startsWith(o(n, r))) return;
|
|
1637
|
+
let a = t.toString().replace(o(n, r), o(n, i)), [s, c] = [e.getFieldMeta(t), e.getFieldMeta(a)];
|
|
1638
|
+
s && e.setFieldMeta(a, s), c && e.setFieldMeta(t, c);
|
|
1630
1639
|
});
|
|
1631
1640
|
}
|
|
1632
|
-
function
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1641
|
+
function a(n, r) {
|
|
1642
|
+
t(n);
|
|
1643
|
+
let i = s(n, r, "insert");
|
|
1644
|
+
l(i, "down"), i.forEach((t) => {
|
|
1645
|
+
t.toString().startsWith(o(n, r)) && e.setFieldMeta(t, u());
|
|
1636
1646
|
});
|
|
1637
1647
|
}
|
|
1638
|
-
function
|
|
1648
|
+
function o(e, t) {
|
|
1639
1649
|
return `${e}[${t}]`;
|
|
1640
1650
|
}
|
|
1641
|
-
function
|
|
1642
|
-
let
|
|
1651
|
+
function s(t, n, r, i) {
|
|
1652
|
+
let a = [o(t, n)];
|
|
1643
1653
|
switch (r) {
|
|
1644
1654
|
case "swap":
|
|
1645
|
-
|
|
1655
|
+
a.push(o(t, i));
|
|
1646
1656
|
break;
|
|
1647
1657
|
case "move": {
|
|
1648
1658
|
let [e, r] = [Math.min(n, i), Math.max(n, i)];
|
|
1649
|
-
for (let n = e; n <= r; n++)
|
|
1659
|
+
for (let n = e; n <= r; n++) a.push(o(t, n));
|
|
1650
1660
|
break;
|
|
1651
1661
|
}
|
|
1652
1662
|
default: {
|
|
1653
1663
|
let r = e.getFieldValue(t), i = Array.isArray(r) ? r.length : 0;
|
|
1654
|
-
for (let e = n + 1; e < i; e++)
|
|
1664
|
+
for (let e = n + 1; e < i; e++) a.push(o(t, e));
|
|
1655
1665
|
break;
|
|
1656
1666
|
}
|
|
1657
1667
|
}
|
|
1658
|
-
return Object.keys(e.fieldInfo).filter((e) =>
|
|
1668
|
+
return Object.keys(e.fieldInfo).filter((e) => a.some((t) => e.startsWith(t)));
|
|
1659
1669
|
}
|
|
1660
|
-
function
|
|
1670
|
+
function c(e, t) {
|
|
1661
1671
|
return e.replace(/\[(\d+)\]/, (e, n) => {
|
|
1662
1672
|
let r = parseInt(n, 10);
|
|
1663
1673
|
return `[${t === "up" ? r + 1 : Math.max(0, r - 1)}]`;
|
|
1664
1674
|
});
|
|
1665
1675
|
}
|
|
1666
|
-
function
|
|
1676
|
+
function l(t, n) {
|
|
1667
1677
|
(n === "up" ? t : [...t].reverse()).forEach((t) => {
|
|
1668
|
-
let r =
|
|
1669
|
-
i ? e.setFieldMeta(t, i) : e.setFieldMeta(t,
|
|
1678
|
+
let r = c(t.toString(), n), i = e.getFieldMeta(r);
|
|
1679
|
+
i ? e.setFieldMeta(t, i) : e.setFieldMeta(t, u());
|
|
1670
1680
|
});
|
|
1671
1681
|
}
|
|
1672
|
-
let
|
|
1682
|
+
let u = () => Y;
|
|
1673
1683
|
return {
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1684
|
+
bumpArrayVersion: t,
|
|
1685
|
+
handleArrayMove: n,
|
|
1686
|
+
handleArrayRemove: r,
|
|
1687
|
+
handleArraySwap: i,
|
|
1688
|
+
handleArrayInsert: a
|
|
1678
1689
|
};
|
|
1679
1690
|
}
|
|
1680
1691
|
//#endregion
|
|
1681
|
-
//#region node_modules/.pnpm/@tanstack+form-core@1.
|
|
1692
|
+
//#region node_modules/.pnpm/@tanstack+form-core@1.32.0/node_modules/@tanstack/form-core/dist/esm/FormApi.js
|
|
1682
1693
|
function xn(e) {
|
|
1683
1694
|
return {
|
|
1684
1695
|
values: e.values ?? {},
|
|
@@ -1703,23 +1714,23 @@ var Sn = class {
|
|
|
1703
1714
|
constructor(e) {
|
|
1704
1715
|
this.options = {}, this.fieldInfo = {}, this.mount = () => {
|
|
1705
1716
|
let e = this.store.subscribe(() => {
|
|
1706
|
-
|
|
1707
|
-
}), t =
|
|
1708
|
-
e.payload.id === this._formId &&
|
|
1717
|
+
_n(this);
|
|
1718
|
+
}), t = P.on("request-form-state", (e) => {
|
|
1719
|
+
e.payload.id === this._formId && P.emit("form-api", {
|
|
1709
1720
|
id: this._formId,
|
|
1710
1721
|
state: this.store.state,
|
|
1711
1722
|
options: this.options
|
|
1712
1723
|
});
|
|
1713
|
-
}), n =
|
|
1724
|
+
}), n = P.on("request-form-reset", (e) => {
|
|
1714
1725
|
e.payload.id === this._formId && this.reset();
|
|
1715
|
-
}), r =
|
|
1726
|
+
}), r = P.on("request-form-force-submit", (e) => {
|
|
1716
1727
|
e.payload.id === this._formId && (this._devtoolsSubmissionOverride = !0, this.handleSubmit(), this._devtoolsSubmissionOverride = !1);
|
|
1717
1728
|
}), i = () => {
|
|
1718
|
-
r(), n(), t(), e.unsubscribe(),
|
|
1729
|
+
r(), n(), t(), e.unsubscribe(), P.emit("form-unmounted", { id: this._formId });
|
|
1719
1730
|
};
|
|
1720
1731
|
this.options.listeners?.onMount?.({ formApi: this });
|
|
1721
1732
|
let { onMount: a } = this.options.validators || {};
|
|
1722
|
-
return
|
|
1733
|
+
return P.emit("form-api", {
|
|
1723
1734
|
id: this._formId,
|
|
1724
1735
|
state: this.store.state,
|
|
1725
1736
|
options: this.options
|
|
@@ -1728,10 +1739,10 @@ var Sn = class {
|
|
|
1728
1739
|
if (!e) return;
|
|
1729
1740
|
let t = this.options;
|
|
1730
1741
|
this.options = e;
|
|
1731
|
-
let n = e.defaultValues && !
|
|
1732
|
-
!n && !r || (
|
|
1742
|
+
let n = e.defaultValues && !V(e.defaultValues, t.defaultValues) && !this.state.isTouched, r = !V(e.defaultState, t.defaultState) && !this.state.isTouched;
|
|
1743
|
+
!n && !r || (M(() => {
|
|
1733
1744
|
this.baseStore.setState(() => xn(Object.assign({}, this.state, r ? e.defaultState : {}, n ? { values: e.defaultValues } : {})));
|
|
1734
|
-
}),
|
|
1745
|
+
}), P.emit("form-api", {
|
|
1735
1746
|
id: this._formId,
|
|
1736
1747
|
state: this.store.state,
|
|
1737
1748
|
options: this.options
|
|
@@ -1741,14 +1752,19 @@ var Sn = class {
|
|
|
1741
1752
|
e && !t?.keepDefaultValues && (this.options = {
|
|
1742
1753
|
...this.options,
|
|
1743
1754
|
defaultValues: e
|
|
1744
|
-
}), this.baseStore.setState(() =>
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1755
|
+
}), this.baseStore.setState(() => {
|
|
1756
|
+
let t = e ?? this.options.defaultValues ?? this.options.defaultState?.values;
|
|
1757
|
+
return e || Object.values(this.fieldInfo).forEach((e) => {
|
|
1758
|
+
e.instance && e.instance.options.defaultValue !== void 0 && (t = L(t, e.instance.name, e.instance.options.defaultValue));
|
|
1759
|
+
}), xn({
|
|
1760
|
+
...this.options.defaultState,
|
|
1761
|
+
values: t,
|
|
1762
|
+
fieldMetaBase: r
|
|
1763
|
+
});
|
|
1764
|
+
});
|
|
1749
1765
|
}, this.validateAllFields = async (e) => {
|
|
1750
1766
|
let t = [];
|
|
1751
|
-
return
|
|
1767
|
+
return M(() => {
|
|
1752
1768
|
Object.values(this.fieldInfo).forEach((n) => {
|
|
1753
1769
|
if (!n.instance) return;
|
|
1754
1770
|
let r = n.instance;
|
|
@@ -1762,7 +1778,7 @@ var Sn = class {
|
|
|
1762
1778
|
let r = this.getFieldValue(e), i = Array.isArray(r) ? Math.max(r.length - 1, 0) : null, a = [`${e}[${t}]`];
|
|
1763
1779
|
for (let n = t + 1; n <= (i ?? 0); n++) a.push(`${e}[${n}]`);
|
|
1764
1780
|
let o = Object.keys(this.fieldInfo).filter((e) => a.some((t) => e.startsWith(t))), s = [];
|
|
1765
|
-
return
|
|
1781
|
+
return M(() => {
|
|
1766
1782
|
o.forEach((e) => {
|
|
1767
1783
|
s.push(Promise.resolve().then(() => this.validateField(e, n)));
|
|
1768
1784
|
});
|
|
@@ -1778,12 +1794,12 @@ var Sn = class {
|
|
|
1778
1794
|
isTouched: !0
|
|
1779
1795
|
})), n.validate(t);
|
|
1780
1796
|
}, this.validateSync = (e) => {
|
|
1781
|
-
let t =
|
|
1797
|
+
let t = fn(e, {
|
|
1782
1798
|
...this.options,
|
|
1783
1799
|
form: this,
|
|
1784
|
-
validationLogic: this.options.validationLogic ||
|
|
1800
|
+
validationLogic: this.options.validationLogic || q
|
|
1785
1801
|
}), n = !1, r = {};
|
|
1786
|
-
return
|
|
1802
|
+
return M(() => {
|
|
1787
1803
|
for (let e of t) {
|
|
1788
1804
|
if (!e.validate) continue;
|
|
1789
1805
|
let { formError: t, fieldErrors: i } = Cn(this.runValidator({
|
|
@@ -1797,7 +1813,7 @@ var Sn = class {
|
|
|
1797
1813
|
})), a = Z(e.cause), o = /* @__PURE__ */ new Set([...Object.keys(this.state.fieldMeta), ...Object.keys(i || {})]);
|
|
1798
1814
|
for (let e of o) {
|
|
1799
1815
|
if (this.baseStore.state.fieldMetaBase[e] === void 0 && !i?.[e]) continue;
|
|
1800
|
-
let { errorMap: t, errorSourceMap: n } = this.getFieldMeta(e) ??
|
|
1816
|
+
let { errorMap: t, errorSourceMap: n } = this.getFieldMeta(e) ?? Y, o = i?.[e], { newErrorValue: s, newSource: c } = mn({
|
|
1801
1817
|
newFormValidatorError: o,
|
|
1802
1818
|
isPreviousErrorFromFormValidator: n?.[a] === "form",
|
|
1803
1819
|
previousErrorValue: t?.[a]
|
|
@@ -1805,7 +1821,7 @@ var Sn = class {
|
|
|
1805
1821
|
c === "form" && (r[e] = {
|
|
1806
1822
|
...r[e],
|
|
1807
1823
|
[a]: o
|
|
1808
|
-
}), t?.[a] !== s && this.setFieldMeta(e, (e =
|
|
1824
|
+
}), t?.[a] !== s && this.setFieldMeta(e, (e = Y) => ({
|
|
1809
1825
|
...e,
|
|
1810
1826
|
errorMap: {
|
|
1811
1827
|
...e.errorMap,
|
|
@@ -1846,10 +1862,10 @@ var Sn = class {
|
|
|
1846
1862
|
fieldsErrorMap: r
|
|
1847
1863
|
};
|
|
1848
1864
|
}, this.validateAsync = async (e) => {
|
|
1849
|
-
let t =
|
|
1865
|
+
let t = pn(e, {
|
|
1850
1866
|
...this.options,
|
|
1851
1867
|
form: this,
|
|
1852
|
-
validationLogic: this.options.validationLogic ||
|
|
1868
|
+
validationLogic: this.options.validationLogic || q
|
|
1853
1869
|
});
|
|
1854
1870
|
this.state.isFormValidating || this.baseStore.setState((e) => ({
|
|
1855
1871
|
...e,
|
|
@@ -1896,7 +1912,7 @@ var Sn = class {
|
|
|
1896
1912
|
if (this.baseStore.state.fieldMetaBase[e] === void 0) continue;
|
|
1897
1913
|
let t = this.getFieldMeta(e);
|
|
1898
1914
|
if (!t) continue;
|
|
1899
|
-
let { errorMap: n, errorSourceMap: i } = t, a = r?.[e], { newErrorValue: o, newSource: c } =
|
|
1915
|
+
let { errorMap: n, errorSourceMap: i } = t, a = r?.[e], { newErrorValue: o, newSource: c } = mn({
|
|
1900
1916
|
newFormValidatorError: a,
|
|
1901
1917
|
isPreviousErrorFromFormValidator: i?.[s] === "form",
|
|
1902
1918
|
previousErrorValue: n?.[s]
|
|
@@ -1949,7 +1965,7 @@ var Sn = class {
|
|
|
1949
1965
|
isSubmitted: !1,
|
|
1950
1966
|
submissionAttempts: e.submissionAttempts + 1,
|
|
1951
1967
|
isSubmitSuccessful: !1
|
|
1952
|
-
})),
|
|
1968
|
+
})), M(() => {
|
|
1953
1969
|
Object.values(this.fieldInfo).forEach((e) => {
|
|
1954
1970
|
e.instance && (e.instance.state.meta.isTouched || e.instance.setMeta((e) => ({
|
|
1955
1971
|
...e,
|
|
@@ -1981,7 +1997,7 @@ var Sn = class {
|
|
|
1981
1997
|
value: this.state.values,
|
|
1982
1998
|
formApi: this,
|
|
1983
1999
|
meta: t
|
|
1984
|
-
}),
|
|
2000
|
+
}), P.emit("form-submission", {
|
|
1985
2001
|
id: this._formId,
|
|
1986
2002
|
submissionAttempt: this.state.submissionAttempts,
|
|
1987
2003
|
successful: !1,
|
|
@@ -1995,7 +2011,7 @@ var Sn = class {
|
|
|
1995
2011
|
value: this.state.values,
|
|
1996
2012
|
formApi: this,
|
|
1997
2013
|
meta: t
|
|
1998
|
-
}),
|
|
2014
|
+
}), P.emit("form-submission", {
|
|
1999
2015
|
id: this._formId,
|
|
2000
2016
|
submissionAttempt: this.state.submissionAttempts,
|
|
2001
2017
|
successful: !1,
|
|
@@ -2004,7 +2020,7 @@ var Sn = class {
|
|
|
2004
2020
|
});
|
|
2005
2021
|
return;
|
|
2006
2022
|
}
|
|
2007
|
-
|
|
2023
|
+
M(() => {
|
|
2008
2024
|
Object.values(this.fieldInfo).forEach((e) => {
|
|
2009
2025
|
e.instance?.options.listeners?.onSubmit?.({
|
|
2010
2026
|
value: e.instance.state.value,
|
|
@@ -2020,12 +2036,12 @@ var Sn = class {
|
|
|
2020
2036
|
value: this.state.values,
|
|
2021
2037
|
formApi: this,
|
|
2022
2038
|
meta: t
|
|
2023
|
-
}),
|
|
2039
|
+
}), M(() => {
|
|
2024
2040
|
this.baseStore.setState((e) => ({
|
|
2025
2041
|
...e,
|
|
2026
2042
|
isSubmitted: !0,
|
|
2027
2043
|
isSubmitSuccessful: !0
|
|
2028
|
-
})),
|
|
2044
|
+
})), P.emit("form-submission", {
|
|
2029
2045
|
id: this._formId,
|
|
2030
2046
|
submissionAttempt: this.state.submissionAttempts,
|
|
2031
2047
|
successful: !0
|
|
@@ -2035,7 +2051,7 @@ var Sn = class {
|
|
|
2035
2051
|
throw this.baseStore.setState((e) => ({
|
|
2036
2052
|
...e,
|
|
2037
2053
|
isSubmitSuccessful: !1
|
|
2038
|
-
})),
|
|
2054
|
+
})), P.emit("form-submission", {
|
|
2039
2055
|
id: this._formId,
|
|
2040
2056
|
submissionAttempt: this.state.submissionAttempts,
|
|
2041
2057
|
successful: !1,
|
|
@@ -2043,7 +2059,7 @@ var Sn = class {
|
|
|
2043
2059
|
onError: e
|
|
2044
2060
|
}), n(), e;
|
|
2045
2061
|
}
|
|
2046
|
-
}, this.getFieldValue = (e) =>
|
|
2062
|
+
}, this.getFieldValue = (e) => I(this.state.values, e), this.getFieldMeta = (e) => this.state.fieldMeta[e], this.getFieldInfo = (e) => this.fieldInfo[e] ||= {
|
|
2047
2063
|
instance: null,
|
|
2048
2064
|
validationMetaMap: {
|
|
2049
2065
|
onChange: void 0,
|
|
@@ -2058,15 +2074,15 @@ var Sn = class {
|
|
|
2058
2074
|
...n,
|
|
2059
2075
|
fieldMetaBase: {
|
|
2060
2076
|
...n.fieldMetaBase,
|
|
2061
|
-
[e]:
|
|
2077
|
+
[e]: F(t, n.fieldMetaBase[e])
|
|
2062
2078
|
}
|
|
2063
2079
|
}));
|
|
2064
2080
|
}, this.resetFieldMeta = (e) => Object.keys(e).reduce((e, t) => {
|
|
2065
2081
|
let n = t;
|
|
2066
|
-
return e[n] =
|
|
2082
|
+
return e[n] = Y, e;
|
|
2067
2083
|
}, {}), this.setFieldValue = (e, t, n) => {
|
|
2068
2084
|
let r = n?.dontUpdateMeta ?? !1, i = n?.dontRunListeners ?? !1, a = n?.dontValidate ?? !1;
|
|
2069
|
-
|
|
2085
|
+
M(() => {
|
|
2070
2086
|
r || this.setFieldMeta(e, (e) => ({
|
|
2071
2087
|
...e,
|
|
2072
2088
|
isTouched: !0,
|
|
@@ -2077,7 +2093,7 @@ var Sn = class {
|
|
|
2077
2093
|
}
|
|
2078
2094
|
})), this.baseStore.setState((n) => ({
|
|
2079
2095
|
...n,
|
|
2080
|
-
values:
|
|
2096
|
+
values: L(n.values, e, t)
|
|
2081
2097
|
}));
|
|
2082
2098
|
}), i || this.getFieldInfo(e).instance?.triggerOnChangeListener(), a || this.validateField(e, "change");
|
|
2083
2099
|
}, this.deleteField = (e) => {
|
|
@@ -2088,24 +2104,24 @@ var Sn = class {
|
|
|
2088
2104
|
this.baseStore.setState((e) => {
|
|
2089
2105
|
let n = { ...e };
|
|
2090
2106
|
return t.forEach((e) => {
|
|
2091
|
-
n.values =
|
|
2107
|
+
n.values = nn(n.values, e), delete this.fieldInfo[e], delete n.fieldMetaBase[e];
|
|
2092
2108
|
}), n;
|
|
2093
2109
|
});
|
|
2094
2110
|
}, this.pushFieldValue = (e, t, n) => {
|
|
2095
|
-
this.setFieldValue(e, (e) => [...Array.isArray(e) ? e : [], t], n);
|
|
2111
|
+
this.setFieldValue(e, (e) => [...Array.isArray(e) ? e : [], t], n), X(this).bumpArrayVersion(e);
|
|
2096
2112
|
}, this.insertFieldValue = async (e, t, n, r) => {
|
|
2097
2113
|
this.setFieldValue(e, (e) => [
|
|
2098
2114
|
...e.slice(0, t),
|
|
2099
2115
|
n,
|
|
2100
2116
|
...e.slice(t)
|
|
2101
|
-
],
|
|
2117
|
+
], H(r, { dontValidate: !0 }));
|
|
2102
2118
|
let i = r?.dontValidate ?? !1;
|
|
2103
|
-
i || await this.validateField(e, "change"),
|
|
2119
|
+
i || await this.validateField(e, "change"), X(this).handleArrayInsert(e, t), i || await this.validateArrayFieldsStartingFrom(e, t, "change");
|
|
2104
2120
|
}, this.replaceFieldValue = async (e, t, n, r) => {
|
|
2105
|
-
this.setFieldValue(e, (e) => e.map((e, r) => r === t ? n : e),
|
|
2121
|
+
this.setFieldValue(e, (e) => e.map((e, r) => r === t ? n : e), H(r, { dontValidate: !0 })), X(this).bumpArrayVersion(e), (r?.dontValidate ?? !1) || (await this.validateField(e, "change"), await this.validateArrayFieldsStartingFrom(e, t, "change"));
|
|
2106
2122
|
}, this.removeFieldValue = async (e, t, n) => {
|
|
2107
2123
|
let r = this.getFieldValue(e), i = Array.isArray(r) ? Math.max(r.length - 1, 0) : null;
|
|
2108
|
-
if (this.setFieldValue(e, (e) => e.filter((e, n) => n !== t),
|
|
2124
|
+
if (this.setFieldValue(e, (e) => e.filter((e, n) => n !== t), H(n, { dontValidate: !0 })), X(this).handleArrayRemove(e, t), i !== null) {
|
|
2109
2125
|
let t = `${e}[${i}]`;
|
|
2110
2126
|
this.deleteField(t);
|
|
2111
2127
|
}
|
|
@@ -2113,34 +2129,37 @@ var Sn = class {
|
|
|
2113
2129
|
}, this.swapFieldValues = (e, t, n, r) => {
|
|
2114
2130
|
this.setFieldValue(e, (e) => {
|
|
2115
2131
|
let r = e[t], i = e[n];
|
|
2116
|
-
return
|
|
2117
|
-
},
|
|
2132
|
+
return L(L(e, `${t}`, i), `${n}`, r);
|
|
2133
|
+
}, H(r, { dontValidate: !0 })), X(this).handleArraySwap(e, t, n), (r?.dontValidate ?? !1) || (this.validateField(e, "change"), this.validateField(`${e}[${t}]`, "change"), this.validateField(`${e}[${n}]`, "change"));
|
|
2118
2134
|
}, this.moveFieldValues = (e, t, n, r) => {
|
|
2119
2135
|
this.setFieldValue(e, (e) => {
|
|
2120
2136
|
let r = [...e];
|
|
2121
2137
|
return r.splice(n, 0, r.splice(t, 1)[0]), r;
|
|
2122
|
-
},
|
|
2138
|
+
}, H(r, { dontValidate: !0 })), X(this).handleArrayMove(e, t, n), (r?.dontValidate ?? !1) || (this.validateField(e, "change"), this.validateField(`${e}[${t}]`, "change"), this.validateField(`${e}[${n}]`, "change"));
|
|
2123
2139
|
}, this.clearFieldValues = (e, t) => {
|
|
2124
2140
|
let n = this.getFieldValue(e), r = Array.isArray(n) ? Math.max(n.length - 1, 0) : null;
|
|
2125
|
-
if (this.setFieldValue(e, [],
|
|
2141
|
+
if (this.setFieldValue(e, [], H(t, { dontValidate: !0 })), X(this).bumpArrayVersion(e), r !== null) for (let t = 0; t <= r; t++) {
|
|
2126
2142
|
let n = `${e}[${t}]`;
|
|
2127
2143
|
this.deleteField(n);
|
|
2128
2144
|
}
|
|
2129
2145
|
(t?.dontValidate ?? !1) || this.validateField(e, "change");
|
|
2130
2146
|
}, this.resetField = (e) => {
|
|
2131
|
-
this.baseStore.setState((t) =>
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
...t
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2147
|
+
this.baseStore.setState((t) => {
|
|
2148
|
+
let n = this.getFieldInfo(e).instance?.options.defaultValue, r = I(this.options.defaultValues, e), i = n ?? r;
|
|
2149
|
+
return {
|
|
2150
|
+
...t,
|
|
2151
|
+
fieldMetaBase: {
|
|
2152
|
+
...t.fieldMetaBase,
|
|
2153
|
+
[e]: Y
|
|
2154
|
+
},
|
|
2155
|
+
values: i === void 0 ? t.values : L(t.values, e, i)
|
|
2156
|
+
};
|
|
2157
|
+
});
|
|
2139
2158
|
}, this.setErrorMap = (e) => {
|
|
2140
|
-
|
|
2159
|
+
M(() => {
|
|
2141
2160
|
Object.entries(e).forEach(([e, t]) => {
|
|
2142
2161
|
let n = e;
|
|
2143
|
-
if (
|
|
2162
|
+
if (B(t)) {
|
|
2144
2163
|
let { formError: e, fieldErrors: r } = Cn(t);
|
|
2145
2164
|
for (let e of Object.keys(this.fieldInfo)) this.getFieldMeta(e) && this.setFieldMeta(e, (t) => ({
|
|
2146
2165
|
...t,
|
|
@@ -2178,17 +2197,17 @@ var Sn = class {
|
|
|
2178
2197
|
errors: n.errors,
|
|
2179
2198
|
errorMap: n.errorMap
|
|
2180
2199
|
}), e), {})
|
|
2181
|
-
}), this.parseValuesWithSchema = (e) =>
|
|
2200
|
+
}), this.parseValuesWithSchema = (e) => J.validate({
|
|
2182
2201
|
value: this.state.values,
|
|
2183
2202
|
validationSource: "form"
|
|
2184
|
-
}, e), this.parseValuesWithSchemaAsync = (e) =>
|
|
2203
|
+
}, e), this.parseValuesWithSchemaAsync = (e) => J.validateAsync({
|
|
2185
2204
|
value: this.state.values,
|
|
2186
2205
|
validationSource: "form"
|
|
2187
2206
|
}, e), this.timeoutIds = {
|
|
2188
2207
|
validations: {},
|
|
2189
2208
|
listeners: {},
|
|
2190
2209
|
formListeners: {}
|
|
2191
|
-
}, this._formId = e?.formId ??
|
|
2210
|
+
}, this._formId = e?.formId ?? gn(), this._devtoolsSubmissionOverride = !1;
|
|
2192
2211
|
let t = xn({
|
|
2193
2212
|
...e?.defaultState,
|
|
2194
2213
|
values: e?.defaultValues ?? e?.defaultState?.values
|
|
@@ -2197,7 +2216,7 @@ var Sn = class {
|
|
|
2197
2216
|
t = e.transform({ state: t }).state;
|
|
2198
2217
|
for (let e of Object.keys(t.errorMap)) {
|
|
2199
2218
|
let n = t.errorMap[e];
|
|
2200
|
-
if (!(n === void 0 || !
|
|
2219
|
+
if (!(n === void 0 || !B(n))) for (let r of Object.keys(n.fields)) {
|
|
2201
2220
|
let i = n.fields[r];
|
|
2202
2221
|
if (i === void 0) continue;
|
|
2203
2222
|
let a = t.fieldMetaBase[r];
|
|
@@ -2206,6 +2225,7 @@ var Sn = class {
|
|
|
2206
2225
|
isValidating: !1,
|
|
2207
2226
|
isBlurred: !1,
|
|
2208
2227
|
isDirty: !1,
|
|
2228
|
+
_arrayVersion: 0,
|
|
2209
2229
|
...a ?? {},
|
|
2210
2230
|
errorSourceMap: {
|
|
2211
2231
|
...a?.errorSourceMap ?? {},
|
|
@@ -2219,18 +2239,18 @@ var Sn = class {
|
|
|
2219
2239
|
}
|
|
2220
2240
|
}
|
|
2221
2241
|
}
|
|
2222
|
-
this.baseStore =
|
|
2242
|
+
this.baseStore = N(t);
|
|
2223
2243
|
let n;
|
|
2224
|
-
this.fieldMetaDerived =
|
|
2244
|
+
this.fieldMetaDerived = N((e) => {
|
|
2225
2245
|
let t = this.baseStore.get(), r = 0, i = {};
|
|
2226
2246
|
for (let a of Object.keys(t.fieldMetaBase)) {
|
|
2227
|
-
let o = t.fieldMetaBase[a], s = n?.fieldMetaBase[a], c = e?.[a], l =
|
|
2247
|
+
let o = t.fieldMetaBase[a], s = n?.fieldMetaBase[a], c = e?.[a], l = I(t.values, a), u = c?.errors;
|
|
2228
2248
|
if (!s || o.errorMap !== s.errorMap) {
|
|
2229
2249
|
u = Object.values(o.errorMap ?? {}).filter((e) => e !== void 0);
|
|
2230
2250
|
let e = this.getFieldInfo(a)?.instance;
|
|
2231
2251
|
(!e || !e.options.disableErrorFlat) && (u = u.flat(1));
|
|
2232
2252
|
}
|
|
2233
|
-
let d = !
|
|
2253
|
+
let d = !dn(u), f = !o.isDirty, p = V(l, this.getFieldInfo(a)?.instance?.options.defaultValue ?? I(this.options.defaultValues, a));
|
|
2234
2254
|
if (c && c.isPristine === f && c.isValid === d && c.isDefaultValue === p && c.errors === u && o === s) {
|
|
2235
2255
|
i[a] = c, r++;
|
|
2236
2256
|
continue;
|
|
@@ -2246,28 +2266,28 @@ var Sn = class {
|
|
|
2246
2266
|
return Object.keys(t.fieldMetaBase).length ? e && r === Object.keys(t.fieldMetaBase).length ? e : (n = this.baseStore.get(), i) : i;
|
|
2247
2267
|
});
|
|
2248
2268
|
let r;
|
|
2249
|
-
this.store =
|
|
2269
|
+
this.store = N((e) => {
|
|
2250
2270
|
let t = this.baseStore.get(), n = this.fieldMetaDerived.get(), i = Object.values(n).filter(Boolean), a = i.some((e) => e.isValidating), o = i.every((e) => e.isValid), s = i.some((e) => e.isTouched), c = i.some((e) => e.isBlurred), l = i.every((e) => e.isDefaultValue), u = s && t.errorMap?.onMount, d = i.some((e) => e.isDirty), f = !d, p = !!(t.errorMap?.onMount || i.some((e) => e?.errorMap?.onMount)), m = !!a, h = e?.errors ?? [];
|
|
2251
|
-
(!r || t.errorMap !== r.errorMap) && (h = Object.values(t.errorMap).reduce((e, t) => t === void 0 ? e : t &&
|
|
2252
|
-
let g = h.length === 0, _ = o && g,
|
|
2253
|
-
if (u && (h = h.filter((e) => e !== t.errorMap.onMount),
|
|
2254
|
-
let
|
|
2271
|
+
(!r || t.errorMap !== r.errorMap) && (h = Object.values(t.errorMap).reduce((e, t) => t === void 0 ? e : t && B(t) ? (e.push(t.form), e) : (e.push(t), e), []));
|
|
2272
|
+
let g = h.length === 0, _ = o && g, ee = this.options.canSubmitWhenInvalid ?? !1, te = t.submissionAttempts === 0 && !s && !p || !m && !t.isSubmitting && _ || ee, v = t.errorMap;
|
|
2273
|
+
if (u && (h = h.filter((e) => e !== t.errorMap.onMount), v = Object.assign(v, { onMount: void 0 })), e && r && e.errorMap === v && e.fieldMeta === this.fieldMetaDerived.state && e.errors === h && e.isFieldsValidating === a && e.isFieldsValid === o && e.isFormValid === g && e.isValid === _ && e.canSubmit === te && e.isTouched === s && e.isBlurred === c && e.isPristine === f && e.isDefaultValue === l && e.isDirty === d && V(r, t)) return e;
|
|
2274
|
+
let y = {
|
|
2255
2275
|
...t,
|
|
2256
|
-
errorMap:
|
|
2276
|
+
errorMap: v,
|
|
2257
2277
|
fieldMeta: this.fieldMetaDerived.state,
|
|
2258
2278
|
errors: h,
|
|
2259
2279
|
isFieldsValidating: a,
|
|
2260
2280
|
isFieldsValid: o,
|
|
2261
2281
|
isFormValid: g,
|
|
2262
2282
|
isValid: _,
|
|
2263
|
-
canSubmit:
|
|
2283
|
+
canSubmit: te,
|
|
2264
2284
|
isTouched: s,
|
|
2265
2285
|
isBlurred: c,
|
|
2266
2286
|
isPristine: f,
|
|
2267
2287
|
isDefaultValue: l,
|
|
2268
2288
|
isDirty: d
|
|
2269
2289
|
};
|
|
2270
|
-
return r = this.baseStore.get(),
|
|
2290
|
+
return r = this.baseStore.get(), y;
|
|
2271
2291
|
}), this.handleSubmit = this.handleSubmit.bind(this), this.update(e || {});
|
|
2272
2292
|
}
|
|
2273
2293
|
get state() {
|
|
@@ -2277,14 +2297,14 @@ var Sn = class {
|
|
|
2277
2297
|
return this._formId;
|
|
2278
2298
|
}
|
|
2279
2299
|
runValidator(e) {
|
|
2280
|
-
return
|
|
2300
|
+
return bn(e.validate) ? J[e.type](e.value, e.validate) : e.validate(e.value);
|
|
2281
2301
|
}
|
|
2282
2302
|
handleSubmit(e) {
|
|
2283
2303
|
return this._handleSubmit(e);
|
|
2284
2304
|
}
|
|
2285
2305
|
};
|
|
2286
2306
|
function Cn(e) {
|
|
2287
|
-
return e ?
|
|
2307
|
+
return e ? B(e) ? {
|
|
2288
2308
|
formError: Cn(e.form).formError,
|
|
2289
2309
|
fieldErrors: e.fields
|
|
2290
2310
|
} : { formError: e } : { formError: void 0 };
|
|
@@ -2300,7 +2320,7 @@ function Z(e) {
|
|
|
2300
2320
|
}
|
|
2301
2321
|
}
|
|
2302
2322
|
//#endregion
|
|
2303
|
-
//#region node_modules/.pnpm/@tanstack+form-core@1.
|
|
2323
|
+
//#region node_modules/.pnpm/@tanstack+form-core@1.32.0/node_modules/@tanstack/form-core/dist/esm/FieldApi.js
|
|
2304
2324
|
var wn = class {
|
|
2305
2325
|
constructor(e) {
|
|
2306
2326
|
this.options = {}, this.mount = () => {
|
|
@@ -2345,10 +2365,10 @@ var wn = class {
|
|
|
2345
2365
|
fieldMetaBase: {
|
|
2346
2366
|
...e.fieldMetaBase,
|
|
2347
2367
|
[this.name]: {
|
|
2348
|
-
...
|
|
2349
|
-
isTouched: e.fieldMetaBase[this.name]?.isTouched ??
|
|
2350
|
-
isBlurred: e.fieldMetaBase[this.name]?.isBlurred ??
|
|
2351
|
-
isDirty: e.fieldMetaBase[this.name]?.isDirty ??
|
|
2368
|
+
...Y,
|
|
2369
|
+
isTouched: e.fieldMetaBase[this.name]?.isTouched ?? Y.isTouched,
|
|
2370
|
+
isBlurred: e.fieldMetaBase[this.name]?.isBlurred ?? Y.isBlurred,
|
|
2371
|
+
isDirty: e.fieldMetaBase[this.name]?.isDirty ?? Y.isDirty
|
|
2352
2372
|
}
|
|
2353
2373
|
}
|
|
2354
2374
|
})), e.instance = null, this.options.listeners?.onUnmount?.({
|
|
@@ -2361,30 +2381,30 @@ var wn = class {
|
|
|
2361
2381
|
}
|
|
2362
2382
|
};
|
|
2363
2383
|
}, this.update = (e) => {
|
|
2364
|
-
this.options = e, this.name = e.name, !this.state.meta.isTouched && this.options.defaultValue !== void 0 && (
|
|
2384
|
+
this.options = e, this.name = e.name, !this.state.meta.isTouched && this.options.defaultValue !== void 0 && (V(this.form.getFieldValue(this.name), e.defaultValue) || this.form.setFieldValue(this.name, e.defaultValue, {
|
|
2365
2385
|
dontUpdateMeta: !0,
|
|
2366
2386
|
dontValidate: !0,
|
|
2367
2387
|
dontRunListeners: !0
|
|
2368
2388
|
})), this.form.getFieldMeta(this.name) || this.form.setFieldMeta(this.name, this.state.meta);
|
|
2369
2389
|
}, this.getValue = () => this.form.getFieldValue(this.name), this.setValue = (e, t) => {
|
|
2370
|
-
this.form.setFieldValue(this.name, e,
|
|
2390
|
+
this.form.setFieldValue(this.name, e, H(t, {
|
|
2371
2391
|
dontRunListeners: !0,
|
|
2372
2392
|
dontValidate: !0
|
|
2373
2393
|
})), t?.dontRunListeners || this.triggerOnChangeListener(), t?.dontValidate || this.validate("change");
|
|
2374
2394
|
}, this.getMeta = () => this.store.state.meta, this.setMeta = (e) => this.form.setFieldMeta(this.name, e), this.getInfo = () => this.form.getFieldInfo(this.name), this.pushValue = (e, t) => {
|
|
2375
|
-
this.form.pushFieldValue(this.name, e,
|
|
2395
|
+
this.form.pushFieldValue(this.name, e, H(t, { dontRunListeners: !0 })), t?.dontRunListeners || this.triggerOnChangeListener();
|
|
2376
2396
|
}, this.insertValue = (e, t, n) => {
|
|
2377
|
-
this.form.insertFieldValue(this.name, e, t,
|
|
2397
|
+
this.form.insertFieldValue(this.name, e, t, H(n, { dontRunListeners: !0 })), n?.dontRunListeners || this.triggerOnChangeListener();
|
|
2378
2398
|
}, this.replaceValue = (e, t, n) => {
|
|
2379
|
-
this.form.replaceFieldValue(this.name, e, t,
|
|
2399
|
+
this.form.replaceFieldValue(this.name, e, t, H(n, { dontRunListeners: !0 })), n?.dontRunListeners || this.triggerOnChangeListener();
|
|
2380
2400
|
}, this.removeValue = (e, t) => {
|
|
2381
|
-
this.form.removeFieldValue(this.name, e,
|
|
2401
|
+
this.form.removeFieldValue(this.name, e, H(t, { dontRunListeners: !0 })), t?.dontRunListeners || this.triggerOnChangeListener();
|
|
2382
2402
|
}, this.swapValues = (e, t, n) => {
|
|
2383
|
-
this.form.swapFieldValues(this.name, e, t,
|
|
2403
|
+
this.form.swapFieldValues(this.name, e, t, H(n, { dontRunListeners: !0 })), n?.dontRunListeners || this.triggerOnChangeListener();
|
|
2384
2404
|
}, this.moveValue = (e, t, n) => {
|
|
2385
|
-
this.form.moveFieldValues(this.name, e, t,
|
|
2405
|
+
this.form.moveFieldValues(this.name, e, t, H(n, { dontRunListeners: !0 })), n?.dontRunListeners || this.triggerOnChangeListener();
|
|
2386
2406
|
}, this.clearValues = (e) => {
|
|
2387
|
-
this.form.clearFieldValues(this.name,
|
|
2407
|
+
this.form.clearFieldValues(this.name, H(e, { dontRunListeners: !0 })), e?.dontRunListeners || this.triggerOnChangeListener();
|
|
2388
2408
|
}, this.getLinkedFields = (e) => {
|
|
2389
2409
|
let t = Object.values(this.form.fieldInfo), n = [];
|
|
2390
2410
|
for (let r of t) {
|
|
@@ -2394,23 +2414,23 @@ var wn = class {
|
|
|
2394
2414
|
}
|
|
2395
2415
|
return n;
|
|
2396
2416
|
}, this.validateSync = (e, t) => {
|
|
2397
|
-
let n =
|
|
2417
|
+
let n = fn(e, {
|
|
2398
2418
|
...this.options,
|
|
2399
2419
|
form: this.form,
|
|
2400
2420
|
fieldName: this.name,
|
|
2401
|
-
validationLogic: this.form.options.validationLogic ||
|
|
2421
|
+
validationLogic: this.form.options.validationLogic || q
|
|
2402
2422
|
}), r = this.getLinkedFields(e).reduce((t, n) => {
|
|
2403
|
-
let r =
|
|
2423
|
+
let r = fn(e, {
|
|
2404
2424
|
...n.options,
|
|
2405
2425
|
form: n.form,
|
|
2406
2426
|
fieldName: n.name,
|
|
2407
|
-
validationLogic: n.form.options.validationLogic ||
|
|
2427
|
+
validationLogic: n.form.options.validationLogic || q
|
|
2408
2428
|
});
|
|
2409
2429
|
return r.forEach((e) => {
|
|
2410
2430
|
e.field = n;
|
|
2411
2431
|
}), t.concat(r);
|
|
2412
2432
|
}, []), i = !1;
|
|
2413
|
-
|
|
2433
|
+
M(() => {
|
|
2414
2434
|
let e = (e, n) => {
|
|
2415
2435
|
let r = En(n.cause), a = n.validate ? Tn(e.runValidator({
|
|
2416
2436
|
validate: n.validate,
|
|
@@ -2420,7 +2440,7 @@ var wn = class {
|
|
|
2420
2440
|
fieldApi: e
|
|
2421
2441
|
},
|
|
2422
2442
|
type: "validate"
|
|
2423
|
-
})) : void 0, o = t[r], { newErrorValue: s, newSource: c } =
|
|
2443
|
+
})) : void 0, o = t[r], { newErrorValue: s, newSource: c } = hn({
|
|
2424
2444
|
formLevelError: o,
|
|
2425
2445
|
fieldLevelError: a
|
|
2426
2446
|
});
|
|
@@ -2452,17 +2472,17 @@ var wn = class {
|
|
|
2452
2472
|
}
|
|
2453
2473
|
})), { hasErrored: i };
|
|
2454
2474
|
}, this.validateAsync = async (e, t) => {
|
|
2455
|
-
let n =
|
|
2475
|
+
let n = pn(e, {
|
|
2456
2476
|
...this.options,
|
|
2457
2477
|
form: this.form,
|
|
2458
2478
|
fieldName: this.name,
|
|
2459
|
-
validationLogic: this.form.options.validationLogic ||
|
|
2479
|
+
validationLogic: this.form.options.validationLogic || q
|
|
2460
2480
|
}), r = await t, i = this.getLinkedFields(e), a = i.reduce((t, n) => {
|
|
2461
|
-
let r =
|
|
2481
|
+
let r = pn(e, {
|
|
2462
2482
|
...n.options,
|
|
2463
2483
|
form: n.form,
|
|
2464
2484
|
fieldName: n.name,
|
|
2465
|
-
validationLogic: n.form.options.validationLogic ||
|
|
2485
|
+
validationLogic: n.form.options.validationLogic || q
|
|
2466
2486
|
});
|
|
2467
2487
|
return r.forEach((e) => {
|
|
2468
2488
|
e.field = n;
|
|
@@ -2508,7 +2528,7 @@ var wn = class {
|
|
|
2508
2528
|
a = e;
|
|
2509
2529
|
}
|
|
2510
2530
|
if (o.signal.aborted) return n(void 0);
|
|
2511
|
-
let s = Tn(a), c = r[e.name]?.[i], { newErrorValue: l, newSource: u } =
|
|
2531
|
+
let s = Tn(a), c = r[e.name]?.[i], { newErrorValue: l, newSource: u } = hn({
|
|
2512
2532
|
formLevelError: c,
|
|
2513
2533
|
fieldLevelError: s
|
|
2514
2534
|
});
|
|
@@ -2564,10 +2584,10 @@ var wn = class {
|
|
|
2564
2584
|
...e
|
|
2565
2585
|
}
|
|
2566
2586
|
}));
|
|
2567
|
-
}, this.parseValueWithSchema = (e) =>
|
|
2587
|
+
}, this.parseValueWithSchema = (e) => J.validate({
|
|
2568
2588
|
value: this.state.value,
|
|
2569
2589
|
validationSource: "field"
|
|
2570
|
-
}, e), this.parseValueWithSchemaAsync = (e) =>
|
|
2590
|
+
}, e), this.parseValueWithSchemaAsync = (e) => J.validateAsync({
|
|
2571
2591
|
value: this.state.value,
|
|
2572
2592
|
validationSource: "field"
|
|
2573
2593
|
}, e), this.triggerOnChangeListener = () => {
|
|
@@ -2595,13 +2615,13 @@ var wn = class {
|
|
|
2595
2615
|
validations: {},
|
|
2596
2616
|
listeners: {},
|
|
2597
2617
|
formListeners: {}
|
|
2598
|
-
}, this.store =
|
|
2618
|
+
}, this.store = N((t) => {
|
|
2599
2619
|
this.form.store.get();
|
|
2600
2620
|
let n = this.form.getFieldMeta(this.name) ?? {
|
|
2601
|
-
...
|
|
2621
|
+
...Y,
|
|
2602
2622
|
...e.defaultMeta
|
|
2603
2623
|
}, r = this.form.getFieldValue(this.name);
|
|
2604
|
-
return !n.isTouched && r === void 0 && this.options.defaultValue !== void 0 && !
|
|
2624
|
+
return !n.isTouched && r === void 0 && this.options.defaultValue !== void 0 && !V(r, this.options.defaultValue) && (r = this.options.defaultValue), t && t.value === r && t.meta === n ? t : {
|
|
2605
2625
|
value: r,
|
|
2606
2626
|
meta: n
|
|
2607
2627
|
};
|
|
@@ -2611,7 +2631,7 @@ var wn = class {
|
|
|
2611
2631
|
return this.store.state;
|
|
2612
2632
|
}
|
|
2613
2633
|
runValidator(e) {
|
|
2614
|
-
return
|
|
2634
|
+
return bn(e.validate) ? J[e.type](e.value, e.validate) : e.validate(e.value);
|
|
2615
2635
|
}
|
|
2616
2636
|
triggerOnBlurListener() {
|
|
2617
2637
|
let e = this.form.options.listeners?.onBlurDebounceMs;
|
|
@@ -2650,15 +2670,15 @@ function En(e) {
|
|
|
2650
2670
|
}
|
|
2651
2671
|
}
|
|
2652
2672
|
//#endregion
|
|
2653
|
-
//#region node_modules/.pnpm/@tanstack+form-core@1.
|
|
2673
|
+
//#region node_modules/.pnpm/@tanstack+form-core@1.32.0/node_modules/@tanstack/form-core/dist/esm/FieldGroupApi.js
|
|
2654
2674
|
var Dn = class e {
|
|
2655
2675
|
constructor(t) {
|
|
2656
2676
|
if (this.getFormFieldName = (e) => {
|
|
2657
|
-
if (typeof this.fieldsMap == "string") return
|
|
2658
|
-
let t =
|
|
2677
|
+
if (typeof this.fieldsMap == "string") return un(this.fieldsMap, e);
|
|
2678
|
+
let t = z(e)[0];
|
|
2659
2679
|
if (typeof t != "string") return "";
|
|
2660
2680
|
let n = e.slice(t.length), r = this.fieldsMap[t];
|
|
2661
|
-
return
|
|
2681
|
+
return un(r, n);
|
|
2662
2682
|
}, this.getFormFieldOptions = (e) => {
|
|
2663
2683
|
let t = { ...e }, n = t.validators;
|
|
2664
2684
|
if (t.name = this.getFormFieldName(e.name), n && (n.onChangeListenTo || n.onBlurListenTo)) {
|
|
@@ -2677,13 +2697,13 @@ var Dn = class e {
|
|
|
2677
2697
|
this.fieldsMap = n;
|
|
2678
2698
|
}
|
|
2679
2699
|
} else this.form = t.form, this.fieldsMap = t.fields;
|
|
2680
|
-
this.store =
|
|
2700
|
+
this.store = N(() => {
|
|
2681
2701
|
let e = this.form.store.get(), t;
|
|
2682
|
-
if (typeof this.fieldsMap == "string") t =
|
|
2702
|
+
if (typeof this.fieldsMap == "string") t = I(e.values, this.fieldsMap);
|
|
2683
2703
|
else {
|
|
2684
2704
|
t = {};
|
|
2685
2705
|
let n = this.fieldsMap;
|
|
2686
|
-
for (let r in n) t[r] =
|
|
2706
|
+
for (let r in n) t[r] = I(e.values, n[r]);
|
|
2687
2707
|
}
|
|
2688
2708
|
return { values: t };
|
|
2689
2709
|
});
|
|
@@ -2696,10 +2716,10 @@ var Dn = class e {
|
|
|
2696
2716
|
}
|
|
2697
2717
|
};
|
|
2698
2718
|
//#endregion
|
|
2699
|
-
//#region node_modules/.pnpm/@tanstack+form-core@1.
|
|
2719
|
+
//#region node_modules/.pnpm/@tanstack+form-core@1.32.0/node_modules/@tanstack/form-core/dist/esm/transform.js
|
|
2700
2720
|
function On(e, t) {
|
|
2701
2721
|
if (!t) return;
|
|
2702
|
-
let n = Object.assign({}, e, { state:
|
|
2722
|
+
let n = Object.assign({}, e, { state: K(e.state) });
|
|
2703
2723
|
t(n), n.fieldInfo !== e.fieldInfo && (e.fieldInfo = n.fieldInfo), n.options !== e.options && (e.options = n.options);
|
|
2704
2724
|
let r = Object.keys({
|
|
2705
2725
|
values: null,
|
|
@@ -2712,7 +2732,7 @@ function On(e, t) {
|
|
|
2712
2732
|
isSubmitSuccessful: null,
|
|
2713
2733
|
_force_re_eval: null
|
|
2714
2734
|
}).reduce((t, r) => (e.state[r] !== n.state[r] && (t[r] = n.state[r]), t), {});
|
|
2715
|
-
return
|
|
2735
|
+
return M(() => {
|
|
2716
2736
|
Object.keys(r).length && e.baseStore.setState((e) => ({
|
|
2717
2737
|
...e,
|
|
2718
2738
|
...r
|
|
@@ -2720,7 +2740,7 @@ function On(e, t) {
|
|
|
2720
2740
|
}), n;
|
|
2721
2741
|
}
|
|
2722
2742
|
//#endregion
|
|
2723
|
-
//#region node_modules/.pnpm/@tanstack+react-store@0.9.3_react-dom@19.2.
|
|
2743
|
+
//#region node_modules/.pnpm/@tanstack+react-store@0.9.3_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-store/dist/esm/useStore.js
|
|
2724
2744
|
function kn(e, t) {
|
|
2725
2745
|
return e === t;
|
|
2726
2746
|
}
|
|
@@ -2733,10 +2753,10 @@ function Q(e, t, n = kn) {
|
|
|
2733
2753
|
return g(r, i, i, t, n);
|
|
2734
2754
|
}
|
|
2735
2755
|
//#endregion
|
|
2736
|
-
//#region node_modules/.pnpm/@tanstack+react-form@1.
|
|
2756
|
+
//#region node_modules/.pnpm/@tanstack+react-form@1.32.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-form/dist/esm/useIsomorphicLayoutEffect.js
|
|
2737
2757
|
var $ = typeof window < "u" ? l : c;
|
|
2738
2758
|
//#endregion
|
|
2739
|
-
//#region node_modules/.pnpm/@tanstack+react-form@1.
|
|
2759
|
+
//#region node_modules/.pnpm/@tanstack+react-form@1.32.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-form/dist/esm/useField.js
|
|
2740
2760
|
function An(e) {
|
|
2741
2761
|
let [t, n] = f(() => ({
|
|
2742
2762
|
form: e.form,
|
|
@@ -2746,28 +2766,25 @@ function An(e) {
|
|
|
2746
2766
|
form: e.form,
|
|
2747
2767
|
name: e.name
|
|
2748
2768
|
}));
|
|
2749
|
-
let a = Q(r.store, e.mode === "array" ? (e) =>
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
};
|
|
2769
|
-
return t.Field = jn, t;
|
|
2770
|
-
}, [
|
|
2769
|
+
let a = Q(r.store, e.mode === "array" ? (e) => e.meta._arrayVersion || 0 : (e) => e.value), o = Q(r.store, (e) => e.meta.isTouched), s = Q(r.store, (e) => e.meta.isBlurred), c = Q(r.store, (e) => e.meta.isDirty), l = Q(r.store, (e) => e.meta.errorMap), d = Q(r.store, (e) => e.meta.errorSourceMap), p = Q(r.store, (e) => e.meta.isValidating), m = u(() => ({
|
|
2770
|
+
...r,
|
|
2771
|
+
get state() {
|
|
2772
|
+
return {
|
|
2773
|
+
value: e.mode === "array" ? r.state.value : a,
|
|
2774
|
+
get meta() {
|
|
2775
|
+
return {
|
|
2776
|
+
...r.state.meta,
|
|
2777
|
+
isTouched: o,
|
|
2778
|
+
isBlurred: s,
|
|
2779
|
+
isDirty: c,
|
|
2780
|
+
errorMap: l,
|
|
2781
|
+
errorSourceMap: d,
|
|
2782
|
+
isValidating: p
|
|
2783
|
+
};
|
|
2784
|
+
}
|
|
2785
|
+
};
|
|
2786
|
+
}
|
|
2787
|
+
}), [
|
|
2771
2788
|
r,
|
|
2772
2789
|
e.mode,
|
|
2773
2790
|
a,
|
|
@@ -2784,20 +2801,20 @@ function An(e) {
|
|
|
2784
2801
|
}
|
|
2785
2802
|
var jn = (({ children: e, ...t }) => {
|
|
2786
2803
|
let n = An(t);
|
|
2787
|
-
return /* @__PURE__ */ m(p, { children: u(() =>
|
|
2804
|
+
return /* @__PURE__ */ m(p, { children: u(() => F(e, n), [e, n]) });
|
|
2788
2805
|
});
|
|
2789
2806
|
//#endregion
|
|
2790
|
-
//#region node_modules/.pnpm/@tanstack+react-form@1.
|
|
2807
|
+
//#region node_modules/.pnpm/@tanstack+react-form@1.32.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-form/dist/esm/useUUID.js
|
|
2791
2808
|
function Mn() {
|
|
2792
|
-
return f(() =>
|
|
2809
|
+
return f(() => gn())[0];
|
|
2793
2810
|
}
|
|
2794
2811
|
//#endregion
|
|
2795
|
-
//#region node_modules/.pnpm/@tanstack+react-form@1.
|
|
2812
|
+
//#region node_modules/.pnpm/@tanstack+react-form@1.32.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-form/dist/esm/useFormId.js
|
|
2796
2813
|
var Nn = n, Pn = n.version.split(".")[0] === "17" ? Mn : Nn.useId;
|
|
2797
2814
|
//#endregion
|
|
2798
|
-
//#region node_modules/.pnpm/@tanstack+react-form@1.
|
|
2815
|
+
//#region node_modules/.pnpm/@tanstack+react-form@1.32.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-form/dist/esm/useForm.js
|
|
2799
2816
|
function Fn({ form: e, selector: t = (e) => e, children: n }) {
|
|
2800
|
-
return /* @__PURE__ */ m(p, { children:
|
|
2817
|
+
return /* @__PURE__ */ m(p, { children: F(n, Q(e.store, t)) });
|
|
2801
2818
|
}
|
|
2802
2819
|
function In(e) {
|
|
2803
2820
|
let t = Pn(), [n, r] = f(e?.formId), [i, a] = f(() => new Sn({
|
|
@@ -2846,9 +2863,9 @@ function In(e) {
|
|
|
2846
2863
|
}), o;
|
|
2847
2864
|
}
|
|
2848
2865
|
//#endregion
|
|
2849
|
-
//#region node_modules/.pnpm/@tanstack+react-form@1.
|
|
2866
|
+
//#region node_modules/.pnpm/@tanstack+react-form@1.32.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-form/dist/esm/useFieldGroup.js
|
|
2850
2867
|
function Ln({ lens: e, selector: t = (e) => e, children: n }) {
|
|
2851
|
-
return /* @__PURE__ */ m(p, { children:
|
|
2868
|
+
return /* @__PURE__ */ m(p, { children: F(n, Q(e.store, t)) });
|
|
2852
2869
|
}
|
|
2853
2870
|
function Rn(e) {
|
|
2854
2871
|
let [t] = f(() => {
|
|
@@ -2870,7 +2887,7 @@ function Rn(e) {
|
|
|
2870
2887
|
return $(t.mount, [t]), t;
|
|
2871
2888
|
}
|
|
2872
2889
|
//#endregion
|
|
2873
|
-
//#region node_modules/.pnpm/@tanstack+react-form@1.
|
|
2890
|
+
//#region node_modules/.pnpm/@tanstack+react-form@1.32.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-form/dist/esm/createFormHook.js
|
|
2874
2891
|
var zn = r(null), Bn = r(null);
|
|
2875
2892
|
function Vn() {
|
|
2876
2893
|
let e = s(Bn);
|
|
@@ -2962,35 +2979,38 @@ function Un({ fieldComponents: e, fieldContext: t, formContext: n, formComponent
|
|
|
2962
2979
|
}
|
|
2963
2980
|
//#endregion
|
|
2964
2981
|
//#region src/components/form/form-errors.tsx
|
|
2965
|
-
var Wn = ({ className: e, children: n, ref: r, ...i }) => /* @__PURE__ */ m(
|
|
2982
|
+
var Wn = ({ className: e, children: n, ref: r, ...i }) => /* @__PURE__ */ m(ur().Subscribe, {
|
|
2966
2983
|
selector: (e) => [e.errors],
|
|
2967
2984
|
children: ([a]) => {
|
|
2968
2985
|
if (!a || a.length === 0) return null;
|
|
2969
2986
|
let o = [];
|
|
2970
2987
|
return a.forEach((e) => {
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2988
|
+
if (typeof e == "string") o.push(e);
|
|
2989
|
+
else if (e?.message && typeof e.message == "string") o.push(e.message);
|
|
2990
|
+
else if (typeof e == "object" && e) {
|
|
2991
|
+
let t = (e) => {
|
|
2992
|
+
typeof e == "string" ? o.push(e) : Array.isArray(e) ? e.forEach(t) : typeof e == "object" && e && ("message" in e && typeof e.message == "string" ? o.push(e.message) : Object.values(e).forEach(t));
|
|
2993
|
+
};
|
|
2994
|
+
t(e);
|
|
2995
|
+
}
|
|
2996
|
+
}), /* @__PURE__ */ h(Tt, {
|
|
2977
2997
|
className: t("", e),
|
|
2978
2998
|
ref: r,
|
|
2979
2999
|
tone: "error",
|
|
2980
3000
|
...i,
|
|
2981
|
-
children: [/* @__PURE__ */ m(
|
|
3001
|
+
children: [/* @__PURE__ */ m(It, { weight: "duotone" }), /* @__PURE__ */ h(Dt, { children: [n, /* @__PURE__ */ m(Et, { children: /* @__PURE__ */ m("ul", { children: o.length > 0 ? o.map((e) => /* @__PURE__ */ m("li", { children: e }, e)) : /* @__PURE__ */ m("li", {
|
|
2982
3002
|
className: "style-text-prose--1",
|
|
2983
3003
|
children: a.toString()
|
|
2984
3004
|
}) }) })] })]
|
|
2985
3005
|
});
|
|
2986
3006
|
}
|
|
2987
3007
|
}), Gn = ({ className: e, children: n, ref: r, ...i }) => {
|
|
2988
|
-
let a =
|
|
3008
|
+
let a = ur(), o = () => {
|
|
2989
3009
|
a.reset();
|
|
2990
3010
|
};
|
|
2991
3011
|
return /* @__PURE__ */ m(a.Subscribe, {
|
|
2992
3012
|
selector: (e) => e,
|
|
2993
|
-
children: (a) => /* @__PURE__ */ m(
|
|
3013
|
+
children: (a) => /* @__PURE__ */ m(At, {
|
|
2994
3014
|
className: t("w-full", e),
|
|
2995
3015
|
disabled: !a.values,
|
|
2996
3016
|
onClick: o,
|
|
@@ -3000,21 +3020,21 @@ var Wn = ({ className: e, children: n, ref: r, ...i }) => /* @__PURE__ */ m(ir()
|
|
|
3000
3020
|
children: n
|
|
3001
3021
|
})
|
|
3002
3022
|
});
|
|
3003
|
-
}, Kn = ({ className: e, children: n, ref: r, ...i }) => /* @__PURE__ */ m(
|
|
3023
|
+
}, Kn = ({ className: e, children: n, ref: r, ...i }) => /* @__PURE__ */ m(ur().Subscribe, {
|
|
3004
3024
|
selector: (e) => e,
|
|
3005
|
-
children: (a) => /* @__PURE__ */ m(
|
|
3025
|
+
children: (a) => /* @__PURE__ */ m(At, {
|
|
3006
3026
|
className: t("w-full", e),
|
|
3007
3027
|
disabled: a.isSubmitting || !a.canSubmit,
|
|
3008
3028
|
ref: r,
|
|
3009
3029
|
type: "submit",
|
|
3010
3030
|
...i,
|
|
3011
|
-
children: a.isSubmitting ? /* @__PURE__ */ m(
|
|
3031
|
+
children: a.isSubmitting ? /* @__PURE__ */ m(Ft, {
|
|
3012
3032
|
className: "animate-spin",
|
|
3013
3033
|
weight: "bold"
|
|
3014
3034
|
}) : n
|
|
3015
3035
|
})
|
|
3016
|
-
}), qn = a(() => import("./
|
|
3017
|
-
fieldContext:
|
|
3036
|
+
}), qn = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldDescription }))), Jn = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldErrors }))), Yn = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldInput }))), Xn = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldInputGroup }))), Zn = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldInputGroupInput }))), Qn = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldLabel }))), $n = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldSelect }))), er = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldSlider }))), tr = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldCheckbox }))), nr = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldRadio }))), rr = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldRadioGroup }))), ir = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldSwitch }))), ar = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldToggle }))), or = a(() => import("./dawn-ui-react.js").then((e) => ({ default: e.FieldSet }))), { fieldContext: sr, useFieldContext: cr, formContext: lr, useFormContext: ur } = Hn(), { useAppForm: dr, withFieldGroup: fr, withForm: pr, useTypedAppFormContext: mr } = Un({
|
|
3037
|
+
fieldContext: sr,
|
|
3018
3038
|
fieldComponents: {
|
|
3019
3039
|
FieldDescription: qn,
|
|
3020
3040
|
FieldErrors: Jn,
|
|
@@ -3023,9 +3043,15 @@ var Wn = ({ className: e, children: n, ref: r, ...i }) => /* @__PURE__ */ m(ir()
|
|
|
3023
3043
|
FieldInputGroupInput: Zn,
|
|
3024
3044
|
FieldLabel: Qn,
|
|
3025
3045
|
FieldSelect: $n,
|
|
3026
|
-
FieldSlider: er
|
|
3046
|
+
FieldSlider: er,
|
|
3047
|
+
FieldCheckbox: tr,
|
|
3048
|
+
FieldRadio: nr,
|
|
3049
|
+
FieldRadioGroup: rr,
|
|
3050
|
+
FieldSwitch: ir,
|
|
3051
|
+
FieldToggle: ar,
|
|
3052
|
+
FieldSet: or
|
|
3027
3053
|
},
|
|
3028
|
-
formContext:
|
|
3054
|
+
formContext: lr,
|
|
3029
3055
|
formComponents: {
|
|
3030
3056
|
FormErrors: Wn,
|
|
3031
3057
|
FormReset: Gn,
|
|
@@ -3033,4 +3059,4 @@ var Wn = ({ className: e, children: n, ref: r, ...i }) => /* @__PURE__ */ m(ir()
|
|
|
3033
3059
|
}
|
|
3034
3060
|
});
|
|
3035
3061
|
//#endregion
|
|
3036
|
-
export {
|
|
3062
|
+
export { ee as $, st as A, qe as B, Xe as C, mt as D, ft as E, tt as F, xe as G, De as H, et as I, ue as J, ve as K, nt as L, $e as M, ut as N, E as O, Ze as P, v as Q, rt as R, ct as S, Ye as T, Se as U, Re as V, b as W, oe as X, ce as Y, re as Z, Ct as _, ur as a, _t as b, pr as c, Wn as d, Pt as f, Tt as g, Et as h, cr as i, Qe as j, w as k, Kn as l, Dt as m, lr as n, mr as o, At as p, de as q, dr as r, fr as s, sr as t, Gn as u, yt as v, ht as w, dt as x, gt as y, lt as z };
|