-
Notifications
You must be signed in to change notification settings - Fork 0
/
27211.1ffa9d14.async.js
1 lines (1 loc) · 12 KB
/
27211.1ffa9d14.async.js
1
"use strict";(self.webpackChunkantd=self.webpackChunkantd||[]).push([[27211],{527211:function(Ze,U,a){a.d(U,{Z:function(){return Be}});var q=a(238416),c=a.n(q),_=a(242122),x=a.n(_),ee=a(627424),L=a.n(ee),re=a(670215),Z=a.n(re),R=a(667294),te=a(937431),oe=a.n(te),ne=a(271961),ie=a.n(ne),ce=a(742547),ae=a.n(ce),se=a(740753),le=a.n(se),de=a(294184),O=a.n(de),ue=a(518475),Q=a(73287),ve=a(643579),ge=a(879587),z=a(416397);function T(i){return!i||i<0?0:i>100?100:i}function $(i){var e=i.success,r=i.successPercent,n=r;return e&&"progress"in e&&(n=e.progress),e&&"percent"in e&&(n=e.percent),n}var fe=function(e){var r=e.percent,n=e.success,o=e.successPercent,t=T($({success:n,successPercent:o}));return[t,T(T(r)-t)]},Ce=function(e){var r=e.success,n=r===void 0?{}:r,o=e.strokeColor,t=n.strokeColor;return[t||z.presetPrimaryColors.green,o||null]},D=function(e,r,n){var o=-1,t=-1;if(r==="step"){var m=n.steps,l=n.strokeWidth;if(typeof e=="string"||typeof e=="undefined")o=e==="small"?2:14,t=l!=null?l:8;else if(typeof e=="number")o=e,t=e;else{var v=e,d=L()(v,2),P=d[0];o=P===void 0?14:P;var h=d[1];t=h===void 0?8:h}o*=m}else if(r==="line"){var N=n==null?void 0:n.strokeWidth;if(typeof e=="string"||typeof e=="undefined")t=N||(e==="small"?6:8);else if(typeof e=="number")o=e,t=e;else{var y=e,j=L()(y,2),C=j[0];o=C===void 0?-1:C;var I=j[1];t=I===void 0?8:I}}else if(r==="circle"||r==="dashboard")if(typeof e=="string"||typeof e=="undefined"){var S=e==="small"?[60,60]:[120,120],b=L()(S,2);o=b[0],t=b[1]}else if(typeof e=="number")o=e,t=e;else{var A,p,g,u;o=(A=(p=e[0])!==null&&p!==void 0?p:e[1])!==null&&A!==void 0?A:120,t=(g=(u=e[0])!==null&&u!==void 0?u:e[1])!==null&&g!==void 0?g:120}return[o,t]},s=a(785893),me=3,he=function(e){return me/e*100},pe=function(e){var r=e.prefixCls,n=e.trailColor,o=n===void 0?null:n,t=e.strokeLinecap,m=t===void 0?"round":t,l=e.gapPosition,v=e.gapDegree,d=e.width,P=d===void 0?120:d,h=e.type,N=e.children,y=e.success,j=e.size,C=j===void 0?P:j,I=D(C,"circle"),S=L()(I,2),b=S[0],A=S[1],p=e.strokeWidth;p===void 0&&(p=Math.max(he(b),6));var g={width:b,height:A,fontSize:b*.15+6},u=R.useMemo(function(){if(v||v===0)return v;if(h==="dashboard")return 75},[v,h]),M=l||h==="dashboard"&&"bottom"||void 0,w=Object.prototype.toString.call(e.strokeColor)==="[object Object]",W=Ce({success:y,strokeColor:e.strokeColor}),f=O()("".concat(r,"-inner"),c()({},"".concat(r,"-circle-gradient"),w)),F=(0,s.jsx)(ve.Cd,{percent:fe(e),strokeWidth:p,trailWidth:p,strokeColor:W,strokeLinecap:m,trailColor:o,prefixCls:r,gapDegree:u,gapPosition:M});return(0,s.jsx)("div",{className:f,style:g,children:b<=20?(0,s.jsx)(ge.Z,{title:N,children:(0,s.jsx)("span",{children:F})}):(0,s.jsxs)(s.Fragment,{children:[F,N]})})},Se=pe,ye=["from","to","direction"],xe=function(e){var r=[];return Object.keys(e).forEach(function(n){var o=parseFloat(n.replace(/%/g,""));isNaN(o)||r.push({key:o,value:e[n]})}),r=r.sort(function(n,o){return n.key-o.key}),r.map(function(n){var o=n.key,t=n.value;return"".concat(t," ").concat(o,"%")}).join(", ")},Pe=function(e,r){var n=e.from,o=n===void 0?z.presetPrimaryColors.blue:n,t=e.to,m=t===void 0?z.presetPrimaryColors.blue:t,l=e.direction,v=l===void 0?r==="rtl"?"to left":"to right":l,d=Z()(e,ye);if(Object.keys(d).length!==0){var P=xe(d);return{backgroundImage:"linear-gradient(".concat(v,", ").concat(P,")")}}return{backgroundImage:"linear-gradient(".concat(v,", ").concat(o,", ").concat(m,")")}},be=function(e){var r=e.prefixCls,n=e.direction,o=e.percent,t=e.size,m=e.strokeWidth,l=e.strokeColor,v=e.strokeLinecap,d=v===void 0?"round":v,P=e.children,h=e.trailColor,N=h===void 0?null:h,y=e.success,j=(0,R.useContext)(Q.E_),C=j.direction,I=l&&typeof l!="string"?Pe(l,n):{backgroundColor:l},S=d==="square"||d==="butt"?0:void 0,b={backgroundColor:N||void 0,borderRadius:S},A=t!=null?t:[-1,m||(t==="small"?6:8)],p=D(A,"line",{strokeWidth:m}),g=L()(p,2),u=g[0],M=g[1];if(!1)var w;var W=x()({width:"100%",height:M,borderRadius:S,clipPath:C==="rtl"?"inset(0 0 0 ".concat(100-T(o),"% round 100px)"):"inset(0 ".concat(100-T(o),"% 0 0 round 100px)")},I),f=$(e),F={width:"100%",height:M,borderRadius:S,clipPath:C==="rtl"?"inset(0 0 0 ".concat(100-T(f),"% round 100px)"):"inset(0 ".concat(100-T(f),"% 0 0 round 100px)"),backgroundColor:y==null?void 0:y.strokeColor},B={width:u<0?"100%":u,height:M};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"".concat(r,"-outer"),style:B,children:(0,s.jsxs)("div",{className:"".concat(r,"-inner"),style:b,children:[(0,s.jsx)("div",{className:"".concat(r,"-bg"),style:W}),f!==void 0?(0,s.jsx)("div",{className:"".concat(r,"-success-bg"),style:F}):null]})}),P]})},je=be,Ie=function(e){for(var r=e.size,n=e.steps,o=e.percent,t=o===void 0?0:o,m=e.strokeWidth,l=m===void 0?8:m,v=e.strokeColor,d=e.trailColor,P=d===void 0?null:d,h=e.prefixCls,N=e.children,y=Math.round(n*(t/100)),j=r==="small"?2:14,C=r!=null?r:[j,l],I=D(C,"step",{steps:n,strokeWidth:l}),S=L()(I,2),b=S[0],A=S[1],p=b/n,g=new Array(n),u=0;u<n;u++){var M=Array.isArray(v)?v[u]:v;g[u]=(0,s.jsx)("div",{className:O()("".concat(h,"-steps-item"),c()({},"".concat(h,"-steps-item-active"),u<=y-1)),style:{backgroundColor:u<=y-1?M:P,width:p,height:A}},u)}return(0,s.jsxs)("div",{className:"".concat(h,"-steps-outer"),children:[g,N]})},Ne=Ie,G=a(615624),Ae=a(548073),We=a(286665),Ee=a(986943),V=function(e){var r=e?"100%":"-100%";return new G.E4("antProgress".concat(e?"RTL":"LTR","Active"),{"0%":{transform:"translateX(".concat(r,") scaleX(0)"),opacity:.1},"20%":{transform:"translateX(".concat(r,") scaleX(0)"),opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Te=function(e){var r,n,o,t=e.componentCls,m=e.iconCls;return c()({},t,x()(x()({},(0,Ae.Wf)(e)),{},(o={display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS}},c()(o,"".concat(t,"-outer"),{display:"inline-block",width:"100%"}),c()(o,"&".concat(t,"-show-info"),c()({},"".concat(t,"-outer"),{marginInlineEnd:"calc(-2em - ".concat((0,G.bf)(e.marginXS),")"),paddingInlineEnd:"calc(2em + ".concat((0,G.bf)(e.paddingXS),")")})),c()(o,"".concat(t,"-inner"),{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius}),c()(o,"".concat(t,"-inner:not(").concat(t,"-circle-gradient)"),c()({},"".concat(t,"-circle-path"),{stroke:e.defaultColor})),c()(o,"".concat(t,"-success-bg, ").concat(t,"-bg"),{position:"relative",backgroundColor:e.defaultColor,borderRadius:e.lineBorderRadius,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOutCirc)}),c()(o,"".concat(t,"-success-bg"),{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess}),c()(o,"".concat(t,"-text"),c()({display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal"},m,{fontSize:e.fontSize})),c()(o,"&".concat(t,"-status-active"),c()({},"".concat(t,"-bg::before"),{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:V(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'})),c()(o,"&".concat(t,"-rtl").concat(t,"-status-active"),c()({},"".concat(t,"-bg::before"),{animationName:V(!0)})),c()(o,"&".concat(t,"-status-exception"),(r={},c()(r,"".concat(t,"-bg"),{backgroundColor:e.colorError}),c()(r,"".concat(t,"-text"),{color:e.colorError}),r)),c()(o,"&".concat(t,"-status-exception ").concat(t,"-inner:not(").concat(t,"-circle-gradient)"),c()({},"".concat(t,"-circle-path"),{stroke:e.colorError})),c()(o,"&".concat(t,"-status-success"),(n={},c()(n,"".concat(t,"-bg"),{backgroundColor:e.colorSuccess}),c()(n,"".concat(t,"-text"),{color:e.colorSuccess}),n)),c()(o,"&".concat(t,"-status-success ").concat(t,"-inner:not(").concat(t,"-circle-gradient)"),c()({},"".concat(t,"-circle-path"),{stroke:e.colorSuccess})),o)))},Me=function(e){var r,n,o=e.componentCls,t=e.iconCls;return n={},c()(n,o,(r={},c()(r,"".concat(o,"-circle-trail"),{stroke:e.remainingColor}),c()(r,"&".concat(o,"-circle ").concat(o,"-inner"),{position:"relative",lineHeight:1,backgroundColor:"transparent"}),c()(r,"&".concat(o,"-circle ").concat(o,"-text"),c()({position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)"},t,{fontSize:e.circleIconFontSize})),c()(r,"".concat(o,"-circle&-status-exception"),c()({},"".concat(o,"-text"),{color:e.colorError})),c()(r,"".concat(o,"-circle&-status-success"),c()({},"".concat(o,"-text"),{color:e.colorSuccess})),r)),c()(n,"".concat(o,"-inline-circle"),c()({lineHeight:1},"".concat(o,"-inner"),{verticalAlign:"bottom"})),n},Le=function(e){var r=e.componentCls;return c()({},r,c()({},"".concat(r,"-steps"),{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:"all ".concat(e.motionDurationSlow),"&-active":{backgroundColor:e.defaultColor}}}))},Re=function(e){var r=e.componentCls,n=e.iconCls;return c()({},r,c()({},"".concat(r,"-small&-line, ").concat(r,"-small&-line ").concat(r,"-text ").concat(n),{fontSize:e.fontSizeSM}))},Fe=function(e){return{circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:"".concat(e.fontSize/e.fontSizeSM,"em")}},ke=(0,We.I$)("Progress",function(i){var e=i.calc(i.marginXXS).div(2).equal(),r=(0,Ee.TS)(i,{progressStepMarginInlineEnd:e,progressStepMinWidth:e,progressActiveMotionDuration:"2.4s"});return[Te(r),Me(r),Le(r),Re(r)]},Fe),we=["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"],Qe=null,Xe=["normal","exception","active","success"],$e=R.forwardRef(function(i,e){var r,n=i.prefixCls,o=i.className,t=i.rootClassName,m=i.steps,l=i.strokeColor,v=i.percent,d=v===void 0?0:v,P=i.size,h=P===void 0?"default":P,N=i.showInfo,y=N===void 0?!0:N,j=i.type,C=j===void 0?"line":j,I=i.status,S=i.format,b=i.style,A=Z()(i,we),p=R.useMemo(function(){var X,E,k=$(i);return parseInt(k!==void 0?(X=k!=null?k:0)===null||X===void 0?void 0:X.toString():(E=d!=null?d:0)===null||E===void 0?void 0:E.toString(),10)},[d,i.success,i.successPercent]),g=R.useMemo(function(){return!Xe.includes(I)&&p>=100?"success":I||"normal"},[I,p]),u=R.useContext(Q.E_),M=u.getPrefixCls,w=u.direction,W=u.progress,f=M("progress",n),F=ke(f),B=L()(F,2),Oe=B[0],ze=B[1],H=R.useMemo(function(){if(!y)return null;var X=$(i),E,k=S||function(Ke){return"".concat(Ke,"%")},J=C==="line";return S||g!=="exception"&&g!=="success"?E=k(T(d),T(X)):g==="exception"?E=J?(0,s.jsx)(ae(),{}):(0,s.jsx)(le(),{}):g==="success"&&(E=J?(0,s.jsx)(oe(),{}):(0,s.jsx)(ie(),{})),(0,s.jsx)("span",{className:"".concat(f,"-text"),title:typeof E=="string"?E:void 0,children:E})},[y,d,p,g,C,f,S]);if(!1)var Ve;var Y=Array.isArray(l)?l[0]:l,Ge=typeof l=="string"||Array.isArray(l)?l:void 0,K;C==="line"?K=m?(0,s.jsx)(Ne,x()(x()({},i),{},{strokeColor:Ge,prefixCls:f,steps:m,children:H})):(0,s.jsx)(je,x()(x()({},i),{},{strokeColor:Y,prefixCls:f,direction:w,children:H})):(C==="circle"||C==="dashboard")&&(K=(0,s.jsx)(Se,x()(x()({},i),{},{strokeColor:Y,prefixCls:f,progressStatus:g,children:H})));var He=O()(f,"".concat(f,"-status-").concat(g),"".concat(f,"-").concat(C==="dashboard"&&"circle"||m&&"steps"||C),(r={},c()(r,"".concat(f,"-inline-circle"),C==="circle"&&D(h,"circle")[0]<=20),c()(r,"".concat(f,"-show-info"),y),c()(r,"".concat(f,"-").concat(h),typeof h=="string"),c()(r,"".concat(f,"-rtl"),w==="rtl"),r),W==null?void 0:W.className,o,t,ze);return Oe((0,s.jsx)("div",x()(x()({ref:e,style:x()(x()({},W==null?void 0:W.style),b),className:He,role:"progressbar","aria-valuenow":p},(0,ue.default)(A,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),{},{children:K})))}),De=$e,Be=De}}]);