@notificationapi/react 0.0.31 → 0.0.32

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