hlyc-web-pack 3.6.34 → 3.6.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InternalFieldProps } from 'rc-field-form/lib/Field';
|
|
3
3
|
import { SelectType, AnyObjectType } from '../../brother/typings';
|
|
4
|
+
import { TableColumns } from '../index';
|
|
4
5
|
import './index.less';
|
|
5
6
|
declare type remoteValueType = string | undefined;
|
|
6
7
|
declare type remotePromiseType = (value: remoteValueType, record: AnyObjectType) => Promise<SelectType[]>;
|
|
@@ -27,13 +28,14 @@ export interface EditableColumnsType {
|
|
|
27
28
|
controlRender: (record: AnyObjectType, childNode: React.ReactNode) => React.ReactNode;
|
|
28
29
|
}
|
|
29
30
|
/** 可编辑单元格 */
|
|
30
|
-
declare type EditableCellProps = {
|
|
31
|
+
export declare type EditableCellProps = {
|
|
31
32
|
title: React.ReactNode;
|
|
32
33
|
children: React.ReactNode;
|
|
33
34
|
dataIndex: string;
|
|
34
35
|
record: AnyObjectType;
|
|
35
36
|
/** 保存表单的值 */
|
|
36
37
|
handleSave: (record: AnyObjectType) => void;
|
|
38
|
+
columns: TableColumns[];
|
|
37
39
|
} & EditableColumnsType;
|
|
38
40
|
interface DraggableBodyRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
39
41
|
open: boolean;
|
package/lib/index.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/function dT(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var pT=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(t){a[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,r=dT(t),o=1;o<arguments.length;o++){for(var i in n=Object(arguments[o]))sT.call(n,i)&&(r[i]=n[i]);if(cT){a=cT(n);for(var l=0;l<a.length;l++)uT.call(n,a[l])&&(r[a[l]]=n[a[l]])}}return r},fT="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mT=function(){};if("production"!==process.env.NODE_ENV){var hT=fT,gT={},bT=Function.call.bind(Object.prototype.hasOwnProperty);mT=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(t){}}}function vT(t,e,n,a,r){if("production"!==process.env.NODE_ENV)for(var o in t)if(bT(t,o)){var i;try{if("function"!=typeof t[o]){var l=Error((a||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[o]+"`.");throw l.name="Invariant Violation",l}i=t[o](e,o,a,n,null,hT)}catch(t){i=t}if(!i||i instanceof Error||mT((a||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in gT)){gT[i.message]=!0;var c=r?r():"";mT("Failed "+n+" type: "+i.message+(null!=c?c:""))}}}vT.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(gT={})};var yT=vT,xT=Function.call.bind(Object.prototype.hasOwnProperty),wT=function(){};function kT(){return null}"production"!==process.env.NODE_ENV&&(wT=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(t){}});var CT=function(t,e){var n="function"==typeof Symbol&&Symbol.iterator;var a="<<anonymous>>",r={array:c("array"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:l(kT),arrayOf:function(t){return l((function(e,n,a,r,o){if("function"!=typeof t)return new i("Property `"+o+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var l=e[n];if(!Array.isArray(l))return new i("Invalid "+r+" `"+o+"` of type `"+u(l)+"` supplied to `"+a+"`, expected an array.");for(var c=0;c<l.length;c++){var s=t(l,c,a,r,o+"["+c+"]",fT);if(s instanceof Error)return s}return null}))},element:l((function(e,n,a,r,o){var l=e[n];return t(l)?null:new i("Invalid "+r+" `"+o+"` of type `"+u(l)+"` supplied to `"+a+"`, expected a single ReactElement.")})),elementType:l((function(t,e,n,a,r){var o=t[e];return dt.isValidElementType(o)?null:new i("Invalid "+a+" `"+r+"` of type `"+u(o)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(t){return l((function(e,n,r,o,l){if(!(e[n]instanceof t)){var c=t.name||a;return new i("Invalid "+o+" `"+l+"` of type `"+(((s=e[n]).constructor&&s.constructor.name?s.constructor.name:a)+"` supplied to `")+r+"`, expected instance of `"+c+"`.")}var s;return null}))},node:l((function(t,e,n,a,r){return s(t[e])?null:new i("Invalid "+a+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(t){return l((function(e,n,a,r,o){if("function"!=typeof t)return new i("Property `"+o+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var l=e[n],c=u(l);if("object"!==c)return new i("Invalid "+r+" `"+o+"` of type `"+c+"` supplied to `"+a+"`, expected an object.");for(var s in l)if(xT(l,s)){var d=t(l,s,a,r,o+"."+s,fT);if(d instanceof Error)return d}return null}))},oneOf:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&wT(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),kT;function e(e,n,a,r,l){for(var c=e[n],s=0;s<t.length;s++)if(o(c,t[s]))return null;var u=JSON.stringify(t,(function(t,e){return"symbol"===d(e)?String(e):e}));return new i("Invalid "+r+" `"+l+"` of value `"+String(c)+"` supplied to `"+a+"`, expected one of "+u+".")}return l(e)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&wT("Invalid argument supplied to oneOfType, expected an instance of array."),kT;for(var e=0;e<t.length;e++){var n=t[e];if("function"!=typeof n)return wT("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+p(n)+" at index "+e+"."),kT}return l((function(e,n,a,r,o){for(var l=0;l<t.length;l++)if(null==(0,t[l])(e,n,a,r,o,fT))return null;return new i("Invalid "+r+" `"+o+"` supplied to `"+a+"`.")}))},shape:function(t){return l((function(e,n,a,r,o){var l=e[n],c=u(l);if("object"!==c)return new i("Invalid "+r+" `"+o+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");for(var s in t){var d=t[s];if(d){var p=d(l,s,a,r,o+"."+s,fT);if(p)return p}}return null}))},exact:function(t){return l((function(e,n,a,r,o){var l=e[n],c=u(l);if("object"!==c)return new i("Invalid "+r+" `"+o+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var s=pT({},e[n],t);for(var d in s){var p=t[d];if(!p)return new i("Invalid "+r+" `"+o+"` key `"+d+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(e[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(t),null," "));var f=p(l,d,a,r,o+"."+d,fT);if(f)return f}return null}))}};function o(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function i(t){this.message=t,this.stack=""}function l(t){if("production"!==process.env.NODE_ENV)var n={},r=0;function o(o,l,c,s,u,d,p){if(s=s||a,d=d||c,p!==fT){if(e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=s+":"+c;!n[m]&&r<3&&(wT("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[m]=!0,r++)}}return null==l[c]?o?null===l[c]?new i("The "+u+" `"+d+"` is marked as required in `"+s+"`, but its value is `null`."):new i("The "+u+" `"+d+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:t(l,c,s,u,d)}var l=o.bind(null,!1);return l.isRequired=o.bind(null,!0),l}function c(t){return l((function(e,n,a,r,o,l){var c=e[n];return u(c)!==t?new i("Invalid "+r+" `"+o+"` of type `"+d(c)+"` supplied to `"+a+"`, expected `"+t+"`."):null}))}function s(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(s);if(null===e||t(e))return!0;var a=function(t){var e=t&&(n&&t[n]||t["@@iterator"]);if("function"==typeof e)return e}(e);if(!a)return!1;var r,o=a.call(e);if(a!==e.entries){for(;!(r=o.next()).done;)if(!s(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!s(i[1]))return!1}return!0;default:return!1}}function u(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,e){return"symbol"===t||!!e&&("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}(e,t)?"symbol":e}function d(t){if(null==t)return""+t;var e=u(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function p(t){var e=d(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}return i.prototype=Error.prototype,r.checkPropTypes=yT,r.resetWarningCache=yT.resetWarningCache,r.PropTypes=r,r};function ET(){}function OT(){}OT.resetWarningCache=ET;var ST=z((function(t){if("production"!==process.env.NODE_ENV){var e=dt;t.exports=CT(e.isElement,!0)}else t.exports=function(){function t(t,e,n,a,r,o){if(o!==fT){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:OT,resetWarningCache:ET};return n.PropTypes=n,n}()})),NT=z((function(t,e){e.__esModule=!0,e.resizableProps=void 0;var n=function(t){return t&&t.__esModule?t:{default:t}}(ST);var a={axis:n.default.oneOf(["both","x","y","none"]),className:n.default.string,children:n.default.element.isRequired,draggableOpts:n.default.shape({allowAnyClick:n.default.bool,cancel:n.default.string,children:n.default.node,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:n.default.node,grid:n.default.arrayOf(n.default.number),handle:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number}),height:n.default.number.isRequired,handle:n.default.oneOfType([n.default.node,n.default.func]),handleSize:n.default.arrayOf(n.default.number),lockAspectRatio:n.default.bool,maxConstraints:n.default.arrayOf(n.default.number),minConstraints:n.default.arrayOf(n.default.number),onResizeStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,resizeHandles:n.default.arrayOf(n.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:n.default.number,width:n.default.number.isRequired};e.resizableProps=a})),PT=z((function(t,e){e.__esModule=!0,e.default=void 0;var n=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=r(e);if(n&&n.has(t))return n.get(t);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if("default"!==i&&Object.prototype.hasOwnProperty.call(t,i)){var l=o?Object.getOwnPropertyDescriptor(t,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=t[i]}a.default=t,n&&n.set(t,a);return a}(u.default),a=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(r=function(t){return t?n:e})(t)}function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t}).apply(this,arguments)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var d=function(t){var e,r;function i(){for(var e,n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return(e=t.call.apply(t,[this].concat(a))||this).handleRefs={},e.lastHandleRect=null,e.slack=null,e}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,s(e,r);var c=i.prototype;return c.componentWillUnmount=function(){this.resetData()},c.resetData=function(){this.lastHandleRect=this.slack=null},c.runConstraints=function(t,e){var n=this.props,a=n.minConstraints,r=n.maxConstraints,o=n.lockAspectRatio;if(!a&&!r&&!o)return[t,e];if(o){var i=this.props.width/this.props.height,l=t-this.props.width,c=e-this.props.height;Math.abs(l)>Math.abs(c*i)?e=t/i:t=e*i}var s=t,u=e,d=this.slack||[0,0],p=d[0],f=d[1];return t+=p,e+=f,a&&(t=Math.max(a[0],t),e=Math.max(a[1],e)),r&&(t=Math.min(r[0],t),e=Math.min(r[1],e)),this.slack=[p+(s-t),f+(u-e)],[t,e]},c.resizeHandler=function(t,e){var n=this;return function(a,r){var o=r.node,i=r.deltaX,l=r.deltaY;"onResizeStart"===t&&n.resetData();var c=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==e&&"s"!==e,s=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==e&&"w"!==e;if(c||s){var u=e[0],d=e[e.length-1],p=o.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===d)i+=p.left-n.lastHandleRect.left;if("n"===u)l+=p.top-n.lastHandleRect.top}n.lastHandleRect=p,"w"===d&&(i=-i),"n"===u&&(l=-l);var f=n.props.width+(c?i/n.props.transformScale:0),m=n.props.height+(s?l/n.props.transformScale:0),h=n.runConstraints(f,m);f=h[0],m=h[1];var g=f!==n.props.width||m!==n.props.height,b="function"==typeof n.props[t]?n.props[t]:null;b&&!("onResize"===t&&!g)&&(null==a.persist||a.persist(),b(a,{node:o,size:{width:f,height:m},handle:e})),"onResizeStop"===t&&n.resetData()}}},c.renderResizeHandle=function(t,e){var a=this.props.handle;if(!a)return n.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:e});if("function"==typeof a)return a(t,e);var r=l({ref:e},"string"==typeof a.type?{}:{handleAxis:t});return n.cloneElement(a,r)},c.render=function(){var t=this,e=this.props,r=e.children,i=e.className,c=e.draggableOpts;e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart;var s=e.resizeHandles;e.transformScale;var u=function(t,e){if(null==t)return{};var n,a,r={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(r[n]=t[n]);return r}(e,a);return(0,lT.cloneElement)(r,l(l({},u),{},{className:(i?i+" ":"")+"react-resizable",children:[].concat(r.props.children,s.map((function(e){var a,r=null!=(a=t.handleRefs[e])?a:t.handleRefs[e]=n.createRef();return n.createElement(f.default.DraggableCore,o({},c,{nodeRef:r,key:"resizableHandle-"+e,onStop:t.resizeHandler("onResizeStop",e),onStart:t.resizeHandler("onResizeStart",e),onDrag:t.resizeHandler("onResize",e)}),t.renderResizeHandle(e,r))})))}))},i}(n.Component);e.default=d,d.propTypes=NT.resizableProps,d.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}})),jT=z((function(t,e){e.__esModule=!0,e.default=void 0;var n=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=l(e);if(n&&n.has(t))return n.get(t);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var i=r?Object.getOwnPropertyDescriptor(t,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=t[o]}a.default=t,n&&n.set(t,a);return a}(u.default),a=i(ST),r=i(PT),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function i(t){return t&&t.__esModule?t:{default:t}}function l(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(l=function(t){return t?n:e})(t)}function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t}).apply(this,arguments)}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var m=function(t){var e,a;function i(){for(var e,n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return(e=t.call.apply(t,[this].concat(a))||this).state={width:e.props.width,height:e.props.height,propsWidth:e.props.width,propsHeight:e.props.height},e.onResize=function(t,n){var a=n.size;e.props.onResize?(null==t.persist||t.persist(),e.setState(a,(function(){return e.props.onResize&&e.props.onResize(t,n)}))):e.setState(a)},e}return a=t,(e=i).prototype=Object.create(a.prototype),e.prototype.constructor=e,f(e,a),i.getDerivedStateFromProps=function(t,e){return e.propsWidth!==t.width||e.propsHeight!==t.height?{width:t.width,height:t.height,propsWidth:t.width,propsHeight:t.height}:null},i.prototype.render=function(){var t=this.props,e=t.handle,a=t.handleSize;t.onResize;var i=t.onResizeStart,l=t.onResizeStop,s=t.draggableOpts,u=t.minConstraints,p=t.maxConstraints,f=t.lockAspectRatio,m=t.axis;t.width,t.height;var h=t.resizeHandles,g=t.style,b=t.transformScale,v=function(t,e){if(null==t)return{};var n,a,r={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,o);return n.createElement(r.default,{axis:m,draggableOpts:s,handle:e,handleSize:a,height:this.state.height,lockAspectRatio:f,maxConstraints:p,minConstraints:u,onResizeStart:i,onResize:this.onResize,onResizeStop:l,resizeHandles:h,transformScale:b,width:this.state.width},n.createElement("div",c({},v,{style:d(d({},g),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},i}(n.Component);e.default=m,m.propTypes=d(d({},NT.resizableProps),{},{children:a.default.element})})),TT=PT.default;jT.default;const IT=t=>{const{onResize:e,width:a,...r}=t;return a?n.jsx(TT,Object.assign({width:a,height:0,handle:n.jsx("span",{className:"react-resizable-handle",onClick:t=>{t.stopPropagation()}},void 0),onResize:e,draggableOpts:{enableUserSelectHack:!1}},{children:n.jsx("th",Object.assign({},r),void 0)}),void 0):n.jsx("th",Object.assign({},r),void 0)};var DT,RT=t.createContext({dragDropManager:void 0});function MT(t,e){for(var n=arguments.length,a=new Array(n>2?n-2:0),r=2;r<n;r++)a[r-2]=arguments[r];if("production"!==process.env.NODE_ENV&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var o;if(void 0===e)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var i=0;(o=new Error(e.replace(/%s/g,(function(){return a[i++]})))).name="Invariant Violation"}throw o.framesToPop=1,o}}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(DT||(DT={}));var zT="dnd-core/INIT_COORDS",AT="dnd-core/BEGIN_DRAG",LT="dnd-core/PUBLISH_DRAG_SOURCE",_T="dnd-core/HOVER",FT="dnd-core/DROP",VT="dnd-core/END_DRAG";function KT(t,e){return{type:zT,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function HT(t){return(HT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function BT(t,e,n){return e.split(".").reduce((function(t,e){return t&&t[e]?t[e]:n||null}),t)}function UT(t,e){return t.filter((function(t){return t!==e}))}function WT(t){return"object"===HT(t)}function YT(t,e){var n=new Map,a=function(t){n.set(t,n.has(t)?n.get(t)+1:1)};t.forEach(a),e.forEach(a);var r=[];return n.forEach((function(t,e){1===t&&r.push(e)})),r}var $T={type:zT,payload:{clientOffset:null,sourceClientOffset:null}};function qT(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},a=n.publishSource,r=void 0===a||a,o=n.clientOffset,i=n.getSourceClientOffset,l=t.getMonitor(),c=t.getRegistry();t.dispatch(KT(o)),GT(e,l,c);var s=JT(e,l);if(null!==s){var u=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");XT(i),u=i(s)}t.dispatch(KT(o,u));var d=c.getSource(s),p=d.beginDrag(l,s);if(null!=p){ZT(p),c.pinSource(s);var f=c.getSourceType(s);return{type:AT,payload:{itemType:f,item:p,sourceId:s,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}}}else t.dispatch($T)}}function GT(t,e,n){MT(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach((function(t){MT(n.getSource(t),"Expected sourceIds to be registered.")}))}function XT(t){MT("function"==typeof t,"When clientOffset is provided, getSourceClientOffset must be a function.")}function ZT(t){MT(WT(t),"Item must be an object.")}function JT(t,e){for(var n=null,a=t.length-1;a>=0;a--)if(e.canDragSource(t[a])){n=t[a];break}return n}function QT(t){return function(){if(t.getMonitor().isDragging())return{type:LT}}}function tI(t,e){return null===e?null===t:Array.isArray(t)?t.some((function(t){return t===e})):t===e}function eI(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.clientOffset;nI(e);var r=e.slice(0),o=t.getMonitor(),i=t.getRegistry();aI(r,o,i);var l=o.getItemType();return rI(r,i,l),oI(r,o,i),{type:_T,payload:{targetIds:r,clientOffset:a||null}}}}function nI(t){MT(Array.isArray(t),"Expected targetIds to be an array.")}function aI(t,e,n){MT(e.isDragging(),"Cannot call hover while not dragging."),MT(!e.didDrop(),"Cannot call hover after drop.");for(var a=0;a<t.length;a++){var r=t[a];MT(t.lastIndexOf(r)===a,"Expected targetIds to be unique in the passed array."),MT(n.getTarget(r),"Expected targetIds to be registered.")}}function rI(t,e,n){for(var a=t.length-1;a>=0;a--){var r=t[a];tI(e.getTargetType(r),n)||t.splice(a,1)}}function oI(t,e,n){t.forEach((function(t){n.getTarget(t).hover(e,t)}))}function iI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function lI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?iI(Object(n),!0).forEach((function(e){cI(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iI(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function cI(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sI(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getMonitor(),a=t.getRegistry();uI(n);var r=pI(n);r.forEach((function(r,o){var i=dI(r,o,a,n),l={type:FT,payload:{dropResult:lI(lI({},e),i)}};t.dispatch(l)}))}}function uI(t){MT(t.isDragging(),"Cannot call drop while not dragging."),MT(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function dI(t,e,n,a){var r=n.getTarget(t),o=r?r.drop(a,t):void 0;return function(t){MT(void 0===t||WT(t),"Drop result must either be an object or undefined.")}(o),void 0===o&&(o=0===e?{}:a.getDropResult()),o}function pI(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function fI(t){return function(){var e=t.getMonitor(),n=t.getRegistry();!function(t){MT(t.isDragging(),"Cannot call endDrag while not dragging.")}(e);var a=e.getSourceId();null!=a&&(n.getSource(a,!0).endDrag(e,a),n.unpinSource());return{type:VT}}}function mI(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function hI(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gI=function(){function t(e,n){var a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),hI(this,"store",void 0),hI(this,"monitor",void 0),hI(this,"backend",void 0),hI(this,"isSetUp",!1),hI(this,"handleRefCountChange",(function(){var t=a.store.getState().refCount>0;a.backend&&(t&&!a.isSetUp?(a.backend.setup(),a.isSetUp=!0):!t&&a.isSetUp&&(a.backend.teardown(),a.isSetUp=!1))})),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}var e,n,a;return e=t,(n=[{key:"receiveBackend",value:function(t){this.backend=t}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var t=this,e=this.store.dispatch,n=function(t){return{beginDrag:qT(t),publishDragSource:QT(t),hover:eI(t),drop:sI(t),endDrag:fI(t)}}(this);return Object.keys(n).reduce((function(a,r){var o,i=n[r];return a[r]=(o=i,function(){for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];var i=o.apply(t,a);void 0!==i&&e(i)}),a}),{})}},{key:"dispatch",value:function(t){this.store.dispatch(t)}}])&&mI(e.prototype,n),a&&mI(e,a),t}();function bI(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var vI="function"==typeof Symbol&&Symbol.observable||"@@observable",yI=function(){return Math.random().toString(36).substring(7).split("").join(".")},xI={INIT:"@@redux/INIT"+yI(),REPLACE:"@@redux/REPLACE"+yI(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+yI()}};function wI(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function kI(t){if(void 0===t)return"undefined";if(null===t)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";var n=function(t){return"function"==typeof t.constructor?t.constructor.name:null}(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function CI(t){var e=typeof t;return"production"!==process.env.NODE_ENV&&(e=kI(t)),e}function EI(t,e,n){var a;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?bI(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?bI(1):"Expected the enhancer to be a function. Instead, received: '"+CI(n)+"'");return n(EI)(t,e)}if("function"!=typeof t)throw new Error("production"===process.env.NODE_ENV?bI(2):"Expected the root reducer to be a function. Instead, received: '"+CI(t)+"'");var r=t,o=e,i=[],l=i,c=!1;function s(){l===i&&(l=i.slice())}function u(){if(c)throw new Error("production"===process.env.NODE_ENV?bI(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(t){if("function"!=typeof t)throw new Error("production"===process.env.NODE_ENV?bI(4):"Expected the listener to be a function. Instead, received: '"+CI(t)+"'");if(c)throw new Error("production"===process.env.NODE_ENV?bI(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var e=!0;return s(),l.push(t),function(){if(e){if(c)throw new Error("production"===process.env.NODE_ENV?bI(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");e=!1,s();var n=l.indexOf(t);l.splice(n,1),i=null}}}function p(t){if(!wI(t))throw new Error("production"===process.env.NODE_ENV?bI(7):"Actions must be plain objects. Instead, the actual type was: '"+CI(t)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(void 0===t.type)throw new Error("production"===process.env.NODE_ENV?bI(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error("production"===process.env.NODE_ENV?bI(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,t)}finally{c=!1}for(var e=i=l,n=0;n<e.length;n++){(0,e[n])()}return t}function f(t){if("function"!=typeof t)throw new Error("production"===process.env.NODE_ENV?bI(10):"Expected the nextReducer to be a function. Instead, received: '"+CI(t));r=t,p({type:xI.REPLACE})}function m(){var t,e=d;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error("production"===process.env.NODE_ENV?bI(11):"Expected the observer to be an object. Instead, received: '"+CI(t)+"'");function n(){t.next&&t.next(u())}return n(),{unsubscribe:e(n)}}})[vI]=function(){return this},t}return p({type:xI.INIT}),(a={dispatch:p,subscribe:d,getState:u,replaceReducer:f})[vI]=m,a}function OI(){}"production"!==process.env.NODE_ENV&&"string"==typeof OI.name&&"isCrushed"!==OI.name&&function(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw new Error(t)}catch(t){}}('You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.');var SI=function(t,e){return t===e};function NI(t,e){return!t&&!e||!(!t||!e)&&(t.x===e.x&&t.y===e.y)}function PI(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SI;if(t.length!==e.length)return!1;for(var a=0;a<t.length;++a)if(!n(t[a],e[a]))return!1;return!0}function jI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function TI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jI(Object(n),!0).forEach((function(e){II(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jI(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function II(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var DI={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function RI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:DI,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case zT:case AT:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case _T:return NI(t.clientOffset,n.clientOffset)?t:TI(TI({},t),{},{clientOffset:n.clientOffset});case VT:case FT:return DI;default:return t}}var MI="dnd-core/ADD_SOURCE",zI="dnd-core/ADD_TARGET",AI="dnd-core/REMOVE_SOURCE",LI="dnd-core/REMOVE_TARGET";function _I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function FI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_I(Object(n),!0).forEach((function(e){VI(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function VI(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var KI={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function HI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:KI,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case AT:return FI(FI({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case LT:return FI(FI({},t),{},{isSourcePublic:!0});case _T:return FI(FI({},t),{},{targetIds:n.targetIds});case LI:return-1===t.targetIds.indexOf(n.targetId)?t:FI(FI({},t),{},{targetIds:UT(t.targetIds,n.targetId)});case FT:return FI(FI({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case VT:return FI(FI({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function BI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case MI:case zI:return t+1;case AI:case LI:return t-1;default:return t}}var UI=[],WI=[];function YI(t,e){return t!==UI&&(t===WI||void 0===e||(n=t,e.filter((function(t){return n.indexOf(t)>-1}))).length>0);var n}function $I(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _T:break;case MI:case zI:case LI:case AI:return UI;case AT:case LT:case VT:case FT:default:return WI}var e=t.payload,n=e.targetIds,a=void 0===n?[]:n,r=e.prevTargetIds,o=void 0===r?[]:r,i=YT(a,o),l=i.length>0||!PI(a,o);if(!l)return UI;var c=o[o.length-1],s=a[a.length-1];return c!==s&&(c&&i.push(c),s&&i.push(s)),i}function qI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t+1}function GI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function XI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?GI(Object(n),!0).forEach((function(e){ZI(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):GI(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ZI(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function JI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:$I(t.dirtyHandlerIds,{type:e.type,payload:XI(XI({},e.payload),{},{prevTargetIds:BT(t,"dragOperation.targetIds",[])})}),dragOffset:RI(t.dragOffset,e),refCount:BI(t.refCount,e),dragOperation:HI(t.dragOperation,e),stateId:qI(t.stateId)}}function QI(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tD(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function eD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}UI.__IS_NONE__=!0,WI.__IS_ALL__=!0;var nD=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),eD(this,"store",void 0),eD(this,"registry",void 0),this.store=e,this.registry=n}var e,n,a;return e=t,(n=[{key:"subscribeToStateChange",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},a=n.handlerIds;MT("function"==typeof t,"listener must be a function."),MT(void 0===a||Array.isArray(a),"handlerIds, when specified, must be an array of strings.");var r=this.store.getState().stateId,o=function(){var n=e.store.getState(),o=n.stateId;try{o===r||o===r+1&&!YI(n.dirtyHandlerIds,a)||t()}finally{r=o}};return this.store.subscribe(o)}},{key:"subscribeToOffsetChange",value:function(t){var e=this;MT("function"==typeof t,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var a=e.store.getState().dragOffset;a!==n&&(n=a,t())}))}},{key:"canDragSource",value:function(t){if(!t)return!1;var e=this.registry.getSource(t);return MT(e,"Expected to find a valid source. sourceId=".concat(t)),!this.isDragging()&&e.canDrag(this,t)}},{key:"canDropOnTarget",value:function(t){if(!t)return!1;var e=this.registry.getTarget(t);return MT(e,"Expected to find a valid target. targetId=".concat(t)),!(!this.isDragging()||this.didDrop())&&tI(this.registry.getTargetType(t),this.getItemType())&&e.canDrop(this,t)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(t){if(!t)return!1;var e=this.registry.getSource(t,!0);return MT(e,"Expected to find a valid source. sourceId=".concat(t)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t)}},{key:"isOverTarget",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!t)return!1;var n=e.shallow;if(!this.isDragging())return!1;var a=this.registry.getTargetType(t),r=this.getItemType();if(r&&!tI(a,r))return!1;var o=this.getTargetIds();if(!o.length)return!1;var i=o.indexOf(t);return n?i===o.length-1:i>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return t=this.store.getState().dragOffset,e=t.clientOffset,n=t.initialClientOffset,a=t.initialSourceClientOffset,e&&n&&a?QI(function(t,e){return{x:t.x+e.x,y:t.y+e.y}}(e,a),n):null;var t,e,n,a}},{key:"getDifferenceFromInitialOffset",value:function(){return t=this.store.getState().dragOffset,e=t.clientOffset,n=t.initialClientOffset,e&&n?QI(e,n):null;var t,e,n}}])&&tD(e.prototype,n),a&&tD(e,a),t}(),aD=0;function rD(t){return(rD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function oD(t,e){e&&Array.isArray(t)?t.forEach((function(t){return oD(t,!1)})):MT("string"==typeof t||"symbol"===rD(t),e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const iD="undefined"!=typeof global?global:self,lD=iD.MutationObserver||iD.WebKitMutationObserver;function cD(t){return function(){const e=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(e),clearInterval(n),t()}}}const sD="function"==typeof lD?function(t){let e=1;const n=new lD(t),a=document.createTextNode("");return n.observe(a,{characterData:!0}),function(){e=-e,a.data=e}}:cD;class uD{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,e){this.onError=t,this.release=e,this.task=null}}const dD=new class{enqueueTask(t){const{queue:e,requestFlush:n}=this;e.length||(n(),this.flushing=!0),e[e.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const e=this.index;if(this.index++,t[e].call(),this.index>this.capacity){for(let e=0,n=t.length-this.index;e<n;e++)t[e]=t[e+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=sD(this.flush),this.requestErrorThrow=cD((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},pD=new class{create(t){const e=this.freeTasks,n=e.length?e.pop():new uD(this.onError,(t=>e[e.length]=t));return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}(dD.registerPendingError);function fD(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function mD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hD(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return gD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gD(t,e)}(t,e)||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 gD(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function bD(t){var e=(aD++).toString();switch(t){case DT.SOURCE:return"S".concat(e);case DT.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function vD(t){switch(t[0]){case"S":return DT.SOURCE;case"T":return DT.TARGET;default:MT(!1,"Cannot parse handler ID: ".concat(t))}}function yD(t,e){var n=t.entries(),a=!1;do{var r=n.next(),o=r.done;if(hD(r.value,2)[1]===e)return!0;a=!!o}while(!a);return!1}var xD=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),mD(this,"types",new Map),mD(this,"dragSources",new Map),mD(this,"dropTargets",new Map),mD(this,"pinnedSourceId",null),mD(this,"pinnedSource",null),mD(this,"store",void 0),this.store=e}var e,n,a;return e=t,(n=[{key:"addSource",value:function(t,e){oD(t),function(t){MT("function"==typeof t.canDrag,"Expected canDrag to be a function."),MT("function"==typeof t.beginDrag,"Expected beginDrag to be a function."),MT("function"==typeof t.endDrag,"Expected endDrag to be a function.")}(e);var n=this.addHandler(DT.SOURCE,t,e);return this.store.dispatch(function(t){return{type:MI,payload:{sourceId:t}}}(n)),n}},{key:"addTarget",value:function(t,e){oD(t,!0),function(t){MT("function"==typeof t.canDrop,"Expected canDrop to be a function."),MT("function"==typeof t.hover,"Expected hover to be a function."),MT("function"==typeof t.drop,"Expected beginDrag to be a function.")}(e);var n=this.addHandler(DT.TARGET,t,e);return this.store.dispatch(function(t){return{type:zI,payload:{targetId:t}}}(n)),n}},{key:"containsHandler",value:function(t){return yD(this.dragSources,t)||yD(this.dropTargets,t)}},{key:"getSource",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];MT(this.isSourceId(t),"Expected a valid source ID.");var n=e&&t===this.pinnedSourceId,a=n?this.pinnedSource:this.dragSources.get(t);return a}},{key:"getTarget",value:function(t){return MT(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}},{key:"getSourceType",value:function(t){return MT(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}},{key:"getTargetType",value:function(t){return MT(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}},{key:"isSourceId",value:function(t){return vD(t)===DT.SOURCE}},{key:"isTargetId",value:function(t){return vD(t)===DT.TARGET}},{key:"removeSource",value:function(t){var e,n=this;MT(this.getSource(t),"Expected an existing source."),this.store.dispatch(function(t){return{type:AI,payload:{sourceId:t}}}(t)),e=function(){n.dragSources.delete(t),n.types.delete(t)},dD.enqueueTask(pD.create(e))}},{key:"removeTarget",value:function(t){MT(this.getTarget(t),"Expected an existing target."),this.store.dispatch(function(t){return{type:LI,payload:{targetId:t}}}(t)),this.dropTargets.delete(t),this.types.delete(t)}},{key:"pinSource",value:function(t){var e=this.getSource(t);MT(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e}},{key:"unpinSource",value:function(){MT(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(t,e,n){var a=bD(t);return this.types.set(a,e),t===DT.SOURCE?this.dragSources.set(a,n):t===DT.TARGET&&this.dropTargets.set(a,n),a}}])&&fD(e.prototype,n),a&&fD(e,a),t}();function wD(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=kD(a),o=new nD(r,new xD(r)),i=new gI(r,o),l=t(i,e,n);return i.receiveBackend(l),i}function kD(t){var e="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return EI(JI,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var CD=["children"];function ED(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return OD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OD(t,e)}(t,e)||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 OD(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function SD(t,e){if(null==t)return{};var n,a,r=function(t,e){if(null==t)return{};var n,a,r={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var ND=0,PD=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),jD=t.memo((function(e){var a=e.children,r=ED(function(t){if("manager"in t){return[{dragDropManager:t.manager},!1]}var e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:TD(),n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,r=e;r[PD]||(r[PD]={dragDropManager:wD(t,e,n,a)});return r[PD]}(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}(SD(e,CD)),2),o=r[0],i=r[1];return t.useEffect((function(){if(i){var t=TD();return++ND,function(){0==--ND&&(t[PD]=null)}}}),[]),n.jsx(RT.Provider,Object.assign({value:o},{children:a}),void 0)}));function TD(){return"undefined"!=typeof global?global:window}function ID(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function DD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var RD=!1,MD=!1,zD=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),DD(this,"internalMonitor",void 0),DD(this,"sourceId",null),this.internalMonitor=e.getMonitor()}var e,n,a;return e=t,(n=[{key:"receiveHandlerId",value:function(t){this.sourceId=t}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){MT(!RD,"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 RD=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{RD=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;MT(!MD,"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 MD=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{MD=!1}}},{key:"subscribeToStateChange",value:function(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}},{key:"isDraggingSource",value:function(t){return this.internalMonitor.isDraggingSource(t)}},{key:"isOverTarget",value:function(t,e){return this.internalMonitor.isOverTarget(t,e)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(t){return this.internalMonitor.subscribeToOffsetChange(t)}},{key:"canDragSource",value:function(t){return this.internalMonitor.canDragSource(t)}},{key:"canDropOnTarget",value:function(t){return this.internalMonitor.canDropOnTarget(t)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&ID(e.prototype,n),a&&ID(e,a),t}();function AD(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function LD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _D=!1,FD=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),LD(this,"internalMonitor",void 0),LD(this,"targetId",null),this.internalMonitor=e.getMonitor()}var e,n,a;return e=t,(n=[{key:"receiveHandlerId",value:function(t){this.targetId=t}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;MT(!_D,"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 _D=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{_D=!1}}},{key:"isOver",value:function(t){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,t)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&AD(e.prototype,n),a&&AD(e,a),t}();function VD(t){if("string"!=typeof t.type){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function KD(e){var n={};return Object.keys(e).forEach((function(a){var r=e[a];if(a.endsWith("Ref"))n[a]=e[a];else{var o=function(e){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t.isValidElement(n)){var r=n;return e(r,a),r}var o=n;return VD(o),BD(o,a?function(t){return e(t,a)}:e)}}(r);n[a]=function(){return o}}})),n}function HD(t,e){"function"==typeof t?t(e):t.current=e}function BD(e,n){var a=e.ref;return MT("string"!=typeof a,"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"),a?t.cloneElement(e,{ref:function(t){HD(a,t),HD(n,t)}}):t.cloneElement(e,{ref:n})}function UD(t){return(UD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function WD(t){return null!==t&&"object"===UD(t)&&Object.prototype.hasOwnProperty.call(t,"current")}function YD(t,e,n,a){var r=n?n.call(a,t,e):void 0;if(void 0!==r)return!!r;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var o=Object.keys(t),i=Object.keys(e);if(o.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(e),c=0;c<o.length;c++){var s=o[c];if(!l(s))return!1;var u=t[s],d=e[s];if(!1===(r=n?n.call(a,u,d,s):void 0)||void 0===r&&u!==d)return!1}return!0}function $D(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function qD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var GD=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),qD(this,"hooks",KD({dragSource:function(t,e){n.clearDragSource(),n.dragSourceOptions=e||null,WD(t)?n.dragSourceRef=t:n.dragSourceNode=t,n.reconnectDragSource()},dragPreview:function(t,e){n.clearDragPreview(),n.dragPreviewOptions=e||null,WD(t)?n.dragPreviewRef=t:n.dragPreviewNode=t,n.reconnectDragPreview()}})),qD(this,"handlerId",null),qD(this,"dragSourceRef",null),qD(this,"dragSourceNode",void 0),qD(this,"dragSourceOptionsInternal",null),qD(this,"dragSourceUnsubscribe",void 0),qD(this,"dragPreviewRef",null),qD(this,"dragPreviewNode",void 0),qD(this,"dragPreviewOptionsInternal",null),qD(this,"dragPreviewUnsubscribe",void 0),qD(this,"lastConnectedHandlerId",null),qD(this,"lastConnectedDragSource",null),qD(this,"lastConnectedDragSourceOptions",null),qD(this,"lastConnectedDragPreview",null),qD(this,"lastConnectedDragPreviewOptions",null),qD(this,"backend",void 0),this.backend=e}var e,n,a;return e=t,(n=[{key:"receiveHandlerId",value:function(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(t){this.dragSourceOptionsInternal=t}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(t){this.dragPreviewOptionsInternal=t}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var t=this.dragSource,e=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();e&&this.disconnectDragSource(),this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)):this.lastConnectedDragSource=t)}},{key:"reconnectDragPreview",value:function(){var t=this.dragPreview,e=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();e&&this.disconnectDragPreview(),this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!YD(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!YD(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}])&&$D(e.prototype,n),a&&$D(e,a),t}();function XD(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function ZD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var JD=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ZD(this,"hooks",KD({dropTarget:function(t,e){n.clearDropTarget(),n.dropTargetOptions=e,WD(t)?n.dropTargetRef=t:n.dropTargetNode=t,n.reconnect()}})),ZD(this,"handlerId",null),ZD(this,"dropTargetRef",null),ZD(this,"dropTargetNode",void 0),ZD(this,"dropTargetOptionsInternal",null),ZD(this,"unsubscribeDropTarget",void 0),ZD(this,"lastConnectedHandlerId",null),ZD(this,"lastConnectedDropTarget",null),ZD(this,"lastConnectedDropTargetOptions",null),ZD(this,"backend",void 0),this.backend=e}var e,n,a;return e=t,(n=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();var e=this.dropTarget;this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=e,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,e,this.dropTargetOptions)):this.lastConnectedDropTarget=e)}},{key:"receiveHandlerId",value:function(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(t){this.dropTargetOptionsInternal=t}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!YD(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}])&&XD(e.prototype,n),a&&XD(e,a),t}();var QD="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function tR(t){return(tR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eR(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function nR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var aR=function(){function t(e,n,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),nR(this,"spec",void 0),nR(this,"monitor",void 0),nR(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=a}var e,n,a;return e=t,(n=[{key:"beginDrag",value:function(){var t,e=this.spec,n=this.monitor;return null!==(t="object"===tR(e.item)?e.item:"function"==typeof e.item?e.item(n):{})&&void 0!==t?t:null}},{key:"canDrag",value:function(){var t=this.spec,e=this.monitor;return"boolean"==typeof t.canDrag?t.canDrag:"function"!=typeof t.canDrag||t.canDrag(e)}},{key:"isDragging",value:function(t,e){var n=this.spec,a=this.monitor,r=n.isDragging;return r?r(a):e===t.getSourceId()}},{key:"endDrag",value:function(){var t=this.spec,e=this.monitor,n=this.connector,a=t.end;a&&a(e.getItem(),e),n.reconnect()}}])&&eR(e.prototype,n),a&&eR(e,a),t}();function rR(){var e=t.useContext(RT).dragDropManager;return MT(null!=e,"Expected drag drop context"),e}function oR(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return iR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iR(t,e)}(t,e)||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 iR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function lR(e,n,a){var r=rR(),o=function(e,n,a){var r=t.useMemo((function(){return new aR(e,n,a)}),[n,a]);return t.useEffect((function(){r.spec=e}),[e]),r}(e,n,a),i=function(e){return t.useMemo((function(){var t=e.type;return MT(null!=t,"spec.type must be defined"),t}),[e])}(e);QD((function(){if(null!=i){var t=oR(function(t,e,n){var a=n.getRegistry(),r=a.addSource(t,e);return[r,function(){return a.removeSource(r)}]}(i,o,r),2),e=t[0],l=t[1];return n.receiveHandlerId(e),a.receiveHandlerId(e),l}}),[r,n,a,o,i])}function cR(t){return function(t){if(Array.isArray(t))return sR(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return sR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sR(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function uR(e,n){var a=cR(n||[]);return null==n&&"function"!=typeof e&&a.push(e),t.useMemo((function(){return"function"==typeof e?e():e}),a)}var dR=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var a,r,o;if(Array.isArray(e)){if((a=e.length)!=n.length)return!1;for(r=a;0!=r--;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((a=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=a;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=a;0!=r--;){var i=o[r];if(!t(e[i],n[i]))return!1}return!0}return e!=e&&n!=n};function pR(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return fR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fR(t,e)}(t,e)||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 fR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function mR(e,n,a){var r=pR(t.useState((function(){return n(e)})),2),o=r[0],i=r[1],l=t.useCallback((function(){var t=n(e);dR(o,t)||(i(t),a&&a())}),[o,e,a]);return QD(l),[o,l]}function hR(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return gR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gR(t,e)}(t,e)||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 gR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function bR(t,e,n){return function(t,e,n){var a=hR(mR(t,e,n),2),r=a[0],o=a[1];return QD((function(){var e=t.getHandlerId();if(null!=e)return t.subscribeToStateChange(o,{handlerIds:[e]})}),[t,o]),r}(e,t||function(){return{}},(function(){return n.reconnect()}))}function vR(e){return t.useMemo((function(){return e.hooks.dragSource()}),[e])}function yR(e){return t.useMemo((function(){return e.hooks.dragPreview()}),[e])}function xR(e,n){var a=uR(e,n);MT(!a.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)");var r,o=(r=rR(),t.useMemo((function(){return new zD(r)}),[r])),i=function(e,n){var a=rR(),r=t.useMemo((function(){return new GD(a.getBackend())}),[a]);return QD((function(){return r.dragSourceOptions=e||null,r.reconnect(),function(){return r.disconnectDragSource()}}),[r,e]),QD((function(){return r.dragPreviewOptions=n||null,r.reconnect(),function(){return r.disconnectDragPreview()}}),[r,n]),r}(a.options,a.previewOptions);return lR(a,o,i),[bR(a.collect,o,i),vR(i),yR(i)]}function wR(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function kR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var CR=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),kR(this,"spec",void 0),kR(this,"monitor",void 0),this.spec=e,this.monitor=n}var e,n,a;return e=t,(n=[{key:"canDrop",value:function(){var t=this.spec,e=this.monitor;return!t.canDrop||t.canDrop(e.getItem(),e)}},{key:"hover",value:function(){var t=this.spec,e=this.monitor;t.hover&&t.hover(e.getItem(),e)}},{key:"drop",value:function(){var t=this.spec,e=this.monitor;if(t.drop)return t.drop(e.getItem(),e)}}])&&wR(e.prototype,n),a&&wR(e,a),t}();function ER(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return OR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OR(t,e)}(t,e)||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 OR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function SR(e,n,a){var r=rR(),o=function(e,n){var a=t.useMemo((function(){return new CR(e,n)}),[n]);return t.useEffect((function(){a.spec=e}),[e]),a}(e,n),i=function(e){var n=e.accept;return t.useMemo((function(){return MT(null!=e.accept,"accept must be defined"),Array.isArray(n)?n:[n]}),[n])}(e);QD((function(){var t=ER(function(t,e,n){var a=n.getRegistry(),r=a.addTarget(t,e);return[r,function(){return a.removeTarget(r)}]}(i,o,r),2),e=t[0],l=t[1];return n.receiveHandlerId(e),a.receiveHandlerId(e),l}),[r,n,o,a,i.map((function(t){return t.toString()})).join("|")])}function NR(e){return t.useMemo((function(){return e.hooks.dropTarget()}),[e])}function PR(e,n){var a,r=uR(e,n),o=(a=rR(),t.useMemo((function(){return new FD(a)}),[a])),i=function(e){var n=rR(),a=t.useMemo((function(){return new JD(n.getBackend())}),[n]);return QD((function(){return a.dropTargetOptions=e||null,a.reconnect(),function(){return a.disconnectDropTarget()}}),[e]),a}(r.options);return SR(r,o,i),[bR(r.collect,o,i),NR(i)]}b(".drop-over-downward td{border-bottom:2px dashed #5860f8!important}.drop-over-upward td{border-top:2px dashed #5860f8!important}");const{Option:jR}=nd,TR=u.default.createContext(null),IR=({open:e,index:a,moveRow:r,className:o,style:i,...l})=>{const[c]=bw.useForm(),s=t.useRef(null),[{isOver:u,dropClassName:d},p]=PR({accept:"DraggableBodyRow",collect:t=>{const{index:e}=t.getItem()||{};return e===a?{}:{isOver:t.isOver(),dropClassName:e<a?" drop-over-downward":" drop-over-upward"}},drop:t=>{r(t.index,a)}}),[,f]=xR({type:"DraggableBodyRow",item:{index:a},collect:t=>({isDragging:t.isDragging()})});return e&&p(f(s)),n.jsx(bw,Object.assign({size:"small",component:!1,form:c},{children:n.jsx(TR.Provider,Object.assign({value:c},{children:n.jsx("tr",Object.assign({ref:s,className:`${o}${u?d:""}`,style:{cursor:e?"move":"auto",...i}},l),void 0)}),void 0)}),void 0)},DR=({record:e,dataIndex:a,title:r,editable:o,inputType:i,valueType:l,valueEnum:c,recordSelectField:s,controlRender:u,formChange:p,remoteConfig:f,children:m,formItemProps:g,handleSave:b,...v})=>{const y=t.useContext(TR),[x,w]=t.useState(!1),[k,C]=t.useState({}),E=(t,e,n,a)=>{a&&(w(!0),a(t,n).then((t=>{w(!1),e&&C({[e]:t})})))};if(o){let t=e[a];"DatePicker"!==l&&"DateTimePicker"!==l||t&&(t=h.default(t)),"status"===a&&void 0!==t&&(e[a]=String(t)),setTimeout((()=>{y.setFieldsValue({[a]:t})}))}const O=(t,r)=>{let o=null;const l=(t,e)=>{let n="";const a=function(t){for(let e of t)if(e)if(Vj({data:e,type:"String"}))n+=e;else{const t=e.props.children;Vj({data:t,type:"Object"})&&a([t]),Vj({data:t,type:"Array"})&&a(t),Vj({data:t,type:"String"})&&(n+=t)}};return a([e.children]),n.toLowerCase().indexOf(t.toLowerCase())>=0},u=t=>{if(d.default.isArray(t))return t.map(((t,e)=>n.jsx(jR,Object.assign({value:t.value},{children:t.label}),e)))};switch(t){case"RecordSelect":o=n.jsx(nd,Object.assign({allowClear:!0,showSearch:!0,dropdownMatchSelectWidth:!1,placeholder:r,onChange:S,optionFilterProp:"children",filterOption:l},{children:u(e[s])}),void 0);break;case"Select":o=n.jsx(nd,Object.assign({dropdownMatchSelectWidth:!1,onChange:S,placeholder:r},{children:u(c)}),void 0);break;case"DatePicker":o=n.jsx(yx,{onChange:S,placeholder:r},void 0);break;case"DateTimePicker":o=n.jsx(yx,{onChange:S,placeholder:r,showTime:!0},void 0);break;case"AutoComplete":o=n.jsx(nd,Object.assign({allowClear:!0,showSearch:!0,dropdownMatchSelectWidth:!1,placeholder:r,onChange:S,optionFilterProp:"children",filterOption:l},{children:u(c)}),void 0);break;case"RemoteSearch":let t=c;k[a]&&(t=k[a]),o=n.jsx(nd,Object.assign({mode:f.remoteMode,placeholder:r,notFoundContent:x?n.jsx(Aw,{size:"small"},void 0):null,dropdownMatchSelectWidth:!1,filterOption:!1,allowClear:!0,showSearch:!0,onChange:S,onFocus:()=>E(void 0,a,e,f.remoteApi),onSearch:t=>E(t,a,e,f.remoteApi)},{children:a&&u(t)}),void 0);break;default:o=n.jsx(Gv,{onPressEnter:S,onBlur:S,placeholder:r,type:i||"text"},void 0)}return o},S=async()=>{try{const t=await y.validateFields();let n={...e,...t};if(h.default.isMoment(n[a])){const t={DateTimePicker:"YYYY-MM-DD HH:mm:ss",DatePicker:"YYYY-MM-DD"};n[a]=h.default(n[a]).format(t[l])}p&&(n=await p(n)||n),b(n)}catch(t){console.log("保存表单字段失败:",t)}};let N=m;return o?N=n.jsx(bw.Item,Object.assign({style:{margin:0},name:a,rules:g?g.rules:void 0},{children:O(l,r)}),void 0):l&&(!c||"Select"!==l&&"AutoComplete"!==l||(N=Kj(c,e[a])),e[s]&&"RecordSelect"===l&&(N=Kj(e[s],e[a]))),u&&(N=u(e,N)),n.jsx("td",Object.assign({},v,{title:e&&e[a]},{children:N}),void 0)};function RR(t){var e=null;return function(){return null==e&&(e=t()),e}}function MR(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function zR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var AR=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),zR(this,"entered",[]),zR(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}var e,n,a;return e=t,(n=[{key:"enter",value:function(t){var e=this,n=this.entered.length;return this.entered=function(t,e){var n=new Set,a=function(t){return n.add(t)};t.forEach(a),e.forEach(a);var r=[];return n.forEach((function(t){return r.push(t)})),r}(this.entered.filter((function(n){return e.isNodeInDocument(n)&&(!n.contains||n.contains(t))})),[t]),0===n&&this.entered.length>0}},{key:"leave",value:function(t){var e,n,a=this.entered.length;return this.entered=(e=this.entered.filter(this.isNodeInDocument),n=t,e.filter((function(t){return t!==n}))),a>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&MR(e.prototype,n),a&&MR(e,a),t}(),LR=RR((function(){return/firefox/i.test(navigator.userAgent)})),_R=RR((function(){return Boolean(window.safari)}));function FR(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function VR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var KR=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),VR(this,"xs",void 0),VR(this,"ys",void 0),VR(this,"c1s",void 0),VR(this,"c2s",void 0),VR(this,"c3s",void 0);for(var a=e.length,r=[],o=0;o<a;o++)r.push(o);r.sort((function(t,n){return e[t]<e[n]?-1:1}));for(var i,l,c=[],s=[],u=0;u<a-1;u++)i=e[u+1]-e[u],l=n[u+1]-n[u],c.push(i),s.push(l/i);for(var d=[s[0]],p=0;p<c.length-1;p++){var f=s[p],m=s[p+1];if(f*m<=0)d.push(0);else{i=c[p];var h=c[p+1],g=i+h;d.push(3*g/((g+h)/f+(g+i)/m))}}d.push(s[s.length-1]);for(var b,v=[],y=[],x=0;x<d.length-1;x++){b=s[x];var w=d[x],k=1/c[x],C=w+d[x+1]-b-b;v.push((b-w-C)*k),y.push(C*k*k)}this.xs=e,this.ys=n,this.c1s=d,this.c2s=v,this.c3s=y}var e,n,a;return e=t,(n=[{key:"interpolate",value:function(t){var e=this.xs,n=this.ys,a=this.c1s,r=this.c2s,o=this.c3s,i=e.length-1;if(t===e[i])return n[i];for(var l,c=0,s=o.length-1;c<=s;){var u=e[l=Math.floor(.5*(c+s))];if(u<t)c=l+1;else{if(!(u>t))return n[l];s=l-1}}var d=t-e[i=Math.max(0,s)],p=d*d;return n[i]+a[i]*d+r[i]*p+o[i]*d*p}}])&&FR(e.prototype,n),a&&FR(e,a),t}();function HR(t){var e=1===t.nodeType?t:t.parentElement;if(!e)return null;var n=e.getBoundingClientRect(),a=n.top;return{x:n.left,y:a}}function BR(t){return{x:t.clientX,y:t.clientY}}function UR(t,e,n,a,r){var o,i,l="IMG"===(o=e).nodeName&&(LR()||!(null!==(i=document.documentElement)&&void 0!==i&&i.contains(o))),c=HR(l?t:e),s={x:n.x-c.x,y:n.y-c.y},u=t.offsetWidth,d=t.offsetHeight,p=a.anchorX,f=a.anchorY,m=function(t,e,n,a){var r=t?e.width:n,o=t?e.height:a;return _R()&&t&&(o/=window.devicePixelRatio,r/=window.devicePixelRatio),{dragPreviewWidth:r,dragPreviewHeight:o}}(l,e,u,d),h=m.dragPreviewWidth,g=m.dragPreviewHeight,b=r.offsetX,v=r.offsetY,y=0===v||v;return{x:0===b||b?b:new KR([0,.5,1],[s.x,s.x/u*h,s.x+h-u]).interpolate(p),y:y?v:function(){var t=new KR([0,.5,1],[s.y,s.y/d*g,s.y+g-d]).interpolate(f);return _R()&&l&&(t+=(window.devicePixelRatio-1)*g),t}()}}var WR,YR="__NATIVE_FILE__",$R="__NATIVE_URL__",qR="__NATIVE_TEXT__",GR="__NATIVE_HTML__",XR=Object.freeze({__proto__:null,FILE:YR,URL:$R,TEXT:qR,HTML:GR});function ZR(t,e,n){var a=e.reduce((function(e,n){return e||t.getData(n)}),"");return null!=a?a:n}function JR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var QR=(JR(WR={},YR,{exposeProperties:{files:function(t){return Array.prototype.slice.call(t.files)},items:function(t){return t.items},dataTransfer:function(t){return t}},matchesTypes:["Files"]}),JR(WR,GR,{exposeProperties:{html:function(t,e){return ZR(t,e,"")},dataTransfer:function(t){return t}},matchesTypes:["Html","text/html"]}),JR(WR,$R,{exposeProperties:{urls:function(t,e){return ZR(t,e,"").split("\n")},dataTransfer:function(t){return t}},matchesTypes:["Url","text/uri-list"]}),JR(WR,qR,{exposeProperties:{text:function(t,e){return ZR(t,e,"")},dataTransfer:function(t){return t}},matchesTypes:["Text","text/plain"]}),WR);function tM(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function eM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nM=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),eM(this,"item",void 0),eM(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}var e,n,a;return e=t,(n=[{key:"initializeExposedProperties",value:function(){var t=this;Object.keys(this.config.exposeProperties).forEach((function(e){Object.defineProperty(t.item,e,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(e,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(t){var e=this;if(t){var n={};Object.keys(this.config.exposeProperties).forEach((function(a){n[a]={value:e.config.exposeProperties[a](t,e.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,n)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(t,e){return e===t.getSourceId()}},{key:"endDrag",value:function(){}}])&&tM(e.prototype,n),a&&tM(e,a),t}();function aM(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(QR).filter((function(t){return QR[t].matchesTypes.some((function(t){return e.indexOf(t)>-1}))}))[0]||null}function rM(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function oM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var iM=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),oM(this,"ownerDocument",null),oM(this,"globalContext",void 0),oM(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}var e,n,a;return e=t,(n=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){var t;return null!==(t=this.globalContext)&&void 0!==t&&t.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var t;return(null===(t=this.optionsArgs)||void 0===t?void 0:t.rootElement)||this.window}}])&&rM(e.prototype,n),a&&rM(e,a),t}();function lM(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function cM(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lM(Object(n),!0).forEach((function(e){uM(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lM(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function sM(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function uM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var dM=function(){function t(e,n,a){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),uM(this,"options",void 0),uM(this,"actions",void 0),uM(this,"monitor",void 0),uM(this,"registry",void 0),uM(this,"enterLeaveCounter",void 0),uM(this,"sourcePreviewNodes",new Map),uM(this,"sourcePreviewNodeOptions",new Map),uM(this,"sourceNodes",new Map),uM(this,"sourceNodeOptions",new Map),uM(this,"dragStartSourceIds",null),uM(this,"dropTargetIds",[]),uM(this,"dragEnterTargetIds",[]),uM(this,"currentNativeSource",null),uM(this,"currentNativeHandle",null),uM(this,"currentDragSourceNode",null),uM(this,"altKeyPressed",!1),uM(this,"mouseMoveTimeoutTimer",null),uM(this,"asyncEndDragFrameId",null),uM(this,"dragOverTargetIds",null),uM(this,"lastClientOffset",null),uM(this,"hoverRafId",null),uM(this,"getSourceClientOffset",(function(t){var e=r.sourceNodes.get(t);return e&&HR(e)||null})),uM(this,"endDragNativeItem",(function(){r.isDraggingNativeItem()&&(r.actions.endDrag(),r.currentNativeHandle&&r.registry.removeSource(r.currentNativeHandle),r.currentNativeHandle=null,r.currentNativeSource=null)})),uM(this,"isNodeInDocument",(function(t){return Boolean(t&&r.document&&r.document.body&&r.document.body.contains(t))})),uM(this,"endDragIfSourceWasRemovedFromDOM",(function(){var t=r.currentDragSourceNode;null==t||r.isNodeInDocument(t)||r.clearCurrentDragSourceNode()&&r.monitor.isDragging()&&r.actions.endDrag()})),uM(this,"handleTopDragStartCapture",(function(){r.clearCurrentDragSourceNode(),r.dragStartSourceIds=[]})),uM(this,"handleTopDragStart",(function(t){if(!t.defaultPrevented){var e=r.dragStartSourceIds;r.dragStartSourceIds=null;var n=BR(t);r.monitor.isDragging()&&r.actions.endDrag(),r.actions.beginDrag(e||[],{publishSource:!1,getSourceClientOffset:r.getSourceClientOffset,clientOffset:n});var a=t.dataTransfer,o=aM(a);if(r.monitor.isDragging()){if(a&&"function"==typeof a.setDragImage){var i=r.monitor.getSourceId(),l=r.sourceNodes.get(i),c=r.sourcePreviewNodes.get(i)||l;if(c){var s=r.getCurrentSourcePreviewNodeOptions(),u=UR(l,c,n,{anchorX:s.anchorX,anchorY:s.anchorY},{offsetX:s.offsetX,offsetY:s.offsetY});a.setDragImage(c,u.x,u.y)}}try{null==a||a.setData("application/json",{})}catch(t){}r.setCurrentDragSourceNode(t.target),r.getCurrentSourcePreviewNodeOptions().captureDraggingState?r.actions.publishDragSource():setTimeout((function(){return r.actions.publishDragSource()}),0)}else if(o)r.beginDragNativeItem(o);else{if(a&&!a.types&&(t.target&&!t.target.hasAttribute||!t.target.hasAttribute("draggable")))return;t.preventDefault()}}})),uM(this,"handleTopDragEndCapture",(function(){r.clearCurrentDragSourceNode()&&r.monitor.isDragging()&&r.actions.endDrag()})),uM(this,"handleTopDragEnterCapture",(function(t){if(r.dragEnterTargetIds=[],r.enterLeaveCounter.enter(t.target)&&!r.monitor.isDragging()){var e=t.dataTransfer,n=aM(e);n&&r.beginDragNativeItem(n,e)}})),uM(this,"handleTopDragEnter",(function(t){var e=r.dragEnterTargetIds;(r.dragEnterTargetIds=[],r.monitor.isDragging())&&(r.altKeyPressed=t.altKey,e.length>0&&r.actions.hover(e,{clientOffset:BR(t)}),e.some((function(t){return r.monitor.canDropOnTarget(t)}))&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=r.getCurrentDropEffect())))})),uM(this,"handleTopDragOverCapture",(function(){r.dragOverTargetIds=[]})),uM(this,"handleTopDragOver",(function(t){var e=r.dragOverTargetIds;if(r.dragOverTargetIds=[],!r.monitor.isDragging())return t.preventDefault(),void(t.dataTransfer&&(t.dataTransfer.dropEffect="none"));r.altKeyPressed=t.altKey,r.lastClientOffset=BR(t),null===r.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(r.hoverRafId=requestAnimationFrame((function(){r.monitor.isDragging()&&r.actions.hover(e||[],{clientOffset:r.lastClientOffset}),r.hoverRafId=null}))),(e||[]).some((function(t){return r.monitor.canDropOnTarget(t)}))?(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=r.getCurrentDropEffect())):r.isDraggingNativeItem()?t.preventDefault():(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="none"))})),uM(this,"handleTopDragLeaveCapture",(function(t){r.isDraggingNativeItem()&&t.preventDefault(),r.enterLeaveCounter.leave(t.target)&&r.isDraggingNativeItem()&&setTimeout((function(){return r.endDragNativeItem()}),0)})),uM(this,"handleTopDropCapture",(function(t){var e;(r.dropTargetIds=[],r.isDraggingNativeItem())?(t.preventDefault(),null===(e=r.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer)):aM(t.dataTransfer)&&t.preventDefault();r.enterLeaveCounter.reset()})),uM(this,"handleTopDrop",(function(t){var e=r.dropTargetIds;r.dropTargetIds=[],r.actions.hover(e,{clientOffset:BR(t)}),r.actions.drop({dropEffect:r.getCurrentDropEffect()}),r.isDraggingNativeItem()?r.endDragNativeItem():r.monitor.isDragging()&&r.actions.endDrag()})),uM(this,"handleSelectStart",(function(t){var e=t.target;"function"==typeof e.dragDrop&&("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable||(t.preventDefault(),e.dragDrop()))})),this.options=new iM(n,a),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new AR(this.isNodeInDocument)}var e,n,a;return e=t,(n=[{key:"profile",value:function(){var t,e;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(t=this.dragStartSourceIds)||void 0===t?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var t=this.rootElement;if(void 0!==t){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}},{key:"teardown",value:function(){var t,e=this.rootElement;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)))}},{key:"connectDragPreview",value:function(t,e,n){var a=this;return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,e),function(){a.sourcePreviewNodes.delete(t),a.sourcePreviewNodeOptions.delete(t)}}},{key:"connectDragSource",value:function(t,e,n){var a=this;this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,n);var r=function(e){return a.handleDragStart(e,t)},o=function(t){return a.handleSelectStart(t)};return e.setAttribute("draggable","true"),e.addEventListener("dragstart",r),e.addEventListener("selectstart",o),function(){a.sourceNodes.delete(t),a.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",r),e.removeEventListener("selectstart",o),e.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(t,e){var n=this,a=function(e){return n.handleDragEnter(e,t)},r=function(e){return n.handleDragOver(e,t)},o=function(e){return n.handleDrop(e,t)};return e.addEventListener("dragenter",a),e.addEventListener("dragover",r),e.addEventListener("drop",o),function(){e.removeEventListener("dragenter",a),e.removeEventListener("dragover",r),e.removeEventListener("drop",o)}}},{key:"addEventListeners",value:function(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return cM({dropEffect:this.altKeyPressed?"copy":"move"},e||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var t=this.monitor.getSourceId();return cM({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(t)||{})}},{key:"isDraggingNativeItem",value:function(){var t=this.monitor.getItemType();return Object.keys(XR).some((function(e){return XR[e]===t}))}},{key:"beginDragNativeItem",value:function(t,e){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(t,e){var n=new nM(QR[t]);return n.loadDataTransfer(e),n}(t,e),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(t){var e=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t,this.mouseMoveTimeoutTimer=setTimeout((function(){var t;return null===(t=e.rootElement)||void 0===t?void 0:t.addEventListener("mousemove",e.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){var t;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(t=this.window)||void 0===t||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(t,e){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e))}},{key:"handleDragEnter",value:function(t,e){this.dragEnterTargetIds.unshift(e)}},{key:"handleDragOver",value:function(t,e){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)}},{key:"handleDrop",value:function(t,e){this.dropTargetIds.unshift(e)}}])&&sM(e.prototype,n),a&&sM(e,a),t}();const pM=function(t,e,n){return new dM(t,e,n)},fM=t=>n.jsx(jD,Object.assign({backend:pM,context:window},{children:t.children}),void 0);b(".ant-table-wrapper .ant-table-thead>tr>th{font-weight:700}.ant-table-wrapper .ant-table-tbody>tr>td,.ant-table-wrapper .ant-table-thead>tr>td,.ant-table-wrapper .ant-table-thead>tr>th{padding:6px 8px}.ant-table-wrapper .ant-table-tbody>tr>td.ant-table-cell .ant-form-item .ant-form-item-control-input{min-height:auto}.ant-table-wrapper .ant-table-tbody .btn-operate{width:26px;height:26px}.ant-table-wrapper .ant-table-pagination.ant-pagination{margin-top:10px;margin-bottom:10px;padding-top:10px;padding-bottom:10px}.ant-table-wrapper .react-resizable{position:relative;background-clip:padding-box}.ant-table-wrapper .react-resizable-handle{position:absolute;right:-5px;bottom:0;z-index:1;width:10px;height:100%;cursor:col-resize}");var mM=t.forwardRef(((e,a)=>{const r=t.useMemo((()=>{const t=e.extra||{};return{tableConfig:t.tableConfig,rowType:t.rowType,scroll:t.scroll,apiMethod:t.apiMethod,columns:t.columns||[],data:t.data,controlled:t.controlled,drag:t.drag,getTableSuccessData:t.getTableSuccessData,onSelect:t.onSelect,paginationConfig:t.paginationConfig,getCheckboxProps:t.getCheckboxProps}}),[e.extra]),o=t.useRef();let i=t.useRef(!0);const l=t.useRef({position:["bottomCenter"],size:"small",current:1,total:0,pages:0,pageSize:10,showSizeChanger:!0,orderByInfo:void 0}),c=t.useRef([]),s=t.useRef([]),[u,p]=t.useState(r.columns),[f,m]=t.useState(!1),[h,g]=t.useState([]),[b,v]=w.useSetState({selectRowIds:[],selectRowArray:[]}),[y,x]=t.useState({x:void 0,y:330}),k=t.useMemo((()=>r.tableConfig&&r.tableConfig.rowKey?r.tableConfig.rowKey:"id"),[r.tableConfig]),C=t.useCallback((async t=>{let e=!0;m(!0),t&&(void 0!==t.updateSelected&&(e=t.updateSelected,delete t.updateSelected),"not-reset"===t.pagination&&delete t.pagination,o.current={...o.current,...t});try{const n={...o.current};for(let t in l.current){const e=l.current[t];"orderByInfo"===t&&(n.orderByInfo=e),"current"===t&&(n.page=e),"pageSize"===t&&(n.size=n.size||e)}if(t&&t.current&&(n.page=t.current,l.current.current=t.current),r.apiMethod){delete n.current;const t=await r.apiMethod(d.default.pickBy(n,d.default.identity));let a=[];d.default.isArray(t.data.content)&&(!1!==r.paginationConfig?i.current=!0:i.current=!1,a=t.data.content,l.current.total=t.data.total,l.current.pages=t.data.pages),d.default.isArray(t.data)&&(i.current=!1,a=t.data),e&&v((t=>{let e=[...t.selectRowIds],n=[...t.selectRowArray];const r=a=>{if(t.selectRowIds.length)for(let o of a){for(let a of t.selectRowIds)o[k]===a&&(e.push(a),n.push(o));o.children&&r(o.children)}};return r(a),t.selectRowIds=d.default.unionBy(e),t.selectRowArray=d.default.unionBy(n,k),t})),g(a),r.getTableSuccessData&&r.getTableSuccessData(t)}}catch(t){}m(!1)}),[r,k,v]),E=t.useMemo((()=>({fixed:!0,type:r.rowType,selectedRowKeys:b.selectRowIds,getCheckboxProps:r.getCheckboxProps,onSelectAll:(t,e,n)=>{v((e=>{let a=[...e.selectRowIds],o=[...e.selectRowArray];return t?(a=d.default.uniq([...a,...n.map((t=>t[k]))]),o=d.default.uniqBy([...o,...n],k)):(a=a.filter((t=>!n.some((e=>e[k]===t)))),o=o.filter((t=>!n.some((e=>e[k]===t[k]))))),r.onSelect&&r.onSelect(o,a),e.selectRowIds=a,e.selectRowArray=o,e}))},onSelect:(t,e)=>{v((n=>{let a=[...n.selectRowIds],o=[...n.selectRowArray];return"checkbox"===r.rowType&&(e?(a.push(t[k]),o.push(t)):(a=a.filter((e=>e!==t[k])),o=o.filter((e=>e[k]!==t[k])))),"radio"===r.rowType&&e&&(a=[t[k]],o=[t]),r.onSelect&&r.onSelect(o,a),n.selectRowIds=a,n.selectRowArray=o,n}))}})),[r,k,v,b.selectRowIds]),O=t=>(e,{size:n})=>{p((e=>{const a=[...e];return a[t]={...a[t],width:n.width},c.current=a,a}))},S=t.useCallback((t=>{const e=!1===r.controlled?s.current:[...h],n=e.findIndex((e=>t[k]===e[k])),a=e[n];e.splice(n,1,{...a,...t}),!1===r.controlled?s.current=e:g(e)}),[k,h,r.controlled]),N=t.useCallback((async(t,e)=>{const n=h[t],a=eT(h,{$splice:[[t,1],[e,0,n]]});m(!0);try{if(r.drag){const n=JSON.parse(JSON.stringify(a)),o=JSON.parse(JSON.stringify(h)),i=[t,e].sort();!1!==await r.drag.moveRow(t,e,n,o,n.slice(i[0],i[1]+1))&&g(n)}}finally{m(!1)}}),[r.drag,h]);return t.useEffect((()=>{(async()=>{let t=[...r.columns];t.some((t=>"sequence"===t.dataIndex))||t.unshift({width:55,fixed:"left",title:"序号",dataIndex:"sequence",render:(t,e,n)=>{const a=l.current;return Object.keys(a).length?((a.current||0)-1)*(a.pageSize||0)+n+1:n+1}});for(let[e,n]of t.entries()){"RemoteSearch"===n.valueType&&n.remoteConfig&&n.remoteConfig.remoteApi&&(n.valueEnum=await n.remoteConfig.remoteApi());let a={...n,onHeaderCell:t=>({width:t.width,onResize:O(e)}),onCell:(t,e)=>({record:t,dataIndex:n.dataIndex,title:n.title,editable:"function"==typeof n.editable?n.editable(t,e):n.editable,inputType:n.inputType,valueType:n.valueType,valueEnum:n.valueEnum,recordSelectField:n.recordSelectField,controlRender:n.controlRender,formChange:n.formChange,remoteConfig:n.remoteConfig,formItemProps:n.formItemProps,handleSave:S})},r=c.current.find((t=>t.dataIndex===n.dataIndex&&t.title===n.title));r&&(a.width=r.width),t[e]=a}p(t)})()}),[r.columns,S]),t.useEffect((()=>{v((t=>{let e=[];const n=t=>{for(let a of t){for(let t of b.selectRowIds)a[k]===t&&e.push(a);a.children&&n(a.children)}};return b.selectRowIds.length&&(n(h),e=d.default.unionBy([...t.selectRowArray,...e],k)),t.selectRowArray=e,t}))}),[k,h,v,b.selectRowIds]),t.useEffect((()=>{d.default.isArray(r.data)&&g(r.data||[])}),[r.data]),t.useEffect((()=>{s.current=JSON.parse(JSON.stringify(h))}),[h]),t.useEffect((()=>{const t=document.getElementById("slider-menu"),e=document.getElementById("router-render");if(void 0!==r.scroll?.x||void 0!==r.scroll?.y)x((t=>({...t,...r.scroll})));else if(t&&e){let n=parseInt(window.getComputedStyle(e,null).paddingLeft);x((e=>(e.x=document.body.clientWidth-t.clientWidth-(2*n+43),e)))}}),[r.scroll]),t.useEffect((()=>{r.paginationConfig&&(l.current={...l.current,...r.paginationConfig})}),[r.paginationConfig]),t.useImperativeHandle(a,(()=>({setTableLoading:t=>{m(t)},getPages:()=>({...l.current}),getTableList:async(t,e)=>{t&&("not-reset"===t.pagination?t.current=l.current.current:void 0===t.current&&(t.current=1),t.clearSelectIds&&(delete t.clearSelectIds,v((t=>(t.selectRowArray=[],t.selectRowIds=[],t))))),await C(t),e&&e()},setRowSelected:(t,e)=>{let n=t;!0===e&&(n=Array.from(new Set([...b.selectRowIds,...t]))),v({selectRowIds:n})},getSelectIds:()=>b.selectRowIds,clearSelectIds:()=>{v({selectRowIds:[],selectRowArray:[]})},getSelectRowsArray:()=>b.selectRowArray,removeSelectIds:t=>{v({selectRowIds:b.selectRowIds.filter((e=>{let n=!0;for(let a of t)if(a===e){n=!1;break}return n})),selectRowArray:b.selectRowArray.filter((e=>{let n=!0;for(let a of t)if(a===e[k]){n=!1;break}return n}))})},getStaticDataList:()=>!1===r.controlled?[...s.current]:[...h],setStaticDataList:(t,e)=>{if("[object Object]"===Object.prototype.toString.call(t)){let e=t;g(h.map((n=>(n[k]===e[k]&&(n=t),n))))}"[object Array]"===Object.prototype.toString.call(t)&&g(t),e&&e()}}))),n.jsx(Xj,{children:n.jsx(fM,{children:n.jsx(sS,Object.assign({rowKey:"id",rowClassName:"editable-row",loading:f,bordered:!0,components:{header:{cell:IT},body:{row:IR,cell:DR}},onRow:(t,e)=>({index:e,moveRow:N,open:r.drag&&r.drag.open}),columns:u,dataSource:h,rowSelection:r.rowType?E:void 0,pagination:!(!d.default.isFunction(r.apiMethod)||!i.current)&&{size:"small",position:["bottomCenter"],showTotal:t=>`共${t}条`,showSizeChanger:!0,showQuickJumper:!0,...l.current},onChange:(t,e,n)=>{const{order:a}=n;t.orderByInfo=void 0,a&&(t.orderByInfo=`${n.field}:${"ascend"===a?1:-1}`),(t=>{!d.default.isEqual(t,l.current)&&i.current&&(l.current={...l.current,...t},C())})(t)},scroll:y},r.tableConfig),void 0)},void 0)},void 0)}));b("");const hM=t=>{const e={...t};return delete e.outerHeight,n.jsx(fv,Object.assign({className:"empty-wrap",style:{minHeight:t&&t.outerHeight?t.outerHeight:400},align:"middle",justify:"center"},{children:n.jsx(ha,Object.assign({description:"暂无数据"},e),void 0)}),void 0)};b(".from-table-modal .ant-modal-body{padding-top:15px}.from-table-modal .ant-modal-body .search-form{margin-bottom:8px}.from-table-modal .ant-modal-body .ant-table-wrapper .ant-pagination{margin-bottom:0}.from-table-modal .from-table-modal-foot{margin-top:20px}");const{Link:gM,Paragraph:bM}=RP;var vM=t.forwardRef((function(e,a){const r=t.useRef(null),o=t.useRef(),[i,l]=w.useSetState({saveLoading:!1,selectedRows:[]}),c=t.useMemo((()=>e.tableColumnsList&&e.tableColumnsList.tableConfig&&e.tableColumnsList.tableConfig.rowKey||"id"),[e.tableColumnsList]),s=t.useMemo((()=>{const t=e.width||0;return t>=500&&t<=800?{span:7}:t>800&&t<=1e3?{span:6}:t>1e3&&t<=1200?{span:5}:t>1200?{span:4}:{span:8}}),[e.width]),u=(t,e)=>{if(o.current){let n=[],a=[];"all"===t&&o.current.clearSelectIds(),"odd"===t&&e&&(n=[e[c]],a=i.selectedRows.filter((t=>t[c]!==e[c])),o.current.removeSelectIds(n)),l({selectedRows:a})}},d=t.useCallback((async()=>{if(r.current&&o.current){let t=await r.current.formSubmit();if(t&&Object.keys(t).length){for(let e in t){const n="YYYY-MM-DD HH:mm:ss";h.default(t[e],n,!0).isValid()&&(t[e]=h.default(t[e]).format(n))}t={clearSelectIds:!0,...t},void 0!==e.clearSelectIds&&(t.clearSelectIds=e.clearSelectIds),t.clearSelectIds&&l((t=>(t.selectedRows=[],t))),e.manualParameterChange&&(t=e.manualParameterChange(t)),e.searchCallback?e.searchCallback(t).then((e=>{e&&o.current?.getTableList(t)})):o.current.getTableList(t)}}else o.current?.getTableList()}),[e,l]),p=()=>{if(r.current){let t=[];const n=e.searchNoResetFiled||[];if(e.searchFormList)for(let a of e.searchFormList){if(a.unionConfig)for(let e of a.unionConfig.unionItems)e.name&&!n.includes(e.name)&&t.push(e.name);a.name&&!n.includes(a.name)&&t.push(a.name)}r.current.formReset(t)}d()};return t.useEffect((()=>{e.visible&&(e.autoGetList&&o.current?.getTableList(),e.openSelected&&e.openSelected.visible&&l((t=>(t.selectedRows=e.openSelected?.defaultValues||[],o.current?.setRowSelected(t.selectedRows.map((t=>t[c]))),t))))}),[e.autoGetList,e.openSelected,e.visible,c,l]),t.useImperativeHandle(a,(()=>({...r.current,...o.current,setSavaLoading:t=>{l({saveLoading:t})}}))),n.jsxs(Aj,Object.assign({className:"from-table-modal",width:e.width,visible:e.visible,title:e.title||"弹窗",onCancel:e.onCancel,forceRender:!0,maskClosable:!1,footer:null},{children:[e.topExtra,e.searchFormList?n.jsx(tT,{ref:r,rowGridConfig:{gutter:10},colGirdConfig:s,list:(f=e.searchFormList,f?f.map((t=>("Select"===t.componentName&&t.selectData&&t.selectData.length&&(t.selectData.some((t=>"全部"===t.label))||(t.selectData=[{label:"全部",value:""},...t.selectData])),t))):[]),formConfig:e.formConfig,render:()=>e.searchFormList&&e.searchFormList.length?n.jsxs(SC,Object.assign({size:10},{children:[n.jsx(sp,Object.assign({type:"primary",onClick:()=>{d()}},{children:"查询"}),void 0),n.jsx(sp,Object.assign({className:"btn-reset",onClick:p},{children:"重置"}),void 0)]}),void 0):n.jsx(n.Fragment,{},void 0)},void 0):null,n.jsxs(fv,Object.assign({},e.rowProps,{children:[e.leftSlot?n.jsx(gv,Object.assign({},e.leftSlot.colProps,{children:e.leftSlot.jsx}),void 0):null,n.jsx(gv,Object.assign({},e.colProps,{children:n.jsxs(fv,Object.assign({gutter:10},{children:[n.jsx(gv,Object.assign({span:e.openSelected&&e.openSelected.visible?16:24},{children:n.jsx(mM,{ref:o,extra:{rowType:e.tableColumnsList.rowType,apiMethod:e.apiMethod,columns:e.tableColumnsList.list,data:e.data,onSelect:(t,n)=>{((t,n)=>{l({selectedRows:n.map((n=>{let a={};const r=t.find((t=>t[c]===n));if(a[c]=n,e.openSelected&&e.openSelected.fileName&&(a[e.openSelected.fileName]=n),r&&(a=r),e.openSelected){const t=e.openSelected.fileName,r=e.openSelected.defaultValues;if(t&&r){const e=r.find((t=>t[c]===n));e&&(a[t]=e[t])}}return a}))})})(t,n),e.onSelect&&e.onSelect(t,n)},getTableSuccessData:e.getTableSuccessData,tableConfig:e.tableColumnsList.tableConfig,scroll:{x:"max-content"}}},void 0)}),void 0),e.openSelected&&e.openSelected.visible?n.jsx(gv,Object.assign({span:8},{children:n.jsx(vv,Object.assign({title:"已选列表",size:"small",bodyStyle:{height:e.openSelected.height||330,overflowY:"auto"},extra:n.jsx(gM,Object.assign({onClick:()=>u("all")},{children:"全部移除"}),void 0)},{children:i.selectedRows.length?i.selectedRows.map((t=>{const a=t[c],r=t[e.openSelected?.fileName];return n.jsxs(fv,Object.assign({gutter:12},{children:[n.jsx(gv,Object.assign({span:11,title:r},{children:n.jsx(bM,Object.assign({ellipsis:!0},{children:r}),void 0)}),void 0),n.jsx(gv,Object.assign({span:9,title:a},{children:n.jsx(bM,Object.assign({ellipsis:!0},{children:a}),void 0)}),void 0),n.jsx(gv,Object.assign({span:4},{children:n.jsx(gM,Object.assign({onClick:()=>u("odd",t)},{children:"移除"}),void 0)}),void 0)]}),a)})):n.jsx(hM,{outerHeight:200},void 0)}),void 0)}),void 0):null]}),void 0)}),void 0),e.rightSlot?n.jsx(gv,Object.assign({},e.rightSlot.colProps,{children:e.rightSlot.jsx}),void 0):null]}),void 0),n.jsx(fv,Object.assign({className:"from-table-modal-foot",justify:"center"},{children:n.jsx(gv,{children:n.jsxs(SC,Object.assign({size:20},{children:[e.onCancel?n.jsx(sp,Object.assign({onClick:()=>e.onCancel&&e.onCancel()},{children:"关闭"}),void 0):null,e.onConfirm?n.jsx(sp,Object.assign({type:"primary",loading:i.saveLoading,onClick:()=>{let t=[],n=[];t=e.openSelected&&e.openSelected.visible?i.selectedRows:o.current?.getSelectRowsArray()||[],e.onConfirm&&(o.current&&(n=o.current.getSelectIds()),l({saveLoading:!0}),e.onConfirm(t,n).then((t=>{l({saveLoading:!1}),t&&e.onCancel&&e.onCancel()})).catch((t=>{l({saveLoading:!1}),ii.warn(t,1.5)})))}},{children:"确定"}),void 0):null]}),void 0)},void 0)}),void 0)]}),void 0);var f})),yM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178a7.95 7.95 0 010-12.9l246-178a8 8 0 0112.7 6.5v46.8z"}}]},name:"left-circle",theme:"filled"},xM=function(e,n){return t.createElement(Po,he(he({},e),{},{ref:n,icon:yM}))};xM.displayName="LeftCircleFilled";var wM=t.forwardRef(xM),kM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z"}}]},name:"right-circle",theme:"filled"},CM=function(e,n){return t.createElement(Po,he(he({},e),{},{ref:n,icon:kM}))};CM.displayName="RightCircleFilled";var EM=t.forwardRef(CM);b(".quickly-form-modal .ant-modal-body{padding-top:15px}.quickly-form-modal .quickly-form-modal-foot{margin-top:20px}");b(".form-modal .ant-modal-body{padding-top:15px}.form-modal .ant-modal-body .modal-form-height{max-height:580px;padding-right:5px;overflow-x:hidden;overflow-y:auto}.form-modal .ant-modal-body .modal-form-height .generate-form.ant-form-horizontal.ant-form .ant-row.ant-form-item{margin-bottom:4px}.form-modal .form-modal-foot{margin-top:20px}");var OM=t.forwardRef(((e,a)=>{const r=t.useRef(),[o,i]=w.useSetState({loading:!1,saveLoading:!1,disabled:!1}),l=async()=>{let t=await(r.current?.formSubmit());if(t){if(t.endTime&&t.startTime&&h.default(t.endTime).isBefore(t.startTime))return void ii.warn("生效日期不能大于失效日期",1.5);i({saveLoading:!0});try{let n={};if(t={...t,...e.submitExtraParameters},e.switchTransform)for(let n=0;n<e.switchTransform.length;n++)t[e.switchTransform[n]]?t[e.switchTransform[n]]="1":t[e.switchTransform[n]]="0";if(e.submitRemoveField)for(let n=0;n<e.submitRemoveField.length;n++)t[e.submitRemoveField[n]]&&delete t[e.submitRemoveField[n]];for(let e in t){const n="YYYY-MM-DD HH:mm:ss";h.default(t[e],n,!0).isValid()&&(t[e]=h.default(t[e]).format(n))}if(e.manualParameterChange&&(t=e.manualParameterChange(t)),e.manualVerification&&!e.manualVerification(t))return console.warn("手动验证表单不通过"),void i({saveLoading:!1});t=d.default.omitBy(t,d.default.isNil),e.submitApi&&t?(e.id?(t.id=e.id,n=await e.submitApi(t,"put")):n=await e.submitApi(t,"post"),1===n.code&&(e.onConfirm&&e.onConfirm(n),ii.success("操作成功",1.5),e.onCancel&&e.onCancel()),i({saveLoading:!1})):e.onConfirm&&t&&e.onConfirm(t)}catch(t){i({saveLoading:!1})}}};return t.useEffect((()=>{!1===e.visible&&i({saveLoading:!1})}),[e.visible,i]),t.useEffect((()=>{i({disabled:e.disable})}),[e.disable,i]),t.useImperativeHandle(a,(()=>({setFormLoading:t=>{i({loading:t})},setFormSaveLoading:t=>{i({saveLoading:t})},setFormFields:t=>{r.current&&r.current.setFormFields(t)},getFormValues:t=>r.current?.getFormValues(t),setFormValues:t=>{r.current&&r.current.setFormValues(t)},excludeFormSubmitValues:async t=>{if(r.current){const n=e.formList.filter((e=>!t?.includes(e.name)));return await(r.current?.formSubmit(n.map((t=>t.name))))}return{}},getFormSubmitValues:async t=>r.current?await(r.current?.formSubmit(t)):{}}))),n.jsx(Aj,Object.assign({className:"form-modal",width:e.width?e.width:600,visible:e.visible,title:e.title||"对话框",onCancel:e.onCancel,destroyOnClose:!0,maskClosable:!1,footer:null},{children:n.jsxs(Aw,Object.assign({spinning:o.loading},{children:[n.jsxs("div",Object.assign({className:"modal-form-height"},{children:[e.topRender?e.topRender:null,n.jsx(tT,{ref:r,formConfig:{labelCol:{span:24},...e.formConfig},rowGridConfig:{gutter:[20,0]},colGirdConfig:e.colGirdConfig||{span:12},list:e.formList},void 0),e.children&&e.children]}),void 0),(()=>{const a=(()=>{const t=[n.jsx(sp,Object.assign({onClick:()=>e.onCancel&&e.onCancel()},{children:"关闭"}),-1)];return o.disabled||t.push(n.jsx(sp,Object.assign({type:"primary",loading:o.saveLoading,onClick:l},{children:"提交"}),-2)),t})(),r=t=>n.jsx(fv,Object.assign({className:"form-modal-foot",justify:"center"},{children:n.jsx(gv,{children:n.jsx(SC,Object.assign({size:20},{children:t}),void 0)},void 0)}),void 0);if(e.footer)return e.footer;if(e.footBtnList){const{model:n,data:o}=e.footBtnList,i=o.map(((e,n)=>{const{children:a,...r}=e;return t.createElement(sp,{...r,key:n},a)}));if("new"===n)return r(i);if("before"===n)return r([...i,...a]);if("after"===n)return r([...a,...i])}return r(a)})()]}),void 0)}),void 0)}));b('@import "https://at.alicdn.com/t/font_2381668_l6oy3doglyo.css";.icon-selected-modal .avatar-selected{display:flex;align-items:center;justify-content:center;width:36px;height:36px;overflow:hidden;border:2px solid #fff;border-radius:4px;cursor:pointer}.icon-selected-modal .avatar-selected.avatar-selected-bg{border-color:#5860f8}.icon-selected-modal .icon-selected-foot{margin-top:20px}');
|
|
19
|
+
*/function dT(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var pT=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(t){a[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,r=dT(t),o=1;o<arguments.length;o++){for(var i in n=Object(arguments[o]))sT.call(n,i)&&(r[i]=n[i]);if(cT){a=cT(n);for(var l=0;l<a.length;l++)uT.call(n,a[l])&&(r[a[l]]=n[a[l]])}}return r},fT="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mT=function(){};if("production"!==process.env.NODE_ENV){var hT=fT,gT={},bT=Function.call.bind(Object.prototype.hasOwnProperty);mT=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(t){}}}function vT(t,e,n,a,r){if("production"!==process.env.NODE_ENV)for(var o in t)if(bT(t,o)){var i;try{if("function"!=typeof t[o]){var l=Error((a||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[o]+"`.");throw l.name="Invariant Violation",l}i=t[o](e,o,a,n,null,hT)}catch(t){i=t}if(!i||i instanceof Error||mT((a||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in gT)){gT[i.message]=!0;var c=r?r():"";mT("Failed "+n+" type: "+i.message+(null!=c?c:""))}}}vT.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(gT={})};var yT=vT,xT=Function.call.bind(Object.prototype.hasOwnProperty),wT=function(){};function kT(){return null}"production"!==process.env.NODE_ENV&&(wT=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(t){}});var CT=function(t,e){var n="function"==typeof Symbol&&Symbol.iterator;var a="<<anonymous>>",r={array:c("array"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:l(kT),arrayOf:function(t){return l((function(e,n,a,r,o){if("function"!=typeof t)return new i("Property `"+o+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var l=e[n];if(!Array.isArray(l))return new i("Invalid "+r+" `"+o+"` of type `"+u(l)+"` supplied to `"+a+"`, expected an array.");for(var c=0;c<l.length;c++){var s=t(l,c,a,r,o+"["+c+"]",fT);if(s instanceof Error)return s}return null}))},element:l((function(e,n,a,r,o){var l=e[n];return t(l)?null:new i("Invalid "+r+" `"+o+"` of type `"+u(l)+"` supplied to `"+a+"`, expected a single ReactElement.")})),elementType:l((function(t,e,n,a,r){var o=t[e];return dt.isValidElementType(o)?null:new i("Invalid "+a+" `"+r+"` of type `"+u(o)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(t){return l((function(e,n,r,o,l){if(!(e[n]instanceof t)){var c=t.name||a;return new i("Invalid "+o+" `"+l+"` of type `"+(((s=e[n]).constructor&&s.constructor.name?s.constructor.name:a)+"` supplied to `")+r+"`, expected instance of `"+c+"`.")}var s;return null}))},node:l((function(t,e,n,a,r){return s(t[e])?null:new i("Invalid "+a+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(t){return l((function(e,n,a,r,o){if("function"!=typeof t)return new i("Property `"+o+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var l=e[n],c=u(l);if("object"!==c)return new i("Invalid "+r+" `"+o+"` of type `"+c+"` supplied to `"+a+"`, expected an object.");for(var s in l)if(xT(l,s)){var d=t(l,s,a,r,o+"."+s,fT);if(d instanceof Error)return d}return null}))},oneOf:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&wT(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),kT;function e(e,n,a,r,l){for(var c=e[n],s=0;s<t.length;s++)if(o(c,t[s]))return null;var u=JSON.stringify(t,(function(t,e){return"symbol"===d(e)?String(e):e}));return new i("Invalid "+r+" `"+l+"` of value `"+String(c)+"` supplied to `"+a+"`, expected one of "+u+".")}return l(e)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&wT("Invalid argument supplied to oneOfType, expected an instance of array."),kT;for(var e=0;e<t.length;e++){var n=t[e];if("function"!=typeof n)return wT("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+p(n)+" at index "+e+"."),kT}return l((function(e,n,a,r,o){for(var l=0;l<t.length;l++)if(null==(0,t[l])(e,n,a,r,o,fT))return null;return new i("Invalid "+r+" `"+o+"` supplied to `"+a+"`.")}))},shape:function(t){return l((function(e,n,a,r,o){var l=e[n],c=u(l);if("object"!==c)return new i("Invalid "+r+" `"+o+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");for(var s in t){var d=t[s];if(d){var p=d(l,s,a,r,o+"."+s,fT);if(p)return p}}return null}))},exact:function(t){return l((function(e,n,a,r,o){var l=e[n],c=u(l);if("object"!==c)return new i("Invalid "+r+" `"+o+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var s=pT({},e[n],t);for(var d in s){var p=t[d];if(!p)return new i("Invalid "+r+" `"+o+"` key `"+d+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(e[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(t),null," "));var f=p(l,d,a,r,o+"."+d,fT);if(f)return f}return null}))}};function o(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function i(t){this.message=t,this.stack=""}function l(t){if("production"!==process.env.NODE_ENV)var n={},r=0;function o(o,l,c,s,u,d,p){if(s=s||a,d=d||c,p!==fT){if(e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=s+":"+c;!n[m]&&r<3&&(wT("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[m]=!0,r++)}}return null==l[c]?o?null===l[c]?new i("The "+u+" `"+d+"` is marked as required in `"+s+"`, but its value is `null`."):new i("The "+u+" `"+d+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:t(l,c,s,u,d)}var l=o.bind(null,!1);return l.isRequired=o.bind(null,!0),l}function c(t){return l((function(e,n,a,r,o,l){var c=e[n];return u(c)!==t?new i("Invalid "+r+" `"+o+"` of type `"+d(c)+"` supplied to `"+a+"`, expected `"+t+"`."):null}))}function s(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(s);if(null===e||t(e))return!0;var a=function(t){var e=t&&(n&&t[n]||t["@@iterator"]);if("function"==typeof e)return e}(e);if(!a)return!1;var r,o=a.call(e);if(a!==e.entries){for(;!(r=o.next()).done;)if(!s(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!s(i[1]))return!1}return!0;default:return!1}}function u(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,e){return"symbol"===t||!!e&&("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}(e,t)?"symbol":e}function d(t){if(null==t)return""+t;var e=u(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function p(t){var e=d(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}return i.prototype=Error.prototype,r.checkPropTypes=yT,r.resetWarningCache=yT.resetWarningCache,r.PropTypes=r,r};function ET(){}function OT(){}OT.resetWarningCache=ET;var ST=z((function(t){if("production"!==process.env.NODE_ENV){var e=dt;t.exports=CT(e.isElement,!0)}else t.exports=function(){function t(t,e,n,a,r,o){if(o!==fT){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:OT,resetWarningCache:ET};return n.PropTypes=n,n}()})),NT=z((function(t,e){e.__esModule=!0,e.resizableProps=void 0;var n=function(t){return t&&t.__esModule?t:{default:t}}(ST);var a={axis:n.default.oneOf(["both","x","y","none"]),className:n.default.string,children:n.default.element.isRequired,draggableOpts:n.default.shape({allowAnyClick:n.default.bool,cancel:n.default.string,children:n.default.node,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:n.default.node,grid:n.default.arrayOf(n.default.number),handle:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number}),height:n.default.number.isRequired,handle:n.default.oneOfType([n.default.node,n.default.func]),handleSize:n.default.arrayOf(n.default.number),lockAspectRatio:n.default.bool,maxConstraints:n.default.arrayOf(n.default.number),minConstraints:n.default.arrayOf(n.default.number),onResizeStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,resizeHandles:n.default.arrayOf(n.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:n.default.number,width:n.default.number.isRequired};e.resizableProps=a})),PT=z((function(t,e){e.__esModule=!0,e.default=void 0;var n=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=r(e);if(n&&n.has(t))return n.get(t);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if("default"!==i&&Object.prototype.hasOwnProperty.call(t,i)){var l=o?Object.getOwnPropertyDescriptor(t,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=t[i]}a.default=t,n&&n.set(t,a);return a}(u.default),a=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(r=function(t){return t?n:e})(t)}function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t}).apply(this,arguments)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var d=function(t){var e,r;function i(){for(var e,n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return(e=t.call.apply(t,[this].concat(a))||this).handleRefs={},e.lastHandleRect=null,e.slack=null,e}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,s(e,r);var c=i.prototype;return c.componentWillUnmount=function(){this.resetData()},c.resetData=function(){this.lastHandleRect=this.slack=null},c.runConstraints=function(t,e){var n=this.props,a=n.minConstraints,r=n.maxConstraints,o=n.lockAspectRatio;if(!a&&!r&&!o)return[t,e];if(o){var i=this.props.width/this.props.height,l=t-this.props.width,c=e-this.props.height;Math.abs(l)>Math.abs(c*i)?e=t/i:t=e*i}var s=t,u=e,d=this.slack||[0,0],p=d[0],f=d[1];return t+=p,e+=f,a&&(t=Math.max(a[0],t),e=Math.max(a[1],e)),r&&(t=Math.min(r[0],t),e=Math.min(r[1],e)),this.slack=[p+(s-t),f+(u-e)],[t,e]},c.resizeHandler=function(t,e){var n=this;return function(a,r){var o=r.node,i=r.deltaX,l=r.deltaY;"onResizeStart"===t&&n.resetData();var c=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==e&&"s"!==e,s=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==e&&"w"!==e;if(c||s){var u=e[0],d=e[e.length-1],p=o.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===d)i+=p.left-n.lastHandleRect.left;if("n"===u)l+=p.top-n.lastHandleRect.top}n.lastHandleRect=p,"w"===d&&(i=-i),"n"===u&&(l=-l);var f=n.props.width+(c?i/n.props.transformScale:0),m=n.props.height+(s?l/n.props.transformScale:0),h=n.runConstraints(f,m);f=h[0],m=h[1];var g=f!==n.props.width||m!==n.props.height,b="function"==typeof n.props[t]?n.props[t]:null;b&&!("onResize"===t&&!g)&&(null==a.persist||a.persist(),b(a,{node:o,size:{width:f,height:m},handle:e})),"onResizeStop"===t&&n.resetData()}}},c.renderResizeHandle=function(t,e){var a=this.props.handle;if(!a)return n.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:e});if("function"==typeof a)return a(t,e);var r=l({ref:e},"string"==typeof a.type?{}:{handleAxis:t});return n.cloneElement(a,r)},c.render=function(){var t=this,e=this.props,r=e.children,i=e.className,c=e.draggableOpts;e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart;var s=e.resizeHandles;e.transformScale;var u=function(t,e){if(null==t)return{};var n,a,r={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(r[n]=t[n]);return r}(e,a);return(0,lT.cloneElement)(r,l(l({},u),{},{className:(i?i+" ":"")+"react-resizable",children:[].concat(r.props.children,s.map((function(e){var a,r=null!=(a=t.handleRefs[e])?a:t.handleRefs[e]=n.createRef();return n.createElement(f.default.DraggableCore,o({},c,{nodeRef:r,key:"resizableHandle-"+e,onStop:t.resizeHandler("onResizeStop",e),onStart:t.resizeHandler("onResizeStart",e),onDrag:t.resizeHandler("onResize",e)}),t.renderResizeHandle(e,r))})))}))},i}(n.Component);e.default=d,d.propTypes=NT.resizableProps,d.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}})),jT=z((function(t,e){e.__esModule=!0,e.default=void 0;var n=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=l(e);if(n&&n.has(t))return n.get(t);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var i=r?Object.getOwnPropertyDescriptor(t,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=t[o]}a.default=t,n&&n.set(t,a);return a}(u.default),a=i(ST),r=i(PT),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function i(t){return t&&t.__esModule?t:{default:t}}function l(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(l=function(t){return t?n:e})(t)}function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t}).apply(this,arguments)}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var m=function(t){var e,a;function i(){for(var e,n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return(e=t.call.apply(t,[this].concat(a))||this).state={width:e.props.width,height:e.props.height,propsWidth:e.props.width,propsHeight:e.props.height},e.onResize=function(t,n){var a=n.size;e.props.onResize?(null==t.persist||t.persist(),e.setState(a,(function(){return e.props.onResize&&e.props.onResize(t,n)}))):e.setState(a)},e}return a=t,(e=i).prototype=Object.create(a.prototype),e.prototype.constructor=e,f(e,a),i.getDerivedStateFromProps=function(t,e){return e.propsWidth!==t.width||e.propsHeight!==t.height?{width:t.width,height:t.height,propsWidth:t.width,propsHeight:t.height}:null},i.prototype.render=function(){var t=this.props,e=t.handle,a=t.handleSize;t.onResize;var i=t.onResizeStart,l=t.onResizeStop,s=t.draggableOpts,u=t.minConstraints,p=t.maxConstraints,f=t.lockAspectRatio,m=t.axis;t.width,t.height;var h=t.resizeHandles,g=t.style,b=t.transformScale,v=function(t,e){if(null==t)return{};var n,a,r={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,o);return n.createElement(r.default,{axis:m,draggableOpts:s,handle:e,handleSize:a,height:this.state.height,lockAspectRatio:f,maxConstraints:p,minConstraints:u,onResizeStart:i,onResize:this.onResize,onResizeStop:l,resizeHandles:h,transformScale:b,width:this.state.width},n.createElement("div",c({},v,{style:d(d({},g),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},i}(n.Component);e.default=m,m.propTypes=d(d({},NT.resizableProps),{},{children:a.default.element})})),TT=PT.default;jT.default;const IT=t=>{const{onResize:e,width:a,...r}=t;return a?n.jsx(TT,Object.assign({width:a,height:0,handle:n.jsx("span",{className:"react-resizable-handle",onClick:t=>{t.stopPropagation()}},void 0),onResize:e,draggableOpts:{enableUserSelectHack:!1}},{children:n.jsx("th",Object.assign({},r),void 0)}),void 0):n.jsx("th",Object.assign({},r),void 0)};var DT,RT=t.createContext({dragDropManager:void 0});function MT(t,e){for(var n=arguments.length,a=new Array(n>2?n-2:0),r=2;r<n;r++)a[r-2]=arguments[r];if("production"!==process.env.NODE_ENV&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var o;if(void 0===e)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var i=0;(o=new Error(e.replace(/%s/g,(function(){return a[i++]})))).name="Invariant Violation"}throw o.framesToPop=1,o}}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(DT||(DT={}));var zT="dnd-core/INIT_COORDS",AT="dnd-core/BEGIN_DRAG",LT="dnd-core/PUBLISH_DRAG_SOURCE",_T="dnd-core/HOVER",FT="dnd-core/DROP",VT="dnd-core/END_DRAG";function KT(t,e){return{type:zT,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function HT(t){return(HT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function BT(t,e,n){return e.split(".").reduce((function(t,e){return t&&t[e]?t[e]:n||null}),t)}function UT(t,e){return t.filter((function(t){return t!==e}))}function WT(t){return"object"===HT(t)}function YT(t,e){var n=new Map,a=function(t){n.set(t,n.has(t)?n.get(t)+1:1)};t.forEach(a),e.forEach(a);var r=[];return n.forEach((function(t,e){1===t&&r.push(e)})),r}var $T={type:zT,payload:{clientOffset:null,sourceClientOffset:null}};function qT(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},a=n.publishSource,r=void 0===a||a,o=n.clientOffset,i=n.getSourceClientOffset,l=t.getMonitor(),c=t.getRegistry();t.dispatch(KT(o)),GT(e,l,c);var s=JT(e,l);if(null!==s){var u=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");XT(i),u=i(s)}t.dispatch(KT(o,u));var d=c.getSource(s),p=d.beginDrag(l,s);if(null!=p){ZT(p),c.pinSource(s);var f=c.getSourceType(s);return{type:AT,payload:{itemType:f,item:p,sourceId:s,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}}}else t.dispatch($T)}}function GT(t,e,n){MT(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach((function(t){MT(n.getSource(t),"Expected sourceIds to be registered.")}))}function XT(t){MT("function"==typeof t,"When clientOffset is provided, getSourceClientOffset must be a function.")}function ZT(t){MT(WT(t),"Item must be an object.")}function JT(t,e){for(var n=null,a=t.length-1;a>=0;a--)if(e.canDragSource(t[a])){n=t[a];break}return n}function QT(t){return function(){if(t.getMonitor().isDragging())return{type:LT}}}function tI(t,e){return null===e?null===t:Array.isArray(t)?t.some((function(t){return t===e})):t===e}function eI(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.clientOffset;nI(e);var r=e.slice(0),o=t.getMonitor(),i=t.getRegistry();aI(r,o,i);var l=o.getItemType();return rI(r,i,l),oI(r,o,i),{type:_T,payload:{targetIds:r,clientOffset:a||null}}}}function nI(t){MT(Array.isArray(t),"Expected targetIds to be an array.")}function aI(t,e,n){MT(e.isDragging(),"Cannot call hover while not dragging."),MT(!e.didDrop(),"Cannot call hover after drop.");for(var a=0;a<t.length;a++){var r=t[a];MT(t.lastIndexOf(r)===a,"Expected targetIds to be unique in the passed array."),MT(n.getTarget(r),"Expected targetIds to be registered.")}}function rI(t,e,n){for(var a=t.length-1;a>=0;a--){var r=t[a];tI(e.getTargetType(r),n)||t.splice(a,1)}}function oI(t,e,n){t.forEach((function(t){n.getTarget(t).hover(e,t)}))}function iI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function lI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?iI(Object(n),!0).forEach((function(e){cI(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iI(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function cI(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sI(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getMonitor(),a=t.getRegistry();uI(n);var r=pI(n);r.forEach((function(r,o){var i=dI(r,o,a,n),l={type:FT,payload:{dropResult:lI(lI({},e),i)}};t.dispatch(l)}))}}function uI(t){MT(t.isDragging(),"Cannot call drop while not dragging."),MT(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function dI(t,e,n,a){var r=n.getTarget(t),o=r?r.drop(a,t):void 0;return function(t){MT(void 0===t||WT(t),"Drop result must either be an object or undefined.")}(o),void 0===o&&(o=0===e?{}:a.getDropResult()),o}function pI(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function fI(t){return function(){var e=t.getMonitor(),n=t.getRegistry();!function(t){MT(t.isDragging(),"Cannot call endDrag while not dragging.")}(e);var a=e.getSourceId();null!=a&&(n.getSource(a,!0).endDrag(e,a),n.unpinSource());return{type:VT}}}function mI(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function hI(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gI=function(){function t(e,n){var a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),hI(this,"store",void 0),hI(this,"monitor",void 0),hI(this,"backend",void 0),hI(this,"isSetUp",!1),hI(this,"handleRefCountChange",(function(){var t=a.store.getState().refCount>0;a.backend&&(t&&!a.isSetUp?(a.backend.setup(),a.isSetUp=!0):!t&&a.isSetUp&&(a.backend.teardown(),a.isSetUp=!1))})),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}var e,n,a;return e=t,(n=[{key:"receiveBackend",value:function(t){this.backend=t}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var t=this,e=this.store.dispatch,n=function(t){return{beginDrag:qT(t),publishDragSource:QT(t),hover:eI(t),drop:sI(t),endDrag:fI(t)}}(this);return Object.keys(n).reduce((function(a,r){var o,i=n[r];return a[r]=(o=i,function(){for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];var i=o.apply(t,a);void 0!==i&&e(i)}),a}),{})}},{key:"dispatch",value:function(t){this.store.dispatch(t)}}])&&mI(e.prototype,n),a&&mI(e,a),t}();function bI(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var vI="function"==typeof Symbol&&Symbol.observable||"@@observable",yI=function(){return Math.random().toString(36).substring(7).split("").join(".")},xI={INIT:"@@redux/INIT"+yI(),REPLACE:"@@redux/REPLACE"+yI(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+yI()}};function wI(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function kI(t){if(void 0===t)return"undefined";if(null===t)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";var n=function(t){return"function"==typeof t.constructor?t.constructor.name:null}(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function CI(t){var e=typeof t;return"production"!==process.env.NODE_ENV&&(e=kI(t)),e}function EI(t,e,n){var a;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?bI(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?bI(1):"Expected the enhancer to be a function. Instead, received: '"+CI(n)+"'");return n(EI)(t,e)}if("function"!=typeof t)throw new Error("production"===process.env.NODE_ENV?bI(2):"Expected the root reducer to be a function. Instead, received: '"+CI(t)+"'");var r=t,o=e,i=[],l=i,c=!1;function s(){l===i&&(l=i.slice())}function u(){if(c)throw new Error("production"===process.env.NODE_ENV?bI(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(t){if("function"!=typeof t)throw new Error("production"===process.env.NODE_ENV?bI(4):"Expected the listener to be a function. Instead, received: '"+CI(t)+"'");if(c)throw new Error("production"===process.env.NODE_ENV?bI(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var e=!0;return s(),l.push(t),function(){if(e){if(c)throw new Error("production"===process.env.NODE_ENV?bI(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");e=!1,s();var n=l.indexOf(t);l.splice(n,1),i=null}}}function p(t){if(!wI(t))throw new Error("production"===process.env.NODE_ENV?bI(7):"Actions must be plain objects. Instead, the actual type was: '"+CI(t)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(void 0===t.type)throw new Error("production"===process.env.NODE_ENV?bI(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error("production"===process.env.NODE_ENV?bI(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,t)}finally{c=!1}for(var e=i=l,n=0;n<e.length;n++){(0,e[n])()}return t}function f(t){if("function"!=typeof t)throw new Error("production"===process.env.NODE_ENV?bI(10):"Expected the nextReducer to be a function. Instead, received: '"+CI(t));r=t,p({type:xI.REPLACE})}function m(){var t,e=d;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error("production"===process.env.NODE_ENV?bI(11):"Expected the observer to be an object. Instead, received: '"+CI(t)+"'");function n(){t.next&&t.next(u())}return n(),{unsubscribe:e(n)}}})[vI]=function(){return this},t}return p({type:xI.INIT}),(a={dispatch:p,subscribe:d,getState:u,replaceReducer:f})[vI]=m,a}function OI(){}"production"!==process.env.NODE_ENV&&"string"==typeof OI.name&&"isCrushed"!==OI.name&&function(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw new Error(t)}catch(t){}}('You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.');var SI=function(t,e){return t===e};function NI(t,e){return!t&&!e||!(!t||!e)&&(t.x===e.x&&t.y===e.y)}function PI(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SI;if(t.length!==e.length)return!1;for(var a=0;a<t.length;++a)if(!n(t[a],e[a]))return!1;return!0}function jI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function TI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jI(Object(n),!0).forEach((function(e){II(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jI(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function II(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var DI={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function RI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:DI,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case zT:case AT:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case _T:return NI(t.clientOffset,n.clientOffset)?t:TI(TI({},t),{},{clientOffset:n.clientOffset});case VT:case FT:return DI;default:return t}}var MI="dnd-core/ADD_SOURCE",zI="dnd-core/ADD_TARGET",AI="dnd-core/REMOVE_SOURCE",LI="dnd-core/REMOVE_TARGET";function _I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function FI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_I(Object(n),!0).forEach((function(e){VI(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function VI(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var KI={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function HI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:KI,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case AT:return FI(FI({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case LT:return FI(FI({},t),{},{isSourcePublic:!0});case _T:return FI(FI({},t),{},{targetIds:n.targetIds});case LI:return-1===t.targetIds.indexOf(n.targetId)?t:FI(FI({},t),{},{targetIds:UT(t.targetIds,n.targetId)});case FT:return FI(FI({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case VT:return FI(FI({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function BI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case MI:case zI:return t+1;case AI:case LI:return t-1;default:return t}}var UI=[],WI=[];function YI(t,e){return t!==UI&&(t===WI||void 0===e||(n=t,e.filter((function(t){return n.indexOf(t)>-1}))).length>0);var n}function $I(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _T:break;case MI:case zI:case LI:case AI:return UI;case AT:case LT:case VT:case FT:default:return WI}var e=t.payload,n=e.targetIds,a=void 0===n?[]:n,r=e.prevTargetIds,o=void 0===r?[]:r,i=YT(a,o),l=i.length>0||!PI(a,o);if(!l)return UI;var c=o[o.length-1],s=a[a.length-1];return c!==s&&(c&&i.push(c),s&&i.push(s)),i}function qI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t+1}function GI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function XI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?GI(Object(n),!0).forEach((function(e){ZI(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):GI(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ZI(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function JI(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:$I(t.dirtyHandlerIds,{type:e.type,payload:XI(XI({},e.payload),{},{prevTargetIds:BT(t,"dragOperation.targetIds",[])})}),dragOffset:RI(t.dragOffset,e),refCount:BI(t.refCount,e),dragOperation:HI(t.dragOperation,e),stateId:qI(t.stateId)}}function QI(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tD(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function eD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}UI.__IS_NONE__=!0,WI.__IS_ALL__=!0;var nD=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),eD(this,"store",void 0),eD(this,"registry",void 0),this.store=e,this.registry=n}var e,n,a;return e=t,(n=[{key:"subscribeToStateChange",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},a=n.handlerIds;MT("function"==typeof t,"listener must be a function."),MT(void 0===a||Array.isArray(a),"handlerIds, when specified, must be an array of strings.");var r=this.store.getState().stateId,o=function(){var n=e.store.getState(),o=n.stateId;try{o===r||o===r+1&&!YI(n.dirtyHandlerIds,a)||t()}finally{r=o}};return this.store.subscribe(o)}},{key:"subscribeToOffsetChange",value:function(t){var e=this;MT("function"==typeof t,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var a=e.store.getState().dragOffset;a!==n&&(n=a,t())}))}},{key:"canDragSource",value:function(t){if(!t)return!1;var e=this.registry.getSource(t);return MT(e,"Expected to find a valid source. sourceId=".concat(t)),!this.isDragging()&&e.canDrag(this,t)}},{key:"canDropOnTarget",value:function(t){if(!t)return!1;var e=this.registry.getTarget(t);return MT(e,"Expected to find a valid target. targetId=".concat(t)),!(!this.isDragging()||this.didDrop())&&tI(this.registry.getTargetType(t),this.getItemType())&&e.canDrop(this,t)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(t){if(!t)return!1;var e=this.registry.getSource(t,!0);return MT(e,"Expected to find a valid source. sourceId=".concat(t)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t)}},{key:"isOverTarget",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!t)return!1;var n=e.shallow;if(!this.isDragging())return!1;var a=this.registry.getTargetType(t),r=this.getItemType();if(r&&!tI(a,r))return!1;var o=this.getTargetIds();if(!o.length)return!1;var i=o.indexOf(t);return n?i===o.length-1:i>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return t=this.store.getState().dragOffset,e=t.clientOffset,n=t.initialClientOffset,a=t.initialSourceClientOffset,e&&n&&a?QI(function(t,e){return{x:t.x+e.x,y:t.y+e.y}}(e,a),n):null;var t,e,n,a}},{key:"getDifferenceFromInitialOffset",value:function(){return t=this.store.getState().dragOffset,e=t.clientOffset,n=t.initialClientOffset,e&&n?QI(e,n):null;var t,e,n}}])&&tD(e.prototype,n),a&&tD(e,a),t}(),aD=0;function rD(t){return(rD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function oD(t,e){e&&Array.isArray(t)?t.forEach((function(t){return oD(t,!1)})):MT("string"==typeof t||"symbol"===rD(t),e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const iD="undefined"!=typeof global?global:self,lD=iD.MutationObserver||iD.WebKitMutationObserver;function cD(t){return function(){const e=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(e),clearInterval(n),t()}}}const sD="function"==typeof lD?function(t){let e=1;const n=new lD(t),a=document.createTextNode("");return n.observe(a,{characterData:!0}),function(){e=-e,a.data=e}}:cD;class uD{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,e){this.onError=t,this.release=e,this.task=null}}const dD=new class{enqueueTask(t){const{queue:e,requestFlush:n}=this;e.length||(n(),this.flushing=!0),e[e.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const e=this.index;if(this.index++,t[e].call(),this.index>this.capacity){for(let e=0,n=t.length-this.index;e<n;e++)t[e]=t[e+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=sD(this.flush),this.requestErrorThrow=cD((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},pD=new class{create(t){const e=this.freeTasks,n=e.length?e.pop():new uD(this.onError,(t=>e[e.length]=t));return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}(dD.registerPendingError);function fD(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function mD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hD(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return gD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gD(t,e)}(t,e)||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 gD(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function bD(t){var e=(aD++).toString();switch(t){case DT.SOURCE:return"S".concat(e);case DT.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function vD(t){switch(t[0]){case"S":return DT.SOURCE;case"T":return DT.TARGET;default:MT(!1,"Cannot parse handler ID: ".concat(t))}}function yD(t,e){var n=t.entries(),a=!1;do{var r=n.next(),o=r.done;if(hD(r.value,2)[1]===e)return!0;a=!!o}while(!a);return!1}var xD=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),mD(this,"types",new Map),mD(this,"dragSources",new Map),mD(this,"dropTargets",new Map),mD(this,"pinnedSourceId",null),mD(this,"pinnedSource",null),mD(this,"store",void 0),this.store=e}var e,n,a;return e=t,(n=[{key:"addSource",value:function(t,e){oD(t),function(t){MT("function"==typeof t.canDrag,"Expected canDrag to be a function."),MT("function"==typeof t.beginDrag,"Expected beginDrag to be a function."),MT("function"==typeof t.endDrag,"Expected endDrag to be a function.")}(e);var n=this.addHandler(DT.SOURCE,t,e);return this.store.dispatch(function(t){return{type:MI,payload:{sourceId:t}}}(n)),n}},{key:"addTarget",value:function(t,e){oD(t,!0),function(t){MT("function"==typeof t.canDrop,"Expected canDrop to be a function."),MT("function"==typeof t.hover,"Expected hover to be a function."),MT("function"==typeof t.drop,"Expected beginDrag to be a function.")}(e);var n=this.addHandler(DT.TARGET,t,e);return this.store.dispatch(function(t){return{type:zI,payload:{targetId:t}}}(n)),n}},{key:"containsHandler",value:function(t){return yD(this.dragSources,t)||yD(this.dropTargets,t)}},{key:"getSource",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];MT(this.isSourceId(t),"Expected a valid source ID.");var n=e&&t===this.pinnedSourceId,a=n?this.pinnedSource:this.dragSources.get(t);return a}},{key:"getTarget",value:function(t){return MT(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}},{key:"getSourceType",value:function(t){return MT(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}},{key:"getTargetType",value:function(t){return MT(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}},{key:"isSourceId",value:function(t){return vD(t)===DT.SOURCE}},{key:"isTargetId",value:function(t){return vD(t)===DT.TARGET}},{key:"removeSource",value:function(t){var e,n=this;MT(this.getSource(t),"Expected an existing source."),this.store.dispatch(function(t){return{type:AI,payload:{sourceId:t}}}(t)),e=function(){n.dragSources.delete(t),n.types.delete(t)},dD.enqueueTask(pD.create(e))}},{key:"removeTarget",value:function(t){MT(this.getTarget(t),"Expected an existing target."),this.store.dispatch(function(t){return{type:LI,payload:{targetId:t}}}(t)),this.dropTargets.delete(t),this.types.delete(t)}},{key:"pinSource",value:function(t){var e=this.getSource(t);MT(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e}},{key:"unpinSource",value:function(){MT(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(t,e,n){var a=bD(t);return this.types.set(a,e),t===DT.SOURCE?this.dragSources.set(a,n):t===DT.TARGET&&this.dropTargets.set(a,n),a}}])&&fD(e.prototype,n),a&&fD(e,a),t}();function wD(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=kD(a),o=new nD(r,new xD(r)),i=new gI(r,o),l=t(i,e,n);return i.receiveBackend(l),i}function kD(t){var e="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return EI(JI,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var CD=["children"];function ED(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return OD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OD(t,e)}(t,e)||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 OD(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function SD(t,e){if(null==t)return{};var n,a,r=function(t,e){if(null==t)return{};var n,a,r={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var ND=0,PD=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),jD=t.memo((function(e){var a=e.children,r=ED(function(t){if("manager"in t){return[{dragDropManager:t.manager},!1]}var e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:TD(),n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,r=e;r[PD]||(r[PD]={dragDropManager:wD(t,e,n,a)});return r[PD]}(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}(SD(e,CD)),2),o=r[0],i=r[1];return t.useEffect((function(){if(i){var t=TD();return++ND,function(){0==--ND&&(t[PD]=null)}}}),[]),n.jsx(RT.Provider,Object.assign({value:o},{children:a}),void 0)}));function TD(){return"undefined"!=typeof global?global:window}function ID(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function DD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var RD=!1,MD=!1,zD=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),DD(this,"internalMonitor",void 0),DD(this,"sourceId",null),this.internalMonitor=e.getMonitor()}var e,n,a;return e=t,(n=[{key:"receiveHandlerId",value:function(t){this.sourceId=t}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){MT(!RD,"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 RD=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{RD=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;MT(!MD,"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 MD=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{MD=!1}}},{key:"subscribeToStateChange",value:function(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}},{key:"isDraggingSource",value:function(t){return this.internalMonitor.isDraggingSource(t)}},{key:"isOverTarget",value:function(t,e){return this.internalMonitor.isOverTarget(t,e)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(t){return this.internalMonitor.subscribeToOffsetChange(t)}},{key:"canDragSource",value:function(t){return this.internalMonitor.canDragSource(t)}},{key:"canDropOnTarget",value:function(t){return this.internalMonitor.canDropOnTarget(t)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&ID(e.prototype,n),a&&ID(e,a),t}();function AD(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function LD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _D=!1,FD=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),LD(this,"internalMonitor",void 0),LD(this,"targetId",null),this.internalMonitor=e.getMonitor()}var e,n,a;return e=t,(n=[{key:"receiveHandlerId",value:function(t){this.targetId=t}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;MT(!_D,"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 _D=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{_D=!1}}},{key:"isOver",value:function(t){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,t)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&AD(e.prototype,n),a&&AD(e,a),t}();function VD(t){if("string"!=typeof t.type){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function KD(e){var n={};return Object.keys(e).forEach((function(a){var r=e[a];if(a.endsWith("Ref"))n[a]=e[a];else{var o=function(e){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t.isValidElement(n)){var r=n;return e(r,a),r}var o=n;return VD(o),BD(o,a?function(t){return e(t,a)}:e)}}(r);n[a]=function(){return o}}})),n}function HD(t,e){"function"==typeof t?t(e):t.current=e}function BD(e,n){var a=e.ref;return MT("string"!=typeof a,"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"),a?t.cloneElement(e,{ref:function(t){HD(a,t),HD(n,t)}}):t.cloneElement(e,{ref:n})}function UD(t){return(UD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function WD(t){return null!==t&&"object"===UD(t)&&Object.prototype.hasOwnProperty.call(t,"current")}function YD(t,e,n,a){var r=n?n.call(a,t,e):void 0;if(void 0!==r)return!!r;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var o=Object.keys(t),i=Object.keys(e);if(o.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(e),c=0;c<o.length;c++){var s=o[c];if(!l(s))return!1;var u=t[s],d=e[s];if(!1===(r=n?n.call(a,u,d,s):void 0)||void 0===r&&u!==d)return!1}return!0}function $D(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function qD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var GD=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),qD(this,"hooks",KD({dragSource:function(t,e){n.clearDragSource(),n.dragSourceOptions=e||null,WD(t)?n.dragSourceRef=t:n.dragSourceNode=t,n.reconnectDragSource()},dragPreview:function(t,e){n.clearDragPreview(),n.dragPreviewOptions=e||null,WD(t)?n.dragPreviewRef=t:n.dragPreviewNode=t,n.reconnectDragPreview()}})),qD(this,"handlerId",null),qD(this,"dragSourceRef",null),qD(this,"dragSourceNode",void 0),qD(this,"dragSourceOptionsInternal",null),qD(this,"dragSourceUnsubscribe",void 0),qD(this,"dragPreviewRef",null),qD(this,"dragPreviewNode",void 0),qD(this,"dragPreviewOptionsInternal",null),qD(this,"dragPreviewUnsubscribe",void 0),qD(this,"lastConnectedHandlerId",null),qD(this,"lastConnectedDragSource",null),qD(this,"lastConnectedDragSourceOptions",null),qD(this,"lastConnectedDragPreview",null),qD(this,"lastConnectedDragPreviewOptions",null),qD(this,"backend",void 0),this.backend=e}var e,n,a;return e=t,(n=[{key:"receiveHandlerId",value:function(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(t){this.dragSourceOptionsInternal=t}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(t){this.dragPreviewOptionsInternal=t}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var t=this.dragSource,e=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();e&&this.disconnectDragSource(),this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)):this.lastConnectedDragSource=t)}},{key:"reconnectDragPreview",value:function(){var t=this.dragPreview,e=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();e&&this.disconnectDragPreview(),this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!YD(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!YD(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}])&&$D(e.prototype,n),a&&$D(e,a),t}();function XD(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function ZD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var JD=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ZD(this,"hooks",KD({dropTarget:function(t,e){n.clearDropTarget(),n.dropTargetOptions=e,WD(t)?n.dropTargetRef=t:n.dropTargetNode=t,n.reconnect()}})),ZD(this,"handlerId",null),ZD(this,"dropTargetRef",null),ZD(this,"dropTargetNode",void 0),ZD(this,"dropTargetOptionsInternal",null),ZD(this,"unsubscribeDropTarget",void 0),ZD(this,"lastConnectedHandlerId",null),ZD(this,"lastConnectedDropTarget",null),ZD(this,"lastConnectedDropTargetOptions",null),ZD(this,"backend",void 0),this.backend=e}var e,n,a;return e=t,(n=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();var e=this.dropTarget;this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=e,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,e,this.dropTargetOptions)):this.lastConnectedDropTarget=e)}},{key:"receiveHandlerId",value:function(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(t){this.dropTargetOptionsInternal=t}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!YD(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}])&&XD(e.prototype,n),a&&XD(e,a),t}();var QD="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function tR(t){return(tR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eR(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function nR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var aR=function(){function t(e,n,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),nR(this,"spec",void 0),nR(this,"monitor",void 0),nR(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=a}var e,n,a;return e=t,(n=[{key:"beginDrag",value:function(){var t,e=this.spec,n=this.monitor;return null!==(t="object"===tR(e.item)?e.item:"function"==typeof e.item?e.item(n):{})&&void 0!==t?t:null}},{key:"canDrag",value:function(){var t=this.spec,e=this.monitor;return"boolean"==typeof t.canDrag?t.canDrag:"function"!=typeof t.canDrag||t.canDrag(e)}},{key:"isDragging",value:function(t,e){var n=this.spec,a=this.monitor,r=n.isDragging;return r?r(a):e===t.getSourceId()}},{key:"endDrag",value:function(){var t=this.spec,e=this.monitor,n=this.connector,a=t.end;a&&a(e.getItem(),e),n.reconnect()}}])&&eR(e.prototype,n),a&&eR(e,a),t}();function rR(){var e=t.useContext(RT).dragDropManager;return MT(null!=e,"Expected drag drop context"),e}function oR(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return iR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iR(t,e)}(t,e)||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 iR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function lR(e,n,a){var r=rR(),o=function(e,n,a){var r=t.useMemo((function(){return new aR(e,n,a)}),[n,a]);return t.useEffect((function(){r.spec=e}),[e]),r}(e,n,a),i=function(e){return t.useMemo((function(){var t=e.type;return MT(null!=t,"spec.type must be defined"),t}),[e])}(e);QD((function(){if(null!=i){var t=oR(function(t,e,n){var a=n.getRegistry(),r=a.addSource(t,e);return[r,function(){return a.removeSource(r)}]}(i,o,r),2),e=t[0],l=t[1];return n.receiveHandlerId(e),a.receiveHandlerId(e),l}}),[r,n,a,o,i])}function cR(t){return function(t){if(Array.isArray(t))return sR(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return sR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sR(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function uR(e,n){var a=cR(n||[]);return null==n&&"function"!=typeof e&&a.push(e),t.useMemo((function(){return"function"==typeof e?e():e}),a)}var dR=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var a,r,o;if(Array.isArray(e)){if((a=e.length)!=n.length)return!1;for(r=a;0!=r--;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((a=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=a;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=a;0!=r--;){var i=o[r];if(!t(e[i],n[i]))return!1}return!0}return e!=e&&n!=n};function pR(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return fR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fR(t,e)}(t,e)||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 fR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function mR(e,n,a){var r=pR(t.useState((function(){return n(e)})),2),o=r[0],i=r[1],l=t.useCallback((function(){var t=n(e);dR(o,t)||(i(t),a&&a())}),[o,e,a]);return QD(l),[o,l]}function hR(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return gR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gR(t,e)}(t,e)||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 gR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function bR(t,e,n){return function(t,e,n){var a=hR(mR(t,e,n),2),r=a[0],o=a[1];return QD((function(){var e=t.getHandlerId();if(null!=e)return t.subscribeToStateChange(o,{handlerIds:[e]})}),[t,o]),r}(e,t||function(){return{}},(function(){return n.reconnect()}))}function vR(e){return t.useMemo((function(){return e.hooks.dragSource()}),[e])}function yR(e){return t.useMemo((function(){return e.hooks.dragPreview()}),[e])}function xR(e,n){var a=uR(e,n);MT(!a.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)");var r,o=(r=rR(),t.useMemo((function(){return new zD(r)}),[r])),i=function(e,n){var a=rR(),r=t.useMemo((function(){return new GD(a.getBackend())}),[a]);return QD((function(){return r.dragSourceOptions=e||null,r.reconnect(),function(){return r.disconnectDragSource()}}),[r,e]),QD((function(){return r.dragPreviewOptions=n||null,r.reconnect(),function(){return r.disconnectDragPreview()}}),[r,n]),r}(a.options,a.previewOptions);return lR(a,o,i),[bR(a.collect,o,i),vR(i),yR(i)]}function wR(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function kR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var CR=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),kR(this,"spec",void 0),kR(this,"monitor",void 0),this.spec=e,this.monitor=n}var e,n,a;return e=t,(n=[{key:"canDrop",value:function(){var t=this.spec,e=this.monitor;return!t.canDrop||t.canDrop(e.getItem(),e)}},{key:"hover",value:function(){var t=this.spec,e=this.monitor;t.hover&&t.hover(e.getItem(),e)}},{key:"drop",value:function(){var t=this.spec,e=this.monitor;if(t.drop)return t.drop(e.getItem(),e)}}])&&wR(e.prototype,n),a&&wR(e,a),t}();function ER(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,o=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(t){l=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw r}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return OR(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OR(t,e)}(t,e)||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 OR(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function SR(e,n,a){var r=rR(),o=function(e,n){var a=t.useMemo((function(){return new CR(e,n)}),[n]);return t.useEffect((function(){a.spec=e}),[e]),a}(e,n),i=function(e){var n=e.accept;return t.useMemo((function(){return MT(null!=e.accept,"accept must be defined"),Array.isArray(n)?n:[n]}),[n])}(e);QD((function(){var t=ER(function(t,e,n){var a=n.getRegistry(),r=a.addTarget(t,e);return[r,function(){return a.removeTarget(r)}]}(i,o,r),2),e=t[0],l=t[1];return n.receiveHandlerId(e),a.receiveHandlerId(e),l}),[r,n,o,a,i.map((function(t){return t.toString()})).join("|")])}function NR(e){return t.useMemo((function(){return e.hooks.dropTarget()}),[e])}function PR(e,n){var a,r=uR(e,n),o=(a=rR(),t.useMemo((function(){return new FD(a)}),[a])),i=function(e){var n=rR(),a=t.useMemo((function(){return new JD(n.getBackend())}),[n]);return QD((function(){return a.dropTargetOptions=e||null,a.reconnect(),function(){return a.disconnectDropTarget()}}),[e]),a}(r.options);return SR(r,o,i),[bR(r.collect,o,i),NR(i)]}b(".drop-over-downward td{border-bottom:2px dashed #5860f8!important}.drop-over-upward td{border-top:2px dashed #5860f8!important}");const{Option:jR}=nd,TR=u.default.createContext(null),IR=({open:e,index:a,moveRow:r,className:o,style:i,...l})=>{const[c]=bw.useForm(),s=t.useRef(null),[{isOver:u,dropClassName:d},p]=PR({accept:"DraggableBodyRow",collect:t=>{const{index:e}=t.getItem()||{};return e===a?{}:{isOver:t.isOver(),dropClassName:e<a?" drop-over-downward":" drop-over-upward"}},drop:t=>{r(t.index,a)}}),[,f]=xR({type:"DraggableBodyRow",item:{index:a},collect:t=>({isDragging:t.isDragging()})});return e&&p(f(s)),n.jsx(bw,Object.assign({size:"small",component:!1,form:c},{children:n.jsx(TR.Provider,Object.assign({value:c},{children:n.jsx("tr",Object.assign({ref:s,className:`${o}${u?d:""}`,style:{cursor:e?"move":"auto",...i}},l),void 0)}),void 0)}),void 0)},DR=({columns:e,record:a,dataIndex:r,title:o,editable:i,inputType:l,valueType:c,valueEnum:s,recordSelectField:u,controlRender:p,formChange:f,remoteConfig:m,children:g,formItemProps:b,handleSave:v,...y})=>{const x=t.useContext(TR),[w,k]=t.useState(!1),[C,E]=t.useState({}),O=(t,e,n,a)=>{a&&(k(!0),a(t,n).then((t=>{k(!1),e&&E({[e]:t})})))};if(i){let t=a[r];"DatePicker"!==c&&"DateTimePicker"!==c||t&&(t=h.default(t)),"status"===r&&void 0!==t&&(a[r]=String(t)),setTimeout((()=>{x.setFieldsValue({[r]:t})}))}const S=(t,e)=>{let o=null;const i=(t,e)=>{let n="";const a=function(t){for(let e of t)if(e)if(Vj({data:e,type:"String"}))n+=e;else{const t=e.props.children;Vj({data:t,type:"Object"})&&a([t]),Vj({data:t,type:"Array"})&&a(t),Vj({data:t,type:"String"})&&(n+=t)}};return a([e.children]),n.toLowerCase().indexOf(t.toLowerCase())>=0},c=t=>{if(d.default.isArray(t))return t.map(((t,e)=>n.jsx(jR,Object.assign({value:t.value},{children:t.label}),e)))};switch(t){case"RecordSelect":o=n.jsx(nd,Object.assign({allowClear:!0,showSearch:!0,dropdownMatchSelectWidth:!1,placeholder:e,onChange:N,optionFilterProp:"children",filterOption:i},{children:c(a[u])}),void 0);break;case"Select":o=n.jsx(nd,Object.assign({dropdownMatchSelectWidth:!1,onChange:N,placeholder:e},{children:c(s)}),void 0);break;case"DatePicker":o=n.jsx(yx,{onChange:N,placeholder:e},void 0);break;case"DateTimePicker":o=n.jsx(yx,{onChange:N,placeholder:e,showTime:!0},void 0);break;case"AutoComplete":o=n.jsx(nd,Object.assign({allowClear:!0,showSearch:!0,dropdownMatchSelectWidth:!1,placeholder:e,onChange:N,optionFilterProp:"children",filterOption:i},{children:c(s)}),void 0);break;case"RemoteSearch":let t=s;C[r]&&(t=C[r]),o=n.jsx(nd,Object.assign({mode:m.remoteMode,placeholder:e,notFoundContent:w?n.jsx(Aw,{size:"small"},void 0):null,dropdownMatchSelectWidth:!1,filterOption:!1,allowClear:!0,showSearch:!0,onChange:N,onFocus:()=>O(void 0,r,a,m.remoteApi),onSearch:t=>O(t,r,a,m.remoteApi)},{children:r&&c(t)}),void 0);break;default:o=n.jsx(Gv,{onPressEnter:N,onBlur:N,placeholder:e,type:l||"text"},void 0)}return o},N=async()=>{try{const t=await x.validateFields();let n={...a,...t};const r={DateTimePicker:"YYYY-MM-DD HH:mm:ss",DatePicker:"YYYY-MM-DD"};for(let t of e)t.valueType&&Object.keys(r).includes(t.valueType)&&"string"==typeof t.dataIndex&&n[t.dataIndex]&&(n[t.dataIndex]=h.default(n[t.dataIndex]).format(r[t.valueType]));f&&(n=await f(n)||n),v(n)}catch(t){console.log("保存表单字段失败:",t)}};let P=g;return i?P=n.jsx(bw.Item,Object.assign({style:{margin:0},name:r,rules:b?b.rules:void 0},{children:S(c,o)}),void 0):c&&(!s||"Select"!==c&&"AutoComplete"!==c||(P=Kj(s,a[r])),a[u]&&"RecordSelect"===c&&(P=Kj(a[u],a[r]))),p&&(P=p(a,P)),n.jsx("td",Object.assign({},y,{title:a&&a[r]},{children:P}),void 0)};function RR(t){var e=null;return function(){return null==e&&(e=t()),e}}function MR(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function zR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var AR=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),zR(this,"entered",[]),zR(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}var e,n,a;return e=t,(n=[{key:"enter",value:function(t){var e=this,n=this.entered.length;return this.entered=function(t,e){var n=new Set,a=function(t){return n.add(t)};t.forEach(a),e.forEach(a);var r=[];return n.forEach((function(t){return r.push(t)})),r}(this.entered.filter((function(n){return e.isNodeInDocument(n)&&(!n.contains||n.contains(t))})),[t]),0===n&&this.entered.length>0}},{key:"leave",value:function(t){var e,n,a=this.entered.length;return this.entered=(e=this.entered.filter(this.isNodeInDocument),n=t,e.filter((function(t){return t!==n}))),a>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&MR(e.prototype,n),a&&MR(e,a),t}(),LR=RR((function(){return/firefox/i.test(navigator.userAgent)})),_R=RR((function(){return Boolean(window.safari)}));function FR(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function VR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var KR=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),VR(this,"xs",void 0),VR(this,"ys",void 0),VR(this,"c1s",void 0),VR(this,"c2s",void 0),VR(this,"c3s",void 0);for(var a=e.length,r=[],o=0;o<a;o++)r.push(o);r.sort((function(t,n){return e[t]<e[n]?-1:1}));for(var i,l,c=[],s=[],u=0;u<a-1;u++)i=e[u+1]-e[u],l=n[u+1]-n[u],c.push(i),s.push(l/i);for(var d=[s[0]],p=0;p<c.length-1;p++){var f=s[p],m=s[p+1];if(f*m<=0)d.push(0);else{i=c[p];var h=c[p+1],g=i+h;d.push(3*g/((g+h)/f+(g+i)/m))}}d.push(s[s.length-1]);for(var b,v=[],y=[],x=0;x<d.length-1;x++){b=s[x];var w=d[x],k=1/c[x],C=w+d[x+1]-b-b;v.push((b-w-C)*k),y.push(C*k*k)}this.xs=e,this.ys=n,this.c1s=d,this.c2s=v,this.c3s=y}var e,n,a;return e=t,(n=[{key:"interpolate",value:function(t){var e=this.xs,n=this.ys,a=this.c1s,r=this.c2s,o=this.c3s,i=e.length-1;if(t===e[i])return n[i];for(var l,c=0,s=o.length-1;c<=s;){var u=e[l=Math.floor(.5*(c+s))];if(u<t)c=l+1;else{if(!(u>t))return n[l];s=l-1}}var d=t-e[i=Math.max(0,s)],p=d*d;return n[i]+a[i]*d+r[i]*p+o[i]*d*p}}])&&FR(e.prototype,n),a&&FR(e,a),t}();function HR(t){var e=1===t.nodeType?t:t.parentElement;if(!e)return null;var n=e.getBoundingClientRect(),a=n.top;return{x:n.left,y:a}}function BR(t){return{x:t.clientX,y:t.clientY}}function UR(t,e,n,a,r){var o,i,l="IMG"===(o=e).nodeName&&(LR()||!(null!==(i=document.documentElement)&&void 0!==i&&i.contains(o))),c=HR(l?t:e),s={x:n.x-c.x,y:n.y-c.y},u=t.offsetWidth,d=t.offsetHeight,p=a.anchorX,f=a.anchorY,m=function(t,e,n,a){var r=t?e.width:n,o=t?e.height:a;return _R()&&t&&(o/=window.devicePixelRatio,r/=window.devicePixelRatio),{dragPreviewWidth:r,dragPreviewHeight:o}}(l,e,u,d),h=m.dragPreviewWidth,g=m.dragPreviewHeight,b=r.offsetX,v=r.offsetY,y=0===v||v;return{x:0===b||b?b:new KR([0,.5,1],[s.x,s.x/u*h,s.x+h-u]).interpolate(p),y:y?v:function(){var t=new KR([0,.5,1],[s.y,s.y/d*g,s.y+g-d]).interpolate(f);return _R()&&l&&(t+=(window.devicePixelRatio-1)*g),t}()}}var WR,YR="__NATIVE_FILE__",$R="__NATIVE_URL__",qR="__NATIVE_TEXT__",GR="__NATIVE_HTML__",XR=Object.freeze({__proto__:null,FILE:YR,URL:$R,TEXT:qR,HTML:GR});function ZR(t,e,n){var a=e.reduce((function(e,n){return e||t.getData(n)}),"");return null!=a?a:n}function JR(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var QR=(JR(WR={},YR,{exposeProperties:{files:function(t){return Array.prototype.slice.call(t.files)},items:function(t){return t.items},dataTransfer:function(t){return t}},matchesTypes:["Files"]}),JR(WR,GR,{exposeProperties:{html:function(t,e){return ZR(t,e,"")},dataTransfer:function(t){return t}},matchesTypes:["Html","text/html"]}),JR(WR,$R,{exposeProperties:{urls:function(t,e){return ZR(t,e,"").split("\n")},dataTransfer:function(t){return t}},matchesTypes:["Url","text/uri-list"]}),JR(WR,qR,{exposeProperties:{text:function(t,e){return ZR(t,e,"")},dataTransfer:function(t){return t}},matchesTypes:["Text","text/plain"]}),WR);function tM(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function eM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nM=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),eM(this,"item",void 0),eM(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}var e,n,a;return e=t,(n=[{key:"initializeExposedProperties",value:function(){var t=this;Object.keys(this.config.exposeProperties).forEach((function(e){Object.defineProperty(t.item,e,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(e,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(t){var e=this;if(t){var n={};Object.keys(this.config.exposeProperties).forEach((function(a){n[a]={value:e.config.exposeProperties[a](t,e.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,n)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(t,e){return e===t.getSourceId()}},{key:"endDrag",value:function(){}}])&&tM(e.prototype,n),a&&tM(e,a),t}();function aM(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(QR).filter((function(t){return QR[t].matchesTypes.some((function(t){return e.indexOf(t)>-1}))}))[0]||null}function rM(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function oM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var iM=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),oM(this,"ownerDocument",null),oM(this,"globalContext",void 0),oM(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}var e,n,a;return e=t,(n=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){var t;return null!==(t=this.globalContext)&&void 0!==t&&t.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var t;return(null===(t=this.optionsArgs)||void 0===t?void 0:t.rootElement)||this.window}}])&&rM(e.prototype,n),a&&rM(e,a),t}();function lM(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function cM(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lM(Object(n),!0).forEach((function(e){uM(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lM(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function sM(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function uM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var dM=function(){function t(e,n,a){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),uM(this,"options",void 0),uM(this,"actions",void 0),uM(this,"monitor",void 0),uM(this,"registry",void 0),uM(this,"enterLeaveCounter",void 0),uM(this,"sourcePreviewNodes",new Map),uM(this,"sourcePreviewNodeOptions",new Map),uM(this,"sourceNodes",new Map),uM(this,"sourceNodeOptions",new Map),uM(this,"dragStartSourceIds",null),uM(this,"dropTargetIds",[]),uM(this,"dragEnterTargetIds",[]),uM(this,"currentNativeSource",null),uM(this,"currentNativeHandle",null),uM(this,"currentDragSourceNode",null),uM(this,"altKeyPressed",!1),uM(this,"mouseMoveTimeoutTimer",null),uM(this,"asyncEndDragFrameId",null),uM(this,"dragOverTargetIds",null),uM(this,"lastClientOffset",null),uM(this,"hoverRafId",null),uM(this,"getSourceClientOffset",(function(t){var e=r.sourceNodes.get(t);return e&&HR(e)||null})),uM(this,"endDragNativeItem",(function(){r.isDraggingNativeItem()&&(r.actions.endDrag(),r.currentNativeHandle&&r.registry.removeSource(r.currentNativeHandle),r.currentNativeHandle=null,r.currentNativeSource=null)})),uM(this,"isNodeInDocument",(function(t){return Boolean(t&&r.document&&r.document.body&&r.document.body.contains(t))})),uM(this,"endDragIfSourceWasRemovedFromDOM",(function(){var t=r.currentDragSourceNode;null==t||r.isNodeInDocument(t)||r.clearCurrentDragSourceNode()&&r.monitor.isDragging()&&r.actions.endDrag()})),uM(this,"handleTopDragStartCapture",(function(){r.clearCurrentDragSourceNode(),r.dragStartSourceIds=[]})),uM(this,"handleTopDragStart",(function(t){if(!t.defaultPrevented){var e=r.dragStartSourceIds;r.dragStartSourceIds=null;var n=BR(t);r.monitor.isDragging()&&r.actions.endDrag(),r.actions.beginDrag(e||[],{publishSource:!1,getSourceClientOffset:r.getSourceClientOffset,clientOffset:n});var a=t.dataTransfer,o=aM(a);if(r.monitor.isDragging()){if(a&&"function"==typeof a.setDragImage){var i=r.monitor.getSourceId(),l=r.sourceNodes.get(i),c=r.sourcePreviewNodes.get(i)||l;if(c){var s=r.getCurrentSourcePreviewNodeOptions(),u=UR(l,c,n,{anchorX:s.anchorX,anchorY:s.anchorY},{offsetX:s.offsetX,offsetY:s.offsetY});a.setDragImage(c,u.x,u.y)}}try{null==a||a.setData("application/json",{})}catch(t){}r.setCurrentDragSourceNode(t.target),r.getCurrentSourcePreviewNodeOptions().captureDraggingState?r.actions.publishDragSource():setTimeout((function(){return r.actions.publishDragSource()}),0)}else if(o)r.beginDragNativeItem(o);else{if(a&&!a.types&&(t.target&&!t.target.hasAttribute||!t.target.hasAttribute("draggable")))return;t.preventDefault()}}})),uM(this,"handleTopDragEndCapture",(function(){r.clearCurrentDragSourceNode()&&r.monitor.isDragging()&&r.actions.endDrag()})),uM(this,"handleTopDragEnterCapture",(function(t){if(r.dragEnterTargetIds=[],r.enterLeaveCounter.enter(t.target)&&!r.monitor.isDragging()){var e=t.dataTransfer,n=aM(e);n&&r.beginDragNativeItem(n,e)}})),uM(this,"handleTopDragEnter",(function(t){var e=r.dragEnterTargetIds;(r.dragEnterTargetIds=[],r.monitor.isDragging())&&(r.altKeyPressed=t.altKey,e.length>0&&r.actions.hover(e,{clientOffset:BR(t)}),e.some((function(t){return r.monitor.canDropOnTarget(t)}))&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=r.getCurrentDropEffect())))})),uM(this,"handleTopDragOverCapture",(function(){r.dragOverTargetIds=[]})),uM(this,"handleTopDragOver",(function(t){var e=r.dragOverTargetIds;if(r.dragOverTargetIds=[],!r.monitor.isDragging())return t.preventDefault(),void(t.dataTransfer&&(t.dataTransfer.dropEffect="none"));r.altKeyPressed=t.altKey,r.lastClientOffset=BR(t),null===r.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(r.hoverRafId=requestAnimationFrame((function(){r.monitor.isDragging()&&r.actions.hover(e||[],{clientOffset:r.lastClientOffset}),r.hoverRafId=null}))),(e||[]).some((function(t){return r.monitor.canDropOnTarget(t)}))?(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=r.getCurrentDropEffect())):r.isDraggingNativeItem()?t.preventDefault():(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="none"))})),uM(this,"handleTopDragLeaveCapture",(function(t){r.isDraggingNativeItem()&&t.preventDefault(),r.enterLeaveCounter.leave(t.target)&&r.isDraggingNativeItem()&&setTimeout((function(){return r.endDragNativeItem()}),0)})),uM(this,"handleTopDropCapture",(function(t){var e;(r.dropTargetIds=[],r.isDraggingNativeItem())?(t.preventDefault(),null===(e=r.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer)):aM(t.dataTransfer)&&t.preventDefault();r.enterLeaveCounter.reset()})),uM(this,"handleTopDrop",(function(t){var e=r.dropTargetIds;r.dropTargetIds=[],r.actions.hover(e,{clientOffset:BR(t)}),r.actions.drop({dropEffect:r.getCurrentDropEffect()}),r.isDraggingNativeItem()?r.endDragNativeItem():r.monitor.isDragging()&&r.actions.endDrag()})),uM(this,"handleSelectStart",(function(t){var e=t.target;"function"==typeof e.dragDrop&&("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable||(t.preventDefault(),e.dragDrop()))})),this.options=new iM(n,a),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new AR(this.isNodeInDocument)}var e,n,a;return e=t,(n=[{key:"profile",value:function(){var t,e;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(t=this.dragStartSourceIds)||void 0===t?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var t=this.rootElement;if(void 0!==t){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}},{key:"teardown",value:function(){var t,e=this.rootElement;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)))}},{key:"connectDragPreview",value:function(t,e,n){var a=this;return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,e),function(){a.sourcePreviewNodes.delete(t),a.sourcePreviewNodeOptions.delete(t)}}},{key:"connectDragSource",value:function(t,e,n){var a=this;this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,n);var r=function(e){return a.handleDragStart(e,t)},o=function(t){return a.handleSelectStart(t)};return e.setAttribute("draggable","true"),e.addEventListener("dragstart",r),e.addEventListener("selectstart",o),function(){a.sourceNodes.delete(t),a.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",r),e.removeEventListener("selectstart",o),e.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(t,e){var n=this,a=function(e){return n.handleDragEnter(e,t)},r=function(e){return n.handleDragOver(e,t)},o=function(e){return n.handleDrop(e,t)};return e.addEventListener("dragenter",a),e.addEventListener("dragover",r),e.addEventListener("drop",o),function(){e.removeEventListener("dragenter",a),e.removeEventListener("dragover",r),e.removeEventListener("drop",o)}}},{key:"addEventListeners",value:function(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return cM({dropEffect:this.altKeyPressed?"copy":"move"},e||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var t=this.monitor.getSourceId();return cM({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(t)||{})}},{key:"isDraggingNativeItem",value:function(){var t=this.monitor.getItemType();return Object.keys(XR).some((function(e){return XR[e]===t}))}},{key:"beginDragNativeItem",value:function(t,e){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(t,e){var n=new nM(QR[t]);return n.loadDataTransfer(e),n}(t,e),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(t){var e=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t,this.mouseMoveTimeoutTimer=setTimeout((function(){var t;return null===(t=e.rootElement)||void 0===t?void 0:t.addEventListener("mousemove",e.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){var t;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(t=this.window)||void 0===t||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(t,e){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e))}},{key:"handleDragEnter",value:function(t,e){this.dragEnterTargetIds.unshift(e)}},{key:"handleDragOver",value:function(t,e){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)}},{key:"handleDrop",value:function(t,e){this.dropTargetIds.unshift(e)}}])&&sM(e.prototype,n),a&&sM(e,a),t}();const pM=function(t,e,n){return new dM(t,e,n)},fM=t=>n.jsx(jD,Object.assign({backend:pM,context:window},{children:t.children}),void 0);b(".ant-table-wrapper .ant-table-thead>tr>th{font-weight:700}.ant-table-wrapper .ant-table-tbody>tr>td,.ant-table-wrapper .ant-table-thead>tr>td,.ant-table-wrapper .ant-table-thead>tr>th{padding:6px 8px}.ant-table-wrapper .ant-table-tbody>tr>td.ant-table-cell .ant-form-item .ant-form-item-control-input{min-height:auto}.ant-table-wrapper .ant-table-tbody .btn-operate{width:26px;height:26px}.ant-table-wrapper .ant-table-pagination.ant-pagination{margin-top:10px;margin-bottom:10px;padding-top:10px;padding-bottom:10px}.ant-table-wrapper .react-resizable{position:relative;background-clip:padding-box}.ant-table-wrapper .react-resizable-handle{position:absolute;right:-5px;bottom:0;z-index:1;width:10px;height:100%;cursor:col-resize}");var mM=t.forwardRef(((e,a)=>{const r=t.useMemo((()=>{const t=e.extra||{};return{tableConfig:t.tableConfig,rowType:t.rowType,scroll:t.scroll,apiMethod:t.apiMethod,columns:t.columns||[],data:t.data,controlled:t.controlled,drag:t.drag,getTableSuccessData:t.getTableSuccessData,onSelect:t.onSelect,paginationConfig:t.paginationConfig,getCheckboxProps:t.getCheckboxProps}}),[e.extra]),o=t.useRef();let i=t.useRef(!0);const l=t.useRef({position:["bottomCenter"],size:"small",current:1,total:0,pages:0,pageSize:10,showSizeChanger:!0,orderByInfo:void 0}),c=t.useRef([]),s=t.useRef([]),[u,p]=t.useState(r.columns),[f,m]=t.useState(!1),[h,g]=t.useState([]),[b,v]=w.useSetState({selectRowIds:[],selectRowArray:[]}),[y,x]=t.useState({x:void 0,y:330}),k=t.useMemo((()=>r.tableConfig&&r.tableConfig.rowKey?r.tableConfig.rowKey:"id"),[r.tableConfig]),C=t.useCallback((async t=>{let e=!0;m(!0),t&&(void 0!==t.updateSelected&&(e=t.updateSelected,delete t.updateSelected),"not-reset"===t.pagination&&delete t.pagination,o.current={...o.current,...t});try{const n={...o.current};for(let t in l.current){const e=l.current[t];"orderByInfo"===t&&(n.orderByInfo=e),"current"===t&&(n.page=e),"pageSize"===t&&(n.size=n.size||e)}if(t&&t.current&&(n.page=t.current,l.current.current=t.current),r.apiMethod){delete n.current;const t=await r.apiMethod(d.default.pickBy(n,d.default.identity));let a=[];d.default.isArray(t.data.content)&&(!1!==r.paginationConfig?i.current=!0:i.current=!1,a=t.data.content,l.current.total=t.data.total,l.current.pages=t.data.pages),d.default.isArray(t.data)&&(i.current=!1,a=t.data),e&&v((t=>{let e=[...t.selectRowIds],n=[...t.selectRowArray];const r=a=>{if(t.selectRowIds.length)for(let o of a){for(let a of t.selectRowIds)o[k]===a&&(e.push(a),n.push(o));o.children&&r(o.children)}};return r(a),t.selectRowIds=d.default.unionBy(e),t.selectRowArray=d.default.unionBy(n,k),t})),g(a),r.getTableSuccessData&&r.getTableSuccessData(t)}}catch(t){}m(!1)}),[r,k,v]),E=t.useMemo((()=>({fixed:!0,type:r.rowType,selectedRowKeys:b.selectRowIds,getCheckboxProps:r.getCheckboxProps,onSelectAll:(t,e,n)=>{v((e=>{let a=[...e.selectRowIds],o=[...e.selectRowArray];return t?(a=d.default.uniq([...a,...n.map((t=>t[k]))]),o=d.default.uniqBy([...o,...n],k)):(a=a.filter((t=>!n.some((e=>e[k]===t)))),o=o.filter((t=>!n.some((e=>e[k]===t[k]))))),r.onSelect&&r.onSelect(o,a),e.selectRowIds=a,e.selectRowArray=o,e}))},onSelect:(t,e)=>{v((n=>{let a=[...n.selectRowIds],o=[...n.selectRowArray];return"checkbox"===r.rowType&&(e?(a.push(t[k]),o.push(t)):(a=a.filter((e=>e!==t[k])),o=o.filter((e=>e[k]!==t[k])))),"radio"===r.rowType&&e&&(a=[t[k]],o=[t]),r.onSelect&&r.onSelect(o,a),n.selectRowIds=a,n.selectRowArray=o,n}))}})),[r,k,v,b.selectRowIds]),O=t=>(e,{size:n})=>{p((e=>{const a=[...e];return a[t]={...a[t],width:n.width},c.current=a,a}))},S=t.useCallback((t=>{const e=!1===r.controlled?s.current:[...h],n=e.findIndex((e=>t[k]===e[k])),a=e[n];e.splice(n,1,{...a,...t}),!1===r.controlled?s.current=e:g(e)}),[k,h,r.controlled]),N=t.useCallback((async(t,e)=>{const n=h[t],a=eT(h,{$splice:[[t,1],[e,0,n]]});m(!0);try{if(r.drag){const n=JSON.parse(JSON.stringify(a)),o=JSON.parse(JSON.stringify(h)),i=[t,e].sort();!1!==await r.drag.moveRow(t,e,n,o,n.slice(i[0],i[1]+1))&&g(n)}}finally{m(!1)}}),[r.drag,h]);return t.useEffect((()=>{(async()=>{let t=[...r.columns];t.some((t=>"sequence"===t.dataIndex))||t.unshift({width:55,fixed:"left",title:"序号",dataIndex:"sequence",render:(t,e,n)=>{const a=l.current;return Object.keys(a).length?((a.current||0)-1)*(a.pageSize||0)+n+1:n+1}});for(let[e,n]of t.entries()){"RemoteSearch"===n.valueType&&n.remoteConfig&&n.remoteConfig.remoteApi&&(n.valueEnum=await n.remoteConfig.remoteApi());let a={...n,onHeaderCell:t=>({width:t.width,onResize:O(e)}),onCell:(t,e)=>({record:t,dataIndex:n.dataIndex,title:n.title,editable:"function"==typeof n.editable?n.editable(t,e):n.editable,inputType:n.inputType,valueType:n.valueType,valueEnum:n.valueEnum,recordSelectField:n.recordSelectField,controlRender:n.controlRender,formChange:n.formChange,remoteConfig:n.remoteConfig,formItemProps:n.formItemProps,handleSave:S})},r=c.current.find((t=>t.dataIndex===n.dataIndex&&t.title===n.title));r&&(a.width=r.width),t[e]=a}p(t)})()}),[r.columns,S]),t.useEffect((()=>{v((t=>{let e=[];const n=t=>{for(let a of t){for(let t of b.selectRowIds)a[k]===t&&e.push(a);a.children&&n(a.children)}};return b.selectRowIds.length&&(n(h),e=d.default.unionBy([...t.selectRowArray,...e],k)),t.selectRowArray=e,t}))}),[k,h,v,b.selectRowIds]),t.useEffect((()=>{d.default.isArray(r.data)&&g(r.data||[])}),[r.data]),t.useEffect((()=>{s.current=JSON.parse(JSON.stringify(h))}),[h]),t.useEffect((()=>{const t=document.getElementById("slider-menu"),e=document.getElementById("router-render");if(void 0!==r.scroll?.x||void 0!==r.scroll?.y)x((t=>({...t,...r.scroll})));else if(t&&e){let n=parseInt(window.getComputedStyle(e,null).paddingLeft);x((e=>(e.x=document.body.clientWidth-t.clientWidth-(2*n+43),e)))}}),[r.scroll]),t.useEffect((()=>{r.paginationConfig&&(l.current={...l.current,...r.paginationConfig})}),[r.paginationConfig]),t.useImperativeHandle(a,(()=>({setTableLoading:t=>{m(t)},getPages:()=>({...l.current}),getTableList:async(t,e)=>{t&&("not-reset"===t.pagination?t.current=l.current.current:void 0===t.current&&(t.current=1),t.clearSelectIds&&(delete t.clearSelectIds,v((t=>(t.selectRowArray=[],t.selectRowIds=[],t))))),await C(t),e&&e()},setRowSelected:(t,e)=>{let n=t;!0===e&&(n=Array.from(new Set([...b.selectRowIds,...t]))),v({selectRowIds:n})},getSelectIds:()=>b.selectRowIds,clearSelectIds:()=>{v({selectRowIds:[],selectRowArray:[]})},getSelectRowsArray:()=>b.selectRowArray,removeSelectIds:t=>{v({selectRowIds:b.selectRowIds.filter((e=>{let n=!0;for(let a of t)if(a===e){n=!1;break}return n})),selectRowArray:b.selectRowArray.filter((e=>{let n=!0;for(let a of t)if(a===e[k]){n=!1;break}return n}))})},getStaticDataList:()=>!1===r.controlled?[...s.current]:[...h],setStaticDataList:(t,e)=>{if("[object Object]"===Object.prototype.toString.call(t)){let e=t;g(h.map((n=>(n[k]===e[k]&&(n=t),n))))}"[object Array]"===Object.prototype.toString.call(t)&&g(t),e&&e()}}))),n.jsx(Xj,{children:n.jsx(fM,{children:n.jsx(sS,Object.assign({rowKey:"id",rowClassName:"editable-row",loading:f,bordered:!0,components:{header:{cell:IT},body:{row:IR,cell:t=>n.jsx(DR,Object.assign({},t,{columns:u}),void 0)}},onRow:(t,e)=>({index:e,moveRow:N,open:r.drag&&r.drag.open}),columns:u,dataSource:h,rowSelection:r.rowType?E:void 0,pagination:!(!d.default.isFunction(r.apiMethod)||!i.current)&&{size:"small",position:["bottomCenter"],showTotal:t=>`共${t}条`,showSizeChanger:!0,showQuickJumper:!0,...l.current},onChange:(t,e,n)=>{const{order:a}=n;t.orderByInfo=void 0,a&&(t.orderByInfo=`${n.field}:${"ascend"===a?1:-1}`),(t=>{!d.default.isEqual(t,l.current)&&i.current&&(l.current={...l.current,...t},C())})(t)},scroll:y},r.tableConfig),void 0)},void 0)},void 0)}));b("");const hM=t=>{const e={...t};return delete e.outerHeight,n.jsx(fv,Object.assign({className:"empty-wrap",style:{minHeight:t&&t.outerHeight?t.outerHeight:400},align:"middle",justify:"center"},{children:n.jsx(ha,Object.assign({description:"暂无数据"},e),void 0)}),void 0)};b(".from-table-modal .ant-modal-body{padding-top:15px}.from-table-modal .ant-modal-body .search-form{margin-bottom:8px}.from-table-modal .ant-modal-body .ant-table-wrapper .ant-pagination{margin-bottom:0}.from-table-modal .from-table-modal-foot{margin-top:20px}");const{Link:gM,Paragraph:bM}=RP;var vM=t.forwardRef((function(e,a){const r=t.useRef(null),o=t.useRef(),[i,l]=w.useSetState({saveLoading:!1,selectedRows:[]}),c=t.useMemo((()=>e.tableColumnsList&&e.tableColumnsList.tableConfig&&e.tableColumnsList.tableConfig.rowKey||"id"),[e.tableColumnsList]),s=t.useMemo((()=>{const t=e.width||0;return t>=500&&t<=800?{span:7}:t>800&&t<=1e3?{span:6}:t>1e3&&t<=1200?{span:5}:t>1200?{span:4}:{span:8}}),[e.width]),u=(t,e)=>{if(o.current){let n=[],a=[];"all"===t&&o.current.clearSelectIds(),"odd"===t&&e&&(n=[e[c]],a=i.selectedRows.filter((t=>t[c]!==e[c])),o.current.removeSelectIds(n)),l({selectedRows:a})}},d=t.useCallback((async()=>{if(r.current&&o.current){let t=await r.current.formSubmit();if(t&&Object.keys(t).length){for(let e in t){const n="YYYY-MM-DD HH:mm:ss";h.default(t[e],n,!0).isValid()&&(t[e]=h.default(t[e]).format(n))}t={clearSelectIds:!0,...t},void 0!==e.clearSelectIds&&(t.clearSelectIds=e.clearSelectIds),t.clearSelectIds&&l((t=>(t.selectedRows=[],t))),e.manualParameterChange&&(t=e.manualParameterChange(t)),e.searchCallback?e.searchCallback(t).then((e=>{e&&o.current?.getTableList(t)})):o.current.getTableList(t)}}else o.current?.getTableList()}),[e,l]),p=()=>{if(r.current){let t=[];const n=e.searchNoResetFiled||[];if(e.searchFormList)for(let a of e.searchFormList){if(a.unionConfig)for(let e of a.unionConfig.unionItems)e.name&&!n.includes(e.name)&&t.push(e.name);a.name&&!n.includes(a.name)&&t.push(a.name)}r.current.formReset(t)}d()};return t.useEffect((()=>{e.visible&&(e.autoGetList&&o.current?.getTableList(),e.openSelected&&e.openSelected.visible&&l((t=>(t.selectedRows=e.openSelected?.defaultValues||[],o.current?.setRowSelected(t.selectedRows.map((t=>t[c]))),t))))}),[e.autoGetList,e.openSelected,e.visible,c,l]),t.useImperativeHandle(a,(()=>({...r.current,...o.current,setSavaLoading:t=>{l({saveLoading:t})}}))),n.jsxs(Aj,Object.assign({className:"from-table-modal",width:e.width,visible:e.visible,title:e.title||"弹窗",onCancel:e.onCancel,forceRender:!0,maskClosable:!1,footer:null},{children:[e.topExtra,e.searchFormList?n.jsx(tT,{ref:r,rowGridConfig:{gutter:10},colGirdConfig:s,list:(f=e.searchFormList,f?f.map((t=>("Select"===t.componentName&&t.selectData&&t.selectData.length&&(t.selectData.some((t=>"全部"===t.label))||(t.selectData=[{label:"全部",value:""},...t.selectData])),t))):[]),formConfig:e.formConfig,render:()=>e.searchFormList&&e.searchFormList.length?n.jsxs(SC,Object.assign({size:10},{children:[n.jsx(sp,Object.assign({type:"primary",onClick:()=>{d()}},{children:"查询"}),void 0),n.jsx(sp,Object.assign({className:"btn-reset",onClick:p},{children:"重置"}),void 0)]}),void 0):n.jsx(n.Fragment,{},void 0)},void 0):null,n.jsxs(fv,Object.assign({},e.rowProps,{children:[e.leftSlot?n.jsx(gv,Object.assign({},e.leftSlot.colProps,{children:e.leftSlot.jsx}),void 0):null,n.jsx(gv,Object.assign({},e.colProps,{children:n.jsxs(fv,Object.assign({gutter:10},{children:[n.jsx(gv,Object.assign({span:e.openSelected&&e.openSelected.visible?16:24},{children:n.jsx(mM,{ref:o,extra:{rowType:e.tableColumnsList.rowType,apiMethod:e.apiMethod,columns:e.tableColumnsList.list,data:e.data,onSelect:(t,n)=>{((t,n)=>{l({selectedRows:n.map((n=>{let a={};const r=t.find((t=>t[c]===n));if(a[c]=n,e.openSelected&&e.openSelected.fileName&&(a[e.openSelected.fileName]=n),r&&(a=r),e.openSelected){const t=e.openSelected.fileName,r=e.openSelected.defaultValues;if(t&&r){const e=r.find((t=>t[c]===n));e&&(a[t]=e[t])}}return a}))})})(t,n),e.onSelect&&e.onSelect(t,n)},getTableSuccessData:e.getTableSuccessData,tableConfig:e.tableColumnsList.tableConfig,scroll:{x:"max-content"}}},void 0)}),void 0),e.openSelected&&e.openSelected.visible?n.jsx(gv,Object.assign({span:8},{children:n.jsx(vv,Object.assign({title:"已选列表",size:"small",bodyStyle:{height:e.openSelected.height||330,overflowY:"auto"},extra:n.jsx(gM,Object.assign({onClick:()=>u("all")},{children:"全部移除"}),void 0)},{children:i.selectedRows.length?i.selectedRows.map((t=>{const a=t[c],r=t[e.openSelected?.fileName];return n.jsxs(fv,Object.assign({gutter:12},{children:[n.jsx(gv,Object.assign({span:11,title:r},{children:n.jsx(bM,Object.assign({ellipsis:!0},{children:r}),void 0)}),void 0),n.jsx(gv,Object.assign({span:9,title:a},{children:n.jsx(bM,Object.assign({ellipsis:!0},{children:a}),void 0)}),void 0),n.jsx(gv,Object.assign({span:4},{children:n.jsx(gM,Object.assign({onClick:()=>u("odd",t)},{children:"移除"}),void 0)}),void 0)]}),a)})):n.jsx(hM,{outerHeight:200},void 0)}),void 0)}),void 0):null]}),void 0)}),void 0),e.rightSlot?n.jsx(gv,Object.assign({},e.rightSlot.colProps,{children:e.rightSlot.jsx}),void 0):null]}),void 0),n.jsx(fv,Object.assign({className:"from-table-modal-foot",justify:"center"},{children:n.jsx(gv,{children:n.jsxs(SC,Object.assign({size:20},{children:[e.onCancel?n.jsx(sp,Object.assign({onClick:()=>e.onCancel&&e.onCancel()},{children:"关闭"}),void 0):null,e.onConfirm?n.jsx(sp,Object.assign({type:"primary",loading:i.saveLoading,onClick:()=>{let t=[],n=[];t=e.openSelected&&e.openSelected.visible?i.selectedRows:o.current?.getSelectRowsArray()||[],e.onConfirm&&(o.current&&(n=o.current.getSelectIds()),l({saveLoading:!0}),e.onConfirm(t,n).then((t=>{l({saveLoading:!1}),t&&e.onCancel&&e.onCancel()})).catch((t=>{l({saveLoading:!1}),ii.warn(t,1.5)})))}},{children:"确定"}),void 0):null]}),void 0)},void 0)}),void 0)]}),void 0);var f})),yM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178a7.95 7.95 0 010-12.9l246-178a8 8 0 0112.7 6.5v46.8z"}}]},name:"left-circle",theme:"filled"},xM=function(e,n){return t.createElement(Po,he(he({},e),{},{ref:n,icon:yM}))};xM.displayName="LeftCircleFilled";var wM=t.forwardRef(xM),kM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z"}}]},name:"right-circle",theme:"filled"},CM=function(e,n){return t.createElement(Po,he(he({},e),{},{ref:n,icon:kM}))};CM.displayName="RightCircleFilled";var EM=t.forwardRef(CM);b(".quickly-form-modal .ant-modal-body{padding-top:15px}.quickly-form-modal .quickly-form-modal-foot{margin-top:20px}");b(".form-modal .ant-modal-body{padding-top:15px}.form-modal .ant-modal-body .modal-form-height{max-height:580px;padding-right:5px;overflow-x:hidden;overflow-y:auto}.form-modal .ant-modal-body .modal-form-height .generate-form.ant-form-horizontal.ant-form .ant-row.ant-form-item{margin-bottom:4px}.form-modal .form-modal-foot{margin-top:20px}");var OM=t.forwardRef(((e,a)=>{const r=t.useRef(),[o,i]=w.useSetState({loading:!1,saveLoading:!1,disabled:!1}),l=async()=>{let t=await(r.current?.formSubmit());if(t){if(t.endTime&&t.startTime&&h.default(t.endTime).isBefore(t.startTime))return void ii.warn("生效日期不能大于失效日期",1.5);i({saveLoading:!0});try{let n={};if(t={...t,...e.submitExtraParameters},e.switchTransform)for(let n=0;n<e.switchTransform.length;n++)t[e.switchTransform[n]]?t[e.switchTransform[n]]="1":t[e.switchTransform[n]]="0";if(e.submitRemoveField)for(let n=0;n<e.submitRemoveField.length;n++)t[e.submitRemoveField[n]]&&delete t[e.submitRemoveField[n]];for(let e in t){const n="YYYY-MM-DD HH:mm:ss";h.default(t[e],n,!0).isValid()&&(t[e]=h.default(t[e]).format(n))}if(e.manualParameterChange&&(t=e.manualParameterChange(t)),e.manualVerification&&!e.manualVerification(t))return console.warn("手动验证表单不通过"),void i({saveLoading:!1});t=d.default.omitBy(t,d.default.isNil),e.submitApi&&t?(e.id?(t.id=e.id,n=await e.submitApi(t,"put")):n=await e.submitApi(t,"post"),1===n.code&&(e.onConfirm&&e.onConfirm(n),ii.success("操作成功",1.5),e.onCancel&&e.onCancel()),i({saveLoading:!1})):e.onConfirm&&t&&e.onConfirm(t)}catch(t){i({saveLoading:!1})}}};return t.useEffect((()=>{!1===e.visible&&i({saveLoading:!1})}),[e.visible,i]),t.useEffect((()=>{i({disabled:e.disable})}),[e.disable,i]),t.useImperativeHandle(a,(()=>({setFormLoading:t=>{i({loading:t})},setFormSaveLoading:t=>{i({saveLoading:t})},setFormFields:t=>{r.current&&r.current.setFormFields(t)},getFormValues:t=>r.current?.getFormValues(t),setFormValues:t=>{r.current&&r.current.setFormValues(t)},excludeFormSubmitValues:async t=>{if(r.current){const n=e.formList.filter((e=>!t?.includes(e.name)));return await(r.current?.formSubmit(n.map((t=>t.name))))}return{}},getFormSubmitValues:async t=>r.current?await(r.current?.formSubmit(t)):{}}))),n.jsx(Aj,Object.assign({className:"form-modal",width:e.width?e.width:600,visible:e.visible,title:e.title||"对话框",onCancel:e.onCancel,destroyOnClose:!0,maskClosable:!1,footer:null},{children:n.jsxs(Aw,Object.assign({spinning:o.loading},{children:[n.jsxs("div",Object.assign({className:"modal-form-height"},{children:[e.topRender?e.topRender:null,n.jsx(tT,{ref:r,formConfig:{labelCol:{span:24},...e.formConfig},rowGridConfig:{gutter:[20,0]},colGirdConfig:e.colGirdConfig||{span:12},list:e.formList},void 0),e.children&&e.children]}),void 0),(()=>{const a=(()=>{const t=[n.jsx(sp,Object.assign({onClick:()=>e.onCancel&&e.onCancel()},{children:"关闭"}),-1)];return o.disabled||t.push(n.jsx(sp,Object.assign({type:"primary",loading:o.saveLoading,onClick:l},{children:"提交"}),-2)),t})(),r=t=>n.jsx(fv,Object.assign({className:"form-modal-foot",justify:"center"},{children:n.jsx(gv,{children:n.jsx(SC,Object.assign({size:20},{children:t}),void 0)},void 0)}),void 0);if(e.footer)return e.footer;if(e.footBtnList){const{model:n,data:o}=e.footBtnList,i=o.map(((e,n)=>{const{children:a,...r}=e;return t.createElement(sp,{...r,key:n},a)}));if("new"===n)return r(i);if("before"===n)return r([...i,...a]);if("after"===n)return r([...a,...i])}return r(a)})()]}),void 0)}),void 0)}));b('@import "https://at.alicdn.com/t/font_2381668_l6oy3doglyo.css";.icon-selected-modal .avatar-selected{display:flex;align-items:center;justify-content:center;width:36px;height:36px;overflow:hidden;border:2px solid #fff;border-radius:4px;cursor:pointer}.icon-selected-modal .avatar-selected.avatar-selected-bg{border-color:#5860f8}.icon-selected-modal .icon-selected-foot{margin-top:20px}');
|
|
20
20
|
/*! *****************************************************************************
|
|
21
21
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
22
22
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|