@unicom-cloud/ui 0.8.111 → 0.8.112

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 (318) hide show
  1. package/Affix.js +3 -3
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +1 -1
  4. package/BackTop.js +1 -1
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +1 -1
  9. package/Card.js +1 -1
  10. package/Carousel.js +2 -2
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/ColorPicker.js +1 -1
  14. package/Comment.js +1 -1
  15. package/ConfigProvider.js +1 -1
  16. package/Copy.js +2 -2
  17. package/Countdown.js +17 -17
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Details.js +19 -19
  21. package/Development.js +1 -1
  22. package/Divider.js +1 -1
  23. package/Draggable.js +1 -1
  24. package/Dropdown.js +1 -1
  25. package/Empty.js +1 -1
  26. package/Flex.js +18 -18
  27. package/Form.js +1 -1
  28. package/Icon.js +1 -1
  29. package/IconHover.js +1 -1
  30. package/Image.js +1 -1
  31. package/InputNumber.js +1 -1
  32. package/Layout.js +1 -1
  33. package/Link.js +1 -1
  34. package/LiquidFill.js +19 -19
  35. package/List.js +1 -1
  36. package/Loading.js +18 -18
  37. package/Marquee.js +19 -19
  38. package/Mentions.js +1 -1
  39. package/Menu.js +1 -1
  40. package/Message.js +1 -1
  41. package/Modal.js +1 -1
  42. package/Notice.js +18 -18
  43. package/Notification.js +1 -1
  44. package/OverflowEllipsis.js +2 -2
  45. package/PageHeader.js +2 -2
  46. package/Popconfirm.js +1 -1
  47. package/Popover.js +1 -1
  48. package/Progress.js +1 -1
  49. package/QrCode.js +18 -18
  50. package/Radio.js +1 -1
  51. package/Rate.js +1 -1
  52. package/ResizeBox.js +1 -1
  53. package/Result.js +1 -1
  54. package/RichText.js +2 -2
  55. package/Segmented.js +20 -20
  56. package/Skeleton.js +1 -1
  57. package/Slider.js +1 -1
  58. package/Space.js +18 -18
  59. package/Spin.js +1 -1
  60. package/Statistic.js +1 -1
  61. package/Steps.js +1 -1
  62. package/Switch.js +1 -1
  63. package/Table.js +1 -1
  64. package/Tabs.js +1 -1
  65. package/Tag.js +1 -1
  66. package/Tooltip.js +1 -1
  67. package/Tour.js +19 -19
  68. package/Transfer.js +1 -1
  69. package/Tree.js +1 -1
  70. package/TreeSelect.js +1 -1
  71. package/Trigger.js +2 -2
  72. package/affix/index.js +3 -3
  73. package/alert/index.js +1 -1
  74. package/anchor/Anchor.js +1 -1
  75. package/anchor/Link.js +1 -1
  76. package/app/App.js +2 -2
  77. package/auto-complete/index.js +1 -1
  78. package/avatar/Avatar.js +1 -1
  79. package/avatar/Group.js +1 -1
  80. package/back-top/index.js +1 -1
  81. package/badge/index.js +1 -1
  82. package/breadcrumb/index.js +2 -2
  83. package/button/Group.js +1 -1
  84. package/button/index.js +1 -1
  85. package/calendar/index.js +2 -2
  86. package/card/Grid.js +1 -1
  87. package/card/Meta.js +1 -1
  88. package/card/index.js +1 -1
  89. package/carousel/Arrow.js +1 -1
  90. package/carousel/Indicator.js +1 -1
  91. package/carousel/index.js +2 -2
  92. package/cascader/Cascader.js +3 -3
  93. package/cascader/index.js +1 -1
  94. package/cascader/util.js +1 -1
  95. package/checkbox/Checkbox.js +2 -2
  96. package/checkbox/Group.js +2 -2
  97. package/checkbox/GroupBlock.js +2 -2
  98. package/checkbox/index.js +2 -2
  99. package/chunk/{Y_GQsZUt.js → 0BhDjhcd.js} +1 -1
  100. package/chunk/{BDMqvmVH.js → BCmfDFV4.js} +28 -30
  101. package/chunk/{n1tirBXA.js → BfVlSL8A.js} +3 -3
  102. package/chunk/BiZSULcr.js +1872 -0
  103. package/chunk/{BcEZk8pT.js → C1vY8016.js} +14 -14
  104. package/chunk/{qsVvkBLU.js → C3kH2ES3.js} +1 -1
  105. package/chunk/{BGJspFG9.js → C5CbL5ku.js} +1 -1
  106. package/chunk/CAA93JLq.js +6 -0
  107. package/chunk/{B8W1N4er.js → CHQ8c547.js} +11 -10
  108. package/chunk/{Dbw0YUY1.js → CYssV-zz.js} +36 -36
  109. package/chunk/CrOzsnI0.js +51 -0
  110. package/chunk/{CFyN9Eio.js → CtCFA4ht.js} +4 -4
  111. package/chunk/{BnUWOu3_.js → Cx92e1S8.js} +3 -3
  112. package/chunk/{BeHcDey_.js → CylbdYce.js} +1 -1
  113. package/chunk/{BUNoUPLs.js → DMv8Hn4u.js} +1 -1
  114. package/chunk/{BlflTd2i.js → DfUcAhyT.js} +433 -470
  115. package/chunk/{DSqW_efI.js → DfbO4QTS.js} +152 -156
  116. package/chunk/{CgN4U7Ou.js → DhAvt6tJ.js} +2 -2
  117. package/chunk/DsuIQH0F.js +200 -0
  118. package/chunk/{Lyh0cz3R.js → KPBMJlOB.js} +1 -1
  119. package/chunk/{B_c0gPsX.js → vP3qfmKM.js} +24 -23
  120. package/collapse/Collapse.js +1 -1
  121. package/collapse/Item.js +1 -1
  122. package/color-picker/ControlBar.js +1 -1
  123. package/color-picker/InputAlpha.js +1 -1
  124. package/color-picker/InputHex.js +1 -1
  125. package/color-picker/InputRgb.js +1 -1
  126. package/color-picker/Palette.js +1 -1
  127. package/color-picker/Panel.js +2 -2
  128. package/color-picker/index.js +1 -1
  129. package/comment/index.js +1 -1
  130. package/config-provider/ConfigProvider.js +1 -1
  131. package/config-provider/context.js +1 -1
  132. package/config-provider/index.js +2 -2
  133. package/copy/index.js +2 -2
  134. package/countdown/index.js +17 -17
  135. package/date-picker/Picker.js +1 -1
  136. package/date-picker/RangePicker.js +2 -2
  137. package/date-picker/index.js +1 -1
  138. package/descriptions/index.js +1 -1
  139. package/details/index.js +19 -19
  140. package/development/index.js +1 -1
  141. package/divider/index.js +1 -1
  142. package/draggable/index.js +1 -1
  143. package/drawer/Drawer.js +1 -1
  144. package/dropdown/Button.js +1 -1
  145. package/dropdown/index.js +1 -1
  146. package/empty/index.js +1 -1
  147. package/flex/index.js +18 -18
  148. package/form/Form.js +2 -2
  149. package/form/FormItem.js +1 -1
  150. package/form/index.js +1 -1
  151. package/grid/Grid.js +1 -1
  152. package/grid/Item.js +1 -1
  153. package/hooks/index.js +80 -80
  154. package/hooks/useId.js +1 -1
  155. package/hooks/useIsomorphicLayoutEffect.js +1 -1
  156. package/hooks/useResizeObserver.js +58 -2
  157. package/hooks/useWindowSize.js +1 -1
  158. package/icon/index.js +1 -1
  159. package/icon-hover/index.js +1 -1
  160. package/icons/file.js +1 -1
  161. package/image/Image.js +2 -2
  162. package/image/ImagePreview.js +22 -22
  163. package/image/ImagePreviewArrow.js +1 -1
  164. package/image/ImagePreviewGroup.js +1 -1
  165. package/image/index.js +1 -1
  166. package/index.js +347 -348
  167. package/input/Button.js +1 -1
  168. package/input/Group.js +1 -1
  169. package/input/Input.js +2 -2
  170. package/input/InputElement.js +2 -2
  171. package/input/Password.js +1 -1
  172. package/input/Search.js +1 -1
  173. package/input/Textarea.js +2 -2
  174. package/input-number/index.js +1 -1
  175. package/input-number/useSelectionRange.js +1 -1
  176. package/input-tag/InputTag.js +1 -1
  177. package/layout/Content.js +1 -1
  178. package/layout/Footer.js +1 -1
  179. package/layout/Header.js +1 -1
  180. package/layout/Sider.js +1 -1
  181. package/layout/index.js +1 -1
  182. package/link/index.js +1 -1
  183. package/liquid-fill/index.js +24 -24
  184. package/list/Item.js +1 -1
  185. package/list/Meta.js +1 -1
  186. package/list/index.js +1 -1
  187. package/loading/index.js +18 -18
  188. package/marquee/index.js +22 -22
  189. package/marquee-/index.js +22 -22
  190. package/mentions/index.js +1 -1
  191. package/menu/Menu.js +3 -3
  192. package/menu/OverflowWrap.js +2 -2
  193. package/menu/index.js +2 -2
  194. package/message/index.js +1 -1
  195. package/message/useMessage.js +1 -1
  196. package/modal/Confirm.js +2 -2
  197. package/modal/Modal.js +2 -2
  198. package/modal/index.js +2 -2
  199. package/notice/index.js +18 -18
  200. package/notification/index.js +1 -1
  201. package/notification/useNotification.js +1 -1
  202. package/overflow-ellipsis/OverflowItem.js +2 -2
  203. package/overflow-ellipsis/index.js +2 -2
  204. package/package.json +1 -1
  205. package/page-header/index.js +2 -2
  206. package/pagination/PageItem.js +1 -1
  207. package/pagination/PageJumper.js +1 -1
  208. package/pagination/PageOption.js +1 -1
  209. package/pagination/Pagination.js +1 -1
  210. package/picker/Input.js +1 -1
  211. package/picker/InputRange.js +1 -1
  212. package/popconfirm/index.js +1 -1
  213. package/popover/index.js +1 -1
  214. package/progress/CircleProgress.js +1 -1
  215. package/progress/index.js +1 -1
  216. package/qr-code/index.js +18 -18
  217. package/radio/Group.js +2 -2
  218. package/radio/GroupBlock.js +2 -2
  219. package/radio/Radio.js +2 -2
  220. package/radio/index.js +2 -2
  221. package/rate/index.js +1 -1
  222. package/resize-box/ResizeTrigger.js +2 -2
  223. package/resize-box/Split.js +2 -2
  224. package/resize-box/SplitGroup.js +1 -1
  225. package/resize-box/index.js +1 -1
  226. package/result/index.js +1 -1
  227. package/rich-text/core.js +1 -1
  228. package/rich-text/index.js +14 -14
  229. package/rich-text/rich.js +406 -936
  230. package/row-col/Col-.js +1 -1
  231. package/row-col/Col.js +71 -74
  232. package/row-col/Row.js +1 -1
  233. package/segmented/index.js +23 -23
  234. package/select/Option.js +1 -1
  235. package/select/Select.js +4 -4
  236. package/select-view/Core.js +1 -1
  237. package/skeleton/index.js +1 -1
  238. package/slider/Button.js +1 -1
  239. package/slider/index.js +1 -1
  240. package/space/index.js +18 -18
  241. package/spin/DotLoading.js +1 -1
  242. package/spin/index.js +1 -1
  243. package/splitter/Panel.js +1 -1
  244. package/splitter/SplitBar.js +2 -2
  245. package/splitter/Splitter.js +3 -3
  246. package/statistic/index.js +1 -1
  247. package/steps/index.js +1 -1
  248. package/style.css +1 -1
  249. package/switch/index.js +1 -1
  250. package/table/Table.js +61 -11
  251. package/table/index.js +4 -4
  252. package/tabs/Tab.js +3 -3
  253. package/tabs/TabContent.js +2 -2
  254. package/tabs/TabPane.js +1 -1
  255. package/tabs/index.js +2 -2
  256. package/tag/index.js +1 -1
  257. package/time-picker/Picker.js +1 -1
  258. package/time-picker/TimePicker.js +1 -1
  259. package/timeline/Item.js +1 -1
  260. package/timeline/Timeline.js +1 -1
  261. package/tooltip/index.js +1 -1
  262. package/tour/index.js +27 -27
  263. package/transfer/Item.js +2 -2
  264. package/transfer/List.js +2 -2
  265. package/transfer/index.js +1 -1
  266. package/tree/Animation.js +2 -2
  267. package/tree/Node.js +3 -3
  268. package/tree/NodeList.js +1 -1
  269. package/tree/Tree.js +2 -2
  270. package/tree/index.js +1 -1
  271. package/tree-select/Select.js +3 -3
  272. package/tree-select/index.js +1 -1
  273. package/trigger/index.js +2 -2
  274. package/types/common/hooks/src/use-size/index.d.ts +1 -1
  275. package/types/common/hooks/src/use-theme/index.d.ts +2 -2
  276. package/types/common/hooks/src/utils/isBrowser.d.ts +1 -1
  277. package/types/common/hooks/useResizeObserver.d.ts +1 -5
  278. package/types/common/hooks/useWindowSize.d.ts +1 -1
  279. package/types/common/utils/emitter.d.ts +1 -0
  280. package/types/common/utils/index.d.ts +1 -1
  281. package/types/pc/index.d.ts +1 -1
  282. package/types/pc/menu/context.d.ts +1 -1
  283. package/types/pc/rich-text/blots/scroll.d.ts +2 -8
  284. package/types/pc/rich-text/core/emitter.d.ts +2 -3
  285. package/types/pc/rich-text/core/rich.d.ts +11 -44
  286. package/types/pc/rich-text/core/selection.d.ts +1 -8
  287. package/types/pc/rich-text/core/theme.d.ts +3 -0
  288. package/types/pc/rich-text/parchment/blot/abstract/parent.d.ts +2 -4
  289. package/types/pc/rich-text/themes/base.d.ts +3 -0
  290. package/types/pc/rich-text/themes/{snow.d.ts → pqb.d.ts} +2 -2
  291. package/types/pc/rich-text/ui/tooltip.d.ts +2 -0
  292. package/types/pc/utils/emitter.d.ts +1 -0
  293. package/types/pc/utils/index.d.ts +1 -1
  294. package/typography/Base.js +2 -2
  295. package/typography/Ellipsis.js +3 -3
  296. package/typography/Operations.js +2 -2
  297. package/typography/Paragraph.js +1 -1
  298. package/typography/Typography.js +1 -1
  299. package/typography/useEllipsis.js +1 -1
  300. package/upload/TriggerNode.js +1 -1
  301. package/upload/Upload.js +1 -1
  302. package/utils/contextHolder.js +1 -1
  303. package/utils/emitter.js +5 -0
  304. package/utils/index.js +3 -3
  305. package/utils/resizeObserver.js +1 -1
  306. package/verification-code/VerificationCode.js +1 -1
  307. package/version/index.js +1 -1
  308. package/virtual-list/VirtualList.js +2 -2
  309. package/watermark/Watermark.js +1 -1
  310. package/chunk/BDgzrqDN.js +0 -154
  311. package/chunk/COsRZOz1.js +0 -1813
  312. package/chunk/CylJZkp8.js +0 -6
  313. package/chunk/Di5KBCVQ.js +0 -4
  314. package/chunk/cW_5U6dL.js +0 -28
  315. package/types/common/utils/mitt.d.ts +0 -1
  316. package/types/pc/rich-text/themes/bubble.d.ts +0 -18
  317. package/types/pc/utils/mitt.d.ts +0 -1
  318. package/utils/mitt.js +0 -5
@@ -0,0 +1,1872 @@
1
+ import { jsx as o, jsxs as le, Fragment as gt } from "react/jsx-runtime";
2
+ import Hn from "lodash/throttle";
3
+ import Xe, { useMemo as ie, useCallback as Ze, useState as he, useRef as se, useContext as He, useEffect as et, forwardRef as Kt, createElement as tt, createContext as Ln, useImperativeHandle as An } from "react";
4
+ import { a as nt } from "./C1vY8016.js";
5
+ import { u as Wn } from "./CAA93JLq.js";
6
+ import { u as Gt } from "./FgWHhRFz.js";
7
+ import "./DsaQZE4X.js";
8
+ import "@unicom-cloud/utils/date";
9
+ import "@unicom-cloud/utils/case-name";
10
+ import Z from "@unicom-cloud/utils/class-name";
11
+ import "@unicom-cloud/utils/constant/ui";
12
+ import "@unicom-cloud/utils/clipboard-copy";
13
+ import "./DS_deHpN.js";
14
+ import { b as Tt, o as Et } from "./d1c9z8T1.js";
15
+ import "@unicom-cloud/utils/emitter";
16
+ import "@unicom-cloud/utils/file/fileToURL";
17
+ import "lodash/escapeRegExp";
18
+ import Ee from "lodash/isArray";
19
+ import ht from "lodash/isNumber";
20
+ import Ye from "lodash/isString";
21
+ import Qe from "lodash/isFunction";
22
+ import "lodash/camelCase";
23
+ import "lodash/capitalize";
24
+ import "lodash/cloneDeep";
25
+ import "lodash/debounce";
26
+ import Jt from "lodash/get";
27
+ import "lodash/has";
28
+ import "lodash/kebabCase";
29
+ import Mn from "lodash/merge";
30
+ import "lodash/mergeWith";
31
+ import "lodash/set";
32
+ import "lodash/setWith";
33
+ import "lodash/snakeCase";
34
+ import "lodash/startCase";
35
+ import "lodash/uniq";
36
+ import "lodash/upperFirst";
37
+ import "@unicom-cloud/utils/math";
38
+ import Te from "lodash/isPlainObject";
39
+ import { p as zn, a as Vn } from "./ClqoGc3r.js";
40
+ import "@unicom-cloud/utils/pinyin";
41
+ import "./BJ9_azwQ.js";
42
+ import "./CXrVhA6-.js";
43
+ import { r as jn } from "./CHQ8c547.js";
44
+ import "@unicom-cloud/utils/file/saveAs";
45
+ import "@unicom-cloud/utils/screenfull";
46
+ import "@unicom-cloud/utils/constant/ui.js";
47
+ import "@unicom-cloud/utils/tinycolor";
48
+ import "@unicom-cloud/utils/ui-color";
49
+ import "react-is";
50
+ import "@unicom-cloud/utils/tree";
51
+ import { isArray as Ue, isPlainObject as we, isFunction as Be, isNumber as Qt } from "@unicom-cloud/utils/is";
52
+ import "uuid";
53
+ import "./hc_ufgVf.js";
54
+ import "@unicom-cloud/utils/constant/keyboardCode";
55
+ import "@unicom-cloud/utils/constant/platform";
56
+ import "./CdXR6dj7.js";
57
+ import "@unicom-cloud/utils/js-cookie";
58
+ import "dayjs";
59
+ import { u as Ft } from "./DfChiMIE.js";
60
+ import "./DsuIQH0F.js";
61
+ import { u as Un } from "./CrOzsnI0.js";
62
+ import "@unicom-cloud/utils/query-string";
63
+ import "react-router";
64
+ import { u as Yn } from "./vP3qfmKM.js";
65
+ import Zt from "../pagination/Pagination.js";
66
+ import Xn from "../spin/index.js";
67
+ import yt from "../table/ColGroup.js";
68
+ import { TableContext as _t } from "../table/context.js";
69
+ import { defaultComponent as en, INTERNAL_EXPAND_KEY as xt, INTERNAL_SELECTION_KEY as Ct } from "../table/constant.js";
70
+ import { getOriginData as Q, isChildrenNotEmpty as It, getSelectedKeysByData as qn, getSelectedKeys as Gn, getSorterPriority as Ot, getSorterFn as Dt, px2Number as Pt, deepCloneData as Jn, getScrollBarHeight as Qn, getScrollBarWidth as Zn } from "../table/util.js";
71
+ import eo from "../virtual-list/VirtualList.js";
72
+ import to from "@unicom-cloud/icons/IconUiMinus";
73
+ import no from "@unicom-cloud/icons/IconUiPlus";
74
+ import { C as Bt } from "./C3kH2ES3.js";
75
+ import { R as sn } from "./DMv8Hn4u.js";
76
+ import { u as oo } from "./BJeTDXdz.js";
77
+ import ln from "../tooltip/index.js";
78
+ import { m as ro } from "./B5RFT17G.js";
79
+ import so from "@unicom-cloud/icons/IconUiCaretDown";
80
+ import io from "@unicom-cloud/icons/IconUiCaretUp";
81
+ import lo from "@unicom-cloud/icons/IconUiFilter";
82
+ import tn from "../button/index.js";
83
+ import { u as ao } from "./2vdCeheu.js";
84
+ import co from "../space/index.js";
85
+ import fo from "../trigger/index.js";
86
+ function Le(i) {
87
+ const a = ie(
88
+ () => Te(i) ? Mn({}, en, i) : en,
89
+ [i]
90
+ );
91
+ return {
92
+ getHeaderComponentOperations: a.header.operations,
93
+ getBodyComponentOperations: a.body.operations,
94
+ ComponentTable: a.table,
95
+ ComponentHeaderWrapper: a.header.wrapper,
96
+ ComponentThead: a.header.thead,
97
+ ComponentHeaderRow: a.header.row,
98
+ ComponentTh: a.header.th,
99
+ ComponentHeaderCell: a.header.cell,
100
+ ComponentBodyWrapper: a.body.wrapper,
101
+ ComponentTbody: a.body.tbody,
102
+ ComponentBodyRow: a.body.row,
103
+ ComponentTd: a.body.td,
104
+ ComponentBodyCell: a.body.cell
105
+ };
106
+ }
107
+ function nn(i, a) {
108
+ const d = [];
109
+ function w(t) {
110
+ t && t.length > 0 && t.forEach((T) => {
111
+ T[a] ? w(T[a]) : d.push({ ...T, key: T.dataIndex || T.key });
112
+ });
113
+ }
114
+ return w(i), d;
115
+ }
116
+ function an(i, a) {
117
+ let d = 0;
118
+ return i && i.length > 0 && i.forEach((w) => {
119
+ const t = an(w[a], a) + 1;
120
+ d = Math.max(t, d);
121
+ }), d;
122
+ }
123
+ function po(i) {
124
+ const {
125
+ component: a,
126
+ rowSelection: d,
127
+ expandedRowRender: w,
128
+ expandProps: t = {},
129
+ columns: T = [],
130
+ childrenColumnName: r
131
+ } = i, S = ie(() => T || [], [T]), c = ie(
132
+ () => nn(S, r),
133
+ [S, r]
134
+ ), N = d && d.type === "checkbox" || d && !("type" in d), E = d && d.type === "radio", { width: f } = t, y = !!w, h = N || E, { getHeaderComponentOperations: v, getBodyComponentOperations: O } = Le(a), g = ie(
135
+ () => v({
136
+ selectionNode: h ? "holder_node" : "",
137
+ expandNode: y ? "holder_node" : ""
138
+ }),
139
+ [
140
+ h,
141
+ y,
142
+ v
143
+ ]
144
+ ), u = ie(
145
+ () => O({
146
+ selectionNode: h ? "holder_node" : "",
147
+ expandNode: y ? "holder_node" : ""
148
+ }),
149
+ [
150
+ h,
151
+ y,
152
+ O
153
+ ]
154
+ ), m = d && d.fixed, _ = d && d.columnWidth, A = Ze(
155
+ (U, I, R) => {
156
+ const K = {}, W = [];
157
+ U.forEach((l, x) => {
158
+ const b = { ...l };
159
+ (!("key" in l) || typeof l.key > "u") && (b.key = b.dataIndex || x), x === 0 ? (b.$$isFirstColumn = !0, b.fixed === "left" && (K.fixed = b.fixed)) : b.$$isFirstColumn = !1, W.push(b);
160
+ });
161
+ const H = y && {
162
+ key: xt,
163
+ title: xt,
164
+ width: f,
165
+ $$isOperation: !0
166
+ }, Y = h && {
167
+ key: Ct,
168
+ title: Ct,
169
+ width: _,
170
+ $$isOperation: !0
171
+ };
172
+ return m && (K.fixed = "left"), (typeof R != "number" || R === 0) && [...I].reverse().forEach((l, x) => {
173
+ if (l.node) {
174
+ const b = g.filter((L) => L.node).length - x - 1;
175
+ l.name === "expandNode" ? W.unshift({
176
+ ...H,
177
+ ...K,
178
+ $$columnIndex: b
179
+ }) : l.name === "selectionNode" ? W.unshift({
180
+ ...Y,
181
+ ...K,
182
+ $$columnIndex: b
183
+ }) : W.unshift({
184
+ ...l,
185
+ ...K,
186
+ title: l.name,
187
+ key: l.name,
188
+ $$isOperation: !0,
189
+ width: l.width || 40,
190
+ $$columnIndex: b
191
+ });
192
+ }
193
+ }), W;
194
+ },
195
+ [
196
+ f,
197
+ y,
198
+ h,
199
+ _,
200
+ m,
201
+ g
202
+ ]
203
+ ), F = ie(
204
+ () => A(c, u),
205
+ [c, A, u]
206
+ ), ee = ie(
207
+ () => an(S, r),
208
+ [S, r]
209
+ );
210
+ return [ie(() => {
211
+ const U = Ee(g) ? g.filter((W) => W.node).length : 0;
212
+ if (ee === 1) {
213
+ const W = S.map((H, Y) => ({
214
+ ...H,
215
+ $$columnIndex: Y + U
216
+ }));
217
+ return [A(W, g, 0)];
218
+ }
219
+ let I = U;
220
+ const R = [], K = (W, H = 0) => {
221
+ R[H] = R[H] || [], W.forEach((Y) => {
222
+ const l = { ...Y };
223
+ l[r] ? (l.colSpan = nn(
224
+ Y[r],
225
+ r
226
+ ).length, l.$$columnIndex = [I], R[H].push(l), K(l[r], H + 1), l.$$columnIndex.push(I - 1)) : (l.rowSpan = ee - H, l.$$columnIndex = I++, R[H].push(l));
227
+ }), R[H] = A(
228
+ R[H],
229
+ g,
230
+ H
231
+ );
232
+ };
233
+ return K(S), R;
234
+ }, [
235
+ S,
236
+ r,
237
+ ee,
238
+ A,
239
+ g
240
+ ]), F];
241
+ }
242
+ function uo(i, a, d) {
243
+ const {
244
+ defaultExpandedRowKeys: w,
245
+ defaultExpandAllRows: t,
246
+ expandedRowRender: T,
247
+ onExpand: r,
248
+ onExpandedRowsChange: S,
249
+ childrenColumnName: c = "children",
250
+ expandProps: N
251
+ } = i, [E, f] = he(
252
+ h()
253
+ ), y = i.expandedRowKeys || E;
254
+ function h() {
255
+ let g = [];
256
+ return i.expandedRowKeys ? g = i.expandedRowKeys : w ? g = w : t && (g = a.map((u, m) => {
257
+ const _ = Q(u);
258
+ return N && "rowExpandable" in N && typeof N.rowExpandable == "function" ? N.rowExpandable(_) && d(u) : typeof T == "function" ? T(_, m) && d(u) : It(u, c) && d(u);
259
+ }).filter((u) => u)), g;
260
+ }
261
+ function v(g) {
262
+ const u = y.indexOf(g) === -1, m = u ? y.concat(g) : y.filter((A) => g !== A), _ = a.filter((A) => m.indexOf(d(A)) !== -1).map((A) => d(A));
263
+ f(_), O(g, u), S?.(_);
264
+ }
265
+ function O(g, u) {
266
+ r?.(
267
+ Q(a.find((m) => d(m) === g)),
268
+ u
269
+ );
270
+ }
271
+ return [y, v];
272
+ }
273
+ function on(i) {
274
+ return [...new Set(i)];
275
+ }
276
+ function mo(i, a, d, w) {
277
+ const { rowSelection: t, childrenColumnName: T } = i, r = t?.selectedRowKeys, S = t?.onSelectAll, c = t?.onSelect, N = t?.onChange, E = t?.pureKeys, f = typeof t?.checkStrictly == "boolean" ? !t.checkStrictly : !1, y = t?.preserveSelectedRowKeys;
278
+ function h() {
279
+ const l = [], x = [], b = (D) => {
280
+ Ee(D) && D.length && D.forEach((C) => {
281
+ const $ = w(C);
282
+ (t && typeof t.checkboxProps == "function" ? t.checkboxProps(Q(C)) : {}).disabled || l.push($), It(C, i.childrenColumnName) && b(C[i.childrenColumnName]);
283
+ });
284
+ };
285
+ b(a);
286
+ const L = (D, C) => {
287
+ Ee(D) && D.length && D.forEach(($) => {
288
+ if (C && f && ($.__INTERNAL_PARENT = C), x.push($), It($, i.childrenColumnName)) {
289
+ const G = { ...$ };
290
+ L($[i.childrenColumnName], G);
291
+ }
292
+ });
293
+ };
294
+ return L(d, void 0), {
295
+ allSelectedRowKeys: l,
296
+ flattenData: x
297
+ };
298
+ }
299
+ const { allSelectedRowKeys: v, flattenData: O } = h(), [g, u] = he([]), [m, _] = he([]), A = qn(
300
+ O,
301
+ on(r || g),
302
+ w,
303
+ T,
304
+ f
305
+ ), F = f && !r ? g : A.selectedRowKeys, ee = f && !r ? m : A.indeterminateKeys, [X, U] = he(
306
+ E ? [] : I(F)
307
+ );
308
+ function I(l, x) {
309
+ const b = x ? X.concat(O) : O, L = new Map(
310
+ b.map((D, C, $) => [w(D), D])
311
+ );
312
+ return l.map((D) => L.get(D)).filter((D) => D);
313
+ }
314
+ const R = new Set(O.map((l) => w(l)));
315
+ function K(l) {
316
+ return y ? l : l.filter((x) => R.has(x));
317
+ }
318
+ function W(l) {
319
+ let x = [], b = [];
320
+ if (l)
321
+ x = K(
322
+ on(F.concat(v))
323
+ );
324
+ else {
325
+ const D = new Set(v);
326
+ x = K(
327
+ F.filter((C) => !D.has(C))
328
+ );
329
+ }
330
+ E || (b = I(x, !0));
331
+ const L = Q(b);
332
+ u(x), U(b), _([]), N?.(x, L), S?.(l, L);
333
+ }
334
+ function H(l, x) {
335
+ const { selectedRowKeys: b, indeterminateKeys: L } = Gn(
336
+ x,
337
+ l,
338
+ F,
339
+ m,
340
+ w,
341
+ T,
342
+ f
343
+ ), D = K(b), C = I(D, !0), $ = Q(C);
344
+ u(D), U(C), _(L), c?.(l, Q(x), $), N?.(D, $);
345
+ }
346
+ function Y(l, x) {
347
+ const b = [O.find((D) => w(D) === l)], L = Q(b);
348
+ u([l]), c?.(!0, Q(x), L), N?.([l], L);
349
+ }
350
+ return {
351
+ selectedRowKeys: F,
352
+ indeterminateKeys: ee,
353
+ onCheckAll: W,
354
+ onCheck: H,
355
+ onCheckRadio: Y,
356
+ setSelectedRowKeys: u,
357
+ allSelectedRowKeys: v,
358
+ flattenData: O
359
+ };
360
+ }
361
+ function ho(i, a) {
362
+ const [d, w] = he(a), [t, T] = he({}), r = se(i), S = Ze(
363
+ (E) => {
364
+ const { field: f, direction: y } = E;
365
+ return d.find((h) => h.field === f) ? y ? d.map(
366
+ (h) => h.field === f ? E : h
367
+ ) : d.filter((h) => h.field !== f) : y ? !ht(E.priority) || d.find((h) => !ht(h.priority)) ? [E] : [...d, E] : [...d];
368
+ },
369
+ [d]
370
+ ), c = Ze((E) => {
371
+ const f = E.filter((h) => "sortOrder" in h);
372
+ let y = [];
373
+ return f.forEach((h) => {
374
+ const v = Ot(h.sorter), O = h.sortOrder, g = {
375
+ field: h.dataIndex || h.key,
376
+ direction: O,
377
+ sorterFn: Dt(h.sorter),
378
+ priority: v
379
+ };
380
+ O ? ht(v) ? y.every((u) => ht(u.priority) || !u.direction) && y.push(g) : y.every((u) => !u.direction) ? y.push(g) : y = [g] : y.push(g);
381
+ }), y;
382
+ }, []), N = Ze(
383
+ (E, f) => {
384
+ c(i).length || (w(f), T(E));
385
+ },
386
+ [i, c, w, T]
387
+ );
388
+ return Ft(() => {
389
+ const E = r.current, f = c(E), y = c(i), h = f.map(
390
+ (O) => O.field
391
+ ), v = y.filter((O) => f.find(
392
+ ({ field: u, direction: m }) => O.field === u && O.direction !== m
393
+ ) ? !0 : !h.includes(O.field));
394
+ v && v.length && (w(y), T({})), r.current = i;
395
+ }, [
396
+ i,
397
+ c,
398
+ S,
399
+ T,
400
+ w
401
+ ]), {
402
+ currentSorter: t,
403
+ activeSorters: d,
404
+ getNextActiveSorters: S,
405
+ updateStateSorters: N
406
+ };
407
+ }
408
+ function yo(i, a, d) {
409
+ const w = a.map((S) => S.fixed);
410
+ function t(S, c) {
411
+ return Z({
412
+ [`${d}-col-fixed-left`]: S.fixed === "left",
413
+ [`${d}-col-fixed-right`]: S.fixed === "right",
414
+ [`${d}-col-fixed-left-last`]: S.fixed === "left" && (Te(a[c + 1]) ? a[c + 1].fixed !== "left" : !0),
415
+ [`${d}-col-fixed-right-first`]: S.fixed === "right" && (Te(a[c - 1]) ? a[c - 1].fixed !== "right" : !0)
416
+ });
417
+ }
418
+ const T = ie(() => a.map(
419
+ (S, c) => t(S, c)
420
+ ), [w.join("-")]);
421
+ return [ie(
422
+ () => i.map((S) => S.map((c, N) => {
423
+ let E = N;
424
+ const f = c.$$columnIndex;
425
+ return Ee(f) && f.length === 2 ? E = c.fixed === "right" ? f[0] : f[1] : typeof f == "number" && (E = f), t(c, E);
426
+ })),
427
+ [
428
+ i.map((S) => `|${S.map((c) => c.fixed || "undefined").join("-")}|`).join("_")
429
+ ]
430
+ ), T];
431
+ }
432
+ function go(i) {
433
+ const a = i.map((t) => Pt(t.width)), d = i.map((t) => t.fixed);
434
+ return ie(() => i.map((t) => {
435
+ let T = 0;
436
+ return t.fixed === "left" && i.some((r) => {
437
+ if (r.fixed === "left") {
438
+ if (r.key === t.key)
439
+ return !0;
440
+ const S = Pt(r.width), c = r.$$isOperation ? S || 40 : S;
441
+ return T += c, !1;
442
+ }
443
+ return !1;
444
+ }), t.fixed === "right" && [...i].reverse().some((r) => {
445
+ if (r.fixed === "right") {
446
+ if (r.key === t.key)
447
+ return !0;
448
+ const S = Pt(r.width), c = r.$$isOperation ? S || 40 : S;
449
+ return T += c, !1;
450
+ }
451
+ return !1;
452
+ }), T;
453
+ }), [a.join("-"), d.join("-")]);
454
+ }
455
+ function xo(i) {
456
+ return i && !Xe.isValidElement(i) && Te(i);
457
+ }
458
+ function Co(i) {
459
+ const a = oo(), {
460
+ component: d,
461
+ InnerComponentTd: w,
462
+ column: t,
463
+ columnIndex: T,
464
+ prefixCls: r,
465
+ stickyClassName: S,
466
+ stickyOffset: c,
467
+ currentSorter: N,
468
+ virtualized: E,
469
+ record: f,
470
+ trIndex: y,
471
+ level: h,
472
+ placeholder: v = "-",
473
+ indentSize: O,
474
+ renderExpandIcon: g,
475
+ rowKey: u,
476
+ recordHaveChildren: m,
477
+ haveTreeData: _
478
+ } = i, { rtl: A } = He(nt), F = He(_t), { ComponentBodyCell: ee } = Le(d), X = se(null), U = se(null), I = se(null), R = se(null), K = t?.tooltip?.show !== !1 && t?.ellipsis, W = Z(
479
+ `${r}-td`,
480
+ S,
481
+ {
482
+ [`${r}-col-sorted`]: N && N.direction && N.field === t?.dataIndex
483
+ },
484
+ t?.className,
485
+ Qe(t?.bodyClassName) ? t.bodyClassName(f, y) : t?.bodyClassName
486
+ );
487
+ let H = {}, Y, l, x = {};
488
+ t?.fixed === "left" && (x[A ? "right" : "left"] = c), t?.fixed === "right" && (x[A ? "left" : "right"] = c), Te(t?.cellStyle) && (x = {
489
+ ...x,
490
+ ...t?.cellStyle
491
+ }), Te(t?.bodyCellStyle) && (x = {
492
+ ...x,
493
+ ...t?.bodyCellStyle
494
+ }), Qe(t?.bodyCellStyle) && (x = {
495
+ ...x,
496
+ ...t?.bodyCellStyle?.(f, y) ?? {}
497
+ }), t?.align && (x.textAlign = t?.align), E && t.width && (x.width = t.width, x.minWidth = t.width, x.maxWidth = t.width);
498
+ const { onHandleSave: b, ...L } = t?.onCell ? t?.onCell(
499
+ f,
500
+ y,
501
+ t,
502
+ { rowKey: u }
503
+ // 潘启宝添加
504
+ ) ?? {} : { onHandleSave: () => {
505
+ } }, D = t?.render;
506
+ let C = ie(() => D?.(
507
+ Jt(f, t?.dataIndex ?? ""),
508
+ Q(f),
509
+ y,
510
+ t,
511
+ // 潘启宝添加
512
+ { rowKey: u }
513
+ // 潘启宝添加
514
+ ), [f, t, y]);
515
+ if (Qe(D) || (C = Jt(f, t?.dataIndex ?? "")), xo(C) && (H = C?.props, Y = H?.rowSpan, l = H?.colSpan, C = C?.children), et(() => (a(), () => {
516
+ }), [X.current, U.current]), Y === 0 || l === 0)
517
+ return null;
518
+ Ye(C) && (C = C.trim()), !C && C !== 0 && (C = t?.placeholder ?? v ?? "-");
519
+ const $ = t?.ellipsis && Ye(C) && !K ? {
520
+ title: C
521
+ } : {}, G = _ && t?.$$isFirstColumn, p = G && m;
522
+ let te = G && h > 0 ? O * h : 0;
523
+ G && !m && (te += 20);
524
+ function re(q) {
525
+ a();
526
+ }
527
+ const J = `${T}-${y}-${te}-${p}`, pe = /* @__PURE__ */ o(
528
+ "div",
529
+ {
530
+ ref: X,
531
+ className: Z(`${r}-cell`, {
532
+ [`${r}-cell-text-ellipsis`]: t?.ellipsis
533
+ }),
534
+ ...$,
535
+ onMouseEnter: K ? re : void 0,
536
+ children: /* @__PURE__ */ le(
537
+ ee,
538
+ {
539
+ ref: U,
540
+ className: `${r}-cell-wrap-value`,
541
+ ...Ye(ee) ? {} : {
542
+ rowData: Q(f),
543
+ column: t,
544
+ onHandleSave: b,
545
+ ...L
546
+ },
547
+ children: [
548
+ !!te && /* @__PURE__ */ o(
549
+ "span",
550
+ {
551
+ ref: I,
552
+ className: `${r}-cell-indent`,
553
+ style: { paddingLeft: te }
554
+ }
555
+ ),
556
+ !!p && /* @__PURE__ */ o(
557
+ "span",
558
+ {
559
+ ref: R,
560
+ className: `${r}-cell-expand-icon`,
561
+ children: g(f, u)
562
+ }
563
+ ),
564
+ i.___dangerouslySetInnerHTML___ && Ye(C) ? /* @__PURE__ */ o(
565
+ "span",
566
+ {
567
+ dangerouslySetInnerHTML: {
568
+ __html: C
569
+ }
570
+ }
571
+ ) : C
572
+ ]
573
+ },
574
+ J
575
+ )
576
+ },
577
+ J
578
+ );
579
+ let V = /* @__PURE__ */ o(
580
+ w,
581
+ {
582
+ className: W,
583
+ style: x,
584
+ ...zn(L, [
585
+ "onClick",
586
+ "onDoubleClick",
587
+ "onContextMenu",
588
+ "onMouseOver",
589
+ "onMouseEnter",
590
+ "onMouseLeave",
591
+ "onMouseMove",
592
+ "onMouseDown",
593
+ "onMouseUp"
594
+ ]),
595
+ ...H,
596
+ children: pe
597
+ },
598
+ t?.key || t?.dataIndex || T
599
+ );
600
+ if (K) {
601
+ let q = 0, ue = 0, de = 0, me = 0;
602
+ if (X.current instanceof Element && (q = X.current.getBoundingClientRect().width), U.current instanceof Element && (ue = U.current.getBoundingClientRect().width), I.current instanceof Element && (de = I.current.getBoundingClientRect().width), R.current instanceof Element && (me = R.current.getBoundingClientRect().width), q < ue + de + me) {
603
+ const xe = t?.tooltip?.render, Ce = Qe(xe) ? xe(f, y, t) : t?.tooltip?.content ?? ro(V);
604
+ V = /* @__PURE__ */ o(
605
+ ln,
606
+ {
607
+ ...t?.tooltip,
608
+ className: Z(
609
+ `${r}-cell-tooltip`,
610
+ t?.tooltip?.className
611
+ ),
612
+ content: Ce,
613
+ triggerProps: F.triggerProps,
614
+ children: V
615
+ }
616
+ );
617
+ }
618
+ }
619
+ return V;
620
+ }
621
+ const wo = Xe.memo(Co);
622
+ function So(i, a) {
623
+ const {
624
+ expandedRowRender: d,
625
+ onClickExpandBtn: w,
626
+ columns: t,
627
+ component: T,
628
+ onCheck: r,
629
+ onCheckRadio: S,
630
+ prefixCls: c,
631
+ selectedRowKeys: N,
632
+ indeterminateKeys: E,
633
+ rowClassName: f,
634
+ onRow: y,
635
+ rowSelection: h,
636
+ indentSize: v = 16,
637
+ activeSorters: O,
638
+ virtualized: g,
639
+ stickyOffsets: u,
640
+ stickyClassNames: m,
641
+ getRowKey: _,
642
+ placeholder: A,
643
+ expandProps: F = { strictTreeData: !0 },
644
+ data: ee,
645
+ expandedRowKeys: X,
646
+ childrenColumnName: U,
647
+ record: I,
648
+ index: R,
649
+ type: K,
650
+ shouldRowExpand: W,
651
+ level: H
652
+ } = i, { rtl: Y } = He(nt), l = Q(I), { ...x } = y?.(l, R) || {}, b = _(I), L = K === "radio" ? N.slice(0, 1) : N, D = b || R, C = L.indexOf(b) > -1, $ = X.indexOf(b) > -1, G = E.indexOf(b) > -1, p = Z(
653
+ `${c}-tr`,
654
+ {
655
+ [`${c}-row-checked`]: C,
656
+ [`${c}-row-expanded`]: $
657
+ },
658
+ f?.(l, R)
659
+ ), te = h && typeof h.checkboxProps == "function" ? h.checkboxProps(l) : {}, re = Z(`${c}-td`, `${c}-operation`), J = (P) => Z(re, `${c}-${P}`, {
660
+ [`${c}-selection-col`]: g && K === "checkbox" || K === "radio",
661
+ [`${c}-expand-icon-col`]: g && d
662
+ });
663
+ function pe(P) {
664
+ return F.strictTreeData ? Ee(P[U]) && P[U].length : P[U] !== void 0;
665
+ }
666
+ function V() {
667
+ return ee.find((P) => pe(P));
668
+ }
669
+ const q = W(I, R), ue = pe(I), de = V() && !d, me = de && ue, Ce = F.expandRowByClick && (q || me) ? {
670
+ onClick: (P) => {
671
+ w(b), x?.onClick?.(P);
672
+ }
673
+ } : {}, { ComponentBodyRow: be, ComponentTd: Ie, getBodyComponentOperations: Oe } = Le(T), ne = g ? "div" : be, ae = g ? "div" : Ie, $e = {
674
+ className: p,
675
+ key: D,
676
+ ...x,
677
+ ...Ce
678
+ }, Se = Ye(be) ? $e : { ...$e, record: I, index: R };
679
+ function Ne(P, ye) {
680
+ const { icon: ke } = F, Ke = !!~X.indexOf(ye), Fe = {
681
+ onClick: (ce) => {
682
+ ce.stopPropagation(), w(ye);
683
+ }
684
+ };
685
+ return typeof ke == "function" ? ke({ expanded: Ke, record: P, ...Fe }) : /* @__PURE__ */ o("button", { ...Fe, type: "button", children: Ke ? /* @__PURE__ */ o(to, {}) : /* @__PURE__ */ o(no, {}) });
686
+ }
687
+ const Ae = d && /* @__PURE__ */ o(ae, { className: J("expand-icon-cell"), children: q && Ne(I, b) }), Re = h && h.renderCell;
688
+ let Pe;
689
+ const De = /* @__PURE__ */ o(
690
+ Bt,
691
+ {
692
+ value: b,
693
+ onChange: (P) => r(P, I),
694
+ checked: C,
695
+ indeterminate: G,
696
+ ...te
697
+ }
698
+ ), z = /* @__PURE__ */ o(
699
+ sn,
700
+ {
701
+ onChange: () => S(b, I),
702
+ value: b,
703
+ checked: C,
704
+ ...te
705
+ }
706
+ );
707
+ K === "checkbox" && (Pe = /* @__PURE__ */ o(ae, { className: J("checkbox"), children: Re ? Re(De, C, l) : De })), K === "radio" && (Pe = /* @__PURE__ */ o(ae, { className: J("radio"), children: Re ? Re(z, C, l) : z }));
708
+ const fe = Oe({
709
+ selectionNode: Pe,
710
+ expandNode: Ae
711
+ });
712
+ return /* @__PURE__ */ tt(ne, { ...Se, key: Se.key, ref: a }, t.map((P, ye) => {
713
+ const ke = `${P.key}-${P.dataIndex}-${P.title}-${ye}`, Ke = u[ye], Fe = m[ye];
714
+ if (P.$$isOperation) {
715
+ let ce = P.node, oe = !0;
716
+ P.title === Ct && (ce = fe.find((qe) => qe.name === "selectionNode")?.node, oe = !1), P.title === xt && (ce = fe.find((qe) => qe.name === "expandNode")?.node, oe = !1);
717
+ const We = typeof ce == "function" ? ce(I) : ce;
718
+ return Xe.cloneElement(We, {
719
+ key: ke || ye,
720
+ ...We.props,
721
+ className: Z(
722
+ oe ? re : "",
723
+ We?.props?.className,
724
+ Fe
725
+ ),
726
+ style: {
727
+ ...We?.props?.style,
728
+ ...P.fixed === "left" ? {
729
+ [Y ? "right" : "left"]: Ke
730
+ } : {},
731
+ width: P.width,
732
+ minWidth: P.width
733
+ }
734
+ });
735
+ }
736
+ return /* @__PURE__ */ o(
737
+ wo,
738
+ {
739
+ prefixCls: c,
740
+ virtualized: g,
741
+ component: T,
742
+ currentSorter: O.find(
743
+ (ce) => ce.field === (P.dataIndex || P.key)
744
+ ),
745
+ placeholder: A,
746
+ indentSize: v,
747
+ stickyClassName: Fe,
748
+ stickyOffset: Ke,
749
+ InnerComponentTd: ae,
750
+ column: P,
751
+ columnIndex: ye,
752
+ record: I,
753
+ trIndex: R,
754
+ level: H,
755
+ haveTreeData: de,
756
+ recordHaveChildren: ue,
757
+ rowKey: b,
758
+ renderExpandIcon: Ne,
759
+ ___dangerouslySetInnerHTML___: i.___dangerouslySetInnerHTML___
760
+ },
761
+ ke
762
+ );
763
+ }));
764
+ }
765
+ const rn = Kt(So), bo = Kt(function({
766
+ record: a,
767
+ index: d,
768
+ virtualized: w,
769
+ tbodyProps: t
770
+ }, T) {
771
+ const {
772
+ prefixCls: r,
773
+ columns: S,
774
+ indentSize: c = 16,
775
+ childrenColumnName: N = "children",
776
+ expandProps: E = {},
777
+ rowSelection: f,
778
+ hasFixedColumn: y,
779
+ tableViewWidth: h,
780
+ getRowKey: v,
781
+ expandedRowKeys: O,
782
+ expandedRowRender: g
783
+ } = t;
784
+ let u;
785
+ f && "type" in f ? u = f.type : f && !("type" in f) && (u = "checkbox");
786
+ const m = g && ((R, K) => g(Q(R), K)), _ = (R) => Ee(R[N]) && R[N].length, A = (R, K) => "rowExpandable" in E && typeof E.rowExpandable == "function" ? E.rowExpandable(R) : m?.(R, K) !== null, F = (R, K) => {
787
+ const W = [], H = {
788
+ ...t,
789
+ type: u,
790
+ shouldRowExpand: A
791
+ };
792
+ W.push(
793
+ /* @__PURE__ */ o(
794
+ rn,
795
+ {
796
+ ref: T,
797
+ ...H,
798
+ record: R,
799
+ level: 0,
800
+ index: K
801
+ },
802
+ v(R)
803
+ )
804
+ );
805
+ const Y = (l, x, b = 0) => {
806
+ Ee(l) && l.length && l.forEach((L, D) => {
807
+ O.indexOf(x) !== -1 && (W.push(
808
+ /* @__PURE__ */ tt(
809
+ rn,
810
+ {
811
+ ...H,
812
+ key: v(L),
813
+ record: L,
814
+ level: b + 1,
815
+ index: D
816
+ }
817
+ )
818
+ ), _(L) && Y(L[N], v(L), b + 1));
819
+ });
820
+ };
821
+ return m || Y(R[N], v(R)), W;
822
+ }, ee = v(a), X = A(a, d) && O.indexOf(ee) !== -1, U = w ? "div" : "tr", I = w ? "div" : "td";
823
+ return /* @__PURE__ */ le(Xe.Fragment, { children: [
824
+ F(a, d),
825
+ X && /* @__PURE__ */ o(
826
+ U,
827
+ {
828
+ className: Z(`${r}-tr`, `${r}-expand-content`),
829
+ children: /* @__PURE__ */ o(
830
+ I,
831
+ {
832
+ className: Z(`${r}-td`),
833
+ style: { paddingLeft: c },
834
+ colSpan: S.length,
835
+ children: y ? /* @__PURE__ */ o(
836
+ "div",
837
+ {
838
+ className: `${r}-expand-fixed-row`,
839
+ style: { width: h },
840
+ children: m?.(a, d)
841
+ }
842
+ ) : m?.(a, d)
843
+ }
844
+ )
845
+ },
846
+ `${ee}-expanded`
847
+ )
848
+ ] }, ee);
849
+ });
850
+ function $o(i) {
851
+ const {
852
+ data: a,
853
+ columns: d,
854
+ prefixCls: w,
855
+ component: t,
856
+ noDataElement: T,
857
+ scroll: r,
858
+ tableViewWidth: S,
859
+ virtualized: c,
860
+ virtualListProps: N,
861
+ getRowKey: E,
862
+ saveVirtualListRef: f
863
+ } = i, y = (_) => {
864
+ i.saveRef?.(_);
865
+ }, { ComponentTbody: h } = Le(t);
866
+ let v = {}, O = {};
867
+ r && (r.x && (typeof r.x == "number" || typeof r.x == "string") && (v = {
868
+ width: r.x
869
+ }), r.y && (typeof r.y == "number" || typeof r.y == "string") && (O = {
870
+ maxHeight: r.y
871
+ }));
872
+ const g = {
873
+ className: `${w}-no-data`
874
+ };
875
+ S && (g.className = `${w}-no-data ${w}-expand-fixed-row`, g.style = { width: S });
876
+ const u = /* @__PURE__ */ o("tr", { className: Z(`${w}-tr`, `${w}-empty-row`), children: /* @__PURE__ */ o("td", { className: `${w}-td`, colSpan: d.length, children: /* @__PURE__ */ o("div", { ...g, children: T }) }) }), m = (_, A) => {
877
+ const F = E(_) ?? A;
878
+ return /* @__PURE__ */ o(
879
+ bo,
880
+ {
881
+ record: _,
882
+ index: A,
883
+ virtualized: c,
884
+ tbodyProps: i
885
+ },
886
+ F
887
+ );
888
+ };
889
+ return c ? a.length > 0 ? /* @__PURE__ */ o(
890
+ eo,
891
+ {
892
+ data: a,
893
+ height: O.maxHeight,
894
+ isStaticItemHeight: !1,
895
+ outerStyle: { ...v, minWidth: "100%", overflow: "visible" },
896
+ innerStyle: { right: "auto", minWidth: "100%" },
897
+ className: `${w}-body`,
898
+ ref: (_) => {
899
+ f(_), y(_?.dom);
900
+ },
901
+ itemKey: E,
902
+ ...N,
903
+ children: m
904
+ }
905
+ ) : /* @__PURE__ */ o("div", { className: `${w}-body`, ref: y, children: /* @__PURE__ */ o("table", { children: /* @__PURE__ */ o("tbody", { children: u }) }) }) : /* @__PURE__ */ o(h, { ref: y, children: a.length > 0 ? a.map(m) : u });
906
+ }
907
+ const No = Ln({});
908
+ function Ro(i) {
909
+ const { summary: a, data: d, prefixCls: w, columns: t, stickyOffsets: T, stickyClassNames: r } = i;
910
+ return /* @__PURE__ */ o("tfoot", { className: `${w}-tfoot`, children: /* @__PURE__ */ o(
911
+ No.Provider,
912
+ {
913
+ value: { columns: t, stickyOffsets: T, stickyClassNames: r, prefixCls: w },
914
+ children: a(Q(d))
915
+ }
916
+ ) });
917
+ }
918
+ function ko(i, a) {
919
+ return i === "ascend" ? a?.Table.sortAscend : i === "descend" ? a?.Table.sortDescend : a?.Table.cancelSort;
920
+ }
921
+ const vo = { bottom: 0 };
922
+ function To(i) {
923
+ const {
924
+ onSort: a,
925
+ onFilter: d,
926
+ onHandleFilter: w,
927
+ onHandleFilterReset: t,
928
+ currentFilters: T = {},
929
+ currentSorter: r,
930
+ _key: S,
931
+ dataIndex: c,
932
+ title: N,
933
+ sorter: E,
934
+ sortDirections: f = ["ascend", "descend"],
935
+ filters: y = [],
936
+ columnFixedStyle: h,
937
+ className: v,
938
+ headerClassName: O,
939
+ cellStyle: g,
940
+ headerCellStyle: u,
941
+ rowSpan: m,
942
+ colSpan: _,
943
+ headerCellProps: A,
944
+ prefixCls: F,
945
+ align: ee = "left",
946
+ component: X,
947
+ filterIcon: U,
948
+ filterDropdown: I,
949
+ filterMultiple: R = !0,
950
+ ellipsis: K,
951
+ filterDropdownProps: W,
952
+ onFilterDropdownVisibleChange: H,
953
+ column: Y,
954
+ showSorterTooltip: l,
955
+ index: x
956
+ } = i, { locale: b, rtl: L } = He(nt), D = He(_t), C = S || c || x, [$, G, p] = ao([], {
957
+ value: T[C] || []
958
+ }), [te, re] = he(!1), [J, pe] = he(!1), V = E && Ee(f) && f.length, q = V ? ue() : void 0;
959
+ et(() => {
960
+ G(T[C] || []);
961
+ }, [T, C]), et(() => {
962
+ $ && $ !== p && G($);
963
+ }, [te]);
964
+ function ue() {
965
+ const z = r && r.direction;
966
+ if (!z || r && r.field !== C)
967
+ return f[0];
968
+ const fe = f.indexOf(z);
969
+ if (fe < f.length)
970
+ return f[fe + 1];
971
+ }
972
+ function de() {
973
+ $ && (w?.(
974
+ { onFilter: d, filters: y, dataIndex: C },
975
+ p
976
+ ), xe(!1));
977
+ }
978
+ function me() {
979
+ t({ dataIndex: C }), xe(!1);
980
+ }
981
+ function xe(z) {
982
+ re(z), H?.(z);
983
+ }
984
+ function Ce(z, fe) {
985
+ let P = [...p];
986
+ if (R)
987
+ fe ? P = P.concat(z) : P.splice(
988
+ P.findIndex((ye) => ye === z),
989
+ 1
990
+ );
991
+ else if (P.length > 0)
992
+ if (P[0] !== z)
993
+ P = [z];
994
+ else
995
+ return;
996
+ else
997
+ P = [z];
998
+ G(P);
999
+ }
1000
+ function be(z) {
1001
+ G(z || p), re(!1), w?.(
1002
+ { filters: y, onFilter: d, dataIndex: C },
1003
+ z || p
1004
+ );
1005
+ }
1006
+ function Ie() {
1007
+ return typeof I == "function" ? I({
1008
+ filterKeys: p,
1009
+ setFilterKeys: (z, fe) => {
1010
+ G(z), fe?.();
1011
+ },
1012
+ confirm: be
1013
+ }) : /* @__PURE__ */ le("div", { className: `${F}-filters-popup`, children: [
1014
+ /* @__PURE__ */ o("div", { className: `${F}-filters-list`, children: y.map((z) => {
1015
+ const fe = p.findIndex((P) => P === z.value) !== -1;
1016
+ return /* @__PURE__ */ o("div", { className: `${F}-filters-item`, children: R ? /* @__PURE__ */ o(
1017
+ Bt,
1018
+ {
1019
+ checked: fe,
1020
+ onChange: (P) => Ce(z.value, P),
1021
+ children: z.text
1022
+ }
1023
+ ) : /* @__PURE__ */ o(
1024
+ sn,
1025
+ {
1026
+ checked: fe,
1027
+ onChange: (P) => Ce(z.value, P),
1028
+ children: z.text
1029
+ }
1030
+ ) }, z.value);
1031
+ }) }),
1032
+ /* @__PURE__ */ le(co, { className: `${F}-filters-btn`, children: [
1033
+ /* @__PURE__ */ o(tn, { onClick: me, size: "mini", children: b?.Table.resetText }),
1034
+ /* @__PURE__ */ o(tn, { onClick: de, type: "primary", size: "mini", children: b?.Table.okText })
1035
+ ] })
1036
+ ] });
1037
+ }
1038
+ const Oe = (z) => Z(`${F}-sorter-icon`, {
1039
+ [`${F}-sorter-icon-active`]: r && r.direction === z && r.field === C
1040
+ }), ne = Z(`${F}-filters`, {
1041
+ [`${F}-filters-open`]: te,
1042
+ [`${F}-filters-active`]: $ && $.length
1043
+ });
1044
+ let ae = {
1045
+ ...h
1046
+ };
1047
+ Te(g) && (ae = {
1048
+ ...ae,
1049
+ ...g
1050
+ }), Te(u) && (ae = {
1051
+ ...ae,
1052
+ ...u
1053
+ }), Qe(u) && (ae = {
1054
+ ...ae,
1055
+ ...u()
1056
+ }), ee && ee !== "left" && (ae.textAlign = ee);
1057
+ const $e = {
1058
+ style: ae,
1059
+ key: S || C
1060
+ };
1061
+ _ && _ > 1 && ($e.colSpan = _), m && m > 1 && ($e.rowSpan = m);
1062
+ const { ComponentTh: Se, ComponentHeaderCell: Ne } = Le(X), Ae = Ee(y) && y.length > 0 || typeof I == "function", Re = K && typeof N == "string" ? { title: N } : {}, Pe = /* @__PURE__ */ le(gt, { children: [
1063
+ V ? /* @__PURE__ */ o(
1064
+ ln,
1065
+ {
1066
+ content: ko(q, b),
1067
+ disabled: !l,
1068
+ triggerProps: D.triggerProps,
1069
+ ...Te(l) ? l : {},
1070
+ children: /* @__PURE__ */ le(
1071
+ "div",
1072
+ {
1073
+ className: `${F}-cell-with-sorter`,
1074
+ onMouseEnter: () => {
1075
+ pe(!0);
1076
+ },
1077
+ onMouseLeave: () => {
1078
+ pe(!1);
1079
+ },
1080
+ onClick: () => a(q, C),
1081
+ children: [
1082
+ /* @__PURE__ */ o("span", { className: `${F}-th-item-title`, ...Re, children: N }),
1083
+ V && /* @__PURE__ */ le(
1084
+ "div",
1085
+ {
1086
+ className: Z(`${F}-sorter`, {
1087
+ [`${F}-sorter-direction-one`]: f.length === 1
1088
+ }),
1089
+ children: [
1090
+ f.indexOf("ascend") !== -1 && /* @__PURE__ */ o("div", { className: Oe("ascend"), children: /* @__PURE__ */ o(io, {}) }),
1091
+ f.indexOf("descend") !== -1 && /* @__PURE__ */ o("div", { className: Oe("descend"), children: /* @__PURE__ */ o(so, {}) })
1092
+ ]
1093
+ }
1094
+ )
1095
+ ]
1096
+ }
1097
+ )
1098
+ }
1099
+ ) : /* @__PURE__ */ o("span", { className: `${F}-th-item-title`, ...Re, children: N }),
1100
+ Ae && /* @__PURE__ */ o(
1101
+ fo,
1102
+ {
1103
+ popup: Ie,
1104
+ trigger: "click",
1105
+ classNames: "slideDynamicOrigin",
1106
+ position: L ? "bl" : "br",
1107
+ popupAlign: vo,
1108
+ popupVisible: te,
1109
+ onVisibleChange: xe,
1110
+ ...D.triggerProps,
1111
+ ...W?.triggerProps,
1112
+ children: /* @__PURE__ */ o("div", { className: ne, children: U || /* @__PURE__ */ o(lo, {}) })
1113
+ }
1114
+ )
1115
+ ] }), De = Z(`${F}-th-item`, {
1116
+ [`${F}-cell-text-ellipsis`]: K,
1117
+ [`${F}-cell-mouseenter`]: J,
1118
+ [`${F}-cell-next-${q}`]: J && q,
1119
+ [`${F}-col-has-sorter`]: V,
1120
+ [`${F}-col-has-filter`]: Ae
1121
+ });
1122
+ return _ !== 0 && /* @__PURE__ */ tt(
1123
+ Se,
1124
+ {
1125
+ className: Z(
1126
+ `${F}-th`,
1127
+ {
1128
+ [`${F}-col-sorted`]: r?.direction && r.field === C
1129
+ },
1130
+ v,
1131
+ O
1132
+ ),
1133
+ index: x,
1134
+ ...$e,
1135
+ key: $e.key,
1136
+ ...A
1137
+ },
1138
+ /* @__PURE__ */ o(
1139
+ Ne,
1140
+ {
1141
+ className: De,
1142
+ column: Ye(Ne) ? void 0 : Y,
1143
+ children: Pe
1144
+ }
1145
+ )
1146
+ );
1147
+ }
1148
+ function Eo(i) {
1149
+ const {
1150
+ activeSorters: a,
1151
+ expandedRowRender: d,
1152
+ expandProps: w = {},
1153
+ onSort: t,
1154
+ onHandleFilter: T,
1155
+ onHandleFilterReset: r,
1156
+ onHeaderRow: S,
1157
+ prefixCls: c,
1158
+ currentFilters: N,
1159
+ component: E,
1160
+ data: f,
1161
+ selectedRowKeys: y,
1162
+ rowSelection: h,
1163
+ allSelectedRowKeys: v = [],
1164
+ groupColumns: O,
1165
+ stickyOffsets: g,
1166
+ groupStickyClassNames: u,
1167
+ showSorterTooltip: m
1168
+ } = i, { rtl: _ } = He(nt), { ComponentThead: A, ComponentHeaderRow: F, getHeaderComponentOperations: ee } = Le(E), X = h && (h.type === "checkbox" || !("type" in h)), U = h && "checkAll" in h ? h.checkAll : !0, I = h && h.type === "radio", { columnTitle: R } = w, K = ie(() => {
1169
+ const Y = new Set(v);
1170
+ return y.filter((l, x, b) => Y.has(l));
1171
+ }, [y, v]), W = O.length > 1 ? { rowSpan: O.length } : {}, H = Z(`${c}-th`, `${c}-operation`);
1172
+ return /* @__PURE__ */ o(A, { children: O.map((Y, l) => {
1173
+ const x = S?.(Y, l), b = (X || I) && l === 0 && /* @__PURE__ */ o(
1174
+ "th",
1175
+ {
1176
+ className: Z(
1177
+ H,
1178
+ `${c}-${I ? "radio" : "checkbox"}`
1179
+ ),
1180
+ children: /* @__PURE__ */ le("div", { className: `${c}-th-item`, children: [
1181
+ U && !I ? /* @__PURE__ */ o(
1182
+ Bt,
1183
+ {
1184
+ indeterminate: f && K.length > 0 && K.length !== v.length,
1185
+ checked: f && K.length !== 0 && K.length === v.length,
1186
+ disabled: !v.length,
1187
+ onChange: i.onCheckAll
1188
+ }
1189
+ ) : null,
1190
+ h && h.columnTitle
1191
+ ] })
1192
+ }
1193
+ ), L = d && /* @__PURE__ */ o("th", { className: Z(H, `${c}-expand`), children: R && /* @__PURE__ */ o("div", { className: `${c}-th-item`, children: R }) }), D = u[l], C = ee({
1194
+ selectionNode: b,
1195
+ expandNode: L
1196
+ });
1197
+ return /* @__PURE__ */ tt(
1198
+ F,
1199
+ {
1200
+ ...x,
1201
+ key: l,
1202
+ className: `${c}-tr`
1203
+ },
1204
+ Y.map(($, G) => {
1205
+ const p = $.$$columnIndex;
1206
+ let te = 0;
1207
+ Ue(p) && p.length === 2 ? te = $.fixed === "right" ? g[p[1]] : g[p[0]] : typeof p == "number" && (te = g[p] || 0);
1208
+ const re = D[G];
1209
+ if ($.$$isOperation) {
1210
+ let q = $.node, ue = !0;
1211
+ $.title === Ct && (q = C.find(
1212
+ (me) => me.name === "selectionNode"
1213
+ )?.node, ue = !1), $.title === xt && (q = C.find(
1214
+ (me) => me.name === "expandNode"
1215
+ )?.node, ue = !1);
1216
+ const de = q;
1217
+ return Xe.cloneElement(de, {
1218
+ key: $.key || G,
1219
+ ...de.props,
1220
+ ...W,
1221
+ className: Z(
1222
+ ue ? H : "",
1223
+ de?.props?.className,
1224
+ re
1225
+ ),
1226
+ style: {
1227
+ ...de?.props?.style,
1228
+ ...$.fixed === "left" ? {
1229
+ [_ ? "right" : "left"]: te
1230
+ } : {},
1231
+ width: $.width,
1232
+ minWidth: $.width
1233
+ }
1234
+ });
1235
+ }
1236
+ const J = $?.onHeaderCell?.($, G), pe = Z(re, $.className), V = {};
1237
+ return $.fixed === "left" && (V[_ ? "right" : "left"] = te), $.fixed === "right" && (V[_ ? "left" : "right"] = te), /* @__PURE__ */ tt(
1238
+ To,
1239
+ {
1240
+ index: G,
1241
+ onSort: t,
1242
+ onHandleFilter: T,
1243
+ onHandleFilterReset: r,
1244
+ currentSorter: a.find(
1245
+ (q) => q.field === ($.dataIndex || $.key)
1246
+ ),
1247
+ currentFilters: N,
1248
+ _key: $.key || $.dataIndex || G,
1249
+ ...$,
1250
+ key: $.key,
1251
+ column: $,
1252
+ headerCellProps: J,
1253
+ prefixCls: c,
1254
+ component: E,
1255
+ className: pe,
1256
+ columnFixedStyle: V,
1257
+ showSorterTooltip: m
1258
+ }
1259
+ );
1260
+ })
1261
+ );
1262
+ }) });
1263
+ }
1264
+ const Po = [], Fo = [], Io = {
1265
+ showHeader: !0,
1266
+ border: !0,
1267
+ hover: !0,
1268
+ rowKey: "key",
1269
+ pagePosition: "br",
1270
+ childrenColumnName: "children",
1271
+ indentSize: 15,
1272
+ showSorterTooltip: !0
1273
+ };
1274
+ function Oo(i, a) {
1275
+ const {
1276
+ getPrefixCls: d,
1277
+ loadingElement: w,
1278
+ size: t,
1279
+ tablePagination: T,
1280
+ renderEmpty: r,
1281
+ componentConfig: S,
1282
+ rtl: c
1283
+ } = He(nt), N = Gt(
1284
+ i,
1285
+ Io,
1286
+ S?.Table
1287
+ ), E = Gt(
1288
+ we(i?.pagination) ? i?.pagination : {},
1289
+ we(S?.Table?.pagination) ? S?.Table?.pagination : {},
1290
+ T || {}
1291
+ ), {
1292
+ style: f,
1293
+ className: y,
1294
+ component: h,
1295
+ border: v,
1296
+ borderCell: O,
1297
+ columns: g = Fo,
1298
+ data: u = Po,
1299
+ scroll: m,
1300
+ noDataElement: _,
1301
+ showHeader: A,
1302
+ stripe: F,
1303
+ hover: ee,
1304
+ pagination: X,
1305
+ onChange: U,
1306
+ pagePosition: I,
1307
+ childrenColumnName: R,
1308
+ indentSize: K,
1309
+ rowSelection: W,
1310
+ tableLayoutFixed: H,
1311
+ header: Y,
1312
+ // 潘启宝添加
1313
+ footer: l,
1314
+ virtualized: x,
1315
+ renderPagination: b,
1316
+ summary: L,
1317
+ rowKey: D,
1318
+ triggerProps: C
1319
+ } = N, $ = m && we(m) && m.x, G = ie(
1320
+ () => Jn(u, R),
1321
+ [u, R]
1322
+ ), p = d?.("table"), te = N.size || (["default", "middle", "small", "mini"].indexOf(t) > -1 ? t : "default"), re = se(null), J = se(null), pe = se(null), V = se(null), q = se(null), ue = se(null), de = se(null), me = se(null), xe = se(null), Ce = se(null), be = se(0), Ie = se(!1), [Oe, ne] = po(N), { currentFilters: ae, defaultSorters: $e } = fn(), [Se, Ne] = he(1), [Ae, Re] = he(
1323
+ E.pageSize || E.defaultPageSize || 10
1324
+ ), [Pe, De] = he(ae), [z, fe] = he(0), [P, ye] = he([]), ke = go(ne), [Ke, Fe] = yo(
1325
+ Oe,
1326
+ ne,
1327
+ p
1328
+ ), {
1329
+ currentSorter: ce,
1330
+ activeSorters: oe,
1331
+ getNextActiveSorters: We,
1332
+ updateStateSorters: qe
1333
+ } = ho(ne, $e), { ComponentTable: ot, ComponentBodyWrapper: cn, ComponentHeaderWrapper: dn } = Le(h), wt = ie(() => Be(D) ? (e) => D(Q(e)) : (e) => e[D], [D]);
1334
+ function fn() {
1335
+ const e = {};
1336
+ let n = [];
1337
+ return ne.forEach((s) => {
1338
+ const k = s.dataIndex || s.key;
1339
+ if (s.defaultFilters && (e[k] = s.defaultFilters), s.filteredValue && (e[k] = s.filteredValue), "defaultSortOrder" in s || "sortOrder" in s) {
1340
+ const B = Ot(s.sorter), j = "sortOrder" in s ? s.sortOrder : s.defaultSortOrder, M = {
1341
+ field: k,
1342
+ direction: j,
1343
+ sorterFn: Dt(s.sorter),
1344
+ priority: B
1345
+ };
1346
+ j ? Qt(B) ? n.every(
1347
+ (ge) => Qt(ge.priority) || !ge.direction
1348
+ ) && n.push(M) : n.every((ge) => !ge.direction) ? n.push(M) : n = [M] : n.push(M);
1349
+ }
1350
+ }), { currentFilters: e, defaultSorters: n };
1351
+ }
1352
+ const rt = ie(() => {
1353
+ const e = ne.filter(
1354
+ (s) => "filteredValue" in s
1355
+ ), n = {};
1356
+ return e.length && e.forEach((s, k) => {
1357
+ const B = s.key || s.dataIndex || k;
1358
+ B !== void 0 && (n[B] = s.filteredValue);
1359
+ }), n;
1360
+ }, [ne]), _e = ie(() => Object.keys(rt).length ? rt : Pe, [Pe, rt]);
1361
+ function pn(e, n) {
1362
+ const s = zt(n);
1363
+ if (!s) return;
1364
+ const k = {
1365
+ direction: e,
1366
+ field: n,
1367
+ sorterFn: Dt(s.sorter),
1368
+ priority: Ot(s.sorter)
1369
+ }, B = We(k);
1370
+ qe(k, B);
1371
+ const j = at(
1372
+ k,
1373
+ B,
1374
+ _e
1375
+ ), M = Ge(j);
1376
+ U?.(ze(j), k, _e, {
1377
+ currentData: Q(M),
1378
+ currentAllData: Q(j),
1379
+ action: "sort"
1380
+ });
1381
+ }
1382
+ function un(e) {
1383
+ const n = function(k, B) {
1384
+ return (j, M) => {
1385
+ const ge = k(j, M);
1386
+ return B === "descend" ? -ge : ge;
1387
+ };
1388
+ }, s = [...e];
1389
+ return s.sort((k, B) => B.priority - k.priority), (k, B) => {
1390
+ for (let j = 0, M = s.length; j < M; j++) {
1391
+ const { sorterFn: ge, direction: vt } = s[j];
1392
+ if (!Be(ge)) continue;
1393
+ const mt = n(ge, vt)(k, B);
1394
+ if (mt !== 0)
1395
+ return mt;
1396
+ }
1397
+ return 0;
1398
+ };
1399
+ }
1400
+ function mn(e, n) {
1401
+ const s = {
1402
+ ..._e,
1403
+ [e.dataIndex]: n
1404
+ }, k = {
1405
+ ...s,
1406
+ ...rt
1407
+ };
1408
+ if (Ue(n) && n.length) {
1409
+ De(k);
1410
+ const B = at(
1411
+ ce,
1412
+ oe,
1413
+ s
1414
+ ), j = Ge(B);
1415
+ U?.(
1416
+ ze(B),
1417
+ oe.length === 1 ? oe[0] : oe,
1418
+ s,
1419
+ {
1420
+ currentData: Q(j),
1421
+ currentAllData: Q(B),
1422
+ action: "filter"
1423
+ }
1424
+ );
1425
+ } else Ue(n) && !n.length && Ht(e);
1426
+ }
1427
+ function Ht({ dataIndex: e }) {
1428
+ const n = {
1429
+ ..._e
1430
+ };
1431
+ delete n[e], De(n);
1432
+ const s = at(
1433
+ ce,
1434
+ oe,
1435
+ n
1436
+ ), k = Ge(s);
1437
+ U?.(
1438
+ ze(s),
1439
+ oe.length === 1 ? oe[0] : oe,
1440
+ n,
1441
+ {
1442
+ currentData: Q(k),
1443
+ currentAllData: Q(s),
1444
+ action: "filter"
1445
+ }
1446
+ );
1447
+ }
1448
+ const st = !!ne.find((e) => e.fixed === "left"), it = !!ne.find((e) => e.fixed === "right"), lt = st || it;
1449
+ function at(e, n, s) {
1450
+ let k = (G || []).slice();
1451
+ Object.keys(s).forEach((j) => {
1452
+ if (s[j] && s[j].length) {
1453
+ const M = zt(j);
1454
+ M && Be(M.onFilter) && (k = k.filter((ge) => s[j].reduce(
1455
+ (vt, mt) => vt || M.onFilter(mt, ge),
1456
+ !1
1457
+ )));
1458
+ }
1459
+ });
1460
+ const B = (j) => j.slice().sort(un(n)).map((M) => Ue(M[R]) ? {
1461
+ ...M,
1462
+ [R]: B(M[R])
1463
+ } : M);
1464
+ return e.direction && Be(e.sorterFn) || n.length ? B(k) : k;
1465
+ }
1466
+ const Me = at(
1467
+ ce,
1468
+ oe,
1469
+ _e
1470
+ );
1471
+ function ze(e = Me) {
1472
+ const n = E.pageSize || Ae || 10, s = te === "middle" ? "default" : te;
1473
+ let k = "top";
1474
+ I === "tl" || I === "bl" ? k = "bottom" : k = "top";
1475
+ const B = Ue(e) ? e.length : 0, j = Math.ceil(B / n) < Se ? 1 : Se;
1476
+ j !== Se && Ne(j);
1477
+ let M = {
1478
+ size: s,
1479
+ total: B,
1480
+ pageSize: n,
1481
+ current: j,
1482
+ selectProps: {
1483
+ triggerProps: {
1484
+ ...C,
1485
+ position: k
1486
+ }
1487
+ }
1488
+ };
1489
+ return typeof X == "object" && X.selectProps && (M.selectProps = {
1490
+ ...M.selectProps,
1491
+ ...X.selectProps
1492
+ }), we(X) && (M = {
1493
+ ...M,
1494
+ ...X
1495
+ }), we(E) && (M = {
1496
+ ...M,
1497
+ ...E
1498
+ }), M.onChange = Nn, M;
1499
+ }
1500
+ const ct = ze(), Ve = Ge();
1501
+ function Ge(e = Me, n = ct) {
1502
+ const { current: s = 0, pageSize: k = 10 } = n;
1503
+ return X === !1 || we(X) && u.length <= k ? e : e.slice((s - 1) * k, s * k);
1504
+ }
1505
+ const ve = !!(m && m.y), Je = L?.(Q(Me)), St = L && Xe.isValidElement(Je) && Je.props.fixed, hn = ve && St;
1506
+ Wn(() => {
1507
+ bt();
1508
+ const e = re.current, n = J.current, s = V.current;
1509
+ n && Tt(n, "scroll", je);
1510
+ const k = e && e.parentNode;
1511
+ return e && k && Tt(k, "scroll", je), s && Tt(s, "scroll", je), () => {
1512
+ n && Et(n, "scroll", je), k && Et(k, "scroll", je), s && Et(s, "scroll", je);
1513
+ };
1514
+ }, [
1515
+ st,
1516
+ it,
1517
+ m?.x,
1518
+ m?.y,
1519
+ ne.length,
1520
+ u
1521
+ ]), Ft(() => {
1522
+ const { total: e, pageSize: n } = ze(u);
1523
+ Math.ceil(e / n) < Se && Ne(1);
1524
+ }, [u?.length]), Ft(() => {
1525
+ dt();
1526
+ }, [u, st, it, c]), An(a, () => ({
1527
+ getRootDomElement: Lt,
1528
+ scrollIntoView: (e) => {
1529
+ xe.current && xe.current.scrollTo({ key: e });
1530
+ },
1531
+ getRootDOMNode: Lt
1532
+ }));
1533
+ function Lt() {
1534
+ return q.current;
1535
+ }
1536
+ Un(At(), (e) => {
1537
+ bt();
1538
+ }), Yn(!0, bt);
1539
+ function bt() {
1540
+ if (lt || $) {
1541
+ dt();
1542
+ const e = At();
1543
+ if (e) {
1544
+ const n = e?.clientWidth ?? e?.getBoundingClientRect?.()?.width;
1545
+ fe(n);
1546
+ }
1547
+ }
1548
+ }
1549
+ function At() {
1550
+ return J.current || me.current || q.current;
1551
+ }
1552
+ const yn = Ze(
1553
+ Hn(() => {
1554
+ const e = q.current, n = ve ? J.current : Ce.current && Ce.current.parentNode;
1555
+ if (n) {
1556
+ const s = c ? -n.scrollLeft : n.scrollLeft, k = s === 0, B = s + 1 >= n.children[0].getBoundingClientRect().width - n.getBoundingClientRect().width;
1557
+ k && B ? ft(
1558
+ e.classList,
1559
+ `${p}-scroll-position-both`
1560
+ ) : k ? ft(
1561
+ e.classList,
1562
+ `${p}-scroll-position-${c ? "right" : "left"}`
1563
+ ) : B ? ft(
1564
+ e.classList,
1565
+ `${p}-scroll-position-${c ? "left" : "right"}`
1566
+ ) : ft(
1567
+ e.classList,
1568
+ `${p}-scroll-position-middle`
1569
+ );
1570
+ } else
1571
+ e && Mt(e.classList);
1572
+ }, 100),
1573
+ [q.current, J.current, ve, c]
1574
+ );
1575
+ function dt() {
1576
+ if (lt || $) {
1577
+ const e = q.current;
1578
+ e && (st && Wt(
1579
+ e.classList,
1580
+ `${p}-has-fixed-col-left`
1581
+ ), it && Wt(
1582
+ e.classList,
1583
+ `${p}-has-fixed-col-right`
1584
+ )), yn();
1585
+ }
1586
+ }
1587
+ function Wt(e, n) {
1588
+ e.contains(n) || e.add(n);
1589
+ }
1590
+ function Mt(e) {
1591
+ e.remove(`${p}-scroll-position-both`), e.remove(`${p}-scroll-position-left`), e.remove(`${p}-scroll-position-right`), e.remove(`${p}-scroll-position-middle`);
1592
+ }
1593
+ function ft(e, n) {
1594
+ e.contains(n) || (Mt(e), e.add(n));
1595
+ }
1596
+ const {
1597
+ selectedRowKeys: $t,
1598
+ indeterminateKeys: gn,
1599
+ onCheckAll: xn,
1600
+ onCheck: Cn,
1601
+ onCheckRadio: wn,
1602
+ setSelectedRowKeys: Sn,
1603
+ allSelectedRowKeys: bn,
1604
+ flattenData: $n
1605
+ } = mo(N, Ve, G, wt);
1606
+ function zt(e) {
1607
+ return ne.find((n, s) => typeof n.key < "u" ? typeof n.key == "number" && typeof e == "string" ? n.key.toString() === e : n.key === e : typeof n.dataIndex < "u" ? n.dataIndex === e : typeof e == "number" ? s === e : !1);
1608
+ }
1609
+ function Nn(e, n) {
1610
+ Ne(e), Re(n), e !== Se && Rn(), W && !W.checkCrossPage && $t.length && (Sn([]), W.onChange?.([], []));
1611
+ const s = { ...ze(), current: e, pageSize: n };
1612
+ U?.(
1613
+ s,
1614
+ oe.length === 1 ? oe[0] : oe,
1615
+ _e,
1616
+ {
1617
+ currentData: Q(
1618
+ Ge(Me, s)
1619
+ ),
1620
+ currentAllData: Q(Me),
1621
+ action: "paginate"
1622
+ }
1623
+ ), E.onChange?.(e, n);
1624
+ }
1625
+ function Rn() {
1626
+ const e = J.current;
1627
+ e && e.scrollTo({ top: 0, behavior: "smooth" });
1628
+ }
1629
+ function je(e) {
1630
+ const { target: n } = e, s = J.current, k = re.current && re.current.parentNode, B = V.current;
1631
+ n.scrollLeft !== be.current && (k && (k.scrollLeft = n.scrollLeft), s && (s.scrollLeft = n.scrollLeft), B && (B.scrollLeft = n.scrollLeft), dt()), be.current = e.target.scrollLeft;
1632
+ }
1633
+ function kn(e) {
1634
+ const { target: n } = e, s = Ce.current;
1635
+ n.scrollLeft !== be.current && (s.scrollLeft = n.scrollLeft, dt()), be.current = e.target.scrollLeft;
1636
+ }
1637
+ const [Vt, vn] = uo(
1638
+ N,
1639
+ $n,
1640
+ wt
1641
+ );
1642
+ let jt = {}, Nt = {};
1643
+ m && (m.x && (typeof m.x == "number" || typeof m.x == "string") && (Nt = {
1644
+ width: m.x
1645
+ }), m.y && (typeof m.y == "number" || typeof m.y == "string") && (jt = {
1646
+ maxHeight: m.y
1647
+ }));
1648
+ function Tn() {
1649
+ requestAnimationFrame((e) => {
1650
+ const n = re.current && re.current.parentNode, s = Qn(n);
1651
+ s && s > 0 && (n.style.marginBottom = `-${s}px`, n.style.paddingBottom = "0px", V.current && (V.current.style.marginBottom = `-${s}px`, V.current.style.paddingBottom = "0px")), setTimeout(() => {
1652
+ const k = J.current;
1653
+ Zn(k) ? (Ie.current = !0, n && (n.style.overflowY = "scroll", n.style.scrollSnapType = "y mandatory"), V.current && (V.current.style.overflowY = "scroll", V.current.style.overflowY = "y mandatory")) : n && Ie.current && (Ie.current = !1, n.style.overflowY = "auto", n.style.overflowY = "y mandatory", V.current && (V.current.style.overflowY = "auto", V.current.style.overflowY = "y mandatory"));
1654
+ }, 0);
1655
+ });
1656
+ }
1657
+ const Ut = /* @__PURE__ */ o(
1658
+ Eo,
1659
+ {
1660
+ ...N,
1661
+ activeSorters: oe,
1662
+ currentSorter: ce,
1663
+ selectedRowKeys: $t,
1664
+ currentFilters: _e,
1665
+ onCheckAll: xn,
1666
+ onSort: pn,
1667
+ data: Ve,
1668
+ onHandleFilter: mn,
1669
+ onHandleFilterReset: Ht,
1670
+ prefixCls: p,
1671
+ allSelectedRowKeys: bn,
1672
+ groupColumns: Oe,
1673
+ stickyOffsets: ke,
1674
+ groupStickyClassNames: Ke
1675
+ }
1676
+ );
1677
+ function En() {
1678
+ const e = $ && m.x === "max-content";
1679
+ return ve || x ? /* @__PURE__ */ o(dn, { className: `${p}-header`, children: /* @__PURE__ */ le(
1680
+ ot,
1681
+ {
1682
+ ref: re,
1683
+ style: e ? {} : Nt,
1684
+ children: [
1685
+ /* @__PURE__ */ o(
1686
+ yt,
1687
+ {
1688
+ columns: ne,
1689
+ prefixCls: p,
1690
+ producer: !1,
1691
+ columnWidths: e && m.y ? P : null
1692
+ }
1693
+ ),
1694
+ Ut
1695
+ ]
1696
+ }
1697
+ ) }) : Ut;
1698
+ }
1699
+ const Yt = Je && /* @__PURE__ */ o(
1700
+ Ro,
1701
+ {
1702
+ prefixCls: p,
1703
+ summary: L,
1704
+ data: Ve,
1705
+ columns: ne,
1706
+ stickyOffsets: ke,
1707
+ stickyClassNames: Fe
1708
+ }
1709
+ ), Xt = /* @__PURE__ */ o(
1710
+ $o,
1711
+ {
1712
+ ...N,
1713
+ saveRef: (e) => pe.current = e,
1714
+ selectedRowKeys: $t,
1715
+ indeterminateKeys: gn,
1716
+ expandedRowKeys: Vt,
1717
+ onCheck: Cn,
1718
+ onCheckRadio: wn,
1719
+ onClickExpandBtn: vn,
1720
+ columns: ne,
1721
+ data: Ve,
1722
+ prefixCls: p,
1723
+ hasFixedColumn: lt,
1724
+ tableViewWidth: z,
1725
+ indentSize: K,
1726
+ noDataElement: _ || r("Table"),
1727
+ activeSorters: oe,
1728
+ currentSorter: ce,
1729
+ stickyOffsets: ke,
1730
+ stickyClassNames: Fe,
1731
+ getRowKey: wt,
1732
+ saveVirtualListRef: (e) => {
1733
+ x && (xe.current = e, J.current = e?.dom);
1734
+ },
1735
+ ___dangerouslySetInnerHTML___: N.___dangerouslySetInnerHTML___
1736
+ }
1737
+ ), qt = !x && !hn ? /* @__PURE__ */ le(gt, { children: [
1738
+ Xt,
1739
+ Yt
1740
+ ] }) : Xt;
1741
+ if (et(() => {
1742
+ const e = J.current || pe.current, n = jn([e], Tn);
1743
+ return () => {
1744
+ n();
1745
+ };
1746
+ }, [J.current, pe.current]), et(() => (N.consoleTable && console.table(u), () => {
1747
+ }), [u, N.consoleTable]), !g.length) return null;
1748
+ function Pn() {
1749
+ const e = we(m) && m.x === "max-content" && !!m.y && Ue(u) && u.length > 0;
1750
+ return ve && !x ? /* @__PURE__ */ o(
1751
+ cn,
1752
+ {
1753
+ ref: J,
1754
+ className: `${p}-body`,
1755
+ style: jt,
1756
+ children: /* @__PURE__ */ le(ot, { style: Nt, children: [
1757
+ /* @__PURE__ */ o(
1758
+ yt,
1759
+ {
1760
+ columns: ne,
1761
+ prefixCls: p,
1762
+ producer: e,
1763
+ onSetColumnWidths: ye,
1764
+ expandedRowKeys: Vt,
1765
+ data: u
1766
+ }
1767
+ ),
1768
+ qt
1769
+ ] })
1770
+ }
1771
+ ) : qt;
1772
+ }
1773
+ function Fn() {
1774
+ let e = {};
1775
+ $ && (e = {
1776
+ width: m.x
1777
+ });
1778
+ const n = /* @__PURE__ */ o("div", { className: `${p}-tfoot`, ref: V, children: /* @__PURE__ */ le(ot, { style: e, children: [
1779
+ /* @__PURE__ */ o(yt, { columns: ne, prefixCls: p }),
1780
+ Yt
1781
+ ] }) }), s = Je && ve && St === "top", k = Je && ve && St === "bottom", B = /* @__PURE__ */ le(gt, { children: [
1782
+ A ? En() : null,
1783
+ s && n,
1784
+ Pn(),
1785
+ k && n
1786
+ ] }), j = Be(Y) && Y(Ve), M = Be(l) && l(Ve);
1787
+ return /* @__PURE__ */ le(gt, { children: [
1788
+ !!j && /* @__PURE__ */ o("div", { className: `${p}-header-`, children: j }),
1789
+ /* @__PURE__ */ o("div", { ref: ue, className: `${p}-container`, children: /* @__PURE__ */ o(
1790
+ "div",
1791
+ {
1792
+ ref: de,
1793
+ className: `${p}-content-scroll`,
1794
+ children: /* @__PURE__ */ o(
1795
+ "div",
1796
+ {
1797
+ ref: me,
1798
+ className: `${p}-content-inner`,
1799
+ onScroll: ve ? void 0 : kn,
1800
+ children: ve || x ? B : /* @__PURE__ */ le(ot, { ref: Ce, style: e, children: [
1801
+ /* @__PURE__ */ o(yt, { prefixCls: p, columns: ne }),
1802
+ B
1803
+ ] })
1804
+ }
1805
+ )
1806
+ }
1807
+ ) }),
1808
+ !!M && /* @__PURE__ */ o("div", { className: `${p}-footer`, children: M })
1809
+ ] });
1810
+ }
1811
+ const In = we(v) ? v.wrapper : v, Rt = we(v) ? v.cell : O, On = we(v) ? v.cell || v.headerCell : O, Dn = we(v) ? v.cell || v.bodyCell : O, Kn = Z(
1812
+ p,
1813
+ `${p}-size-${te}`,
1814
+ {
1815
+ [`${p}-border`]: In,
1816
+ [`${p}-border-cell`]: Rt,
1817
+ [`${p}-border-header-cell`]: !Rt && On,
1818
+ [`${p}-border-body-cell`]: !Rt && Dn,
1819
+ [`${p}-stripe`]: F,
1820
+ [`${p}-hover`]: ee,
1821
+ [`${p}-type-radio`]: W && W.type === "radio",
1822
+ [`${p}-layout-fixed`]: H || m && (m.x || m.y) || g.find((e) => e.ellipsis),
1823
+ [`${p}-fixed-column`]: lt,
1824
+ [`${p}-virtualized`]: x,
1825
+ [`${p}-rtl`]: c
1826
+ },
1827
+ y
1828
+ ), kt = I === "tl" || I === "tr" || I === "topCenter", _n = Z(`${p}-pagination`, {
1829
+ [`${p}-pagination-left`]: I === "tl" || I === "bl",
1830
+ [`${p}-pagination-center`]: I === "topCenter" || I === "bottomCenter",
1831
+ [`${p}-pagination-top`]: kt
1832
+ });
1833
+ let pt = N.loading;
1834
+ typeof pt == "boolean" && (pt = { loading: pt });
1835
+ const Bn = X !== !1 && (Me.length !== 0 || ct?.total > 0);
1836
+ let ut;
1837
+ return Bn && (Be(b) ? ut = b(/* @__PURE__ */ o(Zt, { ...ct })) : ut = /* @__PURE__ */ o("div", { className: _n, children: /* @__PURE__ */ o(Zt, { ...ct }) })), /* @__PURE__ */ o(_t.Provider, { value: N, children: /* @__PURE__ */ o(
1838
+ "div",
1839
+ {
1840
+ ref: q,
1841
+ style: f,
1842
+ className: Kn,
1843
+ ...Vn(N),
1844
+ children: /* @__PURE__ */ le(
1845
+ Xn,
1846
+ {
1847
+ className: `${p}-spin`,
1848
+ element: w,
1849
+ ...pt,
1850
+ children: [
1851
+ kt && ut,
1852
+ Fn(),
1853
+ !kt && ut
1854
+ ]
1855
+ }
1856
+ )
1857
+ }
1858
+ ) });
1859
+ }
1860
+ const Do = Kt(Oo);
1861
+ Do.displayName = "Table";
1862
+ export {
1863
+ No as S,
1864
+ Do as T,
1865
+ Le as a,
1866
+ uo as b,
1867
+ mo as c,
1868
+ ho as d,
1869
+ yo as e,
1870
+ go as f,
1871
+ po as u
1872
+ };