(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[81628],{4258:function(ne,U,m){"use strict";m.d(U,{Z:function(){return v}});var F=m(22122),E=m(96156),G=m(81253),X=m(28991),ee=m(6610),J=m(5991),S=m(63349),T=m(10379),O=m(54070),h=m(67294),D=m(94184),k=m.n(D),_=m(64217),L=m(27822),I=function(p){for(var g=p.prefixCls,e=p.level,l=p.isStart,f=p.isEnd,y="".concat(g,"-indent-unit"),r=[],n=0;n=0&&i.splice(v,1),i}function T(t,o){var i=(t||[]).slice();return i.indexOf(o)===-1&&i.push(o),i}function O(t){return t.split("-")}function h(t,o){return"".concat(t,"-").concat(o)}function D(t){return t&&t.type&&t.type.isTreeNode}function k(t,o){var i=[],v=o[t];function u(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];p.forEach(function(g){var e=g.key,l=g.children;i.push(e),u(l)})}return u(v.children),i}function _(t){if(t.parent){var o=O(t.pos);return Number(o[o.length-1])===t.parent.children.length-1}return!1}function L(t){var o=O(t.pos);return Number(o[o.length-1])===0}function I(t,o,i,v,u,p,g,e,l,f){var y,r=t.clientX,n=t.clientY,s=t.target.getBoundingClientRect(),c=s.top,C=s.height,M=(f==="rtl"?-1:1)*(((u==null?void 0:u.x)||0)-r),b=(M-12)/v,x=e[i.props.eventKey];if(n-1.5?p({dragNode:$,dropNode:B,dropPosition:1})?W=1:w=!1:p({dragNode:$,dropNode:B,dropPosition:0})?W=0:p({dragNode:$,dropNode:B,dropPosition:1})?W=1:w=!1:p({dragNode:$,dropNode:B,dropPosition:1})?W=1:w=!1,{dropPosition:W,dropLevelOffset:V,dropTargetKey:x.key,dropTargetPos:x.pos,dragOverNodeKey:z,dropContainerKey:W===0?null:((y=x.parent)===null||y===void 0?void 0:y.key)||null,dropAllowed:w}}function Z(t,o){if(!!t){var i=o.multiple;return i?t.slice():t.length?[t[0]]:t}}var N=function(o){return o};function P(t,o){if(!t)return[];var i=o||{},v=i.processProps,u=v===void 0?N:v,p=Array.isArray(t)?t:[t];return p.map(function(g){var e=g.children,l=_objectWithoutProperties(g,J),f=P(e,o);return React.createElement(TreeNode,_extends({key:l.key},u(l)),f)})}function a(t){if(!t)return null;var o;if(Array.isArray(t))o={checkedKeys:t,halfCheckedKeys:void 0};else if((0,E.Z)(t)==="object")o={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0};else return(0,X.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return o}function d(t,o){var i=new Set;function v(u){if(!i.has(u)){var p=o[u];if(!!p){i.add(u);var g=p.parent,e=p.node;e.disabled||g&&v(g.key)}}}return(t||[]).forEach(function(u){v(u)}),(0,F.Z)(i)}},17341:function(ne,U,m){"use strict";m.d(U,{S:function(){return J}});var F=m(80334);function E(S,T){var O=new Set;return S.forEach(function(h){T.has(h)||O.add(h)}),O}function G(S){var T=S||{},O=T.disabled,h=T.disableCheckbox,D=T.checkable;return!!(O||h)||D===!1}function X(S,T,O,h){for(var D=new Set(S),k=new Set,_=0;_<=O;_+=1){var L=T.get(_)||new Set;L.forEach(function(P){var a=P.key,d=P.node,t=P.children,o=t===void 0?[]:t;D.has(a)&&!h(d)&&o.filter(function(i){return!h(i.node)}).forEach(function(i){D.add(i.key)})})}for(var I=new Set,Z=O;Z>=0;Z-=1){var N=T.get(Z)||new Set;N.forEach(function(P){var a=P.parent,d=P.node;if(!(h(d)||!P.parent||I.has(P.parent.key))){if(h(P.parent.node)){I.add(a.key);return}var t=!0,o=!1;(a.children||[]).filter(function(i){return!h(i.node)}).forEach(function(i){var v=i.key,u=D.has(v);t&&!u&&(t=!1),!o&&(u||k.has(v))&&(o=!0)}),t&&D.add(a.key),o&&k.add(a.key),I.add(a.key)}})}return{checkedKeys:Array.from(D),halfCheckedKeys:Array.from(E(k,D))}}function ee(S,T,O,h,D){for(var k=new Set(S),_=new Set(T),L=0;L<=h;L+=1){var I=O.get(L)||new Set;I.forEach(function(a){var d=a.key,t=a.node,o=a.children,i=o===void 0?[]:o;!k.has(d)&&!_.has(d)&&!D(t)&&i.filter(function(v){return!D(v.node)}).forEach(function(v){k.delete(v.key)})})}_=new Set;for(var Z=new Set,N=h;N>=0;N-=1){var P=O.get(N)||new Set;P.forEach(function(a){var d=a.parent,t=a.node;if(!(D(t)||!a.parent||Z.has(a.parent.key))){if(D(a.parent.node)){Z.add(d.key);return}var o=!0,i=!1;(d.children||[]).filter(function(v){return!D(v.node)}).forEach(function(v){var u=v.key,p=k.has(u);o&&!p&&(o=!1),!i&&(p||_.has(u))&&(i=!0)}),o||k.delete(d.key),i&&_.add(d.key),Z.add(d.key)}})}return{checkedKeys:Array.from(k),halfCheckedKeys:Array.from(E(_,k))}}function J(S,T,O,h){var D=[],k;h?k=h:k=G;var _=new Set(S.filter(function(N){var P=!!O[N];return P||D.push(N),P})),L=new Map,I=0;Object.keys(O).forEach(function(N){var P=O[N],a=P.level,d=L.get(a);d||(d=new Set,L.set(a,d)),d.add(P),I=Math.max(I,a)}),(0,F.ZP)(!D.length,"Tree missing follow keys: ".concat(D.slice(0,100).map(function(N){return"'".concat(N,"'")}).join(", ")));var Z;return T===!0?Z=X(_,L,I,k):Z=ee(_,T.halfCheckedKeys,L,I,k),Z}},1089:function(ne,U,m){"use strict";m.d(U,{km:function(){return h},w$:function(){return D},zn:function(){return _},oH:function(){return L},I8:function(){return Z},H8:function(){return N},F:function(){return P}});var F=m(90484),E=m(85061),G=m(28991),X=m(81253),ee=m(98423),J=m(50344),S=m(80334),T=m(10225),O=["children"];function h(a,d){return a!=null?a:d}function D(a){var d=a||{},t=d.title,o=d._title,i=d.key,v=d.children,u=t||"title";return{title:u,_title:o||[u],key:i||"key",children:v||"children"}}function k(a,d){var t=new Map;function o(i){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(i||[]).forEach(function(u){var p=u[d.key],g=u[d.children];warning(p!=null,"Tree node must have a certain key: [".concat(v).concat(p,"]"));var e=String(p);warning(!t.has(e)||p===null||p===void 0,"Same 'key' exist in the Tree: ".concat(e)),t.set(e,!0),o(g,"".concat(v).concat(e," > "))})}o(a)}function _(a){function d(t){var o=(0,J.Z)(t);return o.map(function(i){if(!(0,T.Ds)(i))return(0,S.ZP)(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var v=i.key,u=i.props,p=u.children,g=(0,X.Z)(u,O),e=(0,G.Z)({key:v},g),l=d(p);return l.length&&(e.children=l),e}).filter(function(i){return i})}return d(a)}function L(a,d,t){var o=D(t),i=o._title,v=o.key,u=o.children,p=new Set(d===!0?[]:d),g=[];function e(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return l.map(function(y,r){for(var n=(0,T.bt)(f?f.pos:"0",r),s=h(y[v],n),c,C=0;C1&&arguments[1]!==void 0?arguments[1]:{},t=d.initWrapper,o=d.processEntity,i=d.onProcessFinished,v=d.externalGetKey,u=d.childrenPropName,p=d.fieldNames,g=arguments.length>2?arguments[2]:void 0,e=v||g,l={},f={},y={posEntities:l,keyEntities:f};return t&&(y=t(y)||y),I(a,function(r){var n=r.node,s=r.index,c=r.pos,C=r.key,M=r.parentPos,b=r.level,x=r.nodes,K={node:n,nodes:x,index:s,key:C,pos:c,level:b},A=h(C,c);l[c]=K,f[A]=K,K.parent=l[M],K.parent&&(K.parent.children=K.parent.children||[],K.parent.children.push(K)),o&&o(K,y)},{externalGetKey:e,childrenPropName:u,fieldNames:p}),i&&i(y),y}function N(a,d){var t=d.expandedKeys,o=d.selectedKeys,i=d.loadedKeys,v=d.loadingKeys,u=d.checkedKeys,p=d.halfCheckedKeys,g=d.dragOverNodeKey,e=d.dropPosition,l=d.keyEntities,f=l[a],y={eventKey:a,expanded:t.indexOf(a)!==-1,selected:o.indexOf(a)!==-1,loaded:i.indexOf(a)!==-1,loading:v.indexOf(a)!==-1,checked:u.indexOf(a)!==-1,halfChecked:p.indexOf(a)!==-1,pos:String(f?f.pos:""),dragOver:g===a&&e===0,dragOverGapTop:g===a&&e===-1,dragOverGapBottom:g===a&&e===1};return y}function P(a){var d=a.data,t=a.expanded,o=a.selected,i=a.checked,v=a.loaded,u=a.loading,p=a.halfChecked,g=a.dragOver,e=a.dragOverGapTop,l=a.dragOverGapBottom,f=a.pos,y=a.active,r=a.eventKey,n=(0,G.Z)((0,G.Z)({},d),{},{expanded:t,selected:o,checked:i,loaded:v,loading:u,halfChecked:p,dragOver:g,dragOverGapTop:e,dragOverGapBottom:l,pos:f,active:y,key:r});return"props"in n||Object.defineProperty(n,"props",{get:function(){return(0,S.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),a}}),n}}}]);