(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9485],{9054:function(e,n,t){"use strict";t.d(n,{Z:function(){return N}});var i=t(54772),o=t(30373),r=t(65414),c=t.n(r),a=t(79353),l=t(92684),s=t(96580),d=t(74294),u=t(41988),h=t(36611),f=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],p=i.forwardRef(function(e,n){var t,o=e.prefixCls,r=void 0===o?"rc-switch":o,p=e.className,v=e.checked,g=e.defaultChecked,m=e.disabled,y=e.loadingIcon,b=e.checkedChildren,w=e.unCheckedChildren,k=e.onClick,I=e.onChange,S=e.onKeyDown,L=(0,d.Z)(e,f),E=(0,u.Z)(!1,{value:v,defaultValue:g}),C=(0,s.Z)(E,2),x=C[0],_=C[1];function O(e,n){var t=x;return m||(_(t=e),null==I||I(t,n)),t}var j=c()(r,p,(t={},(0,l.Z)(t,"".concat(r,"-checked"),x),(0,l.Z)(t,"".concat(r,"-disabled"),m),t));return i.createElement("button",(0,a.Z)({},L,{type:"button",role:"switch","aria-checked":x,disabled:m,className:j,ref:n,onKeyDown:function(e){e.which===h.Z.LEFT?O(!1,e):e.which===h.Z.RIGHT&&O(!0,e),null==S||S(e)},onClick:function(e){var n=O(!x,e);null==k||k(n,e)}}),y,i.createElement("span",{className:"".concat(r,"-inner")},i.createElement("span",{className:"".concat(r,"-inner-checked")},b),i.createElement("span",{className:"".concat(r,"-inner-unchecked")},w)))});p.displayName="Switch";var v=t(43729),g=t(68216),m=t(2117),y=t(4783),b=t(43501),w=t(26732),k=t(15510),I=t(74593),S=t(54621);let L=e=>{let{componentCls:n,trackHeightSM:t,trackPadding:i,trackMinWidthSM:o,innerMinMarginSM:r,innerMaxMarginSM:c,handleSizeSM:a,calc:l}=e,s="".concat(n,"-inner"),d=(0,b.bf)(l(a).add(l(i).mul(2)).equal()),u=(0,b.bf)(l(c).mul(2).equal());return{[n]:{["&".concat(n,"-small")]:{minWidth:o,height:t,lineHeight:(0,b.bf)(t),["".concat(n,"-inner")]:{paddingInlineStart:c,paddingInlineEnd:r,["".concat(s,"-checked, ").concat(s,"-unchecked")]:{minHeight:t},["".concat(s,"-checked")]:{marginInlineStart:"calc(-100% + ".concat(d," - ").concat(u,")"),marginInlineEnd:"calc(100% - ".concat(d," + ").concat(u,")")},["".concat(s,"-unchecked")]:{marginTop:l(t).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},["".concat(n,"-handle")]:{width:a,height:a},["".concat(n,"-loading-icon")]:{top:l(l(a).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},["&".concat(n,"-checked")]:{["".concat(n,"-inner")]:{paddingInlineStart:r,paddingInlineEnd:c,["".concat(s,"-checked")]:{marginInlineStart:0,marginInlineEnd:0},["".concat(s,"-unchecked")]:{marginInlineStart:"calc(100% - ".concat(d," + ").concat(u,")"),marginInlineEnd:"calc(-100% + ".concat(d," - ").concat(u,")")}},["".concat(n,"-handle")]:{insetInlineStart:"calc(100% - ".concat((0,b.bf)(l(a).add(i).equal()),")")}},["&:not(".concat(n,"-disabled):active")]:{["&:not(".concat(n,"-checked) ").concat(s)]:{["".concat(s,"-unchecked")]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},["&".concat(n,"-checked ").concat(s)]:{["".concat(s,"-checked")]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}},E=e=>{let{componentCls:n,handleSize:t,calc:i}=e;return{[n]:{["".concat(n,"-loading-icon").concat(e.iconCls)]:{position:"relative",top:i(i(t).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},["&".concat(n,"-checked ").concat(n,"-loading-icon")]:{color:e.switchColor}}}},C=e=>{let{componentCls:n,trackPadding:t,handleBg:i,handleShadow:o,handleSize:r,calc:c}=e,a="".concat(n,"-handle");return{[n]:{[a]:{position:"absolute",top:t,insetInlineStart:t,width:r,height:r,transition:"all ".concat(e.switchDuration," ease-in-out"),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i,borderRadius:c(r).div(2).equal(),boxShadow:o,transition:"all ".concat(e.switchDuration," ease-in-out"),content:'""'}},["&".concat(n,"-checked ").concat(a)]:{insetInlineStart:"calc(100% - ".concat((0,b.bf)(c(r).add(t).equal()),")")},["&:not(".concat(n,"-disabled):active")]:{["".concat(a,"::before")]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},["&".concat(n,"-checked ").concat(a,"::before")]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},x=e=>{let{componentCls:n,trackHeight:t,trackPadding:i,innerMinMargin:o,innerMaxMargin:r,handleSize:c,calc:a}=e,l="".concat(n,"-inner"),s=(0,b.bf)(a(c).add(a(i).mul(2)).equal()),d=(0,b.bf)(a(r).mul(2).equal());return{[n]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:r,paddingInlineEnd:o,transition:"padding-inline-start ".concat(e.switchDuration," ease-in-out, padding-inline-end ").concat(e.switchDuration," ease-in-out"),["".concat(l,"-checked, ").concat(l,"-unchecked")]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:"margin-inline-start ".concat(e.switchDuration," ease-in-out, margin-inline-end ").concat(e.switchDuration," ease-in-out"),pointerEvents:"none",minHeight:t},["".concat(l,"-checked")]:{marginInlineStart:"calc(-100% + ".concat(s," - ").concat(d,")"),marginInlineEnd:"calc(100% - ".concat(s," + ").concat(d,")")},["".concat(l,"-unchecked")]:{marginTop:a(t).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},["&".concat(n,"-checked ").concat(l)]:{paddingInlineStart:o,paddingInlineEnd:r,["".concat(l,"-checked")]:{marginInlineStart:0,marginInlineEnd:0},["".concat(l,"-unchecked")]:{marginInlineStart:"calc(100% - ".concat(s," + ").concat(d,")"),marginInlineEnd:"calc(-100% + ".concat(s," - ").concat(d,")")}},["&:not(".concat(n,"-disabled):active")]:{["&:not(".concat(n,"-checked) ").concat(l)]:{["".concat(l,"-unchecked")]:{marginInlineStart:a(i).mul(2).equal(),marginInlineEnd:a(i).mul(-1).mul(2).equal()}},["&".concat(n,"-checked ").concat(l)]:{["".concat(l,"-checked")]:{marginInlineStart:a(i).mul(-1).mul(2).equal(),marginInlineEnd:a(i).mul(2).equal()}}}}}},_=e=>{let{componentCls:n,trackHeight:t,trackMinWidth:i}=e;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,k.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i,height:t,lineHeight:(0,b.bf)(t),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),userSelect:"none",["&:hover:not(".concat(n,"-disabled)")]:{background:e.colorTextTertiary}}),(0,k.Qy)(e)),{["&".concat(n,"-checked")]:{background:e.switchColor,["&:hover:not(".concat(n,"-disabled)")]:{background:e.colorPrimaryHover}},["&".concat(n,"-loading, &").concat(n,"-disabled")]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},["&".concat(n,"-rtl")]:{direction:"rtl"}})}};var O=(0,I.I$)("Switch",e=>{let n=(0,S.IX)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:"rgba(0, 0, 0, ".concat(e.opacityLoading,")"),switchHandleActiveInset:"-30%"});return[_(n),x(n),C(n),E(n),L(n)]},e=>{let{fontSize:n,lineHeight:t,controlHeight:i,colorWhite:o}=e,r=n*t,c=i/2,a=r-4,l=c-4;return{trackHeight:r,trackHeightSM:c,trackMinWidth:2*a+8,trackMinWidthSM:2*l+4,trackPadding:2,handleBg:o,handleSize:a,handleSizeSM:l,handleShadow:"0 2px 4px 0 ".concat(new w.C("#00230b").setAlpha(.2).toRgbString()),innerMinMargin:a/2,innerMaxMargin:a+2+4,innerMinMarginSM:l/2,innerMaxMarginSM:l+2+4}}),j=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>n.indexOf(i)&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);on.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(t[i[o]]=e[i[o]]);return t};let M=i.forwardRef((e,n)=>{let{prefixCls:t,size:r,disabled:a,loading:l,className:s,rootClassName:d,style:h,checked:f,value:b,defaultChecked:w,defaultValue:k,onChange:I}=e,S=j(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[L,E]=(0,u.Z)(!1,{value:null!=f?f:b,defaultValue:null!=w?w:k}),{getPrefixCls:C,direction:x,switch:_}=i.useContext(g.E_),M=i.useContext(m.Z),N=(null!=a?a:M)||l,q=C("switch",t),T=i.createElement("div",{className:"".concat(q,"-handle")},l&&i.createElement(o.Z,{className:"".concat(q,"-loading-icon")})),[R,D,P]=O(q),Z=(0,y.Z)(r),A=c()(null==_?void 0:_.className,{["".concat(q,"-small")]:"small"===Z,["".concat(q,"-loading")]:l,["".concat(q,"-rtl")]:"rtl"===x},s,d,D,P),H=Object.assign(Object.assign({},null==_?void 0:_.style),h);return R(i.createElement(v.Z,{component:"Switch"},i.createElement(p,Object.assign({},S,{checked:L,onChange:function(){E(arguments.length<=0?void 0:arguments[0]),null==I||I.apply(void 0,arguments)},prefixCls:q,className:A,style:H,disabled:N,ref:n,loadingIcon:T}))))});M.__ANT_SWITCH=!0;var N=M},79454:function(e){!function(){"use strict";var n={864:function(e){var n,t="object"==typeof Reflect?Reflect:null,i=t&&"function"==typeof t.apply?t.apply:function(e,n,t){return Function.prototype.apply.call(e,n,t)};n=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(e,n){return new Promise(function(t,i){var o;function r(t){e.removeListener(n,c),i(t)}function c(){"function"==typeof e.removeListener&&e.removeListener("error",r),t([].slice.call(arguments))}v(e,n,c,{once:!0}),"error"!==n&&(o={once:!0},"function"==typeof e.on&&v(e,"error",r,o))})},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var c=10;function a(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function s(e,n,t,i){if(a(t),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",n,t.listener?t.listener:t),r=e._events),c=r[n]),void 0===c)c=r[n]=t,++e._eventsCount;else if("function"==typeof c?c=r[n]=i?[t,c]:[c,t]:i?c.unshift(t):c.push(t),(o=l(e))>0&&c.length>o&&!c.warned){c.warned=!0;var o,r,c,s=Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=n,s.count=c.length,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,n,t){var i={fired:!1,wrapFn:void 0,target:e,type:n,listener:t},o=d.bind(i);return o.listener=t,i.wrapFn=o,o}function h(e,n,t){var i=e._events;if(void 0===i)return[];var o=i[n];return void 0===o?[]:"function"==typeof o?t?[o.listener||o]:[o]:t?function(e){for(var n=Array(e.length),t=0;t0&&(c=n[0]),c instanceof Error)throw c;var c,a=Error("Unhandled error."+(c?" ("+c.message+")":""));throw a.context=c,a}var l=r[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,n);else for(var s=l.length,d=p(l,s),t=0;t=0;r--)if(t[r]===n||t[r].listener===n){c=t[r].listener,o=r;break}if(o<0)return this;0===o?t.shift():function(e,n){for(;n+1=0;i--)this.removeListener(e,n[i]);return this},r.prototype.listeners=function(e){return h(this,e,!0)},r.prototype.rawListeners=function(e){return h(this,e,!1)},r.listenerCount=function(e,n){return"function"==typeof e.listenerCount?e.listenerCount(n):f.call(e,n)},r.prototype.listenerCount=f,r.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}},t={};function i(e){var o=t[e];if(void 0!==o)return o.exports;var r=t[e]={exports:{}},c=!0;try{n[e](r,r.exports,i),c=!1}finally{c&&delete t[e]}return r.exports}i.ab="//";var o=i(864);e.exports=o}()}}]);