ysyt-react-agent-lib 1.0.1 → 1.0.2

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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DZfpPJgy.js"),s=require("react"),o=require("./index-BMQnWcgt.js"),x=s.memo(({open:n,onCallBack:r,queryFetch:a})=>{const[i,c]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await a({success:t=>{c(t.data||[])}})}catch(t){console.log(t)}})()},[n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(o.Modal,{open:n,title:"咨询",footer:!1,onCancel:()=>r(),children:e.jsxRuntimeExports.jsx(e.ModelBody,{children:e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:i.map(t=>e.jsxRuntimeExports.jsxs(o.Tag,{color:"processing",onClick:()=>r(t.agent_no),children:[e.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["咨询坐席: ",t.agent_name]}),e.jsxRuntimeExports.jsx(e.IconSvg,{name:"zixun"})]},t.agent_no))})})})})});exports.default=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-3VyZM5Bc.js"),e=require("./index-DoHK6Q-H.js"),s=require("react"),x=s.memo(({open:n,onCallBack:r,queryFetch:a})=>{const[i,c]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await a({success:t=>{c(t.data||[])}})}catch(t){console.log(t)}})()},[n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(o.Modal,{open:n,title:"咨询",footer:!1,onCancel:()=>r(),children:e.jsxRuntimeExports.jsx(e.ModelBody,{children:e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:i.map(t=>e.jsxRuntimeExports.jsxs(o.Tag,{color:"processing",onClick:()=>r(t.agent_no),children:[e.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["咨询坐席: ",t.agent_name]}),e.jsxRuntimeExports.jsx(e.IconSvg,{name:"zixun"})]},t.agent_no))})})})})});exports.default=x;
@@ -0,0 +1,50 @@
1
+ import { M as c, T as l } from "./index-Ds8Wgx5F.mjs";
2
+ import { j as e, M as i, S as d, I as g } from "./index-qKFcDUB0.mjs";
3
+ import { memo as m, useState as x, useEffect as j } from "react";
4
+ const h = m(({
5
+ open: a,
6
+ onCallBack: t,
7
+ queryFetch: n
8
+ }) => {
9
+ const [o, r] = x([]);
10
+ return j(() => {
11
+ (async () => {
12
+ try {
13
+ await n({
14
+ success: (s) => {
15
+ r(s.data || []);
16
+ }
17
+ });
18
+ } catch (s) {
19
+ console.log(s);
20
+ }
21
+ })();
22
+ }, [a]), /* @__PURE__ */ e.jsx(e.Fragment, {
23
+ children: /* @__PURE__ */ e.jsx(c, {
24
+ open: a,
25
+ title: "咨询",
26
+ footer: !1,
27
+ onCancel: () => t(),
28
+ children: /* @__PURE__ */ e.jsx(i, {
29
+ children: /* @__PURE__ */ e.jsx(d, {
30
+ wrap: !0,
31
+ children: o.map((s) => /* @__PURE__ */ e.jsxs(l, {
32
+ color: "processing",
33
+ onClick: () => t(s.agent_no),
34
+ children: [/* @__PURE__ */ e.jsxs("span", {
35
+ style: {
36
+ marginRight: 10
37
+ },
38
+ children: ["咨询坐席: ", s.agent_name]
39
+ }), /* @__PURE__ */ e.jsx(g, {
40
+ name: "zixun"
41
+ })]
42
+ }, s.agent_no))
43
+ })
44
+ })
45
+ })
46
+ });
47
+ });
48
+ export {
49
+ h as default
50
+ };
@@ -1,70 +1,8 @@
1
- import { _ as ie, u as Q, a as le, c as q, b as X, d as se, e as U, w as J, g as de, m as ce, f as D, r as W, h as Y, C as A, i as ue, F as be, k as pe, l as Z, D as ge, W as fe, T as he, n as Ce, o as ve, p as me, j as w, M as Se, q as ye, S as ke, I as xe, s as $e } from "./index-DTX4tP2H.mjs";
1
+ import { g as ie, m as le, u as D, r as W, a as Q, _ as se, b as Y, c as de, d as q, e as X, f as ce, h as U, w as J, C as A, i as ue, F as be, k as pe, l as Z, D as ge, W as fe, T as he, n as Ce, o as ve, p as me, j as w, M as Se, q as ye, S as ke, I as xe, s as $e } from "./index-qKFcDUB0.mjs";
2
+ import { M as Re, T as we } from "./index-Ds8Wgx5F.mjs";
2
3
  import * as a from "react";
3
- import Re, { forwardRef as we, useRef as K, useImperativeHandle as Ee, memo as Ie, useState as V, useEffect as Pe } from "react";
4
- import { M as Be, T as Oe } from "./index-NUSGrx9W.mjs";
5
- const ee = /* @__PURE__ */ a.createContext(null), je = ee.Provider, oe = /* @__PURE__ */ a.createContext(null), _e = oe.Provider;
6
- var ze = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"], De = /* @__PURE__ */ we(function(e, r) {
7
- var n = e.prefixCls, o = n === void 0 ? "rc-checkbox" : n, t = e.className, i = e.style, f = e.checked, p = e.disabled, s = e.defaultChecked, x = s === void 0 ? !1 : s, g = e.type, l = g === void 0 ? "checkbox" : g, I = e.title, k = e.onChange, E = ie(e, ze), m = K(null), c = K(null), $ = Q(x, {
8
- value: f
9
- }), h = le($, 2), S = h[0], y = h[1];
10
- Ee(r, function() {
11
- return {
12
- focus: function(v) {
13
- var u;
14
- (u = m.current) === null || u === void 0 || u.focus(v);
15
- },
16
- blur: function() {
17
- var v;
18
- (v = m.current) === null || v === void 0 || v.blur();
19
- },
20
- input: m.current,
21
- nativeElement: c.current
22
- };
23
- });
24
- var P = q(o, t, X(X({}, "".concat(o, "-checked"), S), "".concat(o, "-disabled"), p)), d = function(v) {
25
- p || ("checked" in e || y(v.target.checked), k == null || k({
26
- target: U(U({}, e), {}, {
27
- type: l,
28
- checked: v.target.checked
29
- }),
30
- stopPropagation: function() {
31
- v.stopPropagation();
32
- },
33
- preventDefault: function() {
34
- v.preventDefault();
35
- },
36
- nativeEvent: v.nativeEvent
37
- }));
38
- };
39
- return /* @__PURE__ */ a.createElement("span", {
40
- className: P,
41
- title: I,
42
- style: i,
43
- ref: c
44
- }, /* @__PURE__ */ a.createElement("input", se({}, E, {
45
- className: "".concat(o, "-input"),
46
- ref: m,
47
- onChange: d,
48
- disabled: p,
49
- checked: !!S,
50
- type: l
51
- })), /* @__PURE__ */ a.createElement("span", {
52
- className: "".concat(o, "-inner")
53
- }));
54
- });
55
- function Te(e) {
56
- const r = Re.useRef(null), n = () => {
57
- J.cancel(r.current), r.current = null;
58
- };
59
- return [() => {
60
- n(), r.current = J(() => {
61
- r.current = null;
62
- });
63
- }, (i) => {
64
- r.current && (i.stopPropagation(), n()), e == null || e(i);
65
- }];
66
- }
67
- const Ne = (e) => {
4
+ import Ee, { forwardRef as Ie, useRef as K, useImperativeHandle as Pe, memo as Be, useState as V, useEffect as Oe } from "react";
5
+ const je = (e) => {
68
6
  const {
69
7
  componentCls: r,
70
8
  antCls: n
@@ -88,7 +26,7 @@ const Ne = (e) => {
88
26
  }
89
27
  })
90
28
  };
91
- }, Me = (e) => {
29
+ }, _e = (e) => {
92
30
  const {
93
31
  componentCls: r,
94
32
  wrapperMarginInlineEnd: n,
@@ -164,7 +102,7 @@ const Ne = (e) => {
164
102
  &:hover ${S}`]: {
165
103
  borderColor: o
166
104
  },
167
- [`${r}-input:focus-visible + ${S}`]: Object.assign({}, Y(e)),
105
+ [`${r}-input:focus-visible + ${S}`]: Object.assign({}, Q(e)),
168
106
  [`${r}:hover::after, ${r}-wrapper:hover &::after`]: {
169
107
  visibility: "visible"
170
108
  },
@@ -256,7 +194,7 @@ const Ne = (e) => {
256
194
  }
257
195
  })
258
196
  };
259
- }, Le = (e) => {
197
+ }, ze = (e) => {
260
198
  const {
261
199
  buttonColor: r,
262
200
  controlHeight: n,
@@ -380,7 +318,7 @@ const Ne = (e) => {
380
318
  position: "relative",
381
319
  color: u
382
320
  },
383
- "&:has(:focus-visible)": Object.assign({}, Y(e)),
321
+ "&:has(:focus-visible)": Object.assign({}, Q(e)),
384
322
  [`${o}-inner, input[type='checkbox'], input[type='radio']`]: {
385
323
  width: 0,
386
324
  height: 0,
@@ -451,7 +389,7 @@ const Ne = (e) => {
451
389
  }
452
390
  }
453
391
  };
454
- }, Ve = (e) => {
392
+ }, De = (e) => {
455
393
  const {
456
394
  wireframe: r,
457
395
  padding: n,
@@ -489,21 +427,82 @@ const Ne = (e) => {
489
427
  radioColor: r ? l : E,
490
428
  radioBgColor: r ? p : l
491
429
  };
492
- }, te = de("Radio", (e) => {
430
+ }, ee = ie("Radio", (e) => {
493
431
  const {
494
432
  controlOutline: r,
495
433
  controlOutlineWidth: n
496
- } = e, o = `0 0 0 ${D(n)} ${r}`, i = ce(e, {
434
+ } = e, o = `0 0 0 ${D(n)} ${r}`, i = le(e, {
497
435
  radioFocusShadow: o,
498
436
  radioButtonFocusShadow: o
499
437
  });
500
- return [Ne(i), Me(i), Le(i)];
501
- }, Ve, {
438
+ return [je(i), _e(i), ze(i)];
439
+ }, De, {
502
440
  unitless: {
503
441
  radioSize: !0,
504
442
  dotSize: !0
505
443
  }
444
+ }), oe = /* @__PURE__ */ a.createContext(null), Te = oe.Provider, te = /* @__PURE__ */ a.createContext(null), Ne = te.Provider;
445
+ var Me = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"], Le = /* @__PURE__ */ Ie(function(e, r) {
446
+ var n = e.prefixCls, o = n === void 0 ? "rc-checkbox" : n, t = e.className, i = e.style, f = e.checked, p = e.disabled, s = e.defaultChecked, x = s === void 0 ? !1 : s, g = e.type, l = g === void 0 ? "checkbox" : g, I = e.title, k = e.onChange, E = se(e, Me), m = K(null), c = K(null), $ = Y(x, {
447
+ value: f
448
+ }), h = de($, 2), S = h[0], y = h[1];
449
+ Pe(r, function() {
450
+ return {
451
+ focus: function(v) {
452
+ var u;
453
+ (u = m.current) === null || u === void 0 || u.focus(v);
454
+ },
455
+ blur: function() {
456
+ var v;
457
+ (v = m.current) === null || v === void 0 || v.blur();
458
+ },
459
+ input: m.current,
460
+ nativeElement: c.current
461
+ };
462
+ });
463
+ var P = q(o, t, X(X({}, "".concat(o, "-checked"), S), "".concat(o, "-disabled"), p)), d = function(v) {
464
+ p || ("checked" in e || y(v.target.checked), k == null || k({
465
+ target: U(U({}, e), {}, {
466
+ type: l,
467
+ checked: v.target.checked
468
+ }),
469
+ stopPropagation: function() {
470
+ v.stopPropagation();
471
+ },
472
+ preventDefault: function() {
473
+ v.preventDefault();
474
+ },
475
+ nativeEvent: v.nativeEvent
476
+ }));
477
+ };
478
+ return /* @__PURE__ */ a.createElement("span", {
479
+ className: P,
480
+ title: I,
481
+ style: i,
482
+ ref: c
483
+ }, /* @__PURE__ */ a.createElement("input", ce({}, E, {
484
+ className: "".concat(o, "-input"),
485
+ ref: m,
486
+ onChange: d,
487
+ disabled: p,
488
+ checked: !!S,
489
+ type: l
490
+ })), /* @__PURE__ */ a.createElement("span", {
491
+ className: "".concat(o, "-inner")
492
+ }));
506
493
  });
494
+ function Ve(e) {
495
+ const r = Ee.useRef(null), n = () => {
496
+ J.cancel(r.current), r.current = null;
497
+ };
498
+ return [() => {
499
+ n(), r.current = J(() => {
500
+ r.current = null;
501
+ });
502
+ }, (i) => {
503
+ r.current && (i.stopPropagation(), n()), e == null || e(i);
504
+ }];
505
+ }
507
506
  var qe = function(e, r) {
508
507
  var n = {};
509
508
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
@@ -513,7 +512,7 @@ var qe = function(e, r) {
513
512
  };
514
513
  const Ge = (e, r) => {
515
514
  var n, o;
516
- const t = a.useContext(ee), i = a.useContext(oe), {
515
+ const t = a.useContext(oe), i = a.useContext(te), {
517
516
  getPrefixCls: f,
518
517
  direction: p,
519
518
  radio: s
@@ -534,7 +533,7 @@ const Ge = (e, r) => {
534
533
  children: c,
535
534
  style: $,
536
535
  title: h
537
- } = e, S = qe(e, ["prefixCls", "className", "rootClassName", "children", "style", "title"]), y = f("radio", k), P = ((t == null ? void 0 : t.optionType) || i) === "button", d = P ? `${y}-button` : y, j = Z(y), [v, u, _] = te(y, j), b = Object.assign({}, S), B = a.useContext(ge);
536
+ } = e, S = qe(e, ["prefixCls", "className", "rootClassName", "children", "style", "title"]), y = f("radio", k), P = ((t == null ? void 0 : t.optionType) || i) === "button", d = P ? `${y}-button` : y, j = Z(y), [v, u, _] = ee(y, j), b = Object.assign({}, S), B = a.useContext(ge);
538
537
  t && (b.name = t.name, b.onChange = I, b.checked = e.value === t.value, b.disabled = (n = b.disabled) !== null && n !== void 0 ? n : t.disabled), b.disabled = (o = b.disabled) !== null && o !== void 0 ? o : B;
539
538
  const O = q(`${d}-wrapper`, {
540
539
  [`${d}-wrapper-checked`]: b.checked,
@@ -542,7 +541,7 @@ const Ge = (e, r) => {
542
541
  [`${d}-wrapper-rtl`]: p === "rtl",
543
542
  [`${d}-wrapper-in-form-item`]: l,
544
543
  [`${d}-wrapper-block`]: !!(t != null && t.block)
545
- }, s == null ? void 0 : s.className, E, m, u, _, j), [z, R] = Te(b.onClick);
544
+ }, s == null ? void 0 : s.className, E, m, u, _, j), [z, R] = Ve(b.onClick);
546
545
  return v(/* @__PURE__ */ a.createElement(fe, {
547
546
  component: "Radio",
548
547
  disabled: b.disabled
@@ -553,7 +552,7 @@ const Ge = (e, r) => {
553
552
  onMouseLeave: e.onMouseLeave,
554
553
  title: h,
555
554
  onClick: z
556
- }, /* @__PURE__ */ a.createElement(De, Object.assign({}, b, {
555
+ }, /* @__PURE__ */ a.createElement(Le, Object.assign({}, b, {
557
556
  className: q(b.className, {
558
557
  [he]: !P
559
558
  }),
@@ -591,12 +590,12 @@ const We = /* @__PURE__ */ a.forwardRef((e, r) => {
591
590
  onMouseLeave: d,
592
591
  onFocus: j,
593
592
  onBlur: v
594
- } = e, [u, _] = Q($, {
593
+ } = e, [u, _] = Y($, {
595
594
  value: h
596
595
  }), b = a.useCallback((C) => {
597
596
  const ae = u, F = C.target.value;
598
597
  "value" in e || _(F), F !== ae && (y == null || y(C));
599
- }, [u, _, y]), B = n("radio", i), O = `${B}-group`, z = Z(B), [R, T, M] = te(B, z);
598
+ }, [u, _, y]), B = n("radio", i), O = `${B}-group`, z = Z(B), [R, T, M] = ee(B, z);
600
599
  let N = l;
601
600
  s && s.length > 0 && (N = s.map((C) => typeof C == "string" || typeof C == "number" ? /* @__PURE__ */ a.createElement(L, {
602
601
  key: C.toString(),
@@ -639,7 +638,7 @@ const We = /* @__PURE__ */ a.forwardRef((e, r) => {
639
638
  onBlur: v,
640
639
  id: E,
641
640
  ref: r
642
- }), /* @__PURE__ */ a.createElement(je, {
641
+ }), /* @__PURE__ */ a.createElement(Te, {
643
642
  value: ne
644
643
  }, N)));
645
644
  }), Ae = /* @__PURE__ */ a.memo(We);
@@ -656,7 +655,7 @@ const Fe = (e, r) => {
656
655
  } = a.useContext(A), {
657
656
  prefixCls: o
658
657
  } = e, t = He(e, ["prefixCls"]), i = n("radio", o);
659
- return /* @__PURE__ */ a.createElement(_e, {
658
+ return /* @__PURE__ */ a.createElement(Ne, {
660
659
  value: "button"
661
660
  }, /* @__PURE__ */ a.createElement(L, Object.assign({
662
661
  prefixCls: i
@@ -668,9 +667,13 @@ const Fe = (e, r) => {
668
667
  G.Button = Xe;
669
668
  G.Group = Ae;
670
669
  G.__ANT_RADIO = !0;
671
- const Qe = Ie(({ open: e, onCallBack: r, queryFetch: n }) => {
670
+ const Qe = Be(({
671
+ open: e,
672
+ onCallBack: r,
673
+ queryFetch: n
674
+ }) => {
672
675
  const [o, t] = V([]), [i, f] = V(0), [p, s] = V(""), [x, g] = V(!1);
673
- return Pe(() => {
676
+ return Oe(() => {
674
677
  (async () => {
675
678
  g(!0);
676
679
  try {
@@ -684,45 +687,60 @@ const Qe = Ie(({ open: e, onCallBack: r, queryFetch: n }) => {
684
687
  }
685
688
  g(!1);
686
689
  })();
687
- }, [e]), /* @__PURE__ */ w.jsx(w.Fragment, { children: /* @__PURE__ */ w.jsx(Be, { open: e, title: "转接", footer: !1, onCancel: () => r(), children: /* @__PURE__ */ w.jsxs(Se, { children: [
688
- /* @__PURE__ */ w.jsx("div", { children: /* @__PURE__ */ w.jsx(
689
- G.Group,
690
- {
691
- options: [
692
- {
693
- label: "转接坐席",
694
- value: 0
695
- },
696
- {
697
- label: "转接技能组",
698
- value: 1
699
- }
700
- ],
701
- value: i,
702
- onChange: (l) => f(l.target.value)
703
- }
704
- ) }),
705
- /* @__PURE__ */ w.jsx(ye, { spinning: x, children: /* @__PURE__ */ w.jsxs("div", { style: { borderTop: "1px solid #eee", marginTop: 10, paddingTop: 10 }, children: [
706
- i === 0 && /* @__PURE__ */ w.jsx(ke, { wrap: !0, children: o.map((l) => /* @__PURE__ */ w.jsxs(Oe, { color: "processing", onClick: () => r(l.agent_no), children: [
707
- /* @__PURE__ */ w.jsxs("span", { style: { marginRight: 10 }, children: [
708
- "咨询坐席: ",
709
- l.agent_name
710
- ] }),
711
- /* @__PURE__ */ w.jsx(xe, { name: "zixun" })
712
- ] }, l.agent_no)) }),
713
- i === 1 && /* @__PURE__ */ w.jsx(
714
- $e,
715
- {
716
- value: p,
717
- onChange: (l) => s(l.target.value),
718
- placeholder: "请输入外线号码, 回车转接",
719
- onPressEnter: () => {
720
- r(p);
721
- }
722
- }
723
- )
724
- ] }) })
725
- ] }) }) });
690
+ }, [e]), /* @__PURE__ */ w.jsx(w.Fragment, {
691
+ children: /* @__PURE__ */ w.jsx(Re, {
692
+ open: e,
693
+ title: "转接",
694
+ footer: !1,
695
+ onCancel: () => r(),
696
+ children: /* @__PURE__ */ w.jsxs(Se, {
697
+ children: [/* @__PURE__ */ w.jsx("div", {
698
+ children: /* @__PURE__ */ w.jsx(G.Group, {
699
+ options: [{
700
+ label: "转接坐席",
701
+ value: 0
702
+ }, {
703
+ label: "转接技能组",
704
+ value: 1
705
+ }],
706
+ value: i,
707
+ onChange: (l) => f(l.target.value)
708
+ })
709
+ }), /* @__PURE__ */ w.jsx(ye, {
710
+ spinning: x,
711
+ children: /* @__PURE__ */ w.jsxs("div", {
712
+ style: {
713
+ borderTop: "1px solid #eee",
714
+ marginTop: 10,
715
+ paddingTop: 10
716
+ },
717
+ children: [i === 0 && /* @__PURE__ */ w.jsx(ke, {
718
+ wrap: !0,
719
+ children: o.map((l) => /* @__PURE__ */ w.jsxs(we, {
720
+ color: "processing",
721
+ onClick: () => r(l.agent_no),
722
+ children: [/* @__PURE__ */ w.jsxs("span", {
723
+ style: {
724
+ marginRight: 10
725
+ },
726
+ children: ["咨询坐席: ", l.agent_name]
727
+ }), /* @__PURE__ */ w.jsx(xe, {
728
+ name: "zixun"
729
+ })]
730
+ }, l.agent_no))
731
+ }), i === 1 && /* @__PURE__ */ w.jsx($e, {
732
+ value: p,
733
+ onChange: (l) => s(l.target.value),
734
+ placeholder: "请输入外线号码, 回车转接",
735
+ onPressEnter: () => {
736
+ r(p);
737
+ }
738
+ })]
739
+ })
740
+ })]
741
+ })
742
+ })
743
+ });
726
744
  });
727
745
  export {
728
746
  Qe as default
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-DoHK6Q-H.js"),A=require("./index-3VyZM5Bc.js"),j=require("react");function K(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const t=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,t.get?t:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const a=K(j),Q=e=>{const{componentCls:n,antCls:i}=e,t=`${n}-group`;return{[t]:Object.assign(Object.assign({},r.resetComponent(e)),{display:"inline-block",fontSize:0,[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-block`]:{display:"flex"},[`${i}-badge ${i}-badge-count`]:{zIndex:1},[`> ${i}-badge:not(:first-child) > ${i}-button-wrapper`]:{borderInlineStart:"none"}})}},Y=e=>{const{componentCls:n,wrapperMarginInlineEnd:i,colorPrimary:t,radioSize:o,motionDurationSlow:l,motionDurationMid:C,motionEaseInOutCirc:g,colorBgContainer:d,colorBorder:$,lineWidth:f,colorBgContainerDisabled:s,colorTextDisabled:O,paddingXS:k,dotColorDisabled:w,lineType:x,radioColor:u,radioBgColor:R,calc:h}=e,S=`${n}-inner`,P=h(o).sub(h(4).mul(2)),c=h(1).mul(o).equal({unit:!0});return{[`${n}-wrapper`]:Object.assign(Object.assign({},r.resetComponent(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:i,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${n}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${n}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${r.unit(f)} ${x} ${t}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[n]:Object.assign(Object.assign({},r.resetComponent(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${n}-wrapper:hover &,
2
+ &:hover ${S}`]:{borderColor:t},[`${n}-input:focus-visible + ${S}`]:Object.assign({},r.genFocusOutline(e)),[`${n}:hover::after, ${n}-wrapper:hover &::after`]:{visibility:"visible"},[`${n}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:c,height:c,marginBlockStart:h(1).mul(o).div(-2).equal({unit:!0}),marginInlineStart:h(1).mul(o).div(-2).equal({unit:!0}),backgroundColor:u,borderBlockStart:0,borderInlineStart:0,borderRadius:c,transform:"scale(0)",opacity:0,transition:`all ${l} ${g}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:c,height:c,backgroundColor:d,borderColor:$,borderStyle:"solid",borderWidth:f,borderRadius:"50%",transition:`all ${C}`},[`${n}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${n}-checked`]:{[S]:{borderColor:t,backgroundColor:R,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${l} ${g}`}}},[`${n}-disabled`]:{cursor:"not-allowed",[S]:{backgroundColor:s,borderColor:$,cursor:"not-allowed","&::after":{backgroundColor:w}},[`${n}-input`]:{cursor:"not-allowed"},[`${n}-disabled + span`]:{color:O,cursor:"not-allowed"},[`&${n}-checked`]:{[S]:{"&::after":{transform:`scale(${h(P).div(o).equal()})`}}}},[`span${n} + *`]:{paddingInlineStart:k,paddingInlineEnd:k}})}},Z=e=>{const{buttonColor:n,controlHeight:i,componentCls:t,lineWidth:o,lineType:l,colorBorder:C,motionDurationSlow:g,motionDurationMid:d,buttonPaddingInline:$,fontSize:f,buttonBg:s,fontSizeLG:O,controlHeightLG:k,controlHeightSM:w,paddingXS:x,borderRadius:u,borderRadiusSM:R,borderRadiusLG:h,buttonCheckedBg:S,buttonSolidCheckedColor:y,colorTextDisabled:P,colorBgContainerDisabled:c,buttonCheckedBgDisabled:_,buttonCheckedColorDisabled:v,colorPrimary:b,colorPrimaryHover:z,colorPrimaryActive:p,buttonSolidCheckedBg:I,buttonSolidCheckedHoverBg:B,buttonSolidCheckedActiveBg:N,calc:E}=e;return{[`${t}-button-wrapper`]:{position:"relative",display:"inline-block",height:i,margin:0,paddingInline:$,paddingBlock:0,color:n,fontSize:f,lineHeight:r.unit(E(i).sub(E(o).mul(2)).equal()),background:s,border:`${r.unit(o)} ${l} ${C}`,borderBlockStartWidth:E(o).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${d}`,`background ${d}`,`box-shadow ${d}`].join(","),a:{color:n},[`> ${t}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:E(o).mul(-1).equal(),insetInlineStart:E(o).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:C,transition:`background-color ${g}`,content:'""'}},"&:first-child":{borderInlineStart:`${r.unit(o)} ${l} ${C}`,borderStartStartRadius:u,borderEndStartRadius:u},"&:last-child":{borderStartEndRadius:u,borderEndEndRadius:u},"&:first-child:last-child":{borderRadius:u},[`${t}-group-large &`]:{height:k,fontSize:O,lineHeight:r.unit(E(k).sub(E(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h}},[`${t}-group-small &`]:{height:w,paddingInline:E(x).sub(o).equal(),paddingBlock:0,lineHeight:r.unit(E(w).sub(E(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:R,borderEndStartRadius:R},"&:last-child":{borderStartEndRadius:R,borderEndEndRadius:R}},"&:hover":{position:"relative",color:b},"&:has(:focus-visible)":Object.assign({},r.genFocusOutline(e)),[`${t}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${t}-button-wrapper-disabled)`]:{zIndex:1,color:b,background:S,borderColor:b,"&::before":{backgroundColor:b},"&:first-child":{borderColor:b},"&:hover":{color:z,borderColor:z,"&::before":{backgroundColor:z}},"&:active":{color:p,borderColor:p,"&::before":{backgroundColor:p}}},[`${t}-group-solid &-checked:not(${t}-button-wrapper-disabled)`]:{color:y,background:I,borderColor:I,"&:hover":{color:y,background:B,borderColor:B},"&:active":{color:y,background:N,borderColor:N}},"&-disabled":{color:P,backgroundColor:c,borderColor:C,cursor:"not-allowed","&:first-child, &:hover":{color:P,backgroundColor:c,borderColor:C}},[`&-disabled${t}-button-wrapper-checked`]:{color:v,backgroundColor:_,borderColor:C,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},ee=e=>{const{wireframe:n,padding:i,marginXS:t,lineWidth:o,fontSizeLG:l,colorText:C,colorBgContainer:g,colorTextDisabled:d,controlItemBgActiveDisabled:$,colorTextLightSolid:f,colorPrimary:s,colorPrimaryHover:O,colorPrimaryActive:k,colorWhite:w}=e,x=4,u=l,R=n?u-x*2:u-(x+o)*2;return{radioSize:u,dotSize:R,dotColorDisabled:d,buttonSolidCheckedColor:f,buttonSolidCheckedBg:s,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,buttonBg:g,buttonCheckedBg:g,buttonColor:C,buttonCheckedBgDisabled:$,buttonCheckedColorDisabled:d,buttonPaddingInline:i-o,wrapperMarginInlineEnd:t,radioColor:n?s:w,radioBgColor:n?g:s}},H=r.genStyleHooks("Radio",e=>{const{controlOutline:n,controlOutlineWidth:i}=e,t=`0 0 0 ${r.unit(i)} ${n}`,o=t,l=r.merge(e,{radioFocusShadow:t,radioButtonFocusShadow:o});return[Q(l),Y(l),Z(l)]},ee,{unitless:{radioSize:!0,dotSize:!0}}),W=a.createContext(null),te=W.Provider,F=a.createContext(null),oe=F.Provider;var re=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],ne=j.forwardRef(function(e,n){var i=e.prefixCls,t=i===void 0?"rc-checkbox":i,o=e.className,l=e.style,C=e.checked,g=e.disabled,d=e.defaultChecked,$=d===void 0?!1:d,f=e.type,s=f===void 0?"checkbox":f,O=e.title,k=e.onChange,w=r._objectWithoutProperties(e,re),x=j.useRef(null),u=j.useRef(null),R=r.useMergedState($,{value:C}),h=r._slicedToArray(R,2),S=h[0],y=h[1];j.useImperativeHandle(n,function(){return{focus:function(v){var b;(b=x.current)===null||b===void 0||b.focus(v)},blur:function(){var v;(v=x.current)===null||v===void 0||v.blur()},input:x.current,nativeElement:u.current}});var P=r.classNames(t,o,r._defineProperty(r._defineProperty({},"".concat(t,"-checked"),S),"".concat(t,"-disabled"),g)),c=function(v){g||("checked"in e||y(v.target.checked),k==null||k({target:r._objectSpread2(r._objectSpread2({},e),{},{type:s,checked:v.target.checked}),stopPropagation:function(){v.stopPropagation()},preventDefault:function(){v.preventDefault()},nativeEvent:v.nativeEvent}))};return a.createElement("span",{className:P,title:O,style:l,ref:u},a.createElement("input",r._extends({},w,{className:"".concat(t,"-input"),ref:x,onChange:c,disabled:g,checked:!!S,type:s})),a.createElement("span",{className:"".concat(t,"-inner")}))});function ie(e){const n=j.useRef(null),i=()=>{r.wrapperRaf.cancel(n.current),n.current=null};return[()=>{i(),n.current=r.wrapperRaf(()=>{n.current=null})},l=>{n.current&&(l.stopPropagation(),i()),e==null||e(l)}]}var ae=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(i[t[o]]=e[t[o]]);return i};const le=(e,n)=>{var i,t;const o=a.useContext(W),l=a.useContext(F),{getPrefixCls:C,direction:g,radio:d}=a.useContext(r.ConfigContext),$=a.useRef(null),f=r.composeRef(n,$),{isFormItemInput:s}=a.useContext(r.FormItemInputContext);if(process.env.NODE_ENV!=="production"){const D=r.devUseWarning("Radio");process.env.NODE_ENV!=="production"&&D(!("optionType"in e),"usage","`optionType` is only support in Radio.Group.")}const O=D=>{var M,T;(M=e.onChange)===null||M===void 0||M.call(e,D),(T=o==null?void 0:o.onChange)===null||T===void 0||T.call(o,D)},{prefixCls:k,className:w,rootClassName:x,children:u,style:R,title:h}=e,S=ae(e,["prefixCls","className","rootClassName","children","style","title"]),y=C("radio",k),P=((o==null?void 0:o.optionType)||l)==="button",c=P?`${y}-button`:y,_=r.useCSSVarCls(y),[v,b,z]=H(y,_),p=Object.assign({},S),I=a.useContext(r.DisabledContext);o&&(p.name=o.name,p.onChange=O,p.checked=e.value===o.value,p.disabled=(i=p.disabled)!==null&&i!==void 0?i:o.disabled),p.disabled=(t=p.disabled)!==null&&t!==void 0?t:I;const B=r.classNames(`${c}-wrapper`,{[`${c}-wrapper-checked`]:p.checked,[`${c}-wrapper-disabled`]:p.disabled,[`${c}-wrapper-rtl`]:g==="rtl",[`${c}-wrapper-in-form-item`]:s,[`${c}-wrapper-block`]:!!(o!=null&&o.block)},d==null?void 0:d.className,w,x,b,z,_),[N,E]=ie(p.onClick);return v(a.createElement(r.Wave,{component:"Radio",disabled:p.disabled},a.createElement("label",{className:B,style:Object.assign(Object.assign({},d==null?void 0:d.style),R),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:h,onClick:N},a.createElement(ne,Object.assign({},p,{className:r.classNames(p.className,{[r.TARGET_CLS]:!P}),type:"radio",prefixCls:c,ref:f,onClick:E})),u!==void 0?a.createElement("span",{className:`${c}-label`},u):null)))},V=a.forwardRef(le);process.env.NODE_ENV!=="production"&&(V.displayName="Radio");const se=a.forwardRef((e,n)=>{const{getPrefixCls:i,direction:t}=a.useContext(r.ConfigContext),o=r.useId(),{prefixCls:l,className:C,rootClassName:g,options:d,buttonStyle:$="outline",disabled:f,children:s,size:O,style:k,id:w,optionType:x,name:u=o,defaultValue:R,value:h,block:S=!1,onChange:y,onMouseEnter:P,onMouseLeave:c,onFocus:_,onBlur:v}=e,[b,z]=r.useMergedState(R,{value:h}),p=a.useCallback(m=>{const J=b,G=m.target.value;"value"in e||z(G),G!==J&&(y==null||y(m))},[b,z,y]),I=i("radio",l),B=`${I}-group`,N=r.useCSSVarCls(I),[E,D,M]=H(I,N);let T=s;d&&d.length>0&&(T=d.map(m=>typeof m=="string"||typeof m=="number"?a.createElement(V,{key:m.toString(),prefixCls:I,disabled:f,value:m,checked:b===m},m):a.createElement(V,{key:`radio-group-value-options-${m.value}`,prefixCls:I,disabled:m.disabled||f,value:m.value,checked:b===m.value,title:m.title,style:m.style,id:m.id,required:m.required},m.label)));const L=r.useSize(O),X=r.classNames(B,`${B}-${$}`,{[`${B}-${L}`]:L,[`${B}-rtl`]:t==="rtl",[`${B}-block`]:S},C,g,D,M,N),U=a.useMemo(()=>({onChange:p,value:b,disabled:f,name:u,optionType:x,block:S}),[p,b,f,u,x,S]);return E(a.createElement("div",Object.assign({},r.pickAttrs(e,{aria:!0,data:!0}),{className:X,style:k,onMouseEnter:P,onMouseLeave:c,onFocus:_,onBlur:v,id:w,ref:n}),a.createElement(te,{value:U},T)))}),de=a.memo(se);var ce=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(i[t[o]]=e[t[o]]);return i};const ue=(e,n)=>{const{getPrefixCls:i}=a.useContext(r.ConfigContext),{prefixCls:t}=e,o=ce(e,["prefixCls"]),l=i("radio",t);return a.createElement(oe,{value:"button"},a.createElement(V,Object.assign({prefixCls:l},o,{type:"radio",ref:n})))},be=a.forwardRef(ue),q=V;q.Button=be;q.Group=de;q.__ANT_RADIO=!0;const pe=j.memo(({open:e,onCallBack:n,queryFetch:i})=>{const[t,o]=j.useState([]),[l,C]=j.useState(0),[g,d]=j.useState(""),[$,f]=j.useState(!1);return j.useEffect(()=>{(async()=>{f(!0);try{await i({success:s=>{o(s.data||[])}})}catch(s){console.log(s)}f(!1)})()},[e]),r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:r.jsxRuntimeExports.jsx(A.Modal,{open:e,title:"转接",footer:!1,onCancel:()=>n(),children:r.jsxRuntimeExports.jsxs(r.ModelBody,{children:[r.jsxRuntimeExports.jsx("div",{children:r.jsxRuntimeExports.jsx(q.Group,{options:[{label:"转接坐席",value:0},{label:"转接技能组",value:1}],value:l,onChange:s=>C(s.target.value)})}),r.jsxRuntimeExports.jsx(r.Spin,{spinning:$,children:r.jsxRuntimeExports.jsxs("div",{style:{borderTop:"1px solid #eee",marginTop:10,paddingTop:10},children:[l===0&&r.jsxRuntimeExports.jsx(r.Space,{wrap:!0,children:t.map(s=>r.jsxRuntimeExports.jsxs(A.Tag,{color:"processing",onClick:()=>n(s.agent_no),children:[r.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["咨询坐席: ",s.agent_name]}),r.jsxRuntimeExports.jsx(r.IconSvg,{name:"zixun"})]},s.agent_no))}),l===1&&r.jsxRuntimeExports.jsx(r.Input,{value:g,onChange:s=>d(s.target.value),placeholder:"请输入外线号码, 回车转接",onPressEnter:()=>{n(g)}})]})})]})})})});exports.default=pe;
@@ -0,0 +1,14 @@
1
+ "use strict";const a=require("./index-DoHK6Q-H.js"),b=require("react");function st(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=st(b),it=new a.Keyframe("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),ct=new a.Keyframe("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),dt=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:o}=e,n=`${o}-fade`,r=t?"&":"";return[a.initMotion(n,it,ct,e.motionDurationMid,t),{[`
2
+ ${r}${n}-enter,
3
+ ${r}${n}-appear
4
+ `]:{opacity:0,animationTimingFunction:"linear"},[`${r}${n}-leave`]:{animationTimingFunction:"linear"}}]},ut=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},mt=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},ft=(e,t)=>{const{prefixCls:o,componentCls:n,gridColumns:r}=e,l={};for(let i=r;i>=0;i--)i===0?(l[`${n}${t}-${i}`]={display:"none"},l[`${n}-push-${i}`]={insetInlineStart:"auto"},l[`${n}-pull-${i}`]={insetInlineEnd:"auto"},l[`${n}${t}-push-${i}`]={insetInlineStart:"auto"},l[`${n}${t}-pull-${i}`]={insetInlineEnd:"auto"},l[`${n}${t}-offset-${i}`]={marginInlineStart:0},l[`${n}${t}-order-${i}`]={order:0}):(l[`${n}${t}-${i}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${i/r*100}%`,maxWidth:`${i/r*100}%`}],l[`${n}${t}-push-${i}`]={insetInlineStart:`${i/r*100}%`},l[`${n}${t}-pull-${i}`]={insetInlineEnd:`${i/r*100}%`},l[`${n}${t}-offset-${i}`]={marginInlineStart:`${i/r*100}%`},l[`${n}${t}-order-${i}`]={order:i});return l[`${n}${t}-flex`]={flex:`var(--${o}${t}-flex)`},l},fe=(e,t)=>ft(e,t),gt=(e,t,o)=>({[`@media (min-width: ${a.unit(t)})`]:Object.assign({},fe(e,o))}),Ct=()=>({}),pt=()=>({});a.genStyleHooks("Grid",ut,Ct);const Re=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin});a.genStyleHooks("Grid",e=>{const t=a.merge(e,{gridColumns:24}),o=Re(t);return delete o.xs,[mt(t),fe(t,""),fe(t,"-xs"),Object.keys(o).map(n=>gt(t,o[n],`-${n}`)).reduce((n,r)=>Object.assign(Object.assign({},n),r),{})]},pt);function $e(e){return{position:e,inset:0}}const bt=e=>{const{componentCls:t,antCls:o}=e;return[{[`${t}-root`]:{[`${t}${o}-zoom-enter, ${t}${o}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${o}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},$e("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},$e("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:dt(e)}]},vt=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${a.unit(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},a.resetComponent(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${a.unit(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:a.unit(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},a.genFocusStyle(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${a.unit(e.borderRadiusLG)} ${a.unit(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${a.unit(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,
5
+ ${t}-body,
6
+ ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},ht=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},yt=e=>{const{componentCls:t}=e,o=Re(e);delete o.xs;const n=Object.keys(o).map(r=>({[`@media (min-width: ${a.unit(o[r])})`]:{width:`var(--${t.replace(".","")}-${r}-width)`}}));return{[`${t}-root`]:{[t]:[{width:`var(--${t.replace(".","")}-xs-width)`}].concat(a._toConsumableArray(n))}}},Be=e=>{const t=e.padding,o=e.fontSizeHeading5,n=e.lineHeightHeading5;return a.merge(e,{modalHeaderHeight:e.calc(e.calc(n).mul(o).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},_e=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${a.unit(e.paddingMD)} ${a.unit(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${a.unit(e.padding)} ${a.unit(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${a.unit(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${a.unit(e.paddingXS)} ${a.unit(e.padding)}`:0,footerBorderTop:e.wireframe?`${a.unit(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${a.unit(e.borderRadiusLG)} ${a.unit(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${a.unit(e.padding*2)} ${a.unit(e.padding*2)} ${a.unit(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),He=a.genStyleHooks("Modal",e=>{const t=Be(e);return[vt(t),ht(t),bt(t),a.initZoomMotion(t,"zoom"),yt(t)]},_e,{unitless:{titleLineHeight:!0}}),$t=e=>{const{paddingXXS:t,lineWidth:o,tagPaddingHorizontal:n,componentCls:r,calc:l}=e,i=l(n).sub(o).equal(),u=l(t).sub(o).equal();return{[r]:Object.assign(Object.assign({},a.resetComponent(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${a.unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${r}-close-icon`]:{marginInlineStart:u,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},Ce=e=>{const{lineWidth:t,fontSizeIcon:o,calc:n}=e,r=e.fontSizeSM;return a.merge(e,{tagFontSize:r,tagLineHeight:a.unit(n(e.lineHeightSM).mul(r).equal()),tagIconSize:n(o).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},pe=e=>({defaultBg:new a.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),ze=a.genStyleHooks("Tag",e=>{const t=Ce(e);return $t(t)},pe);function ie(e){return!!(e!=null&&e.then)}const Ae=e=>{const{type:t,children:o,prefixCls:n,buttonProps:r,close:l,autoFocus:i,emitEvent:u,isSilent:c,quitOnNullishReturnValue:g,actionFn:d}=e,m=s.useRef(!1),f=s.useRef(null),[v,x]=a.useSafeState(!1),C=function(){l==null||l.apply(void 0,arguments)};s.useEffect(()=>{let h=null;return i&&(h=setTimeout(()=>{var S;(S=f.current)===null||S===void 0||S.focus({preventScroll:!0})})),()=>{h&&clearTimeout(h)}},[]);const p=h=>{ie(h)&&(x(!0),h.then(function(){x(!1,!0),C.apply(void 0,arguments),m.current=!1},S=>{if(x(!1,!0),m.current=!1,!(c!=null&&c()))return Promise.reject(S)}))},y=h=>{if(m.current)return;if(m.current=!0,!d){C();return}let S;if(u){if(S=d(h),g&&!ie(S)){m.current=!1,C(h);return}}else if(d.length)S=d(l),m.current=!1;else if(S=d(),!ie(S)){C();return}p(S)};return s.createElement(a.Button,Object.assign({},a.convertLegacyProps(t),{onClick:y,loading:v,prefixCls:n},r,{ref:f}),o)},ee=b.createContext({}),{Provider:Le}=ee,xe=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:o,isSilent:n,mergedOkCancel:r,rootPrefixCls:l,close:i,onCancel:u,onConfirm:c}=b.useContext(ee);return r?b.createElement(Ae,{isSilent:n,actionFn:u,close:function(){i==null||i.apply(void 0,arguments),c==null||c(!1)},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${l}-btn`},o):null},Se=()=>{const{autoFocusButton:e,close:t,isSilent:o,okButtonProps:n,rootPrefixCls:r,okTextLocale:l,okType:i,onConfirm:u,onOk:c}=b.useContext(ee);return b.createElement(Ae,{isSilent:o,type:i||"primary",actionFn:c,close:function(){t==null||t.apply(void 0,arguments),u==null||u(!0)},autoFocus:e==="ok",buttonProps:n,prefixCls:`${r}-btn`},l)};var ke=s.createContext({});function Oe(e,t,o){var n=t;return!n&&o&&(n="".concat(e,"-").concat(o)),n}function Ne(e,t){var o=e["page".concat(t?"Y":"X","Offset")],n="scroll".concat(t?"Top":"Left");if(typeof o!="number"){var r=e.document;o=r.documentElement[n],typeof o!="number"&&(o=r.body[n])}return o}function xt(e){var t=e.getBoundingClientRect(),o={left:t.left,top:t.top},n=e.ownerDocument,r=n.defaultView||n.parentWindow;return o.left+=Ne(r),o.top+=Ne(r,!0),o}const St=s.memo(function(e){var t=e.children;return t},function(e,t){var o=t.shouldUpdate;return!o});var Ot={width:0,height:0,overflow:"hidden",outline:"none"},Nt={outline:"none"},be=b.forwardRef(function(e,t){var o=e.prefixCls,n=e.className,r=e.style,l=e.title,i=e.ariaId,u=e.footer,c=e.closable,g=e.closeIcon,d=e.onClose,m=e.children,f=e.bodyStyle,v=e.bodyProps,x=e.modalRender,C=e.onMouseDown,p=e.onMouseUp,y=e.holderRef,h=e.visible,S=e.forceRender,N=e.width,E=e.height,O=e.classNames,$=e.styles,P=b.useContext(ke),j=P.panel,H=a.useComposeRef(y,j),B=b.useRef(),_=b.useRef();b.useImperativeHandle(t,function(){return{focus:function(){var R;(R=B.current)===null||R===void 0||R.focus({preventScroll:!0})},changeActive:function(R){var Y=document,G=Y.activeElement;R&&G===_.current?B.current.focus({preventScroll:!0}):!R&&G===B.current&&_.current.focus({preventScroll:!0})}}});var V={};N!==void 0&&(V.width=N),E!==void 0&&(V.height=E);var A=u?b.createElement("div",{className:a.classNames("".concat(o,"-footer"),O==null?void 0:O.footer),style:a._objectSpread2({},$==null?void 0:$.footer)},u):null,z=l?b.createElement("div",{className:a.classNames("".concat(o,"-header"),O==null?void 0:O.header),style:a._objectSpread2({},$==null?void 0:$.header)},b.createElement("div",{className:"".concat(o,"-title"),id:i},l)):null,W=b.useMemo(function(){return a._typeof(c)==="object"&&c!==null?c:c?{closeIcon:g??b.createElement("span",{className:"".concat(o,"-close-x")})}:{}},[c,g,o]),L=a.pickAttrs(W,!0),I=a._typeof(c)==="object"&&c.disabled,X=c?b.createElement("button",a._extends({type:"button",onClick:d,"aria-label":"Close"},L,{className:"".concat(o,"-close"),disabled:I}),W.closeIcon):null,M=b.createElement("div",{className:a.classNames("".concat(o,"-content"),O==null?void 0:O.content),style:$==null?void 0:$.content},X,z,b.createElement("div",a._extends({className:a.classNames("".concat(o,"-body"),O==null?void 0:O.body),style:a._objectSpread2(a._objectSpread2({},f),$==null?void 0:$.body)},v),m),A);return b.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":l?i:null,"aria-modal":"true",ref:H,style:a._objectSpread2(a._objectSpread2({},r),V),className:a.classNames(o,n),onMouseDown:C,onMouseUp:p},b.createElement("div",{ref:B,tabIndex:0,style:Nt},b.createElement(St,{shouldUpdate:h||S},x?x(M):M)),b.createElement("div",{tabIndex:0,ref:_,style:Ot}))});process.env.NODE_ENV!=="production"&&(be.displayName="Panel");var De=s.forwardRef(function(e,t){var o=e.prefixCls,n=e.title,r=e.style,l=e.className,i=e.visible,u=e.forceRender,c=e.destroyOnClose,g=e.motionName,d=e.ariaId,m=e.onVisibleChanged,f=e.mousePosition,v=b.useRef(),x=s.useState(),C=a._slicedToArray(x,2),p=C[0],y=C[1],h={};p&&(h.transformOrigin=p);function S(){var N=xt(v.current);y(f&&(f.x||f.y)?"".concat(f.x-N.left,"px ").concat(f.y-N.top,"px"):"")}return s.createElement(a.CSSMotion,{visible:i,onVisibleChanged:m,onAppearPrepare:S,onEnterPrepare:S,forceRender:u,motionName:g,removeOnLeave:c,ref:v},function(N,E){var O=N.className,$=N.style;return s.createElement(be,a._extends({},e,{ref:t,title:n,ariaId:d,prefixCls:o,holderRef:E,style:a._objectSpread2(a._objectSpread2(a._objectSpread2({},$),r),h),className:a.classNames(l,O)}))})});De.displayName="Content";var Et=function(t){var o=t.prefixCls,n=t.style,r=t.visible,l=t.maskProps,i=t.motionName,u=t.className;return s.createElement(a.CSSMotion,{key:"mask",visible:r,motionName:i,leavedClassName:"".concat(o,"-mask-hidden")},function(c,g){var d=c.className,m=c.style;return s.createElement("div",a._extends({ref:g,style:a._objectSpread2(a._objectSpread2({},m),n),className:a.classNames("".concat(o,"-mask"),d,u)},l))})},wt=function(t){var o=t.prefixCls,n=o===void 0?"rc-dialog":o,r=t.zIndex,l=t.visible,i=l===void 0?!1:l,u=t.keyboard,c=u===void 0?!0:u,g=t.focusTriggerAfterClose,d=g===void 0?!0:g,m=t.wrapStyle,f=t.wrapClassName,v=t.wrapProps,x=t.onClose,C=t.afterOpenChange,p=t.afterClose,y=t.transitionName,h=t.animation,S=t.closable,N=S===void 0?!0:S,E=t.mask,O=E===void 0?!0:E,$=t.maskTransitionName,P=t.maskAnimation,j=t.maskClosable,H=j===void 0?!0:j,B=t.maskStyle,_=t.maskProps,V=t.rootClassName,A=t.classNames,z=t.styles;process.env.NODE_ENV!=="production"&&(["wrapStyle","bodyStyle","maskStyle"].forEach(function(w){a.warning(!(w in t),"".concat(w," is deprecated, please use styles instead."))}),"wrapClassName"in t&&a.warning(!1,"wrapClassName is deprecated, please use classNames instead."));var W=b.useRef(),L=b.useRef(),I=b.useRef(),X=s.useState(i),M=a._slicedToArray(X,2),q=M[0],R=M[1],Y=a.useId();function G(){a.contains(L.current,document.activeElement)||(W.current=document.activeElement)}function le(){if(!a.contains(L.current,document.activeElement)){var w;(w=I.current)===null||w===void 0||w.focus()}}function k(w){if(w)le();else{if(R(!1),O&&W.current&&d){try{W.current.focus({preventScroll:!0})}catch{}W.current=null}q&&(p==null||p())}C==null||C(w)}function T(w){x==null||x(w)}var D=b.useRef(!1),J=b.useRef(),ot=function(){clearTimeout(J.current),D.current=!0},at=function(){J.current=setTimeout(function(){D.current=!1})},ye=null;H&&(ye=function(se){D.current?D.current=!1:L.current===se.target&&T(se)});function rt(w){if(c&&w.keyCode===a.KeyCode.ESC){w.stopPropagation(),T(w);return}i&&w.keyCode===a.KeyCode.TAB&&I.current.changeActive(!w.shiftKey)}b.useEffect(function(){i&&(R(!0),G())},[i]),b.useEffect(function(){return function(){clearTimeout(J.current)}},[]);var lt=a._objectSpread2(a._objectSpread2(a._objectSpread2({zIndex:r},m),z==null?void 0:z.wrapper),{},{display:q?null:"none"});return s.createElement("div",a._extends({className:a.classNames("".concat(n,"-root"),V)},a.pickAttrs(t,{data:!0})),s.createElement(Et,{prefixCls:n,visible:O&&i,motionName:Oe(n,$,P),style:a._objectSpread2(a._objectSpread2({zIndex:r},B),z==null?void 0:z.mask),maskProps:_,className:A==null?void 0:A.mask}),s.createElement("div",a._extends({tabIndex:-1,onKeyDown:rt,className:a.classNames("".concat(n,"-wrap"),f,A==null?void 0:A.wrapper),ref:L,onClick:ye,style:lt},v),s.createElement(De,a._extends({},t,{onMouseDown:ot,onMouseUp:at,ref:I,closable:N,ariaId:Y,prefixCls:n,visible:i&&q,onClose:T,onVisibleChanged:k,motionName:Oe(n,y,h)}))))},Fe=function(t){var o=t.visible,n=t.getContainer,r=t.forceRender,l=t.destroyOnClose,i=l===void 0?!1:l,u=t.afterClose,c=t.panelRef,g=s.useState(o),d=a._slicedToArray(g,2),m=d[0],f=d[1],v=s.useMemo(function(){return{panel:c}},[c]);return s.useEffect(function(){o&&f(!0)},[o]),!r&&i&&!m?null:s.createElement(ke.Provider,{value:v},s.createElement(a.Portal,{open:o||r||m,autoDestroy:!1,getContainer:n,autoLock:o||m},s.createElement(wt,a._extends({},t,{destroyOnClose:i,afterClose:function(){u==null||u(),f(!1)}}))))};Fe.displayName="Dialog";function oe(e){if(e)return{closable:e.closable,closeIcon:e.closeIcon}}function Ee(e){const{closable:t,closeIcon:o}=e||{};return b.useMemo(()=>{if(!t&&(t===!1||o===!1||o===null))return!1;if(t===void 0&&o===void 0)return null;let n={closeIcon:typeof o!="boolean"&&o!==null?o:void 0};return t&&typeof t=="object"&&(n=Object.assign(Object.assign({},n),t)),n},[t,o])}function we(){const e={};for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return o.forEach(r=>{r&&Object.keys(r).forEach(l=>{r[l]!==void 0&&(e[l]=r[l])})}),e}const jt={};function We(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jt;const n=Ee(e),r=Ee(t),l=typeof n!="boolean"?!!(n!=null&&n.disabled):!1,i=b.useMemo(()=>Object.assign({closeIcon:b.createElement(a.RefIcon,null)},o),[o]),u=b.useMemo(()=>n===!1?!1:n?we(i,r,n):r===!1?!1:r?we(i,r):i.closable?i:!1,[n,r,i]);return b.useMemo(()=>{if(u===!1)return[!1,null,l];const{closeIconRender:c}=i,{closeIcon:g}=u;let d=g;if(d!=null){c&&(d=c(g));const m=a.pickAttrs(u,!0);Object.keys(m).length&&(d=b.isValidElement(d)?b.cloneElement(d,m):b.createElement("span",Object.assign({},m),d))}return[!0,d,l]},[u,i])}const Pt=()=>a.canUseDom()&&window.document.documentElement,ae=e=>{const{prefixCls:t,className:o,style:n,size:r,shape:l}=e,i=a.classNames({[`${t}-lg`]:r==="large",[`${t}-sm`]:r==="small"}),u=a.classNames({[`${t}-circle`]:l==="circle",[`${t}-square`]:l==="square",[`${t}-round`]:l==="round"}),c=s.useMemo(()=>typeof r=="number"?{width:r,height:r,lineHeight:`${r}px`}:{},[r]);return s.createElement("span",{className:a.classNames(t,i,u,o),style:Object.assign(Object.assign({},c),n)})},It=new a.Keyframe("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),re=e=>({height:e,lineHeight:a.unit(e)}),Q=e=>Object.assign({width:e},re(e)),Tt=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:It,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),ce=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},re(e)),Mt=e=>{const{skeletonAvatarCls:t,gradientFromColor:o,controlHeight:n,controlHeightLG:r,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:o},Q(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Q(r)),[`${t}${t}-sm`]:Object.assign({},Q(l))}},Rt=e=>{const{controlHeight:t,borderRadiusSM:o,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:i,calc:u}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:o},ce(t,u)),[`${n}-lg`]:Object.assign({},ce(r,u)),[`${n}-sm`]:Object.assign({},ce(l,u))}},je=e=>Object.assign({width:e},re(e)),Bt=e=>{const{skeletonImageCls:t,imageSizeBase:o,gradientFromColor:n,borderRadiusSM:r,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:r},je(l(o).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},je(o)),{maxWidth:l(o).mul(4).equal(),maxHeight:l(o).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},de=(e,t,o)=>{const{skeletonButtonCls:n}=e;return{[`${o}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${o}${n}-round`]:{borderRadius:t}}},ue=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},re(e)),_t=e=>{const{borderRadiusSM:t,skeletonButtonCls:o,controlHeight:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:i,calc:u}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[o]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:u(n).mul(2).equal(),minWidth:u(n).mul(2).equal()},ue(n,u))},de(e,n,o)),{[`${o}-lg`]:Object.assign({},ue(r,u))}),de(e,r,`${o}-lg`)),{[`${o}-sm`]:Object.assign({},ue(l,u))}),de(e,l,`${o}-sm`))},Ht=e=>{const{componentCls:t,skeletonAvatarCls:o,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:l,skeletonInputCls:i,skeletonImageCls:u,controlHeight:c,controlHeightLG:g,controlHeightSM:d,gradientFromColor:m,padding:f,marginSM:v,borderRadius:x,titleHeight:C,blockRadius:p,paragraphLiHeight:y,controlHeightXS:h,paragraphMarginTop:S}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[o]:Object.assign({display:"inline-block",verticalAlign:"top",background:m},Q(c)),[`${o}-circle`]:{borderRadius:"50%"},[`${o}-lg`]:Object.assign({},Q(g)),[`${o}-sm`]:Object.assign({},Q(d))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:C,background:m,borderRadius:p,[`+ ${r}`]:{marginBlockStart:d}},[r]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:m,borderRadius:p,"+ li":{marginBlockStart:h}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${r} > li`]:{borderRadius:x}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:v,[`+ ${r}`]:{marginBlockStart:S}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},_t(e)),Mt(e)),Rt(e)),Bt(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[`
7
+ ${n},
8
+ ${r} > li,
9
+ ${o},
10
+ ${l},
11
+ ${i},
12
+ ${u}
13
+ `]:Object.assign({},Tt(e))}}},zt=e=>{const{colorFillContent:t,colorFill:o}=e,n=t,r=o;return{color:n,colorGradientEnd:r,gradientFromColor:n,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},Z=a.genStyleHooks("Skeleton",e=>{const{componentCls:t,calc:o}=e,n=a.merge(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:o(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Ht(n)]},zt,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),At=e=>{const{prefixCls:t,className:o,rootClassName:n,active:r,shape:l="circle",size:i="default"}=e,{getPrefixCls:u}=s.useContext(a.ConfigContext),c=u("skeleton",t),[g,d,m]=Z(c),f=a.omit(e,["prefixCls","className"]),v=a.classNames(c,`${c}-element`,{[`${c}-active`]:r},o,n,d,m);return g(s.createElement("div",{className:v},s.createElement(ae,Object.assign({prefixCls:`${c}-avatar`,shape:l,size:i},f))))},Lt=e=>{const{prefixCls:t,className:o,rootClassName:n,active:r,block:l=!1,size:i="default"}=e,{getPrefixCls:u}=s.useContext(a.ConfigContext),c=u("skeleton",t),[g,d,m]=Z(c),f=a.omit(e,["prefixCls"]),v=a.classNames(c,`${c}-element`,{[`${c}-active`]:r,[`${c}-block`]:l},o,n,d,m);return g(s.createElement("div",{className:v},s.createElement(ae,Object.assign({prefixCls:`${c}-button`,size:i},f))))},kt="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",Dt=e=>{const{prefixCls:t,className:o,rootClassName:n,style:r,active:l}=e,{getPrefixCls:i}=s.useContext(a.ConfigContext),u=i("skeleton",t),[c,g,d]=Z(u),m=a.classNames(u,`${u}-element`,{[`${u}-active`]:l},o,n,g,d);return c(s.createElement("div",{className:m},s.createElement("div",{className:a.classNames(`${u}-image`,o),style:r},s.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${u}-image-svg`},s.createElement("title",null,"Image placeholder"),s.createElement("path",{d:kt,className:`${u}-image-path`})))))},Ft=e=>{const{prefixCls:t,className:o,rootClassName:n,active:r,block:l,size:i="default"}=e,{getPrefixCls:u}=s.useContext(a.ConfigContext),c=u("skeleton",t),[g,d,m]=Z(c),f=a.omit(e,["prefixCls"]),v=a.classNames(c,`${c}-element`,{[`${c}-active`]:r,[`${c}-block`]:l},o,n,d,m);return g(s.createElement("div",{className:v},s.createElement(ae,Object.assign({prefixCls:`${c}-input`,size:i},f))))},Wt=e=>{const{prefixCls:t,className:o,rootClassName:n,style:r,active:l,children:i}=e,{getPrefixCls:u}=s.useContext(a.ConfigContext),c=u("skeleton",t),[g,d,m]=Z(c),f=a.classNames(c,`${c}-element`,{[`${c}-active`]:l},d,o,n,m);return g(s.createElement("div",{className:f},s.createElement("div",{className:a.classNames(`${c}-image`,o),style:r},i)))},Vt=(e,t)=>{const{width:o,rows:n=2}=t;if(Array.isArray(o))return o[e];if(n-1===e)return o},qt=e=>{const{prefixCls:t,className:o,style:n,rows:r}=e,l=a._toConsumableArray(new Array(r)).map((i,u)=>s.createElement("li",{key:u,style:{width:Vt(u,e)}}));return s.createElement("ul",{className:a.classNames(t,o),style:n},l)},Gt=e=>{let{prefixCls:t,className:o,width:n,style:r}=e;return s.createElement("h3",{className:a.classNames(t,o),style:Object.assign({width:n},r)})};function me(e){return e&&typeof e=="object"?e:{}}function Xt(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Ut(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function Kt(e,t){const o={};return(!e||!t)&&(o.width="61%"),!e&&t?o.rows=3:o.rows=2,o}const K=e=>{const{prefixCls:t,loading:o,className:n,rootClassName:r,style:l,children:i,avatar:u=!1,title:c=!0,paragraph:g=!0,active:d,round:m}=e,{getPrefixCls:f,direction:v,className:x,style:C}=a.useComponentConfig("skeleton"),p=f("skeleton",t),[y,h,S]=Z(p);if(o||!("loading"in e)){const N=!!u,E=!!c,O=!!g;let $;if(N){const H=Object.assign(Object.assign({prefixCls:`${p}-avatar`},Xt(E,O)),me(u));$=s.createElement("div",{className:`${p}-header`},s.createElement(ae,Object.assign({},H)))}let P;if(E||O){let H;if(E){const _=Object.assign(Object.assign({prefixCls:`${p}-title`},Ut(N,O)),me(c));H=s.createElement(Gt,Object.assign({},_))}let B;if(O){const _=Object.assign(Object.assign({prefixCls:`${p}-paragraph`},Kt(N,E)),me(g));B=s.createElement(qt,Object.assign({},_))}P=s.createElement("div",{className:`${p}-content`},H,B)}const j=a.classNames(p,{[`${p}-with-avatar`]:N,[`${p}-active`]:d,[`${p}-rtl`]:v==="rtl",[`${p}-round`]:m},x,n,r,h,S);return y(s.createElement("div",{className:j,style:Object.assign(Object.assign({},C),l)},$,P))}return i??null};K.Button=Lt;K.Avatar=At;K.Input=Ft;K.Image=Dt;K.Node=Wt;process.env.NODE_ENV!=="production"&&(K.displayName="Skeleton");function Pe(){}const Qt=s.createContext({add:Pe,remove:Pe});function Zt(e){const t=s.useContext(Qt),o=s.useRef(null);return a.useEvent(r=>{if(r){const l=e?r.querySelector(e):r;t.add(l),o.current=l}else t.remove(o.current)})}const Ie=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:o}=b.useContext(ee);return b.createElement(a.Button,Object.assign({onClick:o},e),t)},Te=()=>{const{confirmLoading:e,okButtonProps:t,okType:o,okTextLocale:n,onOk:r}=b.useContext(ee);return b.createElement(a.Button,Object.assign({},a.convertLegacyProps(o),{loading:e,onClick:r},t),n)};function Ve(e,t){return b.createElement("span",{className:`${e}-close-x`},t||b.createElement(a.RefIcon,{className:`${e}-close-icon`}))}const qe=e=>{const{okText:t,okType:o="primary",cancelText:n,confirmLoading:r,onOk:l,onCancel:i,okButtonProps:u,cancelButtonProps:c,footer:g}=e,[d]=a.useLocale("Modal",a.getConfirmLocale()),m=t||(d==null?void 0:d.okText),f=n||(d==null?void 0:d.cancelText),v={confirmLoading:r,okButtonProps:u,cancelButtonProps:c,okTextLocale:m,cancelTextLocale:f,okType:o,onOk:l,onCancel:i},x=b.useMemo(()=>v,a._toConsumableArray(Object.values(v)));let C;return typeof g=="function"||typeof g>"u"?(C=b.createElement(b.Fragment,null,b.createElement(Ie,null),b.createElement(Te,null)),typeof g=="function"&&(C=g(C,{OkBtn:Te,CancelBtn:Ie})),C=b.createElement(Le,{value:x},C)):C=g,b.createElement(a.DisabledContextProvider,{disabled:!1},C)};var Yt=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};let ge;const Jt=e=>{ge={x:e.pageX,y:e.pageY},setTimeout(()=>{ge=null},100)};Pt()&&document.documentElement.addEventListener("click",Jt,!0);const Ge=e=>{var t;const{getPopupContainer:o,getPrefixCls:n,direction:r,modal:l}=s.useContext(a.ConfigContext),i=k=>{const{onCancel:T}=e;T==null||T(k)},u=k=>{const{onOk:T}=e;T==null||T(k)};if(process.env.NODE_ENV!=="production"){const k=a.devUseWarning("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(T=>{let[D,J]=T;k.deprecated(!(D in e),D,J)})}const{prefixCls:c,className:g,rootClassName:d,open:m,wrapClassName:f,centered:v,getContainer:x,focusTriggerAfterClose:C=!0,style:p,visible:y,width:h=520,footer:S,classNames:N,styles:E,children:O,loading:$}=e,P=Yt(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading"]),j=n("modal",c),H=n(),B=a.useCSSVarCls(j),[_,V,A]=He(j,B),z=a.classNames(f,{[`${j}-centered`]:v??(l==null?void 0:l.centered),[`${j}-wrap-rtl`]:r==="rtl"}),W=S!==null&&!$?s.createElement(qe,Object.assign({},e,{onOk:u,onCancel:i})):null,[L,I,X]=We(oe(e),oe(l),{closable:!0,closeIcon:s.createElement(a.RefIcon,{className:`${j}-close-icon`}),closeIconRender:k=>Ve(j,k)}),M=Zt(`.${j}-content`),[q,R]=a.useZIndex("Modal",P.zIndex),[Y,G]=s.useMemo(()=>h&&typeof h=="object"?[void 0,h]:[h,void 0],[h]),le=s.useMemo(()=>{const k={};return G&&Object.keys(G).forEach(T=>{const D=G[T];D!==void 0&&(k[`--${j}-${T}-width`]=typeof D=="number"?`${D}px`:D)}),k},[G]);return _(s.createElement(a.ContextIsolator,{form:!0,space:!0},s.createElement(a.zIndexContext.Provider,{value:R},s.createElement(Fe,Object.assign({width:Y},P,{zIndex:q,getContainer:x===void 0?o:x,prefixCls:j,rootClassName:a.classNames(V,d,A,B),footer:W,visible:m??y,mousePosition:(t=P.mousePosition)!==null&&t!==void 0?t:ge,onClose:i,closable:L&&{disabled:X,closeIcon:I},closeIcon:I,focusTriggerAfterClose:C,transitionName:a.getTransitionName(H,"zoom",e.transitionName),maskTransitionName:a.getTransitionName(H,"fade",e.maskTransitionName),className:a.classNames(V,g,l==null?void 0:l.className),style:Object.assign(Object.assign(Object.assign({},l==null?void 0:l.style),p),le),classNames:Object.assign(Object.assign(Object.assign({},l==null?void 0:l.classNames),N),{wrapper:a.classNames(z,N==null?void 0:N.wrapper)}),styles:Object.assign(Object.assign({},l==null?void 0:l.styles),E),panelRef:M}),$?s.createElement(K,{active:!0,title:!1,paragraph:{rows:4},className:`${j}-body-skeleton`}):O))))},en=e=>{const{componentCls:t,titleFontSize:o,titleLineHeight:n,modalConfirmIconSize:r,fontSize:l,lineHeight:i,modalTitleHeight:u,fontHeight:c,confirmBodyPadding:g}=e,d=`${t}-confirm`;return{[d]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${d}-body-wrapper`]:Object.assign({},a.clearFix()),[`&${t} ${t}-body`]:{padding:g},[`${d}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:r,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(r).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(u).sub(r).equal()).div(2).equal()}},[`${d}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${a.unit(e.marginSM)})`},[`${e.iconCls} + ${d}-paragraph`]:{maxWidth:`calc(100% - ${a.unit(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${d}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:o,lineHeight:n},[`${d}-content`]:{color:e.colorText,fontSize:l,lineHeight:i},[`${d}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${d}-error ${d}-body > ${e.iconCls}`]:{color:e.colorError},[`${d}-warning ${d}-body > ${e.iconCls},
14
+ ${d}-confirm ${d}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${d}-info ${d}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${d}-success ${d}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},tn=a.genSubStyleComponent(["Modal","confirm"],e=>{const t=Be(e);return[en(t)]},_e,{order:-1e3});var nn=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};function Xe(e){const{prefixCls:t,icon:o,okText:n,cancelText:r,confirmPrefixCls:l,type:i,okCancel:u,footer:c,locale:g}=e,d=nn(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);if(process.env.NODE_ENV!=="production"){const $=a.devUseWarning("Modal");process.env.NODE_ENV!=="production"&&$(!(typeof o=="string"&&o.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${o}\` at https://ant.design/components/icon`)}let m=o;if(!o&&o!==null)switch(i){case"info":m=s.createElement(a.RefIcon$4,null);break;case"success":m=s.createElement(a.RefIcon$3,null);break;case"error":m=s.createElement(a.RefIcon$2,null);break;default:m=s.createElement(a.RefIcon$1,null)}const f=u??i==="confirm",v=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[x]=a.useLocale("Modal"),C=g||x,p=n||(f?C==null?void 0:C.okText:C==null?void 0:C.justOkText),y=r||(C==null?void 0:C.cancelText),h=Object.assign({autoFocusButton:v,cancelTextLocale:y,okTextLocale:p,mergedOkCancel:f},d),S=s.useMemo(()=>h,a._toConsumableArray(Object.values(h))),N=s.createElement(s.Fragment,null,s.createElement(xe,null),s.createElement(Se,null)),E=e.title!==void 0&&e.title!==null,O=`${l}-body`;return s.createElement("div",{className:`${l}-body-wrapper`},s.createElement("div",{className:a.classNames(O,{[`${O}-has-title`]:E})},m,s.createElement("div",{className:`${l}-paragraph`},E&&s.createElement("span",{className:`${l}-title`},e.title),s.createElement("div",{className:`${l}-content`},e.content))),c===void 0||typeof c=="function"?s.createElement(Le,{value:S},s.createElement("div",{className:`${l}-btns`},typeof c=="function"?c(N,{OkBtn:Se,CancelBtn:xe}):N)):c,s.createElement(tn,{prefixCls:t}))}const Ue=e=>{const{close:t,zIndex:o,maskStyle:n,direction:r,prefixCls:l,wrapClassName:i,rootPrefixCls:u,bodyStyle:c,closable:g=!1,onConfirm:d,styles:m}=e;if(process.env.NODE_ENV!=="production"){const N=a.devUseWarning("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(E=>{let[O,$]=E;N.deprecated(!(O in e),O,$)})}const f=`${l}-confirm`,v=e.width||416,x=e.style||{},C=e.mask===void 0?!0:e.mask,p=e.maskClosable===void 0?!1:e.maskClosable,y=a.classNames(f,`${f}-${e.type}`,{[`${f}-rtl`]:r==="rtl"},e.className),[,h]=a.useToken(),S=s.useMemo(()=>o!==void 0?o:h.zIndexPopupBase+a.CONTAINER_MAX_OFFSET,[o,h]);return s.createElement(Ge,Object.assign({},e,{className:y,wrapClassName:a.classNames({[`${f}-centered`]:!!e.centered},i),onCancel:()=>{t==null||t({triggerCancel:!0}),d==null||d(!1)},title:"",footer:null,transitionName:a.getTransitionName(u||"","zoom",e.transitionName),maskTransitionName:a.getTransitionName(u||"","fade",e.maskTransitionName),mask:C,maskClosable:p,style:x,styles:Object.assign({body:c,mask:n},m),width:v,zIndex:S,closable:g}),s.createElement(Xe,Object.assign({},e,{confirmPrefixCls:f})))},ve=e=>{const{rootPrefixCls:t,iconPrefixCls:o,direction:n,theme:r}=e;return s.createElement(a.ConfigProvider,{prefixCls:t,iconPrefixCls:o,direction:n,theme:r},s.createElement(Ue,Object.assign({},e)))};process.env.NODE_ENV!=="production"&&(Ue.displayName="ConfirmDialog",ve.displayName="ConfirmDialogWrapper");const U=[];let Ke="";function Qe(){return Ke}const on=e=>{var t,o;const{prefixCls:n,getContainer:r,direction:l}=e,i=a.getConfirmLocale(),u=b.useContext(a.ConfigContext),c=Qe()||u.getPrefixCls(),g=n||`${c}-modal`;let d=r;return d===!1&&(d=void 0,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&a.warning$1(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),b.createElement(ve,Object.assign({},e,{rootPrefixCls:c,prefixCls:g,iconPrefixCls:u.iconPrefixCls,theme:u.theme,direction:l??u.direction,locale:(o=(t=u.locale)===null||t===void 0?void 0:t.Modal)!==null&&o!==void 0?o:i,getContainer:d}))};function te(e){const t=a.globalConfig();process.env.NODE_ENV!=="production"&&!t.holderRender&&a.warnContext("Modal");const o=document.createDocumentFragment();let n=Object.assign(Object.assign({},e),{close:c,open:!0}),r,l;function i(){for(var d,m=arguments.length,f=new Array(m),v=0;v<m;v++)f[v]=arguments[v];if(f.some(p=>p==null?void 0:p.triggerCancel)){var C;(d=e.onCancel)===null||d===void 0||(C=d).call.apply(C,[e,()=>{}].concat(a._toConsumableArray(f.slice(1))))}for(let p=0;p<U.length;p++)if(U[p]===c){U.splice(p,1);break}l()}function u(d){clearTimeout(r),r=setTimeout(()=>{const m=t.getPrefixCls(void 0,Qe()),f=t.getIconPrefixCls(),v=t.getTheme(),x=b.createElement(on,Object.assign({},d));l=a.getReactRender()(b.createElement(a.ConfigProvider,{prefixCls:m,iconPrefixCls:f,theme:v},t.holderRender?t.holderRender(x):x),o)})}function c(){for(var d=arguments.length,m=new Array(d),f=0;f<d;f++)m[f]=arguments[f];n=Object.assign(Object.assign({},n),{open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),i.apply(this,m)}}),n.visible&&delete n.visible,u(n)}function g(d){typeof d=="function"?n=d(n):n=Object.assign(Object.assign({},n),d),u(n)}return u(n),U.push(c),{destroy:c,update:g}}function Ze(e){return Object.assign(Object.assign({},e),{type:"warning"})}function Ye(e){return Object.assign(Object.assign({},e),{type:"info"})}function Je(e){return Object.assign(Object.assign({},e),{type:"success"})}function et(e){return Object.assign(Object.assign({},e),{type:"error"})}function tt(e){return Object.assign(Object.assign({},e),{type:"confirm"})}function an(e){let{rootPrefixCls:t}=e;process.env.NODE_ENV!=="production"&&a.warning$1(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),Ke=t}var rn=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};const ln=e=>{const{prefixCls:t,className:o,closeIcon:n,closable:r,type:l,title:i,children:u,footer:c}=e,g=rn(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:d}=s.useContext(a.ConfigContext),m=d(),f=t||d("modal"),v=a.useCSSVarCls(m),[x,C,p]=He(f,v),y=`${f}-confirm`;let h={};return l?h={closable:r??!1,title:"",footer:"",children:s.createElement(Xe,Object.assign({},e,{prefixCls:f,confirmPrefixCls:y,rootPrefixCls:m,content:u}))}:h={closable:r??!0,title:i,footer:c!==null&&s.createElement(qe,Object.assign({},e)),children:u},x(s.createElement(be,Object.assign({prefixCls:f,className:a.classNames(C,`${f}-pure-panel`,l&&y,l&&`${y}-${l}`,o,p,v)},g,{closeIcon:Ve(f,n),closable:r},h)))},sn=a.withPureRenderTheme(ln);function cn(){const[e,t]=s.useState([]),o=s.useCallback(n=>(t(r=>[].concat(a._toConsumableArray(r),[n])),()=>{t(r=>r.filter(l=>l!==n))}),[]);return[e,o]}var dn=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};const un=(e,t)=>{var o,{afterClose:n,config:r}=e,l=dn(e,["afterClose","config"]);const[i,u]=s.useState(!0),[c,g]=s.useState(r),{direction:d,getPrefixCls:m}=s.useContext(a.ConfigContext),f=m("modal"),v=m(),x=()=>{var h;n(),(h=c.afterClose)===null||h===void 0||h.call(c)},C=function(){var h;u(!1);for(var S=arguments.length,N=new Array(S),E=0;E<S;E++)N[E]=arguments[E];if(N.some(P=>P==null?void 0:P.triggerCancel)){var $;(h=c.onCancel)===null||h===void 0||($=h).call.apply($,[c,()=>{}].concat(a._toConsumableArray(N.slice(1))))}};s.useImperativeHandle(t,()=>({destroy:C,update:h=>{g(S=>Object.assign(Object.assign({},S),h))}}));const p=(o=c.okCancel)!==null&&o!==void 0?o:c.type==="confirm",[y]=a.useLocale("Modal",a.localeValues.Modal);return s.createElement(ve,Object.assign({prefixCls:f,rootPrefixCls:v},c,{close:C,open:i,afterClose:x,okText:c.okText||(p?y==null?void 0:y.okText:y==null?void 0:y.justOkText),direction:c.direction||d,cancelText:c.cancelText||(y==null?void 0:y.cancelText)},l))},mn=s.forwardRef(un);let Me=0;const fn=s.memo(s.forwardRef((e,t)=>{const[o,n]=cn();return s.useImperativeHandle(t,()=>({patchElement:n}),[]),s.createElement(s.Fragment,null,o)}));function gn(){const e=s.useRef(null),[t,o]=s.useState([]);s.useEffect(()=>{t.length&&(a._toConsumableArray(t).forEach(i=>{i()}),o([]))},[t]);const n=s.useCallback(l=>function(u){var c;Me+=1;const g=s.createRef();let d;const m=new Promise(p=>{d=p});let f=!1,v;const x=s.createElement(mn,{key:`modal-${Me}`,config:l(u),ref:g,afterClose:()=>{v==null||v()},isSilent:()=>f,onConfirm:p=>{d(p)}});return v=(c=e.current)===null||c===void 0?void 0:c.patchElement(x),v&&U.push(v),{destroy:()=>{function p(){var y;(y=g.current)===null||y===void 0||y.destroy()}g.current?p():o(y=>[].concat(a._toConsumableArray(y),[p]))},update:p=>{function y(){var h;(h=g.current)===null||h===void 0||h.update(p)}g.current?y():o(h=>[].concat(a._toConsumableArray(h),[y]))},then:p=>(f=!0,m.then(p))}},[]);return[s.useMemo(()=>({info:n(Ye),success:n(Je),error:n(et),warning:n(Ze),confirm:n(tt)}),[]),s.createElement(fn,{key:"modal-holder",ref:e})]}function nt(e){return te(Ze(e))}const F=Ge;F.useModal=gn;F.info=function(t){return te(Ye(t))};F.success=function(t){return te(Je(t))};F.error=function(t){return te(et(t))};F.warning=nt;F.warn=nt;F.confirm=function(t){return te(tt(t))};F.destroyAll=function(){for(;U.length;){const t=U.pop();t&&t()}};F.config=an;F._InternalPanelDoNotUseOrYouWillBeFired=sn;process.env.NODE_ENV!=="production"&&(F.displayName="Modal");var Cn=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};const pn=s.forwardRef((e,t)=>{const{prefixCls:o,style:n,className:r,checked:l,onChange:i,onClick:u}=e,c=Cn(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:g,tag:d}=s.useContext(a.ConfigContext),m=y=>{i==null||i(!l),u==null||u(y)},f=g("tag",o),[v,x,C]=ze(f),p=a.classNames(f,`${f}-checkable`,{[`${f}-checkable-checked`]:l},d==null?void 0:d.className,r,x,C);return v(s.createElement("span",Object.assign({},c,{ref:t,style:Object.assign(Object.assign({},n),d==null?void 0:d.style),className:p,onClick:m})))}),bn=e=>a.genPresetColor(e,(t,o)=>{let{textColor:n,lightBorderColor:r,lightColor:l,darkColor:i}=o;return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:l,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),vn=a.genSubStyleComponent(["Tag","preset"],e=>{const t=Ce(e);return bn(t)},pe);function hn(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const ne=(e,t,o)=>{const n=hn(o);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${o}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},yn=a.genSubStyleComponent(["Tag","status"],e=>{const t=Ce(e);return[ne(t,"success","Success"),ne(t,"processing","Info"),ne(t,"error","Error"),ne(t,"warning","Warning")]},pe);var $n=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};const xn=s.forwardRef((e,t)=>{const{prefixCls:o,className:n,rootClassName:r,style:l,children:i,icon:u,color:c,onClose:g,bordered:d=!0,visible:m}=e,f=$n(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:v,direction:x,tag:C}=s.useContext(a.ConfigContext),[p,y]=s.useState(!0),h=a.omit(f,["closeIcon","closable"]);process.env.NODE_ENV!=="production"&&a.devUseWarning("Tag").deprecated(!("visible"in e),"visible","visible && <Tag />"),s.useEffect(()=>{m!==void 0&&y(m)},[m]);const S=a.isPresetColor(c),N=a.isPresetStatusColor(c),E=S||N,O=Object.assign(Object.assign({backgroundColor:c&&!E?c:void 0},C==null?void 0:C.style),l),$=v("tag",o),[P,j,H]=ze($),B=a.classNames($,C==null?void 0:C.className,{[`${$}-${c}`]:E,[`${$}-has-color`]:c&&!E,[`${$}-hidden`]:!p,[`${$}-rtl`]:x==="rtl",[`${$}-borderless`]:!d},n,r,j,H),_=I=>{I.stopPropagation(),g==null||g(I),!I.defaultPrevented&&y(!1)},[,V]=We(oe(e),oe(C),{closable:!1,closeIconRender:I=>{const X=s.createElement("span",{className:`${$}-close-icon`,onClick:_},I);return a.replaceElement(I,X,M=>({onClick:q=>{var R;(R=M==null?void 0:M.onClick)===null||R===void 0||R.call(M,q),_(q)},className:a.classNames(M==null?void 0:M.className,`${$}-close-icon`)}))}}),A=typeof f.onClick=="function"||i&&i.type==="a",z=u||null,W=z?s.createElement(s.Fragment,null,z,i&&s.createElement("span",null,i)):i,L=s.createElement("span",Object.assign({},h,{ref:t,className:B,style:O}),W,V,S&&s.createElement(vn,{key:"preset",prefixCls:$}),N&&s.createElement(yn,{key:"status",prefixCls:$}));return P(A?s.createElement(a.Wave,{component:"Tag"},L):L)}),he=xn;process.env.NODE_ENV!=="production"&&(he.displayName="Tag");he.CheckableTag=pn;exports.Modal=F;exports.Tag=he;