ysyt-react-agent-lib 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2410 @@
1
+ import { t as K, v as Ft, K as Ne, x as Dt, B as Pe, y as nt, z as kt, e as R, c as O, A as De, p as je, d as Y, a as Ie, E as ot, G as ke, n as At, H as Ae, J as _e, P as _t, R as Te, L as Vt, g as re, m as fe, f as N, C as q, N as ge, O as Wt, Q as qt, U as Me, V as Gt, X as at, Y as Xt, r as lt, Z as Ut, k as Ce, l as rt, $ as Kt, a0 as Qt, a1 as Zt, a2 as ue, a3 as Re, a4 as Yt, a5 as st, a6 as Jt, a7 as en, a8 as tn, a9 as nn, aa as on, ab as an, ac as ln, ad as rn, ae as sn, af as it, ag as cn, ah as dn, ai as un, aj as mn, ak as fn, al as gn, am as Cn, W as pn } from "./index-DTX4tP2H.mjs";
2
+ import * as r from "react";
3
+ import $, { useContext as se, useRef as Z, useMemo as vn, useEffect as Ve } from "react";
4
+ function bn() {
5
+ const [e, t] = r.useState([]), o = r.useCallback((n) => (t((a) => [].concat(K(a), [n])), () => {
6
+ t((a) => a.filter((l) => l !== n));
7
+ }), []);
8
+ return [e, o];
9
+ }
10
+ const hn = new Ne("antFadeIn", {
11
+ "0%": {
12
+ opacity: 0
13
+ },
14
+ "100%": {
15
+ opacity: 1
16
+ }
17
+ }), yn = new Ne("antFadeOut", {
18
+ "0%": {
19
+ opacity: 1
20
+ },
21
+ "100%": {
22
+ opacity: 0
23
+ }
24
+ }), $n = function(e) {
25
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
26
+ const {
27
+ antCls: o
28
+ } = e, n = `${o}-fade`, a = t ? "&" : "";
29
+ return [Ft(n, hn, yn, e.motionDurationMid, t), {
30
+ [`
31
+ ${a}${n}-enter,
32
+ ${a}${n}-appear
33
+ `]: {
34
+ opacity: 0,
35
+ animationTimingFunction: "linear"
36
+ },
37
+ [`${a}${n}-leave`]: {
38
+ animationTimingFunction: "linear"
39
+ }
40
+ }];
41
+ };
42
+ function ye(e) {
43
+ return !!(e != null && e.then);
44
+ }
45
+ const ct = (e) => {
46
+ const {
47
+ type: t,
48
+ children: o,
49
+ prefixCls: n,
50
+ buttonProps: a,
51
+ close: l,
52
+ autoFocus: s,
53
+ emitEvent: d,
54
+ isSilent: i,
55
+ quitOnNullishReturnValue: f,
56
+ actionFn: c
57
+ } = e, u = r.useRef(!1), m = r.useRef(null), [p, y] = Dt(!1), g = function() {
58
+ l == null || l.apply(void 0, arguments);
59
+ };
60
+ r.useEffect(() => {
61
+ let v = null;
62
+ return s && (v = setTimeout(() => {
63
+ var x;
64
+ (x = m.current) === null || x === void 0 || x.focus({
65
+ preventScroll: !0
66
+ });
67
+ })), () => {
68
+ v && clearTimeout(v);
69
+ };
70
+ }, []);
71
+ const C = (v) => {
72
+ ye(v) && (y(!0), v.then(function() {
73
+ y(!1, !0), g.apply(void 0, arguments), u.current = !1;
74
+ }, (x) => {
75
+ if (y(!1, !0), u.current = !1, !(i != null && i()))
76
+ return Promise.reject(x);
77
+ }));
78
+ }, b = (v) => {
79
+ if (u.current)
80
+ return;
81
+ if (u.current = !0, !c) {
82
+ g();
83
+ return;
84
+ }
85
+ let x;
86
+ if (d) {
87
+ if (x = c(v), f && !ye(x)) {
88
+ u.current = !1, g(v);
89
+ return;
90
+ }
91
+ } else if (c.length)
92
+ x = c(l), u.current = !1;
93
+ else if (x = c(), !ye(x)) {
94
+ g();
95
+ return;
96
+ }
97
+ C(x);
98
+ };
99
+ return /* @__PURE__ */ r.createElement(Pe, Object.assign({}, nt(t), {
100
+ onClick: b,
101
+ loading: p,
102
+ prefixCls: n
103
+ }, a, {
104
+ ref: m
105
+ }), o);
106
+ }, ie = /* @__PURE__ */ $.createContext({}), {
107
+ Provider: dt
108
+ } = ie, We = () => {
109
+ const {
110
+ autoFocusButton: e,
111
+ cancelButtonProps: t,
112
+ cancelTextLocale: o,
113
+ isSilent: n,
114
+ mergedOkCancel: a,
115
+ rootPrefixCls: l,
116
+ close: s,
117
+ onCancel: d,
118
+ onConfirm: i
119
+ } = se(ie);
120
+ return a ? /* @__PURE__ */ $.createElement(ct, {
121
+ isSilent: n,
122
+ actionFn: d,
123
+ close: function() {
124
+ s == null || s.apply(void 0, arguments), i == null || i(!1);
125
+ },
126
+ autoFocus: e === "cancel",
127
+ buttonProps: t,
128
+ prefixCls: `${l}-btn`
129
+ }, o) : null;
130
+ }, qe = () => {
131
+ const {
132
+ autoFocusButton: e,
133
+ close: t,
134
+ isSilent: o,
135
+ okButtonProps: n,
136
+ rootPrefixCls: a,
137
+ okTextLocale: l,
138
+ okType: s,
139
+ onConfirm: d,
140
+ onOk: i
141
+ } = se(ie);
142
+ return /* @__PURE__ */ $.createElement(ct, {
143
+ isSilent: o,
144
+ type: s || "primary",
145
+ actionFn: i,
146
+ close: function() {
147
+ t == null || t.apply(void 0, arguments), d == null || d(!0);
148
+ },
149
+ autoFocus: e === "ok",
150
+ buttonProps: n,
151
+ prefixCls: `${a}-btn`
152
+ }, l);
153
+ };
154
+ var ut = /* @__PURE__ */ r.createContext({});
155
+ function Ge(e, t, o) {
156
+ var n = t;
157
+ return !n && o && (n = "".concat(e, "-").concat(o)), n;
158
+ }
159
+ function Xe(e, t) {
160
+ var o = e["page".concat(t ? "Y" : "X", "Offset")], n = "scroll".concat(t ? "Top" : "Left");
161
+ if (typeof o != "number") {
162
+ var a = e.document;
163
+ o = a.documentElement[n], typeof o != "number" && (o = a.body[n]);
164
+ }
165
+ return o;
166
+ }
167
+ function xn(e) {
168
+ var t = e.getBoundingClientRect(), o = {
169
+ left: t.left,
170
+ top: t.top
171
+ }, n = e.ownerDocument, a = n.defaultView || n.parentWindow;
172
+ return o.left += Xe(a), o.top += Xe(a, !0), o;
173
+ }
174
+ const Sn = /* @__PURE__ */ r.memo(function(e) {
175
+ var t = e.children;
176
+ return t;
177
+ }, function(e, t) {
178
+ var o = t.shouldUpdate;
179
+ return !o;
180
+ });
181
+ var On = {
182
+ width: 0,
183
+ height: 0,
184
+ overflow: "hidden",
185
+ outline: "none"
186
+ }, En = {
187
+ outline: "none"
188
+ }, Be = /* @__PURE__ */ $.forwardRef(function(e, t) {
189
+ var o = e.prefixCls, n = e.className, a = e.style, l = e.title, s = e.ariaId, d = e.footer, i = e.closable, f = e.closeIcon, c = e.onClose, u = e.children, m = e.bodyStyle, p = e.bodyProps, y = e.modalRender, g = e.onMouseDown, C = e.onMouseUp, b = e.holderRef, v = e.visible, x = e.forceRender, E = e.width, w = e.height, S = e.classNames, h = e.styles, I = $.useContext(ut), j = I.panel, F = kt(b, j), H = Z(), L = Z();
190
+ $.useImperativeHandle(t, function() {
191
+ return {
192
+ focus: function() {
193
+ var z;
194
+ (z = H.current) === null || z === void 0 || z.focus({
195
+ preventScroll: !0
196
+ });
197
+ },
198
+ changeActive: function(z) {
199
+ var ae = document, Q = ae.activeElement;
200
+ z && Q === L.current ? H.current.focus({
201
+ preventScroll: !0
202
+ }) : !z && Q === H.current && L.current.focus({
203
+ preventScroll: !0
204
+ });
205
+ }
206
+ };
207
+ });
208
+ var X = {};
209
+ E !== void 0 && (X.width = E), w !== void 0 && (X.height = w);
210
+ var k = d ? /* @__PURE__ */ $.createElement("div", {
211
+ className: O("".concat(o, "-footer"), S == null ? void 0 : S.footer),
212
+ style: R({}, h == null ? void 0 : h.footer)
213
+ }, d) : null, D = l ? /* @__PURE__ */ $.createElement("div", {
214
+ className: O("".concat(o, "-header"), S == null ? void 0 : S.header),
215
+ style: R({}, h == null ? void 0 : h.header)
216
+ }, /* @__PURE__ */ $.createElement("div", {
217
+ className: "".concat(o, "-title"),
218
+ id: s
219
+ }, l)) : null, W = vn(function() {
220
+ return De(i) === "object" && i !== null ? i : i ? {
221
+ closeIcon: f ?? /* @__PURE__ */ $.createElement("span", {
222
+ className: "".concat(o, "-close-x")
223
+ })
224
+ } : {};
225
+ }, [i, f, o]), A = je(W, !0), T = De(i) === "object" && i.disabled, J = i ? /* @__PURE__ */ $.createElement("button", Y({
226
+ type: "button",
227
+ onClick: c,
228
+ "aria-label": "Close"
229
+ }, A, {
230
+ className: "".concat(o, "-close"),
231
+ disabled: T
232
+ }), W.closeIcon) : null, B = /* @__PURE__ */ $.createElement("div", {
233
+ className: O("".concat(o, "-content"), S == null ? void 0 : S.content),
234
+ style: h == null ? void 0 : h.content
235
+ }, J, D, /* @__PURE__ */ $.createElement("div", Y({
236
+ className: O("".concat(o, "-body"), S == null ? void 0 : S.body),
237
+ style: R(R({}, m), h == null ? void 0 : h.body)
238
+ }, p), u), k);
239
+ return /* @__PURE__ */ $.createElement("div", {
240
+ key: "dialog-element",
241
+ role: "dialog",
242
+ "aria-labelledby": l ? s : null,
243
+ "aria-modal": "true",
244
+ ref: F,
245
+ style: R(R({}, a), X),
246
+ className: O(o, n),
247
+ onMouseDown: g,
248
+ onMouseUp: C
249
+ }, /* @__PURE__ */ $.createElement("div", {
250
+ ref: H,
251
+ tabIndex: 0,
252
+ style: En
253
+ }, /* @__PURE__ */ $.createElement(Sn, {
254
+ shouldUpdate: v || x
255
+ }, y ? y(B) : B)), /* @__PURE__ */ $.createElement("div", {
256
+ tabIndex: 0,
257
+ ref: L,
258
+ style: On
259
+ }));
260
+ });
261
+ process.env.NODE_ENV !== "production" && (Be.displayName = "Panel");
262
+ var mt = /* @__PURE__ */ r.forwardRef(function(e, t) {
263
+ var o = e.prefixCls, n = e.title, a = e.style, l = e.className, s = e.visible, d = e.forceRender, i = e.destroyOnClose, f = e.motionName, c = e.ariaId, u = e.onVisibleChanged, m = e.mousePosition, p = Z(), y = r.useState(), g = Ie(y, 2), C = g[0], b = g[1], v = {};
264
+ C && (v.transformOrigin = C);
265
+ function x() {
266
+ var E = xn(p.current);
267
+ b(m && (m.x || m.y) ? "".concat(m.x - E.left, "px ").concat(m.y - E.top, "px") : "");
268
+ }
269
+ return /* @__PURE__ */ r.createElement(ot, {
270
+ visible: s,
271
+ onVisibleChanged: u,
272
+ onAppearPrepare: x,
273
+ onEnterPrepare: x,
274
+ forceRender: d,
275
+ motionName: f,
276
+ removeOnLeave: i,
277
+ ref: p
278
+ }, function(E, w) {
279
+ var S = E.className, h = E.style;
280
+ return /* @__PURE__ */ r.createElement(Be, Y({}, e, {
281
+ ref: t,
282
+ title: n,
283
+ ariaId: c,
284
+ prefixCls: o,
285
+ holderRef: w,
286
+ style: R(R(R({}, h), a), v),
287
+ className: O(l, S)
288
+ }));
289
+ });
290
+ });
291
+ mt.displayName = "Content";
292
+ var wn = function(t) {
293
+ var o = t.prefixCls, n = t.style, a = t.visible, l = t.maskProps, s = t.motionName, d = t.className;
294
+ return /* @__PURE__ */ r.createElement(ot, {
295
+ key: "mask",
296
+ visible: a,
297
+ motionName: s,
298
+ leavedClassName: "".concat(o, "-mask-hidden")
299
+ }, function(i, f) {
300
+ var c = i.className, u = i.style;
301
+ return /* @__PURE__ */ r.createElement("div", Y({
302
+ ref: f,
303
+ style: R(R({}, u), n),
304
+ className: O("".concat(o, "-mask"), c, d)
305
+ }, l));
306
+ });
307
+ }, Nn = function(t) {
308
+ var o = t.prefixCls, n = o === void 0 ? "rc-dialog" : o, a = t.zIndex, l = t.visible, s = l === void 0 ? !1 : l, d = t.keyboard, i = d === void 0 ? !0 : d, f = t.focusTriggerAfterClose, c = f === void 0 ? !0 : f, u = t.wrapStyle, m = t.wrapClassName, p = t.wrapProps, y = t.onClose, g = t.afterOpenChange, C = t.afterClose, b = t.transitionName, v = t.animation, x = t.closable, E = x === void 0 ? !0 : x, w = t.mask, S = w === void 0 ? !0 : w, h = t.maskTransitionName, I = t.maskAnimation, j = t.maskClosable, F = j === void 0 ? !0 : j, H = t.maskStyle, L = t.maskProps, X = t.rootClassName, k = t.classNames, D = t.styles;
309
+ process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(P) {
310
+ ke(!(P in t), "".concat(P, " is deprecated, please use styles instead."));
311
+ }), "wrapClassName" in t && ke(!1, "wrapClassName is deprecated, please use classNames instead."));
312
+ var W = Z(), A = Z(), T = Z(), J = r.useState(s), B = Ie(J, 2), U = B[0], z = B[1], ae = At();
313
+ function Q() {
314
+ Ae(A.current, document.activeElement) || (W.current = document.activeElement);
315
+ }
316
+ function be() {
317
+ if (!Ae(A.current, document.activeElement)) {
318
+ var P;
319
+ (P = T.current) === null || P === void 0 || P.focus();
320
+ }
321
+ }
322
+ function _(P) {
323
+ if (P)
324
+ be();
325
+ else {
326
+ if (z(!1), S && W.current && c) {
327
+ try {
328
+ W.current.focus({
329
+ preventScroll: !0
330
+ });
331
+ } catch {
332
+ }
333
+ W.current = null;
334
+ }
335
+ U && (C == null || C());
336
+ }
337
+ g == null || g(P);
338
+ }
339
+ function M(P) {
340
+ y == null || y(P);
341
+ }
342
+ var V = Z(!1), le = Z(), Bt = function() {
343
+ clearTimeout(le.current), V.current = !0;
344
+ }, zt = function() {
345
+ le.current = setTimeout(function() {
346
+ V.current = !1;
347
+ });
348
+ }, Fe = null;
349
+ F && (Fe = function(he) {
350
+ V.current ? V.current = !1 : A.current === he.target && M(he);
351
+ });
352
+ function Ht(P) {
353
+ if (i && P.keyCode === _e.ESC) {
354
+ P.stopPropagation(), M(P);
355
+ return;
356
+ }
357
+ s && P.keyCode === _e.TAB && T.current.changeActive(!P.shiftKey);
358
+ }
359
+ Ve(function() {
360
+ s && (z(!0), Q());
361
+ }, [s]), Ve(function() {
362
+ return function() {
363
+ clearTimeout(le.current);
364
+ };
365
+ }, []);
366
+ var Lt = R(R(R({
367
+ zIndex: a
368
+ }, u), D == null ? void 0 : D.wrapper), {}, {
369
+ display: U ? null : "none"
370
+ });
371
+ return /* @__PURE__ */ r.createElement("div", Y({
372
+ className: O("".concat(n, "-root"), X)
373
+ }, je(t, {
374
+ data: !0
375
+ })), /* @__PURE__ */ r.createElement(wn, {
376
+ prefixCls: n,
377
+ visible: S && s,
378
+ motionName: Ge(n, h, I),
379
+ style: R(R({
380
+ zIndex: a
381
+ }, H), D == null ? void 0 : D.mask),
382
+ maskProps: L,
383
+ className: k == null ? void 0 : k.mask
384
+ }), /* @__PURE__ */ r.createElement("div", Y({
385
+ tabIndex: -1,
386
+ onKeyDown: Ht,
387
+ className: O("".concat(n, "-wrap"), m, k == null ? void 0 : k.wrapper),
388
+ ref: A,
389
+ onClick: Fe,
390
+ style: Lt
391
+ }, p), /* @__PURE__ */ r.createElement(mt, Y({}, t, {
392
+ onMouseDown: Bt,
393
+ onMouseUp: zt,
394
+ ref: T,
395
+ closable: E,
396
+ ariaId: ae,
397
+ prefixCls: n,
398
+ visible: s && U,
399
+ onClose: M,
400
+ onVisibleChanged: _,
401
+ motionName: Ge(n, b, v)
402
+ }))));
403
+ }, ft = function(t) {
404
+ var o = t.visible, n = t.getContainer, a = t.forceRender, l = t.destroyOnClose, s = l === void 0 ? !1 : l, d = t.afterClose, i = t.panelRef, f = r.useState(o), c = Ie(f, 2), u = c[0], m = c[1], p = r.useMemo(function() {
405
+ return {
406
+ panel: i
407
+ };
408
+ }, [i]);
409
+ return r.useEffect(function() {
410
+ o && m(!0);
411
+ }, [o]), !a && s && !u ? null : /* @__PURE__ */ r.createElement(ut.Provider, {
412
+ value: p
413
+ }, /* @__PURE__ */ r.createElement(_t, {
414
+ open: o || a || u,
415
+ autoDestroy: !1,
416
+ getContainer: n,
417
+ autoLock: o || u
418
+ }, /* @__PURE__ */ r.createElement(Nn, Y({}, t, {
419
+ destroyOnClose: s,
420
+ afterClose: function() {
421
+ d == null || d(), m(!1);
422
+ }
423
+ }))));
424
+ };
425
+ ft.displayName = "Dialog";
426
+ function me(e) {
427
+ if (e)
428
+ return {
429
+ closable: e.closable,
430
+ closeIcon: e.closeIcon
431
+ };
432
+ }
433
+ function Ue(e) {
434
+ const {
435
+ closable: t,
436
+ closeIcon: o
437
+ } = e || {};
438
+ return $.useMemo(() => {
439
+ if (
440
+ // If `closable`, whatever rest be should be true
441
+ !t && (t === !1 || o === !1 || o === null)
442
+ )
443
+ return !1;
444
+ if (t === void 0 && o === void 0)
445
+ return null;
446
+ let n = {
447
+ closeIcon: typeof o != "boolean" && o !== null ? o : void 0
448
+ };
449
+ return t && typeof t == "object" && (n = Object.assign(Object.assign({}, n), t)), n;
450
+ }, [t, o]);
451
+ }
452
+ function Ke() {
453
+ const e = {};
454
+ for (var t = arguments.length, o = new Array(t), n = 0; n < t; n++)
455
+ o[n] = arguments[n];
456
+ return o.forEach((a) => {
457
+ a && Object.keys(a).forEach((l) => {
458
+ a[l] !== void 0 && (e[l] = a[l]);
459
+ });
460
+ }), e;
461
+ }
462
+ const Pn = {};
463
+ function gt(e, t) {
464
+ let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Pn;
465
+ const n = Ue(e), a = Ue(t), l = typeof n != "boolean" ? !!(n != null && n.disabled) : !1, s = $.useMemo(() => Object.assign({
466
+ closeIcon: /* @__PURE__ */ $.createElement(Te, null)
467
+ }, o), [o]), d = $.useMemo(() => n === !1 ? !1 : n ? Ke(s, a, n) : a === !1 ? !1 : a ? Ke(s, a) : s.closable ? s : !1, [n, a, s]);
468
+ return $.useMemo(() => {
469
+ if (d === !1)
470
+ return [!1, null, l];
471
+ const {
472
+ closeIconRender: i
473
+ } = s, {
474
+ closeIcon: f
475
+ } = d;
476
+ let c = f;
477
+ if (c != null) {
478
+ i && (c = i(f));
479
+ const u = je(d, !0);
480
+ Object.keys(u).length && (c = /* @__PURE__ */ $.isValidElement(c) ? /* @__PURE__ */ $.cloneElement(c, u) : /* @__PURE__ */ $.createElement("span", Object.assign({}, u), c));
481
+ }
482
+ return [!0, c, l];
483
+ }, [d, s]);
484
+ }
485
+ const jn = () => Vt() && window.document.documentElement, pe = (e) => {
486
+ const {
487
+ prefixCls: t,
488
+ className: o,
489
+ style: n,
490
+ size: a,
491
+ shape: l
492
+ } = e, s = O({
493
+ [`${t}-lg`]: a === "large",
494
+ [`${t}-sm`]: a === "small"
495
+ }), d = O({
496
+ [`${t}-circle`]: l === "circle",
497
+ [`${t}-square`]: l === "square",
498
+ [`${t}-round`]: l === "round"
499
+ }), i = r.useMemo(() => typeof a == "number" ? {
500
+ width: a,
501
+ height: a,
502
+ lineHeight: `${a}px`
503
+ } : {}, [a]);
504
+ return /* @__PURE__ */ r.createElement("span", {
505
+ className: O(t, s, d, o),
506
+ style: Object.assign(Object.assign({}, i), n)
507
+ });
508
+ }, In = new Ne("ant-skeleton-loading", {
509
+ "0%": {
510
+ backgroundPosition: "100% 50%"
511
+ },
512
+ "100%": {
513
+ backgroundPosition: "0 50%"
514
+ }
515
+ }), ve = (e) => ({
516
+ height: e,
517
+ lineHeight: N(e)
518
+ }), ne = (e) => Object.assign({
519
+ width: e
520
+ }, ve(e)), Tn = (e) => ({
521
+ background: e.skeletonLoadingBackground,
522
+ backgroundSize: "400% 100%",
523
+ animationName: In,
524
+ animationDuration: e.skeletonLoadingMotionDuration,
525
+ animationTimingFunction: "ease",
526
+ animationIterationCount: "infinite"
527
+ }), $e = (e, t) => Object.assign({
528
+ width: t(e).mul(5).equal(),
529
+ minWidth: t(e).mul(5).equal()
530
+ }, ve(e)), Mn = (e) => {
531
+ const {
532
+ skeletonAvatarCls: t,
533
+ gradientFromColor: o,
534
+ controlHeight: n,
535
+ controlHeightLG: a,
536
+ controlHeightSM: l
537
+ } = e;
538
+ return {
539
+ [t]: Object.assign({
540
+ display: "inline-block",
541
+ verticalAlign: "top",
542
+ background: o
543
+ }, ne(n)),
544
+ [`${t}${t}-circle`]: {
545
+ borderRadius: "50%"
546
+ },
547
+ [`${t}${t}-lg`]: Object.assign({}, ne(a)),
548
+ [`${t}${t}-sm`]: Object.assign({}, ne(l))
549
+ };
550
+ }, Rn = (e) => {
551
+ const {
552
+ controlHeight: t,
553
+ borderRadiusSM: o,
554
+ skeletonInputCls: n,
555
+ controlHeightLG: a,
556
+ controlHeightSM: l,
557
+ gradientFromColor: s,
558
+ calc: d
559
+ } = e;
560
+ return {
561
+ [n]: Object.assign({
562
+ display: "inline-block",
563
+ verticalAlign: "top",
564
+ background: s,
565
+ borderRadius: o
566
+ }, $e(t, d)),
567
+ [`${n}-lg`]: Object.assign({}, $e(a, d)),
568
+ [`${n}-sm`]: Object.assign({}, $e(l, d))
569
+ };
570
+ }, Qe = (e) => Object.assign({
571
+ width: e
572
+ }, ve(e)), Bn = (e) => {
573
+ const {
574
+ skeletonImageCls: t,
575
+ imageSizeBase: o,
576
+ gradientFromColor: n,
577
+ borderRadiusSM: a,
578
+ calc: l
579
+ } = e;
580
+ return {
581
+ [t]: Object.assign(Object.assign({
582
+ display: "inline-flex",
583
+ alignItems: "center",
584
+ justifyContent: "center",
585
+ verticalAlign: "middle",
586
+ background: n,
587
+ borderRadius: a
588
+ }, Qe(l(o).mul(2).equal())), {
589
+ [`${t}-path`]: {
590
+ fill: "#bfbfbf"
591
+ },
592
+ [`${t}-svg`]: Object.assign(Object.assign({}, Qe(o)), {
593
+ maxWidth: l(o).mul(4).equal(),
594
+ maxHeight: l(o).mul(4).equal()
595
+ }),
596
+ [`${t}-svg${t}-svg-circle`]: {
597
+ borderRadius: "50%"
598
+ }
599
+ }),
600
+ [`${t}${t}-circle`]: {
601
+ borderRadius: "50%"
602
+ }
603
+ };
604
+ }, xe = (e, t, o) => {
605
+ const {
606
+ skeletonButtonCls: n
607
+ } = e;
608
+ return {
609
+ [`${o}${n}-circle`]: {
610
+ width: t,
611
+ minWidth: t,
612
+ borderRadius: "50%"
613
+ },
614
+ [`${o}${n}-round`]: {
615
+ borderRadius: t
616
+ }
617
+ };
618
+ }, Se = (e, t) => Object.assign({
619
+ width: t(e).mul(2).equal(),
620
+ minWidth: t(e).mul(2).equal()
621
+ }, ve(e)), zn = (e) => {
622
+ const {
623
+ borderRadiusSM: t,
624
+ skeletonButtonCls: o,
625
+ controlHeight: n,
626
+ controlHeightLG: a,
627
+ controlHeightSM: l,
628
+ gradientFromColor: s,
629
+ calc: d
630
+ } = e;
631
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
632
+ [o]: Object.assign({
633
+ display: "inline-block",
634
+ verticalAlign: "top",
635
+ background: s,
636
+ borderRadius: t,
637
+ width: d(n).mul(2).equal(),
638
+ minWidth: d(n).mul(2).equal()
639
+ }, Se(n, d))
640
+ }, xe(e, n, o)), {
641
+ [`${o}-lg`]: Object.assign({}, Se(a, d))
642
+ }), xe(e, a, `${o}-lg`)), {
643
+ [`${o}-sm`]: Object.assign({}, Se(l, d))
644
+ }), xe(e, l, `${o}-sm`));
645
+ }, Hn = (e) => {
646
+ const {
647
+ componentCls: t,
648
+ skeletonAvatarCls: o,
649
+ skeletonTitleCls: n,
650
+ skeletonParagraphCls: a,
651
+ skeletonButtonCls: l,
652
+ skeletonInputCls: s,
653
+ skeletonImageCls: d,
654
+ controlHeight: i,
655
+ controlHeightLG: f,
656
+ controlHeightSM: c,
657
+ gradientFromColor: u,
658
+ padding: m,
659
+ marginSM: p,
660
+ borderRadius: y,
661
+ titleHeight: g,
662
+ blockRadius: C,
663
+ paragraphLiHeight: b,
664
+ controlHeightXS: v,
665
+ paragraphMarginTop: x
666
+ } = e;
667
+ return {
668
+ [t]: {
669
+ display: "table",
670
+ width: "100%",
671
+ [`${t}-header`]: {
672
+ display: "table-cell",
673
+ paddingInlineEnd: m,
674
+ verticalAlign: "top",
675
+ // Avatar
676
+ [o]: Object.assign({
677
+ display: "inline-block",
678
+ verticalAlign: "top",
679
+ background: u
680
+ }, ne(i)),
681
+ [`${o}-circle`]: {
682
+ borderRadius: "50%"
683
+ },
684
+ [`${o}-lg`]: Object.assign({}, ne(f)),
685
+ [`${o}-sm`]: Object.assign({}, ne(c))
686
+ },
687
+ [`${t}-content`]: {
688
+ display: "table-cell",
689
+ width: "100%",
690
+ verticalAlign: "top",
691
+ // Title
692
+ [n]: {
693
+ width: "100%",
694
+ height: g,
695
+ background: u,
696
+ borderRadius: C,
697
+ [`+ ${a}`]: {
698
+ marginBlockStart: c
699
+ }
700
+ },
701
+ // paragraph
702
+ [a]: {
703
+ padding: 0,
704
+ "> li": {
705
+ width: "100%",
706
+ height: b,
707
+ listStyle: "none",
708
+ background: u,
709
+ borderRadius: C,
710
+ "+ li": {
711
+ marginBlockStart: v
712
+ }
713
+ }
714
+ },
715
+ [`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
716
+ width: "61%"
717
+ }
718
+ },
719
+ [`&-round ${t}-content`]: {
720
+ [`${n}, ${a} > li`]: {
721
+ borderRadius: y
722
+ }
723
+ }
724
+ },
725
+ [`${t}-with-avatar ${t}-content`]: {
726
+ // Title
727
+ [n]: {
728
+ marginBlockStart: p,
729
+ [`+ ${a}`]: {
730
+ marginBlockStart: x
731
+ }
732
+ }
733
+ },
734
+ // Skeleton element
735
+ [`${t}${t}-element`]: Object.assign(Object.assign(Object.assign(Object.assign({
736
+ display: "inline-block",
737
+ width: "auto"
738
+ }, zn(e)), Mn(e)), Rn(e)), Bn(e)),
739
+ // Skeleton Block Button, Input
740
+ [`${t}${t}-block`]: {
741
+ width: "100%",
742
+ [l]: {
743
+ width: "100%"
744
+ },
745
+ [s]: {
746
+ width: "100%"
747
+ }
748
+ },
749
+ // With active animation
750
+ [`${t}${t}-active`]: {
751
+ [`
752
+ ${n},
753
+ ${a} > li,
754
+ ${o},
755
+ ${l},
756
+ ${s},
757
+ ${d}
758
+ `]: Object.assign({}, Tn(e))
759
+ }
760
+ };
761
+ }, Ln = (e) => {
762
+ const {
763
+ colorFillContent: t,
764
+ colorFill: o
765
+ } = e, n = t, a = o;
766
+ return {
767
+ color: n,
768
+ colorGradientEnd: a,
769
+ gradientFromColor: n,
770
+ gradientToColor: a,
771
+ titleHeight: e.controlHeight / 2,
772
+ blockRadius: e.borderRadiusSM,
773
+ paragraphMarginTop: e.marginLG + e.marginXXS,
774
+ paragraphLiHeight: e.controlHeight / 2
775
+ };
776
+ }, oe = re("Skeleton", (e) => {
777
+ const {
778
+ componentCls: t,
779
+ calc: o
780
+ } = e, n = fe(e, {
781
+ skeletonAvatarCls: `${t}-avatar`,
782
+ skeletonTitleCls: `${t}-title`,
783
+ skeletonParagraphCls: `${t}-paragraph`,
784
+ skeletonButtonCls: `${t}-button`,
785
+ skeletonInputCls: `${t}-input`,
786
+ skeletonImageCls: `${t}-image`,
787
+ imageSizeBase: o(e.controlHeight).mul(1.5).equal(),
788
+ borderRadius: 100,
789
+ // Large number to make capsule shape
790
+ skeletonLoadingBackground: `linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,
791
+ skeletonLoadingMotionDuration: "1.4s"
792
+ });
793
+ return [Hn(n)];
794
+ }, Ln, {
795
+ deprecatedTokens: [["color", "gradientFromColor"], ["colorGradientEnd", "gradientToColor"]]
796
+ }), Fn = (e) => {
797
+ const {
798
+ prefixCls: t,
799
+ className: o,
800
+ rootClassName: n,
801
+ active: a,
802
+ shape: l = "circle",
803
+ size: s = "default"
804
+ } = e, {
805
+ getPrefixCls: d
806
+ } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = ge(e, ["prefixCls", "className"]), p = O(i, `${i}-element`, {
807
+ [`${i}-active`]: a
808
+ }, o, n, c, u);
809
+ return f(/* @__PURE__ */ r.createElement("div", {
810
+ className: p
811
+ }, /* @__PURE__ */ r.createElement(pe, Object.assign({
812
+ prefixCls: `${i}-avatar`,
813
+ shape: l,
814
+ size: s
815
+ }, m))));
816
+ }, Dn = (e) => {
817
+ const {
818
+ prefixCls: t,
819
+ className: o,
820
+ rootClassName: n,
821
+ active: a,
822
+ block: l = !1,
823
+ size: s = "default"
824
+ } = e, {
825
+ getPrefixCls: d
826
+ } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = ge(e, ["prefixCls"]), p = O(i, `${i}-element`, {
827
+ [`${i}-active`]: a,
828
+ [`${i}-block`]: l
829
+ }, o, n, c, u);
830
+ return f(/* @__PURE__ */ r.createElement("div", {
831
+ className: p
832
+ }, /* @__PURE__ */ r.createElement(pe, Object.assign({
833
+ prefixCls: `${i}-button`,
834
+ size: s
835
+ }, m))));
836
+ }, kn = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", An = (e) => {
837
+ const {
838
+ prefixCls: t,
839
+ className: o,
840
+ rootClassName: n,
841
+ style: a,
842
+ active: l
843
+ } = e, {
844
+ getPrefixCls: s
845
+ } = r.useContext(q), d = s("skeleton", t), [i, f, c] = oe(d), u = O(d, `${d}-element`, {
846
+ [`${d}-active`]: l
847
+ }, o, n, f, c);
848
+ return i(/* @__PURE__ */ r.createElement("div", {
849
+ className: u
850
+ }, /* @__PURE__ */ r.createElement("div", {
851
+ className: O(`${d}-image`, o),
852
+ style: a
853
+ }, /* @__PURE__ */ r.createElement("svg", {
854
+ viewBox: "0 0 1098 1024",
855
+ xmlns: "http://www.w3.org/2000/svg",
856
+ className: `${d}-image-svg`
857
+ }, /* @__PURE__ */ r.createElement("title", null, "Image placeholder"), /* @__PURE__ */ r.createElement("path", {
858
+ d: kn,
859
+ className: `${d}-image-path`
860
+ })))));
861
+ }, _n = (e) => {
862
+ const {
863
+ prefixCls: t,
864
+ className: o,
865
+ rootClassName: n,
866
+ active: a,
867
+ block: l,
868
+ size: s = "default"
869
+ } = e, {
870
+ getPrefixCls: d
871
+ } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = ge(e, ["prefixCls"]), p = O(i, `${i}-element`, {
872
+ [`${i}-active`]: a,
873
+ [`${i}-block`]: l
874
+ }, o, n, c, u);
875
+ return f(/* @__PURE__ */ r.createElement("div", {
876
+ className: p
877
+ }, /* @__PURE__ */ r.createElement(pe, Object.assign({
878
+ prefixCls: `${i}-input`,
879
+ size: s
880
+ }, m))));
881
+ }, Vn = (e) => {
882
+ const {
883
+ prefixCls: t,
884
+ className: o,
885
+ rootClassName: n,
886
+ style: a,
887
+ active: l,
888
+ children: s
889
+ } = e, {
890
+ getPrefixCls: d
891
+ } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = O(i, `${i}-element`, {
892
+ [`${i}-active`]: l
893
+ }, c, o, n, u);
894
+ return f(/* @__PURE__ */ r.createElement("div", {
895
+ className: m
896
+ }, /* @__PURE__ */ r.createElement("div", {
897
+ className: O(`${i}-image`, o),
898
+ style: a
899
+ }, s)));
900
+ }, Wn = (e, t) => {
901
+ const {
902
+ width: o,
903
+ rows: n = 2
904
+ } = t;
905
+ if (Array.isArray(o))
906
+ return o[e];
907
+ if (n - 1 === e)
908
+ return o;
909
+ }, qn = (e) => {
910
+ const {
911
+ prefixCls: t,
912
+ className: o,
913
+ style: n,
914
+ rows: a
915
+ } = e, l = K(new Array(a)).map((s, d) => (
916
+ // eslint-disable-next-line react/no-array-index-key
917
+ /* @__PURE__ */ r.createElement("li", {
918
+ key: d,
919
+ style: {
920
+ width: Wn(d, e)
921
+ }
922
+ })
923
+ ));
924
+ return /* @__PURE__ */ r.createElement("ul", {
925
+ className: O(t, o),
926
+ style: n
927
+ }, l);
928
+ }, Gn = (e) => {
929
+ let {
930
+ prefixCls: t,
931
+ className: o,
932
+ width: n,
933
+ style: a
934
+ } = e;
935
+ return (
936
+ // biome-ignore lint/a11y/useHeadingContent: HOC here
937
+ /* @__PURE__ */ r.createElement("h3", {
938
+ className: O(t, o),
939
+ style: Object.assign({
940
+ width: n
941
+ }, a)
942
+ })
943
+ );
944
+ };
945
+ function Oe(e) {
946
+ return e && typeof e == "object" ? e : {};
947
+ }
948
+ function Xn(e, t) {
949
+ return e && !t ? {
950
+ size: "large",
951
+ shape: "square"
952
+ } : {
953
+ size: "large",
954
+ shape: "circle"
955
+ };
956
+ }
957
+ function Un(e, t) {
958
+ return !e && t ? {
959
+ width: "38%"
960
+ } : e && t ? {
961
+ width: "50%"
962
+ } : {};
963
+ }
964
+ function Kn(e, t) {
965
+ const o = {};
966
+ return (!e || !t) && (o.width = "61%"), !e && t ? o.rows = 3 : o.rows = 2, o;
967
+ }
968
+ const te = (e) => {
969
+ const {
970
+ prefixCls: t,
971
+ loading: o,
972
+ className: n,
973
+ rootClassName: a,
974
+ style: l,
975
+ children: s,
976
+ avatar: d = !1,
977
+ title: i = !0,
978
+ paragraph: f = !0,
979
+ active: c,
980
+ round: u
981
+ } = e, {
982
+ getPrefixCls: m,
983
+ direction: p,
984
+ className: y,
985
+ style: g
986
+ } = Wt("skeleton"), C = m("skeleton", t), [b, v, x] = oe(C);
987
+ if (o || !("loading" in e)) {
988
+ const E = !!d, w = !!i, S = !!f;
989
+ let h;
990
+ if (E) {
991
+ const F = Object.assign(Object.assign({
992
+ prefixCls: `${C}-avatar`
993
+ }, Xn(w, S)), Oe(d));
994
+ h = /* @__PURE__ */ r.createElement("div", {
995
+ className: `${C}-header`
996
+ }, /* @__PURE__ */ r.createElement(pe, Object.assign({}, F)));
997
+ }
998
+ let I;
999
+ if (w || S) {
1000
+ let F;
1001
+ if (w) {
1002
+ const L = Object.assign(Object.assign({
1003
+ prefixCls: `${C}-title`
1004
+ }, Un(E, S)), Oe(i));
1005
+ F = /* @__PURE__ */ r.createElement(Gn, Object.assign({}, L));
1006
+ }
1007
+ let H;
1008
+ if (S) {
1009
+ const L = Object.assign(Object.assign({
1010
+ prefixCls: `${C}-paragraph`
1011
+ }, Kn(E, w)), Oe(f));
1012
+ H = /* @__PURE__ */ r.createElement(qn, Object.assign({}, L));
1013
+ }
1014
+ I = /* @__PURE__ */ r.createElement("div", {
1015
+ className: `${C}-content`
1016
+ }, F, H);
1017
+ }
1018
+ const j = O(C, {
1019
+ [`${C}-with-avatar`]: E,
1020
+ [`${C}-active`]: c,
1021
+ [`${C}-rtl`]: p === "rtl",
1022
+ [`${C}-round`]: u
1023
+ }, y, n, a, v, x);
1024
+ return b(/* @__PURE__ */ r.createElement("div", {
1025
+ className: j,
1026
+ style: Object.assign(Object.assign({}, g), l)
1027
+ }, h, I));
1028
+ }
1029
+ return s ?? null;
1030
+ };
1031
+ te.Button = Dn;
1032
+ te.Avatar = Fn;
1033
+ te.Input = _n;
1034
+ te.Image = An;
1035
+ te.Node = Vn;
1036
+ process.env.NODE_ENV !== "production" && (te.displayName = "Skeleton");
1037
+ function Ze() {
1038
+ }
1039
+ const Qn = /* @__PURE__ */ r.createContext({
1040
+ add: Ze,
1041
+ remove: Ze
1042
+ });
1043
+ function Zn(e) {
1044
+ const t = r.useContext(Qn), o = r.useRef(null);
1045
+ return qt((a) => {
1046
+ if (a) {
1047
+ const l = e ? a.querySelector(e) : a;
1048
+ t.add(l), o.current = l;
1049
+ } else
1050
+ t.remove(o.current);
1051
+ });
1052
+ }
1053
+ const Ye = () => {
1054
+ const {
1055
+ cancelButtonProps: e,
1056
+ cancelTextLocale: t,
1057
+ onCancel: o
1058
+ } = se(ie);
1059
+ return /* @__PURE__ */ $.createElement(Pe, Object.assign({
1060
+ onClick: o
1061
+ }, e), t);
1062
+ }, Je = () => {
1063
+ const {
1064
+ confirmLoading: e,
1065
+ okButtonProps: t,
1066
+ okType: o,
1067
+ okTextLocale: n,
1068
+ onOk: a
1069
+ } = se(ie);
1070
+ return /* @__PURE__ */ $.createElement(Pe, Object.assign({}, nt(o), {
1071
+ loading: e,
1072
+ onClick: a
1073
+ }, t), n);
1074
+ };
1075
+ function Ct(e, t) {
1076
+ return /* @__PURE__ */ $.createElement("span", {
1077
+ className: `${e}-close-x`
1078
+ }, t || /* @__PURE__ */ $.createElement(Te, {
1079
+ className: `${e}-close-icon`
1080
+ }));
1081
+ }
1082
+ const pt = (e) => {
1083
+ const {
1084
+ okText: t,
1085
+ okType: o = "primary",
1086
+ cancelText: n,
1087
+ confirmLoading: a,
1088
+ onOk: l,
1089
+ onCancel: s,
1090
+ okButtonProps: d,
1091
+ cancelButtonProps: i,
1092
+ footer: f
1093
+ } = e, [c] = Me("Modal", at()), u = t || (c == null ? void 0 : c.okText), m = n || (c == null ? void 0 : c.cancelText), p = {
1094
+ confirmLoading: a,
1095
+ okButtonProps: d,
1096
+ cancelButtonProps: i,
1097
+ okTextLocale: u,
1098
+ cancelTextLocale: m,
1099
+ okType: o,
1100
+ onOk: l,
1101
+ onCancel: s
1102
+ }, y = $.useMemo(() => p, K(Object.values(p)));
1103
+ let g;
1104
+ return typeof f == "function" || typeof f > "u" ? (g = /* @__PURE__ */ $.createElement($.Fragment, null, /* @__PURE__ */ $.createElement(Ye, null), /* @__PURE__ */ $.createElement(Je, null)), typeof f == "function" && (g = f(g, {
1105
+ OkBtn: Je,
1106
+ CancelBtn: Ye
1107
+ })), g = /* @__PURE__ */ $.createElement(dt, {
1108
+ value: y
1109
+ }, g)) : g = f, /* @__PURE__ */ $.createElement(Gt, {
1110
+ disabled: !1
1111
+ }, g);
1112
+ }, Yn = (e) => {
1113
+ const {
1114
+ componentCls: t
1115
+ } = e;
1116
+ return {
1117
+ // Grid system
1118
+ [t]: {
1119
+ display: "flex",
1120
+ flexFlow: "row wrap",
1121
+ minWidth: 0,
1122
+ "&::before, &::after": {
1123
+ display: "flex"
1124
+ },
1125
+ "&-no-wrap": {
1126
+ flexWrap: "nowrap"
1127
+ },
1128
+ // The origin of the X-axis
1129
+ "&-start": {
1130
+ justifyContent: "flex-start"
1131
+ },
1132
+ // The center of the X-axis
1133
+ "&-center": {
1134
+ justifyContent: "center"
1135
+ },
1136
+ // The opposite of the X-axis
1137
+ "&-end": {
1138
+ justifyContent: "flex-end"
1139
+ },
1140
+ "&-space-between": {
1141
+ justifyContent: "space-between"
1142
+ },
1143
+ "&-space-around": {
1144
+ justifyContent: "space-around"
1145
+ },
1146
+ "&-space-evenly": {
1147
+ justifyContent: "space-evenly"
1148
+ },
1149
+ // Align at the top
1150
+ "&-top": {
1151
+ alignItems: "flex-start"
1152
+ },
1153
+ // Align at the center
1154
+ "&-middle": {
1155
+ alignItems: "center"
1156
+ },
1157
+ "&-bottom": {
1158
+ alignItems: "flex-end"
1159
+ }
1160
+ }
1161
+ };
1162
+ }, Jn = (e) => {
1163
+ const {
1164
+ componentCls: t
1165
+ } = e;
1166
+ return {
1167
+ // Grid system
1168
+ [t]: {
1169
+ position: "relative",
1170
+ maxWidth: "100%",
1171
+ // Prevent columns from collapsing when empty
1172
+ minHeight: 1
1173
+ }
1174
+ };
1175
+ }, eo = (e, t) => {
1176
+ const {
1177
+ prefixCls: o,
1178
+ componentCls: n,
1179
+ gridColumns: a
1180
+ } = e, l = {};
1181
+ for (let s = a; s >= 0; s--)
1182
+ s === 0 ? (l[`${n}${t}-${s}`] = {
1183
+ display: "none"
1184
+ }, l[`${n}-push-${s}`] = {
1185
+ insetInlineStart: "auto"
1186
+ }, l[`${n}-pull-${s}`] = {
1187
+ insetInlineEnd: "auto"
1188
+ }, l[`${n}${t}-push-${s}`] = {
1189
+ insetInlineStart: "auto"
1190
+ }, l[`${n}${t}-pull-${s}`] = {
1191
+ insetInlineEnd: "auto"
1192
+ }, l[`${n}${t}-offset-${s}`] = {
1193
+ marginInlineStart: 0
1194
+ }, l[`${n}${t}-order-${s}`] = {
1195
+ order: 0
1196
+ }) : (l[`${n}${t}-${s}`] = [
1197
+ // https://github.com/ant-design/ant-design/issues/44456
1198
+ // Form set `display: flex` on Col which will override `display: block`.
1199
+ // Let's get it from css variable to support override.
1200
+ {
1201
+ "--ant-display": "block",
1202
+ // Fallback to display if variable not support
1203
+ display: "block"
1204
+ },
1205
+ {
1206
+ display: "var(--ant-display)",
1207
+ flex: `0 0 ${s / a * 100}%`,
1208
+ maxWidth: `${s / a * 100}%`
1209
+ }
1210
+ ], l[`${n}${t}-push-${s}`] = {
1211
+ insetInlineStart: `${s / a * 100}%`
1212
+ }, l[`${n}${t}-pull-${s}`] = {
1213
+ insetInlineEnd: `${s / a * 100}%`
1214
+ }, l[`${n}${t}-offset-${s}`] = {
1215
+ marginInlineStart: `${s / a * 100}%`
1216
+ }, l[`${n}${t}-order-${s}`] = {
1217
+ order: s
1218
+ });
1219
+ return l[`${n}${t}-flex`] = {
1220
+ flex: `var(--${o}${t}-flex)`
1221
+ }, l;
1222
+ }, Ee = (e, t) => eo(e, t), to = (e, t, o) => ({
1223
+ [`@media (min-width: ${N(t)})`]: Object.assign({}, Ee(e, o))
1224
+ }), no = () => ({}), oo = () => ({});
1225
+ re("Grid", Yn, no);
1226
+ const vt = (e) => ({
1227
+ xs: e.screenXSMin,
1228
+ sm: e.screenSMMin,
1229
+ md: e.screenMDMin,
1230
+ lg: e.screenLGMin,
1231
+ xl: e.screenXLMin,
1232
+ xxl: e.screenXXLMin
1233
+ });
1234
+ re("Grid", (e) => {
1235
+ const t = fe(e, {
1236
+ gridColumns: 24
1237
+ // Row is divided into 24 parts in Grid
1238
+ }), o = vt(t);
1239
+ return delete o.xs, [Jn(t), Ee(t, ""), Ee(t, "-xs"), Object.keys(o).map((n) => to(t, o[n], `-${n}`)).reduce((n, a) => Object.assign(Object.assign({}, n), a), {})];
1240
+ }, oo);
1241
+ function et(e) {
1242
+ return {
1243
+ position: e,
1244
+ inset: 0
1245
+ };
1246
+ }
1247
+ const ao = (e) => {
1248
+ const {
1249
+ componentCls: t,
1250
+ antCls: o
1251
+ } = e;
1252
+ return [{
1253
+ [`${t}-root`]: {
1254
+ [`${t}${o}-zoom-enter, ${t}${o}-zoom-appear`]: {
1255
+ // reset scale avoid mousePosition bug
1256
+ transform: "none",
1257
+ opacity: 0,
1258
+ animationDuration: e.motionDurationSlow,
1259
+ // https://github.com/ant-design/ant-design/issues/11777
1260
+ userSelect: "none"
1261
+ },
1262
+ // https://github.com/ant-design/ant-design/issues/37329
1263
+ // https://github.com/ant-design/ant-design/issues/40272
1264
+ [`${t}${o}-zoom-leave ${t}-content`]: {
1265
+ pointerEvents: "none"
1266
+ },
1267
+ [`${t}-mask`]: Object.assign(Object.assign({}, et("fixed")), {
1268
+ zIndex: e.zIndexPopupBase,
1269
+ height: "100%",
1270
+ backgroundColor: e.colorBgMask,
1271
+ pointerEvents: "none",
1272
+ [`${t}-hidden`]: {
1273
+ display: "none"
1274
+ }
1275
+ }),
1276
+ [`${t}-wrap`]: Object.assign(Object.assign({}, et("fixed")), {
1277
+ zIndex: e.zIndexPopupBase,
1278
+ overflow: "auto",
1279
+ outline: 0,
1280
+ WebkitOverflowScrolling: "touch"
1281
+ })
1282
+ }
1283
+ }, {
1284
+ [`${t}-root`]: $n(e)
1285
+ }];
1286
+ }, lo = (e) => {
1287
+ const {
1288
+ componentCls: t
1289
+ } = e;
1290
+ return [
1291
+ // ======================== Root =========================
1292
+ {
1293
+ [`${t}-root`]: {
1294
+ [`${t}-wrap-rtl`]: {
1295
+ direction: "rtl"
1296
+ },
1297
+ [`${t}-centered`]: {
1298
+ textAlign: "center",
1299
+ "&::before": {
1300
+ display: "inline-block",
1301
+ width: 0,
1302
+ height: "100%",
1303
+ verticalAlign: "middle",
1304
+ content: '""'
1305
+ },
1306
+ [t]: {
1307
+ top: 0,
1308
+ display: "inline-block",
1309
+ paddingBottom: 0,
1310
+ textAlign: "start",
1311
+ verticalAlign: "middle"
1312
+ }
1313
+ },
1314
+ [`@media (max-width: ${e.screenSMMax}px)`]: {
1315
+ [t]: {
1316
+ maxWidth: "calc(100vw - 16px)",
1317
+ margin: `${N(e.marginXS)} auto`
1318
+ },
1319
+ [`${t}-centered`]: {
1320
+ [t]: {
1321
+ flex: 1
1322
+ }
1323
+ }
1324
+ }
1325
+ }
1326
+ },
1327
+ // ======================== Modal ========================
1328
+ {
1329
+ [t]: Object.assign(Object.assign({}, lt(e)), {
1330
+ pointerEvents: "none",
1331
+ position: "relative",
1332
+ top: 100,
1333
+ width: "auto",
1334
+ maxWidth: `calc(100vw - ${N(e.calc(e.margin).mul(2).equal())})`,
1335
+ margin: "0 auto",
1336
+ paddingBottom: e.paddingLG,
1337
+ [`${t}-title`]: {
1338
+ margin: 0,
1339
+ color: e.titleColor,
1340
+ fontWeight: e.fontWeightStrong,
1341
+ fontSize: e.titleFontSize,
1342
+ lineHeight: e.titleLineHeight,
1343
+ wordWrap: "break-word"
1344
+ },
1345
+ [`${t}-content`]: {
1346
+ position: "relative",
1347
+ backgroundColor: e.contentBg,
1348
+ backgroundClip: "padding-box",
1349
+ border: 0,
1350
+ borderRadius: e.borderRadiusLG,
1351
+ boxShadow: e.boxShadow,
1352
+ pointerEvents: "auto",
1353
+ padding: e.contentPadding
1354
+ },
1355
+ [`${t}-close`]: Object.assign({
1356
+ position: "absolute",
1357
+ top: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
1358
+ insetInlineEnd: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
1359
+ zIndex: e.calc(e.zIndexPopupBase).add(10).equal(),
1360
+ padding: 0,
1361
+ color: e.modalCloseIconColor,
1362
+ fontWeight: e.fontWeightStrong,
1363
+ lineHeight: 1,
1364
+ textDecoration: "none",
1365
+ background: "transparent",
1366
+ borderRadius: e.borderRadiusSM,
1367
+ width: e.modalCloseBtnSize,
1368
+ height: e.modalCloseBtnSize,
1369
+ border: 0,
1370
+ outline: 0,
1371
+ cursor: "pointer",
1372
+ transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
1373
+ "&-x": {
1374
+ display: "flex",
1375
+ fontSize: e.fontSizeLG,
1376
+ fontStyle: "normal",
1377
+ lineHeight: N(e.modalCloseBtnSize),
1378
+ justifyContent: "center",
1379
+ textTransform: "none",
1380
+ textRendering: "auto"
1381
+ },
1382
+ "&:disabled": {
1383
+ pointerEvents: "none"
1384
+ },
1385
+ "&:hover": {
1386
+ color: e.modalCloseIconHoverColor,
1387
+ backgroundColor: e.colorBgTextHover,
1388
+ textDecoration: "none"
1389
+ },
1390
+ "&:active": {
1391
+ backgroundColor: e.colorBgTextActive
1392
+ }
1393
+ }, Ut(e)),
1394
+ [`${t}-header`]: {
1395
+ color: e.colorText,
1396
+ background: e.headerBg,
1397
+ borderRadius: `${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)} 0 0`,
1398
+ marginBottom: e.headerMarginBottom,
1399
+ padding: e.headerPadding,
1400
+ borderBottom: e.headerBorderBottom
1401
+ },
1402
+ [`${t}-body`]: {
1403
+ fontSize: e.fontSize,
1404
+ lineHeight: e.lineHeight,
1405
+ wordWrap: "break-word",
1406
+ padding: e.bodyPadding,
1407
+ [`${t}-body-skeleton`]: {
1408
+ width: "100%",
1409
+ height: "100%",
1410
+ display: "flex",
1411
+ justifyContent: "center",
1412
+ alignItems: "center",
1413
+ margin: `${N(e.margin)} auto`
1414
+ }
1415
+ },
1416
+ [`${t}-footer`]: {
1417
+ textAlign: "end",
1418
+ background: e.footerBg,
1419
+ marginTop: e.footerMarginTop,
1420
+ padding: e.footerPadding,
1421
+ borderTop: e.footerBorderTop,
1422
+ borderRadius: e.footerBorderRadius,
1423
+ [`> ${e.antCls}-btn + ${e.antCls}-btn`]: {
1424
+ marginInlineStart: e.marginXS
1425
+ }
1426
+ },
1427
+ [`${t}-open`]: {
1428
+ overflow: "hidden"
1429
+ }
1430
+ })
1431
+ },
1432
+ // ======================== Pure =========================
1433
+ {
1434
+ [`${t}-pure-panel`]: {
1435
+ top: "auto",
1436
+ padding: 0,
1437
+ display: "flex",
1438
+ flexDirection: "column",
1439
+ [`${t}-content,
1440
+ ${t}-body,
1441
+ ${t}-confirm-body-wrapper`]: {
1442
+ display: "flex",
1443
+ flexDirection: "column",
1444
+ flex: "auto"
1445
+ },
1446
+ [`${t}-confirm-body`]: {
1447
+ marginBottom: "auto"
1448
+ }
1449
+ }
1450
+ }
1451
+ ];
1452
+ }, ro = (e) => {
1453
+ const {
1454
+ componentCls: t
1455
+ } = e;
1456
+ return {
1457
+ [`${t}-root`]: {
1458
+ [`${t}-wrap-rtl`]: {
1459
+ direction: "rtl",
1460
+ [`${t}-confirm-body`]: {
1461
+ direction: "rtl"
1462
+ }
1463
+ }
1464
+ }
1465
+ };
1466
+ }, so = (e) => {
1467
+ const {
1468
+ componentCls: t
1469
+ } = e, o = vt(e);
1470
+ delete o.xs;
1471
+ const n = Object.keys(o).map((a) => ({
1472
+ [`@media (min-width: ${N(o[a])})`]: {
1473
+ width: `var(--${t.replace(".", "")}-${a}-width)`
1474
+ }
1475
+ }));
1476
+ return {
1477
+ [`${t}-root`]: {
1478
+ [t]: [{
1479
+ width: `var(--${t.replace(".", "")}-xs-width)`
1480
+ }].concat(K(n))
1481
+ }
1482
+ };
1483
+ }, bt = (e) => {
1484
+ const t = e.padding, o = e.fontSizeHeading5, n = e.lineHeightHeading5;
1485
+ return fe(e, {
1486
+ modalHeaderHeight: e.calc(e.calc(n).mul(o).equal()).add(e.calc(t).mul(2).equal()).equal(),
1487
+ modalFooterBorderColorSplit: e.colorSplit,
1488
+ modalFooterBorderStyle: e.lineType,
1489
+ modalFooterBorderWidth: e.lineWidth,
1490
+ modalCloseIconColor: e.colorIcon,
1491
+ modalCloseIconHoverColor: e.colorIconHover,
1492
+ modalCloseBtnSize: e.controlHeight,
1493
+ modalConfirmIconSize: e.fontHeight,
1494
+ modalTitleHeight: e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()
1495
+ });
1496
+ }, ht = (e) => ({
1497
+ footerBg: "transparent",
1498
+ headerBg: e.colorBgElevated,
1499
+ titleLineHeight: e.lineHeightHeading5,
1500
+ titleFontSize: e.fontSizeHeading5,
1501
+ contentBg: e.colorBgElevated,
1502
+ titleColor: e.colorTextHeading,
1503
+ // internal
1504
+ contentPadding: e.wireframe ? 0 : `${N(e.paddingMD)} ${N(e.paddingContentHorizontalLG)}`,
1505
+ headerPadding: e.wireframe ? `${N(e.padding)} ${N(e.paddingLG)}` : 0,
1506
+ headerBorderBottom: e.wireframe ? `${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
1507
+ headerMarginBottom: e.wireframe ? 0 : e.marginXS,
1508
+ bodyPadding: e.wireframe ? e.paddingLG : 0,
1509
+ footerPadding: e.wireframe ? `${N(e.paddingXS)} ${N(e.padding)}` : 0,
1510
+ footerBorderTop: e.wireframe ? `${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
1511
+ footerBorderRadius: e.wireframe ? `0 0 ${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)}` : 0,
1512
+ footerMarginTop: e.wireframe ? 0 : e.marginSM,
1513
+ confirmBodyPadding: e.wireframe ? `${N(e.padding * 2)} ${N(e.padding * 2)} ${N(e.paddingLG)}` : 0,
1514
+ confirmIconMarginInlineEnd: e.wireframe ? e.margin : e.marginSM,
1515
+ confirmBtnsMarginTop: e.wireframe ? e.marginLG : e.marginSM
1516
+ }), yt = re("Modal", (e) => {
1517
+ const t = bt(e);
1518
+ return [lo(t), ro(t), ao(t), Xt(t, "zoom"), so(t)];
1519
+ }, ht, {
1520
+ unitless: {
1521
+ titleLineHeight: !0
1522
+ }
1523
+ });
1524
+ var io = function(e, t) {
1525
+ var o = {};
1526
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1527
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
1528
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
1529
+ return o;
1530
+ };
1531
+ let we;
1532
+ const co = (e) => {
1533
+ we = {
1534
+ x: e.pageX,
1535
+ y: e.pageY
1536
+ }, setTimeout(() => {
1537
+ we = null;
1538
+ }, 100);
1539
+ };
1540
+ jn() && document.documentElement.addEventListener("click", co, !0);
1541
+ const $t = (e) => {
1542
+ var t;
1543
+ const {
1544
+ getPopupContainer: o,
1545
+ getPrefixCls: n,
1546
+ direction: a,
1547
+ modal: l
1548
+ } = r.useContext(q), s = (_) => {
1549
+ const {
1550
+ onCancel: M
1551
+ } = e;
1552
+ M == null || M(_);
1553
+ }, d = (_) => {
1554
+ const {
1555
+ onOk: M
1556
+ } = e;
1557
+ M == null || M(_);
1558
+ };
1559
+ if (process.env.NODE_ENV !== "production") {
1560
+ const _ = Ce("Modal");
1561
+ [["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((M) => {
1562
+ let [V, le] = M;
1563
+ _.deprecated(!(V in e), V, le);
1564
+ });
1565
+ }
1566
+ const {
1567
+ prefixCls: i,
1568
+ className: f,
1569
+ rootClassName: c,
1570
+ open: u,
1571
+ wrapClassName: m,
1572
+ centered: p,
1573
+ getContainer: y,
1574
+ focusTriggerAfterClose: g = !0,
1575
+ style: C,
1576
+ // Deprecated
1577
+ visible: b,
1578
+ width: v = 520,
1579
+ footer: x,
1580
+ classNames: E,
1581
+ styles: w,
1582
+ children: S,
1583
+ loading: h
1584
+ } = e, I = io(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading"]), j = n("modal", i), F = n(), H = rt(j), [L, X, k] = yt(j, H), D = O(m, {
1585
+ [`${j}-centered`]: p ?? (l == null ? void 0 : l.centered),
1586
+ [`${j}-wrap-rtl`]: a === "rtl"
1587
+ }), W = x !== null && !h ? /* @__PURE__ */ r.createElement(pt, Object.assign({}, e, {
1588
+ onOk: d,
1589
+ onCancel: s
1590
+ })) : null, [A, T, J] = gt(me(e), me(l), {
1591
+ closable: !0,
1592
+ closeIcon: /* @__PURE__ */ r.createElement(Te, {
1593
+ className: `${j}-close-icon`
1594
+ }),
1595
+ closeIconRender: (_) => Ct(j, _)
1596
+ }), B = Zn(`.${j}-content`), [U, z] = Kt("Modal", I.zIndex), [ae, Q] = r.useMemo(() => v && typeof v == "object" ? [void 0, v] : [v, void 0], [v]), be = r.useMemo(() => {
1597
+ const _ = {};
1598
+ return Q && Object.keys(Q).forEach((M) => {
1599
+ const V = Q[M];
1600
+ V !== void 0 && (_[`--${j}-${M}-width`] = typeof V == "number" ? `${V}px` : V);
1601
+ }), _;
1602
+ }, [Q]);
1603
+ return L(/* @__PURE__ */ r.createElement(Qt, {
1604
+ form: !0,
1605
+ space: !0
1606
+ }, /* @__PURE__ */ r.createElement(Zt.Provider, {
1607
+ value: z
1608
+ }, /* @__PURE__ */ r.createElement(ft, Object.assign({
1609
+ width: ae
1610
+ }, I, {
1611
+ zIndex: U,
1612
+ getContainer: y === void 0 ? o : y,
1613
+ prefixCls: j,
1614
+ rootClassName: O(X, c, k, H),
1615
+ footer: W,
1616
+ visible: u ?? b,
1617
+ mousePosition: (t = I.mousePosition) !== null && t !== void 0 ? t : we,
1618
+ onClose: s,
1619
+ closable: A && {
1620
+ disabled: J,
1621
+ closeIcon: T
1622
+ },
1623
+ closeIcon: T,
1624
+ focusTriggerAfterClose: g,
1625
+ transitionName: ue(F, "zoom", e.transitionName),
1626
+ maskTransitionName: ue(F, "fade", e.maskTransitionName),
1627
+ className: O(X, f, l == null ? void 0 : l.className),
1628
+ style: Object.assign(Object.assign(Object.assign({}, l == null ? void 0 : l.style), C), be),
1629
+ classNames: Object.assign(Object.assign(Object.assign({}, l == null ? void 0 : l.classNames), E), {
1630
+ wrapper: O(D, E == null ? void 0 : E.wrapper)
1631
+ }),
1632
+ styles: Object.assign(Object.assign({}, l == null ? void 0 : l.styles), w),
1633
+ panelRef: B
1634
+ }), h ? /* @__PURE__ */ r.createElement(te, {
1635
+ active: !0,
1636
+ title: !1,
1637
+ paragraph: {
1638
+ rows: 4
1639
+ },
1640
+ className: `${j}-body-skeleton`
1641
+ }) : S))));
1642
+ }, uo = (e) => {
1643
+ const {
1644
+ componentCls: t,
1645
+ titleFontSize: o,
1646
+ titleLineHeight: n,
1647
+ modalConfirmIconSize: a,
1648
+ fontSize: l,
1649
+ lineHeight: s,
1650
+ modalTitleHeight: d,
1651
+ fontHeight: i,
1652
+ confirmBodyPadding: f
1653
+ } = e, c = `${t}-confirm`;
1654
+ return {
1655
+ [c]: {
1656
+ "&-rtl": {
1657
+ direction: "rtl"
1658
+ },
1659
+ [`${e.antCls}-modal-header`]: {
1660
+ display: "none"
1661
+ },
1662
+ [`${c}-body-wrapper`]: Object.assign({}, Yt()),
1663
+ [`&${t} ${t}-body`]: {
1664
+ padding: f
1665
+ },
1666
+ // ====================== Body ======================
1667
+ [`${c}-body`]: {
1668
+ display: "flex",
1669
+ flexWrap: "nowrap",
1670
+ alignItems: "start",
1671
+ [`> ${e.iconCls}`]: {
1672
+ flex: "none",
1673
+ fontSize: a,
1674
+ marginInlineEnd: e.confirmIconMarginInlineEnd,
1675
+ marginTop: e.calc(e.calc(i).sub(a).equal()).div(2).equal()
1676
+ },
1677
+ [`&-has-title > ${e.iconCls}`]: {
1678
+ marginTop: e.calc(e.calc(d).sub(a).equal()).div(2).equal()
1679
+ }
1680
+ },
1681
+ [`${c}-paragraph`]: {
1682
+ display: "flex",
1683
+ flexDirection: "column",
1684
+ flex: "auto",
1685
+ rowGap: e.marginXS,
1686
+ // https://github.com/ant-design/ant-design/issues/51912
1687
+ maxWidth: `calc(100% - ${N(e.marginSM)})`
1688
+ },
1689
+ // https://github.com/ant-design/ant-design/issues/48159
1690
+ [`${e.iconCls} + ${c}-paragraph`]: {
1691
+ maxWidth: `calc(100% - ${N(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`
1692
+ },
1693
+ [`${c}-title`]: {
1694
+ color: e.colorTextHeading,
1695
+ fontWeight: e.fontWeightStrong,
1696
+ fontSize: o,
1697
+ lineHeight: n
1698
+ },
1699
+ [`${c}-content`]: {
1700
+ color: e.colorText,
1701
+ fontSize: l,
1702
+ lineHeight: s
1703
+ },
1704
+ // ===================== Footer =====================
1705
+ [`${c}-btns`]: {
1706
+ textAlign: "end",
1707
+ marginTop: e.confirmBtnsMarginTop,
1708
+ [`${e.antCls}-btn + ${e.antCls}-btn`]: {
1709
+ marginBottom: 0,
1710
+ marginInlineStart: e.marginXS
1711
+ }
1712
+ }
1713
+ },
1714
+ [`${c}-error ${c}-body > ${e.iconCls}`]: {
1715
+ color: e.colorError
1716
+ },
1717
+ [`${c}-warning ${c}-body > ${e.iconCls},
1718
+ ${c}-confirm ${c}-body > ${e.iconCls}`]: {
1719
+ color: e.colorWarning
1720
+ },
1721
+ [`${c}-info ${c}-body > ${e.iconCls}`]: {
1722
+ color: e.colorInfo
1723
+ },
1724
+ [`${c}-success ${c}-body > ${e.iconCls}`]: {
1725
+ color: e.colorSuccess
1726
+ }
1727
+ };
1728
+ }, mo = Re(["Modal", "confirm"], (e) => {
1729
+ const t = bt(e);
1730
+ return [uo(t)];
1731
+ }, ht, {
1732
+ // confirm is weak than modal since no conflict here
1733
+ order: -1e3
1734
+ });
1735
+ var fo = function(e, t) {
1736
+ var o = {};
1737
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1738
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
1739
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
1740
+ return o;
1741
+ };
1742
+ function xt(e) {
1743
+ const {
1744
+ prefixCls: t,
1745
+ icon: o,
1746
+ okText: n,
1747
+ cancelText: a,
1748
+ confirmPrefixCls: l,
1749
+ type: s,
1750
+ okCancel: d,
1751
+ footer: i,
1752
+ // Legacy for static function usage
1753
+ locale: f
1754
+ } = e, c = fo(e, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
1755
+ if (process.env.NODE_ENV !== "production") {
1756
+ const h = Ce("Modal");
1757
+ process.env.NODE_ENV !== "production" && h(!(typeof o == "string" && o.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${o}\` at https://ant.design/components/icon`);
1758
+ }
1759
+ let u = o;
1760
+ if (!o && o !== null)
1761
+ switch (s) {
1762
+ case "info":
1763
+ u = /* @__PURE__ */ r.createElement(an, null);
1764
+ break;
1765
+ case "success":
1766
+ u = /* @__PURE__ */ r.createElement(on, null);
1767
+ break;
1768
+ case "error":
1769
+ u = /* @__PURE__ */ r.createElement(nn, null);
1770
+ break;
1771
+ default:
1772
+ u = /* @__PURE__ */ r.createElement(tn, null);
1773
+ }
1774
+ const m = d ?? s === "confirm", p = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [y] = Me("Modal"), g = f || y, C = n || (m ? g == null ? void 0 : g.okText : g == null ? void 0 : g.justOkText), b = a || (g == null ? void 0 : g.cancelText), v = Object.assign({
1775
+ autoFocusButton: p,
1776
+ cancelTextLocale: b,
1777
+ okTextLocale: C,
1778
+ mergedOkCancel: m
1779
+ }, c), x = r.useMemo(() => v, K(Object.values(v))), E = /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(We, null), /* @__PURE__ */ r.createElement(qe, null)), w = e.title !== void 0 && e.title !== null, S = `${l}-body`;
1780
+ return /* @__PURE__ */ r.createElement("div", {
1781
+ className: `${l}-body-wrapper`
1782
+ }, /* @__PURE__ */ r.createElement("div", {
1783
+ className: O(S, {
1784
+ [`${S}-has-title`]: w
1785
+ })
1786
+ }, u, /* @__PURE__ */ r.createElement("div", {
1787
+ className: `${l}-paragraph`
1788
+ }, w && /* @__PURE__ */ r.createElement("span", {
1789
+ className: `${l}-title`
1790
+ }, e.title), /* @__PURE__ */ r.createElement("div", {
1791
+ className: `${l}-content`
1792
+ }, e.content))), i === void 0 || typeof i == "function" ? /* @__PURE__ */ r.createElement(dt, {
1793
+ value: x
1794
+ }, /* @__PURE__ */ r.createElement("div", {
1795
+ className: `${l}-btns`
1796
+ }, typeof i == "function" ? i(E, {
1797
+ OkBtn: qe,
1798
+ CancelBtn: We
1799
+ }) : E)) : i, /* @__PURE__ */ r.createElement(mo, {
1800
+ prefixCls: t
1801
+ }));
1802
+ }
1803
+ const St = (e) => {
1804
+ const {
1805
+ close: t,
1806
+ zIndex: o,
1807
+ maskStyle: n,
1808
+ direction: a,
1809
+ prefixCls: l,
1810
+ wrapClassName: s,
1811
+ rootPrefixCls: d,
1812
+ bodyStyle: i,
1813
+ closable: f = !1,
1814
+ onConfirm: c,
1815
+ styles: u
1816
+ } = e;
1817
+ if (process.env.NODE_ENV !== "production") {
1818
+ const E = Ce("Modal");
1819
+ [["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((w) => {
1820
+ let [S, h] = w;
1821
+ E.deprecated(!(S in e), S, h);
1822
+ });
1823
+ }
1824
+ const m = `${l}-confirm`, p = e.width || 416, y = e.style || {}, g = e.mask === void 0 ? !0 : e.mask, C = e.maskClosable === void 0 ? !1 : e.maskClosable, b = O(m, `${m}-${e.type}`, {
1825
+ [`${m}-rtl`]: a === "rtl"
1826
+ }, e.className), [, v] = Jt(), x = r.useMemo(() => o !== void 0 ? o : v.zIndexPopupBase + en, [o, v]);
1827
+ return /* @__PURE__ */ r.createElement($t, Object.assign({}, e, {
1828
+ className: b,
1829
+ wrapClassName: O({
1830
+ [`${m}-centered`]: !!e.centered
1831
+ }, s),
1832
+ onCancel: () => {
1833
+ t == null || t({
1834
+ triggerCancel: !0
1835
+ }), c == null || c(!1);
1836
+ },
1837
+ title: "",
1838
+ footer: null,
1839
+ transitionName: ue(d || "", "zoom", e.transitionName),
1840
+ maskTransitionName: ue(d || "", "fade", e.maskTransitionName),
1841
+ mask: g,
1842
+ maskClosable: C,
1843
+ style: y,
1844
+ styles: Object.assign({
1845
+ body: i,
1846
+ mask: n
1847
+ }, u),
1848
+ width: p,
1849
+ zIndex: x,
1850
+ closable: f
1851
+ }), /* @__PURE__ */ r.createElement(xt, Object.assign({}, e, {
1852
+ confirmPrefixCls: m
1853
+ })));
1854
+ }, ze = (e) => {
1855
+ const {
1856
+ rootPrefixCls: t,
1857
+ iconPrefixCls: o,
1858
+ direction: n,
1859
+ theme: a
1860
+ } = e;
1861
+ return /* @__PURE__ */ r.createElement(st, {
1862
+ prefixCls: t,
1863
+ iconPrefixCls: o,
1864
+ direction: n,
1865
+ theme: a
1866
+ }, /* @__PURE__ */ r.createElement(St, Object.assign({}, e)));
1867
+ };
1868
+ process.env.NODE_ENV !== "production" && (St.displayName = "ConfirmDialog", ze.displayName = "ConfirmDialogWrapper");
1869
+ const ee = [];
1870
+ let Ot = "";
1871
+ function Et() {
1872
+ return Ot;
1873
+ }
1874
+ const go = (e) => {
1875
+ var t, o;
1876
+ const {
1877
+ prefixCls: n,
1878
+ getContainer: a,
1879
+ direction: l
1880
+ } = e, s = at(), d = se(q), i = Et() || d.getPrefixCls(), f = n || `${i}-modal`;
1881
+ let c = a;
1882
+ return c === !1 && (c = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && it(!1, "Modal", "Static method not support `getContainer` to be `false` since it do not have context env.")), /* @__PURE__ */ $.createElement(ze, Object.assign({}, e, {
1883
+ rootPrefixCls: i,
1884
+ prefixCls: f,
1885
+ iconPrefixCls: d.iconPrefixCls,
1886
+ theme: d.theme,
1887
+ direction: l ?? d.direction,
1888
+ locale: (o = (t = d.locale) === null || t === void 0 ? void 0 : t.Modal) !== null && o !== void 0 ? o : s,
1889
+ getContainer: c
1890
+ }));
1891
+ };
1892
+ function ce(e) {
1893
+ const t = ln();
1894
+ process.env.NODE_ENV !== "production" && !t.holderRender && rn("Modal");
1895
+ const o = document.createDocumentFragment();
1896
+ let n = Object.assign(Object.assign({}, e), {
1897
+ close: i,
1898
+ open: !0
1899
+ }), a, l;
1900
+ function s() {
1901
+ for (var c, u = arguments.length, m = new Array(u), p = 0; p < u; p++)
1902
+ m[p] = arguments[p];
1903
+ if (m.some((C) => C == null ? void 0 : C.triggerCancel)) {
1904
+ var g;
1905
+ (c = e.onCancel) === null || c === void 0 || (g = c).call.apply(g, [e, () => {
1906
+ }].concat(K(m.slice(1))));
1907
+ }
1908
+ for (let C = 0; C < ee.length; C++)
1909
+ if (ee[C] === i) {
1910
+ ee.splice(C, 1);
1911
+ break;
1912
+ }
1913
+ l();
1914
+ }
1915
+ function d(c) {
1916
+ clearTimeout(a), a = setTimeout(() => {
1917
+ const u = t.getPrefixCls(void 0, Et()), m = t.getIconPrefixCls(), p = t.getTheme(), y = /* @__PURE__ */ $.createElement(go, Object.assign({}, c));
1918
+ l = sn()(/* @__PURE__ */ $.createElement(st, {
1919
+ prefixCls: u,
1920
+ iconPrefixCls: m,
1921
+ theme: p
1922
+ }, t.holderRender ? t.holderRender(y) : y), o);
1923
+ });
1924
+ }
1925
+ function i() {
1926
+ for (var c = arguments.length, u = new Array(c), m = 0; m < c; m++)
1927
+ u[m] = arguments[m];
1928
+ n = Object.assign(Object.assign({}, n), {
1929
+ open: !1,
1930
+ afterClose: () => {
1931
+ typeof e.afterClose == "function" && e.afterClose(), s.apply(this, u);
1932
+ }
1933
+ }), n.visible && delete n.visible, d(n);
1934
+ }
1935
+ function f(c) {
1936
+ typeof c == "function" ? n = c(n) : n = Object.assign(Object.assign({}, n), c), d(n);
1937
+ }
1938
+ return d(n), ee.push(i), {
1939
+ destroy: i,
1940
+ update: f
1941
+ };
1942
+ }
1943
+ function wt(e) {
1944
+ return Object.assign(Object.assign({}, e), {
1945
+ type: "warning"
1946
+ });
1947
+ }
1948
+ function Nt(e) {
1949
+ return Object.assign(Object.assign({}, e), {
1950
+ type: "info"
1951
+ });
1952
+ }
1953
+ function Pt(e) {
1954
+ return Object.assign(Object.assign({}, e), {
1955
+ type: "success"
1956
+ });
1957
+ }
1958
+ function jt(e) {
1959
+ return Object.assign(Object.assign({}, e), {
1960
+ type: "error"
1961
+ });
1962
+ }
1963
+ function It(e) {
1964
+ return Object.assign(Object.assign({}, e), {
1965
+ type: "confirm"
1966
+ });
1967
+ }
1968
+ function Co(e) {
1969
+ let {
1970
+ rootPrefixCls: t
1971
+ } = e;
1972
+ process.env.NODE_ENV !== "production" && it(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), Ot = t;
1973
+ }
1974
+ var po = function(e, t) {
1975
+ var o = {};
1976
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1977
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
1978
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
1979
+ return o;
1980
+ };
1981
+ const vo = (e, t) => {
1982
+ var o, {
1983
+ afterClose: n,
1984
+ config: a
1985
+ } = e, l = po(e, ["afterClose", "config"]);
1986
+ const [s, d] = r.useState(!0), [i, f] = r.useState(a), {
1987
+ direction: c,
1988
+ getPrefixCls: u
1989
+ } = r.useContext(q), m = u("modal"), p = u(), y = () => {
1990
+ var v;
1991
+ n(), (v = i.afterClose) === null || v === void 0 || v.call(i);
1992
+ }, g = function() {
1993
+ var v;
1994
+ d(!1);
1995
+ for (var x = arguments.length, E = new Array(x), w = 0; w < x; w++)
1996
+ E[w] = arguments[w];
1997
+ if (E.some((I) => I == null ? void 0 : I.triggerCancel)) {
1998
+ var h;
1999
+ (v = i.onCancel) === null || v === void 0 || (h = v).call.apply(h, [i, () => {
2000
+ }].concat(K(E.slice(1))));
2001
+ }
2002
+ };
2003
+ r.useImperativeHandle(t, () => ({
2004
+ destroy: g,
2005
+ update: (v) => {
2006
+ f((x) => Object.assign(Object.assign({}, x), v));
2007
+ }
2008
+ }));
2009
+ const C = (o = i.okCancel) !== null && o !== void 0 ? o : i.type === "confirm", [b] = Me("Modal", cn.Modal);
2010
+ return /* @__PURE__ */ r.createElement(ze, Object.assign({
2011
+ prefixCls: m,
2012
+ rootPrefixCls: p
2013
+ }, i, {
2014
+ close: g,
2015
+ open: s,
2016
+ afterClose: y,
2017
+ okText: i.okText || (C ? b == null ? void 0 : b.okText : b == null ? void 0 : b.justOkText),
2018
+ direction: i.direction || c,
2019
+ cancelText: i.cancelText || (b == null ? void 0 : b.cancelText)
2020
+ }, l));
2021
+ }, bo = /* @__PURE__ */ r.forwardRef(vo);
2022
+ let tt = 0;
2023
+ const ho = /* @__PURE__ */ r.memo(/* @__PURE__ */ r.forwardRef((e, t) => {
2024
+ const [o, n] = bn();
2025
+ return r.useImperativeHandle(t, () => ({
2026
+ patchElement: n
2027
+ }), []), /* @__PURE__ */ r.createElement(r.Fragment, null, o);
2028
+ }));
2029
+ function yo() {
2030
+ const e = r.useRef(null), [t, o] = r.useState([]);
2031
+ r.useEffect(() => {
2032
+ t.length && (K(t).forEach((s) => {
2033
+ s();
2034
+ }), o([]));
2035
+ }, [t]);
2036
+ const n = r.useCallback((l) => function(d) {
2037
+ var i;
2038
+ tt += 1;
2039
+ const f = /* @__PURE__ */ r.createRef();
2040
+ let c;
2041
+ const u = new Promise((C) => {
2042
+ c = C;
2043
+ });
2044
+ let m = !1, p;
2045
+ const y = /* @__PURE__ */ r.createElement(bo, {
2046
+ key: `modal-${tt}`,
2047
+ config: l(d),
2048
+ ref: f,
2049
+ afterClose: () => {
2050
+ p == null || p();
2051
+ },
2052
+ isSilent: () => m,
2053
+ onConfirm: (C) => {
2054
+ c(C);
2055
+ }
2056
+ });
2057
+ return p = (i = e.current) === null || i === void 0 ? void 0 : i.patchElement(y), p && ee.push(p), {
2058
+ destroy: () => {
2059
+ function C() {
2060
+ var b;
2061
+ (b = f.current) === null || b === void 0 || b.destroy();
2062
+ }
2063
+ f.current ? C() : o((b) => [].concat(K(b), [C]));
2064
+ },
2065
+ update: (C) => {
2066
+ function b() {
2067
+ var v;
2068
+ (v = f.current) === null || v === void 0 || v.update(C);
2069
+ }
2070
+ f.current ? b() : o((v) => [].concat(K(v), [b]));
2071
+ },
2072
+ then: (C) => (m = !0, u.then(C))
2073
+ };
2074
+ }, []);
2075
+ return [r.useMemo(() => ({
2076
+ info: n(Nt),
2077
+ success: n(Pt),
2078
+ error: n(jt),
2079
+ warning: n(wt),
2080
+ confirm: n(It)
2081
+ }), []), /* @__PURE__ */ r.createElement(ho, {
2082
+ key: "modal-holder",
2083
+ ref: e
2084
+ })];
2085
+ }
2086
+ var $o = function(e, t) {
2087
+ var o = {};
2088
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
2089
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
2090
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
2091
+ return o;
2092
+ };
2093
+ const xo = (e) => {
2094
+ const {
2095
+ prefixCls: t,
2096
+ className: o,
2097
+ closeIcon: n,
2098
+ closable: a,
2099
+ type: l,
2100
+ title: s,
2101
+ children: d,
2102
+ footer: i
2103
+ } = e, f = $o(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
2104
+ getPrefixCls: c
2105
+ } = r.useContext(q), u = c(), m = t || c("modal"), p = rt(u), [y, g, C] = yt(m, p), b = `${m}-confirm`;
2106
+ let v = {};
2107
+ return l ? v = {
2108
+ closable: a ?? !1,
2109
+ title: "",
2110
+ footer: "",
2111
+ children: /* @__PURE__ */ r.createElement(xt, Object.assign({}, e, {
2112
+ prefixCls: m,
2113
+ confirmPrefixCls: b,
2114
+ rootPrefixCls: u,
2115
+ content: d
2116
+ }))
2117
+ } : v = {
2118
+ closable: a ?? !0,
2119
+ title: s,
2120
+ footer: i !== null && /* @__PURE__ */ r.createElement(pt, Object.assign({}, e)),
2121
+ children: d
2122
+ }, y(/* @__PURE__ */ r.createElement(Be, Object.assign({
2123
+ prefixCls: m,
2124
+ className: O(g, `${m}-pure-panel`, l && b, l && `${b}-${l}`, o, C, p)
2125
+ }, f, {
2126
+ closeIcon: Ct(m, n),
2127
+ closable: a
2128
+ }, v)));
2129
+ }, So = dn(xo);
2130
+ function Tt(e) {
2131
+ return ce(wt(e));
2132
+ }
2133
+ const G = $t;
2134
+ G.useModal = yo;
2135
+ G.info = function(t) {
2136
+ return ce(Nt(t));
2137
+ };
2138
+ G.success = function(t) {
2139
+ return ce(Pt(t));
2140
+ };
2141
+ G.error = function(t) {
2142
+ return ce(jt(t));
2143
+ };
2144
+ G.warning = Tt;
2145
+ G.warn = Tt;
2146
+ G.confirm = function(t) {
2147
+ return ce(It(t));
2148
+ };
2149
+ G.destroyAll = function() {
2150
+ for (; ee.length; ) {
2151
+ const t = ee.pop();
2152
+ t && t();
2153
+ }
2154
+ };
2155
+ G.config = Co;
2156
+ G._InternalPanelDoNotUseOrYouWillBeFired = So;
2157
+ process.env.NODE_ENV !== "production" && (G.displayName = "Modal");
2158
+ const Oo = (e) => {
2159
+ const {
2160
+ paddingXXS: t,
2161
+ lineWidth: o,
2162
+ tagPaddingHorizontal: n,
2163
+ componentCls: a,
2164
+ calc: l
2165
+ } = e, s = l(n).sub(o).equal(), d = l(t).sub(o).equal();
2166
+ return {
2167
+ // Result
2168
+ [a]: Object.assign(Object.assign({}, lt(e)), {
2169
+ display: "inline-block",
2170
+ height: "auto",
2171
+ // https://github.com/ant-design/ant-design/pull/47504
2172
+ marginInlineEnd: e.marginXS,
2173
+ paddingInline: s,
2174
+ fontSize: e.tagFontSize,
2175
+ lineHeight: e.tagLineHeight,
2176
+ whiteSpace: "nowrap",
2177
+ background: e.defaultBg,
2178
+ border: `${N(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,
2179
+ borderRadius: e.borderRadiusSM,
2180
+ opacity: 1,
2181
+ transition: `all ${e.motionDurationMid}`,
2182
+ textAlign: "start",
2183
+ position: "relative",
2184
+ // RTL
2185
+ [`&${a}-rtl`]: {
2186
+ direction: "rtl"
2187
+ },
2188
+ "&, a, a:hover": {
2189
+ color: e.defaultColor
2190
+ },
2191
+ [`${a}-close-icon`]: {
2192
+ marginInlineStart: d,
2193
+ fontSize: e.tagIconSize,
2194
+ color: e.colorTextDescription,
2195
+ cursor: "pointer",
2196
+ transition: `all ${e.motionDurationMid}`,
2197
+ "&:hover": {
2198
+ color: e.colorTextHeading
2199
+ }
2200
+ },
2201
+ [`&${a}-has-color`]: {
2202
+ borderColor: "transparent",
2203
+ [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
2204
+ color: e.colorTextLightSolid
2205
+ }
2206
+ },
2207
+ "&-checkable": {
2208
+ backgroundColor: "transparent",
2209
+ borderColor: "transparent",
2210
+ cursor: "pointer",
2211
+ [`&:not(${a}-checkable-checked):hover`]: {
2212
+ color: e.colorPrimary,
2213
+ backgroundColor: e.colorFillSecondary
2214
+ },
2215
+ "&:active, &-checked": {
2216
+ color: e.colorTextLightSolid
2217
+ },
2218
+ "&-checked": {
2219
+ backgroundColor: e.colorPrimary,
2220
+ "&:hover": {
2221
+ backgroundColor: e.colorPrimaryHover
2222
+ }
2223
+ },
2224
+ "&:active": {
2225
+ backgroundColor: e.colorPrimaryActive
2226
+ }
2227
+ },
2228
+ "&-hidden": {
2229
+ display: "none"
2230
+ },
2231
+ // To ensure that a space will be placed between character and `Icon`.
2232
+ [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
2233
+ marginInlineStart: s
2234
+ }
2235
+ }),
2236
+ [`${a}-borderless`]: {
2237
+ borderColor: "transparent",
2238
+ background: e.tagBorderlessBg
2239
+ }
2240
+ };
2241
+ }, He = (e) => {
2242
+ const {
2243
+ lineWidth: t,
2244
+ fontSizeIcon: o,
2245
+ calc: n
2246
+ } = e, a = e.fontSizeSM;
2247
+ return fe(e, {
2248
+ tagFontSize: a,
2249
+ tagLineHeight: N(n(e.lineHeightSM).mul(a).equal()),
2250
+ tagIconSize: n(o).sub(n(t).mul(2)).equal(),
2251
+ // Tag icon is much smaller
2252
+ tagPaddingHorizontal: 8,
2253
+ // Fixed padding.
2254
+ tagBorderlessBg: e.defaultBg
2255
+ });
2256
+ }, Le = (e) => ({
2257
+ defaultBg: new un(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),
2258
+ defaultColor: e.colorText
2259
+ }), Mt = re("Tag", (e) => {
2260
+ const t = He(e);
2261
+ return Oo(t);
2262
+ }, Le);
2263
+ var Eo = function(e, t) {
2264
+ var o = {};
2265
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
2266
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
2267
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
2268
+ return o;
2269
+ };
2270
+ const wo = /* @__PURE__ */ r.forwardRef((e, t) => {
2271
+ const {
2272
+ prefixCls: o,
2273
+ style: n,
2274
+ className: a,
2275
+ checked: l,
2276
+ onChange: s,
2277
+ onClick: d
2278
+ } = e, i = Eo(e, ["prefixCls", "style", "className", "checked", "onChange", "onClick"]), {
2279
+ getPrefixCls: f,
2280
+ tag: c
2281
+ } = r.useContext(q), u = (b) => {
2282
+ s == null || s(!l), d == null || d(b);
2283
+ }, m = f("tag", o), [p, y, g] = Mt(m), C = O(m, `${m}-checkable`, {
2284
+ [`${m}-checkable-checked`]: l
2285
+ }, c == null ? void 0 : c.className, a, y, g);
2286
+ return p(/* @__PURE__ */ r.createElement("span", Object.assign({}, i, {
2287
+ ref: t,
2288
+ style: Object.assign(Object.assign({}, n), c == null ? void 0 : c.style),
2289
+ className: C,
2290
+ onClick: u
2291
+ })));
2292
+ }), No = (e) => mn(e, (t, o) => {
2293
+ let {
2294
+ textColor: n,
2295
+ lightBorderColor: a,
2296
+ lightColor: l,
2297
+ darkColor: s
2298
+ } = o;
2299
+ return {
2300
+ [`${e.componentCls}${e.componentCls}-${t}`]: {
2301
+ color: n,
2302
+ background: l,
2303
+ borderColor: a,
2304
+ // Inverse color
2305
+ "&-inverse": {
2306
+ color: e.colorTextLightSolid,
2307
+ background: s,
2308
+ borderColor: s
2309
+ },
2310
+ [`&${e.componentCls}-borderless`]: {
2311
+ borderColor: "transparent"
2312
+ }
2313
+ }
2314
+ };
2315
+ }), Po = Re(["Tag", "preset"], (e) => {
2316
+ const t = He(e);
2317
+ return No(t);
2318
+ }, Le);
2319
+ function jo(e) {
2320
+ return typeof e != "string" ? e : e.charAt(0).toUpperCase() + e.slice(1);
2321
+ }
2322
+ const de = (e, t, o) => {
2323
+ const n = jo(o);
2324
+ return {
2325
+ [`${e.componentCls}${e.componentCls}-${t}`]: {
2326
+ color: e[`color${o}`],
2327
+ background: e[`color${n}Bg`],
2328
+ borderColor: e[`color${n}Border`],
2329
+ [`&${e.componentCls}-borderless`]: {
2330
+ borderColor: "transparent"
2331
+ }
2332
+ }
2333
+ };
2334
+ }, Io = Re(["Tag", "status"], (e) => {
2335
+ const t = He(e);
2336
+ return [de(t, "success", "Success"), de(t, "processing", "Info"), de(t, "error", "Error"), de(t, "warning", "Warning")];
2337
+ }, Le);
2338
+ var To = function(e, t) {
2339
+ var o = {};
2340
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
2341
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
2342
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
2343
+ return o;
2344
+ };
2345
+ const Mo = /* @__PURE__ */ r.forwardRef((e, t) => {
2346
+ const {
2347
+ prefixCls: o,
2348
+ className: n,
2349
+ rootClassName: a,
2350
+ style: l,
2351
+ children: s,
2352
+ icon: d,
2353
+ color: i,
2354
+ onClose: f,
2355
+ bordered: c = !0,
2356
+ visible: u
2357
+ } = e, m = To(e, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "bordered", "visible"]), {
2358
+ getPrefixCls: p,
2359
+ direction: y,
2360
+ tag: g
2361
+ } = r.useContext(q), [C, b] = r.useState(!0), v = ge(m, ["closeIcon", "closable"]);
2362
+ process.env.NODE_ENV !== "production" && Ce("Tag").deprecated(!("visible" in e), "visible", "visible && <Tag />"), r.useEffect(() => {
2363
+ u !== void 0 && b(u);
2364
+ }, [u]);
2365
+ const x = fn(i), E = gn(i), w = x || E, S = Object.assign(Object.assign({
2366
+ backgroundColor: i && !w ? i : void 0
2367
+ }, g == null ? void 0 : g.style), l), h = p("tag", o), [I, j, F] = Mt(h), H = O(h, g == null ? void 0 : g.className, {
2368
+ [`${h}-${i}`]: w,
2369
+ [`${h}-has-color`]: i && !w,
2370
+ [`${h}-hidden`]: !C,
2371
+ [`${h}-rtl`]: y === "rtl",
2372
+ [`${h}-borderless`]: !c
2373
+ }, n, a, j, F), L = (T) => {
2374
+ T.stopPropagation(), f == null || f(T), !T.defaultPrevented && b(!1);
2375
+ }, [, X] = gt(me(e), me(g), {
2376
+ closable: !1,
2377
+ closeIconRender: (T) => {
2378
+ const J = /* @__PURE__ */ r.createElement("span", {
2379
+ className: `${h}-close-icon`,
2380
+ onClick: L
2381
+ }, T);
2382
+ return Cn(T, J, (B) => ({
2383
+ onClick: (U) => {
2384
+ var z;
2385
+ (z = B == null ? void 0 : B.onClick) === null || z === void 0 || z.call(B, U), L(U);
2386
+ },
2387
+ className: O(B == null ? void 0 : B.className, `${h}-close-icon`)
2388
+ }));
2389
+ }
2390
+ }), k = typeof m.onClick == "function" || s && s.type === "a", D = d || null, W = D ? /* @__PURE__ */ r.createElement(r.Fragment, null, D, s && /* @__PURE__ */ r.createElement("span", null, s)) : s, A = /* @__PURE__ */ r.createElement("span", Object.assign({}, v, {
2391
+ ref: t,
2392
+ className: H,
2393
+ style: S
2394
+ }), W, X, x && /* @__PURE__ */ r.createElement(Po, {
2395
+ key: "preset",
2396
+ prefixCls: h
2397
+ }), E && /* @__PURE__ */ r.createElement(Io, {
2398
+ key: "status",
2399
+ prefixCls: h
2400
+ }));
2401
+ return I(k ? /* @__PURE__ */ r.createElement(pn, {
2402
+ component: "Tag"
2403
+ }, A) : A);
2404
+ }), Rt = Mo;
2405
+ process.env.NODE_ENV !== "production" && (Rt.displayName = "Tag");
2406
+ Rt.CheckableTag = wo;
2407
+ export {
2408
+ G as M,
2409
+ Rt as T
2410
+ };