You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
23 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6342],{25414:function(){},36166:function(Tt,Fe,b){"use strict";b.d(Fe,{Z:function(){return Za}});var K=b(96156),$=b(22122),Ne=b(54549),Ue=b(44545),Pt=b(49101),Zt=b(94184),U=b.n(Zt),H=b(28991),w=b(28481),Ce=b(90484),me=b(81253),t=b(67294),Nt=b(31131),je=b(21770),Rt=b(5461),Ee=(0,t.createContext)(null),kt=t.forwardRef(function(e,a){var o=e.prefixCls,n=e.className,r=e.style,i=e.id,l=e.active,s=e.tabKey,u=e.children;return t.createElement("div",{id:i&&"".concat(i,"-panel-").concat(s),role:"tabpanel",tabIndex:l?0:-1,"aria-labelledby":i&&"".concat(i,"-tab-").concat(s),"aria-hidden":!l,style:r,className:U()(o,l&&"".concat(o,"-active"),n),ref:a},u)}),$e=kt,It=["key","forceRender","style","className"];function At(e){var a=e.id,o=e.activeKey,n=e.animated,r=e.tabPosition,i=e.destroyInactiveTabPane,l=t.useContext(Ee),s=l.prefixCls,u=l.tabs,y=n.tabPane,S="".concat(s,"-tabpane");return t.createElement("div",{className:U()("".concat(s,"-content-holder"))},t.createElement("div",{className:U()("".concat(s,"-content"),"".concat(s,"-content-").concat(r),(0,K.Z)({},"".concat(s,"-content-animated"),y))},u.map(function(c){var m=c.key,p=c.forceRender,g=c.style,N=c.className,R=(0,me.Z)(c,It),M=m===o;return t.createElement(Rt.ZP,(0,$.Z)({key:m,visible:M,forceRender:p,removeOnLeave:!!i,leavedClassName:"".concat(S,"-hidden")},n.tabPaneMotion),function(O,k){var z=O.style,V=O.className;return t.createElement($e,(0,$.Z)({},R,{prefixCls:S,id:a,tabKey:m,animated:y,active:M,style:(0,H.Z)((0,H.Z)({},g),z),className:U()(N,V),ref:k}))})})))}var He=b(85061),Ge=b(48717),Mt=b(66680),Re=b(75164),wt=b(42550),Xe={width:0,height:0,left:0,top:0};function Ot(e,a,o){return(0,t.useMemo)(function(){for(var n,r=new Map,i=a.get((n=e[0])===null||n===void 0?void 0:n.key)||Xe,l=i.left+i.width,s=0;s<e.length;s+=1){var u=e[s].key,y=a.get(u);if(!y){var S;y=a.get((S=e[s-1])===null||S===void 0?void 0:S.key)||Xe}var c=r.get(u)||(0,H.Z)({},y);c.right=l-c.left-c.width,r.set(u,c)}return r},[e.map(function(n){return n.key}).join("_"),a,o])}function Ye(e,a){var o=t.useRef(e),n=t.useState({}),r=(0,w.Z)(n,2),i=r[1];function l(s){var u=typeof s=="function"?s(o.current):s;u!==o.current&&a(u,o.current),o.current=u,i({})}return[o.current,l]}var Lt=.1,Qe=.01,Se=20,Je=Math.pow(.995,Se);function Bt(e,a){var o=(0,t.useState)(),n=(0,w.Z)(o,2),r=n[0],i=n[1],l=(0,t.useState)(0),s=(0,w.Z)(l,2),u=s[0],y=s[1],S=(0,t.useState)(0),c=(0,w.Z)(S,2),m=c[0],p=c[1],g=(0,t.useState)(),N=(0,w.Z)(g,2),R=N[0],M=N[1],O=(0,t.useRef)();function k(h){var x=h.touches[0],f=x.screenX,T=x.screenY;i({x:f,y:T}),window.clearInterval(O.current)}function z(h){if(!!r){h.preventDefault();var x=h.touches[0],f=x.screenX,T=x.screenY;i({x:f,y:T});var C=f-r.x,P=T-r.y;a(C,P);var X=Date.now();y(X),p(X-u),M({x:C,y:P})}}function V(){if(!!r&&(i(null),M(null),R)){var h=R.x/m,x=R.y/m,f=Math.abs(h),T=Math.abs(x);if(Math.max(f,T)<Lt)return;var C=h,P=x;O.current=window.setInterval(function(){if(Math.abs(C)<Qe&&Math.abs(P)<Qe){window.clearInterval(O.current);return}C*=Je,P*=Je,a(C*Se,P*Se)},Se)}}var A=(0,t.useRef)();function I(h){var x=h.deltaX,f=h.deltaY,T=0,C=Math.abs(x),P=Math.abs(f);C===P?T=A.current==="x"?x:f:C>P?(T=x,A.current="x"):(T=f,A.current="y"),a(-T,-T)&&h.preventDefault()}var D=(0,t.useRef)(null);D.current={onTouchStart:k,onTouchMove:z,onTouchEnd:V,onWheel:I},t.useEffect(function(){function h(C){D.current.onTouchStart(C)}function x(C){D.current.onTouchMove(C)}function f(C){D.current.onTouchEnd(C)}function T(C){D.current.onWheel(C)}return document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",f,{passive:!1}),e.current.addEventListener("touchstart",h,{passive:!1}),e.current.addEventListener("wheel",T),function(){document.removeEventListener("touchmove",x),document.removeEventListener("touchend",f)}},[])}var Dt=b(8410);function qe(e){var a=(0,t.useState)(0),o=(0,w.Z)(a,2),n=o[0],r=o[1],i=(0,t.useRef)(0),l=(0,t.useRef)();return l.current=e,(0,Dt.o)(function(){var s;(s=l.current)===null||s===void 0||s.call(l)},[n]),function(){i.current===n&&(i.current+=1,r(i.current))}}function Kt(e){var a=(0,t.useRef)([]),o=(0,t.useState)({}),n=(0,w.Z)(o,2),r=n[1],i=(0,t.useRef)(typeof e=="function"?e():e),l=qe(function(){var u=i.current;a.current.forEach(function(y){u=y(u)}),a.current=[],i.current=u,r({})});function s(u){a.current.push(u),l()}return[i.current,s]}var _e={width:0,height:0,left:0,top:0,right:0};function Vt(e,a,o,n,r,i,l){var s=l.tabs,u=l.tabPosition,y=l.rtl,S,c,m;return["top","bottom"].includes(u)?(S="width",c=y?"right":"left",m=Math.abs(o)):(S="height",c="top",m=-o),(0,t.useMemo)(function(){if(!s.length)return[0,0];for(var p=s.length,g=p,N=0;N<p;N+=1){var R=e.get(s[N].key)||_e;if(R[c]+R[S]>m+a){g=N-1;break}}for(var M=0,O=p-1;O>=0;O-=1){var k=e.get(s[O].key)||_e;if(k[c]<m){M=O+1;break}}return[M,g]},[e,a,n,r,i,m,u,s.map(function(p){return p.key}).join("_"),y])}function et(e){var a;return e instanceof Map?(a={},e.forEach(function(o,n){a[n]=o})):a=e,JSON.stringify(a)}var zt="TABS_DQ";function tt(e){return String(e).replace(/"/g,zt)}function Wt(e,a){var o=e.prefixCls,n=e.editable,r=e.locale,i=e.style;return!n||n.showAdd===!1?null:t.createElement("button",{ref:a,type:"button",className:"".concat(o,"-nav-add"),style:i,"aria-label":(r==null?void 0:r.addAriaLabel)||"Add tab",onClick:function(s){n.onEdit("add",{event:s})}},n.addIcon||"+")}var at=t.forwardRef(Wt),Ft=t.forwardRef(function(e,a){var o=e.position,n=e.prefixCls,r=e.extra;if(!r)return null;var i,l={};return(0,Ce.Z)(r)==="object"&&!t.isValidElement(r)?l=r:l.right=r,o==="right"&&(i=l.right),o==="left"&&(i=l.left),i?t.createElement("div",{className:"".concat(n,"-extra-content"),ref:a},i):null}),nt=Ft,Ut=b(2306),ue={adjustX:1,adjustY:1},ve=[0,0],jt={topLeft:{points:["bl","tl"],overflow:ue,offset:[0,-4],targetOffset:ve},topCenter:{points:["bc","tc"],overflow:ue,offset:[0,-4],targetOffset:ve},topRight:{points:["br","tr"],overflow:ue,offset:[0,-4],targetOffset:ve},bottomLeft:{points:["tl","bl"],overflow:ue,offset:[0,4],targetOffset:ve},bottomCenter:{points:["tc","bc"],overflow:ue,offset:[0,4],targetOffset:ve},bottomRight:{points:["tr","br"],overflow:ue,offset:[0,4],targetOffset:ve}},$t=jt,Y=b(15105),Ht=b(88603),Gt=Y.Z.ESC,Xt=Y.Z.TAB;function Yt(e){var a=e.visible,o=e.setTriggerVisible,n=e.triggerRef,r=e.onVisibleChange,i=e.autoFocus,l=t.useRef(!1),s=function(){if(a&&n.current){var c,m,p,g;(c=n.current)===null||c===void 0||(m=c.triggerRef)===null||m===void 0||(p=m.current)===null||p===void 0||(g=p.focus)===null||g===void 0||g.call(p),o(!1),typeof r=="function"&&r(!1)}},u=function(){var c,m,p,g,N=(0,Ht.tS)((c=n.current)===null||c===void 0||(m=c.popupRef)===null||m===void 0||(p=m.current)===null||p===void 0||(g=p.getElement)===null||g===void 0?void 0:g.call(p)),R=N[0];return(R==null?void 0:R.focus)?(R.focus(),l.current=!0,!0):!1},y=function(c){switch(c.keyCode){case Gt:s();break;case Xt:{var m=!1;l.current||(m=u()),m?c.preventDefault():s();break}}};t.useEffect(function(){return a?(window.addEventListener("keydown",y),i&&(0,Re.Z)(u,3),function(){window.removeEventListener("keydown",y),l.current=!1}):function(){l.current=!1}},[a])}var Qt=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"];function Jt(e,a){var o=e.arrow,n=o===void 0?!1:o,r=e.prefixCls,i=r===void 0?"rc-dropdown":r,l=e.transitionName,s=e.animation,u=e.align,y=e.placement,S=y===void 0?"bottomLeft":y,c=e.placements,m=c===void 0?$t:c,p=e.getPopupContainer,g=e.showAction,N=e.hideAction,R=e.overlayClassName,M=e.overlayStyle,O=e.visible,k=e.trigger,z=k===void 0?["hover"]:k,V=e.autoFocus,A=(0,me.Z)(e,Qt),I=t.useState(),D=(0,w.Z)(I,2),h=D[0],x=D[1],f="visible"in e?O:h,T=t.useRef(null);t.useImperativeHandle(a,function(){return T.current}),Yt({visible:f,setTriggerVisible:x,triggerRef:T,onVisibleChange:e.onVisibleChange,autoFocus:V});var C=function(){var d=e.overlay,L;return typeof d=="function"?L=d():L=d,L},P=function(d){var L=e.onOverlayClick;x(!1),L&&L(d)},X=function(d){var L=e.onVisibleChange;x(d),typeof L=="function"&&L(d)},te=function(){var d=C();return t.createElement(t.Fragment,null,n&&t.createElement("div",{className:"".concat(i,"-arrow")}),d)},q=function(){var d=e.overlay;return typeof d=="function"?te:te()},G=function(){var d=e.minOverlayWidthMatchTrigger,L=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?d:!L},Q=function(){var d=e.openClassName;return d!==void 0?d:"".concat(i,"-open")},le=function(){var d=e.children,L=d.props?d.props:{},F=U()(L.className,Q());return f&&d?t.cloneElement(d,{className:F}):d},J=N;return!J&&z.indexOf("contextMenu")!==-1&&(J=["click"]),t.createElement(Ut.Z,(0,H.Z)((0,H.Z)({builtinPlacements:m},A),{},{prefixCls:i,ref:T,popupClassName:U()(R,(0,K.Z)({},"".concat(i,"-show-arrow"),n)),popupStyle:M,action:z,showAction:g,hideAction:J||[],popupPlacement:S,popupAlign:u,popupTransitionName:l,popupAnimation:s,popupVisible:f,stretch:G()?"minWidth":"",popup:q(),onPopupVisibleChange:X,onPopupClick:P,getPopupContainer:p}),le())}var qt=t.forwardRef(Jt),_t=qt,rt=b(94423);function ea(e,a){var o=e.prefixCls,n=e.id,r=e.tabs,i=e.locale,l=e.mobile,s=e.moreIcon,u=s===void 0?"More":s,y=e.moreTransitionName,S=e.style,c=e.className,m=e.editable,p=e.tabBarGutter,g=e.rtl,N=e.removeAriaLabel,R=e.onTabClick,M=e.getPopupContainer,O=e.popupClassName,k=(0,t.useState)(!1),z=(0,w.Z)(k,2),V=z[0],A=z[1],I=(0,t.useState)(null),D=(0,w.Z)(I,2),h=D[0],x=D[1],f="".concat(n,"-more-popup"),T="".concat(o,"-dropdown"),C=h!==null?"".concat(f,"-").concat(h):null,P=i==null?void 0:i.dropdownAriaLabel;function X(v,d){v.preventDefault(),v.stopPropagation(),m.onEdit("remove",{key:d,event:v})}var te=t.createElement(rt.ZP,{onClick:function(d){var L=d.key,F=d.domEvent;R(L,F),A(!1)},prefixCls:"".concat(T,"-menu"),id:f,tabIndex:-1,role:"listbox","aria-activedescendant":C,selectedKeys:[h],"aria-label":P!==void 0?P:"expanded dropdown"},r.map(function(v){var d=m&&v.closable!==!1&&!v.disabled;return t.createElement(rt.sN,{key:v.key,id:"".concat(f,"-").concat(v.key),role:"option","aria-controls":n&&"".concat(n,"-panel-").concat(v.key),disabled:v.disabled},t.createElement("span",null,v.label),d&&t.createElement("button",{type:"button","aria-label":N||"remove",tabIndex:0,className:"".concat(T,"-menu-item-remove"),onClick:function(F){F.stopPropagation(),X(F,v.key)}},v.closeIcon||m.removeIcon||"\xD7"))}));function q(v){for(var d=r.filter(function(se){return!se.disabled}),L=d.findIndex(function(se){return se.key===h})||0,F=d.length,ae=0;ae<F;ae+=1){L=(L+v+F)%F;var fe=d[L];if(!fe.disabled){x(fe.key);return}}}function G(v){var d=v.which;if(!V){[Y.Z.DOWN,Y.Z.SPACE,Y.Z.ENTER].includes(d)&&(A(!0),v.preventDefault());return}switch(d){case Y.Z.UP:q(-1),v.preventDefault();break;case Y.Z.DOWN:q(1),v.preventDefault();break;case Y.Z.ESC:A(!1);break;case Y.Z.SPACE:case Y.Z.ENTER:h!==null&&R(h,v);break}}(0,t.useEffect)(function(){var v=document.getElementById(C);v&&v.scrollIntoView&&v.scrollIntoView(!1)},[h]),(0,t.useEffect)(function(){V||x(null)},[V]);var Q=(0,K.Z)({},g?"marginRight":"marginLeft",p);r.length||(Q.visibility="hidden",Q.order=1);var le=U()((0,K.Z)({},"".concat(T,"-rtl"),g)),J=l?null:t.createElement(_t,{prefixCls:T,overlay:te,trigger:["hover"],visible:r.length?V:!1,transitionName:y,onVisibleChange:A,overlayClassName:U()(le,O),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:M},t.createElement("button",{type:"button",className:"".concat(o,"-nav-more"),style:Q,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":f,id:"".concat(n,"-more"),"aria-expanded":V,onKeyDown:G},u));return t.createElement("div",{className:U()("".concat(o,"-nav-operations"),c),style:S,ref:a},J,t.createElement(at,{prefixCls:o,locale:i,editable:m}))}var ta=t.memo(t.forwardRef(ea),function(e,a){return a.tabMoving});function aa(e){var a,o=e.prefixCls,n=e.id,r=e.active,i=e.tab,l=i.key,s=i.label,u=i.disabled,y=i.closeIcon,S=e.closable,c=e.renderWrapper,m=e.removeAriaLabel,p=e.editable,g=e.onClick,N=e.onFocus,R=e.style,M="".concat(o,"-tab"),O=p&&S!==!1&&!u;function k(A){u||g(A)}function z(A){A.preventDefault(),A.stopPropagation(),p.onEdit("remove",{key:l,event:A})}var V=t.createElement("div",{key:l,"data-node-key":tt(l),className:U()(M,(a={},(0,K.Z)(a,"".concat(M,"-with-remove"),O),(0,K.Z)(a,"".concat(M,"-active"),r),(0,K.Z)(a,"".concat(M,"-disabled"),u),a)),style:R,onClick:k},t.createElement("div",{role:"tab","aria-selected":r,id:n&&"".concat(n,"-tab-").concat(l),className:"".concat(M,"-btn"),"aria-controls":n&&"".concat(n,"-panel-").concat(l),"aria-disabled":u,tabIndex:u?null:0,onClick:function(I){I.stopPropagation(),k(I)},onKeyDown:function(I){[Y.Z.SPACE,Y.Z.ENTER].includes(I.which)&&(I.preventDefault(),k(I))},onFocus:N},s),O&&t.createElement("button",{type:"button","aria-label":m||"remove",tabIndex:0,className:"".concat(M,"-remove"),onClick:function(I){I.stopPropagation(),z(I)}},y||p.removeIcon||"\xD7"));return c?c(V):V}var na=aa,de=function(a){var o=a.current||{},n=o.offsetWidth,r=n===void 0?0:n,i=o.offsetHeight,l=i===void 0?0:i;return[r,l]},xe=function(a,o){return a[o?0:1]};function ra(e,a){var o,n=t.useContext(Ee),r=n.prefixCls,i=n.tabs,l=e.className,s=e.style,u=e.id,y=e.animated,S=e.activeKey,c=e.rtl,m=e.extra,p=e.editable,g=e.locale,N=e.tabPosition,R=e.tabBarGutter,M=e.children,O=e.onTabClick,k=e.onTabScroll,z=(0,t.useRef)(),V=(0,t.useRef)(),A=(0,t.useRef)(),I=(0,t.useRef)(),D=(0,t.useRef)(),h=(0,t.useRef)(),x=(0,t.useRef)(),f=N==="top"||N==="bottom",T=Ye(0,function(Z,E){f&&k&&k({direction:Z>E?"left":"right"})}),C=(0,w.Z)(T,2),P=C[0],X=C[1],te=Ye(0,function(Z,E){!f&&k&&k({direction:Z>E?"top":"bottom"})}),q=(0,w.Z)(te,2),G=q[0],Q=q[1],le=(0,t.useState)([0,0]),J=(0,w.Z)(le,2),v=J[0],d=J[1],L=(0,t.useState)([0,0]),F=(0,w.Z)(L,2),ae=F[0],fe=F[1],se=(0,t.useState)([0,0]),be=(0,w.Z)(se,2),ke=be[0],Ie=be[1],Ae=(0,t.useState)([0,0]),pe=(0,w.Z)(Ae,2),Me=pe[0],we=pe[1],B=Kt(new Map),ne=(0,w.Z)(B,2),ge=ne[0],Na=ne[1],Te=Ot(i,ge,ae[0]),Oe=xe(v,f),he=xe(ae,f),Le=xe(ke,f),st=xe(Me,f),ct=Oe<he+Le,_=ct?Oe-st:Oe-Le,Ra="".concat(r,"-nav-operations-hidden"),re=0,ce=0;f&&c?(re=0,ce=Math.max(0,he-_)):(re=Math.min(0,_-he),ce=0);function Be(Z){return Z<re?re:Z>ce?ce:Z}var ut=(0,t.useRef)(),ka=(0,t.useState)(),vt=(0,w.Z)(ka,2),Pe=vt[0],dt=vt[1];function De(){dt(Date.now())}function Ke(){window.clearTimeout(ut.current)}Bt(I,function(Z,E){function W(j,ie){j(function(ee){var Ka=Be(ee+ie);return Ka})}return ct?(f?W(X,Z):W(Q,E),Ke(),De(),!0):!1}),(0,t.useEffect)(function(){return Ke(),Pe&&(ut.current=window.setTimeout(function(){dt(0)},100)),Ke},[Pe]);var Ia=Vt(Te,_,f?P:G,he,Le,st,(0,H.Z)((0,H.Z)({},e),{},{tabs:i})),ft=(0,w.Z)(Ia,2),Aa=ft[0],Ma=ft[1],mt=(0,Mt.Z)(function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:S,E=Te.get(Z)||{width:0,height:0,left:0,right:0,top:0};if(f){var W=P;c?E.right<P?W=E.right:E.right+E.width>P+_&&(W=E.right+E.width-_):E.left<-P?W=-E.left:E.left+E.width>-P+_&&(W=-(E.left+E.width-_)),Q(0),X(Be(W))}else{var j=G;E.top<-G?j=-E.top:E.top+E.height>-G+_&&(j=-(E.top+E.height-_)),X(0),Q(Be(j))}}),Ze={};N==="top"||N==="bottom"?Ze[c?"marginRight":"marginLeft"]=R:Ze.marginTop=R;var bt=i.map(function(Z,E){var W=Z.key;return t.createElement(na,{id:u,prefixCls:r,key:W,tab:Z,style:E===0?void 0:Ze,closable:Z.closable,editable:p,active:W===S,renderWrapper:M,removeAriaLabel:g==null?void 0:g.removeAriaLabel,onClick:function(ie){O(W,ie)},onFocus:function(){mt(W),De(),!!I.current&&(c||(I.current.scrollLeft=0),I.current.scrollTop=0)}})}),pt=function(){return Na(function(){var E=new Map;return i.forEach(function(W){var j,ie=W.key,ee=(j=D.current)===null||j===void 0?void 0:j.querySelector('[data-node-key="'.concat(tt(ie),'"]'));ee&&E.set(ie,{width:ee.offsetWidth,height:ee.offsetHeight,left:ee.offsetLeft,top:ee.offsetTop})}),E})};(0,t.useEffect)(function(){pt()},[i.map(function(Z){return Z.key}).join("_")]);var Ve=qe(function(){var Z=de(z),E=de(V),W=de(A);d([Z[0]-E[0]-W[0],Z[1]-E[1]-W[1]]);var j=de(x);Ie(j);var ie=de(h);we(ie);var ee=de(D);fe([ee[0]-j[0],ee[1]-j[1]]),pt()}),wa=i.slice(0,Aa),Oa=i.slice(Ma+1),gt=[].concat((0,He.Z)(wa),(0,He.Z)(Oa)),La=(0,t.useState)(),ht=(0,w.Z)(La,2),Ba=ht[0],Da=ht[1],oe=Te.get(S),yt=(0,t.useRef)();function Ct(){Re.Z.cancel(yt.current)}(0,t.useEffect)(function(){var Z={};return oe&&(f?(c?Z.right=oe.right:Z.left=oe.left,Z.width=oe.width):(Z.top=oe.top,Z.height=oe.height)),Ct(),yt.current=(0,Re.Z)(function(){Da(Z)}),Ct},[oe,f,c]),(0,t.useEffect)(function(){mt()},[S,re,ce,et(oe),et(Te),f]),(0,t.useEffect)(function(){Ve()},[c]);var Et=!!gt.length,ye="".concat(r,"-nav-wrap"),ze,We,St,xt;return f?c?(We=P>0,ze=P!==ce):(ze=P<0,We=P!==re):(St=G<0,xt=G!==re),t.createElement(Ge.Z,{onResize:Ve},t.createElement("div",{ref:(0,wt.x1)(a,z),role:"tablist",className:U()("".concat(r,"-nav"),l),style:s,onKeyDown:function(){De()}},t.createElement(nt,{ref:V,position:"left",extra:m,prefixCls:r}),t.createElement("div",{className:U()(ye,(o={},(0,K.Z)(o,"".concat(ye,"-ping-left"),ze),(0,K.Z)(o,"".concat(ye,"-ping-right"),We),(0,K.Z)(o,"".concat(ye,"-ping-top"),St),(0,K.Z)(o,"".concat(ye,"-ping-bottom"),xt),o)),ref:I},t.createElement(Ge.Z,{onResize:Ve},t.createElement("div",{ref:D,className:"".concat(r,"-nav-list"),style:{transform:"translate(".concat(P,"px, ").concat(G,"px)"),transition:Pe?"none":void 0}},bt,t.createElement(at,{ref:x,prefixCls:r,locale:g,editable:p,style:(0,H.Z)((0,H.Z)({},bt.length===0?void 0:Ze),{},{visibility:Et?"hidden":null})}),t.createElement("div",{className:U()("".concat(r,"-ink-bar"),(0,K.Z)({},"".concat(r,"-ink-bar-animated"),y.inkBar)),style:Ba})))),t.createElement(ta,(0,$.Z)({},e,{removeAriaLabel:g==null?void 0:g.removeAriaLabel,ref:h,prefixCls:r,tabs:gt,className:!Et&&Ra,tabMoving:!!Pe})),t.createElement(nt,{ref:A,position:"right",extra:m,prefixCls:r})))}var ot=t.forwardRef(ra),oa=["renderTabBar"],ia=["label","key"];function la(e){var a=e.renderTabBar,o=(0,me.Z)(e,oa),n=t.useContext(Ee),r=n.tabs;if(a){var i=(0,H.Z)((0,H.Z)({},o),{},{panes:r.map(function(l){var s=l.label,u=l.key,y=(0,me.Z)(l,ia);return t.createElement($e,(0,$.Z)({tab:s,key:u,tabKey:u},y))})});return a(i,ot)}return t.createElement(ot,o)}var Va=b(80334);function sa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},a;return e===!1?a={inkBar:!1,tabPane:!1}:e===!0?a={inkBar:!0,tabPane:!1}:a=(0,H.Z)({inkBar:!0},(0,Ce.Z)(e)==="object"?e:{}),a.tabPaneMotion&&a.tabPane===void 0&&(a.tabPane=!0),!a.tabPaneMotion&&a.tabPane&&(a.tabPane=!1),a}var ca=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName"],it=0;function ua(e,a){var o,n=e.id,r=e.prefixCls,i=r===void 0?"rc-tabs":r,l=e.className,s=e.items,u=e.direction,y=e.activeKey,S=e.defaultActiveKey,c=e.editable,m=e.animated,p=e.tabPosition,g=p===void 0?"top":p,N=e.tabBarGutter,R=e.tabBarStyle,M=e.tabBarExtraContent,O=e.locale,k=e.moreIcon,z=e.moreTransitionName,V=e.destroyInactiveTabPane,A=e.renderTabBar,I=e.onChange,D=e.onTabClick,h=e.onTabScroll,x=e.getPopupContainer,f=e.popupClassName,T=(0,me.Z)(e,ca),C=t.useMemo(function(){return(s||[]).filter(function(B){return B&&(0,Ce.Z)(B)==="object"&&"key"in B})},[s]),P=u==="rtl",X=sa(m),te=(0,t.useState)(!1),q=(0,w.Z)(te,2),G=q[0],Q=q[1];(0,t.useEffect)(function(){Q((0,Nt.Z)())},[]);var le=(0,je.Z)(function(){var B;return(B=C[0])===null||B===void 0?void 0:B.key},{value:y,defaultValue:S}),J=(0,w.Z)(le,2),v=J[0],d=J[1],L=(0,t.useState)(function(){return C.findIndex(function(B){return B.key===v})}),F=(0,w.Z)(L,2),ae=F[0],fe=F[1];(0,t.useEffect)(function(){var B=C.findIndex(function(ge){return ge.key===v});if(B===-1){var ne;B=Math.max(0,Math.min(ae,C.length-1)),d((ne=C[B])===null||ne===void 0?void 0:ne.key)}fe(B)},[C.map(function(B){return B.key}).join("_"),v,ae]);var se=(0,je.Z)(null,{value:n}),be=(0,w.Z)(se,2),ke=be[0],Ie=be[1];(0,t.useEffect)(function(){n||(Ie("rc-tabs-".concat(it)),it+=1)},[]);function Ae(B,ne){D==null||D(B,ne);var ge=B!==v;d(B),ge&&(I==null||I(B))}var pe={id:ke,activeKey:v,animated:X,tabPosition:g,rtl:P,mobile:G},Me,we=(0,H.Z)((0,H.Z)({},pe),{},{editable:c,locale:O,moreIcon:k,moreTransitionName:z,tabBarGutter:N,onTabClick:Ae,onTabScroll:h,extra:M,style:R,panes:null,getPopupContainer:x,popupClassName:f});return t.createElement(Ee.Provider,{value:{tabs:C,prefixCls:i}},t.createElement("div",(0,$.Z)({ref:a,id:n,className:U()(i,"".concat(i,"-").concat(g),(o={},(0,K.Z)(o,"".concat(i,"-mobile"),G),(0,K.Z)(o,"".concat(i,"-editable"),c),(0,K.Z)(o,"".concat(i,"-rtl"),P),o),l)},T),Me,t.createElement(la,(0,$.Z)({},we,{renderTabBar:A})),t.createElement(At,(0,$.Z)({destroyInactiveTabPane:V},pe,{animated:X}))))}var va=t.forwardRef(ua),da=va,fa=da,ma=b(53124),ba=b(97647),pa=b(33603),ga={motionAppear:!1,motionEnter:!0,motionLeave:!0};function ha(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},o;return a===!1?o={inkBar:!1,tabPane:!1}:a===!0?o={inkBar:!0,tabPane:!0}:o=(0,$.Z)({inkBar:!0},(0,Ce.Z)(a)==="object"?a:{}),o.tabPane&&(o.tabPaneMotion=(0,$.Z)((0,$.Z)({},ga),{motionName:(0,pa.mL)(e,"switch")})),o}var ya=b(50344),Ca=function(e,a){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)a.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};function Ea(e){return e.filter(function(a){return a})}function Sa(e,a){if(e)return e;var o=(0,ya.Z)(a).map(function(n){if(t.isValidElement(n)){var r=n.key,i=n.props,l=i||{},s=l.tab,u=Ca(l,["tab"]),y=(0,$.Z)((0,$.Z)({key:String(r)},u),{label:s});return y}return null});return Ea(o)}var xa=function(){return null},Ta=xa,Pa=function(e,a){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)a.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};function lt(e){var a=e.type,o=e.className,n=e.size,r=e.onEdit,i=e.hideAdd,l=e.centered,s=e.addIcon,u=e.children,y=e.items,S=e.animated,c=Pa(e,["type","className","size","onEdit","hideAdd","centered","addIcon","children","items","animated"]),m=c.prefixCls,p=c.moreIcon,g=p===void 0?t.createElement(Ue.Z,null):p,N=t.useContext(ma.E_),R=N.getPrefixCls,M=N.direction,O=N.getPopupContainer,k=R("tabs",m),z;a==="editable-card"&&(z={onEdit:function(h,x){var f=x.key,T=x.event;r==null||r(h==="add"?T:f,h)},removeIcon:t.createElement(Ne.Z,null),addIcon:s||t.createElement(Pt.Z,null),showAdd:i!==!0});var V=R(),A=Sa(y,u),I=ha(k,S);return t.createElement(ba.Z.Consumer,null,function(D){var h=n!==void 0?n:D;return t.createElement(fa,(0,$.Z)({direction:M,getPopupContainer:O,moreTransitionName:"".concat(V,"-slide-up")},c,{items:A,className:U()((0,K.Z)((0,K.Z)((0,K.Z)((0,K.Z)({},"".concat(k,"-").concat(h),h),"".concat(k,"-card"),["card","editable-card"].includes(a)),"".concat(k,"-editable-card"),a==="editable-card"),"".concat(k,"-centered"),l),o),editable:z,moreIcon:g,prefixCls:k,animated:I}))})}lt.TabPane=Ta;var Za=lt},18106:function(Tt,Fe,b){"use strict";var K=b(38663),$=b.n(K),Ne=b(25414),Ue=b.n(Ne)}}]);