-
Notifications
You must be signed in to change notification settings - Fork 0
/
shared-CcOqu8W5gyvWTCwSsSjXlfsMkg_.a56b0711.async.js
5 lines (5 loc) · 70 KB
/
shared-CcOqu8W5gyvWTCwSsSjXlfsMkg_.a56b0711.async.js
1
2
3
4
5
(self.webpackChunk_dext7r_docs=self.webpackChunk_dext7r_docs||[]).push([[456],{2170:function(lt,st,$){"use strict";var ue=$(57889),he=$(52983),H=$(72745);function ge(M,S){return ze(M)||Ce(M,S)||Se(M,S)||Ee()}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Se(M,S){if(M){if(typeof M=="string")return x(M,S);var l=Object.prototype.toString.call(M).slice(8,-1);if(l==="Object"&&M.constructor&&(l=M.constructor.name),l==="Map"||l==="Set")return Array.from(M);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return x(M,S)}}function x(M,S){(S==null||S>M.length)&&(S=M.length);for(var l=0,Z=new Array(S);l<S;l++)Z[l]=M[l];return Z}function Ce(M,S){var l=M==null?null:typeof Symbol!="undefined"&&M[Symbol.iterator]||M["@@iterator"];if(l!=null){var Z,B,z,R,q=[],W=!0,D=!1;try{if(z=(l=l.call(M)).next,S===0){if(Object(l)!==l)return;W=!1}else for(;!(W=(Z=z.call(l)).done)&&(q.push(Z.value),q.length!==S);W=!0);}catch(V){D=!0,B=V}finally{try{if(!W&&l.return!=null&&(R=l.return(),Object(R)!==R))return}finally{if(D)throw B}}return q}}function ze(M){if(Array.isArray(M))return M}var m={toString:function(S){return typeof S.type=="string"&&S.type in this?"enum"in S?this.enum(S):this[S.type](S):S.type?this.getValidClassName(S)||S.type:"const"in S?"".concat(S.const):"oneOf"in S?this.oneOf(S):"unknown"},string:function(S){return S.type},number:function(S){return S.type},boolean:function(S){return S.type},any:function(S){return S.type},object:function(S){var l=this,Z=[];return Object.entries(S.properties||{}).forEach(function(B){var z,R=ge(B,2),q=R[0],W=R[1];Z.push("".concat(q).concat((z=S.required)!==null&&z!==void 0&&z.includes(q)?"":"?",": ").concat(W.type==="object"?"object":l.toString(W)))}),Z.length?"{ ".concat(Z.join("; ")," }"):"{}"},array:function(S){if(S.items){var l=this.getValidClassName(S.items);return l?"".concat(l,"[]"):"".concat(this.toString(S.items),"[]")}return"any[]"},element:function(S){return"<".concat(S.componentName," />")},function:function(S){var l=this,Z=S.signature;if(!Z)return"Function";var B="oneOf"in Z?Z.oneOf:[Z];return B.map(function(z){return"".concat(z.isAsync?"async ":"","(").concat(z.arguments.map(function(R){return"".concat(R.key,": ").concat(l.toString(R))}).join(", "),") => ").concat(l.toString(z.returnType))}).join(" | ")},dom:function(S){return S.className||"DOM"},enum:function(S){return S.enum.map(function(l){return JSON.stringify(l)}).join(" | ")},oneOf:function(S){var l=this;return S.oneOf.map(function(Z){return l.getValidClassName(Z)||l.toString(Z)}).join(" | ")},getValidClassName:function(S){return"className"in S&&typeof S.className=="string"&&S.className!=="__type"?S.className:null}},Ye=function(S){var l=useState(function(){return m.toString(S)}),Z=ge(l,2),B=Z[0],z=Z[1];return useEffect(function(){z(m.toString(S))},[S]),React.createElement("code",null,B)},oe=function(S){var l,Z=useRouteMeta(),B=Z.frontmatter,z=useAtomAssets(),R=z.components,q=S.id||B.atomId,W=useIntl();if(!q)throw new Error("`id` properties if required for API component!");var D=R==null?void 0:R[q];return React.createElement("div",{className:"markdown"},React.createElement(Table,null,React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",null,W.formatMessage({id:"api.component.name"})),React.createElement("th",null,W.formatMessage({id:"api.component.description"})),React.createElement("th",null,W.formatMessage({id:"api.component.type"})),React.createElement("th",null,W.formatMessage({id:"api.component.default"})))),React.createElement("tbody",null,D&&(l=D.propsConfig)!==null&&l!==void 0&&l.properties?Object.entries(D.propsConfig.properties).map(function(V){var X,fe=ge(V,2),J=fe[0],ie=fe[1];return React.createElement("tr",{key:J},React.createElement("td",null,J),React.createElement("td",null,ie.description||"--"),React.createElement("td",null,React.createElement(Ye,ie)),React.createElement("td",null,React.createElement("code",null,(X=D.propsConfig.required)!==null&&X!==void 0&&X.includes(J)?W.formatMessage({id:"api.component.required"}):JSON.stringify(ie.default)||"--")))}):React.createElement("tr",null,React.createElement("td",{colSpan:4},W.formatMessage({id:"api.component.".concat(R?"not.found":"unavailable")},{id:q}))))))},we=null},82141:function(lt,st,$){"use strict";var ue=$(52983);function he(){return he=Object.assign?Object.assign.bind():function(Ee){for(var Se=1;Se<arguments.length;Se++){var x=arguments[Se];for(var Ce in x)Object.prototype.hasOwnProperty.call(x,Ce)&&(Ee[Ce]=x[Ce])}return Ee},he.apply(this,arguments)}var H=function(Se){return React.createElement("span",he({className:"dumi-default-badge"},Se))},ge=null},72745:function(lt,st,$){"use strict";$.d(st,{Z:function(){return M}});var ue=$(14978),he=$.n(ue),H=$(52983),ge=["children"];function Ee(S,l){return m(S)||ze(S,l)||x(S,l)||Se()}function Se(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(S,l){if(S){if(typeof S=="string")return Ce(S,l);var Z=Object.prototype.toString.call(S).slice(8,-1);if(Z==="Object"&&S.constructor&&(Z=S.constructor.name),Z==="Map"||Z==="Set")return Array.from(S);if(Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z))return Ce(S,l)}}function Ce(S,l){(l==null||l>S.length)&&(l=S.length);for(var Z=0,B=new Array(l);Z<l;Z++)B[Z]=S[Z];return B}function ze(S,l){var Z=S==null?null:typeof Symbol!="undefined"&&S[Symbol.iterator]||S["@@iterator"];if(Z!=null){var B,z,R,q,W=[],D=!0,V=!1;try{if(R=(Z=Z.call(S)).next,l===0){if(Object(Z)!==Z)return;D=!1}else for(;!(D=(B=R.call(Z)).done)&&(W.push(B.value),W.length!==l);D=!0);}catch(X){V=!0,z=X}finally{try{if(!D&&Z.return!=null&&(q=Z.return(),Object(q)!==q))return}finally{if(V)throw z}}return W}}function m(S){if(Array.isArray(S))return S}function Ye(S,l){if(S==null)return{};var Z=oe(S,l),B,z;if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(S);for(z=0;z<R.length;z++)B=R[z],!(l.indexOf(B)>=0)&&Object.prototype.propertyIsEnumerable.call(S,B)&&(Z[B]=S[B])}return Z}function oe(S,l){if(S==null)return{};var Z={},B=Object.keys(S),z,R;for(R=0;R<B.length;R++)z=B[R],!(l.indexOf(z)>=0)&&(Z[z]=S[z]);return Z}var we=function(l){var Z=l.children,B=Ye(l,ge),z=(0,H.useRef)(null),R=(0,H.useState)(!1),q=Ee(R,2),W=q[0],D=q[1],V=(0,H.useState)(!1),X=Ee(V,2),fe=X[0],J=X[1];return(0,H.useEffect)(function(){var ie=z.current;if(ie){var xe=he()(function(){D(ie.scrollLeft>0),J(ie.scrollLeft<ie.scrollWidth-ie.offsetWidth)},100);return xe(),ie.addEventListener("scroll",xe),window.addEventListener("resize",xe),function(){ie.removeEventListener("scroll",xe),window.removeEventListener("resize",xe)}}},[]),H.createElement("div",{className:"dumi-default-table"},H.createElement("div",{className:"dumi-default-table-content",ref:z,"data-left-folded":W||void 0,"data-right-folded":fe||void 0},H.createElement("table",B,Z)))},M=we},27270:function(lt,st,$){"use strict";var ue=$(43131),he=$(49172),H=$(77583),ge=$(54166),Ee=$(66565),Se=$(76384),x=$(39994),Ce=$(65455),ze=$(54322),m=$(56007),Ye=$(51865),oe=$.n(Ye),we=$(89182),M=$(87744),S=$(31194),l=$(52983),Z=l.createContext(null);function B(t){var a=t.dropPosition,i=t.dropLevelOffset,e=t.indent,s={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(a){case-1:s.top=0,s.left=-i*e;break;case 1:s.bottom=0,s.left=-i*e;break;case 0:s.bottom=0,s.left=e;break}return l.createElement("div",{style:s})}function z(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var R=$(67200),q=$(41393),W=$(3454),D=$(63730),V=$(2716),X=l.forwardRef(function(t,a){var i=t.height,e=t.offsetY,s=t.offsetX,c=t.children,f=t.prefixCls,n=t.onInnerResize,r=t.innerProps,o=t.rtl,d=t.extra,u={},v={display:"flex",flexDirection:"column"};return e!==void 0&&(u={height:i,position:"relative",overflow:"hidden"},v=(0,H.Z)((0,H.Z)({},v),{},(0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)({transform:"translateY(".concat(e,"px)")},o?"marginRight":"marginLeft",-s),"position","absolute"),"left",0),"right",0),"top",0))),l.createElement("div",{style:u},l.createElement(V.Z,{onResize:function(g){var y=g.offsetHeight;y&&n&&n()}},l.createElement("div",(0,ue.Z)({style:v,className:oe()((0,m.Z)({},"".concat(f,"-holder-inner"),f)),ref:a},r),c,d)))});X.displayName="Filler";var fe=X,J=$(65357);function ie(t,a){var i="touches"in t?t.touches[0]:t;return i[a?"pageX":"pageY"]}var xe=l.forwardRef(function(t,a){var i=t.prefixCls,e=t.rtl,s=t.scrollOffset,c=t.scrollRange,f=t.onStartMove,n=t.onStopMove,r=t.onScroll,o=t.horizontal,d=t.spinSize,u=t.containerSize,v=t.style,h=t.thumbStyle,g=l.useState(!1),y=(0,R.Z)(g,2),p=y[0],b=y[1],K=l.useState(null),E=(0,R.Z)(K,2),N=E[0],k=E[1],O=l.useState(null),C=(0,R.Z)(O,2),P=C[0],L=C[1],w=!e,T=l.useRef(),F=l.useRef(),j=l.useState(!1),U=(0,R.Z)(j,2),Q=U[0],re=U[1],_=l.useRef(),ee=function(){clearTimeout(_.current),re(!0),_.current=setTimeout(function(){re(!1)},3e3)},be=c-u||0,Le=u-d||0,Ne=l.useMemo(function(){if(s===0||be===0)return 0;var te=s/be;return te*Le},[s,be,Le]),le=function(se){se.stopPropagation(),se.preventDefault()},ye=l.useRef({top:Ne,dragging:p,pageY:N,startTop:P});ye.current={top:Ne,dragging:p,pageY:N,startTop:P};var me=function(se){b(!0),k(ie(se,o)),L(ye.current.top),f(),se.stopPropagation(),se.preventDefault()};l.useEffect(function(){var te=function(et){et.preventDefault()},se=T.current,Ze=F.current;return se.addEventListener("touchstart",te),Ze.addEventListener("touchstart",me),function(){se.removeEventListener("touchstart",te),Ze.removeEventListener("touchstart",me)}},[]);var Pe=l.useRef();Pe.current=be;var We=l.useRef();We.current=Le,l.useEffect(function(){if(p){var te,se=function(et){var Be=ye.current,ht=Be.dragging,tt=Be.pageY,it=Be.startTop;if(J.Z.cancel(te),ht){var Ie=ie(et,o)-tt,nt=it;!w&&o?nt-=Ie:nt+=Ie;var Ue=Pe.current,Y=We.current,Me=Y?nt/Y:0,ce=Math.ceil(Me*Ue);ce=Math.max(ce,0),ce=Math.min(ce,Ue),te=(0,J.Z)(function(){r(ce,o)})}},Ze=function(){b(!1),n()};return window.addEventListener("mousemove",se),window.addEventListener("touchmove",se),window.addEventListener("mouseup",Ze),window.addEventListener("touchend",Ze),function(){window.removeEventListener("mousemove",se),window.removeEventListener("touchmove",se),window.removeEventListener("mouseup",Ze),window.removeEventListener("touchend",Ze),J.Z.cancel(te)}}},[p]),l.useEffect(function(){ee()},[s]),l.useImperativeHandle(a,function(){return{delayHidden:ee}});var ke="".concat(i,"-scrollbar"),ve={position:"absolute",visibility:Q?null:"hidden"},de={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return o?(ve.height=8,ve.left=0,ve.right=0,ve.bottom=0,de.height="100%",de.width=d,w?de.left=Ne:de.right=Ne):(ve.width=8,ve.top=0,ve.bottom=0,w?ve.right=0:ve.left=0,de.width="100%",de.height=d,de.top=Ne),l.createElement("div",{ref:T,className:oe()(ke,(0,m.Z)((0,m.Z)((0,m.Z)({},"".concat(ke,"-horizontal"),o),"".concat(ke,"-vertical"),!o),"".concat(ke,"-visible"),Q)),style:(0,H.Z)((0,H.Z)({},ve),v),onMouseDown:le,onMouseMove:ee},l.createElement("div",{ref:F,className:oe()("".concat(ke,"-thumb"),(0,m.Z)({},"".concat(ke,"-thumb-moving"),p)),style:(0,H.Z)((0,H.Z)({},de),h),onMouseDown:me}))}),Ke=xe;function je(t){var a=t.children,i=t.setRef,e=l.useCallback(function(s){i(s)},[]);return l.cloneElement(a,{ref:e})}function Xe(t,a,i,e,s,c,f){var n=f.getKey;return t.slice(a,i+1).map(function(r,o){var d=a+o,u=c(r,d,{style:{width:e}}),v=n(r);return l.createElement(je,{key:v,setRef:function(g){return s(r,g)}},u)})}var mt=$(42237),Je=function(){function t(){(0,Ee.Z)(this,t),(0,m.Z)(this,"maps",void 0),(0,m.Z)(this,"id",0),this.maps=Object.create(null)}return(0,Se.Z)(t,[{key:"set",value:function(i,e){this.maps[i]=e,this.id+=1}},{key:"get",value:function(i){return this.maps[i]}}]),t}(),dt=Je;function ct(t,a,i){var e=l.useState(0),s=(0,R.Z)(e,2),c=s[0],f=s[1],n=(0,l.useRef)(new Map),r=(0,l.useRef)(new dt),o=(0,l.useRef)();function d(){J.Z.cancel(o.current)}function u(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;d();var g=function(){n.current.forEach(function(p,b){if(p&&p.offsetParent){var K=(0,mt.Z)(p),E=K.offsetHeight;r.current.get(b)!==E&&r.current.set(b,K.offsetHeight)}}),f(function(p){return p+1})};h?g():o.current=(0,J.Z)(g)}function v(h,g){var y=t(h),p=n.current.get(y);g?(n.current.set(y,g),u()):n.current.delete(y),!p!=!g&&(g?a==null||a(h):i==null||i(h))}return(0,l.useEffect)(function(){return d},[]),[v,u,r.current,c]}var St=$(58483),kt=10;function bt(t,a,i,e,s,c,f,n){var r=l.useRef(),o=l.useState(null),d=(0,R.Z)(o,2),u=d[0],v=d[1];return(0,W.Z)(function(){if(u&&u.times<kt){if(!t.current){v(function(be){return(0,H.Z)({},be)});return}c();var h=u.targetAlign,g=u.originAlign,y=u.index,p=u.offset,b=t.current.clientHeight,K=!1,E=h,N=null;if(b){for(var k=h||g,O=0,C=0,P=0,L=Math.min(a.length-1,y),w=0;w<=L;w+=1){var T=s(a[w]);C=O;var F=i.get(T);P=C+(F===void 0?e:F),O=P}for(var j=k==="top"?p:b-p,U=L;U>=0;U-=1){var Q=s(a[U]),re=i.get(Q);if(re===void 0){K=!0;break}if(j-=re,j<=0)break}switch(k){case"top":N=C-p;break;case"bottom":N=P-b+p;break;default:{var _=t.current.scrollTop,ee=_+b;C<_?E="top":P>ee&&(E="bottom")}}N!==null&&f(N),N!==u.lastTop&&(K=!0)}K&&v((0,H.Z)((0,H.Z)({},u),{},{times:u.times+1,targetAlign:E,lastTop:N}))}},[u,t.current]),function(h){if(h==null){n();return}if(J.Z.cancel(r.current),typeof h=="number")f(h);else if(h&&(0,he.Z)(h)==="object"){var g,y=h.align;"index"in h?g=h.index:g=a.findIndex(function(K){return s(K)===h.key});var p=h.offset,b=p===void 0?0:p;v({times:0,index:g,offset:b,originAlign:y})}}}function ut(t,a,i,e){var s=i-t,c=a-i,f=Math.min(s,c)*2;if(e<=f){var n=Math.floor(e/2);return e%2?i+n+1:i-n}return s>c?i-(e-c):i+(e-s)}function Et(t,a,i){var e=t.length,s=a.length,c,f;if(e===0&&s===0)return null;e<s?(c=t,f=a):(c=a,f=t);var n={__EMPTY_ITEM__:!0};function r(g){return g!==void 0?i(g):n}for(var o=null,d=Math.abs(e-s)!==1,u=0;u<f.length;u+=1){var v=r(c[u]),h=r(f[u]);if(v!==h){o=u,d=d||v!==r(f[u+1]);break}}return o===null?null:{index:o,multiple:d}}function Zt(t,a,i){var e=l.useState(t),s=(0,R.Z)(e,2),c=s[0],f=s[1],n=l.useState(null),r=(0,R.Z)(n,2),o=r[0],d=r[1];return l.useEffect(function(){var u=Et(c||[],t||[],a);(u==null?void 0:u.index)!==void 0&&(i==null||i(u.index),d(t[u.index])),f(t)},[t]),[o]}var Ct=(typeof navigator=="undefined"?"undefined":(0,he.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),ot=Ct,ne=function(t,a){var i=(0,l.useRef)(!1),e=(0,l.useRef)(null);function s(){clearTimeout(e.current),i.current=!0,e.current=setTimeout(function(){i.current=!1},50)}var c=(0,l.useRef)({top:t,bottom:a});return c.current.top=t,c.current.bottom=a,function(f){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=f<0&&c.current.top||f>0&&c.current.bottom;return n&&r?(clearTimeout(e.current),i.current=!1):(!r||i.current)&&s(),!i.current&&r}};function Ae(t,a,i,e,s){var c=(0,l.useRef)(0),f=(0,l.useRef)(null),n=(0,l.useRef)(null),r=(0,l.useRef)(!1),o=ne(a,i);function d(p,b){J.Z.cancel(f.current),c.current+=b,n.current=b,!o(b)&&(ot||p.preventDefault(),f.current=(0,J.Z)(function(){var K=r.current?10:1;s(c.current*K),c.current=0}))}function u(p,b){s(b,!0),ot||p.preventDefault()}var v=(0,l.useRef)(null),h=(0,l.useRef)(null);function g(p){if(t){J.Z.cancel(h.current),h.current=(0,J.Z)(function(){v.current=null},2);var b=p.deltaX,K=p.deltaY,E=p.shiftKey,N=b,k=K;(v.current==="sx"||!v.current&&E&&K&&!b)&&(N=K,k=0,v.current="sx");var O=Math.abs(N),C=Math.abs(k);v.current===null&&(v.current=e&&O>C?"x":"y"),v.current==="y"?d(p,k):u(p,N)}}function y(p){t&&(r.current=p.detail===n.current)}return[g,y]}var Qe=14/15;function xt(t,a,i){var e=(0,l.useRef)(!1),s=(0,l.useRef)(0),c=(0,l.useRef)(null),f=(0,l.useRef)(null),n,r=function(v){if(e.current){var h=Math.ceil(v.touches[0].pageY),g=s.current-h;s.current=h,i(g)&&v.preventDefault(),clearInterval(f.current),f.current=setInterval(function(){g*=Qe,(!i(g,!0)||Math.abs(g)<=.1)&&clearInterval(f.current)},16)}},o=function(){e.current=!1,n()},d=function(v){n(),v.touches.length===1&&!e.current&&(e.current=!0,s.current=Math.ceil(v.touches[0].pageY),c.current=v.target,c.current.addEventListener("touchmove",r),c.current.addEventListener("touchend",o))};n=function(){c.current&&(c.current.removeEventListener("touchmove",r),c.current.removeEventListener("touchend",o))},(0,W.Z)(function(){return t&&a.current.addEventListener("touchstart",d),function(){var u;(u=a.current)===null||u===void 0||u.removeEventListener("touchstart",d),n(),clearInterval(f.current)}},[t])}var Zn=20;function Ut(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=t/a*t;return isNaN(i)&&(i=0),i=Math.max(i,Zn),Math.floor(i)}function Cn(t,a,i,e){var s=l.useMemo(function(){return[new Map,[]]},[t,i.id,e]),c=(0,R.Z)(s,2),f=c[0],n=c[1],r=function(d){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d,v=f.get(d),h=f.get(u);if(v===void 0||h===void 0)for(var g=t.length,y=n.length;y<g;y+=1){var p,b=t[y],K=a(b);f.set(K,y);var E=(p=i.get(K))!==null&&p!==void 0?p:e;if(n[y]=(n[y-1]||0)+E,K===d&&(v=y),K===u&&(h=y),v!==void 0&&h!==void 0)break}return{top:n[v-1]||0,bottom:n[h]}};return r}var Rn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Dn=[],On={overflowY:"auto",overflowAnchor:"none"};function Tn(t,a){var i=t.prefixCls,e=i===void 0?"rc-virtual-list":i,s=t.className,c=t.height,f=t.itemHeight,n=t.fullHeight,r=n===void 0?!0:n,o=t.style,d=t.data,u=t.children,v=t.itemKey,h=t.virtual,g=t.direction,y=t.scrollWidth,p=t.component,b=p===void 0?"div":p,K=t.onScroll,E=t.onVirtualScroll,N=t.onVisibleChange,k=t.innerProps,O=t.extraRender,C=t.styles,P=(0,q.Z)(t,Rn),L=!!(h!==!1&&c&&f),w=L&&d&&(f*d.length>c||!!y),T=g==="rtl",F=oe()(e,(0,m.Z)({},"".concat(e,"-rtl"),T),s),j=d||Dn,U=(0,l.useRef)(),Q=(0,l.useRef)(),re=(0,l.useState)(0),_=(0,R.Z)(re,2),ee=_[0],be=_[1],Le=(0,l.useState)(0),Ne=(0,R.Z)(Le,2),le=Ne[0],ye=Ne[1],me=(0,l.useState)(!1),Pe=(0,R.Z)(me,2),We=Pe[0],ke=Pe[1],ve=function(){ke(!0)},de=function(){ke(!1)},te=l.useCallback(function(I){return typeof v=="function"?v(I):I==null?void 0:I[v]},[v]),se={getKey:te};function Ze(I){be(function(A){var G;typeof I=="function"?G=I(A):G=I;var pe=Pr(G);return U.current.scrollTop=pe,pe})}var Fe=(0,l.useRef)({start:0,end:j.length}),et=(0,l.useRef)(),Be=Zt(j,te),ht=(0,R.Z)(Be,1),tt=ht[0];et.current=tt;var it=ct(te,null,null),Ie=(0,R.Z)(it,4),nt=Ie[0],Ue=Ie[1],Y=Ie[2],Me=Ie[3],ce=l.useMemo(function(){if(!L)return{scrollHeight:void 0,start:0,end:j.length-1,offset:void 0};if(!w){var I;return{scrollHeight:((I=Q.current)===null||I===void 0?void 0:I.offsetHeight)||0,start:0,end:j.length-1,offset:void 0}}for(var A=0,G,pe,Ve,Hr=j.length,yt=0;yt<Hr;yt+=1){var Fr=j[yt],zr=te(Fr),kn=Y.get(zr),Bt=A+(kn===void 0?f:kn);Bt>=ee&&G===void 0&&(G=yt,pe=A),Bt>ee+c&&Ve===void 0&&(Ve=yt),A=Bt}return G===void 0&&(G=0,pe=0,Ve=Math.ceil(c/f)),Ve===void 0&&(Ve=j.length-1),Ve=Math.min(Ve+1,j.length-1),{scrollHeight:A,start:G,end:Ve,offset:pe}},[w,L,ee,j,Me,c]),De=ce.scrollHeight,Oe=ce.start,Te=ce.end,rt=ce.offset;Fe.current.start=Oe,Fe.current.end=Te;var at=l.useState({width:0,height:c}),Ge=(0,R.Z)(at,2),$e=Ge[0],Rr=Ge[1],Dr=function(A){Rr({width:A.width||A.offsetWidth,height:A.height||A.offsetHeight})},hn=(0,l.useRef)(),gn=(0,l.useRef)(),Or=l.useMemo(function(){return Ut($e.width,y)},[$e.width,y]),Tr=l.useMemo(function(){return Ut($e.height,De)},[$e.height,De]),$t=De-c,jt=(0,l.useRef)($t);jt.current=$t;function Pr(I){var A=I;return Number.isNaN(jt.current)||(A=Math.min(A,jt.current)),A=Math.max(A,0),A}var yn=ee<=0,mn=ee>=$t,Mr=ne(yn,mn),Ht=function(){return{x:T?-le:le,y:ee}},Ft=(0,l.useRef)(Ht()),zt=(0,St.zX)(function(){if(E){var I=Ht();(Ft.current.x!==I.x||Ft.current.y!==I.y)&&(E(I),Ft.current=I)}});function Sn(I,A){var G=I;A?((0,D.flushSync)(function(){ye(G)}),zt()):Ze(G)}function wr(I){var A=I.currentTarget.scrollTop;A!==ee&&Ze(A),K==null||K(I),zt()}var _t=function(A){var G=A,pe=y-$e.width;return G=Math.max(G,0),G=Math.min(G,pe),G},Lr=(0,St.zX)(function(I,A){A?((0,D.flushSync)(function(){ye(function(G){var pe=G+(T?-I:I);return _t(pe)})}),zt()):Ze(function(G){var pe=G+I;return pe})}),Ir=Ae(L,yn,mn,!!y,Lr),bn=(0,R.Z)(Ir,2),Wt=bn[0],En=bn[1];xt(L,U,function(I,A){return Mr(I,A)?!1:(Wt({preventDefault:function(){},deltaY:I}),!0)}),(0,W.Z)(function(){function I(G){L&&G.preventDefault()}var A=U.current;return A.addEventListener("wheel",Wt),A.addEventListener("DOMMouseScroll",En),A.addEventListener("MozMousePixelScroll",I),function(){A.removeEventListener("wheel",Wt),A.removeEventListener("DOMMouseScroll",En),A.removeEventListener("MozMousePixelScroll",I)}},[L]),(0,W.Z)(function(){y&&ye(function(I){return _t(I)})},[$e.width,y]);var xn=function(){var A,G;(A=hn.current)===null||A===void 0||A.delayHidden(),(G=gn.current)===null||G===void 0||G.delayHidden()},Kn=bt(U,j,Y,f,te,function(){return Ue(!0)},Ze,xn);l.useImperativeHandle(a,function(){return{getScrollInfo:Ht,scrollTo:function(A){function G(pe){return pe&&(0,he.Z)(pe)==="object"&&("left"in pe||"top"in pe)}G(A)?(A.left!==void 0&&ye(_t(A.left)),Kn(A.top)):Kn(A)}}}),(0,W.Z)(function(){if(N){var I=j.slice(Oe,Te+1);N(I,j)}},[Oe,Te,j]);var Ar=Cn(j,te,Y,f),$r=O==null?void 0:O({start:Oe,end:Te,virtual:w,offsetX:le,offsetY:rt,rtl:T,getSize:Ar}),jr=Xe(j,Oe,Te,y,nt,u,se),gt=null;c&&(gt=(0,H.Z)((0,m.Z)({},r?"height":"maxHeight",c),On),L&&(gt.overflowY="hidden",y&&(gt.overflowX="hidden"),We&&(gt.pointerEvents="none")));var Nn={};return T&&(Nn.dir="rtl"),l.createElement("div",(0,ue.Z)({style:(0,H.Z)((0,H.Z)({},o),{},{position:"relative"}),className:F},Nn,P),l.createElement(V.Z,{onResize:Dr},l.createElement(b,{className:"".concat(e,"-holder"),style:gt,ref:U,onScroll:wr,onMouseEnter:xn},l.createElement(fe,{prefixCls:e,height:De,offsetX:le,offsetY:rt,scrollWidth:y,onInnerResize:Ue,ref:Q,innerProps:k,rtl:T,extra:$r},jr))),w&&De>c&&l.createElement(Ke,{ref:hn,prefixCls:e,scrollOffset:ee,scrollRange:De,rtl:T,onScroll:Sn,onStartMove:ve,onStopMove:de,spinSize:Tr,containerSize:$e.height,style:C==null?void 0:C.verticalScrollBar,thumbStyle:C==null?void 0:C.verticalScrollBarThumb}),w&&y>$e.width&&l.createElement(Ke,{ref:gn,prefixCls:e,scrollOffset:le,scrollRange:y,rtl:T,onScroll:Sn,onStartMove:ve,onStopMove:de,spinSize:Or,containerSize:$e.width,horizontal:!0,style:C==null?void 0:C.horizontalScrollBar,thumbStyle:C==null?void 0:C.horizontalScrollBarThumb}))}var Gt=l.forwardRef(Tn);Gt.displayName="List";var Pn=Gt,Mn=Pn,wn=$(59078),Ln=function(a){for(var i=a.prefixCls,e=a.level,s=a.isStart,c=a.isEnd,f="".concat(i,"-indent-unit"),n=[],r=0;r<e;r+=1)n.push(l.createElement("span",{key:r,className:oe()(f,(0,m.Z)((0,m.Z)({},"".concat(f,"-start"),s[r]),"".concat(f,"-end"),c[r]))}));return l.createElement("span",{"aria-hidden":"true",className:"".concat(i,"-indent")},n)},In=l.memo(Ln);function Re(t,a){return t[a]}var An=$(9498),$n=$(13066),jn=["children"];function Vt(t,a){return"".concat(t,"-").concat(a)}function Hn(t){return t&&t.type&&t.type.isTreeNode}function ft(t,a){return t!=null?t:a}function Kt(t){var a=t||{},i=a.title,e=a._title,s=a.key,c=a.children,f=i||"title";return{title:f,_title:e||[f],key:s||"key",children:c||"children"}}function _r(t,a){var i=new Map;function e(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(s||[]).forEach(function(f){var n=f[a.key],r=f[a.children];warning(n!=null,"Tree node must have a certain key: [".concat(c).concat(n,"]"));var o=String(n);warning(!i.has(o)||n===null||n===void 0,"Same 'key' exist in the Tree: ".concat(o)),i.set(o,!0),e(r,"".concat(c).concat(o," > "))})}e(t)}function Fn(t){function a(i){var e=(0,An.Z)(i);return e.map(function(s){if(!Hn(s))return(0,S.ZP)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var c=s.key,f=s.props,n=f.children,r=(0,q.Z)(f,jn),o=(0,H.Z)({key:c},r),d=a(n);return d.length&&(o.children=d),o}).filter(function(s){return s})}return a(t)}function Rt(t,a,i){var e=Kt(i),s=e._title,c=e.key,f=e.children,n=new Set(a===!0?[]:a),r=[];function o(d){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return d.map(function(v,h){for(var g=Vt(u?u.pos:"0",h),y=ft(v[c],g),p,b=0;b<s.length;b+=1){var K=s[b];if(v[K]!==void 0){p=v[K];break}}var E=(0,H.Z)((0,H.Z)({},(0,$n.Z)(v,[].concat((0,ge.Z)(s),[c,f]))),{},{title:p,key:y,parent:u,pos:g,children:null,data:v,isStart:[].concat((0,ge.Z)(u?u.isStart:[]),[h===0]),isEnd:[].concat((0,ge.Z)(u?u.isEnd:[]),[h===d.length-1])});return r.push(E),a===!0||n.has(y)?E.children=o(v[f]||[],E):E.children=[],E})}return o(t),r}function zn(t,a,i){var e={};(0,he.Z)(i)==="object"?e=i:e={externalGetKey:i},e=e||{};var s=e,c=s.childrenPropName,f=s.externalGetKey,n=s.fieldNames,r=Kt(n),o=r.key,d=r.children,u=c||d,v;f?typeof f=="string"?v=function(y){return y[f]}:typeof f=="function"&&(v=function(y){return f(y)}):v=function(y,p){return ft(y[o],p)};function h(g,y,p,b){var K=g?g[u]:t,E=g?Vt(p.pos,y):"0",N=g?[].concat((0,ge.Z)(b),[g]):[];if(g){var k=v(g,E),O={node:g,index:y,pos:E,key:k,parentPos:p.node?p.pos:null,level:p.level+1,nodes:N};a(O)}K&&K.forEach(function(C,P){h(C,P,{node:g,pos:E,level:p?p.level+1:-1},N)})}h(null)}function _n(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=a.initWrapper,e=a.processEntity,s=a.onProcessFinished,c=a.externalGetKey,f=a.childrenPropName,n=a.fieldNames,r=arguments.length>2?arguments[2]:void 0,o=c||r,d={},u={},v={posEntities:d,keyEntities:u};return i&&(v=i(v)||v),zn(t,function(h){var g=h.node,y=h.index,p=h.pos,b=h.key,K=h.parentPos,E=h.level,N=h.nodes,k={node:g,nodes:N,index:y,key:b,pos:p,level:E},O=ft(b,p);d[p]=k,u[O]=k,k.parent=d[K],k.parent&&(k.parent.children=k.parent.children||[],k.parent.children.push(k)),e&&e(k,v)},{externalGetKey:o,childrenPropName:f,fieldNames:n}),s&&s(v),v}function vt(t,a){var i=a.expandedKeys,e=a.selectedKeys,s=a.loadedKeys,c=a.loadingKeys,f=a.checkedKeys,n=a.halfCheckedKeys,r=a.dragOverNodeKey,o=a.dropPosition,d=a.keyEntities,u=Re(d,t),v={eventKey:t,expanded:i.indexOf(t)!==-1,selected:e.indexOf(t)!==-1,loaded:s.indexOf(t)!==-1,loading:c.indexOf(t)!==-1,checked:f.indexOf(t)!==-1,halfChecked:n.indexOf(t)!==-1,pos:String(u?u.pos:""),dragOver:r===t&&o===0,dragOverGapTop:r===t&&o===-1,dragOverGapBottom:r===t&&o===1};return v}function ae(t){var a=t.data,i=t.expanded,e=t.selected,s=t.checked,c=t.loaded,f=t.loading,n=t.halfChecked,r=t.dragOver,o=t.dragOverGapTop,d=t.dragOverGapBottom,u=t.pos,v=t.active,h=t.eventKey,g=(0,H.Z)((0,H.Z)({},a),{},{expanded:i,selected:e,checked:s,loaded:c,loading:f,halfChecked:n,dragOver:r,dragOverGapTop:o,dragOverGapBottom:d,pos:u,active:v,key:h});return"props"in g||Object.defineProperty(g,"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`."),t}}),g}var Wn=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Yt="open",Xt="close",Bn="---",Un=function(t){(0,Ce.Z)(i,t);var a=(0,ze.Z)(i);function i(){var e;(0,Ee.Z)(this,i);for(var s=arguments.length,c=new Array(s),f=0;f<s;f++)c[f]=arguments[f];return e=a.call.apply(a,[this].concat(c)),(0,m.Z)((0,x.Z)(e),"state",{dragNodeHighlight:!1}),(0,m.Z)((0,x.Z)(e),"selectHandle",void 0),(0,m.Z)((0,x.Z)(e),"cacheIndent",void 0),(0,m.Z)((0,x.Z)(e),"onSelectorClick",function(n){var r=e.props.context.onNodeClick;r(n,ae(e.props)),e.isSelectable()?e.onSelect(n):e.onCheck(n)}),(0,m.Z)((0,x.Z)(e),"onSelectorDoubleClick",function(n){var r=e.props.context.onNodeDoubleClick;r(n,ae(e.props))}),(0,m.Z)((0,x.Z)(e),"onSelect",function(n){if(!e.isDisabled()){var r=e.props.context.onNodeSelect;r(n,ae(e.props))}}),(0,m.Z)((0,x.Z)(e),"onCheck",function(n){if(!e.isDisabled()){var r=e.props,o=r.disableCheckbox,d=r.checked,u=e.props.context.onNodeCheck;if(!(!e.isCheckable()||o)){var v=!d;u(n,ae(e.props),v)}}}),(0,m.Z)((0,x.Z)(e),"onMouseEnter",function(n){var r=e.props.context.onNodeMouseEnter;r(n,ae(e.props))}),(0,m.Z)((0,x.Z)(e),"onMouseLeave",function(n){var r=e.props.context.onNodeMouseLeave;r(n,ae(e.props))}),(0,m.Z)((0,x.Z)(e),"onContextMenu",function(n){var r=e.props.context.onNodeContextMenu;r(n,ae(e.props))}),(0,m.Z)((0,x.Z)(e),"onDragStart",function(n){var r=e.props.context.onNodeDragStart;n.stopPropagation(),e.setState({dragNodeHighlight:!0}),r(n,(0,x.Z)(e));try{n.dataTransfer.setData("text/plain","")}catch(o){}}),(0,m.Z)((0,x.Z)(e),"onDragEnter",function(n){var r=e.props.context.onNodeDragEnter;n.preventDefault(),n.stopPropagation(),r(n,(0,x.Z)(e))}),(0,m.Z)((0,x.Z)(e),"onDragOver",function(n){var r=e.props.context.onNodeDragOver;n.preventDefault(),n.stopPropagation(),r(n,(0,x.Z)(e))}),(0,m.Z)((0,x.Z)(e),"onDragLeave",function(n){var r=e.props.context.onNodeDragLeave;n.stopPropagation(),r(n,(0,x.Z)(e))}),(0,m.Z)((0,x.Z)(e),"onDragEnd",function(n){var r=e.props.context.onNodeDragEnd;n.stopPropagation(),e.setState({dragNodeHighlight:!1}),r(n,(0,x.Z)(e))}),(0,m.Z)((0,x.Z)(e),"onDrop",function(n){var r=e.props.context.onNodeDrop;n.preventDefault(),n.stopPropagation(),e.setState({dragNodeHighlight:!1}),r(n,(0,x.Z)(e))}),(0,m.Z)((0,x.Z)(e),"onExpand",function(n){var r=e.props,o=r.loading,d=r.context.onNodeExpand;o||d(n,ae(e.props))}),(0,m.Z)((0,x.Z)(e),"setSelectHandle",function(n){e.selectHandle=n}),(0,m.Z)((0,x.Z)(e),"getNodeState",function(){var n=e.props.expanded;return e.isLeaf()?null:n?Yt:Xt}),(0,m.Z)((0,x.Z)(e),"hasChildren",function(){var n=e.props.eventKey,r=e.props.context.keyEntities,o=Re(r,n)||{},d=o.children;return!!(d||[]).length}),(0,m.Z)((0,x.Z)(e),"isLeaf",function(){var n=e.props,r=n.isLeaf,o=n.loaded,d=e.props.context.loadData,u=e.hasChildren();return r===!1?!1:r||!d&&!u||d&&o&&!u}),(0,m.Z)((0,x.Z)(e),"isDisabled",function(){var n=e.props.disabled,r=e.props.context.disabled;return!!(r||n)}),(0,m.Z)((0,x.Z)(e),"isCheckable",function(){var n=e.props.checkable,r=e.props.context.checkable;return!r||n===!1?!1:r}),(0,m.Z)((0,x.Z)(e),"syncLoadData",function(n){var r=n.expanded,o=n.loading,d=n.loaded,u=e.props.context,v=u.loadData,h=u.onNodeLoad;o||v&&r&&!e.isLeaf()&&!e.hasChildren()&&!d&&h(ae(e.props))}),(0,m.Z)((0,x.Z)(e),"isDraggable",function(){var n=e.props,r=n.data,o=n.context.draggable;return!!(o&&(!o.nodeDraggable||o.nodeDraggable(r)))}),(0,m.Z)((0,x.Z)(e),"renderDragHandler",function(){var n=e.props.context,r=n.draggable,o=n.prefixCls;return r!=null&&r.icon?l.createElement("span",{className:"".concat(o,"-draggable-icon")},r.icon):null}),(0,m.Z)((0,x.Z)(e),"renderSwitcherIconDom",function(n){var r=e.props.switcherIcon,o=e.props.context.switcherIcon,d=r||o;return typeof d=="function"?d((0,H.Z)((0,H.Z)({},e.props),{},{isLeaf:n})):d}),(0,m.Z)((0,x.Z)(e),"renderSwitcher",function(){var n=e.props.expanded,r=e.props.context.prefixCls;if(e.isLeaf()){var o=e.renderSwitcherIconDom(!0);return o!==!1?l.createElement("span",{className:oe()("".concat(r,"-switcher"),"".concat(r,"-switcher-noop"))},o):null}var d=oe()("".concat(r,"-switcher"),"".concat(r,"-switcher_").concat(n?Yt:Xt)),u=e.renderSwitcherIconDom(!1);return u!==!1?l.createElement("span",{onClick:e.onExpand,className:d},u):null}),(0,m.Z)((0,x.Z)(e),"renderCheckbox",function(){var n=e.props,r=n.checked,o=n.halfChecked,d=n.disableCheckbox,u=e.props.context.prefixCls,v=e.isDisabled(),h=e.isCheckable();if(!h)return null;var g=typeof h!="boolean"?h:null;return l.createElement("span",{className:oe()("".concat(u,"-checkbox"),r&&"".concat(u,"-checkbox-checked"),!r&&o&&"".concat(u,"-checkbox-indeterminate"),(v||d)&&"".concat(u,"-checkbox-disabled")),onClick:e.onCheck},g)}),(0,m.Z)((0,x.Z)(e),"renderIcon",function(){var n=e.props.loading,r=e.props.context.prefixCls;return l.createElement("span",{className:oe()("".concat(r,"-iconEle"),"".concat(r,"-icon__").concat(e.getNodeState()||"docu"),n&&"".concat(r,"-icon_loading"))})}),(0,m.Z)((0,x.Z)(e),"renderSelector",function(){var n=e.state.dragNodeHighlight,r=e.props,o=r.title,d=o===void 0?Bn:o,u=r.selected,v=r.icon,h=r.loading,g=r.data,y=e.props.context,p=y.prefixCls,b=y.showIcon,K=y.icon,E=y.loadData,N=y.titleRender,k=e.isDisabled(),O="".concat(p,"-node-content-wrapper"),C;if(b){var P=v||K;C=P?l.createElement("span",{className:oe()("".concat(p,"-iconEle"),"".concat(p,"-icon__customize"))},typeof P=="function"?P(e.props):P):e.renderIcon()}else E&&h&&(C=e.renderIcon());var L;typeof d=="function"?L=d(g):N?L=N(g):L=d;var w=l.createElement("span",{className:"".concat(p,"-title")},L);return l.createElement("span",{ref:e.setSelectHandle,title:typeof d=="string"?d:"",className:oe()("".concat(O),"".concat(O,"-").concat(e.getNodeState()||"normal"),!k&&(u||n)&&"".concat(p,"-node-selected")),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onContextMenu:e.onContextMenu,onClick:e.onSelectorClick,onDoubleClick:e.onSelectorDoubleClick},C,w,e.renderDropIndicator())}),(0,m.Z)((0,x.Z)(e),"renderDropIndicator",function(){var n=e.props,r=n.disabled,o=n.eventKey,d=e.props.context,u=d.draggable,v=d.dropLevelOffset,h=d.dropPosition,g=d.prefixCls,y=d.indent,p=d.dropIndicatorRender,b=d.dragOverNodeKey,K=d.direction,E=!!u,N=!r&&E&&b===o,k=y!=null?y:e.cacheIndent;return e.cacheIndent=y,N?p({dropPosition:h,dropLevelOffset:v,indent:k,prefixCls:g,direction:K}):null}),e}return(0,Se.Z)(i,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var s=this.props.selectable,c=this.props.context.selectable;return typeof s=="boolean"?s:c}},{key:"render",value:function(){var s,c=this.props,f=c.eventKey,n=c.className,r=c.style,o=c.dragOver,d=c.dragOverGapTop,u=c.dragOverGapBottom,v=c.isLeaf,h=c.isStart,g=c.isEnd,y=c.expanded,p=c.selected,b=c.checked,K=c.halfChecked,E=c.loading,N=c.domRef,k=c.active,O=c.data,C=c.onMouseMove,P=c.selectable,L=(0,q.Z)(c,Wn),w=this.props.context,T=w.prefixCls,F=w.filterTreeNode,j=w.keyEntities,U=w.dropContainerKey,Q=w.dropTargetKey,re=w.draggingNodeKey,_=this.isDisabled(),ee=(0,M.Z)(L,{aria:!0,data:!0}),be=Re(j,f)||{},Le=be.level,Ne=g[g.length-1],le=this.isDraggable(),ye=!_&&le,me=re===f,Pe=P!==void 0?{"aria-selected":!!P}:void 0;return l.createElement("div",(0,ue.Z)({ref:N,className:oe()(n,"".concat(T,"-treenode"),(s={},(0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)(s,"".concat(T,"-treenode-disabled"),_),"".concat(T,"-treenode-switcher-").concat(y?"open":"close"),!v),"".concat(T,"-treenode-checkbox-checked"),b),"".concat(T,"-treenode-checkbox-indeterminate"),K),"".concat(T,"-treenode-selected"),p),"".concat(T,"-treenode-loading"),E),"".concat(T,"-treenode-active"),k),"".concat(T,"-treenode-leaf-last"),Ne),"".concat(T,"-treenode-draggable"),le),"dragging",me),(0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)(s,"drop-target",Q===f),"drop-container",U===f),"drag-over",!_&&o),"drag-over-gap-top",!_&&d),"drag-over-gap-bottom",!_&&u),"filter-node",F&&F(ae(this.props))))),style:r,draggable:ye,"aria-grabbed":me,onDragStart:ye?this.onDragStart:void 0,onDragEnter:le?this.onDragEnter:void 0,onDragOver:le?this.onDragOver:void 0,onDragLeave:le?this.onDragLeave:void 0,onDrop:le?this.onDrop:void 0,onDragEnd:le?this.onDragEnd:void 0,onMouseMove:C},Pe,ee),l.createElement(In,{prefixCls:T,level:Le,isStart:h,isEnd:g}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),i}(l.Component),Dt=function(a){return l.createElement(Z.Consumer,null,function(i){return l.createElement(Un,(0,ue.Z)({},a,{context:i}))})};Dt.displayName="TreeNode",Dt.isTreeNode=1;var Ot=Dt;function Gn(t,a){var i=l.useState(!1),e=(0,R.Z)(i,2),s=e[0],c=e[1];(0,W.Z)(function(){if(s)return t(),function(){a()}},[s]),(0,W.Z)(function(){return c(!0),function(){c(!1)}},[])}var Vn=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Jt=function(a,i){var e=a.className,s=a.style,c=a.motion,f=a.motionNodes,n=a.motionType,r=a.onMotionStart,o=a.onMotionEnd,d=a.active,u=a.treeNodeRequiredProps,v=(0,q.Z)(a,Vn),h=l.useState(!0),g=(0,R.Z)(h,2),y=g[0],p=g[1],b=l.useContext(Z),K=b.prefixCls,E=f&&n!=="hide";(0,W.Z)(function(){f&&E!==y&&p(E)},[f]);var N=function(){f&&r()},k=l.useRef(!1),O=function(){f&&!k.current&&(k.current=!0,o())};Gn(N,O);var C=function(L){E===L&&O()};return f?l.createElement(wn.ZP,(0,ue.Z)({ref:i,visible:y},c,{motionAppear:n==="show",onVisibleChanged:C}),function(P,L){var w=P.className,T=P.style;return l.createElement("div",{ref:L,className:oe()("".concat(K,"-treenode-motion"),w),style:T},f.map(function(F){var j=Object.assign({},(z(F.data),F.data)),U=F.title,Q=F.key,re=F.isStart,_=F.isEnd;delete j.children;var ee=vt(Q,u);return l.createElement(Ot,(0,ue.Z)({},j,ee,{title:U,active:d,data:F.data,key:Q,isStart:re,isEnd:_}))}))}):l.createElement(Ot,(0,ue.Z)({domRef:i,className:e,style:s},v,{active:d}))};Jt.displayName="MotionTreeNode";var Yn=l.forwardRef(Jt),Xn=Yn;function Jn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=t.length,e=a.length;if(Math.abs(i-e)!==1)return{add:!1,key:null};function s(c,f){var n=new Map;c.forEach(function(o){n.set(o,!0)});var r=f.filter(function(o){return!n.has(o)});return r.length===1?r[0]:null}return i<e?{add:!0,key:s(t,a)}:{add:!1,key:s(a,t)}}function Qt(t,a,i){var e=t.findIndex(function(n){return n.key===i}),s=t[e+1],c=a.findIndex(function(n){return n.key===i});if(s){var f=a.findIndex(function(n){return n.key===s.key});return a.slice(c+1,f)}return a.slice(c+1)}var Qn=["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"],qt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},qn=function(){},qe="RC_TREE_MOTION_".concat(Math.random()),Tt={key:qe},en={key:qe,level:0,index:0,pos:"0",node:Tt,nodes:[Tt]},tn={parent:null,children:[],pos:en.pos,data:Tt,title:null,key:qe,isStart:[],isEnd:[]};function nn(t,a,i,e){return a===!1||!i?t:t.slice(0,Math.ceil(i/e)+1)}function rn(t){var a=t.key,i=t.pos;return ft(a,i)}function er(t){for(var a=String(t.data.key),i=t;i.parent;)i=i.parent,a="".concat(i.data.key," > ").concat(a);return a}var an=l.forwardRef(function(t,a){var i=t.prefixCls,e=t.data,s=t.selectable,c=t.checkable,f=t.expandedKeys,n=t.selectedKeys,r=t.checkedKeys,o=t.loadedKeys,d=t.loadingKeys,u=t.halfCheckedKeys,v=t.keyEntities,h=t.disabled,g=t.dragging,y=t.dragOverNodeKey,p=t.dropPosition,b=t.motion,K=t.height,E=t.itemHeight,N=t.virtual,k=t.focusable,O=t.activeItem,C=t.focused,P=t.tabIndex,L=t.onKeyDown,w=t.onFocus,T=t.onBlur,F=t.onActiveChange,j=t.onListChangeStart,U=t.onListChangeEnd,Q=(0,q.Z)(t,Qn),re=l.useRef(null),_=l.useRef(null);l.useImperativeHandle(a,function(){return{scrollTo:function(Me){re.current.scrollTo(Me)},getIndentWidth:function(){return _.current.offsetWidth}}});var ee=l.useState(f),be=(0,R.Z)(ee,2),Le=be[0],Ne=be[1],le=l.useState(e),ye=(0,R.Z)(le,2),me=ye[0],Pe=ye[1],We=l.useState(e),ke=(0,R.Z)(We,2),ve=ke[0],de=ke[1],te=l.useState([]),se=(0,R.Z)(te,2),Ze=se[0],Fe=se[1],et=l.useState(null),Be=(0,R.Z)(et,2),ht=Be[0],tt=Be[1],it=l.useRef(e);it.current=e;function Ie(){var Y=it.current;Pe(Y),de(Y),Fe([]),tt(null),U()}(0,W.Z)(function(){Ne(f);var Y=Jn(Le,f);if(Y.key!==null)if(Y.add){var Me=me.findIndex(function(at){var Ge=at.key;return Ge===Y.key}),ce=nn(Qt(me,e,Y.key),N,K,E),De=me.slice();De.splice(Me+1,0,tn),de(De),Fe(ce),tt("show")}else{var Oe=e.findIndex(function(at){var Ge=at.key;return Ge===Y.key}),Te=nn(Qt(e,me,Y.key),N,K,E),rt=e.slice();rt.splice(Oe+1,0,tn),de(rt),Fe(Te),tt("hide")}else me!==e&&(Pe(e),de(e))},[f,e]),l.useEffect(function(){g||Ie()},[g]);var nt=b?ve:e,Ue={expandedKeys:f,selectedKeys:n,loadedKeys:o,loadingKeys:d,checkedKeys:r,halfCheckedKeys:u,dragOverNodeKey:y,dropPosition:p,keyEntities:v};return l.createElement(l.Fragment,null,C&&O&&l.createElement("span",{style:qt,"aria-live":"assertive"},er(O)),l.createElement("div",null,l.createElement("input",{style:qt,disabled:k===!1||h,tabIndex:k!==!1?P:null,onKeyDown:L,onFocus:w,onBlur:T,value:"",onChange:qn,"aria-label":"for screen reader"})),l.createElement("div",{className:"".concat(i,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},l.createElement("div",{className:"".concat(i,"-indent")},l.createElement("div",{ref:_,className:"".concat(i,"-indent-unit")}))),l.createElement(Mn,(0,ue.Z)({},Q,{data:nt,itemKey:rn,height:K,fullHeight:!1,virtual:N,itemHeight:E,prefixCls:"".concat(i,"-list"),ref:re,onVisibleChange:function(Me,ce){var De=new Set(Me),Oe=ce.filter(function(Te){return!De.has(Te)});Oe.some(function(Te){return rn(Te)===qe})&&Ie()}}),function(Y){var Me=Y.pos,ce=Object.assign({},(z(Y.data),Y.data)),De=Y.title,Oe=Y.key,Te=Y.isStart,rt=Y.isEnd,at=ft(Oe,Me);delete ce.key,delete ce.children;var Ge=vt(at,Ue);return l.createElement(Xn,(0,ue.Z)({},ce,Ge,{title:De,active:!!O&&Oe===O.key,pos:Me,data:Y.data,isStart:Te,isEnd:rt,motion:b,motionNodes:Oe===qe?Ze:null,motionType:ht,onMotionStart:j,onMotionEnd:Ie,treeNodeRequiredProps:Ue,onMouseMove:function(){F(null)}}))}))});an.displayName="NodeList";var tr=an,nr=null;function He(t,a){if(!t)return[];var i=t.slice(),e=i.indexOf(a);return e>=0&&i.splice(e,1),i}function _e(t,a){var i=(t||[]).slice();return i.indexOf(a)===-1&&i.push(a),i}function Pt(t){return t.split("-")}function rr(t,a){var i=[],e=Re(a,t);function s(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];c.forEach(function(f){var n=f.key,r=f.children;i.push(n),s(r)})}return s(e.children),i}function ar(t){if(t.parent){var a=Pt(t.pos);return Number(a[a.length-1])===t.parent.children.length-1}return!1}function or(t){var a=Pt(t.pos);return Number(a[a.length-1])===0}function on(t,a,i,e,s,c,f,n,r,o){var d,u=t.clientX,v=t.clientY,h=t.target.getBoundingClientRect(),g=h.top,y=h.height,p=(o==="rtl"?-1:1)*(((s==null?void 0:s.x)||0)-u),b=(p-12)/e,K=r.filter(function(re){var _;return(_=n[re])===null||_===void 0||(_=_.children)===null||_===void 0?void 0:_.length}),E=Re(n,i.props.eventKey);if(v<g+y/2){var N=f.findIndex(function(re){return re.key===E.key}),k=N<=0?0:N-1,O=f[k].key;E=Re(n,O)}var C=E.key,P=E,L=E.key,w=0,T=0;if(!K.includes(C))for(var F=0;F<b&&ar(E);F+=1)E=E.parent,T+=1;var j=a.props.data,U=E.node,Q=!0;return or(E)&&E.level===0&&v<g+y/2&&c({dragNode:j,dropNode:U,dropPosition:-1})&&E.key===i.props.eventKey?w=-1:(P.children||[]).length&&K.includes(L)?c({dragNode:j,dropNode:U,dropPosition:0})?w=0:Q=!1:T===0?b>-1.5?c({dragNode:j,dropNode:U,dropPosition:1})?w=1:Q=!1:c({dragNode:j,dropNode:U,dropPosition:0})?w=0:c({dragNode:j,dropNode:U,dropPosition:1})?w=1:Q=!1:c({dragNode:j,dropNode:U,dropPosition:1})?w=1:Q=!1,{dropPosition:w,dropLevelOffset:T,dropTargetKey:E.key,dropTargetPos:E.pos,dragOverNodeKey:L,dropContainerKey:w===0?null:((d=E.parent)===null||d===void 0?void 0:d.key)||null,dropAllowed:Q}}function ln(t,a){if(t){var i=a.multiple;return i?t.slice():t.length?[t[0]]:t}}var ir=function(a){return a};function lr(t,a){if(!t)return[];var i=a||{},e=i.processProps,s=e===void 0?ir:e,c=Array.isArray(t)?t:[t];return c.map(function(f){var n=f.children,r=_objectWithoutProperties(f,nr),o=lr(n,a);return React.createElement(TreeNode,_extends({key:r.key},s(r)),o)})}function Mt(t){if(!t)return null;var a;if(Array.isArray(t))a={checkedKeys:t,halfCheckedKeys:void 0};else if((0,he.Z)(t)==="object")a={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0};else return(0,S.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return a}function sn(t,a){var i=new Set;function e(s){if(!i.has(s)){var c=Re(a,s);if(c){i.add(s);var f=c.parent,n=c.node;n.disabled||f&&e(f.key)}}}return(t||[]).forEach(function(s){e(s)}),(0,ge.Z)(i)}function dn(t,a){var i=new Set;return t.forEach(function(e){a.has(e)||i.add(e)}),i}function sr(t){var a=t||{},i=a.disabled,e=a.disableCheckbox,s=a.checkable;return!!(i||e)||s===!1}function dr(t,a,i,e){for(var s=new Set(t),c=new Set,f=0;f<=i;f+=1){var n=a.get(f)||new Set;n.forEach(function(u){var v=u.key,h=u.node,g=u.children,y=g===void 0?[]:g;s.has(v)&&!e(h)&&y.filter(function(p){return!e(p.node)}).forEach(function(p){s.add(p.key)})})}for(var r=new Set,o=i;o>=0;o-=1){var d=a.get(o)||new Set;d.forEach(function(u){var v=u.parent,h=u.node;if(!(e(h)||!u.parent||r.has(u.parent.key))){if(e(u.parent.node)){r.add(v.key);return}var g=!0,y=!1;(v.children||[]).filter(function(p){return!e(p.node)}).forEach(function(p){var b=p.key,K=s.has(b);g&&!K&&(g=!1),!y&&(K||c.has(b))&&(y=!0)}),g&&s.add(v.key),y&&c.add(v.key),r.add(v.key)}})}return{checkedKeys:Array.from(s),halfCheckedKeys:Array.from(dn(c,s))}}function cr(t,a,i,e,s){for(var c=new Set(t),f=new Set(a),n=0;n<=e;n+=1){var r=i.get(n)||new Set;r.forEach(function(v){var h=v.key,g=v.node,y=v.children,p=y===void 0?[]:y;!c.has(h)&&!f.has(h)&&!s(g)&&p.filter(function(b){return!s(b.node)}).forEach(function(b){c.delete(b.key)})})}f=new Set;for(var o=new Set,d=e;d>=0;d-=1){var u=i.get(d)||new Set;u.forEach(function(v){var h=v.parent,g=v.node;if(!(s(g)||!v.parent||o.has(v.parent.key))){if(s(v.parent.node)){o.add(h.key);return}var y=!0,p=!1;(h.children||[]).filter(function(b){return!s(b.node)}).forEach(function(b){var K=b.key,E=c.has(K);y&&!E&&(y=!1),!p&&(E||f.has(K))&&(p=!0)}),y||c.delete(h.key),p&&f.add(h.key),o.add(h.key)}})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(dn(f,c))}}function wt(t,a,i,e){var s=[],c;e?c=e:c=sr;var f=new Set(t.filter(function(d){var u=!!Re(i,d);return u||s.push(d),u})),n=new Map,r=0;Object.keys(i).forEach(function(d){var u=i[d],v=u.level,h=n.get(v);h||(h=new Set,n.set(v,h)),h.add(u),r=Math.max(r,v)}),(0,S.ZP)(!s.length,"Tree missing follow keys: ".concat(s.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var o;return a===!0?o=dr(f,n,r,c):o=cr(f,a.halfCheckedKeys,n,r,c),o}var ur=10,cn=function(t){(0,Ce.Z)(i,t);var a=(0,ze.Z)(i);function i(){var e;(0,Ee.Z)(this,i);for(var s=arguments.length,c=new Array(s),f=0;f<s;f++)c[f]=arguments[f];return e=a.call.apply(a,[this].concat(c)),(0,m.Z)((0,x.Z)(e),"destroyed",!1),(0,m.Z)((0,x.Z)(e),"delayedDragEnterLogic",void 0),(0,m.Z)((0,x.Z)(e),"loadingRetryTimes",{}),(0,m.Z)((0,x.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:Kt()}),(0,m.Z)((0,x.Z)(e),"dragStartMousePosition",null),(0,m.Z)((0,x.Z)(e),"dragNode",void 0),(0,m.Z)((0,x.Z)(e),"currentMouseOverDroppableNodeKey",null),(0,m.Z)((0,x.Z)(e),"listRef",l.createRef()),(0,m.Z)((0,x.Z)(e),"onNodeDragStart",function(n,r){var o=e.state,d=o.expandedKeys,u=o.keyEntities,v=e.props.onDragStart,h=r.props.eventKey;e.dragNode=r,e.dragStartMousePosition={x:n.clientX,y:n.clientY};var g=He(d,h);e.setState({draggingNodeKey:h,dragChildrenKeys:rr(h,u),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(g),window.addEventListener("dragend",e.onWindowDragEnd),v==null||v({event:n,node:ae(r.props)})}),(0,m.Z)((0,x.Z)(e),"onNodeDragEnter",function(n,r){var o=e.state,d=o.expandedKeys,u=o.keyEntities,v=o.dragChildrenKeys,h=o.flattenNodes,g=o.indent,y=e.props,p=y.onDragEnter,b=y.onExpand,K=y.allowDrop,E=y.direction,N=r.props,k=N.pos,O=N.eventKey,C=(0,x.Z)(e),P=C.dragNode;if(e.currentMouseOverDroppableNodeKey!==O&&(e.currentMouseOverDroppableNodeKey=O),!P){e.resetDragState();return}var L=on(n,P,r,g,e.dragStartMousePosition,K,h,u,d,E),w=L.dropPosition,T=L.dropLevelOffset,F=L.dropTargetKey,j=L.dropContainerKey,U=L.dropTargetPos,Q=L.dropAllowed,re=L.dragOverNodeKey;if(v.indexOf(F)!==-1||!Q){e.resetDragState();return}if(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach(function(_){clearTimeout(e.delayedDragEnterLogic[_])}),P.props.eventKey!==r.props.eventKey&&(n.persist(),e.delayedDragEnterLogic[k]=window.setTimeout(function(){if(e.state.draggingNodeKey!==null){var _=(0,ge.Z)(d),ee=Re(u,r.props.eventKey);ee&&(ee.children||[]).length&&(_=_e(d,r.props.eventKey)),"expandedKeys"in e.props||e.setExpandedKeys(_),b==null||b(_,{node:ae(r.props),expanded:!0,nativeEvent:n.nativeEvent})}},800)),P.props.eventKey===F&&T===0){e.resetDragState();return}e.setState({dragOverNodeKey:re,dropPosition:w,dropLevelOffset:T,dropTargetKey:F,dropContainerKey:j,dropTargetPos:U,dropAllowed:Q}),p==null||p({event:n,node:ae(r.props),expandedKeys:d})}),(0,m.Z)((0,x.Z)(e),"onNodeDragOver",function(n,r){var o=e.state,d=o.dragChildrenKeys,u=o.flattenNodes,v=o.keyEntities,h=o.expandedKeys,g=o.indent,y=e.props,p=y.onDragOver,b=y.allowDrop,K=y.direction,E=(0,x.Z)(e),N=E.dragNode;if(N){var k=on(n,N,r,g,e.dragStartMousePosition,b,u,v,h,K),O=k.dropPosition,C=k.dropLevelOffset,P=k.dropTargetKey,L=k.dropContainerKey,w=k.dropAllowed,T=k.dropTargetPos,F=k.dragOverNodeKey;d.indexOf(P)!==-1||!w||(N.props.eventKey===P&&C===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():O===e.state.dropPosition&&C===e.state.dropLevelOffset&&P===e.state.dropTargetKey&&L===e.state.dropContainerKey&&T===e.state.dropTargetPos&&w===e.state.dropAllowed&&F===e.state.dragOverNodeKey||e.setState({dropPosition:O,dropLevelOffset:C,dropTargetKey:P,dropContainerKey:L,dropTargetPos:T,dropAllowed:w,dragOverNodeKey:F}),p==null||p({event:n,node:ae(r.props)}))}}),(0,m.Z)((0,x.Z)(e),"onNodeDragLeave",function(n,r){e.currentMouseOverDroppableNodeKey===r.props.eventKey&&!n.currentTarget.contains(n.relatedTarget)&&(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var o=e.props.onDragLeave;o==null||o({event:n,node:ae(r.props)})}),(0,m.Z)((0,x.Z)(e),"onWindowDragEnd",function(n){e.onNodeDragEnd(n,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)}),(0,m.Z)((0,x.Z)(e),"onNodeDragEnd",function(n,r){var o=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),o==null||o({event:n,node:ae(r.props)}),e.dragNode=null,window.removeEventListener("dragend",e.onWindowDragEnd)}),(0,m.Z)((0,x.Z)(e),"onNodeDrop",function(n,r){var o,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=e.state,v=u.dragChildrenKeys,h=u.dropPosition,g=u.dropTargetKey,y=u.dropTargetPos,p=u.dropAllowed;if(p){var b=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),g!==null){var K=(0,H.Z)((0,H.Z)({},vt(g,e.getTreeNodeRequiredProps())),{},{active:((o=e.getActiveItem())===null||o===void 0?void 0:o.key)===g,data:Re(e.state.keyEntities,g).node}),E=v.indexOf(g)!==-1;(0,S.ZP)(!E,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var N=Pt(y),k={event:n,node:ae(K),dragNode:e.dragNode?ae(e.dragNode.props):null,dragNodesKeys:[e.dragNode.props.eventKey].concat(v),dropToGap:h!==0,dropPosition:h+Number(N[N.length-1])};d||b==null||b(k),e.dragNode=null}}}),(0,m.Z)((0,x.Z)(e),"cleanDragState",function(){var n=e.state.draggingNodeKey;n!==null&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null}),(0,m.Z)((0,x.Z)(e),"triggerExpandActionExpand",function(n,r){var o=e.state,d=o.expandedKeys,u=o.flattenNodes,v=r.expanded,h=r.key,g=r.isLeaf;if(!(g||n.shiftKey||n.metaKey||n.ctrlKey)){var y=u.filter(function(b){return b.key===h})[0],p=ae((0,H.Z)((0,H.Z)({},vt(h,e.getTreeNodeRequiredProps())),{},{data:y.data}));e.setExpandedKeys(v?He(d,h):_e(d,h)),e.onNodeExpand(n,p)}}),(0,m.Z)((0,x.Z)(e),"onNodeClick",function(n,r){var o=e.props,d=o.onClick,u=o.expandAction;u==="click"&&e.triggerExpandActionExpand(n,r),d==null||d(n,r)}),(0,m.Z)((0,x.Z)(e),"onNodeDoubleClick",function(n,r){var o=e.props,d=o.onDoubleClick,u=o.expandAction;u==="doubleClick"&&e.triggerExpandActionExpand(n,r),d==null||d(n,r)}),(0,m.Z)((0,x.Z)(e),"onNodeSelect",function(n,r){var o=e.state.selectedKeys,d=e.state,u=d.keyEntities,v=d.fieldNames,h=e.props,g=h.onSelect,y=h.multiple,p=r.selected,b=r[v.key],K=!p;K?y?o=_e(o,b):o=[b]:o=He(o,b);var E=o.map(function(N){var k=Re(u,N);return k?k.node:null}).filter(function(N){return N});e.setUncontrolledState({selectedKeys:o}),g==null||g(o,{event:"select",selected:K,node:r,selectedNodes:E,nativeEvent:n.nativeEvent})}),(0,m.Z)((0,x.Z)(e),"onNodeCheck",function(n,r,o){var d=e.state,u=d.keyEntities,v=d.checkedKeys,h=d.halfCheckedKeys,g=e.props,y=g.checkStrictly,p=g.onCheck,b=r.key,K,E={event:"check",node:r,checked:o,nativeEvent:n.nativeEvent};if(y){var N=o?_e(v,b):He(v,b),k=He(h,b);K={checked:N,halfChecked:k},E.checkedNodes=N.map(function(T){return Re(u,T)}).filter(function(T){return T}).map(function(T){return T.node}),e.setUncontrolledState({checkedKeys:N})}else{var O=wt([].concat((0,ge.Z)(v),[b]),!0,u),C=O.checkedKeys,P=O.halfCheckedKeys;if(!o){var L=new Set(C);L.delete(b);var w=wt(Array.from(L),{checked:!1,halfCheckedKeys:P},u);C=w.checkedKeys,P=w.halfCheckedKeys}K=C,E.checkedNodes=[],E.checkedNodesPositions=[],E.halfCheckedKeys=P,C.forEach(function(T){var F=Re(u,T);if(F){var j=F.node,U=F.pos;E.checkedNodes.push(j),E.checkedNodesPositions.push({node:j,pos:U})}}),e.setUncontrolledState({checkedKeys:C},!1,{halfCheckedKeys:P})}p==null||p(K,E)}),(0,m.Z)((0,x.Z)(e),"onNodeLoad",function(n){var r=n.key,o=new Promise(function(d,u){e.setState(function(v){var h=v.loadedKeys,g=h===void 0?[]:h,y=v.loadingKeys,p=y===void 0?[]:y,b=e.props,K=b.loadData,E=b.onLoad;if(!K||g.indexOf(r)!==-1||p.indexOf(r)!==-1)return null;var N=K(n);return N.then(function(){var k=e.state.loadedKeys,O=_e(k,r);E==null||E(O,{event:"load",node:n}),e.setUncontrolledState({loadedKeys:O}),e.setState(function(C){return{loadingKeys:He(C.loadingKeys,r)}}),d()}).catch(function(k){if(e.setState(function(C){return{loadingKeys:He(C.loadingKeys,r)}}),e.loadingRetryTimes[r]=(e.loadingRetryTimes[r]||0)+1,e.loadingRetryTimes[r]>=ur){var O=e.state.loadedKeys;(0,S.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:_e(O,r)}),d()}u(k)}),{loadingKeys:_e(p,r)}})});return o.catch(function(){}),o}),(0,m.Z)((0,x.Z)(e),"onNodeMouseEnter",function(n,r){var o=e.props.onMouseEnter;o==null||o({event:n,node:r})}),(0,m.Z)((0,x.Z)(e),"onNodeMouseLeave",function(n,r){var o=e.props.onMouseLeave;o==null||o({event:n,node:r})}),(0,m.Z)((0,x.Z)(e),"onNodeContextMenu",function(n,r){var o=e.props.onRightClick;o&&(n.preventDefault(),o({event:n,node:r}))}),(0,m.Z)((0,x.Z)(e),"onFocus",function(){var n=e.props.onFocus;e.setState({focused:!0});for(var r=arguments.length,o=new Array(r),d=0;d<r;d++)o[d]=arguments[d];n==null||n.apply(void 0,o)}),(0,m.Z)((0,x.Z)(e),"onBlur",function(){var n=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var r=arguments.length,o=new Array(r),d=0;d<r;d++)o[d]=arguments[d];n==null||n.apply(void 0,o)}),(0,m.Z)((0,x.Z)(e),"getTreeNodeRequiredProps",function(){var n=e.state,r=n.expandedKeys,o=n.selectedKeys,d=n.loadedKeys,u=n.loadingKeys,v=n.checkedKeys,h=n.halfCheckedKeys,g=n.dragOverNodeKey,y=n.dropPosition,p=n.keyEntities;return{expandedKeys:r||[],selectedKeys:o||[],loadedKeys:d||[],loadingKeys:u||[],checkedKeys:v||[],halfCheckedKeys:h||[],dragOverNodeKey:g,dropPosition:y,keyEntities:p}}),(0,m.Z)((0,x.Z)(e),"setExpandedKeys",function(n){var r=e.state,o=r.treeData,d=r.fieldNames,u=Rt(o,n,d);e.setUncontrolledState({expandedKeys:n,flattenNodes:u},!0)}),(0,m.Z)((0,x.Z)(e),"onNodeExpand",function(n,r){var o=e.state.expandedKeys,d=e.state,u=d.listChanging,v=d.fieldNames,h=e.props,g=h.onExpand,y=h.loadData,p=r.expanded,b=r[v.key];if(!u){var K=o.indexOf(b),E=!p;if((0,S.ZP)(p&&K!==-1||!p&&K===-1,"Expand state not sync with index check"),E?o=_e(o,b):o=He(o,b),e.setExpandedKeys(o),g==null||g(o,{node:r,expanded:E,nativeEvent:n.nativeEvent}),E&&y){var N=e.onNodeLoad(r);N&&N.then(function(){var k=Rt(e.state.treeData,o,v);e.setUncontrolledState({flattenNodes:k})}).catch(function(){var k=e.state.expandedKeys,O=He(k,b);e.setExpandedKeys(O)})}}}),(0,m.Z)((0,x.Z)(e),"onListChangeStart",function(){e.setUncontrolledState({listChanging:!0})}),(0,m.Z)((0,x.Z)(e),"onListChangeEnd",function(){setTimeout(function(){e.setUncontrolledState({listChanging:!1})})}),(0,m.Z)((0,x.Z)(e),"onActiveChange",function(n){var r=e.state.activeKey,o=e.props,d=o.onActiveChange,u=o.itemScrollOffset,v=u===void 0?0:u;r!==n&&(e.setState({activeKey:n}),n!==null&&e.scrollTo({key:n,offset:v}),d==null||d(n))}),(0,m.Z)((0,x.Z)(e),"getActiveItem",function(){var n=e.state,r=n.activeKey,o=n.flattenNodes;return r===null?null:o.find(function(d){var u=d.key;return u===r})||null}),(0,m.Z)((0,x.Z)(e),"offsetActiveKey",function(n){var r=e.state,o=r.flattenNodes,d=r.activeKey,u=o.findIndex(function(g){var y=g.key;return y===d});u===-1&&n<0&&(u=o.length),u=(u+n+o.length)%o.length;var v=o[u];if(v){var h=v.key;e.onActiveChange(h)}else e.onActiveChange(null)}),(0,m.Z)((0,x.Z)(e),"onKeyDown",function(n){var r=e.state,o=r.activeKey,d=r.expandedKeys,u=r.checkedKeys,v=r.fieldNames,h=e.props,g=h.onKeyDown,y=h.checkable,p=h.selectable;switch(n.which){case we.Z.UP:{e.offsetActiveKey(-1),n.preventDefault();break}case we.Z.DOWN:{e.offsetActiveKey(1),n.preventDefault();break}}var b=e.getActiveItem();if(b&&b.data){var K=e.getTreeNodeRequiredProps(),E=b.data.isLeaf===!1||!!(b.data[v.children]||[]).length,N=ae((0,H.Z)((0,H.Z)({},vt(o,K)),{},{data:b.data,active:!0}));switch(n.which){case we.Z.LEFT:{E&&d.includes(o)?e.onNodeExpand({},N):b.parent&&e.onActiveChange(b.parent.key),n.preventDefault();break}case we.Z.RIGHT:{E&&!d.includes(o)?e.onNodeExpand({},N):b.children&&b.children.length&&e.onActiveChange(b.children[0].key),n.preventDefault();break}case we.Z.ENTER:case we.Z.SPACE:{y&&!N.disabled&&N.checkable!==!1&&!N.disableCheckbox?e.onNodeCheck({},N,!u.includes(o)):!y&&p&&!N.disabled&&N.selectable!==!1&&e.onNodeSelect({},N);break}}}g==null||g(n)}),(0,m.Z)((0,x.Z)(e),"setUncontrolledState",function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!e.destroyed){var d=!1,u=!0,v={};Object.keys(n).forEach(function(h){if(h in e.props){u=!1;return}d=!0,v[h]=n[h]}),d&&(!r||u)&&e.setState((0,H.Z)((0,H.Z)({},v),o))}}),(0,m.Z)((0,x.Z)(e),"scrollTo",function(n){e.listRef.current.scrollTo(n)}),e}return(0,Se.Z)(i,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var s=this.props,c=s.activeKey,f=s.itemScrollOffset,n=f===void 0?0:f;c!==void 0&&c!==this.state.activeKey&&(this.setState({activeKey:c}),c!==null&&this.scrollTo({key:c,offset: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 s=this.state,c=s.focused,f=s.flattenNodes,n=s.keyEntities,r=s.draggingNodeKey,o=s.activeKey,d=s.dropLevelOffset,u=s.dropContainerKey,v=s.dropTargetKey,h=s.dropPosition,g=s.dragOverNodeKey,y=s.indent,p=this.props,b=p.prefixCls,K=p.className,E=p.style,N=p.showLine,k=p.focusable,O=p.tabIndex,C=O===void 0?0:O,P=p.selectable,L=p.showIcon,w=p.icon,T=p.switcherIcon,F=p.draggable,j=p.checkable,U=p.checkStrictly,Q=p.disabled,re=p.motion,_=p.loadData,ee=p.filterTreeNode,be=p.height,Le=p.itemHeight,Ne=p.virtual,le=p.titleRender,ye=p.dropIndicatorRender,me=p.onContextMenu,Pe=p.onScroll,We=p.direction,ke=p.rootClassName,ve=p.rootStyle,de=(0,M.Z)(this.props,{aria:!0,data:!0}),te;return F&&((0,he.Z)(F)==="object"?te=F:typeof F=="function"?te={nodeDraggable:F}:te={}),l.createElement(Z.Provider,{value:{prefixCls:b,selectable:P,showIcon:L,icon:w,switcherIcon:T,draggable:te,draggingNodeKey:r,checkable:j,checkStrictly:U,disabled:Q,keyEntities:n,dropLevelOffset:d,dropContainerKey:u,dropTargetKey:v,dropPosition:h,dragOverNodeKey:g,indent:y,direction:We,dropIndicatorRender:ye,loadData:_,filterTreeNode:ee,titleRender:le,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}},l.createElement("div",{role:"tree",className:oe()(b,K,ke,(0,m.Z)((0,m.Z)((0,m.Z)({},"".concat(b,"-show-line"),N),"".concat(b,"-focused"),c),"".concat(b,"-active-focused"),o!==null)),style:ve},l.createElement(tr,(0,ue.Z)({ref:this.listRef,prefixCls:b,style:E,data:f,disabled:Q,selectable:P,checkable:!!j,motion:re,dragging:r!==null,height:be,itemHeight:Le,virtual:Ne,focusable:k,focused:c,tabIndex:C,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:me,onScroll:Pe},this.getTreeNodeRequiredProps(),de))))}}],[{key:"getDerivedStateFromProps",value:function(s,c){var f=c.prevProps,n={prevProps:s};function r(O){return!f&&O in s||f&&f[O]!==s[O]}var o,d=c.fieldNames;if(r("fieldNames")&&(d=Kt(s.fieldNames),n.fieldNames=d),r("treeData")?o=s.treeData:r("children")&&((0,S.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),o=Fn(s.children)),o){n.treeData=o;var u=_n(o,{fieldNames:d});n.keyEntities=(0,H.Z)((0,m.Z)({},qe,en),u.keyEntities)}var v=n.keyEntities||c.keyEntities;if(r("expandedKeys")||f&&r("autoExpandParent"))n.expandedKeys=s.autoExpandParent||!f&&s.defaultExpandParent?sn(s.expandedKeys,v):s.expandedKeys;else if(!f&&s.defaultExpandAll){var h=(0,H.Z)({},v);delete h[qe],n.expandedKeys=Object.keys(h).map(function(O){return h[O].key})}else!f&&s.defaultExpandedKeys&&(n.expandedKeys=s.autoExpandParent||s.defaultExpandParent?sn(s.defaultExpandedKeys,v):s.defaultExpandedKeys);if(n.expandedKeys||delete n.expandedKeys,o||n.expandedKeys){var g=Rt(o||c.treeData,n.expandedKeys||c.expandedKeys,d);n.flattenNodes=g}if(s.selectable&&(r("selectedKeys")?n.selectedKeys=ln(s.selectedKeys,s):!f&&s.defaultSelectedKeys&&(n.selectedKeys=ln(s.defaultSelectedKeys,s))),s.checkable){var y;if(r("checkedKeys")?y=Mt(s.checkedKeys)||{}:!f&&s.defaultCheckedKeys?y=Mt(s.defaultCheckedKeys)||{}:o&&(y=Mt(s.checkedKeys)||{checkedKeys:c.checkedKeys,halfCheckedKeys:c.halfCheckedKeys}),y){var p=y,b=p.checkedKeys,K=b===void 0?[]:b,E=p.halfCheckedKeys,N=E===void 0?[]:E;if(!s.checkStrictly){var k=wt(K,!0,v);K=k.checkedKeys,N=k.halfCheckedKeys}n.checkedKeys=K,n.halfCheckedKeys=N}}return r("loadedKeys")&&(n.loadedKeys=s.loadedKeys),n}}]),i}(l.Component);(0,m.Z)(cn,"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:B,allowDrop:function(){return!0},expandAction:!1}),(0,m.Z)(cn,"TreeNode",Ot);var Wr=null,Br=null;function pt(t){"@babel/helpers - typeof";return pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},pt(t)}function un(t,a){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);a&&(e=e.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),i.push.apply(i,e)}return i}function fn(t){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?un(Object(i),!0).forEach(function(e){fr(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):un(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function fr(t,a,i){return a=vr(a),a in t?Object.defineProperty(t,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[a]=i,t}function vr(t){var a=pr(t,"string");return pt(a)==="symbol"?a:String(a)}function pr(t,a){if(pt(t)!=="object"||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var e=i.call(t,a||"default");if(pt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(t)}function hr(t,a){return mr(t)||yr(t,a)||vn(t,a)||gr()}function gr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yr(t,a){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var e,s,c,f,n=[],r=!0,o=!1;try{if(c=(i=i.call(t)).next,a===0){if(Object(i)!==i)return;r=!1}else for(;!(r=(e=c.call(i)).done)&&(n.push(e.value),n.length!==a);r=!0);}catch(d){o=!0,s=d}finally{try{if(!r&&i.return!=null&&(f=i.return(),Object(f)!==f))return}finally{if(o)throw s}}return n}}function mr(t){if(Array.isArray(t))return t}function Sr(t){return xr(t)||Er(t)||vn(t)||br()}function br(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vn(t,a){if(t){if(typeof t=="string")return Lt(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Lt(t,a)}}function Er(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function xr(t){if(Array.isArray(t))return Lt(t)}function Lt(t,a){(a==null||a>t.length)&&(a=t.length);for(var i=0,e=new Array(a);i<a;i++)e[i]=t[i];return e}function Nt(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=[];return[].concat(t).forEach(function(e,s){var c="".concat(a?"".concat(a,"-"):"").concat(s);switch(e==null?void 0:e.type){case"ul":{var f,n=((f=i[i.length-1])===null||f===void 0?void 0:f.children)||i,r=Nt(e.props.children||[],c);n.push.apply(n,Sr(r));break}case"li":{var o=Nt(e.props.children,c);i.push({title:[].concat(e.props.children).filter(function(d){return d.type!=="ul"}),key:c,children:o,isLeaf:!o.length});break}default:}}),i}var Kr=function(a){var i=useState(Nt(a)),e=hr(i,2),s=e[0],c=e[1];return useEffect(function(){c(Nt(a))},[a]),s},Nr=function(a){var i=a.isLeaf,e=a.expanded;return i?React.createElement("span",{className:"dumi-default-tree-icon"},React.createElement(FileOutlined,{fill:"currentColor"})):e?React.createElement("span",{className:"dumi-default-tree-icon"},React.createElement(FolderOpenOutlined,{fill:"currentColor"})):React.createElement("span",{className:"dumi-default-tree-icon"},React.createElement(FolderOutlined,{fill:"currentColor"}))},kr=function(a){var i=a.isLeaf,e=a.expanded;return i?React.createElement("span",{className:"tree-switcher-leaf-line"}):e?React.createElement("span",{className:"tree-switcher-line-icon"},React.createElement("span",{className:"dumi-default-tree-icon"},React.createElement(MinusSquareOutlined,{fill:"currentColor"}))):React.createElement("span",{className:"tree-switcher-line-icon"},React.createElement("span",{className:"dumi-default-tree-icon"},React.createElement(PlusSquareOutlined,{fill:"currentColor"})))},It=function(){return{height:0,opacity:0}},pn=function(a){var i=a.scrollHeight;return{height:i,opacity:1}},Zr=function(a){return{height:a?a.offsetHeight:0}},At=function(a,i){return(i==null?void 0:i.deadline)===!0||i.propertyName==="height"},Cr={motionName:"ant-motion-collapse",onAppearStart:It,onEnterStart:It,onAppearActive:pn,onEnterActive:pn,onLeaveStart:Zr,onLeaveActive:It,onAppearEnd:At,onEnterEnd:At,onLeaveEnd:At,motionDeadline:500},Ur=function(t){var a=Kr(t.children),i=createRef(),e=function(c,f){var n=f.isLeaf;n||c.shiftKey||c.metaKey||c.ctrlKey||i.current.onNodeExpand(c,f)};return React.createElement(Tree,{className:"dumi-default-tree",icon:Nr,ref:i,itemHeight:20,showLine:!0,selectable:!1,virtual:!1,motion:fn(fn({},Cr),{},{motionAppear:!1}),onClick:e,treeData:[{key:"0",title:t.title||"<root>",children:a}],defaultExpandAll:!0,switcherIcon:kr})}},14978:function(lt,st,$){var ue="Expected a function",he=NaN,H="[object Symbol]",ge=/^\s+|\s+$/g,Ee=/^[-+]0x[0-9a-f]+$/i,Se=/^0b[01]+$/i,x=/^0o[0-7]+$/i,Ce=parseInt,ze=typeof $.g=="object"&&$.g&&$.g.Object===Object&&$.g,m=typeof self=="object"&&self&&self.Object===Object&&self,Ye=ze||m||Function("return this")(),oe=Object.prototype,we=oe.toString,M=Math.max,S=Math.min,l=function(){return Ye.Date.now()};function Z(D,V,X){var fe,J,ie,xe,Ke,je,Xe=0,mt=!1,Je=!1,dt=!0;if(typeof D!="function")throw new TypeError(ue);V=W(V)||0,z(X)&&(mt=!!X.leading,Je="maxWait"in X,ie=Je?M(W(X.maxWait)||0,V):ie,dt="trailing"in X?!!X.trailing:dt);function ct(ne){var Ae=fe,Qe=J;return fe=J=void 0,Xe=ne,xe=D.apply(Qe,Ae),xe}function St(ne){return Xe=ne,Ke=setTimeout(ut,V),mt?ct(ne):xe}function kt(ne){var Ae=ne-je,Qe=ne-Xe,xt=V-Ae;return Je?S(xt,ie-Qe):xt}function bt(ne){var Ae=ne-je,Qe=ne-Xe;return je===void 0||Ae>=V||Ae<0||Je&&Qe>=ie}function ut(){var ne=l();if(bt(ne))return Et(ne);Ke=setTimeout(ut,kt(ne))}function Et(ne){return Ke=void 0,dt&&fe?ct(ne):(fe=J=void 0,xe)}function Zt(){Ke!==void 0&&clearTimeout(Ke),Xe=0,fe=je=J=Ke=void 0}function Ct(){return Ke===void 0?xe:Et(l())}function ot(){var ne=l(),Ae=bt(ne);if(fe=arguments,J=this,je=ne,Ae){if(Ke===void 0)return St(je);if(Je)return Ke=setTimeout(ut,V),ct(je)}return Ke===void 0&&(Ke=setTimeout(ut,V)),xe}return ot.cancel=Zt,ot.flush=Ct,ot}function B(D,V,X){var fe=!0,J=!0;if(typeof D!="function")throw new TypeError(ue);return z(X)&&(fe="leading"in X?!!X.leading:fe,J="trailing"in X?!!X.trailing:J),Z(D,V,{leading:fe,maxWait:V,trailing:J})}function z(D){var V=typeof D;return!!D&&(V=="object"||V=="function")}function R(D){return!!D&&typeof D=="object"}function q(D){return typeof D=="symbol"||R(D)&&we.call(D)==H}function W(D){if(typeof D=="number")return D;if(q(D))return he;if(z(D)){var V=typeof D.valueOf=="function"?D.valueOf():D;D=z(V)?V+"":V}if(typeof D!="string")return D===0?D:+D;D=D.replace(ge,"");var X=Se.test(D);return X||x.test(D)?Ce(D.slice(2),X?2:8):Ee.test(D)?he:+D}lt.exports=B}}]);