vdi/web-fe/serve/dist/199.async.js

4 lines
40 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[199],{49199:function(Sn,Zt,$){$.d(Zt,{Z:function(){return en}});var a=$(67294),Ot=$(97937),zt=$(89705),At=$(24969),_t=$(93967),q=$.n(_t),se=$(87462),ee=$(4942),ne=$(1413),N=$(97685),Be=$(71002),Re=$(91),Je=$(21770),Dt=$(31131),Ne=(0,a.createContext)(null),qe=$(74902),He=$(9220),Bt=$(66680),ge=$(42550),We=$(75164),Ht=function(t){var n=t.activeTabOffset,r=t.horizontal,i=t.rtl,l=t.indicator,c=l===void 0?{}:l,o=c.size,s=c.align,d=s===void 0?"center":s,b=(0,a.useState)(),u=(0,N.Z)(b,2),m=u[0],M=u[1],B=(0,a.useRef)(),w=a.useCallback(function(g){return typeof o=="function"?o(g):typeof o=="number"?o:g},[o]);function A(){We.Z.cancel(B.current)}return(0,a.useEffect)(function(){var g={};if(n)if(r){g.width=w(n.width);var h=i?"right":"left";d==="start"&&(g[h]=n[h]),d==="center"&&(g[h]=n[h]+n.width/2,g.transform=i?"translateX(50%)":"translateX(-50%)"),d==="end"&&(g[h]=n[h]+n.width,g.transform="translateX(-100%)")}else g.height=w(n.height),d==="start"&&(g.top=n.top),d==="center"&&(g.top=n.top+n.height/2,g.transform="translateY(-50%)"),d==="end"&&(g.top=n.top+n.height,g.transform="translateY(-100%)");return A(),B.current=(0,We.Z)(function(){var E=m&&g&&Object.keys(g).every(function(Z){var O=g[Z],D=m[Z];return typeof O=="number"&&typeof D=="number"?Math.round(O)===Math.round(D):O===D});E||M(g)}),A},[JSON.stringify(n),r,i,d,w]),{style:m}},Wt=Ht,et={width:0,height:0,left:0,top:0};function kt(e,t,n){return(0,a.useMemo)(function(){for(var r,i=new Map,l=t.get((r=e[0])===null||r===void 0?void 0:r.key)||et,c=l.left+l.width,o=0;o<e.length;o+=1){var s=e[o].key,d=t.get(s);if(!d){var b;d=t.get((b=e[o-1])===null||b===void 0?void 0:b.key)||et}var u=i.get(s)||(0,ne.Z)({},d);u.right=c-u.left-u.width,i.set(s,u)}return i},[e.map(function(r){return r.key}).join("_"),t,n])}function tt(e,t){var n=a.useRef(e),r=a.useState({}),i=(0,N.Z)(r,2),l=i[1];function c(o){var s=typeof o=="function"?o(n.current):o;s!==n.current&&t(s,n.current),n.current=s,l({})}return[n.current,c]}var Gt=.1,at=.01,Ze=20,nt=Math.pow(.995,Ze);function jt(e,t){var n=(0,a.useState)(),r=(0,N.Z)(n,2),i=r[0],l=r[1],c=(0,a.useState)(0),o=(0,N.Z)(c,2),s=o[0],d=o[1],b=(0,a.useState)(0),u=(0,N.Z)(b,2),m=u[0],M=u[1],B=(0,a.useState)(),w=(0,N.Z)(B,2),A=w[0],g=w[1],h=(0,a.useRef)();function E(x){var R=x.touches[0],v=R.screenX,S=R.screenY;l({x:v,y:S}),window.clearInterval(h.current)}function Z(x){if(i){var R=x.touches[0],v=R.screenX,S=R.screenY;l({x:v,y:S});var p=v-i.x,C=S-i.y;t(p,C);var H=Date.now();d(H),M(H-s),g({x:p,y:C})}}function O(){if(i&&(l(null),g(null),A)){var x=A.x/m,R=A.y/m,v=Math.abs(x),S=Math.abs(R);if(Math.max(v,S)<Gt)return;var p=x,C=R;h.current=window.setInterval(function(){if(Math.abs(p)<at&&Math.abs(C)<at){window.clearInterval(h.current);return}p*=nt,C*=nt,t(p*Ze,C*Ze)},Ze)}}var D=(0,a.useRef)();function G(x){var R=x.deltaX,v=x.deltaY,S=0,p=Math.abs(R),C=Math.abs(v);p===C?S=D.current==="x"?R:v:p>C?(S=R,D.current="x"):(S=v,D.current="y"),t(-S,-S)&&x.preventDefault()}var I=(0,a.useRef)(null);I.current={onTouchStart:E,onTouchMove:Z,onTouchEnd:O,onWheel:G},a.useEffect(function(){function x(p){I.current.onTouchStart(p)}function R(p){I.current.onTouchMove(p)}function v(p){I.current.onTouchEnd(p)}function S(p){I.current.onWheel(p)}return document.addEventListener("touchmove",R,{passive:!1}),document.addEventListener("touchend",v,{passive:!0}),e.current.addEventListener("touchstart",x,{passive:!0}),e.current.addEventListener("wheel",S,{passive:!1}),function(){document.removeEventListener("touchmove",R),document.removeEventListener("touchend",v)}},[])}var Vt=$(8410);function rt(e){var t=(0,a.useState)(0),n=(0,N.Z)(t,2),r=n[0],i=n[1],l=(0,a.useRef)(0),c=(0,a.useRef)();return c.current=e,(0,Vt.o)(function(){var o;(o=c.current)===null||o===void 0||o.call(c)},[r]),function(){l.current===r&&(l.current+=1,i(l.current))}}function Kt(e){var t=(0,a.useRef)([]),n=(0,a.useState)({}),r=(0,N.Z)(n,2),i=r[1],l=(0,a.useRef)(typeof e=="function"?e():e),c=rt(function(){var s=l.current;t.current.forEach(function(d){s=d(s)}),t.current=[],l.current=s,i({})});function o(s){t.current.push(s),c()}return[l.current,o]}var it={width:0,height:0,left:0,top:0,right:0};function Ft(e,t,n,r,i,l,c){var o=c.tabs,s=c.tabPosition,d=c.rtl,b,u,m;return["top","bottom"].includes(s)?(b="width",u=d?"right":"left",m=Math.abs(n)):(b="height",u="top",m=-n),(0,a.useMemo)(function(){if(!o.length)return[0,0];for(var M=o.length,B=M,w=0;w<M;w+=1){var A=e.get(o[w].key)||it;if(Math.floor(A[u]+A[b])>Math.floor(m+t)){B=w-1;break}}for(var g=0,h=M-1;h>=0;h-=1){var E=e.get(o[h].key)||it;if(E[u]<m){g=h+1;break}}return g>=B?[0,0]:[g,B]},[e,t,r,i,l,m,s,o.map(function(M){return M.key}).join("_"),d])}function ot(e){var t;return e instanceof Map?(t={},e.forEach(function(n,r){t[r]=n})):t=e,JSON.stringify(t)}var Xt="TABS_DQ";function lt(e){return String(e).replace(/"/g,Xt)}function ke(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var Ut=a.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,l=e.style;return!r||r.showAdd===!1?null:a.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:l,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(o){r.onEdit("add",{event:o})}},r.addIcon||"+")}),ct=Ut,Yt=a.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var l,c={};return(0,Be.Z)(i)==="object"&&!a.isValidElement(i)?c=i:c.right=i,n==="right"&&(l=c.right),n==="left"&&(l=c.left),l?a.createElement("div",{className:"".concat(r,"-extra-content"),ref:t},l):null}),st=Yt,Qt=$(40228),le=$(15105),Jt=le.Z.ESC,qt=le.Z.TAB;function ea(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,i=e.autoFocus,l=e.overlayRef,c=a.useRef(!1),o=function(){if(t){var u,m;(u=n.current)===null||u===void 0||(m=u.focus)===null||m===void 0||m.call(u),r==null||r(!1)}},s=function(){var u;return(u=l.current)!==null&&u!==void 0&&u.focus?(l.current.focus(),c.current=!0,!0):!1},d=function(u){switch(u.keyCode){case Jt:o();break;case qt:{var m=!1;c.current||(m=s()),m?u.preventDefault():o();break}}};a.useEffect(function(){return t?(window.addEventListener("keydown",d),i&&(0,We.Z)(s,3),function(){window.removeEventListener("keydown",d),c.current=!1}):function(){c.current=!1}},[t])}var ta=(0,a.forwardRef)(function(e,t){var n=e.overlay,r=e.arrow,i=e.prefixCls,l=(0,a.useMemo)(function(){var o;return typeof n=="function"?o=n():o=n,o},[n]),c=(0,ge.sQ)(t,(0,ge.C4)(l));return a.createElement(a.Fragment,null,r&&a.createElement("div",{className:"".concat(i,"-arrow")}),a.cloneElement(l,{ref:(0,ge.Yr)(l)?c:void 0}))}),aa=ta,ye={adjustX:1,adjustY:1},$e=[0,0],na={topLeft:{points:["bl","tl"],overflow:ye,offset:[0,-4],targetOffset:$e},top:{points:["bc","tc"],overflow:ye,offset:[0,-4],targetOffset:$e},topRight:{points:["br","tr"],overflow:ye,offset:[0,-4],targetOffset:$e},bottomLeft:{points:["tl","bl"],overflow:ye,offset:[0,4],targetOffset:$e},bottom:{points:["tc","bc"],overflow:ye,offset:[0,4],targetOffset:$e},bottomRight:{points:["tr","br"],overflow:ye,offset:[0,4],targetOffset:$e}},ra=na,ia=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function oa(e,t){var n,r=e.arrow,i=r===void 0?!1:r,l=e.prefixCls,c=l===void 0?"rc-dropdown":l,o=e.transitionName,s=e.animation,d=e.align,b=e.placement,u=b===void 0?"bottomLeft":b,m=e.placements,M=m===void 0?ra:m,B=e.getPopupContainer,w=e.showAction,A=e.hideAction,g=e.overlayClassName,h=e.overlayStyle,E=e.visible,Z=e.trigger,O=Z===void 0?["hover"]:Z,D=e.autoFocus,G=e.overlay,I=e.children,x=e.onVisibleChange,R=(0,Re.Z)(e,ia),v=a.useState(),S=(0,N.Z)(v,2),p=S[0],C=S[1],H="visible"in e?E:p,V=a.useRef(null),U=a.useRef(null),Q=a.useRef(null);a.useImperativeHandle(t,function(){return V.current});var y=function(j){C(j),x==null||x(j)};ea({visible:H,triggerRef:Q,onVisibleChange:y,autoFocus:D,overlayRef:U});var ae=function(j){var Y=e.onOverlayClick;C(!1),Y&&Y(j)},te=function(){return a.createElement(aa,{ref:U,overlay:G,prefixCls:c,arrow:i})},J=function(){return typeof G=="function"?te:te()},P=function(){var j=e.minOverlayWidthMatchTrigger,Y=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?j:!Y},W=function(){var j=e.openClassName;return j!==void 0?j:"".concat(c,"-open")},X=a.cloneElement(I,{className:q()((n=I.props)===null||n===void 0?void 0:n.className,H&&W()),ref:(0,ge.Yr)(I)?(0,ge.sQ)(Q,(0,ge.C4)(I)):void 0}),K=A;return!K&&O.indexOf("contextMenu")!==-1&&(K=["click"]),a.createElement(Qt.Z,(0,se.Z)({builtinPlacements:M},R,{prefixCls:c,ref:V,popupClassName:q()(g,(0,ee.Z)({},"".concat(c,"-show-arrow"),i)),popupStyle:h,action:O,showAction:w,hideAction:K,popupPlacement:u,popupAlign:d,popupTransitionName:o,popupAnimation:s,popupVisible:H,stretch:P()?"minWidth":"",popup:J(),onPopupVisibleChange:y,onPopupClick:ae,getPopupContainer:B}),X)}var la=a.forwardRef(oa),ca=la,dt=$(72512),sa=a.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.tabs,l=e.locale,c=e.mobile,o=e.more,s=o===void 0?{}:o,d=e.style,b=e.className,u=e.editable,m=e.tabBarGutter,M=e.rtl,B=e.removeAriaLabel,w=e.onTabClick,A=e.getPopupContainer,g=e.popupClassName,h=(0,a.useState)(!1),E=(0,N.Z)(h,2),Z=E[0],O=E[1],D=(0,a.useState)(null),G=(0,N.Z)(D,2),I=G[0],x=G[1],R=s.icon,v=R===void 0?"More":R,S="".concat(r,"-more-popup"),p="".concat(n,"-dropdown"),C=I!==null?"".concat(S,"-").concat(I):null,H=l==null?void 0:l.dropdownAriaLabel;function V(P,W){P.preventDefault(),P.stopPropagation(),u.onEdit("remove",{key:W,event:P})}var U=a.createElement(dt.ZP,{onClick:function(W){var X=W.key,K=W.domEvent;w(X,K),O(!1)},prefixCls:"".concat(p,"-menu"),id:S,tabIndex:-1,role:"listbox","aria-activedescendant":C,selectedKeys:[I],"aria-label":H!==void 0?H:"expanded dropdown"},i.map(function(P){var W=P.closable,X=P.disabled,K=P.closeIcon,F=P.key,j=P.label,Y=ke(W,K,u,X);return a.createElement(dt.sN,{key:F,id:"".concat(S,"-").concat(F),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(F),disabled:X},a.createElement("span",null,j),Y&&a.createElement("button",{type:"button","aria-label":B||"remove",tabIndex:0,className:"".concat(p,"-menu-item-remove"),onClick:function(ve){ve.stopPropagation(),V(ve,F)}},K||u.removeIcon||"\xD7"))}));function Q(P){for(var W=i.filter(function(Y){return!Y.disabled}),X=W.findIndex(function(Y){return Y.key===I})||0,K=W.length,F=0;F<K;F+=1){X=(X+P+K)%K;var j=W[X];if(!j.disabled){x(j.key);return}}}function y(P){var W=P.which;if(!Z){[le.Z.DOWN,le.Z.SPACE,le.Z.ENTER].includes(W)&&(O(!0),P.preventDefault());return}switch(W){case le.Z.UP:Q(-1),P.preventDefault();break;case le.Z.DOWN:Q(1),P.preventDefault();break;case le.Z.ESC:O(!1);break;case le.Z.SPACE:case le.Z.ENTER:I!==null&&w(I,P);break}}(0,a.useEffect)(function(){var P=document.getElementById(C);P&&P.scrollIntoView&&P.scrollIntoView(!1)},[I]),(0,a.useEffect)(function(){Z||x(null)},[Z]);var ae=(0,ee.Z)({},M?"marginRight":"marginLeft",m);i.length||(ae.visibility="hidden",ae.order=1);var te=q()((0,ee.Z)({},"".concat(p,"-rtl"),M)),J=c?null:a.createElement(ca,(0,se.Z)({prefixCls:p,overlay:U,visible:i.length?Z:!1,onVisibleChange:O,overlayClassName:q()(te,g),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:A},s),a.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:ae,"aria-haspopup":"listbox","aria-controls":S,id:"".concat(r,"-more"),"aria-expanded":Z,onKeyDown:y},v));return a.createElement("div",{className:q()("".concat(n,"-nav-operations"),b),style:d,ref:t},J,a.createElement(ct,{prefixCls:n,locale:l,editable:u}))}),da=a.memo(sa,function(e,t){return t.tabMoving}),ua=function(t){var n=t.prefixCls,r=t.id,i=t.active,l=t.focus,c=t.tab,o=c.key,s=c.label,d=c.disabled,b=c.closeIcon,u=c.icon,m=t.closable,M=t.renderWrapper,B=t.removeAriaLabel,w=t.editable,A=t.onClick,g=t.onFocus,h=t.onBlur,E=t.onKeyDown,Z=t.onMouseDown,O=t.onMouseUp,D=t.style,G=t.tabCount,I=t.currentPosition,x="".concat(n,"-tab"),R=ke(m,b,w,d);function v(V){d||A(V)}function S(V){V.preventDefault(),V.stopPropagation(),w.onEdit("remove",{key:o,event:V})}var p=a.useMemo(function(){return u&&typeof s=="string"?a.createElement("span",null,s):s},[s,u]),C=a.useRef(null);a.useEffect(function(){l&&C.current&&C.current.focus()},[l]);var H=a.createElement("div",{key:o,"data-node-key":lt(o),className:q()(x,(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)({},"".concat(x,"-with-remove"),R),"".concat(x,"-active"),i),"".concat(x,"-disabled"),d),"".concat(x,"-focus"),l)),style:D,onClick:v},a.createElement("div",{ref:C,role:"tab","aria-selected":i,id:r&&"".concat(r,"-tab-").concat(o),className:"".concat(x,"-btn"),"aria-controls":r&&"".concat(r,"-panel-").concat(o),"aria-disabled":d,tabIndex:d?null:i?0:-1,onClick:function(U){U.stopPropagation(),v(U)},onKeyDown:E,onMouseDown:Z,onMouseUp:O,onFocus:g,onBlur:h},l&&a.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(I," of ").concat(G)),u&&a.createElement("span",{className:"".concat(x,"-icon")},u),s&&p),R&&a.createElement("button",{type:"button",role:"tab","aria-label":B||"remove",tabIndex:i?0:-1,className:"".concat(x,"-remove"),onClick:function(U){U.stopPropagation(),S(U)}},b||w.removeIcon||"\xD7"));return M?M(H):H},fa=ua,va=function(t,n){var r=t.offsetWidth,i=t.offsetHeight,l=t.offsetTop,c=t.offsetLeft,o=t.getBoundingClientRect(),s=o.width,d=o.height,b=o.left,u=o.top;return Math.abs(s-r)<1?[s,d,b-n.left,u-n.top]:[r,i,c,l]},Se=function(t){var n=t.current||{},r=n.offsetWidth,i=r===void 0?0:r,l=n.offsetHeight,c=l===void 0?0:l;if(t.current){var o=t.current.getBoundingClientRect(),s=o.width,d=o.height;if(Math.abs(s-i)<1)return[s,d]}return[i,c]},Oe=function(t,n){return t[n?0:1]},ba=a.forwardRef(function(e,t){var n=e.className,r=e.style,i=e.id,l=e.animated,c=e.activeKey,o=e.rtl,s=e.extra,d=e.editable,b=e.locale,u=e.tabPosition,m=e.tabBarGutter,M=e.children,B=e.onTabClick,w=e.onTabScroll,A=e.indicator,g=a.useContext(Ne),h=g.prefixCls,E=g.tabs,Z=(0,a.useRef)(null),O=(0,a.useRef)(null),D=(0,a.useRef)(null),G=(0,a.useRef)(null),I=(0,a.useRef)(null),x=(0,a.useRef)(null),R=(0,a.useRef)(null),v=u==="top"||u==="bottom",S=tt(0,function(L,f){v&&w&&w({direction:L>f?"left":"right"})}),p=(0,N.Z)(S,2),C=p[0],H=p[1],V=tt(0,function(L,f){!v&&w&&w({direction:L>f?"top":"bottom"})}),U=(0,N.Z)(V,2),Q=U[0],y=U[1],ae=(0,a.useState)([0,0]),te=(0,N.Z)(ae,2),J=te[0],P=te[1],W=(0,a.useState)([0,0]),X=(0,N.Z)(W,2),K=X[0],F=X[1],j=(0,a.useState)([0,0]),Y=(0,N.Z)(j,2),Ce=Y[0],ve=Y[1],xe=(0,a.useState)([0,0]),Te=(0,N.Z)(xe,2),z=Te[0],de=Te[1],he=Kt(new Map),gt=(0,N.Z)(he,2),tn=gt[0],an=gt[1],ze=kt(E,tn,K[0]),Ge=Oe(J,v),Ie=Oe(K,v),je=Oe(Ce,v),ht=Oe(z,v),pt=Math.floor(Ge)<Math.floor(Ie+je),ce=pt?Ge-ht:Ge-je,nn="".concat(h,"-nav-operations-hidden"),be=0,pe=0;v&&o?(be=0,pe=Math.max(0,Ie-ce)):(be=Math.min(0,ce-Ie),pe=0);function Ve(L){return L<be?be:L>pe?pe:L}var Ke=(0,a.useRef)(null),rn=(0,a.useState)(),yt=(0,N.Z)(rn,2),Ae=yt[0],$t=yt[1];function Fe(){$t(Date.now())}function Xe(){Ke.current&&clearTimeout(Ke.current)}jt(G,function(L,f){function _(k,oe){k(function(re){var we=Ve(re+oe);return we})}return pt?(v?_(H,L):_(y,f),Xe(),Fe(),!0):!1}),(0,a.useEffect)(function(){return Xe(),Ae&&(Ke.current=setTimeout(function(){$t(0)},100)),Xe},[Ae]);var on=Ft(ze,ce,v?C:Q,Ie,je,ht,(0,ne.Z)((0,ne.Z)({},e),{},{tabs:E})),St=(0,N.Z)(on,2),ln=St[0],cn=St[1],Ct=(0,Bt.Z)(function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,f=ze.get(L)||{width:0,height:0,left:0,right:0,top:0};if(v){var _=C;o?f.right<C?_=f.right:f.right+f.width>C+ce&&(_=f.right+f.width-ce):f.left<-C?_=-f.left:f.left+f.width>-C+ce&&(_=-(f.left+f.width-ce)),y(0),H(Ve(_))}else{var k=Q;f.top<-Q?k=-f.top:f.top+f.height>-Q+ce&&(k=-(f.top+f.height-ce)),H(0),y(Ve(k))}}),sn=(0,a.useState)(),xt=(0,N.Z)(sn,2),me=xt[0],Me=xt[1],dn=(0,a.useState)(!1),Tt=(0,N.Z)(dn,2),un=Tt[0],Pt=Tt[1],ue=E.filter(function(L){return!L.disabled}).map(function(L){return L.key}),Pe=function(f){var _=ue.indexOf(me||c),k=ue.length,oe=(_+f+k)%k,re=ue[oe];Me(re)},fn=function(f){var _=f.code,k=o&&v,oe=ue[0],re=ue[ue.length-1];switch(_){case"ArrowLeft":{v&&Pe(k?1:-1);break}case"ArrowRight":{v&&Pe(k?-1:1);break}case"ArrowUp":{f.preventDefault(),v||Pe(-1);break}case"ArrowDown":{f.preventDefault(),v||Pe(1);break}case"Home":{f.preventDefault(),Me(oe);break}case"End":{f.preventDefault(),Me(re);break}case"Enter":case"Space":{f.preventDefault(),B(me!=null?me:c,f);break}case"Backspace":case"Delete":{var we=ue.indexOf(me),ie=E.find(function(Ee){return Ee.key===me}),Qe=ke(ie==null?void 0:ie.closable,ie==null?void 0:ie.closeIcon,d,ie==null?void 0:ie.disabled);Qe&&(f.preventDefault(),f.stopPropagation(),d.onEdit("remove",{key:me,event:f}),we===ue.length-1?Pe(-1):Pe(1));break}}},_e={};v?_e[o?"marginRight":"marginLeft"]=m:_e.marginTop=m;var wt=E.map(function(L,f){var _=L.key;return a.createElement(fa,{id:i,prefixCls:h,key:_,tab:L,style:f===0?void 0:_e,closable:L.closable,editable:d,active:_===c,focus:_===me,renderWrapper:M,removeAriaLabel:b==null?void 0:b.removeAriaLabel,tabCount:ue.length,currentPosition:f+1,onClick:function(oe){B(_,oe)},onKeyDown:fn,onFocus:function(){un||Me(_),Ct(_),Fe(),G.current&&(o||(G.current.scrollLeft=0),G.current.scrollTop=0)},onBlur:function(){Me(void 0)},onMouseDown:function(){Pt(!0)},onMouseUp:function(){Pt(!1)}})}),Et=function(){return an(function(){var f,_=new Map,k=(f=I.current)===null||f===void 0?void 0:f.getBoundingClientRect();return E.forEach(function(oe){var re,we=oe.key,ie=(re=I.current)===null||re===void 0?void 0:re.querySelector('[data-node-key="'.concat(lt(we),'"]'));if(ie){var Qe=va(ie,k),Ee=(0,N.Z)(Qe,4),hn=Ee[0],pn=Ee[1],yn=Ee[2],$n=Ee[3];_.set(we,{width:hn,height:pn,left:yn,top:$n})}}),_})};(0,a.useEffect)(function(){Et()},[E.map(function(L){return L.key}).join("_")]);var De=rt(function(){var L=Se(Z),f=Se(O),_=Se(D);P([L[0]-f[0]-_[0],L[1]-f[1]-_[1]]);var k=Se(R);ve(k);var oe=Se(x);de(oe);var re=Se(I);F([re[0]-k[0],re[1]-k[1]]),Et()}),vn=E.slice(0,ln),bn=E.slice(cn+1),Rt=[].concat((0,qe.Z)(vn),(0,qe.Z)(bn)),It=ze.get(c),mn=Wt({activeTabOffset:It,horizontal:v,indicator:A,rtl:o}),gn=mn.style;(0,a.useEffect)(function(){Ct()},[c,be,pe,ot(It),ot(ze),v]),(0,a.useEffect)(function(){De()},[o]);var Mt=!!Rt.length,Le="".concat(h,"-nav-wrap"),Ue,Ye,Lt,Nt;return v?o?(Ye=C>0,Ue=C!==pe):(Ue=C<0,Ye=C!==be):(Lt=Q<0,Nt=Q!==be),a.createElement(He.Z,{onResize:De},a.createElement("div",{ref:(0,ge.x1)(t,Z),role:"tablist","aria-orientation":v?"horizontal":"vertical",className:q()("".concat(h,"-nav"),n),style:r,onKeyDown:function(){Fe()}},a.createElement(st,{ref:O,position:"left",extra:s,prefixCls:h}),a.createElement(He.Z,{onResize:De},a.createElement("div",{className:q()(Le,(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)({},"".concat(Le,"-ping-left"),Ue),"".concat(Le,"-ping-right"),Ye),"".concat(Le,"-ping-top"),Lt),"".concat(Le,"-ping-bottom"),Nt)),ref:G},a.createElement(He.Z,{onResize:De},a.createElement("div",{ref:I,className:"".concat(h,"-nav-list"),style:{transform:"translate(".concat(C,"px, ").concat(Q,"px)"),transition:Ae?"none":void 0}},wt,a.createElement(ct,{ref:R,prefixCls:h,locale:b,editable:d,style:(0,ne.Z)((0,ne.Z)({},wt.length===0?void 0:_e),{},{visibility:Mt?"hidden":null})}),a.createElement("div",{className:q()("".concat(h,"-ink-bar"),(0,ee.Z)({},"".concat(h,"-ink-bar-animated"),l.inkBar)),style:gn}))))),a.createElement(da,(0,se.Z)({},e,{removeAriaLabel:b==null?void 0:b.removeAriaLabel,ref:x,prefixCls:h,tabs:Rt,className:!Mt&&nn,tabMoving:!!Ae})),a.createElement(st,{ref:D,position:"right",extra:s,prefixCls:h})))}),ut=ba,ma=a.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,l=e.id,c=e.active,o=e.tabKey,s=e.children;return a.createElement("div",{id:l&&"".concat(l,"-panel-").concat(o),role:"tabpanel",tabIndex:c?0:-1,"aria-labelledby":l&&"".concat(l,"-tab-").concat(o),"aria-hidden":!c,style:i,className:q()(n,c&&"".concat(n,"-active"),r),ref:t},s)}),ft=ma,ga=["renderTabBar"],ha=["label","key"],pa=function(t){var n=t.renderTabBar,r=(0,Re.Z)(t,ga),i=a.useContext(Ne),l=i.tabs;if(n){var c=(0,ne.Z)((0,ne.Z)({},r),{},{panes:l.map(function(o){var s=o.label,d=o.key,b=(0,Re.Z)(o,ha);return a.createElement(ft,(0,se.Z)({tab:s,key:d,tabKey:d},b))})});return n(c,ut)}return a.createElement(ut,r)},ya=pa,$a=$(29372),Sa=["key","forceRender","style","className","destroyInactiveTabPane"],Ca=function(t){var n=t.id,r=t.activeKey,i=t.animated,l=t.tabPosition,c=t.destroyInactiveTabPane,o=a.useContext(Ne),s=o.prefixCls,d=o.tabs,b=i.tabPane,u="".concat(s,"-tabpane");return a.createElement("div",{className:q()("".concat(s,"-content-holder"))},a.createElement("div",{className:q()("".concat(s,"-content"),"".concat(s,"-content-").concat(l),(0,ee.Z)({},"".concat(s,"-content-animated"),b))},d.map(function(m){var M=m.key,B=m.forceRender,w=m.style,A=m.className,g=m.destroyInactiveTabPane,h=(0,Re.Z)(m,Sa),E=M===r;return a.createElement($a.ZP,(0,se.Z)({key:M,visible:E,forceRender:B,removeOnLeave:!!(c||g),leavedClassName:"".concat(u,"-hidden")},i.tabPaneMotion),function(Z,O){var D=Z.style,G=Z.className;return a.createElement(ft,(0,se.Z)({},h,{prefixCls:u,id:n,tabKey:M,animated:b,active:E,style:(0,ne.Z)((0,ne.Z)({},w),D),className:q()(A,G),ref:O}))})})))},xa=Ca,Cn=$(80334);function Ta(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t=(0,ne.Z)({inkBar:!0},(0,Be.Z)(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var Pa=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],vt=0,wa=a.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tabs":r,l=e.className,c=e.items,o=e.direction,s=e.activeKey,d=e.defaultActiveKey,b=e.editable,u=e.animated,m=e.tabPosition,M=m===void 0?"top":m,B=e.tabBarGutter,w=e.tabBarStyle,A=e.tabBarExtraContent,g=e.locale,h=e.more,E=e.destroyInactiveTabPane,Z=e.renderTabBar,O=e.onChange,D=e.onTabClick,G=e.onTabScroll,I=e.getPopupContainer,x=e.popupClassName,R=e.indicator,v=(0,Re.Z)(e,Pa),S=a.useMemo(function(){return(c||[]).filter(function(z){return z&&(0,Be.Z)(z)==="object"&&"key"in z})},[c]),p=o==="rtl",C=Ta(u),H=(0,a.useState)(!1),V=(0,N.Z)(H,2),U=V[0],Q=V[1];(0,a.useEffect)(function(){Q((0,Dt.Z)())},[]);var y=(0,Je.Z)(function(){var z;return(z=S[0])===null||z===void 0?void 0:z.key},{value:s,defaultValue:d}),ae=(0,N.Z)(y,2),te=ae[0],J=ae[1],P=(0,a.useState)(function(){return S.findIndex(function(z){return z.key===te})}),W=(0,N.Z)(P,2),X=W[0],K=W[1];(0,a.useEffect)(function(){var z=S.findIndex(function(he){return he.key===te});if(z===-1){var de;z=Math.max(0,Math.min(X,S.length-1)),J((de=S[z])===null||de===void 0?void 0:de.key)}K(z)},[S.map(function(z){return z.key}).join("_"),te,X]);var F=(0,Je.Z)(null,{value:n}),j=(0,N.Z)(F,2),Y=j[0],Ce=j[1];(0,a.useEffect)(function(){n||(Ce("rc-tabs-".concat(vt)),vt+=1)},[]);function ve(z,de){D==null||D(z,de);var he=z!==te;J(z),he&&(O==null||O(z))}var xe={id:Y,activeKey:te,animated:C,tabPosition:M,rtl:p,mobile:U},Te=(0,ne.Z)((0,ne.Z)({},xe),{},{editable:b,locale:g,more:h,tabBarGutter:B,onTabClick:ve,onTabScroll:G,extra:A,style:w,panes:null,getPopupContainer:I,popupClassName:x,indicator:R});return a.createElement(Ne.Provider,{value:{tabs:S,prefixCls:i}},a.createElement("div",(0,se.Z)({ref:t,id:n,className:q()(i,"".concat(i,"-").concat(M),(0,ee.Z)((0,ee.Z)((0,ee.Z)({},"".concat(i,"-mobile"),U),"".concat(i,"-editable"),b),"".concat(i,"-rtl"),p),l)},v),a.createElement(ya,(0,se.Z)({},Te,{renderTabBar:Z})),a.createElement(xa,(0,se.Z)({destroyInactiveTabPane:E},xe,{animated:C}))))}),Ea=wa,Ra=Ea,Ia=$(53124),Ma=$(35792),La=$(98675),Na=$(33603);const Za={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Oa(e,t={inkBar:!0,tabPane:!1}){let n;return t===!1?n={inkBar:!1,tabPane:!1}:t===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof t=="object"?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},Za),{motionName:(0,Na.m)(e,"switch")})),n}var za=$(50344),Aa=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function _a(e){return e.filter(t=>t)}function Da(e,t){if(e)return e.map(r=>{var i;const l=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:l})});const n=(0,za.Z)(t).map(r=>{if(a.isValidElement(r)){const{key:i,props:l}=r,c=l||{},{tab:o}=c,s=Aa(c,["tab"]);return Object.assign(Object.assign({key:String(i)},s),{label:o})}return null});return _a(n)}var Ba=Da,T=$(11568),fe=$(14747),Ha=$(83559),Wa=$(83262),bt=$(67771),ka=e=>{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[(0,bt.oN)(e,"slide-up"),(0,bt.oN)(e,"slide-down")]]};const Ga=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:l,itemSelectedColor:c}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${(0,T.bf)(e.lineWidth)} ${e.lineType} ${l}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:c,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:(0,fe.oN)(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:(0,T.bf)(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${(0,T.bf)(e.borderRadiusLG)} ${(0,T.bf)(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${(0,T.bf)(e.borderRadiusLG)} ${(0,T.bf)(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:(0,T.bf)(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${(0,T.bf)(e.borderRadiusLG)} 0 0 ${(0,T.bf)(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${(0,T.bf)(e.borderRadiusLG)} ${(0,T.bf)(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},ja=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},(0,fe.Wf)(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${(0,T.bf)(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},fe.vS),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${(0,T.bf)(e.paddingXXS)} ${(0,T.bf)(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Va=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:l,verticalItemMargin:c,calc:o}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${(0,T.bf)(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
> div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:o(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:l,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:c},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:(0,T.bf)(o(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${(0,T.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:o(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${(0,T.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Ka=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:l,horizontalItemPaddingSM:c,horizontalItemPaddingLG:o}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:c,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${(0,T.bf)(e.borderRadius)} ${(0,T.bf)(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${(0,T.bf)(e.borderRadius)} ${(0,T.bf)(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${(0,T.bf)(e.borderRadius)} ${(0,T.bf)(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${(0,T.bf)(e.borderRadius)} 0 0 ${(0,T.bf)(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:l,minHeight:l}}}}}},Fa=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:l,horizontalItemPadding:c,itemSelectedColor:o,itemColor:s}=e,d=`${t}-tab`;return{[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:c,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:s,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${d}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:"none",marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},(0,fe.Qy)(e)),"&:hover":{color:r},[`&${d}-active ${d}-btn`]:{color:o,textShadow:e.tabsActiveTextShadow},[`&${d}-focus ${d}-btn:focus-visible`]:(0,fe.oN)(e),[`&${d}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${d}-remove ${i}`]:{margin:0},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${d} + ${d}`]:{margin:{_skip_check_:!0,value:l}}}},Xa=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:l}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:(0,T.bf)(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:(0,T.bf)(e.marginXS)},marginLeft:{_skip_check_:!0,value:(0,T.bf)(l(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Ua=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:l,itemActiveColor:c,colorBorderSecondary:o}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${(0,T.bf)(e.lineWidth)} ${e.lineType} ${o}`,borderRadius:`${(0,T.bf)(e.borderRadiusLG)} ${(0,T.bf)(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:l},"&:active, &:focus:not(:focus-visible)":{color:c}},(0,fe.Qy)(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),Fa(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},(0,fe.Qy)(e)),{"&-hidden":{display:"none"}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},Ya=e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:l}=e,c=t||l,o=n||i,s=r||l+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:c,cardHeightSM:o,cardHeightLG:s,cardPadding:`${(c-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(s-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}};var Qa=(0,Ha.I$)("Tabs",e=>{const t=(0,Wa.IX)(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${(0,T.bf)(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${(0,T.bf)(e.horizontalItemGutter)}`});return[Ka(t),Xa(t),Va(t),ja(t),Ga(t),Ua(t),ka(t)]},Ya),Ja=()=>null,qa=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const mt=e=>{var t,n,r,i,l,c,o,s,d,b,u;const{type:m,className:M,rootClassName:B,size:w,onEdit:A,hideAdd:g,centered:h,addIcon:E,removeIcon:Z,moreIcon:O,more:D,popupClassName:G,children:I,items:x,animated:R,style:v,indicatorSize:S,indicator:p,destroyInactiveTabPane:C,destroyOnHidden:H}=e,V=qa(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:U}=V,{direction:Q,tabs:y,getPrefixCls:ae,getPopupContainer:te}=a.useContext(Ia.E_),J=ae("tabs",U),P=(0,Ma.Z)(J),[W,X,K]=Qa(J,P);let F;m==="editable-card"&&(F={onEdit:(z,{key:de,event:he})=>{A==null||A(z==="add"?he:de,z)},removeIcon:(t=Z!=null?Z:y==null?void 0:y.removeIcon)!==null&&t!==void 0?t:a.createElement(Ot.Z,null),addIcon:(E!=null?E:y==null?void 0:y.addIcon)||a.createElement(At.Z,null),showAdd:g!==!0});const j=ae(),Y=(0,La.Z)(w),Ce=Ba(x,I),ve=Oa(J,R),xe=Object.assign(Object.assign({},y==null?void 0:y.style),v),Te={align:(n=p==null?void 0:p.align)!==null&&n!==void 0?n:(r=y==null?void 0:y.indicator)===null||r===void 0?void 0:r.align,size:(o=(l=(i=p==null?void 0:p.size)!==null&&i!==void 0?i:S)!==null&&l!==void 0?l:(c=y==null?void 0:y.indicator)===null||c===void 0?void 0:c.size)!==null&&o!==void 0?o:y==null?void 0:y.indicatorSize};return W(a.createElement(Ra,Object.assign({direction:Q,getPopupContainer:te},V,{items:Ce,className:q()({[`${J}-${Y}`]:Y,[`${J}-card`]:["card","editable-card"].includes(m),[`${J}-editable-card`]:m==="editable-card",[`${J}-centered`]:h},y==null?void 0:y.className,M,B,X,K,P),popupClassName:q()(G,X,K,P),style:xe,editable:F,more:Object.assign({icon:(u=(b=(d=(s=y==null?void 0:y.more)===null||s===void 0?void 0:s.icon)!==null&&d!==void 0?d:y==null?void 0:y.moreIcon)!==null&&b!==void 0?b:O)!==null&&u!==void 0?u:a.createElement(zt.Z,null),transitionName:`${j}-slide-up`},D),prefixCls:J,animated:ve,indicator:Te,destroyInactiveTabPane:H!=null?H:C})))};mt.TabPane=Ja;var en=mt}}]);