4 lines
37 KiB
JavaScript
4 lines
37 KiB
JavaScript
|
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2398],{92398:function(dn,Mt,p){p.d(Mt,{Z:function(){return Ga}});var a=p(67294),Zt=p(97937),Nt=p(89705),zt=p(24969),_t=p(93967),Y=p.n(_t),se=p(87462),F=p(4942),ae=p(1413),Z=p(97685),Oe=p(71002),Ee=p(91),Ue=p(21770),Ot=p(31131),Re=(0,a.createContext)(null),Fe=p(74902),De=p(9220),Dt=p(66680),Bt=p(42550),Ye=p(75164),At=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,m=(0,a.useState)(),b=(0,Z.Z)(m,2),C=b[0],w=b[1],W=(0,a.useRef)(),I=a.useCallback(function(f){return typeof o=="function"?o(f):typeof o=="number"?o:f},[o]);function G(){Ye.Z.cancel(W.current)}return(0,a.useEffect)(function(){var f={};if(n)if(r){f.width=I(n.width);var h=i?"right":"left";d==="start"&&(f[h]=n[h]),d==="center"&&(f[h]=n[h]+n.width/2,f.transform=i?"translateX(50%)":"translateX(-50%)"),d==="end"&&(f[h]=n[h]+n.width,f.transform="translateX(-100%)")}else f.height=I(n.height),d==="start"&&(f.top=n.top),d==="center"&&(f.top=n.top+n.height/2,f.transform="translateY(-50%)"),d==="end"&&(f.top=n.top+n.height,f.transform="translateY(-100%)");return G(),W.current=(0,Ye.Z)(function(){var M=C&&f&&Object.keys(f).every(function(_){var N=f[_],A=C[_];return typeof N=="number"&&typeof A=="number"?Math.round(N)===Math.round(A):N===A});M||w(f)}),G},[JSON.stringify(n),r,i,d,I]),{style:C}},Ht=At,Qe={width:0,height:0,left:0,top:0};function Wt(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)||Qe,c=l.left+l.width,o=0;o<e.length;o+=1){var s=e[o].key,d=t.get(s);if(!d){var m;d=t.get((m=e[o-1])===null||m===void 0?void 0:m.key)||Qe}var b=i.get(s)||(0,ae.Z)({},d);b.right=c-b.left-b.width,i.set(s,b)}return i},[e.map(function(r){return r.key}).join("_"),t,n])}function Je(e,t){var n=a.useRef(e),r=a.useState({}),i=(0,Z.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,qe=.01,Ie=20,et=Math.pow(.995,Ie);function jt(e,t){var n=(0,a.useState)(),r=(0,Z.Z)(n,2),i=r[0],l=r[1],c=(0,a.useState)(0),o=(0,Z.Z)(c,2),s=o[0],d=o[1],m=(0,a.useState)(0),b=(0,Z.Z)(m,2),C=b[0],w=b[1],W=(0,a.useState)(),I=(0,Z.Z)(W,2),G=I[0],f=I[1],h=(0,a.useRef)();function M(E){var L=E.touches[0],v=L.screenX,x=L.screenY;l({x:v,y:x}),window.clearInterval(h.current)}function _(E){if(i){var L=E.touches[0],v=L.screenX,x=L.screenY;l({x:v,y:x});var P=v-i.x,g=x-i.y;t(P,g);var K=Date.now();d(K),w(K-s),f({x:P,y:g})}}function N(){if(i&&(l(null),f(null),G)){var E=G.x/C,L=G.y/C,v=Math.abs(E),x=Math.abs(L);if(Math.max(v,x)<Gt)return;var P=E,g=L;h.current=window.setInterval(function(){if(Math.abs(P)<qe&&Math.abs(g)<qe){window.clearInterval(h.current);return}P*=et,g*=et,t(P*Ie,g*Ie)},Ie)}}var A=(0,a.useRef)();function j(E){var L=E.deltaX,v=E.deltaY,x=0,P=Math.abs(L),g=Math.abs(v);P===g?x=A.current==="x"?L:v:P>g?(x=L,A.current="x"):(x=v,A.current="y"),t(-x,-x)&&E.preventDefault()}var O=(0,a.useRef)(null);O.current={onTouchStart:M,onTouchMove:_,onTouchEnd:N,onWheel:j},a.useEffect(function(){function E(P){O.current.onTouchStart(P)}function L(P){O.current.onTouchMove(P)}function v(P){O.current.onTouchEnd(P)}function x(P){O.current.onWheel(P)}return document.addEventListener("touchmove",L,{passive:!1}),document.addEventListener("touchend",v,{passive:!0}),e.current.addEventListener("touchstart",E,{passive:!0}),e.current.addEventListener("wheel",x,{passive:!1}),function(){document.removeEventListener("touchmove",L),document.removeEventListener("touchend",v)}},[])}var kt=p(8410);function tt(e){var t=(0,a.useState)(0),n=(0,Z.Z)(t,2),r=n[0],i=n[1],l=(0,a.useRef)(0),c=(0,a.useRef)();return c.current=e,(0,kt.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,Z.Z)(n,2),i=r[1],l=(0,a.useRef)(typeof e=="function"?e():e),c=tt(function(){var s=l.current;t.current.forEach(function(d){s=d(s)
|
||
|
|
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,S.bf)(o(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${(0,S.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,S.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},za=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,S.bf)(e.borderRadius)} ${(0,S.bf)(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${(0,S.bf)(e.borderRadius)} ${(0,S.bf)(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${(0,S.bf)(e.borderRadius)} ${(0,S.bf)(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${(0,S.bf)(e.borderRadius)} 0 0 ${(0,S.bf)(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:l,minHeight:l}}}}}},_a=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",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}},(0,ue.Qy)(e)),"&:hover":{color:r},[`&${d}-active ${d}-btn`]:{color:o,textShadow:e.tabsActiveTextShadow},[`&${d}-focus ${d}-btn:
|