-
Notifications
You must be signed in to change notification settings - Fork 0
/
593.eed0db2e.async.js
18 lines (18 loc) · 61.3 KB
/
593.eed0db2e.async.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"use strict";(self.webpackChunkymf_component=self.webpackChunkymf_component||[]).push([[593],{86128:function(it,$e,h){h.d($e,{Z:function(){return L}});var Ce=h(87462),be=h(91),Q=h(1413),Ee=h(15671),me=h(43144),W=h(97326),B=h(60136),Ne=h(29388),Z=h(4942),x=h(93967),Y=h.n(x),c=h(64217),F=h(67294),Me=h(27822),De=function(C){for(var _=C.prefixCls,r=C.level,re=C.isStart,z=C.isEnd,oe="".concat(_,"-indent-unit"),s=[],u=0;u<r;u+=1)s.push(F.createElement("span",{key:u,className:Y()(oe,(0,Z.Z)((0,Z.Z)({},"".concat(oe,"-start"),re[u]),"".concat(oe,"-end"),z[u]))}));return F.createElement("span",{"aria-hidden":"true",className:"".concat(_,"-indent")},s)},H=F.memo(De),ke=h(35381),ue=h(1089),pe=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ae="open",o="close",g="---",O=function(V){(0,B.Z)(_,V);var C=(0,Ne.Z)(_);function _(){var r;(0,Ee.Z)(this,_);for(var re=arguments.length,z=new Array(re),oe=0;oe<re;oe++)z[oe]=arguments[oe];return r=C.call.apply(C,[this].concat(z)),(0,Z.Z)((0,W.Z)(r),"state",{dragNodeHighlight:!1}),(0,Z.Z)((0,W.Z)(r),"selectHandle",void 0),(0,Z.Z)((0,W.Z)(r),"cacheIndent",void 0),(0,Z.Z)((0,W.Z)(r),"onSelectorClick",function(s){var u=r.props.context.onNodeClick;u(s,(0,ue.F)(r.props)),r.isSelectable()?r.onSelect(s):r.onCheck(s)}),(0,Z.Z)((0,W.Z)(r),"onSelectorDoubleClick",function(s){var u=r.props.context.onNodeDoubleClick;u(s,(0,ue.F)(r.props))}),(0,Z.Z)((0,W.Z)(r),"onSelect",function(s){if(!r.isDisabled()){var u=r.props.context.onNodeSelect;u(s,(0,ue.F)(r.props))}}),(0,Z.Z)((0,W.Z)(r),"onCheck",function(s){if(!r.isDisabled()){var u=r.props,I=u.disableCheckbox,$=u.checked,j=r.props.context.onNodeCheck;if(!(!r.isCheckable()||I)){var fe=!$;j(s,(0,ue.F)(r.props),fe)}}}),(0,Z.Z)((0,W.Z)(r),"onMouseEnter",function(s){var u=r.props.context.onNodeMouseEnter;u(s,(0,ue.F)(r.props))}),(0,Z.Z)((0,W.Z)(r),"onMouseLeave",function(s){var u=r.props.context.onNodeMouseLeave;u(s,(0,ue.F)(r.props))}),(0,Z.Z)((0,W.Z)(r),"onContextMenu",function(s){var u=r.props.context.onNodeContextMenu;u(s,(0,ue.F)(r.props))}),(0,Z.Z)((0,W.Z)(r),"onDragStart",function(s){var u=r.props.context.onNodeDragStart;s.stopPropagation(),r.setState({dragNodeHighlight:!0}),u(s,(0,W.Z)(r));try{s.dataTransfer.setData("text/plain","")}catch(I){}}),(0,Z.Z)((0,W.Z)(r),"onDragEnter",function(s){var u=r.props.context.onNodeDragEnter;s.preventDefault(),s.stopPropagation(),u(s,(0,W.Z)(r))}),(0,Z.Z)((0,W.Z)(r),"onDragOver",function(s){var u=r.props.context.onNodeDragOver;s.preventDefault(),s.stopPropagation(),u(s,(0,W.Z)(r))}),(0,Z.Z)((0,W.Z)(r),"onDragLeave",function(s){var u=r.props.context.onNodeDragLeave;s.stopPropagation(),u(s,(0,W.Z)(r))}),(0,Z.Z)((0,W.Z)(r),"onDragEnd",function(s){var u=r.props.context.onNodeDragEnd;s.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(s,(0,W.Z)(r))}),(0,Z.Z)((0,W.Z)(r),"onDrop",function(s){var u=r.props.context.onNodeDrop;s.preventDefault(),s.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(s,(0,W.Z)(r))}),(0,Z.Z)((0,W.Z)(r),"onExpand",function(s){var u=r.props,I=u.loading,$=u.context.onNodeExpand;I||$(s,(0,ue.F)(r.props))}),(0,Z.Z)((0,W.Z)(r),"setSelectHandle",function(s){r.selectHandle=s}),(0,Z.Z)((0,W.Z)(r),"getNodeState",function(){var s=r.props.expanded;return r.isLeaf()?null:s?ae:o}),(0,Z.Z)((0,W.Z)(r),"hasChildren",function(){var s=r.props.eventKey,u=r.props.context.keyEntities,I=(0,ke.Z)(u,s)||{},$=I.children;return!!($||[]).length}),(0,Z.Z)((0,W.Z)(r),"isLeaf",function(){var s=r.props,u=s.isLeaf,I=s.loaded,$=r.props.context.loadData,j=r.hasChildren();return u===!1?!1:u||!$&&!j||$&&I&&!j}),(0,Z.Z)((0,W.Z)(r),"isDisabled",function(){var s=r.props.disabled,u=r.props.context.disabled;return!!(u||s)}),(0,Z.Z)((0,W.Z)(r),"isCheckable",function(){var s=r.props.checkable,u=r.props.context.checkable;return!u||s===!1?!1:u}),(0,Z.Z)((0,W.Z)(r),"syncLoadData",function(s){var u=s.expanded,I=s.loading,$=s.loaded,j=r.props.context,fe=j.loadData,ge=j.onNodeLoad;I||fe&&u&&!r.isLeaf()&&!$&&ge((0,ue.F)(r.props))}),(0,Z.Z)((0,W.Z)(r),"isDraggable",function(){var s=r.props,u=s.data,I=s.context.draggable;return!!(I&&(!I.nodeDraggable||I.nodeDraggable(u)))}),(0,Z.Z)((0,W.Z)(r),"renderDragHandler",function(){var s=r.props.context,u=s.draggable,I=s.prefixCls;return u!=null&&u.icon?F.createElement("span",{className:"".concat(I,"-draggable-icon")},u.icon):null}),(0,Z.Z)((0,W.Z)(r),"renderSwitcherIconDom",function(s){var u=r.props.switcherIcon,I=r.props.context.switcherIcon,$=u||I;return typeof $=="function"?$((0,Q.Z)((0,Q.Z)({},r.props),{},{isLeaf:s})):$}),(0,Z.Z)((0,W.Z)(r),"renderSwitcher",function(){var s=r.props.expanded,u=r.props.context.prefixCls;if(r.isLeaf()){var I=r.renderSwitcherIconDom(!0);return I!==!1?F.createElement("span",{className:Y()("".concat(u,"-switcher"),"".concat(u,"-switcher-noop"))},I):null}var $=Y()("".concat(u,"-switcher"),"".concat(u,"-switcher_").concat(s?ae:o)),j=r.renderSwitcherIconDom(!1);return j!==!1?F.createElement("span",{onClick:r.onExpand,className:$},j):null}),(0,Z.Z)((0,W.Z)(r),"renderCheckbox",function(){var s=r.props,u=s.checked,I=s.halfChecked,$=s.disableCheckbox,j=r.props.context.prefixCls,fe=r.isDisabled(),ge=r.isCheckable();if(!ge)return null;var q=typeof ge!="boolean"?ge:null;return F.createElement("span",{className:Y()("".concat(j,"-checkbox"),u&&"".concat(j,"-checkbox-checked"),!u&&I&&"".concat(j,"-checkbox-indeterminate"),(fe||$)&&"".concat(j,"-checkbox-disabled")),onClick:r.onCheck},q)}),(0,Z.Z)((0,W.Z)(r),"renderIcon",function(){var s=r.props.loading,u=r.props.context.prefixCls;return F.createElement("span",{className:Y()("".concat(u,"-iconEle"),"".concat(u,"-icon__").concat(r.getNodeState()||"docu"),s&&"".concat(u,"-icon_loading"))})}),(0,Z.Z)((0,W.Z)(r),"renderSelector",function(){var s=r.state.dragNodeHighlight,u=r.props,I=u.title,$=I===void 0?g:I,j=u.selected,fe=u.icon,ge=u.loading,q=u.data,Se=r.props.context,ye=Se.prefixCls,Ue=Se.showIcon,je=Se.icon,Ye=Se.loadData,ee=Se.titleRender,Re=r.isDisabled(),Ae="".concat(ye,"-node-content-wrapper"),f;if(Ue){var T=fe||je;f=T?F.createElement("span",{className:Y()("".concat(ye,"-iconEle"),"".concat(ye,"-icon__customize"))},typeof T=="function"?T(r.props):T):r.renderIcon()}else Ye&&ge&&(f=r.renderIcon());var k;typeof $=="function"?k=$(q):ee?k=ee(q):k=$;var M=F.createElement("span",{className:"".concat(ye,"-title")},k);return F.createElement("span",{ref:r.setSelectHandle,title:typeof $=="string"?$:"",className:Y()("".concat(Ae),"".concat(Ae,"-").concat(r.getNodeState()||"normal"),!Re&&(j||s)&&"".concat(ye,"-node-selected")),onMouseEnter:r.onMouseEnter,onMouseLeave:r.onMouseLeave,onContextMenu:r.onContextMenu,onClick:r.onSelectorClick,onDoubleClick:r.onSelectorDoubleClick},f,M,r.renderDropIndicator())}),(0,Z.Z)((0,W.Z)(r),"renderDropIndicator",function(){var s=r.props,u=s.disabled,I=s.eventKey,$=r.props.context,j=$.draggable,fe=$.dropLevelOffset,ge=$.dropPosition,q=$.prefixCls,Se=$.indent,ye=$.dropIndicatorRender,Ue=$.dragOverNodeKey,je=$.direction,Ye=!!j,ee=!u&&Ye&&Ue===I,Re=Se!=null?Se:r.cacheIndent;return r.cacheIndent=Se,ee?ye({dropPosition:ge,dropLevelOffset:fe,indent:Re,prefixCls:q,direction:je}):null}),r}return(0,me.Z)(_,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var re=this.props.selectable,z=this.props.context.selectable;return typeof re=="boolean"?re:z}},{key:"render",value:function(){var re,z=this.props,oe=z.eventKey,s=z.className,u=z.style,I=z.dragOver,$=z.dragOverGapTop,j=z.dragOverGapBottom,fe=z.isLeaf,ge=z.isStart,q=z.isEnd,Se=z.expanded,ye=z.selected,Ue=z.checked,je=z.halfChecked,Ye=z.loading,ee=z.domRef,Re=z.active,Ae=z.data,f=z.onMouseMove,T=z.selectable,k=(0,be.Z)(z,pe),M=this.props.context,i=M.prefixCls,p=M.filterTreeNode,S=M.keyEntities,e=M.dropContainerKey,v=M.dropTargetKey,D=M.draggingNodeKey,K=this.isDisabled(),t=(0,c.Z)(k,{aria:!0,data:!0}),a=(0,ke.Z)(S,oe)||{},n=a.level,d=q[q.length-1],l=this.isDraggable(),y=!K&&l,N=D===oe,m=T!==void 0?{"aria-selected":!!T}:void 0;return F.createElement("div",(0,Ce.Z)({ref:ee,className:Y()(s,"".concat(i,"-treenode"),(re={},(0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)(re,"".concat(i,"-treenode-disabled"),K),"".concat(i,"-treenode-switcher-").concat(Se?"open":"close"),!fe),"".concat(i,"-treenode-checkbox-checked"),Ue),"".concat(i,"-treenode-checkbox-indeterminate"),je),"".concat(i,"-treenode-selected"),ye),"".concat(i,"-treenode-loading"),Ye),"".concat(i,"-treenode-active"),Re),"".concat(i,"-treenode-leaf-last"),d),"".concat(i,"-treenode-draggable"),l),"dragging",N),(0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)(re,"drop-target",v===oe),"drop-container",e===oe),"drag-over",!K&&I),"drag-over-gap-top",!K&&$),"drag-over-gap-bottom",!K&&j),"filter-node",p&&p((0,ue.F)(this.props))))),style:u,draggable:y,"aria-grabbed":N,onDragStart:y?this.onDragStart:void 0,onDragEnter:l?this.onDragEnter:void 0,onDragOver:l?this.onDragOver:void 0,onDragLeave:l?this.onDragLeave:void 0,onDrop:l?this.onDrop:void 0,onDragEnd:l?this.onDragEnd:void 0,onMouseMove:f},m,t),F.createElement(H,{prefixCls:i,level:n,isStart:ge,isEnd:q}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),_}(F.Component),w=function(C){return F.createElement(Me.k.Consumer,null,function(_){return F.createElement(O,(0,Ce.Z)({},C,{context:_}))})};w.displayName="TreeNode",w.isTreeNode=1;var L=w},27822:function(it,$e,h){h.d($e,{k:function(){return be}});var Ce=h(67294),be=Ce.createContext(null)},70593:function(it,$e,h){h.d($e,{O:function(){return L.Z},Z:function(){return M}});var Ce=h(87462),be=h(71002),Q=h(1413),Ee=h(74902),me=h(15671),W=h(43144),B=h(97326),Ne=h(60136),Z=h(29388),x=h(4942),Y=h(93967),c=h.n(Y),F=h(15105),Me=h(64217),De=h(80334),H=h(67294),ke=h(27822);function ue(i){var p=i.dropPosition,S=i.dropLevelOffset,e=i.indent,v={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(p){case-1:v.top=0,v.left=-S*e;break;case 1:v.bottom=0,v.left=-S*e;break;case 0:v.bottom=0,v.left=e;break}return H.createElement("div",{style:v})}function pe(i){if(i==null)throw new TypeError("Cannot destructure "+i)}var ae=h(97685),o=h(91),g=h(8410),O=h(85344),w=h(82225),L=h(86128);function V(i,p){var S=H.useState(!1),e=(0,ae.Z)(S,2),v=e[0],D=e[1];(0,g.Z)(function(){if(v)return i(),function(){p()}},[v]),(0,g.Z)(function(){return D(!0),function(){D(!1)}},[])}var C=h(1089),_=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],r=function(p,S){var e=p.className,v=p.style,D=p.motion,K=p.motionNodes,t=p.motionType,a=p.onMotionStart,n=p.onMotionEnd,d=p.active,l=p.treeNodeRequiredProps,y=(0,o.Z)(p,_),N=H.useState(!0),m=(0,ae.Z)(N,2),b=m[0],E=m[1],P=H.useContext(ke.k),J=P.prefixCls,R=K&&t!=="hide";(0,g.Z)(function(){K&&R!==b&&E(R)},[K]);var A=function(){K&&a()},G=H.useRef(!1),te=function(){K&&!G.current&&(G.current=!0,n())};V(A,te);var ve=function(se){R===se&&te()};return K?H.createElement(w.ZP,(0,Ce.Z)({ref:S,visible:b},D,{motionAppear:t==="show",onVisibleChanged:ve}),function(ie,se){var de=ie.className,Ke=ie.style;return H.createElement("div",{ref:se,className:c()("".concat(J,"-treenode-motion"),de),style:Ke},K.map(function(ne){var Te=Object.assign({},(pe(ne.data),ne.data)),Pe=ne.title,Ze=ne.key,Ge=ne.isStart,le=ne.isEnd;delete Te.children;var Fe=(0,C.H8)(Ze,l);return H.createElement(L.Z,(0,Ce.Z)({},Te,Fe,{title:Pe,active:d,data:ne.data,key:Ze,isStart:Ge,isEnd:le}))}))}):H.createElement(L.Z,(0,Ce.Z)({domRef:S,className:e,style:v},y,{active:d}))};r.displayName="MotionTreeNode";var re=H.forwardRef(r),z=re;function oe(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],S=i.length,e=p.length;if(Math.abs(S-e)!==1)return{add:!1,key:null};function v(D,K){var t=new Map;D.forEach(function(n){t.set(n,!0)});var a=K.filter(function(n){return!t.has(n)});return a.length===1?a[0]:null}return S<e?{add:!0,key:v(i,p)}:{add:!1,key:v(p,i)}}function s(i,p,S){var e=i.findIndex(function(t){return t.key===S}),v=i[e+1],D=p.findIndex(function(t){return t.key===S});if(v){var K=p.findIndex(function(t){return t.key===v.key});return p.slice(D+1,K)}return p.slice(D+1)}var u=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],I={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},$=function(){},j="RC_TREE_MOTION_".concat(Math.random()),fe={key:j},ge={key:j,level:0,index:0,pos:"0",node:fe,nodes:[fe]},q={parent:null,children:[],pos:ge.pos,data:fe,title:null,key:j,isStart:[],isEnd:[]};function Se(i,p,S,e){return p===!1||!S?i:i.slice(0,Math.ceil(S/e)+1)}function ye(i){var p=i.key,S=i.pos;return(0,C.km)(p,S)}function Ue(i){for(var p=String(i.data.key),S=i;S.parent;)S=S.parent,p="".concat(S.data.key," > ").concat(p);return p}var je=H.forwardRef(function(i,p){var S=i.prefixCls,e=i.data,v=i.selectable,D=i.checkable,K=i.expandedKeys,t=i.selectedKeys,a=i.checkedKeys,n=i.loadedKeys,d=i.loadingKeys,l=i.halfCheckedKeys,y=i.keyEntities,N=i.disabled,m=i.dragging,b=i.dragOverNodeKey,E=i.dropPosition,P=i.motion,J=i.height,R=i.itemHeight,A=i.virtual,G=i.focusable,te=i.activeItem,ve=i.focused,ie=i.tabIndex,se=i.onKeyDown,de=i.onFocus,Ke=i.onBlur,ne=i.onActiveChange,Te=i.onListChangeStart,Pe=i.onListChangeEnd,Ze=(0,o.Z)(i,u),Ge=H.useRef(null),le=H.useRef(null);H.useImperativeHandle(p,function(){return{scrollTo:function(Be){Ge.current.scrollTo(Be)},getIndentWidth:function(){return le.current.offsetWidth}}});var Fe=H.useState(K),Qe=(0,ae.Z)(Fe,2),qe=Qe[0],st=Qe[1],nt=H.useState(e),Oe=(0,ae.Z)(nt,2),Le=Oe[0],We=Oe[1],Ie=H.useState(e),he=(0,ae.Z)(Ie,2),He=he[0],_e=he[1],Ve=H.useState([]),lt=(0,ae.Z)(Ve,2),gt=lt[0],dt=lt[1],yt=H.useState(null),ut=(0,ae.Z)(yt,2),et=ut[0],rt=ut[1],ft=H.useRef(e);ft.current=e;function vt(){var xe=ft.current;We(xe),_e(xe),dt([]),rt(null),Pe()}(0,g.Z)(function(){st(K);var xe=oe(qe,K);if(xe.key!==null)if(xe.add){var Be=Le.findIndex(function(ze){var pt=ze.key;return pt===xe.key}),Xe=Se(s(Le,e,xe.key),A,J,R),Je=Le.slice();Je.splice(Be+1,0,q),_e(Je),dt(Xe),rt("show")}else{var tt=e.findIndex(function(ze){var pt=ze.key;return pt===xe.key}),ot=Se(s(e,Le,xe.key),A,J,R),ht=e.slice();ht.splice(tt+1,0,q),_e(ht),dt(ot),rt("hide")}else Le!==e&&(We(e),_e(e))},[K,e]),H.useEffect(function(){m||vt()},[m]);var at=P?He:e,St={expandedKeys:K,selectedKeys:t,loadedKeys:n,loadingKeys:d,checkedKeys:a,halfCheckedKeys:l,dragOverNodeKey:b,dropPosition:E,keyEntities:y};return H.createElement(H.Fragment,null,ve&&te&&H.createElement("span",{style:I,"aria-live":"assertive"},Ue(te)),H.createElement("div",null,H.createElement("input",{style:I,disabled:G===!1||N,tabIndex:G!==!1?ie:null,onKeyDown:se,onFocus:de,onBlur:Ke,value:"",onChange:$,"aria-label":"for screen reader"})),H.createElement("div",{className:"".concat(S,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},H.createElement("div",{className:"".concat(S,"-indent")},H.createElement("div",{ref:le,className:"".concat(S,"-indent-unit")}))),H.createElement(O.Z,(0,Ce.Z)({},Ze,{data:at,itemKey:ye,height:J,fullHeight:!1,virtual:A,itemHeight:R,prefixCls:"".concat(S,"-list"),ref:Ge,onVisibleChange:function(Be,Xe){var Je=new Set(Be),tt=Xe.filter(function(ot){return!Je.has(ot)});tt.some(function(ot){return ye(ot)===j})&&vt()}}),function(xe){var Be=xe.pos,Xe=Object.assign({},(pe(xe.data),xe.data)),Je=xe.title,tt=xe.key,ot=xe.isStart,ht=xe.isEnd,ze=(0,C.km)(tt,Be);delete Xe.key,delete Xe.children;var pt=(0,C.H8)(ze,St);return H.createElement(z,(0,Ce.Z)({},Xe,pt,{title:Je,active:!!te&&tt===te.key,pos:Be,data:xe.data,isStart:ot,isEnd:ht,motion:P,motionNodes:tt===j?gt:null,motionType:et,onMotionStart:Te,onMotionEnd:vt,treeNodeRequiredProps:St,onMouseMove:function(){ne(null)}}))}))});je.displayName="NodeList";var Ye=je,ee=h(10225),Re=h(17341),Ae=h(35381),f=10,T=function(i){(0,Ne.Z)(S,i);var p=(0,Z.Z)(S);function S(){var e;(0,me.Z)(this,S);for(var v=arguments.length,D=new Array(v),K=0;K<v;K++)D[K]=arguments[K];return e=p.call.apply(p,[this].concat(D)),(0,x.Z)((0,B.Z)(e),"destroyed",!1),(0,x.Z)((0,B.Z)(e),"delayedDragEnterLogic",void 0),(0,x.Z)((0,B.Z)(e),"loadingRetryTimes",{}),(0,x.Z)((0,B.Z)(e),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,C.w$)()}),(0,x.Z)((0,B.Z)(e),"dragStartMousePosition",null),(0,x.Z)((0,B.Z)(e),"dragNode",void 0),(0,x.Z)((0,B.Z)(e),"currentMouseOverDroppableNodeKey",null),(0,x.Z)((0,B.Z)(e),"listRef",H.createRef()),(0,x.Z)((0,B.Z)(e),"onNodeDragStart",function(t,a){var n=e.state,d=n.expandedKeys,l=n.keyEntities,y=e.props.onDragStart,N=a.props.eventKey;e.dragNode=a,e.dragStartMousePosition={x:t.clientX,y:t.clientY};var m=(0,ee._5)(d,N);e.setState({draggingNodeKey:N,dragChildrenKeys:(0,ee.wA)(N,l),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(m),window.addEventListener("dragend",e.onWindowDragEnd),y==null||y({event:t,node:(0,C.F)(a.props)})}),(0,x.Z)((0,B.Z)(e),"onNodeDragEnter",function(t,a){var n=e.state,d=n.expandedKeys,l=n.keyEntities,y=n.dragChildrenKeys,N=n.flattenNodes,m=n.indent,b=e.props,E=b.onDragEnter,P=b.onExpand,J=b.allowDrop,R=b.direction,A=a.props,G=A.pos,te=A.eventKey,ve=(0,B.Z)(e),ie=ve.dragNode;if(e.currentMouseOverDroppableNodeKey!==te&&(e.currentMouseOverDroppableNodeKey=te),!ie){e.resetDragState();return}var se=(0,ee.OM)(t,ie,a,m,e.dragStartMousePosition,J,N,l,d,R),de=se.dropPosition,Ke=se.dropLevelOffset,ne=se.dropTargetKey,Te=se.dropContainerKey,Pe=se.dropTargetPos,Ze=se.dropAllowed,Ge=se.dragOverNodeKey;if(y.indexOf(ne)!==-1||!Ze){e.resetDragState();return}if(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach(function(le){clearTimeout(e.delayedDragEnterLogic[le])}),ie.props.eventKey!==a.props.eventKey&&(t.persist(),e.delayedDragEnterLogic[G]=window.setTimeout(function(){if(e.state.draggingNodeKey!==null){var le=(0,Ee.Z)(d),Fe=(0,Ae.Z)(l,a.props.eventKey);Fe&&(Fe.children||[]).length&&(le=(0,ee.L0)(d,a.props.eventKey)),"expandedKeys"in e.props||e.setExpandedKeys(le),P==null||P(le,{node:(0,C.F)(a.props),expanded:!0,nativeEvent:t.nativeEvent})}},800)),ie.props.eventKey===ne&&Ke===0){e.resetDragState();return}e.setState({dragOverNodeKey:Ge,dropPosition:de,dropLevelOffset:Ke,dropTargetKey:ne,dropContainerKey:Te,dropTargetPos:Pe,dropAllowed:Ze}),E==null||E({event:t,node:(0,C.F)(a.props),expandedKeys:d})}),(0,x.Z)((0,B.Z)(e),"onNodeDragOver",function(t,a){var n=e.state,d=n.dragChildrenKeys,l=n.flattenNodes,y=n.keyEntities,N=n.expandedKeys,m=n.indent,b=e.props,E=b.onDragOver,P=b.allowDrop,J=b.direction,R=(0,B.Z)(e),A=R.dragNode;if(A){var G=(0,ee.OM)(t,A,a,m,e.dragStartMousePosition,P,l,y,N,J),te=G.dropPosition,ve=G.dropLevelOffset,ie=G.dropTargetKey,se=G.dropContainerKey,de=G.dropAllowed,Ke=G.dropTargetPos,ne=G.dragOverNodeKey;d.indexOf(ie)!==-1||!de||(A.props.eventKey===ie&&ve===0?e.state.dropPosition===null&&e.state.dropLevelOffset===null&&e.state.dropTargetKey===null&&e.state.dropContainerKey===null&&e.state.dropTargetPos===null&&e.state.dropAllowed===!1&&e.state.dragOverNodeKey===null||e.resetDragState():te===e.state.dropPosition&&ve===e.state.dropLevelOffset&&ie===e.state.dropTargetKey&&se===e.state.dropContainerKey&&Ke===e.state.dropTargetPos&&de===e.state.dropAllowed&&ne===e.state.dragOverNodeKey||e.setState({dropPosition:te,dropLevelOffset:ve,dropTargetKey:ie,dropContainerKey:se,dropTargetPos:Ke,dropAllowed:de,dragOverNodeKey:ne}),E==null||E({event:t,node:(0,C.F)(a.props)}))}}),(0,x.Z)((0,B.Z)(e),"onNodeDragLeave",function(t,a){e.currentMouseOverDroppableNodeKey===a.props.eventKey&&!t.currentTarget.contains(t.relatedTarget)&&(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var n=e.props.onDragLeave;n==null||n({event:t,node:(0,C.F)(a.props)})}),(0,x.Z)((0,B.Z)(e),"onWindowDragEnd",function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)}),(0,x.Z)((0,B.Z)(e),"onNodeDragEnd",function(t,a){var n=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),n==null||n({event:t,node:(0,C.F)(a.props)}),e.dragNode=null,window.removeEventListener("dragend",e.onWindowDragEnd)}),(0,x.Z)((0,B.Z)(e),"onNodeDrop",function(t,a){var n,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,l=e.state,y=l.dragChildrenKeys,N=l.dropPosition,m=l.dropTargetKey,b=l.dropTargetPos,E=l.dropAllowed;if(E){var P=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),m!==null){var J=(0,Q.Z)((0,Q.Z)({},(0,C.H8)(m,e.getTreeNodeRequiredProps())),{},{active:((n=e.getActiveItem())===null||n===void 0?void 0:n.key)===m,data:(0,Ae.Z)(e.state.keyEntities,m).node}),R=y.indexOf(m)!==-1;(0,De.ZP)(!R,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var A=(0,ee.yx)(b),G={event:t,node:(0,C.F)(J),dragNode:e.dragNode?(0,C.F)(e.dragNode.props):null,dragNodesKeys:[e.dragNode.props.eventKey].concat(y),dropToGap:N!==0,dropPosition:N+Number(A[A.length-1])};d||P==null||P(G),e.dragNode=null}}}),(0,x.Z)((0,B.Z)(e),"cleanDragState",function(){var t=e.state.draggingNodeKey;t!==null&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null}),(0,x.Z)((0,B.Z)(e),"triggerExpandActionExpand",function(t,a){var n=e.state,d=n.expandedKeys,l=n.flattenNodes,y=a.expanded,N=a.key,m=a.isLeaf;if(!(m||t.shiftKey||t.metaKey||t.ctrlKey)){var b=l.filter(function(P){return P.key===N})[0],E=(0,C.F)((0,Q.Z)((0,Q.Z)({},(0,C.H8)(N,e.getTreeNodeRequiredProps())),{},{data:b.data}));e.setExpandedKeys(y?(0,ee._5)(d,N):(0,ee.L0)(d,N)),e.onNodeExpand(t,E)}}),(0,x.Z)((0,B.Z)(e),"onNodeClick",function(t,a){var n=e.props,d=n.onClick,l=n.expandAction;l==="click"&&e.triggerExpandActionExpand(t,a),d==null||d(t,a)}),(0,x.Z)((0,B.Z)(e),"onNodeDoubleClick",function(t,a){var n=e.props,d=n.onDoubleClick,l=n.expandAction;l==="doubleClick"&&e.triggerExpandActionExpand(t,a),d==null||d(t,a)}),(0,x.Z)((0,B.Z)(e),"onNodeSelect",function(t,a){var n=e.state.selectedKeys,d=e.state,l=d.keyEntities,y=d.fieldNames,N=e.props,m=N.onSelect,b=N.multiple,E=a.selected,P=a[y.key],J=!E;J?b?n=(0,ee.L0)(n,P):n=[P]:n=(0,ee._5)(n,P);var R=n.map(function(A){var G=(0,Ae.Z)(l,A);return G?G.node:null}).filter(function(A){return A});e.setUncontrolledState({selectedKeys:n}),m==null||m(n,{event:"select",selected:J,node:a,selectedNodes:R,nativeEvent:t.nativeEvent})}),(0,x.Z)((0,B.Z)(e),"onNodeCheck",function(t,a,n){var d=e.state,l=d.keyEntities,y=d.checkedKeys,N=d.halfCheckedKeys,m=e.props,b=m.checkStrictly,E=m.onCheck,P=a.key,J,R={event:"check",node:a,checked:n,nativeEvent:t.nativeEvent};if(b){var A=n?(0,ee.L0)(y,P):(0,ee._5)(y,P),G=(0,ee._5)(N,P);J={checked:A,halfChecked:G},R.checkedNodes=A.map(function(Ke){return(0,Ae.Z)(l,Ke)}).filter(function(Ke){return Ke}).map(function(Ke){return Ke.node}),e.setUncontrolledState({checkedKeys:A})}else{var te=(0,Re.S)([].concat((0,Ee.Z)(y),[P]),!0,l),ve=te.checkedKeys,ie=te.halfCheckedKeys;if(!n){var se=new Set(ve);se.delete(P);var de=(0,Re.S)(Array.from(se),{checked:!1,halfCheckedKeys:ie},l);ve=de.checkedKeys,ie=de.halfCheckedKeys}J=ve,R.checkedNodes=[],R.checkedNodesPositions=[],R.halfCheckedKeys=ie,ve.forEach(function(Ke){var ne=(0,Ae.Z)(l,Ke);if(ne){var Te=ne.node,Pe=ne.pos;R.checkedNodes.push(Te),R.checkedNodesPositions.push({node:Te,pos:Pe})}}),e.setUncontrolledState({checkedKeys:ve},!1,{halfCheckedKeys:ie})}E==null||E(J,R)}),(0,x.Z)((0,B.Z)(e),"onNodeLoad",function(t){var a,n=t.key,d=e.state.keyEntities,l=(0,Ae.Z)(d,n);if(!(l!=null&&(a=l.children)!==null&&a!==void 0&&a.length)){var y=new Promise(function(N,m){e.setState(function(b){var E=b.loadedKeys,P=E===void 0?[]:E,J=b.loadingKeys,R=J===void 0?[]:J,A=e.props,G=A.loadData,te=A.onLoad;if(!G||P.indexOf(n)!==-1||R.indexOf(n)!==-1)return null;var ve=G(t);return ve.then(function(){var ie=e.state.loadedKeys,se=(0,ee.L0)(ie,n);te==null||te(se,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:se}),e.setState(function(de){return{loadingKeys:(0,ee._5)(de.loadingKeys,n)}}),N()}).catch(function(ie){if(e.setState(function(de){return{loadingKeys:(0,ee._5)(de.loadingKeys,n)}}),e.loadingRetryTimes[n]=(e.loadingRetryTimes[n]||0)+1,e.loadingRetryTimes[n]>=f){var se=e.state.loadedKeys;(0,De.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:(0,ee.L0)(se,n)}),N()}m(ie)}),{loadingKeys:(0,ee.L0)(R,n)}})});return y.catch(function(){}),y}}),(0,x.Z)((0,B.Z)(e),"onNodeMouseEnter",function(t,a){var n=e.props.onMouseEnter;n==null||n({event:t,node:a})}),(0,x.Z)((0,B.Z)(e),"onNodeMouseLeave",function(t,a){var n=e.props.onMouseLeave;n==null||n({event:t,node:a})}),(0,x.Z)((0,B.Z)(e),"onNodeContextMenu",function(t,a){var n=e.props.onRightClick;n&&(t.preventDefault(),n({event:t,node:a}))}),(0,x.Z)((0,B.Z)(e),"onFocus",function(){var t=e.props.onFocus;e.setState({focused:!0});for(var a=arguments.length,n=new Array(a),d=0;d<a;d++)n[d]=arguments[d];t==null||t.apply(void 0,n)}),(0,x.Z)((0,B.Z)(e),"onBlur",function(){var t=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var a=arguments.length,n=new Array(a),d=0;d<a;d++)n[d]=arguments[d];t==null||t.apply(void 0,n)}),(0,x.Z)((0,B.Z)(e),"getTreeNodeRequiredProps",function(){var t=e.state,a=t.expandedKeys,n=t.selectedKeys,d=t.loadedKeys,l=t.loadingKeys,y=t.checkedKeys,N=t.halfCheckedKeys,m=t.dragOverNodeKey,b=t.dropPosition,E=t.keyEntities;return{expandedKeys:a||[],selectedKeys:n||[],loadedKeys:d||[],loadingKeys:l||[],checkedKeys:y||[],halfCheckedKeys:N||[],dragOverNodeKey:m,dropPosition:b,keyEntities:E}}),(0,x.Z)((0,B.Z)(e),"setExpandedKeys",function(t){var a=e.state,n=a.treeData,d=a.fieldNames,l=(0,C.oH)(n,t,d);e.setUncontrolledState({expandedKeys:t,flattenNodes:l},!0)}),(0,x.Z)((0,B.Z)(e),"onNodeExpand",function(t,a){var n=e.state.expandedKeys,d=e.state,l=d.listChanging,y=d.fieldNames,N=e.props,m=N.onExpand,b=N.loadData,E=a.expanded,P=a[y.key];if(!l){var J=n.indexOf(P),R=!E;if((0,De.ZP)(E&&J!==-1||!E&&J===-1,"Expand state not sync with index check"),R?n=(0,ee.L0)(n,P):n=(0,ee._5)(n,P),e.setExpandedKeys(n),m==null||m(n,{node:a,expanded:R,nativeEvent:t.nativeEvent}),R&&b){var A=e.onNodeLoad(a);A&&A.then(function(){var G=(0,C.oH)(e.state.treeData,n,y);e.setUncontrolledState({flattenNodes:G})}).catch(function(){var G=e.state.expandedKeys,te=(0,ee._5)(G,P);e.setExpandedKeys(te)})}}}),(0,x.Z)((0,B.Z)(e),"onListChangeStart",function(){e.setUncontrolledState({listChanging:!0})}),(0,x.Z)((0,B.Z)(e),"onListChangeEnd",function(){setTimeout(function(){e.setUncontrolledState({listChanging:!1})})}),(0,x.Z)((0,B.Z)(e),"onActiveChange",function(t){var a=e.state.activeKey,n=e.props,d=n.onActiveChange,l=n.itemScrollOffset,y=l===void 0?0:l;a!==t&&(e.setState({activeKey:t}),t!==null&&e.scrollTo({key:t,offset:y}),d==null||d(t))}),(0,x.Z)((0,B.Z)(e),"getActiveItem",function(){var t=e.state,a=t.activeKey,n=t.flattenNodes;return a===null?null:n.find(function(d){var l=d.key;return l===a})||null}),(0,x.Z)((0,B.Z)(e),"offsetActiveKey",function(t){var a=e.state,n=a.flattenNodes,d=a.activeKey,l=n.findIndex(function(m){var b=m.key;return b===d});l===-1&&t<0&&(l=n.length),l=(l+t+n.length)%n.length;var y=n[l];if(y){var N=y.key;e.onActiveChange(N)}else e.onActiveChange(null)}),(0,x.Z)((0,B.Z)(e),"onKeyDown",function(t){var a=e.state,n=a.activeKey,d=a.expandedKeys,l=a.checkedKeys,y=a.fieldNames,N=e.props,m=N.onKeyDown,b=N.checkable,E=N.selectable;switch(t.which){case F.Z.UP:{e.offsetActiveKey(-1),t.preventDefault();break}case F.Z.DOWN:{e.offsetActiveKey(1),t.preventDefault();break}}var P=e.getActiveItem();if(P&&P.data){var J=e.getTreeNodeRequiredProps(),R=P.data.isLeaf===!1||!!(P.data[y.children]||[]).length,A=(0,C.F)((0,Q.Z)((0,Q.Z)({},(0,C.H8)(n,J)),{},{data:P.data,active:!0}));switch(t.which){case F.Z.LEFT:{R&&d.includes(n)?e.onNodeExpand({},A):P.parent&&e.onActiveChange(P.parent.key),t.preventDefault();break}case F.Z.RIGHT:{R&&!d.includes(n)?e.onNodeExpand({},A):P.children&&P.children.length&&e.onActiveChange(P.children[0].key),t.preventDefault();break}case F.Z.ENTER:case F.Z.SPACE:{b&&!A.disabled&&A.checkable!==!1&&!A.disableCheckbox?e.onNodeCheck({},A,!l.includes(n)):!b&&E&&!A.disabled&&A.selectable!==!1&&e.onNodeSelect({},A);break}}}m==null||m(t)}),(0,x.Z)((0,B.Z)(e),"setUncontrolledState",function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!e.destroyed){var d=!1,l=!0,y={};Object.keys(t).forEach(function(N){if(N in e.props){l=!1;return}d=!0,y[N]=t[N]}),d&&(!a||l)&&e.setState((0,Q.Z)((0,Q.Z)({},y),n))}}),(0,x.Z)((0,B.Z)(e),"scrollTo",function(t){e.listRef.current.scrollTo(t)}),e}return(0,W.Z)(S,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var v=this.props,D=v.activeKey,K=v.itemScrollOffset,t=K===void 0?0:K;D!==void 0&&D!==this.state.activeKey&&(this.setState({activeKey:D}),D!==null&&this.scrollTo({key:D,offset:t}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var v=this.state,D=v.focused,K=v.flattenNodes,t=v.keyEntities,a=v.draggingNodeKey,n=v.activeKey,d=v.dropLevelOffset,l=v.dropContainerKey,y=v.dropTargetKey,N=v.dropPosition,m=v.dragOverNodeKey,b=v.indent,E=this.props,P=E.prefixCls,J=E.className,R=E.style,A=E.showLine,G=E.focusable,te=E.tabIndex,ve=te===void 0?0:te,ie=E.selectable,se=E.showIcon,de=E.icon,Ke=E.switcherIcon,ne=E.draggable,Te=E.checkable,Pe=E.checkStrictly,Ze=E.disabled,Ge=E.motion,le=E.loadData,Fe=E.filterTreeNode,Qe=E.height,qe=E.itemHeight,st=E.virtual,nt=E.titleRender,Oe=E.dropIndicatorRender,Le=E.onContextMenu,We=E.onScroll,Ie=E.direction,he=E.rootClassName,He=E.rootStyle,_e=(0,Me.Z)(this.props,{aria:!0,data:!0}),Ve;return ne&&((0,be.Z)(ne)==="object"?Ve=ne:typeof ne=="function"?Ve={nodeDraggable:ne}:Ve={}),H.createElement(ke.k.Provider,{value:{prefixCls:P,selectable:ie,showIcon:se,icon:de,switcherIcon:Ke,draggable:Ve,draggingNodeKey:a,checkable:Te,checkStrictly:Pe,disabled:Ze,keyEntities:t,dropLevelOffset:d,dropContainerKey:l,dropTargetKey:y,dropPosition:N,dragOverNodeKey:m,indent:b,direction:Ie,dropIndicatorRender:Oe,loadData:le,filterTreeNode:Fe,titleRender:nt,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},H.createElement("div",{role:"tree",className:c()(P,J,he,(0,x.Z)((0,x.Z)((0,x.Z)({},"".concat(P,"-show-line"),A),"".concat(P,"-focused"),D),"".concat(P,"-active-focused"),n!==null)),style:He},H.createElement(Ye,(0,Ce.Z)({ref:this.listRef,prefixCls:P,style:R,data:K,disabled:Ze,selectable:ie,checkable:!!Te,motion:Ge,dragging:a!==null,height:Qe,itemHeight:qe,virtual:st,focusable:G,focused:D,tabIndex:ve,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Le,onScroll:We},this.getTreeNodeRequiredProps(),_e))))}}],[{key:"getDerivedStateFromProps",value:function(v,D){var K=D.prevProps,t={prevProps:v};function a(te){return!K&&te in v||K&&K[te]!==v[te]}var n,d=D.fieldNames;if(a("fieldNames")&&(d=(0,C.w$)(v.fieldNames),t.fieldNames=d),a("treeData")?n=v.treeData:a("children")&&((0,De.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=(0,C.zn)(v.children)),n){t.treeData=n;var l=(0,C.I8)(n,{fieldNames:d});t.keyEntities=(0,Q.Z)((0,x.Z)({},j,ge),l.keyEntities)}var y=t.keyEntities||D.keyEntities;if(a("expandedKeys")||K&&a("autoExpandParent"))t.expandedKeys=v.autoExpandParent||!K&&v.defaultExpandParent?(0,ee.r7)(v.expandedKeys,y):v.expandedKeys;else if(!K&&v.defaultExpandAll){var N=(0,Q.Z)({},y);delete N[j],t.expandedKeys=Object.keys(N).map(function(te){return N[te].key})}else!K&&v.defaultExpandedKeys&&(t.expandedKeys=v.autoExpandParent||v.defaultExpandParent?(0,ee.r7)(v.defaultExpandedKeys,y):v.defaultExpandedKeys);if(t.expandedKeys||delete t.expandedKeys,n||t.expandedKeys){var m=(0,C.oH)(n||D.treeData,t.expandedKeys||D.expandedKeys,d);t.flattenNodes=m}if(v.selectable&&(a("selectedKeys")?t.selectedKeys=(0,ee.BT)(v.selectedKeys,v):!K&&v.defaultSelectedKeys&&(t.selectedKeys=(0,ee.BT)(v.defaultSelectedKeys,v))),v.checkable){var b;if(a("checkedKeys")?b=(0,ee.E6)(v.checkedKeys)||{}:!K&&v.defaultCheckedKeys?b=(0,ee.E6)(v.defaultCheckedKeys)||{}:n&&(b=(0,ee.E6)(v.checkedKeys)||{checkedKeys:D.checkedKeys,halfCheckedKeys:D.halfCheckedKeys}),b){var E=b,P=E.checkedKeys,J=P===void 0?[]:P,R=E.halfCheckedKeys,A=R===void 0?[]:R;if(!v.checkStrictly){var G=(0,Re.S)(J,!0,y);J=G.checkedKeys,A=G.halfCheckedKeys}t.checkedKeys=J,t.halfCheckedKeys=A}}return a("loadedKeys")&&(t.loadedKeys=v.loadedKeys),t}}]),S}(H.Component);(0,x.Z)(T,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:ue,allowDrop:function(){return!0},expandAction:!1}),(0,x.Z)(T,"TreeNode",L.Z);var k=T,M=k},10225:function(it,$e,h){h.d($e,{BT:function(){return H},E6:function(){return pe},L0:function(){return x},OM:function(){return De},_5:function(){return Z},r7:function(){return ae},wA:function(){return c},yx:function(){return Y}});var Ce=h(74902),be=h(71002),Q=h(80334),Ee=h(67294),me=h(86128),W=h(35381),B=h(1089),Ne=null;function Z(o,g){if(!o)return[];var O=o.slice(),w=O.indexOf(g);return w>=0&&O.splice(w,1),O}function x(o,g){var O=(o||[]).slice();return O.indexOf(g)===-1&&O.push(g),O}function Y(o){return o.split("-")}function c(o,g){var O=[],w=(0,W.Z)(g,o);function L(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];V.forEach(function(C){var _=C.key,r=C.children;O.push(_),L(r)})}return L(w.children),O}function F(o){if(o.parent){var g=Y(o.pos);return Number(g[g.length-1])===o.parent.children.length-1}return!1}function Me(o){var g=Y(o.pos);return Number(g[g.length-1])===0}function De(o,g,O,w,L,V,C,_,r,re){var z,oe=o.clientX,s=o.clientY,u=o.target.getBoundingClientRect(),I=u.top,$=u.height,j=(re==="rtl"?-1:1)*(((L==null?void 0:L.x)||0)-oe),fe=(j-12)/w,ge=r.filter(function(i){var p;return(p=_[i])===null||p===void 0||(p=p.children)===null||p===void 0?void 0:p.length}),q=(0,W.Z)(_,O.props.eventKey);if(s<I+$/2){var Se=C.findIndex(function(i){return i.key===q.key}),ye=Se<=0?0:Se-1,Ue=C[ye].key;q=(0,W.Z)(_,Ue)}var je=q.key,Ye=q,ee=q.key,Re=0,Ae=0;if(!ge.includes(je))for(var f=0;f<fe&&F(q);f+=1)q=q.parent,Ae+=1;var T=g.props.data,k=q.node,M=!0;return Me(q)&&q.level===0&&s<I+$/2&&V({dragNode:T,dropNode:k,dropPosition:-1})&&q.key===O.props.eventKey?Re=-1:(Ye.children||[]).length&&ge.includes(ee)?V({dragNode:T,dropNode:k,dropPosition:0})?Re=0:M=!1:Ae===0?fe>-1.5?V({dragNode:T,dropNode:k,dropPosition:1})?Re=1:M=!1:V({dragNode:T,dropNode:k,dropPosition:0})?Re=0:V({dragNode:T,dropNode:k,dropPosition:1})?Re=1:M=!1:V({dragNode:T,dropNode:k,dropPosition:1})?Re=1:M=!1,{dropPosition:Re,dropLevelOffset:Ae,dropTargetKey:q.key,dropTargetPos:q.pos,dragOverNodeKey:ee,dropContainerKey:Re===0?null:((z=q.parent)===null||z===void 0?void 0:z.key)||null,dropAllowed:M}}function H(o,g){if(o){var O=g.multiple;return O?o.slice():o.length?[o[0]]:o}}var ke=function(g){return g};function ue(o,g){if(!o)return[];var O=g||{},w=O.processProps,L=w===void 0?ke:w,V=Array.isArray(o)?o:[o];return V.map(function(C){var _=C.children,r=_objectWithoutProperties(C,Ne),re=ue(_,g);return React.createElement(TreeNode,_extends({key:r.key},L(r)),re)})}function pe(o){if(!o)return null;var g;if(Array.isArray(o))g={checkedKeys:o,halfCheckedKeys:void 0};else if((0,be.Z)(o)==="object")g={checkedKeys:o.checked||void 0,halfCheckedKeys:o.halfChecked||void 0};else return(0,Q.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return g}function ae(o,g){var O=new Set;function w(L){if(!O.has(L)){var V=(0,W.Z)(g,L);if(V){O.add(L);var C=V.parent,_=V.node;_.disabled||C&&w(C.key)}}}return(o||[]).forEach(function(L){w(L)}),(0,Ce.Z)(O)}},17341:function(it,$e,h){h.d($e,{S:function(){return B}});var Ce=h(80334),be=h(35381);function Q(Ne,Z){var x=new Set;return Ne.forEach(function(Y){Z.has(Y)||x.add(Y)}),x}function Ee(Ne){var Z=Ne||{},x=Z.disabled,Y=Z.disableCheckbox,c=Z.checkable;return!!(x||Y)||c===!1}function me(Ne,Z,x,Y){for(var c=new Set(Ne),F=new Set,Me=0;Me<=x;Me+=1){var De=Z.get(Me)||new Set;De.forEach(function(pe){var ae=pe.key,o=pe.node,g=pe.children,O=g===void 0?[]:g;c.has(ae)&&!Y(o)&&O.filter(function(w){return!Y(w.node)}).forEach(function(w){c.add(w.key)})})}for(var H=new Set,ke=x;ke>=0;ke-=1){var ue=Z.get(ke)||new Set;ue.forEach(function(pe){var ae=pe.parent,o=pe.node;if(!(Y(o)||!pe.parent||H.has(pe.parent.key))){if(Y(pe.parent.node)){H.add(ae.key);return}var g=!0,O=!1;(ae.children||[]).filter(function(w){return!Y(w.node)}).forEach(function(w){var L=w.key,V=c.has(L);g&&!V&&(g=!1),!O&&(V||F.has(L))&&(O=!0)}),g&&c.add(ae.key),O&&F.add(ae.key),H.add(ae.key)}})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(Q(F,c))}}function W(Ne,Z,x,Y,c){for(var F=new Set(Ne),Me=new Set(Z),De=0;De<=Y;De+=1){var H=x.get(De)||new Set;H.forEach(function(ae){var o=ae.key,g=ae.node,O=ae.children,w=O===void 0?[]:O;!F.has(o)&&!Me.has(o)&&!c(g)&&w.filter(function(L){return!c(L.node)}).forEach(function(L){F.delete(L.key)})})}Me=new Set;for(var ke=new Set,ue=Y;ue>=0;ue-=1){var pe=x.get(ue)||new Set;pe.forEach(function(ae){var o=ae.parent,g=ae.node;if(!(c(g)||!ae.parent||ke.has(ae.parent.key))){if(c(ae.parent.node)){ke.add(o.key);return}var O=!0,w=!1;(o.children||[]).filter(function(L){return!c(L.node)}).forEach(function(L){var V=L.key,C=F.has(V);O&&!C&&(O=!1),!w&&(C||Me.has(V))&&(w=!0)}),O||F.delete(o.key),w&&Me.add(o.key),ke.add(o.key)}})}return{checkedKeys:Array.from(F),halfCheckedKeys:Array.from(Q(Me,F))}}function B(Ne,Z,x,Y){var c=[],F;Y?F=Y:F=Ee;var Me=new Set(Ne.filter(function(ue){var pe=!!(0,be.Z)(x,ue);return pe||c.push(ue),pe})),De=new Map,H=0;Object.keys(x).forEach(function(ue){var pe=x[ue],ae=pe.level,o=De.get(ae);o||(o=new Set,De.set(ae,o)),o.add(pe),H=Math.max(H,ae)}),(0,Ce.ZP)(!c.length,"Tree missing follow keys: ".concat(c.slice(0,100).map(function(ue){return"'".concat(ue,"'")}).join(", ")));var ke;return Z===!0?ke=me(Me,De,H,F):ke=W(Me,Z.halfCheckedKeys,De,H,F),ke}},35381:function(it,$e,h){h.d($e,{Z:function(){return Ce}});function Ce(be,Q){return be[Q]}},1089:function(it,$e,h){h.d($e,{F:function(){return ae},H8:function(){return pe},I8:function(){return ue},km:function(){return c},oH:function(){return H},w$:function(){return F},zn:function(){return De}});var Ce=h(71002),be=h(74902),Q=h(1413),Ee=h(91),me=h(50344),W=h(98423),B=h(80334),Ne=h(35381),Z=["children"];function x(o,g){return"".concat(o,"-").concat(g)}function Y(o){return o&&o.type&&o.type.isTreeNode}function c(o,g){return o!=null?o:g}function F(o){var g=o||{},O=g.title,w=g._title,L=g.key,V=g.children,C=O||"title";return{title:C,_title:w||[C],key:L||"key",children:V||"children"}}function Me(o,g){var O=new Map;function w(L){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(L||[]).forEach(function(C){var _=C[g.key],r=C[g.children];warning(_!=null,"Tree node must have a certain key: [".concat(V).concat(_,"]"));var re=String(_);warning(!O.has(re)||_===null||_===void 0,"Same 'key' exist in the Tree: ".concat(re)),O.set(re,!0),w(r,"".concat(V).concat(re," > "))})}w(o)}function De(o){function g(O){var w=(0,me.Z)(O);return w.map(function(L){if(!Y(L))return(0,B.ZP)(!L,"Tree/TreeNode can only accept TreeNode as children."),null;var V=L.key,C=L.props,_=C.children,r=(0,Ee.Z)(C,Z),re=(0,Q.Z)({key:V},r),z=g(_);return z.length&&(re.children=z),re}).filter(function(L){return L})}return g(o)}function H(o,g,O){var w=F(O),L=w._title,V=w.key,C=w.children,_=new Set(g===!0?[]:g),r=[];function re(z){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return z.map(function(s,u){for(var I=x(oe?oe.pos:"0",u),$=c(s[V],I),j,fe=0;fe<L.length;fe+=1){var ge=L[fe];if(s[ge]!==void 0){j=s[ge];break}}var q=(0,Q.Z)((0,Q.Z)({},(0,W.Z)(s,[].concat((0,be.Z)(L),[V,C]))),{},{title:j,key:$,parent:oe,pos:I,children:null,data:s,isStart:[].concat((0,be.Z)(oe?oe.isStart:[]),[u===0]),isEnd:[].concat((0,be.Z)(oe?oe.isEnd:[]),[u===z.length-1])});return r.push(q),g===!0||_.has($)?q.children=re(s[C]||[],q):q.children=[],q})}return re(o),r}function ke(o,g,O){var w={};(0,Ce.Z)(O)==="object"?w=O:w={externalGetKey:O},w=w||{};var L=w,V=L.childrenPropName,C=L.externalGetKey,_=L.fieldNames,r=F(_),re=r.key,z=r.children,oe=V||z,s;C?typeof C=="string"?s=function($){return $[C]}:typeof C=="function"&&(s=function($){return C($)}):s=function($,j){return c($[re],j)};function u(I,$,j,fe){var ge=I?I[oe]:o,q=I?x(j.pos,$):"0",Se=I?[].concat((0,be.Z)(fe),[I]):[];if(I){var ye=s(I,q),Ue={node:I,index:$,pos:q,key:ye,parentPos:j.node?j.pos:null,level:j.level+1,nodes:Se};g(Ue)}ge&&ge.forEach(function(je,Ye){u(je,Ye,{node:I,pos:q,level:j?j.level+1:-1},Se)})}u(null)}function ue(o){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=g.initWrapper,w=g.processEntity,L=g.onProcessFinished,V=g.externalGetKey,C=g.childrenPropName,_=g.fieldNames,r=arguments.length>2?arguments[2]:void 0,re=V||r,z={},oe={},s={posEntities:z,keyEntities:oe};return O&&(s=O(s)||s),ke(o,function(u){var I=u.node,$=u.index,j=u.pos,fe=u.key,ge=u.parentPos,q=u.level,Se=u.nodes,ye={node:I,nodes:Se,index:$,key:fe,pos:j,level:q},Ue=c(fe,j);z[j]=ye,oe[Ue]=ye,ye.parent=z[ge],ye.parent&&(ye.parent.children=ye.parent.children||[],ye.parent.children.push(ye)),w&&w(ye,s)},{externalGetKey:re,childrenPropName:C,fieldNames:_}),L&&L(s),s}function pe(o,g){var O=g.expandedKeys,w=g.selectedKeys,L=g.loadedKeys,V=g.loadingKeys,C=g.checkedKeys,_=g.halfCheckedKeys,r=g.dragOverNodeKey,re=g.dropPosition,z=g.keyEntities,oe=(0,Ne.Z)(z,o),s={eventKey:o,expanded:O.indexOf(o)!==-1,selected:w.indexOf(o)!==-1,loaded:L.indexOf(o)!==-1,loading:V.indexOf(o)!==-1,checked:C.indexOf(o)!==-1,halfChecked:_.indexOf(o)!==-1,pos:String(oe?oe.pos:""),dragOver:r===o&&re===0,dragOverGapTop:r===o&&re===-1,dragOverGapBottom:r===o&&re===1};return s}function ae(o){var g=o.data,O=o.expanded,w=o.selected,L=o.checked,V=o.loaded,C=o.loading,_=o.halfChecked,r=o.dragOver,re=o.dragOverGapTop,z=o.dragOverGapBottom,oe=o.pos,s=o.active,u=o.eventKey,I=(0,Q.Z)((0,Q.Z)({},g),{},{expanded:O,selected:w,checked:L,loaded:V,loading:C,halfChecked:_,dragOver:r,dragOverGapTop:re,dragOverGapBottom:z,pos:oe,active:s,key:u});return"props"in I||Object.defineProperty(I,"props",{get:function(){return(0,B.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),I}},64217:function(it,$e,h){h.d($e,{Z:function(){return Ne}});var Ce=h(1413),be=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,Q=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Ee="".concat(be," ").concat(Q).split(/[\s\n]+/),me="aria-",W="data-";function B(Z,x){return Z.indexOf(x)===0}function Ne(Z){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Y;x===!1?Y={aria:!0,data:!0,attr:!0}:x===!0?Y={aria:!0}:Y=(0,Ce.Z)({},x);var c={};return Object.keys(Z).forEach(function(F){(Y.aria&&(F==="role"||B(F,me))||Y.data&&B(F,W)||Y.attr&&Ee.includes(F))&&(c[F]=Z[F])}),c}},85344:function(it,$e,h){h.d($e,{Z:function(){return Ae}});var Ce=h(87462),be=h(71002),Q=h(1413),Ee=h(4942),me=h(97685),W=h(91),B=h(93967),Ne=h.n(B),Z=h(48555),x=h(56790),Y=h(8410),c=h(67294),F=h(73935),Me=c.forwardRef(function(f,T){var k=f.height,M=f.offsetY,i=f.offsetX,p=f.children,S=f.prefixCls,e=f.onInnerResize,v=f.innerProps,D=f.rtl,K=f.extra,t={},a={display:"flex",flexDirection:"column"};return M!==void 0&&(t={height:k,position:"relative",overflow:"hidden"},a=(0,Q.Z)((0,Q.Z)({},a),{},(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({transform:"translateY(".concat(M,"px)")},D?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),c.createElement("div",{style:t},c.createElement(Z.Z,{onResize:function(d){var l=d.offsetHeight;l&&e&&e()}},c.createElement("div",(0,Ce.Z)({style:a,className:Ne()((0,Ee.Z)({},"".concat(S,"-holder-inner"),S)),ref:T},v),p,K)))});Me.displayName="Filler";var De=Me;function H(f){var T=f.children,k=f.setRef,M=c.useCallback(function(i){k(i)},[]);return c.cloneElement(T,{ref:M})}function ke(f,T,k,M,i,p,S,e){var v=e.getKey;return f.slice(T,k+1).map(function(D,K){var t=T+K,a=S(D,t,{style:{width:M},offsetX:i}),n=v(D);return c.createElement(H,{key:n,setRef:function(l){return p(D,l)}},a)})}function ue(f,T,k,M){var i=k-f,p=T-k,S=Math.min(i,p)*2;if(M<=S){var e=Math.floor(M/2);return M%2?k+e+1:k-e}return i>p?k-(M-p):k+(M-i)}function pe(f,T,k){var M=f.length,i=T.length,p,S;if(M===0&&i===0)return null;M<i?(p=f,S=T):(p=T,S=f);var e={__EMPTY_ITEM__:!0};function v(d){return d!==void 0?k(d):e}for(var D=null,K=Math.abs(M-i)!==1,t=0;t<S.length;t+=1){var a=v(p[t]),n=v(S[t]);if(a!==n){D=t,K=K||a!==v(S[t+1]);break}}return D===null?null:{index:D,multiple:K}}function ae(f,T,k){var M=c.useState(f),i=(0,me.Z)(M,2),p=i[0],S=i[1],e=c.useState(null),v=(0,me.Z)(e,2),D=v[0],K=v[1];return c.useEffect(function(){var t=pe(p||[],f||[],T);(t==null?void 0:t.index)!==void 0&&(k==null||k(t.index),K(f[t.index])),S(f)},[f]),[D]}var o=h(75164),g=(typeof navigator=="undefined"?"undefined":(0,be.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),O=g,w=function(f,T,k,M){var i=(0,c.useRef)(!1),p=(0,c.useRef)(null);function S(){clearTimeout(p.current),i.current=!0,p.current=setTimeout(function(){i.current=!1},50)}var e=(0,c.useRef)({top:f,bottom:T,left:k,right:M});return e.current.top=f,e.current.bottom=T,e.current.left=k,e.current.right=M,function(v,D){var K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=v?D<0&&e.current.left||D>0&&e.current.right:D<0&&e.current.top||D>0&&e.current.bottom;return K&&t?(clearTimeout(p.current),i.current=!1):(!t||i.current)&&S(),!i.current&&t}};function L(f,T,k,M,i,p,S){var e=(0,c.useRef)(0),v=(0,c.useRef)(null),D=(0,c.useRef)(null),K=(0,c.useRef)(!1),t=w(T,k,M,i);function a(m,b){o.Z.cancel(v.current),e.current+=b,D.current=b,!t(!1,b)&&(O||m.preventDefault(),v.current=(0,o.Z)(function(){var E=K.current?10:1;S(e.current*E),e.current=0}))}function n(m,b){S(b,!0),O||m.preventDefault()}var d=(0,c.useRef)(null),l=(0,c.useRef)(null);function y(m){if(f){o.Z.cancel(l.current),l.current=(0,o.Z)(function(){d.current=null},2);var b=m.deltaX,E=m.deltaY,P=m.shiftKey,J=b,R=E;(d.current==="sx"||!d.current&&P&&E&&!b)&&(J=E,R=0,d.current="sx");var A=Math.abs(J),G=Math.abs(R);d.current===null&&(d.current=p&&A>G?"x":"y"),d.current==="y"?a(m,R):n(m,J)}}function N(m){f&&(K.current=m.detail===D.current)}return[y,N]}function V(f,T,k,M){var i=c.useMemo(function(){return[new Map,[]]},[f,k.id,M]),p=(0,me.Z)(i,2),S=p[0],e=p[1],v=function(K){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K,a=S.get(K),n=S.get(t);if(a===void 0||n===void 0)for(var d=f.length,l=e.length;l<d;l+=1){var y,N=f[l],m=T(N);S.set(m,l);var b=(y=k.get(m))!==null&&y!==void 0?y:M;if(e[l]=(e[l-1]||0)+b,m===K&&(a=l),m===t&&(n=l),a!==void 0&&n!==void 0)break}return{top:e[a-1]||0,bottom:e[n]}};return v}var C=h(34203),_=h(15671),r=h(43144),re=function(){function f(){(0,_.Z)(this,f),(0,Ee.Z)(this,"maps",void 0),(0,Ee.Z)(this,"id",0),this.maps=Object.create(null)}return(0,r.Z)(f,[{key:"set",value:function(k,M){this.maps[k]=M,this.id+=1}},{key:"get",value:function(k){return this.maps[k]}}]),f}(),z=re;function oe(f,T,k){var M=c.useState(0),i=(0,me.Z)(M,2),p=i[0],S=i[1],e=(0,c.useRef)(new Map),v=(0,c.useRef)(new z),D=(0,c.useRef)();function K(){o.Z.cancel(D.current)}function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;K();var d=function(){e.current.forEach(function(y,N){if(y&&y.offsetParent){var m=(0,C.ZP)(y),b=m.offsetHeight;v.current.get(N)!==b&&v.current.set(N,m.offsetHeight)}}),S(function(y){return y+1})};n?d():D.current=(0,o.Z)(d)}function a(n,d){var l=f(n),y=e.current.get(l);d?(e.current.set(l,d),t()):e.current.delete(l),!y!=!d&&(d?T==null||T(n):k==null||k(n))}return(0,c.useEffect)(function(){return K},[]),[a,t,v.current,p]}var s=14/15;function u(f,T,k){var M=(0,c.useRef)(!1),i=(0,c.useRef)(0),p=(0,c.useRef)(0),S=(0,c.useRef)(null),e=(0,c.useRef)(null),v,D=function(n){if(M.current){var d=Math.ceil(n.touches[0].pageX),l=Math.ceil(n.touches[0].pageY),y=i.current-d,N=p.current-l,m=Math.abs(y)>Math.abs(N);m?i.current=d:p.current=l,k(m,m?y:N)&&n.preventDefault(),clearInterval(e.current),e.current=setInterval(function(){m?y*=s:N*=s;var b=Math.floor(m?y:N);(!k(m,b,!0)||Math.abs(b)<=.1)&&clearInterval(e.current)},16)}},K=function(){M.current=!1,v()},t=function(n){v(),n.touches.length===1&&!M.current&&(M.current=!0,i.current=Math.ceil(n.touches[0].pageX),p.current=Math.ceil(n.touches[0].pageY),S.current=n.target,S.current.addEventListener("touchmove",D),S.current.addEventListener("touchend",K))};v=function(){S.current&&(S.current.removeEventListener("touchmove",D),S.current.removeEventListener("touchend",K))},(0,Y.Z)(function(){return f&&T.current.addEventListener("touchstart",t),function(){var a;(a=T.current)===null||a===void 0||a.removeEventListener("touchstart",t),v(),clearInterval(e.current)}},[f])}var I=10;function $(f,T,k,M,i,p,S,e){var v=c.useRef(),D=c.useState(null),K=(0,me.Z)(D,2),t=K[0],a=K[1];return(0,Y.Z)(function(){if(t&&t.times<I){if(!f.current){a(function(Ze){return(0,Q.Z)({},Ze)});return}p();var n=t.targetAlign,d=t.originAlign,l=t.index,y=t.offset,N=f.current.clientHeight,m=!1,b=n,E=null;if(N){for(var P=n||d,J=0,R=0,A=0,G=Math.min(T.length-1,l),te=0;te<=G;te+=1){var ve=i(T[te]);R=J;var ie=k.get(ve);A=R+(ie===void 0?M:ie),J=A}for(var se=P==="top"?y:N-y,de=G;de>=0;de-=1){var Ke=i(T[de]),ne=k.get(Ke);if(ne===void 0){m=!0;break}if(se-=ne,se<=0)break}switch(P){case"top":E=R-y;break;case"bottom":E=A-N+y;break;default:{var Te=f.current.scrollTop,Pe=Te+N;R<Te?b="top":A>Pe&&(b="bottom")}}E!==null&&S(E),E!==t.lastTop&&(m=!0)}m&&a((0,Q.Z)((0,Q.Z)({},t),{},{times:t.times+1,targetAlign:b,lastTop:E}))}},[t,f.current]),function(n){if(n==null){e();return}if(o.Z.cancel(v.current),typeof n=="number")S(n);else if(n&&(0,be.Z)(n)==="object"){var d,l=n.align;"index"in n?d=n.index:d=T.findIndex(function(m){return i(m)===n.key});var y=n.offset,N=y===void 0?0:y;a({times:0,index:d,offset:N,originAlign:l})}}}function j(f,T){var k="touches"in f?f.touches[0]:f;return k[T?"pageX":"pageY"]}var fe=c.forwardRef(function(f,T){var k=f.prefixCls,M=f.rtl,i=f.scrollOffset,p=f.scrollRange,S=f.onStartMove,e=f.onStopMove,v=f.onScroll,D=f.horizontal,K=f.spinSize,t=f.containerSize,a=f.style,n=f.thumbStyle,d=c.useState(!1),l=(0,me.Z)(d,2),y=l[0],N=l[1],m=c.useState(null),b=(0,me.Z)(m,2),E=b[0],P=b[1],J=c.useState(null),R=(0,me.Z)(J,2),A=R[0],G=R[1],te=!M,ve=c.useRef(),ie=c.useRef(),se=c.useState(!1),de=(0,me.Z)(se,2),Ke=de[0],ne=de[1],Te=c.useRef(),Pe=function(){clearTimeout(Te.current),ne(!0),Te.current=setTimeout(function(){ne(!1)},3e3)},Ze=p-t||0,Ge=t-K||0,le=c.useMemo(function(){if(i===0||Ze===0)return 0;var Ie=i/Ze;return Ie*Ge},[i,Ze,Ge]),Fe=function(he){he.stopPropagation(),he.preventDefault()},Qe=c.useRef({top:le,dragging:y,pageY:E,startTop:A});Qe.current={top:le,dragging:y,pageY:E,startTop:A};var qe=function(he){N(!0),P(j(he,D)),G(Qe.current.top),S(),he.stopPropagation(),he.preventDefault()};c.useEffect(function(){var Ie=function(Ve){Ve.preventDefault()},he=ve.current,He=ie.current;return he.addEventListener("touchstart",Ie),He.addEventListener("touchstart",qe),function(){he.removeEventListener("touchstart",Ie),He.removeEventListener("touchstart",qe)}},[]);var st=c.useRef();st.current=Ze;var nt=c.useRef();nt.current=Ge,c.useEffect(function(){if(y){var Ie,he=function(Ve){var lt=Qe.current,gt=lt.dragging,dt=lt.pageY,yt=lt.startTop;if(o.Z.cancel(Ie),gt){var ut=j(Ve,D)-dt,et=yt;!te&&D?et-=ut:et+=ut;var rt=st.current,ft=nt.current,vt=ft?et/ft:0,at=Math.ceil(vt*rt);at=Math.max(at,0),at=Math.min(at,rt),Ie=(0,o.Z)(function(){v(at,D)})}},He=function(){N(!1),e()};return window.addEventListener("mousemove",he),window.addEventListener("touchmove",he),window.addEventListener("mouseup",He),window.addEventListener("touchend",He),function(){window.removeEventListener("mousemove",he),window.removeEventListener("touchmove",he),window.removeEventListener("mouseup",He),window.removeEventListener("touchend",He),o.Z.cancel(Ie)}}},[y]),c.useEffect(function(){Pe()},[i]),c.useImperativeHandle(T,function(){return{delayHidden:Pe}});var Oe="".concat(k,"-scrollbar"),Le={position:"absolute",visibility:Ke?null:"hidden"},We={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return D?(Le.height=8,Le.left=0,Le.right=0,Le.bottom=0,We.height="100%",We.width=K,te?We.left=le:We.right=le):(Le.width=8,Le.top=0,Le.bottom=0,te?Le.right=0:Le.left=0,We.width="100%",We.height=K,We.top=le),c.createElement("div",{ref:ve,className:Ne()(Oe,(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({},"".concat(Oe,"-horizontal"),D),"".concat(Oe,"-vertical"),!D),"".concat(Oe,"-visible"),Ke)),style:(0,Q.Z)((0,Q.Z)({},Le),a),onMouseDown:Fe,onMouseMove:Pe},c.createElement("div",{ref:ie,className:Ne()("".concat(Oe,"-thumb"),(0,Ee.Z)({},"".concat(Oe,"-thumb-moving"),y)),style:(0,Q.Z)((0,Q.Z)({},We),n),onMouseDown:qe}))}),ge=fe,q=20;function Se(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=f/T*f;return isNaN(k)&&(k=0),k=Math.max(k,q),Math.floor(k)}var ye=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Ue=[],je={overflowY:"auto",overflowAnchor:"none"};function Ye(f,T){var k=f.prefixCls,M=k===void 0?"rc-virtual-list":k,i=f.className,p=f.height,S=f.itemHeight,e=f.fullHeight,v=e===void 0?!0:e,D=f.style,K=f.data,t=f.children,a=f.itemKey,n=f.virtual,d=f.direction,l=f.scrollWidth,y=f.component,N=y===void 0?"div":y,m=f.onScroll,b=f.onVirtualScroll,E=f.onVisibleChange,P=f.innerProps,J=f.extraRender,R=f.styles,A=(0,W.Z)(f,ye),G=c.useCallback(function(X){return typeof a=="function"?a(X):X==null?void 0:X[a]},[a]),te=oe(G,null,null),ve=(0,me.Z)(te,4),ie=ve[0],se=ve[1],de=ve[2],Ke=ve[3],ne=!!(n!==!1&&p&&S),Te=c.useMemo(function(){return Object.values(de.maps).reduce(function(X,U){return X+U},0)},[de.id,de.maps]),Pe=ne&&K&&(Math.max(S*K.length,Te)>p||!!l),Ze=d==="rtl",Ge=Ne()(M,(0,Ee.Z)({},"".concat(M,"-rtl"),Ze),i),le=K||Ue,Fe=(0,c.useRef)(),Qe=(0,c.useRef)(),qe=(0,c.useRef)(),st=(0,c.useState)(0),nt=(0,me.Z)(st,2),Oe=nt[0],Le=nt[1],We=(0,c.useState)(0),Ie=(0,me.Z)(We,2),he=Ie[0],He=Ie[1],_e=(0,c.useState)(!1),Ve=(0,me.Z)(_e,2),lt=Ve[0],gt=Ve[1],dt=function(){gt(!0)},yt=function(){gt(!1)},ut={getKey:G};function et(X){Le(function(U){var ce;typeof X=="function"?ce=X(U):ce=X;var we=jt(ce);return Fe.current.scrollTop=we,we})}var rt=(0,c.useRef)({start:0,end:le.length}),ft=(0,c.useRef)(),vt=ae(le,G),at=(0,me.Z)(vt,1),St=at[0];ft.current=St;var xe=c.useMemo(function(){if(!ne)return{scrollHeight:void 0,start:0,end:le.length-1,offset:void 0};if(!Pe){var X;return{scrollHeight:((X=Qe.current)===null||X===void 0?void 0:X.offsetHeight)||0,start:0,end:le.length-1,offset:void 0}}for(var U=0,ce,we,ct,qt=le.length,Et=0;Et<qt;Et+=1){var en=le[Et],tn=G(en),Wt=de.get(tn),bt=U+(Wt===void 0?S:Wt);bt>=Oe&&ce===void 0&&(ce=Et,we=U),bt>Oe+p&&ct===void 0&&(ct=Et),U=bt}return ce===void 0&&(ce=0,we=0,ct=Math.ceil(p/S)),ct===void 0&&(ct=le.length-1),ct=Math.min(ct+1,le.length-1),{scrollHeight:U,start:ce,end:ct,offset:we}},[Pe,ne,Oe,le,Ke,p]),Be=xe.scrollHeight,Xe=xe.start,Je=xe.end,tt=xe.offset;rt.current.start=Xe,rt.current.end=Je;var ot=c.useState({width:0,height:p}),ht=(0,me.Z)(ot,2),ze=ht[0],pt=ht[1],Mt=function(U){pt({width:U.width||U.offsetWidth,height:U.height||U.offsetHeight})},Pt=(0,c.useRef)(),Rt=(0,c.useRef)(),Bt=c.useMemo(function(){return Se(ze.width,l)},[ze.width,l]),zt=c.useMemo(function(){return Se(ze.height,Be)},[ze.height,Be]),Zt=Be-p,xt=(0,c.useRef)(Zt);xt.current=Zt;function jt(X){var U=X;return Number.isNaN(xt.current)||(U=Math.min(U,xt.current)),U=Math.max(U,0),U}var Tt=Oe<=0,Ot=Oe>=Zt,Lt=he<=0,It=he>=l,Gt=w(Tt,Ot,Lt,It),Ct=function(){return{x:Ze?-he:he,y:Oe}},Nt=(0,c.useRef)(Ct()),Kt=(0,x.zX)(function(X){if(b){var U=(0,Q.Z)((0,Q.Z)({},Ct()),X);(Nt.current.x!==U.x||Nt.current.y!==U.y)&&(b(U),Nt.current=U)}});function wt(X,U){var ce=X;U?((0,F.flushSync)(function(){He(ce)}),Kt()):et(ce)}function Yt(X){var U=X.currentTarget.scrollTop;U!==Oe&&et(U),m==null||m(X),Kt()}var Dt=function(U){var ce=U,we=l?l-ze.width:0;return ce=Math.max(ce,0),ce=Math.min(ce,we),ce},Vt=(0,x.zX)(function(X,U){U?((0,F.flushSync)(function(){He(function(ce){var we=ce+(Ze?-X:X);return Dt(we)})}),Kt()):et(function(ce){var we=ce+X;return we})}),Xt=L(ne,Tt,Ot,Lt,It,!!l,Vt),$t=(0,me.Z)(Xt,2),kt=$t[0],At=$t[1];u(ne,Fe,function(X,U,ce){return Gt(X,U,ce)?!1:(kt({preventDefault:function(){},deltaX:X?U:0,deltaY:X?0:U}),!0)}),(0,Y.Z)(function(){function X(ce){ne&&ce.preventDefault()}var U=Fe.current;return U.addEventListener("wheel",kt),U.addEventListener("DOMMouseScroll",At),U.addEventListener("MozMousePixelScroll",X),function(){U.removeEventListener("wheel",kt),U.removeEventListener("DOMMouseScroll",At),U.removeEventListener("MozMousePixelScroll",X)}},[ne]),(0,Y.Z)(function(){if(l){var X=Dt(he);He(X),Kt({x:X})}},[ze.width,l]);var Ft=function(){var U,ce;(U=Pt.current)===null||U===void 0||U.delayHidden(),(ce=Rt.current)===null||ce===void 0||ce.delayHidden()},Ht=$(Fe,le,de,S,G,function(){return se(!0)},et,Ft);c.useImperativeHandle(T,function(){return{nativeElement:qe.current,getScrollInfo:Ct,scrollTo:function(U){function ce(we){return we&&(0,be.Z)(we)==="object"&&("left"in we||"top"in we)}ce(U)?(U.left!==void 0&&He(Dt(U.left)),Ht(U.top)):Ht(U)}}}),(0,Y.Z)(function(){if(E){var X=le.slice(Xe,Je+1);E(X,le)}},[Xe,Je,le]);var Jt=V(le,G,de,S),Qt=J==null?void 0:J({start:Xe,end:Je,virtual:Pe,offsetX:he,offsetY:tt,rtl:Ze,getSize:Jt}),_t=ke(le,Xe,Je,l,he,ie,t,ut),mt=null;p&&(mt=(0,Q.Z)((0,Ee.Z)({},v?"height":"maxHeight",p),je),ne&&(mt.overflowY="hidden",l&&(mt.overflowX="hidden"),lt&&(mt.pointerEvents="none")));var Ut={};return Ze&&(Ut.dir="rtl"),c.createElement("div",(0,Ce.Z)({ref:qe,style:(0,Q.Z)((0,Q.Z)({},D),{},{position:"relative"}),className:Ge},Ut,A),c.createElement(Z.Z,{onResize:Mt},c.createElement(N,{className:"".concat(M,"-holder"),style:mt,ref:Fe,onScroll:Yt,onMouseEnter:Ft},c.createElement(De,{prefixCls:M,height:Be,offsetX:he,offsetY:tt,scrollWidth:l,onInnerResize:se,ref:Qe,innerProps:P,rtl:Ze,extra:Qt},_t))),Pe&&Be>p&&c.createElement(ge,{ref:Pt,prefixCls:M,scrollOffset:Oe,scrollRange:Be,rtl:Ze,onScroll:wt,onStartMove:dt,onStopMove:yt,spinSize:zt,containerSize:ze.height,style:R==null?void 0:R.verticalScrollBar,thumbStyle:R==null?void 0:R.verticalScrollBarThumb}),Pe&&l>ze.width&&c.createElement(ge,{ref:Rt,prefixCls:M,scrollOffset:he,scrollRange:l,rtl:Ze,onScroll:wt,onStartMove:dt,onStopMove:yt,spinSize:Bt,containerSize:ze.width,horizontal:!0,style:R==null?void 0:R.horizontalScrollBar,thumbStyle:R==null?void 0:R.horizontalScrollBarThumb}))}var ee=c.forwardRef(Ye);ee.displayName="List";var Re=ee,Ae=Re}}]);