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

1 lines
12 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[430],{10178:function(k,M,t){t.d(M,{D:function(){return b}});var e=t(74165),v=t(15861),f=t(67294),B=t(48171);function b(D,g){var S=(0,B.J)(D),y=(0,f.useRef)(),C=(0,f.useCallback)(function(){y.current&&(clearTimeout(y.current),y.current=null)},[]),c=(0,f.useCallback)((0,v.Z)((0,e.Z)().mark(function n(){var a,r,s,o=arguments;return(0,e.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:for(a=o.length,r=new Array(a),s=0;s<a;s++)r[s]=o[s];if(!(g===0||g===void 0)){p.next=3;break}return p.abrupt("return",S.apply(void 0,r));case 3:return C(),p.abrupt("return",new Promise(function(_){y.current=setTimeout((0,v.Z)((0,e.Z)().mark(function x(){return(0,e.Z)().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.t0=_,E.next=3,S.apply(void 0,r);case 3:return E.t1=E.sent,(0,E.t0)(E.t1),E.abrupt("return");case 6:case"end":return E.stop()}},x)})),g)}));case 5:case"end":return p.stop()}},n)})),[S,C,g]);return(0,f.useEffect)(function(){return C},[C]),{run:c,cancel:C}}},48171:function(k,M,t){t.d(M,{J:function(){return f}});var e=t(74902),v=t(67294),f=function(b){var D=(0,v.useRef)(null);return D.current=b,(0,v.useCallback)(function(){for(var g,S=arguments.length,y=new Array(S),C=0;C<S;C++)y[C]=arguments[C];return(g=D.current)===null||g===void 0?void 0:g.call.apply(g,[D].concat((0,e.Z)(y)))},[])}},81643:function(k,M,t){t.d(M,{Z:function(){return e}});const e=v=>v?typeof v=="function"?v():v:null},7134:function(k,M,t){t.d(M,{C:function(){return pe}});var e=t(67294),v=t(93967),f=t.n(v),B=t(9220),b=t(42550),D=t(74443),g=t(53124),S=t(98675),y=t(25378),c=e.createContext({}),n=t(54548),a=t(14747),r=t(91945),s=t(45503);const o=l=>{const{antCls:u,componentCls:m,iconCls:i,avatarBg:h,avatarColor:Q,containerSize:N,containerSizeLG:R,containerSizeSM:U,textFontSize:$,textFontSizeLG:w,textFontSizeSM:re,borderRadius:W,borderRadiusLG:z,borderRadiusSM:V,lineWidth:Y,lineType:q}=l,H=(X,K,ee)=>({width:X,height:X,borderRadius:"50%",[`&${m}-square`]:{borderRadius:ee},[`&${m}-icon`]:{fontSize:K,[`> ${i}`]:{margin:0}}});return{[m]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,a.Wf)(l)),{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:Q,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:h,border:`${(0,n.bf)(Y)} ${q} transparent`,["&-image"]:{background:"transparent"},[`${u}-image-img`]:{display:"block"}}),H(N,$,W)),{["&-lg"]:Object.assign({},H(R,w,z)),["&-sm"]:Object.assign({},H(U,re,V)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},d=l=>{const{componentCls:u,groupBorderColor:m,groupOverlapping:i,groupSpace:h}=l;return{[`${u}-group`]:{display:"inline-flex",[`${u}`]:{borderColor:m},["> *:not(:first-child)"]:{marginInlineStart:i}},[`${u}-group-popover`]:{[`${u} + ${u}`]:{marginInlineStart:h}}}},p=l=>{const{controlHeight:u,controlHeightLG:m,controlHeightSM:i,fontSize:h,fontSizeLG:Q,fontSizeXL:N,fontSizeHeading3:R,marginXS:U,marginXXS:$,colorBorderBg:w}=l;return{containerSize:u,containerSizeLG:m,containerSizeSM:i,textFontSize:Math.round((Q+N)/2),textFontSizeLG:R,textFontSizeSM:h,groupSpace:$,groupOverlapping:-U,groupBorderColor:w}};var _=(0,r.I$)("Avatar",l=>{const{colorTextLightSolid:u,colorTextPlaceholder:m}=l,i=(0,s.TS)(l,{avatarBg:m,avatarColor:u});return[o(i),d(i)]},p),x=t(35792),F=function(l,u){var m={};for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&u.indexOf(i)<0&&(m[i]=l[i]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,i=Object.getOwnPropertySymbols(l);h<i.length;h++)u.indexOf(i[h])<0&&Object.prototype.propertyIsEnumerable.call(l,i[h])&&(m[i[h]]=l[i[h]]);return m};const E=(l,u)=>{const[m,i]=e.useState(1),[h,Q]=e.useState(!1),[N,R]=e.useState(!0),U=e.useRef(null),$=e.useRef(null),w=(0,b.sQ)(u,U),{getPrefixCls:re,avatar:W}=e.useContext(g.E_),z=e.useContext(c),V=()=>{if(!$.current||!U.current)return;const O=$.current.offsetWidth,P=U.current.offsetWidth;if(O!==0&&P!==0){const{gap:Z=4}=l;Z*2<P&&i(P-Z*2<O?(P-Z*2)/O:1)}};e.useEffect(()=>{Q(!0)},[]),e.useEffect(()=>{R(!0),i(1)},[l.src]),e.useEffect(V,[l.gap]);const Y=()=>{const{onError:O}=l;(O==null?void 0:O())!==!1&&R(!1)},{prefixCls:q,shape:H,size:X,src:K,srcSet:ee,icon:A,className:oe,rootClassName:te,alt:ae,draggable:Ee,children:ue,crossOrigin:Ce}=l,ie=F(l,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","alt","draggable","children","crossOrigin"]),I=(0,S.Z)(O=>{var P,Z;return(Z=(P=X!=null?X:z==null?void 0:z.size)!==null&&P!==void 0?P:O)!==null&&Z!==void 0?Z:"default"}),Oe=Object.keys(typeof I=="object"?I||{}:{}).some(O=>["xs","sm","md","lg","xl","xxl"].includes(O)),ve=(0,y.Z)(Oe),Pe=e.useMemo(()=>{if(typeof I!="object")return{};const O=D.c4.find(Z=>ve[Z]),P=I[O];return P?{width:P,height:P,fontSize:P&&(A||ue)?P/2:18}:{}},[ve,I]),L=re("avatar",q),fe=(0,x.Z)(L),[he,ye,Se]=_(L,fe),_e=f()({[`${L}-lg`]:I==="large",[`${L}-sm`]:I==="small"}),ge=e.isValidElement(K),xe=H||(z==null?void 0:z.shape)||"circle",Me=f()(L,_e,W==null?void 0:W.className,`${L}-${xe}`,{[`${L}-image`]:ge||K&&N,[`${L}-icon`]:!!A},Se,fe,oe,te,ye),De=typeof I=="number"?{width:I,height:I,fontSize:A?I/2:18}:{};let ne;if(typeof K=="string"&&N)ne=e.createElement("img",{src:K,draggable:Ee,srcSet:ee,onError:Y,alt:ae,crossOrigin:Ce});else if(ge)ne=K;else if(A)ne=A;else if(h||m!==1){const O=`scale(${m})`,P={msTransform:O,WebkitTransform:O,transform:O};ne=e.createElement(B.Z,{onResize:V},e.createElement("span",{className:`${L}-string`,ref:$,style:Object.assign({},P)},ue))}else ne=e.createElement("span",{className:`${L}-string`,style:{opacity:0},ref:$},ue);return delete ie.onError,delete ie.gap,he(e.createElement("span",Object.assign({},ie,{style:Object.assign(Object.assign(Object.assign(Object.assign({},De),Pe),W==null?void 0:W.style),ie.style),className:Me,ref:w}),ne))};var j=e.forwardRef(E),G=t(50344),T=t(55241),ce=t(96159);const se=l=>{const{size:u,shape:m}=e.useContext(c),i=e.useMemo(()=>({size:l.size||u,shape:l.shape||m}),[l.size,l.shape,u,m]);return e.createElement(c.Provider,{value:i},l.children)};var de=l=>{const{getPrefixCls:u,direction:m}=e.useContext(g.E_),{prefixCls:i,className:h,rootClassName:Q,style:N,maxCount:R,maxStyle:U,size:$,shape:w,maxPopoverPlacement:re="top",maxPopoverTrigger:W="hover",children:z}=l,V=u("avatar",i),Y=`${V}-group`,q=(0,x.Z)(V),[H,X,K]=_(V,q),ee=f()(Y,{[`${Y}-rtl`]:m==="rtl"},K,q,h,Q,X),A=(0,G.Z)(z).map((te,ae)=>(0,ce.Tm)(te,{key:`avatar-key-${ae}`})),oe=A.length;if(R&&R<oe){const te=A.slice(0,R),ae=A.slice(R,oe);return te.push(e.createElement(T.Z,{key:"avatar-popover-key",content:ae,trigger:W,placement:re,overlayClassName:`${Y}-popover`,destroyTooltipOnHide:!0},e.createElement(j,{style:U},`+${oe-R}`))),H(e.createElement(se,{shape:w,size:$},e.createElement("div",{className:ee,style:N},te)))}return H(e.createElement(se,{shape:w,size:$},e.createElement("div",{className:ee,style:N},A)))};const le=j;le.Group=de;var pe=le},66330:function(k,M,t){var e=t(67294),v=t(93967),f=t.n(v),B=t(92419),b=t(81643),D=t(53124),g=t(20136),S=function(n,a){var r={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&a.indexOf(s)<0&&(r[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(n);o<s.length;o++)a.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(n,s[o])&&(r[s[o]]=n[s[o]]);return r};const y=(n,a,r)=>!a&&!r?null:e.createElement(e.Fragment,null,a&&e.createElement("div",{className:`${n}-title`},(0,b.Z)(a)),e.createElement("div",{className:`${n}-inner-content`},(0,b.Z)(r))),C=n=>{const{hashId:a,prefixCls:r,className:s,style:o,placement:d="top",title:p,content:_,children:x}=n;return e.createElement("div",{className:f()(a,r,`${r}-pure`,`${r}-placement-${d}`,s),style:o},e.createElement("div",{className:`${r}-arrow`}),e.createElement(B.G,Object.assign({},n,{className:a,prefixCls:r}),x||y(r,p,_)))},c=n=>{const{prefixCls:a,className:r}=n,s=S(n,["prefixCls","className"]),{getPrefixCls:o}=e.useContext(D.E_),d=o("popover",a),[p,_,x]=(0,g.Z)(d);return p(e.createElement(C,Object.assign({},s,{prefixCls:d,hashId:_,className:f()(r,x)})))};M.ZP=c},55241:function(k,M,t){var e=t(67294),v=t(93967),f=t.n(v),B=t(81643),b=t(33603),D=t(53124),g=t(83062),S=t(66330),y=t(20136),C=function(a,r){var s={};for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&r.indexOf(o)<0&&(s[o]=a[o]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,o=Object.getOwnPropertySymbols(a);d<o.length;d++)r.indexOf(o[d])<0&&Object.prototype.propertyIsEnumerable.call(a,o[d])&&(s[o[d]]=a[o[d]]);return s};const c=a=>{let{title:r,content:s,prefixCls:o}=a;return e.createElement(e.Fragment,null,r&&e.createElement("div",{className:`${o}-title`},(0,B.Z)(r)),e.createElement("div",{className:`${o}-inner-content`},(0,B.Z)(s)))},n=e.forwardRef((a,r)=>{const{prefixCls:s,title:o,content:d,overlayClassName:p,placement:_="top",trigger:x="hover",mouseEnterDelay:F=.1,mouseLeaveDelay:E=.1,overlayStyle:J={}}=a,j=C(a,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:G}=e.useContext(D.E_),T=G("popover",s),[ce,se,me]=(0,y.Z)(T),de=G(),le=f()(p,se,me);return ce(e.createElement(g.Z,Object.assign({placement:_,trigger:x,mouseEnterDelay:F,mouseLeaveDelay:E,overlayStyle:J},j,{prefixCls:T,overlayClassName:le,ref:r,overlay:o||d?e.createElement(c,{prefixCls:T,title:o,content:d}):null,transitionName:(0,b.m)(de,"zoom-big",j.transitionName),"data-popover-inject":!0})))});n._InternalPanelDoNotUseOrYouWillBeFired=S.ZP,M.Z=n},20136:function(k,M,t){var e=t(14747),v=t(50438),f=t(97414),B=t(8796),b=t(91945),D=t(45503),g=t(79511);const S=c=>{const{componentCls:n,popoverColor:a,titleMinWidth:r,fontWeightStrong:s,innerPadding:o,boxShadowSecondary:d,colorTextHeading:p,borderRadiusLG:_,zIndexPopup:x,titleMarginBottom:F,colorBgElevated:E,popoverBg:J,titleBorderBottom:j,innerContentPadding:G,titlePadding:T}=c;return[{[n]:Object.assign(Object.assign({},(0,e.Wf)(c)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:x,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":E,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${n}-content`]:{position:"relative"},[`${n}-inner`]:{backgroundColor:J,backgroundClip:"padding-box",borderRadius:_,boxShadow:d,padding:o},[`${n}-title`]:{minWidth:r,marginBottom:F,color:p,fontWeight:s,borderBottom:j,padding:T},[`${n}-inner-content`]:{color:a,padding:G}})},(0,f.ZP)(c,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:c.sizePopupArrow,display:"inline-block",[`${n}-content`]:{display:"inline-block"}}}]},y=c=>{const{componentCls:n}=c;return{[n]:B.i.map(a=>{const r=c[`${a}6`];return{[`&${n}-${a}`]:{"--antd-arrow-background-color":r,[`${n}-inner`]:{backgroundColor:r},[`${n}-arrow`]:{background:"transparent"}}}})}},C=c=>{const{lineWidth:n,controlHeight:a,fontHeight:r,padding:s,wireframe:o,zIndexPopupBase:d,borderRadiusLG:p,marginXS:_,lineType:x,colorSplit:F,paddingSM:E}=c,J=a-r,j=J/2,G=J/2-n,T=s;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:d+30},(0,g.w)(c)),(0,f.wZ)({contentRadius:p,limitVerticalRadius:!0})),{innerPadding:o?0:12,titleMarginBottom:o?0:_,titlePadding:o?`${j}px ${T}px ${G}px`:0,titleBorderBottom:o?`${n}px ${x} ${F}`:"none",innerContentPadding:o?`${E}px ${T}px`:0})};M.Z=(0,b.I$)("Popover",c=>{const{colorBgElevated:n,colorText:a}=c,r=(0,D.TS)(c,{popoverBg:n,popoverColor:a});return[S(r),y(r),(0,v._y)(r,"zoom-big")]},C,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]})}}]);