Files
weiguang-jewelry-ledger/新账系统/web/dist/assets/card-BJ98V9Zi.js
T

12 lines
45 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{$n as t,$t as n,An as r,At as i,Ct as a,Dn as o,Gt as s,Hn as c,Ht as l,It as u,Jn as d,Jt as f,Qn as p,St as m,Tn as h,V as g,Yt as _,Zn as v,Zt as y,an as b,er as x,jn as S,kn as C,kt as w,ln as T,nn as E,nr as D,qn as O,qt as k,rn as A,vt as j,wn as M,zt as N}from"./index-BvkDlq1y.js";import{c as P,i as F,p as I,r as L,u as R}from"./input-CIXLdGWW.js";import{C as z,T as B,y as V}from"./TextArea-r6omQeC2.js";var H=e(D()),U=e(x()),W={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`},G=H.forwardRef(function(e,n){return H.createElement(N,t({},e,{ref:n,icon:W}))}),K=(0,H.createContext)(null),q=function(e){var t=e.activeTabOffset,n=e.horizontal,i=e.rtl,a=e.indicator,o=a===void 0?{}:a,s=o.size,c=o.align,l=c===void 0?`center`:c,u=(0,H.useState)(),d=C(u,2),f=d[0],p=d[1],m=(0,H.useRef)(),h=H.useCallback(function(e){return typeof s==`function`?s(e):typeof s==`number`?s:e},[s]);function g(){r.cancel(m.current)}return(0,H.useEffect)(function(){var e={};if(t){if(n){e.width=h(t.width);var a=i?`right`:`left`;l===`start`&&(e[a]=t[a]),l===`center`&&(e[a]=t[a]+t.width/2,e.transform=i?`translateX(50%)`:`translateX(-50%)`),l===`end`&&(e[a]=t[a]+t.width,e.transform=`translateX(-100%)`)}else e.height=h(t.height),l===`start`&&(e.top=t.top),l===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),l===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`)}return g(),m.current=r(function(){f&&e&&Object.keys(e).every(function(t){var n=e[t],r=f[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||p(e)}),g},[JSON.stringify(t),n,i,l,h]),{style:f}},J={width:0,height:0,left:0,top:0};function ee(e,t,n){return(0,H.useMemo)(function(){for(var n=new Map,r=t.get(e[0]?.key)||J,i=r.left+r.width,a=0;a<e.length;a+=1){var o=e[a].key,s=t.get(o);s||=t.get(e[a-1]?.key)||J;var c=n.get(o)||O({},s);c.right=i-c.left-c.width,n.set(o,c)}return n},[e.map(function(e){return e.key}).join(`_`),t,n])}function Y(e,t){var n=H.useRef(e),r=H.useState({}),i=C(r,2)[1];function a(e){var r=typeof e==`function`?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,i({})}return[n.current,a]}var te=.1,ne=.01,re=20,ie=.995**re;function ae(e,t){var n=(0,H.useState)(),r=C(n,2),i=r[0],a=r[1],o=(0,H.useState)(0),s=C(o,2),c=s[0],l=s[1],u=(0,H.useState)(0),d=C(u,2),f=d[0],p=d[1],m=(0,H.useState)(),h=C(m,2),g=h[0],_=h[1],v=(0,H.useRef)();function y(e){var t=e.touches[0];a({x:t.screenX,y:t.screenY}),window.clearInterval(v.current)}function b(e){if(i){var n=e.touches[0],r=n.screenX,o=n.screenY;a({x:r,y:o});var s=r-i.x,u=o-i.y;t(s,u);var d=Date.now();l(d),p(d-c),_({x:s,y:u})}}function x(){if(i&&(a(null),_(null),g)){var e=g.x/f,n=g.y/f;if(Math.max(Math.abs(e),Math.abs(n))<te)return;var r=e,o=n;v.current=window.setInterval(function(){Math.abs(r)<ne&&Math.abs(o)<ne?window.clearInterval(v.current):(r*=ie,o*=ie,t(r*re,o*re))},re)}}var S=(0,H.useRef)();function w(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i=S.current===`x`?n:r:a>o?(i=n,S.current=`x`):(i=r,S.current=`y`),t(-i,-i)&&e.preventDefault()}var T=(0,H.useRef)(null);T.current={onTouchStart:y,onTouchMove:b,onTouchEnd:x,onWheel:w},H.useEffect(function(){function t(e){T.current.onTouchStart(e)}function n(e){T.current.onTouchMove(e)}function r(e){T.current.onTouchEnd(e)}function i(e){T.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),function(){document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function oe(e){var t=(0,H.useState)(0),n=C(t,2),r=n[0],i=n[1],a=(0,H.useRef)(0),o=(0,H.useRef)();return o.current=e,M(function(){var e;(e=o.current)==null||e.call(o)},[r]),function(){a.current===r&&(a.current+=1,i(a.current))}}function se(e){var t=(0,H.useRef)([]),n=(0,H.useState)({}),r=C(n,2)[1],i=(0,H.useRef)(typeof e==`function`?e():e),a=oe(function(){var e=i.current;t.current.forEach(function(t){e=t(e)}),t.current=[],i.current=e,r({})});function o(e){t.current.push(e),a()}return[i.current,o]}var ce={width:0,height:0,left:0,top:0,right:0};function le(e,t,n,r,i,a,o){var s=o.tabs,c=o.tabPosition,l=o.rtl,u,d,f;return[`top`,`bottom`].includes(c)?(u=`width`,d=l?`right`:`left`,f=Math.abs(n)):(u=`height`,d=`top`,f=-n),(0,H.useMemo)(function(){if(!s.length)return[0,0];for(var n=s.length,r=n,i=0;i<n;i+=1){var a=e.get(s[i].key)||ce;if(Math.floor(a[d]+a[u])>Math.floor(f+t)){r=i-1;break}}for(var o=0,c=n-1;c>=0;--c)if((e.get(s[c].key)||ce)[d]<f){o=c+1;break}return o>r?[0,-1]:[o,r]},[e,t,r,i,a,f,c,s.map(function(e){return e.key}).join(`_`),l])}function ue(e){var t;return e instanceof Map?(t={},e.forEach(function(e,n){t[n]=e})):t=e,JSON.stringify(t)}var de=`TABS_DQ`;function fe(e){return String(e).replace(/"/g,de)}function pe(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var me=H.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,a=e.style;return!r||r.showAdd===!1?null:H.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:function(e){r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),he=H.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var a,o={};return p(i)===`object`&&!H.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?H.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null}),ge=H.forwardRef(function(e,n){var r=e.prefixCls,i=e.id,a=e.tabs,o=e.locale,s=e.mobile,c=e.more,l=c===void 0?{}:c,u=e.style,f=e.className,p=e.editable,m=e.tabBarGutter,h=e.rtl,g=e.removeAriaLabel,_=e.onTabClick,v=e.getPopupContainer,y=e.popupClassName,b=(0,H.useState)(!1),x=C(b,2),S=x[0],T=x[1],E=(0,H.useState)(null),D=C(E,2),O=D[0],k=D[1],A=l.icon,j=A===void 0?`More`:A,M=`${i}-more-popup`,N=`${r}-dropdown`,I=O===null?null:`${M}-${O}`,L=o?.dropdownAriaLabel;function z(e,t){e.preventDefault(),e.stopPropagation(),p.onEdit(`remove`,{key:t,event:e})}var B=H.createElement(F,{onClick:function(e){_(e.key,e.domEvent),T(!1)},prefixCls:`${N}-menu`,id:M,tabIndex:-1,role:`listbox`,"aria-activedescendant":I,selectedKeys:[O],"aria-label":L===void 0?`expanded dropdown`:L},a.map(function(e){var t=e.closable,n=e.disabled,r=e.closeIcon,a=e.key,o=e.label,s=pe(t,r,p,n);return H.createElement(P,{key:a,id:`${M}-${a}`,role:`option`,"aria-controls":i&&`${i}-panel-${a}`,disabled:n},H.createElement(`span`,null,o),s&&H.createElement(`button`,{type:`button`,"aria-label":g||`remove`,tabIndex:0,className:`${N}-menu-item-remove`,onClick:function(e){e.stopPropagation(),z(e,a)}},r||p.removeIcon||`×`))}));function V(e){for(var t=a.filter(function(e){return!e.disabled}),n=t.findIndex(function(e){return e.key===O})||0,r=t.length,i=0;i<r;i+=1){n=(n+e+r)%r;var o=t[n];if(!o.disabled){k(o.key);return}}}function W(e){var t=e.which;if(!S)[w.DOWN,w.SPACE,w.ENTER].includes(t)&&(T(!0),e.preventDefault());else switch(t){case w.UP:V(-1),e.preventDefault();break;case w.DOWN:V(1),e.preventDefault();break;case w.ESC:T(!1);break;case w.SPACE:case w.ENTER:O!==null&&_(O,e)}}(0,H.useEffect)(function(){var e=document.getElementById(I);e&&e.scrollIntoView&&e.scrollIntoView(!1)},[O]),(0,H.useEffect)(function(){S||k(null)},[S]);var G=d({},h?`marginRight`:`marginLeft`,m);a.length||(G.visibility=`hidden`,G.order=1);var K=(0,U.default)(d({},`${N}-rtl`,h)),q=s?null:H.createElement(R,t({prefixCls:N,overlay:B,visible:a.length?S:!1,onVisibleChange:T,overlayClassName:(0,U.default)(K,y),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:v},l),H.createElement(`button`,{type:`button`,className:`${r}-nav-more`,style:G,"aria-haspopup":`listbox`,"aria-controls":M,id:`${i}-more`,"aria-expanded":S,onKeyDown:W},j));return H.createElement(`div`,{className:(0,U.default)(`${r}-nav-operations`,f),style:u,ref:n},q,H.createElement(me,{prefixCls:r,locale:o,editable:p}))}),_e=H.memo(ge,function(e,t){return t.tabMoving}),ve=function(e){var t=e.prefixCls,n=e.id,r=e.active,i=e.focus,a=e.tab,o=a.key,s=a.label,c=a.disabled,l=a.closeIcon,u=a.icon,f=e.closable,p=e.renderWrapper,m=e.removeAriaLabel,h=e.editable,g=e.onClick,_=e.onFocus,v=e.onBlur,y=e.onKeyDown,b=e.onMouseDown,x=e.onMouseUp,S=e.style,C=e.tabCount,w=e.currentPosition,T=`${t}-tab`,E=pe(f,l,h,c);function D(e){c||g(e)}function O(e){e.preventDefault(),e.stopPropagation(),h.onEdit(`remove`,{key:o,event:e})}var k=H.useMemo(function(){return u&&typeof s==`string`?H.createElement(`span`,null,s):s},[s,u]),A=H.useRef(null);H.useEffect(function(){i&&A.current&&A.current.focus()},[i]);var j=H.createElement(`div`,{key:o,"data-node-key":fe(o),className:(0,U.default)(T,d(d(d(d({},`${T}-with-remove`,E),`${T}-active`,r),`${T}-disabled`,c),`${T}-focus`,i)),style:S,onClick:D},H.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${o}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${o}`,"aria-disabled":c,tabIndex:c?null:r?0:-1,onClick:function(e){e.stopPropagation(),D(e)},onKeyDown:y,onMouseDown:b,onMouseUp:x,onFocus:_,onBlur:v},i&&H.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),u&&H.createElement(`span`,{className:`${T}-icon`},u),s&&k),E&&H.createElement(`button`,{type:`button`,role:`tab`,"aria-label":m||`remove`,tabIndex:r?0:-1,className:`${T}-remove`,onClick:function(e){e.stopPropagation(),O(e)}},l||h.removeIcon||`×`));return p?p(j):j},ye=function(e,t){var n=e.offsetWidth,r=e.offsetHeight,i=e.offsetTop,a=e.offsetLeft,o=e.getBoundingClientRect(),s=o.width,c=o.height,l=o.left,u=o.top;return Math.abs(s-n)<1?[s,c,l-t.left,u-t.top]:[n,r,a,i]},be=function(e){var t=e.current||{},n=t.offsetWidth,r=n===void 0?0:n,i=t.offsetHeight,a=i===void 0?0:i;if(e.current){var o=e.current.getBoundingClientRect(),s=o.width,c=o.height;if(Math.abs(s-r)<1)return[s,c]}return[r,a]},xe=function(e,t){return e[+!t]},Se=H.forwardRef(function(e,n){var r=e.className,i=e.style,a=e.id,o=e.animated,s=e.activeKey,l=e.rtl,u=e.extra,f=e.editable,p=e.locale,m=e.tabPosition,h=e.tabBarGutter,g=e.children,_=e.onTabClick,v=e.onTabScroll,y=e.indicator,x=H.useContext(K),w=x.prefixCls,T=x.tabs,E=(0,H.useRef)(null),D=(0,H.useRef)(null),k=(0,H.useRef)(null),A=(0,H.useRef)(null),j=(0,H.useRef)(null),M=(0,H.useRef)(null),N=(0,H.useRef)(null),P=m===`top`||m===`bottom`,F=Y(0,function(e,t){P&&v&&v({direction:e>t?`left`:`right`})}),I=C(F,2),L=I[0],R=I[1],z=Y(0,function(e,t){!P&&v&&v({direction:e>t?`top`:`bottom`})}),V=C(z,2),W=V[0],G=V[1],J=(0,H.useState)([0,0]),te=C(J,2),ne=te[0],re=te[1],ie=(0,H.useState)([0,0]),ce=C(ie,2),de=ce[0],ge=ce[1],Se=(0,H.useState)([0,0]),Ce=C(Se,2),we=Ce[0],Te=Ce[1],Ee=(0,H.useState)([0,0]),De=C(Ee,2),Oe=De[0],ke=De[1],Ae=se(new Map),je=C(Ae,2),Me=je[0],Ne=je[1],Pe=ee(T,Me,de[0]),Fe=xe(ne,P),Ie=xe(de,P),Le=xe(we,P),Re=xe(Oe,P),ze=Math.floor(Fe)<Math.floor(Ie+Le),X=ze?Fe-Re:Fe-Le,Be=`${w}-nav-operations-hidden`,Z=0,Ve=0;P&&l?(Z=0,Ve=Math.max(0,Ie-X)):(Z=Math.min(0,X-Ie),Ve=0);function He(e){return e<Z?Z:e>Ve?Ve:e}var Ue=(0,H.useRef)(null),We=(0,H.useState)(),Ge=C(We,2),Ke=Ge[0],qe=Ge[1];function Je(){qe(Date.now())}function Ye(){Ue.current&&clearTimeout(Ue.current)}ae(A,function(e,t){function n(e,t){e(function(e){return He(e+t)})}return ze?(P?n(R,e):n(G,t),Ye(),Je(),!0):!1}),(0,H.useEffect)(function(){return Ye(),Ke&&(Ue.current=setTimeout(function(){qe(0)},100)),Ye},[Ke]);var Xe=le(Pe,X,P?L:W,Ie,Le,Re,O(O({},e),{},{tabs:T})),Ze=C(Xe,2),Qe=Ze[0],$e=Ze[1],et=b(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,t=Pe.get(e)||{width:0,height:0,left:0,right:0,top:0};if(P){var n=L;l?t.right<L?n=t.right:t.right+t.width>L+X&&(n=t.right+t.width-X):t.left<-L?n=-t.left:t.left+t.width>-L+X&&(n=-(t.left+t.width-X)),G(0),R(He(n))}else{var r=W;t.top<-W?r=-t.top:t.top+t.height>-W+X&&(r=-(t.top+t.height-X)),R(0),G(He(r))}}),tt=(0,H.useState)(),nt=C(tt,2),rt=nt[0],it=nt[1],at=(0,H.useState)(!1),ot=C(at,2),st=ot[0],ct=ot[1],Q=T.filter(function(e){return!e.disabled}).map(function(e){return e.key}),$=function(e){var t=Q.indexOf(rt||s),n=Q.length;it(Q[(t+e+n)%n])},lt=function(e,t){var n=Q.indexOf(e),r=T.find(function(t){return t.key===e});pe(r?.closable,r?.closeIcon,f,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),f.onEdit(`remove`,{key:e,event:t}),n===Q.length-1?$(-1):$(1))},ut=function(e,t){ct(!0),t.button===1&&lt(e,t)},dt=function(e){var t=e.code,n=l&&P,r=Q[0],i=Q[Q.length-1];switch(t){case`ArrowLeft`:P&&$(n?1:-1);break;case`ArrowRight`:P&&$(n?-1:1);break;case`ArrowUp`:e.preventDefault(),P||$(-1);break;case`ArrowDown`:e.preventDefault(),P||$(1);break;case`Home`:e.preventDefault(),it(r);break;case`End`:e.preventDefault(),it(i);break;case`Enter`:case`Space`:e.preventDefault(),_(rt??s,e);break;case`Backspace`:case`Delete`:lt(rt,e)}},ft={};P?ft[l?`marginRight`:`marginLeft`]=h:ft.marginTop=h;var pt=T.map(function(e,t){var n=e.key;return H.createElement(ve,{id:a,prefixCls:w,key:n,tab:e,style:t===0?void 0:ft,closable:e.closable,editable:f,active:n===s,focus:n===rt,renderWrapper:g,removeAriaLabel:p?.removeAriaLabel,tabCount:Q.length,currentPosition:t+1,onClick:function(e){_(n,e)},onKeyDown:dt,onFocus:function(){st||it(n),et(n),Je(),A.current&&(l||(A.current.scrollLeft=0),A.current.scrollTop=0)},onBlur:function(){it(void 0)},onMouseDown:function(e){return ut(n,e)},onMouseUp:function(){ct(!1)}})}),mt=function(){return Ne(function(){var e=new Map,t=j.current?.getBoundingClientRect();return T.forEach(function(n){var r=n.key,i=j.current?.querySelector(`[data-node-key="${fe(r)}"]`);if(i){var a=ye(i,t),o=C(a,4),s=o[0],c=o[1],l=o[2],u=o[3];e.set(r,{width:s,height:c,left:l,top:u})}}),e})};(0,H.useEffect)(function(){mt()},[T.map(function(e){return e.key}).join(`_`)]);var ht=oe(function(){var e=be(E),t=be(D),n=be(k);re([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var r=be(N);Te(r),ke(be(M));var i=be(j);ge([i[0]-r[0],i[1]-r[1]]),mt()}),gt=T.slice(0,Qe),_t=T.slice($e+1),vt=[].concat(S(gt),S(_t)),yt=Pe.get(s),bt=q({activeTabOffset:yt,horizontal:P,indicator:y,rtl:l}).style;(0,H.useEffect)(function(){et()},[s,Z,Ve,ue(yt),ue(Pe),P]),(0,H.useEffect)(function(){ht()},[l]);var xt=!!vt.length,St=`${w}-nav-wrap`,Ct,wt,Tt,Et;return P?l?(wt=L>0,Ct=L!==Ve):(Ct=L<0,wt=L!==Z):(Tt=W<0,Et=W!==Z),H.createElement(B,{onResize:ht},H.createElement(`div`,{ref:c(n,E),role:`tablist`,"aria-orientation":P?`horizontal`:`vertical`,className:(0,U.default)(`${w}-nav`,r),style:i,onKeyDown:function(){Je()}},H.createElement(he,{ref:D,position:`left`,extra:u,prefixCls:w}),H.createElement(B,{onResize:ht},H.createElement(`div`,{className:(0,U.default)(St,d(d(d(d({},`${St}-ping-left`,Ct),`${St}-ping-right`,wt),`${St}-ping-top`,Tt),`${St}-ping-bottom`,Et)),ref:A},H.createElement(B,{onResize:ht},H.createElement(`div`,{ref:j,className:`${w}-nav-list`,style:{transform:`translate(${L}px, ${W}px)`,transition:Ke?`none`:void 0}},pt,H.createElement(me,{ref:N,prefixCls:w,locale:p,editable:f,style:O(O({},pt.length===0?void 0:ft),{},{visibility:xt?`hidden`:null})}),H.createElement(`div`,{className:(0,U.default)(`${w}-ink-bar`,d({},`${w}-ink-bar-animated`,o.inkBar)),style:bt}))))),H.createElement(_e,t({},e,{removeAriaLabel:p?.removeAriaLabel,ref:M,prefixCls:w,tabs:vt,className:!xt&&Be,tabMoving:!!Ke})),H.createElement(he,{ref:k,position:`right`,extra:u,prefixCls:w})))}),Ce=H.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,a=e.id,o=e.active,s=e.tabKey,c=e.children;return H.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:(0,U.default)(n,o&&`${n}-active`,r),ref:t},c)}),we=[`renderTabBar`],Te=[`label`,`key`],Ee=function(e){var n=e.renderTabBar,r=o(e,we),i=H.useContext(K).tabs;return n?n(O(O({},r),{},{panes:i.map(function(e){var n=e.label,r=e.key,i=o(e,Te);return H.createElement(Ce,t({tab:n,key:r,tabKey:r},i))})}),Se):H.createElement(Se,r)},De=[`key`,`forceRender`,`style`,`className`,`destroyInactiveTabPane`],Oe=function(e){var n=e.id,r=e.activeKey,i=e.animated,a=e.tabPosition,s=e.destroyInactiveTabPane,c=H.useContext(K),u=c.prefixCls,f=c.tabs,p=i.tabPane,m=`${u}-tabpane`;return H.createElement(`div`,{className:(0,U.default)(`${u}-content-holder`)},H.createElement(`div`,{className:(0,U.default)(`${u}-content`,`${u}-content-${a}`,d({},`${u}-content-animated`,p))},f.map(function(e){var a=e.key,c=e.forceRender,u=e.style,d=e.className,f=e.destroyInactiveTabPane,h=o(e,De),g=a===r;return H.createElement(l,t({key:a,visible:g,forceRender:c,removeOnLeave:!!(s||f),leavedClassName:`${m}-hidden`},i.tabPaneMotion),function(e,r){var i=e.style,o=e.className;return H.createElement(Ce,t({},h,{prefixCls:m,id:n,tabKey:a,animated:p,active:g,style:O(O({},u),i),className:(0,U.default)(d,o),ref:r}))})})))};function ke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:O({inkBar:!0},p(e)===`object`?e:{});return t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var Ae=[`id`,`prefixCls`,`className`,`items`,`direction`,`activeKey`,`defaultActiveKey`,`editable`,`animated`,`tabPosition`,`tabBarGutter`,`tabBarStyle`,`tabBarExtraContent`,`locale`,`more`,`destroyInactiveTabPane`,`renderTabBar`,`onChange`,`onTabClick`,`onTabScroll`,`getPopupContainer`,`popupClassName`,`indicator`],je=0,Me=H.forwardRef(function(e,n){var r=e.id,i=e.prefixCls,a=i===void 0?`rc-tabs`:i,s=e.className,c=e.items,l=e.direction,u=e.activeKey,f=e.defaultActiveKey,m=e.editable,h=e.animated,g=e.tabPosition,_=g===void 0?`top`:g,v=e.tabBarGutter,y=e.tabBarStyle,b=e.tabBarExtraContent,x=e.locale,S=e.more,w=e.destroyInactiveTabPane,T=e.renderTabBar,E=e.onChange,D=e.onTabClick,k=e.onTabScroll,j=e.getPopupContainer,M=e.popupClassName,N=e.indicator,P=o(e,Ae),F=H.useMemo(function(){return(c||[]).filter(function(e){return e&&p(e)===`object`&&`key`in e})},[c]),I=l===`rtl`,L=ke(h),R=(0,H.useState)(!1),B=C(R,2),V=B[0],W=B[1];(0,H.useEffect)(function(){W(z())},[]);var G=A(function(){return F[0]?.key},{value:u,defaultValue:f}),q=C(G,2),J=q[0],ee=q[1],Y=(0,H.useState)(function(){return F.findIndex(function(e){return e.key===J})}),te=C(Y,2),ne=te[0],re=te[1];(0,H.useEffect)(function(){var e=F.findIndex(function(e){return e.key===J});e===-1&&(e=Math.max(0,Math.min(ne,F.length-1)),ee(F[e]?.key)),re(e)},[F.map(function(e){return e.key}).join(`_`),J,ne]);var ie=A(null,{value:r}),ae=C(ie,2),oe=ae[0],se=ae[1];(0,H.useEffect)(function(){r||(se(`rc-tabs-${je}`),je+=1)},[]);function ce(e,t){D?.(e,t);var n=e!==J;ee(e),n&&E?.(e)}var le={id:oe,activeKey:J,animated:L,tabPosition:_,rtl:I,mobile:V},ue=O(O({},le),{},{editable:m,locale:x,more:S,tabBarGutter:v,onTabClick:ce,onTabScroll:k,extra:b,style:y,panes:null,getPopupContainer:j,popupClassName:M,indicator:N});return H.createElement(K.Provider,{value:{tabs:F,prefixCls:a}},H.createElement(`div`,t({ref:n,id:r,className:(0,U.default)(a,`${a}-${_}`,d(d(d({},`${a}-mobile`,V),`${a}-editable`,m),`${a}-rtl`,I),s)},P),H.createElement(Ee,t({},ue,{renderTabBar:T})),H.createElement(Oe,t({destroyInactiveTabPane:w},le,{animated:L}))))}),Ne={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Pe(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},typeof t==`object`?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},Ne),{motionName:a(e,`switch`)})),n}var Fe=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 Ie(e){return e.filter(e=>e)}function Le(e,t){return e?e.map(e=>{let t=e.destroyOnHidden??e.destroyInactiveTabPane;return Object.assign(Object.assign({},e),{destroyInactiveTabPane:t})}):Ie(v(t).map(e=>{if(H.isValidElement(e)){let{key:t,props:n}=e,r=n||{},{tab:i}=r,a=Fe(r,[`tab`]);return Object.assign(Object.assign({key:String(t)},a),{label:i})}return null}))}var Re=e=>{let{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}`}}}}},[I(e,`slide-up`),I(e,`slide-down`)]]},ze=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${h(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:f(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:h(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${h(e.borderRadiusLG)} ${h(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${h(e.borderRadiusLG)} ${h(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:h(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${h(e.borderRadiusLG)} 0 0 ${h(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 ${h(e.borderRadiusLG)} ${h(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},X=e=>{let{componentCls:t,itemHoverColor:r,dropdownEdgeChildVerticalPadding:i}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},y(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:`${h(i)} 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({},n),{display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${h(e.paddingXXS)} ${h(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:r}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}})}})}},Be=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,calc:s}=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:`${h(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:s(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${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:h(s(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${h(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:s(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${h(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Z=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,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 ${h(e.borderRadius)} ${h(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${h(e.borderRadius)} ${h(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${h(e.borderRadius)} ${h(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${h(e.borderRadius)} 0 0 ${h(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},Ve=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:`none`,lineHeight:1,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}},_(e)),"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${l}-focus ${l}-btn:focus-visible`]:f(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},He=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=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:h(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:h(e.marginXS)},marginLeft:{_skip_check_:!0,value:h(a(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`}}}}},Ue=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:s}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},y(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:`${h(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${h(e.borderRadiusLG)} ${h(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o}},_(e,-3))},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`}}),Ve(e)),{[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},_(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`}}}}}},We=s(`Tabs`,e=>{let t=E(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:`0 0 0.25px currentcolor`,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${h(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${h(e.horizontalItemGutter)}`});return[Z(t),He(t),Be(t),X(t),ze(t),Ue(t),Re(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-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}}),Ge=()=>null,Ke=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},qe=H.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:a,size:o,onEdit:s,hideAdd:c,centered:l,addIcon:d,removeIcon:f,moreIcon:p,more:m,popupClassName:h,children:g,items:_,animated:v,style:y,indicatorSize:b,indicator:x,destroyInactiveTabPane:S,destroyOnHidden:C}=e,w=Ke(e,[`type`,`className`,`rootClassName`,`size`,`onEdit`,`hideAdd`,`centered`,`addIcon`,`removeIcon`,`moreIcon`,`more`,`popupClassName`,`children`,`items`,`animated`,`style`,`indicatorSize`,`indicator`,`destroyInactiveTabPane`,`destroyOnHidden`]),{prefixCls:E}=w,{direction:D,tabs:O,getPrefixCls:k,getPopupContainer:A}=H.useContext(T),M=k(`tabs`,E),N=i(M),[P,F,I]=We(M,N),R=H.useRef(null);H.useImperativeHandle(t,()=>({nativeElement:R.current}));let z;n===`editable-card`&&(z={onEdit:(e,{key:t,event:n})=>{s?.(e===`add`?n:t,e)},removeIcon:f??O?.removeIcon??H.createElement(u,null),addIcon:(d??O?.addIcon)||H.createElement(G,null),showAdd:c!==!0});let B=k(),V=j(o),W=Le(_,g),K=Pe(M,v),q=Object.assign(Object.assign({},O?.style),y),J={align:x?.align??O?.indicator?.align,size:x?.size??b??O?.indicator?.size??O?.indicatorSize};return P(H.createElement(Me,Object.assign({ref:R,direction:D,getPopupContainer:A},w,{items:W,className:(0,U.default)({[`${M}-${V}`]:V,[`${M}-card`]:[`card`,`editable-card`].includes(n),[`${M}-editable-card`]:n===`editable-card`,[`${M}-centered`]:l},O?.className,r,a,F,I,N),popupClassName:(0,U.default)(h,F,I,N),style:q,editable:z,more:Object.assign({icon:O?.more?.icon??O?.moreIcon??p??H.createElement(L,null),transitionName:`${B}-slide-up`},m),prefixCls:M,animated:K,indicator:J,destroyInactiveTabPane:C??S})))});qe.TabPane=Ge;var Je=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},Ye=e=>{var{prefixCls:t,className:n,hoverable:r=!0}=e,i=Je(e,[`prefixCls`,`className`,`hoverable`]);let{getPrefixCls:a}=H.useContext(T),o=a(`card`,t),s=(0,U.default)(`${o}-grid`,n,{[`${o}-grid-hoverable`]:r});return H.createElement(`div`,Object.assign({},i,{className:s}))},Xe=e=>{let{antCls:t,componentCls:r,headerHeight:i,headerPadding:a,tabsMarginBottom:o}=e;return Object.assign(Object.assign({display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:i,marginBottom:-1,padding:`0 ${h(a)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${h(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${h(e.borderRadiusLG)} ${h(e.borderRadiusLG)} 0 0`},k()),{"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":Object.assign(Object.assign({display:`inline-block`,flex:1},n),{[`
> ${r}-typography,
> ${r}-typography-edit-content
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:`both`,marginBottom:o,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${h(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},Ze=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:`
${h(i)} 0 0 0 ${n},
0 ${h(i)} 0 0 ${n},
${h(i)} ${h(i)} 0 0 ${n},
${h(i)} 0 0 0 ${n} inset,
0 ${h(i)} 0 0 ${n} inset;
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},Qe=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${h(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${h(e.borderRadiusLG)} ${h(e.borderRadiusLG)}`},k()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:h(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:h(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${h(e.lineWidth)} ${e.lineType} ${a}`}}})},$e=e=>Object.assign(Object.assign({margin:`${h(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`},k()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},n),"&-description":{color:e.colorTextDescription}}),et=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${h(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${h(e.padding)} ${h(i)}`}}},tt=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},nt=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s}=e;return{[t]:Object.assign(Object.assign({},y(e)),{position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:Xe(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${h(e.borderRadiusLG)} ${h(e.borderRadiusLG)}`},[`${t}-grid`]:Ze(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${h(e.borderRadiusLG)} ${h(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:Qe(e),[`${t}-meta`]:$e(e)}),[`${t}-bordered`]:{border:`${h(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${h(e.borderRadiusLG)} ${h(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:et(e),[`${t}-loading`]:tt(e),[`${t}-rtl`]:{direction:`rtl`}}},rt=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${h(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},it=s(`Card`,e=>{let t=E(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[nt(t),rt(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),at=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},ot=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return H.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return H.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},H.createElement(`span`,null,e))}))},st=H.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:h,cover:_,actions:v,tabList:y,children:b,activeTabKey:x,defaultActiveTabKey:S,tabBarExtraContent:C,hoverable:w,tabProps:E={},classNames:D,styles:O}=e,k=at(e,[`prefixCls`,`className`,`rootClassName`,`style`,`extra`,`headStyle`,`bodyStyle`,`title`,`loading`,`bordered`,`variant`,`size`,`type`,`cover`,`actions`,`tabList`,`children`,`activeTabKey`,`defaultActiveTabKey`,`tabBarExtraContent`,`hoverable`,`tabProps`,`classNames`,`styles`]),{getPrefixCls:A,direction:M,card:N}=H.useContext(T),[P]=V(`card`,f,d),F=t=>{var n;(n=e.onTabChange)==null||n.call(e,t)},I=e=>(0,U.default)(N?.classNames?.[e],D?.[e]),L=e=>Object.assign(Object.assign({},N?.styles?.[e]),O?.[e]),R=H.useMemo(()=>{let e=!1;return H.Children.forEach(b,t=>{t?.type===Ye&&(e=!0)}),e},[b]),z=A(`card`,n),[B,W,G]=it(z),K=H.createElement(g,{loading:!0,active:!0,paragraph:{rows:4},title:!1},b),q=x!==void 0,J=Object.assign(Object.assign({},E),{[q?`activeKey`:`defaultActiveKey`]:q?x:S,tabBarExtraContent:C}),ee,Y=j(p),te=!Y||Y==="default"?`large`:Y,ne=y?H.createElement(qe,Object.assign({size:te},J,{className:`${z}-head-tabs`,onChange:F,items:y.map(e=>{var{tab:t}=e,n=at(e,[`tab`]);return Object.assign({label:t},n)})})):null;if(l||o||ne){let e=(0,U.default)(`${z}-head`,I(`header`)),t=(0,U.default)(`${z}-head-title`,I(`title`)),n=(0,U.default)(`${z}-extra`,I(`extra`)),r=Object.assign(Object.assign({},s),L(`header`));ee=H.createElement(`div`,{className:e,style:r},H.createElement(`div`,{className:`${z}-head-wrapper`},l&&H.createElement(`div`,{className:t,style:L(`title`)},l),o&&H.createElement(`div`,{className:n,style:L(`extra`)},o)),ne)}let re=(0,U.default)(`${z}-cover`,I(`cover`)),ie=_?H.createElement(`div`,{className:re,style:L(`cover`)},_):null,ae=(0,U.default)(`${z}-body`,I(`body`)),oe=Object.assign(Object.assign({},c),L(`body`)),se=H.createElement(`div`,{className:ae,style:oe},u?K:b),ce=(0,U.default)(`${z}-actions`,I(`actions`)),le=v?.length?H.createElement(ot,{actionClasses:ce,actionStyle:L(`actions`),actions:v}):null,ue=m(k,[`onTabChange`]),de=(0,U.default)(z,N?.className,{[`${z}-loading`]:u,[`${z}-bordered`]:P!==`borderless`,[`${z}-hoverable`]:w,[`${z}-contain-grid`]:R,[`${z}-contain-tabs`]:y?.length,[`${z}-${Y}`]:Y,[`${z}-type-${h}`]:!!h,[`${z}-rtl`]:M===`rtl`},r,i,W,G),fe=Object.assign(Object.assign({},N?.style),a);return B(H.createElement(`div`,Object.assign({ref:t},ue,{className:de,style:fe}),ee,ie,se,le))}),ct=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},Q=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a}=e,o=ct(e,[`prefixCls`,`className`,`avatar`,`title`,`description`]),{getPrefixCls:s}=H.useContext(T),c=s(`card`,t),l=(0,U.default)(`${c}-meta`,n),u=r?H.createElement(`div`,{className:`${c}-meta-avatar`},r):null,d=i?H.createElement(`div`,{className:`${c}-meta-title`},i):null,f=a?H.createElement(`div`,{className:`${c}-meta-description`},a):null,p=d||f?H.createElement(`div`,{className:`${c}-meta-detail`},d,f):null;return H.createElement(`div`,Object.assign({},o,{className:l}),u,p)},$=st;$.Grid=Ye,$.Meta=Q;export{G as n,$ as t};