zmdms-webui 0.0.13 → 0.0.14

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.
@@ -20,12 +20,13 @@ interface IConfirmPreResult {
20
20
  confirmMsg?: string;
21
21
  confirmOkText?: string;
22
22
  }
23
- interface IModalProps extends ModalProps {
23
+ interface IModalProps extends Omit<ModalProps, "onOk"> {
24
24
  defaultOpen?: boolean;
25
25
  defaultTitle?: string;
26
26
  defaultConfirmMsg?: string;
27
27
  defaultConfirmOkText?: string;
28
28
  defaultType?: string;
29
+ onOk?: (type?: string) => Promise<any>;
29
30
  confirmPreHandle?: (type?: string) => IConfirmPreResult;
30
31
  confirmOnOk?: (type?: string) => Promise<any>;
31
32
  }
@@ -1,21 +1,80 @@
1
- import { __rest, __assign } from '../_virtual/_tslib.js';
1
+ import { __rest, __awaiter, __assign, __generator } from '../_virtual/_tslib.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { forwardRef, useState, useCallback, useImperativeHandle } from 'react';
4
4
  import { Modal as Modal$1 } from 'antd';
5
5
  import classNames from '../node_modules/classnames/index.js';
6
+ import { setCancelBtnProps } from './utils.js';
6
7
 
7
8
  var Modal = function (_a, ref) {
8
- var className = _a.className, defaultOpen = _a.defaultOpen, defaultTitle = _a.defaultTitle, defaultConfirmMsg = _a.defaultConfirmMsg, defaultConfirmOkText = _a.defaultConfirmOkText, defaultType = _a.defaultType, confirmPreHandle = _a.confirmPreHandle, confirmOnOk = _a.confirmOnOk, resetProps = __rest(_a, ["className", "defaultOpen", "defaultTitle", "defaultConfirmMsg", "defaultConfirmOkText", "defaultType", "confirmPreHandle", "confirmOnOk"]);
9
+ var className = _a.className, defaultOpen = _a.defaultOpen, defaultTitle = _a.defaultTitle, defaultConfirmMsg = _a.defaultConfirmMsg, defaultConfirmOkText = _a.defaultConfirmOkText, defaultType = _a.defaultType, confirmPreHandle = _a.confirmPreHandle, confirmOnOk = _a.confirmOnOk, onOk = _a.onOk, footer = _a.footer, resetProps = __rest(_a, ["className", "defaultOpen", "defaultTitle", "defaultConfirmMsg", "defaultConfirmOkText", "defaultType", "confirmPreHandle", "confirmOnOk", "onOk", "footer"]);
9
10
  var classes = classNames("ztxk-modal", className);
11
+ // 模态框基本属性
10
12
  var _b = useState(defaultOpen), open = _b[0], setOpen = _b[1];
11
13
  var _c = useState(defaultTitle), title = _c[0], setTitle = _c[1];
12
- var _d = useState(false), isConfirm = _d[0], setIsConfirm = _d[1];
13
- var _e = useState(defaultConfirmMsg), confirmMsg = _e[0], setConfirmMsg = _e[1];
14
- var _f = useState(defaultConfirmOkText), confirmOkText = _f[0], setConfirmOkText = _f[1];
15
- var _g = useState(defaultType), type = _g[0], setType = _g[1];
14
+ var _d = useState(), loading = _d[0], setLoading = _d[1];
15
+ // 二次确认框相关配置
16
+ var _e = useState(false), isConfirm = _e[0], setIsConfirm = _e[1];
17
+ var _f = useState(defaultConfirmMsg), confirmMsg = _f[0], setConfirmMsg = _f[1];
18
+ var _g = useState(defaultConfirmOkText), confirmOkText = _g[0], setConfirmOkText = _g[1];
19
+ // 模态框类型
20
+ var _h = useState(defaultType), type = _h[0], setType = _h[1];
16
21
  var close = useCallback(function () {
17
22
  setOpen(false);
18
23
  }, []);
24
+ // 确认事件
25
+ var onOkHandle = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
26
+ var options, modalConfirm_1;
27
+ return __generator(this, function (_a) {
28
+ if (isConfirm) {
29
+ options = confirmPreHandle && confirmPreHandle(type);
30
+ modalConfirm_1 = Modal$1.confirm({
31
+ title: (options === null || options === void 0 ? void 0 : options.confirmMsg) ? options.confirmMsg : confirmMsg,
32
+ okText: (options === null || options === void 0 ? void 0 : options.confirmOkText)
33
+ ? options.confirmOkText
34
+ : confirmOkText
35
+ ? confirmOkText
36
+ : "确认保存",
37
+ keyboard: false,
38
+ maskClosable: false,
39
+ onOk: confirmOnOk
40
+ ? function () {
41
+ setCancelBtnProps(modalConfirm_1, { loading: true });
42
+ return confirmOnOk(type)
43
+ .then(function () {
44
+ setCancelBtnProps(modalConfirm_1, { loading: false });
45
+ setOpen(false);
46
+ })
47
+ .catch(function (err) {
48
+ setCancelBtnProps(modalConfirm_1, { loading: false });
49
+ });
50
+ }
51
+ : undefined,
52
+ });
53
+ }
54
+ else {
55
+ if (onOk) {
56
+ setLoading(true);
57
+ onOk(type)
58
+ .then(function () {
59
+ setLoading(false);
60
+ setOpen(false);
61
+ })
62
+ .catch(function (err) {
63
+ setLoading(false);
64
+ });
65
+ }
66
+ }
67
+ return [2 /*return*/];
68
+ });
69
+ }); }, [
70
+ isConfirm,
71
+ confirmPreHandle,
72
+ confirmMsg,
73
+ confirmOkText,
74
+ confirmOnOk,
75
+ type,
76
+ onOk,
77
+ ]);
19
78
  useImperativeHandle(ref, function () {
20
79
  return {
21
80
  open: function (options) {
@@ -45,34 +104,7 @@ var Modal = function (_a, ref) {
45
104
  setConfirmMsg: setConfirmOkText,
46
105
  };
47
106
  });
48
- var onOkHandle = useCallback(function () {
49
- if (isConfirm) {
50
- var options = confirmPreHandle && confirmPreHandle(type);
51
- Modal$1.confirm({
52
- title: (options === null || options === void 0 ? void 0 : options.confirmMsg) ? options.confirmMsg : confirmMsg,
53
- okText: (options === null || options === void 0 ? void 0 : options.confirmOkText)
54
- ? options.confirmOkText
55
- : confirmOkText
56
- ? confirmOkText
57
- : "确认保存",
58
- onOk: confirmOnOk
59
- ? function () {
60
- return confirmOnOk(type).then(function () {
61
- setOpen(false);
62
- });
63
- }
64
- : undefined,
65
- });
66
- }
67
- }, [
68
- isConfirm,
69
- confirmPreHandle,
70
- confirmMsg,
71
- confirmOkText,
72
- confirmOnOk,
73
- type,
74
- ]);
75
- return (jsx(Modal$1, __assign({ open: open, onCancel: close, className: classes, okText: "\u4FDD\u5B58", onOk: onOkHandle, width: "70%", title: title }, resetProps)));
107
+ return (jsx(Modal$1, __assign({ open: open, onCancel: close, className: classes, okText: "\u4FDD\u5B58", onOk: footer ? undefined : onOkHandle, width: "70%", title: title, keyboard: false, maskClosable: false, confirmLoading: loading, cancelButtonProps: { loading: loading }, footer: footer }, resetProps)));
76
108
  };
77
109
  var ModalComponent = forwardRef(Modal);
78
110
  ModalComponent.displayName = "ZTXK_WEBUI_ModalComponent";
@@ -0,0 +1,7 @@
1
+ import { __assign } from '../_virtual/_tslib.js';
2
+
3
+ function setCancelBtnProps(modal, props) {
4
+ modal.update(function (prevConfig) { return (__assign(__assign({}, prevConfig), { cancelButtonProps: __assign(__assign({}, (prevConfig.cancelButtonProps || {})), props) })); });
5
+ }
6
+
7
+ export { setCancelBtnProps };
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime"),require("antd"),require("react"),require("dayjs"),require("dayjs/plugin/weekday"),require("dayjs/plugin/localeData"),require("dayjs/plugin/weekOfYear"),require("dayjs/plugin/weekYear"),require("dayjs/plugin/advancedFormat"),require("dayjs/plugin/customParseFormat"),require("antd/es/date-picker/generatePicker"),require("antd/es/calendar/generateCalendar"),require("zmdms-utils"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","antd","react","dayjs","dayjs/plugin/weekday","dayjs/plugin/localeData","dayjs/plugin/weekOfYear","dayjs/plugin/weekYear","dayjs/plugin/advancedFormat","dayjs/plugin/customParseFormat","antd/es/date-picker/generatePicker","antd/es/calendar/generateCalendar","zmdms-utils","react-router-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ZTUI={},e.jsxRuntime,e.antd,e.React,e.dayjs,e.weekday,e.localeData,e.weekOfYear,e.weekYear,e.advancedFormat,e.customParseFormat,e.generatePicker,e.generateCalendar,e.zmdmsUtils,e.ReactRouterDom)}(this,(function(e,t,r,n,i,o,a,s,c,u,l,d,f,g,h){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var m=p(n),v=function(){return v=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v.apply(this,arguments)};function y(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function b(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function x(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function S(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function w(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O={exports:{}};
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime"),require("antd"),require("react"),require("dayjs"),require("dayjs/plugin/weekday"),require("dayjs/plugin/localeData"),require("dayjs/plugin/weekOfYear"),require("dayjs/plugin/weekYear"),require("dayjs/plugin/advancedFormat"),require("dayjs/plugin/customParseFormat"),require("antd/es/date-picker/generatePicker"),require("antd/es/calendar/generateCalendar"),require("zmdms-utils"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","antd","react","dayjs","dayjs/plugin/weekday","dayjs/plugin/localeData","dayjs/plugin/weekOfYear","dayjs/plugin/weekYear","dayjs/plugin/advancedFormat","dayjs/plugin/customParseFormat","antd/es/date-picker/generatePicker","antd/es/calendar/generateCalendar","zmdms-utils","react-router-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ZTUI={},e.jsxRuntime,e.antd,e.React,e.dayjs,e.weekday,e.localeData,e.weekOfYear,e.weekYear,e.advancedFormat,e.customParseFormat,e.generatePicker,e.generateCalendar,e.zmdmsUtils,e.ReactRouterDom)}(this,(function(e,t,n,r,i,o,a,s,c,u,l,d,f,g,h){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var m=p(r),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v.apply(this,arguments)};function y(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function b(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function x(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function S(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function w(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O={exports:{}};
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
- */!function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n<arguments.length;n++){var i=arguments[n];if(i){var o=typeof i;if("string"===o||"number"===o)e.push(i);else if(Array.isArray(i)){if(i.length){var a=r.apply(null,i);a&&e.push(a)}}else if("object"===o){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){e.push(i.toString());continue}for(var s in i)t.call(i,s)&&i[s]&&e.push(s)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(O);var C=w(O.exports),D=function(e){var n,i=e.type,o=e.className,a=e.disabled,s=e.size,c=e.danger,u=e.onClick,l=y(e,["type","className","disabled","size","danger","onClick"]),d=C("zt-btn",o,((n={})["zt-btn-".concat(i)]=i,n["zt-btn-disabled"]=a,n["zt-btn-".concat(s)]=s,n["zt-btn-dangerous"]=c,n)),f={canClick:!0};return t.jsx(r.Button,v({className:d,type:i,disabled:a,size:s,danger:c,onClick:function(e){f.canClick&&u&&u(e,f)}},l))};D.displayName="ZTXK_WEBUI_Button";var T=n.memo(n.forwardRef((function(e,n){return t.jsx(r.Input,v({},e,{ref:n}))})));T.displayName="ZTXK_WEBUI_Input",T.Group=r.Input.Group,T.Search=r.Input.Search,T.TextArea=r.Input.TextArea,T.Password=r.Input.Password;function I(e,t,r){return e&&!isNaN(Number(e))&&!t.current&&r?Number(e).toFixed(r):e}function E(e,t){if(!e)return e;var r=e.lastIndexOf("."),n=e,i="";return-1!==r&&(n=e.substring(0,r),i=e.substring(r+1)),t&&(i=i.length<t?i:i.substring(0,t)),i?n+"."+i:n}var k=function(e,i){var o=e.formatterType,a=(e.currencySymbol,e.formatter),s=e.parser,c=e.precision,u=e.onBlur,l=e.onFocus,d=y(e,["formatterType","currencySymbol","formatter","parser","precision","onBlur","onFocus"]),f=n.useRef(!1),g=function(e,t,r,n){return"currency"===e?{formatter:function(e){return function(e){if(null!=e){var t=e.toString(),r="",n="";t.startsWith("-")&&(r="-",t=t.slice(1));var i=t.indexOf(".");-1!==i?(e=t.slice(0,i),n=t.slice(i)):e=t;for(var o="",a=e.toString(),s=a.length,c=s-1;c>=0;c--)o=(s-c)%3==0?0===c?a[c]+o:","+a[c]+o:a[c]+o;return r+o+n}return e}(I(e,r,n))},parser:function(e){return E(e.replace(/(,*)/g,""),n)},precision:3}:"percent"===e?{formatter:function(e){var t=I(e,r,n);return"".concat(t,"%")},parser:function(e){return e?e.replace("%",""):Number(e)},precision:2}:"thousands"===e?{formatter:function(e){var t=I(e,r,n);return"".concat(t,"‰")},parser:function(e){return e?e.replace("‰",""):Number(e)},precision:2}:{formatter:function(e){return I(e,r,n)},parser:function(e){return E(e,n)},precision:n}}(o,0,f,c),h=g.formatter,p=g.parser,m=g.precision;return t.jsx(r.InputNumber,v({formatter:a||h,parser:s||p,precision:null!=c?c:m,onBlur:function(e){f.current=!1,u&&u(e)},onFocus:function(e){f.current=!0,l&&l(e)}},d,{ref:i}))};k.displayName="ZTXK_WEBUI_InputNumber";var j=n.memo(n.forwardRef(k)),N={};function P(e,t){}function A(e,t){}function M(e,t,r){t||N[r]||(e(!1,r),N[r]=!0)}function R(e,t){M(P,e,t)}function _(e,t){M(A,e,t)}R.preMessage=function(e){},R.resetWarned=function(){N={}},R.noteOnce=_,i.extend(l),i.extend(u),i.extend(o),i.extend(a),i.extend(s),i.extend(c),i.extend((function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=(e||"").replace("Wo","wo");return n.bind(this)(t)}}));var L={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},z=function(e){return L[e]||e.split("_")[0]},F=function(){_(!1,"Not match any format. Please help to fire a issue about this.")},B={getNow:function(){return i()},getFixedDate:function(e){return i(e,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(e){return e.endOf("month")},getWeekDay:function(e){var t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return e.year()},getMonth:function(e){return e.month()},getDate:function(e){return e.date()},getHour:function(e){return e.hour()},getMinute:function(e){return e.minute()},getSecond:function(e){return e.second()},addYear:function(e,t){return e.add(t,"year")},addMonth:function(e,t){return e.add(t,"month")},addDate:function(e,t){return e.add(t,"day")},setYear:function(e,t){return e.year(t)},setMonth:function(e,t){return e.month(t)},setDate:function(e,t){return e.date(t)},setHour:function(e,t){return e.hour(t)},setMinute:function(e,t){return e.minute(t)},setSecond:function(e,t){return e.second(t)},isAfter:function(e,t){return e.isAfter(t)},isValidate:function(e){return e.isValid()},locale:{getWeekFirstDay:function(e){return i().locale(z(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return t.locale(z(e)).weekday(0)},getWeek:function(e,t){return t.locale(z(e)).week()},getShortWeekDays:function(e){return i().locale(z(e)).localeData().weekdaysMin()},getShortMonths:function(e){return i().locale(z(e)).localeData().monthsShort()},format:function(e,t,r){return t.locale(z(e)).format(r)},parse:function(e,t,r){for(var n=z(e),o=0;o<r.length;o+=1){var a=r[o],s=t;if(a.includes("wo")||a.includes("Wo")){for(var c=s.split("-")[0],u=s.split("-")[1],l=i(c,"YYYY").startOf("year").locale(n),d=0;d<=52;d+=1){var f=l.add(d,"week");if(f.format("Wo")===u)return f}return F(),null}var g=i(s,a).locale(n);if(g.isValid())return g}return t&&F(),null}}},H=d(B),U=f(B),q=n.forwardRef((function(e,r){return t.jsx(H,v({},e,{picker:"time",mode:void 0,ref:r}))}));q.displayName="TimePicker";var W=n.createContext({locale:"zh-cn"});var $=r.Form.Item,K=function(e){var n=e.loginLogo,i=e.loginBg,o=e.onFinishHandle,a=e.loading,s=r.Form.useForm()[0];return t.jsx("div",v({className:"login-wrap",style:{backgroundImage:"url(".concat(i,")")}},{children:t.jsxs(r.Form,v({form:s,requiredMark:!1,layout:"vertical",className:"login-form",onFinish:function(e){o&&o(e)}},{children:[t.jsx("div",v({className:"login-logo"},{children:t.jsx("img",{src:n,title:"浙商中拓ERP",alt:"zszt_logo"})})),t.jsx($,v({label:"请输入您的账号",name:"username",rules:[{required:!0,message:"请输入您的账号"}]},{children:t.jsx(T,{size:"large",prefix:t.jsx(zt,{type:"icon-yonghu",style:{fontSize:"14px",color:"rgba(0,0,0,.65)"}})})})),t.jsx($,v({label:"请输入您的密码",name:"password",rules:[{required:!0,message:"请输入您的密码"}]},{children:t.jsx(T.Password,{size:"large",prefix:t.jsx(zt,{type:"icon-mima",style:{fontSize:"14px",color:"rgba(0,0,0,.65)"}})})})),t.jsx($,{children:t.jsx(D,v({htmlType:"submit",block:!0,className:"form__item--button",loading:a},{children:"登录"}))}),t.jsxs("div",v({className:"form__item--remember"},{children:[t.jsx($,v({name:"remember",valuePropName:"checked"},{children:t.jsx(r.Checkbox,{children:"记住密码"})})),t.jsx("div",v({className:"form__item--remember-forget"},{children:"忘记密码"}))]}))]}))}))};K.displayName="ZTXK_WEBUI_Login";var V=n.createContext({});function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function X(e){var t=function(e,t){if("object"!==Y(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Y(t)?t:String(t)}function G(e,t,r){return(t=X(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){G(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function re(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function ne(e){return e<=1?"".concat(100*Number(e),"%"):e}function ie(e){return 1===e.length?"0"+e:String(e)}function oe(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*r*(t-e):r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function ae(e){return se(e)/255}function se(e){return parseInt(e,16)}var ce={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ue(e){var t,r,n,i={r:0,g:0,b:0},o=1,a=null,s=null,c=null,u=!1,l=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(ce[e])e=ce[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var r=ge.rgb.exec(e);if(r)return{r:r[1],g:r[2],b:r[3]};if(r=ge.rgba.exec(e),r)return{r:r[1],g:r[2],b:r[3],a:r[4]};if(r=ge.hsl.exec(e),r)return{h:r[1],s:r[2],l:r[3]};if(r=ge.hsla.exec(e),r)return{h:r[1],s:r[2],l:r[3],a:r[4]};if(r=ge.hsv.exec(e),r)return{h:r[1],s:r[2],v:r[3]};if(r=ge.hsva.exec(e),r)return{h:r[1],s:r[2],v:r[3],a:r[4]};if(r=ge.hex8.exec(e),r)return{r:se(r[1]),g:se(r[2]),b:se(r[3]),a:ae(r[4]),format:t?"name":"hex8"};if(r=ge.hex6.exec(e),r)return{r:se(r[1]),g:se(r[2]),b:se(r[3]),format:t?"name":"hex"};if(r=ge.hex4.exec(e),r)return{r:se(r[1]+r[1]),g:se(r[2]+r[2]),b:se(r[3]+r[3]),a:ae(r[4]+r[4]),format:t?"name":"hex8"};if(r=ge.hex3.exec(e),r)return{r:se(r[1]+r[1]),g:se(r[2]+r[2]),b:se(r[3]+r[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(he(e.r)&&he(e.g)&&he(e.b)?(t=e.r,r=e.g,n=e.b,i={r:255*re(t,255),g:255*re(r,255),b:255*re(n,255)},u=!0,l="%"===String(e.r).substr(-1)?"prgb":"rgb"):he(e.h)&&he(e.s)&&he(e.v)?(a=ne(e.s),s=ne(e.v),i=function(e,t,r){e=6*re(e,360),t=re(t,100),r=re(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),s=r*(1-(1-i)*t),c=n%6;return{r:255*[r,a,o,o,s,r][c],g:255*[s,r,r,a,o,o][c],b:255*[o,o,s,r,r,a][c]}}(e.h,a,s),u=!0,l="hsv"):he(e.h)&&he(e.s)&&he(e.l)&&(a=ne(e.s),c=ne(e.l),i=function(e,t,r){var n,i,o;if(e=re(e,360),t=re(t,100),r=re(r,100),0===t)i=r,o=r,n=r;else{var a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;n=oe(s,a,e+1/3),i=oe(s,a,e),o=oe(s,a,e-1/3)}return{r:255*n,g:255*i,b:255*o}}(e.h,a,c),u=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(o),{ok:u,format:e.format||l,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o}}var le="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),de="[\\s|\\(]+(".concat(le,")[,|\\s]+(").concat(le,")[,|\\s]+(").concat(le,")\\s*\\)?"),fe="[\\s|\\(]+(".concat(le,")[,|\\s]+(").concat(le,")[,|\\s]+(").concat(le,")[,|\\s]+(").concat(le,")\\s*\\)?"),ge={CSS_UNIT:new RegExp(le),rgb:new RegExp("rgb"+de),rgba:new RegExp("rgba"+fe),hsl:new RegExp("hsl"+de),hsla:new RegExp("hsla"+fe),hsv:new RegExp("hsv"+de),hsva:new RegExp("hsva"+fe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function he(e){return Boolean(ge.CSS_UNIT.exec(String(e)))}var pe=2,me=.16,ve=.05,ye=.05,be=.15,xe=5,Se=4,we=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Oe(e){var t=function(e,t,r){e=re(e,255),t=re(t,255),r=re(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,a=n,s=n-i,c=0===n?0:s/n;if(n===i)o=0;else{switch(n){case e:o=(t-r)/s+(t<r?6:0);break;case t:o=(r-e)/s+2;break;case r:o=(e-t)/s+4}o/=6}return{h:o,s:c,v:a}}(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function Ce(e){var t=e.r,r=e.g,n=e.b;return"#".concat(function(e,t,r,n){var i=[ie(Math.round(e).toString(16)),ie(Math.round(t).toString(16)),ie(Math.round(r).toString(16))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}(t,r,n,!1))}function De(e,t,r){var n;return(n=Math.round(e.h)>=60&&Math.round(e.h)<=240?r?Math.round(e.h)-pe*t:Math.round(e.h)+pe*t:r?Math.round(e.h)+pe*t:Math.round(e.h)-pe*t)<0?n+=360:n>=360&&(n-=360),n}function Te(e,t,r){return 0===e.h&&0===e.s?e.s:((n=r?e.s-me*t:t===Se?e.s+me:e.s+ve*t)>1&&(n=1),r&&t===xe&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2)));var n}function Ie(e,t,r){var n;return(n=r?e.v+ye*t:e.v-be*t)>1&&(n=1),Number(n.toFixed(2))}function Ee(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],n=ue(e),i=xe;i>0;i-=1){var o=Oe(n),a=Ce(ue({h:De(o,i,!0),s:Te(o,i,!0),v:Ie(o,i,!0)}));r.push(a)}r.push(Ce(n));for(var s=1;s<=Se;s+=1){var c=Oe(n),u=Ce(ue({h:De(c,s),s:Te(c,s),v:Ie(c,s)}));r.push(u)}return"dark"===t.theme?we.map((function(e){var n,i,o,a=e.index,s=e.opacity;return Ce((n=ue(t.backgroundColor||"#141414"),i=ue(r[a]),o=100*s/100,{r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b}))})):r}var ke={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},je={},Ne={};Object.keys(ke).forEach((function(e){je[e]=Ee(ke[e]),je[e].primary=je[e][5],Ne[e]=Ee(ke[e],{theme:"dark",backgroundColor:"#141414"}),Ne[e].primary=Ne[e][5]}));var Pe="data-rc-order",Ae="rc-util-key",Me=new Map;function Re(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):Ae}function _e(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Le(e){return Array.from((Me.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"==typeof window||!window.document||!window.document.createElement)return null;var r=t.csp,n=t.prepend,i=document.createElement("style");i.setAttribute(Pe,function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(n)),null!=r&&r.nonce&&(i.nonce=null==r?void 0:r.nonce),i.innerHTML=e;var o=_e(t),a=o.firstChild;if(n){if("queue"===n){var s=Le(o).filter((function(e){return["prepend","prependQueue"].includes(e.getAttribute(Pe))}));if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function Fe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var r=Me.get(e);if(!r||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}(document,r)){var n=ze("",t),i=n.parentNode;Me.set(e,i),e.removeChild(n)}}(_e(r),r);var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Le(_e(t)).find((function(r){return r.getAttribute(Re(t))===e}))}(t,r);if(n){var i,o,a;if(null!==(i=r.csp)&&void 0!==i&&i.nonce&&n.nonce!==(null===(o=r.csp)||void 0===o?void 0:o.nonce))n.nonce=null===(a=r.csp)||void 0===a?void 0:a.nonce;return n.innerHTML!==e&&(n.innerHTML=e),n}var s=ze(e,r);return s.setAttribute(Re(r),t),s}function Be(e,t){R(e,"[@ant-design/icons] ".concat(t))}function He(e){return"object"===Y(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===Y(e.icon)||"function"==typeof e.icon)}function Ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){var n=e[r];if("class"===r)t.className=n,delete t.class;else t[r]=n;return t}),{})}function qe(e,t,r){return r?n.createElement(e.tag,J(J({key:t},Ue(e.attrs)),r),(e.children||[]).map((function(r,n){return qe(r,"".concat(t,"-").concat(e.tag,"-").concat(n))}))):n.createElement(e.tag,J({key:t},Ue(e.attrs)),(e.children||[]).map((function(r,n){return qe(r,"".concat(t,"-").concat(e.tag,"-").concat(n))})))}function We(e){return Ee(e)[0]}function $e(e){return e?Array.isArray(e)?e:[e]:[]}var Ke={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},Ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",t=n.useContext(V).csp;n.useEffect((function(){Fe(e,"@ant-design-icons",{prepend:!0,csp:t})}),[])},Ye=["icon","className","onClick","style","primaryColor","secondaryColor"],Xe={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var Ge=function(e){var t=e.icon,r=e.className,n=e.onClick,i=e.style,o=e.primaryColor,a=e.secondaryColor,s=te(e,Ye),c=Xe;if(o&&(c={primaryColor:o,secondaryColor:a||We(o)}),Ve(),Be(He(t),"icon should be icon definiton, but got ".concat(t)),!He(t))return null;var u=t;return u&&"function"==typeof u.icon&&(u=J(J({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),qe(u.icon,"svg-".concat(u.name),J({className:r,onClick:n,style:i,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s))};Ge.displayName="IconReact",Ge.getTwoToneColors=function(){return J({},Xe)},Ge.setTwoToneColors=function(e){var t=e.primaryColor,r=e.secondaryColor;Xe.primaryColor=t,Xe.secondaryColor=r||We(t),Xe.calculated=!!r};var Ze=Ge;function Je(e){var t=ee($e(e),2),r=t[0],n=t[1];return Ze.setTwoToneColors({primaryColor:r,secondaryColor:n})}var Qe=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Je("#1890ff");var et=m.forwardRef((function(e,t){var r,n=e.className,i=e.icon,o=e.spin,a=e.rotate,s=e.tabIndex,c=e.onClick,u=e.twoToneColor,l=te(e,Qe),d=m.useContext(V),f=d.prefixCls,g=void 0===f?"anticon":f,h=d.rootClassName,p=C(h,g,(G(r={},"".concat(g,"-").concat(i.name),!!i.name),G(r,"".concat(g,"-spin"),!!o||"loading"===i.name),r),n),v=s;void 0===v&&c&&(v=-1);var y=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,b=ee($e(u),2),x=b[0],S=b[1];return m.createElement("span",J(J({role:"img","aria-label":i.name},l),{},{ref:t,tabIndex:v,onClick:c,className:p}),m.createElement(Ze,{icon:i,primaryColor:x,secondaryColor:S,style:y}))}));et.displayName="AntdIcon",et.getTwoToneColor=function(){var e=Ze.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},et.setTwoToneColor=Je;var tt=et,rt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"},nt=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:rt}))};nt.displayName="ArrowsAltOutlined";var it=m.forwardRef(nt),ot={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},at=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:ot}))};at.displayName="LogoutOutlined";var st=m.forwardRef(at),ct={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"},ut=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:ct}))};ut.displayName="MinusOutlined";var lt=m.forwardRef(ut),dt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},ft=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:dt}))};ft.displayName="MinusSquareOutlined";var gt=m.forwardRef(ft),ht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M952 792H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-632H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-24 500c8.8 0 16-7.2 16-16V380c0-8.8-7.2-16-16-16H416c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h512zM472 436h400v152H472V436zM80 646c0 4.4 3.6 8 8 8h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56zm8-204h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z"}}]},name:"pic-right",theme:"outlined"},pt=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:ht}))};pt.displayName="PicRightOutlined";var mt=m.forwardRef(pt),vt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},yt=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:vt}))};yt.displayName="PlusOutlined";var bt=m.forwardRef(yt),xt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},St=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:xt}))};St.displayName="SettingOutlined";var wt=m.forwardRef(St),Ot={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z"}}]},name:"shrink",theme:"outlined"},Ct=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:Ot}))};Ct.displayName="ShrinkOutlined";var Dt=m.forwardRef(Ct),Tt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"},It=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:Tt}))};It.displayName="UnlockOutlined";var Et=m.forwardRef(It),kt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},jt=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:kt}))};jt.displayName="UserOutlined";var Nt=m.forwardRef(jt),Pt=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],At=m.forwardRef((function(e,t){var r=e.className,n=e.component,i=e.viewBox,o=e.spin,a=e.rotate,s=e.tabIndex,c=e.onClick,u=e.children,l=te(e,Pt);Be(Boolean(n||u),"Should have `component` prop or `children`."),Ve();var d=m.useContext(V),f=d.prefixCls,g=void 0===f?"anticon":f,h=d.rootClassName,p=C(h,g,r),v=C(G({},"".concat(g,"-spin"),!!o)),y=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,b=J(J({},Ke),{},{className:v,style:y,viewBox:i});i||delete b.viewBox;var x=s;return void 0===x&&c&&(x=-1),m.createElement("span",J(J({role:"img"},l),{},{ref:t,tabIndex:x,onClick:c,className:p}),n?m.createElement(n,J({},b),u):u?(Be(Boolean(i)||1===m.Children.count(u)&&m.isValidElement(u)&&"use"===m.Children.only(u).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),m.createElement("svg",J(J({},b),{},{viewBox:i}),u)):null)}));At.displayName="AntdIcon";var Mt=At,Rt=["type","children"],_t=new Set;function Lt(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e[r];if(t=n,Boolean("string"==typeof t&&t.length&&!_t.has(t))){var i=document.createElement("script");i.setAttribute("src",n),i.setAttribute("data-namespace",n),e.length>r+1&&(i.onload=function(){Lt(e,r+1)},i.onerror=function(){Lt(e,r+1)}),_t.add(n),document.body.appendChild(i)}}var zt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,r=e.extraCommonProps,n=void 0===r?{}:r;t&&"undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&(Array.isArray(t)?Lt(t.reverse()):Lt([t]));var i=m.forwardRef((function(e,t){var r=e.type,i=e.children,o=te(e,Rt),a=null;return e.type&&(a=m.createElement("use",{xlinkHref:"#".concat(r)})),i&&(a=i),m.createElement(Mt,J(J(J({},n),o),{},{ref:t}),a)}));return i.displayName="Iconfont",i}({scriptUrl:["//at.alicdn.com/t/c/font_4078313_tg40lf02k9.js"]});const Ft=n.createContext({dragDropManager:void 0});function Bt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ht="function"==typeof Symbol&&Symbol.observable||"@@observable",Ut=function(){return Math.random().toString(36).substring(7).split("").join(".")},qt={INIT:"@@redux/INIT"+Ut(),REPLACE:"@@redux/REPLACE"+Ut(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ut()}};function Wt(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(Bt(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(Bt(1));return r(Wt)(e,t)}if("function"!=typeof e)throw new Error(Bt(2));var i=e,o=t,a=[],s=a,c=!1;function u(){s===a&&(s=a.slice())}function l(){if(c)throw new Error(Bt(3));return o}function d(e){if("function"!=typeof e)throw new Error(Bt(4));if(c)throw new Error(Bt(5));var t=!0;return u(),s.push(e),function(){if(t){if(c)throw new Error(Bt(6));t=!1,u();var r=s.indexOf(e);s.splice(r,1),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(Bt(7));if(void 0===e.type)throw new Error(Bt(8));if(c)throw new Error(Bt(9));try{c=!0,o=i(o,e)}finally{c=!1}for(var t=a=s,r=0;r<t.length;r++){(0,t[r])()}return e}return f({type:qt.INIT}),(n={dispatch:f,subscribe:d,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Bt(10));i=e,f({type:qt.REPLACE})}})[Ht]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Bt(11));function r(){e.next&&e.next(l())}return r(),{unsubscribe:t(r)}}})[Ht]=function(){return this},e},n}function $t(e,t,...r){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;e=new Error(t.replace(/%s/g,(function(){return r[n++]}))),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function Kt(e){return"object"==typeof e}const Vt="dnd-core/INIT_COORDS",Yt="dnd-core/BEGIN_DRAG",Xt="dnd-core/PUBLISH_DRAG_SOURCE",Gt="dnd-core/HOVER",Zt="dnd-core/DROP",Jt="dnd-core/END_DRAG";function Qt(e,t){return{type:Vt,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const er={type:Vt,payload:{clientOffset:null,sourceClientOffset:null}};function tr(e){return function(t=[],r={publishSource:!0}){const{publishSource:n=!0,clientOffset:i,getSourceClientOffset:o}=r,a=e.getMonitor(),s=e.getRegistry();e.dispatch(Qt(i)),function(e,t,r){$t(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){$t(r.getSource(e),"Expected sourceIds to be registered.")}))}(t,a,s);const c=function(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}(t,a);if(null==c)return void e.dispatch(er);let u=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");!function(e){$t("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(o),u=o(c)}e.dispatch(Qt(i,u));const l=s.getSource(c).beginDrag(a,c);if(null==l)return;!function(e){$t(Kt(e),"Item must be an object.")}(l),s.pinSource(c);const d=s.getSourceType(c);return{type:Yt,payload:{itemType:d,item:l,sourceId:c,clientOffset:i||null,sourceClientOffset:u||null,isSourcePublic:!!n}}}}function rr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rr(e,t,r[t])}))}return e}function ir(e){return function(t={}){const r=e.getMonitor(),n=e.getRegistry();!function(e){$t(e.isDragging(),"Cannot call drop while not dragging."),$t(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(r);const i=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(r);i.forEach(((i,o)=>{const a=function(e,t,r,n){const i=r.getTarget(e);let o=i?i.drop(n,e):void 0;(function(e){$t(void 0===e||Kt(e),"Drop result must either be an object or undefined.")})(o),void 0===o&&(o=0===t?{}:n.getDropResult());return o}(i,o,n,r),s={type:Zt,payload:{dropResult:nr({},t,a)}};e.dispatch(s)}))}}function or(e){return function(){const t=e.getMonitor(),r=e.getRegistry();!function(e){$t(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const n=t.getSourceId();if(null!=n){r.getSource(n,!0).endDrag(t,n),r.unpinSource()}return{type:Jt}}}function ar(e,t){return null===t?null===e:Array.isArray(e)?e.some((e=>e===t)):e===t}function sr(e){return function(t,{clientOffset:r}={}){!function(e){$t(Array.isArray(e),"Expected targetIds to be an array.")}(t);const n=t.slice(0),i=e.getMonitor(),o=e.getRegistry();return function(e,t,r){for(let n=e.length-1;n>=0;n--){const i=e[n];ar(t.getTargetType(i),r)||e.splice(n,1)}}(n,o,i.getItemType()),function(e,t,r){$t(t.isDragging(),"Cannot call hover while not dragging."),$t(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const n=e[t];$t(e.lastIndexOf(n)===t,"Expected targetIds to be unique in the passed array.");$t(r.getTarget(n),"Expected targetIds to be registered.")}}(n,i,o),function(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}(n,i,o),{type:Gt,payload:{targetIds:n,clientOffset:r||null}}}}function cr(e){return function(){if(e.getMonitor().isDragging())return{type:Xt}}}class ur{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const r=function(e){return{beginDrag:tr(e),publishDragSource:cr(e),hover:sr(e),drop:ir(e),endDrag:or(e)}}(this);return Object.keys(r).reduce(((n,i)=>{const o=r[i];var a;return n[i]=(a=o,(...r)=>{const n=a.apply(e,r);void 0!==n&&t(n)}),n}),{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function lr(e,t){return{x:e.x-t.x,y:e.y-t.y}}const dr=[],fr=[];dr.__IS_NONE__=!0,fr.__IS_ALL__=!0;class gr{subscribeToStateChange(e,t={}){const{handlerIds:r}=t;$t("function"==typeof e,"listener must be a function."),$t(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe((()=>{const t=this.store.getState(),i=t.stateId;try{const o=i===n||i===n+1&&!function(e,t){return e!==dr&&(e===fr||void 0===t||(r=e,t.filter((e=>r.indexOf(e)>-1))).length>0);var r}(t.dirtyHandlerIds,r);o||e()}finally{n=i}}))}subscribeToOffsetChange(e){$t("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe((()=>{const r=this.store.getState().dragOffset;r!==t&&(t=r,e())}))}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return $t(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if($t(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return ar(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if($t(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:r}=t;if(!this.isDragging())return!1;const n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ar(n,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(e);return r?a===o.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return t&&r&&n?lr((o=n,{x:(i=t).x+o.x,y:i.y+o.y}),r):null;var i,o}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:r}=e;return t&&r?lr(t,r):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const hr="undefined"!=typeof global?global:self,pr=hr.MutationObserver||hr.WebKitMutationObserver;function mr(e){return function(){const t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}const vr="function"==typeof pr?function(e){let t=1;const r=new pr(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}:mr;class yr{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const br=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,r=e.length-this.index;t<r;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=vr(this.flush),this.requestErrorThrow=mr((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},xr=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new yr(this.onError,(e=>t[t.length]=e));return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(br.registerPendingError);const Sr="dnd-core/ADD_SOURCE",wr="dnd-core/ADD_TARGET",Or="dnd-core/REMOVE_SOURCE",Cr="dnd-core/REMOVE_TARGET";function Dr(e,t){t&&Array.isArray(e)?e.forEach((e=>Dr(e,!1))):$t("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Tr;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(Tr||(Tr={}));let Ir=0;function Er(e){const t=(Ir++).toString();switch(e){case Tr.SOURCE:return`S${t}`;case Tr.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function kr(e){switch(e[0]){case"S":return Tr.SOURCE;case"T":return Tr.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function jr(e,t){const r=e.entries();let n=!1;do{const{done:e,value:[,i]}=r.next();if(i===t)return!0;n=!!e}while(!n);return!1}class Nr{addSource(e,t){Dr(e),function(e){$t("function"==typeof e.canDrag,"Expected canDrag to be a function."),$t("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),$t("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const r=this.addHandler(Tr.SOURCE,e,t);return this.store.dispatch(function(e){return{type:Sr,payload:{sourceId:e}}}(r)),r}addTarget(e,t){Dr(e,!0),function(e){$t("function"==typeof e.canDrop,"Expected canDrop to be a function."),$t("function"==typeof e.hover,"Expected hover to be a function."),$t("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const r=this.addHandler(Tr.TARGET,e,t);return this.store.dispatch(function(e){return{type:wr,payload:{targetId:e}}}(r)),r}containsHandler(e){return jr(this.dragSources,e)||jr(this.dropTargets,e)}getSource(e,t=!1){$t(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return $t(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return $t(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return $t(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return kr(e)===Tr.SOURCE}isTargetId(e){return kr(e)===Tr.TARGET}removeSource(e){var t;$t(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Or,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},br.enqueueTask(xr.create(t))}removeTarget(e){$t(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Cr,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);$t(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){$t(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){const n=Er(e);return this.types.set(n,t),e===Tr.SOURCE?this.dragSources.set(n,r):e===Tr.TARGET&&this.dropTargets.set(n,r),n}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Pr=(e,t)=>e===t;function Ar(e=dr,t){switch(t.type){case Gt:break;case Sr:case wr:case Cr:case Or:return dr;default:return fr}const{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=function(e,t){const r=new Map,n=e=>{r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);const i=[];return r.forEach(((e,t)=>{1===e&&i.push(t)})),i}(r,n),o=i.length>0||!function(e,t,r=Pr){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}(r,n);if(!o)return dr;const a=n[n.length-1],s=r[r.length-1];return a!==s&&(a&&i.push(a),s&&i.push(s)),i}function Mr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Rr={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function _r(e=Rr,t){const{payload:r}=t;switch(t.type){case Vt:case Yt:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Gt:return n=e.clientOffset,i=r.clientOffset,!n&&!i||n&&i&&n.x===i.x&&n.y===i.y?e:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Mr(e,t,r[t])}))}return e}({},e,{clientOffset:r.clientOffset});case Jt:case Zt:return Rr;default:return e}var n,i}function Lr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Lr(e,t,r[t])}))}return e}const Fr={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Br(e=Fr,t){const{payload:r}=t;switch(t.type){case Yt:return zr({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case Xt:return zr({},e,{isSourcePublic:!0});case Gt:return zr({},e,{targetIds:r.targetIds});case Cr:return-1===e.targetIds.indexOf(r.targetId)?e:zr({},e,{targetIds:(n=e.targetIds,i=r.targetId,n.filter((e=>e!==i)))});case Zt:return zr({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case Jt:return zr({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var n,i}function Hr(e=0,t){switch(t.type){case Sr:case wr:return e+1;case Or:case Cr:return e-1;default:return e}}function Ur(e=0){return e+1}function qr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){qr(e,t,r[t])}))}return e}function $r(e={},t){return{dirtyHandlerIds:Ar(e.dirtyHandlerIds,{type:t.type,payload:Wr({},t.payload,{prevTargetIds:(r=e,n="dragOperation.targetIds",i=[],n.split(".").reduce(((e,t)=>e&&e[t]?e[t]:i||null),r))})}),dragOffset:_r(e.dragOffset,t),refCount:Hr(e.refCount,t),dragOperation:Br(e.dragOperation,t),stateId:Ur(e.stateId)};var r,n,i}function Kr(e,t=void 0,r={},n=!1){const i=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Wt($r,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(n),o=new gr(i,new Nr(i)),a=new ur(i,o),s=e(a,t,r);return a.receiveBackend(s),a}function Vr(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}let Yr=0;const Xr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Gr=n.memo((function(e){var{children:r}=e,i=Vr(e,["children"]);const[o,a]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e,t=Zr(),r,n){const i=t;i[Xr]||(i[Xr]={dragDropManager:Kr(e,t,r,n)});return i[Xr]}(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}(i);return n.useEffect((()=>{if(a){const e=Zr();return++Yr,()=>{0==--Yr&&(e[Xr]=null)}}}),[]),t.jsx(Ft.Provider,{value:o,children:r})}));function Zr(){return"undefined"!=typeof global?global:window}var Jr=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r},Qr=w(Jr);const en="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function tn(e,t,r){const[i,o]=function(e,t,r){const[i,o]=n.useState((()=>t(e))),a=n.useCallback((()=>{const n=t(e);Qr(i,n)||(o(n),r&&r())}),[i,e,r]);return en(a),[i,a]}(e,t,r);return en((function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(o,{handlerIds:[t]})}),[e,o]),i}function rn(e,t,r){return tn(t,e||(()=>({})),(()=>r.reconnect()))}function nn(e,t){const r=[...t||[]];return null==t&&"function"!=typeof e&&r.push(e),n.useMemo((()=>"function"==typeof e?e():e),r)}function on(e){return n.useMemo((()=>e.hooks.dragSource()),[e])}function an(e){return n.useMemo((()=>e.hooks.dragPreview()),[e])}let sn=!1,cn=!1;class un{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){$t(!sn,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return sn=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{sn=!1}}isDragging(){if(!this.sourceId)return!1;$t(!cn,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return cn=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{cn=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let ln=!1;class dn{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;$t(!ln,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return ln=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ln=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function fn(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let a=0;a<o.length;a++){const c=o[a];if(!s(c))return!1;const u=e[c],l=t[c];if(i=r?r.call(n,u,l,c):void 0,!1===i||void 0===i&&u!==l)return!1}return!0}function gn(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function hn(e){return(t=null,r=null)=>{if(!n.isValidElement(t)){const n=t;return e(n,r),n}const i=t;!function(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}(i);return function(e,t){const r=e.ref;return $t("string"!=typeof r,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?n.cloneElement(e,{ref:e=>{mn(r,e),mn(t,e)}}):n.cloneElement(e,{ref:t})}(i,r?t=>e(t,r):e)}}function pn(e){const t={};return Object.keys(e).forEach((r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const e=hn(n);t[r]=()=>e}})),t}function mn(e,t){"function"==typeof e?e(t):e.current=t}class vn{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();r&&this.disconnectDragPreview(),this.handlerId&&(t?r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!fn(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!fn(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=pn({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,gn(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,gn(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class yn{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!fn(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=pn({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,gn(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function bn(){const{dragDropManager:e}=n.useContext(Ft);return $t(null!=e,"Expected drag drop context"),e}class xn{beginDrag(){const e=this.spec,t=this.monitor;let r=null;return r="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=r?r:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,r=this.connector,{end:n}=e;n&&n(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}}function Sn(e,t,r){const i=bn(),o=function(e,t,r){const i=n.useMemo((()=>new xn(e,t,r)),[t,r]);return n.useEffect((()=>{i.spec=e}),[e]),i}(e,t,r),a=function(e){return n.useMemo((()=>{const t=e.type;return $t(null!=t,"spec.type must be defined"),t}),[e])}(e);en((function(){if(null!=a){const[e,n]=function(e,t,r){const n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}(a,o,i);return t.receiveHandlerId(e),r.receiveHandlerId(e),n}}),[i,t,r,o,a])}function wn(e,t){const r=nn(e,t);$t(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const i=function(){const e=bn();return n.useMemo((()=>new un(e)),[e])}(),o=function(e,t){const r=bn(),i=n.useMemo((()=>new vn(r.getBackend())),[r]);return en((()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource())),[i,e]),en((()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview())),[i,t]),i}(r.options,r.previewOptions);return Sn(r,i,o),[rn(r.collect,i,o),on(o),an(o)]}function On(e){return n.useMemo((()=>e.hooks.dropTarget()),[e])}class Cn{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function Dn(e,t,r){const i=bn(),o=function(e,t){const r=n.useMemo((()=>new Cn(e,t)),[t]);return n.useEffect((()=>{r.spec=e}),[e]),r}(e,t),a=function(e){const{accept:t}=e;return n.useMemo((()=>($t(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t])),[t])}(e);en((function(){const[e,n]=function(e,t,r){const n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}(a,o,i);return t.receiveHandlerId(e),r.receiveHandlerId(e),n}),[i,t,o,r,a.map((e=>e.toString())).join("|")])}function Tn(e,t){const r=nn(e,t),i=function(){const e=bn();return n.useMemo((()=>new dn(e)),[e])}(),o=function(e){const t=bn(),r=n.useMemo((()=>new yn(t.getBackend())),[t]);return en((()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget())),[e]),r}(r.options);return Dn(r,i,o),[rn(r.collect,i,o),On(o)]}function In(e){let t=null;return()=>(null==t&&(t=e()),t)}class En{enter(e){const t=this.entered.length;return this.entered=function(e,t){const r=new Set,n=e=>r.add(e);e.forEach(n),t.forEach(n);const i=[];return r.forEach((e=>i.push(e))),i}(this.entered.filter((t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e)))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var r,n;return this.entered=(r=this.entered.filter(this.isNodeInDocument),n=e,r.filter((e=>e!==n))),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class kn{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach((e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})}))}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach((r=>{const n=this.config.exposeProperties[r];null!=n&&(t[r]={value:n(e,this.config.matchesTypes),configurable:!0,enumerable:!0})})),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const jn="__NATIVE_FILE__",Nn="__NATIVE_URL__",Pn="__NATIVE_TEXT__",An="__NATIVE_HTML__";var Mn=Object.freeze({__proto__:null,FILE:jn,HTML:An,TEXT:Pn,URL:Nn});function Rn(e,t,r){const n=t.reduce(((t,r)=>t||e.getData(r)),"");return null!=n?n:r}const _n={[jn]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[An]:{exposeProperties:{html:(e,t)=>Rn(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Nn]:{exposeProperties:{urls:(e,t)=>Rn(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Pn]:{exposeProperties:{text:(e,t)=>Rn(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Ln(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(_n).filter((e=>{const r=_n[e];return!!(null==r?void 0:r.matchesTypes)&&r.matchesTypes.some((e=>t.indexOf(e)>-1))}))[0]||null}const zn=In((()=>/firefox/i.test(navigator.userAgent))),Fn=In((()=>Boolean(window.safari)));class Bn{interpolate(e){const{xs:t,ys:r,c1s:n,c2s:i,c3s:o}=this;let a=t.length-1;if(e===t[a])return r[a];let s,c=0,u=o.length-1;for(;c<=u;){s=Math.floor(.5*(c+u));const n=t[s];if(n<e)c=s+1;else{if(!(n>e))return r[s];u=s-1}}a=Math.max(0,u);const l=e-t[a],d=l*l;return r[a]+n[a]*l+i[a]*d+o[a]*l*d}constructor(e,t){const{length:r}=e,n=[];for(let e=0;e<r;e++)n.push(e);n.sort(((t,r)=>e[t]<e[r]?-1:1));const i=[],o=[];let a,s;for(let n=0;n<r-1;n++)a=e[n+1]-e[n],s=t[n+1]-t[n],i.push(a),o.push(s/a);const c=[o[0]];for(let e=0;e<i.length-1;e++){const t=o[e],r=o[e+1];if(t*r<=0)c.push(0);else{a=i[e];const n=i[e+1],o=a+n;c.push(3*o/((o+n)/t+(o+a)/r))}}c.push(o[o.length-1]);const u=[],l=[];let d;for(let e=0;e<c.length-1;e++){d=o[e];const t=c[e],r=1/i[e],n=t+c[e+1]-d-d;u.push((d-t-n)*r),l.push(n*r*r)}this.xs=e,this.ys=t,this.c1s=c,this.c2s=u,this.c3s=l}}const Hn=1;function Un(e){const t=e.nodeType===Hn?e:e.parentElement;if(!t)return null;const{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function qn(e){return{x:e.clientX,y:e.clientY}}function Wn(e,t,r,n,i){const o="IMG"===(a=t).nodeName&&(zn()||!(null===(s=document.documentElement)||void 0===s?void 0:s.contains(a)));var a,s;const c=Un(o?e:t),u={x:r.x-c.x,y:r.y-c.y},{offsetWidth:l,offsetHeight:d}=e,{anchorX:f,anchorY:g}=n,{dragPreviewWidth:h,dragPreviewHeight:p}=function(e,t,r,n){let i=e?t.width:r,o=e?t.height:n;return Fn()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(o,t,l,d),{offsetX:m,offsetY:v}=i,y=0===v||v;return{x:0===m||m?m:new Bn([0,.5,1],[u.x,u.x/l*h,u.x+h-l]).interpolate(f),y:y?v:(()=>{let e=new Bn([0,.5,1],[u.y,u.y/d*p,u.y+p-d]).interpolate(g);return Fn()&&o&&(e+=(window.devicePixelRatio-1)*p),e})()}}class $n{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function Kn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Kn(e,t,r[t])}))}return e}class Yn{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,r){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);const n=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",n),t.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",n),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const r=t=>this.handleDragEnter(t,e),n=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",r),t.addEventListener("dragover",n),t.addEventListener("drop",i),()=>{t.removeEventListener("dragenter",r),t.removeEventListener("dragover",n),t.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Vn({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return Vn({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Mn).some((t=>Mn[t]===e))}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const r=_n[e];if(!r)throw new Error(`native type ${e} has no configuration`);const n=new kn(r);return n.loadDataTransfer(t),n}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout((()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&Un(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame((()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null})))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const r=qn(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:n}=e,i=Ln(n);if(this.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){const{anchorX:e,anchorY:o,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=Wn(t,i,r,{anchorX:e,anchorY:o},{offsetX:a,offsetY:s});n.setDragImage(i,c.x,c.y)}}try{null==n||n.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout((()=>this.actions.publishDragSource()),0)}else if(i)this.beginDragNativeItem(i);else{if(n&&!n.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:r}=e,n=Ln(r);n&&this.beginDragNativeItem(n,r)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:qn(e)});t.some((e=>this.monitor.canDropOnTarget(e)))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=qn(e),this.scheduleHover(t);(t||[]).some((e=>this.monitor.canDropOnTarget(e)))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout((()=>this.endDragNativeItem()),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):Ln(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:qn(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new $n(t,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new En(this.isNodeInDocument)}}const Xn=function(e,t,r){return new Yn(e,t,r)};var Gn={exports:{}};!function(e,t){function r(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var n="object"==typeof process&&!0;function i(e,t){if(!e){if(n)throw new Error("Invariant failed");throw new Error(t())}}t.invariant=i;var o=Object.prototype.hasOwnProperty,a=Array.prototype.splice,s=Object.prototype.toString;function c(e){return s.call(e).slice(8,-1)}var u=Object.assign||function(e,t){return l(t).forEach((function(r){o.call(t,r)&&(e[r]=t[r])})),e},l="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function d(e){return Array.isArray(e)?u(e.constructor(e.length),e):"Map"===c(e)?new Map(e):"Set"===c(e)?new Set(e):e&&"object"==typeof e?u(Object.create(Object.getPrototypeOf(e)),e):e}var f=function(){function e(){this.commands=u({},g),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return(new e).update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var r=this,n="function"==typeof t?{$apply:t}:t;Array.isArray(e)&&Array.isArray(n)||i(!Array.isArray(n),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),i("object"==typeof n&&null!==n,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(r.commands).join(", ")+"."}));var a=e;return l(n).forEach((function(t){if(o.call(r.commands,t)){var i=e===a;a=r.commands[t](n[t],a,n,e),i&&r.isEquals(a,e)&&(a=e)}else{var s="Map"===c(e)?r.update(e.get(t),n[t]):r.update(e[t],n[t]),u="Map"===c(a)?a.get(t):a[t];r.isEquals(s,u)&&(void 0!==s||o.call(e,t))||(a===e&&(a=d(e)),"Map"===c(a)?a.set(t,s):a[t]=s)}})),a},e}();t.Context=f;var g={$push:function(e,t,r){return p(t,r,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,r){return p(t,r,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,n,o){return function(e,t){i(Array.isArray(e),(function(){return"Expected $splice target to be an array; got "+r(e)})),v(t.$splice)}(t,n),e.forEach((function(e){v(e),t===o&&e.length&&(t=d(o)),a.apply(t,e)})),t},$set:function(e,t,r){return function(e){i(1===Object.keys(e).length,(function(){return"Cannot have more than one key in an object with $set"}))}(r),e},$toggle:function(e,t){m(e,"$toggle");var r=e.length?d(t):t;return e.forEach((function(e){r[e]=!t[e]})),r},$unset:function(e,t,r,n){return m(e,"$unset"),e.forEach((function(e){Object.hasOwnProperty.call(t,e)&&(t===n&&(t=d(n)),delete t[e])})),t},$add:function(e,t,r,n){return y(t,"$add"),m(e,"$add"),"Map"===c(t)?e.forEach((function(e){var r=e[0],i=e[1];t===n&&t.get(r)!==i&&(t=d(n)),t.set(r,i)})):e.forEach((function(e){t!==n||t.has(e)||(t=d(n)),t.add(e)})),t},$remove:function(e,t,r,n){return y(t,"$remove"),m(e,"$remove"),e.forEach((function(e){t===n&&t.has(e)&&(t=d(n)),t.delete(e)})),t},$merge:function(e,t,n,o){var a,s;return a=t,i((s=e)&&"object"==typeof s,(function(){return"update(): $merge expects a spec of type 'object'; got "+r(s)})),i(a&&"object"==typeof a,(function(){return"update(): $merge expects a target of type 'object'; got "+r(a)})),l(e).forEach((function(r){e[r]!==t[r]&&(t===o&&(t=d(o)),t[r]=e[r])})),t},$apply:function(e,t){var n;return i("function"==typeof(n=e),(function(){return"update(): expected spec of $apply to be a function; got "+r(n)+"."})),e(t)}},h=new f;function p(e,t,n){i(Array.isArray(e),(function(){return"update(): expected target of "+r(n)+" to be an array; got "+r(e)+"."})),m(t[n],n)}function m(e,t){i(Array.isArray(e),(function(){return"update(): expected spec of "+r(t)+" to be an array; got "+r(e)+". Did you forget to wrap your parameter in an array?"}))}function v(e){i(Array.isArray(e),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+r(e)+". Did you forget to wrap your parameters in an array?"}))}function y(e,t){var n=c(e);i("Map"===n||"Set"===n,(function(){return"update(): "+r(t)+" expects a target of type Set or Map; got "+r(n)}))}t.isEquals=h.update.isEquals,t.extend=h.extend,t.default=h.update,t.default.default=e.exports=u(t.default,t)}(Gn,Gn.exports);var Zn=w(Gn.exports),Jn=function(e){var r=e.type,i=e.onMoveItem,o=e.index,a=e.id,s=e.children,c=e.style,u=e.className,l=n.useRef(null),d=C("zt-sortable",u,{}),f=Tn({accept:r,hover:function(e,t){var r;if(l.current){var n=e.index,a=o;if(n!==a){var s=null===(r=l.current)||void 0===r?void 0:r.getBoundingClientRect(),c=(s.bottom-s.top)/2,u=t.getClientOffset().y-s.top;n<a&&u<c||n>a&&u>c||(i(n,a),e.index=a)}}}}),g=f[1],h=wn({type:r,item:function(){return{id:a,index:o}},collect:function(e){return{isDragging:e.isDragging()}}}),p=h[0].isDragging?0:1;return(0,h[1])(g(l)),t.jsx("div",v({ref:l,className:d,style:v(v({},c),{opacity:p})},{children:s}))},Qn=500;function ei(e,t,r){if(e&&t&&Array.isArray(r)){var n=[];try{n=(JSON.parse(localStorage.getItem(t)||"{}")||{})[e]}catch(e){console.log(e)}var i=Array.isArray(n)&&n.length>0?n:[];return n&&0!==n.length?r.forEach((function(e,t){var r=v({checked:!0},e),n=i.find((function(e){return e.key===r.key}));n?(n.label=r.label,n.isFind=!0):i.push(v(v({},r),{isFind:!0}))})):r.forEach((function(e){var t=v(v({},e),{checked:void 0===e.checked||e.checked});i.push(v(v({},t),{isFind:!0}))})),i.filter((function(e){return e.isFind})).map((function(e){var t=v({},e);return Reflect.deleteProperty(t,"isFind"),t}))}return[]}function ti(e,t,r,i,o,a,s){var c=n.useState(!1),u=c[0],l=c[1],d=n.useCallback((function(){return e=i,t="".concat(i,"_lru_key"),function(r,n){var i={},o=[];try{i=JSON.parse(localStorage.getItem(e)||"{}")||{},o=JSON.parse(localStorage.getItem(t)||"[]")||[]}catch(e){console.error(e)}o.length!==Object.keys(i).length&&(o=Object.keys(i));var a=o.findIndex((function(e){return e===r}));if(-1!==a?(o.splice(a,1),o.push(r)):o.push(r),o.length>Qn){var s=o.shift();try{delete i[s]}catch(e){}}i[r]=n,localStorage.setItem(e,JSON.stringify(i)),localStorage.setItem(t,JSON.stringify(o))};var e,t}),[i]),f=n.useCallback((function(){l(!1),o(e)}),[o,e]),g=n.useCallback((function(){l(!1),t(a),s(a),o(a),d()(r,a)}),[a,t,r,d,o]),h=n.useCallback((function(e){l(!1),t(e),o(e),s(e),d()(r,e)}),[t,r,d,o]);return{visible:u,setVisible:l,onClose:f,onReset:g,onSure:h}}var ri=function(e,i){var o=e.list,a=e.dynamicKey,s=e.parentDynamicKey,c=e.title,u=void 0===c?"自定义配置":c,l=e.onCurrentListChange,d=function(e,t,r){var i=n.useMemo((function(){return ei(e,t,r)}),[e,t,r]),o=n.useState(i),a=o[0],s=o[1],c=n.useState(i),u=c[0],l=c[1];return n.useEffect((function(){i&&(s(i),l(i))}),[i]),{currentDynamicList:a,setCurrentDynamicList:s,tempDynamicList:u,setTempDynamicList:l}}(a,s,o),f=d.currentDynamicList,g=d.setCurrentDynamicList,h=d.tempDynamicList,p=d.setTempDynamicList,m=ti(f,g,a,s,p,o,l),y=m.visible,b=m.setVisible,x=m.onClose,S=m.onReset,w=m.onSure;n.useImperativeHandle(i,(function(){return{setVisible:b}}));var O=n.useMemo((function(){var e=[];return h.forEach((function(t){t.checked&&e.push(t.key)})),e}),[h]),C=n.useCallback((function(e,t){p((function(r){var n=r[e];return Zn(r,{$splice:[[e,1],[t,0,n]]})}))}),[p]),T=function(){w&&w(h)};return t.jsx(r.Drawer,v({className:"dynamic-drawer",title:t.jsxs("div",{children:[t.jsx(wt,{style:{fontSize:16}}),t.jsxs("span",v({className:"search-drawer--title-text"},{children:[u,t.jsx("span",{children:"(拖拽排序)"})]}))]}),width:300,placement:"right",open:y,closable:!1,maskClosable:!1,footer:t.jsxs(t.Fragment,{children:[t.jsx(D,v({type:"default",onClick:x},{children:"取消"})),t.jsx(D,v({type:"default",onClick:S},{children:"重置"})),t.jsx(D,v({type:"primary",onClick:T},{children:"确定"}))]})},{children:t.jsx(Gr,v({backend:Xn,context:window},{children:t.jsx(r.Checkbox.Group,v({value:O,onChange:function(e){var t=h.map((function(e){return v({},e)}))||[];t.forEach((function(t){e.find((function(e){return e===t.key}))?t.checked=!0:t.checked=!1})),p(t)}},{children:h.map((function(e,n){return t.jsx(Jn,v({type:"search-drawer",index:n,onMoveItem:C},{children:t.jsx(r.Checkbox,v({value:e.key,disabled:e.disabled},{children:e.label||e.key}))}),e.key)}))}))}))}))};ri.displayName="ZTXK_WEBUI_DynamicDrawer";var ni=n.memo(n.forwardRef(ri)),ii=function(e,r){var i=e.dynamicKey,o=e.parentDynamicKey,a=e.defaultList,s=e.children,c=e.title,u=e.onCurrentListChange,l=e.hiddenOperationIcon,d=n.useState(a),f=d[0],g=d[1],h=n.useRef({});return n.useImperativeHandle(r,(function(){return{getCurrentDynamicList:function(e){return ei(i,o,e)},setList:g,setVisible:function(e){var t;null===(t=h.current)||void 0===t||t.setVisible(e)}}})),Array.isArray(f)&&f.length>0?t.jsxs("div",v({className:"ztxk-dynamic-setting"},{children:[l?null:t.jsx("div",v({onClick:function(){var e;return null===(e=h.current)||void 0===e?void 0:e.setVisible(!0)}},{children:s||t.jsx(wt,{style:{fontSize:18,color:"#768696"}})})),t.jsx(ni,{list:f,dynamicKey:i,parentDynamicKey:o,ref:h,title:c,onCurrentListChange:u})]})):null};ii.displayName="ZTXK_WEBUI_DynamicSetting";var oi=n.memo(n.forwardRef(ii));var ai=n.memo((function(e){var r=e.items,n=e.outsideState;return t.jsx(t.Fragment,{children:Array.isArray(r)?null==r?void 0:r.map((function(e,r){return t.jsx(hi,v({index:r},e,{outsideState:n}),"".concat(e.name))})):null})})),si=n.memo((function(e){var r=e.children,n=e.value;return t.jsx("div",v({className:"ztxk-form--detault-dom"},{children:r||(n||"— —")}))})),ci="ztxk-webui-dynamic-form",ui=n.memo((function(e){var i=e.form,o=e.bottomBorder,a=e.isFlex,s=void 0===a||a,c=e.wrapClassName,u=e.leftClassName;e.itemClassName;var l=e.rightWrapVisible,d=e.rightClassName,f=e.children,g=e.dynamicKey,h=e.formPreferences,p=e.items,m=e.outsideState,b=e.onValuesChange,x=e.onResetHandle,S=e.onSearchHandle,w=e.type,O=y(e,["form","bottomBorder","isFlex","wrapClassName","leftClassName","itemClassName","rightWrapVisible","rightClassName","children","dynamicKey","formPreferences","items","outsideState","onValuesChange","onResetHandle","onSearchHandle","type"]),T=function(e,t){return{configInfoItems:n.useMemo((function(){return e?null==t?void 0:t.map((function(t){var r,n,i,o=t.name,a=t.configName||o;return v(v({},t),{isDisplay:null===(r=e[a])||void 0===r?void 0:r.isDisplay,isRequired:null===(n=e[a])||void 0===n?void 0:n.isRequired,isChangeable:null===(i=e[a])||void 0===i?void 0:i.isChangeable})})):t}),[e,t])}}(h,p).configInfoItems,I=function(e,t,r){var i=n.useRef({}),o=n.useMemo((function(){var r=[];return t&&e&&(r=e.map((function(e){return{key:e.name,label:e.label,disabled:!0===e.dynamicDisabled,checked:!1!==e.isDisplay}}))),r}),[t,e]);n.useEffect((function(){var e,n;r&&t&&(null===(n=null===(e=i.current)||void 0===e?void 0:e.setList)||void 0===n||n.call(e,o))}),[r,t]);var a=n.useState((function(){return ei(t,ci,o)})),s=a[0],c=a[1],u=n.useCallback((function(e){c(e)}),[]),l=n.useMemo((function(){var t=[];return Array.isArray(s)&&s.length>0&&s.forEach((function(r){var n=r.key,i=r.checked,o=null==e?void 0:e.find((function(e){return(null==e?void 0:e.name)===n}));o&&(o.isDisplay=!!i,t.push(o))})),t}),[e,s]);return{dynamicList:o,currentDynamicList:s,onCurrentListChange:u,newItems:l,dynamicSettingRef:i}}(T,g,h),E=I.dynamicList,k=I.onCurrentListChange,j=I.newItems,N=I.dynamicSettingRef,P=C("ztxk-form",c,{"ztxk-form--bottom-border":o,"ztxk-form--list":"list"===w}),A=C("ztxk-form__left",u,{"ztxk-form__left--flex":s}),M=C("ztxk-form__right",d),R=n.useMemo((function(){var e={};if(p)for(var t=0;t<p.length;t++){var r=p[t];"string"==typeof r.name&&r.shouldUpdateNames&&r.shouldUpdateClear&&(e[r.name]="boolean"==typeof r.shouldUpdateClear?r.shouldUpdateNames:r.shouldUpdateClear)}return e}),[p]),_=n.useCallback((function(e,t){if(e){var r=Object.keys(e);Object.keys(R).forEach((function(e){var t,n,o=R[e]?R[e]:[];r.find((function(e){return o.includes(e)}))&&(null===(n=null==i?void 0:i.setFieldsValue)||void 0===n||n.call(i,((t={})[e]=void 0,t)))}))}b&&b(e,t)}),[b,R,i]),L=function(e,t){var r=t.onResetHandle,i=t.onSearchHandle;return{onResetHandleInner:n.useCallback((function(){null==e||e.resetFields(),r&&r()}),[e,r]),onSearchHandleInner:n.useCallback((function(){var t=null==e?void 0:e.getFieldsValue();i&&i(t)}),[e,i])}}(i,{onSearchHandle:S,onResetHandle:x}),z=L.onSearchHandleInner,F=L.onResetHandleInner;return t.jsxs(r.Form,v({form:i,onValuesChange:_},O,{className:P},{children:[t.jsx("div",v({className:A},{children:p?t.jsx(ai,{items:g?j:T,outsideState:m}):f})),g?t.jsx(oi,{dynamicKey:g,parentDynamicKey:ci,defaultList:E,onCurrentListChange:k,ref:N}):null,l?t.jsxs("div",v({className:M},{children:[t.jsx(D,v({type:"default",onClick:F},{children:"重置"})),t.jsx(D,v({type:"primary",onClick:z},{children:"查询"}))]})):null]}))}));function li(e,t,r){return function e(t,n){if(t===n)return!0;if((null==t?void 0:t.$$typeof)&&(null==n?void 0:n.$$typeof))return(null==t?void 0:t.key)===(null==n?void 0:n.key);if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(!e(t[i],n[i]))return!1;return!0}if(t&&n&&"object"==typeof t&&"object"==typeof n){var o=Object.keys(t);return o.length===Object.keys(n).length&&o.every((function(i){return!(!r||!r.includes(i))||e(t[i],n[i])}))}return!1}(e,t)}ui.displayName="ZTXK_WEBUI_Form",ui.useForm=r.Form.useForm,ui.Item=r.Form.Item,ui.List=r.Form.List,ui.ErrorList=r.Form.ErrorList,ui.Provider=r.Form.Provider,ui.useFormInstance=r.Form.useFormInstance,ui.useWatch=r.Form.useWatch,ui.DefaultDom=si;var di=function(e){var r,n=e.children,i=e.isDisplay,o=e.isRequired,a=e.isChangeable,s=e.isStress,c=e.preNode,u=e.nextNode;e.dynamicDisabled;var l=e.hiddenBorder,d=e.singleSelectShowBorder,f=e.hiddenLabel,g=e.width,h=e.className,p=e.itemClassName,m=e.render,b=e.shouldUpdateNames;e.shouldUpdateClear;var x=e.dependencies,S=e.shouldUpdate;e.index,e.outsideState,e.shouldUpdateBeOutsideState;var w=y(e,["children","isDisplay","isRequired","isChangeable","isStress","preNode","nextNode","dynamicDisabled","hiddenBorder","singleSelectShowBorder","hiddenLabel","width","className","itemClassName","render","shouldUpdateNames","shouldUpdateClear","dependencies","shouldUpdate","index","outsideState","shouldUpdateBeOutsideState"]),O=ui.useFormInstance();if(!1===i||"0"===i)return null;if(void 0!==o){var D=!!o,T=Array.isArray(w.rules)?w.rules:[],I=T.findIndex((function(e){return"function"!=typeof e&&(!0===(null==e?void 0:e.required)||!1===(null==e?void 0:e.required))}));if(-1!==I){var E=null===(r=T[I])||void 0===r?void 0:r.message;T.splice(I,1,{required:D,message:E})}else T.unshift({required:D,message:"".concat(w.label," 未填!")});w.rules=T}var k={disabled:!1};void 0!==a&&(k.disabled="0"===a||!a);var j=C("ztxk-form__item",p,{"ztxk-form__item--disabled":k.disabled,"ztxk-form__item--hidden-border":l,"ztxk-form__item--hidden-label":f,"ztxk-form__item--single-show-border":d,"ztxk-form__item--stress":s});if(x)return t.jsxs(gi,v({width:g,className:h},{children:[c||null,t.jsx(ui.Item,v({dependencies:x,noStyle:!0},{children:function(e){return t.jsx(ui.Item,v({},w,{className:j},{children:m(k,e)}))}})),u||null]}));if(S||b){var N=b?function(e,t,r){for(var n=0;n<b.length;n++){var i=b[n];if(e[i]!==t[i])return!0}return"function"==typeof S?S(e,t,r):"boolean"==typeof S&&S}:S;return t.jsxs(gi,v({width:g,className:h},{children:[c||null,t.jsx(ui.Item,v({shouldUpdate:N,noStyle:!0},{children:function(e){return w.name?t.jsx(ui.Item,v({},w,{className:j},{children:m(k,e)})):m(k,e)}})),u||null]}))}return t.jsxs(gi,v({width:g,className:h},{children:[c||null,t.jsx(ui.Item,v({},w,{className:j},{children:m?m(k,O):n})),u||null]}))};function fi(e){if("number"==typeof e)return e;switch(e){case"half":return 4;case"all":return 24;case"double":return 16;case"halfAll":return 12;default:return 8}}function gi(e){var n=e.className,i=e.children,o=e.width,a=C("ztxk-form__item--wrap",n);return t.jsx(r.Col,v({className:a,span:fi(o)},{children:i}))}di.displayName="ZTXK_WEBUI_FormItem";var hi=n.memo(di,(function(e,t){return(null==t?void 0:t.shouldUpdateBeOutsideState)?!!li(e,t,["render","shouldUpdateBeOutsideState","shouldUpdate","outsideState"])&&!t.shouldUpdateBeOutsideState(e.outsideState,t.outsideState):li(e,t)}));const pi=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],mi=(()=>{if("undefined"==typeof document)return!1;const e=pi[0],t={};for(const r of pi){const n=r?.[1];if(n in document){for(const[n,i]of r.entries())t[e[n]]=i;return t}}return!1})(),vi={change:mi.fullscreenchange,error:mi.fullscreenerror};let yi={request:(e=document.documentElement,t)=>new Promise(((r,n)=>{const i=()=>{yi.off("change",i),r()};yi.on("change",i);const o=e[mi.requestFullscreen](t);o instanceof Promise&&o.then(i).catch(n)})),exit:()=>new Promise(((e,t)=>{if(!yi.isFullscreen)return void e();const r=()=>{yi.off("change",r),e()};yi.on("change",r);const n=document[mi.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)})),toggle:(e,t)=>yi.isFullscreen?yi.exit():yi.request(e,t),onchange(e){yi.on("change",e)},onerror(e){yi.on("error",e)},on(e,t){const r=vi[e];r&&document.addEventListener(r,t,!1)},off(e,t){const r=vi[e];r&&document.removeEventListener(r,t,!1)},raw:mi};Object.defineProperties(yi,{isFullscreen:{get:()=>Boolean(document[mi.fullscreenElement])},element:{enumerable:!0,get:()=>document[mi.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[mi.fullscreenEnabled])}}),mi||(yi={isEnabled:!1});var bi=yi;var xi=function(e){var i=e.loading,o=function(e){var t=n.useState(1),r=t[0],i=t[1];return n.useEffect((function(){e||i(1)}),[e]),n.useEffect((function(){if(e){var t=setInterval((function(){i((function(e){return e+1}))}),1e3);return function(){t&&clearInterval(t)}}}),[e]),{countTimer:r}}(i).countTimer;return t.jsx(r.Spin,{spinning:i,size:"large",tip:"".concat(o),className:"ztxk-container__loading",style:{display:i?"flex":"none"}})},Si=n.memo((function(e){var r=e.children,n=e.isMarginTop,i=e.className,o=C("ztxk-container--btn-wrap",i,{"btn-wrap--margin-top":n});return t.jsx("div",v({className:o},{children:r}))})),wi=n.memo((function(e){var r=e.className,n=e.isFlex,i=e.children,o=e.loading,a=e.footerDom,s=C("ztxk-container__content",r,{"ztxk-container__content--flex":n});return t.jsxs("div",v({className:"ztxk-container"},{children:[t.jsx(xi,{loading:o}),t.jsx("div",v({className:s},{children:i})),t.jsx(Ci,{footerDom:a})]}))}));wi.displayName="ZTXK_WEBUI_ContainerMemo",wi.ButtonWrap=Si;var Oi=["10","20","30","100"],Ci=n.memo((function(e){var r=e.children,n=e.className,i=e.align,o=void 0===i?"left":i,a=e.footerDom,s=C("ztxk-footer",n);return t.jsx("footer",v({className:s,style:{justifyContent:"left"===o?"flex-start":"center"===o?"center":"flex-end"}},{children:a?t.jsxs("div",v({className:"ztxk-footer--group"},{children:[a.map((function(e,r){var n=e.DOMType,i=e.render;if("button"===n){var o=e.type,a=void 0===o?"primary":o,s=e.loading,c=e.disabled,u=e.onClick;return t.jsx(D,v({type:a,loading:s,disabled:c,onClick:u},{children:e.text}),r)}if("pagination"===n){var l=e.total,d=e.pageSize,f=e.current,g=e.onChange,h=e.onShowSizeChange,p=e.pageSizeOptions;return t.jsx(Di,{total:l,pageSize:d,current:f,onChange:g,onShowSizeChange:h,showTotal:function(e){return"共".concat(e,"条")},showSizeChanger:!0,pageSizeOptions:p||Oi},r)}return i?i():null})),r]})):null}))})),Di=function(e){var n=e.className,i=y(e,["className"]),o=C("ztxk-pagination",n,{});return t.jsx(r.Pagination,v({className:o},i))};var Ti=n.memo((function(e){var n=e.copyKey,i=e.dataSourceRef;return t.jsx(zt,{type:"icon-copy",style:{fontSize:"22px"},className:"thead-icon",title:"复制整列",onClick:function(){return function(e,t){var n,i;if(Array.isArray(t)){var o=t.map((function(t){if("string"==typeof e)return t[e];var r="";return e.forEach((function(e){return r+=t[e]})),r})).join("\n");try{if((null===navigator||void 0===navigator?void 0:navigator.clipboard)&&window.isSecureContext)null===(i=null===(n=navigator.clipboard)||void 0===n?void 0:n.writeText(o))||void 0===i||i.then((function(){r.message.info("复制成功!")}));else{var a=document.createElement("textarea");a.value=o,document.body.appendChild(a),a.select(),document.execCommand?(r.message.info("复制成功!"),document.execCommand("copy")):r.message.info("复制失败!请手工复制\n ".concat(o)),document.body.removeChild(a)}}catch(e){r.message.info("复制失败!请手工复制\n ".concat(o))}}}(n,i.current)}})})),Ii="ztxk-webui-dynamic-table",Ei=Symbol("table-drag-row"),ki=["bottomLeft"],ji=["10","20","30","40"],Ni="error-td";var Pi=function(e){var r=e.className,n=y(e,["className"]),i=C("ztxk-table__enhance-row",r);return t.jsx("tr",v({className:i},n))},Ai=function(e){var r=e.className,i=e.style,o=e.index,a=e.moveRow,s=y(e,["className","style","index","moveRow"]),c=function(e,t){var r=n.useRef(null),i=Tn((function(){return{accept:Ei,collect:function(e){return(e.getItem()||{}).index,{}},drop:function(r){if(!t)throw new Error("请定义移动行后触发的函数 onmoveRow");t(r.index,e)}}}),[e])[1],o=wn({type:Ei,item:{index:e},collect:function(e){return{isDragging:e.isDragging()}},canDrag:function(e){var t;return!(null===(t=document.activeElement)||void 0===t?void 0:t.tagName.toLowerCase().match(/input|textarea/))}});return i((0,o[1])(r)),{ref:r}}(o,a).ref,u=C("ztxk-table__enhance-row",r);return t.jsx("tr",v({ref:c,style:v({cursor:"move"},i),className:u},s))};function Mi(e,t){var r=null==e?void 0:e.current;return r?r.pageSize*(r.page-1)+(t||0):t}var Ri=function(e){var r=e.record,i=e.index,o=e.editable,a=e.editableConfig,s=e.dataIndex;e.title;var c=e.onEditableSave;e.onMouseEnter,e.onMouseLeave;var u=e.children,l=e.currentPage,d=e.isValidate,f=y(e,["record","index","editable","editableConfig","dataIndex","title","onEditableSave","onMouseEnter","onMouseLeave","children","currentPage","isValidate"]),g=Mi(l,i),h=n.useState(r?r[s]:void 0),p=h[0],m=h[1],b=function(){var e=n.useState(!1),t=e[0],r=e[1];return{editing:t,toggleEdit:function(){r(!t)}}}(),x=b.editing,S=b.toggleEdit,w=function(e){var t=n.useRef();return n.useEffect((function(){e&&t.current.focus()}),[e]),t}(x),O=function(){var e=n.useRef(),t=n.useCallback((function(){var t,r;e.current&&(null===(r=(t=e.current.classList).contains)||void 0===r?void 0:r.call(t,Ni))&&e.current.classList.remove(Ni)}),[]);return{tdRef:e,removeErrorClass:t}}(),C=O.tdRef,D=O.removeErrorClass,I=function(e){var t;if(!c)throw Error("如果开启了editable, 那么必须传递 onEditableSave属性 来更改表格数据!");S(),c(v(v({},r),((t={})[s]=p,t)),g,s)};if(o){var E=a||{type:"input"},k=E.type,N=y(E,["type"]),P=null;return"input"===k&&(P=t.jsx(T,v({value:p,onChange:function(e){m(e.target.value),d&&D()},onPressEnter:I,onBlur:I,ref:w},N))),"inputNumber"===k&&(P=t.jsx(j,v({value:p,onChange:function(e){m(e),d&&D()},onPressEnter:I,onBlur:I,ref:w},N))),t.jsx("td",v({ref:C},f,{children:x?t.jsx("div",v({className:"ztxk-table__enhance-cell"},{children:P})):t.jsx("div",v({className:"ztxk-table__enhance-cell-wrap",onClick:S},{children:u}))}))}return t.jsx("td",v({ref:C},f,{children:u}))},_i=n.memo((function(e){var r=e.dynamicSettingRef;return t.jsx(mt,{onClick:function(){var e;null===(e=null==r?void 0:r.current)||void 0===e||e.setVisible(!0)}})})),Li=n.memo((function(e){var n=e.onAddAndDel;return t.jsx(r.Popconfirm,v({title:"确定删除所有吗?",onConfirm:function(){return n&&n("delAll",0)}},{children:t.jsx(gt,{title:"删除所有行"})}))})),zi=n.memo((function(e){var n=e.isAdd,i=e.isDel,o=e.onAddAndDel,a=e.index;return t.jsxs(t.Fragment,{children:[n?t.jsx("div",v({className:"ztxk-column--adddel-icon"},{children:t.jsx(bt,{title:"新增一行",onClick:function(){o&&o("add",a)}})})):null,i?t.jsx("div",v({className:"ztxk-column--adddel-icon"},{children:t.jsx(r.Popconfirm,v({title:"确定删除吗?",onConfirm:function(){return o&&o("del",a)}},{children:t.jsx(lt,{title:"删除一行"})}))})):null]})}));function Fi(e,r){var n=r.dynamicKey,i=r.currentDynamicList,o=r.dataSourceRef,a=r.onEditableSave,s=r.isEdit,c=r.isAdd,u=r.isDel,l=r.dynamicSettingRef,d=r.onAddAndDel,f=r.getRefreshScuCell,g=r.isDelAll,h=r.currentPage,p=function(e,t){if(Array.isArray(t)&&t.length>0&&e){var r=[],n=[],i=[];return t.forEach((function(t){var r=t.key,i=t.checked,o=e.find((function(e){return(e.key===r||(null==e?void 0:e.dataIndex)===r)&&i}));o&&n.push(o)})),e.filter((function(e){return e.fixed})).forEach((function(e){"left"===e.fixed?r.push(e):"right"===e.fixed&&i.push(e)})),S(S(S([],r,!0),n,!0),i,!0)}return e}(e,i),m=[];if(Array.isArray(p)){if(p.forEach((function(e){var r=v({},e),n=r.isCopy,i=r.editable,c=r.editableConfig,u=r.title,l=r.key,d=r.validate,g=r.isRequire,p=l||(null==r?void 0:r.dataIndex);if(n&&(r.title=t.jsxs(t.Fragment,{children:[u,t.jsx(Ti,{copyKey:!0===n?p:n,dataSourceRef:o})]})),g&&(r.title=t.jsxs(t.Fragment,{children:[t.jsx("i",v({className:"ztxk-column--required"},{children:"*"})),r.title]})),i&&s&&(r.onCell=function(e,t){return{record:e,index:t,editable:i,editableConfig:c,dataIndex:p,title:u,onEditableSave:a,currentPage:h,isValidate:!!d}}),r.shouldCellUpdate){var y=r.shouldCellUpdate;r.shouldCellUpdate=function(e,t){return!(!f||!f())||y(e,t)}}r.render||(r.render=function(e,t,r){return"object"==typeof e||null==e||""===e?"— —":e}),m.push(r)})),c||u){var y={title:function(){return g?t.jsx(Li,{}):null},width:52,fixed:"left",align:"center",render:function(e,r,n){return t.jsx(zi,{isAdd:c,isDel:u,index:n,onAddAndDel:d})}};m.unshift(y)}n&&(m[0].title=function(){return c||u?t.jsxs(t.Fragment,{children:[g?t.jsx(Li,{}):null,t.jsx(_i,{dynamicSettingRef:l})]}):t.jsx(_i,{dynamicSettingRef:l})})}return{newColumns:m}}function Bi(e,i,o){var a=o.summaryFixed,s=o.rowSelection,c=o.expandable,u=o.isAdd,l=o.isDel,d=!!c,f=!(!u&&!l),g=Number(!!s)+Number(d),h=n.useCallback((function(n){var o=function(e,t,r){var n=[],i=r.fillNumber,o=r.columns;Array.isArray(e)&&e.forEach((function(e){var r=e.type,a=e.fields,s=e.title;switch(r){case"subtotal":if(!Array.isArray(a))return;if(0===a.length)return;var c=function(e,t){if(!Array.isArray(t))return null;var r={};return t.forEach((function(n,i){e.forEach((function(e){if("string"==typeof e){var o=Number(null==n?void 0:n[e]);o=isNaN(o)?0:o;var a=(null==r?void 0:r[e])||0;r[e]=a?Hi(a,o):o}else{var s=e.key,c=e.showKey,u=e.toFixedNum,l=e.value,d=e.callback;o=Number(null==n?void 0:n[s]);o=isNaN(o)?0:o;var f=(null==r?void 0:r[s])||0;if(l)if(Array.isArray(l))r[s]=l.map((function(e,t){var r=Array.isArray(u)?u[t]:u,n=Number(e);return isNaN(n)||"number"!=typeof r?e:n.toFixed(r)}));else{var g=Number(l);r[s]="number"==typeof u?isNaN(g)?l:g.toFixed(u):l}else if(c)if("string"==typeof c){var h=Number(null==n?void 0:n[c]);h=isNaN(h)?0:h,r[s]=f?"number"==typeof u?Hi(f,h).toFixed(u):Hi(f,h):"number"==typeof u?h.toFixed(u):h}else r[s]=c.map((function(e,t){var r=Number(null==n?void 0:n[e]);r=isNaN(r)?0:r;var i=Array.isArray(u)?u[t]:u;if(f){var o=Number(f[t]);return"number"==typeof i?Hi(o,r).toFixed(i):Hi(o,r)}return"number"==typeof i?r.toFixed(i):r}));else r[s]=f?"number"==typeof u?Hi(f,o).toFixed(u):Hi(f,o):"number"==typeof u?o.toFixed(u):o;d&&i===t.length-1&&(r[s]=d(r[s]))}}))})),r}(a,t),u=[],l=[];null==o||o.forEach((function(e){e.children?e.children.forEach((function(e){u.push(e.key||e.dataIndex?c[e.key||e.dataIndex]:void 0),l.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex})})):(u.push(e.key||e.dataIndex?c[e.key||e.dataIndex]:void 0),l.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex}))})),n.push({title:s||"小计",titleIndex:0+i,key:"subtotal",list:Array(i).fill(void 0).concat(u),columnList:Array(i).fill(void 0).concat(l)});break;case"total":if(!Array.isArray(a))return;if(0===a.length)return;var d=function(e){var t={};return e.forEach((function(e){if("object"==typeof e){var r=e.key,n=e.toFixedNum,i=e.value,o=e.callback;if(null!=i)if(Array.isArray(i))t[r]=i.map((function(e,t){var r=Number(e);r=isNaN(r)?0:r;var i=Array.isArray(n)?n[t]:n;return"number"==typeof i?r.toFixed(i):e}));else{var a=Number(i);a=isNaN(a)?0:a,t[r]="number"==typeof n?a.toFixed(n):i}else t[r]=0;o&&(t[r]=o(t[r]))}})),t}(a),f=[],g=[];null==o||o.forEach((function(e){e.children?e.children.forEach((function(e){f.push(e.key||e.dataIndex?d[e.key||e.dataIndex]:void 0),g.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex})})):(f.push(e.key||e.dataIndex?d[e.key||e.dataIndex]:void 0),g.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex}))})),n.push({title:s||"总计",titleIndex:0+i,key:"total",list:Array(i).fill(void 0).concat(f),columnList:Array(i).fill(void 0).concat(g)})}}));return n}(e,n,{fillNumber:g,columns:i});return t.jsx(r.Table.Summary,v({fixed:a},{children:o.map((function(e){var n=e.title,i=e.key,o=e.titleIndex,a=e.list;return t.jsx(r.Table.Summary.Row,{children:Array.isArray(a)&&a.map((function(e,i){return o+Number(f)===i?t.jsx(r.Table.Summary.Cell,v({index:i},{children:n}),i):t.jsx(r.Table.Summary.Cell,v({index:i},{children:t.jsx("div",{children:e})}),i)}))},i)}))}))}),[e,g,i,a,f]);return e?h:void 0}function Hi(e,t){return e+t}function Ui(e,t){return e.querySelector(t)}function qi(e,t,r){var n;return b(this,void 0,void 0,(function(){var i,o,a,s,c,u,l,d,f,g,h,p,m;return x(this,(function(v){switch(v.label){case 0:if(i=r.getCurrentTable,o=r.rowSelection,a=r.expandable,s=r.tableName,c=r.isInnerPagination,u=r.setCurrent,l=r.pageSize,!Array.isArray(e)||0===e.length)return console.info("没有数据,无需验证!"),[2];if(!Array.isArray(t))return console.info("columns 不是数组!"),[2];d=[],Array.isArray(t)&&t.forEach((function(e,t){e.validate&&d.push({dataIndex:e.validate.dataIndex||e.dataIndex,title:e.validate.title||e.title,validate:e.validate.validate,index:t+(o?1:0)+(a?1:0)})})),f=0,v.label=1;case 1:if(!(f<e.length))return[3,6];g=e[f],h=function(e){var t,r,o,a,h,p,m,v,y,b;return x(this,(function(x){switch(x.label){case 0:if(t=d[e],r=t.dataIndex,o=t.title,a=t.validate,h=t.index,!r)return[2,"break"];if(p=g[r],m=function(e,t,r){var n,o,a,s=i().resultTr[e],c=Array.prototype.slice.call(null==s?void 0:s.children),u="number"==typeof t?c[t]:null;null===(o=null===(n=null==u?void 0:u.classList)||void 0===n?void 0:n.add)||void 0===o||o.call(n,r),null===(a=null==u?void 0:u.scrollIntoView)||void 0===a||a.call(u)},v=f,y=1,c&&(y=Math.ceil((f+1)/l),v-=l*(y-1)),!a)return[3,10];if("function"!=typeof a)return[3,5];x.label=1;case 1:return x.trys.push([1,3,,4]),[4,a(p,g,v+1,o)];case 2:return x.sent(),[3,4];case 3:return b=x.sent(),c?(u(y),setTimeout((function(){m(v,h,Ni)}))):m(f,h,Ni),[2,{value:Promise.reject(b)}];case 4:return[3,9];case 5:return(null===(n=null==a?void 0:a.pattern)||void 0===n?void 0:n.test(p))?[3,9]:c?(u(y),setTimeout((function(){m(v,h,Ni)})),[4,Promise.reject({errors:"".concat(s||""," 第").concat(v+1,"行 ").concat(o," ").concat((null==a?void 0:a.message)||"填写错误!")})]):[3,7];case 6:return x.sent(),[3,9];case 7:return m(f,h,Ni),[4,Promise.reject({errors:"".concat(s||""," 第").concat(f+1,"行 ").concat(o," ").concat((null==a?void 0:a.message)||"填写错误!")})];case 8:x.sent(),x.label=9;case 9:return[3,14];case 10:return""!==p&&null!=p?[3,14]:c?(u(y),setTimeout((function(){m(v,h,Ni)})),[4,Promise.reject({errors:"".concat(s||""," 第").concat(v+1,"行 ").concat(o," 为空!"),rowIndex:f,colIndex:h})]):[3,12];case 11:return x.sent(),[3,14];case 12:return m(f,h,Ni),[4,Promise.reject({errors:"".concat(s||""," 第").concat(f+1,"行 ").concat(o," 为空!"),rowIndex:f,colIndex:h})];case 13:x.sent(),x.label=14;case 14:return[2]}}))},p=0,v.label=2;case 2:return p<d.length?[5,h(p)]:[3,5];case 3:if("object"==typeof(m=v.sent()))return[2,m.value];if("break"===m)return[3,5];v.label=4;case 4:return p++,[3,2];case 5:return f++,[3,1];case 6:return[2]}}))}))}var Wi=n.memo((function(e){var i=e.className,o=e.bordered,a=void 0===o||o,s=e.pagination,c=void 0!==s&&s,u=e.isFlex;e.tablePreferences;var l=e.dynamicKey,d=e.columns,f=e.dataSource,g=e.onTableChange,h=e.isEdit,p=e.isMove,m=e.isAdd,S=e.addMode,w=e.addCallback,O=e.isDel,D=e.isDelAll,T=void 0===D||D,I=e.isAddAndDelAuto,E=e.summaryConfig,k=e.summaryFixed,j=void 0===k||k,N=e.isInnerPagination,P=e.innerPaginationPageSize,A=void 0===P?30:P,M=e.innerPaginationPosition,R=void 0===M?ki:M,_=e.innerPaginationPageSizeOptions,L=void 0===_?ji:_,z=e.tableRefHandle,F=e.tableName,B=y(e,["className","bordered","pagination","isFlex","tablePreferences","dynamicKey","columns","dataSource","onTableChange","isEdit","isMove","isAdd","addMode","addCallback","isDel","isDelAll","isAddAndDelAuto","summaryConfig","summaryFixed","isInnerPagination","innerPaginationPageSize","innerPaginationPosition","innerPaginationPageSizeOptions","tableRefHandle","tableName"]),H=C("ztxk-table",i,{"ztxk-table--flex":u}),U=n.useRef();n.useEffect((function(){U.current=f}),[f]);var q,W,$=function(e,t){var r=n.useRef(null),i=n.useMemo((function(){return function(e,t){var r=[];return e&&t&&t.forEach((function(e){var t=e,n=t.key,i=t.dataIndex,o=t.title,a=t.dynamicDisabled;if(!t.fixed){var s=n||i;r.push({key:s,label:o,disabled:!0===a})}})),r}(t,e)}),[t,e]),o=n.useState((function(){return ei(t,Ii,i)})),a=o[0],s=o[1],c=n.useCallback((function(e){s(e)}),[]);return{defaultDynamicList:i,currentDynamicList:a,onCurrentListChange:c,dynamicSettingRef:r}}(d,l),K=$.defaultDynamicList,V=$.onCurrentListChange,Y=$.currentDynamicList,X=$.dynamicSettingRef,G=(q=n.useRef(null),W=n.useRef(),{refreshScuCell:n.useCallback((function(){W.current=!0}),[]),getRefreshScuCell:n.useCallback((function(){return!!W.current&&(q.current&&(clearTimeout(q.current),q.current=null),q.current=setTimeout((function(){W.current=!1})),!0)}),[])}),Z=G.refreshScuCell,J=G.getRefreshScuCell,Q=function(e,t,r){var i=n.useRef(null),o=n.useState(1),a=o[0],s=o[1],c=n.useState(t),u=c[0],l=c[1],d=r.innerPaginationPageSizeOptions,f=r.innerPaginationPosition;return n.useEffect((function(){e&&(i.current={page:a,pageSize:Number(u)})}),[e,a,u]),n.useEffect((function(){e||(i.current=null)}),[e]),{paginationConfig:n.useMemo((function(){return{current:a,pageSize:u,onChange:function(t,r){e&&(s(t),l(r))},hideOnSinglePage:!0,position:d,defaultPageSize:u,pageSizeOptions:f}}),[e,a,u,d,f]),currentPage:i,setCurrent:s,pageSize:u,current:a}}(N,A,{innerPaginationPosition:R,innerPaginationPageSizeOptions:L}),ee=Q.paginationConfig,te=Q.currentPage,re=Q.setCurrent,ne=Q.pageSize,ie=function(e,t){return n.useCallback((function(r,n,i,o){var a,s=null===(a=e.current)||void 0===a?void 0:a.slice();s[n][i]!==r[i]&&(s[n]=r,t&&t(s,e.current,{type:"edit",currentIndex:n}))}),[e,t])}(U,g),oe=function(e,t,r){var i=r.isMove,o=r.refreshScuCell,a=r.currentPage,s=n.useCallback((function(r,n){var i,s=Mi(a,r),c=Mi(a,n);if(s!==c){var u=null===(i=e.current)||void 0===i?void 0:i.slice(),l=u[s],d=Zn(u,{$splice:[[s,1],[c,0,l]]});o&&o(),t&&t(d,e.current,{type:"move",dragIndex:s,hoverIndex:c})}}),[e,t,o,a]),c=n.useCallback((function(e,t){return{index:t,moveRow:s}}),[s]);return{onRow:i?c:void 0}}(U,g,{isMove:p,refreshScuCell:Z,currentPage:te}).onRow,ae=function(e,t,r){var i=r.rowKey,o=r.addMode,a=r.addCallback,s=r.refreshScuCell,c=r.isAddAndDelAuto,u=r.currentPage;return n.useCallback((function(r,n){var l,d,f,g=Mi(u,n),h=null===(f=e.current)||void 0===f?void 0:f.slice();if("delAll"!==r){c&&(s&&s(),t&&t(h,e.current,{type:r,currentIndex:g}));var p=h[g],m=a?a(p,{index:g}):{};if("add"===r){var y={};y=v("blank"===o?((l={})[String(i)]="".concat(Date.now(),"-").concat(g),l.__INNER__ADD__DATA=!0,l):v(v({},p),((d={})[String(i)]="".concat(Date.now(),"-").concat(g),d.__INNER__ADD__DATA=!0,d)),m),h.splice(g+1,0,y)}else"del"===r&&h.splice(g,1);s&&s(),t&&t(h,e.current,{type:r,currentIndex:g})}else Array.isArray(h)&&h.length>0&&(s&&s(),t&&t([],e.current,{type:r,currentIndex:g}))}),[a,o,e,t,i,s,c,u])}(U,g,{rowKey:e.rowKey,addMode:S,addCallback:w,refreshScuCell:Z,isAddAndDelAuto:I,currentPage:te}),se=Fi(d,{dynamicKey:l,currentDynamicList:Y,dataSource:f,dataSourceRef:U,onEditableSave:ie,isEdit:h,isAdd:m,isDel:O,dynamicSettingRef:X,onAddAndDel:ae,getRefreshScuCell:J,isDelAll:T,currentPage:te}).newColumns,ce=Bi(E,se,{summaryFixed:j,rowSelection:e.rowSelection,expandable:e.expandable,isAdd:m,isDel:O}),ue=function(){var e=n.useRef(),t=n.useCallback((function(){var t,r=Ui(e.current,".ant-table-content");r||(r=Ui(e.current,".ant-table-container"));var n=Ui(r,".ant-table-tbody"),i=null==n?void 0:n.children,o=Array.prototype.slice.call(i);return{tableBody:n,resultTr:(null===(t=null==o?void 0:o.filter)||void 0===t?void 0:t.call(o,(function(e){return e.className.includes("ant-table-row")})))||[]}}),[]),r=n.useCallback((function(e){try{var r=t().resultTr;if("number"==typeof e)for(var n=r[e].querySelectorAll("td"),i=0;i<n.length;i++)n[i].classList.remove(Ni);else for(i=0;i<r.length;i++){n=r[i].querySelectorAll("td");for(var o=0;o<n.length;o++)n[o].classList.remove(Ni)}}catch(e){console.log(e)}}),[t]);return{tableRef:e,getCurrentTable:t,clearErrorClass:r}}(),le=ue.tableRef,de=ue.getCurrentTable,fe=ue.clearErrorClass,ge=n.useMemo((function(){var e=void 0;return h&&(e={body:{row:Pi,cell:Ri}}),p&&(e={body:{row:Ai,cell:h?Ri:void 0}}),e}),[h,p]);n.useImperativeHandle(z,(function(){return{getRealyIndex:function(e){return Mi(te,e)},getDynamicList:function(){return Y},tableValidate:function(){return b(void 0,void 0,void 0,(function(){return x(this,(function(t){switch(t.label){case 0:return fe(),[4,qi(f,se,{getCurrentTable:de,rowSelection:!!e.rowSelection,expandable:!!e.expandable,tableName:F,isInnerPagination:N,setCurrent:re,pageSize:ne})];case 1:return t.sent(),[2]}}))}))},clearErrorClass:fe}}));var he=t.jsx(r.Table,v({className:H,bordered:a,dataSource:f,columns:se,components:ge,onRow:oe,summary:ce,pagination:N?c||ee:c},B));return t.jsxs("div",v({style:u?{position:"relative",overflow:"hidden",flex:1}:{position:"relative",overflow:"hidden"},ref:le},{children:[p?t.jsx(Gr,v({backend:Xn,context:window},{children:he})):he,l?t.jsx(oi,{parentDynamicKey:Ii,dynamicKey:l,defaultList:K,onCurrentListChange:V,ref:X,hiddenOperationIcon:!0}):null]}))}));Wi.displayName="ZTXK_WEBUI_Table",Wi.SELECTION_COLUMN=r.Table.SELECTION_COLUMN,Wi.EXPAND_COLUMN=r.Table.EXPAND_COLUMN,Wi.SELECTION_ALL=r.Table.SELECTION_ALL,Wi.SELECTION_INVERT=r.Table.SELECTION_INVERT,Wi.SELECTION_NONE=r.Table.SELECTION_NONE,Wi.Column=r.Table.Column,Wi.ColumnGroup=r.Table.ColumnGroup,Wi.Summary=r.Table.Summary;var $i=n.memo((function(e){var n,i=e.className,o=e.isHeader,a=e.isContent,s=e.marginTop,c=void 0!==s&&s,u=e.marginBottom,l=void 0===u||u,d=y(e,["className","isHeader","isContent","marginTop","marginBottom"]),f=C("ztxk-tabs",i,((n={})["ztxk-tabs--header"]=o,n["ztxk-tabs--content"]=a,n["ztxk-tabs--marginTop"]=c,n["ztxk-tabs--marginBottom"]=l,n));return t.jsx(r.Tabs,v({type:o?"editable-card":a?"card":void 0,hideAdd:!!o||void 0,className:f},d))}));$i.displayName="ZTXK_WEBUI_Tabs",$i.TabPane=r.Tabs.TabPane;var Ki=n.forwardRef((function(e,i){var o=e.className,a=e.defaultOpen,s=e.defaultTitle,c=e.defaultConfirmMsg,u=e.defaultConfirmOkText,l=e.defaultType,d=e.confirmPreHandle,f=e.confirmOnOk,g=y(e,["className","defaultOpen","defaultTitle","defaultConfirmMsg","defaultConfirmOkText","defaultType","confirmPreHandle","confirmOnOk"]),h=C("ztxk-modal",o),p=n.useState(a),m=p[0],b=p[1],x=n.useState(s),S=x[0],w=x[1],O=n.useState(!1),D=O[0],T=O[1],I=n.useState(c),E=I[0],k=I[1],j=n.useState(u),N=j[0],P=j[1],A=n.useState(l),M=A[0],R=A[1],_=n.useCallback((function(){b(!1)}),[]);n.useImperativeHandle(i,(function(){return{open:function(e){(null==e?void 0:e.title)&&w(e.title),(null==e?void 0:e.confirmMsg)&&k(e.confirmMsg),(null==e?void 0:e.confirmOkText)&&P(e.confirmOkText),(null==e?void 0:e.type)&&R(e.type),"boolean"==typeof(null==e?void 0:e.isConfirm)&&T(e.isConfirm),b(!0)},close:function(){b(!1)},getType:function(){return M},setConfirmMsg:P}}));var L=n.useCallback((function(){if(D){var e=d&&d(M);r.Modal.confirm({title:(null==e?void 0:e.confirmMsg)?e.confirmMsg:E,okText:(null==e?void 0:e.confirmOkText)?e.confirmOkText:N||"确认保存",onOk:f?function(){return f(M).then((function(){b(!1)}))}:void 0})}}),[D,d,E,N,f,M]);return t.jsx(r.Modal,v({open:m,onCancel:_,className:h,okText:"保存",onOk:L,width:"70%",title:S},g))}));Ki.displayName="ZTXK_WEBUI_ModalComponent",Ki.info=r.Modal.info,Ki.success=r.Modal.success,Ki.error=r.Modal.error,Ki.warning=r.Modal.warning,Ki.confirm=r.Modal.confirm,Ki.destroyAll=r.Modal.destroyAll;var Vi=function(e){var n=e.children,i=e.className,o=e.border,a=e.isBg,s=y(e,["children","className","border","isBg"]),c=C("ztxk-grid",i,{"ztxk-grid--border":o,"ztxk-grid--background":a});return t.jsx(r.Row,v({className:c},s,{gutter:0},{children:n}))};Vi.displayName="ZTXK_WEBUI_DetailList",Vi.Item=function(e){var n=e.children,i=e.className,o=e.title,a=e.colon,s=void 0===a||a,c=e.span,u=e.titleSpan,l=e.titleProps,d=e.textProps,f=e.showDiff,g=e.isEllipsis,h=void 0===g||g,p=e.isBlod,m=C("ztxk-grid-item",i);return t.jsxs(t.Fragment,{children:[t.jsxs(r.Col,v({className:m+" ztxk-grid-item--title",span:u||3,title:o},l,{children:[t.jsx("span",v({className:"ztxk-grid-item--title-text"},{children:o})),t.jsx("span",v({className:"ztxk-grid-item--title-colon"},{children:s&&":"}))]})),t.jsx(r.Col,v({className:f?m+" ztxk-grid-item--text ztxk-grid-item--diff"+"".concat(h?" ztxk-grid-item--text-ellipsis":" ztxk-grid-item--text-noellipsis"):m+" ztxk-grid-item--text"+"".concat(h?" ztxk-grid-item--text-ellipsis":" ztxk-grid-item--text-noellipsis"),span:u?c-u:c-3,title:"string"==typeof n?n:void 0,style:{fontWeight:p?"bold":"normal"}},d,{children:n}))]})};var Yi=function(e){var n=e.children,i=e.layoutSliderRender,o=e.layoutHeaderRender;return t.jsxs(r.Layout,v({className:"zmdms-container"},{children:[i,t.jsxs(r.Layout,v({className:"zmdms-content"},{children:[o,t.jsx(r.Layout.Content,v({className:"zmdms-content--content"},{children:n}))]}))]}))};Yi.displayName="ZTXK_WEBUI_AppLayout";var Xi=n.memo(Yi),Gi=function(e){var r=e.tabs,i=e.activeTab,o=e.deleteTab,a=e.setActiveTab,s=n.useMemo((function(){return Array.isArray(r)?r.map((function(e){return{key:e.key,label:t.jsx(h.Link,v({to:e.path},{children:e.label}))}})):[]}),[r]);return t.jsx($i,{items:s,activeKey:i,isHeader:!0,onTabClick:function(e){a(e)},onEdit:function(e){o(e)}})},Zi=n.memo((function(){var e=n.useRef(null),r=function(e,t){var r=n.useState(!1),i=r[0],o=r[1];return n.useEffect((function(){if(e.current){var r=e.current,n=function(){if(bi.isEnabled){var e=bi;(null==t?void 0:t.current)?e.toggle(t.current):e.toggle()}};return r.addEventListener("click",n),function(){r.removeEventListener("click",n)}}}),[e,t]),n.useEffect((function(){if(bi.isEnabled){var e=bi,t=function(){e.isFullscreen?o(!0):o(!1)};return e.on("change",t),function(){e.off("change",t)}}}),[]),i}(e);return t.jsx("div",v({className:"full-screen",ref:e,title:r?"退出全屏":"全屏"},{children:r?t.jsx(Dt,{}):t.jsx(it,{})}))})),Ji=function(e){var n=e.userInfo,i=e.logout,o=[{label:t.jsxs("div",{children:[t.jsx(Nt,{style:{marginRight:5}})," 账号信息"]}),key:"info"},{label:t.jsxs("div",{children:[t.jsx(Et,{style:{marginRight:5}})," 修改密码"]}),key:"password"},{type:"divider"},{label:t.jsxs("div",v({onClick:function(){i&&i()}},{children:[t.jsx(st,{style:{marginRight:5}})," 退出系统"]})),key:"logout"}];return t.jsx(r.Dropdown,v({menu:{items:o},placement:"bottomLeft"},{children:t.jsxs("div",v({className:"user-operation"},{children:[t.jsx(Nt,{}),t.jsx("span",{children:null==n?void 0:n.real_name})]}))}))},Qi=function(e){var r=e.userInfo,n=e.logout;return t.jsxs("div",v({className:"zmdms-content--header-info"},{children:[t.jsx(Zi,{}),t.jsx(Ji,{userInfo:r,logout:n})]}))},eo=function(e){var n=e.tabs,i=e.activeTab,o=e.deleteTab,a=e.setActiveTab,s=e.userInfo,c=e.logout;return t.jsxs(r.Layout.Header,v({className:"zmdms-content--header"},{children:[t.jsx(Gi,{tabs:n,activeTab:i,deleteTab:o,setActiveTab:a}),t.jsx(Qi,{userInfo:s,logout:c})]}))};eo.displayName="ZTXK_WEBUI_AppLayoutHeader";var to=n.memo(eo),ro=n.memo((function(e){var r=e.logo;return t.jsx("div",v({className:"zmdms-logo"},{children:t.jsx("img",{src:r,title:"浙商中拓ERP",alt:"zszt_logo"})}))})),no=function(e){var i=e.userMenus,o=e.onMouseEnter,a=e.onMainLinkClick,s=e.addTab,c=n.useCallback((function(e){return"index"===e.type?t.jsx(h.Link,v({to:e.path,onClick:function(){s&&s({key:e.path,path:e.path,label:e.name})}},{children:e.name})):"/"===e.path?e.name:t.jsx(h.Link,v({to:e.path,onClick:function(){s&&s({key:e.path,path:e.path,label:e.name})}},{children:e.name}))}),[s]),u=n.useMemo((function(){return Array.isArray(i)?i.map((function(e){return{label:c(e),title:e.name,key:e.id,icon:e.source?t.jsx(zt,{type:e.source,style:{fontSize:"18px"}}):null}})):(console.error("用户主菜单没有按预期传入对应数据!"),[])}),[i,c]),l=n.useCallback((function(e){var t=e.key;a(t)}),[a]);return t.jsx(r.Menu,{className:"zmdms-menu--main",items:u,inlineIndent:10,mode:"inline",onMouseEnter:o,onClick:l})},io=n.memo(n.forwardRef((function(e,i){var o=e.marginLeft,a=e.subMenus,s=e.subMenuWidth,c=e.layoutSiderRef,u=e.addTab,l=n.useState(),d=l[0],f=l[1],g=n.useState(),p=g[0],m=g[1],y=n.useCallback((function(){m((function(e){return c.current.style.marginRight=e?0:"".concat(s,"px"),!e}))}),[c,s]),b=t.jsxs(D,v({type:"link",onClick:y},{children:[t.jsx(zt,{type:"icon-toggle",style:{fontSize:"18px"}}),p?"浮动":"固定"]}));n.useImperativeHandle(i,(function(){return{setVisible:function(e){p||f(e)}}}));var x=n.useMemo((function(){var e=function(r,n,i){return void 0===n&&(n=[]),void 0===i&&(i=1),i>=3?null:(i++,Array.isArray(r)&&r.forEach((function(r){var o={label:"/"===r.path?r.name:t.jsx(h.Link,v({to:r.path,onClick:function(){u({key:r.path,path:r.path,label:r.name})}},{children:r.name})),title:r.name,key:r.id,children:Array.isArray(r.children)&&r.children.length>0?e(r.children,[],i):null};n.push(o)})),n)};return e(a)}),[a,u]);return t.jsx(r.Drawer,v({mask:!1,placement:"left",width:s,zIndex:99,closable:!1,open:d,className:"zmdms-menu--sub",style:{marginLeft:o},footer:b},{children:t.jsx(r.Menu,{inlineIndent:10,mode:"inline",items:x})}))}))),oo=[],ao=n.memo((function(e){var r=e.width,i=e.subMenuWidth,o=e.layoutSiderRef,a=e.userMenus,s=e.userSubMenus,c=e.addTab,u=e.logo,l=n.useRef({}),d=n.useState(oo),f=d[0],g=d[1],h=n.useCallback((function(){var e;null===(e=l.current)||void 0===e||e.setVisible(!0)}),[]),p=n.useCallback((function(e){e?s&&g(s[e]):g(oo)}),[s]),m=n.useCallback((function(){var e;null===(e=l.current)||void 0===e||e.setVisible(!1)}),[]);return t.jsxs("div",v({className:"zmdms-menu",onMouseLeave:m},{children:[t.jsx(ro,{logo:u}),t.jsx(no,{userMenus:a,onMouseEnter:h,onMainLinkClick:p,addTab:c}),t.jsx(io,{ref:l,marginLeft:r,subMenuWidth:i,subMenus:f,layoutSiderRef:o,addTab:c})]}))})),so=function(e){var i=e.siderWidth,o=void 0===i?118:i,a=e.subMenuWidth,s=void 0===a?162:a,c=e.userMenus,u=e.userSubMenus,l=e.addTab,d=e.siderBg,f=e.logo,g=n.useRef();return t.jsx(r.Layout.Sider,v({className:"zmdms-sider",collapsedWidth:"0",collapsible:!0,trigger:null,width:o,ref:g,style:{backgroundImage:d}},{children:t.jsx(ao,{width:o,subMenuWidth:s,layoutSiderRef:g,userMenus:c,userSubMenus:u,addTab:l,logo:f})}))};so.displayName="ZTXK_WEBUI_AppLayoutSider";var co=n.memo(so),uo=function(e){var n,i=e.statusBtnConfig,o=e.authUserBtns,a=e.callback,s=function(e){a&&a(e)};return t.jsx(t.Fragment,{children:null===(n=i||[])||void 0===n?void 0:n.map((function(e){var n=e.authority,i=e.confirmMsg,a=e.type,c=e.name,u=!1;return u="boolean"==typeof n?n:void 0===n||!!o.find((function(e){return e.code===n})),i?t.jsx(r.Popconfirm,v({title:i,cancelText:"否",okText:"是",onConfirm:function(){return s(a)}},{children:t.jsx(D,v({type:"link",style:{height:28},disabled:!u},{children:c}))}),a):t.jsx(D,v({type:"link",style:{height:28},onClick:function(){return s(a)},disabled:!u},{children:c}),a)}))})};uo.displayName="ZTXK_WEBUI_OperationBtn",Object.defineProperty(e,"Affix",{enumerable:!0,get:function(){return r.Affix}}),Object.defineProperty(e,"Alert",{enumerable:!0,get:function(){return r.Alert}}),Object.defineProperty(e,"Anchor",{enumerable:!0,get:function(){return r.Anchor}}),Object.defineProperty(e,"AutoComplete",{enumerable:!0,get:function(){return r.AutoComplete}}),Object.defineProperty(e,"Avatar",{enumerable:!0,get:function(){return r.Avatar}}),Object.defineProperty(e,"BackTop",{enumerable:!0,get:function(){return r.BackTop}}),Object.defineProperty(e,"Badge",{enumerable:!0,get:function(){return r.Badge}}),Object.defineProperty(e,"Breadcrumb",{enumerable:!0,get:function(){return r.Breadcrumb}}),Object.defineProperty(e,"Card",{enumerable:!0,get:function(){return r.Card}}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return r.Carousel}}),Object.defineProperty(e,"Cascader",{enumerable:!0,get:function(){return r.Cascader}}),Object.defineProperty(e,"Checkbox",{enumerable:!0,get:function(){return r.Checkbox}}),Object.defineProperty(e,"Col",{enumerable:!0,get:function(){return r.Col}}),Object.defineProperty(e,"Collapse",{enumerable:!0,get:function(){return r.Collapse}}),Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return r.Comment}}),Object.defineProperty(e,"ConfigProvider",{enumerable:!0,get:function(){return r.ConfigProvider}}),Object.defineProperty(e,"Descriptions",{enumerable:!0,get:function(){return r.Descriptions}}),Object.defineProperty(e,"Divider",{enumerable:!0,get:function(){return r.Divider}}),Object.defineProperty(e,"Drawer",{enumerable:!0,get:function(){return r.Drawer}}),Object.defineProperty(e,"Dropdown",{enumerable:!0,get:function(){return r.Dropdown}}),Object.defineProperty(e,"Empty",{enumerable:!0,get:function(){return r.Empty}}),Object.defineProperty(e,"Grid",{enumerable:!0,get:function(){return r.Grid}}),Object.defineProperty(e,"Image",{enumerable:!0,get:function(){return r.Image}}),Object.defineProperty(e,"Layout",{enumerable:!0,get:function(){return r.Layout}}),Object.defineProperty(e,"List",{enumerable:!0,get:function(){return r.List}}),Object.defineProperty(e,"Mentions",{enumerable:!0,get:function(){return r.Mentions}}),Object.defineProperty(e,"Menu",{enumerable:!0,get:function(){return r.Menu}}),Object.defineProperty(e,"PageHeader",{enumerable:!0,get:function(){return r.PageHeader}}),Object.defineProperty(e,"Popconfirm",{enumerable:!0,get:function(){return r.Popconfirm}}),Object.defineProperty(e,"Popover",{enumerable:!0,get:function(){return r.Popover}}),Object.defineProperty(e,"Progress",{enumerable:!0,get:function(){return r.Progress}}),Object.defineProperty(e,"Radio",{enumerable:!0,get:function(){return r.Radio}}),Object.defineProperty(e,"Rate",{enumerable:!0,get:function(){return r.Rate}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return r.Result}}),Object.defineProperty(e,"Row",{enumerable:!0,get:function(){return r.Row}}),Object.defineProperty(e,"Segmented",{enumerable:!0,get:function(){return r.Segmented}}),Object.defineProperty(e,"Select",{enumerable:!0,get:function(){return r.Select}}),Object.defineProperty(e,"Skeleton",{enumerable:!0,get:function(){return r.Skeleton}}),Object.defineProperty(e,"Slider",{enumerable:!0,get:function(){return r.Slider}}),Object.defineProperty(e,"Space",{enumerable:!0,get:function(){return r.Space}}),Object.defineProperty(e,"Spin",{enumerable:!0,get:function(){return r.Spin}}),Object.defineProperty(e,"Statistic",{enumerable:!0,get:function(){return r.Statistic}}),Object.defineProperty(e,"Steps",{enumerable:!0,get:function(){return r.Steps}}),Object.defineProperty(e,"Switch",{enumerable:!0,get:function(){return r.Switch}}),Object.defineProperty(e,"Tag",{enumerable:!0,get:function(){return r.Tag}}),Object.defineProperty(e,"Timeline",{enumerable:!0,get:function(){return r.Timeline}}),Object.defineProperty(e,"Tooltip",{enumerable:!0,get:function(){return r.Tooltip}}),Object.defineProperty(e,"Transfer",{enumerable:!0,get:function(){return r.Transfer}}),Object.defineProperty(e,"Tree",{enumerable:!0,get:function(){return r.Tree}}),Object.defineProperty(e,"TreeSelect",{enumerable:!0,get:function(){return r.TreeSelect}}),Object.defineProperty(e,"Typography",{enumerable:!0,get:function(){return r.Typography}}),Object.defineProperty(e,"Upload",{enumerable:!0,get:function(){return r.Upload}}),Object.defineProperty(e,"message",{enumerable:!0,get:function(){return r.message}}),Object.defineProperty(e,"notification",{enumerable:!0,get:function(){return r.notification}}),e.AppLayout=Xi,e.AppLayoutHeader=to,e.AppLayoutSider=co,e.Button=D,e.Calendar=U,e.Container=wi,e.DatePicker=H,e.DetailList=Vi,e.DynamicSetting=oi,e.Footer=Ci,e.Form=ui,e.FormItem=hi,e.Icon=zt,e.Input=T,e.InputNumber=j,e.Login=K,e.Modal=Ki,e.OperationBtn=uo,e.Pagination=Di,e.ProtectedRoute=function(e){var r=e.hasAuth,n=void 0===r||r,i=e.element,o=e.backLogin;return g.getToken()?n?i:t.jsx("div",{children:"您没有权限访问当前页面!"}):(console.log("当前页面需要登录! 请登录成功后再进行访问!"),o())},e.SuspenseComponent=function(e){var r=e.children;return t.jsx(n.Suspense,v({fallback:t.jsx("div",{children:"loading..."})},{children:r}))},e.Table=Wi,e.Tabs=$i,e.TimePicker=q,e.ZtxkContext=W}));
6
+ */!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)e.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&e.push(a)}}else if("object"===o){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){e.push(i.toString());continue}for(var s in i)t.call(i,s)&&i[s]&&e.push(s)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(O);var C=w(O.exports),D=function(e){var r,i=e.type,o=e.className,a=e.disabled,s=e.size,c=e.danger,u=e.onClick,l=y(e,["type","className","disabled","size","danger","onClick"]),d=C("zt-btn",o,((r={})["zt-btn-".concat(i)]=i,r["zt-btn-disabled"]=a,r["zt-btn-".concat(s)]=s,r["zt-btn-dangerous"]=c,r)),f={canClick:!0};return t.jsx(n.Button,v({className:d,type:i,disabled:a,size:s,danger:c,onClick:function(e){f.canClick&&u&&u(e,f)}},l))};D.displayName="ZTXK_WEBUI_Button";var T=r.memo(r.forwardRef((function(e,r){return t.jsx(n.Input,v({},e,{ref:r}))})));T.displayName="ZTXK_WEBUI_Input",T.Group=n.Input.Group,T.Search=n.Input.Search,T.TextArea=n.Input.TextArea,T.Password=n.Input.Password;function I(e,t,n){return e&&!isNaN(Number(e))&&!t.current&&n?Number(e).toFixed(n):e}function k(e,t){if(!e)return e;var n=e.lastIndexOf("."),r=e,i="";return-1!==n&&(r=e.substring(0,n),i=e.substring(n+1)),t&&(i=i.length<t?i:i.substring(0,t)),i?r+"."+i:r}var E=function(e,i){var o=e.formatterType,a=(e.currencySymbol,e.formatter),s=e.parser,c=e.precision,u=e.onBlur,l=e.onFocus,d=y(e,["formatterType","currencySymbol","formatter","parser","precision","onBlur","onFocus"]),f=r.useRef(!1),g=function(e,t,n,r){return"currency"===e?{formatter:function(e){return function(e){if(null!=e){var t=e.toString(),n="",r="";t.startsWith("-")&&(n="-",t=t.slice(1));var i=t.indexOf(".");-1!==i?(e=t.slice(0,i),r=t.slice(i)):e=t;for(var o="",a=e.toString(),s=a.length,c=s-1;c>=0;c--)o=(s-c)%3==0?0===c?a[c]+o:","+a[c]+o:a[c]+o;return n+o+r}return e}(I(e,n,r))},parser:function(e){return k(e.replace(/(,*)/g,""),r)},precision:3}:"percent"===e?{formatter:function(e){var t=I(e,n,r);return"".concat(t,"%")},parser:function(e){return e?e.replace("%",""):Number(e)},precision:2}:"thousands"===e?{formatter:function(e){var t=I(e,n,r);return"".concat(t,"‰")},parser:function(e){return e?e.replace("‰",""):Number(e)},precision:2}:{formatter:function(e){return I(e,n,r)},parser:function(e){return k(e,r)},precision:r}}(o,0,f,c),h=g.formatter,p=g.parser,m=g.precision;return t.jsx(n.InputNumber,v({formatter:a||h,parser:s||p,precision:null!=c?c:m,onBlur:function(e){f.current=!1,u&&u(e)},onFocus:function(e){f.current=!0,l&&l(e)}},d,{ref:i}))};E.displayName="ZTXK_WEBUI_InputNumber";var j=r.memo(r.forwardRef(E)),N={};function P(e,t){}function A(e,t){}function M(e,t,n){t||N[n]||(e(!1,n),N[n]=!0)}function R(e,t){M(P,e,t)}function _(e,t){M(A,e,t)}R.preMessage=function(e){},R.resetWarned=function(){N={}},R.noteOnce=_,i.extend(l),i.extend(u),i.extend(o),i.extend(a),i.extend(s),i.extend(c),i.extend((function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||"").replace("Wo","wo");return r.bind(this)(t)}}));var L={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},z=function(e){return L[e]||e.split("_")[0]},F=function(){_(!1,"Not match any format. Please help to fire a issue about this.")},B={getNow:function(){return i()},getFixedDate:function(e){return i(e,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(e){return e.endOf("month")},getWeekDay:function(e){var t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return e.year()},getMonth:function(e){return e.month()},getDate:function(e){return e.date()},getHour:function(e){return e.hour()},getMinute:function(e){return e.minute()},getSecond:function(e){return e.second()},addYear:function(e,t){return e.add(t,"year")},addMonth:function(e,t){return e.add(t,"month")},addDate:function(e,t){return e.add(t,"day")},setYear:function(e,t){return e.year(t)},setMonth:function(e,t){return e.month(t)},setDate:function(e,t){return e.date(t)},setHour:function(e,t){return e.hour(t)},setMinute:function(e,t){return e.minute(t)},setSecond:function(e,t){return e.second(t)},isAfter:function(e,t){return e.isAfter(t)},isValidate:function(e){return e.isValid()},locale:{getWeekFirstDay:function(e){return i().locale(z(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return t.locale(z(e)).weekday(0)},getWeek:function(e,t){return t.locale(z(e)).week()},getShortWeekDays:function(e){return i().locale(z(e)).localeData().weekdaysMin()},getShortMonths:function(e){return i().locale(z(e)).localeData().monthsShort()},format:function(e,t,n){return t.locale(z(e)).format(n)},parse:function(e,t,n){for(var r=z(e),o=0;o<n.length;o+=1){var a=n[o],s=t;if(a.includes("wo")||a.includes("Wo")){for(var c=s.split("-")[0],u=s.split("-")[1],l=i(c,"YYYY").startOf("year").locale(r),d=0;d<=52;d+=1){var f=l.add(d,"week");if(f.format("Wo")===u)return f}return F(),null}var g=i(s,a).locale(r);if(g.isValid())return g}return t&&F(),null}}},H=d(B),U=f(B),q=r.forwardRef((function(e,n){return t.jsx(H,v({},e,{picker:"time",mode:void 0,ref:n}))}));q.displayName="TimePicker";var W=r.createContext({locale:"zh-cn"});var $=n.Form.Item,K=function(e){var r=e.loginLogo,i=e.loginBg,o=e.onFinishHandle,a=e.loading,s=n.Form.useForm()[0];return t.jsx("div",v({className:"login-wrap",style:{backgroundImage:"url(".concat(i,")")}},{children:t.jsxs(n.Form,v({form:s,requiredMark:!1,layout:"vertical",className:"login-form",onFinish:function(e){o&&o(e)}},{children:[t.jsx("div",v({className:"login-logo"},{children:t.jsx("img",{src:r,title:"浙商中拓ERP",alt:"zszt_logo"})})),t.jsx($,v({label:"请输入您的账号",name:"username",rules:[{required:!0,message:"请输入您的账号"}]},{children:t.jsx(T,{size:"large",prefix:t.jsx(zt,{type:"icon-yonghu",style:{fontSize:"14px",color:"rgba(0,0,0,.65)"}})})})),t.jsx($,v({label:"请输入您的密码",name:"password",rules:[{required:!0,message:"请输入您的密码"}]},{children:t.jsx(T.Password,{size:"large",prefix:t.jsx(zt,{type:"icon-mima",style:{fontSize:"14px",color:"rgba(0,0,0,.65)"}})})})),t.jsx($,{children:t.jsx(D,v({htmlType:"submit",block:!0,className:"form__item--button",loading:a},{children:"登录"}))}),t.jsxs("div",v({className:"form__item--remember"},{children:[t.jsx($,v({name:"remember",valuePropName:"checked"},{children:t.jsx(n.Checkbox,{children:"记住密码"})})),t.jsx("div",v({className:"form__item--remember-forget"},{children:"忘记密码"}))]}))]}))}))};K.displayName="ZTXK_WEBUI_Login";var V=r.createContext({});function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function X(e){var t=function(e,t){if("object"!==Y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Y(t)?t:String(t)}function G(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){G(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ne(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function re(e){return e<=1?"".concat(100*Number(e),"%"):e}function ie(e){return 1===e.length?"0"+e:String(e)}function oe(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ae(e){return se(e)/255}function se(e){return parseInt(e,16)}var ce={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ue(e){var t,n,r,i={r:0,g:0,b:0},o=1,a=null,s=null,c=null,u=!1,l=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(ce[e])e=ce[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=ge.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=ge.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=ge.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=ge.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=ge.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=ge.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=ge.hex8.exec(e),n)return{r:se(n[1]),g:se(n[2]),b:se(n[3]),a:ae(n[4]),format:t?"name":"hex8"};if(n=ge.hex6.exec(e),n)return{r:se(n[1]),g:se(n[2]),b:se(n[3]),format:t?"name":"hex"};if(n=ge.hex4.exec(e),n)return{r:se(n[1]+n[1]),g:se(n[2]+n[2]),b:se(n[3]+n[3]),a:ae(n[4]+n[4]),format:t?"name":"hex8"};if(n=ge.hex3.exec(e),n)return{r:se(n[1]+n[1]),g:se(n[2]+n[2]),b:se(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(he(e.r)&&he(e.g)&&he(e.b)?(t=e.r,n=e.g,r=e.b,i={r:255*ne(t,255),g:255*ne(n,255),b:255*ne(r,255)},u=!0,l="%"===String(e.r).substr(-1)?"prgb":"rgb"):he(e.h)&&he(e.s)&&he(e.v)?(a=re(e.s),s=re(e.v),i=function(e,t,n){e=6*ne(e,360),t=ne(t,100),n=ne(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6;return{r:255*[n,a,o,o,s,n][c],g:255*[s,n,n,a,o,o][c],b:255*[o,o,s,n,n,a][c]}}(e.h,a,s),u=!0,l="hsv"):he(e.h)&&he(e.s)&&he(e.l)&&(a=re(e.s),c=re(e.l),i=function(e,t,n){var r,i,o;if(e=ne(e,360),t=ne(t,100),n=ne(n,100),0===t)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=oe(s,a,e+1/3),i=oe(s,a,e),o=oe(s,a,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,a,c),u=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(o),{ok:u,format:e.format||l,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o}}var le="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),de="[\\s|\\(]+(".concat(le,")[,|\\s]+(").concat(le,")[,|\\s]+(").concat(le,")\\s*\\)?"),fe="[\\s|\\(]+(".concat(le,")[,|\\s]+(").concat(le,")[,|\\s]+(").concat(le,")[,|\\s]+(").concat(le,")\\s*\\)?"),ge={CSS_UNIT:new RegExp(le),rgb:new RegExp("rgb"+de),rgba:new RegExp("rgba"+fe),hsl:new RegExp("hsl"+de),hsla:new RegExp("hsla"+fe),hsv:new RegExp("hsv"+de),hsva:new RegExp("hsva"+fe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function he(e){return Boolean(ge.CSS_UNIT.exec(String(e)))}var pe=2,me=.16,ve=.05,ye=.05,be=.15,xe=5,Se=4,we=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Oe(e){var t=function(e,t,n){e=ne(e,255),t=ne(t,255),n=ne(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,c=0===r?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:c,v:a}}(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function Ce(e){var t=e.r,n=e.g,r=e.b;return"#".concat(function(e,t,n,r){var i=[ie(Math.round(e).toString(16)),ie(Math.round(t).toString(16)),ie(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}(t,n,r,!1))}function De(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-pe*t:Math.round(e.h)+pe*t:n?Math.round(e.h)+pe*t:Math.round(e.h)-pe*t)<0?r+=360:r>=360&&(r-=360),r}function Te(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-me*t:t===Se?e.s+me:e.s+ve*t)>1&&(r=1),n&&t===xe&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Ie(e,t,n){var r;return(r=n?e.v+ye*t:e.v-be*t)>1&&(r=1),Number(r.toFixed(2))}function ke(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=ue(e),i=xe;i>0;i-=1){var o=Oe(r),a=Ce(ue({h:De(o,i,!0),s:Te(o,i,!0),v:Ie(o,i,!0)}));n.push(a)}n.push(Ce(r));for(var s=1;s<=Se;s+=1){var c=Oe(r),u=Ce(ue({h:De(c,s),s:Te(c,s),v:Ie(c,s)}));n.push(u)}return"dark"===t.theme?we.map((function(e){var r,i,o,a=e.index,s=e.opacity;return Ce((r=ue(t.backgroundColor||"#141414"),i=ue(n[a]),o=100*s/100,{r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b}))})):n}var Ee={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},je={},Ne={};Object.keys(Ee).forEach((function(e){je[e]=ke(Ee[e]),je[e].primary=je[e][5],Ne[e]=ke(Ee[e],{theme:"dark",backgroundColor:"#141414"}),Ne[e].primary=Ne[e][5]}));var Pe="data-rc-order",Ae="rc-util-key",Me=new Map;function Re(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):Ae}function _e(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Le(e){return Array.from((Me.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"==typeof window||!window.document||!window.document.createElement)return null;var n=t.csp,r=t.prepend,i=document.createElement("style");i.setAttribute(Pe,function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r)),null!=n&&n.nonce&&(i.nonce=null==n?void 0:n.nonce),i.innerHTML=e;var o=_e(t),a=o.firstChild;if(r){if("queue"===r){var s=Le(o).filter((function(e){return["prepend","prependQueue"].includes(e.getAttribute(Pe))}));if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=Me.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var r=ze("",t),i=r.parentNode;Me.set(e,i),e.removeChild(r)}}(_e(n),n);var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Le(_e(t)).find((function(n){return n.getAttribute(Re(t))===e}))}(t,n);if(r){var i,o,a;if(null!==(i=n.csp)&&void 0!==i&&i.nonce&&r.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce))r.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce;return r.innerHTML!==e&&(r.innerHTML=e),r}var s=ze(e,n);return s.setAttribute(Re(n),t),s}function Be(e,t){R(e,"[@ant-design/icons] ".concat(t))}function He(e){return"object"===Y(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===Y(e.icon)||"function"==typeof e.icon)}function Ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else t[n]=r;return t}),{})}function qe(e,t,n){return n?r.createElement(e.tag,J(J({key:t},Ue(e.attrs)),n),(e.children||[]).map((function(n,r){return qe(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):r.createElement(e.tag,J({key:t},Ue(e.attrs)),(e.children||[]).map((function(n,r){return qe(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function We(e){return ke(e)[0]}function $e(e){return e?Array.isArray(e)?e:[e]:[]}var Ke={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},Ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",t=r.useContext(V).csp;r.useEffect((function(){Fe(e,"@ant-design-icons",{prepend:!0,csp:t})}),[])},Ye=["icon","className","onClick","style","primaryColor","secondaryColor"],Xe={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var Ge=function(e){var t=e.icon,n=e.className,r=e.onClick,i=e.style,o=e.primaryColor,a=e.secondaryColor,s=te(e,Ye),c=Xe;if(o&&(c={primaryColor:o,secondaryColor:a||We(o)}),Ve(),Be(He(t),"icon should be icon definiton, but got ".concat(t)),!He(t))return null;var u=t;return u&&"function"==typeof u.icon&&(u=J(J({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),qe(u.icon,"svg-".concat(u.name),J({className:n,onClick:r,style:i,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s))};Ge.displayName="IconReact",Ge.getTwoToneColors=function(){return J({},Xe)},Ge.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;Xe.primaryColor=t,Xe.secondaryColor=n||We(t),Xe.calculated=!!n};var Ze=Ge;function Je(e){var t=ee($e(e),2),n=t[0],r=t[1];return Ze.setTwoToneColors({primaryColor:n,secondaryColor:r})}var Qe=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Je("#1890ff");var et=m.forwardRef((function(e,t){var n,r=e.className,i=e.icon,o=e.spin,a=e.rotate,s=e.tabIndex,c=e.onClick,u=e.twoToneColor,l=te(e,Qe),d=m.useContext(V),f=d.prefixCls,g=void 0===f?"anticon":f,h=d.rootClassName,p=C(h,g,(G(n={},"".concat(g,"-").concat(i.name),!!i.name),G(n,"".concat(g,"-spin"),!!o||"loading"===i.name),n),r),v=s;void 0===v&&c&&(v=-1);var y=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,b=ee($e(u),2),x=b[0],S=b[1];return m.createElement("span",J(J({role:"img","aria-label":i.name},l),{},{ref:t,tabIndex:v,onClick:c,className:p}),m.createElement(Ze,{icon:i,primaryColor:x,secondaryColor:S,style:y}))}));et.displayName="AntdIcon",et.getTwoToneColor=function(){var e=Ze.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},et.setTwoToneColor=Je;var tt=et,nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"},rt=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:nt}))};rt.displayName="ArrowsAltOutlined";var it=m.forwardRef(rt),ot={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},at=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:ot}))};at.displayName="LogoutOutlined";var st=m.forwardRef(at),ct={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"},ut=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:ct}))};ut.displayName="MinusOutlined";var lt=m.forwardRef(ut),dt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},ft=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:dt}))};ft.displayName="MinusSquareOutlined";var gt=m.forwardRef(ft),ht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M952 792H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-632H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-24 500c8.8 0 16-7.2 16-16V380c0-8.8-7.2-16-16-16H416c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h512zM472 436h400v152H472V436zM80 646c0 4.4 3.6 8 8 8h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56zm8-204h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z"}}]},name:"pic-right",theme:"outlined"},pt=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:ht}))};pt.displayName="PicRightOutlined";var mt=m.forwardRef(pt),vt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},yt=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:vt}))};yt.displayName="PlusOutlined";var bt=m.forwardRef(yt),xt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},St=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:xt}))};St.displayName="SettingOutlined";var wt=m.forwardRef(St),Ot={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z"}}]},name:"shrink",theme:"outlined"},Ct=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:Ot}))};Ct.displayName="ShrinkOutlined";var Dt=m.forwardRef(Ct),Tt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"},It=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:Tt}))};It.displayName="UnlockOutlined";var kt=m.forwardRef(It),Et={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},jt=function(e,t){return m.createElement(tt,J(J({},e),{},{ref:t,icon:Et}))};jt.displayName="UserOutlined";var Nt=m.forwardRef(jt),Pt=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],At=m.forwardRef((function(e,t){var n=e.className,r=e.component,i=e.viewBox,o=e.spin,a=e.rotate,s=e.tabIndex,c=e.onClick,u=e.children,l=te(e,Pt);Be(Boolean(r||u),"Should have `component` prop or `children`."),Ve();var d=m.useContext(V),f=d.prefixCls,g=void 0===f?"anticon":f,h=d.rootClassName,p=C(h,g,n),v=C(G({},"".concat(g,"-spin"),!!o)),y=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,b=J(J({},Ke),{},{className:v,style:y,viewBox:i});i||delete b.viewBox;var x=s;return void 0===x&&c&&(x=-1),m.createElement("span",J(J({role:"img"},l),{},{ref:t,tabIndex:x,onClick:c,className:p}),r?m.createElement(r,J({},b),u):u?(Be(Boolean(i)||1===m.Children.count(u)&&m.isValidElement(u)&&"use"===m.Children.only(u).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),m.createElement("svg",J(J({},b),{},{viewBox:i}),u)):null)}));At.displayName="AntdIcon";var Mt=At,Rt=["type","children"],_t=new Set;function Lt(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e[n];if(t=r,Boolean("string"==typeof t&&t.length&&!_t.has(t))){var i=document.createElement("script");i.setAttribute("src",r),i.setAttribute("data-namespace",r),e.length>n+1&&(i.onload=function(){Lt(e,n+1)},i.onerror=function(){Lt(e,n+1)}),_t.add(r),document.body.appendChild(i)}}var zt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,n=e.extraCommonProps,r=void 0===n?{}:n;t&&"undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&(Array.isArray(t)?Lt(t.reverse()):Lt([t]));var i=m.forwardRef((function(e,t){var n=e.type,i=e.children,o=te(e,Rt),a=null;return e.type&&(a=m.createElement("use",{xlinkHref:"#".concat(n)})),i&&(a=i),m.createElement(Mt,J(J(J({},r),o),{},{ref:t}),a)}));return i.displayName="Iconfont",i}({scriptUrl:["//at.alicdn.com/t/c/font_4078313_tg40lf02k9.js"]});const Ft=r.createContext({dragDropManager:void 0});function Bt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ht="function"==typeof Symbol&&Symbol.observable||"@@observable",Ut=function(){return Math.random().toString(36).substring(7).split("").join(".")},qt={INIT:"@@redux/INIT"+Ut(),REPLACE:"@@redux/REPLACE"+Ut(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ut()}};function Wt(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Bt(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Bt(1));return n(Wt)(e,t)}if("function"!=typeof e)throw new Error(Bt(2));var i=e,o=t,a=[],s=a,c=!1;function u(){s===a&&(s=a.slice())}function l(){if(c)throw new Error(Bt(3));return o}function d(e){if("function"!=typeof e)throw new Error(Bt(4));if(c)throw new Error(Bt(5));var t=!0;return u(),s.push(e),function(){if(t){if(c)throw new Error(Bt(6));t=!1,u();var n=s.indexOf(e);s.splice(n,1),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(Bt(7));if(void 0===e.type)throw new Error(Bt(8));if(c)throw new Error(Bt(9));try{c=!0,o=i(o,e)}finally{c=!1}for(var t=a=s,n=0;n<t.length;n++){(0,t[n])()}return e}return f({type:qt.INIT}),(r={dispatch:f,subscribe:d,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Bt(10));i=e,f({type:qt.REPLACE})}})[Ht]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Bt(11));function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[Ht]=function(){return this},e},r}function $t(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,(function(){return n[r++]}))),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function Kt(e){return"object"==typeof e}const Vt="dnd-core/INIT_COORDS",Yt="dnd-core/BEGIN_DRAG",Xt="dnd-core/PUBLISH_DRAG_SOURCE",Gt="dnd-core/HOVER",Zt="dnd-core/DROP",Jt="dnd-core/END_DRAG";function Qt(e,t){return{type:Vt,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const en={type:Vt,payload:{clientOffset:null,sourceClientOffset:null}};function tn(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:i,getSourceClientOffset:o}=n,a=e.getMonitor(),s=e.getRegistry();e.dispatch(Qt(i)),function(e,t,n){$t(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){$t(n.getSource(e),"Expected sourceIds to be registered.")}))}(t,a,s);const c=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,a);if(null==c)return void e.dispatch(en);let u=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");!function(e){$t("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(o),u=o(c)}e.dispatch(Qt(i,u));const l=s.getSource(c).beginDrag(a,c);if(null==l)return;!function(e){$t(Kt(e),"Item must be an object.")}(l),s.pinSource(c);const d=s.getSourceType(c);return{type:Yt,payload:{itemType:d,item:l,sourceId:c,clientOffset:i||null,sourceClientOffset:u||null,isSourcePublic:!!r}}}}function nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nn(e,t,n[t])}))}return e}function on(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){$t(e.isDragging(),"Cannot call drop while not dragging."),$t(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const i=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);i.forEach(((i,o)=>{const a=function(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;(function(e){$t(void 0===e||Kt(e),"Drop result must either be an object or undefined.")})(o),void 0===o&&(o=0===t?{}:r.getDropResult());return o}(i,o,r,n),s={type:Zt,payload:{dropResult:rn({},t,a)}};e.dispatch(s)}))}}function an(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){$t(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:Jt}}}function sn(e,t){return null===t?null===e:Array.isArray(e)?e.some((e=>e===t)):e===t}function cn(e){return function(t,{clientOffset:n}={}){!function(e){$t(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),i=e.getMonitor(),o=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r];sn(t.getTargetType(i),n)||e.splice(r,1)}}(r,o,i.getItemType()),function(e,t,n){$t(t.isDragging(),"Cannot call hover while not dragging."),$t(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const r=e[t];$t(e.lastIndexOf(r)===t,"Expected targetIds to be unique in the passed array.");$t(n.getTarget(r),"Expected targetIds to be registered.")}}(r,i,o),function(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}(r,i,o),{type:Gt,payload:{targetIds:r,clientOffset:n||null}}}}function un(e){return function(){if(e.getMonitor().isDragging())return{type:Xt}}}class ln{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:tn(e),publishDragSource:un(e),hover:cn(e),drop:on(e),endDrag:an(e)}}(this);return Object.keys(n).reduce(((r,i)=>{const o=n[i];var a;return r[i]=(a=o,(...n)=>{const r=a.apply(e,n);void 0!==r&&t(r)}),r}),{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function dn(e,t){return{x:e.x-t.x,y:e.y-t.y}}const fn=[],gn=[];fn.__IS_NONE__=!0,gn.__IS_ALL__=!0;class hn{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;$t("function"==typeof e,"listener must be a function."),$t(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe((()=>{const t=this.store.getState(),i=t.stateId;try{const o=i===r||i===r+1&&!function(e,t){return e!==fn&&(e===gn||void 0===t||(n=e,t.filter((e=>n.indexOf(e)>-1))).length>0);var n}(t.dirtyHandlerIds,n);o||e()}finally{r=i}}))}subscribeToOffsetChange(e){$t("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe((()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())}))}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return $t(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if($t(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return sn(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if($t(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!sn(r,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(e);return n?a===o.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?dn((o=r,{x:(i=t).x+o.x,y:i.y+o.y}),n):null;var i,o}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?dn(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const pn="undefined"!=typeof global?global:self,mn=pn.MutationObserver||pn.WebKitMutationObserver;function vn(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const yn="function"==typeof mn?function(e){let t=1;const n=new mn(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:vn;class bn{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const xn=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=yn(this.flush),this.requestErrorThrow=vn((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},Sn=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new bn(this.onError,(e=>t[t.length]=e));return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(xn.registerPendingError);const wn="dnd-core/ADD_SOURCE",On="dnd-core/ADD_TARGET",Cn="dnd-core/REMOVE_SOURCE",Dn="dnd-core/REMOVE_TARGET";function Tn(e,t){t&&Array.isArray(e)?e.forEach((e=>Tn(e,!1))):$t("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var In;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(In||(In={}));let kn=0;function En(e){const t=(kn++).toString();switch(e){case In.SOURCE:return`S${t}`;case In.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function jn(e){switch(e[0]){case"S":return In.SOURCE;case"T":return In.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Nn(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}class Pn{addSource(e,t){Tn(e),function(e){$t("function"==typeof e.canDrag,"Expected canDrag to be a function."),$t("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),$t("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(In.SOURCE,e,t);return this.store.dispatch(function(e){return{type:wn,payload:{sourceId:e}}}(n)),n}addTarget(e,t){Tn(e,!0),function(e){$t("function"==typeof e.canDrop,"Expected canDrop to be a function."),$t("function"==typeof e.hover,"Expected hover to be a function."),$t("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(In.TARGET,e,t);return this.store.dispatch(function(e){return{type:On,payload:{targetId:e}}}(n)),n}containsHandler(e){return Nn(this.dragSources,e)||Nn(this.dropTargets,e)}getSource(e,t=!1){$t(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return $t(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return $t(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return $t(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return jn(e)===In.SOURCE}isTargetId(e){return jn(e)===In.TARGET}removeSource(e){var t;$t(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Cn,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},xn.enqueueTask(Sn.create(t))}removeTarget(e){$t(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Dn,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);$t(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){$t(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=En(e);return this.types.set(r,t),e===In.SOURCE?this.dragSources.set(r,n):e===In.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const An=(e,t)=>e===t;function Mn(e=fn,t){switch(t.type){case Gt:break;case wn:case On:case Dn:case Cn:return fn;default:return gn}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach(((e,t)=>{1===e&&i.push(t)})),i}(n,r),o=i.length>0||!function(e,t,n=An){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r);if(!o)return fn;const a=r[r.length-1],s=n[n.length-1];return a!==s&&(a&&i.push(a),s&&i.push(s)),i}function Rn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _n={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ln(e=_n,t){const{payload:n}=t;switch(t.type){case Vt:case Yt:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Gt:return r=e.clientOffset,i=n.clientOffset,!r&&!i||r&&i&&r.x===i.x&&r.y===i.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Rn(e,t,n[t])}))}return e}({},e,{clientOffset:n.clientOffset});case Jt:case Zt:return _n;default:return e}var r,i}function zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){zn(e,t,n[t])}))}return e}const Bn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Hn(e=Bn,t){const{payload:n}=t;switch(t.type){case Yt:return Fn({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Xt:return Fn({},e,{isSourcePublic:!0});case Gt:return Fn({},e,{targetIds:n.targetIds});case Dn:return-1===e.targetIds.indexOf(n.targetId)?e:Fn({},e,{targetIds:(r=e.targetIds,i=n.targetId,r.filter((e=>e!==i)))});case Zt:return Fn({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Jt:return Fn({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,i}function Un(e=0,t){switch(t.type){case wn:case On:return e+1;case Cn:case Dn:return e-1;default:return e}}function qn(e=0){return e+1}function Wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Wn(e,t,n[t])}))}return e}function Kn(e={},t){return{dirtyHandlerIds:Mn(e.dirtyHandlerIds,{type:t.type,payload:$n({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",i=[],r.split(".").reduce(((e,t)=>e&&e[t]?e[t]:i||null),n))})}),dragOffset:Ln(e.dragOffset,t),refCount:Un(e.refCount,t),dragOperation:Hn(e.dragOperation,t),stateId:qn(e.stateId)};var n,r,i}function Vn(e,t=void 0,n={},r=!1){const i=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Wt(Kn,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),o=new hn(i,new Pn(i)),a=new ln(i,o),s=e(a,t,n);return a.receiveBackend(s),a}function Yn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}let Xn=0;const Gn=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Zn=r.memo((function(e){var{children:n}=e,i=Yn(e,["children"]);const[o,a]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e,t=Jn(),n,r){const i=t;i[Gn]||(i[Gn]={dragDropManager:Vn(e,t,n,r)});return i[Gn]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(i);return r.useEffect((()=>{if(a){const e=Jn();return++Xn,()=>{0==--Xn&&(e[Gn]=null)}}}),[]),t.jsx(Ft.Provider,{value:o,children:n})}));function Jn(){return"undefined"!=typeof global?global:window}var Qn=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n},er=w(Qn);const tr="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function nr(e,t,n){const[i,o]=function(e,t,n){const[i,o]=r.useState((()=>t(e))),a=r.useCallback((()=>{const r=t(e);er(i,r)||(o(r),n&&n())}),[i,e,n]);return tr(a),[i,a]}(e,t,n);return tr((function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(o,{handlerIds:[t]})}),[e,o]),i}function rr(e,t,n){return nr(t,e||(()=>({})),(()=>n.reconnect()))}function ir(e,t){const n=[...t||[]];return null==t&&"function"!=typeof e&&n.push(e),r.useMemo((()=>"function"==typeof e?e():e),n)}function or(e){return r.useMemo((()=>e.hooks.dragSource()),[e])}function ar(e){return r.useMemo((()=>e.hooks.dragPreview()),[e])}let sr=!1,cr=!1;class ur{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){$t(!sr,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return sr=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{sr=!1}}isDragging(){if(!this.sourceId)return!1;$t(!cr,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return cr=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{cr=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let lr=!1;class dr{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;$t(!lr,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return lr=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{lr=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function fr(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let a=0;a<o.length;a++){const c=o[a];if(!s(c))return!1;const u=e[c],l=t[c];if(i=n?n.call(r,u,l,c):void 0,!1===i||void 0===i&&u!==l)return!1}return!0}function gr(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function hr(e){return(t=null,n=null)=>{if(!r.isValidElement(t)){const r=t;return e(r,n),r}const i=t;!function(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}(i);return function(e,t){const n=e.ref;return $t("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?r.cloneElement(e,{ref:e=>{mr(n,e),mr(t,e)}}):r.cloneElement(e,{ref:t})}(i,n?t=>e(t,n):e)}}function pr(e){const t={};return Object.keys(e).forEach((n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=hr(r);t[n]=()=>e}})),t}function mr(e,t){"function"==typeof e?e(t):e.current=t}class vr{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!fr(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!fr(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=pr({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,gr(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,gr(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class yr{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!fr(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=pr({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,gr(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function br(){const{dragDropManager:e}=r.useContext(Ft);return $t(null!=e,"Expected drag drop context"),e}class xr{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function Sr(e,t,n){const i=br(),o=function(e,t,n){const i=r.useMemo((()=>new xr(e,t,n)),[t,n]);return r.useEffect((()=>{i.spec=e}),[e]),i}(e,t,n),a=function(e){return r.useMemo((()=>{const t=e.type;return $t(null!=t,"spec.type must be defined"),t}),[e])}(e);tr((function(){if(null!=a){const[e,r]=function(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}(a,o,i);return t.receiveHandlerId(e),n.receiveHandlerId(e),r}}),[i,t,n,o,a])}function wr(e,t){const n=ir(e,t);$t(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const i=function(){const e=br();return r.useMemo((()=>new ur(e)),[e])}(),o=function(e,t){const n=br(),i=r.useMemo((()=>new vr(n.getBackend())),[n]);return tr((()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource())),[i,e]),tr((()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview())),[i,t]),i}(n.options,n.previewOptions);return Sr(n,i,o),[rr(n.collect,i,o),or(o),ar(o)]}function Or(e){return r.useMemo((()=>e.hooks.dropTarget()),[e])}class Cr{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function Dr(e,t,n){const i=br(),o=function(e,t){const n=r.useMemo((()=>new Cr(e,t)),[t]);return r.useEffect((()=>{n.spec=e}),[e]),n}(e,t),a=function(e){const{accept:t}=e;return r.useMemo((()=>($t(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t])),[t])}(e);tr((function(){const[e,r]=function(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}(a,o,i);return t.receiveHandlerId(e),n.receiveHandlerId(e),r}),[i,t,o,n,a.map((e=>e.toString())).join("|")])}function Tr(e,t){const n=ir(e,t),i=function(){const e=br();return r.useMemo((()=>new dr(e)),[e])}(),o=function(e){const t=br(),n=r.useMemo((()=>new yr(t.getBackend())),[t]);return tr((()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget())),[e]),n}(n.options);return Dr(n,i,o),[rr(n.collect,i,o),Or(o)]}function Ir(e){let t=null;return()=>(null==t&&(t=e()),t)}class kr{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const i=[];return n.forEach((e=>i.push(e))),i}(this.entered.filter((t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e)))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter((e=>e!==r))),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class Er{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach((e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})}))}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach((n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})})),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const jr="__NATIVE_FILE__",Nr="__NATIVE_URL__",Pr="__NATIVE_TEXT__",Ar="__NATIVE_HTML__";var Mr=Object.freeze({__proto__:null,FILE:jr,HTML:Ar,TEXT:Pr,URL:Nr});function Rr(e,t,n){const r=t.reduce(((t,n)=>t||e.getData(n)),"");return null!=r?r:n}const _r={[jr]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Ar]:{exposeProperties:{html:(e,t)=>Rr(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Nr]:{exposeProperties:{urls:(e,t)=>Rr(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Pr]:{exposeProperties:{text:(e,t)=>Rr(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Lr(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(_r).filter((e=>{const n=_r[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some((e=>t.indexOf(e)>-1))}))[0]||null}const zr=Ir((()=>/firefox/i.test(navigator.userAgent))),Fr=Ir((()=>Boolean(window.safari)));class Br{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:i,c3s:o}=this;let a=t.length-1;if(e===t[a])return n[a];let s,c=0,u=o.length-1;for(;c<=u;){s=Math.floor(.5*(c+u));const r=t[s];if(r<e)c=s+1;else{if(!(r>e))return n[s];u=s-1}}a=Math.max(0,u);const l=e-t[a],d=l*l;return n[a]+r[a]*l+i[a]*d+o[a]*l*d}constructor(e,t){const{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort(((t,n)=>e[t]<e[n]?-1:1));const i=[],o=[];let a,s;for(let r=0;r<n-1;r++)a=e[r+1]-e[r],s=t[r+1]-t[r],i.push(a),o.push(s/a);const c=[o[0]];for(let e=0;e<i.length-1;e++){const t=o[e],n=o[e+1];if(t*n<=0)c.push(0);else{a=i[e];const r=i[e+1],o=a+r;c.push(3*o/((o+r)/t+(o+a)/n))}}c.push(o[o.length-1]);const u=[],l=[];let d;for(let e=0;e<c.length-1;e++){d=o[e];const t=c[e],n=1/i[e],r=t+c[e+1]-d-d;u.push((d-t-r)*n),l.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=c,this.c2s=u,this.c3s=l}}const Hr=1;function Ur(e){const t=e.nodeType===Hr?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function qr(e){return{x:e.clientX,y:e.clientY}}function Wr(e,t,n,r,i){const o="IMG"===(a=t).nodeName&&(zr()||!(null===(s=document.documentElement)||void 0===s?void 0:s.contains(a)));var a,s;const c=Ur(o?e:t),u={x:n.x-c.x,y:n.y-c.y},{offsetWidth:l,offsetHeight:d}=e,{anchorX:f,anchorY:g}=r,{dragPreviewWidth:h,dragPreviewHeight:p}=function(e,t,n,r){let i=e?t.width:n,o=e?t.height:r;return Fr()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(o,t,l,d),{offsetX:m,offsetY:v}=i,y=0===v||v;return{x:0===m||m?m:new Br([0,.5,1],[u.x,u.x/l*h,u.x+h-l]).interpolate(f),y:y?v:(()=>{let e=new Br([0,.5,1],[u.y,u.y/d*p,u.y+p-d]).interpolate(g);return Fr()&&o&&(e+=(window.devicePixelRatio-1)*p),e})()}}class $r{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function Kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Kr(e,t,n[t])}))}return e}class Yr{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",i),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Vr({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return Vr({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Mr).some((t=>Mr[t]===e))}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=_r[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new Er(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout((()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&Ur(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame((()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null})))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=qr(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,i=Lr(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){const{anchorX:e,anchorY:o,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=Wr(t,i,n,{anchorX:e,anchorY:o},{offsetX:a,offsetY:s});r.setDragImage(i,c.x,c.y)}}try{null==r||r.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout((()=>this.actions.publishDragSource()),0)}else if(i)this.beginDragNativeItem(i);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=Lr(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:qr(e)});t.some((e=>this.monitor.canDropOnTarget(e)))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=qr(e),this.scheduleHover(t);(t||[]).some((e=>this.monitor.canDropOnTarget(e)))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout((()=>this.endDragNativeItem()),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):Lr(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:qr(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new $r(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new kr(this.isNodeInDocument)}}const Xr=function(e,t,n){return new Yr(e,t,n)};var Gr={exports:{}};!function(e,t){function n(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var r="object"==typeof process&&!0;function i(e,t){if(!e){if(r)throw new Error("Invariant failed");throw new Error(t())}}t.invariant=i;var o=Object.prototype.hasOwnProperty,a=Array.prototype.splice,s=Object.prototype.toString;function c(e){return s.call(e).slice(8,-1)}var u=Object.assign||function(e,t){return l(t).forEach((function(n){o.call(t,n)&&(e[n]=t[n])})),e},l="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function d(e){return Array.isArray(e)?u(e.constructor(e.length),e):"Map"===c(e)?new Map(e):"Set"===c(e)?new Set(e):e&&"object"==typeof e?u(Object.create(Object.getPrototypeOf(e)),e):e}var f=function(){function e(){this.commands=u({},g),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return(new e).update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var n=this,r="function"==typeof t?{$apply:t}:t;Array.isArray(e)&&Array.isArray(r)||i(!Array.isArray(r),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),i("object"==typeof r&&null!==r,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."}));var a=e;return l(r).forEach((function(t){if(o.call(n.commands,t)){var i=e===a;a=n.commands[t](r[t],a,r,e),i&&n.isEquals(a,e)&&(a=e)}else{var s="Map"===c(e)?n.update(e.get(t),r[t]):n.update(e[t],r[t]),u="Map"===c(a)?a.get(t):a[t];n.isEquals(s,u)&&(void 0!==s||o.call(e,t))||(a===e&&(a=d(e)),"Map"===c(a)?a.set(t,s):a[t]=s)}})),a},e}();t.Context=f;var g={$push:function(e,t,n){return p(t,n,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,n){return p(t,n,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,r,o){return function(e,t){i(Array.isArray(e),(function(){return"Expected $splice target to be an array; got "+n(e)})),v(t.$splice)}(t,r),e.forEach((function(e){v(e),t===o&&e.length&&(t=d(o)),a.apply(t,e)})),t},$set:function(e,t,n){return function(e){i(1===Object.keys(e).length,(function(){return"Cannot have more than one key in an object with $set"}))}(n),e},$toggle:function(e,t){m(e,"$toggle");var n=e.length?d(t):t;return e.forEach((function(e){n[e]=!t[e]})),n},$unset:function(e,t,n,r){return m(e,"$unset"),e.forEach((function(e){Object.hasOwnProperty.call(t,e)&&(t===r&&(t=d(r)),delete t[e])})),t},$add:function(e,t,n,r){return y(t,"$add"),m(e,"$add"),"Map"===c(t)?e.forEach((function(e){var n=e[0],i=e[1];t===r&&t.get(n)!==i&&(t=d(r)),t.set(n,i)})):e.forEach((function(e){t!==r||t.has(e)||(t=d(r)),t.add(e)})),t},$remove:function(e,t,n,r){return y(t,"$remove"),m(e,"$remove"),e.forEach((function(e){t===r&&t.has(e)&&(t=d(r)),t.delete(e)})),t},$merge:function(e,t,r,o){var a,s;return a=t,i((s=e)&&"object"==typeof s,(function(){return"update(): $merge expects a spec of type 'object'; got "+n(s)})),i(a&&"object"==typeof a,(function(){return"update(): $merge expects a target of type 'object'; got "+n(a)})),l(e).forEach((function(n){e[n]!==t[n]&&(t===o&&(t=d(o)),t[n]=e[n])})),t},$apply:function(e,t){var r;return i("function"==typeof(r=e),(function(){return"update(): expected spec of $apply to be a function; got "+n(r)+"."})),e(t)}},h=new f;function p(e,t,r){i(Array.isArray(e),(function(){return"update(): expected target of "+n(r)+" to be an array; got "+n(e)+"."})),m(t[r],r)}function m(e,t){i(Array.isArray(e),(function(){return"update(): expected spec of "+n(t)+" to be an array; got "+n(e)+". Did you forget to wrap your parameter in an array?"}))}function v(e){i(Array.isArray(e),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+n(e)+". Did you forget to wrap your parameters in an array?"}))}function y(e,t){var r=c(e);i("Map"===r||"Set"===r,(function(){return"update(): "+n(t)+" expects a target of type Set or Map; got "+n(r)}))}t.isEquals=h.update.isEquals,t.extend=h.extend,t.default=h.update,t.default.default=e.exports=u(t.default,t)}(Gr,Gr.exports);var Zr=w(Gr.exports),Jr=function(e){var n=e.type,i=e.onMoveItem,o=e.index,a=e.id,s=e.children,c=e.style,u=e.className,l=r.useRef(null),d=C("zt-sortable",u,{}),f=Tr({accept:n,hover:function(e,t){var n;if(l.current){var r=e.index,a=o;if(r!==a){var s=null===(n=l.current)||void 0===n?void 0:n.getBoundingClientRect(),c=(s.bottom-s.top)/2,u=t.getClientOffset().y-s.top;r<a&&u<c||r>a&&u>c||(i(r,a),e.index=a)}}}}),g=f[1],h=wr({type:n,item:function(){return{id:a,index:o}},collect:function(e){return{isDragging:e.isDragging()}}}),p=h[0].isDragging?0:1;return(0,h[1])(g(l)),t.jsx("div",v({ref:l,className:d,style:v(v({},c),{opacity:p})},{children:s}))},Qr=500;function ei(e,t,n){if(e&&t&&Array.isArray(n)){var r=[];try{r=(JSON.parse(localStorage.getItem(t)||"{}")||{})[e]}catch(e){console.log(e)}var i=Array.isArray(r)&&r.length>0?r:[];return r&&0!==r.length?n.forEach((function(e,t){var n=v({checked:!0},e),r=i.find((function(e){return e.key===n.key}));r?(r.label=n.label,r.isFind=!0):i.push(v(v({},n),{isFind:!0}))})):n.forEach((function(e){var t=v(v({},e),{checked:void 0===e.checked||e.checked});i.push(v(v({},t),{isFind:!0}))})),i.filter((function(e){return e.isFind})).map((function(e){var t=v({},e);return Reflect.deleteProperty(t,"isFind"),t}))}return[]}function ti(e,t,n,i,o,a,s){var c=r.useState(!1),u=c[0],l=c[1],d=r.useCallback((function(){return e=i,t="".concat(i,"_lru_key"),function(n,r){var i={},o=[];try{i=JSON.parse(localStorage.getItem(e)||"{}")||{},o=JSON.parse(localStorage.getItem(t)||"[]")||[]}catch(e){console.error(e)}o.length!==Object.keys(i).length&&(o=Object.keys(i));var a=o.findIndex((function(e){return e===n}));if(-1!==a?(o.splice(a,1),o.push(n)):o.push(n),o.length>Qr){var s=o.shift();try{delete i[s]}catch(e){}}i[n]=r,localStorage.setItem(e,JSON.stringify(i)),localStorage.setItem(t,JSON.stringify(o))};var e,t}),[i]),f=r.useCallback((function(){l(!1),o(e)}),[o,e]),g=r.useCallback((function(){l(!1),t(a),s(a),o(a),d()(n,a)}),[a,t,n,d,o]),h=r.useCallback((function(e){l(!1),t(e),o(e),s(e),d()(n,e)}),[t,n,d,o]);return{visible:u,setVisible:l,onClose:f,onReset:g,onSure:h}}var ni=function(e,i){var o=e.list,a=e.dynamicKey,s=e.parentDynamicKey,c=e.title,u=void 0===c?"自定义配置":c,l=e.onCurrentListChange,d=function(e,t,n){var i=r.useMemo((function(){return ei(e,t,n)}),[e,t,n]),o=r.useState(i),a=o[0],s=o[1],c=r.useState(i),u=c[0],l=c[1];return r.useEffect((function(){i&&(s(i),l(i))}),[i]),{currentDynamicList:a,setCurrentDynamicList:s,tempDynamicList:u,setTempDynamicList:l}}(a,s,o),f=d.currentDynamicList,g=d.setCurrentDynamicList,h=d.tempDynamicList,p=d.setTempDynamicList,m=ti(f,g,a,s,p,o,l),y=m.visible,b=m.setVisible,x=m.onClose,S=m.onReset,w=m.onSure;r.useImperativeHandle(i,(function(){return{setVisible:b}}));var O=r.useMemo((function(){var e=[];return h.forEach((function(t){t.checked&&e.push(t.key)})),e}),[h]),C=r.useCallback((function(e,t){p((function(n){var r=n[e];return Zr(n,{$splice:[[e,1],[t,0,r]]})}))}),[p]),T=function(){w&&w(h)};return t.jsx(n.Drawer,v({className:"dynamic-drawer",title:t.jsxs("div",{children:[t.jsx(wt,{style:{fontSize:16}}),t.jsxs("span",v({className:"search-drawer--title-text"},{children:[u,t.jsx("span",{children:"(拖拽排序)"})]}))]}),width:300,placement:"right",open:y,closable:!1,maskClosable:!1,footer:t.jsxs(t.Fragment,{children:[t.jsx(D,v({type:"default",onClick:x},{children:"取消"})),t.jsx(D,v({type:"default",onClick:S},{children:"重置"})),t.jsx(D,v({type:"primary",onClick:T},{children:"确定"}))]})},{children:t.jsx(Zn,v({backend:Xr,context:window},{children:t.jsx(n.Checkbox.Group,v({value:O,onChange:function(e){var t=h.map((function(e){return v({},e)}))||[];t.forEach((function(t){e.find((function(e){return e===t.key}))?t.checked=!0:t.checked=!1})),p(t)}},{children:h.map((function(e,r){return t.jsx(Jr,v({type:"search-drawer",index:r,onMoveItem:C},{children:t.jsx(n.Checkbox,v({value:e.key,disabled:e.disabled},{children:e.label||e.key}))}),e.key)}))}))}))}))};ni.displayName="ZTXK_WEBUI_DynamicDrawer";var ri=r.memo(r.forwardRef(ni)),ii=function(e,n){var i=e.dynamicKey,o=e.parentDynamicKey,a=e.defaultList,s=e.children,c=e.title,u=e.onCurrentListChange,l=e.hiddenOperationIcon,d=r.useState(a),f=d[0],g=d[1],h=r.useRef({});return r.useImperativeHandle(n,(function(){return{getCurrentDynamicList:function(e){return ei(i,o,e)},setList:g,setVisible:function(e){var t;null===(t=h.current)||void 0===t||t.setVisible(e)}}})),Array.isArray(f)&&f.length>0?t.jsxs("div",v({className:"ztxk-dynamic-setting"},{children:[l?null:t.jsx("div",v({onClick:function(){var e;return null===(e=h.current)||void 0===e?void 0:e.setVisible(!0)}},{children:s||t.jsx(wt,{style:{fontSize:18,color:"#768696"}})})),t.jsx(ri,{list:f,dynamicKey:i,parentDynamicKey:o,ref:h,title:c,onCurrentListChange:u})]})):null};ii.displayName="ZTXK_WEBUI_DynamicSetting";var oi=r.memo(r.forwardRef(ii));var ai=r.memo((function(e){var n=e.items,r=e.outsideState;return t.jsx(t.Fragment,{children:Array.isArray(n)?null==n?void 0:n.map((function(e,n){return t.jsx(hi,v({index:n},e,{outsideState:r}),"".concat(e.name))})):null})})),si=r.memo((function(e){var n=e.children,r=e.value;return t.jsx("div",v({className:"ztxk-form--detault-dom"},{children:n||(r||"— —")}))})),ci="ztxk-webui-dynamic-form",ui=r.memo((function(e){var i=e.form,o=e.bottomBorder,a=e.isFlex,s=void 0===a||a,c=e.wrapClassName,u=e.leftClassName;e.itemClassName;var l=e.rightWrapVisible,d=e.rightClassName,f=e.children,g=e.dynamicKey,h=e.formPreferences,p=e.items,m=e.outsideState,b=e.onValuesChange,x=e.onResetHandle,S=e.onSearchHandle,w=e.type,O=y(e,["form","bottomBorder","isFlex","wrapClassName","leftClassName","itemClassName","rightWrapVisible","rightClassName","children","dynamicKey","formPreferences","items","outsideState","onValuesChange","onResetHandle","onSearchHandle","type"]),T=function(e,t){return{configInfoItems:r.useMemo((function(){return e?null==t?void 0:t.map((function(t){var n,r,i,o=t.name,a=t.configName||o;return v(v({},t),{isDisplay:null===(n=e[a])||void 0===n?void 0:n.isDisplay,isRequired:null===(r=e[a])||void 0===r?void 0:r.isRequired,isChangeable:null===(i=e[a])||void 0===i?void 0:i.isChangeable})})):t}),[e,t])}}(h,p).configInfoItems,I=function(e,t,n){var i=r.useRef({}),o=r.useMemo((function(){var n=[];return t&&e&&(n=e.map((function(e){return{key:e.name,label:e.label,disabled:!0===e.dynamicDisabled,checked:!1!==e.isDisplay}}))),n}),[t,e]);r.useEffect((function(){var e,r;n&&t&&(null===(r=null===(e=i.current)||void 0===e?void 0:e.setList)||void 0===r||r.call(e,o))}),[n,t]);var a=r.useState((function(){return ei(t,ci,o)})),s=a[0],c=a[1],u=r.useCallback((function(e){c(e)}),[]),l=r.useMemo((function(){var t=[];return Array.isArray(s)&&s.length>0&&s.forEach((function(n){var r=n.key,i=n.checked,o=null==e?void 0:e.find((function(e){return(null==e?void 0:e.name)===r}));o&&(o.isDisplay=!!i,t.push(o))})),t}),[e,s]);return{dynamicList:o,currentDynamicList:s,onCurrentListChange:u,newItems:l,dynamicSettingRef:i}}(T,g,h),k=I.dynamicList,E=I.onCurrentListChange,j=I.newItems,N=I.dynamicSettingRef,P=C("ztxk-form",c,{"ztxk-form--bottom-border":o,"ztxk-form--list":"list"===w}),A=C("ztxk-form__left",u,{"ztxk-form__left--flex":s}),M=C("ztxk-form__right",d),R=r.useMemo((function(){var e={};if(p)for(var t=0;t<p.length;t++){var n=p[t];"string"==typeof n.name&&n.shouldUpdateNames&&n.shouldUpdateClear&&(e[n.name]="boolean"==typeof n.shouldUpdateClear?n.shouldUpdateNames:n.shouldUpdateClear)}return e}),[p]),_=r.useCallback((function(e,t){if(e){var n=Object.keys(e);Object.keys(R).forEach((function(e){var t,r,o=R[e]?R[e]:[];n.find((function(e){return o.includes(e)}))&&(null===(r=null==i?void 0:i.setFieldsValue)||void 0===r||r.call(i,((t={})[e]=void 0,t)))}))}b&&b(e,t)}),[b,R,i]),L=function(e,t){var n=t.onResetHandle,i=t.onSearchHandle;return{onResetHandleInner:r.useCallback((function(){null==e||e.resetFields(),n&&n()}),[e,n]),onSearchHandleInner:r.useCallback((function(){var t=null==e?void 0:e.getFieldsValue();i&&i(t)}),[e,i])}}(i,{onSearchHandle:S,onResetHandle:x}),z=L.onSearchHandleInner,F=L.onResetHandleInner;return t.jsxs(n.Form,v({form:i,onValuesChange:_},O,{className:P},{children:[t.jsx("div",v({className:A},{children:p?t.jsx(ai,{items:g?j:T,outsideState:m}):f})),g?t.jsx(oi,{dynamicKey:g,parentDynamicKey:ci,defaultList:k,onCurrentListChange:E,ref:N}):null,l?t.jsxs("div",v({className:M},{children:[t.jsx(D,v({type:"default",onClick:F},{children:"重置"})),t.jsx(D,v({type:"primary",onClick:z},{children:"查询"}))]})):null]}))}));function li(e,t,n){return function e(t,r){if(t===r)return!0;if((null==t?void 0:t.$$typeof)&&(null==r?void 0:r.$$typeof))return(null==t?void 0:t.key)===(null==r?void 0:r.key);if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(var i=0;i<t.length;i++)if(!e(t[i],r[i]))return!1;return!0}if(t&&r&&"object"==typeof t&&"object"==typeof r){var o=Object.keys(t);return o.length===Object.keys(r).length&&o.every((function(i){return!(!n||!n.includes(i))||e(t[i],r[i])}))}return!1}(e,t)}ui.displayName="ZTXK_WEBUI_Form",ui.useForm=n.Form.useForm,ui.Item=n.Form.Item,ui.List=n.Form.List,ui.ErrorList=n.Form.ErrorList,ui.Provider=n.Form.Provider,ui.useFormInstance=n.Form.useFormInstance,ui.useWatch=n.Form.useWatch,ui.DefaultDom=si;var di=function(e){var n,r=e.children,i=e.isDisplay,o=e.isRequired,a=e.isChangeable,s=e.isStress,c=e.preNode,u=e.nextNode;e.dynamicDisabled;var l=e.hiddenBorder,d=e.singleSelectShowBorder,f=e.hiddenLabel,g=e.width,h=e.className,p=e.itemClassName,m=e.render,b=e.shouldUpdateNames;e.shouldUpdateClear;var x=e.dependencies,S=e.shouldUpdate;e.index,e.outsideState,e.shouldUpdateBeOutsideState;var w=y(e,["children","isDisplay","isRequired","isChangeable","isStress","preNode","nextNode","dynamicDisabled","hiddenBorder","singleSelectShowBorder","hiddenLabel","width","className","itemClassName","render","shouldUpdateNames","shouldUpdateClear","dependencies","shouldUpdate","index","outsideState","shouldUpdateBeOutsideState"]),O=ui.useFormInstance();if(!1===i||"0"===i)return null;if(void 0!==o){var D=!!o,T=Array.isArray(w.rules)?w.rules:[],I=T.findIndex((function(e){return"function"!=typeof e&&(!0===(null==e?void 0:e.required)||!1===(null==e?void 0:e.required))}));if(-1!==I){var k=null===(n=T[I])||void 0===n?void 0:n.message;T.splice(I,1,{required:D,message:k})}else T.unshift({required:D,message:"".concat(w.label," 未填!")});w.rules=T}var E={disabled:!1};void 0!==a&&(E.disabled="0"===a||!a);var j=C("ztxk-form__item",p,{"ztxk-form__item--disabled":E.disabled,"ztxk-form__item--hidden-border":l,"ztxk-form__item--hidden-label":f,"ztxk-form__item--single-show-border":d,"ztxk-form__item--stress":s});if(x)return t.jsxs(gi,v({width:g,className:h},{children:[c||null,t.jsx(ui.Item,v({dependencies:x,noStyle:!0},{children:function(e){return t.jsx(ui.Item,v({},w,{className:j},{children:m(E,e)}))}})),u||null]}));if(S||b){var N=b?function(e,t,n){for(var r=0;r<b.length;r++){var i=b[r];if(e[i]!==t[i])return!0}return"function"==typeof S?S(e,t,n):"boolean"==typeof S&&S}:S;return t.jsxs(gi,v({width:g,className:h},{children:[c||null,t.jsx(ui.Item,v({shouldUpdate:N,noStyle:!0},{children:function(e){return w.name?t.jsx(ui.Item,v({},w,{className:j},{children:m(E,e)})):m(E,e)}})),u||null]}))}return t.jsxs(gi,v({width:g,className:h},{children:[c||null,t.jsx(ui.Item,v({},w,{className:j},{children:m?m(E,O):r})),u||null]}))};function fi(e){if("number"==typeof e)return e;switch(e){case"half":return 4;case"all":return 24;case"double":return 16;case"halfAll":return 12;default:return 8}}function gi(e){var r=e.className,i=e.children,o=e.width,a=C("ztxk-form__item--wrap",r);return t.jsx(n.Col,v({className:a,span:fi(o)},{children:i}))}di.displayName="ZTXK_WEBUI_FormItem";var hi=r.memo(di,(function(e,t){return(null==t?void 0:t.shouldUpdateBeOutsideState)?!!li(e,t,["render","shouldUpdateBeOutsideState","shouldUpdate","outsideState"])&&!t.shouldUpdateBeOutsideState(e.outsideState,t.outsideState):li(e,t)}));const pi=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],mi=(()=>{if("undefined"==typeof document)return!1;const e=pi[0],t={};for(const n of pi){const r=n?.[1];if(r in document){for(const[r,i]of n.entries())t[e[r]]=i;return t}}return!1})(),vi={change:mi.fullscreenchange,error:mi.fullscreenerror};let yi={request:(e=document.documentElement,t)=>new Promise(((n,r)=>{const i=()=>{yi.off("change",i),n()};yi.on("change",i);const o=e[mi.requestFullscreen](t);o instanceof Promise&&o.then(i).catch(r)})),exit:()=>new Promise(((e,t)=>{if(!yi.isFullscreen)return void e();const n=()=>{yi.off("change",n),e()};yi.on("change",n);const r=document[mi.exitFullscreen]();r instanceof Promise&&r.then(n).catch(t)})),toggle:(e,t)=>yi.isFullscreen?yi.exit():yi.request(e,t),onchange(e){yi.on("change",e)},onerror(e){yi.on("error",e)},on(e,t){const n=vi[e];n&&document.addEventListener(n,t,!1)},off(e,t){const n=vi[e];n&&document.removeEventListener(n,t,!1)},raw:mi};Object.defineProperties(yi,{isFullscreen:{get:()=>Boolean(document[mi.fullscreenElement])},element:{enumerable:!0,get:()=>document[mi.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[mi.fullscreenEnabled])}}),mi||(yi={isEnabled:!1});var bi=yi;var xi=function(e){var i=e.loading,o=function(e){var t=r.useState(1),n=t[0],i=t[1];return r.useEffect((function(){e||i(1)}),[e]),r.useEffect((function(){if(e){var t=setInterval((function(){i((function(e){return e+1}))}),1e3);return function(){t&&clearInterval(t)}}}),[e]),{countTimer:n}}(i).countTimer;return t.jsx(n.Spin,{spinning:i,size:"large",tip:"".concat(o),className:"ztxk-container__loading",style:{display:i?"flex":"none"}})},Si=r.memo((function(e){var n=e.children,r=e.isMarginTop,i=e.className,o=C("ztxk-container--btn-wrap",i,{"btn-wrap--margin-top":r});return t.jsx("div",v({className:o},{children:n}))})),wi=r.memo((function(e){var n=e.className,r=e.isFlex,i=e.children,o=e.loading,a=e.footerDom,s=C("ztxk-container__content",n,{"ztxk-container__content--flex":r});return t.jsxs("div",v({className:"ztxk-container"},{children:[t.jsx(xi,{loading:o}),t.jsx("div",v({className:s},{children:i})),t.jsx(Ci,{footerDom:a})]}))}));wi.displayName="ZTXK_WEBUI_ContainerMemo",wi.ButtonWrap=Si;var Oi=["10","20","30","100"],Ci=r.memo((function(e){var n=e.children,r=e.className,i=e.align,o=void 0===i?"left":i,a=e.footerDom,s=C("ztxk-footer",r);return t.jsx("footer",v({className:s,style:{justifyContent:"left"===o?"flex-start":"center"===o?"center":"flex-end"}},{children:a?t.jsxs("div",v({className:"ztxk-footer--group"},{children:[a.map((function(e,n){var r=e.DOMType,i=e.render;if("button"===r){var o=e.type,a=void 0===o?"primary":o,s=e.loading,c=e.disabled,u=e.onClick;return t.jsx(D,v({type:a,loading:s,disabled:c,onClick:u},{children:e.text}),n)}if("pagination"===r){var l=e.total,d=e.pageSize,f=e.current,g=e.onChange,h=e.onShowSizeChange,p=e.pageSizeOptions;return t.jsx(Di,{total:l,pageSize:d,current:f,onChange:g,onShowSizeChange:h,showTotal:function(e){return"共".concat(e,"条")},showSizeChanger:!0,pageSizeOptions:p||Oi},n)}return i?i():null})),n]})):null}))})),Di=function(e){var r=e.className,i=y(e,["className"]),o=C("ztxk-pagination",r,{});return t.jsx(n.Pagination,v({className:o},i))};var Ti=r.memo((function(e){var r=e.copyKey,i=e.dataSourceRef;return t.jsx(zt,{type:"icon-copy",style:{fontSize:"22px"},className:"thead-icon",title:"复制整列",onClick:function(){return function(e,t){var r,i;if(Array.isArray(t)){var o=t.map((function(t){if("string"==typeof e)return t[e];var n="";return e.forEach((function(e){return n+=t[e]})),n})).join("\n");try{if((null===navigator||void 0===navigator?void 0:navigator.clipboard)&&window.isSecureContext)null===(i=null===(r=navigator.clipboard)||void 0===r?void 0:r.writeText(o))||void 0===i||i.then((function(){n.message.info("复制成功!")}));else{var a=document.createElement("textarea");a.value=o,document.body.appendChild(a),a.select(),document.execCommand?(n.message.info("复制成功!"),document.execCommand("copy")):n.message.info("复制失败!请手工复制\n ".concat(o)),document.body.removeChild(a)}}catch(e){n.message.info("复制失败!请手工复制\n ".concat(o))}}}(r,i.current)}})})),Ii="ztxk-webui-dynamic-table",ki=Symbol("table-drag-row"),Ei=["bottomLeft"],ji=["10","20","30","40"],Ni="error-td";var Pi=function(e){var n=e.className,r=y(e,["className"]),i=C("ztxk-table__enhance-row",n);return t.jsx("tr",v({className:i},r))},Ai=function(e){var n=e.className,i=e.style,o=e.index,a=e.moveRow,s=y(e,["className","style","index","moveRow"]),c=function(e,t){var n=r.useRef(null),i=Tr((function(){return{accept:ki,collect:function(e){return(e.getItem()||{}).index,{}},drop:function(n){if(!t)throw new Error("请定义移动行后触发的函数 onmoveRow");t(n.index,e)}}}),[e])[1],o=wr({type:ki,item:{index:e},collect:function(e){return{isDragging:e.isDragging()}},canDrag:function(e){var t;return!(null===(t=document.activeElement)||void 0===t?void 0:t.tagName.toLowerCase().match(/input|textarea/))}});return i((0,o[1])(n)),{ref:n}}(o,a).ref,u=C("ztxk-table__enhance-row",n);return t.jsx("tr",v({ref:c,style:v({cursor:"move"},i),className:u},s))};function Mi(e,t){var n=null==e?void 0:e.current;return n?n.pageSize*(n.page-1)+(t||0):t}var Ri=function(e){var n=e.record,i=e.index,o=e.editable,a=e.editableConfig,s=e.dataIndex;e.title;var c=e.onEditableSave;e.onMouseEnter,e.onMouseLeave;var u=e.children,l=e.currentPage,d=e.isValidate,f=y(e,["record","index","editable","editableConfig","dataIndex","title","onEditableSave","onMouseEnter","onMouseLeave","children","currentPage","isValidate"]),g=Mi(l,i),h=r.useState(n?n[s]:void 0),p=h[0],m=h[1],b=function(){var e=r.useState(!1),t=e[0],n=e[1];return{editing:t,toggleEdit:function(){n(!t)}}}(),x=b.editing,S=b.toggleEdit,w=function(e){var t=r.useRef();return r.useEffect((function(){e&&t.current.focus()}),[e]),t}(x),O=function(){var e=r.useRef(),t=r.useCallback((function(){var t,n;e.current&&(null===(n=(t=e.current.classList).contains)||void 0===n?void 0:n.call(t,Ni))&&e.current.classList.remove(Ni)}),[]);return{tdRef:e,removeErrorClass:t}}(),C=O.tdRef,D=O.removeErrorClass,I=function(e){var t;if(!c)throw Error("如果开启了editable, 那么必须传递 onEditableSave属性 来更改表格数据!");S(),c(v(v({},n),((t={})[s]=p,t)),g,s)};if(o){var k=a||{type:"input"},E=k.type,N=y(k,["type"]),P=null;return"input"===E&&(P=t.jsx(T,v({value:p,onChange:function(e){m(e.target.value),d&&D()},onPressEnter:I,onBlur:I,ref:w},N))),"inputNumber"===E&&(P=t.jsx(j,v({value:p,onChange:function(e){m(e),d&&D()},onPressEnter:I,onBlur:I,ref:w},N))),t.jsx("td",v({ref:C},f,{children:x?t.jsx("div",v({className:"ztxk-table__enhance-cell"},{children:P})):t.jsx("div",v({className:"ztxk-table__enhance-cell-wrap",onClick:S},{children:u}))}))}return t.jsx("td",v({ref:C},f,{children:u}))},_i=r.memo((function(e){var n=e.dynamicSettingRef;return t.jsx(mt,{onClick:function(){var e;null===(e=null==n?void 0:n.current)||void 0===e||e.setVisible(!0)}})})),Li=r.memo((function(e){var r=e.onAddAndDel;return t.jsx(n.Popconfirm,v({title:"确定删除所有吗?",onConfirm:function(){return r&&r("delAll",0)}},{children:t.jsx(gt,{title:"删除所有行"})}))})),zi=r.memo((function(e){var r=e.isAdd,i=e.isDel,o=e.onAddAndDel,a=e.index;return t.jsxs(t.Fragment,{children:[r?t.jsx("div",v({className:"ztxk-column--adddel-icon"},{children:t.jsx(bt,{title:"新增一行",onClick:function(){o&&o("add",a)}})})):null,i?t.jsx("div",v({className:"ztxk-column--adddel-icon"},{children:t.jsx(n.Popconfirm,v({title:"确定删除吗?",onConfirm:function(){return o&&o("del",a)}},{children:t.jsx(lt,{title:"删除一行"})}))})):null]})}));function Fi(e,n){var r=n.dynamicKey,i=n.currentDynamicList,o=n.dataSourceRef,a=n.onEditableSave,s=n.isEdit,c=n.isAdd,u=n.isDel,l=n.dynamicSettingRef,d=n.onAddAndDel,f=n.getRefreshScuCell,g=n.isDelAll,h=n.currentPage,p=function(e,t){if(Array.isArray(t)&&t.length>0&&e){var n=[],r=[],i=[];return t.forEach((function(t){var n=t.key,i=t.checked,o=e.find((function(e){return(e.key===n||(null==e?void 0:e.dataIndex)===n)&&i}));o&&r.push(o)})),e.filter((function(e){return e.fixed})).forEach((function(e){"left"===e.fixed?n.push(e):"right"===e.fixed&&i.push(e)})),S(S(S([],n,!0),r,!0),i,!0)}return e}(e,i),m=[];if(Array.isArray(p)){if(p.forEach((function(e){var n=v({},e),r=n.isCopy,i=n.editable,c=n.editableConfig,u=n.title,l=n.key,d=n.validate,g=n.isRequire,p=l||(null==n?void 0:n.dataIndex);if(r&&(n.title=t.jsxs(t.Fragment,{children:[u,t.jsx(Ti,{copyKey:!0===r?p:r,dataSourceRef:o})]})),g&&(n.title=t.jsxs(t.Fragment,{children:[t.jsx("i",v({className:"ztxk-column--required"},{children:"*"})),n.title]})),i&&s&&(n.onCell=function(e,t){return{record:e,index:t,editable:i,editableConfig:c,dataIndex:p,title:u,onEditableSave:a,currentPage:h,isValidate:!!d}}),n.shouldCellUpdate){var y=n.shouldCellUpdate;n.shouldCellUpdate=function(e,t){return!(!f||!f())||y(e,t)}}n.render||(n.render=function(e,t,n){return"object"==typeof e||null==e||""===e?"— —":e}),m.push(n)})),c||u){var y={title:function(){return g?t.jsx(Li,{}):null},width:52,fixed:"left",align:"center",render:function(e,n,r){return t.jsx(zi,{isAdd:c,isDel:u,index:r,onAddAndDel:d})}};m.unshift(y)}r&&(m[0].title=function(){return c||u?t.jsxs(t.Fragment,{children:[g?t.jsx(Li,{}):null,t.jsx(_i,{dynamicSettingRef:l})]}):t.jsx(_i,{dynamicSettingRef:l})})}return{newColumns:m}}function Bi(e,i,o){var a=o.summaryFixed,s=o.rowSelection,c=o.expandable,u=o.isAdd,l=o.isDel,d=!!c,f=!(!u&&!l),g=Number(!!s)+Number(d),h=r.useCallback((function(r){var o=function(e,t,n){var r=[],i=n.fillNumber,o=n.columns;Array.isArray(e)&&e.forEach((function(e){var n=e.type,a=e.fields,s=e.title;switch(n){case"subtotal":if(!Array.isArray(a))return;if(0===a.length)return;var c=function(e,t){if(!Array.isArray(t))return null;var n={};return t.forEach((function(r,i){e.forEach((function(e){if("string"==typeof e){var o=Number(null==r?void 0:r[e]);o=isNaN(o)?0:o;var a=(null==n?void 0:n[e])||0;n[e]=a?Hi(a,o):o}else{var s=e.key,c=e.showKey,u=e.toFixedNum,l=e.value,d=e.callback;o=Number(null==r?void 0:r[s]);o=isNaN(o)?0:o;var f=(null==n?void 0:n[s])||0;if(l)if(Array.isArray(l))n[s]=l.map((function(e,t){var n=Array.isArray(u)?u[t]:u,r=Number(e);return isNaN(r)||"number"!=typeof n?e:r.toFixed(n)}));else{var g=Number(l);n[s]="number"==typeof u?isNaN(g)?l:g.toFixed(u):l}else if(c)if("string"==typeof c){var h=Number(null==r?void 0:r[c]);h=isNaN(h)?0:h,n[s]=f?"number"==typeof u?Hi(f,h).toFixed(u):Hi(f,h):"number"==typeof u?h.toFixed(u):h}else n[s]=c.map((function(e,t){var n=Number(null==r?void 0:r[e]);n=isNaN(n)?0:n;var i=Array.isArray(u)?u[t]:u;if(f){var o=Number(f[t]);return"number"==typeof i?Hi(o,n).toFixed(i):Hi(o,n)}return"number"==typeof i?n.toFixed(i):n}));else n[s]=f?"number"==typeof u?Hi(f,o).toFixed(u):Hi(f,o):"number"==typeof u?o.toFixed(u):o;d&&i===t.length-1&&(n[s]=d(n[s]))}}))})),n}(a,t),u=[],l=[];null==o||o.forEach((function(e){e.children?e.children.forEach((function(e){u.push(e.key||e.dataIndex?c[e.key||e.dataIndex]:void 0),l.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex})})):(u.push(e.key||e.dataIndex?c[e.key||e.dataIndex]:void 0),l.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex}))})),r.push({title:s||"小计",titleIndex:0+i,key:"subtotal",list:Array(i).fill(void 0).concat(u),columnList:Array(i).fill(void 0).concat(l)});break;case"total":if(!Array.isArray(a))return;if(0===a.length)return;var d=function(e){var t={};return e.forEach((function(e){if("object"==typeof e){var n=e.key,r=e.toFixedNum,i=e.value,o=e.callback;if(null!=i)if(Array.isArray(i))t[n]=i.map((function(e,t){var n=Number(e);n=isNaN(n)?0:n;var i=Array.isArray(r)?r[t]:r;return"number"==typeof i?n.toFixed(i):e}));else{var a=Number(i);a=isNaN(a)?0:a,t[n]="number"==typeof r?a.toFixed(r):i}else t[n]=0;o&&(t[n]=o(t[n]))}})),t}(a),f=[],g=[];null==o||o.forEach((function(e){e.children?e.children.forEach((function(e){f.push(e.key||e.dataIndex?d[e.key||e.dataIndex]:void 0),g.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex})})):(f.push(e.key||e.dataIndex?d[e.key||e.dataIndex]:void 0),g.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex}))})),r.push({title:s||"总计",titleIndex:0+i,key:"total",list:Array(i).fill(void 0).concat(f),columnList:Array(i).fill(void 0).concat(g)})}}));return r}(e,r,{fillNumber:g,columns:i});return t.jsx(n.Table.Summary,v({fixed:a},{children:o.map((function(e){var r=e.title,i=e.key,o=e.titleIndex,a=e.list;return t.jsx(n.Table.Summary.Row,{children:Array.isArray(a)&&a.map((function(e,i){return o+Number(f)===i?t.jsx(n.Table.Summary.Cell,v({index:i},{children:r}),i):t.jsx(n.Table.Summary.Cell,v({index:i},{children:t.jsx("div",{children:e})}),i)}))},i)}))}))}),[e,g,i,a,f]);return e?h:void 0}function Hi(e,t){return e+t}function Ui(e,t){return e.querySelector(t)}function qi(e,t,n){var r;return b(this,void 0,void 0,(function(){var i,o,a,s,c,u,l,d,f,g,h,p,m;return x(this,(function(v){switch(v.label){case 0:if(i=n.getCurrentTable,o=n.rowSelection,a=n.expandable,s=n.tableName,c=n.isInnerPagination,u=n.setCurrent,l=n.pageSize,!Array.isArray(e)||0===e.length)return console.info("没有数据,无需验证!"),[2];if(!Array.isArray(t))return console.info("columns 不是数组!"),[2];d=[],Array.isArray(t)&&t.forEach((function(e,t){e.validate&&d.push({dataIndex:e.validate.dataIndex||e.dataIndex,title:e.validate.title||e.title,validate:e.validate.validate,index:t+(o?1:0)+(a?1:0)})})),f=0,v.label=1;case 1:if(!(f<e.length))return[3,6];g=e[f],h=function(e){var t,n,o,a,h,p,m,v,y,b;return x(this,(function(x){switch(x.label){case 0:if(t=d[e],n=t.dataIndex,o=t.title,a=t.validate,h=t.index,!n)return[2,"break"];if(p=g[n],m=function(e,t,n){var r,o,a,s=i().resultTr[e],c=Array.prototype.slice.call(null==s?void 0:s.children),u="number"==typeof t?c[t]:null;null===(o=null===(r=null==u?void 0:u.classList)||void 0===r?void 0:r.add)||void 0===o||o.call(r,n),null===(a=null==u?void 0:u.scrollIntoView)||void 0===a||a.call(u)},v=f,y=1,c&&(y=Math.ceil((f+1)/l),v-=l*(y-1)),!a)return[3,10];if("function"!=typeof a)return[3,5];x.label=1;case 1:return x.trys.push([1,3,,4]),[4,a(p,g,v+1,o)];case 2:return x.sent(),[3,4];case 3:return b=x.sent(),c?(u(y),setTimeout((function(){m(v,h,Ni)}))):m(f,h,Ni),[2,{value:Promise.reject(b)}];case 4:return[3,9];case 5:return(null===(r=null==a?void 0:a.pattern)||void 0===r?void 0:r.test(p))?[3,9]:c?(u(y),setTimeout((function(){m(v,h,Ni)})),[4,Promise.reject({errors:"".concat(s||""," 第").concat(v+1,"行 ").concat(o," ").concat((null==a?void 0:a.message)||"填写错误!")})]):[3,7];case 6:return x.sent(),[3,9];case 7:return m(f,h,Ni),[4,Promise.reject({errors:"".concat(s||""," 第").concat(f+1,"行 ").concat(o," ").concat((null==a?void 0:a.message)||"填写错误!")})];case 8:x.sent(),x.label=9;case 9:return[3,14];case 10:return""!==p&&null!=p?[3,14]:c?(u(y),setTimeout((function(){m(v,h,Ni)})),[4,Promise.reject({errors:"".concat(s||""," 第").concat(v+1,"行 ").concat(o," 为空!"),rowIndex:f,colIndex:h})]):[3,12];case 11:return x.sent(),[3,14];case 12:return m(f,h,Ni),[4,Promise.reject({errors:"".concat(s||""," 第").concat(f+1,"行 ").concat(o," 为空!"),rowIndex:f,colIndex:h})];case 13:x.sent(),x.label=14;case 14:return[2]}}))},p=0,v.label=2;case 2:return p<d.length?[5,h(p)]:[3,5];case 3:if("object"==typeof(m=v.sent()))return[2,m.value];if("break"===m)return[3,5];v.label=4;case 4:return p++,[3,2];case 5:return f++,[3,1];case 6:return[2]}}))}))}var Wi=r.memo((function(e){var i=e.className,o=e.bordered,a=void 0===o||o,s=e.pagination,c=void 0!==s&&s,u=e.isFlex;e.tablePreferences;var l=e.dynamicKey,d=e.columns,f=e.dataSource,g=e.onTableChange,h=e.isEdit,p=e.isMove,m=e.isAdd,S=e.addMode,w=e.addCallback,O=e.isDel,D=e.isDelAll,T=void 0===D||D,I=e.isAddAndDelAuto,k=e.summaryConfig,E=e.summaryFixed,j=void 0===E||E,N=e.isInnerPagination,P=e.innerPaginationPageSize,A=void 0===P?30:P,M=e.innerPaginationPosition,R=void 0===M?Ei:M,_=e.innerPaginationPageSizeOptions,L=void 0===_?ji:_,z=e.tableRefHandle,F=e.tableName,B=y(e,["className","bordered","pagination","isFlex","tablePreferences","dynamicKey","columns","dataSource","onTableChange","isEdit","isMove","isAdd","addMode","addCallback","isDel","isDelAll","isAddAndDelAuto","summaryConfig","summaryFixed","isInnerPagination","innerPaginationPageSize","innerPaginationPosition","innerPaginationPageSizeOptions","tableRefHandle","tableName"]),H=C("ztxk-table",i,{"ztxk-table--flex":u}),U=r.useRef();r.useEffect((function(){U.current=f}),[f]);var q,W,$=function(e,t){var n=r.useRef(null),i=r.useMemo((function(){return function(e,t){var n=[];return e&&t&&t.forEach((function(e){var t=e,r=t.key,i=t.dataIndex,o=t.title,a=t.dynamicDisabled;if(!t.fixed){var s=r||i;n.push({key:s,label:o,disabled:!0===a})}})),n}(t,e)}),[t,e]),o=r.useState((function(){return ei(t,Ii,i)})),a=o[0],s=o[1],c=r.useCallback((function(e){s(e)}),[]);return{defaultDynamicList:i,currentDynamicList:a,onCurrentListChange:c,dynamicSettingRef:n}}(d,l),K=$.defaultDynamicList,V=$.onCurrentListChange,Y=$.currentDynamicList,X=$.dynamicSettingRef,G=(q=r.useRef(null),W=r.useRef(),{refreshScuCell:r.useCallback((function(){W.current=!0}),[]),getRefreshScuCell:r.useCallback((function(){return!!W.current&&(q.current&&(clearTimeout(q.current),q.current=null),q.current=setTimeout((function(){W.current=!1})),!0)}),[])}),Z=G.refreshScuCell,J=G.getRefreshScuCell,Q=function(e,t,n){var i=r.useRef(null),o=r.useState(1),a=o[0],s=o[1],c=r.useState(t),u=c[0],l=c[1],d=n.innerPaginationPageSizeOptions,f=n.innerPaginationPosition;return r.useEffect((function(){e&&(i.current={page:a,pageSize:Number(u)})}),[e,a,u]),r.useEffect((function(){e||(i.current=null)}),[e]),{paginationConfig:r.useMemo((function(){return{current:a,pageSize:u,onChange:function(t,n){e&&(s(t),l(n))},hideOnSinglePage:!0,position:d,defaultPageSize:u,pageSizeOptions:f}}),[e,a,u,d,f]),currentPage:i,setCurrent:s,pageSize:u,current:a}}(N,A,{innerPaginationPosition:R,innerPaginationPageSizeOptions:L}),ee=Q.paginationConfig,te=Q.currentPage,ne=Q.setCurrent,re=Q.pageSize,ie=function(e,t){return r.useCallback((function(n,r,i,o){var a,s=null===(a=e.current)||void 0===a?void 0:a.slice();s[r][i]!==n[i]&&(s[r]=n,t&&t(s,e.current,{type:"edit",currentIndex:r}))}),[e,t])}(U,g),oe=function(e,t,n){var i=n.isMove,o=n.refreshScuCell,a=n.currentPage,s=r.useCallback((function(n,r){var i,s=Mi(a,n),c=Mi(a,r);if(s!==c){var u=null===(i=e.current)||void 0===i?void 0:i.slice(),l=u[s],d=Zr(u,{$splice:[[s,1],[c,0,l]]});o&&o(),t&&t(d,e.current,{type:"move",dragIndex:s,hoverIndex:c})}}),[e,t,o,a]),c=r.useCallback((function(e,t){return{index:t,moveRow:s}}),[s]);return{onRow:i?c:void 0}}(U,g,{isMove:p,refreshScuCell:Z,currentPage:te}).onRow,ae=function(e,t,n){var i=n.rowKey,o=n.addMode,a=n.addCallback,s=n.refreshScuCell,c=n.isAddAndDelAuto,u=n.currentPage;return r.useCallback((function(n,r){var l,d,f,g=Mi(u,r),h=null===(f=e.current)||void 0===f?void 0:f.slice();if("delAll"!==n){c&&(s&&s(),t&&t(h,e.current,{type:n,currentIndex:g}));var p=h[g],m=a?a(p,{index:g}):{};if("add"===n){var y={};y=v("blank"===o?((l={})[String(i)]="".concat(Date.now(),"-").concat(g),l.__INNER__ADD__DATA=!0,l):v(v({},p),((d={})[String(i)]="".concat(Date.now(),"-").concat(g),d.__INNER__ADD__DATA=!0,d)),m),h.splice(g+1,0,y)}else"del"===n&&h.splice(g,1);s&&s(),t&&t(h,e.current,{type:n,currentIndex:g})}else Array.isArray(h)&&h.length>0&&(s&&s(),t&&t([],e.current,{type:n,currentIndex:g}))}),[a,o,e,t,i,s,c,u])}(U,g,{rowKey:e.rowKey,addMode:S,addCallback:w,refreshScuCell:Z,isAddAndDelAuto:I,currentPage:te}),se=Fi(d,{dynamicKey:l,currentDynamicList:Y,dataSource:f,dataSourceRef:U,onEditableSave:ie,isEdit:h,isAdd:m,isDel:O,dynamicSettingRef:X,onAddAndDel:ae,getRefreshScuCell:J,isDelAll:T,currentPage:te}).newColumns,ce=Bi(k,se,{summaryFixed:j,rowSelection:e.rowSelection,expandable:e.expandable,isAdd:m,isDel:O}),ue=function(){var e=r.useRef(),t=r.useCallback((function(){var t,n=Ui(e.current,".ant-table-content");n||(n=Ui(e.current,".ant-table-container"));var r=Ui(n,".ant-table-tbody"),i=null==r?void 0:r.children,o=Array.prototype.slice.call(i);return{tableBody:r,resultTr:(null===(t=null==o?void 0:o.filter)||void 0===t?void 0:t.call(o,(function(e){return e.className.includes("ant-table-row")})))||[]}}),[]),n=r.useCallback((function(e){try{var n=t().resultTr;if("number"==typeof e)for(var r=n[e].querySelectorAll("td"),i=0;i<r.length;i++)r[i].classList.remove(Ni);else for(i=0;i<n.length;i++){r=n[i].querySelectorAll("td");for(var o=0;o<r.length;o++)r[o].classList.remove(Ni)}}catch(e){console.log(e)}}),[t]);return{tableRef:e,getCurrentTable:t,clearErrorClass:n}}(),le=ue.tableRef,de=ue.getCurrentTable,fe=ue.clearErrorClass,ge=r.useMemo((function(){var e=void 0;return h&&(e={body:{row:Pi,cell:Ri}}),p&&(e={body:{row:Ai,cell:h?Ri:void 0}}),e}),[h,p]);r.useImperativeHandle(z,(function(){return{getRealyIndex:function(e){return Mi(te,e)},getDynamicList:function(){return Y},tableValidate:function(){return b(void 0,void 0,void 0,(function(){return x(this,(function(t){switch(t.label){case 0:return fe(),[4,qi(f,se,{getCurrentTable:de,rowSelection:!!e.rowSelection,expandable:!!e.expandable,tableName:F,isInnerPagination:N,setCurrent:ne,pageSize:re})];case 1:return t.sent(),[2]}}))}))},clearErrorClass:fe}}));var he=t.jsx(n.Table,v({className:H,bordered:a,dataSource:f,columns:se,components:ge,onRow:oe,summary:ce,pagination:N?c||ee:c},B));return t.jsxs("div",v({style:u?{position:"relative",overflow:"hidden",flex:1}:{position:"relative",overflow:"hidden"},ref:le},{children:[p?t.jsx(Zn,v({backend:Xr,context:window},{children:he})):he,l?t.jsx(oi,{parentDynamicKey:Ii,dynamicKey:l,defaultList:K,onCurrentListChange:V,ref:X,hiddenOperationIcon:!0}):null]}))}));Wi.displayName="ZTXK_WEBUI_Table",Wi.SELECTION_COLUMN=n.Table.SELECTION_COLUMN,Wi.EXPAND_COLUMN=n.Table.EXPAND_COLUMN,Wi.SELECTION_ALL=n.Table.SELECTION_ALL,Wi.SELECTION_INVERT=n.Table.SELECTION_INVERT,Wi.SELECTION_NONE=n.Table.SELECTION_NONE,Wi.Column=n.Table.Column,Wi.ColumnGroup=n.Table.ColumnGroup,Wi.Summary=n.Table.Summary;var $i=r.memo((function(e){var r,i=e.className,o=e.isHeader,a=e.isContent,s=e.marginTop,c=void 0!==s&&s,u=e.marginBottom,l=void 0===u||u,d=y(e,["className","isHeader","isContent","marginTop","marginBottom"]),f=C("ztxk-tabs",i,((r={})["ztxk-tabs--header"]=o,r["ztxk-tabs--content"]=a,r["ztxk-tabs--marginTop"]=c,r["ztxk-tabs--marginBottom"]=l,r));return t.jsx(n.Tabs,v({type:o?"editable-card":a?"card":void 0,hideAdd:!!o||void 0,className:f},d))}));function Ki(e,t){e.update((function(e){return v(v({},e),{cancelButtonProps:v(v({},e.cancelButtonProps||{}),t)})}))}$i.displayName="ZTXK_WEBUI_Tabs",$i.TabPane=n.Tabs.TabPane;var Vi=r.forwardRef((function(e,i){var o=e.className,a=e.defaultOpen,s=e.defaultTitle,c=e.defaultConfirmMsg,u=e.defaultConfirmOkText,l=e.defaultType,d=e.confirmPreHandle,f=e.confirmOnOk,g=e.onOk,h=e.footer,p=y(e,["className","defaultOpen","defaultTitle","defaultConfirmMsg","defaultConfirmOkText","defaultType","confirmPreHandle","confirmOnOk","onOk","footer"]),m=C("ztxk-modal",o),S=r.useState(a),w=S[0],O=S[1],D=r.useState(s),T=D[0],I=D[1],k=r.useState(),E=k[0],j=k[1],N=r.useState(!1),P=N[0],A=N[1],M=r.useState(c),R=M[0],_=M[1],L=r.useState(u),z=L[0],F=L[1],B=r.useState(l),H=B[0],U=B[1],q=r.useCallback((function(){O(!1)}),[]),W=r.useCallback((function(){return b(void 0,void 0,void 0,(function(){var e,t;return x(this,(function(r){return P?(e=d&&d(H),t=n.Modal.confirm({title:(null==e?void 0:e.confirmMsg)?e.confirmMsg:R,okText:(null==e?void 0:e.confirmOkText)?e.confirmOkText:z||"确认保存",keyboard:!1,maskClosable:!1,onOk:f?function(){return Ki(t,{loading:!0}),f(H).then((function(){Ki(t,{loading:!1}),O(!1)})).catch((function(e){Ki(t,{loading:!1})}))}:void 0})):g&&(j(!0),g(H).then((function(){j(!1),O(!1)})).catch((function(e){j(!1)}))),[2]}))}))}),[P,d,R,z,f,H,g]);return r.useImperativeHandle(i,(function(){return{open:function(e){(null==e?void 0:e.title)&&I(e.title),(null==e?void 0:e.confirmMsg)&&_(e.confirmMsg),(null==e?void 0:e.confirmOkText)&&F(e.confirmOkText),(null==e?void 0:e.type)&&U(e.type),"boolean"==typeof(null==e?void 0:e.isConfirm)&&A(e.isConfirm),O(!0)},close:function(){O(!1)},getType:function(){return H},setConfirmMsg:F}})),t.jsx(n.Modal,v({open:w,onCancel:q,className:m,okText:"保存",onOk:h?void 0:W,width:"70%",title:T,keyboard:!1,maskClosable:!1,confirmLoading:E,cancelButtonProps:{loading:E},footer:h},p))}));Vi.displayName="ZTXK_WEBUI_ModalComponent",Vi.info=n.Modal.info,Vi.success=n.Modal.success,Vi.error=n.Modal.error,Vi.warning=n.Modal.warning,Vi.confirm=n.Modal.confirm,Vi.destroyAll=n.Modal.destroyAll;var Yi=function(e){var r=e.children,i=e.className,o=e.border,a=e.isBg,s=y(e,["children","className","border","isBg"]),c=C("ztxk-grid",i,{"ztxk-grid--border":o,"ztxk-grid--background":a});return t.jsx(n.Row,v({className:c},s,{gutter:0},{children:r}))};Yi.displayName="ZTXK_WEBUI_DetailList",Yi.Item=function(e){var r=e.children,i=e.className,o=e.title,a=e.colon,s=void 0===a||a,c=e.span,u=e.titleSpan,l=e.titleProps,d=e.textProps,f=e.showDiff,g=e.isEllipsis,h=void 0===g||g,p=e.isBlod,m=C("ztxk-grid-item",i);return t.jsxs(t.Fragment,{children:[t.jsxs(n.Col,v({className:m+" ztxk-grid-item--title",span:u||3,title:o},l,{children:[t.jsx("span",v({className:"ztxk-grid-item--title-text"},{children:o})),t.jsx("span",v({className:"ztxk-grid-item--title-colon"},{children:s&&":"}))]})),t.jsx(n.Col,v({className:f?m+" ztxk-grid-item--text ztxk-grid-item--diff"+"".concat(h?" ztxk-grid-item--text-ellipsis":" ztxk-grid-item--text-noellipsis"):m+" ztxk-grid-item--text"+"".concat(h?" ztxk-grid-item--text-ellipsis":" ztxk-grid-item--text-noellipsis"),span:u?c-u:c-3,title:"string"==typeof r?r:void 0,style:{fontWeight:p?"bold":"normal"}},d,{children:r}))]})};var Xi=function(e){var r=e.children,i=e.layoutSliderRender,o=e.layoutHeaderRender;return t.jsxs(n.Layout,v({className:"zmdms-container"},{children:[i,t.jsxs(n.Layout,v({className:"zmdms-content"},{children:[o,t.jsx(n.Layout.Content,v({className:"zmdms-content--content"},{children:r}))]}))]}))};Xi.displayName="ZTXK_WEBUI_AppLayout";var Gi=r.memo(Xi),Zi=function(e){var n=e.tabs,i=e.activeTab,o=e.deleteTab,a=e.setActiveTab,s=r.useMemo((function(){return Array.isArray(n)?n.map((function(e){return{key:e.key,label:t.jsx(h.Link,v({to:e.path},{children:e.label}))}})):[]}),[n]);return t.jsx($i,{items:s,activeKey:i,isHeader:!0,onTabClick:function(e){a(e)},onEdit:function(e){o(e)}})},Ji=r.memo((function(){var e=r.useRef(null),n=function(e,t){var n=r.useState(!1),i=n[0],o=n[1];return r.useEffect((function(){if(e.current){var n=e.current,r=function(){if(bi.isEnabled){var e=bi;(null==t?void 0:t.current)?e.toggle(t.current):e.toggle()}};return n.addEventListener("click",r),function(){n.removeEventListener("click",r)}}}),[e,t]),r.useEffect((function(){if(bi.isEnabled){var e=bi,t=function(){e.isFullscreen?o(!0):o(!1)};return e.on("change",t),function(){e.off("change",t)}}}),[]),i}(e);return t.jsx("div",v({className:"full-screen",ref:e,title:n?"退出全屏":"全屏"},{children:n?t.jsx(Dt,{}):t.jsx(it,{})}))})),Qi=function(e){var r=e.userInfo,i=e.logout,o=[{label:t.jsxs("div",{children:[t.jsx(Nt,{style:{marginRight:5}})," 账号信息"]}),key:"info"},{label:t.jsxs("div",{children:[t.jsx(kt,{style:{marginRight:5}})," 修改密码"]}),key:"password"},{type:"divider"},{label:t.jsxs("div",v({onClick:function(){i&&i()}},{children:[t.jsx(st,{style:{marginRight:5}})," 退出系统"]})),key:"logout"}];return t.jsx(n.Dropdown,v({menu:{items:o},placement:"bottomLeft"},{children:t.jsxs("div",v({className:"user-operation"},{children:[t.jsx(Nt,{}),t.jsx("span",{children:null==r?void 0:r.real_name})]}))}))},eo=function(e){var n=e.userInfo,r=e.logout;return t.jsxs("div",v({className:"zmdms-content--header-info"},{children:[t.jsx(Ji,{}),t.jsx(Qi,{userInfo:n,logout:r})]}))},to=function(e){var r=e.tabs,i=e.activeTab,o=e.deleteTab,a=e.setActiveTab,s=e.userInfo,c=e.logout;return t.jsxs(n.Layout.Header,v({className:"zmdms-content--header"},{children:[t.jsx(Zi,{tabs:r,activeTab:i,deleteTab:o,setActiveTab:a}),t.jsx(eo,{userInfo:s,logout:c})]}))};to.displayName="ZTXK_WEBUI_AppLayoutHeader";var no=r.memo(to),ro=r.memo((function(e){var n=e.logo;return t.jsx("div",v({className:"zmdms-logo"},{children:t.jsx("img",{src:n,title:"浙商中拓ERP",alt:"zszt_logo"})}))})),io=function(e){var i=e.userMenus,o=e.onMouseEnter,a=e.onMainLinkClick,s=e.addTab,c=r.useCallback((function(e){return"index"===e.type?t.jsx(h.Link,v({to:e.path,onClick:function(){s&&s({key:e.path,path:e.path,label:e.name})}},{children:e.name})):"/"===e.path?e.name:t.jsx(h.Link,v({to:e.path,onClick:function(){s&&s({key:e.path,path:e.path,label:e.name})}},{children:e.name}))}),[s]),u=r.useMemo((function(){return Array.isArray(i)?i.map((function(e){return{label:c(e),title:e.name,key:e.id,icon:e.source?t.jsx(zt,{type:e.source,style:{fontSize:"18px"}}):null}})):(console.error("用户主菜单没有按预期传入对应数据!"),[])}),[i,c]),l=r.useCallback((function(e){var t=e.key;a(t)}),[a]);return t.jsx(n.Menu,{className:"zmdms-menu--main",items:u,inlineIndent:10,mode:"inline",onMouseEnter:o,onClick:l})},oo=r.memo(r.forwardRef((function(e,i){var o=e.marginLeft,a=e.subMenus,s=e.subMenuWidth,c=e.layoutSiderRef,u=e.addTab,l=r.useState(),d=l[0],f=l[1],g=r.useState(),p=g[0],m=g[1],y=r.useCallback((function(){m((function(e){return c.current.style.marginRight=e?0:"".concat(s,"px"),!e}))}),[c,s]),b=t.jsxs(D,v({type:"link",onClick:y},{children:[t.jsx(zt,{type:"icon-toggle",style:{fontSize:"18px"}}),p?"浮动":"固定"]}));r.useImperativeHandle(i,(function(){return{setVisible:function(e){p||f(e)}}}));var x=r.useMemo((function(){var e=function(n,r,i){return void 0===r&&(r=[]),void 0===i&&(i=1),i>=3?null:(i++,Array.isArray(n)&&n.forEach((function(n){var o={label:"/"===n.path?n.name:t.jsx(h.Link,v({to:n.path,onClick:function(){u({key:n.path,path:n.path,label:n.name})}},{children:n.name})),title:n.name,key:n.id,children:Array.isArray(n.children)&&n.children.length>0?e(n.children,[],i):null};r.push(o)})),r)};return e(a)}),[a,u]);return t.jsx(n.Drawer,v({mask:!1,placement:"left",width:s,zIndex:99,closable:!1,open:d,className:"zmdms-menu--sub",style:{marginLeft:o},footer:b},{children:t.jsx(n.Menu,{inlineIndent:10,mode:"inline",items:x})}))}))),ao=[],so=r.memo((function(e){var n=e.width,i=e.subMenuWidth,o=e.layoutSiderRef,a=e.userMenus,s=e.userSubMenus,c=e.addTab,u=e.logo,l=r.useRef({}),d=r.useState(ao),f=d[0],g=d[1],h=r.useCallback((function(){var e;null===(e=l.current)||void 0===e||e.setVisible(!0)}),[]),p=r.useCallback((function(e){e?s&&g(s[e]):g(ao)}),[s]),m=r.useCallback((function(){var e;null===(e=l.current)||void 0===e||e.setVisible(!1)}),[]);return t.jsxs("div",v({className:"zmdms-menu",onMouseLeave:m},{children:[t.jsx(ro,{logo:u}),t.jsx(io,{userMenus:a,onMouseEnter:h,onMainLinkClick:p,addTab:c}),t.jsx(oo,{ref:l,marginLeft:n,subMenuWidth:i,subMenus:f,layoutSiderRef:o,addTab:c})]}))})),co=function(e){var i=e.siderWidth,o=void 0===i?118:i,a=e.subMenuWidth,s=void 0===a?162:a,c=e.userMenus,u=e.userSubMenus,l=e.addTab,d=e.siderBg,f=e.logo,g=r.useRef();return t.jsx(n.Layout.Sider,v({className:"zmdms-sider",collapsedWidth:"0",collapsible:!0,trigger:null,width:o,ref:g,style:{backgroundImage:d}},{children:t.jsx(so,{width:o,subMenuWidth:s,layoutSiderRef:g,userMenus:c,userSubMenus:u,addTab:l,logo:f})}))};co.displayName="ZTXK_WEBUI_AppLayoutSider";var uo=r.memo(co),lo=function(e){var r,i=e.statusBtnConfig,o=e.authUserBtns,a=e.callback,s=function(e){a&&a(e)};return t.jsx(t.Fragment,{children:null===(r=i||[])||void 0===r?void 0:r.map((function(e){var r=e.authority,i=e.confirmMsg,a=e.type,c=e.name,u=!1;return u="boolean"==typeof r?r:void 0===r||!!o.find((function(e){return e.code===r})),i?t.jsx(n.Popconfirm,v({title:i,cancelText:"否",okText:"是",onConfirm:function(){return s(a)}},{children:t.jsx(D,v({type:"link",style:{height:28},disabled:!u},{children:c}))}),a):t.jsx(D,v({type:"link",style:{height:28},onClick:function(){return s(a)},disabled:!u},{children:c}),a)}))})};lo.displayName="ZTXK_WEBUI_OperationBtn",Object.defineProperty(e,"Affix",{enumerable:!0,get:function(){return n.Affix}}),Object.defineProperty(e,"Alert",{enumerable:!0,get:function(){return n.Alert}}),Object.defineProperty(e,"Anchor",{enumerable:!0,get:function(){return n.Anchor}}),Object.defineProperty(e,"AutoComplete",{enumerable:!0,get:function(){return n.AutoComplete}}),Object.defineProperty(e,"Avatar",{enumerable:!0,get:function(){return n.Avatar}}),Object.defineProperty(e,"BackTop",{enumerable:!0,get:function(){return n.BackTop}}),Object.defineProperty(e,"Badge",{enumerable:!0,get:function(){return n.Badge}}),Object.defineProperty(e,"Breadcrumb",{enumerable:!0,get:function(){return n.Breadcrumb}}),Object.defineProperty(e,"Card",{enumerable:!0,get:function(){return n.Card}}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return n.Carousel}}),Object.defineProperty(e,"Cascader",{enumerable:!0,get:function(){return n.Cascader}}),Object.defineProperty(e,"Checkbox",{enumerable:!0,get:function(){return n.Checkbox}}),Object.defineProperty(e,"Col",{enumerable:!0,get:function(){return n.Col}}),Object.defineProperty(e,"Collapse",{enumerable:!0,get:function(){return n.Collapse}}),Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return n.Comment}}),Object.defineProperty(e,"ConfigProvider",{enumerable:!0,get:function(){return n.ConfigProvider}}),Object.defineProperty(e,"Descriptions",{enumerable:!0,get:function(){return n.Descriptions}}),Object.defineProperty(e,"Divider",{enumerable:!0,get:function(){return n.Divider}}),Object.defineProperty(e,"Drawer",{enumerable:!0,get:function(){return n.Drawer}}),Object.defineProperty(e,"Dropdown",{enumerable:!0,get:function(){return n.Dropdown}}),Object.defineProperty(e,"Empty",{enumerable:!0,get:function(){return n.Empty}}),Object.defineProperty(e,"Grid",{enumerable:!0,get:function(){return n.Grid}}),Object.defineProperty(e,"Image",{enumerable:!0,get:function(){return n.Image}}),Object.defineProperty(e,"Layout",{enumerable:!0,get:function(){return n.Layout}}),Object.defineProperty(e,"List",{enumerable:!0,get:function(){return n.List}}),Object.defineProperty(e,"Mentions",{enumerable:!0,get:function(){return n.Mentions}}),Object.defineProperty(e,"Menu",{enumerable:!0,get:function(){return n.Menu}}),Object.defineProperty(e,"PageHeader",{enumerable:!0,get:function(){return n.PageHeader}}),Object.defineProperty(e,"Popconfirm",{enumerable:!0,get:function(){return n.Popconfirm}}),Object.defineProperty(e,"Popover",{enumerable:!0,get:function(){return n.Popover}}),Object.defineProperty(e,"Progress",{enumerable:!0,get:function(){return n.Progress}}),Object.defineProperty(e,"Radio",{enumerable:!0,get:function(){return n.Radio}}),Object.defineProperty(e,"Rate",{enumerable:!0,get:function(){return n.Rate}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return n.Result}}),Object.defineProperty(e,"Row",{enumerable:!0,get:function(){return n.Row}}),Object.defineProperty(e,"Segmented",{enumerable:!0,get:function(){return n.Segmented}}),Object.defineProperty(e,"Select",{enumerable:!0,get:function(){return n.Select}}),Object.defineProperty(e,"Skeleton",{enumerable:!0,get:function(){return n.Skeleton}}),Object.defineProperty(e,"Slider",{enumerable:!0,get:function(){return n.Slider}}),Object.defineProperty(e,"Space",{enumerable:!0,get:function(){return n.Space}}),Object.defineProperty(e,"Spin",{enumerable:!0,get:function(){return n.Spin}}),Object.defineProperty(e,"Statistic",{enumerable:!0,get:function(){return n.Statistic}}),Object.defineProperty(e,"Steps",{enumerable:!0,get:function(){return n.Steps}}),Object.defineProperty(e,"Switch",{enumerable:!0,get:function(){return n.Switch}}),Object.defineProperty(e,"Tag",{enumerable:!0,get:function(){return n.Tag}}),Object.defineProperty(e,"Timeline",{enumerable:!0,get:function(){return n.Timeline}}),Object.defineProperty(e,"Tooltip",{enumerable:!0,get:function(){return n.Tooltip}}),Object.defineProperty(e,"Transfer",{enumerable:!0,get:function(){return n.Transfer}}),Object.defineProperty(e,"Tree",{enumerable:!0,get:function(){return n.Tree}}),Object.defineProperty(e,"TreeSelect",{enumerable:!0,get:function(){return n.TreeSelect}}),Object.defineProperty(e,"Typography",{enumerable:!0,get:function(){return n.Typography}}),Object.defineProperty(e,"Upload",{enumerable:!0,get:function(){return n.Upload}}),Object.defineProperty(e,"message",{enumerable:!0,get:function(){return n.message}}),Object.defineProperty(e,"notification",{enumerable:!0,get:function(){return n.notification}}),e.AppLayout=Gi,e.AppLayoutHeader=no,e.AppLayoutSider=uo,e.Button=D,e.Calendar=U,e.Container=wi,e.DatePicker=H,e.DetailList=Yi,e.DynamicSetting=oi,e.Footer=Ci,e.Form=ui,e.FormItem=hi,e.Icon=zt,e.Input=T,e.InputNumber=j,e.Login=K,e.Modal=Vi,e.OperationBtn=lo,e.Pagination=Di,e.ProtectedRoute=function(e){var n=e.hasAuth,r=void 0===n||n,i=e.element,o=e.backLogin;return g.getToken()?r?i:t.jsx("div",{children:"您没有权限访问当前页面!"}):(console.log("当前页面需要登录! 请登录成功后再进行访问!"),o())},e.SuspenseComponent=function(e){var n=e.children;return t.jsx(r.Suspense,v({fallback:t.jsx("div",{children:"loading..."})},{children:n}))},e.Table=Wi,e.Tabs=$i,e.TimePicker=q,e.ZtxkContext=W}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-webui",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "private": false,
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",