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 line
19 KiB
1 line
19 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[85237,92245,55054],{75769:function(n,e,t){t.d(e,{Z:function(){return c}});var i=t(38329),a=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},o=t(91851),s=function(n,e){return a.createElement(o.Z,(0,i.Z)({},n,{ref:e,icon:r}))};var c=a.forwardRef(s)},15997:function(n,e,t){t.d(e,{Z:function(){return c}});var i=t(38329),a=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},o=t(91851),s=function(n,e){return a.createElement(o.Z,(0,i.Z)({},n,{ref:e,icon:r}))};var c=a.forwardRef(s)},96402:function(n,e,t){t.d(e,{Z:function(){return c}});var i=t(38329),a=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},o=t(91851),s=function(n,e){return a.createElement(o.Z,(0,i.Z)({},n,{ref:e,icon:r}))};var c=a.forwardRef(s)},15039:function(){},56762:function(n,e,t){t.d(e,{Z:function(){return a}});var i=t(59301);function a(){const[,n]=i.useReducer((n=>n+1),0);return n}},1056:function(n,e,t){t.d(e,{Z:function(){return D}});var i=t(73287),a=t.n(i),r=t(59301),o=t(36355),s=t(32441),c=t(9937);var l=n=>{const{getPrefixCls:e,direction:t}=(0,r.useContext)(o.E_),{prefixCls:i,className:l}=n,d=e("input-group",i),m=e("input"),[u,f]=(0,c.ZP)(m),p=a()(d,{[`${d}-lg`]:"large"===n.size,[`${d}-sm`]:"small"===n.size,[`${d}-compact`]:n.compact,[`${d}-rtl`]:"rtl"===t},f,l),g=(0,r.useContext)(s.aM),h=(0,r.useMemo)((()=>Object.assign(Object.assign({},g),{isFormItemInput:!1})),[g]);return u(r.createElement("span",{className:p,style:n.style,onMouseEnter:n.onMouseEnter,onMouseLeave:n.onMouseLeave,onFocus:n.onFocus,onBlur:n.onBlur},r.createElement(s.aM.Provider,{value:h},n.children)))},d=t(9432),m=t(38329),u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},f=t(91851),p=function(n,e){return r.createElement(f.Z,(0,m.Z)({},n,{ref:e,icon:u}))};var g=r.forwardRef(p),h=t(15997),y=t(99468),$=t(88831),v=t(59412),b=function(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(n);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(n,i[a])&&(t[i[a]]=n[i[a]])}return t};const w=n=>n?r.createElement(h.Z,null):r.createElement(g,null),O={click:"onClick",hover:"onMouseOver"};var S=r.forwardRef(((n,e)=>{const{visibilityToggle:t=!0}=n,i="object"==typeof t&&void 0!==t.visible,[s,c]=(0,r.useState)((()=>!!i&&t.visible)),l=(0,r.useRef)(null);r.useEffect((()=>{i&&c(t.visible)}),[i,t]);const m=(0,v.Z)(l),u=()=>{const{disabled:e}=n;e||(s&&m(),c((n=>{var e;const i=!n;return"object"==typeof t&&(null===(e=t.onVisibleChange)||void 0===e||e.call(t,i)),i})))},{className:f,prefixCls:p,inputPrefixCls:g,size:h}=n,S=b(n,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:C}=r.useContext(o.E_),k=C("input",g),x=C("input-password",p),I=t&&(e=>{const{action:t="click",iconRender:i=w}=n,a=O[t]||"",o=i(s),c={[a]:u,className:`${e}-icon`,key:"passwordIcon",onMouseDown:n=>{n.preventDefault()},onMouseUp:n=>{n.preventDefault()}};return r.cloneElement(r.isValidElement(o)?o:r.createElement("span",null,o),c)})(x),E=a()(x,f,{[`${x}-${h}`]:!!h}),M=Object.assign(Object.assign({},(0,y.Z)(S,["suffix","iconRender","visibilityToggle"])),{type:s?"text":"password",className:E,prefixCls:k,suffix:I});return h&&(M.size=h),r.createElement(d.Z,Object.assign({ref:(0,$.sQ)(e,l)},M))})),C=t(46820),k=t(92343),x=t(3113),I=t(19716),E=t(33234),M=function(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(n);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(n,i[a])&&(t[i[a]]=n[i[a]])}return t};var z=r.forwardRef(((n,e)=>{const{prefixCls:t,inputPrefixCls:i,className:s,size:c,suffix:l,enterButton:m=!1,addonAfter:u,loading:f,disabled:p,onSearch:g,onChange:h,onCompositionStart:y,onCompositionEnd:v}=n,b=M(n,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:w,direction:O}=r.useContext(o.E_),S=r.useRef(!1),z=w("input-search",t),K=w("input",i),{compactSize:Z}=(0,E.ri)(z,O),D=(0,I.Z)((n=>{var e;return null!==(e=null!=c?c:Z)&&void 0!==e?e:n})),N=r.useRef(null),j=n=>{var e;document.activeElement===(null===(e=N.current)||void 0===e?void 0:e.input)&&n.preventDefault()},P=n=>{var e,t;g&&g(null===(t=null===(e=N.current)||void 0===e?void 0:e.input)||void 0===t?void 0:t.value,n,{source:"input"})},R="boolean"==typeof m?r.createElement(C.Z,null):null,L=`${z}-button`;let T;const H=m||{},X=H.type&&!0===H.type.__ANT_BUTTON;T=X||"button"===H.type?(0,k.Tm)(H,Object.assign({onMouseDown:j,onClick:n=>{var e,t;null===(t=null===(e=null==H?void 0:H.props)||void 0===e?void 0:e.onClick)||void 0===t||t.call(e,n),P(n)},key:"enterButton"},X?{className:L,size:D}:{})):r.createElement(x.ZP,{className:L,type:m?"primary":void 0,size:D,disabled:p,key:"enterButton",onMouseDown:j,onClick:P,loading:f,icon:R},m),u&&(T=[T,(0,k.Tm)(u,{key:"addonAfter"})]);const A=a()(z,{[`${z}-rtl`]:"rtl"===O,[`${z}-${D}`]:!!D,[`${z}-with-button`]:!!m},s);return r.createElement(d.Z,Object.assign({ref:(0,$.sQ)(N,e),onPressEnter:n=>{S.current||f||P(n)}},b,{size:D,onCompositionStart:n=>{S.current=!0,null==y||y(n)},onCompositionEnd:n=>{S.current=!1,null==v||v(n)},prefixCls:K,addonAfter:T,suffix:l,onChange:n=>{n&&n.target&&"click"===n.type&&g&&g(n.target.value,n,{source:"clear"}),h&&h(n)},className:A,disabled:p}))})),K=t(1643);const Z=d.Z;Z.Group=l,Z.Search=z,Z.TextArea=K.Z,Z.Password=S;var D=Z},8378:function(n,e){e.Z=n=>({[n.componentCls]:{[`${n.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${n.motionDurationMid} ${n.motionEaseInOut},\n opacity ${n.motionDurationMid} ${n.motionEaseInOut} !important`}},[`${n.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${n.motionDurationMid} ${n.motionEaseInOut},\n opacity ${n.motionDurationMid} ${n.motionEaseInOut} !important`}}})},92899:function(n,e,t){t.d(e,{Fm:function(){return u}});var i=t(3775),a=t(95406);const r=new i.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),o=new i.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),s=new i.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),c=new i.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),l=new i.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),d=new i.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),m={"move-up":{inKeyframes:new i.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new i.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:r,outKeyframes:o},"move-left":{inKeyframes:s,outKeyframes:c},"move-right":{inKeyframes:l,outKeyframes:d}},u=(n,e)=>{const{antCls:t}=n,i=`${t}-${e}`,{inKeyframes:r,outKeyframes:o}=m[e];return[(0,a.R)(i,r,o,n.motionDurationMid),{[`\n ${i}-enter,\n ${i}-appear\n `]:{opacity:0,animationTimingFunction:n.motionEaseOutCirc},[`${i}-leave`]:{animationTimingFunction:n.motionEaseInOutCirc}}]}},13826:function(n,e,t){t.d(e,{Qt:function(){return s},Uw:function(){return o},fJ:function(){return r},ly:function(){return c},oN:function(){return p}});var i=t(3775),a=t(95406);const r=new i.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),o=new i.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),s=new i.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),c=new i.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),l=new i.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),d=new i.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),m=new i.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),u=new i.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),f={"slide-up":{inKeyframes:r,outKeyframes:o},"slide-down":{inKeyframes:s,outKeyframes:c},"slide-left":{inKeyframes:l,outKeyframes:d},"slide-right":{inKeyframes:m,outKeyframes:u}},p=(n,e)=>{const{antCls:t}=n,i=`${t}-${e}`,{inKeyframes:r,outKeyframes:o}=f[e];return[(0,a.R)(i,r,o,n.motionDurationMid),{[`\n ${i}-enter,\n ${i}-appear\n `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:n.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${i}-leave`]:{animationTimingFunction:n.motionEaseInQuint}}]}},78673:function(n,e,t){t.d(e,{Z:function(){return Z}});var i=t(38521),a=t(73287),r=t.n(a),o=t(38329),s=t(65873),c=t(87296),l=t(35601),d=t(59301),m=t(84381),u=t(84821),f=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],p=d.forwardRef((function(n,e){var t,i=n.prefixCls,a=void 0===i?"rc-switch":i,p=n.className,g=n.checked,h=n.defaultChecked,y=n.disabled,$=n.loadingIcon,v=n.checkedChildren,b=n.unCheckedChildren,w=n.onClick,O=n.onChange,S=n.onKeyDown,C=(0,l.Z)(n,f),k=(0,m.Z)(!1,{value:g,defaultValue:h}),x=(0,c.Z)(k,2),I=x[0],E=x[1];function M(n,e){var t=I;return y||(E(t=n),null==O||O(t,e)),t}var z=r()(a,p,(t={},(0,s.Z)(t,"".concat(a,"-checked"),I),(0,s.Z)(t,"".concat(a,"-disabled"),y),t));return d.createElement("button",(0,o.Z)({},C,{type:"button",role:"switch","aria-checked":I,disabled:y,className:z,ref:e,onKeyDown:function(n){n.which===u.Z.LEFT?M(!1,n):n.which===u.Z.RIGHT&&M(!0,n),null==S||S(n)},onClick:function(n){var e=M(!I,n);null==w||w(e,n)}}),$,d.createElement("span",{className:"".concat(a,"-inner")},d.createElement("span",{className:"".concat(a,"-inner-checked")},v),d.createElement("span",{className:"".concat(a,"-inner-unchecked")},b)))}));p.displayName="Switch";var g=p,h=t(14088),y=t(36355),$=t(1684),v=t(19716),b=t(64993),w=t(17313),O=t(83116),S=t(37613);const C=n=>{const{componentCls:e,trackHeightSM:t,trackPadding:i,trackMinWidthSM:a,innerMinMarginSM:r,innerMaxMarginSM:o,handleSizeSM:s}=n,c=`${e}-inner`;return{[e]:{[`&${e}-small`]:{minWidth:a,height:t,lineHeight:`${t}px`,[`${e}-inner`]:{paddingInlineStart:o,paddingInlineEnd:r,[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${s+2*i}px - ${2*o}px)`,marginInlineEnd:`calc(100% - ${s+2*i}px + ${2*o}px)`},[`${c}-unchecked`]:{marginTop:-t,marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:s,height:s},[`${e}-loading-icon`]:{top:(s-n.switchLoadingIconSize)/2,fontSize:n.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:r,paddingInlineEnd:o,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${s+2*i}px + ${2*o}px)`,marginInlineEnd:`calc(-100% + ${s+2*i}px - ${2*o}px)`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${s+i}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:n.marginXXS/2,marginInlineEnd:-n.marginXXS/2}},[`&${e}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:-n.marginXXS/2,marginInlineEnd:n.marginXXS/2}}}}}}},k=n=>{const{componentCls:e,handleSize:t}=n;return{[e]:{[`${e}-loading-icon${n.iconCls}`]:{position:"relative",top:(t-n.fontSize)/2,color:n.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:n.switchColor}}}},x=n=>{const{componentCls:e,motion:t,trackPadding:i,handleBg:a,handleShadow:r,handleSize:o}=n,s=`${e}-handle`;return{[e]:{[s]:{position:"absolute",top:i,insetInlineStart:i,width:o,height:o,transition:`all ${n.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:a,borderRadius:o/2,boxShadow:r,transition:`all ${n.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${s}`]:{insetInlineStart:`calc(100% - ${o+i}px)`},[`&:not(${e}-disabled):active`]:t?{[`${s}::before`]:{insetInlineEnd:n.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:n.switchHandleActiveInset}}:{}}}},I=n=>{const{componentCls:e,trackHeight:t,trackPadding:i,innerMinMargin:a,innerMaxMargin:r,handleSize:o}=n,s=`${e}-inner`;return{[e]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:r,paddingInlineEnd:a,transition:`padding-inline-start ${n.switchDuration} ease-in-out, padding-inline-end ${n.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:n.colorTextLightSolid,fontSize:n.fontSizeSM,transition:`margin-inline-start ${n.switchDuration} ease-in-out, margin-inline-end ${n.switchDuration} ease-in-out`,pointerEvents:"none"},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${o+2*i}px - ${2*r}px)`,marginInlineEnd:`calc(100% - ${o+2*i}px + ${2*r}px)`},[`${s}-unchecked`]:{marginTop:-t,marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${s}`]:{paddingInlineStart:a,paddingInlineEnd:r,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${o+2*i}px + ${2*r}px)`,marginInlineEnd:`calc(-100% + ${o+2*i}px - ${2*r}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:2*i,marginInlineEnd:2*-i}},[`&${e}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:2*-i,marginInlineEnd:2*i}}}}}},E=n=>{const{componentCls:e,trackHeight:t,trackMinWidth:i}=n;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,w.Wf)(n)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i,height:t,lineHeight:`${t}px`,verticalAlign:"middle",background:n.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${n.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:n.colorTextTertiary}}),(0,w.Qy)(n)),{[`&${e}-checked`]:{background:n.switchColor,[`&:hover:not(${e}-disabled)`]:{background:n.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:n.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}};var M=(0,O.Z)("Switch",(n=>{const e=(0,S.TS)(n,{switchDuration:n.motionDurationMid,switchColor:n.colorPrimary,switchDisabledOpacity:n.opacityLoading,switchLoadingIconSize:.75*n.fontSizeIcon,switchLoadingIconColor:`rgba(0, 0, 0, ${n.opacityLoading})`,switchHandleActiveInset:"-30%"});return[E(e),I(e),x(e),k(e),C(e)]}),(n=>{const{fontSize:e,lineHeight:t,controlHeight:i,colorWhite:a}=n,r=e*t,o=i/2,s=r-4,c=o-4;return{trackHeight:r,trackHeightSM:o,trackMinWidth:2*s+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:a,handleSize:s,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new b.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}})),z=function(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(n);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(n,i[a])&&(t[i[a]]=n[i[a]])}return t};const K=d.forwardRef(((n,e)=>{const{prefixCls:t,size:a,disabled:o,loading:s,className:c,rootClassName:l,style:m}=n,u=z(n,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:f,direction:p,switch:b}=d.useContext(y.E_),w=d.useContext($.Z),O=(null!=o?o:w)||s,S=f("switch",t),C=d.createElement("div",{className:`${S}-handle`},s&&d.createElement(i.Z,{className:`${S}-loading-icon`})),[k,x]=M(S),I=(0,v.Z)(a),E=r()(null==b?void 0:b.className,{[`${S}-small`]:"small"===I,[`${S}-loading`]:s,[`${S}-rtl`]:"rtl"===p},c,l,x),K=Object.assign(Object.assign({},null==b?void 0:b.style),m);return k(d.createElement(h.Z,{component:"Switch"},d.createElement(g,Object.assign({},u,{prefixCls:S,className:E,style:K,disabled:O,ref:e,loadingIcon:C}))))}));K.__ANT_SWITCH=!0;var Z=K}}]); |