@gobolt/genesis 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +10 -0
  2. package/dist/{AntdIcon-c395a1c4.js → AntdIcon-BoLh1dP8.js} +66 -68
  3. package/dist/CheckOutlined-CeTKr6II.js +13 -0
  4. package/dist/{CloseCircleFilled-ddc51e7e.js → CloseCircleFilled-DXCxlIQL.js} +8 -11
  5. package/dist/{CloseOutlined-14b8bba1.js → CloseOutlined-ClXDNn82.js} +9 -12
  6. package/dist/{Compact-c39ed20d.js → Compact-CGY560JF.js} +63 -65
  7. package/dist/ContextIsolator-D5x2Ih51.js +20 -0
  8. package/dist/{ExclamationCircleFilled-23ef9812.js → ExclamationCircleFilled-C0Kj5KQV.js} +16 -22
  9. package/dist/KeyCode-DM2sFh3-.js +517 -0
  10. package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
  11. package/dist/{Overflow-a570fa69.js → Overflow-PBZD-PFm.js} +63 -64
  12. package/dist/{DownOutlined-64a4732a.js → PurePanel-BqPLRtc2.js} +67 -70
  13. package/dist/{SearchOutlined-a9014e08.js → SearchOutlined-BP3Z2K6j.js} +8 -11
  14. package/dist/{TextArea-20825221.js → TextArea-DKwCct3i.js} +583 -588
  15. package/dist/Typography-aGoDUl4R.js +710 -0
  16. package/dist/bundle.css +1204 -0
  17. package/dist/{button-fa1c119c.js → button-CDQgO1OK.js} +274 -278
  18. package/dist/{collapse-345bc884.js → collapse-Dtpt-6W_.js} +2 -2
  19. package/dist/compact-item-DH13cl8A.js +61 -0
  20. package/dist/components/Badge/Badge.d.ts +2 -2
  21. package/dist/components/Badge/Badge.js +63 -62
  22. package/dist/components/Badge/__tests__/Badge.test.js +11 -65
  23. package/dist/components/Badge/index.js +2 -21
  24. package/dist/components/Badge/styles.js +7 -8
  25. package/dist/components/Breadcrumb/Breadcrumb.js +8 -24
  26. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +21 -7
  27. package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +13 -60
  28. package/dist/components/Breadcrumb/index.js +2 -25
  29. package/dist/components/Breadcrumb/styles.d.ts +10 -6
  30. package/dist/components/Breadcrumb/styles.js +787 -808
  31. package/dist/components/Button/Button.d.ts +6 -4
  32. package/dist/components/Button/Button.js +20 -40
  33. package/dist/components/Button/__tests__/Button.test.js +9 -54
  34. package/dist/components/Button/index.js +2 -20
  35. package/dist/components/Button/styles.d.ts +9 -5
  36. package/dist/components/Button/styles.js +19 -30
  37. package/dist/components/Checkbox/Checkbox.js +8 -38
  38. package/dist/components/Checkbox/__tests__/Checkbox.test.js +16 -62
  39. package/dist/components/Checkbox/index.js +2 -47
  40. package/dist/components/Checkbox/styles.d.ts +8 -1
  41. package/dist/components/Checkbox/styles.js +181 -188
  42. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +2 -4
  43. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +19 -51
  44. package/dist/components/ErrorBoundaryFallback/index.d.ts +1 -0
  45. package/dist/components/ErrorBoundaryFallback/index.js +2 -49
  46. package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -3
  47. package/dist/components/ErrorBoundaryFallback/styles.js +34 -37
  48. package/dist/components/Form/Form.d.ts +18 -5
  49. package/dist/components/Form/Form.js +4 -45
  50. package/dist/components/Form/__stories__/FormStory.js +44 -81
  51. package/dist/components/Form/__tests__/form.test.d.ts +1 -0
  52. package/dist/components/Form/__tests__/form.test.js +18 -0
  53. package/dist/components/Form/index.js +2 -46
  54. package/dist/components/Form/styles.d.ts +3 -0
  55. package/dist/components/Form/styles.js +5 -0
  56. package/dist/components/Input/Input.js +6 -29
  57. package/dist/components/Input/__tests__/Input.test.js +21 -66
  58. package/dist/components/Input/index.js +2 -29
  59. package/dist/components/Input/styles.d.ts +5 -2
  60. package/dist/components/Input/styles.js +319 -332
  61. package/dist/components/Message/Message.d.ts +4 -4
  62. package/dist/components/Message/Message.js +53 -80
  63. package/dist/components/Message/__tests__/Message.test.js +24 -70
  64. package/dist/components/Message/index.js +2 -48
  65. package/dist/components/Message/styles.d.ts +4 -1
  66. package/dist/components/Message/styles.js +24 -18
  67. package/dist/components/Notification/Notification.d.ts +11 -10
  68. package/dist/components/Notification/Notification.js +306 -372
  69. package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
  70. package/dist/components/Notification/NotificationRightChevron.js +23 -0
  71. package/dist/components/Notification/__tests__/Notification.test.js +8 -69
  72. package/dist/components/Notification/index.js +2 -59
  73. package/dist/components/Notification/styles.d.ts +13 -3
  74. package/dist/components/Notification/styles.js +36 -20
  75. package/dist/components/Radio/Radio.js +20 -106
  76. package/dist/components/Radio/RadioGroup.js +18 -71
  77. package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +1 -1
  78. package/dist/components/Radio/__tests__/RadioGroup.test.js +15 -70
  79. package/dist/components/Radio/index.d.ts +1 -1
  80. package/dist/components/Radio/index.js +2 -56
  81. package/dist/components/Select/DropdownChevron.d.ts +2 -0
  82. package/dist/components/Select/DropdownChevron.js +23 -0
  83. package/dist/components/Select/Select.d.ts +9 -4
  84. package/dist/components/Select/Select.js +29 -41
  85. package/dist/components/Select/__tests__/Select.test.js +10752 -93
  86. package/dist/components/Select/index.js +2 -28
  87. package/dist/components/Select/styles.d.ts +20 -6
  88. package/dist/components/Select/styles.js +1381 -1370
  89. package/dist/components/Toast/Toast.d.ts +4 -4
  90. package/dist/components/Toast/Toast.js +8 -37
  91. package/dist/components/Toast/__stories__/Toast.stories.d.ts +1 -0
  92. package/dist/components/Toast/__tests__/Toast.test.js +10 -55
  93. package/dist/components/Toast/index.js +2 -46
  94. package/dist/components/Toast/styles.d.ts +6 -1
  95. package/dist/components/Toast/styles.js +36 -21
  96. package/dist/components/Typography/Typography.d.ts +7 -4
  97. package/dist/components/Typography/Typography.js +2 -42
  98. package/dist/components/Typography/__stories__/Typography.stories.d.ts +1 -0
  99. package/dist/components/Typography/__tests__/Typography.test.js +19 -56
  100. package/dist/components/Typography/index.js +2 -46
  101. package/dist/components/Typography/styles.d.ts +18 -4
  102. package/dist/components/Typography/styles.js +36 -43
  103. package/dist/components/index.d.ts +13 -5
  104. package/dist/components/index.js +24 -70
  105. package/dist/{context-3b8a39af.js → context-BMW3aJEf.js} +538 -548
  106. package/dist/genesis/GenesisThemeBreakdown.js +38 -55
  107. package/dist/genesis/GenesisThemeDemo.js +3 -53
  108. package/dist/genesis/styles.d.ts +6 -2
  109. package/dist/genesis/styles.js +496 -521
  110. package/dist/{index-e2b72ca8.js → index-1CBpubM3.js} +97 -102
  111. package/dist/index-BZAhCB_K.js +97 -0
  112. package/dist/{index-501fc13d.js → index-C0SmxWLS.js} +367 -392
  113. package/dist/index-C8haFnXI.js +1112 -0
  114. package/dist/index-CfDY25LP.js +873 -0
  115. package/dist/index-DPW8XdWj.js +952 -0
  116. package/dist/{index-8c8d2d0c.js → index-bKlRxQp4.js} +114 -114
  117. package/dist/index-oK7z6jnz.js +22795 -0
  118. package/dist/index.d.ts +1 -0
  119. package/dist/index.js +31 -77
  120. package/dist/{isVisible-729780f5.js → isVisible-A-IfeFoT.js} +67 -94
  121. package/dist/{magic-string.es-b7491176.js → magic-string.es-D2FWSwU3.js} +56 -103
  122. package/dist/{pickAttrs-00ba4687.js → pickAttrs-B0YTfcV1.js} +1 -1
  123. package/dist/providers/GenesisProvider.d.ts +0 -5
  124. package/dist/providers/GenesisProvider.js +9 -59
  125. package/dist/providers/ThemeProvider.d.ts +1 -2
  126. package/dist/providers/ThemeProvider.js +11 -13
  127. package/dist/providers/ToastProvider.d.ts +11 -4
  128. package/dist/providers/ToastProvider.js +10 -39
  129. package/dist/providers/index.d.ts +2 -3
  130. package/dist/providers/index.js +4 -51
  131. package/dist/providers/useGenesis.d.ts +7 -0
  132. package/dist/providers/useGenesis.js +6 -0
  133. package/dist/setup-BvfREoHl.js +33891 -0
  134. package/dist/{styled-components.browser.esm-02f500bc.js → styled-components.browser.esm-CZ1XM4o4.js} +72 -134
  135. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +15 -45
  136. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +15 -45
  137. package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
  138. package/dist/styles/design-tokens/variables.d.ts +10 -10
  139. package/dist/styles/design-tokens/variables.js +1 -1
  140. package/dist/styles/global-styles.d.ts +1 -0
  141. package/dist/styles/global-styles.js +14 -31
  142. package/dist/styles/theme/genesis-theme.js +257 -212
  143. package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
  144. package/dist/styles/theme/index.js +4 -5
  145. package/dist/styles-CT_fyXBd.js +1808 -0
  146. package/dist/test/setup.js +3 -46
  147. package/dist/useLocale-DT-z_vQ6.js +16 -0
  148. package/dist/useVariants-DvhXfgJY.js +30 -0
  149. package/dist/utils/isAllEnglishString.js +1 -2
  150. package/dist/{presets-83ccb923.js → warning-C63HNL9U.js} +358 -356
  151. package/package.json +35 -35
  152. package/dist/CheckOutlined-52d9ac25.js +0 -29
  153. package/dist/ContextIsolator-b09b2c52.js +0 -20
  154. package/dist/EllipsisOutlined-60122660.js +0 -1115
  155. package/dist/InfoCircleFilled-c5f90c20.js +0 -16
  156. package/dist/RightOutlined-83515eb4.js +0 -16
  157. package/dist/compact-item-b8f85aa6.js +0 -75
  158. package/dist/index-0a886e53.js +0 -100
  159. package/dist/index-0b9ee239.js +0 -955
  160. package/dist/index-1a33c134.js +0 -1389
  161. package/dist/index-4003d75b.js +0 -3748
  162. package/dist/index-89035ea5.js +0 -3242
  163. package/dist/providers/ToastWrapper.d.ts +0 -7
  164. package/dist/providers/ToastWrapper.js +0 -56
  165. package/dist/setup-aaca7b6f.js +0 -21158
  166. package/dist/styles/theme/global-styles.d.ts +0 -1
  167. package/dist/styles/theme/global-styles.js +0 -36
  168. package/dist/useVariants-a0d64298.js +0 -30
  169. /package/dist/{presetColors-ccf8cb4c.js → presetColors-Cl8UP3Nw.js} +0 -0
  170. /package/dist/{reactNode-f4391605.js → reactNode-sKPeiqPL.js} +0 -0
@@ -0,0 +1,1808 @@
1
+ import { d as ft } from "./styled-components.browser.esm-CZ1XM4o4.js";
2
+ import { g as we, m as Xe, q as Q, E as mt, C as ue, o as ke, x as K, B as pt, O as gt, P as ht, v as be, D as bt, Q as yt, T as $t, S as xt, w as _e, h as Ct, t as vt, J as wt, U as Re, W as St, n as Ue, l as Et, u as Ot, s as It, y as Ft } from "./index-oK7z6jnz.js";
3
+ import { a as Se, u as Ee, b as Mt, V as Nt, c as Ke, d as ne, R as jt, F as ge, e as Ye, C as _t, L as Rt, W as Pt, f as Vt, g as Lt } from "./context-BMW3aJEf.js";
4
+ import * as l from "react";
5
+ import Dt, { createContext as Tt } from "react";
6
+ import { a as Wt, c as J } from "./warning-C63HNL9U.js";
7
+ import { a as Pe } from "./index-CfDY25LP.js";
8
+ import { g as Ht } from "./collapse-Dtpt-6W_.js";
9
+ import { z as Qe, T as At } from "./index-DPW8XdWj.js";
10
+ import { a as zt } from "./Compact-CGY560JF.js";
11
+ import { c as qt } from "./reactNode-sKPeiqPL.js";
12
+ import { t as Bt, i as Gt, o as Xt } from "./isVisible-A-IfeFoT.js";
13
+ import { I as kt } from "./AntdIcon-BoLh1dP8.js";
14
+ import { u as Ut } from "./useLocale-DT-z_vQ6.js";
15
+ import { R as Kt, a as Yt } from "./ExclamationCircleFilled-C0Kj5KQV.js";
16
+ import { R as Qt } from "./CloseCircleFilled-DXCxlIQL.js";
17
+ import { R as Jt } from "./LoadingOutlined-8EnJdZ7I.js";
18
+ var Zt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" }, en = function(t, r) {
19
+ return /* @__PURE__ */ l.createElement(kt, Wt({}, t, {
20
+ ref: r,
21
+ icon: Zt
22
+ }));
23
+ }, Je = /* @__PURE__ */ l.forwardRef(en);
24
+ process.env.NODE_ENV !== "production" && (Je.displayName = "QuestionCircleOutlined");
25
+ const Ve = (e) => typeof e == "object" && e != null && e.nodeType === 1, Le = (e, t) => (!t || e !== "hidden") && e !== "visible" && e !== "clip", fe = (e, t) => {
26
+ if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
27
+ const r = getComputedStyle(e, null);
28
+ return Le(r.overflowY, t) || Le(r.overflowX, t) || ((n) => {
29
+ const o = ((s) => {
30
+ if (!s.ownerDocument || !s.ownerDocument.defaultView) return null;
31
+ try {
32
+ return s.ownerDocument.defaultView.frameElement;
33
+ } catch {
34
+ return null;
35
+ }
36
+ })(n);
37
+ return !!o && (o.clientHeight < n.scrollHeight || o.clientWidth < n.scrollWidth);
38
+ })(e);
39
+ }
40
+ return !1;
41
+ }, me = (e, t, r, n, o, s, i, a) => s < e && i > t || s > e && i < t ? 0 : s <= e && a <= r || i >= t && a >= r ? s - e - n : i > t && a < r || s < e && a > r ? i - t + o : 0, tn = (e) => {
42
+ const t = e.parentElement;
43
+ return t ?? (e.getRootNode().host || null);
44
+ }, De = (e, t) => {
45
+ var r, n, o, s;
46
+ if (typeof document > "u") return [];
47
+ const { scrollMode: i, block: a, inline: c, boundary: f, skipOverflowHiddenElements: y } = t, $ = typeof f == "function" ? f : (A) => A !== f;
48
+ if (!Ve(e)) throw new TypeError("Invalid target");
49
+ const O = document.scrollingElement || document.documentElement, R = [];
50
+ let S = e;
51
+ for (; Ve(S) && $(S); ) {
52
+ if (S = tn(S), S === O) {
53
+ R.push(S);
54
+ break;
55
+ }
56
+ S != null && S === document.body && fe(S) && !fe(document.documentElement) || S != null && fe(S, y) && R.push(S);
57
+ }
58
+ const E = (n = (r = window.visualViewport) == null ? void 0 : r.width) != null ? n : innerWidth, I = (s = (o = window.visualViewport) == null ? void 0 : o.height) != null ? s : innerHeight, { scrollX: m, scrollY: N } = window, { height: u, width: h, top: p, right: b, bottom: P, left: v } = e.getBoundingClientRect(), { top: x, right: g, bottom: j, left: H } = ((A) => {
59
+ const d = window.getComputedStyle(A);
60
+ return { top: parseFloat(d.scrollMarginTop) || 0, right: parseFloat(d.scrollMarginRight) || 0, bottom: parseFloat(d.scrollMarginBottom) || 0, left: parseFloat(d.scrollMarginLeft) || 0 };
61
+ })(e);
62
+ let M = a === "start" || a === "nearest" ? p - x : a === "end" ? P + j : p + u / 2 - x + j, C = c === "center" ? v + h / 2 - H + g : c === "end" ? b + g : v - H;
63
+ const V = [];
64
+ for (let A = 0; A < R.length; A++) {
65
+ const d = R[A], { height: z, width: w, top: q, right: T, bottom: G, left: X } = d.getBoundingClientRect();
66
+ if (i === "if-needed" && p >= 0 && v >= 0 && P <= I && b <= E && (d === O && !fe(d) || p >= q && P <= G && v >= X && b <= T)) return V;
67
+ const U = getComputedStyle(d), Z = parseInt(U.borderLeftWidth, 10), ee = parseInt(U.borderTopWidth, 10), D = parseInt(U.borderRightWidth, 10), F = parseInt(U.borderBottomWidth, 10);
68
+ let _ = 0, L = 0;
69
+ const B = "offsetWidth" in d ? d.offsetWidth - d.clientWidth - Z - D : 0, k = "offsetHeight" in d ? d.offsetHeight - d.clientHeight - ee - F : 0, te = "offsetWidth" in d ? d.offsetWidth === 0 ? 0 : w / d.offsetWidth : 0, oe = "offsetHeight" in d ? d.offsetHeight === 0 ? 0 : z / d.offsetHeight : 0;
70
+ if (O === d) _ = a === "start" ? M : a === "end" ? M - I : a === "nearest" ? me(N, N + I, I, ee, F, N + M, N + M + u, u) : M - I / 2, L = c === "start" ? C : c === "center" ? C - E / 2 : c === "end" ? C - E : me(m, m + E, E, Z, D, m + C, m + C + h, h), _ = Math.max(0, _ + N), L = Math.max(0, L + m);
71
+ else {
72
+ _ = a === "start" ? M - q - ee : a === "end" ? M - G + F + k : a === "nearest" ? me(q, G, z, ee, F + k, M, M + u, u) : M - (q + z / 2) + k / 2, L = c === "start" ? C - X - Z : c === "center" ? C - (X + w / 2) + B / 2 : c === "end" ? C - T + D + B : me(X, T, w, Z, D + B, C, C + h, h);
73
+ const { scrollLeft: se, scrollTop: W } = d;
74
+ _ = oe === 0 ? 0 : Math.max(0, Math.min(W + _ / oe, d.scrollHeight - z / oe + k)), L = te === 0 ? 0 : Math.max(0, Math.min(se + L / te, d.scrollWidth - w / te + B)), M += W - _, C += se - L;
75
+ }
76
+ V.push({ el: d, top: _, left: L });
77
+ }
78
+ return V;
79
+ }, nn = (e) => e === !1 ? { block: "end", inline: "nearest" } : ((t) => t === Object(t) && Object.keys(t).length !== 0)(e) ? e : { block: "start", inline: "nearest" };
80
+ function rn(e, t) {
81
+ if (!e.isConnected || !((o) => {
82
+ let s = o;
83
+ for (; s && s.parentNode; ) {
84
+ if (s.parentNode === document) return !0;
85
+ s = s.parentNode instanceof ShadowRoot ? s.parentNode.host : s.parentNode;
86
+ }
87
+ return !1;
88
+ })(e)) return;
89
+ const r = ((o) => {
90
+ const s = window.getComputedStyle(o);
91
+ return { top: parseFloat(s.scrollMarginTop) || 0, right: parseFloat(s.scrollMarginRight) || 0, bottom: parseFloat(s.scrollMarginBottom) || 0, left: parseFloat(s.scrollMarginLeft) || 0 };
92
+ })(e);
93
+ if (((o) => typeof o == "object" && typeof o.behavior == "function")(t)) return t.behavior(De(e, t));
94
+ const n = typeof t == "boolean" || t == null ? void 0 : t.behavior;
95
+ for (const { el: o, top: s, left: i } of De(e, nn(t))) {
96
+ const a = s - r.top + r.bottom, c = i - r.left + r.right;
97
+ o.scroll({ top: a, left: c, behavior: n });
98
+ }
99
+ }
100
+ const on = (e) => {
101
+ const {
102
+ componentCls: t
103
+ } = e;
104
+ return {
105
+ // Grid system
106
+ [t]: {
107
+ display: "flex",
108
+ flexFlow: "row wrap",
109
+ minWidth: 0,
110
+ "&::before, &::after": {
111
+ display: "flex"
112
+ },
113
+ "&-no-wrap": {
114
+ flexWrap: "nowrap"
115
+ },
116
+ // The origin of the X-axis
117
+ "&-start": {
118
+ justifyContent: "flex-start"
119
+ },
120
+ // The center of the X-axis
121
+ "&-center": {
122
+ justifyContent: "center"
123
+ },
124
+ // The opposite of the X-axis
125
+ "&-end": {
126
+ justifyContent: "flex-end"
127
+ },
128
+ "&-space-between": {
129
+ justifyContent: "space-between"
130
+ },
131
+ "&-space-around": {
132
+ justifyContent: "space-around"
133
+ },
134
+ "&-space-evenly": {
135
+ justifyContent: "space-evenly"
136
+ },
137
+ // Align at the top
138
+ "&-top": {
139
+ alignItems: "flex-start"
140
+ },
141
+ // Align at the center
142
+ "&-middle": {
143
+ alignItems: "center"
144
+ },
145
+ "&-bottom": {
146
+ alignItems: "flex-end"
147
+ }
148
+ }
149
+ };
150
+ }, sn = (e) => {
151
+ const {
152
+ componentCls: t
153
+ } = e;
154
+ return {
155
+ // Grid system
156
+ [t]: {
157
+ position: "relative",
158
+ maxWidth: "100%",
159
+ // Prevent columns from collapsing when empty
160
+ minHeight: 1
161
+ }
162
+ };
163
+ }, ln = (e, t) => {
164
+ const {
165
+ prefixCls: r,
166
+ componentCls: n,
167
+ gridColumns: o
168
+ } = e, s = {};
169
+ for (let i = o; i >= 0; i--)
170
+ i === 0 ? (s[`${n}${t}-${i}`] = {
171
+ display: "none"
172
+ }, s[`${n}-push-${i}`] = {
173
+ insetInlineStart: "auto"
174
+ }, s[`${n}-pull-${i}`] = {
175
+ insetInlineEnd: "auto"
176
+ }, s[`${n}${t}-push-${i}`] = {
177
+ insetInlineStart: "auto"
178
+ }, s[`${n}${t}-pull-${i}`] = {
179
+ insetInlineEnd: "auto"
180
+ }, s[`${n}${t}-offset-${i}`] = {
181
+ marginInlineStart: 0
182
+ }, s[`${n}${t}-order-${i}`] = {
183
+ order: 0
184
+ }) : (s[`${n}${t}-${i}`] = [
185
+ // https://github.com/ant-design/ant-design/issues/44456
186
+ // Form set `display: flex` on Col which will override `display: block`.
187
+ // Let's get it from css variable to support override.
188
+ {
189
+ "--ant-display": "block",
190
+ // Fallback to display if variable not support
191
+ display: "block"
192
+ },
193
+ {
194
+ display: "var(--ant-display)",
195
+ flex: `0 0 ${i / o * 100}%`,
196
+ maxWidth: `${i / o * 100}%`
197
+ }
198
+ ], s[`${n}${t}-push-${i}`] = {
199
+ insetInlineStart: `${i / o * 100}%`
200
+ }, s[`${n}${t}-pull-${i}`] = {
201
+ insetInlineEnd: `${i / o * 100}%`
202
+ }, s[`${n}${t}-offset-${i}`] = {
203
+ marginInlineStart: `${i / o * 100}%`
204
+ }, s[`${n}${t}-order-${i}`] = {
205
+ order: i
206
+ });
207
+ return s[`${n}${t}-flex`] = {
208
+ flex: `var(--${r}${t}-flex)`
209
+ }, s;
210
+ }, ve = (e, t) => ln(e, t), an = (e, t, r) => ({
211
+ [`@media (min-width: ${Q(t)})`]: Object.assign({}, ve(e, r))
212
+ }), cn = () => ({}), un = () => ({}), dn = we("Grid", on, cn), fn = (e) => ({
213
+ xs: e.screenXSMin,
214
+ sm: e.screenSMMin,
215
+ md: e.screenMDMin,
216
+ lg: e.screenLGMin,
217
+ xl: e.screenXLMin,
218
+ xxl: e.screenXXLMin
219
+ }), mn = we("Grid", (e) => {
220
+ const t = Xe(e, {
221
+ gridColumns: 24
222
+ // Row is divided into 24 parts in Grid
223
+ }), r = fn(t);
224
+ return delete r.xs, [sn(t), ve(t, ""), ve(t, "-xs"), Object.keys(r).map((n) => an(t, r[n], `-${n}`)).reduce((n, o) => Object.assign(Object.assign({}, n), o), {})];
225
+ }, un), ce = ["xxl", "xl", "lg", "md", "sm", "xs"], pn = (e) => ({
226
+ xs: `(max-width: ${e.screenXSMax}px)`,
227
+ sm: `(min-width: ${e.screenSM}px)`,
228
+ md: `(min-width: ${e.screenMD}px)`,
229
+ lg: `(min-width: ${e.screenLG}px)`,
230
+ xl: `(min-width: ${e.screenXL}px)`,
231
+ xxl: `(min-width: ${e.screenXXL}px)`
232
+ }), gn = (e) => {
233
+ const t = e, r = [].concat(ce).reverse();
234
+ return r.forEach((n, o) => {
235
+ const s = n.toUpperCase(), i = `screen${s}Min`, a = `screen${s}`;
236
+ if (!(t[i] <= t[a]))
237
+ throw new Error(`${i}<=${a} fails : !(${t[i]}<=${t[a]})`);
238
+ if (o < r.length - 1) {
239
+ const c = `screen${s}Max`;
240
+ if (!(t[a] <= t[c]))
241
+ throw new Error(`${a}<=${c} fails : !(${t[a]}<=${t[c]})`);
242
+ const y = `screen${r[o + 1].toUpperCase()}Min`;
243
+ if (!(t[c] <= t[y]))
244
+ throw new Error(`${c}<=${y} fails : !(${t[c]}<=${t[y]})`);
245
+ }
246
+ }), e;
247
+ };
248
+ function hn() {
249
+ const [, e] = mt(), t = pn(gn(e));
250
+ return Dt.useMemo(() => {
251
+ const r = /* @__PURE__ */ new Map();
252
+ let n = -1, o = {};
253
+ return {
254
+ matchHandlers: {},
255
+ dispatch(s) {
256
+ return o = s, r.forEach((i) => i(o)), r.size >= 1;
257
+ },
258
+ subscribe(s) {
259
+ return r.size || this.register(), n += 1, r.set(n, s), s(o), n;
260
+ },
261
+ unsubscribe(s) {
262
+ r.delete(s), r.size || this.unregister();
263
+ },
264
+ unregister() {
265
+ Object.keys(t).forEach((s) => {
266
+ const i = t[s], a = this.matchHandlers[i];
267
+ a == null || a.mql.removeListener(a == null ? void 0 : a.listener);
268
+ }), r.clear();
269
+ },
270
+ register() {
271
+ Object.keys(t).forEach((s) => {
272
+ const i = t[s], a = (f) => {
273
+ let {
274
+ matches: y
275
+ } = f;
276
+ this.dispatch(Object.assign(Object.assign({}, o), {
277
+ [s]: y
278
+ }));
279
+ }, c = window.matchMedia(i);
280
+ c.addListener(a), this.matchHandlers[i] = {
281
+ mql: c,
282
+ listener: a
283
+ }, a(c);
284
+ });
285
+ },
286
+ responsiveMap: t
287
+ };
288
+ }, [e]);
289
+ }
290
+ const Ze = /* @__PURE__ */ Tt({});
291
+ var bn = function(e, t) {
292
+ var r = {};
293
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
294
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
295
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
296
+ return r;
297
+ };
298
+ function Te(e) {
299
+ return typeof e == "number" ? `${e} ${e} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(e) ? `0 0 ${e}` : e;
300
+ }
301
+ const yn = ["xs", "sm", "md", "lg", "xl", "xxl"], Oe = /* @__PURE__ */ l.forwardRef((e, t) => {
302
+ const {
303
+ getPrefixCls: r,
304
+ direction: n
305
+ } = l.useContext(ue), {
306
+ gutter: o,
307
+ wrap: s
308
+ } = l.useContext(Ze), {
309
+ prefixCls: i,
310
+ span: a,
311
+ order: c,
312
+ offset: f,
313
+ push: y,
314
+ pull: $,
315
+ className: O,
316
+ children: R,
317
+ flex: S,
318
+ style: E
319
+ } = e, I = bn(e, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]), m = r("col", i), [N, u, h] = mn(m), p = {};
320
+ let b = {};
321
+ yn.forEach((x) => {
322
+ let g = {};
323
+ const j = e[x];
324
+ typeof j == "number" ? g.span = j : typeof j == "object" && (g = j || {}), delete I[x], b = Object.assign(Object.assign({}, b), {
325
+ [`${m}-${x}-${g.span}`]: g.span !== void 0,
326
+ [`${m}-${x}-order-${g.order}`]: g.order || g.order === 0,
327
+ [`${m}-${x}-offset-${g.offset}`]: g.offset || g.offset === 0,
328
+ [`${m}-${x}-push-${g.push}`]: g.push || g.push === 0,
329
+ [`${m}-${x}-pull-${g.pull}`]: g.pull || g.pull === 0,
330
+ [`${m}-rtl`]: n === "rtl"
331
+ }), g.flex && (b[`${m}-${x}-flex`] = !0, p[`--${m}-${x}-flex`] = Te(g.flex));
332
+ });
333
+ const P = J(m, {
334
+ [`${m}-${a}`]: a !== void 0,
335
+ [`${m}-order-${c}`]: c,
336
+ [`${m}-offset-${f}`]: f,
337
+ [`${m}-push-${y}`]: y,
338
+ [`${m}-pull-${$}`]: $
339
+ }, O, b, u, h), v = {};
340
+ if (o && o[0] > 0) {
341
+ const x = o[0] / 2;
342
+ v.paddingLeft = x, v.paddingRight = x;
343
+ }
344
+ return S && (v.flex = Te(S), s === !1 && !v.minWidth && (v.minWidth = 0)), N(/* @__PURE__ */ l.createElement("div", Object.assign({}, I, {
345
+ style: Object.assign(Object.assign(Object.assign({}, v), E), p),
346
+ className: P,
347
+ ref: t
348
+ }), R));
349
+ });
350
+ process.env.NODE_ENV !== "production" && (Oe.displayName = "Col");
351
+ var $n = function(e, t) {
352
+ var r = {};
353
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
354
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
355
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
356
+ return r;
357
+ };
358
+ function We(e, t) {
359
+ const [r, n] = l.useState(typeof e == "string" ? e : ""), o = () => {
360
+ if (typeof e == "string" && n(e), typeof e == "object")
361
+ for (let s = 0; s < ce.length; s++) {
362
+ const i = ce[s];
363
+ if (!t[i])
364
+ continue;
365
+ const a = e[i];
366
+ if (a !== void 0) {
367
+ n(a);
368
+ return;
369
+ }
370
+ }
371
+ };
372
+ return l.useEffect(() => {
373
+ o();
374
+ }, [JSON.stringify(e), t]), r;
375
+ }
376
+ const et = /* @__PURE__ */ l.forwardRef((e, t) => {
377
+ const {
378
+ prefixCls: r,
379
+ justify: n,
380
+ align: o,
381
+ className: s,
382
+ style: i,
383
+ children: a,
384
+ gutter: c = 0,
385
+ wrap: f
386
+ } = e, y = $n(e, ["prefixCls", "justify", "align", "className", "style", "children", "gutter", "wrap"]), {
387
+ getPrefixCls: $,
388
+ direction: O
389
+ } = l.useContext(ue), [R, S] = l.useState({
390
+ xs: !0,
391
+ sm: !0,
392
+ md: !0,
393
+ lg: !0,
394
+ xl: !0,
395
+ xxl: !0
396
+ }), [E, I] = l.useState({
397
+ xs: !1,
398
+ sm: !1,
399
+ md: !1,
400
+ lg: !1,
401
+ xl: !1,
402
+ xxl: !1
403
+ }), m = We(o, E), N = We(n, E), u = l.useRef(c), h = hn();
404
+ l.useEffect(() => {
405
+ const d = h.subscribe((z) => {
406
+ I(z);
407
+ const w = u.current || 0;
408
+ (!Array.isArray(w) && typeof w == "object" || Array.isArray(w) && (typeof w[0] == "object" || typeof w[1] == "object")) && S(z);
409
+ });
410
+ return () => h.unsubscribe(d);
411
+ }, []);
412
+ const p = () => {
413
+ const d = [void 0, void 0];
414
+ return (Array.isArray(c) ? c : [c, void 0]).forEach((w, q) => {
415
+ if (typeof w == "object")
416
+ for (let T = 0; T < ce.length; T++) {
417
+ const G = ce[T];
418
+ if (R[G] && w[G] !== void 0) {
419
+ d[q] = w[G];
420
+ break;
421
+ }
422
+ }
423
+ else
424
+ d[q] = w;
425
+ }), d;
426
+ }, b = $("row", r), [P, v, x] = dn(b), g = p(), j = J(b, {
427
+ [`${b}-no-wrap`]: f === !1,
428
+ [`${b}-${N}`]: N,
429
+ [`${b}-${m}`]: m,
430
+ [`${b}-rtl`]: O === "rtl"
431
+ }, s, v, x), H = {}, M = g[0] != null && g[0] > 0 ? g[0] / -2 : void 0;
432
+ M && (H.marginLeft = M, H.marginRight = M);
433
+ const [C, V] = g;
434
+ H.rowGap = V;
435
+ const A = l.useMemo(() => ({
436
+ gutter: [C, V],
437
+ wrap: f
438
+ }), [C, V, f]);
439
+ return P(/* @__PURE__ */ l.createElement(Ze.Provider, {
440
+ value: A
441
+ }, /* @__PURE__ */ l.createElement("div", Object.assign({}, y, {
442
+ className: j,
443
+ style: Object.assign(Object.assign({}, H), i),
444
+ ref: t
445
+ }), a)));
446
+ });
447
+ process.env.NODE_ENV !== "production" && (et.displayName = "Row");
448
+ function he(e) {
449
+ const [t, r] = l.useState(e);
450
+ return l.useEffect(() => {
451
+ const n = setTimeout(() => {
452
+ r(e);
453
+ }, e.length ? 0 : 10);
454
+ return () => {
455
+ clearTimeout(n);
456
+ };
457
+ }, [e]), t;
458
+ }
459
+ const xn = (e) => {
460
+ const {
461
+ componentCls: t
462
+ } = e, r = `${t}-show-help`, n = `${t}-show-help-item`;
463
+ return {
464
+ [r]: {
465
+ // Explain holder
466
+ transition: `opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,
467
+ "&-appear, &-enter": {
468
+ opacity: 0,
469
+ "&-active": {
470
+ opacity: 1
471
+ }
472
+ },
473
+ "&-leave": {
474
+ opacity: 1,
475
+ "&-active": {
476
+ opacity: 0
477
+ }
478
+ },
479
+ // Explain
480
+ [n]: {
481
+ overflow: "hidden",
482
+ transition: `height ${e.motionDurationFast} ${e.motionEaseInOut},
483
+ opacity ${e.motionDurationFast} ${e.motionEaseInOut},
484
+ transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,
485
+ [`&${n}-appear, &${n}-enter`]: {
486
+ transform: "translateY(-5px)",
487
+ opacity: 0,
488
+ "&-active": {
489
+ transform: "translateY(0)",
490
+ opacity: 1
491
+ }
492
+ },
493
+ [`&${n}-leave-active`]: {
494
+ transform: "translateY(-5px)"
495
+ }
496
+ }
497
+ }
498
+ };
499
+ }, Cn = (e) => ({
500
+ legend: {
501
+ display: "block",
502
+ width: "100%",
503
+ marginBottom: e.marginLG,
504
+ padding: 0,
505
+ color: e.colorTextDescription,
506
+ fontSize: e.fontSizeLG,
507
+ lineHeight: "inherit",
508
+ border: 0,
509
+ borderBottom: `${Q(e.lineWidth)} ${e.lineType} ${e.colorBorder}`
510
+ },
511
+ 'input[type="search"]': {
512
+ boxSizing: "border-box"
513
+ },
514
+ // Position radios and checkboxes better
515
+ 'input[type="radio"], input[type="checkbox"]': {
516
+ lineHeight: "normal"
517
+ },
518
+ 'input[type="file"]': {
519
+ display: "block"
520
+ },
521
+ // Make range inputs behave like textual form controls
522
+ 'input[type="range"]': {
523
+ display: "block",
524
+ width: "100%"
525
+ },
526
+ // Make multiple select elements height not fixed
527
+ "select[multiple], select[size]": {
528
+ height: "auto"
529
+ },
530
+ // Focus for file, radio, and checkbox
531
+ "input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus": {
532
+ outline: 0,
533
+ boxShadow: `0 0 0 ${Q(e.controlOutlineWidth)} ${e.controlOutline}`
534
+ },
535
+ // Adjust output element
536
+ output: {
537
+ display: "block",
538
+ paddingTop: 15,
539
+ color: e.colorText,
540
+ fontSize: e.fontSize,
541
+ lineHeight: e.lineHeight
542
+ }
543
+ }), He = (e, t) => {
544
+ const {
545
+ formItemCls: r
546
+ } = e;
547
+ return {
548
+ [r]: {
549
+ [`${r}-label > label`]: {
550
+ height: t
551
+ },
552
+ [`${r}-control-input`]: {
553
+ minHeight: t
554
+ }
555
+ }
556
+ };
557
+ }, vn = (e) => {
558
+ const {
559
+ componentCls: t
560
+ } = e;
561
+ return {
562
+ [e.componentCls]: Object.assign(Object.assign(Object.assign({}, ke(e)), Cn(e)), {
563
+ [`${t}-text`]: {
564
+ display: "inline-block",
565
+ paddingInlineEnd: e.paddingSM
566
+ },
567
+ // ================================================================
568
+ // = Size =
569
+ // ================================================================
570
+ "&-small": Object.assign({}, He(e, e.controlHeightSM)),
571
+ "&-large": Object.assign({}, He(e, e.controlHeightLG))
572
+ })
573
+ };
574
+ }, wn = (e) => {
575
+ const {
576
+ formItemCls: t,
577
+ iconCls: r,
578
+ componentCls: n,
579
+ rootPrefixCls: o,
580
+ antCls: s,
581
+ labelRequiredMarkColor: i,
582
+ labelColor: a,
583
+ labelFontSize: c,
584
+ labelHeight: f,
585
+ labelColonMarginInlineStart: y,
586
+ labelColonMarginInlineEnd: $,
587
+ itemMarginBottom: O
588
+ } = e;
589
+ return {
590
+ [t]: Object.assign(Object.assign({}, ke(e)), {
591
+ marginBottom: O,
592
+ verticalAlign: "top",
593
+ "&-with-help": {
594
+ transition: "none"
595
+ },
596
+ [`&-hidden,
597
+ &-hidden${s}-row`]: {
598
+ // https://github.com/ant-design/ant-design/issues/26141
599
+ display: "none"
600
+ },
601
+ "&-has-warning": {
602
+ [`${t}-split`]: {
603
+ color: e.colorError
604
+ }
605
+ },
606
+ "&-has-error": {
607
+ [`${t}-split`]: {
608
+ color: e.colorWarning
609
+ }
610
+ },
611
+ // ==============================================================
612
+ // = Label =
613
+ // ==============================================================
614
+ [`${t}-label`]: {
615
+ flexGrow: 0,
616
+ overflow: "hidden",
617
+ whiteSpace: "nowrap",
618
+ textAlign: "end",
619
+ verticalAlign: "middle",
620
+ "&-left": {
621
+ textAlign: "start"
622
+ },
623
+ "&-wrap": {
624
+ overflow: "unset",
625
+ lineHeight: e.lineHeight,
626
+ whiteSpace: "unset"
627
+ },
628
+ "> label": {
629
+ position: "relative",
630
+ display: "inline-flex",
631
+ alignItems: "center",
632
+ maxWidth: "100%",
633
+ height: f,
634
+ color: a,
635
+ fontSize: c,
636
+ [`> ${r}`]: {
637
+ fontSize: e.fontSize,
638
+ verticalAlign: "top"
639
+ },
640
+ // Required mark
641
+ [`&${t}-required:not(${t}-required-mark-optional)::before`]: {
642
+ display: "inline-block",
643
+ marginInlineEnd: e.marginXXS,
644
+ color: i,
645
+ fontSize: e.fontSize,
646
+ fontFamily: "SimSun, sans-serif",
647
+ lineHeight: 1,
648
+ content: '"*"',
649
+ [`${n}-hide-required-mark &`]: {
650
+ display: "none"
651
+ }
652
+ },
653
+ // Optional mark
654
+ [`${t}-optional`]: {
655
+ display: "inline-block",
656
+ marginInlineStart: e.marginXXS,
657
+ color: e.colorTextDescription,
658
+ [`${n}-hide-required-mark &`]: {
659
+ display: "none"
660
+ }
661
+ },
662
+ // Optional mark
663
+ [`${t}-tooltip`]: {
664
+ color: e.colorTextDescription,
665
+ cursor: "help",
666
+ writingMode: "horizontal-tb",
667
+ marginInlineStart: e.marginXXS
668
+ },
669
+ "&::after": {
670
+ content: '":"',
671
+ position: "relative",
672
+ marginBlock: 0,
673
+ marginInlineStart: y,
674
+ marginInlineEnd: $
675
+ },
676
+ [`&${t}-no-colon::after`]: {
677
+ content: '"\\a0"'
678
+ }
679
+ }
680
+ },
681
+ // ==============================================================
682
+ // = Input =
683
+ // ==============================================================
684
+ [`${t}-control`]: {
685
+ "--ant-display": "flex",
686
+ flexDirection: "column",
687
+ flexGrow: 1,
688
+ [`&:first-child:not([class^="'${o}-col-'"]):not([class*="' ${o}-col-'"])`]: {
689
+ width: "100%"
690
+ },
691
+ "&-input": {
692
+ position: "relative",
693
+ display: "flex",
694
+ alignItems: "center",
695
+ minHeight: e.controlHeight,
696
+ "&-content": {
697
+ flex: "auto",
698
+ maxWidth: "100%"
699
+ }
700
+ }
701
+ },
702
+ // ==============================================================
703
+ // = Explain =
704
+ // ==============================================================
705
+ [t]: {
706
+ "&-additional": {
707
+ display: "flex",
708
+ flexDirection: "column"
709
+ },
710
+ "&-explain, &-extra": {
711
+ clear: "both",
712
+ color: e.colorTextDescription,
713
+ fontSize: e.fontSize,
714
+ lineHeight: e.lineHeight
715
+ },
716
+ "&-explain-connected": {
717
+ width: "100%"
718
+ },
719
+ "&-extra": {
720
+ minHeight: e.controlHeightSM,
721
+ transition: `color ${e.motionDurationMid} ${e.motionEaseOut}`
722
+ // sync input color transition
723
+ },
724
+ "&-explain": {
725
+ "&-error": {
726
+ color: e.colorError
727
+ },
728
+ "&-warning": {
729
+ color: e.colorWarning
730
+ }
731
+ }
732
+ },
733
+ [`&-with-help ${t}-explain`]: {
734
+ height: "auto",
735
+ opacity: 1
736
+ },
737
+ // ==============================================================
738
+ // = Feedback Icon =
739
+ // ==============================================================
740
+ [`${t}-feedback-icon`]: {
741
+ fontSize: e.fontSize,
742
+ textAlign: "center",
743
+ visibility: "visible",
744
+ animationName: Qe,
745
+ animationDuration: e.motionDurationMid,
746
+ animationTimingFunction: e.motionEaseOutBack,
747
+ pointerEvents: "none",
748
+ "&-success": {
749
+ color: e.colorSuccess
750
+ },
751
+ "&-error": {
752
+ color: e.colorError
753
+ },
754
+ "&-warning": {
755
+ color: e.colorWarning
756
+ },
757
+ "&-validating": {
758
+ color: e.colorPrimary
759
+ }
760
+ }
761
+ })
762
+ };
763
+ }, Ae = (e, t) => {
764
+ const {
765
+ formItemCls: r
766
+ } = e;
767
+ return {
768
+ [`${t}-horizontal`]: {
769
+ [`${r}-label`]: {
770
+ flexGrow: 0
771
+ },
772
+ [`${r}-control`]: {
773
+ flex: "1 1 0",
774
+ // https://github.com/ant-design/ant-design/issues/32777
775
+ // https://github.com/ant-design/ant-design/issues/33773
776
+ minWidth: 0
777
+ },
778
+ // Do not change this to `ant-col-24`! `-24` match all the responsive rules
779
+ // https://github.com/ant-design/ant-design/issues/32980
780
+ // https://github.com/ant-design/ant-design/issues/34903
781
+ // https://github.com/ant-design/ant-design/issues/44538
782
+ [`${r}-label[class$='-24'], ${r}-label[class*='-24 ']`]: {
783
+ [`& + ${r}-control`]: {
784
+ minWidth: "unset"
785
+ }
786
+ }
787
+ }
788
+ };
789
+ }, Sn = (e) => {
790
+ const {
791
+ componentCls: t,
792
+ formItemCls: r,
793
+ inlineItemMarginBottom: n
794
+ } = e;
795
+ return {
796
+ [`${t}-inline`]: {
797
+ display: "flex",
798
+ flexWrap: "wrap",
799
+ [r]: {
800
+ flex: "none",
801
+ marginInlineEnd: e.margin,
802
+ marginBottom: n,
803
+ "&-row": {
804
+ flexWrap: "nowrap"
805
+ },
806
+ [`> ${r}-label,
807
+ > ${r}-control`]: {
808
+ display: "inline-block",
809
+ verticalAlign: "top"
810
+ },
811
+ [`> ${r}-label`]: {
812
+ flex: "none"
813
+ },
814
+ [`${t}-text`]: {
815
+ display: "inline-block"
816
+ },
817
+ [`${r}-has-feedback`]: {
818
+ display: "inline-block"
819
+ }
820
+ }
821
+ }
822
+ };
823
+ }, Y = (e) => ({
824
+ padding: e.verticalLabelPadding,
825
+ margin: e.verticalLabelMargin,
826
+ whiteSpace: "initial",
827
+ textAlign: "start",
828
+ "> label": {
829
+ margin: 0,
830
+ "&::after": {
831
+ // https://github.com/ant-design/ant-design/issues/43538
832
+ visibility: "hidden"
833
+ }
834
+ }
835
+ }), tt = (e) => {
836
+ const {
837
+ componentCls: t,
838
+ formItemCls: r,
839
+ rootPrefixCls: n
840
+ } = e;
841
+ return {
842
+ [`${r} ${r}-label`]: Y(e),
843
+ // ref: https://github.com/ant-design/ant-design/issues/45122
844
+ [`${t}:not(${t}-inline)`]: {
845
+ [r]: {
846
+ flexWrap: "wrap",
847
+ [`${r}-label, ${r}-control`]: {
848
+ // When developer pass `xs: { span }`,
849
+ // It should follow the `xs` screen config
850
+ // ref: https://github.com/ant-design/ant-design/issues/44386
851
+ [`&:not([class*=" ${n}-col-xs"])`]: {
852
+ flex: "0 0 100%",
853
+ maxWidth: "100%"
854
+ }
855
+ }
856
+ }
857
+ }
858
+ };
859
+ }, En = (e) => {
860
+ const {
861
+ componentCls: t,
862
+ formItemCls: r,
863
+ antCls: n
864
+ } = e;
865
+ return {
866
+ [`${t}-vertical`]: {
867
+ [`${r}:not(${r}-horizontal)`]: {
868
+ [`${r}-row`]: {
869
+ flexDirection: "column"
870
+ },
871
+ [`${r}-label > label`]: {
872
+ height: "auto"
873
+ },
874
+ [`${r}-control`]: {
875
+ width: "100%"
876
+ },
877
+ [`${r}-label,
878
+ ${n}-col-24${r}-label,
879
+ ${n}-col-xl-24${r}-label`]: Y(e)
880
+ }
881
+ },
882
+ [`@media (max-width: ${Q(e.screenXSMax)})`]: [tt(e), {
883
+ [t]: {
884
+ [`${r}:not(${r}-horizontal)`]: {
885
+ [`${n}-col-xs-24${r}-label`]: Y(e)
886
+ }
887
+ }
888
+ }],
889
+ [`@media (max-width: ${Q(e.screenSMMax)})`]: {
890
+ [t]: {
891
+ [`${r}:not(${r}-horizontal)`]: {
892
+ [`${n}-col-sm-24${r}-label`]: Y(e)
893
+ }
894
+ }
895
+ },
896
+ [`@media (max-width: ${Q(e.screenMDMax)})`]: {
897
+ [t]: {
898
+ [`${r}:not(${r}-horizontal)`]: {
899
+ [`${n}-col-md-24${r}-label`]: Y(e)
900
+ }
901
+ }
902
+ },
903
+ [`@media (max-width: ${Q(e.screenLGMax)})`]: {
904
+ [t]: {
905
+ [`${r}:not(${r}-horizontal)`]: {
906
+ [`${n}-col-lg-24${r}-label`]: Y(e)
907
+ }
908
+ }
909
+ }
910
+ };
911
+ }, On = (e) => {
912
+ const {
913
+ formItemCls: t,
914
+ antCls: r
915
+ } = e;
916
+ return {
917
+ [`${t}-vertical`]: {
918
+ [`${t}-row`]: {
919
+ flexDirection: "column"
920
+ },
921
+ [`${t}-label > label`]: {
922
+ height: "auto"
923
+ },
924
+ [`${t}-control`]: {
925
+ width: "100%"
926
+ }
927
+ },
928
+ [`${t}-vertical ${t}-label,
929
+ ${r}-col-24${t}-label,
930
+ ${r}-col-xl-24${t}-label`]: Y(e),
931
+ [`@media (max-width: ${Q(e.screenXSMax)})`]: [tt(e), {
932
+ [t]: {
933
+ [`${r}-col-xs-24${t}-label`]: Y(e)
934
+ }
935
+ }],
936
+ [`@media (max-width: ${Q(e.screenSMMax)})`]: {
937
+ [t]: {
938
+ [`${r}-col-sm-24${t}-label`]: Y(e)
939
+ }
940
+ },
941
+ [`@media (max-width: ${Q(e.screenMDMax)})`]: {
942
+ [t]: {
943
+ [`${r}-col-md-24${t}-label`]: Y(e)
944
+ }
945
+ },
946
+ [`@media (max-width: ${Q(e.screenLGMax)})`]: {
947
+ [t]: {
948
+ [`${r}-col-lg-24${t}-label`]: Y(e)
949
+ }
950
+ }
951
+ };
952
+ }, In = (e) => ({
953
+ labelRequiredMarkColor: e.colorError,
954
+ labelColor: e.colorTextHeading,
955
+ labelFontSize: e.fontSize,
956
+ labelHeight: e.controlHeight,
957
+ labelColonMarginInlineStart: e.marginXXS / 2,
958
+ labelColonMarginInlineEnd: e.marginXS,
959
+ itemMarginBottom: e.marginLG,
960
+ verticalLabelPadding: `0 0 ${e.paddingXS}px`,
961
+ verticalLabelMargin: 0,
962
+ inlineItemMarginBottom: 0
963
+ }), nt = (e, t) => Xe(e, {
964
+ formItemCls: `${e.componentCls}-item`,
965
+ rootPrefixCls: t
966
+ }), Ie = we("Form", (e, t) => {
967
+ let {
968
+ rootPrefixCls: r
969
+ } = t;
970
+ const n = nt(e, r);
971
+ return [vn(n), wn(n), xn(n), Ae(n, n.componentCls), Ae(n, n.formItemCls), Sn(n), En(n), On(n), Ht(n), Qe];
972
+ }, In, {
973
+ // Let From style before the Grid
974
+ // ref https://github.com/ant-design/ant-design/issues/44386
975
+ order: -1e3
976
+ }), ze = [];
977
+ function Ce(e, t, r) {
978
+ let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
979
+ return {
980
+ key: typeof e == "string" ? e : `${t}-${n}`,
981
+ error: e,
982
+ errorStatus: r
983
+ };
984
+ }
985
+ const rt = (e) => {
986
+ let {
987
+ help: t,
988
+ helpStatus: r,
989
+ errors: n = ze,
990
+ warnings: o = ze,
991
+ className: s,
992
+ fieldId: i,
993
+ onVisibleChanged: a
994
+ } = e;
995
+ const {
996
+ prefixCls: c
997
+ } = l.useContext(Se), f = `${c}-item-explain`, y = Ee(c), [$, O, R] = Ie(c, y), S = l.useMemo(() => Pe(c), [c]), E = he(n), I = he(o), m = l.useMemo(() => t != null ? [Ce(t, "help", r)] : [].concat(K(E.map((h, p) => Ce(h, "error", "error", p))), K(I.map((h, p) => Ce(h, "warning", "warning", p)))), [t, r, E, I]), N = l.useMemo(() => {
998
+ const h = {};
999
+ return m.forEach((p) => {
1000
+ let {
1001
+ key: b
1002
+ } = p;
1003
+ h[b] = (h[b] || 0) + 1;
1004
+ }), m.map((p, b) => Object.assign(Object.assign({}, p), {
1005
+ key: h[p.key] > 1 ? `${p.key}-fallback-${b}` : p.key
1006
+ }));
1007
+ }, [m]), u = {};
1008
+ return i && (u.id = `${i}_help`), $(/* @__PURE__ */ l.createElement(pt, {
1009
+ motionDeadline: S.motionDeadline,
1010
+ motionName: `${c}-show-help`,
1011
+ visible: !!N.length,
1012
+ onVisibleChanged: a
1013
+ }, (h) => {
1014
+ const {
1015
+ className: p,
1016
+ style: b
1017
+ } = h;
1018
+ return /* @__PURE__ */ l.createElement("div", Object.assign({}, u, {
1019
+ className: J(f, p, R, y, s, O),
1020
+ style: b,
1021
+ role: "alert"
1022
+ }), /* @__PURE__ */ l.createElement(gt, Object.assign({
1023
+ keys: N
1024
+ }, Pe(c), {
1025
+ motionName: `${c}-show-help-item`,
1026
+ component: !1
1027
+ }), (P) => {
1028
+ const {
1029
+ key: v,
1030
+ error: x,
1031
+ errorStatus: g,
1032
+ className: j,
1033
+ style: H
1034
+ } = P;
1035
+ return /* @__PURE__ */ l.createElement("div", {
1036
+ key: v,
1037
+ className: J(j, {
1038
+ [`${f}-${g}`]: g
1039
+ }),
1040
+ style: H
1041
+ }, x);
1042
+ }));
1043
+ }));
1044
+ }, Fn = ["parentNode"], Mn = "form_item";
1045
+ function ae(e) {
1046
+ return e === void 0 || e === !1 ? [] : Array.isArray(e) ? e : [e];
1047
+ }
1048
+ function ot(e, t) {
1049
+ if (!e.length)
1050
+ return;
1051
+ const r = e.join("_");
1052
+ return t ? `${t}_${r}` : Fn.includes(r) ? `${Mn}_${r}` : r;
1053
+ }
1054
+ function st(e, t, r, n, o, s) {
1055
+ let i = n;
1056
+ return s !== void 0 ? i = s : r.validating ? i = "validating" : e.length ? i = "error" : t.length ? i = "warning" : (r.touched || o && r.validated) && (i = "success"), i;
1057
+ }
1058
+ function qe(e) {
1059
+ return ae(e).join("_");
1060
+ }
1061
+ function Be(e, t) {
1062
+ const r = t.getFieldInstance(e), n = ht(r);
1063
+ if (n)
1064
+ return n;
1065
+ const o = ot(ae(e), t.__INTERNAL__.name);
1066
+ if (o)
1067
+ return document.getElementById(o);
1068
+ }
1069
+ function lt(e) {
1070
+ const [t] = Mt(), r = l.useRef({}), n = l.useMemo(() => e ?? Object.assign(Object.assign({}, t), {
1071
+ __INTERNAL__: {
1072
+ itemRef: (o) => (s) => {
1073
+ const i = qe(o);
1074
+ s ? r.current[i] = s : delete r.current[i];
1075
+ }
1076
+ },
1077
+ scrollToField: function(o) {
1078
+ let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1079
+ const i = Be(o, n);
1080
+ i && rn(i, Object.assign({
1081
+ scrollMode: "if-needed",
1082
+ block: "nearest"
1083
+ }, s));
1084
+ },
1085
+ focusField: (o) => {
1086
+ var s;
1087
+ const i = Be(o, n);
1088
+ i && ((s = i.focus) === null || s === void 0 || s.call(i));
1089
+ },
1090
+ getFieldInstance: (o) => {
1091
+ const s = qe(o);
1092
+ return r.current[s];
1093
+ }
1094
+ }), [e, t]);
1095
+ return [n];
1096
+ }
1097
+ const pe = {};
1098
+ function Nn(e) {
1099
+ let {
1100
+ name: t
1101
+ } = e;
1102
+ const r = be("Form");
1103
+ l.useEffect(() => {
1104
+ if (t)
1105
+ return pe[t] = (pe[t] || 0) + 1, process.env.NODE_ENV !== "production" && r(pe[t] <= 1, "usage", "There exist multiple Form with same `name`."), () => {
1106
+ pe[t] -= 1;
1107
+ };
1108
+ }, [t]);
1109
+ }
1110
+ var jn = function(e, t) {
1111
+ var r = {};
1112
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1113
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1114
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1115
+ return r;
1116
+ };
1117
+ const _n = (e, t) => {
1118
+ const r = l.useContext(bt), {
1119
+ getPrefixCls: n,
1120
+ direction: o,
1121
+ form: s
1122
+ } = l.useContext(ue), {
1123
+ prefixCls: i,
1124
+ className: a,
1125
+ rootClassName: c,
1126
+ size: f,
1127
+ disabled: y = r,
1128
+ form: $,
1129
+ colon: O,
1130
+ labelAlign: R,
1131
+ labelWrap: S,
1132
+ labelCol: E,
1133
+ wrapperCol: I,
1134
+ hideRequiredMark: m,
1135
+ layout: N = "horizontal",
1136
+ scrollToFirstError: u,
1137
+ requiredMark: h,
1138
+ onFinishFailed: p,
1139
+ name: b,
1140
+ style: P,
1141
+ feedbackIcons: v,
1142
+ variant: x
1143
+ } = e, g = jn(e, ["prefixCls", "className", "rootClassName", "size", "disabled", "form", "colon", "labelAlign", "labelWrap", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name", "style", "feedbackIcons", "variant"]), j = zt(f), H = l.useContext(yt);
1144
+ process.env.NODE_ENV !== "production" && Nn(e);
1145
+ const M = l.useMemo(() => h !== void 0 ? h : m ? !1 : s && s.requiredMark !== void 0 ? s.requiredMark : !0, [m, h, s]), C = O ?? (s == null ? void 0 : s.colon), V = n("form", i), A = Ee(V), [d, z, w] = Ie(V, A), q = J(V, `${V}-${N}`, {
1146
+ [`${V}-hide-required-mark`]: M === !1,
1147
+ [`${V}-rtl`]: o === "rtl",
1148
+ [`${V}-${j}`]: j
1149
+ }, w, A, z, s == null ? void 0 : s.className, a, c), [T] = lt($), {
1150
+ __INTERNAL__: G
1151
+ } = T;
1152
+ G.name = b;
1153
+ const X = l.useMemo(() => ({
1154
+ name: b,
1155
+ labelAlign: R,
1156
+ labelCol: E,
1157
+ labelWrap: S,
1158
+ wrapperCol: I,
1159
+ vertical: N === "vertical",
1160
+ colon: C,
1161
+ requiredMark: M,
1162
+ itemRef: G.itemRef,
1163
+ form: T,
1164
+ feedbackIcons: v
1165
+ }), [b, R, E, I, N, C, M, T, v]), U = l.useRef(null);
1166
+ l.useImperativeHandle(t, () => {
1167
+ var D;
1168
+ return Object.assign(Object.assign({}, T), {
1169
+ nativeElement: (D = U.current) === null || D === void 0 ? void 0 : D.nativeElement
1170
+ });
1171
+ });
1172
+ const Z = (D, F) => {
1173
+ if (D) {
1174
+ let _ = {
1175
+ block: "nearest"
1176
+ };
1177
+ typeof D == "object" && (_ = Object.assign(Object.assign({}, _), D)), T.scrollToField(F, _), _.focus && T.focusField(F);
1178
+ }
1179
+ }, ee = (D) => {
1180
+ if (p == null || p(D), D.errorFields.length) {
1181
+ const F = D.errorFields[0].name;
1182
+ if (u !== void 0) {
1183
+ Z(u, F);
1184
+ return;
1185
+ }
1186
+ s && s.scrollToFirstError !== void 0 && Z(s.scrollToFirstError, F);
1187
+ }
1188
+ };
1189
+ return d(/* @__PURE__ */ l.createElement(Nt.Provider, {
1190
+ value: x
1191
+ }, /* @__PURE__ */ l.createElement($t, {
1192
+ disabled: y
1193
+ }, /* @__PURE__ */ l.createElement(xt.Provider, {
1194
+ value: j
1195
+ }, /* @__PURE__ */ l.createElement(Ke, {
1196
+ // This is not list in API, we pass with spread
1197
+ validateMessages: H
1198
+ }, /* @__PURE__ */ l.createElement(ne.Provider, {
1199
+ value: X
1200
+ }, /* @__PURE__ */ l.createElement(jt, Object.assign({
1201
+ id: b
1202
+ }, g, {
1203
+ name: b,
1204
+ onFinishFailed: ee,
1205
+ form: T,
1206
+ ref: U,
1207
+ style: Object.assign(Object.assign({}, s == null ? void 0 : s.style), P),
1208
+ className: q
1209
+ }))))))));
1210
+ }, it = /* @__PURE__ */ l.forwardRef(_n);
1211
+ process.env.NODE_ENV !== "production" && (it.displayName = "Form");
1212
+ function Rn(e) {
1213
+ if (typeof e == "function")
1214
+ return e;
1215
+ const t = Bt(e);
1216
+ return t.length <= 1 ? t[0] : t;
1217
+ }
1218
+ const at = () => {
1219
+ const {
1220
+ status: e,
1221
+ errors: t = [],
1222
+ warnings: r = []
1223
+ } = l.useContext(ge);
1224
+ if (process.env.NODE_ENV !== "production") {
1225
+ const n = be("Form.Item");
1226
+ process.env.NODE_ENV !== "production" && n(e !== void 0, "usage", "Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus");
1227
+ }
1228
+ return {
1229
+ status: e,
1230
+ errors: t,
1231
+ warnings: r
1232
+ };
1233
+ };
1234
+ at.Context = ge;
1235
+ function Pn(e) {
1236
+ const [t, r] = l.useState(e), n = l.useRef(null), o = l.useRef([]), s = l.useRef(!1);
1237
+ l.useEffect(() => (s.current = !1, () => {
1238
+ s.current = !0, _e.cancel(n.current), n.current = null;
1239
+ }), []);
1240
+ function i(a) {
1241
+ s.current || (n.current === null && (o.current = [], n.current = _e(() => {
1242
+ n.current = null, r((c) => {
1243
+ let f = c;
1244
+ return o.current.forEach((y) => {
1245
+ f = y(f);
1246
+ }), f;
1247
+ });
1248
+ })), o.current.push(a));
1249
+ }
1250
+ return [t, i];
1251
+ }
1252
+ function Vn() {
1253
+ const {
1254
+ itemRef: e
1255
+ } = l.useContext(ne), t = l.useRef({});
1256
+ function r(n, o) {
1257
+ const s = o && typeof o == "object" && Ct(o), i = n.join("_");
1258
+ return (t.current.name !== i || t.current.originRef !== s) && (t.current.name = i, t.current.originRef = s, t.current.ref = vt(e(n), s)), t.current.ref;
1259
+ }
1260
+ return r;
1261
+ }
1262
+ const Ln = (e) => {
1263
+ const {
1264
+ formItemCls: t
1265
+ } = e;
1266
+ return {
1267
+ "@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)": {
1268
+ // Fallback for IE, safe to remove we not support it anymore
1269
+ [`${t}-control`]: {
1270
+ display: "flex"
1271
+ }
1272
+ }
1273
+ };
1274
+ }, Dn = wt(["Form", "item-item"], (e, t) => {
1275
+ let {
1276
+ rootPrefixCls: r
1277
+ } = t;
1278
+ const n = nt(e, r);
1279
+ return [Ln(n)];
1280
+ });
1281
+ var Tn = function(e, t) {
1282
+ var r = {};
1283
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1284
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1285
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1286
+ return r;
1287
+ };
1288
+ const Wn = 24, Hn = (e) => {
1289
+ const {
1290
+ prefixCls: t,
1291
+ status: r,
1292
+ labelCol: n,
1293
+ wrapperCol: o,
1294
+ children: s,
1295
+ errors: i,
1296
+ warnings: a,
1297
+ _internalItemRender: c,
1298
+ extra: f,
1299
+ help: y,
1300
+ fieldId: $,
1301
+ marginBottom: O,
1302
+ onErrorVisibleChanged: R,
1303
+ label: S
1304
+ } = e, E = `${t}-item`, I = l.useContext(ne), m = l.useMemo(() => {
1305
+ let C = Object.assign({}, o || I.wrapperCol || {});
1306
+ return S === null && !n && !o && I.labelCol && [void 0, "xs", "sm", "md", "lg", "xl", "xxl"].forEach((A) => {
1307
+ const d = A ? [A] : [], z = Re(I.labelCol, d), w = typeof z == "object" ? z : {}, q = Re(C, d), T = typeof q == "object" ? q : {};
1308
+ "span" in w && !("offset" in T) && w.span < Wn && (C = St(C, [].concat(d, ["offset"]), w.span));
1309
+ }), C;
1310
+ }, [o, I]), N = J(`${E}-control`, m.className), u = l.useMemo(() => Tn(I, ["labelCol", "wrapperCol"]), [I]), h = l.useRef(null), [p, b] = l.useState(0);
1311
+ Ue(() => {
1312
+ f && h.current ? b(h.current.clientHeight) : b(0);
1313
+ }, [f]);
1314
+ const P = /* @__PURE__ */ l.createElement("div", {
1315
+ className: `${E}-control-input`
1316
+ }, /* @__PURE__ */ l.createElement("div", {
1317
+ className: `${E}-control-input-content`
1318
+ }, s)), v = l.useMemo(() => ({
1319
+ prefixCls: t,
1320
+ status: r
1321
+ }), [t, r]), x = O !== null || i.length || a.length ? /* @__PURE__ */ l.createElement(Se.Provider, {
1322
+ value: v
1323
+ }, /* @__PURE__ */ l.createElement(rt, {
1324
+ fieldId: $,
1325
+ errors: i,
1326
+ warnings: a,
1327
+ help: y,
1328
+ helpStatus: r,
1329
+ className: `${E}-explain-connected`,
1330
+ onVisibleChanged: R
1331
+ })) : null, g = {};
1332
+ $ && (g.id = `${$}_extra`);
1333
+ const j = f ? /* @__PURE__ */ l.createElement("div", Object.assign({}, g, {
1334
+ className: `${E}-extra`,
1335
+ ref: h
1336
+ }), f) : null, H = x || j ? /* @__PURE__ */ l.createElement("div", {
1337
+ className: `${E}-additional`,
1338
+ style: O ? {
1339
+ minHeight: O + p
1340
+ } : {}
1341
+ }, x, j) : null, M = c && c.mark === "pro_table_render" && c.render ? c.render(e, {
1342
+ input: P,
1343
+ errorList: x,
1344
+ extra: j
1345
+ }) : /* @__PURE__ */ l.createElement(l.Fragment, null, P, H);
1346
+ return /* @__PURE__ */ l.createElement(ne.Provider, {
1347
+ value: u
1348
+ }, /* @__PURE__ */ l.createElement(Oe, Object.assign({}, m, {
1349
+ className: N
1350
+ }), M), /* @__PURE__ */ l.createElement(Dn, {
1351
+ prefixCls: t
1352
+ }));
1353
+ };
1354
+ var An = function(e, t) {
1355
+ var r = {};
1356
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1357
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1358
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1359
+ return r;
1360
+ };
1361
+ function zn(e) {
1362
+ return e ? typeof e == "object" && !/* @__PURE__ */ l.isValidElement(e) ? e : {
1363
+ title: e
1364
+ } : null;
1365
+ }
1366
+ const qn = (e) => {
1367
+ let {
1368
+ prefixCls: t,
1369
+ label: r,
1370
+ htmlFor: n,
1371
+ labelCol: o,
1372
+ labelAlign: s,
1373
+ colon: i,
1374
+ required: a,
1375
+ requiredMark: c,
1376
+ tooltip: f,
1377
+ vertical: y
1378
+ } = e;
1379
+ var $;
1380
+ const [O] = Ut("Form"), {
1381
+ labelAlign: R,
1382
+ labelCol: S,
1383
+ labelWrap: E,
1384
+ colon: I
1385
+ } = l.useContext(ne);
1386
+ if (!r)
1387
+ return null;
1388
+ const m = o || S || {}, N = s || R, u = `${t}-item-label`, h = J(u, N === "left" && `${u}-left`, m.className, {
1389
+ [`${u}-wrap`]: !!E
1390
+ });
1391
+ let p = r;
1392
+ const b = i === !0 || I !== !1 && i !== !1;
1393
+ b && !y && typeof r == "string" && r.trim() && (p = r.replace(/[:|:]\s*$/, ""));
1394
+ const v = zn(f);
1395
+ if (v) {
1396
+ const {
1397
+ icon: H = /* @__PURE__ */ l.createElement(Je, null)
1398
+ } = v, M = An(v, ["icon"]), C = /* @__PURE__ */ l.createElement(At, Object.assign({}, M), /* @__PURE__ */ l.cloneElement(H, {
1399
+ className: `${t}-item-tooltip`,
1400
+ title: "",
1401
+ onClick: (V) => {
1402
+ V.preventDefault();
1403
+ },
1404
+ tabIndex: null
1405
+ }));
1406
+ p = /* @__PURE__ */ l.createElement(l.Fragment, null, p, C);
1407
+ }
1408
+ const x = c === "optional", g = typeof c == "function";
1409
+ g ? p = c(p, {
1410
+ required: !!a
1411
+ }) : x && !a && (p = /* @__PURE__ */ l.createElement(l.Fragment, null, p, /* @__PURE__ */ l.createElement("span", {
1412
+ className: `${t}-item-optional`,
1413
+ title: ""
1414
+ }, (O == null ? void 0 : O.optional) || (($ = Et.Form) === null || $ === void 0 ? void 0 : $.optional))));
1415
+ const j = J({
1416
+ [`${t}-item-required`]: a,
1417
+ [`${t}-item-required-mark-optional`]: x || g,
1418
+ [`${t}-item-no-colon`]: !b
1419
+ });
1420
+ return /* @__PURE__ */ l.createElement(Oe, Object.assign({}, m, {
1421
+ className: h
1422
+ }), /* @__PURE__ */ l.createElement("label", {
1423
+ htmlFor: n,
1424
+ className: j,
1425
+ title: typeof r == "string" ? r : ""
1426
+ }, p));
1427
+ }, Bn = {
1428
+ success: Kt,
1429
+ warning: Yt,
1430
+ error: Qt,
1431
+ validating: Jt
1432
+ };
1433
+ function ct(e) {
1434
+ let {
1435
+ children: t,
1436
+ errors: r,
1437
+ warnings: n,
1438
+ hasFeedback: o,
1439
+ validateStatus: s,
1440
+ prefixCls: i,
1441
+ meta: a,
1442
+ noStyle: c
1443
+ } = e;
1444
+ const f = `${i}-item`, {
1445
+ feedbackIcons: y
1446
+ } = l.useContext(ne), $ = st(r, n, a, null, !!o, s), {
1447
+ isFormItemInput: O,
1448
+ status: R,
1449
+ hasFeedback: S,
1450
+ feedbackIcon: E
1451
+ } = l.useContext(ge), I = l.useMemo(() => {
1452
+ var m;
1453
+ let N;
1454
+ if (o) {
1455
+ const h = o !== !0 && o.icons || y, p = $ && ((m = h == null ? void 0 : h({
1456
+ status: $,
1457
+ errors: r,
1458
+ warnings: n
1459
+ })) === null || m === void 0 ? void 0 : m[$]), b = $ && Bn[$];
1460
+ N = p !== !1 && b ? /* @__PURE__ */ l.createElement("span", {
1461
+ className: J(`${f}-feedback-icon`, `${f}-feedback-icon-${$}`)
1462
+ }, p || /* @__PURE__ */ l.createElement(b, null)) : null;
1463
+ }
1464
+ const u = {
1465
+ status: $ || "",
1466
+ errors: r,
1467
+ warnings: n,
1468
+ hasFeedback: !!o,
1469
+ feedbackIcon: N,
1470
+ isFormItemInput: !0
1471
+ };
1472
+ return c && (u.status = ($ ?? R) || "", u.isFormItemInput = O, u.hasFeedback = !!(o ?? S), u.feedbackIcon = o !== void 0 ? u.feedbackIcon : E), u;
1473
+ }, [$, o, c, O, R]);
1474
+ return /* @__PURE__ */ l.createElement(ge.Provider, {
1475
+ value: I
1476
+ }, t);
1477
+ }
1478
+ var Gn = function(e, t) {
1479
+ var r = {};
1480
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1481
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1482
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1483
+ return r;
1484
+ };
1485
+ function Xn(e) {
1486
+ const {
1487
+ prefixCls: t,
1488
+ className: r,
1489
+ rootClassName: n,
1490
+ style: o,
1491
+ help: s,
1492
+ errors: i,
1493
+ warnings: a,
1494
+ validateStatus: c,
1495
+ meta: f,
1496
+ hasFeedback: y,
1497
+ hidden: $,
1498
+ children: O,
1499
+ fieldId: R,
1500
+ required: S,
1501
+ isRequired: E,
1502
+ onSubItemMetaChange: I,
1503
+ layout: m
1504
+ } = e, N = Gn(e, ["prefixCls", "className", "rootClassName", "style", "help", "errors", "warnings", "validateStatus", "meta", "hasFeedback", "hidden", "children", "fieldId", "required", "isRequired", "onSubItemMetaChange", "layout"]), u = `${t}-item`, {
1505
+ requiredMark: h,
1506
+ vertical: p
1507
+ } = l.useContext(ne), b = p || m === "vertical", P = l.useRef(null), v = he(i), x = he(a), g = s != null, j = !!(g || i.length || a.length), H = !!P.current && Gt(P.current), [M, C] = l.useState(null);
1508
+ Ue(() => {
1509
+ if (j && P.current) {
1510
+ const w = getComputedStyle(P.current);
1511
+ C(parseInt(w.marginBottom, 10));
1512
+ }
1513
+ }, [j, H]);
1514
+ const V = (w) => {
1515
+ w || C(null);
1516
+ }, d = function() {
1517
+ let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1518
+ const q = w ? v : f.errors, T = w ? x : f.warnings;
1519
+ return st(q, T, f, "", !!y, c);
1520
+ }(), z = J(u, r, n, {
1521
+ [`${u}-with-help`]: g || v.length || x.length,
1522
+ // Status
1523
+ [`${u}-has-feedback`]: d && y,
1524
+ [`${u}-has-success`]: d === "success",
1525
+ [`${u}-has-warning`]: d === "warning",
1526
+ [`${u}-has-error`]: d === "error",
1527
+ [`${u}-is-validating`]: d === "validating",
1528
+ [`${u}-hidden`]: $,
1529
+ // Layout
1530
+ [`${u}-${m}`]: m
1531
+ });
1532
+ return /* @__PURE__ */ l.createElement("div", {
1533
+ className: z,
1534
+ style: o,
1535
+ ref: P
1536
+ }, /* @__PURE__ */ l.createElement(et, Object.assign({
1537
+ className: `${u}-row`
1538
+ }, Xt(N, [
1539
+ "_internalItemRender",
1540
+ "colon",
1541
+ "dependencies",
1542
+ "extra",
1543
+ "fieldKey",
1544
+ "getValueFromEvent",
1545
+ "getValueProps",
1546
+ "htmlFor",
1547
+ "id",
1548
+ // It is deprecated because `htmlFor` is its replacement.
1549
+ "initialValue",
1550
+ "isListField",
1551
+ "label",
1552
+ "labelAlign",
1553
+ "labelCol",
1554
+ "labelWrap",
1555
+ "messageVariables",
1556
+ "name",
1557
+ "normalize",
1558
+ "noStyle",
1559
+ "preserve",
1560
+ "requiredMark",
1561
+ "rules",
1562
+ "shouldUpdate",
1563
+ "trigger",
1564
+ "tooltip",
1565
+ "validateFirst",
1566
+ "validateTrigger",
1567
+ "valuePropName",
1568
+ "wrapperCol",
1569
+ "validateDebounce"
1570
+ ])), /* @__PURE__ */ l.createElement(qn, Object.assign({
1571
+ htmlFor: R
1572
+ }, e, {
1573
+ requiredMark: h,
1574
+ required: S ?? E,
1575
+ prefixCls: t,
1576
+ vertical: b
1577
+ })), /* @__PURE__ */ l.createElement(Hn, Object.assign({}, e, f, {
1578
+ errors: v,
1579
+ warnings: x,
1580
+ prefixCls: t,
1581
+ status: d,
1582
+ help: s,
1583
+ marginBottom: M,
1584
+ onErrorVisibleChanged: V
1585
+ }), /* @__PURE__ */ l.createElement(Ye.Provider, {
1586
+ value: I
1587
+ }, /* @__PURE__ */ l.createElement(ct, {
1588
+ prefixCls: t,
1589
+ meta: f,
1590
+ errors: f.errors,
1591
+ warnings: f.warnings,
1592
+ hasFeedback: y,
1593
+ // Already calculated
1594
+ validateStatus: d
1595
+ }, O)))), !!M && /* @__PURE__ */ l.createElement("div", {
1596
+ className: `${u}-margin-offset`,
1597
+ style: {
1598
+ marginBottom: -M
1599
+ }
1600
+ }));
1601
+ }
1602
+ const kn = "__SPLIT__";
1603
+ function Un(e, t) {
1604
+ const r = Object.keys(e), n = Object.keys(t);
1605
+ return r.length === n.length && r.every((o) => {
1606
+ const s = e[o], i = t[o];
1607
+ return s === i || typeof s == "function" || typeof i == "function";
1608
+ });
1609
+ }
1610
+ const Kn = /* @__PURE__ */ l.memo((e) => {
1611
+ let {
1612
+ children: t
1613
+ } = e;
1614
+ return t;
1615
+ }, (e, t) => Un(e.control, t.control) && e.update === t.update && e.childProps.length === t.childProps.length && e.childProps.every((r, n) => r === t.childProps[n]));
1616
+ function Ge() {
1617
+ return {
1618
+ errors: [],
1619
+ warnings: [],
1620
+ touched: !1,
1621
+ validating: !1,
1622
+ name: [],
1623
+ validated: !1
1624
+ };
1625
+ }
1626
+ function Yn(e) {
1627
+ const {
1628
+ name: t,
1629
+ noStyle: r,
1630
+ className: n,
1631
+ dependencies: o,
1632
+ prefixCls: s,
1633
+ shouldUpdate: i,
1634
+ rules: a,
1635
+ children: c,
1636
+ required: f,
1637
+ label: y,
1638
+ messageVariables: $,
1639
+ trigger: O = "onChange",
1640
+ validateTrigger: R,
1641
+ hidden: S,
1642
+ help: E,
1643
+ layout: I
1644
+ } = e, {
1645
+ getPrefixCls: m
1646
+ } = l.useContext(ue), {
1647
+ name: N
1648
+ } = l.useContext(ne), u = Rn(c), h = typeof u == "function", p = l.useContext(Ye), {
1649
+ validateTrigger: b
1650
+ } = l.useContext(_t), P = R !== void 0 ? R : b, v = t != null, x = m("form", s), g = Ee(x), [j, H, M] = Ie(x, g), C = be("Form.Item");
1651
+ process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && C(t !== null, "usage", "`null` is passed as `name` property");
1652
+ const V = l.useContext(Rt), A = l.useRef(null), [d, z] = Pn({}), [w, q] = Ot(() => Ge()), T = (F) => {
1653
+ const _ = V == null ? void 0 : V.getKey(F.name);
1654
+ if (q(F.destroy ? Ge() : F, !0), r && E !== !1 && p) {
1655
+ let L = F.name;
1656
+ if (F.destroy)
1657
+ L = A.current || L;
1658
+ else if (_ !== void 0) {
1659
+ const [B, k] = _;
1660
+ L = [B].concat(K(k)), A.current = L;
1661
+ }
1662
+ p(F, L);
1663
+ }
1664
+ }, G = (F, _) => {
1665
+ z((L) => {
1666
+ const B = Object.assign({}, L), te = [].concat(K(F.name.slice(0, -1)), K(_)).join(kn);
1667
+ return F.destroy ? delete B[te] : B[te] = F, B;
1668
+ });
1669
+ }, [X, U] = l.useMemo(() => {
1670
+ const F = K(w.errors), _ = K(w.warnings);
1671
+ return Object.values(d).forEach((L) => {
1672
+ F.push.apply(F, K(L.errors || [])), _.push.apply(_, K(L.warnings || []));
1673
+ }), [F, _];
1674
+ }, [d, w.errors, w.warnings]), Z = Vn();
1675
+ function ee(F, _, L) {
1676
+ return r && !S ? /* @__PURE__ */ l.createElement(ct, {
1677
+ prefixCls: x,
1678
+ hasFeedback: e.hasFeedback,
1679
+ validateStatus: e.validateStatus,
1680
+ meta: w,
1681
+ errors: X,
1682
+ warnings: U,
1683
+ noStyle: !0
1684
+ }, F) : /* @__PURE__ */ l.createElement(Xn, Object.assign({
1685
+ key: "row"
1686
+ }, e, {
1687
+ className: J(n, M, g, H),
1688
+ prefixCls: x,
1689
+ fieldId: _,
1690
+ isRequired: L,
1691
+ errors: X,
1692
+ warnings: U,
1693
+ meta: w,
1694
+ onSubItemMetaChange: G,
1695
+ layout: I
1696
+ }), F);
1697
+ }
1698
+ if (!v && !h && !o)
1699
+ return j(ee(u));
1700
+ let D = {};
1701
+ return typeof y == "string" ? D.label = y : t && (D.label = String(t)), $ && (D = Object.assign(Object.assign({}, D), $)), j(/* @__PURE__ */ l.createElement(Pt, Object.assign({}, e, {
1702
+ messageVariables: D,
1703
+ trigger: O,
1704
+ validateTrigger: P,
1705
+ onMetaChange: T
1706
+ }), (F, _, L) => {
1707
+ const B = ae(t).length && _ ? _.name : [], k = ot(B, N), te = f !== void 0 ? f : !!(a != null && a.some((W) => {
1708
+ if (W && typeof W == "object" && W.required && !W.warningOnly)
1709
+ return !0;
1710
+ if (typeof W == "function") {
1711
+ const le = W(L);
1712
+ return (le == null ? void 0 : le.required) && !(le != null && le.warningOnly);
1713
+ }
1714
+ return !1;
1715
+ })), oe = Object.assign({}, F);
1716
+ let se = null;
1717
+ if (process.env.NODE_ENV !== "production" && C(!(i && o), "usage", "`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps."), Array.isArray(u) && v)
1718
+ process.env.NODE_ENV !== "production" && C(!1, "usage", "A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item."), se = u;
1719
+ else if (h && (!(i || o) || v))
1720
+ process.env.NODE_ENV !== "production" && C(!!(i || o), "usage", "A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`."), process.env.NODE_ENV !== "production" && C(!v, "usage", "A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.");
1721
+ else if (o && !h && !v)
1722
+ process.env.NODE_ENV !== "production" && C(!1, "usage", "Must set `name` or use a render function when `dependencies` is set.");
1723
+ else if (/* @__PURE__ */ l.isValidElement(u)) {
1724
+ process.env.NODE_ENV !== "production" && C(u.props.defaultValue === void 0, "usage", "`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.");
1725
+ const W = Object.assign(Object.assign({}, u.props), oe);
1726
+ if (W.id || (W.id = k), E || X.length > 0 || U.length > 0 || e.extra) {
1727
+ const ie = [];
1728
+ (E || X.length > 0) && ie.push(`${k}_help`), e.extra && ie.push(`${k}_extra`), W["aria-describedby"] = ie.join(" ");
1729
+ }
1730
+ X.length > 0 && (W["aria-invalid"] = "true"), te && (W["aria-required"] = "true"), It(u) && (W.ref = Z(B, u)), new Set([].concat(K(ae(O)), K(ae(P)))).forEach((ie) => {
1731
+ W[ie] = function() {
1732
+ for (var Fe, Me, ye, Ne, $e, je = arguments.length, xe = new Array(je), de = 0; de < je; de++)
1733
+ xe[de] = arguments[de];
1734
+ (ye = oe[ie]) === null || ye === void 0 || (Fe = ye).call.apply(Fe, [oe].concat(xe)), ($e = (Ne = u.props)[ie]) === null || $e === void 0 || (Me = $e).call.apply(Me, [Ne].concat(xe));
1735
+ };
1736
+ });
1737
+ const dt = [W["aria-required"], W["aria-invalid"], W["aria-describedby"]];
1738
+ se = /* @__PURE__ */ l.createElement(Kn, {
1739
+ control: oe,
1740
+ update: u,
1741
+ childProps: dt
1742
+ }, qt(u, W));
1743
+ } else h && (i || o) && !v ? se = u(L) : (process.env.NODE_ENV !== "production" && C(!B.length || !!r, "usage", "`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead."), se = u);
1744
+ return ee(se, k, te);
1745
+ }));
1746
+ }
1747
+ const ut = Yn;
1748
+ ut.useStatus = at;
1749
+ var Qn = function(e, t) {
1750
+ var r = {};
1751
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1752
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1753
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1754
+ return r;
1755
+ };
1756
+ const Jn = (e) => {
1757
+ var {
1758
+ prefixCls: t,
1759
+ children: r
1760
+ } = e, n = Qn(e, ["prefixCls", "children"]);
1761
+ if (process.env.NODE_ENV !== "production") {
1762
+ const a = be("Form.List");
1763
+ process.env.NODE_ENV !== "production" && a(typeof n.name == "number" || (Array.isArray(n.name) ? !!n.name.length : !!n.name), "usage", "Miss `name` prop.");
1764
+ }
1765
+ const {
1766
+ getPrefixCls: o
1767
+ } = l.useContext(ue), s = o("form", t), i = l.useMemo(() => ({
1768
+ prefixCls: s,
1769
+ status: "error"
1770
+ }), [s]);
1771
+ return /* @__PURE__ */ l.createElement(Vt, Object.assign({}, n), (a, c, f) => /* @__PURE__ */ l.createElement(Se.Provider, {
1772
+ value: i
1773
+ }, r(a.map((y) => Object.assign(Object.assign({}, y), {
1774
+ fieldKey: y.key
1775
+ })), c, {
1776
+ errors: f.errors,
1777
+ warnings: f.warnings
1778
+ })));
1779
+ };
1780
+ function Zn() {
1781
+ const {
1782
+ form: e
1783
+ } = l.useContext(ne);
1784
+ return e;
1785
+ }
1786
+ const re = it;
1787
+ re.Item = ut;
1788
+ re.List = Jn;
1789
+ re.ErrorList = rt;
1790
+ re.useForm = lt;
1791
+ re.useFormInstance = Zn;
1792
+ re.useWatch = Lt;
1793
+ re.Provider = Ke;
1794
+ re.create = () => {
1795
+ process.env.NODE_ENV !== "production" && Ft(!1, "Form", "antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.");
1796
+ };
1797
+ const hr = ft(re)`
1798
+ label,
1799
+ .ant-form-item-label > label,
1800
+ .ant-form-item-required,
1801
+ .ant-form-item-row > label {
1802
+ height: auto !important;
1803
+ }
1804
+ `;
1805
+ export {
1806
+ re as F,
1807
+ hr as a
1808
+ };