(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2323],{45747:function(){},54680:function(It,ze,o){"use strict";o.d(ze,{Z:function(){return be}});var ue=o(22122),U=o(96156),He=o(94184),xe=o.n(He),Me=o(85061),Ne=o(28991),ae=o(28481),pe=o(81253),de=o(90484),c=o(67294),E=o(74484),j=o(17341),he=o(88708),me=o(21770),fe=o(15105),De=o(56982),oe=o(76513),P=c.createContext(null),s=P,g=c.createContext(null),f=g;function y(n){return Array.isArray(n)?n:n!==void 0?[n]:[]}function C(n){var u=n||{},K=u.label,p=u.value,D=u.children,A=p||"value";return{_title:K?[K]:["title","label"],value:A,key:A,children:D||"children"}}function L(n){return!n||n.disabled||n.disableCheckbox||n.checkable===!1}function M(n,u){var K=[];function p(D){D.forEach(function(A){K.push(A[u.value]);var w=A[u.children];w&&p(w)})}return p(n),K}function I(n){return n==null}var G={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},t=function(u,K){var p=(0,E.lk)(),D=p.prefixCls,A=p.multiple,w=p.searchValue,R=p.toggleOpen,$=p.open,ne=p.notFoundContent,te=c.useContext(f),$e=te.virtual,ke=te.listHeight,Te=te.listItemHeight,we=te.treeData,Oe=te.fieldNames,Ye=te.onSelect,Qe=te.dropdownMatchSelectWidth,nt=te.treeExpandAction,se=c.useContext(s),Ie=se.checkable,Ve=se.checkedKeys,_e=se.halfCheckedKeys,rt=se.treeExpandedKeys,Pt=se.treeDefaultExpandAll,Zt=se.treeDefaultExpandedKeys,Kt=se.onTreeExpand,wt=se.treeIcon,bt=se.showTreeIcon,gt=se.switcherIcon,xt=se.treeLine,Nt=se.treeNodeFilterProp,at=se.loadData,Ce=se.treeLoadedKeys,We=se.treeMotion,ot=se.onTreeLoad,qe=se.keyEntities,Be=c.useRef(),et=(0,De.Z)(function(){return we},[$,we],function(Ue,je){return je[0]&&Ue[1]!==je[1]}),yt=c.useMemo(function(){return Ie?{checked:Ve,halfChecked:_e}:null},[Ie,Ve,_e]);c.useEffect(function(){if($&&!A&&Ve.length){var Ue;(Ue=Be.current)===null||Ue===void 0||Ue.scrollTo({key:Ve[0]})}},[$]);var Ze=String(w).toLowerCase(),ft=function(je){return Ze?String(je[Nt]).toLowerCase().includes(Ze):!1},Dt=c.useState(Zt),Rt=(0,ae.Z)(Dt,2),Tt=Rt[0],Wt=Rt[1],Ot=c.useState(null),$t=(0,ae.Z)(Ot,2),Lt=$t[0],Ht=$t[1],Ut=c.useMemo(function(){return rt?(0,Me.Z)(rt):w?Lt:Tt},[Tt,Lt,rt,w]);c.useEffect(function(){w&&Ht(M(we,Oe))},[w]);var Yt=function(je){Wt(je),Ht(je),Kt&&Kt(je)},mt=function(je){je.preventDefault()},kt=function(je,Ct){var lt=Ct.node;Ie&&L(lt)||(Ye(lt.key,{selected:!Ve.includes(lt.key)}),A||R(!1))},Vt=c.useState(null),vt=(0,ae.Z)(Vt,2),Se=vt[0],Xt=vt[1],Et=qe[Se];if(c.useImperativeHandle(K,function(){var Ue;return{scrollTo:(Ue=Be.current)===null||Ue===void 0?void 0:Ue.scrollTo,onKeyDown:function(Ct){var lt,Xe=Ct.which;switch(Xe){case fe.Z.UP:case fe.Z.DOWN:case fe.Z.LEFT:case fe.Z.RIGHT:(lt=Be.current)===null||lt===void 0||lt.onKeyDown(Ct);break;case fe.Z.ENTER:{if(Et){var pt=(Et==null?void 0:Et.node)||{},Qt=pt.selectable,_t=pt.value;Qt!==!1&&kt(null,{node:{key:Se},selected:!Ve.includes(_t)})}break}case fe.Z.ESC:R(!1)}},onKeyUp:function(){}}}),et.length===0)return c.createElement("div",{role:"listbox",className:"".concat(D,"-empty"),onMouseDown:mt},ne);var Mt={fieldNames:Oe};return Ce&&(Mt.loadedKeys=Ce),Ut&&(Mt.expandedKeys=Ut),c.createElement("div",{onMouseDown:mt},Et&&$&&c.createElement("span",{style:G,"aria-live":"assertive"},Et.node.value),c.createElement(oe.Z,(0,ue.Z)({ref:Be,focusable:!1,prefixCls:"".concat(D,"-tree"),treeData:et,height:ke,itemHeight:Te,virtual:$e!==!1&&Qe!==!1,multiple:A,icon:wt,showIcon:bt,switcherIcon:gt,showLine:xt,loadData:w?null:at,motion:We,activeKey:Se,checkable:Ie,checkStrictly:!0,checkedKeys:yt,selectedKeys:Ie?[]:Ve,defaultExpandAll:Pt},Mt,{onActiveChange:Xt,onSelect:kt,onCheck:kt,onExpand:Yt,onLoad:ot,filterTreeNode:ft,expandAction:nt})))},b=c.forwardRef(t);b.displayName="OptionList";var T=b,z=function(){return null},i=z,d="SHOW_ALL",x="SHOW_PARENT",k="SHOW_CHILD";function Q(n,u,K,p){var D=new Set(n);return u===k?n.filter(function(A){var w=K[A];return!(w&&w.children&&w.children.some(function(R){var $=R.node;return D.has($[p.value])})&&w.children.every(function(R){var $=R.node;return L($)||D.has($[p.value])}))}):u===x?n.filter(function(A){var w=K[A],R=w?w.parent:null;return!(R&&!L(R.node)&&D.has(R.key))}):n}var Ke=o(50344),re=o(80334),_=["children","value"];function ge(n){return(0,Ke.Z)(n).map(function(u){if(!c.isValidElement(u)||!u.type)return null;var K=u.key,p=u.props,D=p.children,A=p.value,w=(0,pe.Z)(p,_),R=(0,Ne.Z)({key:K,value:A},w),$=ge(D);return $.length&&(R.children=$),R}).filter(function(u){return u})}function Fe(n){if(!n)return n;var u=(0,Ne.Z)({},n);return"props"in u||Object.defineProperty(u,"props",{get:function(){return(0,re.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),u}}),u}function it(n,u,K,p,D,A){var w=null,R=null;function $(){function ne(te){var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return te.map(function(Te,we){var Oe="".concat($e,"-").concat(we),Ye=Te[A.value],Qe=K.includes(Ye),nt=ne(Te[A.children]||[],Oe,Qe),se=c.createElement(i,Te,nt.map(function(Ve){return Ve.node}));if(u===Ye&&(w=se),Qe){var Ie={pos:Oe,node:se,children:nt};return ke||R.push(Ie),Ie}return null}).filter(function(Te){return Te})}R||(R=[],ne(p),R.sort(function(te,$e){var ke=te.node.props.value,Te=$e.node.props.value,we=K.indexOf(ke),Oe=K.indexOf(Te);return we-Oe}))}Object.defineProperty(n,"triggerNode",{get:function(){return(0,re.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),$(),w}}),Object.defineProperty(n,"allCheckedNodes",{get:function(){return(0,re.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),$(),D?R:R.map(function(te){var $e=te.node;return $e})}})}function Je(n,u){var K=u.id,p=u.pId,D=u.rootPId,A={},w=[],R=n.map(function($){var ne=(0,Ne.Z)({},$),te=ne[K];return A[te]=ne,ne.key=ne.key||te,ne});return R.forEach(function($){var ne=$[p],te=A[ne];te&&(te.children=te.children||[],te.children.push($)),(ne===D||!te&&D===null)&&w.push($)}),w}function st(n,u,K){return c.useMemo(function(){return n?K?Je(n,(0,Ne.Z)({id:"id",pId:"pId",rootPId:null},K!==!0?K:{})):n:ge(u)},[u,K,n])}var ct=function(n){var u=c.useRef({valueLabels:new Map});return c.useMemo(function(){var K=u.current.valueLabels,p=new Map,D=n.map(function(A){var w,R=A.value,$=(w=A.label)!==null&&w!==void 0?w:K.get(R);return p.set(R,$),(0,Ne.Z)((0,Ne.Z)({},A),{},{label:$})});return u.current.valueLabels=p,[D]},[n])};function Ae(n){var u=c.useRef();u.current=n;var K=c.useCallback(function(){return u.current.apply(u,arguments)},[]);return K}var ut=o(1089),dt=function(n,u){return c.useMemo(function(){var K=(0,ut.I8)(n,{fieldNames:u,initWrapper:function(D){return(0,Ne.Z)((0,Ne.Z)({},D),{},{valueEntities:new Map})},processEntity:function(D,A){var w=D.node[u.value];if(!1)var R;A.valueEntities.set(w,D)}});return K},[n,u])},m=function(n,u,K,p){return c.useMemo(function(){var D=n.map(function($){var ne=$.value;return ne}),A=u.map(function($){var ne=$.value;return ne}),w=D.filter(function($){return!p[$]});if(K){var R=(0,j.S)(D,!0,p);D=R.checkedKeys,A=R.halfCheckedKeys}return[Array.from(new Set([].concat((0,Me.Z)(w),(0,Me.Z)(D)))),A]},[n,u,K,p])},F=function(n,u,K){var p=K.treeNodeFilterProp,D=K.filterTreeNode,A=K.fieldNames,w=A.children;return c.useMemo(function(){if(!u||D===!1)return n;var R;if(typeof D=="function")R=D;else{var $=u.toUpperCase();R=function($e,ke){var Te=ke[p];return String(Te).toUpperCase().includes($)}}function ne(te){var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return te.map(function(ke){var Te=ke[w],we=$e||R(u,Fe(ke)),Oe=ne(Te||[],we);return we||Oe.length?(0,Ne.Z)((0,Ne.Z)({},ke),{},(0,U.Z)({isLeaf:void 0},w,Oe)):null}).filter(function(ke){return ke})}return ne(n)},[n,u,w,p,D])};function V(n){var u=n.searchPlaceholder,K=n.treeCheckStrictly,p=n.treeCheckable,D=n.labelInValue,A=n.value,w=n.multiple;warning(!u,"`searchPlaceholder` has been removed."),K&&D===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(D||K)&&warning(toArray(A).every(function(R){return R&&_typeof(R)==="object"&&"value"in R}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),K||w||p?warning(!A||Array.isArray(A),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(A),"`value` should not be array when `TreeSelect` is single mode.")}var e=null,N=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function ie(n){return!n||(0,de.Z)(n)!=="object"}var q=c.forwardRef(function(n,u){var K=n.id,p=n.prefixCls,D=p===void 0?"rc-tree-select":p,A=n.value,w=n.defaultValue,R=n.onChange,$=n.onSelect,ne=n.onDeselect,te=n.searchValue,$e=n.inputValue,ke=n.onSearch,Te=n.autoClearSearchValue,we=Te===void 0?!0:Te,Oe=n.filterTreeNode,Ye=n.treeNodeFilterProp,Qe=Ye===void 0?"value":Ye,nt=n.showCheckedStrategy,se=nt===void 0?k:nt,Ie=n.treeNodeLabelProp,Ve=n.multiple,_e=n.treeCheckable,rt=n.treeCheckStrictly,Pt=n.labelInValue,Zt=n.fieldNames,Kt=n.treeDataSimpleMode,wt=n.treeData,bt=n.children,gt=n.loadData,xt=n.treeLoadedKeys,Nt=n.onTreeLoad,at=n.treeDefaultExpandAll,Ce=n.treeExpandedKeys,We=n.treeDefaultExpandedKeys,ot=n.onTreeExpand,qe=n.treeExpandAction,Be=n.virtual,et=n.listHeight,yt=et===void 0?200:et,Ze=n.listItemHeight,ft=Ze===void 0?20:Ze,Dt=n.onDropdownVisibleChange,Rt=n.dropdownMatchSelectWidth,Tt=Rt===void 0?!0:Rt,Wt=n.treeLine,Ot=n.treeIcon,$t=n.showTreeIcon,Lt=n.switcherIcon,Ht=n.treeMotion,Ut=(0,pe.Z)(n,N),Yt=(0,he.ZP)(K),mt=_e&&!rt,kt=_e||rt,Vt=rt||Pt,vt=kt||Ve,Se=c.useMemo(function(){return C(Zt)},[JSON.stringify(Zt)]),Xt=(0,me.Z)("",{value:te!==void 0?te:$e,postState:function(ce){return ce||""}}),Et=(0,ae.Z)(Xt,2),Mt=Et[0],Ue=Et[1],je=function(ce){Ue(ce),ke==null||ke(ce)},Ct=st(wt,bt,Kt),lt=dt(Ct,Se),Xe=lt.keyEntities,pt=lt.valueEntities,Qt=c.useCallback(function(ve){var ce=[],ye=[];return ve.forEach(function(Le){pt.has(Le)?ye.push(Le):ce.push(Le)}),{missingRawValues:ce,existRawValues:ye}},[pt]),_t=F(Ct,Mt,{fieldNames:Se,treeNodeFilterProp:Qe,filterTreeNode:Oe}),dn=c.useCallback(function(ve){if(ve){if(Ie)return ve[Ie];for(var ce=Se._title,ye=0;ye0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],V=m.length,e=F.length;if(Math.abs(V-e)!==1)return{add:!1,key:null};function N(ie,q){var r=new Map;ie.forEach(function(a){r.set(a,!0)});var l=q.filter(function(a){return!r.has(a)});return l.length===1?l[0]:null}return V ").concat(F);return F}var Fe=E.forwardRef(function(m,F){var V=m.prefixCls,e=m.data,N=m.selectable,ie=m.checkable,q=m.expandedKeys,r=m.selectedKeys,l=m.checkedKeys,a=m.loadedKeys,h=m.loadingKeys,S=m.halfCheckedKeys,H=m.keyEntities,Z=m.disabled,O=m.dragging,B=m.dragOverNodeKey,Y=m.dropPosition,v=m.motion,X=m.height,J=m.itemHeight,W=m.virtual,ee=m.focusable,le=m.activeItem,Ee=m.focused,be=m.tabIndex,n=m.onKeyDown,u=m.onFocus,K=m.onBlur,p=m.onActiveChange,D=m.onListChangeStart,A=m.onListChangeEnd,w=(0,f.Z)(m,z),R=E.useRef(null),$=E.useRef(null);E.useImperativeHandle(F,function(){return{scrollTo:function(We){R.current.scrollTo(We)},getIndentWidth:function(){return $.current.offsetWidth}}});var ne=E.useState(q),te=(0,g.Z)(ne,2),$e=te[0],ke=te[1],Te=E.useState(e),we=(0,g.Z)(Te,2),Oe=we[0],Ye=we[1],Qe=E.useState(e),nt=(0,g.Z)(Qe,2),se=nt[0],Ie=nt[1],Ve=E.useState([]),_e=(0,g.Z)(Ve,2),rt=_e[0],Pt=_e[1],Zt=E.useState(null),Kt=(0,g.Z)(Zt,2),wt=Kt[0],bt=Kt[1],gt=E.useRef(e);gt.current=e;function xt(){var Ce=gt.current;Ye(Ce),Ie(Ce),Pt([]),bt(null),A()}E.useEffect(function(){ke(q);var Ce=b($e,q);if(Ce.key!==null)if(Ce.add){var We=Oe.findIndex(function(Ze){var ft=Ze.key;return ft===Ce.key}),ot=re(T(Oe,e,Ce.key),W,X,J),qe=Oe.slice();qe.splice(We+1,0,Ke),Ie(qe),Pt(ot),bt("show")}else{var Be=e.findIndex(function(Ze){var ft=Ze.key;return ft===Ce.key}),et=re(T(e,Oe,Ce.key),W,X,J),yt=e.slice();yt.splice(Be+1,0,Ke),Ie(yt),Pt(et),bt("hide")}else Oe!==e&&(Ye(e),Ie(e))},[q,e]),E.useEffect(function(){O||xt()},[O]);var Nt=v?se:e,at={expandedKeys:q,selectedKeys:r,loadedKeys:a,loadingKeys:h,checkedKeys:l,halfCheckedKeys:S,dragOverNodeKey:B,dropPosition:Y,keyEntities:H};return E.createElement(E.Fragment,null,Ee&&le&&E.createElement("span",{style:i,"aria-live":"assertive"},ge(le)),E.createElement("div",null,E.createElement("input",{style:i,disabled:ee===!1||Z,tabIndex:ee!==!1?be:null,onKeyDown:n,onFocus:u,onBlur:K,value:"",onChange:d,"aria-label":"for screen reader"})),E.createElement("div",{className:"".concat(V,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"}},E.createElement("div",{className:"".concat(V,"-indent")},E.createElement("div",{ref:$,className:"".concat(V,"-indent-unit")}))),E.createElement(y.Z,(0,ue.Z)({},w,{data:Nt,itemKey:_,height:X,fullHeight:!1,virtual:W,itemHeight:J,prefixCls:"".concat(V,"-list"),ref:R,onVisibleChange:function(We,ot){var qe=new Set(We),Be=ot.filter(function(et){return!qe.has(et)});Be.some(function(et){return _(et)===x})&&xt()}}),function(Ce){var We=Ce.pos,ot=(0,ue.Z)({},Ce.data),qe=Ce.title,Be=Ce.key,et=Ce.isStart,yt=Ce.isEnd,Ze=(0,s.km)(Be,We);delete ot.key,delete ot.children;var ft=(0,s.H8)(Ze,at);return E.createElement(t,(0,ue.Z)({},ot,ft,{title:qe,active:!!le&&Be===le.key,pos:We,data:Ce.data,isStart:et,isEnd:yt,motion:v,motionNodes:Be===x?rt:null,motionType:wt,onMotionStart:D,onMotionEnd:xt,treeNodeRequiredProps:at,onMouseMove:function(){p(null)}}))}))});Fe.displayName="NodeList";var it=Fe,Je=o(17341);function st(m){var F=m.dropPosition,V=m.dropLevelOffset,e=m.indent,N={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(F){case-1:N.top=0,N.left=-V*e;break;case 1:N.bottom=0,N.left=-V*e;break;case 0:N.bottom=0,N.left=e;break}return E.createElement("div",{style:N})}var ct=10,Ae=function(m){(0,de.Z)(V,m);var F=(0,c.Z)(V);function V(){var e;(0,Ne.Z)(this,V);for(var N=arguments.length,ie=new Array(N),q=0;q2&&arguments[2]!==void 0?arguments[2]:!1,S=e.state,H=S.dragChildrenKeys,Z=S.dropPosition,O=S.dropTargetKey,B=S.dropTargetPos,Y=S.dropAllowed;if(!!Y){var v=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),O!==null){var X=(0,xe.Z)((0,xe.Z)({},(0,s.H8)(O,e.getTreeNodeRequiredProps())),{},{active:((a=e.getActiveItem())===null||a===void 0?void 0:a.key)===O,data:e.state.keyEntities[O].node}),J=H.indexOf(O)!==-1;(0,he.ZP)(!J,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var W=(0,P.yx)(B),ee={event:r,node:(0,s.F)(X),dragNode:e.dragNode?(0,s.F)(e.dragNode.props):null,dragNodesKeys:[e.dragNode.props.eventKey].concat(H),dropToGap:Z!==0,dropPosition:Z+Number(W[W.length-1])};h||v==null||v(ee),e.dragNode=null}}},e.cleanDragState=function(){var r=e.state.draggingNodeKey;r!==null&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null},e.triggerExpandActionExpand=function(r,l){var a=e.state,h=a.expandedKeys,S=a.flattenNodes,H=l.expanded,Z=l.key,O=l.isLeaf;if(!(O||r.shiftKey||r.metaKey||r.ctrlKey)){var B=S.filter(function(v){return v.key===Z})[0],Y=(0,s.F)((0,xe.Z)((0,xe.Z)({},(0,s.H8)(Z,e.getTreeNodeRequiredProps())),{},{data:B.data}));e.setExpandedKeys(H?(0,P._5)(h,Z):(0,P.L0)(h,Z)),e.onNodeExpand(r,Y)}},e.onNodeClick=function(r,l){var a=e.props,h=a.onClick,S=a.expandAction;S==="click"&&e.triggerExpandActionExpand(r,l),h==null||h(r,l)},e.onNodeDoubleClick=function(r,l){var a=e.props,h=a.onDoubleClick,S=a.expandAction;S==="doubleClick"&&e.triggerExpandActionExpand(r,l),h==null||h(r,l)},e.onNodeSelect=function(r,l){var a=e.state.selectedKeys,h=e.state,S=h.keyEntities,H=h.fieldNames,Z=e.props,O=Z.onSelect,B=Z.multiple,Y=l.selected,v=l[H.key],X=!Y;X?B?a=(0,P.L0)(a,v):a=[v]:a=(0,P._5)(a,v);var J=a.map(function(W){var ee=S[W];return ee?ee.node:null}).filter(function(W){return W});e.setUncontrolledState({selectedKeys:a}),O==null||O(a,{event:"select",selected:X,node:l,selectedNodes:J,nativeEvent:r.nativeEvent})},e.onNodeCheck=function(r,l,a){var h=e.state,S=h.keyEntities,H=h.checkedKeys,Z=h.halfCheckedKeys,O=e.props,B=O.checkStrictly,Y=O.onCheck,v=l.key,X,J={event:"check",node:l,checked:a,nativeEvent:r.nativeEvent};if(B){var W=a?(0,P.L0)(H,v):(0,P._5)(H,v),ee=(0,P._5)(Z,v);X={checked:W,halfChecked:ee},J.checkedNodes=W.map(function(K){return S[K]}).filter(function(K){return K}).map(function(K){return K.node}),e.setUncontrolledState({checkedKeys:W})}else{var le=(0,Je.S)([].concat((0,Me.Z)(H),[v]),!0,S),Ee=le.checkedKeys,be=le.halfCheckedKeys;if(!a){var n=new Set(Ee);n.delete(v);var u=(0,Je.S)(Array.from(n),{checked:!1,halfCheckedKeys:be},S);Ee=u.checkedKeys,be=u.halfCheckedKeys}X=Ee,J.checkedNodes=[],J.checkedNodesPositions=[],J.halfCheckedKeys=be,Ee.forEach(function(K){var p=S[K];if(!!p){var D=p.node,A=p.pos;J.checkedNodes.push(D),J.checkedNodesPositions.push({node:D,pos:A})}}),e.setUncontrolledState({checkedKeys:Ee},!1,{halfCheckedKeys:be})}Y==null||Y(X,J)},e.onNodeLoad=function(r){var l=r.key,a=new Promise(function(h,S){e.setState(function(H){var Z=H.loadedKeys,O=Z===void 0?[]:Z,B=H.loadingKeys,Y=B===void 0?[]:B,v=e.props,X=v.loadData,J=v.onLoad;if(!X||O.indexOf(l)!==-1||Y.indexOf(l)!==-1)return null;var W=X(r);return W.then(function(){var ee=e.state.loadedKeys,le=(0,P.L0)(ee,l);J==null||J(le,{event:"load",node:r}),e.setUncontrolledState({loadedKeys:le}),e.setState(function(Ee){return{loadingKeys:(0,P._5)(Ee.loadingKeys,l)}}),h()}).catch(function(ee){if(e.setState(function(Ee){return{loadingKeys:(0,P._5)(Ee.loadingKeys,l)}}),e.loadingRetryTimes[l]=(e.loadingRetryTimes[l]||0)+1,e.loadingRetryTimes[l]>=ct){var le=e.state.loadedKeys;(0,he.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:(0,P.L0)(le,l)}),h()}S(ee)}),{loadingKeys:(0,P.L0)(Y,l)}})});return a.catch(function(){}),a},e.onNodeMouseEnter=function(r,l){var a=e.props.onMouseEnter;a==null||a({event:r,node:l})},e.onNodeMouseLeave=function(r,l){var a=e.props.onMouseLeave;a==null||a({event:r,node:l})},e.onNodeContextMenu=function(r,l){var a=e.props.onRightClick;a&&(r.preventDefault(),a({event:r,node:l}))},e.onFocus=function(){var r=e.props.onFocus;e.setState({focused:!0});for(var l=arguments.length,a=new Array(l),h=0;h1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!e.destroyed){var h=!1,S=!0,H={};Object.keys(r).forEach(function(Z){if(Z in e.props){S=!1;return}h=!0,H[Z]=r[Z]}),h&&(!l||S)&&e.setState((0,xe.Z)((0,xe.Z)({},H),a))}},e.scrollTo=function(r){e.listRef.current.scrollTo(r)},e}return(0,ae.Z)(V,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var N=this.props.activeKey;N!==void 0&&N!==this.state.activeKey&&(this.setState({activeKey:N}),N!==null&&this.scrollTo({key:N}))}},{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 N,ie=this.state,q=ie.focused,r=ie.flattenNodes,l=ie.keyEntities,a=ie.draggingNodeKey,h=ie.activeKey,S=ie.dropLevelOffset,H=ie.dropContainerKey,Z=ie.dropTargetKey,O=ie.dropPosition,B=ie.dragOverNodeKey,Y=ie.indent,v=this.props,X=v.prefixCls,J=v.className,W=v.style,ee=v.showLine,le=v.focusable,Ee=v.tabIndex,be=Ee===void 0?0:Ee,n=v.selectable,u=v.showIcon,K=v.icon,p=v.switcherIcon,D=v.draggable,A=v.checkable,w=v.checkStrictly,R=v.disabled,$=v.motion,ne=v.loadData,te=v.filterTreeNode,$e=v.height,ke=v.itemHeight,Te=v.virtual,we=v.titleRender,Oe=v.dropIndicatorRender,Ye=v.onContextMenu,Qe=v.onScroll,nt=v.direction,se=v.rootClassName,Ie=v.rootStyle,Ve=(0,me.Z)(this.props,{aria:!0,data:!0}),_e;return D&&((0,He.Z)(D)==="object"?_e=D:typeof D=="function"?_e={nodeDraggable:D}:_e={}),E.createElement(oe.k.Provider,{value:{prefixCls:X,selectable:n,showIcon:u,icon:K,switcherIcon:p,draggable:_e,draggingNodeKey:a,checkable:A,checkStrictly:w,disabled:R,keyEntities:l,dropLevelOffset:S,dropContainerKey:H,dropTargetKey:Z,dropPosition:O,dragOverNodeKey:B,indent:Y,direction:nt,dropIndicatorRender:Oe,loadData:ne,filterTreeNode:te,titleRender:we,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}},E.createElement("div",{role:"tree",className:De()(X,J,se,(N={},(0,U.Z)(N,"".concat(X,"-show-line"),ee),(0,U.Z)(N,"".concat(X,"-focused"),q),(0,U.Z)(N,"".concat(X,"-active-focused"),h!==null),N)),style:Ie},E.createElement(it,(0,ue.Z)({ref:this.listRef,prefixCls:X,style:W,data:r,disabled:R,selectable:n,checkable:!!A,motion:$,dragging:a!==null,height:$e,itemHeight:ke,virtual:Te,focusable:le,focused:q,tabIndex:be,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ye,onScroll:Qe},this.getTreeNodeRequiredProps(),Ve))))}}],[{key:"getDerivedStateFromProps",value:function(N,ie){var q=ie.prevProps,r={prevProps:N};function l(le){return!q&&le in N||q&&q[le]!==N[le]}var a,h=ie.fieldNames;if(l("fieldNames")&&(h=(0,s.w$)(N.fieldNames),r.fieldNames=h),l("treeData")?a=N.treeData:l("children")&&((0,he.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=(0,s.zn)(N.children)),a){r.treeData=a;var S=(0,s.I8)(a,{fieldNames:h});r.keyEntities=(0,xe.Z)((0,U.Z)({},x,Q),S.keyEntities)}var H=r.keyEntities||ie.keyEntities;if(l("expandedKeys")||q&&l("autoExpandParent"))r.expandedKeys=N.autoExpandParent||!q&&N.defaultExpandParent?(0,P.r7)(N.expandedKeys,H):N.expandedKeys;else if(!q&&N.defaultExpandAll){var Z=(0,xe.Z)({},H);delete Z[x],r.expandedKeys=Object.keys(Z).map(function(le){return Z[le].key})}else!q&&N.defaultExpandedKeys&&(r.expandedKeys=N.autoExpandParent||N.defaultExpandParent?(0,P.r7)(N.defaultExpandedKeys,H):N.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,a||r.expandedKeys){var O=(0,s.oH)(a||ie.treeData,r.expandedKeys||ie.expandedKeys,h);r.flattenNodes=O}if(N.selectable&&(l("selectedKeys")?r.selectedKeys=(0,P.BT)(N.selectedKeys,N):!q&&N.defaultSelectedKeys&&(r.selectedKeys=(0,P.BT)(N.defaultSelectedKeys,N))),N.checkable){var B;if(l("checkedKeys")?B=(0,P.E6)(N.checkedKeys)||{}:!q&&N.defaultCheckedKeys?B=(0,P.E6)(N.defaultCheckedKeys)||{}:a&&(B=(0,P.E6)(N.checkedKeys)||{checkedKeys:ie.checkedKeys,halfCheckedKeys:ie.halfCheckedKeys}),B){var Y=B,v=Y.checkedKeys,X=v===void 0?[]:v,J=Y.halfCheckedKeys,W=J===void 0?[]:J;if(!N.checkStrictly){var ee=(0,Je.S)(X,!0,H);X=ee.checkedKeys,W=ee.halfCheckedKeys}r.checkedKeys=X,r.halfCheckedKeys=W}}return l("loadedKeys")&&(r.loadedKeys=N.loadedKeys),r}}]),V}(E.Component);Ae.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:st,allowDrop:function(){return!0},expandAction:!1},Ae.TreeNode=L.Z;var ut=Ae,dt=ut},10225:function(It,ze,o){"use strict";o.d(ze,{_5:function(){return ae},L0:function(){return pe},yx:function(){return de},bt:function(){return c},Ds:function(){return E},wA:function(){return j},OM:function(){return fe},BT:function(){return De},E6:function(){return s},r7:function(){return g}});var ue=o(85061),U=o(90484),He=o(67294),xe=o(80334),Me=o(4258),Ne=null;function ae(f,y){if(!f)return[];var C=f.slice(),L=C.indexOf(y);return L>=0&&C.splice(L,1),C}function pe(f,y){var C=(f||[]).slice();return C.indexOf(y)===-1&&C.push(y),C}function de(f){return f.split("-")}function c(f,y){return"".concat(f,"-").concat(y)}function E(f){return f&&f.type&&f.type.isTreeNode}function j(f,y){var C=[],L=y[f];function M(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];I.forEach(function(G){var t=G.key,b=G.children;C.push(t),M(b)})}return M(L.children),C}function he(f){if(f.parent){var y=de(f.pos);return Number(y[y.length-1])===f.parent.children.length-1}return!1}function me(f){var y=de(f.pos);return Number(y[y.length-1])===0}function fe(f,y,C,L,M,I,G,t,b,T){var z,i=f.clientX,d=f.clientY,x=f.target.getBoundingClientRect(),k=x.top,Q=x.height,Ke=(T==="rtl"?-1:1)*(((M==null?void 0:M.x)||0)-i),re=(Ke-12)/L,_=t[C.props.eventKey];if(d-1.5?I({dragNode:m,dropNode:F,dropPosition:1})?Ae=1:V=!1:I({dragNode:m,dropNode:F,dropPosition:0})?Ae=0:I({dragNode:m,dropNode:F,dropPosition:1})?Ae=1:V=!1:I({dragNode:m,dropNode:F,dropPosition:1})?Ae=1:V=!1,{dropPosition:Ae,dropLevelOffset:ut,dropTargetKey:_.key,dropTargetPos:_.pos,dragOverNodeKey:ct,dropContainerKey:Ae===0?null:((z=_.parent)===null||z===void 0?void 0:z.key)||null,dropAllowed:V}}function De(f,y){if(!!f){var C=y.multiple;return C?f.slice():f.length?[f[0]]:f}}var oe=function(y){return y};function P(f,y){if(!f)return[];var C=y||{},L=C.processProps,M=L===void 0?oe:L,I=Array.isArray(f)?f:[f];return I.map(function(G){var t=G.children,b=_objectWithoutProperties(G,Ne),T=P(t,y);return React.createElement(TreeNode,_extends({key:b.key},M(b)),T)})}function s(f){if(!f)return null;var y;if(Array.isArray(f))y={checkedKeys:f,halfCheckedKeys:void 0};else if((0,U.Z)(f)==="object")y={checkedKeys:f.checked||void 0,halfCheckedKeys:f.halfChecked||void 0};else return(0,xe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return y}function g(f,y){var C=new Set;function L(M){if(!C.has(M)){var I=y[M];if(!!I){C.add(M);var G=I.parent,t=I.node;t.disabled||G&&L(G.key)}}}return(f||[]).forEach(function(M){L(M)}),(0,ue.Z)(C)}},17341:function(It,ze,o){"use strict";o.d(ze,{S:function(){return Ne}});var ue=o(80334);function U(ae,pe){var de=new Set;return ae.forEach(function(c){pe.has(c)||de.add(c)}),de}function He(ae){var pe=ae||{},de=pe.disabled,c=pe.disableCheckbox,E=pe.checkable;return!!(de||c)||E===!1}function xe(ae,pe,de,c){for(var E=new Set(ae),j=new Set,he=0;he<=de;he+=1){var me=pe.get(he)||new Set;me.forEach(function(P){var s=P.key,g=P.node,f=P.children,y=f===void 0?[]:f;E.has(s)&&!c(g)&&y.filter(function(C){return!c(C.node)}).forEach(function(C){E.add(C.key)})})}for(var fe=new Set,De=de;De>=0;De-=1){var oe=pe.get(De)||new Set;oe.forEach(function(P){var s=P.parent,g=P.node;if(!(c(g)||!P.parent||fe.has(P.parent.key))){if(c(P.parent.node)){fe.add(s.key);return}var f=!0,y=!1;(s.children||[]).filter(function(C){return!c(C.node)}).forEach(function(C){var L=C.key,M=E.has(L);f&&!M&&(f=!1),!y&&(M||j.has(L))&&(y=!0)}),f&&E.add(s.key),y&&j.add(s.key),fe.add(s.key)}})}return{checkedKeys:Array.from(E),halfCheckedKeys:Array.from(U(j,E))}}function Me(ae,pe,de,c,E){for(var j=new Set(ae),he=new Set(pe),me=0;me<=c;me+=1){var fe=de.get(me)||new Set;fe.forEach(function(s){var g=s.key,f=s.node,y=s.children,C=y===void 0?[]:y;!j.has(g)&&!he.has(g)&&!E(f)&&C.filter(function(L){return!E(L.node)}).forEach(function(L){j.delete(L.key)})})}he=new Set;for(var De=new Set,oe=c;oe>=0;oe-=1){var P=de.get(oe)||new Set;P.forEach(function(s){var g=s.parent,f=s.node;if(!(E(f)||!s.parent||De.has(s.parent.key))){if(E(s.parent.node)){De.add(g.key);return}var y=!0,C=!1;(g.children||[]).filter(function(L){return!E(L.node)}).forEach(function(L){var M=L.key,I=j.has(M);y&&!I&&(y=!1),!C&&(I||he.has(M))&&(C=!0)}),y||j.delete(g.key),C&&he.add(g.key),De.add(g.key)}})}return{checkedKeys:Array.from(j),halfCheckedKeys:Array.from(U(he,j))}}function Ne(ae,pe,de,c){var E=[],j;c?j=c:j=He;var he=new Set(ae.filter(function(oe){var P=!!de[oe];return P||E.push(oe),P})),me=new Map,fe=0;Object.keys(de).forEach(function(oe){var P=de[oe],s=P.level,g=me.get(s);g||(g=new Set,me.set(s,g)),g.add(P),fe=Math.max(fe,s)}),(0,ue.ZP)(!E.length,"Tree missing follow keys: ".concat(E.slice(0,100).map(function(oe){return"'".concat(oe,"'")}).join(", ")));var De;return pe===!0?De=xe(he,me,fe,j):De=Me(he,pe.halfCheckedKeys,me,fe,j),De}},1089:function(It,ze,o){"use strict";o.d(ze,{km:function(){return c},w$:function(){return E},zn:function(){return he},oH:function(){return me},I8:function(){return De},H8:function(){return oe},F:function(){return P}});var ue=o(90484),U=o(85061),He=o(28991),xe=o(81253),Me=o(98423),Ne=o(50344),ae=o(80334),pe=o(10225),de=["children"];function c(s,g){return s!=null?s:g}function E(s){var g=s||{},f=g.title,y=g._title,C=g.key,L=g.children,M=f||"title";return{title:M,_title:y||[M],key:C||"key",children:L||"children"}}function j(s,g){var f=new Map;function y(C){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(C||[]).forEach(function(M){var I=M[g.key],G=M[g.children];warning(I!=null,"Tree node must have a certain key: [".concat(L).concat(I,"]"));var t=String(I);warning(!f.has(t)||I===null||I===void 0,"Same 'key' exist in the Tree: ".concat(t)),f.set(t,!0),y(G,"".concat(L).concat(t," > "))})}y(s)}function he(s){function g(f){var y=(0,Ne.Z)(f);return y.map(function(C){if(!(0,pe.Ds)(C))return(0,ae.ZP)(!C,"Tree/TreeNode can only accept TreeNode as children."),null;var L=C.key,M=C.props,I=M.children,G=(0,xe.Z)(M,de),t=(0,He.Z)({key:L},G),b=g(I);return b.length&&(t.children=b),t}).filter(function(C){return C})}return g(s)}function me(s,g,f){var y=E(f),C=y._title,L=y.key,M=y.children,I=new Set(g===!0?[]:g),G=[];function t(b){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return b.map(function(z,i){for(var d=(0,pe.bt)(T?T.pos:"0",i),x=c(z[L],d),k,Q=0;Q1&&arguments[1]!==void 0?arguments[1]:{},f=g.initWrapper,y=g.processEntity,C=g.onProcessFinished,L=g.externalGetKey,M=g.childrenPropName,I=g.fieldNames,G=arguments.length>2?arguments[2]:void 0,t=L||G,b={},T={},z={posEntities:b,keyEntities:T};return f&&(z=f(z)||z),fe(s,function(i){var d=i.node,x=i.index,k=i.pos,Q=i.key,Ke=i.parentPos,re=i.level,_=i.nodes,ge={node:d,nodes:_,index:x,key:Q,pos:k,level:re},Fe=c(Q,k);b[k]=ge,T[Fe]=ge,ge.parent=b[Ke],ge.parent&&(ge.parent.children=ge.parent.children||[],ge.parent.children.push(ge)),y&&y(ge,z)},{externalGetKey:t,childrenPropName:M,fieldNames:I}),C&&C(z),z}function oe(s,g){var f=g.expandedKeys,y=g.selectedKeys,C=g.loadedKeys,L=g.loadingKeys,M=g.checkedKeys,I=g.halfCheckedKeys,G=g.dragOverNodeKey,t=g.dropPosition,b=g.keyEntities,T=b[s],z={eventKey:s,expanded:f.indexOf(s)!==-1,selected:y.indexOf(s)!==-1,loaded:C.indexOf(s)!==-1,loading:L.indexOf(s)!==-1,checked:M.indexOf(s)!==-1,halfChecked:I.indexOf(s)!==-1,pos:String(T?T.pos:""),dragOver:G===s&&t===0,dragOverGapTop:G===s&&t===-1,dragOverGapBottom:G===s&&t===1};return z}function P(s){var g=s.data,f=s.expanded,y=s.selected,C=s.checked,L=s.loaded,M=s.loading,I=s.halfChecked,G=s.dragOver,t=s.dragOverGapTop,b=s.dragOverGapBottom,T=s.pos,z=s.active,i=s.eventKey,d=(0,He.Z)((0,He.Z)({},g),{},{expanded:f,selected:y,checked:C,loaded:L,loading:M,halfChecked:I,dragOver:G,dragOverGapTop:t,dragOverGapBottom:b,pos:T,active:z,key:i});return"props"in d||Object.defineProperty(d,"props",{get:function(){return(0,ae.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),d}}}]);