@gobolt/genesis 0.0.11 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/README.md +6 -0
  2. package/dist/ClockCircleOutlined-BaXQuLIn.js +13 -0
  3. package/dist/{Compact-DBh6nSYB.js → Compact-Du9689ax.js} +8 -8
  4. package/dist/{ContextIsolator-CwuJooYf.js → ContextIsolator-BmfhJgG0.js} +2 -2
  5. package/dist/{DownOutlined-5-15jS0h.js → DownOutlined-Dcq69ZKM.js} +9 -9
  6. package/dist/{EllipsisOutlined-CJ2pgE2d.js → EllipsisOutlined-DGMph0Bj.js} +110 -110
  7. package/dist/{Keyframes-sPZXYuXt.js → Keyframes-C9_aCDvn.js} +1 -1
  8. package/dist/{Overflow-DdNKJLQh.js → Overflow-DWf4XIal.js} +31 -31
  9. package/dist/{Skeleton-B3vg9CbL.js → Skeleton-BVN4pcVe.js} +2 -2
  10. package/dist/TextArea-Bkf9hh7l.js +708 -0
  11. package/dist/{Typography-DqI7RslA.js → Typography-CoZ5qD-t.js} +3 -3
  12. package/dist/{button-B2Rgggx2.js → button-BwqpCxVM.js} +5 -5
  13. package/dist/components/Avatar/Avatar.js +3 -3
  14. package/dist/components/Avatar/__tests__/Avatar.test.js +1 -1
  15. package/dist/components/Avatar/styles.js +42 -42
  16. package/dist/components/Badge/Badge.js +3 -3
  17. package/dist/components/Badge/__tests__/Badge.test.js +1 -1
  18. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  19. package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +1 -1
  20. package/dist/components/Breadcrumb/styles.js +4 -4
  21. package/dist/components/Button/__tests__/Button.test.js +1 -1
  22. package/dist/components/Button/styles.js +1 -1
  23. package/dist/components/Card/__tests__/Card.test.js +1 -1
  24. package/dist/components/Card/styles.js +1 -1
  25. package/dist/components/Checkbox/Checkbox.js +3 -3
  26. package/dist/components/Checkbox/__tests__/Checkbox.test.js +1 -1
  27. package/dist/components/Checkbox/styles.js +1 -1
  28. package/dist/components/Dashboard/__stories__/DashboardLayoutContent.js +8 -8
  29. package/dist/components/Dashboard/__stories__/DashboardLayoutHeader.js +4 -4
  30. package/dist/components/Dashboard/__tests__/Dashboard.test.js +1 -1
  31. package/dist/components/DatePicker/DatePicker.d.ts +6 -0
  32. package/dist/components/DatePicker/DatePicker.js +5 -0
  33. package/dist/components/DatePicker/__stories__/DatePicker.stories.d.ts +10 -0
  34. package/dist/components/DatePicker/__tests__/DatePicker.test.d.ts +1 -0
  35. package/dist/components/DatePicker/__tests__/DatePicker.test.js +19 -0
  36. package/dist/components/DatePicker/index.d.ts +2 -0
  37. package/dist/components/DatePicker/index.js +4 -0
  38. package/dist/components/DateRangePicker/DateRangePicker.d.ts +5 -0
  39. package/dist/components/DateRangePicker/DateRangePicker.js +5 -0
  40. package/dist/components/DateRangePicker/__stories__/DateRangePicker.stories.d.ts +9 -0
  41. package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.d.ts +1 -0
  42. package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.js +23 -0
  43. package/dist/components/DateRangePicker/index.d.ts +2 -0
  44. package/dist/components/DateRangePicker/index.js +4 -0
  45. package/dist/components/ErrorBoundary/ErrorBoundary.js +3 -3
  46. package/dist/components/ErrorBoundary/__tests__/ErrorBoundary.test.js +1 -1
  47. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +3 -3
  48. package/dist/components/ErrorBoundaryFallback/styles.js +1 -1
  49. package/dist/components/Form/Form.js +2 -2
  50. package/dist/components/Form/__stories__/FormStory.js +4 -4
  51. package/dist/components/Form/__tests__/form.test.js +2 -2
  52. package/dist/components/Form/index.js +1 -1
  53. package/dist/components/Form/styles.js +1 -1
  54. package/dist/components/Input/Input.js +1 -1
  55. package/dist/components/Input/__tests__/Input.test.js +1 -1
  56. package/dist/components/Input/styles.js +1 -1
  57. package/dist/components/Layout/Content/ResponsiveContent.js +3 -3
  58. package/dist/components/Layout/MainLayout/MainLayout.js +1 -1
  59. package/dist/components/Layout/__tests__/Layout.test.js +1 -1
  60. package/dist/components/Message/Message.js +3 -3
  61. package/dist/components/Message/__tests__/Message.test.js +1 -1
  62. package/dist/components/Notification/Notification.js +3 -3
  63. package/dist/components/Notification/NotificationBadge/__tests__/NotificationBadge.test.js +1 -1
  64. package/dist/components/Notification/__tests__/Notification.test.js +1 -1
  65. package/dist/components/Popover/Popover.js +1 -1
  66. package/dist/components/Popover/__tests__/Popover.test.js +1 -1
  67. package/dist/components/Popover/styles.js +1 -1
  68. package/dist/components/Progress/Progress.js +3 -3
  69. package/dist/components/Progress/Progress.util.js +3 -3
  70. package/dist/components/Progress/ProgressText.js +3 -3
  71. package/dist/components/Progress/__tests__/Progress.test.js +1 -1
  72. package/dist/components/Progress/styles.js +3 -3
  73. package/dist/components/Radio/Radio.js +3 -3
  74. package/dist/components/Radio/RadioGroup.js +1 -1
  75. package/dist/components/Radio/__tests__/RadioGroup.test.js +1 -1
  76. package/dist/components/Row/Row.js +1 -1
  77. package/dist/components/Row/RowActions/RowActions.js +3 -3
  78. package/dist/components/Row/RowLabelValue/RowLabelValue.js +3 -3
  79. package/dist/components/Row/RowLabelValue/styles.js +1 -1
  80. package/dist/components/Row/__tests__/Row.test.js +1 -1
  81. package/dist/components/SegmentedControls/__tests__/SegmentedControls.test.js +1 -1
  82. package/dist/components/SegmentedControls/styles.js +27 -27
  83. package/dist/components/Select/Select.js +1 -1
  84. package/dist/components/Select/__tests__/Select.test.js +1 -1
  85. package/dist/components/Select/styles.js +1 -1
  86. package/dist/components/Shapes/__tests__/Shapes.test.js +1 -1
  87. package/dist/components/Switch/__tests__/Switch.test.js +1 -1
  88. package/dist/components/Switch/styles.js +15 -15
  89. package/dist/components/Table/Table.js +1 -1
  90. package/dist/components/Table/__mocks__/table-mocks.js +3 -3
  91. package/dist/components/Table/__tests__/Table.test.js +1 -1
  92. package/dist/components/Table/styles.js +1 -1
  93. package/dist/components/Tabs/__tests__/Tabs.test.js +1 -1
  94. package/dist/components/Tabs/styles.js +1 -1
  95. package/dist/components/Tile/__tests__/Tile.test.js +1 -1
  96. package/dist/components/Toast/Toast.js +3 -3
  97. package/dist/components/Toast/__tests__/Toast.test.js +2 -2
  98. package/dist/components/Toast/index.js +1 -1
  99. package/dist/components/Tooltip/Tooltip.js +3 -3
  100. package/dist/components/Tooltip/__tests__/Tooltip.test.js +1 -1
  101. package/dist/components/Tooltip/styles.js +1 -1
  102. package/dist/components/Typography/Typography.js +1 -1
  103. package/dist/components/Typography/__tests__/Typography.test.js +2 -2
  104. package/dist/components/Typography/index.js +1 -1
  105. package/dist/components/Typography/styles.js +1 -1
  106. package/dist/components/index.d.ts +4 -0
  107. package/dist/components/index.js +46 -42
  108. package/dist/{context-Cx7GtZpz.js → context-DIFtNa4d.js} +70 -70
  109. package/dist/{dropdown-zGGFIyJ_.js → dropdown-Dp_PTQ2u.js} +60 -59
  110. package/dist/genesis/GenesisThemeBreakdown.js +86 -44
  111. package/dist/genesis/labs/Lab.stories.d.ts +6 -0
  112. package/dist/genesis/styles.js +2 -2
  113. package/dist/{index-CdiHBmVe.js → index-BPVue1Yd.js} +44 -44
  114. package/dist/{index-CRotrkWm.js → index-BQM5OniU.js} +7 -7
  115. package/dist/{index-BTGF--50.js → index-B_1Ge8na.js} +20 -19
  116. package/dist/{index-ByspLxrB.js → index-BbTV2Cw5.js} +32 -31
  117. package/dist/index-BeGv28kJ.js +5173 -0
  118. package/dist/{index-Dyl-ddV6.js → index-BpZSuIUV.js} +16 -16
  119. package/dist/{index-CodMmNWv.js → index-BvOLXELm.js} +3 -3
  120. package/dist/{index-hoPiccJv.js → index-CLSrpQRW.js} +9 -8
  121. package/dist/{index-D0P16DlX.js → index-CbVOl2U6.js} +26 -24
  122. package/dist/{index-DWUXwgXK.js → index-D0U6r5O7.js} +265 -294
  123. package/dist/{index-BW_7pvTr.js → index-DEu2PVzQ.js} +4 -4
  124. package/dist/{index-DmZOkMjs.js → index-DNQ-jnBx.js} +1207 -1514
  125. package/dist/index-DOsPeIWJ.js +1000 -0
  126. package/dist/{index-CSPlXIlA.js → index-DRGX1Wem.js} +7 -7
  127. package/dist/index-DWjq9XYj.js +899 -0
  128. package/dist/index.js +53 -49
  129. package/dist/motion-CUN72xsH.js +33 -0
  130. package/dist/providers/GenesisProvider.js +1 -1
  131. package/dist/providers/ToastProvider.js +3 -3
  132. package/dist/providers/index.js +1 -1
  133. package/dist/providers/useGenesis.js +1 -1
  134. package/dist/{responsiveObserver-O1kw80RG.js → responsiveObserver-dCkpy7Cb.js} +1 -1
  135. package/dist/roundedArrow-DI_Q-xdU.js +65 -0
  136. package/dist/{setup-CKu7-AfI.js → setup-CUbCc8fQ.js} +2 -2
  137. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +7 -7
  138. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +3 -3
  139. package/dist/styles/theme/genesis-theme.js +211 -349
  140. package/dist/styles/theme/theme-tree/ThemeTree.js +114 -113
  141. package/dist/{styles-BSD221S5.js → styles-CWdUpZom.js} +12 -12
  142. package/dist/{styles-BDbHpHsc.js → styles-D1vKDy9V.js} +9 -9
  143. package/dist/{styles-D9iYILpv.js → styles-qerRs7Rn.js} +493 -492
  144. package/dist/test/setup.js +2 -2
  145. package/dist/{toArray-DGvPoJP_.js → toArray-U3Az44CO.js} +1 -1
  146. package/dist/{useBreakpoint-CAMzKscx.js → useBreakpoint-TkMv121M.js} +2 -2
  147. package/dist/{useCSSVarCls-C-MlZC6a.js → useCSSVarCls-Dau77fzS.js} +1 -1
  148. package/dist/useIcons-Ck4JP1m9.js +321 -0
  149. package/dist/{useLocale-DWRfeMSS.js → useLocale-CTfNpakL.js} +1 -1
  150. package/dist/{useMergedState-BoELfaU9.js → useMergedState-D6toxSxh.js} +1 -1
  151. package/dist/{useSize-CPo2bUE3.js → useSize-DSq4r6zy.js} +1 -1
  152. package/dist/{useVariants-Cin23jEC.js → useVariants-DrLzUVLU.js} +2 -2
  153. package/dist/{useZIndex-D81lkWy4.js → useZIndex-DhyHuZTN.js} +1 -1
  154. package/dist/utils/icon-util.js +38 -44
  155. package/package.json +2 -1
  156. package/dist/TextArea-CKWbFr0u.js +0 -1698
  157. package/dist/index-CqqwGTME.js +0 -956
@@ -1,36 +1,33 @@
1
1
  import * as o from "react";
2
- import On, { useState as Ln, useRef as he, useEffect as qn, useMemo as vr, useContext as gr } from "react";
3
- import { e as Ve, f as pn, a as te, j as pr, _ as ee, b as ae, d as on, g as yn, w as Ue, c as hr, n as St, F as zn } from "./presets-Djh_L_6R.js";
4
- import { p as br, a8 as Sr, h as qe, z as wr, f as $n, B as un, _ as Cr, d as yr, A as Er, a as wt, E as Ct, Z as Ir, c as rt, g as zt, m as Mn, C as ot, e as at, r as it, t as Qn, j as He, M as At, D as xr } from "./index-ByspLxrB.js";
5
- import { u as Zn } from "./useMergedState-BoELfaU9.js";
6
- import { T as Rr, a as Or, g as $r } from "./index-DWUXwgXK.js";
2
+ import Rn, { useState as Tn, useRef as he, useEffect as Yn, useMemo as fr, useContext as mr } from "react";
3
+ import { e as Be, f as pn, a as te, j as vr, _ as ee, b as ae, d as on, g as wn, w as Ue, c as gr, n as ht, F as zn } from "./presets-Djh_L_6R.js";
4
+ import { t as pr, a8 as hr, o as Ye, B as br, h as Mn, F as un, _ as Sr, e as Cr, E as yr, a as bt, G as St, Z as wr, c as tt, j as Bt, m as Hn, C as rt, g as zt, k as ot, v as qn, f as ke, r as Er, D as Ir } from "./index-BbTV2Cw5.js";
5
+ import { u as Qn } from "./useMergedState-D6toxSxh.js";
6
+ import { T as xr, a as Or } from "./index-D0U6r5O7.js";
7
7
  import { K as W } from "./KeyCode-DM2sFh3-.js";
8
- import { p as An } from "./pickAttrs-CleuMJFR.js";
9
- import { F as Mr, s as Dr, a as Nr, b as Pr, c as _r, i as yt } from "./Overflow-DdNKJLQh.js";
10
- import { o as Ft } from "./omit-B_u6A-HL.js";
11
- import { R as jt } from "./index-CRotrkWm.js";
8
+ import { p as Fn } from "./pickAttrs-CleuMJFR.js";
9
+ import { F as Rr, s as Mr, a as Dr, b as $r, c as Nr, i as Ct } from "./Overflow-DWf4XIal.js";
10
+ import { o as Ht } from "./omit-B_u6A-HL.js";
11
+ import { R as Ft } from "./index-BQM5OniU.js";
12
12
  import "./index-DLdU7Tpd.js";
13
- import { t as Jn } from "./toArray-DGvPoJP_.js";
14
- import { u as Tr } from "./useZIndex-D81lkWy4.js";
15
- import { i as Et, R as Lr, g as Hr } from "./DownOutlined-5-15jS0h.js";
16
- import { u as Br, a as Vr, g as zr } from "./useVariants-Cin23jEC.js";
17
- import { u as lt } from "./useLocale-DWRfeMSS.js";
18
- import { u as Ar } from "./useCSSVarCls-C-MlZC6a.js";
19
- import { u as Fr } from "./useSize-CPo2bUE3.js";
20
- import { F as jr } from "./context-Cx7GtZpz.js";
21
- import { u as Wr } from "./Compact-DBh6nSYB.js";
22
- import { g as Kr } from "./compact-item-DH13cl8A.js";
23
- import { R as Xr } from "./CheckOutlined-cEBrx_Ag.js";
24
- import { R as Ur } from "./CloseCircleFilled-B9e7yFwo.js";
25
- import { R as Gr } from "./CloseOutlined-ogxnm7Oy.js";
26
- import { R as Yr } from "./LoadingOutlined-C1qu6ymP.js";
27
- import { R as qr } from "./SearchOutlined-DNj-7b_h.js";
13
+ import { t as Zn } from "./toArray-U3Az44CO.js";
14
+ import { u as Pr } from "./useZIndex-DhyHuZTN.js";
15
+ import { g as _r } from "./motion-CUN72xsH.js";
16
+ import { i as yt, g as Tr } from "./DownOutlined-Dcq69ZKM.js";
17
+ import { u as Vr, a as Lr, g as Br } from "./useVariants-DrLzUVLU.js";
18
+ import { u as at } from "./useLocale-CTfNpakL.js";
19
+ import { u as zr } from "./useCSSVarCls-Dau77fzS.js";
20
+ import { u as Hr } from "./useSize-DSq4r6zy.js";
21
+ import { F as Fr } from "./context-DIFtNa4d.js";
22
+ import { u as Ar } from "./Compact-Du9689ax.js";
23
+ import { g as jr } from "./compact-item-DH13cl8A.js";
24
+ import { g as Wr, u as Kr } from "./useIcons-Ck4JP1m9.js";
28
25
  var jn = function(n) {
29
- var t = n.className, r = n.customizeIcon, a = n.customizeIconProps, i = n.children, l = n.onMouseDown, u = n.onClick, d = typeof r == "function" ? r(a) : r;
26
+ var t = n.className, r = n.customizeIcon, a = n.customizeIconProps, l = n.children, i = n.onMouseDown, u = n.onClick, d = typeof r == "function" ? r(a) : r;
30
27
  return /* @__PURE__ */ o.createElement("span", {
31
28
  className: t,
32
29
  onMouseDown: function(v) {
33
- v.preventDefault(), l == null || l(v);
30
+ v.preventDefault(), i == null || i(v);
34
31
  },
35
32
  style: {
36
33
  userSelect: "none",
@@ -40,46 +37,46 @@ var jn = function(n) {
40
37
  onClick: u,
41
38
  "aria-hidden": !0
42
39
  }, d !== void 0 ? d : /* @__PURE__ */ o.createElement("span", {
43
- className: Ve(t.split(/\s+/).map(function(f) {
40
+ className: Be(t.split(/\s+/).map(function(f) {
44
41
  return "".concat(f, "-icon");
45
42
  }))
46
- }, i));
47
- }, Qr = function(n, t, r, a, i) {
48
- var l = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, u = arguments.length > 6 ? arguments[6] : void 0, d = arguments.length > 7 ? arguments[7] : void 0, f = On.useMemo(function() {
43
+ }, l));
44
+ }, Ur = function(n, t, r, a, l) {
45
+ var i = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, u = arguments.length > 6 ? arguments[6] : void 0, d = arguments.length > 7 ? arguments[7] : void 0, f = Rn.useMemo(function() {
49
46
  if (pn(a) === "object")
50
47
  return a.clearIcon;
51
- if (i)
52
- return i;
53
- }, [a, i]), v = On.useMemo(function() {
54
- return !!(!l && a && (r.length || u) && !(d === "combobox" && u === ""));
55
- }, [a, l, r.length, u, d]);
48
+ if (l)
49
+ return l;
50
+ }, [a, l]), v = Rn.useMemo(function() {
51
+ return !!(!i && a && (r.length || u) && !(d === "combobox" && u === ""));
52
+ }, [a, i, r.length, u, d]);
56
53
  return {
57
54
  allowClear: v,
58
- clearIcon: /* @__PURE__ */ On.createElement(jn, {
55
+ clearIcon: /* @__PURE__ */ Rn.createElement(jn, {
59
56
  className: "".concat(n, "-clear"),
60
57
  onMouseDown: t,
61
58
  customizeIcon: f
62
59
  }, "×")
63
60
  };
64
- }, Wt = /* @__PURE__ */ o.createContext(null);
65
- function Zr() {
66
- return o.useContext(Wt);
61
+ }, At = /* @__PURE__ */ o.createContext(null);
62
+ function Xr() {
63
+ return o.useContext(At);
67
64
  }
68
- function Jr() {
69
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, n = o.useState(!1), t = te(n, 2), r = t[0], a = t[1], i = o.useRef(null), l = function() {
70
- window.clearTimeout(i.current);
65
+ function Gr() {
66
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, n = o.useState(!1), t = te(n, 2), r = t[0], a = t[1], l = o.useRef(null), i = function() {
67
+ window.clearTimeout(l.current);
71
68
  };
72
69
  o.useEffect(function() {
73
- return l;
70
+ return i;
74
71
  }, []);
75
72
  var u = function(f, v) {
76
- l(), i.current = window.setTimeout(function() {
73
+ i(), l.current = window.setTimeout(function() {
77
74
  a(f), v && v();
78
75
  }, e);
79
76
  };
80
- return [r, u, l];
77
+ return [r, u, i];
81
78
  }
82
- function Kt() {
79
+ function jt() {
83
80
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, n = o.useRef(null), t = o.useRef(null);
84
81
  o.useEffect(function() {
85
82
  return function() {
@@ -95,30 +92,30 @@ function Kt() {
95
92
  return n.current;
96
93
  }, r];
97
94
  }
98
- function kr(e, n, t, r) {
95
+ function Yr(e, n, t, r) {
99
96
  var a = o.useRef(null);
100
97
  a.current = {
101
98
  open: n,
102
99
  triggerOpen: t,
103
100
  customizedTrigger: r
104
101
  }, o.useEffect(function() {
105
- function i(l) {
102
+ function l(i) {
106
103
  var u;
107
104
  if (!((u = a.current) !== null && u !== void 0 && u.customizedTrigger)) {
108
- var d = l.target;
109
- d.shadowRoot && l.composed && (d = l.composedPath()[0] || d), a.current.open && e().filter(function(f) {
105
+ var d = i.target;
106
+ d.shadowRoot && i.composed && (d = i.composedPath()[0] || d), a.current.open && e().filter(function(f) {
110
107
  return f;
111
108
  }).every(function(f) {
112
109
  return !f.contains(d) && f !== d;
113
110
  }) && a.current.triggerOpen(!1);
114
111
  }
115
112
  }
116
- return window.addEventListener("mousedown", i), function() {
117
- return window.removeEventListener("mousedown", i);
113
+ return window.addEventListener("mousedown", l), function() {
114
+ return window.removeEventListener("mousedown", l);
118
115
  };
119
116
  }, []);
120
117
  }
121
- function eo(e) {
118
+ function qr(e) {
122
119
  return (
123
120
  // Undefined for Edge bug:
124
121
  // https://github.com/ant-design/ant-design/issues/51292
@@ -154,27 +151,27 @@ function eo(e) {
154
151
  ].includes(e)
155
152
  );
156
153
  }
157
- var no = function(n, t) {
158
- var r, a = n.prefixCls, i = n.id, l = n.inputElement, u = n.disabled, d = n.tabIndex, f = n.autoFocus, v = n.autoComplete, s = n.editable, b = n.activeDescendantId, c = n.value, g = n.maxLength, m = n.onKeyDown, S = n.onMouseDown, w = n.onChange, h = n.onPaste, E = n.onCompositionStart, C = n.onCompositionEnd, T = n.onBlur, p = n.open, I = n.attrs, B = l || /* @__PURE__ */ o.createElement("input", null), z = B, q = z.ref, _ = z.props, F = _.onKeyDown, U = _.onChange, Q = _.onMouseDown, G = _.onCompositionStart, j = _.onCompositionEnd, ne = _.onBlur, Z = _.style;
159
- return pr(!("maxLength" in B.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."), B = /* @__PURE__ */ o.cloneElement(B, ee(ee(ee({
154
+ var Qr = function(n, t) {
155
+ var r, a = n.prefixCls, l = n.id, i = n.inputElement, u = n.disabled, d = n.tabIndex, f = n.autoFocus, v = n.autoComplete, s = n.editable, h = n.activeDescendantId, c = n.value, g = n.maxLength, m = n.onKeyDown, S = n.onMouseDown, C = n.onChange, b = n.onPaste, x = n.onCompositionStart, w = n.onCompositionEnd, B = n.onBlur, p = n.open, E = n.attrs, L = i || /* @__PURE__ */ o.createElement("input", null), H = L, q = H.ref, _ = H.props, A = _.onKeyDown, X = _.onChange, Q = _.onMouseDown, G = _.onCompositionStart, j = _.onCompositionEnd, ne = _.onBlur, Z = _.style;
156
+ return vr(!("maxLength" in L.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."), L = /* @__PURE__ */ o.cloneElement(L, ee(ee(ee({
160
157
  type: "search"
161
158
  }, _), {}, {
162
159
  // Override over origin props
163
- id: i,
164
- ref: br(t, q),
160
+ id: l,
161
+ ref: pr(t, q),
165
162
  disabled: u,
166
163
  tabIndex: d,
167
164
  autoComplete: v || "off",
168
165
  autoFocus: f,
169
- className: Ve("".concat(a, "-selection-search-input"), (r = B) === null || r === void 0 || (r = r.props) === null || r === void 0 ? void 0 : r.className),
166
+ className: Be("".concat(a, "-selection-search-input"), (r = L) === null || r === void 0 || (r = r.props) === null || r === void 0 ? void 0 : r.className),
170
167
  role: "combobox",
171
168
  "aria-expanded": p || !1,
172
169
  "aria-haspopup": "listbox",
173
- "aria-owns": "".concat(i, "_list"),
170
+ "aria-owns": "".concat(l, "_list"),
174
171
  "aria-autocomplete": "list",
175
- "aria-controls": "".concat(i, "_list"),
176
- "aria-activedescendant": p ? b : void 0
177
- }, I), {}, {
172
+ "aria-controls": "".concat(l, "_list"),
173
+ "aria-activedescendant": p ? h : void 0
174
+ }, E), {}, {
178
175
  value: s ? c : "",
179
176
  maxLength: g,
180
177
  readOnly: !s,
@@ -182,104 +179,104 @@ var no = function(n, t) {
182
179
  style: ee(ee({}, Z), {}, {
183
180
  opacity: s ? null : 0
184
181
  }),
185
- onKeyDown: function(x) {
186
- m(x), F && F(x);
182
+ onKeyDown: function(I) {
183
+ m(I), A && A(I);
187
184
  },
188
- onMouseDown: function(x) {
189
- S(x), Q && Q(x);
185
+ onMouseDown: function(I) {
186
+ S(I), Q && Q(I);
190
187
  },
191
- onChange: function(x) {
192
- w(x), U && U(x);
188
+ onChange: function(I) {
189
+ C(I), X && X(I);
193
190
  },
194
- onCompositionStart: function(x) {
195
- E(x), G && G(x);
191
+ onCompositionStart: function(I) {
192
+ x(I), G && G(I);
196
193
  },
197
- onCompositionEnd: function(x) {
198
- C(x), j && j(x);
194
+ onCompositionEnd: function(I) {
195
+ w(I), j && j(I);
199
196
  },
200
- onPaste: h,
201
- onBlur: function(x) {
202
- T(x), ne && ne(x);
197
+ onPaste: b,
198
+ onBlur: function(I) {
199
+ B(I), ne && ne(I);
203
200
  }
204
- })), B;
205
- }, ut = /* @__PURE__ */ o.forwardRef(no);
206
- process.env.NODE_ENV !== "production" && (ut.displayName = "Input");
207
- function ct(e) {
201
+ })), L;
202
+ }, it = /* @__PURE__ */ o.forwardRef(Qr);
203
+ process.env.NODE_ENV !== "production" && (it.displayName = "Input");
204
+ function lt(e) {
208
205
  return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
209
206
  }
210
- var to = typeof window < "u" && window.document && window.document.documentElement, ro = process.env.NODE_ENV !== "test" && to;
211
- function oo(e) {
207
+ var Zr = typeof window < "u" && window.document && window.document.documentElement, Jr = process.env.NODE_ENV !== "test" && Zr;
208
+ function kr(e) {
212
209
  return e != null;
213
210
  }
214
- function ao(e) {
211
+ function eo(e) {
215
212
  return !e && e !== 0;
216
213
  }
217
- function It(e) {
214
+ function wt(e) {
218
215
  return ["string", "number"].includes(pn(e));
219
216
  }
220
- function Xt(e) {
217
+ function Wt(e) {
221
218
  var n = void 0;
222
- return e && (It(e.title) ? n = e.title.toString() : It(e.label) && (n = e.label.toString())), n;
219
+ return e && (wt(e.title) ? n = e.title.toString() : wt(e.label) && (n = e.label.toString())), n;
223
220
  }
224
- function io(e, n) {
225
- ro ? o.useLayoutEffect(e, n) : o.useEffect(e, n);
221
+ function no(e, n) {
222
+ Jr ? o.useLayoutEffect(e, n) : o.useEffect(e, n);
226
223
  }
227
- function lo(e) {
224
+ function to(e) {
228
225
  var n;
229
226
  return (n = e.key) !== null && n !== void 0 ? n : e.value;
230
227
  }
231
- var xt = function(n) {
228
+ var Et = function(n) {
232
229
  n.preventDefault(), n.stopPropagation();
233
- }, uo = function(n) {
234
- var t = n.id, r = n.prefixCls, a = n.values, i = n.open, l = n.searchValue, u = n.autoClearSearchValue, d = n.inputRef, f = n.placeholder, v = n.disabled, s = n.mode, b = n.showSearch, c = n.autoFocus, g = n.autoComplete, m = n.activeDescendantId, S = n.tabIndex, w = n.removeIcon, h = n.maxTagCount, E = n.maxTagTextLength, C = n.maxTagPlaceholder, T = C === void 0 ? function(K) {
230
+ }, ro = function(n) {
231
+ var t = n.id, r = n.prefixCls, a = n.values, l = n.open, i = n.searchValue, u = n.autoClearSearchValue, d = n.inputRef, f = n.placeholder, v = n.disabled, s = n.mode, h = n.showSearch, c = n.autoFocus, g = n.autoComplete, m = n.activeDescendantId, S = n.tabIndex, C = n.removeIcon, b = n.maxTagCount, x = n.maxTagTextLength, w = n.maxTagPlaceholder, B = w === void 0 ? function(K) {
235
232
  return "+ ".concat(K.length, " ...");
236
- } : C, p = n.tagRender, I = n.onToggleOpen, B = n.onRemove, z = n.onInputChange, q = n.onInputPaste, _ = n.onInputKeyDown, F = n.onInputMouseDown, U = n.onInputCompositionStart, Q = n.onInputCompositionEnd, G = n.onInputBlur, j = o.useRef(null), ne = Ln(0), Z = te(ne, 2), Y = Z[0], x = Z[1], M = Ln(!1), fe = te(M, 2), ie = fe[0], J = fe[1], se = "".concat(r, "-selection"), Ce = i || s === "multiple" && u === !1 || s === "tags" ? l : "", ge = s === "tags" || s === "multiple" && u === !1 || b && (i || ie);
237
- io(function() {
238
- x(j.current.scrollWidth);
239
- }, [Ce]);
240
- var Oe = function(R, A, le, me, re) {
233
+ } : w, p = n.tagRender, E = n.onToggleOpen, L = n.onRemove, H = n.onInputChange, q = n.onInputPaste, _ = n.onInputKeyDown, A = n.onInputMouseDown, X = n.onInputCompositionStart, Q = n.onInputCompositionEnd, G = n.onInputBlur, j = o.useRef(null), ne = Tn(0), Z = te(ne, 2), Y = Z[0], I = Z[1], D = Tn(!1), fe = te(D, 2), ie = fe[0], J = fe[1], se = "".concat(r, "-selection"), ye = l || s === "multiple" && u === !1 || s === "tags" ? i : "", ge = s === "tags" || s === "multiple" && u === !1 || h && (l || ie);
234
+ no(function() {
235
+ I(j.current.scrollWidth);
236
+ }, [ye]);
237
+ var Re = function(O, F, le, me, re) {
241
238
  return /* @__PURE__ */ o.createElement("span", {
242
- title: Xt(R),
243
- className: Ve("".concat(se, "-item"), ae({}, "".concat(se, "-item-disabled"), le))
239
+ title: Wt(O),
240
+ className: Be("".concat(se, "-item"), ae({}, "".concat(se, "-item-disabled"), le))
244
241
  }, /* @__PURE__ */ o.createElement("span", {
245
242
  className: "".concat(se, "-item-content")
246
- }, A), me && /* @__PURE__ */ o.createElement(jn, {
243
+ }, F), me && /* @__PURE__ */ o.createElement(jn, {
247
244
  className: "".concat(se, "-item-remove"),
248
- onMouseDown: xt,
245
+ onMouseDown: Et,
249
246
  onClick: re,
250
- customizeIcon: w
247
+ customizeIcon: C
251
248
  }, "×"));
252
- }, ce = function(R, A, le, me, re, we) {
253
- var Be = function(Ne) {
254
- xt(Ne), I(!i);
249
+ }, ce = function(O, F, le, me, re, Ce) {
250
+ var Le = function(Ne) {
251
+ Et(Ne), E(!l);
255
252
  };
256
253
  return /* @__PURE__ */ o.createElement("span", {
257
- onMouseDown: Be
254
+ onMouseDown: Le
258
255
  }, p({
259
- label: A,
260
- value: R,
256
+ label: F,
257
+ value: O,
261
258
  disabled: le,
262
259
  closable: me,
263
260
  onClose: re,
264
- isMaxTag: !!we
261
+ isMaxTag: !!Ce
265
262
  }));
266
- }, pe = function(R) {
267
- var A = R.disabled, le = R.label, me = R.value, re = !v && !A, we = le;
268
- if (typeof E == "number" && (typeof le == "string" || typeof le == "number")) {
269
- var Be = String(we);
270
- Be.length > E && (we = "".concat(Be.slice(0, E), "..."));
263
+ }, pe = function(O) {
264
+ var F = O.disabled, le = O.label, me = O.value, re = !v && !F, Ce = le;
265
+ if (typeof x == "number" && (typeof le == "string" || typeof le == "number")) {
266
+ var Le = String(Ce);
267
+ Le.length > x && (Ce = "".concat(Le.slice(0, x), "..."));
271
268
  }
272
269
  var xe = function(de) {
273
- de && de.stopPropagation(), B(R);
270
+ de && de.stopPropagation(), L(O);
274
271
  };
275
- return typeof p == "function" ? ce(me, we, A, re, xe) : Oe(R, we, A, re, xe);
276
- }, O = function(R) {
272
+ return typeof p == "function" ? ce(me, Ce, F, re, xe) : Re(O, Ce, F, re, xe);
273
+ }, R = function(O) {
277
274
  if (!a.length)
278
275
  return null;
279
- var A = typeof T == "function" ? T(R) : T;
280
- return typeof p == "function" ? ce(void 0, A, !1, !1, void 0, !0) : Oe({
281
- title: A
282
- }, A, !1);
276
+ var F = typeof B == "function" ? B(O) : B;
277
+ return typeof p == "function" ? ce(void 0, F, !1, !1, void 0, !0) : Re({
278
+ title: F
279
+ }, F, !1);
283
280
  }, y = /* @__PURE__ */ o.createElement("div", {
284
281
  className: "".concat(se, "-search"),
285
282
  style: {
@@ -291,9 +288,9 @@ var xt = function(n) {
291
288
  onBlur: function() {
292
289
  J(!1);
293
290
  }
294
- }, /* @__PURE__ */ o.createElement(ut, {
291
+ }, /* @__PURE__ */ o.createElement(it, {
295
292
  ref: d,
296
- open: i,
293
+ open: l,
297
294
  prefixCls: r,
298
295
  id: t,
299
296
  inputElement: null,
@@ -302,40 +299,40 @@ var xt = function(n) {
302
299
  autoComplete: g,
303
300
  editable: ge,
304
301
  activeDescendantId: m,
305
- value: Ce,
302
+ value: ye,
306
303
  onKeyDown: _,
307
- onMouseDown: F,
308
- onChange: z,
304
+ onMouseDown: A,
305
+ onChange: H,
309
306
  onPaste: q,
310
- onCompositionStart: U,
307
+ onCompositionStart: X,
311
308
  onCompositionEnd: Q,
312
309
  onBlur: G,
313
310
  tabIndex: S,
314
- attrs: An(n, !0)
311
+ attrs: Fn(n, !0)
315
312
  }), /* @__PURE__ */ o.createElement("span", {
316
313
  ref: j,
317
314
  className: "".concat(se, "-search-mirror"),
318
315
  "aria-hidden": !0
319
- }, Ce, " ")), D = /* @__PURE__ */ o.createElement(Mr, {
316
+ }, ye, " ")), $ = /* @__PURE__ */ o.createElement(Rr, {
320
317
  prefixCls: "".concat(se, "-overflow"),
321
318
  data: a,
322
319
  renderItem: pe,
323
- renderRest: O,
320
+ renderRest: R,
324
321
  suffix: y,
325
- itemKey: lo,
326
- maxCount: h
322
+ itemKey: to,
323
+ maxCount: b
327
324
  });
328
325
  return /* @__PURE__ */ o.createElement("span", {
329
326
  className: "".concat(se, "-wrap")
330
- }, D, !a.length && !Ce && /* @__PURE__ */ o.createElement("span", {
327
+ }, $, !a.length && !ye && /* @__PURE__ */ o.createElement("span", {
331
328
  className: "".concat(se, "-placeholder")
332
329
  }, f));
333
- }, co = function(n) {
334
- var t = n.inputElement, r = n.prefixCls, a = n.id, i = n.inputRef, l = n.disabled, u = n.autoFocus, d = n.autoComplete, f = n.activeDescendantId, v = n.mode, s = n.open, b = n.values, c = n.placeholder, g = n.tabIndex, m = n.showSearch, S = n.searchValue, w = n.activeValue, h = n.maxLength, E = n.onInputKeyDown, C = n.onInputMouseDown, T = n.onInputChange, p = n.onInputPaste, I = n.onInputCompositionStart, B = n.onInputCompositionEnd, z = n.onInputBlur, q = n.title, _ = o.useState(!1), F = te(_, 2), U = F[0], Q = F[1], G = v === "combobox", j = G || m, ne = b[0], Z = S || "";
335
- G && w && !U && (Z = w), o.useEffect(function() {
330
+ }, oo = function(n) {
331
+ var t = n.inputElement, r = n.prefixCls, a = n.id, l = n.inputRef, i = n.disabled, u = n.autoFocus, d = n.autoComplete, f = n.activeDescendantId, v = n.mode, s = n.open, h = n.values, c = n.placeholder, g = n.tabIndex, m = n.showSearch, S = n.searchValue, C = n.activeValue, b = n.maxLength, x = n.onInputKeyDown, w = n.onInputMouseDown, B = n.onInputChange, p = n.onInputPaste, E = n.onInputCompositionStart, L = n.onInputCompositionEnd, H = n.onInputBlur, q = n.title, _ = o.useState(!1), A = te(_, 2), X = A[0], Q = A[1], G = v === "combobox", j = G || m, ne = h[0], Z = S || "";
332
+ G && C && !X && (Z = C), o.useEffect(function() {
336
333
  G && Q(!1);
337
- }, [G, w]);
338
- var Y = v !== "combobox" && !s && !m ? !1 : !!Z, x = q === void 0 ? Xt(ne) : q, M = o.useMemo(function() {
334
+ }, [G, C]);
335
+ var Y = v !== "combobox" && !s && !m ? !1 : !!Z, I = q === void 0 ? Wt(ne) : q, D = o.useMemo(function() {
339
336
  return ne ? null : /* @__PURE__ */ o.createElement("span", {
340
337
  className: "".concat(r, "-selection-placeholder"),
341
338
  style: Y ? {
@@ -347,102 +344,102 @@ var xt = function(n) {
347
344
  className: "".concat(r, "-selection-wrap")
348
345
  }, /* @__PURE__ */ o.createElement("span", {
349
346
  className: "".concat(r, "-selection-search")
350
- }, /* @__PURE__ */ o.createElement(ut, {
351
- ref: i,
347
+ }, /* @__PURE__ */ o.createElement(it, {
348
+ ref: l,
352
349
  prefixCls: r,
353
350
  id: a,
354
351
  open: s,
355
352
  inputElement: t,
356
- disabled: l,
353
+ disabled: i,
357
354
  autoFocus: u,
358
355
  autoComplete: d,
359
356
  editable: j,
360
357
  activeDescendantId: f,
361
358
  value: Z,
362
- onKeyDown: E,
363
- onMouseDown: C,
359
+ onKeyDown: x,
360
+ onMouseDown: w,
364
361
  onChange: function(ie) {
365
- Q(!0), T(ie);
362
+ Q(!0), B(ie);
366
363
  },
367
364
  onPaste: p,
368
- onCompositionStart: I,
369
- onCompositionEnd: B,
370
- onBlur: z,
365
+ onCompositionStart: E,
366
+ onCompositionEnd: L,
367
+ onBlur: H,
371
368
  tabIndex: g,
372
- attrs: An(n, !0),
373
- maxLength: G ? h : void 0
369
+ attrs: Fn(n, !0),
370
+ maxLength: G ? b : void 0
374
371
  })), !G && ne ? /* @__PURE__ */ o.createElement("span", {
375
372
  className: "".concat(r, "-selection-item"),
376
- title: x,
373
+ title: I,
377
374
  style: Y ? {
378
375
  visibility: "hidden"
379
376
  } : void 0
380
- }, ne.label) : null, M);
381
- }, so = function(n, t) {
382
- var r = he(null), a = he(!1), i = n.prefixCls, l = n.open, u = n.mode, d = n.showSearch, f = n.tokenWithEnter, v = n.disabled, s = n.prefix, b = n.autoClearSearchValue, c = n.onSearch, g = n.onSearchSubmit, m = n.onToggleOpen, S = n.onInputKeyDown, w = n.onInputBlur, h = n.domRef;
377
+ }, ne.label) : null, D);
378
+ }, ao = function(n, t) {
379
+ var r = he(null), a = he(!1), l = n.prefixCls, i = n.open, u = n.mode, d = n.showSearch, f = n.tokenWithEnter, v = n.disabled, s = n.prefix, h = n.autoClearSearchValue, c = n.onSearch, g = n.onSearchSubmit, m = n.onToggleOpen, S = n.onInputKeyDown, C = n.onInputBlur, b = n.domRef;
383
380
  o.useImperativeHandle(t, function() {
384
381
  return {
385
- focus: function(x) {
386
- r.current.focus(x);
382
+ focus: function(I) {
383
+ r.current.focus(I);
387
384
  },
388
385
  blur: function() {
389
386
  r.current.blur();
390
387
  }
391
388
  };
392
389
  });
393
- var E = Kt(0), C = te(E, 2), T = C[0], p = C[1], I = function(x) {
394
- var M = x.which, fe = r.current instanceof HTMLTextAreaElement;
395
- !fe && l && (M === W.UP || M === W.DOWN) && x.preventDefault(), S && S(x), M === W.ENTER && u === "tags" && !a.current && !l && (g == null || g(x.target.value)), !(fe && !l && ~[W.UP, W.DOWN, W.LEFT, W.RIGHT].indexOf(M)) && eo(M) && m(!0);
396
- }, B = function() {
390
+ var x = jt(0), w = te(x, 2), B = w[0], p = w[1], E = function(I) {
391
+ var D = I.which, fe = r.current instanceof HTMLTextAreaElement;
392
+ !fe && i && (D === W.UP || D === W.DOWN) && I.preventDefault(), S && S(I), D === W.ENTER && u === "tags" && !a.current && !i && (g == null || g(I.target.value)), !(fe && !i && ~[W.UP, W.DOWN, W.LEFT, W.RIGHT].indexOf(D)) && qr(D) && m(!0);
393
+ }, L = function() {
397
394
  p(!0);
398
- }, z = he(null), q = function(x) {
399
- c(x, !0, a.current) !== !1 && m(!0);
395
+ }, H = he(null), q = function(I) {
396
+ c(I, !0, a.current) !== !1 && m(!0);
400
397
  }, _ = function() {
401
398
  a.current = !0;
402
- }, F = function(x) {
403
- a.current = !1, u !== "combobox" && q(x.target.value);
404
- }, U = function(x) {
405
- var M = x.target.value;
406
- if (f && z.current && /[\r\n]/.test(z.current)) {
407
- var fe = z.current.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
408
- M = M.replace(fe, z.current);
399
+ }, A = function(I) {
400
+ a.current = !1, u !== "combobox" && q(I.target.value);
401
+ }, X = function(I) {
402
+ var D = I.target.value;
403
+ if (f && H.current && /[\r\n]/.test(H.current)) {
404
+ var fe = H.current.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
405
+ D = D.replace(fe, H.current);
409
406
  }
410
- z.current = null, q(M);
411
- }, Q = function(x) {
412
- var M = x.clipboardData, fe = M == null ? void 0 : M.getData("text");
413
- z.current = fe || "";
414
- }, G = function(x) {
415
- var M = x.target;
416
- if (M !== r.current) {
407
+ H.current = null, q(D);
408
+ }, Q = function(I) {
409
+ var D = I.clipboardData, fe = D == null ? void 0 : D.getData("text");
410
+ H.current = fe || "";
411
+ }, G = function(I) {
412
+ var D = I.target;
413
+ if (D !== r.current) {
417
414
  var fe = document.body.style.msTouchAction !== void 0;
418
415
  fe ? setTimeout(function() {
419
416
  r.current.focus();
420
417
  }) : r.current.focus();
421
418
  }
422
- }, j = function(x) {
423
- var M = T();
424
- x.target !== r.current && !M && !(u === "combobox" && v) && x.preventDefault(), (u !== "combobox" && (!d || !M) || !l) && (l && b !== !1 && c("", !0, !1), m());
419
+ }, j = function(I) {
420
+ var D = B();
421
+ I.target !== r.current && !D && !(u === "combobox" && v) && I.preventDefault(), (u !== "combobox" && (!d || !D) || !i) && (i && h !== !1 && c("", !0, !1), m());
425
422
  }, ne = {
426
423
  inputRef: r,
427
- onInputKeyDown: I,
428
- onInputMouseDown: B,
429
- onInputChange: U,
424
+ onInputKeyDown: E,
425
+ onInputMouseDown: L,
426
+ onInputChange: X,
430
427
  onInputPaste: Q,
431
428
  onInputCompositionStart: _,
432
- onInputCompositionEnd: F,
433
- onInputBlur: w
434
- }, Z = u === "multiple" || u === "tags" ? /* @__PURE__ */ o.createElement(uo, on({}, n, ne)) : /* @__PURE__ */ o.createElement(co, on({}, n, ne));
429
+ onInputCompositionEnd: A,
430
+ onInputBlur: C
431
+ }, Z = u === "multiple" || u === "tags" ? /* @__PURE__ */ o.createElement(ro, on({}, n, ne)) : /* @__PURE__ */ o.createElement(oo, on({}, n, ne));
435
432
  return /* @__PURE__ */ o.createElement("div", {
436
- ref: h,
437
- className: "".concat(i, "-selector"),
433
+ ref: b,
434
+ className: "".concat(l, "-selector"),
438
435
  onClick: G,
439
436
  onMouseDown: j
440
437
  }, s && /* @__PURE__ */ o.createElement("div", {
441
- className: "".concat(i, "-prefix")
438
+ className: "".concat(l, "-prefix")
442
439
  }, s), Z);
443
- }, Ut = /* @__PURE__ */ o.forwardRef(so);
444
- process.env.NODE_ENV !== "production" && (Ut.displayName = "Selector");
445
- var fo = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"], mo = function(n) {
440
+ }, Kt = /* @__PURE__ */ o.forwardRef(ao);
441
+ process.env.NODE_ENV !== "production" && (Kt.displayName = "Selector");
442
+ var io = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"], lo = function(n) {
446
443
  var t = n === !0 ? 0 : 1;
447
444
  return {
448
445
  bottomLeft: {
@@ -482,17 +479,17 @@ var fo = ["prefixCls", "disabled", "visible", "children", "popupElement", "anima
482
479
  htmlRegion: "scroll"
483
480
  }
484
481
  };
485
- }, vo = function(n, t) {
482
+ }, uo = function(n, t) {
486
483
  var r = n.prefixCls;
487
484
  n.disabled;
488
- var a = n.visible, i = n.children, l = n.popupElement, u = n.animation, d = n.transitionName, f = n.dropdownStyle, v = n.dropdownClassName, s = n.direction, b = s === void 0 ? "ltr" : s, c = n.placement, g = n.builtinPlacements, m = n.dropdownMatchSelectWidth, S = n.dropdownRender, w = n.dropdownAlign, h = n.getPopupContainer, E = n.empty, C = n.getTriggerDOMNode, T = n.onPopupVisibleChange, p = n.onPopupMouseEnter, I = yn(n, fo), B = "".concat(r, "-dropdown"), z = l;
489
- S && (z = S(l));
485
+ var a = n.visible, l = n.children, i = n.popupElement, u = n.animation, d = n.transitionName, f = n.dropdownStyle, v = n.dropdownClassName, s = n.direction, h = s === void 0 ? "ltr" : s, c = n.placement, g = n.builtinPlacements, m = n.dropdownMatchSelectWidth, S = n.dropdownRender, C = n.dropdownAlign, b = n.getPopupContainer, x = n.empty, w = n.getTriggerDOMNode, B = n.onPopupVisibleChange, p = n.onPopupMouseEnter, E = wn(n, io), L = "".concat(r, "-dropdown"), H = i;
486
+ S && (H = S(i));
490
487
  var q = o.useMemo(function() {
491
- return g || mo(m);
492
- }, [g, m]), _ = u ? "".concat(B, "-").concat(u) : d, F = typeof m == "number", U = o.useMemo(function() {
493
- return F ? null : m === !1 ? "minWidth" : "width";
494
- }, [m, F]), Q = f;
495
- F && (Q = ee(ee({}, Q), {}, {
488
+ return g || lo(m);
489
+ }, [g, m]), _ = u ? "".concat(L, "-").concat(u) : d, A = typeof m == "number", X = o.useMemo(function() {
490
+ return A ? null : m === !1 ? "minWidth" : "width";
491
+ }, [m, A]), Q = f;
492
+ A && (Q = ee(ee({}, Q), {}, {
496
493
  width: m
497
494
  }));
498
495
  var G = o.useRef(null);
@@ -503,61 +500,61 @@ var fo = ["prefixCls", "disabled", "visible", "children", "popupElement", "anima
503
500
  return (ne = G.current) === null || ne === void 0 ? void 0 : ne.popupElement;
504
501
  }
505
502
  };
506
- }), /* @__PURE__ */ o.createElement(Rr, on({}, I, {
507
- showAction: T ? ["click"] : [],
508
- hideAction: T ? ["click"] : [],
509
- popupPlacement: c || (b === "rtl" ? "bottomRight" : "bottomLeft"),
503
+ }), /* @__PURE__ */ o.createElement(xr, on({}, E, {
504
+ showAction: B ? ["click"] : [],
505
+ hideAction: B ? ["click"] : [],
506
+ popupPlacement: c || (h === "rtl" ? "bottomRight" : "bottomLeft"),
510
507
  builtinPlacements: q,
511
- prefixCls: B,
508
+ prefixCls: L,
512
509
  popupTransitionName: _,
513
510
  popup: /* @__PURE__ */ o.createElement("div", {
514
511
  onMouseEnter: p
515
- }, z),
512
+ }, H),
516
513
  ref: G,
517
- stretch: U,
518
- popupAlign: w,
514
+ stretch: X,
515
+ popupAlign: C,
519
516
  popupVisible: a,
520
- getPopupContainer: h,
521
- popupClassName: Ve(v, ae({}, "".concat(B, "-empty"), E)),
517
+ getPopupContainer: b,
518
+ popupClassName: Be(v, ae({}, "".concat(L, "-empty"), x)),
522
519
  popupStyle: Q,
523
- getTriggerDOMNode: C,
524
- onPopupVisibleChange: T
525
- }), i);
526
- }, Gt = /* @__PURE__ */ o.forwardRef(vo);
527
- process.env.NODE_ENV !== "production" && (Gt.displayName = "SelectTrigger");
528
- function Rt(e, n) {
520
+ getTriggerDOMNode: w,
521
+ onPopupVisibleChange: B
522
+ }), l);
523
+ }, Ut = /* @__PURE__ */ o.forwardRef(uo);
524
+ process.env.NODE_ENV !== "production" && (Ut.displayName = "SelectTrigger");
525
+ function It(e, n) {
529
526
  var t = e.key, r;
530
527
  return "value" in e && (r = e.value), t ?? (r !== void 0 ? r : "rc-index-key-".concat(n));
531
528
  }
532
- function kn(e) {
529
+ function Jn(e) {
533
530
  return typeof e < "u" && !Number.isNaN(e);
534
531
  }
535
- function Yt(e, n) {
536
- var t = e || {}, r = t.label, a = t.value, i = t.options, l = t.groupLabel, u = r || (n ? "children" : "label");
532
+ function Xt(e, n) {
533
+ var t = e || {}, r = t.label, a = t.value, l = t.options, i = t.groupLabel, u = r || (n ? "children" : "label");
537
534
  return {
538
535
  label: u,
539
536
  value: a || "value",
540
- options: i || "options",
541
- groupLabel: l || u
537
+ options: l || "options",
538
+ groupLabel: i || u
542
539
  };
543
540
  }
544
- function go(e) {
545
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.fieldNames, r = n.childrenAsData, a = [], i = Yt(t, !1), l = i.label, u = i.value, d = i.options, f = i.groupLabel;
546
- function v(s, b) {
541
+ function co(e) {
542
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.fieldNames, r = n.childrenAsData, a = [], l = Xt(t, !1), i = l.label, u = l.value, d = l.options, f = l.groupLabel;
543
+ function v(s, h) {
547
544
  Array.isArray(s) && s.forEach(function(c) {
548
- if (b || !(d in c)) {
545
+ if (h || !(d in c)) {
549
546
  var g = c[u];
550
547
  a.push({
551
- key: Rt(c, a.length),
552
- groupOption: b,
548
+ key: It(c, a.length),
549
+ groupOption: h,
553
550
  data: c,
554
- label: c[l],
551
+ label: c[i],
555
552
  value: g
556
553
  });
557
554
  } else {
558
555
  var m = c[f];
559
556
  m === void 0 && r && (m = c.label), a.push({
560
- key: Rt(c, a.length),
557
+ key: It(c, a.length),
561
558
  group: !0,
562
559
  data: c,
563
560
  label: m
@@ -567,7 +564,7 @@ function go(e) {
567
564
  }
568
565
  return v(e, !1), a;
569
566
  }
570
- function et(e) {
567
+ function kn(e) {
571
568
  var n = ee({}, e);
572
569
  return "props" in n || Object.defineProperty(n, "props", {
573
570
  get: function() {
@@ -575,21 +572,21 @@ function et(e) {
575
572
  }
576
573
  }), n;
577
574
  }
578
- var po = function(n, t, r) {
575
+ var so = function(n, t, r) {
579
576
  if (!t || !t.length)
580
577
  return null;
581
- var a = !1, i = function u(d, f) {
582
- var v = Sr(f), s = v[0], b = v.slice(1);
578
+ var a = !1, l = function u(d, f) {
579
+ var v = hr(f), s = v[0], h = v.slice(1);
583
580
  if (!s)
584
581
  return [d];
585
582
  var c = d.split(s);
586
583
  return a = a || c.length > 1, c.reduce(function(g, m) {
587
- return [].concat(qe(g), qe(u(m, b)));
584
+ return [].concat(Ye(g), Ye(u(m, h)));
588
585
  }, []).filter(Boolean);
589
- }, l = i(n, t);
590
- return a ? typeof r < "u" ? l.slice(0, r) : l : null;
591
- }, st = /* @__PURE__ */ o.createContext(null);
592
- function ho(e) {
586
+ }, i = l(n, t);
587
+ return a ? typeof r < "u" ? i.slice(0, r) : i : null;
588
+ }, ut = /* @__PURE__ */ o.createContext(null);
589
+ function fo(e) {
593
590
  var n = e.visible, t = e.values;
594
591
  if (!n)
595
592
  return null;
@@ -604,86 +601,86 @@ function ho(e) {
604
601
  opacity: 0
605
602
  }
606
603
  }, "".concat(t.slice(0, r).map(function(a) {
607
- var i = a.label, l = a.value;
608
- return ["number", "string"].includes(pn(i)) ? i : l;
604
+ var l = a.label, i = a.value;
605
+ return ["number", "string"].includes(pn(l)) ? l : i;
609
606
  }).join(", ")), t.length > r ? ", ..." : null);
610
607
  }
611
- var bo = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "prefix", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"], So = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], Fn = function(n) {
608
+ var mo = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "prefix", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"], vo = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], An = function(n) {
612
609
  return n === "tags" || n === "multiple";
613
- }, qt = /* @__PURE__ */ o.forwardRef(function(e, n) {
614
- var t, r = e.id, a = e.prefixCls, i = e.className, l = e.showSearch, u = e.tagRender, d = e.direction, f = e.omitDomProps, v = e.displayValues, s = e.onDisplayValuesChange, b = e.emptyOptions, c = e.notFoundContent, g = c === void 0 ? "Not Found" : c, m = e.onClear, S = e.mode, w = e.disabled, h = e.loading, E = e.getInputElement, C = e.getRawInputElement, T = e.open, p = e.defaultOpen, I = e.onDropdownVisibleChange, B = e.activeValue, z = e.onActiveValueChange, q = e.activeDescendantId, _ = e.searchValue, F = e.autoClearSearchValue, U = e.onSearch, Q = e.onSearchSplit, G = e.tokenSeparators, j = e.allowClear, ne = e.prefix, Z = e.suffixIcon, Y = e.clearIcon, x = e.OptionList, M = e.animation, fe = e.transitionName, ie = e.dropdownStyle, J = e.dropdownClassName, se = e.dropdownMatchSelectWidth, Ce = e.dropdownRender, ge = e.dropdownAlign, Oe = e.placement, ce = e.builtinPlacements, pe = e.getPopupContainer, O = e.showAction, y = O === void 0 ? [] : O, D = e.onFocus, K = e.onBlur, R = e.onKeyUp, A = e.onKeyDown, le = e.onMouseDown, me = yn(e, bo), re = Fn(S), we = (l !== void 0 ? l : re) || S === "combobox", Be = ee({}, me);
615
- So.forEach(function(ue) {
616
- delete Be[ue];
610
+ }, Gt = /* @__PURE__ */ o.forwardRef(function(e, n) {
611
+ var t, r = e.id, a = e.prefixCls, l = e.className, i = e.showSearch, u = e.tagRender, d = e.direction, f = e.omitDomProps, v = e.displayValues, s = e.onDisplayValuesChange, h = e.emptyOptions, c = e.notFoundContent, g = c === void 0 ? "Not Found" : c, m = e.onClear, S = e.mode, C = e.disabled, b = e.loading, x = e.getInputElement, w = e.getRawInputElement, B = e.open, p = e.defaultOpen, E = e.onDropdownVisibleChange, L = e.activeValue, H = e.onActiveValueChange, q = e.activeDescendantId, _ = e.searchValue, A = e.autoClearSearchValue, X = e.onSearch, Q = e.onSearchSplit, G = e.tokenSeparators, j = e.allowClear, ne = e.prefix, Z = e.suffixIcon, Y = e.clearIcon, I = e.OptionList, D = e.animation, fe = e.transitionName, ie = e.dropdownStyle, J = e.dropdownClassName, se = e.dropdownMatchSelectWidth, ye = e.dropdownRender, ge = e.dropdownAlign, Re = e.placement, ce = e.builtinPlacements, pe = e.getPopupContainer, R = e.showAction, y = R === void 0 ? [] : R, $ = e.onFocus, K = e.onBlur, O = e.onKeyUp, F = e.onKeyDown, le = e.onMouseDown, me = wn(e, mo), re = An(S), Ce = (i !== void 0 ? i : re) || S === "combobox", Le = ee({}, me);
612
+ vo.forEach(function(ue) {
613
+ delete Le[ue];
617
614
  }), f == null || f.forEach(function(ue) {
618
- delete Be[ue];
615
+ delete Le[ue];
619
616
  });
620
- var xe = o.useState(!1), Ne = te(xe, 2), de = Ne[0], Ge = Ne[1];
617
+ var xe = o.useState(!1), Ne = te(xe, 2), de = Ne[0], Xe = Ne[1];
621
618
  o.useEffect(function() {
622
- Ge(Or());
619
+ Xe(Or());
623
620
  }, []);
624
- var Ye = o.useRef(null), Se = o.useRef(null), $e = o.useRef(null), ye = o.useRef(null), Re = o.useRef(null), Pe = o.useRef(!1), en = Jr(), je = te(en, 3), Ae = je[0], Ee = je[1], hn = je[2];
621
+ var Ge = o.useRef(null), Se = o.useRef(null), Me = o.useRef(null), we = o.useRef(null), Oe = o.useRef(null), Pe = o.useRef(!1), en = Gr(), Ae = te(en, 3), He = Ae[0], Ee = Ae[1], hn = Ae[2];
625
622
  o.useImperativeHandle(n, function() {
626
- var ue, X;
623
+ var ue, U;
627
624
  return {
628
- focus: (ue = ye.current) === null || ue === void 0 ? void 0 : ue.focus,
629
- blur: (X = ye.current) === null || X === void 0 ? void 0 : X.blur,
630
- scrollTo: function(Xe) {
631
- var Le;
632
- return (Le = Re.current) === null || Le === void 0 ? void 0 : Le.scrollTo(Xe);
625
+ focus: (ue = we.current) === null || ue === void 0 ? void 0 : ue.focus,
626
+ blur: (U = we.current) === null || U === void 0 ? void 0 : U.blur,
627
+ scrollTo: function(Ke) {
628
+ var Ve;
629
+ return (Ve = Oe.current) === null || Ve === void 0 ? void 0 : Ve.scrollTo(Ke);
633
630
  },
634
- nativeElement: Ye.current || Se.current
631
+ nativeElement: Ge.current || Se.current
635
632
  };
636
633
  });
637
634
  var Fe = o.useMemo(function() {
638
635
  var ue;
639
636
  if (S !== "combobox")
640
637
  return _;
641
- var X = (ue = v[0]) === null || ue === void 0 ? void 0 : ue.value;
642
- return typeof X == "string" || typeof X == "number" ? String(X) : "";
643
- }, [_, S, v]), _e = S === "combobox" && typeof E == "function" && E() || null, De = typeof C == "function" && C(), Nn = wr(Se, De == null || (t = De.props) === null || t === void 0 ? void 0 : t.ref), En = o.useState(!1), dn = te(En, 2), bn = dn[0], In = dn[1];
644
- $n(function() {
638
+ var U = (ue = v[0]) === null || ue === void 0 ? void 0 : ue.value;
639
+ return typeof U == "string" || typeof U == "number" ? String(U) : "";
640
+ }, [_, S, v]), _e = S === "combobox" && typeof x == "function" && x() || null, $e = typeof w == "function" && w(), $n = br(Se, $e == null || (t = $e.props) === null || t === void 0 ? void 0 : t.ref), En = o.useState(!1), dn = te(En, 2), bn = dn[0], In = dn[1];
641
+ Mn(function() {
645
642
  In(!0);
646
643
  }, []);
647
- var cn = Zn(!1, {
644
+ var cn = Qn(!1, {
648
645
  defaultValue: p,
649
- value: T
650
- }), Qe = te(cn, 2), fn = Qe[0], mn = Qe[1], Me = bn ? fn : !1, vn = !g && b;
651
- (w || vn && Me && S === "combobox") && (Me = !1);
652
- var an = vn ? !1 : Me, N = o.useCallback(function(ue) {
653
- var X = ue !== void 0 ? ue : !Me;
654
- w || (mn(X), Me !== X && (I == null || I(X)));
655
- }, [w, Me, mn, I]), V = o.useMemo(function() {
646
+ value: B
647
+ }), qe = te(cn, 2), fn = qe[0], mn = qe[1], De = bn ? fn : !1, vn = !g && h;
648
+ (C || vn && De && S === "combobox") && (De = !1);
649
+ var an = vn ? !1 : De, N = o.useCallback(function(ue) {
650
+ var U = ue !== void 0 ? ue : !De;
651
+ C || (mn(U), De !== U && (E == null || E(U)));
652
+ }, [C, De, mn, E]), z = o.useMemo(function() {
656
653
  return (G || []).some(function(ue) {
657
654
  return [`
658
655
  `, `\r
659
656
  `].includes(ue);
660
657
  });
661
- }, [G]), L = o.useContext(st) || {}, H = L.maxCount, oe = L.rawValues, be = function(X, Ke, Xe) {
662
- if (!(re && kn(H) && (oe == null ? void 0 : oe.size) >= H)) {
663
- var Le = !0, ze = X;
664
- z == null || z(null);
665
- var sn = po(X, G, kn(H) ? H - oe.size : void 0), ln = Xe ? null : sn;
666
- return S !== "combobox" && ln && (ze = "", Q == null || Q(ln), N(!1), Le = !1), U && Fe !== ze && U(ze, {
667
- source: Ke ? "typing" : "effect"
668
- }), Le;
658
+ }, [G]), T = o.useContext(ut) || {}, V = T.maxCount, oe = T.rawValues, be = function(U, We, Ke) {
659
+ if (!(re && Jn(V) && (oe == null ? void 0 : oe.size) >= V)) {
660
+ var Ve = !0, ze = U;
661
+ H == null || H(null);
662
+ var sn = so(U, G, Jn(V) ? V - oe.size : void 0), ln = Ke ? null : sn;
663
+ return S !== "combobox" && ln && (ze = "", Q == null || Q(ln), N(!1), Ve = !1), X && Fe !== ze && X(ze, {
664
+ source: We ? "typing" : "effect"
665
+ }), Ve;
669
666
  }
670
- }, Ze = function(X) {
671
- !X || !X.trim() || U(X, {
667
+ }, Qe = function(U) {
668
+ !U || !U.trim() || X(U, {
672
669
  source: "submit"
673
670
  });
674
671
  };
675
672
  o.useEffect(function() {
676
- !Me && !re && S !== "combobox" && be("", !1, !1);
677
- }, [Me]), o.useEffect(function() {
678
- fn && w && mn(!1), w && !Pe.current && Ee(!1);
679
- }, [w]);
680
- var We = Kt(), nn = te(We, 2), Ie = nn[0], tn = nn[1], Je = o.useRef(!1), Pn = function(X) {
681
- var Ke = Ie(), Xe = X.key, Le = Xe === "Enter";
682
- if (Le && (S !== "combobox" && X.preventDefault(), Me || N(!0)), tn(!!Fe), Xe === "Backspace" && !Ke && re && !Fe && v.length) {
683
- for (var ze = qe(v), sn = null, ln = ze.length - 1; ln >= 0; ln -= 1) {
684
- var wn = ze[ln];
685
- if (!wn.disabled) {
686
- ze.splice(ln, 1), sn = wn;
673
+ !De && !re && S !== "combobox" && be("", !1, !1);
674
+ }, [De]), o.useEffect(function() {
675
+ fn && C && mn(!1), C && !Pe.current && Ee(!1);
676
+ }, [C]);
677
+ var je = jt(), nn = te(je, 2), Ie = nn[0], tn = nn[1], Ze = o.useRef(!1), Nn = function(U) {
678
+ var We = Ie(), Ke = U.key, Ve = Ke === "Enter";
679
+ if (Ve && (S !== "combobox" && U.preventDefault(), De || N(!0)), tn(!!Fe), Ke === "Backspace" && !We && re && !Fe && v.length) {
680
+ for (var ze = Ye(v), sn = null, ln = ze.length - 1; ln >= 0; ln -= 1) {
681
+ var Cn = ze[ln];
682
+ if (!Cn.disabled) {
683
+ ze.splice(ln, 1), sn = Cn;
687
684
  break;
688
685
  }
689
686
  }
@@ -692,39 +689,39 @@ var bo = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
692
689
  values: [sn]
693
690
  });
694
691
  }
695
- for (var Rn = arguments.length, Cn = new Array(Rn > 1 ? Rn - 1 : 0), Bn = 1; Bn < Rn; Bn++)
696
- Cn[Bn - 1] = arguments[Bn];
697
- if (Me && (!Le || !Je.current)) {
698
- var Vn;
699
- Le && (Je.current = !0), (Vn = Re.current) === null || Vn === void 0 || Vn.onKeyDown.apply(Vn, [X].concat(Cn));
692
+ for (var On = arguments.length, yn = new Array(On > 1 ? On - 1 : 0), Ln = 1; Ln < On; Ln++)
693
+ yn[Ln - 1] = arguments[Ln];
694
+ if (De && (!Ve || !Ze.current)) {
695
+ var Bn;
696
+ Ve && (Ze.current = !0), (Bn = Oe.current) === null || Bn === void 0 || Bn.onKeyDown.apply(Bn, [U].concat(yn));
700
697
  }
701
- A == null || A.apply(void 0, [X].concat(Cn));
702
- }, Hn = function(X) {
703
- for (var Ke = arguments.length, Xe = new Array(Ke > 1 ? Ke - 1 : 0), Le = 1; Le < Ke; Le++)
704
- Xe[Le - 1] = arguments[Le];
705
- if (Me) {
698
+ F == null || F.apply(void 0, [U].concat(yn));
699
+ }, Vn = function(U) {
700
+ for (var We = arguments.length, Ke = new Array(We > 1 ? We - 1 : 0), Ve = 1; Ve < We; Ve++)
701
+ Ke[Ve - 1] = arguments[Ve];
702
+ if (De) {
706
703
  var ze;
707
- (ze = Re.current) === null || ze === void 0 || ze.onKeyUp.apply(ze, [X].concat(Xe));
704
+ (ze = Oe.current) === null || ze === void 0 || ze.onKeyUp.apply(ze, [U].concat(Ke));
708
705
  }
709
- X.key === "Enter" && (Je.current = !1), R == null || R.apply(void 0, [X].concat(Xe));
710
- }, rn = function(X) {
711
- var Ke = v.filter(function(Xe) {
712
- return Xe !== X;
706
+ U.key === "Enter" && (Ze.current = !1), O == null || O.apply(void 0, [U].concat(Ke));
707
+ }, rn = function(U) {
708
+ var We = v.filter(function(Ke) {
709
+ return Ke !== U;
713
710
  });
714
- s(Ke, {
711
+ s(We, {
715
712
  type: "remove",
716
- values: [X]
713
+ values: [U]
717
714
  });
718
- }, ke = function() {
719
- Je.current = !1;
720
- }, P = o.useRef(!1), $ = function() {
721
- Ee(!0), w || (D && !P.current && D.apply(void 0, arguments), y.includes("focus") && N(!0)), P.current = !0;
715
+ }, Je = function() {
716
+ Ze.current = !1;
717
+ }, P = o.useRef(!1), M = function() {
718
+ Ee(!0), C || ($ && !P.current && $.apply(void 0, arguments), y.includes("focus") && N(!0)), P.current = !0;
722
719
  }, k = function() {
723
720
  Pe.current = !0, Ee(!1, function() {
724
721
  P.current = !1, Pe.current = !1, N(!1);
725
- }), !w && (Fe && (S === "tags" ? U(Fe, {
722
+ }), !C && (Fe && (S === "tags" ? X(Fe, {
726
723
  source: "submit"
727
- }) : S === "multiple" && U("", {
724
+ }) : S === "multiple" && X("", {
728
725
  source: "blur"
729
726
  })), K && K.apply(void 0, arguments));
730
727
  }, ve = [];
@@ -735,142 +732,142 @@ var bo = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
735
732
  }), ve.splice(0, ve.length);
736
733
  };
737
734
  }, []);
738
- var Te = function(X) {
739
- var Ke, Xe = X.target, Le = (Ke = $e.current) === null || Ke === void 0 ? void 0 : Ke.getPopupElement();
740
- if (Le && Le.contains(Xe)) {
735
+ var Te = function(U) {
736
+ var We, Ke = U.target, Ve = (We = Me.current) === null || We === void 0 ? void 0 : We.getPopupElement();
737
+ if (Ve && Ve.contains(Ke)) {
741
738
  var ze = setTimeout(function() {
742
- var Rn = ve.indexOf(ze);
743
- if (Rn !== -1 && ve.splice(Rn, 1), hn(), !de && !Le.contains(document.activeElement)) {
744
- var Cn;
745
- (Cn = ye.current) === null || Cn === void 0 || Cn.focus();
739
+ var On = ve.indexOf(ze);
740
+ if (On !== -1 && ve.splice(On, 1), hn(), !de && !Ve.contains(document.activeElement)) {
741
+ var yn;
742
+ (yn = we.current) === null || yn === void 0 || yn.focus();
746
743
  }
747
744
  });
748
745
  ve.push(ze);
749
746
  }
750
- for (var sn = arguments.length, ln = new Array(sn > 1 ? sn - 1 : 0), wn = 1; wn < sn; wn++)
751
- ln[wn - 1] = arguments[wn];
752
- le == null || le.apply(void 0, [X].concat(ln));
747
+ for (var sn = arguments.length, ln = new Array(sn > 1 ? sn - 1 : 0), Cn = 1; Cn < sn; Cn++)
748
+ ln[Cn - 1] = arguments[Cn];
749
+ le == null || le.apply(void 0, [U].concat(ln));
753
750
  }, xn = o.useState({}), Sn = te(xn, 2), Wn = Sn[1];
754
751
  function Kn() {
755
752
  Wn({});
756
753
  }
757
- var _n;
758
- De && (_n = function(X) {
759
- N(X);
760
- }), kr(function() {
754
+ var Pn;
755
+ $e && (Pn = function(U) {
756
+ N(U);
757
+ }), Yr(function() {
761
758
  var ue;
762
- return [Ye.current, (ue = $e.current) === null || ue === void 0 ? void 0 : ue.getPopupElement()];
763
- }, an, N, !!De);
764
- var Tn = o.useMemo(function() {
759
+ return [Ge.current, (ue = Me.current) === null || ue === void 0 ? void 0 : ue.getPopupElement()];
760
+ }, an, N, !!$e);
761
+ var _n = o.useMemo(function() {
765
762
  return ee(ee({}, e), {}, {
766
763
  notFoundContent: g,
767
- open: Me,
764
+ open: De,
768
765
  triggerOpen: an,
769
766
  id: r,
770
- showSearch: we,
767
+ showSearch: Ce,
771
768
  multiple: re,
772
769
  toggleOpen: N
773
770
  });
774
- }, [e, g, an, Me, r, we, re, N]), gt = !!Z || h, pt;
775
- gt && (pt = /* @__PURE__ */ o.createElement(jn, {
776
- className: Ve("".concat(a, "-arrow"), ae({}, "".concat(a, "-arrow-loading"), h)),
771
+ }, [e, g, an, De, r, Ce, re, N]), mt = !!Z || b, vt;
772
+ mt && (vt = /* @__PURE__ */ o.createElement(jn, {
773
+ className: Be("".concat(a, "-arrow"), ae({}, "".concat(a, "-arrow-loading"), b)),
777
774
  customizeIcon: Z,
778
775
  customizeIconProps: {
779
- loading: h,
776
+ loading: b,
780
777
  searchValue: Fe,
781
- open: Me,
782
- focused: Ae,
783
- showSearch: we
778
+ open: De,
779
+ focused: He,
780
+ showSearch: Ce
784
781
  }
785
782
  }));
786
- var cr = function() {
787
- var X;
788
- m == null || m(), (X = ye.current) === null || X === void 0 || X.focus(), s([], {
783
+ var lr = function() {
784
+ var U;
785
+ m == null || m(), (U = we.current) === null || U === void 0 || U.focus(), s([], {
789
786
  type: "clear",
790
787
  values: v
791
788
  }), be("", !1, !1);
792
- }, ht = Qr(a, cr, v, j, Y, w, Fe, S), sr = ht.allowClear, dr = ht.clearIcon, fr = /* @__PURE__ */ o.createElement(x, {
793
- ref: Re
794
- }), mr = Ve(a, i, ae(ae(ae(ae(ae(ae(ae(ae(ae(ae({}, "".concat(a, "-focused"), Ae), "".concat(a, "-multiple"), re), "".concat(a, "-single"), !re), "".concat(a, "-allow-clear"), j), "".concat(a, "-show-arrow"), gt), "".concat(a, "-disabled"), w), "".concat(a, "-loading"), h), "".concat(a, "-open"), Me), "".concat(a, "-customize-input"), _e), "".concat(a, "-show-search"), we)), bt = /* @__PURE__ */ o.createElement(Gt, {
795
- ref: $e,
796
- disabled: w,
789
+ }, gt = Ur(a, lr, v, j, Y, C, Fe, S), ur = gt.allowClear, cr = gt.clearIcon, sr = /* @__PURE__ */ o.createElement(I, {
790
+ ref: Oe
791
+ }), dr = Be(a, l, ae(ae(ae(ae(ae(ae(ae(ae(ae(ae({}, "".concat(a, "-focused"), He), "".concat(a, "-multiple"), re), "".concat(a, "-single"), !re), "".concat(a, "-allow-clear"), j), "".concat(a, "-show-arrow"), mt), "".concat(a, "-disabled"), C), "".concat(a, "-loading"), b), "".concat(a, "-open"), De), "".concat(a, "-customize-input"), _e), "".concat(a, "-show-search"), Ce)), pt = /* @__PURE__ */ o.createElement(Ut, {
792
+ ref: Me,
793
+ disabled: C,
797
794
  prefixCls: a,
798
795
  visible: an,
799
- popupElement: fr,
800
- animation: M,
796
+ popupElement: sr,
797
+ animation: D,
801
798
  transitionName: fe,
802
799
  dropdownStyle: ie,
803
800
  dropdownClassName: J,
804
801
  direction: d,
805
802
  dropdownMatchSelectWidth: se,
806
- dropdownRender: Ce,
803
+ dropdownRender: ye,
807
804
  dropdownAlign: ge,
808
- placement: Oe,
805
+ placement: Re,
809
806
  builtinPlacements: ce,
810
807
  getPopupContainer: pe,
811
- empty: b,
812
- getTriggerDOMNode: function(X) {
808
+ empty: h,
809
+ getTriggerDOMNode: function(U) {
813
810
  return (
814
811
  // TODO: This is workaround and should be removed in `rc-select`
815
812
  // And use new standard `nativeElement` for ref.
816
813
  // But we should update `rc-resize-observer` first.
817
- Se.current || X
814
+ Se.current || U
818
815
  );
819
816
  },
820
- onPopupVisibleChange: _n,
817
+ onPopupVisibleChange: Pn,
821
818
  onPopupMouseEnter: Kn
822
- }, De ? /* @__PURE__ */ o.cloneElement(De, {
823
- ref: Nn
824
- }) : /* @__PURE__ */ o.createElement(Ut, on({}, e, {
819
+ }, $e ? /* @__PURE__ */ o.cloneElement($e, {
820
+ ref: $n
821
+ }) : /* @__PURE__ */ o.createElement(Kt, on({}, e, {
825
822
  domRef: Se,
826
823
  prefixCls: a,
827
824
  inputElement: _e,
828
- ref: ye,
825
+ ref: we,
829
826
  id: r,
830
827
  prefix: ne,
831
- showSearch: we,
832
- autoClearSearchValue: F,
828
+ showSearch: Ce,
829
+ autoClearSearchValue: A,
833
830
  mode: S,
834
831
  activeDescendantId: q,
835
832
  tagRender: u,
836
833
  values: v,
837
- open: Me,
834
+ open: De,
838
835
  onToggleOpen: N,
839
- activeValue: B,
836
+ activeValue: L,
840
837
  searchValue: Fe,
841
838
  onSearch: be,
842
- onSearchSubmit: Ze,
839
+ onSearchSubmit: Qe,
843
840
  onRemove: rn,
844
- tokenWithEnter: V,
845
- onInputBlur: ke
846
- }))), Xn;
847
- return De ? Xn = bt : Xn = /* @__PURE__ */ o.createElement("div", on({
848
- className: mr
849
- }, Be, {
850
- ref: Ye,
841
+ tokenWithEnter: z,
842
+ onInputBlur: Je
843
+ }))), Un;
844
+ return $e ? Un = pt : Un = /* @__PURE__ */ o.createElement("div", on({
845
+ className: dr
846
+ }, Le, {
847
+ ref: Ge,
851
848
  onMouseDown: Te,
852
- onKeyDown: Pn,
853
- onKeyUp: Hn,
854
- onFocus: $,
849
+ onKeyDown: Nn,
850
+ onKeyUp: Vn,
851
+ onFocus: M,
855
852
  onBlur: k
856
- }), /* @__PURE__ */ o.createElement(ho, {
857
- visible: Ae && !Me,
853
+ }), /* @__PURE__ */ o.createElement(fo, {
854
+ visible: He && !De,
858
855
  values: v
859
- }), bt, pt, sr && dr), /* @__PURE__ */ o.createElement(Wt.Provider, {
860
- value: Tn
861
- }, Xn);
856
+ }), pt, vt, ur && cr), /* @__PURE__ */ o.createElement(At.Provider, {
857
+ value: _n
858
+ }, Un);
862
859
  });
863
- process.env.NODE_ENV !== "production" && (qt.displayName = "BaseSelect");
864
- var dt = function() {
860
+ process.env.NODE_ENV !== "production" && (Gt.displayName = "BaseSelect");
861
+ var ct = function() {
865
862
  return null;
866
863
  };
867
- dt.isSelectOptGroup = !0;
868
- var ft = function() {
864
+ ct.isSelectOptGroup = !0;
865
+ var st = function() {
869
866
  return null;
870
867
  };
871
- ft.isSelectOption = !0;
872
- var Qt = /* @__PURE__ */ o.forwardRef(function(e, n) {
873
- var t = e.height, r = e.offsetY, a = e.offsetX, i = e.children, l = e.prefixCls, u = e.onInnerResize, d = e.innerProps, f = e.rtl, v = e.extra, s = {}, b = {
868
+ st.isSelectOption = !0;
869
+ var Yt = /* @__PURE__ */ o.forwardRef(function(e, n) {
870
+ var t = e.height, r = e.offsetY, a = e.offsetX, l = e.children, i = e.prefixCls, u = e.onInnerResize, d = e.innerProps, f = e.rtl, v = e.extra, s = {}, h = {
874
871
  display: "flex",
875
872
  flexDirection: "column"
876
873
  };
@@ -878,23 +875,23 @@ var Qt = /* @__PURE__ */ o.forwardRef(function(e, n) {
878
875
  height: t,
879
876
  position: "relative",
880
877
  overflow: "hidden"
881
- }, b = ee(ee({}, b), {}, ae(ae(ae(ae(ae({
878
+ }, h = ee(ee({}, h), {}, ae(ae(ae(ae(ae({
882
879
  transform: "translateY(".concat(r, "px)")
883
880
  }, f ? "marginRight" : "marginLeft", -a), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ o.createElement("div", {
884
881
  style: s
885
- }, /* @__PURE__ */ o.createElement(jt, {
882
+ }, /* @__PURE__ */ o.createElement(Ft, {
886
883
  onResize: function(g) {
887
884
  var m = g.offsetHeight;
888
885
  m && u && u();
889
886
  }
890
887
  }, /* @__PURE__ */ o.createElement("div", on({
891
- style: b,
892
- className: Ve(ae({}, "".concat(l, "-holder-inner"), l)),
888
+ style: h,
889
+ className: Be(ae({}, "".concat(i, "-holder-inner"), i)),
893
890
  ref: n
894
- }, d), i, v)));
891
+ }, d), l, v)));
895
892
  });
896
- Qt.displayName = "Filler";
897
- function wo(e) {
893
+ Yt.displayName = "Filler";
894
+ function go(e) {
898
895
  var n = e.children, t = e.setRef, r = o.useCallback(function(a) {
899
896
  t(a);
900
897
  }, []);
@@ -902,38 +899,38 @@ function wo(e) {
902
899
  ref: r
903
900
  });
904
901
  }
905
- function Co(e, n, t, r, a, i, l, u) {
902
+ function po(e, n, t, r, a, l, i, u) {
906
903
  var d = u.getKey;
907
904
  return e.slice(n, t + 1).map(function(f, v) {
908
- var s = n + v, b = l(f, s, {
905
+ var s = n + v, h = i(f, s, {
909
906
  style: {
910
907
  width: r
911
908
  },
912
909
  offsetX: a
913
910
  }), c = d(f);
914
- return /* @__PURE__ */ o.createElement(wo, {
911
+ return /* @__PURE__ */ o.createElement(go, {
915
912
  key: c,
916
913
  setRef: function(m) {
917
- return i(f, m);
914
+ return l(f, m);
918
915
  }
919
- }, b);
916
+ }, h);
920
917
  });
921
918
  }
922
- function yo(e, n, t) {
923
- var r = e.length, a = n.length, i, l;
919
+ function ho(e, n, t) {
920
+ var r = e.length, a = n.length, l, i;
924
921
  if (r === 0 && a === 0)
925
922
  return null;
926
- r < a ? (i = e, l = n) : (i = n, l = e);
923
+ r < a ? (l = e, i = n) : (l = n, i = e);
927
924
  var u = {
928
925
  __EMPTY_ITEM__: !0
929
926
  };
930
927
  function d(g) {
931
928
  return g !== void 0 ? t(g) : u;
932
929
  }
933
- for (var f = null, v = Math.abs(r - a) !== 1, s = 0; s < l.length; s += 1) {
934
- var b = d(i[s]), c = d(l[s]);
935
- if (b !== c) {
936
- f = s, v = v || b !== d(l[s + 1]);
930
+ for (var f = null, v = Math.abs(r - a) !== 1, s = 0; s < i.length; s += 1) {
931
+ var h = d(l[s]), c = d(i[s]);
932
+ if (h !== c) {
933
+ f = s, v = v || h !== d(i[s + 1]);
937
934
  break;
938
935
  }
939
936
  }
@@ -942,18 +939,18 @@ function yo(e, n, t) {
942
939
  multiple: v
943
940
  };
944
941
  }
945
- function Eo(e, n, t) {
946
- var r = o.useState(e), a = te(r, 2), i = a[0], l = a[1], u = o.useState(null), d = te(u, 2), f = d[0], v = d[1];
942
+ function bo(e, n, t) {
943
+ var r = o.useState(e), a = te(r, 2), l = a[0], i = a[1], u = o.useState(null), d = te(u, 2), f = d[0], v = d[1];
947
944
  return o.useEffect(function() {
948
- var s = yo(i || [], e, n);
949
- (s == null ? void 0 : s.index) !== void 0 && v(e[s.index]), l(e);
945
+ var s = ho(l || [], e, n);
946
+ (s == null ? void 0 : s.index) !== void 0 && v(e[s.index]), i(e);
950
947
  }, [e]), [f];
951
948
  }
952
- var Ot = (typeof navigator > "u" ? "undefined" : pn(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
953
- const Zt = function(e, n, t, r) {
954
- var a = he(!1), i = he(null);
955
- function l() {
956
- clearTimeout(i.current), a.current = !0, i.current = setTimeout(function() {
949
+ var xt = (typeof navigator > "u" ? "undefined" : pn(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
950
+ const qt = function(e, n, t, r) {
951
+ var a = he(!1), l = he(null);
952
+ function i() {
953
+ clearTimeout(l.current), a.current = !0, l.current = setTimeout(function() {
957
954
  a.current = !1;
958
955
  }, 50);
959
956
  }
@@ -970,69 +967,69 @@ const Zt = function(e, n, t, r) {
970
967
  f > 0 && u.current.right
971
968
  ) : f < 0 && u.current.top || // Pass origin wheel when on the bottom
972
969
  f > 0 && u.current.bottom;
973
- return v && s ? (clearTimeout(i.current), a.current = !1) : (!s || a.current) && l(), !a.current && s;
970
+ return v && s ? (clearTimeout(l.current), a.current = !1) : (!s || a.current) && i(), !a.current && s;
974
971
  };
975
972
  };
976
- function Io(e, n, t, r, a, i, l) {
977
- var u = he(0), d = he(null), f = he(null), v = he(!1), s = Zt(n, t, r, a);
978
- function b(h, E) {
979
- if (un.cancel(d.current), !s(!1, E)) {
980
- var C = h;
981
- if (!C._virtualHandled)
982
- C._virtualHandled = !0;
973
+ function So(e, n, t, r, a, l, i) {
974
+ var u = he(0), d = he(null), f = he(null), v = he(!1), s = qt(n, t, r, a);
975
+ function h(b, x) {
976
+ if (un.cancel(d.current), !s(!1, x)) {
977
+ var w = b;
978
+ if (!w._virtualHandled)
979
+ w._virtualHandled = !0;
983
980
  else
984
981
  return;
985
- u.current += E, f.current = E, Ot || C.preventDefault(), d.current = un(function() {
986
- var T = v.current ? 10 : 1;
987
- l(u.current * T, !1), u.current = 0;
982
+ u.current += x, f.current = x, xt || w.preventDefault(), d.current = un(function() {
983
+ var B = v.current ? 10 : 1;
984
+ i(u.current * B, !1), u.current = 0;
988
985
  });
989
986
  }
990
987
  }
991
- function c(h, E) {
992
- l(E, !0), Ot || h.preventDefault();
988
+ function c(b, x) {
989
+ i(x, !0), xt || b.preventDefault();
993
990
  }
994
991
  var g = he(null), m = he(null);
995
- function S(h) {
992
+ function S(b) {
996
993
  if (e) {
997
994
  un.cancel(m.current), m.current = un(function() {
998
995
  g.current = null;
999
996
  }, 2);
1000
- var E = h.deltaX, C = h.deltaY, T = h.shiftKey, p = E, I = C;
1001
- (g.current === "sx" || !g.current && T && C && !E) && (p = C, I = 0, g.current = "sx");
1002
- var B = Math.abs(p), z = Math.abs(I);
1003
- g.current === null && (g.current = i && B > z ? "x" : "y"), g.current === "y" ? b(h, I) : c(h, p);
997
+ var x = b.deltaX, w = b.deltaY, B = b.shiftKey, p = x, E = w;
998
+ (g.current === "sx" || !g.current && B && w && !x) && (p = w, E = 0, g.current = "sx");
999
+ var L = Math.abs(p), H = Math.abs(E);
1000
+ g.current === null && (g.current = l && L > H ? "x" : "y"), g.current === "y" ? h(b, E) : c(b, p);
1004
1001
  }
1005
1002
  }
1006
- function w(h) {
1007
- e && (v.current = h.detail === f.current);
1003
+ function C(b) {
1004
+ e && (v.current = b.detail === f.current);
1008
1005
  }
1009
- return [S, w];
1006
+ return [S, C];
1010
1007
  }
1011
- function xo(e, n, t, r) {
1008
+ function Co(e, n, t, r) {
1012
1009
  var a = o.useMemo(function() {
1013
1010
  return [/* @__PURE__ */ new Map(), []];
1014
- }, [e, t.id, r]), i = te(a, 2), l = i[0], u = i[1], d = function(v) {
1015
- var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : v, b = l.get(v), c = l.get(s);
1016
- if (b === void 0 || c === void 0)
1011
+ }, [e, t.id, r]), l = te(a, 2), i = l[0], u = l[1], d = function(v) {
1012
+ var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : v, h = i.get(v), c = i.get(s);
1013
+ if (h === void 0 || c === void 0)
1017
1014
  for (var g = e.length, m = u.length; m < g; m += 1) {
1018
- var S, w = e[m], h = n(w);
1019
- l.set(h, m);
1020
- var E = (S = t.get(h)) !== null && S !== void 0 ? S : r;
1021
- if (u[m] = (u[m - 1] || 0) + E, h === v && (b = m), h === s && (c = m), b !== void 0 && c !== void 0)
1015
+ var S, C = e[m], b = n(C);
1016
+ i.set(b, m);
1017
+ var x = (S = t.get(b)) !== null && S !== void 0 ? S : r;
1018
+ if (u[m] = (u[m - 1] || 0) + x, b === v && (h = m), b === s && (c = m), h !== void 0 && c !== void 0)
1022
1019
  break;
1023
1020
  }
1024
1021
  return {
1025
- top: u[b - 1] || 0,
1022
+ top: u[h - 1] || 0,
1026
1023
  bottom: u[c]
1027
1024
  };
1028
1025
  };
1029
1026
  return d;
1030
1027
  }
1031
- var Ro = /* @__PURE__ */ function() {
1028
+ var yo = /* @__PURE__ */ function() {
1032
1029
  function e() {
1033
- yr(this, e), ae(this, "maps", void 0), ae(this, "id", 0), ae(this, "diffKeys", /* @__PURE__ */ new Set()), this.maps = /* @__PURE__ */ Object.create(null);
1030
+ Cr(this, e), ae(this, "maps", void 0), ae(this, "id", 0), ae(this, "diffKeys", /* @__PURE__ */ new Set()), this.maps = /* @__PURE__ */ Object.create(null);
1034
1031
  }
1035
- return Cr(e, [{
1032
+ return Sr(e, [{
1036
1033
  key: "set",
1037
1034
  value: function(t, r) {
1038
1035
  this.maps[t] = r, this.id += 1, this.diffKeys.add(t);
@@ -1058,12 +1055,12 @@ var Ro = /* @__PURE__ */ function() {
1058
1055
  }
1059
1056
  }]), e;
1060
1057
  }();
1061
- function $t(e) {
1058
+ function Ot(e) {
1062
1059
  var n = parseFloat(e);
1063
1060
  return isNaN(n) ? 0 : n;
1064
1061
  }
1065
- function Oo(e, n, t) {
1066
- var r = o.useState(0), a = te(r, 2), i = a[0], l = a[1], u = he(/* @__PURE__ */ new Map()), d = he(new Ro()), f = he(0);
1062
+ function wo(e, n, t) {
1063
+ var r = o.useState(0), a = te(r, 2), l = a[0], i = a[1], u = he(/* @__PURE__ */ new Map()), d = he(new yo()), f = he(0);
1067
1064
  function v() {
1068
1065
  f.current += 1;
1069
1066
  }
@@ -1071,14 +1068,14 @@ function Oo(e, n, t) {
1071
1068
  var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1072
1069
  v();
1073
1070
  var g = function() {
1074
- var w = !1;
1075
- u.current.forEach(function(h, E) {
1076
- if (h && h.offsetParent) {
1077
- var C = Er(h), T = C.offsetHeight, p = getComputedStyle(C), I = p.marginTop, B = p.marginBottom, z = $t(I), q = $t(B), _ = T + z + q;
1078
- d.current.get(E) !== _ && (d.current.set(E, _), w = !0);
1071
+ var C = !1;
1072
+ u.current.forEach(function(b, x) {
1073
+ if (b && b.offsetParent) {
1074
+ var w = yr(b), B = w.offsetHeight, p = getComputedStyle(w), E = p.marginTop, L = p.marginBottom, H = Ot(E), q = Ot(L), _ = B + H + q;
1075
+ d.current.get(x) !== _ && (d.current.set(x, _), C = !0);
1079
1076
  }
1080
- }), w && l(function(h) {
1081
- return h + 1;
1077
+ }), C && i(function(b) {
1078
+ return b + 1;
1082
1079
  });
1083
1080
  };
1084
1081
  if (c)
@@ -1091,63 +1088,63 @@ function Oo(e, n, t) {
1091
1088
  });
1092
1089
  }
1093
1090
  }
1094
- function b(c, g) {
1091
+ function h(c, g) {
1095
1092
  var m = e(c);
1096
1093
  u.current.get(m), g ? (u.current.set(m, g), s()) : u.current.delete(m);
1097
1094
  }
1098
- return qn(function() {
1095
+ return Yn(function() {
1099
1096
  return v;
1100
- }, []), [b, s, d.current, i];
1097
+ }, []), [h, s, d.current, l];
1101
1098
  }
1102
- var Mt = 14 / 15;
1103
- function $o(e, n, t) {
1104
- var r = he(!1), a = he(0), i = he(0), l = he(null), u = he(null), d, f = function(c) {
1099
+ var Rt = 14 / 15;
1100
+ function Eo(e, n, t) {
1101
+ var r = he(!1), a = he(0), l = he(0), i = he(null), u = he(null), d, f = function(c) {
1105
1102
  if (r.current) {
1106
- var g = Math.ceil(c.touches[0].pageX), m = Math.ceil(c.touches[0].pageY), S = a.current - g, w = i.current - m, h = Math.abs(S) > Math.abs(w);
1107
- h ? a.current = g : i.current = m;
1108
- var E = t(h, h ? S : w, !1, c);
1109
- E && c.preventDefault(), clearInterval(u.current), E && (u.current = setInterval(function() {
1110
- h ? S *= Mt : w *= Mt;
1111
- var C = Math.floor(h ? S : w);
1112
- (!t(h, C, !0) || Math.abs(C) <= 0.1) && clearInterval(u.current);
1103
+ var g = Math.ceil(c.touches[0].pageX), m = Math.ceil(c.touches[0].pageY), S = a.current - g, C = l.current - m, b = Math.abs(S) > Math.abs(C);
1104
+ b ? a.current = g : l.current = m;
1105
+ var x = t(b, b ? S : C, !1, c);
1106
+ x && c.preventDefault(), clearInterval(u.current), x && (u.current = setInterval(function() {
1107
+ b ? S *= Rt : C *= Rt;
1108
+ var w = Math.floor(b ? S : C);
1109
+ (!t(b, w, !0) || Math.abs(w) <= 0.1) && clearInterval(u.current);
1113
1110
  }, 16));
1114
1111
  }
1115
1112
  }, v = function() {
1116
1113
  r.current = !1, d();
1117
1114
  }, s = function(c) {
1118
- d(), c.touches.length === 1 && !r.current && (r.current = !0, a.current = Math.ceil(c.touches[0].pageX), i.current = Math.ceil(c.touches[0].pageY), l.current = c.target, l.current.addEventListener("touchmove", f, {
1115
+ d(), c.touches.length === 1 && !r.current && (r.current = !0, a.current = Math.ceil(c.touches[0].pageX), l.current = Math.ceil(c.touches[0].pageY), i.current = c.target, i.current.addEventListener("touchmove", f, {
1119
1116
  passive: !1
1120
- }), l.current.addEventListener("touchend", v, {
1117
+ }), i.current.addEventListener("touchend", v, {
1121
1118
  passive: !0
1122
1119
  }));
1123
1120
  };
1124
1121
  d = function() {
1125
- l.current && (l.current.removeEventListener("touchmove", f), l.current.removeEventListener("touchend", v));
1126
- }, $n(function() {
1122
+ i.current && (i.current.removeEventListener("touchmove", f), i.current.removeEventListener("touchend", v));
1123
+ }, Mn(function() {
1127
1124
  return e && n.current.addEventListener("touchstart", s, {
1128
1125
  passive: !0
1129
1126
  }), function() {
1130
- var b;
1131
- (b = n.current) === null || b === void 0 || b.removeEventListener("touchstart", s), d(), clearInterval(u.current);
1127
+ var h;
1128
+ (h = n.current) === null || h === void 0 || h.removeEventListener("touchstart", s), d(), clearInterval(u.current);
1132
1129
  };
1133
1130
  }, [e]);
1134
1131
  }
1135
- function Dt(e) {
1132
+ function Mt(e) {
1136
1133
  return Math.floor(Math.pow(e, 0.5));
1137
1134
  }
1138
- function nt(e, n) {
1135
+ function et(e, n) {
1139
1136
  var t = "touches" in e ? e.touches[0] : e;
1140
1137
  return t[n ? "pageX" : "pageY"] - window[n ? "scrollX" : "scrollY"];
1141
1138
  }
1142
- function Mo(e, n, t) {
1139
+ function Io(e, n, t) {
1143
1140
  o.useEffect(function() {
1144
1141
  var r = n.current;
1145
1142
  if (e && r) {
1146
- var a = !1, i, l, u = function() {
1147
- un.cancel(i);
1148
- }, d = function b() {
1149
- u(), i = un(function() {
1150
- t(l), b();
1143
+ var a = !1, l, i, u = function() {
1144
+ un.cancel(l);
1145
+ }, d = function h() {
1146
+ u(), l = un(function() {
1147
+ t(i), h();
1151
1148
  });
1152
1149
  }, f = function(c) {
1153
1150
  var g = c;
@@ -1156,13 +1153,13 @@ function Mo(e, n, t) {
1156
1153
  a = !1, u();
1157
1154
  }, s = function(c) {
1158
1155
  if (a) {
1159
- var g = nt(c, !1), m = r.getBoundingClientRect(), S = m.top, w = m.bottom;
1156
+ var g = et(c, !1), m = r.getBoundingClientRect(), S = m.top, C = m.bottom;
1160
1157
  if (g <= S) {
1161
- var h = S - g;
1162
- l = -Dt(h), d();
1163
- } else if (g >= w) {
1164
- var E = g - w;
1165
- l = Dt(E), d();
1158
+ var b = S - g;
1159
+ i = -Mt(b), d();
1160
+ } else if (g >= C) {
1161
+ var x = g - C;
1162
+ i = Mt(x), d();
1166
1163
  } else
1167
1164
  u();
1168
1165
  }
@@ -1173,149 +1170,149 @@ function Mo(e, n, t) {
1173
1170
  }
1174
1171
  }, [e]);
1175
1172
  }
1176
- var Nt = 10;
1177
- function Do(e, n, t, r, a, i, l, u) {
1178
- var d = o.useRef(), f = o.useState(null), v = te(f, 2), s = v[0], b = v[1];
1179
- return $n(function() {
1180
- if (s && s.times < Nt) {
1173
+ var Dt = 10;
1174
+ function xo(e, n, t, r, a, l, i, u) {
1175
+ var d = o.useRef(), f = o.useState(null), v = te(f, 2), s = v[0], h = v[1];
1176
+ return Mn(function() {
1177
+ if (s && s.times < Dt) {
1181
1178
  if (!e.current) {
1182
- b(function(Y) {
1179
+ h(function(Y) {
1183
1180
  return ee({}, Y);
1184
1181
  });
1185
1182
  return;
1186
1183
  }
1187
- i();
1188
- var c = s.targetAlign, g = s.originAlign, m = s.index, S = s.offset, w = e.current.clientHeight, h = !1, E = c, C = null;
1189
- if (w) {
1190
- for (var T = c || g, p = 0, I = 0, B = 0, z = Math.min(n.length - 1, m), q = 0; q <= z; q += 1) {
1184
+ l();
1185
+ var c = s.targetAlign, g = s.originAlign, m = s.index, S = s.offset, C = e.current.clientHeight, b = !1, x = c, w = null;
1186
+ if (C) {
1187
+ for (var B = c || g, p = 0, E = 0, L = 0, H = Math.min(n.length - 1, m), q = 0; q <= H; q += 1) {
1191
1188
  var _ = a(n[q]);
1192
- I = p;
1193
- var F = t.get(_);
1194
- B = I + (F === void 0 ? r : F), p = B;
1189
+ E = p;
1190
+ var A = t.get(_);
1191
+ L = E + (A === void 0 ? r : A), p = L;
1195
1192
  }
1196
- for (var U = T === "top" ? S : w - S, Q = z; Q >= 0; Q -= 1) {
1193
+ for (var X = B === "top" ? S : C - S, Q = H; Q >= 0; Q -= 1) {
1197
1194
  var G = a(n[Q]), j = t.get(G);
1198
1195
  if (j === void 0) {
1199
- h = !0;
1196
+ b = !0;
1200
1197
  break;
1201
1198
  }
1202
- if (U -= j, U <= 0)
1199
+ if (X -= j, X <= 0)
1203
1200
  break;
1204
1201
  }
1205
- switch (T) {
1202
+ switch (B) {
1206
1203
  case "top":
1207
- C = I - S;
1204
+ w = E - S;
1208
1205
  break;
1209
1206
  case "bottom":
1210
- C = B - w + S;
1207
+ w = L - C + S;
1211
1208
  break;
1212
1209
  default: {
1213
- var ne = e.current.scrollTop, Z = ne + w;
1214
- I < ne ? E = "top" : B > Z && (E = "bottom");
1210
+ var ne = e.current.scrollTop, Z = ne + C;
1211
+ E < ne ? x = "top" : L > Z && (x = "bottom");
1215
1212
  }
1216
1213
  }
1217
- C !== null && l(C), C !== s.lastTop && (h = !0);
1214
+ w !== null && i(w), w !== s.lastTop && (b = !0);
1218
1215
  }
1219
- h && b(ee(ee({}, s), {}, {
1216
+ b && h(ee(ee({}, s), {}, {
1220
1217
  times: s.times + 1,
1221
- targetAlign: E,
1222
- lastTop: C
1218
+ targetAlign: x,
1219
+ lastTop: w
1223
1220
  }));
1224
- } else process.env.NODE_ENV !== "production" && (s == null ? void 0 : s.times) === Nt && Ue(!1, "Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.");
1221
+ } else process.env.NODE_ENV !== "production" && (s == null ? void 0 : s.times) === Dt && Ue(!1, "Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.");
1225
1222
  }, [s, e.current]), function(c) {
1226
1223
  if (c == null) {
1227
1224
  u();
1228
1225
  return;
1229
1226
  }
1230
1227
  if (un.cancel(d.current), typeof c == "number")
1231
- l(c);
1228
+ i(c);
1232
1229
  else if (c && pn(c) === "object") {
1233
1230
  var g, m = c.align;
1234
- "index" in c ? g = c.index : g = n.findIndex(function(h) {
1235
- return a(h) === c.key;
1231
+ "index" in c ? g = c.index : g = n.findIndex(function(b) {
1232
+ return a(b) === c.key;
1236
1233
  });
1237
- var S = c.offset, w = S === void 0 ? 0 : S;
1238
- b({
1234
+ var S = c.offset, C = S === void 0 ? 0 : S;
1235
+ h({
1239
1236
  times: 0,
1240
1237
  index: g,
1241
- offset: w,
1238
+ offset: C,
1242
1239
  originAlign: m
1243
1240
  });
1244
1241
  }
1245
1242
  };
1246
1243
  }
1247
- var tt = /* @__PURE__ */ o.forwardRef(function(e, n) {
1248
- var t = e.prefixCls, r = e.rtl, a = e.scrollOffset, i = e.scrollRange, l = e.onStartMove, u = e.onStopMove, d = e.onScroll, f = e.horizontal, v = e.spinSize, s = e.containerSize, b = e.style, c = e.thumbStyle, g = e.showScrollBar, m = o.useState(!1), S = te(m, 2), w = S[0], h = S[1], E = o.useState(null), C = te(E, 2), T = C[0], p = C[1], I = o.useState(null), B = te(I, 2), z = B[0], q = B[1], _ = !r, F = o.useRef(), U = o.useRef(), Q = o.useState(g), G = te(Q, 2), j = G[0], ne = G[1], Z = o.useRef(), Y = function() {
1244
+ var nt = /* @__PURE__ */ o.forwardRef(function(e, n) {
1245
+ var t = e.prefixCls, r = e.rtl, a = e.scrollOffset, l = e.scrollRange, i = e.onStartMove, u = e.onStopMove, d = e.onScroll, f = e.horizontal, v = e.spinSize, s = e.containerSize, h = e.style, c = e.thumbStyle, g = e.showScrollBar, m = o.useState(!1), S = te(m, 2), C = S[0], b = S[1], x = o.useState(null), w = te(x, 2), B = w[0], p = w[1], E = o.useState(null), L = te(E, 2), H = L[0], q = L[1], _ = !r, A = o.useRef(), X = o.useRef(), Q = o.useState(g), G = te(Q, 2), j = G[0], ne = G[1], Z = o.useRef(), Y = function() {
1249
1246
  g === !0 || g === !1 || (clearTimeout(Z.current), ne(!0), Z.current = setTimeout(function() {
1250
1247
  ne(!1);
1251
1248
  }, 3e3));
1252
- }, x = i - s || 0, M = s - v || 0, fe = o.useMemo(function() {
1253
- if (a === 0 || x === 0)
1249
+ }, I = l - s || 0, D = s - v || 0, fe = o.useMemo(function() {
1250
+ if (a === 0 || I === 0)
1254
1251
  return 0;
1255
- var O = a / x;
1256
- return O * M;
1257
- }, [a, x, M]), ie = function(y) {
1252
+ var R = a / I;
1253
+ return R * D;
1254
+ }, [a, I, D]), ie = function(y) {
1258
1255
  y.stopPropagation(), y.preventDefault();
1259
1256
  }, J = o.useRef({
1260
1257
  top: fe,
1261
- dragging: w,
1262
- pageY: T,
1263
- startTop: z
1258
+ dragging: C,
1259
+ pageY: B,
1260
+ startTop: H
1264
1261
  });
1265
1262
  J.current = {
1266
1263
  top: fe,
1267
- dragging: w,
1268
- pageY: T,
1269
- startTop: z
1264
+ dragging: C,
1265
+ pageY: B,
1266
+ startTop: H
1270
1267
  };
1271
1268
  var se = function(y) {
1272
- h(!0), p(nt(y, f)), q(J.current.top), l(), y.stopPropagation(), y.preventDefault();
1269
+ b(!0), p(et(y, f)), q(J.current.top), i(), y.stopPropagation(), y.preventDefault();
1273
1270
  };
1274
1271
  o.useEffect(function() {
1275
- var O = function(R) {
1276
- R.preventDefault();
1277
- }, y = F.current, D = U.current;
1278
- return y.addEventListener("touchstart", O, {
1272
+ var R = function(O) {
1273
+ O.preventDefault();
1274
+ }, y = A.current, $ = X.current;
1275
+ return y.addEventListener("touchstart", R, {
1279
1276
  passive: !1
1280
- }), D.addEventListener("touchstart", se, {
1277
+ }), $.addEventListener("touchstart", se, {
1281
1278
  passive: !1
1282
1279
  }), function() {
1283
- y.removeEventListener("touchstart", O), D.removeEventListener("touchstart", se);
1280
+ y.removeEventListener("touchstart", R), $.removeEventListener("touchstart", se);
1284
1281
  };
1285
1282
  }, []);
1286
- var Ce = o.useRef();
1287
- Ce.current = x;
1283
+ var ye = o.useRef();
1284
+ ye.current = I;
1288
1285
  var ge = o.useRef();
1289
- ge.current = M, o.useEffect(function() {
1290
- if (w) {
1291
- var O, y = function(R) {
1292
- var A = J.current, le = A.dragging, me = A.pageY, re = A.startTop;
1293
- un.cancel(O);
1294
- var we = F.current.getBoundingClientRect(), Be = s / (f ? we.width : we.height);
1286
+ ge.current = D, o.useEffect(function() {
1287
+ if (C) {
1288
+ var R, y = function(O) {
1289
+ var F = J.current, le = F.dragging, me = F.pageY, re = F.startTop;
1290
+ un.cancel(R);
1291
+ var Ce = A.current.getBoundingClientRect(), Le = s / (f ? Ce.width : Ce.height);
1295
1292
  if (le) {
1296
- var xe = (nt(R, f) - me) * Be, Ne = re;
1293
+ var xe = (et(O, f) - me) * Le, Ne = re;
1297
1294
  !_ && f ? Ne -= xe : Ne += xe;
1298
- var de = Ce.current, Ge = ge.current, Ye = Ge ? Ne / Ge : 0, Se = Math.ceil(Ye * de);
1299
- Se = Math.max(Se, 0), Se = Math.min(Se, de), O = un(function() {
1295
+ var de = ye.current, Xe = ge.current, Ge = Xe ? Ne / Xe : 0, Se = Math.ceil(Ge * de);
1296
+ Se = Math.max(Se, 0), Se = Math.min(Se, de), R = un(function() {
1300
1297
  d(Se, f);
1301
1298
  });
1302
1299
  }
1303
- }, D = function() {
1304
- h(!1), u();
1300
+ }, $ = function() {
1301
+ b(!1), u();
1305
1302
  };
1306
1303
  return window.addEventListener("mousemove", y, {
1307
1304
  passive: !0
1308
1305
  }), window.addEventListener("touchmove", y, {
1309
1306
  passive: !0
1310
- }), window.addEventListener("mouseup", D, {
1307
+ }), window.addEventListener("mouseup", $, {
1311
1308
  passive: !0
1312
- }), window.addEventListener("touchend", D, {
1309
+ }), window.addEventListener("touchend", $, {
1313
1310
  passive: !0
1314
1311
  }), function() {
1315
- window.removeEventListener("mousemove", y), window.removeEventListener("touchmove", y), window.removeEventListener("mouseup", D), window.removeEventListener("touchend", D), un.cancel(O);
1312
+ window.removeEventListener("mousemove", y), window.removeEventListener("touchmove", y), window.removeEventListener("mouseup", $), window.removeEventListener("touchend", $), un.cancel(R);
1316
1313
  };
1317
1314
  }
1318
- }, [w]), o.useEffect(function() {
1315
+ }, [C]), o.useEffect(function() {
1319
1316
  return Y(), function() {
1320
1317
  clearTimeout(Z.current);
1321
1318
  };
@@ -1324,7 +1321,7 @@ var tt = /* @__PURE__ */ o.forwardRef(function(e, n) {
1324
1321
  delayHidden: Y
1325
1322
  };
1326
1323
  });
1327
- var Oe = "".concat(t, "-scrollbar"), ce = {
1324
+ var Re = "".concat(t, "-scrollbar"), ce = {
1328
1325
  position: "absolute",
1329
1326
  visibility: j ? null : "hidden"
1330
1327
  }, pe = {
@@ -1335,46 +1332,46 @@ var tt = /* @__PURE__ */ o.forwardRef(function(e, n) {
1335
1332
  userSelect: "none"
1336
1333
  };
1337
1334
  return f ? (ce.height = 8, ce.left = 0, ce.right = 0, ce.bottom = 0, pe.height = "100%", pe.width = v, _ ? pe.left = fe : pe.right = fe) : (ce.width = 8, ce.top = 0, ce.bottom = 0, _ ? ce.right = 0 : ce.left = 0, pe.width = "100%", pe.height = v, pe.top = fe), /* @__PURE__ */ o.createElement("div", {
1338
- ref: F,
1339
- className: Ve(Oe, ae(ae(ae({}, "".concat(Oe, "-horizontal"), f), "".concat(Oe, "-vertical"), !f), "".concat(Oe, "-visible"), j)),
1340
- style: ee(ee({}, ce), b),
1335
+ ref: A,
1336
+ className: Be(Re, ae(ae(ae({}, "".concat(Re, "-horizontal"), f), "".concat(Re, "-vertical"), !f), "".concat(Re, "-visible"), j)),
1337
+ style: ee(ee({}, ce), h),
1341
1338
  onMouseDown: ie,
1342
1339
  onMouseMove: Y
1343
1340
  }, /* @__PURE__ */ o.createElement("div", {
1344
- ref: U,
1345
- className: Ve("".concat(Oe, "-thumb"), ae({}, "".concat(Oe, "-thumb-moving"), w)),
1341
+ ref: X,
1342
+ className: Be("".concat(Re, "-thumb"), ae({}, "".concat(Re, "-thumb-moving"), C)),
1346
1343
  style: ee(ee({}, pe), c),
1347
1344
  onMouseDown: se
1348
1345
  }));
1349
1346
  });
1350
- process.env.NODE_ENV !== "production" && (tt.displayName = "ScrollBar");
1351
- var No = 20;
1352
- function Pt() {
1347
+ process.env.NODE_ENV !== "production" && (nt.displayName = "ScrollBar");
1348
+ var Oo = 20;
1349
+ function $t() {
1353
1350
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = e / n * e;
1354
- return isNaN(t) && (t = 0), t = Math.max(t, No), Math.floor(t);
1351
+ return isNaN(t) && (t = 0), t = Math.max(t, Oo), Math.floor(t);
1355
1352
  }
1356
- var Po = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"], _o = [], To = {
1353
+ var Ro = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"], Mo = [], Do = {
1357
1354
  overflowY: "auto",
1358
1355
  overflowAnchor: "none"
1359
1356
  };
1360
- function Lo(e, n) {
1361
- var t = e.prefixCls, r = t === void 0 ? "rc-virtual-list" : t, a = e.className, i = e.height, l = e.itemHeight, u = e.fullHeight, d = u === void 0 ? !0 : u, f = e.style, v = e.data, s = e.children, b = e.itemKey, c = e.virtual, g = e.direction, m = e.scrollWidth, S = e.component, w = S === void 0 ? "div" : S, h = e.onScroll, E = e.onVirtualScroll, C = e.onVisibleChange, T = e.innerProps, p = e.extraRender, I = e.styles, B = e.showScrollBar, z = B === void 0 ? "optional" : B, q = yn(e, Po), _ = o.useCallback(function(P) {
1362
- return typeof b == "function" ? b(P) : P == null ? void 0 : P[b];
1363
- }, [b]), F = Oo(_), U = te(F, 4), Q = U[0], G = U[1], j = U[2], ne = U[3], Z = !!(c !== !1 && i && l), Y = o.useMemo(function() {
1364
- return Object.values(j.maps).reduce(function(P, $) {
1365
- return P + $;
1357
+ function $o(e, n) {
1358
+ var t = e.prefixCls, r = t === void 0 ? "rc-virtual-list" : t, a = e.className, l = e.height, i = e.itemHeight, u = e.fullHeight, d = u === void 0 ? !0 : u, f = e.style, v = e.data, s = e.children, h = e.itemKey, c = e.virtual, g = e.direction, m = e.scrollWidth, S = e.component, C = S === void 0 ? "div" : S, b = e.onScroll, x = e.onVirtualScroll, w = e.onVisibleChange, B = e.innerProps, p = e.extraRender, E = e.styles, L = e.showScrollBar, H = L === void 0 ? "optional" : L, q = wn(e, Ro), _ = o.useCallback(function(P) {
1359
+ return typeof h == "function" ? h(P) : P == null ? void 0 : P[h];
1360
+ }, [h]), A = wo(_), X = te(A, 4), Q = X[0], G = X[1], j = X[2], ne = X[3], Z = !!(c !== !1 && l && i), Y = o.useMemo(function() {
1361
+ return Object.values(j.maps).reduce(function(P, M) {
1362
+ return P + M;
1366
1363
  }, 0);
1367
- }, [j.id, j.maps]), x = Z && v && (Math.max(l * v.length, Y) > i || !!m), M = g === "rtl", fe = Ve(r, ae({}, "".concat(r, "-rtl"), M), a), ie = v || _o, J = he(), se = he(), Ce = he(), ge = Ln(0), Oe = te(ge, 2), ce = Oe[0], pe = Oe[1], O = Ln(0), y = te(O, 2), D = y[0], K = y[1], R = Ln(!1), A = te(R, 2), le = A[0], me = A[1], re = function() {
1364
+ }, [j.id, j.maps]), I = Z && v && (Math.max(i * v.length, Y) > l || !!m), D = g === "rtl", fe = Be(r, ae({}, "".concat(r, "-rtl"), D), a), ie = v || Mo, J = he(), se = he(), ye = he(), ge = Tn(0), Re = te(ge, 2), ce = Re[0], pe = Re[1], R = Tn(0), y = te(R, 2), $ = y[0], K = y[1], O = Tn(!1), F = te(O, 2), le = F[0], me = F[1], re = function() {
1368
1365
  me(!0);
1369
- }, we = function() {
1366
+ }, Ce = function() {
1370
1367
  me(!1);
1371
- }, Be = {
1368
+ }, Le = {
1372
1369
  getKey: _
1373
1370
  };
1374
1371
  function xe(P) {
1375
- pe(function($) {
1372
+ pe(function(M) {
1376
1373
  var k;
1377
- typeof P == "function" ? k = P($) : k = P;
1374
+ typeof P == "function" ? k = P(M) : k = P;
1378
1375
  var ve = In(k);
1379
1376
  return J.current.scrollTop = ve, ve;
1380
1377
  });
@@ -1382,9 +1379,9 @@ function Lo(e, n) {
1382
1379
  var Ne = he({
1383
1380
  start: 0,
1384
1381
  end: ie.length
1385
- }), de = he(), Ge = Eo(ie, _), Ye = te(Ge, 1), Se = Ye[0];
1382
+ }), de = he(), Xe = bo(ie, _), Ge = te(Xe, 1), Se = Ge[0];
1386
1383
  de.current = Se;
1387
- var $e = o.useMemo(function() {
1384
+ var Me = o.useMemo(function() {
1388
1385
  if (!Z)
1389
1386
  return {
1390
1387
  scrollHeight: void 0,
@@ -1392,7 +1389,7 @@ function Lo(e, n) {
1392
1389
  end: ie.length - 1,
1393
1390
  offset: void 0
1394
1391
  };
1395
- if (!x) {
1392
+ if (!I) {
1396
1393
  var P;
1397
1394
  return {
1398
1395
  scrollHeight: ((P = se.current) === null || P === void 0 ? void 0 : P.offsetHeight) || 0,
@@ -1401,307 +1398,307 @@ function Lo(e, n) {
1401
1398
  offset: void 0
1402
1399
  };
1403
1400
  }
1404
- for (var $ = 0, k, ve, Te, xn = ie.length, Sn = 0; Sn < xn; Sn += 1) {
1405
- var Wn = ie[Sn], Kn = _(Wn), _n = j.get(Kn), Tn = $ + (_n === void 0 ? l : _n);
1406
- Tn >= ce && k === void 0 && (k = Sn, ve = $), Tn > ce + i && Te === void 0 && (Te = Sn), $ = Tn;
1401
+ for (var M = 0, k, ve, Te, xn = ie.length, Sn = 0; Sn < xn; Sn += 1) {
1402
+ var Wn = ie[Sn], Kn = _(Wn), Pn = j.get(Kn), _n = M + (Pn === void 0 ? i : Pn);
1403
+ _n >= ce && k === void 0 && (k = Sn, ve = M), _n > ce + l && Te === void 0 && (Te = Sn), M = _n;
1407
1404
  }
1408
- return k === void 0 && (k = 0, ve = 0, Te = Math.ceil(i / l)), Te === void 0 && (Te = ie.length - 1), Te = Math.min(Te + 1, ie.length - 1), {
1409
- scrollHeight: $,
1405
+ return k === void 0 && (k = 0, ve = 0, Te = Math.ceil(l / i)), Te === void 0 && (Te = ie.length - 1), Te = Math.min(Te + 1, ie.length - 1), {
1406
+ scrollHeight: M,
1410
1407
  start: k,
1411
1408
  end: Te,
1412
1409
  offset: ve
1413
1410
  };
1414
- }, [x, Z, ce, ie, ne, i]), ye = $e.scrollHeight, Re = $e.start, Pe = $e.end, en = $e.offset;
1415
- Ne.current.start = Re, Ne.current.end = Pe, o.useLayoutEffect(function() {
1411
+ }, [I, Z, ce, ie, ne, l]), we = Me.scrollHeight, Oe = Me.start, Pe = Me.end, en = Me.offset;
1412
+ Ne.current.start = Oe, Ne.current.end = Pe, o.useLayoutEffect(function() {
1416
1413
  var P = j.getRecord();
1417
1414
  if (P.size === 1) {
1418
- var $ = Array.from(P)[0], k = _(ie[Re]);
1419
- if (k === $) {
1420
- var ve = j.get($), Te = ve - l;
1415
+ var M = Array.from(P)[0], k = _(ie[Oe]);
1416
+ if (k === M) {
1417
+ var ve = j.get(M), Te = ve - i;
1421
1418
  xe(function(xn) {
1422
1419
  return xn + Te;
1423
1420
  });
1424
1421
  }
1425
1422
  }
1426
1423
  j.resetRecord();
1427
- }, [ye]);
1428
- var je = o.useState({
1424
+ }, [we]);
1425
+ var Ae = o.useState({
1429
1426
  width: 0,
1430
- height: i
1431
- }), Ae = te(je, 2), Ee = Ae[0], hn = Ae[1], Fe = function($) {
1427
+ height: l
1428
+ }), He = te(Ae, 2), Ee = He[0], hn = He[1], Fe = function(M) {
1432
1429
  hn({
1433
- width: $.offsetWidth,
1434
- height: $.offsetHeight
1430
+ width: M.offsetWidth,
1431
+ height: M.offsetHeight
1435
1432
  });
1436
- }, _e = he(), De = he(), Nn = o.useMemo(function() {
1437
- return Pt(Ee.width, m);
1433
+ }, _e = he(), $e = he(), $n = o.useMemo(function() {
1434
+ return $t(Ee.width, m);
1438
1435
  }, [Ee.width, m]), En = o.useMemo(function() {
1439
- return Pt(Ee.height, ye);
1440
- }, [Ee.height, ye]), dn = ye - i, bn = he(dn);
1436
+ return $t(Ee.height, we);
1437
+ }, [Ee.height, we]), dn = we - l, bn = he(dn);
1441
1438
  bn.current = dn;
1442
1439
  function In(P) {
1443
- var $ = P;
1444
- return Number.isNaN(bn.current) || ($ = Math.min($, bn.current)), $ = Math.max($, 0), $;
1440
+ var M = P;
1441
+ return Number.isNaN(bn.current) || (M = Math.min(M, bn.current)), M = Math.max(M, 0), M;
1445
1442
  }
1446
- var cn = ce <= 0, Qe = ce >= dn, fn = D <= 0, mn = D >= m, Me = Zt(cn, Qe, fn, mn), vn = function() {
1443
+ var cn = ce <= 0, qe = ce >= dn, fn = $ <= 0, mn = $ >= m, De = qt(cn, qe, fn, mn), vn = function() {
1447
1444
  return {
1448
- x: M ? -D : D,
1445
+ x: D ? -$ : $,
1449
1446
  y: ce
1450
1447
  };
1451
- }, an = he(vn()), N = wt(function(P) {
1452
- if (E) {
1453
- var $ = ee(ee({}, vn()), P);
1454
- (an.current.x !== $.x || an.current.y !== $.y) && (E($), an.current = $);
1448
+ }, an = he(vn()), N = bt(function(P) {
1449
+ if (x) {
1450
+ var M = ee(ee({}, vn()), P);
1451
+ (an.current.x !== M.x || an.current.y !== M.y) && (x(M), an.current = M);
1455
1452
  }
1456
1453
  });
1457
- function V(P, $) {
1454
+ function z(P, M) {
1458
1455
  var k = P;
1459
- $ ? (Ct.flushSync(function() {
1456
+ M ? (St.flushSync(function() {
1460
1457
  K(k);
1461
1458
  }), N()) : xe(k);
1462
1459
  }
1463
- function L(P) {
1464
- var $ = P.currentTarget.scrollTop;
1465
- $ !== ce && xe($), h == null || h(P), N();
1460
+ function T(P) {
1461
+ var M = P.currentTarget.scrollTop;
1462
+ M !== ce && xe(M), b == null || b(P), N();
1466
1463
  }
1467
- var H = function($) {
1468
- var k = $, ve = m ? m - Ee.width : 0;
1464
+ var V = function(M) {
1465
+ var k = M, ve = m ? m - Ee.width : 0;
1469
1466
  return k = Math.max(k, 0), k = Math.min(k, ve), k;
1470
- }, oe = wt(function(P, $) {
1471
- $ ? (Ct.flushSync(function() {
1467
+ }, oe = bt(function(P, M) {
1468
+ M ? (St.flushSync(function() {
1472
1469
  K(function(k) {
1473
- var ve = k + (M ? -P : P);
1474
- return H(ve);
1470
+ var ve = k + (D ? -P : P);
1471
+ return V(ve);
1475
1472
  });
1476
1473
  }), N()) : xe(function(k) {
1477
1474
  var ve = k + P;
1478
1475
  return ve;
1479
1476
  });
1480
- }), be = Io(Z, cn, Qe, fn, mn, !!m, oe), Ze = te(be, 2), We = Ze[0], nn = Ze[1];
1481
- $o(Z, J, function(P, $, k, ve) {
1477
+ }), be = So(Z, cn, qe, fn, mn, !!m, oe), Qe = te(be, 2), je = Qe[0], nn = Qe[1];
1478
+ Eo(Z, J, function(P, M, k, ve) {
1482
1479
  var Te = ve;
1483
- return Me(P, $, k) ? !1 : !Te || !Te._virtualHandled ? (Te && (Te._virtualHandled = !0), We({
1480
+ return De(P, M, k) ? !1 : !Te || !Te._virtualHandled ? (Te && (Te._virtualHandled = !0), je({
1484
1481
  preventDefault: function() {
1485
1482
  },
1486
- deltaX: P ? $ : 0,
1487
- deltaY: P ? 0 : $
1483
+ deltaX: P ? M : 0,
1484
+ deltaY: P ? 0 : M
1488
1485
  }), !0) : !1;
1489
- }), Mo(x, J, function(P) {
1490
- xe(function($) {
1491
- return $ + P;
1486
+ }), Io(I, J, function(P) {
1487
+ xe(function(M) {
1488
+ return M + P;
1492
1489
  });
1493
- }), $n(function() {
1490
+ }), Mn(function() {
1494
1491
  function P(k) {
1495
- var ve = cn && k.detail < 0, Te = Qe && k.detail > 0;
1492
+ var ve = cn && k.detail < 0, Te = qe && k.detail > 0;
1496
1493
  Z && !ve && !Te && k.preventDefault();
1497
1494
  }
1498
- var $ = J.current;
1499
- return $.addEventListener("wheel", We, {
1495
+ var M = J.current;
1496
+ return M.addEventListener("wheel", je, {
1500
1497
  passive: !1
1501
- }), $.addEventListener("DOMMouseScroll", nn, {
1498
+ }), M.addEventListener("DOMMouseScroll", nn, {
1502
1499
  passive: !0
1503
- }), $.addEventListener("MozMousePixelScroll", P, {
1500
+ }), M.addEventListener("MozMousePixelScroll", P, {
1504
1501
  passive: !1
1505
1502
  }), function() {
1506
- $.removeEventListener("wheel", We), $.removeEventListener("DOMMouseScroll", nn), $.removeEventListener("MozMousePixelScroll", P);
1503
+ M.removeEventListener("wheel", je), M.removeEventListener("DOMMouseScroll", nn), M.removeEventListener("MozMousePixelScroll", P);
1507
1504
  };
1508
- }, [Z, cn, Qe]), $n(function() {
1505
+ }, [Z, cn, qe]), Mn(function() {
1509
1506
  if (m) {
1510
- var P = H(D);
1507
+ var P = V($);
1511
1508
  K(P), N({
1512
1509
  x: P
1513
1510
  });
1514
1511
  }
1515
1512
  }, [Ee.width, m]);
1516
1513
  var Ie = function() {
1517
- var $, k;
1518
- ($ = _e.current) === null || $ === void 0 || $.delayHidden(), (k = De.current) === null || k === void 0 || k.delayHidden();
1519
- }, tn = Do(J, ie, j, l, _, function() {
1514
+ var M, k;
1515
+ (M = _e.current) === null || M === void 0 || M.delayHidden(), (k = $e.current) === null || k === void 0 || k.delayHidden();
1516
+ }, tn = xo(J, ie, j, i, _, function() {
1520
1517
  return G(!0);
1521
1518
  }, xe, Ie);
1522
1519
  o.useImperativeHandle(n, function() {
1523
1520
  return {
1524
- nativeElement: Ce.current,
1521
+ nativeElement: ye.current,
1525
1522
  getScrollInfo: vn,
1526
- scrollTo: function($) {
1523
+ scrollTo: function(M) {
1527
1524
  function k(ve) {
1528
1525
  return ve && pn(ve) === "object" && ("left" in ve || "top" in ve);
1529
1526
  }
1530
- k($) ? ($.left !== void 0 && K(H($.left)), tn($.top)) : tn($);
1527
+ k(M) ? (M.left !== void 0 && K(V(M.left)), tn(M.top)) : tn(M);
1531
1528
  }
1532
1529
  };
1533
- }), $n(function() {
1534
- if (C) {
1535
- var P = ie.slice(Re, Pe + 1);
1536
- C(P, ie);
1530
+ }), Mn(function() {
1531
+ if (w) {
1532
+ var P = ie.slice(Oe, Pe + 1);
1533
+ w(P, ie);
1537
1534
  }
1538
- }, [Re, Pe, ie]);
1539
- var Je = xo(ie, _, j, l), Pn = p == null ? void 0 : p({
1540
- start: Re,
1535
+ }, [Oe, Pe, ie]);
1536
+ var Ze = Co(ie, _, j, i), Nn = p == null ? void 0 : p({
1537
+ start: Oe,
1541
1538
  end: Pe,
1542
- virtual: x,
1543
- offsetX: D,
1539
+ virtual: I,
1540
+ offsetX: $,
1544
1541
  offsetY: en,
1545
- rtl: M,
1546
- getSize: Je
1547
- }), Hn = Co(ie, Re, Pe, m, D, Q, s, Be), rn = null;
1548
- i && (rn = ee(ae({}, d ? "height" : "maxHeight", i), To), Z && (rn.overflowY = "hidden", m && (rn.overflowX = "hidden"), le && (rn.pointerEvents = "none")));
1549
- var ke = {};
1550
- return M && (ke.dir = "rtl"), /* @__PURE__ */ o.createElement("div", on({
1551
- ref: Ce,
1542
+ rtl: D,
1543
+ getSize: Ze
1544
+ }), Vn = po(ie, Oe, Pe, m, $, Q, s, Le), rn = null;
1545
+ l && (rn = ee(ae({}, d ? "height" : "maxHeight", l), Do), Z && (rn.overflowY = "hidden", m && (rn.overflowX = "hidden"), le && (rn.pointerEvents = "none")));
1546
+ var Je = {};
1547
+ return D && (Je.dir = "rtl"), /* @__PURE__ */ o.createElement("div", on({
1548
+ ref: ye,
1552
1549
  style: ee(ee({}, f), {}, {
1553
1550
  position: "relative"
1554
1551
  }),
1555
1552
  className: fe
1556
- }, ke, q), /* @__PURE__ */ o.createElement(jt, {
1553
+ }, Je, q), /* @__PURE__ */ o.createElement(Ft, {
1557
1554
  onResize: Fe
1558
- }, /* @__PURE__ */ o.createElement(w, {
1555
+ }, /* @__PURE__ */ o.createElement(C, {
1559
1556
  className: "".concat(r, "-holder"),
1560
1557
  style: rn,
1561
1558
  ref: J,
1562
- onScroll: L,
1559
+ onScroll: T,
1563
1560
  onMouseEnter: Ie
1564
- }, /* @__PURE__ */ o.createElement(Qt, {
1561
+ }, /* @__PURE__ */ o.createElement(Yt, {
1565
1562
  prefixCls: r,
1566
- height: ye,
1567
- offsetX: D,
1563
+ height: we,
1564
+ offsetX: $,
1568
1565
  offsetY: en,
1569
1566
  scrollWidth: m,
1570
1567
  onInnerResize: G,
1571
1568
  ref: se,
1572
- innerProps: T,
1573
- rtl: M,
1574
- extra: Pn
1575
- }, Hn))), x && ye > i && /* @__PURE__ */ o.createElement(tt, {
1569
+ innerProps: B,
1570
+ rtl: D,
1571
+ extra: Nn
1572
+ }, Vn))), I && we > l && /* @__PURE__ */ o.createElement(nt, {
1576
1573
  ref: _e,
1577
1574
  prefixCls: r,
1578
1575
  scrollOffset: ce,
1579
- scrollRange: ye,
1580
- rtl: M,
1581
- onScroll: V,
1576
+ scrollRange: we,
1577
+ rtl: D,
1578
+ onScroll: z,
1582
1579
  onStartMove: re,
1583
- onStopMove: we,
1580
+ onStopMove: Ce,
1584
1581
  spinSize: En,
1585
1582
  containerSize: Ee.height,
1586
- style: I == null ? void 0 : I.verticalScrollBar,
1587
- thumbStyle: I == null ? void 0 : I.verticalScrollBarThumb,
1588
- showScrollBar: z
1589
- }), x && m > Ee.width && /* @__PURE__ */ o.createElement(tt, {
1590
- ref: De,
1583
+ style: E == null ? void 0 : E.verticalScrollBar,
1584
+ thumbStyle: E == null ? void 0 : E.verticalScrollBarThumb,
1585
+ showScrollBar: H
1586
+ }), I && m > Ee.width && /* @__PURE__ */ o.createElement(nt, {
1587
+ ref: $e,
1591
1588
  prefixCls: r,
1592
- scrollOffset: D,
1589
+ scrollOffset: $,
1593
1590
  scrollRange: m,
1594
- rtl: M,
1595
- onScroll: V,
1591
+ rtl: D,
1592
+ onScroll: z,
1596
1593
  onStartMove: re,
1597
- onStopMove: we,
1598
- spinSize: Nn,
1594
+ onStopMove: Ce,
1595
+ spinSize: $n,
1599
1596
  containerSize: Ee.width,
1600
1597
  horizontal: !0,
1601
- style: I == null ? void 0 : I.horizontalScrollBar,
1602
- thumbStyle: I == null ? void 0 : I.horizontalScrollBarThumb,
1603
- showScrollBar: z
1598
+ style: E == null ? void 0 : E.horizontalScrollBar,
1599
+ thumbStyle: E == null ? void 0 : E.horizontalScrollBarThumb,
1600
+ showScrollBar: H
1604
1601
  }));
1605
1602
  }
1606
- var Jt = /* @__PURE__ */ o.forwardRef(Lo);
1607
- Jt.displayName = "List";
1608
- function Ho() {
1603
+ var Qt = /* @__PURE__ */ o.forwardRef($o);
1604
+ Qt.displayName = "List";
1605
+ function No() {
1609
1606
  return /(mac\sos|macintosh)/i.test(navigator.appVersion);
1610
1607
  }
1611
- var Bo = ["disabled", "title", "children", "style", "className"];
1612
- function _t(e) {
1608
+ var Po = ["disabled", "title", "children", "style", "className"];
1609
+ function Nt(e) {
1613
1610
  return typeof e == "string" || typeof e == "number";
1614
1611
  }
1615
- var Vo = function(n, t) {
1616
- var r = Zr(), a = r.prefixCls, i = r.id, l = r.open, u = r.multiple, d = r.mode, f = r.searchValue, v = r.toggleOpen, s = r.notFoundContent, b = r.onPopupScroll, c = o.useContext(st), g = c.maxCount, m = c.flattenOptions, S = c.onActiveValue, w = c.defaultActiveFirstOption, h = c.onSelect, E = c.menuItemSelectedIcon, C = c.rawValues, T = c.fieldNames, p = c.virtual, I = c.direction, B = c.listHeight, z = c.listItemHeight, q = c.optionRender, _ = "".concat(a, "-item"), F = Ir(function() {
1612
+ var _o = function(n, t) {
1613
+ var r = Xr(), a = r.prefixCls, l = r.id, i = r.open, u = r.multiple, d = r.mode, f = r.searchValue, v = r.toggleOpen, s = r.notFoundContent, h = r.onPopupScroll, c = o.useContext(ut), g = c.maxCount, m = c.flattenOptions, S = c.onActiveValue, C = c.defaultActiveFirstOption, b = c.onSelect, x = c.menuItemSelectedIcon, w = c.rawValues, B = c.fieldNames, p = c.virtual, E = c.direction, L = c.listHeight, H = c.listItemHeight, q = c.optionRender, _ = "".concat(a, "-item"), A = wr(function() {
1617
1614
  return m;
1618
- }, [l, m], function(O, y) {
1619
- return y[0] && O[1] !== y[1];
1620
- }), U = o.useRef(null), Q = o.useMemo(function() {
1621
- return u && kn(g) && (C == null ? void 0 : C.size) >= g;
1622
- }, [u, g, C == null ? void 0 : C.size]), G = function(y) {
1615
+ }, [i, m], function(R, y) {
1616
+ return y[0] && R[1] !== y[1];
1617
+ }), X = o.useRef(null), Q = o.useMemo(function() {
1618
+ return u && Jn(g) && (w == null ? void 0 : w.size) >= g;
1619
+ }, [u, g, w == null ? void 0 : w.size]), G = function(y) {
1623
1620
  y.preventDefault();
1624
1621
  }, j = function(y) {
1625
- var D;
1626
- (D = U.current) === null || D === void 0 || D.scrollTo(typeof y == "number" ? {
1622
+ var $;
1623
+ ($ = X.current) === null || $ === void 0 || $.scrollTo(typeof y == "number" ? {
1627
1624
  index: y
1628
1625
  } : y);
1629
- }, ne = o.useCallback(function(O) {
1630
- return d === "combobox" ? !1 : C.has(O);
1631
- }, [d, qe(C).toString(), C.size]), Z = function(y) {
1632
- for (var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, K = F.length, R = 0; R < K; R += 1) {
1633
- var A = (y + R * D + K) % K, le = F[A] || {}, me = le.group, re = le.data;
1626
+ }, ne = o.useCallback(function(R) {
1627
+ return d === "combobox" ? !1 : w.has(R);
1628
+ }, [d, Ye(w).toString(), w.size]), Z = function(y) {
1629
+ for (var $ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, K = A.length, O = 0; O < K; O += 1) {
1630
+ var F = (y + O * $ + K) % K, le = A[F] || {}, me = le.group, re = le.data;
1634
1631
  if (!me && !(re != null && re.disabled) && (ne(re.value) || !Q))
1635
- return A;
1632
+ return F;
1636
1633
  }
1637
1634
  return -1;
1638
1635
  }, Y = o.useState(function() {
1639
1636
  return Z(0);
1640
- }), x = te(Y, 2), M = x[0], fe = x[1], ie = function(y) {
1641
- var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1637
+ }), I = te(Y, 2), D = I[0], fe = I[1], ie = function(y) {
1638
+ var $ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1642
1639
  fe(y);
1643
1640
  var K = {
1644
- source: D ? "keyboard" : "mouse"
1645
- }, R = F[y];
1646
- if (!R) {
1641
+ source: $ ? "keyboard" : "mouse"
1642
+ }, O = A[y];
1643
+ if (!O) {
1647
1644
  S(null, -1, K);
1648
1645
  return;
1649
1646
  }
1650
- S(R.value, y, K);
1647
+ S(O.value, y, K);
1651
1648
  };
1652
- qn(function() {
1653
- ie(w !== !1 ? Z(0) : -1);
1654
- }, [F.length, f]);
1655
- var J = o.useCallback(function(O) {
1656
- return d === "combobox" ? String(O).toLowerCase() === f.toLowerCase() : C.has(O);
1657
- }, [d, f, qe(C).toString(), C.size]);
1658
- qn(function() {
1659
- var O = setTimeout(function() {
1660
- if (!u && l && C.size === 1) {
1661
- var D = Array.from(C)[0], K = F.findIndex(function(R) {
1662
- var A = R.data;
1663
- return A.value === D;
1649
+ Yn(function() {
1650
+ ie(C !== !1 ? Z(0) : -1);
1651
+ }, [A.length, f]);
1652
+ var J = o.useCallback(function(R) {
1653
+ return d === "combobox" ? String(R).toLowerCase() === f.toLowerCase() : w.has(R);
1654
+ }, [d, f, Ye(w).toString(), w.size]);
1655
+ Yn(function() {
1656
+ var R = setTimeout(function() {
1657
+ if (!u && i && w.size === 1) {
1658
+ var $ = Array.from(w)[0], K = A.findIndex(function(O) {
1659
+ var F = O.data;
1660
+ return F.value === $;
1664
1661
  });
1665
1662
  K !== -1 && (ie(K), j(K));
1666
1663
  }
1667
1664
  });
1668
- if (l) {
1665
+ if (i) {
1669
1666
  var y;
1670
- (y = U.current) === null || y === void 0 || y.scrollTo(void 0);
1667
+ (y = X.current) === null || y === void 0 || y.scrollTo(void 0);
1671
1668
  }
1672
1669
  return function() {
1673
- return clearTimeout(O);
1670
+ return clearTimeout(R);
1674
1671
  };
1675
- }, [l, f]);
1672
+ }, [i, f]);
1676
1673
  var se = function(y) {
1677
- y !== void 0 && h(y, {
1678
- selected: !C.has(y)
1674
+ y !== void 0 && b(y, {
1675
+ selected: !w.has(y)
1679
1676
  }), u || v(!1);
1680
1677
  };
1681
1678
  if (o.useImperativeHandle(t, function() {
1682
1679
  return {
1683
1680
  onKeyDown: function(y) {
1684
- var D = y.which, K = y.ctrlKey;
1685
- switch (D) {
1681
+ var $ = y.which, K = y.ctrlKey;
1682
+ switch ($) {
1686
1683
  case W.N:
1687
1684
  case W.P:
1688
1685
  case W.UP:
1689
1686
  case W.DOWN: {
1690
- var R = 0;
1691
- if (D === W.UP ? R = -1 : D === W.DOWN ? R = 1 : Ho() && K && (D === W.N ? R = 1 : D === W.P && (R = -1)), R !== 0) {
1692
- var A = Z(M + R, R);
1693
- j(A), ie(A, !0);
1687
+ var O = 0;
1688
+ if ($ === W.UP ? O = -1 : $ === W.DOWN ? O = 1 : No() && K && ($ === W.N ? O = 1 : $ === W.P && (O = -1)), O !== 0) {
1689
+ var F = Z(D + O, O);
1690
+ j(F), ie(F, !0);
1694
1691
  }
1695
1692
  break;
1696
1693
  }
1697
1694
  case W.TAB:
1698
1695
  case W.ENTER: {
1699
- var le, me = F[M];
1700
- me && !(me != null && (le = me.data) !== null && le !== void 0 && le.disabled) && !Q ? se(me.value) : se(void 0), l && y.preventDefault();
1696
+ var le, me = A[D];
1697
+ me && !(me != null && (le = me.data) !== null && le !== void 0 && le.disabled) && !Q ? se(me.value) : se(void 0), i && y.preventDefault();
1701
1698
  break;
1702
1699
  }
1703
1700
  case W.ESC:
1704
- v(!1), l && y.stopPropagation();
1701
+ v(!1), i && y.stopPropagation();
1705
1702
  }
1706
1703
  },
1707
1704
  onKeyUp: function() {
@@ -1710,40 +1707,40 @@ var Vo = function(n, t) {
1710
1707
  j(y);
1711
1708
  }
1712
1709
  };
1713
- }), F.length === 0)
1710
+ }), A.length === 0)
1714
1711
  return /* @__PURE__ */ o.createElement("div", {
1715
1712
  role: "listbox",
1716
- id: "".concat(i, "_list"),
1713
+ id: "".concat(l, "_list"),
1717
1714
  className: "".concat(_, "-empty"),
1718
1715
  onMouseDown: G
1719
1716
  }, s);
1720
- var Ce = Object.keys(T).map(function(O) {
1721
- return T[O];
1717
+ var ye = Object.keys(B).map(function(R) {
1718
+ return B[R];
1722
1719
  }), ge = function(y) {
1723
1720
  return y.label;
1724
1721
  };
1725
- function Oe(O, y) {
1726
- var D = O.group;
1722
+ function Re(R, y) {
1723
+ var $ = R.group;
1727
1724
  return {
1728
- role: D ? "presentation" : "option",
1729
- id: "".concat(i, "_list_").concat(y)
1725
+ role: $ ? "presentation" : "option",
1726
+ id: "".concat(l, "_list_").concat(y)
1730
1727
  };
1731
1728
  }
1732
1729
  var ce = function(y) {
1733
- var D = F[y];
1734
- if (!D)
1730
+ var $ = A[y];
1731
+ if (!$)
1735
1732
  return null;
1736
- var K = D.data || {}, R = K.value, A = D.group, le = An(K, !0), me = ge(D);
1737
- return D ? /* @__PURE__ */ o.createElement("div", on({
1738
- "aria-label": typeof me == "string" && !A ? me : null
1733
+ var K = $.data || {}, O = K.value, F = $.group, le = Fn(K, !0), me = ge($);
1734
+ return $ ? /* @__PURE__ */ o.createElement("div", on({
1735
+ "aria-label": typeof me == "string" && !F ? me : null
1739
1736
  }, le, {
1740
1737
  key: y
1741
- }, Oe(D, y), {
1742
- "aria-selected": J(R)
1743
- }), R) : null;
1738
+ }, Re($, y), {
1739
+ "aria-selected": J(O)
1740
+ }), O) : null;
1744
1741
  }, pe = {
1745
1742
  role: "listbox",
1746
- id: "".concat(i, "_list")
1743
+ id: "".concat(l, "_list")
1747
1744
  };
1748
1745
  return /* @__PURE__ */ o.createElement(o.Fragment, null, p && /* @__PURE__ */ o.createElement("div", on({}, pe, {
1749
1746
  style: {
@@ -1751,67 +1748,67 @@ var Vo = function(n, t) {
1751
1748
  width: 0,
1752
1749
  overflow: "hidden"
1753
1750
  }
1754
- }), ce(M - 1), ce(M), ce(M + 1)), /* @__PURE__ */ o.createElement(Jt, {
1751
+ }), ce(D - 1), ce(D), ce(D + 1)), /* @__PURE__ */ o.createElement(Qt, {
1755
1752
  itemKey: "key",
1756
- ref: U,
1757
- data: F,
1758
- height: B,
1759
- itemHeight: z,
1753
+ ref: X,
1754
+ data: A,
1755
+ height: L,
1756
+ itemHeight: H,
1760
1757
  fullHeight: !1,
1761
1758
  onMouseDown: G,
1762
- onScroll: b,
1759
+ onScroll: h,
1763
1760
  virtual: p,
1764
- direction: I,
1761
+ direction: E,
1765
1762
  innerProps: p ? null : pe
1766
- }, function(O, y) {
1767
- var D = O.group, K = O.groupOption, R = O.data, A = O.label, le = O.value, me = R.key;
1768
- if (D) {
1769
- var re, we = (re = R.title) !== null && re !== void 0 ? re : _t(A) ? A.toString() : void 0;
1763
+ }, function(R, y) {
1764
+ var $ = R.group, K = R.groupOption, O = R.data, F = R.label, le = R.value, me = O.key;
1765
+ if ($) {
1766
+ var re, Ce = (re = O.title) !== null && re !== void 0 ? re : Nt(F) ? F.toString() : void 0;
1770
1767
  return /* @__PURE__ */ o.createElement("div", {
1771
- className: Ve(_, "".concat(_, "-group"), R.className),
1772
- title: we
1773
- }, A !== void 0 ? A : me);
1768
+ className: Be(_, "".concat(_, "-group"), O.className),
1769
+ title: Ce
1770
+ }, F !== void 0 ? F : me);
1774
1771
  }
1775
- var Be = R.disabled, xe = R.title;
1776
- R.children;
1777
- var Ne = R.style, de = R.className, Ge = yn(R, Bo), Ye = Ft(Ge, Ce), Se = ne(le), $e = Be || !Se && Q, ye = "".concat(_, "-option"), Re = Ve(_, ye, de, ae(ae(ae(ae({}, "".concat(ye, "-grouped"), K), "".concat(ye, "-active"), M === y && !$e), "".concat(ye, "-disabled"), $e), "".concat(ye, "-selected"), Se)), Pe = ge(O), en = !E || typeof E == "function" || Se, je = typeof Pe == "number" ? Pe : Pe || le, Ae = _t(je) ? je.toString() : void 0;
1778
- return xe !== void 0 && (Ae = xe), /* @__PURE__ */ o.createElement("div", on({}, An(Ye), p ? {} : Oe(O, y), {
1772
+ var Le = O.disabled, xe = O.title;
1773
+ O.children;
1774
+ var Ne = O.style, de = O.className, Xe = wn(O, Po), Ge = Ht(Xe, ye), Se = ne(le), Me = Le || !Se && Q, we = "".concat(_, "-option"), Oe = Be(_, we, de, ae(ae(ae(ae({}, "".concat(we, "-grouped"), K), "".concat(we, "-active"), D === y && !Me), "".concat(we, "-disabled"), Me), "".concat(we, "-selected"), Se)), Pe = ge(R), en = !x || typeof x == "function" || Se, Ae = typeof Pe == "number" ? Pe : Pe || le, He = Nt(Ae) ? Ae.toString() : void 0;
1775
+ return xe !== void 0 && (He = xe), /* @__PURE__ */ o.createElement("div", on({}, Fn(Ge), p ? {} : Re(R, y), {
1779
1776
  "aria-selected": J(le),
1780
- className: Re,
1781
- title: Ae,
1777
+ className: Oe,
1778
+ title: He,
1782
1779
  onMouseMove: function() {
1783
- M === y || $e || ie(y);
1780
+ D === y || Me || ie(y);
1784
1781
  },
1785
1782
  onClick: function() {
1786
- $e || se(le);
1783
+ Me || se(le);
1787
1784
  },
1788
1785
  style: Ne
1789
1786
  }), /* @__PURE__ */ o.createElement("div", {
1790
- className: "".concat(ye, "-content")
1791
- }, typeof q == "function" ? q(O, {
1787
+ className: "".concat(we, "-content")
1788
+ }, typeof q == "function" ? q(R, {
1792
1789
  index: y
1793
- }) : je), /* @__PURE__ */ o.isValidElement(E) || Se, en && /* @__PURE__ */ o.createElement(jn, {
1790
+ }) : Ae), /* @__PURE__ */ o.isValidElement(x) || Se, en && /* @__PURE__ */ o.createElement(jn, {
1794
1791
  className: "".concat(_, "-option-state"),
1795
- customizeIcon: E,
1792
+ customizeIcon: x,
1796
1793
  customizeIconProps: {
1797
1794
  value: le,
1798
- disabled: $e,
1795
+ disabled: Me,
1799
1796
  isSelected: Se
1800
1797
  }
1801
1798
  }, Se ? "✓" : null));
1802
1799
  }));
1803
- }, kt = /* @__PURE__ */ o.forwardRef(Vo);
1804
- process.env.NODE_ENV !== "production" && (kt.displayName = "OptionList");
1805
- const zo = function(e, n) {
1800
+ }, Zt = /* @__PURE__ */ o.forwardRef(_o);
1801
+ process.env.NODE_ENV !== "production" && (Zt.displayName = "OptionList");
1802
+ const To = function(e, n) {
1806
1803
  var t = o.useRef({
1807
1804
  values: /* @__PURE__ */ new Map(),
1808
1805
  options: /* @__PURE__ */ new Map()
1809
1806
  }), r = o.useMemo(function() {
1810
- var i = t.current, l = i.values, u = i.options, d = e.map(function(s) {
1807
+ var l = t.current, i = l.values, u = l.options, d = e.map(function(s) {
1811
1808
  if (s.label === void 0) {
1812
- var b;
1809
+ var h;
1813
1810
  return ee(ee({}, s), {}, {
1814
- label: (b = l.get(s.value)) === null || b === void 0 ? void 0 : b.label
1811
+ label: (h = i.get(s.value)) === null || h === void 0 ? void 0 : h.label
1815
1812
  });
1816
1813
  }
1817
1814
  return s;
@@ -1819,98 +1816,98 @@ const zo = function(e, n) {
1819
1816
  return d.forEach(function(s) {
1820
1817
  f.set(s.value, s), v.set(s.value, n.get(s.value) || u.get(s.value));
1821
1818
  }), t.current.values = f, t.current.options = v, d;
1822
- }, [e, n]), a = o.useCallback(function(i) {
1823
- return n.get(i) || t.current.options.get(i);
1819
+ }, [e, n]), a = o.useCallback(function(l) {
1820
+ return n.get(l) || t.current.options.get(l);
1824
1821
  }, [n]);
1825
1822
  return [r, a];
1826
1823
  };
1827
- function Un(e, n) {
1828
- return ct(e).join("").toUpperCase().includes(n);
1824
+ function Xn(e, n) {
1825
+ return lt(e).join("").toUpperCase().includes(n);
1829
1826
  }
1830
- const Ao = function(e, n, t, r, a) {
1827
+ const Vo = function(e, n, t, r, a) {
1831
1828
  return o.useMemo(function() {
1832
1829
  if (!t || r === !1)
1833
1830
  return e;
1834
- var i = n.options, l = n.label, u = n.value, d = [], f = typeof r == "function", v = t.toUpperCase(), s = f ? r : function(c, g) {
1835
- return a ? Un(g[a], v) : g[i] ? Un(g[l !== "children" ? l : "label"], v) : Un(g[u], v);
1836
- }, b = f ? function(c) {
1837
- return et(c);
1831
+ var l = n.options, i = n.label, u = n.value, d = [], f = typeof r == "function", v = t.toUpperCase(), s = f ? r : function(c, g) {
1832
+ return a ? Xn(g[a], v) : g[l] ? Xn(g[i !== "children" ? i : "label"], v) : Xn(g[u], v);
1833
+ }, h = f ? function(c) {
1834
+ return kn(c);
1838
1835
  } : function(c) {
1839
1836
  return c;
1840
1837
  };
1841
1838
  return e.forEach(function(c) {
1842
- if (c[i]) {
1843
- var g = s(t, b(c));
1839
+ if (c[l]) {
1840
+ var g = s(t, h(c));
1844
1841
  if (g)
1845
1842
  d.push(c);
1846
1843
  else {
1847
- var m = c[i].filter(function(S) {
1848
- return s(t, b(S));
1844
+ var m = c[l].filter(function(S) {
1845
+ return s(t, h(S));
1849
1846
  });
1850
- m.length && d.push(ee(ee({}, c), {}, ae({}, i, m)));
1847
+ m.length && d.push(ee(ee({}, c), {}, ae({}, l, m)));
1851
1848
  }
1852
1849
  return;
1853
1850
  }
1854
- s(t, b(c)) && d.push(c);
1851
+ s(t, h(c)) && d.push(c);
1855
1852
  }), d;
1856
1853
  }, [e, r, a, t, n]);
1857
1854
  };
1858
- var Tt = 0, Fo = process.env.NODE_ENV !== "test" && hr();
1859
- function jo() {
1855
+ var Pt = 0, Lo = process.env.NODE_ENV !== "test" && gr();
1856
+ function Bo() {
1860
1857
  var e;
1861
- return Fo ? (e = Tt, Tt += 1) : e = "TEST_OR_SSR", e;
1858
+ return Lo ? (e = Pt, Pt += 1) : e = "TEST_OR_SSR", e;
1862
1859
  }
1863
- function Wo(e) {
1860
+ function zo(e) {
1864
1861
  var n = o.useState(), t = te(n, 2), r = t[0], a = t[1];
1865
1862
  return o.useEffect(function() {
1866
- a("rc_select_".concat(jo()));
1863
+ a("rc_select_".concat(Bo()));
1867
1864
  }, []), e || r;
1868
1865
  }
1869
- var Ko = ["children", "value"], Xo = ["children"];
1870
- function Uo(e) {
1871
- var n = e, t = n.key, r = n.props, a = r.children, i = r.value, l = yn(r, Ko);
1866
+ var Ho = ["children", "value"], Fo = ["children"];
1867
+ function Ao(e) {
1868
+ var n = e, t = n.key, r = n.props, a = r.children, l = r.value, i = wn(r, Ho);
1872
1869
  return ee({
1873
1870
  key: t,
1874
- value: i !== void 0 ? i : t,
1871
+ value: l !== void 0 ? l : t,
1875
1872
  children: a
1876
- }, l);
1873
+ }, i);
1877
1874
  }
1878
- function mt(e) {
1875
+ function dt(e) {
1879
1876
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1880
- return Jn(e).map(function(t, r) {
1877
+ return Zn(e).map(function(t, r) {
1881
1878
  if (!/* @__PURE__ */ o.isValidElement(t) || !t.type)
1882
1879
  return null;
1883
- var a = t, i = a.type.isSelectOptGroup, l = a.key, u = a.props, d = u.children, f = yn(u, Xo);
1884
- return n || !i ? Uo(t) : ee(ee({
1885
- key: "__RC_SELECT_GRP__".concat(l === null ? r : l, "__"),
1886
- label: l
1880
+ var a = t, l = a.type.isSelectOptGroup, i = a.key, u = a.props, d = u.children, f = wn(u, Fo);
1881
+ return n || !l ? Ao(t) : ee(ee({
1882
+ key: "__RC_SELECT_GRP__".concat(i === null ? r : i, "__"),
1883
+ label: i
1887
1884
  }, f), {}, {
1888
- options: mt(d)
1885
+ options: dt(d)
1889
1886
  });
1890
1887
  }).filter(function(t) {
1891
1888
  return t;
1892
1889
  });
1893
1890
  }
1894
- var Go = function(n, t, r, a, i) {
1891
+ var jo = function(n, t, r, a, l) {
1895
1892
  return o.useMemo(function() {
1896
- var l = n, u = !n;
1897
- u && (l = mt(t));
1893
+ var i = n, u = !n;
1894
+ u && (i = dt(t));
1898
1895
  var d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), v = function(c, g, m) {
1899
1896
  m && typeof m == "string" && c.set(g[m], g);
1900
- }, s = function b(c) {
1897
+ }, s = function h(c) {
1901
1898
  for (var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, m = 0; m < c.length; m += 1) {
1902
1899
  var S = c[m];
1903
- !S[r.options] || g ? (d.set(S[r.value], S), v(f, S, r.label), v(f, S, a), v(f, S, i)) : b(S[r.options], !0);
1900
+ !S[r.options] || g ? (d.set(S[r.value], S), v(f, S, r.label), v(f, S, a), v(f, S, l)) : h(S[r.options], !0);
1904
1901
  }
1905
1902
  };
1906
- return s(l), {
1907
- options: l,
1903
+ return s(i), {
1904
+ options: i,
1908
1905
  valueOptions: d,
1909
1906
  labelOptions: f
1910
1907
  };
1911
- }, [n, t, r, a, i]);
1908
+ }, [n, t, r, a, l]);
1912
1909
  };
1913
- function Lt(e) {
1910
+ function _t(e) {
1914
1911
  var n = o.useRef();
1915
1912
  n.current = e;
1916
1913
  var t = o.useCallback(function() {
@@ -1918,66 +1915,66 @@ function Lt(e) {
1918
1915
  }, []);
1919
1916
  return t;
1920
1917
  }
1921
- function Yo(e) {
1922
- var n = e.mode, t = e.options, r = e.children, a = e.backfill, i = e.allowClear, l = e.placeholder, u = e.getInputElement, d = e.showSearch, f = e.onSearch, v = e.defaultOpen, s = e.autoFocus, b = e.labelInValue, c = e.value, g = e.inputValue, m = e.optionLabelProp, S = Fn(n), w = d !== void 0 ? d : S || n === "combobox", h = t || mt(r);
1923
- if (Ue(n !== "tags" || h.every(function(p) {
1918
+ function Wo(e) {
1919
+ var n = e.mode, t = e.options, r = e.children, a = e.backfill, l = e.allowClear, i = e.placeholder, u = e.getInputElement, d = e.showSearch, f = e.onSearch, v = e.defaultOpen, s = e.autoFocus, h = e.labelInValue, c = e.value, g = e.inputValue, m = e.optionLabelProp, S = An(n), C = d !== void 0 ? d : S || n === "combobox", b = t || dt(r);
1920
+ if (Ue(n !== "tags" || b.every(function(p) {
1924
1921
  return !p.disabled;
1925
1922
  }), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), n === "tags" || n === "combobox") {
1926
- var E = h.some(function(p) {
1927
- return p.options ? p.options.some(function(I) {
1928
- return typeof ("value" in I ? I.value : I.key) == "number";
1923
+ var x = b.some(function(p) {
1924
+ return p.options ? p.options.some(function(E) {
1925
+ return typeof ("value" in E ? E.value : E.key) == "number";
1929
1926
  }) : typeof ("value" in p ? p.value : p.key) == "number";
1930
1927
  });
1931
- Ue(!E, "`value` of Option should not use number type when `mode` is `tags` or `combobox`.");
1928
+ Ue(!x, "`value` of Option should not use number type when `mode` is `tags` or `combobox`.");
1932
1929
  }
1933
- if (Ue(n !== "combobox" || !m, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Ue(n === "combobox" || !a, "`backfill` only works with `combobox` mode."), Ue(n === "combobox" || !u, "`getInputElement` only work with `combobox` mode."), St(n !== "combobox" || !u || !i || !l, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), f && !w && n !== "combobox" && n !== "tags" && Ue(!1, "`onSearch` should work with `showSearch` instead of use alone."), St(!v || s, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."), c != null) {
1934
- var C = ct(c);
1935
- Ue(!b || C.every(function(p) {
1930
+ if (Ue(n !== "combobox" || !m, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Ue(n === "combobox" || !a, "`backfill` only works with `combobox` mode."), Ue(n === "combobox" || !u, "`getInputElement` only work with `combobox` mode."), ht(n !== "combobox" || !u || !l || !i, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), f && !C && n !== "combobox" && n !== "tags" && Ue(!1, "`onSearch` should work with `showSearch` instead of use alone."), ht(!v || s, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."), c != null) {
1931
+ var w = lt(c);
1932
+ Ue(!h || w.every(function(p) {
1936
1933
  return pn(p) === "object" && ("key" in p || "value" in p);
1937
1934
  }), "`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"), Ue(!S || Array.isArray(c), "`value` should be array when `mode` is `multiple` or `tags`");
1938
1935
  }
1939
1936
  if (r) {
1940
- var T = null;
1941
- Jn(r).some(function(p) {
1937
+ var B = null;
1938
+ Zn(r).some(function(p) {
1942
1939
  if (!/* @__PURE__ */ o.isValidElement(p) || !p.type)
1943
1940
  return !1;
1944
- var I = p, B = I.type;
1945
- if (B.isSelectOption)
1941
+ var E = p, L = E.type;
1942
+ if (L.isSelectOption)
1946
1943
  return !1;
1947
- if (B.isSelectOptGroup) {
1948
- var z = Jn(p.props.children).every(function(q) {
1949
- return !/* @__PURE__ */ o.isValidElement(q) || !p.type || q.type.isSelectOption ? !0 : (T = q.type, !1);
1944
+ if (L.isSelectOptGroup) {
1945
+ var H = Zn(p.props.children).every(function(q) {
1946
+ return !/* @__PURE__ */ o.isValidElement(q) || !p.type || q.type.isSelectOption ? !0 : (B = q.type, !1);
1950
1947
  });
1951
- return !z;
1948
+ return !H;
1952
1949
  }
1953
- return T = B, !0;
1954
- }), T && Ue(!1, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(T.displayName || T.name || T, "`.")), Ue(g === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
1950
+ return B = L, !0;
1951
+ }), B && Ue(!1, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(B.displayName || B.name || B, "`.")), Ue(g === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
1955
1952
  }
1956
1953
  }
1957
- function qo(e, n) {
1954
+ function Ko(e, n) {
1958
1955
  if (e) {
1959
1956
  var t = function r(a) {
1960
- for (var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, l = 0; l < a.length; l++) {
1961
- var u = a[l];
1957
+ for (var l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, i = 0; i < a.length; i++) {
1958
+ var u = a[i];
1962
1959
  if (u[n == null ? void 0 : n.value] === null)
1963
1960
  return Ue(!1, "`value` in Select options should not be `null`."), !0;
1964
- if (!i && Array.isArray(u[n == null ? void 0 : n.options]) && r(u[n == null ? void 0 : n.options], !0))
1961
+ if (!l && Array.isArray(u[n == null ? void 0 : n.options]) && r(u[n == null ? void 0 : n.options], !0))
1965
1962
  break;
1966
1963
  }
1967
1964
  };
1968
1965
  t(e);
1969
1966
  }
1970
1967
  }
1971
- var Qo = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"], Zo = ["inputValue"];
1972
- function Jo(e) {
1968
+ var Uo = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"], Xo = ["inputValue"];
1969
+ function Go(e) {
1973
1970
  return !e || pn(e) !== "object";
1974
1971
  }
1975
- var er = /* @__PURE__ */ o.forwardRef(function(e, n) {
1976
- var t = e.id, r = e.mode, a = e.prefixCls, i = a === void 0 ? "rc-select" : a, l = e.backfill, u = e.fieldNames, d = e.inputValue, f = e.searchValue, v = e.onSearch, s = e.autoClearSearchValue, b = s === void 0 ? !0 : s, c = e.onSelect, g = e.onDeselect, m = e.dropdownMatchSelectWidth, S = m === void 0 ? !0 : m, w = e.filterOption, h = e.filterSort, E = e.optionFilterProp, C = e.optionLabelProp, T = e.options, p = e.optionRender, I = e.children, B = e.defaultActiveFirstOption, z = e.menuItemSelectedIcon, q = e.virtual, _ = e.direction, F = e.listHeight, U = F === void 0 ? 200 : F, Q = e.listItemHeight, G = Q === void 0 ? 20 : Q, j = e.labelRender, ne = e.value, Z = e.defaultValue, Y = e.labelInValue, x = e.onChange, M = e.maxCount, fe = yn(e, Qo), ie = Wo(t), J = Fn(r), se = !!(!T && I), Ce = o.useMemo(function() {
1977
- return w === void 0 && r === "combobox" ? !1 : w;
1978
- }, [w, r]), ge = o.useMemo(
1972
+ var Jt = /* @__PURE__ */ o.forwardRef(function(e, n) {
1973
+ var t = e.id, r = e.mode, a = e.prefixCls, l = a === void 0 ? "rc-select" : a, i = e.backfill, u = e.fieldNames, d = e.inputValue, f = e.searchValue, v = e.onSearch, s = e.autoClearSearchValue, h = s === void 0 ? !0 : s, c = e.onSelect, g = e.onDeselect, m = e.dropdownMatchSelectWidth, S = m === void 0 ? !0 : m, C = e.filterOption, b = e.filterSort, x = e.optionFilterProp, w = e.optionLabelProp, B = e.options, p = e.optionRender, E = e.children, L = e.defaultActiveFirstOption, H = e.menuItemSelectedIcon, q = e.virtual, _ = e.direction, A = e.listHeight, X = A === void 0 ? 200 : A, Q = e.listItemHeight, G = Q === void 0 ? 20 : Q, j = e.labelRender, ne = e.value, Z = e.defaultValue, Y = e.labelInValue, I = e.onChange, D = e.maxCount, fe = wn(e, Uo), ie = zo(t), J = An(r), se = !!(!B && E), ye = o.useMemo(function() {
1974
+ return C === void 0 && r === "combobox" ? !1 : C;
1975
+ }, [C, r]), ge = o.useMemo(
1979
1976
  function() {
1980
- return Yt(u, se);
1977
+ return Xt(u, se);
1981
1978
  },
1982
1979
  /* eslint-disable react-hooks/exhaustive-deps */
1983
1980
  [
@@ -1986,52 +1983,52 @@ var er = /* @__PURE__ */ o.forwardRef(function(e, n) {
1986
1983
  se
1987
1984
  ]
1988
1985
  /* eslint-enable react-hooks/exhaustive-deps */
1989
- ), Oe = Zn("", {
1986
+ ), Re = Qn("", {
1990
1987
  value: f !== void 0 ? f : d,
1991
- postState: function(V) {
1992
- return V || "";
1988
+ postState: function(z) {
1989
+ return z || "";
1993
1990
  }
1994
- }), ce = te(Oe, 2), pe = ce[0], O = ce[1], y = Go(T, I, ge, E, C), D = y.valueOptions, K = y.labelOptions, R = y.options, A = o.useCallback(function(N) {
1995
- var V = ct(N);
1996
- return V.map(function(L) {
1997
- var H, oe, be, Ze, We;
1998
- if (Jo(L))
1999
- H = L;
1991
+ }), ce = te(Re, 2), pe = ce[0], R = ce[1], y = jo(B, E, ge, x, w), $ = y.valueOptions, K = y.labelOptions, O = y.options, F = o.useCallback(function(N) {
1992
+ var z = lt(N);
1993
+ return z.map(function(T) {
1994
+ var V, oe, be, Qe, je;
1995
+ if (Go(T))
1996
+ V = T;
2000
1997
  else {
2001
1998
  var nn;
2002
- be = L.key, oe = L.label, H = (nn = L.value) !== null && nn !== void 0 ? nn : be;
1999
+ be = T.key, oe = T.label, V = (nn = T.value) !== null && nn !== void 0 ? nn : be;
2003
2000
  }
2004
- var Ie = D.get(H);
2001
+ var Ie = $.get(V);
2005
2002
  if (Ie) {
2006
2003
  var tn;
2007
- if (oe === void 0 && (oe = Ie == null ? void 0 : Ie[C || ge.label]), be === void 0 && (be = (tn = Ie == null ? void 0 : Ie.key) !== null && tn !== void 0 ? tn : H), Ze = Ie == null ? void 0 : Ie.disabled, We = Ie == null ? void 0 : Ie.title, process.env.NODE_ENV !== "production" && !C) {
2008
- var Je = Ie == null ? void 0 : Ie[ge.label];
2009
- Je !== void 0 && !/* @__PURE__ */ o.isValidElement(Je) && !/* @__PURE__ */ o.isValidElement(oe) && Je !== oe && Ue(!1, "`label` of `value` is not same as `label` in Select options.");
2004
+ if (oe === void 0 && (oe = Ie == null ? void 0 : Ie[w || ge.label]), be === void 0 && (be = (tn = Ie == null ? void 0 : Ie.key) !== null && tn !== void 0 ? tn : V), Qe = Ie == null ? void 0 : Ie.disabled, je = Ie == null ? void 0 : Ie.title, process.env.NODE_ENV !== "production" && !w) {
2005
+ var Ze = Ie == null ? void 0 : Ie[ge.label];
2006
+ Ze !== void 0 && !/* @__PURE__ */ o.isValidElement(Ze) && !/* @__PURE__ */ o.isValidElement(oe) && Ze !== oe && Ue(!1, "`label` of `value` is not same as `label` in Select options.");
2010
2007
  }
2011
2008
  }
2012
2009
  return {
2013
2010
  label: oe,
2014
- value: H,
2011
+ value: V,
2015
2012
  key: be,
2016
- disabled: Ze,
2017
- title: We
2013
+ disabled: Qe,
2014
+ title: je
2018
2015
  };
2019
2016
  });
2020
- }, [ge, C, D]), le = Zn(Z, {
2017
+ }, [ge, w, $]), le = Qn(Z, {
2021
2018
  value: ne
2022
- }), me = te(le, 2), re = me[0], we = me[1], Be = o.useMemo(function() {
2023
- var N, V = J && re === null ? [] : re, L = A(V);
2024
- return r === "combobox" && ao((N = L[0]) === null || N === void 0 ? void 0 : N.value) ? [] : L;
2025
- }, [re, A, r, J]), xe = zo(Be, D), Ne = te(xe, 2), de = Ne[0], Ge = Ne[1], Ye = o.useMemo(function() {
2019
+ }), me = te(le, 2), re = me[0], Ce = me[1], Le = o.useMemo(function() {
2020
+ var N, z = J && re === null ? [] : re, T = F(z);
2021
+ return r === "combobox" && eo((N = T[0]) === null || N === void 0 ? void 0 : N.value) ? [] : T;
2022
+ }, [re, F, r, J]), xe = To(Le, $), Ne = te(xe, 2), de = Ne[0], Xe = Ne[1], Ge = o.useMemo(function() {
2026
2023
  if (!r && de.length === 1) {
2027
2024
  var N = de[0];
2028
2025
  if (N.value === null && (N.label === null || N.label === void 0))
2029
2026
  return [];
2030
2027
  }
2031
- return de.map(function(V) {
2032
- var L;
2033
- return ee(ee({}, V), {}, {
2034
- label: (L = typeof j == "function" ? j(V) : V.label) !== null && L !== void 0 ? L : V.value
2028
+ return de.map(function(z) {
2029
+ var T;
2030
+ return ee(ee({}, z), {}, {
2031
+ label: (T = typeof j == "function" ? j(z) : z.label) !== null && T !== void 0 ? T : z.value
2035
2032
  });
2036
2033
  });
2037
2034
  }, [r, de, j]), Se = o.useMemo(function() {
@@ -2041,168 +2038,168 @@ var er = /* @__PURE__ */ o.forwardRef(function(e, n) {
2041
2038
  }, [de]);
2042
2039
  o.useEffect(function() {
2043
2040
  if (r === "combobox") {
2044
- var N, V = (N = de[0]) === null || N === void 0 ? void 0 : N.value;
2045
- O(oo(V) ? String(V) : "");
2041
+ var N, z = (N = de[0]) === null || N === void 0 ? void 0 : N.value;
2042
+ R(kr(z) ? String(z) : "");
2046
2043
  }
2047
2044
  }, [de]);
2048
- var $e = Lt(function(N, V) {
2049
- var L = V ?? N;
2050
- return ae(ae({}, ge.value, N), ge.label, L);
2051
- }), ye = o.useMemo(function() {
2045
+ var Me = _t(function(N, z) {
2046
+ var T = z ?? N;
2047
+ return ae(ae({}, ge.value, N), ge.label, T);
2048
+ }), we = o.useMemo(function() {
2052
2049
  if (r !== "tags")
2053
- return R;
2054
- var N = qe(R), V = function(H) {
2055
- return D.has(H);
2050
+ return O;
2051
+ var N = Ye(O), z = function(V) {
2052
+ return $.has(V);
2056
2053
  };
2057
- return qe(de).sort(function(L, H) {
2058
- return L.value < H.value ? -1 : 1;
2059
- }).forEach(function(L) {
2060
- var H = L.value;
2061
- V(H) || N.push($e(H, L.label));
2054
+ return Ye(de).sort(function(T, V) {
2055
+ return T.value < V.value ? -1 : 1;
2056
+ }).forEach(function(T) {
2057
+ var V = T.value;
2058
+ z(V) || N.push(Me(V, T.label));
2062
2059
  }), N;
2063
- }, [$e, R, D, de, r]), Re = Ao(ye, ge, pe, Ce, E), Pe = o.useMemo(function() {
2064
- return r !== "tags" || !pe || Re.some(function(N) {
2065
- return N[E || "value"] === pe;
2066
- }) || Re.some(function(N) {
2060
+ }, [Me, O, $, de, r]), Oe = Vo(we, ge, pe, ye, x), Pe = o.useMemo(function() {
2061
+ return r !== "tags" || !pe || Oe.some(function(N) {
2062
+ return N[x || "value"] === pe;
2063
+ }) || Oe.some(function(N) {
2067
2064
  return N[ge.value] === pe;
2068
- }) ? Re : [$e(pe)].concat(qe(Re));
2069
- }, [$e, E, r, Re, pe, ge]), en = function N(V) {
2070
- var L = qe(V).sort(function(H, oe) {
2071
- return h(H, oe, {
2065
+ }) ? Oe : [Me(pe)].concat(Ye(Oe));
2066
+ }, [Me, x, r, Oe, pe, ge]), en = function N(z) {
2067
+ var T = Ye(z).sort(function(V, oe) {
2068
+ return b(V, oe, {
2072
2069
  searchValue: pe
2073
2070
  });
2074
2071
  });
2075
- return L.map(function(H) {
2076
- return Array.isArray(H.options) ? ee(ee({}, H), {}, {
2077
- options: H.options.length > 0 ? N(H.options) : H.options
2078
- }) : H;
2072
+ return T.map(function(V) {
2073
+ return Array.isArray(V.options) ? ee(ee({}, V), {}, {
2074
+ options: V.options.length > 0 ? N(V.options) : V.options
2075
+ }) : V;
2079
2076
  });
2080
- }, je = o.useMemo(function() {
2081
- return h ? en(Pe) : Pe;
2082
- }, [Pe, h, pe]), Ae = o.useMemo(function() {
2083
- return go(je, {
2077
+ }, Ae = o.useMemo(function() {
2078
+ return b ? en(Pe) : Pe;
2079
+ }, [Pe, b, pe]), He = o.useMemo(function() {
2080
+ return co(Ae, {
2084
2081
  fieldNames: ge,
2085
2082
  childrenAsData: se
2086
2083
  });
2087
- }, [je, ge, se]), Ee = function(V) {
2088
- var L = A(V);
2089
- if (we(L), x && // Trigger event only when value changed
2090
- (L.length !== de.length || L.some(function(be, Ze) {
2091
- var We;
2092
- return ((We = de[Ze]) === null || We === void 0 ? void 0 : We.value) !== (be == null ? void 0 : be.value);
2084
+ }, [Ae, ge, se]), Ee = function(z) {
2085
+ var T = F(z);
2086
+ if (Ce(T), I && // Trigger event only when value changed
2087
+ (T.length !== de.length || T.some(function(be, Qe) {
2088
+ var je;
2089
+ return ((je = de[Qe]) === null || je === void 0 ? void 0 : je.value) !== (be == null ? void 0 : be.value);
2093
2090
  }))) {
2094
- var H = Y ? L : L.map(function(be) {
2091
+ var V = Y ? T : T.map(function(be) {
2095
2092
  return be.value;
2096
- }), oe = L.map(function(be) {
2097
- return et(Ge(be.value));
2093
+ }), oe = T.map(function(be) {
2094
+ return kn(Xe(be.value));
2098
2095
  });
2099
- x(
2096
+ I(
2100
2097
  // Value
2101
- J ? H : H[0],
2098
+ J ? V : V[0],
2102
2099
  // Option
2103
2100
  J ? oe : oe[0]
2104
2101
  );
2105
2102
  }
2106
- }, hn = o.useState(null), Fe = te(hn, 2), _e = Fe[0], De = Fe[1], Nn = o.useState(0), En = te(Nn, 2), dn = En[0], bn = En[1], In = B !== void 0 ? B : r !== "combobox", cn = o.useCallback(function(N, V) {
2107
- var L = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, H = L.source, oe = H === void 0 ? "keyboard" : H;
2108
- bn(V), l && r === "combobox" && N !== null && oe === "keyboard" && De(String(N));
2109
- }, [l, r]), Qe = function(V, L, H) {
2103
+ }, hn = o.useState(null), Fe = te(hn, 2), _e = Fe[0], $e = Fe[1], $n = o.useState(0), En = te($n, 2), dn = En[0], bn = En[1], In = L !== void 0 ? L : r !== "combobox", cn = o.useCallback(function(N, z) {
2104
+ var T = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, V = T.source, oe = V === void 0 ? "keyboard" : V;
2105
+ bn(z), i && r === "combobox" && N !== null && oe === "keyboard" && $e(String(N));
2106
+ }, [i, r]), qe = function(z, T, V) {
2110
2107
  var oe = function() {
2111
- var rn, ke = Ge(V);
2108
+ var rn, Je = Xe(z);
2112
2109
  return [Y ? {
2113
- label: ke == null ? void 0 : ke[ge.label],
2114
- value: V,
2115
- key: (rn = ke == null ? void 0 : ke.key) !== null && rn !== void 0 ? rn : V
2116
- } : V, et(ke)];
2110
+ label: Je == null ? void 0 : Je[ge.label],
2111
+ value: z,
2112
+ key: (rn = Je == null ? void 0 : Je.key) !== null && rn !== void 0 ? rn : z
2113
+ } : z, kn(Je)];
2117
2114
  };
2118
- if (L && c) {
2119
- var be = oe(), Ze = te(be, 2), We = Ze[0], nn = Ze[1];
2120
- c(We, nn);
2121
- } else if (!L && g && H !== "clear") {
2122
- var Ie = oe(), tn = te(Ie, 2), Je = tn[0], Pn = tn[1];
2123
- g(Je, Pn);
2115
+ if (T && c) {
2116
+ var be = oe(), Qe = te(be, 2), je = Qe[0], nn = Qe[1];
2117
+ c(je, nn);
2118
+ } else if (!T && g && V !== "clear") {
2119
+ var Ie = oe(), tn = te(Ie, 2), Ze = tn[0], Nn = tn[1];
2120
+ g(Ze, Nn);
2124
2121
  }
2125
- }, fn = Lt(function(N, V) {
2126
- var L, H = J ? V.selected : !0;
2127
- H ? L = J ? [].concat(qe(de), [N]) : [N] : L = de.filter(function(oe) {
2122
+ }, fn = _t(function(N, z) {
2123
+ var T, V = J ? z.selected : !0;
2124
+ V ? T = J ? [].concat(Ye(de), [N]) : [N] : T = de.filter(function(oe) {
2128
2125
  return oe.value !== N;
2129
- }), Ee(L), Qe(N, H), r === "combobox" ? De("") : (!Fn || b) && (O(""), De(""));
2130
- }), mn = function(V, L) {
2131
- Ee(V);
2132
- var H = L.type, oe = L.values;
2133
- (H === "remove" || H === "clear") && oe.forEach(function(be) {
2134
- Qe(be.value, !1, H);
2126
+ }), Ee(T), qe(N, V), r === "combobox" ? $e("") : (!An || h) && (R(""), $e(""));
2127
+ }), mn = function(z, T) {
2128
+ Ee(z);
2129
+ var V = T.type, oe = T.values;
2130
+ (V === "remove" || V === "clear") && oe.forEach(function(be) {
2131
+ qe(be.value, !1, V);
2135
2132
  });
2136
- }, Me = function(V, L) {
2137
- if (O(V), De(null), L.source === "submit") {
2138
- var H = (V || "").trim();
2139
- if (H) {
2140
- var oe = Array.from(new Set([].concat(qe(Se), [H])));
2141
- Ee(oe), Qe(H, !0), O("");
2133
+ }, De = function(z, T) {
2134
+ if (R(z), $e(null), T.source === "submit") {
2135
+ var V = (z || "").trim();
2136
+ if (V) {
2137
+ var oe = Array.from(new Set([].concat(Ye(Se), [V])));
2138
+ Ee(oe), qe(V, !0), R("");
2142
2139
  }
2143
2140
  return;
2144
2141
  }
2145
- L.source !== "blur" && (r === "combobox" && Ee(V), v == null || v(V));
2146
- }, vn = function(V) {
2147
- var L = V;
2148
- r !== "tags" && (L = V.map(function(oe) {
2142
+ T.source !== "blur" && (r === "combobox" && Ee(z), v == null || v(z));
2143
+ }, vn = function(z) {
2144
+ var T = z;
2145
+ r !== "tags" && (T = z.map(function(oe) {
2149
2146
  var be = K.get(oe);
2150
2147
  return be == null ? void 0 : be.value;
2151
2148
  }).filter(function(oe) {
2152
2149
  return oe !== void 0;
2153
2150
  }));
2154
- var H = Array.from(new Set([].concat(qe(Se), qe(L))));
2155
- Ee(H), H.forEach(function(oe) {
2156
- Qe(oe, !0);
2151
+ var V = Array.from(new Set([].concat(Ye(Se), Ye(T))));
2152
+ Ee(V), V.forEach(function(oe) {
2153
+ qe(oe, !0);
2157
2154
  });
2158
2155
  }, an = o.useMemo(function() {
2159
2156
  var N = q !== !1 && S !== !1;
2160
2157
  return ee(ee({}, y), {}, {
2161
- flattenOptions: Ae,
2158
+ flattenOptions: He,
2162
2159
  onActiveValue: cn,
2163
2160
  defaultActiveFirstOption: In,
2164
2161
  onSelect: fn,
2165
- menuItemSelectedIcon: z,
2162
+ menuItemSelectedIcon: H,
2166
2163
  rawValues: Se,
2167
2164
  fieldNames: ge,
2168
2165
  virtual: N,
2169
2166
  direction: _,
2170
- listHeight: U,
2167
+ listHeight: X,
2171
2168
  listItemHeight: G,
2172
2169
  childrenAsData: se,
2173
- maxCount: M,
2170
+ maxCount: D,
2174
2171
  optionRender: p
2175
2172
  });
2176
- }, [M, y, Ae, cn, In, fn, z, Se, ge, q, S, _, U, G, se, p]);
2177
- return process.env.NODE_ENV !== "production" && (Yo(e), qo(R, ge)), /* @__PURE__ */ o.createElement(st.Provider, {
2173
+ }, [D, y, He, cn, In, fn, H, Se, ge, q, S, _, X, G, se, p]);
2174
+ return process.env.NODE_ENV !== "production" && (Wo(e), Ko(O, ge)), /* @__PURE__ */ o.createElement(ut.Provider, {
2178
2175
  value: an
2179
- }, /* @__PURE__ */ o.createElement(qt, on({}, fe, {
2176
+ }, /* @__PURE__ */ o.createElement(Gt, on({}, fe, {
2180
2177
  // >>> MISC
2181
2178
  id: ie,
2182
- prefixCls: i,
2179
+ prefixCls: l,
2183
2180
  ref: n,
2184
- omitDomProps: Zo,
2181
+ omitDomProps: Xo,
2185
2182
  mode: r,
2186
- displayValues: Ye,
2183
+ displayValues: Ge,
2187
2184
  onDisplayValuesChange: mn,
2188
2185
  direction: _,
2189
2186
  searchValue: pe,
2190
- onSearch: Me,
2191
- autoClearSearchValue: b,
2187
+ onSearch: De,
2188
+ autoClearSearchValue: h,
2192
2189
  onSearchSplit: vn,
2193
2190
  dropdownMatchSelectWidth: S,
2194
- OptionList: kt,
2195
- emptyOptions: !Ae.length,
2191
+ OptionList: Zt,
2192
+ emptyOptions: !He.length,
2196
2193
  activeValue: _e,
2197
2194
  activeDescendantId: "".concat(ie, "_list_").concat(dn)
2198
2195
  })));
2199
2196
  });
2200
- process.env.NODE_ENV !== "production" && (er.displayName = "Select");
2201
- var vt = er;
2202
- vt.Option = ft;
2203
- vt.OptGroup = dt;
2204
- const nr = () => {
2205
- const [, e] = rt(), [n] = lt("Empty"), r = new zn(e.colorBgBase).toHsl().l < 0.5 ? {
2197
+ process.env.NODE_ENV !== "production" && (Jt.displayName = "Select");
2198
+ var ft = Jt;
2199
+ ft.Option = st;
2200
+ ft.OptGroup = ct;
2201
+ const kt = () => {
2202
+ const [, e] = tt(), [n] = at("Empty"), r = new zn(e.colorBgBase).toHsl().l < 0.5 ? {
2206
2203
  opacity: 0.65
2207
2204
  } : {};
2208
2205
  return /* @__PURE__ */ o.createElement("svg", {
@@ -2251,22 +2248,22 @@ const nr = () => {
2251
2248
  d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
2252
2249
  }))));
2253
2250
  };
2254
- process.env.NODE_ENV !== "production" && (nr.displayName = "EmptyImage");
2255
- const tr = () => {
2256
- const [, e] = rt(), [n] = lt("Empty"), {
2251
+ process.env.NODE_ENV !== "production" && (kt.displayName = "EmptyImage");
2252
+ const er = () => {
2253
+ const [, e] = tt(), [n] = at("Empty"), {
2257
2254
  colorFill: t,
2258
2255
  colorFillTertiary: r,
2259
2256
  colorFillQuaternary: a,
2260
- colorBgContainer: i
2257
+ colorBgContainer: l
2261
2258
  } = e, {
2262
- borderColor: l,
2259
+ borderColor: i,
2263
2260
  shadowColor: u,
2264
2261
  contentColor: d
2265
- } = vr(() => ({
2266
- borderColor: new zn(t).onBackground(i).toHexString(),
2267
- shadowColor: new zn(r).onBackground(i).toHexString(),
2268
- contentColor: new zn(a).onBackground(i).toHexString()
2269
- }), [t, r, a, i]);
2262
+ } = fr(() => ({
2263
+ borderColor: new zn(t).onBackground(l).toHexString(),
2264
+ shadowColor: new zn(r).onBackground(l).toHexString(),
2265
+ contentColor: new zn(a).onBackground(l).toHexString()
2266
+ }), [t, r, a, l]);
2270
2267
  return /* @__PURE__ */ o.createElement("svg", {
2271
2268
  width: "64",
2272
2269
  height: "41",
@@ -2284,7 +2281,7 @@ const tr = () => {
2284
2281
  ry: "7"
2285
2282
  }), /* @__PURE__ */ o.createElement("g", {
2286
2283
  fillRule: "nonzero",
2287
- stroke: l
2284
+ stroke: i
2288
2285
  }, /* @__PURE__ */ o.createElement("path", {
2289
2286
  d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
2290
2287
  }), /* @__PURE__ */ o.createElement("path", {
@@ -2292,21 +2289,21 @@ const tr = () => {
2292
2289
  fill: d
2293
2290
  }))));
2294
2291
  };
2295
- process.env.NODE_ENV !== "production" && (tr.displayName = "SimpleImage");
2296
- const ko = (e) => {
2292
+ process.env.NODE_ENV !== "production" && (er.displayName = "SimpleImage");
2293
+ const Yo = (e) => {
2297
2294
  const {
2298
2295
  componentCls: n,
2299
2296
  margin: t,
2300
2297
  marginXS: r,
2301
2298
  marginXL: a,
2302
- fontSize: i,
2303
- lineHeight: l
2299
+ fontSize: l,
2300
+ lineHeight: i
2304
2301
  } = e;
2305
2302
  return {
2306
2303
  [n]: {
2307
2304
  marginInline: r,
2308
- fontSize: i,
2309
- lineHeight: l,
2305
+ fontSize: l,
2306
+ lineHeight: i,
2310
2307
  textAlign: "center",
2311
2308
  // 原来 &-image 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
2312
2309
  [`${n}-image`]: {
@@ -2348,85 +2345,85 @@ const ko = (e) => {
2348
2345
  }
2349
2346
  }
2350
2347
  };
2351
- }, ea = zt("Empty", (e) => {
2348
+ }, qo = Bt("Empty", (e) => {
2352
2349
  const {
2353
2350
  componentCls: n,
2354
2351
  controlHeightLG: t,
2355
2352
  calc: r
2356
- } = e, a = Mn(e, {
2353
+ } = e, a = Hn(e, {
2357
2354
  emptyImgCls: `${n}-img`,
2358
2355
  emptyImgHeight: r(t).mul(2.5).equal(),
2359
2356
  emptyImgHeightMD: t,
2360
2357
  emptyImgHeightSM: r(t).mul(0.875).equal()
2361
2358
  });
2362
- return [ko(a)];
2359
+ return [Yo(a)];
2363
2360
  });
2364
- var na = function(e, n) {
2361
+ var Qo = function(e, n) {
2365
2362
  var t = {};
2366
2363
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
2367
2364
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
2368
2365
  n.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
2369
2366
  return t;
2370
2367
  };
2371
- const rr = /* @__PURE__ */ o.createElement(nr, null), or = /* @__PURE__ */ o.createElement(tr, null), gn = (e) => {
2372
- var n, t, r, a, i, l, u, d;
2368
+ const nr = /* @__PURE__ */ o.createElement(kt, null), tr = /* @__PURE__ */ o.createElement(er, null), gn = (e) => {
2369
+ var n, t, r, a, l, i, u, d;
2373
2370
  const {
2374
2371
  className: f,
2375
2372
  rootClassName: v,
2376
2373
  prefixCls: s,
2377
- image: b = rr,
2374
+ image: h = nr,
2378
2375
  description: c,
2379
2376
  children: g,
2380
2377
  imageStyle: m,
2381
2378
  style: S,
2382
- classNames: w,
2383
- styles: h
2384
- } = e, E = na(e, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"]), {
2385
- getPrefixCls: C,
2386
- direction: T,
2379
+ classNames: C,
2380
+ styles: b
2381
+ } = e, x = Qo(e, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"]), {
2382
+ getPrefixCls: w,
2383
+ direction: B,
2387
2384
  empty: p
2388
- } = o.useContext(ot), I = C("empty", s), [B, z, q] = ea(I), [_] = lt("Empty"), F = typeof c < "u" ? c : _ == null ? void 0 : _.description, U = typeof F == "string" ? F : "empty";
2385
+ } = o.useContext(rt), E = w("empty", s), [L, H, q] = qo(E), [_] = at("Empty"), A = typeof c < "u" ? c : _ == null ? void 0 : _.description, X = typeof A == "string" ? A : "empty";
2389
2386
  let Q = null;
2390
- if (typeof b == "string" ? Q = /* @__PURE__ */ o.createElement("img", {
2391
- alt: U,
2392
- src: b
2393
- }) : Q = b, process.env.NODE_ENV !== "production") {
2394
- const G = at("Empty");
2387
+ if (typeof h == "string" ? Q = /* @__PURE__ */ o.createElement("img", {
2388
+ alt: X,
2389
+ src: h
2390
+ }) : Q = h, process.env.NODE_ENV !== "production") {
2391
+ const G = zt("Empty");
2395
2392
  [["imageStyle", "styles: { image: {} }"]].forEach((j) => {
2396
2393
  let [ne, Z] = j;
2397
2394
  G.deprecated(!(ne in e), ne, Z);
2398
2395
  });
2399
2396
  }
2400
- return B(/* @__PURE__ */ o.createElement("div", Object.assign({
2401
- className: Ve(z, q, I, p == null ? void 0 : p.className, {
2402
- [`${I}-normal`]: b === or,
2403
- [`${I}-rtl`]: T === "rtl"
2404
- }, f, v, (n = p == null ? void 0 : p.classNames) === null || n === void 0 ? void 0 : n.root, w == null ? void 0 : w.root),
2405
- style: Object.assign(Object.assign(Object.assign(Object.assign({}, (t = p == null ? void 0 : p.styles) === null || t === void 0 ? void 0 : t.root), p == null ? void 0 : p.style), h == null ? void 0 : h.root), S)
2406
- }, E), /* @__PURE__ */ o.createElement("div", {
2407
- className: Ve(`${I}-image`, (r = p == null ? void 0 : p.classNames) === null || r === void 0 ? void 0 : r.image, w == null ? void 0 : w.image),
2408
- style: Object.assign(Object.assign(Object.assign({}, m), (a = p == null ? void 0 : p.styles) === null || a === void 0 ? void 0 : a.image), h == null ? void 0 : h.image)
2409
- }, Q), F && /* @__PURE__ */ o.createElement("div", {
2410
- className: Ve(`${I}-description`, (i = p == null ? void 0 : p.classNames) === null || i === void 0 ? void 0 : i.description, w == null ? void 0 : w.description),
2411
- style: Object.assign(Object.assign({}, (l = p == null ? void 0 : p.styles) === null || l === void 0 ? void 0 : l.description), h == null ? void 0 : h.description)
2412
- }, F), g && /* @__PURE__ */ o.createElement("div", {
2413
- className: Ve(`${I}-footer`, (u = p == null ? void 0 : p.classNames) === null || u === void 0 ? void 0 : u.footer, w == null ? void 0 : w.footer),
2414
- style: Object.assign(Object.assign({}, (d = p == null ? void 0 : p.styles) === null || d === void 0 ? void 0 : d.footer), h == null ? void 0 : h.footer)
2397
+ return L(/* @__PURE__ */ o.createElement("div", Object.assign({
2398
+ className: Be(H, q, E, p == null ? void 0 : p.className, {
2399
+ [`${E}-normal`]: h === tr,
2400
+ [`${E}-rtl`]: B === "rtl"
2401
+ }, f, v, (n = p == null ? void 0 : p.classNames) === null || n === void 0 ? void 0 : n.root, C == null ? void 0 : C.root),
2402
+ style: Object.assign(Object.assign(Object.assign(Object.assign({}, (t = p == null ? void 0 : p.styles) === null || t === void 0 ? void 0 : t.root), p == null ? void 0 : p.style), b == null ? void 0 : b.root), S)
2403
+ }, x), /* @__PURE__ */ o.createElement("div", {
2404
+ className: Be(`${E}-image`, (r = p == null ? void 0 : p.classNames) === null || r === void 0 ? void 0 : r.image, C == null ? void 0 : C.image),
2405
+ style: Object.assign(Object.assign(Object.assign({}, m), (a = p == null ? void 0 : p.styles) === null || a === void 0 ? void 0 : a.image), b == null ? void 0 : b.image)
2406
+ }, Q), A && /* @__PURE__ */ o.createElement("div", {
2407
+ className: Be(`${E}-description`, (l = p == null ? void 0 : p.classNames) === null || l === void 0 ? void 0 : l.description, C == null ? void 0 : C.description),
2408
+ style: Object.assign(Object.assign({}, (i = p == null ? void 0 : p.styles) === null || i === void 0 ? void 0 : i.description), b == null ? void 0 : b.description)
2409
+ }, A), g && /* @__PURE__ */ o.createElement("div", {
2410
+ className: Be(`${E}-footer`, (u = p == null ? void 0 : p.classNames) === null || u === void 0 ? void 0 : u.footer, C == null ? void 0 : C.footer),
2411
+ style: Object.assign(Object.assign({}, (d = p == null ? void 0 : p.styles) === null || d === void 0 ? void 0 : d.footer), b == null ? void 0 : b.footer)
2415
2412
  }, g)));
2416
2413
  };
2417
- gn.PRESENTED_IMAGE_DEFAULT = rr;
2418
- gn.PRESENTED_IMAGE_SIMPLE = or;
2414
+ gn.PRESENTED_IMAGE_DEFAULT = nr;
2415
+ gn.PRESENTED_IMAGE_SIMPLE = tr;
2419
2416
  process.env.NODE_ENV !== "production" && (gn.displayName = "Empty");
2420
- const ta = (e) => {
2417
+ const Zo = (e) => {
2421
2418
  const {
2422
2419
  componentName: n
2423
2420
  } = e, {
2424
2421
  getPrefixCls: t
2425
- } = gr(ot), r = t("empty");
2422
+ } = mr(rt), r = t("empty");
2426
2423
  switch (n) {
2427
2424
  case "Table":
2428
2425
  case "List":
2429
- return /* @__PURE__ */ On.createElement(gn, {
2426
+ return /* @__PURE__ */ Rn.createElement(gn, {
2430
2427
  image: gn.PRESENTED_IMAGE_SIMPLE
2431
2428
  });
2432
2429
  case "Select":
@@ -2434,16 +2431,16 @@ const ta = (e) => {
2434
2431
  case "Cascader":
2435
2432
  case "Transfer":
2436
2433
  case "Mentions":
2437
- return /* @__PURE__ */ On.createElement(gn, {
2434
+ return /* @__PURE__ */ Rn.createElement(gn, {
2438
2435
  image: gn.PRESENTED_IMAGE_SIMPLE,
2439
2436
  className: `${r}-small`
2440
2437
  });
2441
2438
  case "Table.filter":
2442
2439
  return null;
2443
2440
  default:
2444
- return /* @__PURE__ */ On.createElement(gn, null);
2441
+ return /* @__PURE__ */ Rn.createElement(gn, null);
2445
2442
  }
2446
- }, ra = (e) => {
2443
+ }, Jo = (e) => {
2447
2444
  const t = {
2448
2445
  overflow: {
2449
2446
  adjustX: !0,
@@ -2472,10 +2469,10 @@ const ta = (e) => {
2472
2469
  })
2473
2470
  };
2474
2471
  };
2475
- function oa(e, n) {
2476
- return e || ra(n);
2472
+ function ko(e, n) {
2473
+ return e || Jo(n);
2477
2474
  }
2478
- const Ht = (e) => {
2475
+ const Tt = (e) => {
2479
2476
  const {
2480
2477
  optionHeight: n,
2481
2478
  optionFontSize: t,
@@ -2493,14 +2490,14 @@ const Ht = (e) => {
2493
2490
  lineHeight: r,
2494
2491
  boxSizing: "border-box"
2495
2492
  };
2496
- }, aa = (e) => {
2493
+ }, ea = (e) => {
2497
2494
  const {
2498
2495
  antCls: n,
2499
2496
  componentCls: t
2500
- } = e, r = `${t}-item`, a = `&${n}-slide-up-enter${n}-slide-up-enter-active`, i = `&${n}-slide-up-appear${n}-slide-up-appear-active`, l = `&${n}-slide-up-leave${n}-slide-up-leave-active`, u = `${t}-dropdown-placement-`, d = `${r}-option-selected`;
2497
+ } = e, r = `${t}-item`, a = `&${n}-slide-up-enter${n}-slide-up-enter-active`, l = `&${n}-slide-up-appear${n}-slide-up-appear-active`, i = `&${n}-slide-up-leave${n}-slide-up-leave-active`, u = `${t}-dropdown-placement-`, d = `${r}-option-selected`;
2501
2498
  return [
2502
2499
  {
2503
- [`${t}-dropdown`]: Object.assign(Object.assign({}, it(e)), {
2500
+ [`${t}-dropdown`]: Object.assign(Object.assign({}, ot(e)), {
2504
2501
  position: "absolute",
2505
2502
  top: -9999,
2506
2503
  zIndex: e.zIndexPopup,
@@ -2518,31 +2515,31 @@ const Ht = (e) => {
2518
2515
  boxShadow: e.boxShadowSecondary,
2519
2516
  [`
2520
2517
  ${a}${u}bottomLeft,
2521
- ${i}${u}bottomLeft
2518
+ ${l}${u}bottomLeft
2522
2519
  `]: {
2523
- animationName: Dr
2520
+ animationName: Mr
2524
2521
  },
2525
2522
  [`
2526
2523
  ${a}${u}topLeft,
2527
- ${i}${u}topLeft,
2524
+ ${l}${u}topLeft,
2528
2525
  ${a}${u}topRight,
2529
- ${i}${u}topRight
2526
+ ${l}${u}topRight
2530
2527
  `]: {
2531
- animationName: Nr
2528
+ animationName: Dr
2532
2529
  },
2533
- [`${l}${u}bottomLeft`]: {
2534
- animationName: Pr
2530
+ [`${i}${u}bottomLeft`]: {
2531
+ animationName: $r
2535
2532
  },
2536
2533
  [`
2537
- ${l}${u}topLeft,
2538
- ${l}${u}topRight
2534
+ ${i}${u}topLeft,
2535
+ ${i}${u}topRight
2539
2536
  `]: {
2540
- animationName: _r
2537
+ animationName: Nr
2541
2538
  },
2542
2539
  "&-hidden": {
2543
2540
  display: "none"
2544
2541
  },
2545
- [r]: Object.assign(Object.assign({}, Ht(e)), {
2542
+ [r]: Object.assign(Object.assign({}, Tt(e)), {
2546
2543
  cursor: "pointer",
2547
2544
  transition: `background ${e.motionDurationSlow} ease`,
2548
2545
  borderRadius: e.borderRadiusSM,
@@ -2557,7 +2554,7 @@ const Ht = (e) => {
2557
2554
  display: "flex",
2558
2555
  "&-content": Object.assign({
2559
2556
  flex: "auto"
2560
- }, Qn),
2557
+ }, qn),
2561
2558
  "&-state": {
2562
2559
  flex: "none",
2563
2560
  display: "flex",
@@ -2585,7 +2582,7 @@ const Ht = (e) => {
2585
2582
  paddingInlineStart: e.calc(e.controlPaddingHorizontal).mul(2).equal()
2586
2583
  }
2587
2584
  },
2588
- "&-empty": Object.assign(Object.assign({}, Ht(e)), {
2585
+ "&-empty": Object.assign(Object.assign({}, Tt(e)), {
2589
2586
  color: e.colorTextDisabled
2590
2587
  })
2591
2588
  }),
@@ -2605,280 +2602,24 @@ const Ht = (e) => {
2605
2602
  })
2606
2603
  },
2607
2604
  // Follow code may reuse in other components
2608
- yt(e, "slide-up"),
2609
- yt(e, "slide-down"),
2610
- Et(e, "move-up"),
2611
- Et(e, "move-down")
2605
+ Ct(e, "slide-up"),
2606
+ Ct(e, "slide-down"),
2607
+ yt(e, "move-up"),
2608
+ yt(e, "move-down")
2612
2609
  ];
2613
- }, ia = (e) => {
2614
- const {
2615
- multipleSelectItemHeight: n,
2616
- paddingXXS: t,
2617
- lineWidth: r,
2618
- INTERNAL_FIXED_ITEM_MARGIN: a
2619
- } = e, i = e.max(e.calc(t).sub(r).equal(), 0), l = e.max(e.calc(i).sub(a).equal(), 0);
2620
- return {
2621
- basePadding: i,
2622
- containerPadding: l,
2623
- itemHeight: He(n),
2624
- itemLineHeight: He(e.calc(n).sub(e.calc(e.lineWidth).mul(2)).equal())
2625
- };
2626
- }, la = (e) => {
2627
- const {
2628
- multipleSelectItemHeight: n,
2629
- selectHeight: t,
2630
- lineWidth: r
2631
- } = e;
2632
- return e.calc(t).sub(n).div(2).sub(r).equal();
2633
- }, ua = (e) => {
2634
- const {
2635
- componentCls: n,
2636
- iconCls: t,
2637
- borderRadiusSM: r,
2638
- motionDurationSlow: a,
2639
- paddingXS: i,
2640
- multipleItemColorDisabled: l,
2641
- multipleItemBorderColorDisabled: u,
2642
- colorIcon: d,
2643
- colorIconHover: f,
2644
- INTERNAL_FIXED_ITEM_MARGIN: v
2645
- } = e;
2646
- return {
2647
- /**
2648
- * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
2649
- * may update to redesign with its align logic.
2650
- */
2651
- // =========================== Overflow ===========================
2652
- [`${n}-selection-overflow`]: {
2653
- position: "relative",
2654
- display: "flex",
2655
- flex: "auto",
2656
- flexWrap: "wrap",
2657
- maxWidth: "100%",
2658
- "&-item": {
2659
- flex: "none",
2660
- alignSelf: "center",
2661
- maxWidth: "100%",
2662
- display: "inline-flex"
2663
- },
2664
- // ======================== Selections ==========================
2665
- [`${n}-selection-item`]: {
2666
- display: "flex",
2667
- alignSelf: "center",
2668
- flex: "none",
2669
- boxSizing: "border-box",
2670
- maxWidth: "100%",
2671
- marginBlock: v,
2672
- borderRadius: r,
2673
- cursor: "default",
2674
- transition: `font-size ${a}, line-height ${a}, height ${a}`,
2675
- marginInlineEnd: e.calc(v).mul(2).equal(),
2676
- paddingInlineStart: i,
2677
- paddingInlineEnd: e.calc(i).div(2).equal(),
2678
- [`${n}-disabled&`]: {
2679
- color: l,
2680
- borderColor: u,
2681
- cursor: "not-allowed"
2682
- },
2683
- // It's ok not to do this, but 24px makes bottom narrow in view should adjust
2684
- "&-content": {
2685
- display: "inline-block",
2686
- marginInlineEnd: e.calc(i).div(2).equal(),
2687
- overflow: "hidden",
2688
- whiteSpace: "pre",
2689
- // fix whitespace wrapping. custom tags display all whitespace within.
2690
- textOverflow: "ellipsis"
2691
- },
2692
- "&-remove": Object.assign(Object.assign({}, At()), {
2693
- display: "inline-flex",
2694
- alignItems: "center",
2695
- color: d,
2696
- fontWeight: "bold",
2697
- fontSize: 10,
2698
- lineHeight: "inherit",
2699
- cursor: "pointer",
2700
- [`> ${t}`]: {
2701
- verticalAlign: "-0.2em"
2702
- },
2703
- "&:hover": {
2704
- color: f
2705
- }
2706
- })
2707
- }
2708
- }
2709
- };
2710
- }, ca = (e, n) => {
2711
- const {
2712
- componentCls: t,
2713
- INTERNAL_FIXED_ITEM_MARGIN: r
2714
- } = e, a = `${t}-selection-overflow`, i = e.multipleSelectItemHeight, l = la(e), u = n ? `${t}-${n}` : "", d = ia(e);
2715
- return {
2716
- [`${t}-multiple${u}`]: Object.assign(Object.assign({}, ua(e)), {
2717
- // ========================= Selector =========================
2718
- [`${t}-selector`]: {
2719
- display: "flex",
2720
- alignItems: "center",
2721
- width: "100%",
2722
- height: "100%",
2723
- // Multiple is little different that horizontal is follow the vertical
2724
- paddingInline: d.basePadding,
2725
- paddingBlock: d.containerPadding,
2726
- borderRadius: e.borderRadius,
2727
- [`${t}-disabled&`]: {
2728
- background: e.multipleSelectorBgDisabled,
2729
- cursor: "not-allowed"
2730
- },
2731
- "&:after": {
2732
- display: "inline-block",
2733
- width: 0,
2734
- margin: `${He(r)} 0`,
2735
- lineHeight: He(i),
2736
- visibility: "hidden",
2737
- content: '"\\a0"'
2738
- }
2739
- },
2740
- // ======================== Selections ========================
2741
- [`${t}-selection-item`]: {
2742
- height: d.itemHeight,
2743
- lineHeight: He(d.itemLineHeight)
2744
- },
2745
- // ========================== Wrap ===========================
2746
- [`${t}-selection-wrap`]: {
2747
- alignSelf: "flex-start",
2748
- "&:after": {
2749
- lineHeight: He(i),
2750
- marginBlock: r
2751
- }
2752
- },
2753
- // ========================== Input ==========================
2754
- [`${t}-prefix`]: {
2755
- marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(d.basePadding).equal()
2756
- },
2757
- [`${a}-item + ${a}-item,
2758
- ${t}-prefix + ${t}-selection-wrap
2759
- `]: {
2760
- [`${t}-selection-search`]: {
2761
- marginInlineStart: 0
2762
- },
2763
- [`${t}-selection-placeholder`]: {
2764
- insetInlineStart: 0
2765
- }
2766
- },
2767
- // https://github.com/ant-design/ant-design/issues/44754
2768
- // Same as `wrap:after`
2769
- [`${a}-item-suffix`]: {
2770
- minHeight: d.itemHeight,
2771
- marginBlock: r
2772
- },
2773
- [`${t}-selection-search`]: {
2774
- display: "inline-flex",
2775
- position: "relative",
2776
- maxWidth: "100%",
2777
- marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(l).equal(),
2778
- "\n &-input,\n &-mirror\n ": {
2779
- height: i,
2780
- fontFamily: e.fontFamily,
2781
- lineHeight: He(i),
2782
- transition: `all ${e.motionDurationSlow}`
2783
- },
2784
- "&-input": {
2785
- width: "100%",
2786
- minWidth: 4.1
2787
- // fix search cursor missing
2788
- },
2789
- "&-mirror": {
2790
- position: "absolute",
2791
- top: 0,
2792
- insetInlineStart: 0,
2793
- insetInlineEnd: "auto",
2794
- zIndex: 999,
2795
- whiteSpace: "pre",
2796
- // fix whitespace wrapping caused width calculation bug
2797
- visibility: "hidden"
2798
- }
2799
- },
2800
- // ======================= Placeholder =======================
2801
- [`${t}-selection-placeholder`]: {
2802
- position: "absolute",
2803
- top: "50%",
2804
- insetInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(d.basePadding).equal(),
2805
- insetInlineEnd: e.inputPaddingHorizontalBase,
2806
- transform: "translateY(-50%)",
2807
- transition: `all ${e.motionDurationSlow}`
2808
- }
2809
- })
2810
- };
2811
2610
  };
2812
2611
  function Gn(e, n) {
2813
- const {
2814
- componentCls: t
2815
- } = e, r = n ? `${t}-${n}` : "", a = {
2816
- [`${t}-multiple${r}`]: {
2817
- fontSize: e.fontSize,
2818
- // ========================= Selector =========================
2819
- [`${t}-selector`]: {
2820
- [`${t}-show-search&`]: {
2821
- cursor: "text"
2822
- }
2823
- },
2824
- [`
2825
- &${t}-show-arrow ${t}-selector,
2826
- &${t}-allow-clear ${t}-selector
2827
- `]: {
2828
- paddingInlineEnd: e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()
2829
- }
2830
- }
2831
- };
2832
- return [ca(e, n), a];
2833
- }
2834
- const sa = (e) => {
2835
- const {
2836
- componentCls: n
2837
- } = e, t = Mn(e, {
2838
- selectHeight: e.controlHeightSM,
2839
- multipleSelectItemHeight: e.multipleItemHeightSM,
2840
- borderRadius: e.borderRadiusSM,
2841
- borderRadiusSM: e.borderRadiusXS
2842
- }), r = Mn(e, {
2843
- fontSize: e.fontSizeLG,
2844
- selectHeight: e.controlHeightLG,
2845
- multipleSelectItemHeight: e.multipleItemHeightLG,
2846
- borderRadius: e.borderRadiusLG,
2847
- borderRadiusSM: e.borderRadius
2848
- });
2849
- return [
2850
- Gn(e),
2851
- // ======================== Small ========================
2852
- Gn(t, "sm"),
2853
- // Padding
2854
- {
2855
- [`${n}-multiple${n}-sm`]: {
2856
- [`${n}-selection-placeholder`]: {
2857
- insetInline: e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()
2858
- },
2859
- // https://github.com/ant-design/ant-design/issues/29559
2860
- [`${n}-selection-search`]: {
2861
- marginInlineStart: 2
2862
- // Magic Number
2863
- }
2864
- }
2865
- },
2866
- // ======================== Large ========================
2867
- Gn(r, "lg")
2868
- ];
2869
- };
2870
- function Yn(e, n) {
2871
2612
  const {
2872
2613
  componentCls: t,
2873
2614
  inputPaddingHorizontalBase: r,
2874
2615
  borderRadius: a
2875
- } = e, i = e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(), l = n ? `${t}-${n}` : "";
2616
+ } = e, l = e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(), i = n ? `${t}-${n}` : "";
2876
2617
  return {
2877
- [`${t}-single${l}`]: {
2618
+ [`${t}-single${i}`]: {
2878
2619
  fontSize: e.fontSize,
2879
2620
  height: e.controlHeight,
2880
2621
  // ========================= Selector =========================
2881
- [`${t}-selector`]: Object.assign(Object.assign({}, it(e, !0)), {
2622
+ [`${t}-selector`]: Object.assign(Object.assign({}, ot(e, !0)), {
2882
2623
  display: "flex",
2883
2624
  borderRadius: a,
2884
2625
  flex: "1 1 auto",
@@ -2897,7 +2638,7 @@ function Yn(e, n) {
2897
2638
  `]: {
2898
2639
  display: "block",
2899
2640
  padding: 0,
2900
- lineHeight: He(i),
2641
+ lineHeight: ke(l),
2901
2642
  transition: `all ${e.motionDurationSlow}, visibility 0s`,
2902
2643
  alignSelf: "center"
2903
2644
  },
@@ -2938,12 +2679,12 @@ function Yn(e, n) {
2938
2679
  width: "100%",
2939
2680
  height: "100%",
2940
2681
  alignItems: "center",
2941
- padding: `0 ${He(r)}`,
2682
+ padding: `0 ${ke(r)}`,
2942
2683
  [`${t}-selection-search-input`]: {
2943
- height: i
2684
+ height: l
2944
2685
  },
2945
2686
  "&:after": {
2946
- lineHeight: He(i)
2687
+ lineHeight: ke(l)
2947
2688
  }
2948
2689
  }
2949
2690
  },
@@ -2960,7 +2701,7 @@ function Yn(e, n) {
2960
2701
  position: "absolute",
2961
2702
  insetInlineStart: 0,
2962
2703
  insetInlineEnd: 0,
2963
- padding: `0 ${He(r)}`,
2704
+ padding: `0 ${ke(r)}`,
2964
2705
  "&:after": {
2965
2706
  display: "none"
2966
2707
  }
@@ -2970,15 +2711,15 @@ function Yn(e, n) {
2970
2711
  }
2971
2712
  };
2972
2713
  }
2973
- function da(e) {
2714
+ function na(e) {
2974
2715
  const {
2975
2716
  componentCls: n
2976
2717
  } = e, t = e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();
2977
2718
  return [
2978
- Yn(e),
2719
+ Gn(e),
2979
2720
  // ======================== Small ========================
2980
2721
  // Shared
2981
- Yn(Mn(e, {
2722
+ Gn(Hn(e, {
2982
2723
  controlHeight: e.controlHeightSM,
2983
2724
  borderRadius: e.borderRadiusSM
2984
2725
  }), "sm"),
@@ -2987,7 +2728,7 @@ function da(e) {
2987
2728
  [`${n}-single${n}-sm`]: {
2988
2729
  [`&:not(${n}-customize-input)`]: {
2989
2730
  [`${n}-selector`]: {
2990
- padding: `0 ${He(t)}`
2731
+ padding: `0 ${ke(t)}`
2991
2732
  },
2992
2733
  // With arrow should provides `padding-right` to show the arrow
2993
2734
  [`&${n}-show-arrow ${n}-selection-search`]: {
@@ -3004,42 +2745,42 @@ function da(e) {
3004
2745
  },
3005
2746
  // ======================== Large ========================
3006
2747
  // Shared
3007
- Yn(Mn(e, {
2748
+ Gn(Hn(e, {
3008
2749
  controlHeight: e.singleItemHeightLG,
3009
2750
  fontSize: e.fontSizeLG,
3010
2751
  borderRadius: e.borderRadiusLG
3011
2752
  }), "lg")
3012
2753
  ];
3013
2754
  }
3014
- const fa = (e) => {
2755
+ const ta = (e) => {
3015
2756
  const {
3016
2757
  fontSize: n,
3017
2758
  lineHeight: t,
3018
2759
  lineWidth: r,
3019
2760
  controlHeight: a,
3020
- controlHeightSM: i,
3021
- controlHeightLG: l,
2761
+ controlHeightSM: l,
2762
+ controlHeightLG: i,
3022
2763
  paddingXXS: u,
3023
2764
  controlPaddingHorizontal: d,
3024
2765
  zIndexPopupBase: f,
3025
2766
  colorText: v,
3026
2767
  fontWeightStrong: s,
3027
- controlItemBgActive: b,
2768
+ controlItemBgActive: h,
3028
2769
  controlItemBgHover: c,
3029
2770
  colorBgContainer: g,
3030
2771
  colorFillSecondary: m,
3031
2772
  colorBgContainerDisabled: S,
3032
- colorTextDisabled: w,
3033
- colorPrimaryHover: h,
3034
- colorPrimary: E,
3035
- controlOutline: C
3036
- } = e, T = u * 2, p = r * 2, I = Math.min(a - T, a - p), B = Math.min(i - T, i - p), z = Math.min(l - T, l - p);
2773
+ colorTextDisabled: C,
2774
+ colorPrimaryHover: b,
2775
+ colorPrimary: x,
2776
+ controlOutline: w
2777
+ } = e, B = u * 2, p = r * 2, E = Math.min(a - B, a - p), L = Math.min(l - B, l - p), H = Math.min(i - B, i - p);
3037
2778
  return {
3038
2779
  INTERNAL_FIXED_ITEM_MARGIN: Math.floor(u / 2),
3039
2780
  zIndexPopup: f + 50,
3040
2781
  optionSelectedColor: v,
3041
2782
  optionSelectedFontWeight: s,
3042
- optionSelectedBg: b,
2783
+ optionSelectedBg: h,
3043
2784
  optionActiveBg: c,
3044
2785
  optionPadding: `${(a - n * t) / 2}px ${d}px`,
3045
2786
  optionFontSize: n,
@@ -3047,22 +2788,22 @@ const fa = (e) => {
3047
2788
  optionHeight: a,
3048
2789
  selectorBg: g,
3049
2790
  clearBg: g,
3050
- singleItemHeightLG: l,
2791
+ singleItemHeightLG: i,
3051
2792
  multipleItemBg: m,
3052
2793
  multipleItemBorderColor: "transparent",
3053
- multipleItemHeight: I,
3054
- multipleItemHeightSM: B,
3055
- multipleItemHeightLG: z,
2794
+ multipleItemHeight: E,
2795
+ multipleItemHeightSM: L,
2796
+ multipleItemHeightLG: H,
3056
2797
  multipleSelectorBgDisabled: S,
3057
- multipleItemColorDisabled: w,
2798
+ multipleItemColorDisabled: C,
3058
2799
  multipleItemBorderColorDisabled: "transparent",
3059
2800
  showArrowPaddingInlineEnd: Math.ceil(e.fontSize * 1.25),
3060
- hoverBorderColor: h,
3061
- activeBorderColor: E,
3062
- activeOutlineColor: C,
2801
+ hoverBorderColor: b,
2802
+ activeBorderColor: x,
2803
+ activeOutlineColor: w,
3063
2804
  selectAffixPadding: u
3064
2805
  };
3065
- }, ar = (e, n) => {
2806
+ }, rr = (e, n) => {
3066
2807
  const {
3067
2808
  componentCls: t,
3068
2809
  antCls: r,
@@ -3070,7 +2811,7 @@ const fa = (e) => {
3070
2811
  } = e;
3071
2812
  return {
3072
2813
  [`&:not(${t}-customize-input) ${t}-selector`]: {
3073
- border: `${He(e.lineWidth)} ${e.lineType} ${n.borderColor}`,
2814
+ border: `${ke(e.lineWidth)} ${e.lineType} ${n.borderColor}`,
3074
2815
  background: e.selectorBg
3075
2816
  },
3076
2817
  [`&:not(${t}-disabled):not(${t}-customize-input):not(${r}-pagination-size-changer)`]: {
@@ -3079,7 +2820,7 @@ const fa = (e) => {
3079
2820
  },
3080
2821
  [`${t}-focused& ${t}-selector`]: {
3081
2822
  borderColor: n.activeBorderColor,
3082
- boxShadow: `0 0 0 ${He(a)} ${n.activeOutlineColor}`,
2823
+ boxShadow: `0 0 0 ${ke(a)} ${n.activeOutlineColor}`,
3083
2824
  outline: 0
3084
2825
  },
3085
2826
  [`${t}-prefix`]: {
@@ -3087,23 +2828,23 @@ const fa = (e) => {
3087
2828
  }
3088
2829
  }
3089
2830
  };
3090
- }, Bt = (e, n) => ({
3091
- [`&${e.componentCls}-status-${n.status}`]: Object.assign({}, ar(e, n))
3092
- }), ma = (e) => ({
3093
- "&-outlined": Object.assign(Object.assign(Object.assign(Object.assign({}, ar(e, {
2831
+ }, Vt = (e, n) => ({
2832
+ [`&${e.componentCls}-status-${n.status}`]: Object.assign({}, rr(e, n))
2833
+ }), ra = (e) => ({
2834
+ "&-outlined": Object.assign(Object.assign(Object.assign(Object.assign({}, rr(e, {
3094
2835
  borderColor: e.colorBorder,
3095
2836
  hoverBorderHover: e.hoverBorderColor,
3096
2837
  activeBorderColor: e.activeBorderColor,
3097
2838
  activeOutlineColor: e.activeOutlineColor,
3098
2839
  color: e.colorText
3099
- })), Bt(e, {
2840
+ })), Vt(e, {
3100
2841
  status: "error",
3101
2842
  borderColor: e.colorError,
3102
2843
  hoverBorderHover: e.colorErrorHover,
3103
2844
  activeBorderColor: e.colorError,
3104
2845
  activeOutlineColor: e.colorErrorOutline,
3105
2846
  color: e.colorError
3106
- })), Bt(e, {
2847
+ })), Vt(e, {
3107
2848
  status: "warning",
3108
2849
  borderColor: e.colorWarning,
3109
2850
  hoverBorderHover: e.colorWarningHover,
@@ -3119,10 +2860,10 @@ const fa = (e) => {
3119
2860
  },
3120
2861
  [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
3121
2862
  background: e.multipleItemBg,
3122
- border: `${He(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
2863
+ border: `${ke(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
3123
2864
  }
3124
2865
  })
3125
- }), ir = (e, n) => {
2866
+ }), or = (e, n) => {
3126
2867
  const {
3127
2868
  componentCls: t,
3128
2869
  antCls: r
@@ -3130,7 +2871,7 @@ const fa = (e) => {
3130
2871
  return {
3131
2872
  [`&:not(${t}-customize-input) ${t}-selector`]: {
3132
2873
  background: n.bg,
3133
- border: `${He(e.lineWidth)} ${e.lineType} transparent`,
2874
+ border: `${ke(e.lineWidth)} ${e.lineType} transparent`,
3134
2875
  color: n.color
3135
2876
  },
3136
2877
  [`&:not(${t}-disabled):not(${t}-customize-input):not(${r}-pagination-size-changer)`]: {
@@ -3144,21 +2885,21 @@ const fa = (e) => {
3144
2885
  }
3145
2886
  }
3146
2887
  };
3147
- }, Vt = (e, n) => ({
3148
- [`&${e.componentCls}-status-${n.status}`]: Object.assign({}, ir(e, n))
3149
- }), va = (e) => ({
3150
- "&-filled": Object.assign(Object.assign(Object.assign(Object.assign({}, ir(e, {
2888
+ }, Lt = (e, n) => ({
2889
+ [`&${e.componentCls}-status-${n.status}`]: Object.assign({}, or(e, n))
2890
+ }), oa = (e) => ({
2891
+ "&-filled": Object.assign(Object.assign(Object.assign(Object.assign({}, or(e, {
3151
2892
  bg: e.colorFillTertiary,
3152
2893
  hoverBg: e.colorFillSecondary,
3153
2894
  activeBorderColor: e.activeBorderColor,
3154
2895
  color: e.colorText
3155
- })), Vt(e, {
2896
+ })), Lt(e, {
3156
2897
  status: "error",
3157
2898
  bg: e.colorErrorBg,
3158
2899
  hoverBg: e.colorErrorBgHover,
3159
2900
  activeBorderColor: e.colorError,
3160
2901
  color: e.colorError
3161
- })), Vt(e, {
2902
+ })), Lt(e, {
3162
2903
  status: "warning",
3163
2904
  bg: e.colorWarningBg,
3164
2905
  hoverBg: e.colorWarningBgHover,
@@ -3174,14 +2915,14 @@ const fa = (e) => {
3174
2915
  },
3175
2916
  [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
3176
2917
  background: e.colorBgContainer,
3177
- border: `${He(e.lineWidth)} ${e.lineType} ${e.colorSplit}`
2918
+ border: `${ke(e.lineWidth)} ${e.lineType} ${e.colorSplit}`
3178
2919
  }
3179
2920
  })
3180
- }), ga = (e) => ({
2921
+ }), aa = (e) => ({
3181
2922
  "&-borderless": {
3182
2923
  [`${e.componentCls}-selector`]: {
3183
2924
  background: "transparent",
3184
- border: `${He(e.lineWidth)} ${e.lineType} transparent`
2925
+ border: `${ke(e.lineWidth)} ${e.lineType} transparent`
3185
2926
  },
3186
2927
  [`&${e.componentCls}-disabled`]: {
3187
2928
  [`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
@@ -3190,7 +2931,7 @@ const fa = (e) => {
3190
2931
  },
3191
2932
  [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
3192
2933
  background: e.multipleItemBg,
3193
- border: `${He(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
2934
+ border: `${ke(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
3194
2935
  },
3195
2936
  // Status
3196
2937
  [`&${e.componentCls}-status-error`]: {
@@ -3204,9 +2945,9 @@ const fa = (e) => {
3204
2945
  }
3205
2946
  }
3206
2947
  }
3207
- }), pa = (e) => ({
3208
- [e.componentCls]: Object.assign(Object.assign(Object.assign({}, ma(e)), va(e)), ga(e))
3209
- }), ha = (e) => {
2948
+ }), ia = (e) => ({
2949
+ [e.componentCls]: Object.assign(Object.assign(Object.assign({}, ra(e)), oa(e)), aa(e))
2950
+ }), la = (e) => {
3210
2951
  const {
3211
2952
  componentCls: n
3212
2953
  } = e;
@@ -3231,7 +2972,7 @@ const fa = (e) => {
3231
2972
  }
3232
2973
  }
3233
2974
  };
3234
- }, ba = (e) => {
2975
+ }, ua = (e) => {
3235
2976
  const {
3236
2977
  componentCls: n
3237
2978
  } = e;
@@ -3250,7 +2991,7 @@ const fa = (e) => {
3250
2991
  }
3251
2992
  }
3252
2993
  };
3253
- }, Sa = (e) => {
2994
+ }, ca = (e) => {
3254
2995
  const {
3255
2996
  antCls: n,
3256
2997
  componentCls: t,
@@ -3258,31 +2999,31 @@ const fa = (e) => {
3258
2999
  iconCls: a
3259
3000
  } = e;
3260
3001
  return {
3261
- [t]: Object.assign(Object.assign({}, it(e)), {
3002
+ [t]: Object.assign(Object.assign({}, ot(e)), {
3262
3003
  position: "relative",
3263
3004
  display: "inline-flex",
3264
3005
  cursor: "pointer",
3265
- [`&:not(${t}-customize-input) ${t}-selector`]: Object.assign(Object.assign({}, ha(e)), ba(e)),
3006
+ [`&:not(${t}-customize-input) ${t}-selector`]: Object.assign(Object.assign({}, la(e)), ua(e)),
3266
3007
  // ======================== Selection ========================
3267
3008
  [`${t}-selection-item`]: Object.assign(Object.assign({
3268
3009
  flex: 1,
3269
3010
  fontWeight: "normal",
3270
3011
  position: "relative",
3271
3012
  userSelect: "none"
3272
- }, Qn), {
3013
+ }, qn), {
3273
3014
  // https://github.com/ant-design/ant-design/issues/40421
3274
3015
  [`> ${n}-typography`]: {
3275
3016
  display: "inline"
3276
3017
  }
3277
3018
  }),
3278
3019
  // ======================= Placeholder =======================
3279
- [`${t}-selection-placeholder`]: Object.assign(Object.assign({}, Qn), {
3020
+ [`${t}-selection-placeholder`]: Object.assign(Object.assign({}, qn), {
3280
3021
  flex: 1,
3281
3022
  color: e.colorTextPlaceholder,
3282
3023
  pointerEvents: "none"
3283
3024
  }),
3284
3025
  // ========================== Arrow ==========================
3285
- [`${t}-arrow`]: Object.assign(Object.assign({}, At()), {
3026
+ [`${t}-arrow`]: Object.assign(Object.assign({}, Er()), {
3286
3027
  position: "absolute",
3287
3028
  top: "50%",
3288
3029
  insetInlineStart: "auto",
@@ -3378,7 +3119,7 @@ const fa = (e) => {
3378
3119
  }
3379
3120
  }
3380
3121
  };
3381
- }, wa = (e) => {
3122
+ }, sa = (e) => {
3382
3123
  const {
3383
3124
  componentCls: n
3384
3125
  } = e;
@@ -3395,13 +3136,13 @@ const fa = (e) => {
3395
3136
  // == LTR ==
3396
3137
  // =====================================================
3397
3138
  // Base
3398
- Sa(e),
3139
+ ca(e),
3399
3140
  // Single
3400
- da(e),
3141
+ na(e),
3401
3142
  // Multiple
3402
- sa(e),
3143
+ Wr(e),
3403
3144
  // Dropdown
3404
- aa(e),
3145
+ ea(e),
3405
3146
  // =====================================================
3406
3147
  // == RTL ==
3407
3148
  // =====================================================
@@ -3413,216 +3154,168 @@ const fa = (e) => {
3413
3154
  // =====================================================
3414
3155
  // == Space Compact ==
3415
3156
  // =====================================================
3416
- Kr(e, {
3157
+ jr(e, {
3417
3158
  borderElCls: `${n}-selector`,
3418
3159
  focusElCls: `${n}-focused`
3419
3160
  })
3420
3161
  ];
3421
- }, Ca = zt("Select", (e, n) => {
3162
+ }, da = Bt("Select", (e, n) => {
3422
3163
  let {
3423
3164
  rootPrefixCls: t
3424
3165
  } = n;
3425
- const r = Mn(e, {
3166
+ const r = Hn(e, {
3426
3167
  rootPrefixCls: t,
3427
3168
  inputPaddingHorizontalBase: e.calc(e.paddingSM).sub(1).equal(),
3428
3169
  multipleSelectItemHeight: e.multipleItemHeight,
3429
3170
  selectHeight: e.controlHeight
3430
3171
  });
3431
- return [wa(r), pa(r)];
3432
- }, fa, {
3172
+ return [sa(r), ia(r)];
3173
+ }, ta, {
3433
3174
  unitless: {
3434
3175
  optionLineHeight: !0,
3435
3176
  optionSelectedFontWeight: !0
3436
3177
  }
3437
3178
  });
3438
- function ya(e) {
3439
- let {
3440
- suffixIcon: n,
3441
- clearIcon: t,
3442
- menuItemSelectedIcon: r,
3443
- removeIcon: a,
3444
- loading: i,
3445
- multiple: l,
3446
- hasFeedback: u,
3447
- prefixCls: d,
3448
- showSuffixIcon: f,
3449
- feedbackIcon: v,
3450
- showArrow: s,
3451
- componentName: b
3452
- } = e;
3453
- process.env.NODE_ENV !== "production" && at(b).deprecated(!t, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
3454
- const c = t ?? /* @__PURE__ */ o.createElement(Ur, null), g = (h) => n === null && !u && !s ? null : /* @__PURE__ */ o.createElement(o.Fragment, null, f !== !1 && h, u && v);
3455
- let m = null;
3456
- if (n !== void 0)
3457
- m = g(n);
3458
- else if (i)
3459
- m = g(/* @__PURE__ */ o.createElement(Yr, {
3460
- spin: !0
3461
- }));
3462
- else {
3463
- const h = `${d}-suffix`;
3464
- m = (E) => {
3465
- let {
3466
- open: C,
3467
- showSearch: T
3468
- } = E;
3469
- return g(C && T ? /* @__PURE__ */ o.createElement(qr, {
3470
- className: h
3471
- }) : /* @__PURE__ */ o.createElement(Lr, {
3472
- className: h
3473
- }));
3474
- };
3475
- }
3476
- let S = null;
3477
- r !== void 0 ? S = r : l ? S = /* @__PURE__ */ o.createElement(Xr, null) : S = null;
3478
- let w = null;
3479
- return a !== void 0 ? w = a : w = /* @__PURE__ */ o.createElement(Gr, null), {
3480
- clearIcon: c,
3481
- suffixIcon: m,
3482
- itemIcon: S,
3483
- removeIcon: w
3484
- };
3485
- }
3486
- function Ea(e, n) {
3179
+ function fa(e, n) {
3487
3180
  return n !== void 0 ? n : e !== null;
3488
3181
  }
3489
- var Ia = function(e, n) {
3182
+ var ma = function(e, n) {
3490
3183
  var t = {};
3491
3184
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
3492
3185
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
3493
3186
  n.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
3494
3187
  return t;
3495
3188
  };
3496
- const lr = "SECRET_COMBOBOX_MODE_DO_NOT_USE", ur = (e, n) => {
3189
+ const ar = "SECRET_COMBOBOX_MODE_DO_NOT_USE", ir = (e, n) => {
3497
3190
  var t;
3498
3191
  const {
3499
3192
  prefixCls: r,
3500
3193
  bordered: a,
3501
- className: i,
3502
- rootClassName: l,
3194
+ className: l,
3195
+ rootClassName: i,
3503
3196
  getPopupContainer: u,
3504
3197
  popupClassName: d,
3505
3198
  dropdownClassName: f,
3506
3199
  listHeight: v = 256,
3507
3200
  placement: s,
3508
- listItemHeight: b,
3201
+ listItemHeight: h,
3509
3202
  size: c,
3510
3203
  disabled: g,
3511
3204
  notFoundContent: m,
3512
3205
  status: S,
3513
- builtinPlacements: w,
3514
- dropdownMatchSelectWidth: h,
3515
- popupMatchSelectWidth: E,
3516
- direction: C,
3517
- style: T,
3206
+ builtinPlacements: C,
3207
+ dropdownMatchSelectWidth: b,
3208
+ popupMatchSelectWidth: x,
3209
+ direction: w,
3210
+ style: B,
3518
3211
  allowClear: p,
3519
- variant: I,
3520
- dropdownStyle: B,
3521
- transitionName: z,
3212
+ variant: E,
3213
+ dropdownStyle: L,
3214
+ transitionName: H,
3522
3215
  tagRender: q,
3523
3216
  maxCount: _,
3524
- prefix: F
3525
- } = e, U = Ia(e, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear", "variant", "dropdownStyle", "transitionName", "tagRender", "maxCount", "prefix"]), {
3217
+ prefix: A
3218
+ } = e, X = ma(e, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear", "variant", "dropdownStyle", "transitionName", "tagRender", "maxCount", "prefix"]), {
3526
3219
  getPopupContainer: Q,
3527
3220
  getPrefixCls: G,
3528
3221
  renderEmpty: j,
3529
3222
  direction: ne,
3530
3223
  virtual: Z,
3531
3224
  popupMatchSelectWidth: Y,
3532
- popupOverflow: x,
3533
- select: M
3534
- } = o.useContext(ot), [, fe] = rt(), ie = b ?? (fe == null ? void 0 : fe.controlHeight), J = G("select", r), se = G(), Ce = C ?? ne, {
3225
+ popupOverflow: I,
3226
+ select: D
3227
+ } = o.useContext(rt), [, fe] = tt(), ie = h ?? (fe == null ? void 0 : fe.controlHeight), J = G("select", r), se = G(), ye = w ?? ne, {
3535
3228
  compactSize: ge,
3536
- compactItemClassnames: Oe
3537
- } = Wr(J, Ce), [ce, pe] = Br("select", I, a), O = Ar(J), [y, D, K] = Ca(J, O), R = o.useMemo(() => {
3229
+ compactItemClassnames: Re
3230
+ } = Ar(J, ye), [ce, pe] = Vr("select", E, a), R = zr(J), [y, $, K] = da(J, R), O = o.useMemo(() => {
3538
3231
  const {
3539
3232
  mode: _e
3540
3233
  } = e;
3541
3234
  if (_e !== "combobox")
3542
- return _e === lr ? "combobox" : _e;
3543
- }, [e.mode]), A = R === "multiple" || R === "tags", le = Ea(e.suffixIcon, e.showArrow), me = (t = E ?? h) !== null && t !== void 0 ? t : Y, {
3235
+ return _e === ar ? "combobox" : _e;
3236
+ }, [e.mode]), F = O === "multiple" || O === "tags", le = fa(e.suffixIcon, e.showArrow), me = (t = x ?? b) !== null && t !== void 0 ? t : Y, {
3544
3237
  status: re,
3545
- hasFeedback: we,
3546
- isFormItemInput: Be,
3238
+ hasFeedback: Ce,
3239
+ isFormItemInput: Le,
3547
3240
  feedbackIcon: xe
3548
- } = o.useContext(jr), Ne = zr(re, S);
3241
+ } = o.useContext(Fr), Ne = Br(re, S);
3549
3242
  let de;
3550
- m !== void 0 ? de = m : R === "combobox" ? de = null : de = (j == null ? void 0 : j("Select")) || /* @__PURE__ */ o.createElement(ta, {
3243
+ m !== void 0 ? de = m : O === "combobox" ? de = null : de = (j == null ? void 0 : j("Select")) || /* @__PURE__ */ o.createElement(Zo, {
3551
3244
  componentName: "Select"
3552
3245
  });
3553
3246
  const {
3554
- suffixIcon: Ge,
3555
- itemIcon: Ye,
3247
+ suffixIcon: Xe,
3248
+ itemIcon: Ge,
3556
3249
  removeIcon: Se,
3557
- clearIcon: $e
3558
- } = ya(Object.assign(Object.assign({}, U), {
3559
- multiple: A,
3560
- hasFeedback: we,
3250
+ clearIcon: Me
3251
+ } = Kr(Object.assign(Object.assign({}, X), {
3252
+ multiple: F,
3253
+ hasFeedback: Ce,
3561
3254
  feedbackIcon: xe,
3562
3255
  showSuffixIcon: le,
3563
3256
  prefixCls: J,
3564
3257
  componentName: "Select"
3565
- })), ye = p === !0 ? {
3566
- clearIcon: $e
3567
- } : p, Re = Ft(U, ["suffixIcon", "itemIcon"]), Pe = Ve(d || f, {
3568
- [`${J}-dropdown-${Ce}`]: Ce === "rtl"
3569
- }, l, K, O, D), en = Fr((_e) => {
3570
- var De;
3571
- return (De = c ?? ge) !== null && De !== void 0 ? De : _e;
3572
- }), je = o.useContext(xr), Ae = g ?? je, Ee = Ve({
3258
+ })), we = p === !0 ? {
3259
+ clearIcon: Me
3260
+ } : p, Oe = Ht(X, ["suffixIcon", "itemIcon"]), Pe = Be(d || f, {
3261
+ [`${J}-dropdown-${ye}`]: ye === "rtl"
3262
+ }, i, K, R, $), en = Hr((_e) => {
3263
+ var $e;
3264
+ return ($e = c ?? ge) !== null && $e !== void 0 ? $e : _e;
3265
+ }), Ae = o.useContext(Ir), He = g ?? Ae, Ee = Be({
3573
3266
  [`${J}-lg`]: en === "large",
3574
3267
  [`${J}-sm`]: en === "small",
3575
- [`${J}-rtl`]: Ce === "rtl",
3268
+ [`${J}-rtl`]: ye === "rtl",
3576
3269
  [`${J}-${ce}`]: pe,
3577
- [`${J}-in-form-item`]: Be
3578
- }, Vr(J, Ne, we), Oe, M == null ? void 0 : M.className, i, l, K, O, D), hn = o.useMemo(() => s !== void 0 ? s : Ce === "rtl" ? "bottomRight" : "bottomLeft", [s, Ce]);
3270
+ [`${J}-in-form-item`]: Le
3271
+ }, Lr(J, Ne, Ce), Re, D == null ? void 0 : D.className, l, i, K, R, $), hn = o.useMemo(() => s !== void 0 ? s : ye === "rtl" ? "bottomRight" : "bottomLeft", [s, ye]);
3579
3272
  if (process.env.NODE_ENV !== "production") {
3580
- const _e = at("Select");
3581
- _e.deprecated(!f, "dropdownClassName", "popupClassName"), _e.deprecated(h === void 0, "dropdownMatchSelectWidth", "popupMatchSelectWidth"), process.env.NODE_ENV !== "production" && _e(!("showArrow" in e), "deprecated", "`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."), _e.deprecated(!("bordered" in e), "bordered", "variant"), process.env.NODE_ENV !== "production" && _e(!(typeof _ < "u" && !A), "usage", "`maxCount` only works with mode `multiple` or `tags`");
3273
+ const _e = zt("Select");
3274
+ _e.deprecated(!f, "dropdownClassName", "popupClassName"), _e.deprecated(b === void 0, "dropdownMatchSelectWidth", "popupMatchSelectWidth"), process.env.NODE_ENV !== "production" && _e(!("showArrow" in e), "deprecated", "`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."), _e.deprecated(!("bordered" in e), "bordered", "variant"), process.env.NODE_ENV !== "production" && _e(!(typeof _ < "u" && !F), "usage", "`maxCount` only works with mode `multiple` or `tags`");
3582
3275
  }
3583
- const [Fe] = Tr("SelectLike", B == null ? void 0 : B.zIndex);
3584
- return y(/* @__PURE__ */ o.createElement(vt, Object.assign({
3276
+ const [Fe] = Pr("SelectLike", L == null ? void 0 : L.zIndex);
3277
+ return y(/* @__PURE__ */ o.createElement(ft, Object.assign({
3585
3278
  ref: n,
3586
3279
  virtual: Z,
3587
- showSearch: M == null ? void 0 : M.showSearch
3588
- }, Re, {
3589
- style: Object.assign(Object.assign({}, M == null ? void 0 : M.style), T),
3280
+ showSearch: D == null ? void 0 : D.showSearch
3281
+ }, Oe, {
3282
+ style: Object.assign(Object.assign({}, D == null ? void 0 : D.style), B),
3590
3283
  dropdownMatchSelectWidth: me,
3591
- transitionName: $r(se, "slide-up", z),
3592
- builtinPlacements: oa(w, x),
3284
+ transitionName: _r(se, "slide-up", H),
3285
+ builtinPlacements: ko(C, I),
3593
3286
  listHeight: v,
3594
3287
  listItemHeight: ie,
3595
- mode: R,
3288
+ mode: O,
3596
3289
  prefixCls: J,
3597
3290
  placement: hn,
3598
- direction: Ce,
3599
- prefix: F,
3600
- suffixIcon: Ge,
3601
- menuItemSelectedIcon: Ye,
3291
+ direction: ye,
3292
+ prefix: A,
3293
+ suffixIcon: Xe,
3294
+ menuItemSelectedIcon: Ge,
3602
3295
  removeIcon: Se,
3603
- allowClear: ye,
3296
+ allowClear: we,
3604
3297
  notFoundContent: de,
3605
3298
  className: Ee,
3606
3299
  getPopupContainer: u || Q,
3607
3300
  dropdownClassName: Pe,
3608
- disabled: Ae,
3609
- dropdownStyle: Object.assign(Object.assign({}, B), {
3301
+ disabled: He,
3302
+ dropdownStyle: Object.assign(Object.assign({}, L), {
3610
3303
  zIndex: Fe
3611
3304
  }),
3612
- maxCount: A ? _ : void 0,
3613
- tagRender: A ? q : void 0
3305
+ maxCount: F ? _ : void 0,
3306
+ tagRender: F ? q : void 0
3614
3307
  })));
3615
3308
  };
3616
- process.env.NODE_ENV !== "production" && (ur.displayName = "Select");
3617
- const Dn = /* @__PURE__ */ o.forwardRef(ur), xa = Hr(Dn, "dropdownAlign");
3618
- Dn.SECRET_COMBOBOX_MODE_DO_NOT_USE = lr;
3619
- Dn.Option = ft;
3620
- Dn.OptGroup = dt;
3621
- Dn._InternalPanelDoNotUseOrYouWillBeFired = xa;
3309
+ process.env.NODE_ENV !== "production" && (ir.displayName = "Select");
3310
+ const Dn = /* @__PURE__ */ o.forwardRef(ir), va = Tr(Dn, "dropdownAlign");
3311
+ Dn.SECRET_COMBOBOX_MODE_DO_NOT_USE = ar;
3312
+ Dn.Option = st;
3313
+ Dn.OptGroup = ct;
3314
+ Dn._InternalPanelDoNotUseOrYouWillBeFired = va;
3622
3315
  process.env.NODE_ENV !== "production" && (Dn.displayName = "Select");
3623
3316
  export {
3624
- ta as D,
3317
+ Zo as D,
3625
3318
  gn as E,
3626
- Jt as L,
3319
+ Qt as L,
3627
3320
  Dn as S
3628
3321
  };