mirror of https://gitee.com/topiam/eiam
21 lines
34 KiB
JavaScript
21 lines
34 KiB
JavaScript
/*
|
|
* eiam-console - Employee Identity and Access Management Program
|
|
* Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[9299],{88372:function(rt,me,f){f.d(me,{f:function(){return l}});var a=f(4942),x=f(85893),E=f(46986),Oe=f(94184),We=f.n(Oe),we=f(67294),Ge=f(76509),K=f(1413),F=f(14855),de=function(Q){return(0,a.Z)({},Q.componentCls,{width:"100%","&-wide":{maxWidth:1152,margin:"0 auto"}})};function ue(he){return(0,F.Xj)("ProLayoutGridContent",function(Q){var ge=(0,K.Z)((0,K.Z)({},Q),{},{componentCls:".".concat(he)});return[de(ge)]})}var l=function(Q){var ge=(0,we.useContext)(Ge.X),ve=Q.children,Xe=Q.contentWidth,Ne=Q.className,Ke=Q.style,je=(0,we.useContext)(E.ZP.ConfigContext),Ie=je.getPrefixCls,ae=Q.prefixCls||Ie("pro"),Ve=Xe||ge.contentWidth,fe="".concat(ae,"-grid-content"),Ze=ue(fe),$e=Ze.wrapSSR,Y=Ze.hashId,ke=Ve==="Fixed";return $e((0,x.jsx)("div",{className:We()(fe,Y,Ne,(0,a.Z)({},"".concat(fe,"-wide"),ke)),style:Ke,children:(0,x.jsx)("div",{className:"".concat(ae,"-grid-content-children ").concat(Y),children:ve})}))}},76509:function(rt,me,f){f.d(me,{X:function(){return x}});var a=f(67294),x=(0,a.createContext)({})},67875:function(rt,me,f){f.d(me,{Z:function(){return Ta}});var a=f(4942),x=f(87462),E=f(97685),Oe=f(97937),We=f(89705),we=f(24969),Ge=f(94184),K=f.n(Ge),F=f(1413),de=f(71002),ue=f(91),l=f(67294),he=f(31131),Q=f(21770),ge=f(62874),ve=(0,l.createContext)(null),Xe=l.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,i=t.style,o=t.id,s=t.active,c=t.tabKey,d=t.children;return l.createElement("div",{id:o&&"".concat(o,"-panel-").concat(c),role:"tabpanel",tabIndex:s?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(c),"aria-hidden":!s,style:i,className:K()(n,s&&"".concat(n,"-active"),r),ref:e},d)}),Ne=Xe,Ke=["key","forceRender","style","className"];function je(t){var e=t.id,n=t.activeKey,r=t.animated,i=t.tabPosition,o=t.destroyInactiveTabPane,s=l.useContext(ve),c=s.prefixCls,d=s.tabs,v=r.tabPane,u="".concat(c,"-tabpane");return l.createElement("div",{className:K()("".concat(c,"-content-holder"))},l.createElement("div",{className:K()("".concat(c,"-content"),"".concat(c,"-content-").concat(i),(0,a.Z)({},"".concat(c,"-content-animated"),v))},d.map(function(p){var h=p.key,M=p.forceRender,C=p.style,A=p.className,z=(0,ue.Z)(p,Ke),W=h===n;return l.createElement(ge.Z,(0,x.Z)({key:h,visible:W,forceRender:M,removeOnLeave:!!o,leavedClassName:"".concat(u,"-hidden")},r.tabPaneMotion),function(D,I){var B=D.style,H=D.className;return l.createElement(Ne,(0,x.Z)({},z,{prefixCls:u,id:e,tabKey:h,animated:v,active:W,style:(0,F.Z)((0,F.Z)({},C),B),className:K()(A,H),ref:I}))})})))}var Ie=f(74902),ae=f(75164),Ve=f(42550),fe=f(48555);function Ze(t){var e=(0,l.useRef)(),n=(0,l.useRef)(!1);function r(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];n.current||(ae.Z.cancel(e.current),e.current=(0,ae.Z)(function(){t.apply(void 0,o)}))}return(0,l.useEffect)(function(){return n.current=!1,function(){n.current=!0,ae.Z.cancel(e.current)}},[]),r}function $e(t){var e=(0,l.useRef)([]),n=(0,l.useState)({}),r=(0,E.Z)(n,2),i=r[1],o=(0,l.useRef)(typeof t=="function"?t():t),s=Ze(function(){var d=o.current;e.current.forEach(function(v){d=v(d)}),e.current=[],o.current=d,i({})});function c(d){e.current.push(d),s()}return[o.current,c]}var Y=f(15105);function ke(t,e){var n,r=t.prefixCls,i=t.id,o=t.active,s=t.tab,c=s.key,d=s.label,v=s.disabled,u=s.closeIcon,p=t.closable,h=t.renderWrapper,M=t.removeAriaLabel,C=t.editable,A=t.onClick,z=t.onRemove,W=t.onFocus,D=t.style,I="".concat(r,"-tab");l.useEffect(function(){return z},[]);var B=C&&p!==!1&&!v;function H(T){v||A(T)}function G(T){T.preventDefault(),T.stopPropagation(),C.onEdit("remove",{key:c,event:T})}var X=l.createElement("div",{key:c,ref:e,className:K()(I,(n={},(0,a.Z)(n,"".concat(I,"-with-remove"),B),(0,a.Z)(n,"".concat(I,"-active"),o),(0,a.Z)(n,"".concat(I,"-disabled"),v),n)),style:D,onClick:H},l.createElement("div",{role:"tab","aria-selected":o,id:i&&"".concat(i,"-tab-").concat(c),className:"".concat(I,"-btn"),"aria-controls":i&&"".concat(i,"-panel-").concat(c),"aria-disabled":v,tabIndex:v?null:0,onClick:function(m){m.stopPropagation(),H(m)},onKeyDown:function(m){[Y.Z.SPACE,Y.Z.ENTER].includes(m.which)&&(m.preventDefault(),H(m))},onFocus:W},d),B&&l.createElement("button",{type:"button","aria-label":M||"remove",tabIndex:0,className:"".concat(I,"-remove"),onClick:function(m){m.stopPropagation(),G(m)}},u||C.removeIcon||"\xD7"));return h?h(X):X}var zt=l.forwardRef(ke),ot={width:0,height:0,left:0,top:0};function Bt(t,e,n){return(0,l.useMemo)(function(){for(var r,i=new Map,o=e.get((r=t[0])===null||r===void 0?void 0:r.key)||ot,s=o.left+o.width,c=0;c<t.length;c+=1){var d=t[c].key,v=e.get(d);if(!v){var u;v=e.get((u=t[c-1])===null||u===void 0?void 0:u.key)||ot}var p=i.get(d)||(0,F.Z)({},v);p.right=s-p.left-p.width,i.set(d,p)}return i},[t.map(function(r){return r.key}).join("_"),e,n])}var it={width:0,height:0,left:0,top:0,right:0};function Mt(t,e,n,r,i,o,s){var c=s.tabs,d=s.tabPosition,v=s.rtl,u,p,h;return["top","bottom"].includes(d)?(u="width",p=v?"right":"left",h=Math.abs(n)):(u="height",p="top",h=-n),(0,l.useMemo)(function(){if(!c.length)return[0,0];for(var M=c.length,C=M,A=0;A<M;A+=1){var z=t.get(c[A].key)||it;if(z[p]+z[u]>h+e){C=A-1;break}}for(var W=0,D=M-1;D>=0;D-=1){var I=t.get(c[D].key)||it;if(I[p]<h){W=D+1;break}}return[W,C]},[t,e,r,i,o,h,d,c.map(function(M){return M.key}).join("_"),v])}var lt=f(97868),Dt=f(60057);function Ht(t,e){var n=t.prefixCls,r=t.editable,i=t.locale,o=t.style;return!r||r.showAdd===!1?null:l.createElement("button",{ref:e,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(c){r.onEdit("add",{event:c})}},r.addIcon||"+")}var st=l.forwardRef(Ht);function Ot(t,e){var n=t.prefixCls,r=t.id,i=t.tabs,o=t.locale,s=t.mobile,c=t.moreIcon,d=c===void 0?"More":c,v=t.moreTransitionName,u=t.style,p=t.className,h=t.editable,M=t.tabBarGutter,C=t.rtl,A=t.removeAriaLabel,z=t.onTabClick,W=t.getPopupContainer,D=t.popupClassName,I=(0,l.useState)(!1),B=(0,E.Z)(I,2),H=B[0],G=B[1],X=(0,l.useState)(null),T=(0,E.Z)(X,2),m=T[0],w=T[1],N="".concat(r,"-more-popup"),P="".concat(n,"-dropdown"),g=m!==null?"".concat(N,"-").concat(m):null,R=o==null?void 0:o.dropdownAriaLabel;function S(b,O){b.preventDefault(),b.stopPropagation(),h.onEdit("remove",{key:O,event:b})}var oe=l.createElement(lt.ZP,{onClick:function(O){var _=O.key,U=O.domEvent;z(_,U),G(!1)},prefixCls:"".concat(P,"-menu"),id:N,tabIndex:-1,role:"listbox","aria-activedescendant":g,selectedKeys:[m],"aria-label":R!==void 0?R:"expanded dropdown"},i.map(function(b){var O=h&&b.closable!==!1&&!b.disabled;return l.createElement(lt.sN,{key:b.key,id:"".concat(N,"-").concat(b.key),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(b.key),disabled:b.disabled},l.createElement("span",null,b.label),O&&l.createElement("button",{type:"button","aria-label":A||"remove",tabIndex:0,className:"".concat(P,"-menu-item-remove"),onClick:function(U){U.stopPropagation(),S(U,b.key)}},b.closeIcon||h.removeIcon||"\xD7"))}));function J(b){for(var O=i.filter(function(se){return!se.disabled}),_=O.findIndex(function(se){return se.key===m})||0,U=O.length,le=0;le<U;le+=1){_=(_+b+U)%U;var be=O[_];if(!be.disabled){w(be.key);return}}}function V(b){var O=b.which;if(!H){[Y.Z.DOWN,Y.Z.SPACE,Y.Z.ENTER].includes(O)&&(G(!0),b.preventDefault());return}switch(O){case Y.Z.UP:J(-1),b.preventDefault();break;case Y.Z.DOWN:J(1),b.preventDefault();break;case Y.Z.ESC:G(!1);break;case Y.Z.SPACE:case Y.Z.ENTER:m!==null&&z(m,b);break}}(0,l.useEffect)(function(){var b=document.getElementById(g);b&&b.scrollIntoView&&b.scrollIntoView(!1)},[m]),(0,l.useEffect)(function(){H||w(null)},[H]);var ee=(0,a.Z)({},C?"marginRight":"marginLeft",M);i.length||(ee.visibility="hidden",ee.order=1);var Se=K()((0,a.Z)({},"".concat(P,"-rtl"),C)),ie=s?null:l.createElement(Dt.Z,{prefixCls:P,overlay:oe,trigger:["hover"],visible:i.length?H:!1,transitionName:v,onVisibleChange:G,overlayClassName:K()(Se,D),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:W},l.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:ee,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":N,id:"".concat(r,"-more"),"aria-expanded":H,onKeyDown:V},d));return l.createElement("div",{className:K()("".concat(n,"-nav-operations"),p),style:u,ref:e},ie,l.createElement(st,{prefixCls:n,locale:o,editable:h}))}var Wt=l.memo(l.forwardRef(Ot),function(t,e){return e.tabMoving}),Gt=.1,ct=.01,Le=20,dt=Math.pow(.995,Le);function Xt(t,e){var n=(0,l.useState)(),r=(0,E.Z)(n,2),i=r[0],o=r[1],s=(0,l.useState)(0),c=(0,E.Z)(s,2),d=c[0],v=c[1],u=(0,l.useState)(0),p=(0,E.Z)(u,2),h=p[0],M=p[1],C=(0,l.useState)(),A=(0,E.Z)(C,2),z=A[0],W=A[1],D=(0,l.useRef)();function I(m){var w=m.touches[0],N=w.screenX,P=w.screenY;o({x:N,y:P}),window.clearInterval(D.current)}function B(m){if(!!i){m.preventDefault();var w=m.touches[0],N=w.screenX,P=w.screenY;o({x:N,y:P});var g=N-i.x,R=P-i.y;e(g,R);var S=Date.now();v(S),M(S-d),W({x:g,y:R})}}function H(){if(!!i&&(o(null),W(null),z)){var m=z.x/h,w=z.y/h,N=Math.abs(m),P=Math.abs(w);if(Math.max(N,P)<Gt)return;var g=m,R=w;D.current=window.setInterval(function(){if(Math.abs(g)<ct&&Math.abs(R)<ct){window.clearInterval(D.current);return}g*=dt,R*=dt,e(g*Le,R*Le)},Le)}}var G=(0,l.useRef)();function X(m){var w=m.deltaX,N=m.deltaY,P=0,g=Math.abs(w),R=Math.abs(N);g===R?P=G.current==="x"?w:N:g>R?(P=w,G.current="x"):(P=N,G.current="y"),e(-P,-P)&&m.preventDefault()}var T=(0,l.useRef)(null);T.current={onTouchStart:I,onTouchMove:B,onTouchEnd:H,onWheel:X},l.useEffect(function(){function m(g){T.current.onTouchStart(g)}function w(g){T.current.onTouchMove(g)}function N(g){T.current.onTouchEnd(g)}function P(g){T.current.onWheel(g)}return document.addEventListener("touchmove",w,{passive:!1}),document.addEventListener("touchend",N,{passive:!1}),t.current.addEventListener("touchstart",m,{passive:!1}),t.current.addEventListener("wheel",P),function(){document.removeEventListener("touchmove",w),document.removeEventListener("touchend",N)}},[])}function Kt(){var t=(0,l.useRef)(new Map);function e(r){return t.current.has(r)||t.current.set(r,l.createRef()),t.current.get(r)}function n(r){t.current.delete(r)}return[e,n]}function ut(t,e){var n=l.useRef(t),r=l.useState({}),i=(0,E.Z)(r,2),o=i[1];function s(c){var d=typeof c=="function"?c(n.current):c;d!==n.current&&e(d,n.current),n.current=d,o({})}return[n.current,s]}function vt(t){var e;return t instanceof Map?(e={},t.forEach(function(n,r){e[r]=n})):e=t,JSON.stringify(e)}var jt=l.forwardRef(function(t,e){var n=t.position,r=t.prefixCls,i=t.extra;if(!i)return null;var o,s={};return(0,de.Z)(i)==="object"&&!l.isValidElement(i)?s=i:s.right=i,n==="right"&&(o=s.right),n==="left"&&(o=s.left),o?l.createElement("div",{className:"".concat(r,"-extra-content"),ref:e},o):null}),ft=jt,pe=function(e){var n=e.current||{},r=n.offsetWidth,i=r===void 0?0:r,o=n.offsetHeight,s=o===void 0?0:o;return[i,s]},Ae=function(e,n){return e[n?0:1]};function Vt(t,e){var n,r=l.useContext(ve),i=r.prefixCls,o=r.tabs,s=t.className,c=t.style,d=t.id,v=t.animated,u=t.activeKey,p=t.rtl,h=t.extra,M=t.editable,C=t.locale,A=t.tabPosition,z=t.tabBarGutter,W=t.children,D=t.onTabClick,I=t.onTabScroll,B=(0,l.useRef)(),H=(0,l.useRef)(),G=(0,l.useRef)(),X=(0,l.useRef)(),T=(0,l.useRef)(),m=(0,l.useRef)(),w=(0,l.useRef)(),N=Kt(),P=(0,E.Z)(N,2),g=P[0],R=P[1],S=A==="top"||A==="bottom",oe=ut(0,function(y,$){S&&I&&I({direction:y>$?"left":"right"})}),J=(0,E.Z)(oe,2),V=J[0],ee=J[1],Se=ut(0,function(y,$){!S&&I&&I({direction:y>$?"top":"bottom"})}),ie=(0,E.Z)(Se,2),b=ie[0],O=ie[1],_=(0,l.useState)([0,0]),U=(0,E.Z)(_,2),le=U[0],be=U[1],se=(0,l.useState)([0,0]),ye=(0,E.Z)(se,2),ze=ye[0],Fe=ye[1],Ue=(0,l.useState)([0,0]),Ce=(0,E.Z)(Ue,2),Ye=Ce[0],Qe=Ce[1],L=(0,l.useState)([0,0]),ne=(0,E.Z)(L,2),Te=ne[0],Ra=ne[1],Ea=$e(new Map),gt=(0,E.Z)(Ea,2),Pa=gt[0],wa=gt[1],Be=Bt(o,Pa,ze[0]),ce=Ae(le,S),te=Ae(ze,S),Je=Ae(Ye,S),Zt=Ae(Te,S),Na=ce<te+Je,q=Na?ce-Zt:ce-Je,Ia="".concat(i,"-nav-operations-hidden"),Re=0,Ee=0;S&&p?(Re=0,Ee=Math.max(0,te-q)):(Re=Math.min(0,q-te),Ee=0);function _e(y){return y<Re?Re:y>Ee?Ee:y}var xt=(0,l.useRef)(),La=(0,l.useState)(),St=(0,E.Z)(La,2),Me=St[0],yt=St[1];function qe(){yt(Date.now())}function et(){window.clearTimeout(xt.current)}Xt(X,function(y,$){function Z(j,k){j(function(He){var Xa=_e(He+k);return Xa})}return ce>=te?!1:(S?Z(ee,y):Z(O,$),et(),qe(),!0)}),(0,l.useEffect)(function(){return et(),Me&&(xt.current=window.setTimeout(function(){yt(0)},100)),et},[Me]);var Aa=Mt(Be,q,S?V:b,te,Je,Zt,(0,F.Z)((0,F.Z)({},t),{},{tabs:o})),Ct=(0,E.Z)(Aa,2),za=Ct[0],Ba=Ct[1],Tt=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u,Z=Be.get($)||{width:0,height:0,left:0,right:0,top:0};if(S){var j=V;p?Z.right<V?j=Z.right:Z.right+Z.width>V+q&&(j=Z.right+Z.width-q):Z.left<-V?j=-Z.left:Z.left+Z.width>-V+q&&(j=-(Z.left+Z.width-q)),O(0),ee(_e(j))}else{var k=b;Z.top<-b?k=-Z.top:Z.top+Z.height>-b+q&&(k=-(Z.top+Z.height-q)),ee(0),O(_e(k))}},De={};A==="top"||A==="bottom"?De[p?"marginRight":"marginLeft"]=z:De.marginTop=z;var Rt=o.map(function(y,$){var Z=y.key;return l.createElement(zt,{id:d,prefixCls:i,key:Z,tab:y,style:$===0?void 0:De,closable:y.closable,editable:M,active:Z===u,renderWrapper:W,removeAriaLabel:C==null?void 0:C.removeAriaLabel,ref:g(Z),onClick:function(k){D(Z,k)},onRemove:function(){R(Z)},onFocus:function(){Tt(Z),qe(),X.current&&(p||(X.current.scrollLeft=0),X.current.scrollTop=0)}})}),Ma=function(){return wa(function(){var $=new Map;return o.forEach(function(Z){var j=Z.key,k=g(j).current;k&&$.set(j,{width:k.offsetWidth,height:k.offsetHeight,left:k.offsetLeft,top:k.offsetTop})}),$})};(0,l.useEffect)(function(){Ma()},[o.map(function(y){return y.key}).join("_")]);var tt=Ze(function(){var y=pe(B),$=pe(H),Z=pe(G);be([y[0]-$[0]-Z[0],y[1]-$[1]-Z[1]]);var j=pe(w);Qe(j);var k=pe(m);Ra(k);var He=pe(T);Fe([He[0]-j[0],He[1]-j[1]])}),Da=o.slice(0,za),Ha=o.slice(Ba+1),Et=[].concat((0,Ie.Z)(Da),(0,Ie.Z)(Ha)),Oa=(0,l.useState)(),Pt=(0,E.Z)(Oa,2),Wa=Pt[0],Ga=Pt[1],re=Be.get(u),wt=(0,l.useRef)();function Nt(){ae.Z.cancel(wt.current)}(0,l.useEffect)(function(){var y={};return re&&(S?(p?y.right=re.right:y.left=re.left,y.width=re.width):(y.top=re.top,y.height=re.height)),Nt(),wt.current=(0,ae.Z)(function(){Ga(y)}),Nt},[re,S,p]),(0,l.useEffect)(function(){Tt()},[u,vt(re),vt(Be),S]),(0,l.useEffect)(function(){tt()},[p]);var It=!!Et.length,Pe="".concat(i,"-nav-wrap"),at,nt,Lt,At;return S?p?(nt=V>0,at=V+ce<te):(at=V<0,nt=-V+ce<te):(Lt=b<0,At=-b+ce<te),l.createElement(fe.Z,{onResize:tt},l.createElement("div",{ref:(0,Ve.x1)(e,B),role:"tablist",className:K()("".concat(i,"-nav"),s),style:c,onKeyDown:function(){qe()}},l.createElement(ft,{ref:H,position:"left",extra:h,prefixCls:i}),l.createElement("div",{className:K()(Pe,(n={},(0,a.Z)(n,"".concat(Pe,"-ping-left"),at),(0,a.Z)(n,"".concat(Pe,"-ping-right"),nt),(0,a.Z)(n,"".concat(Pe,"-ping-top"),Lt),(0,a.Z)(n,"".concat(Pe,"-ping-bottom"),At),n)),ref:X},l.createElement(fe.Z,{onResize:tt},l.createElement("div",{ref:T,className:"".concat(i,"-nav-list"),style:{transform:"translate(".concat(V,"px, ").concat(b,"px)"),transition:Me?"none":void 0}},Rt,l.createElement(st,{ref:w,prefixCls:i,locale:C,editable:M,style:(0,F.Z)((0,F.Z)({},Rt.length===0?void 0:De),{},{visibility:It?"hidden":null})}),l.createElement("div",{className:K()("".concat(i,"-ink-bar"),(0,a.Z)({},"".concat(i,"-ink-bar-animated"),v.inkBar)),style:Wa})))),l.createElement(Wt,(0,x.Z)({},t,{removeAriaLabel:C==null?void 0:C.removeAriaLabel,ref:m,prefixCls:i,tabs:Et,className:!It&&Ia,tabMoving:!!Me})),l.createElement(ft,{ref:G,position:"right",extra:h,prefixCls:i})))}var pt=l.forwardRef(Vt),$t=["renderTabBar"],kt=["label","key"];function Ft(t){var e=t.renderTabBar,n=(0,ue.Z)(t,$t),r=(0,l.useContext)(ve),i=r.tabs;if(e){var o=(0,F.Z)((0,F.Z)({},n),{},{panes:i.map(function(s){var c=s.label,d=s.key,v=(0,ue.Z)(s,kt);return l.createElement(Ne,(0,x.Z)({tab:c,key:d,tabKey:d},v))})});return e(o,pt)}return l.createElement(pt,n)}var Ka=f(80334);function Ut(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},e;return t===!1?e={inkBar:!1,tabPane:!1}:t===!0?e={inkBar:!0,tabPane:!1}:e=(0,F.Z)({inkBar:!0},(0,de.Z)(t)==="object"?t:{}),e.tabPaneMotion&&e.tabPane===void 0&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}var Yt=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName"],bt=0;function Qt(t,e){var n,r=t.id,i=t.prefixCls,o=i===void 0?"rc-tabs":i,s=t.className,c=t.items,d=t.direction,v=t.activeKey,u=t.defaultActiveKey,p=t.editable,h=t.animated,M=t.tabPosition,C=M===void 0?"top":M,A=t.tabBarGutter,z=t.tabBarStyle,W=t.tabBarExtraContent,D=t.locale,I=t.moreIcon,B=t.moreTransitionName,H=t.destroyInactiveTabPane,G=t.renderTabBar,X=t.onChange,T=t.onTabClick,m=t.onTabScroll,w=t.getPopupContainer,N=t.popupClassName,P=(0,ue.Z)(t,Yt),g=l.useMemo(function(){return(c||[]).filter(function(L){return L&&(0,de.Z)(L)==="object"&&"key"in L})},[c]),R=d==="rtl",S=Ut(h),oe=(0,l.useState)(!1),J=(0,E.Z)(oe,2),V=J[0],ee=J[1];(0,l.useEffect)(function(){ee((0,he.Z)())},[]);var Se=(0,Q.Z)(function(){var L;return(L=g[0])===null||L===void 0?void 0:L.key},{value:v,defaultValue:u}),ie=(0,E.Z)(Se,2),b=ie[0],O=ie[1],_=(0,l.useState)(function(){return g.findIndex(function(L){return L.key===b})}),U=(0,E.Z)(_,2),le=U[0],be=U[1];(0,l.useEffect)(function(){var L=g.findIndex(function(Te){return Te.key===b});if(L===-1){var ne;L=Math.max(0,Math.min(le,g.length-1)),O((ne=g[L])===null||ne===void 0?void 0:ne.key)}be(L)},[g.map(function(L){return L.key}).join("_"),b,le]);var se=(0,Q.Z)(null,{value:r}),ye=(0,E.Z)(se,2),ze=ye[0],Fe=ye[1];(0,l.useEffect)(function(){r||(Fe("rc-tabs-".concat(bt)),bt+=1)},[]);function Ue(L,ne){T==null||T(L,ne);var Te=L!==b;O(L),Te&&(X==null||X(L))}var Ce={id:ze,activeKey:b,animated:S,tabPosition:C,rtl:R,mobile:V},Ye,Qe=(0,F.Z)((0,F.Z)({},Ce),{},{editable:p,locale:D,moreIcon:I,moreTransitionName:B,tabBarGutter:A,onTabClick:Ue,onTabScroll:m,extra:W,style:z,panes:null,getPopupContainer:w,popupClassName:N});return l.createElement(ve.Provider,{value:{tabs:g,prefixCls:o}},l.createElement("div",(0,x.Z)({ref:e,id:r,className:K()(o,"".concat(o,"-").concat(C),(n={},(0,a.Z)(n,"".concat(o,"-mobile"),V),(0,a.Z)(n,"".concat(o,"-editable"),p),(0,a.Z)(n,"".concat(o,"-rtl"),R),n),s)},P),Ye,l.createElement(Ft,(0,x.Z)({},Qe,{renderTabBar:G})),l.createElement(je,(0,x.Z)({destroyInactiveTabPane:H},Ce,{animated:S}))))}var Jt=l.forwardRef(Qt),_t=Jt,qt=_t,ea=f(53124),ta=f(97647),aa=f(33603),na={motionAppear:!1,motionEnter:!0,motionLeave:!0};function ra(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},n;return e===!1?n={inkBar:!1,tabPane:!1}:e===!0?n={inkBar:!0,tabPane:!0}:n=(0,x.Z)({inkBar:!0},(0,de.Z)(e)==="object"?e:{}),n.tabPane&&(n.tabPaneMotion=(0,x.Z)((0,x.Z)({},na),{motionName:(0,aa.mL)(t,"switch")})),n}var oa=f(50344),ia=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function la(t){return t.filter(function(e){return e})}function sa(t,e){if(t)return t;var n=(0,oa.Z)(e).map(function(r){if(l.isValidElement(r)){var i=r.key,o=r.props,s=o||{},c=s.tab,d=ia(s,["tab"]),v=(0,x.Z)((0,x.Z)({key:String(i)},d),{label:c});return v}return null});return la(n)}var ca=function(){return null},da=ca,ua=f(67968),va=f(45503),xe=f(14747),mt=f(67771),fa=function(e){var n=e.componentCls,r=e.motionDurationSlow;return[(0,a.Z)({},n,(0,a.Z)({},n+"-switch",{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:"opacity "+r}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:"opacity "+r}}})),[(0,mt.oN)(e,"slide-up"),(0,mt.oN)(e,"slide-down")]]},pa=fa,ba=function(e){var n,r,i,o,s,c,d=e.componentCls,v=e.tabsCardHorizontalPadding,u=e.tabsCardHeadBackground,p=e.tabsCardGutter,h=e.colorSplit;return(0,a.Z)({},d+"-card",(c={},(0,a.Z)(c,"> "+d+"-nav, > div > "+d+"-nav",(n={},(0,a.Z)(n,d+"-tab",{margin:0,padding:v,background:u,border:e.lineWidth+"px "+e.lineType+" "+h,transition:"all "+e.motionDurationSlow+" "+e.motionEaseInOut}),(0,a.Z)(n,d+"-tab-active",{color:e.colorPrimary,background:e.colorBgContainer}),(0,a.Z)(n,d+"-ink-bar",{visibility:"hidden"}),n)),(0,a.Z)(c,"&"+d+"-top, &"+d+"-bottom",(0,a.Z)({},"> "+d+"-nav, > div > "+d+"-nav",(0,a.Z)({},d+"-tab + "+d+"-tab",{marginLeft:{_skip_check_:!0,value:p+"px"}}))),(0,a.Z)(c,"&"+d+"-top",(0,a.Z)({},"> "+d+"-nav, > div > "+d+"-nav",(r={},(0,a.Z)(r,d+"-tab",{borderRadius:e.borderRadiusLG+"px "+e.borderRadiusLG+"px 0 0"}),(0,a.Z)(r,d+"-tab-active",{borderBottomColor:e.colorBgContainer}),r))),(0,a.Z)(c,"&"+d+"-bottom",(0,a.Z)({},"> "+d+"-nav, > div > "+d+"-nav",(i={},(0,a.Z)(i,d+"-tab",{borderRadius:"0 0 "+e.borderRadiusLG+"px "+e.borderRadiusLG+"px"}),(0,a.Z)(i,d+"-tab-active",{borderTopColor:e.colorBgContainer}),i))),(0,a.Z)(c,"&"+d+"-left, &"+d+"-right",(0,a.Z)({},"> "+d+"-nav, > div > "+d+"-nav",(0,a.Z)({},d+"-tab + "+d+"-tab",{marginTop:p+"px"}))),(0,a.Z)(c,"&"+d+"-left",(0,a.Z)({},"> "+d+"-nav, > div > "+d+"-nav",(o={},(0,a.Z)(o,d+"-tab",{borderRadius:{_skip_check_:!0,value:e.borderRadiusLG+"px 0 0 "+e.borderRadiusLG+"px"}}),(0,a.Z)(o,d+"-tab-active",{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}),o))),(0,a.Z)(c,"&"+d+"-right",(0,a.Z)({},"> "+d+"-nav, > div > "+d+"-nav",(s={},(0,a.Z)(s,d+"-tab",{borderRadius:{_skip_check_:!0,value:"0 "+e.borderRadiusLG+"px "+e.borderRadiusLG+"px 0"}}),(0,a.Z)(s,d+"-tab-active",{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}),s))),c))},ma=function(e){var n=e.componentCls,r=e.tabsHoverColor,i=e.dropdownEdgeChildVerticalPadding;return(0,a.Z)({},n+"-dropdown",(0,x.Z)((0,x.Z)({},(0,xe.Wf)(e)),(0,a.Z)({position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"}},n+"-dropdown-menu",{maxHeight:e.tabsDropdownHeight,margin:0,padding:i+"px 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.boxShadow,"&-item":(0,x.Z)((0,x.Z)({},xe.vS),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:e.paddingXXS+"px "+e.paddingSM+"px",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.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:r}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})})))},ha=function(e){var n,r,i,o,s,c,d,v,u=e.componentCls,p=e.margin,h=e.colorSplit;return v={},(0,a.Z)(v,u+"-top, "+u+"-bottom",(0,a.Z)({flexDirection:"column"},"> "+u+"-nav, > div > "+u+"-nav",(r={margin:"0 0 "+p+"px 0","&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:e.lineWidth+"px "+e.lineType+" "+h,content:"''"}},(0,a.Z)(r,u+"-ink-bar",{height:e.lineWidthBold,"&-animated":{transition:"width "+e.motionDurationSlow+", left "+e.motionDurationSlow+`,
|
|
right `+e.motionDurationSlow}}),(0,a.Z)(r,u+"-nav-wrap",(n={"&::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}},(0,a.Z)(n,"&"+u+"-nav-wrap-ping-left::before",{opacity:1}),(0,a.Z)(n,"&"+u+"-nav-wrap-ping-right::after",{opacity:1}),n)),r))),(0,a.Z)(v,u+"-top",(0,a.Z)({},"> "+u+`-nav,
|
|
> div > `+u+"-nav",(0,a.Z)({"&::before":{bottom:0}},u+"-ink-bar",{bottom:0}))),(0,a.Z)(v,u+"-bottom",(i={},(0,a.Z)(i,"> "+u+"-nav, > div > "+u+"-nav",(0,a.Z)({order:1,marginTop:p+"px",marginBottom:0,"&::before":{top:0}},u+"-ink-bar",{top:0})),(0,a.Z)(i,"> "+u+"-content-holder, > div > "+u+"-content-holder",{order:0}),i)),(0,a.Z)(v,u+"-left, "+u+"-right",(0,a.Z)({},"> "+u+"-nav, > div > "+u+"-nav",(s={flexDirection:"column",minWidth:e.controlHeight*1.25},(0,a.Z)(s,u+"-tab",{padding:e.paddingXS+"px "+e.paddingLG+"px",textAlign:"center"}),(0,a.Z)(s,u+"-tab + "+u+"-tab",{margin:e.margin+"px 0 0 0"}),(0,a.Z)(s,u+"-nav-wrap",(o={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}},(0,a.Z)(o,"&"+u+"-nav-wrap-ping-top::before",{opacity:1}),(0,a.Z)(o,"&"+u+"-nav-wrap-ping-bottom::after",{opacity:1}),o)),(0,a.Z)(s,u+"-ink-bar",{width:e.lineWidthBold,"&-animated":{transition:"height "+e.motionDurationSlow+", top "+e.motionDurationSlow}}),(0,a.Z)(s,u+"-nav-list, "+u+"-nav-operations",{flex:"1 0 auto",flexDirection:"column"}),s))),(0,a.Z)(v,u+"-left",(c={},(0,a.Z)(c,"> "+u+"-nav, > div > "+u+"-nav",(0,a.Z)({},u+"-ink-bar",{right:{_skip_check_:!0,value:0}})),(0,a.Z)(c,"> "+u+"-content-holder, > div > "+u+"-content-holder",(0,a.Z)({marginLeft:{_skip_check_:!0,value:"-"+e.lineWidth+"px"},borderLeft:{_skip_check_:!0,value:e.lineWidth+"px "+e.lineType+" "+e.colorBorder}},"> "+u+"-content > "+u+"-tabpane",{paddingLeft:{_skip_check_:!0,value:e.paddingLG}})),c)),(0,a.Z)(v,u+"-right",(d={},(0,a.Z)(d,"> "+u+"-nav, > div > "+u+"-nav",(0,a.Z)({order:1},u+"-ink-bar",{left:{_skip_check_:!0,value:0}})),(0,a.Z)(d,"> "+u+"-content-holder, > div > "+u+"-content-holder",(0,a.Z)({order:0,marginRight:{_skip_check_:!0,value:-e.lineWidth},borderRight:{_skip_check_:!0,value:e.lineWidth+"px "+e.lineType+" "+e.colorBorder}},"> "+u+"-content > "+u+"-tabpane",{paddingRight:{_skip_check_:!0,value:e.paddingLG}})),d)),v},ga=function(e){var n,r,i,o=e.componentCls,s=e.padding;return i={},(0,a.Z)(i,o,{"&-small":(0,a.Z)({},"> "+o+"-nav",(0,a.Z)({},o+"-tab",{padding:e.paddingXS+"px 0",fontSize:e.fontSize})),"&-large":(0,a.Z)({},"> "+o+"-nav",(0,a.Z)({},o+"-tab",{padding:s+"px 0",fontSize:e.fontSizeLG}))}),(0,a.Z)(i,o+"-card",(r={},(0,a.Z)(r,"&"+o+"-small",(n={},(0,a.Z)(n,"> "+o+"-nav",(0,a.Z)({},o+"-tab",{padding:e.paddingXXS*1.5+"px "+s+"px"})),(0,a.Z)(n,"&"+o+"-bottom",(0,a.Z)({},"> "+o+"-nav "+o+"-tab",{borderRadius:"0 0 "+e.borderRadius+"px "+e.borderRadius+"px"})),(0,a.Z)(n,"&"+o+"-top",(0,a.Z)({},"> "+o+"-nav "+o+"-tab",{borderRadius:e.borderRadius+"px "+e.borderRadius+"px 0 0"})),(0,a.Z)(n,"&"+o+"-right",(0,a.Z)({},"> "+o+"-nav "+o+"-tab",{borderRadius:{_skip_check_:!0,value:"0 "+e.borderRadius+"px "+e.borderRadius+"px 0"}})),(0,a.Z)(n,"&"+o+"-left",(0,a.Z)({},"> "+o+"-nav "+o+"-tab",{borderRadius:{_skip_check_:!0,value:e.borderRadius+"px 0 0 "+e.borderRadius+"px"}})),n)),(0,a.Z)(r,"&"+o+"-large",(0,a.Z)({},"> "+o+"-nav",(0,a.Z)({},o+"-tab",{padding:e.paddingXS+"px "+s+"px "+e.paddingXXS*1.5+"px"}))),r)),i},Za=function(e){var n,r,i=e.componentCls,o=e.tabsActiveColor,s=e.tabsHoverColor,c=e.iconCls,d=e.tabsHorizontalGutter,v=i+"-tab";return r={},(0,a.Z)(r,v,(n={position:"relative",display:"inline-flex",alignItems:"center",padding:e.paddingSM+"px 0",fontSize:e.fontSize+"px",background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":(0,x.Z)({"&:focus:not(:focus-visible), &:active":{color:o}},(0,xe.Qy)(e)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-e.marginXXS},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:"all "+e.motionDurationSlow,"&:hover":{color:e.colorTextHeading}},"&:hover":{color:s}},(0,a.Z)(n,"&"+v+"-active "+v+"-btn",{color:e.colorPrimary,textShadow:e.tabsActiveTextShadow}),(0,a.Z)(n,"&"+v+"-disabled",{color:e.colorTextDisabled,cursor:"not-allowed"}),(0,a.Z)(n,"&"+v+"-disabled "+v+"-btn, &"+v+"-disabled "+i+"-remove",{"&:focus, &:active":{color:e.colorTextDisabled}}),(0,a.Z)(n,"& "+v+"-remove "+c,{margin:0}),(0,a.Z)(n,c,{marginRight:{_skip_check_:!0,value:e.marginSM}}),n)),(0,a.Z)(r,v+" + "+v,{margin:{_skip_check_:!0,value:"0 0 0 "+d+"px"}}),r},xa=function(e){var n,r,i,o,s,c=e.componentCls,d=e.tabsHorizontalGutter,v=e.iconCls,u=e.tabsCardGutter,p=c+"-rtl";return s={},(0,a.Z)(s,p,(o={direction:"rtl"},(0,a.Z)(o,c+"-nav",(0,a.Z)({},c+"-tab",(n={margin:{_skip_check_:!0,value:"0 0 0 "+d+"px"}},(0,a.Z)(n,c+"-tab:last-of-type",{marginLeft:{_skip_check_:!0,value:0}}),(0,a.Z)(n,v,{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM+"px"}}),(0,a.Z)(n,c+"-tab-remove",(0,a.Z)({marginRight:{_skip_check_:!0,value:e.marginXS+"px"},marginLeft:{_skip_check_:!0,value:"-"+e.marginXXS+"px"}},v,{margin:0})),n))),(0,a.Z)(o,"&"+c+"-left",(r={},(0,a.Z)(r,"> "+c+"-nav",{order:1}),(0,a.Z)(r,"> "+c+"-content-holder",{order:0}),r)),(0,a.Z)(o,"&"+c+"-right",(i={},(0,a.Z)(i,"> "+c+"-nav",{order:0}),(0,a.Z)(i,"> "+c+"-content-holder",{order:1}),i)),(0,a.Z)(o,"&"+c+"-card"+c+"-top, &"+c+"-card"+c+"-bottom",(0,a.Z)({},"> "+c+"-nav, > div > "+c+"-nav",(0,a.Z)({},c+"-tab + "+c+"-tab",{marginRight:{_skip_check_:!0,value:u+"px"},marginLeft:{_skip_check_:!0,value:0}}))),o)),(0,a.Z)(s,c+"-dropdown-rtl",{direction:"rtl"}),(0,a.Z)(s,c+"-menu-item",(0,a.Z)({},c+"-dropdown-rtl",{textAlign:{_skip_check_:!0,value:"right"}})),s},Sa=function(e){var n,r,i,o,s=e.componentCls,c=e.tabsCardHorizontalPadding,d=e.tabsCardHeight,v=e.tabsCardGutter,u=e.tabsHoverColor,p=e.tabsActiveColor,h=e.colorSplit;return o={},(0,a.Z)(o,s,(0,x.Z)((0,x.Z)((0,x.Z)((0,x.Z)({},(0,xe.Wf)(e)),(r={display:"flex"},(0,a.Z)(r,"> "+s+"-nav, > div > "+s+"-nav",(n={position:"relative",display:"flex",flex:"none",alignItems:"center"},(0,a.Z)(n,s+"-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"}}),(0,a.Z)(n,s+"-nav-list",{position:"relative",display:"flex",transition:"opacity "+e.motionDurationSlow}),(0,a.Z)(n,s+"-nav-operations",{display:"flex",alignSelf:"stretch"}),(0,a.Z)(n,s+"-nav-operations-hidden",{position:"absolute",visibility:"hidden",pointerEvents:"none"}),(0,a.Z)(n,s+"-nav-more",{position:"relative",padding:c,background:"transparent",border:0,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.controlHeightLG/8,transform:"translateY(100%)",content:"''"}}),(0,a.Z)(n,s+"-nav-add",(0,x.Z)({minWidth:d+"px",marginLeft:{_skip_check_:!0,value:v+"px"},padding:"0 "+e.paddingXS+"px",background:"transparent",border:e.lineWidth+"px "+e.lineType+" "+h,borderRadius:e.borderRadiusLG+"px "+e.borderRadiusLG+"px 0 0",outline:"none",cursor:"pointer",transition:"all "+e.motionDurationSlow+" "+e.motionEaseInOut,"&:hover":{color:u},"&:active, &:focus:not(:focus-visible)":{color:p}},(0,xe.Qy)(e))),n)),(0,a.Z)(r,s+"-extra-content",{flex:"none"}),(0,a.Z)(r,s+"-ink-bar",{position:"absolute",background:e.colorPrimary,pointerEvents:"none"}),r)),Za(e)),(i={},(0,a.Z)(i,s+"-content",{position:"relative",width:"100%"}),(0,a.Z)(i,s+"-content-holder",{flex:"auto",minWidth:0,minHeight:0}),(0,a.Z)(i,s+"-tabpane",{outline:"none","&-hidden":{display:"none"}}),i))),(0,a.Z)(o,s+"-centered",(0,a.Z)({},"> "+s+"-nav, > div > "+s+"-nav",(0,a.Z)({},s+"-nav-wrap",(0,a.Z)({},"&:not([class*='"+s+"-nav-wrap-ping'])",{justifyContent:"center"})))),o},ya=(0,ua.Z)("Tabs",function(t){var e=t.controlHeightLG,n=(0,va.TS)(t,{tabsHoverColor:t.colorPrimaryHover,tabsActiveColor:t.colorPrimaryActive,tabsCardHorizontalPadding:(e-Math.round(t.fontSize*t.lineHeight))/2-t.lineWidth+"px "+t.padding+"px",tabsCardHeight:e,tabsCardGutter:t.marginXXS/2,tabsHorizontalGutter:32,tabsCardHeadBackground:t.colorFillAlter,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120});return[ga(n),xa(n),ha(n),ma(n),ba(n),Sa(n),pa(n)]},function(t){return{zIndexPopup:t.zIndexPopupBase+50}}),Ca=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ht(t){var e=t.type,n=t.className,r=t.size,i=t.onEdit,o=t.hideAdd,s=t.centered,c=t.addIcon,d=t.popupClassName,v=t.children,u=t.items,p=t.animated,h=Ca(t,["type","className","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated"]),M=h.prefixCls,C=h.moreIcon,A=C===void 0?l.createElement(We.Z,null):C,z=l.useContext(ea.E_),W=z.getPrefixCls,D=z.direction,I=z.getPopupContainer,B=W("tabs",M),H=ya(B),G=(0,E.Z)(H,2),X=G[0],T=G[1],m;e==="editable-card"&&(m={onEdit:function(R,S){var oe=S.key,J=S.event;i==null||i(R==="add"?J:oe,R)},removeIcon:l.createElement(Oe.Z,null),addIcon:c||l.createElement(we.Z,null),showAdd:o!==!0});var w=W(),N=sa(u,v),P=ra(B,p);return X(l.createElement(ta.Z.Consumer,null,function(g){var R,S=r!==void 0?r:g;return l.createElement(qt,(0,x.Z)({direction:D,getPopupContainer:I,moreTransitionName:w+"-slide-up"},h,{items:N,className:K()((R={},(0,a.Z)(R,B+"-"+S,S),(0,a.Z)(R,B+"-card",["card","editable-card"].includes(e)),(0,a.Z)(R,B+"-editable-card",e==="editable-card"),(0,a.Z)(R,B+"-centered",s),R),n,T),popupClassName:K()(d,T),editable:m,moreIcon:A,prefixCls:B,animated:P}))}))}ht.TabPane=da;var Ta=ht}}]);
|