@gobolt/genesis 0.0.7

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 (142) hide show
  1. package/README.md +86 -0
  2. package/dist/AntdIcon-Bsnbyy6g.js +200 -0
  3. package/dist/CheckOutlined-DAynWe12.js +527 -0
  4. package/dist/CloseCircleFilled-ZIY-u-27.js +13 -0
  5. package/dist/Compact-CJBo3f0u.js +185 -0
  6. package/dist/ContextIsolator-CGkdKtc3.js +20 -0
  7. package/dist/ExclamationCircleFilled-BICVVQIg.js +21 -0
  8. package/dist/Form-Cylpi4M4.js +1815 -0
  9. package/dist/Overflow-CP1M4Z0s.js +369 -0
  10. package/dist/SearchOutlined-DuzJkIiQ.js +52 -0
  11. package/dist/TextArea-3MOYYuAQ.js +1680 -0
  12. package/dist/bundle.css +1 -0
  13. package/dist/button-BNV2qdrP.js +1392 -0
  14. package/dist/compact-item-DH13cl8A.js +61 -0
  15. package/dist/components/atoms/button/Button.d.ts +12 -0
  16. package/dist/components/atoms/button/Button.js +27 -0
  17. package/dist/components/atoms/button/__stories__/Button.stories.d.ts +13 -0
  18. package/dist/components/atoms/button/index.d.ts +2 -0
  19. package/dist/components/atoms/button/index.js +4 -0
  20. package/dist/components/atoms/button/styles.d.ts +12 -0
  21. package/dist/components/atoms/button/styles.js +71 -0
  22. package/dist/components/atoms/checkbox/Checkbox.d.ts +10 -0
  23. package/dist/components/atoms/checkbox/Checkbox.js +13 -0
  24. package/dist/components/atoms/checkbox/__stories__/Checkbox.stories.d.ts +8 -0
  25. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.d.ts +1 -0
  26. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +18 -0
  27. package/dist/components/atoms/checkbox/index.d.ts +2 -0
  28. package/dist/components/atoms/checkbox/index.js +4 -0
  29. package/dist/components/atoms/checkbox/styles.d.ts +11 -0
  30. package/dist/components/atoms/checkbox/styles.js +582 -0
  31. package/dist/components/atoms/index.d.ts +1 -0
  32. package/dist/components/atoms/index.js +3 -0
  33. package/dist/components/atoms/input/Input.d.ts +11 -0
  34. package/dist/components/atoms/input/Input.js +12 -0
  35. package/dist/components/atoms/input/__stories__/Input.stories.d.ts +10 -0
  36. package/dist/components/atoms/input/__tests__/Input.test.d.ts +1 -0
  37. package/dist/components/atoms/input/__tests__/Input.test.js +28 -0
  38. package/dist/components/atoms/input/index.d.ts +2 -0
  39. package/dist/components/atoms/input/index.js +4 -0
  40. package/dist/components/atoms/input/styles.d.ts +14 -0
  41. package/dist/components/atoms/input/styles.js +415 -0
  42. package/dist/components/atoms/select/Select.d.ts +11 -0
  43. package/dist/components/atoms/select/Select.js +24 -0
  44. package/dist/components/atoms/select/__stories__/Select.stories.d.ts +8 -0
  45. package/dist/components/atoms/select/__tests__/Select.test.d.ts +1 -0
  46. package/dist/components/atoms/select/__tests__/Select.test.js +10735 -0
  47. package/dist/components/atoms/select/index.d.ts +2 -0
  48. package/dist/components/atoms/select/index.js +4 -0
  49. package/dist/components/atoms/select/styles.d.ts +15 -0
  50. package/dist/components/atoms/select/styles.js +3868 -0
  51. package/dist/components/atoms/typography/Typography.d.ts +11 -0
  52. package/dist/components/atoms/typography/Typography.js +44 -0
  53. package/dist/components/atoms/typography/__stories__/Typography.stories.d.ts +12 -0
  54. package/dist/components/atoms/typography/__tests__/Typography.test.d.ts +1 -0
  55. package/dist/components/atoms/typography/__tests__/Typography.test.js +16 -0
  56. package/dist/components/atoms/typography/index.d.ts +2 -0
  57. package/dist/components/atoms/typography/index.js +4 -0
  58. package/dist/components/atoms/typography/styles.d.ts +11 -0
  59. package/dist/components/atoms/typography/styles.js +28 -0
  60. package/dist/components/index.d.js +1 -0
  61. package/dist/components/index.d.ts +14 -0
  62. package/dist/components/index.js +16 -0
  63. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.d.ts +10 -0
  64. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +35 -0
  65. package/dist/components/molecules/error-boundary-fallback/__stories__/ErrorBoundaryFallback.stories.d.ts +8 -0
  66. package/dist/components/molecules/error-boundary-fallback/index.d.ts +1 -0
  67. package/dist/components/molecules/error-boundary-fallback/index.js +4 -0
  68. package/dist/components/molecules/error-boundary-fallback/styles.d.ts +1 -0
  69. package/dist/components/molecules/error-boundary-fallback/styles.js +930 -0
  70. package/dist/components/molecules/form/Form.d.ts +15 -0
  71. package/dist/components/molecules/form/Form.js +7 -0
  72. package/dist/components/molecules/form/__stories__/Form.stories.d.ts +7 -0
  73. package/dist/components/molecules/form/__stories__/FormStory.d.ts +1 -0
  74. package/dist/components/molecules/form/__stories__/FormStory.js +90 -0
  75. package/dist/components/molecules/form/index.d.ts +2 -0
  76. package/dist/components/molecules/form/index.js +4 -0
  77. package/dist/constants/index.d.ts +51 -0
  78. package/dist/constants/index.js +54 -0
  79. package/dist/context-CZsFJmh6.js +2093 -0
  80. package/dist/declaration.d.js +1 -0
  81. package/dist/genesis/GenesisThemeBreakdown.d.ts +4 -0
  82. package/dist/genesis/GenesisThemeBreakdown.js +56 -0
  83. package/dist/genesis/GenesisThemeDemo.d.ts +8 -0
  84. package/dist/genesis/GenesisThemeDemo.js +8 -0
  85. package/dist/genesis/GenesisThemeDemo.stories.d.ts +7 -0
  86. package/dist/genesis/styles.d.ts +12 -0
  87. package/dist/genesis/styles.js +4038 -0
  88. package/dist/index-3MWkSVA1.js +96 -0
  89. package/dist/index-BPtFqhcp.js +19110 -0
  90. package/dist/index-BQO27mgE.js +402 -0
  91. package/dist/index-BWys7dkb.js +4462 -0
  92. package/dist/index-C7kFNqp2.js +276 -0
  93. package/dist/index-D1v_7IIx.js +1057 -0
  94. package/dist/index-SAAXFt-P.js +946 -0
  95. package/dist/index-VDH3iLaC.js +884 -0
  96. package/dist/index.d.ts +2 -0
  97. package/dist/index.js +20 -0
  98. package/dist/isVisible-CNQjrJPN.js +366 -0
  99. package/dist/magic-string.es-BkUFmFT4.js +858 -0
  100. package/dist/presetColors-Cl8UP3Nw.js +4 -0
  101. package/dist/providers/GenesisProvider.d.ts +8 -0
  102. package/dist/providers/GenesisProvider.js +7 -0
  103. package/dist/providers/ThemeProvider.d.ts +9 -0
  104. package/dist/providers/ThemeProvider.js +18 -0
  105. package/dist/providers/index.d.ts +2 -0
  106. package/dist/providers/index.js +6 -0
  107. package/dist/reactNode-sKPeiqPL.js +12 -0
  108. package/dist/setup-CMYVZCPF.js +33883 -0
  109. package/dist/styled-components.browser.esm-CZ1XM4o4.js +1144 -0
  110. package/dist/styles/design-tokens/border-tokens/BorderTokenList.d.ts +1 -0
  111. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +37 -0
  112. package/dist/styles/design-tokens/border-tokens/BorderTokens.stories.d.ts +6 -0
  113. package/dist/styles/design-tokens/color-tokens/ColorTokens.stories.d.ts +7 -0
  114. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.d.ts +3 -0
  115. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +36 -0
  116. package/dist/styles/design-tokens/sizing-tokens/index.stories.d.ts +7 -0
  117. package/dist/styles/design-tokens/typography/TypographyTokens.stories.d.ts +7 -0
  118. package/dist/styles/design-tokens/variables.d.ts +704 -0
  119. package/dist/styles/design-tokens/variables.js +697 -0
  120. package/dist/styles/global-styles.d.ts +1 -0
  121. package/dist/styles/global-styles.js +35 -0
  122. package/dist/styles/theme/genesis-theme.d.ts +75 -0
  123. package/dist/styles/theme/genesis-theme.js +896 -0
  124. package/dist/styles/theme/genesis-theme.types.d.ts +162 -0
  125. package/dist/styles/theme/genesis-theme.types.js +4 -0
  126. package/dist/styles/theme/global-styles.d.ts +1 -0
  127. package/dist/styles/theme/global-styles.js +35 -0
  128. package/dist/styles/theme/index.d.ts +1 -0
  129. package/dist/styles/theme/index.js +9 -0
  130. package/dist/test/setup.d.ts +5 -0
  131. package/dist/test/setup.js +7 -0
  132. package/dist/useVariants-CEpw6Ww6.js +29 -0
  133. package/dist/utils/getAppointmentColor.d.ts +4 -0
  134. package/dist/utils/getAppointmentColor.js +91 -0
  135. package/dist/utils/isAllEnglishString.d.ts +1 -0
  136. package/dist/utils/isAllEnglishString.js +8 -0
  137. package/dist/utils/isAllEnglishString.test.d.ts +1 -0
  138. package/dist/utils/isAllEnglishString.test.js +8 -0
  139. package/dist/utils/parseAddress.d.ts +3 -0
  140. package/dist/utils/parseAddress.js +19 -0
  141. package/dist/vite-env.d.js +1 -0
  142. package/package.json +115 -0
@@ -0,0 +1,1057 @@
1
+ import * as r from "react";
2
+ import { useRef as st, useEffect as lt, useMemo as at, isValidElement as ct } from "react";
3
+ import { Z as dt, _ as fe, a2 as $e, a3 as ut, z as pt, m as ft, c as Q, k as mt, C as De, G as Le, A as Y, O as W, H as gt } from "./index-BWys7dkb.js";
4
+ import { I as me } from "./AntdIcon-Bsnbyy6g.js";
5
+ import { R as yt } from "./index-BQO27mgE.js";
6
+ import { t as Me, o as ke, u as Ce } from "./isVisible-CNQjrJPN.js";
7
+ import { a as bt } from "./index-VDH3iLaC.js";
8
+ import { T as ge } from "./index-SAAXFt-P.js";
9
+ import { K as we, R as Et } from "./CheckOutlined-DAynWe12.js";
10
+ import { c as ht } from "./reactNode-sKPeiqPL.js";
11
+ import { T as vt } from "./TextArea-3MOYYuAQ.js";
12
+ import { g as xt } from "./index-BPtFqhcp.js";
13
+ import { R as St } from "./Compact-CJBo3f0u.js";
14
+ var Ot = function(t) {
15
+ if (dt() && window.document.documentElement) {
16
+ var o = Array.isArray(t) ? t : [t], n = window.document.documentElement;
17
+ return o.some(function(i) {
18
+ return i in n.style;
19
+ });
20
+ }
21
+ return !1;
22
+ };
23
+ function Re(e, t) {
24
+ return Ot(e);
25
+ }
26
+ function Ct(e) {
27
+ return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1) && e == null ? [] : Array.isArray(e) ? e : [e];
28
+ }
29
+ var wt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, name: "copy", theme: "outlined" }, Rt = function(t, o) {
30
+ return /* @__PURE__ */ r.createElement(me, fe({}, t, {
31
+ ref: o,
32
+ icon: wt
33
+ }));
34
+ }, Pe = /* @__PURE__ */ r.forwardRef(Rt);
35
+ process.env.NODE_ENV !== "production" && (Pe.displayName = "CopyOutlined");
36
+ var Tt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" } }] }, name: "edit", theme: "outlined" }, Nt = function(t, o) {
37
+ return /* @__PURE__ */ r.createElement(me, fe({}, t, {
38
+ ref: o,
39
+ icon: Tt
40
+ }));
41
+ }, Ae = /* @__PURE__ */ r.forwardRef(Nt);
42
+ process.env.NODE_ENV !== "production" && (Ae.displayName = "EditOutlined");
43
+ var jt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z" } }] }, name: "enter", theme: "outlined" }, _t = function(t, o) {
44
+ return /* @__PURE__ */ r.createElement(me, fe({}, t, {
45
+ ref: o,
46
+ icon: jt
47
+ }));
48
+ }, He = /* @__PURE__ */ r.forwardRef(_t);
49
+ process.env.NODE_ENV !== "production" && (He.displayName = "EnterOutlined");
50
+ const It = (e, t, o, n) => {
51
+ const {
52
+ titleMarginBottom: i,
53
+ fontWeightStrong: s
54
+ } = n;
55
+ return {
56
+ marginBottom: i,
57
+ color: o,
58
+ fontWeight: s,
59
+ fontSize: e,
60
+ lineHeight: t
61
+ };
62
+ }, $t = (e) => {
63
+ const t = [1, 2, 3, 4, 5], o = {};
64
+ return t.forEach((n) => {
65
+ o[`
66
+ h${n}&,
67
+ div&-h${n},
68
+ div&-h${n} > textarea,
69
+ h${n}
70
+ `] = It(e[`fontSizeHeading${n}`], e[`lineHeightHeading${n}`], e.colorTextHeading, e);
71
+ }), o;
72
+ }, Dt = (e) => {
73
+ const {
74
+ componentCls: t
75
+ } = e;
76
+ return {
77
+ "a&, a": Object.assign(Object.assign({}, $e(e)), {
78
+ userSelect: "text",
79
+ [`&[disabled], &${t}-disabled`]: {
80
+ color: e.colorTextDisabled,
81
+ cursor: "not-allowed",
82
+ "&:active, &:hover": {
83
+ color: e.colorTextDisabled
84
+ },
85
+ "&:active": {
86
+ pointerEvents: "none"
87
+ }
88
+ }
89
+ })
90
+ };
91
+ }, Lt = (e) => ({
92
+ code: {
93
+ margin: "0 0.2em",
94
+ paddingInline: "0.4em",
95
+ paddingBlock: "0.2em 0.1em",
96
+ fontSize: "85%",
97
+ fontFamily: e.fontFamilyCode,
98
+ background: "rgba(150, 150, 150, 0.1)",
99
+ border: "1px solid rgba(100, 100, 100, 0.2)",
100
+ borderRadius: 3
101
+ },
102
+ kbd: {
103
+ margin: "0 0.2em",
104
+ paddingInline: "0.4em",
105
+ paddingBlock: "0.15em 0.1em",
106
+ fontSize: "90%",
107
+ fontFamily: e.fontFamilyCode,
108
+ background: "rgba(150, 150, 150, 0.06)",
109
+ border: "1px solid rgba(100, 100, 100, 0.2)",
110
+ borderBottomWidth: 2,
111
+ borderRadius: 3
112
+ },
113
+ mark: {
114
+ padding: 0,
115
+ // FIXME hardcode in v4
116
+ backgroundColor: ut[2]
117
+ },
118
+ "u, ins": {
119
+ textDecoration: "underline",
120
+ textDecorationSkipInk: "auto"
121
+ },
122
+ "s, del": {
123
+ textDecoration: "line-through"
124
+ },
125
+ strong: {
126
+ fontWeight: 600
127
+ },
128
+ // list
129
+ "ul, ol": {
130
+ marginInline: 0,
131
+ marginBlock: "0 1em",
132
+ padding: 0,
133
+ li: {
134
+ marginInline: "20px 0",
135
+ marginBlock: 0,
136
+ paddingInline: "4px 0",
137
+ paddingBlock: 0
138
+ }
139
+ },
140
+ ul: {
141
+ listStyleType: "circle",
142
+ ul: {
143
+ listStyleType: "disc"
144
+ }
145
+ },
146
+ ol: {
147
+ listStyleType: "decimal"
148
+ },
149
+ // pre & block
150
+ "pre, blockquote": {
151
+ margin: "1em 0"
152
+ },
153
+ pre: {
154
+ padding: "0.4em 0.6em",
155
+ whiteSpace: "pre-wrap",
156
+ wordWrap: "break-word",
157
+ background: "rgba(150, 150, 150, 0.1)",
158
+ border: "1px solid rgba(100, 100, 100, 0.2)",
159
+ borderRadius: 3,
160
+ fontFamily: e.fontFamilyCode,
161
+ // Compatible for marked
162
+ code: {
163
+ display: "inline",
164
+ margin: 0,
165
+ padding: 0,
166
+ fontSize: "inherit",
167
+ fontFamily: "inherit",
168
+ background: "transparent",
169
+ border: 0
170
+ }
171
+ },
172
+ blockquote: {
173
+ paddingInline: "0.6em 0",
174
+ paddingBlock: 0,
175
+ borderInlineStart: "4px solid rgba(100, 100, 100, 0.2)",
176
+ opacity: 0.85
177
+ }
178
+ }), Mt = (e) => {
179
+ const {
180
+ componentCls: t,
181
+ paddingSM: o
182
+ } = e, n = o;
183
+ return {
184
+ "&-edit-content": {
185
+ position: "relative",
186
+ "div&": {
187
+ insetInlineStart: e.calc(e.paddingSM).mul(-1).equal(),
188
+ marginTop: e.calc(n).mul(-1).equal(),
189
+ marginBottom: `calc(1em - ${pt(n)})`
190
+ },
191
+ [`${t}-edit-content-confirm`]: {
192
+ position: "absolute",
193
+ insetInlineEnd: e.calc(e.marginXS).add(2).equal(),
194
+ insetBlockEnd: e.marginXS,
195
+ color: e.colorTextDescription,
196
+ // default style
197
+ fontWeight: "normal",
198
+ fontSize: e.fontSize,
199
+ fontStyle: "normal",
200
+ pointerEvents: "none"
201
+ },
202
+ textarea: {
203
+ margin: "0!important",
204
+ // Fix Editable Textarea flash in Firefox
205
+ MozTransition: "none",
206
+ height: "1em"
207
+ }
208
+ }
209
+ };
210
+ }, kt = (e) => ({
211
+ [`${e.componentCls}-copy-success`]: {
212
+ "\n &,\n &:hover,\n &:focus": {
213
+ color: e.colorSuccess
214
+ }
215
+ },
216
+ [`${e.componentCls}-copy-icon-only`]: {
217
+ marginInlineStart: 0
218
+ }
219
+ }), Pt = () => ({
220
+ "\n a&-ellipsis,\n span&-ellipsis\n ": {
221
+ display: "inline-block",
222
+ maxWidth: "100%"
223
+ },
224
+ "&-ellipsis-single-line": {
225
+ whiteSpace: "nowrap",
226
+ overflow: "hidden",
227
+ textOverflow: "ellipsis",
228
+ // https://blog.csdn.net/iefreer/article/details/50421025
229
+ "a&, span&": {
230
+ verticalAlign: "bottom"
231
+ },
232
+ "> code": {
233
+ paddingBlock: 0,
234
+ maxWidth: "calc(100% - 1.2em)",
235
+ display: "inline-block",
236
+ overflow: "hidden",
237
+ textOverflow: "ellipsis",
238
+ verticalAlign: "bottom",
239
+ // https://github.com/ant-design/ant-design/issues/45953
240
+ boxSizing: "content-box"
241
+ }
242
+ },
243
+ "&-ellipsis-multiple-line": {
244
+ display: "-webkit-box",
245
+ overflow: "hidden",
246
+ WebkitLineClamp: 3,
247
+ WebkitBoxOrient: "vertical"
248
+ }
249
+ }), At = (e) => {
250
+ const {
251
+ componentCls: t,
252
+ titleMarginTop: o
253
+ } = e;
254
+ return {
255
+ [t]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
256
+ color: e.colorText,
257
+ wordBreak: "break-word",
258
+ lineHeight: e.lineHeight,
259
+ [`&${t}-secondary`]: {
260
+ color: e.colorTextDescription
261
+ },
262
+ [`&${t}-success`]: {
263
+ color: e.colorSuccess
264
+ },
265
+ [`&${t}-warning`]: {
266
+ color: e.colorWarning
267
+ },
268
+ [`&${t}-danger`]: {
269
+ color: e.colorError,
270
+ "a&:active, a&:focus": {
271
+ color: e.colorErrorActive
272
+ },
273
+ "a&:hover": {
274
+ color: e.colorErrorHover
275
+ }
276
+ },
277
+ [`&${t}-disabled`]: {
278
+ color: e.colorTextDisabled,
279
+ cursor: "not-allowed",
280
+ userSelect: "none"
281
+ },
282
+ "\n div&,\n p\n ": {
283
+ marginBottom: "1em"
284
+ }
285
+ }, $t(e)), {
286
+ [`
287
+ & + h1${t},
288
+ & + h2${t},
289
+ & + h3${t},
290
+ & + h4${t},
291
+ & + h5${t}
292
+ `]: {
293
+ marginTop: o
294
+ },
295
+ "\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5": {
296
+ "\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ": {
297
+ marginTop: o
298
+ }
299
+ }
300
+ }), Lt(e)), Dt(e)), {
301
+ // Operation
302
+ [`
303
+ ${t}-expand,
304
+ ${t}-collapse,
305
+ ${t}-edit,
306
+ ${t}-copy
307
+ `]: Object.assign(Object.assign({}, $e(e)), {
308
+ marginInlineStart: e.marginXXS
309
+ })
310
+ }), Mt(e)), kt(e)), Pt()), {
311
+ "&-rtl": {
312
+ direction: "rtl"
313
+ }
314
+ })
315
+ };
316
+ }, Ht = () => ({
317
+ titleMarginTop: "1.2em",
318
+ titleMarginBottom: "0.5em"
319
+ }), ze = ft("Typography", (e) => [At(e)], Ht), zt = (e) => {
320
+ const {
321
+ prefixCls: t,
322
+ "aria-label": o,
323
+ className: n,
324
+ style: i,
325
+ direction: s,
326
+ maxLength: u,
327
+ autoSize: c = !0,
328
+ value: d,
329
+ onSave: f,
330
+ onCancel: a,
331
+ onEnd: m,
332
+ component: g,
333
+ enterIcon: b = /* @__PURE__ */ r.createElement(He, null)
334
+ } = e, N = r.useRef(null), S = r.useRef(!1), O = r.useRef(null), [y, I] = r.useState(d);
335
+ r.useEffect(() => {
336
+ I(d);
337
+ }, [d]), r.useEffect(() => {
338
+ var E;
339
+ if (!((E = N.current) === null || E === void 0) && E.resizableTextArea) {
340
+ const {
341
+ textArea: h
342
+ } = N.current.resizableTextArea;
343
+ h.focus();
344
+ const {
345
+ length: x
346
+ } = h.value;
347
+ h.setSelectionRange(x, x);
348
+ }
349
+ }, []);
350
+ const H = (E) => {
351
+ let {
352
+ target: h
353
+ } = E;
354
+ I(h.value.replace(/[\n\r]/g, ""));
355
+ }, C = () => {
356
+ S.current = !0;
357
+ }, w = () => {
358
+ S.current = !1;
359
+ }, _ = (E) => {
360
+ let {
361
+ keyCode: h
362
+ } = E;
363
+ S.current || (O.current = h);
364
+ }, v = () => {
365
+ f(y.trim());
366
+ }, z = (E) => {
367
+ let {
368
+ keyCode: h,
369
+ ctrlKey: x,
370
+ altKey: P,
371
+ metaKey: T,
372
+ shiftKey: $
373
+ } = E;
374
+ O.current !== h || S.current || x || P || T || $ || (h === we.ENTER ? (v(), m == null || m()) : h === we.ESC && a());
375
+ }, U = () => {
376
+ v();
377
+ }, [B, M, F] = ze(t), k = Q(t, `${t}-edit-content`, {
378
+ [`${t}-rtl`]: s === "rtl",
379
+ [`${t}-${g}`]: !!g
380
+ }, n, M, F);
381
+ return B(/* @__PURE__ */ r.createElement("div", {
382
+ className: k,
383
+ style: i
384
+ }, /* @__PURE__ */ r.createElement(vt, {
385
+ ref: N,
386
+ maxLength: u,
387
+ value: y,
388
+ onChange: H,
389
+ onKeyDown: _,
390
+ onKeyUp: z,
391
+ onCompositionStart: C,
392
+ onCompositionEnd: w,
393
+ onBlur: U,
394
+ "aria-label": o,
395
+ rows: 1,
396
+ autoSize: c
397
+ }), b !== null ? ht(b, {
398
+ className: `${t}-edit-content-confirm`
399
+ }) : null));
400
+ };
401
+ var Vt = function() {
402
+ var e = document.getSelection();
403
+ if (!e.rangeCount)
404
+ return function() {
405
+ };
406
+ for (var t = document.activeElement, o = [], n = 0; n < e.rangeCount; n++)
407
+ o.push(e.getRangeAt(n));
408
+ switch (t.tagName.toUpperCase()) {
409
+ case "INPUT":
410
+ case "TEXTAREA":
411
+ t.blur();
412
+ break;
413
+ default:
414
+ t = null;
415
+ break;
416
+ }
417
+ return e.removeAllRanges(), function() {
418
+ e.type === "Caret" && e.removeAllRanges(), e.rangeCount || o.forEach(function(i) {
419
+ e.addRange(i);
420
+ }), t && t.focus();
421
+ };
422
+ }, Bt = Vt, Te = {
423
+ "text/plain": "Text",
424
+ "text/html": "Url",
425
+ default: "Text"
426
+ }, Wt = "Copy to clipboard: #{key}, Enter";
427
+ function Ut(e) {
428
+ var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
429
+ return e.replace(/#{\s*key\s*}/g, t);
430
+ }
431
+ function Ft(e, t) {
432
+ var o, n, i, s, u, c, d = !1;
433
+ t || (t = {}), o = t.debug || !1;
434
+ try {
435
+ i = Bt(), s = document.createRange(), u = document.getSelection(), c = document.createElement("span"), c.textContent = e, c.ariaHidden = "true", c.style.all = "unset", c.style.position = "fixed", c.style.top = 0, c.style.clip = "rect(0, 0, 0, 0)", c.style.whiteSpace = "pre", c.style.webkitUserSelect = "text", c.style.MozUserSelect = "text", c.style.msUserSelect = "text", c.style.userSelect = "text", c.addEventListener("copy", function(a) {
436
+ if (a.stopPropagation(), t.format)
437
+ if (a.preventDefault(), typeof a.clipboardData > "u") {
438
+ o && console.warn("unable to use e.clipboardData"), o && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
439
+ var m = Te[t.format] || Te.default;
440
+ window.clipboardData.setData(m, e);
441
+ } else
442
+ a.clipboardData.clearData(), a.clipboardData.setData(t.format, e);
443
+ t.onCopy && (a.preventDefault(), t.onCopy(a.clipboardData));
444
+ }), document.body.appendChild(c), s.selectNodeContents(c), u.addRange(s);
445
+ var f = document.execCommand("copy");
446
+ if (!f)
447
+ throw new Error("copy command was unsuccessful");
448
+ d = !0;
449
+ } catch (a) {
450
+ o && console.error("unable to copy using execCommand: ", a), o && console.warn("trying IE specific stuff");
451
+ try {
452
+ window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), d = !0;
453
+ } catch (m) {
454
+ o && console.error("unable to copy using clipboardData: ", m), o && console.error("falling back to prompt"), n = Ut("message" in t ? t.message : Wt), window.prompt(n, e);
455
+ }
456
+ } finally {
457
+ u && (typeof u.removeRange == "function" ? u.removeRange(s) : u.removeAllRanges()), c && document.body.removeChild(c), i();
458
+ }
459
+ return d;
460
+ }
461
+ var Kt = Ft;
462
+ const qt = /* @__PURE__ */ xt(Kt);
463
+ var Xt = function(e, t, o, n) {
464
+ function i(s) {
465
+ return s instanceof o ? s : new o(function(u) {
466
+ u(s);
467
+ });
468
+ }
469
+ return new (o || (o = Promise))(function(s, u) {
470
+ function c(a) {
471
+ try {
472
+ f(n.next(a));
473
+ } catch (m) {
474
+ u(m);
475
+ }
476
+ }
477
+ function d(a) {
478
+ try {
479
+ f(n.throw(a));
480
+ } catch (m) {
481
+ u(m);
482
+ }
483
+ }
484
+ function f(a) {
485
+ a.done ? s(a.value) : i(a.value).then(c, d);
486
+ }
487
+ f((n = n.apply(e, t || [])).next());
488
+ });
489
+ };
490
+ const Jt = (e) => {
491
+ let {
492
+ copyConfig: t,
493
+ children: o
494
+ } = e;
495
+ const [n, i] = r.useState(!1), [s, u] = r.useState(!1), c = r.useRef(null), d = () => {
496
+ c.current && clearTimeout(c.current);
497
+ }, f = {};
498
+ t.format && (f.format = t.format), r.useEffect(() => d, []);
499
+ const a = mt((m) => Xt(void 0, void 0, void 0, function* () {
500
+ var g;
501
+ m == null || m.preventDefault(), m == null || m.stopPropagation(), u(!0);
502
+ try {
503
+ const b = typeof t.text == "function" ? yield t.text() : t.text;
504
+ qt(b || Ct(o, !0).join("") || "", f), u(!1), i(!0), d(), c.current = setTimeout(() => {
505
+ i(!1);
506
+ }, 3e3), (g = t.onCopy) === null || g === void 0 || g.call(t, m);
507
+ } catch (b) {
508
+ throw u(!1), b;
509
+ }
510
+ }));
511
+ return {
512
+ copied: n,
513
+ copyLoading: s,
514
+ onClick: a
515
+ };
516
+ };
517
+ function le(e, t) {
518
+ return r.useMemo(() => {
519
+ const o = !!e;
520
+ return [o, Object.assign(Object.assign({}, t), o && typeof e == "object" ? e : null)];
521
+ }, [e]);
522
+ }
523
+ const Gt = (e) => {
524
+ const t = st(void 0);
525
+ return lt(() => {
526
+ t.current = e;
527
+ }), t.current;
528
+ }, Zt = (e, t, o) => at(() => e === !0 ? {
529
+ title: t ?? o
530
+ } : /* @__PURE__ */ ct(e) ? {
531
+ title: e
532
+ } : typeof e == "object" ? Object.assign({
533
+ title: t ?? o
534
+ }, e) : {
535
+ title: e
536
+ }, [e, t, o]);
537
+ var Qt = function(e, t) {
538
+ var o = {};
539
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
540
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
541
+ t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
542
+ return o;
543
+ };
544
+ const ye = /* @__PURE__ */ r.forwardRef((e, t) => {
545
+ const {
546
+ prefixCls: o,
547
+ component: n = "article",
548
+ className: i,
549
+ rootClassName: s,
550
+ setContentRef: u,
551
+ children: c,
552
+ direction: d,
553
+ style: f
554
+ } = e, a = Qt(e, ["prefixCls", "component", "className", "rootClassName", "setContentRef", "children", "direction", "style"]), {
555
+ getPrefixCls: m,
556
+ direction: g,
557
+ typography: b
558
+ } = r.useContext(De), N = d ?? g, S = u ? Le(t, u) : t, O = m("typography", o);
559
+ process.env.NODE_ENV !== "production" && Y("Typography").deprecated(!u, "setContentRef", "ref");
560
+ const [y, I, H] = ze(O), C = Q(O, b == null ? void 0 : b.className, {
561
+ [`${O}-rtl`]: N === "rtl"
562
+ }, i, s, I, H), w = Object.assign(Object.assign({}, b == null ? void 0 : b.style), f);
563
+ return y(
564
+ // @ts-expect-error: Expression produces a union type that is too complex to represent.
565
+ /* @__PURE__ */ r.createElement(n, Object.assign({
566
+ className: C,
567
+ style: w,
568
+ ref: S
569
+ }, a), c)
570
+ );
571
+ });
572
+ process.env.NODE_ENV !== "production" && (ye.displayName = "Typography");
573
+ function Ne(e) {
574
+ return e === !1 ? [!1, !1] : Array.isArray(e) ? e : [e];
575
+ }
576
+ function ae(e, t, o) {
577
+ return e === !0 || e === void 0 ? t : e || o && t;
578
+ }
579
+ function Yt(e) {
580
+ const t = document.createElement("em");
581
+ e.appendChild(t), process.env.NODE_ENV !== "production" && (t.className = "ant-typography-css-ellipsis-content-measure");
582
+ const o = e.getBoundingClientRect(), n = t.getBoundingClientRect();
583
+ return e.removeChild(t), // Horizontal out of range
584
+ o.left > n.left || n.right > o.right || // Vertical out of range
585
+ o.top > n.top || n.bottom > o.bottom;
586
+ }
587
+ const be = (e) => ["string", "number"].includes(typeof e), en = (e) => {
588
+ let {
589
+ prefixCls: t,
590
+ copied: o,
591
+ locale: n,
592
+ iconOnly: i,
593
+ tooltips: s,
594
+ icon: u,
595
+ tabIndex: c,
596
+ onCopy: d,
597
+ loading: f
598
+ } = e;
599
+ const a = Ne(s), m = Ne(u), {
600
+ copied: g,
601
+ copy: b
602
+ } = n ?? {}, N = o ? g : b, S = ae(a[o ? 1 : 0], N), O = typeof S == "string" ? S : N;
603
+ return /* @__PURE__ */ r.createElement(ge, {
604
+ title: S
605
+ }, /* @__PURE__ */ r.createElement("button", {
606
+ type: "button",
607
+ className: Q(`${t}-copy`, {
608
+ [`${t}-copy-success`]: o,
609
+ [`${t}-copy-icon-only`]: i
610
+ }),
611
+ onClick: d,
612
+ "aria-label": O,
613
+ tabIndex: c
614
+ }, o ? ae(m[1], /* @__PURE__ */ r.createElement(Et, null), !0) : ae(m[0], f ? /* @__PURE__ */ r.createElement(St, null) : /* @__PURE__ */ r.createElement(Pe, null), !0)));
615
+ }, G = /* @__PURE__ */ r.forwardRef((e, t) => {
616
+ let {
617
+ style: o,
618
+ children: n
619
+ } = e;
620
+ const i = r.useRef(null);
621
+ return r.useImperativeHandle(t, () => ({
622
+ isExceed: () => {
623
+ const s = i.current;
624
+ return s.scrollHeight > s.clientHeight;
625
+ },
626
+ getHeight: () => i.current.clientHeight
627
+ })), /* @__PURE__ */ r.createElement("span", {
628
+ "aria-hidden": !0,
629
+ ref: i,
630
+ style: Object.assign({
631
+ position: "fixed",
632
+ display: "block",
633
+ left: 0,
634
+ top: 0,
635
+ pointerEvents: "none",
636
+ backgroundColor: "rgba(255, 0, 0, 0.65)"
637
+ }, o)
638
+ }, n);
639
+ }), tn = (e) => e.reduce((t, o) => t + (be(o) ? String(o).length : 1), 0);
640
+ function je(e, t) {
641
+ let o = 0;
642
+ const n = [];
643
+ for (let i = 0; i < e.length; i += 1) {
644
+ if (o === t)
645
+ return n;
646
+ const s = e[i], c = be(s) ? String(s).length : 1, d = o + c;
647
+ if (d > t) {
648
+ const f = t - o;
649
+ return n.push(String(s).slice(0, f)), n;
650
+ }
651
+ n.push(s), o = d;
652
+ }
653
+ return e;
654
+ }
655
+ const ce = 0, de = 1, ue = 2, pe = 3, _e = 4, Z = {
656
+ display: "-webkit-box",
657
+ overflow: "hidden",
658
+ WebkitBoxOrient: "vertical"
659
+ };
660
+ function nn(e) {
661
+ const {
662
+ enableMeasure: t,
663
+ width: o,
664
+ text: n,
665
+ children: i,
666
+ rows: s,
667
+ expanded: u,
668
+ miscDeps: c,
669
+ onEllipsis: d
670
+ } = e, f = r.useMemo(() => Me(n), [n]), a = r.useMemo(() => tn(f), [n]), m = r.useMemo(() => i(f, !1), [n]), [g, b] = r.useState(null), N = r.useRef(null), S = r.useRef(null), O = r.useRef(null), y = r.useRef(null), I = r.useRef(null), [H, C] = r.useState(!1), [w, _] = r.useState(ce), [v, z] = r.useState(0), [U, B] = r.useState(null);
671
+ W(() => {
672
+ _(t && o && a ? de : ce);
673
+ }, [o, n, s, t, f]), W(() => {
674
+ var E, h, x, P;
675
+ if (w === de) {
676
+ _(ue);
677
+ const T = S.current && getComputedStyle(S.current).whiteSpace;
678
+ B(T);
679
+ } else if (w === ue) {
680
+ const T = !!(!((E = O.current) === null || E === void 0) && E.isExceed());
681
+ _(T ? pe : _e), b(T ? [0, a] : null), C(T);
682
+ const $ = ((h = O.current) === null || h === void 0 ? void 0 : h.getHeight()) || 0, ne = s === 1 ? 0 : ((x = y.current) === null || x === void 0 ? void 0 : x.getHeight()) || 0, q = ((P = I.current) === null || P === void 0 ? void 0 : P.getHeight()) || 0, oe = Math.max(
683
+ $,
684
+ // height of rows with ellipsis
685
+ ne + q
686
+ );
687
+ z(oe + 1), d(T);
688
+ }
689
+ }, [w]);
690
+ const M = g ? Math.ceil((g[0] + g[1]) / 2) : 0;
691
+ W(() => {
692
+ var E;
693
+ const [h, x] = g || [0, 0];
694
+ if (h !== x) {
695
+ const T = (((E = N.current) === null || E === void 0 ? void 0 : E.getHeight()) || 0) > v;
696
+ let $ = M;
697
+ x - h === 1 && ($ = T ? h : x), b(T ? [h, $] : [$, x]);
698
+ }
699
+ }, [g, M]);
700
+ const F = r.useMemo(() => {
701
+ if (!t)
702
+ return i(f, !1);
703
+ if (w !== pe || !g || g[0] !== g[1]) {
704
+ const E = i(f, !1);
705
+ return [_e, ce].includes(w) ? E : /* @__PURE__ */ r.createElement("span", {
706
+ style: Object.assign(Object.assign({}, Z), {
707
+ WebkitLineClamp: s
708
+ })
709
+ }, E);
710
+ }
711
+ return i(u ? f : je(f, g[0]), H);
712
+ }, [u, w, g, f].concat(gt(c))), k = {
713
+ width: o,
714
+ margin: 0,
715
+ padding: 0,
716
+ whiteSpace: U === "nowrap" ? "normal" : "inherit"
717
+ };
718
+ return /* @__PURE__ */ r.createElement(r.Fragment, null, F, w === ue && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(G, {
719
+ style: Object.assign(Object.assign(Object.assign({}, k), Z), {
720
+ WebkitLineClamp: s
721
+ }),
722
+ ref: O
723
+ }, m), /* @__PURE__ */ r.createElement(G, {
724
+ style: Object.assign(Object.assign(Object.assign({}, k), Z), {
725
+ WebkitLineClamp: s - 1
726
+ }),
727
+ ref: y
728
+ }, m), /* @__PURE__ */ r.createElement(G, {
729
+ style: Object.assign(Object.assign(Object.assign({}, k), Z), {
730
+ WebkitLineClamp: 1
731
+ }),
732
+ ref: I
733
+ }, i([], !0))), w === pe && g && g[0] !== g[1] && /* @__PURE__ */ r.createElement(G, {
734
+ style: Object.assign(Object.assign({}, k), {
735
+ top: 400
736
+ }),
737
+ ref: N
738
+ }, i(je(f, M), !0)), w === de && /* @__PURE__ */ r.createElement("span", {
739
+ style: {
740
+ whiteSpace: "inherit"
741
+ },
742
+ ref: S
743
+ }));
744
+ }
745
+ const Ve = (e) => {
746
+ let {
747
+ enableEllipsis: t,
748
+ isEllipsis: o,
749
+ children: n,
750
+ tooltipProps: i
751
+ } = e;
752
+ return !(i != null && i.title) || !t ? n : /* @__PURE__ */ r.createElement(ge, Object.assign({
753
+ open: o ? void 0 : !1
754
+ }, i), n);
755
+ };
756
+ process.env.NODE_ENV !== "production" && (Ve.displayName = "EllipsisTooltip");
757
+ var on = function(e, t) {
758
+ var o = {};
759
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
760
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
761
+ t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
762
+ return o;
763
+ };
764
+ function rn(e, t) {
765
+ let {
766
+ mark: o,
767
+ code: n,
768
+ underline: i,
769
+ delete: s,
770
+ strong: u,
771
+ keyboard: c,
772
+ italic: d
773
+ } = e, f = t;
774
+ function a(m, g) {
775
+ g && (f = /* @__PURE__ */ r.createElement(m, {}, f));
776
+ }
777
+ return a("strong", u), a("u", i), a("del", s), a("code", n), a("mark", o), a("kbd", c), a("i", d), f;
778
+ }
779
+ const sn = "...", ee = /* @__PURE__ */ r.forwardRef((e, t) => {
780
+ var o;
781
+ const {
782
+ prefixCls: n,
783
+ className: i,
784
+ style: s,
785
+ type: u,
786
+ disabled: c,
787
+ children: d,
788
+ ellipsis: f,
789
+ editable: a,
790
+ copyable: m,
791
+ component: g,
792
+ title: b
793
+ } = e, N = on(e, ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"]), {
794
+ getPrefixCls: S,
795
+ direction: O
796
+ } = r.useContext(De), [y] = bt("Text"), I = r.useRef(null), H = r.useRef(null), C = S("typography", n), w = ke(N, ["mark", "code", "delete", "underline", "strong", "keyboard", "italic"]), [_, v] = le(a), [z, U] = Ce(!1, {
797
+ value: v.editing
798
+ }), {
799
+ triggerType: B = ["icon"]
800
+ } = v, M = (l) => {
801
+ var p;
802
+ l && ((p = v.onStart) === null || p === void 0 || p.call(v)), U(l);
803
+ }, F = Gt(z);
804
+ W(() => {
805
+ var l;
806
+ !z && F && ((l = H.current) === null || l === void 0 || l.focus());
807
+ }, [z]);
808
+ const k = (l) => {
809
+ l == null || l.preventDefault(), M(!0);
810
+ }, E = (l) => {
811
+ var p;
812
+ (p = v.onChange) === null || p === void 0 || p.call(v, l), M(!1);
813
+ }, h = () => {
814
+ var l;
815
+ (l = v.onCancel) === null || l === void 0 || l.call(v), M(!1);
816
+ }, [x, P] = le(m), {
817
+ copied: T,
818
+ copyLoading: $,
819
+ onClick: ne
820
+ } = Jt({
821
+ copyConfig: P,
822
+ children: d
823
+ }), [q, oe] = r.useState(!1), [Ee, Be] = r.useState(!1), [he, We] = r.useState(!1), [ve, Ue] = r.useState(!1), [Fe, Ke] = r.useState(!0), [V, R] = le(f, {
824
+ expandable: !1,
825
+ symbol: (l) => l ? y == null ? void 0 : y.collapse : y == null ? void 0 : y.expand
826
+ }), [A, qe] = Ce(R.defaultExpanded || !1, {
827
+ value: R.expanded
828
+ }), j = V && (!A || R.expandable === "collapsible"), {
829
+ rows: K = 1
830
+ } = R, X = r.useMemo(() => (
831
+ // Disable ellipsis
832
+ j && // Provide suffix
833
+ (R.suffix !== void 0 || R.onEllipsis || // Can't use css ellipsis since we need to provide the place for button
834
+ R.expandable || _ || x)
835
+ ), [j, R, _, x]);
836
+ W(() => {
837
+ V && !X && (oe(Re("webkitLineClamp")), Be(Re("textOverflow")));
838
+ }, [X, V]);
839
+ const [D, Xe] = r.useState(j), xe = r.useMemo(() => X ? !1 : K === 1 ? Ee : q, [X, Ee, q]);
840
+ W(() => {
841
+ Xe(xe && j);
842
+ }, [xe, j]);
843
+ const Se = j && (D ? ve : he), Je = j && K === 1 && D, re = j && K > 1 && D, Ge = (l, p) => {
844
+ var L;
845
+ qe(p.expanded), (L = R.onExpand) === null || L === void 0 || L.call(R, l, p);
846
+ }, [Oe, Ze] = r.useState(0), Qe = (l) => {
847
+ let {
848
+ offsetWidth: p
849
+ } = l;
850
+ Ze(p);
851
+ }, Ye = (l) => {
852
+ var p;
853
+ We(l), he !== l && ((p = R.onEllipsis) === null || p === void 0 || p.call(R, l));
854
+ };
855
+ r.useEffect(() => {
856
+ const l = I.current;
857
+ if (V && D && l) {
858
+ const p = Yt(l);
859
+ ve !== p && Ue(p);
860
+ }
861
+ }, [V, D, d, re, Fe, Oe]), r.useEffect(() => {
862
+ const l = I.current;
863
+ if (typeof IntersectionObserver > "u" || !l || !D || !j)
864
+ return;
865
+ const p = new IntersectionObserver(() => {
866
+ Ke(!!l.offsetParent);
867
+ });
868
+ return p.observe(l), () => {
869
+ p.disconnect();
870
+ };
871
+ }, [D, j]);
872
+ const ie = Zt(R.tooltip, v.text, d), J = r.useMemo(() => {
873
+ if (!(!V || D))
874
+ return [v.text, d, b, ie.title].find(be);
875
+ }, [V, D, b, ie.title, Se]);
876
+ if (z)
877
+ return /* @__PURE__ */ r.createElement(zt, {
878
+ value: (o = v.text) !== null && o !== void 0 ? o : typeof d == "string" ? d : "",
879
+ onSave: E,
880
+ onCancel: h,
881
+ onEnd: v.onEnd,
882
+ prefixCls: C,
883
+ className: i,
884
+ style: s,
885
+ direction: O,
886
+ component: g,
887
+ maxLength: v.maxLength,
888
+ autoSize: v.autoSize,
889
+ enterIcon: v.enterIcon
890
+ });
891
+ const et = () => {
892
+ const {
893
+ expandable: l,
894
+ symbol: p
895
+ } = R;
896
+ return l ? /* @__PURE__ */ r.createElement("button", {
897
+ type: "button",
898
+ key: "expand",
899
+ className: `${C}-${A ? "collapse" : "expand"}`,
900
+ onClick: (L) => Ge(L, {
901
+ expanded: !A
902
+ }),
903
+ "aria-label": A ? y.collapse : y == null ? void 0 : y.expand
904
+ }, typeof p == "function" ? p(A) : p) : null;
905
+ }, tt = () => {
906
+ if (!_)
907
+ return;
908
+ const {
909
+ icon: l,
910
+ tooltip: p,
911
+ tabIndex: L
912
+ } = v, se = Me(p)[0] || (y == null ? void 0 : y.edit), it = typeof se == "string" ? se : "";
913
+ return B.includes("icon") ? /* @__PURE__ */ r.createElement(ge, {
914
+ key: "edit",
915
+ title: p === !1 ? "" : se
916
+ }, /* @__PURE__ */ r.createElement("button", {
917
+ type: "button",
918
+ ref: H,
919
+ className: `${C}-edit`,
920
+ onClick: k,
921
+ "aria-label": it,
922
+ tabIndex: L
923
+ }, l || /* @__PURE__ */ r.createElement(Ae, {
924
+ role: "button"
925
+ }))) : null;
926
+ }, nt = () => x ? /* @__PURE__ */ r.createElement(en, Object.assign({
927
+ key: "copy"
928
+ }, P, {
929
+ prefixCls: C,
930
+ copied: T,
931
+ locale: y,
932
+ onCopy: ne,
933
+ loading: $,
934
+ iconOnly: d == null
935
+ })) : null, ot = (l) => [l && et(), tt(), nt()], rt = (l) => [l && !A && /* @__PURE__ */ r.createElement("span", {
936
+ "aria-hidden": !0,
937
+ key: "ellipsis"
938
+ }, sn), R.suffix, ot(l)];
939
+ return /* @__PURE__ */ r.createElement(yt, {
940
+ onResize: Qe,
941
+ disabled: !j
942
+ }, (l) => /* @__PURE__ */ r.createElement(Ve, {
943
+ tooltipProps: ie,
944
+ enableEllipsis: j,
945
+ isEllipsis: Se
946
+ }, /* @__PURE__ */ r.createElement(ye, Object.assign({
947
+ className: Q({
948
+ [`${C}-${u}`]: u,
949
+ [`${C}-disabled`]: c,
950
+ [`${C}-ellipsis`]: V,
951
+ [`${C}-ellipsis-single-line`]: Je,
952
+ [`${C}-ellipsis-multiple-line`]: re
953
+ }, i),
954
+ prefixCls: n,
955
+ style: Object.assign(Object.assign({}, s), {
956
+ WebkitLineClamp: re ? K : void 0
957
+ }),
958
+ component: g,
959
+ ref: Le(l, I, t),
960
+ direction: O,
961
+ onClick: B.includes("text") ? k : void 0,
962
+ "aria-label": J == null ? void 0 : J.toString(),
963
+ title: b
964
+ }, w), /* @__PURE__ */ r.createElement(nn, {
965
+ enableMeasure: j && !D,
966
+ text: d,
967
+ rows: K,
968
+ width: Oe,
969
+ onEllipsis: Ye,
970
+ expanded: A,
971
+ miscDeps: [T, A, $, _, x, y]
972
+ }, (p, L) => rn(e, /* @__PURE__ */ r.createElement(r.Fragment, null, p.length > 0 && L && !A && J ? /* @__PURE__ */ r.createElement("span", {
973
+ key: "show-content",
974
+ "aria-hidden": !0
975
+ }, p) : p, rt(L)))))));
976
+ });
977
+ var ln = function(e, t) {
978
+ var o = {};
979
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
980
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
981
+ t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
982
+ return o;
983
+ };
984
+ const an = /* @__PURE__ */ r.forwardRef((e, t) => {
985
+ var {
986
+ ellipsis: o,
987
+ rel: n
988
+ } = e, i = ln(e, ["ellipsis", "rel"]);
989
+ if (process.env.NODE_ENV !== "production") {
990
+ const u = Y("Typography.Link");
991
+ process.env.NODE_ENV !== "production" && u(typeof o != "object", "usage", "`ellipsis` only supports boolean value.");
992
+ }
993
+ const s = Object.assign(Object.assign({}, i), {
994
+ rel: n === void 0 && i.target === "_blank" ? "noopener noreferrer" : n
995
+ });
996
+ return delete s.navigate, /* @__PURE__ */ r.createElement(ee, Object.assign({}, s, {
997
+ ref: t,
998
+ ellipsis: !!o,
999
+ component: "a"
1000
+ }));
1001
+ }), cn = /* @__PURE__ */ r.forwardRef((e, t) => /* @__PURE__ */ r.createElement(ee, Object.assign({
1002
+ ref: t
1003
+ }, e, {
1004
+ component: "div"
1005
+ })));
1006
+ var dn = function(e, t) {
1007
+ var o = {};
1008
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1009
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
1010
+ t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
1011
+ return o;
1012
+ };
1013
+ const un = (e, t) => {
1014
+ var {
1015
+ ellipsis: o
1016
+ } = e, n = dn(e, ["ellipsis"]);
1017
+ const i = r.useMemo(() => o && typeof o == "object" ? ke(o, ["expandable", "rows"]) : o, [o]);
1018
+ if (process.env.NODE_ENV !== "production") {
1019
+ const s = Y("Typography.Text");
1020
+ process.env.NODE_ENV !== "production" && s(typeof o != "object" || !o || !("expandable" in o) && !("rows" in o), "usage", "`ellipsis` do not support `expandable` or `rows` props.");
1021
+ }
1022
+ return /* @__PURE__ */ r.createElement(ee, Object.assign({
1023
+ ref: t
1024
+ }, n, {
1025
+ ellipsis: i,
1026
+ component: "span"
1027
+ }));
1028
+ }, pn = /* @__PURE__ */ r.forwardRef(un);
1029
+ var fn = function(e, t) {
1030
+ var o = {};
1031
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1032
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
1033
+ t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
1034
+ return o;
1035
+ };
1036
+ const Ie = [1, 2, 3, 4, 5], mn = /* @__PURE__ */ r.forwardRef((e, t) => {
1037
+ const {
1038
+ level: o = 1
1039
+ } = e, n = fn(e, ["level"]);
1040
+ if (process.env.NODE_ENV !== "production") {
1041
+ const s = Y("Typography.Title");
1042
+ process.env.NODE_ENV !== "production" && s(Ie.includes(o), "usage", "Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.");
1043
+ }
1044
+ const i = Ie.includes(o) ? `h${o}` : "h1";
1045
+ return /* @__PURE__ */ r.createElement(ee, Object.assign({
1046
+ ref: t
1047
+ }, n, {
1048
+ component: i
1049
+ }));
1050
+ }), te = ye;
1051
+ te.Text = pn;
1052
+ te.Link = an;
1053
+ te.Title = mn;
1054
+ te.Paragraph = cn;
1055
+ export {
1056
+ te as T
1057
+ };