Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.220.226.147
(window.webpackJsonp=window.webpackJsonp||[]).push([[91],{302:function(e,t,n){},321:function(e,t,n){"use strict";var o=n(270),r=n.n(o),i=n(279),a=n.n(i),s=n(281),l=n.n(s),u=n(282),c=n.n(u),p=n(280),d=n.n(p),f=n(283),h=n.n(f),g=n(285),m=n.n(g),b=n(278),v=n.n(b),y=n(295),O=n.n(y),E=(n(277),n(268)),T=n.n(E),C=n(2),x=n.n(C),N=n(349),j=n(613),_=n(611),D=n(269),k=n(616),P=n(726);function w(e){var t=e.children,n=e.className,o=e.content,i=T()("content",n),a=Object(j.a)(w,e),s=Object(_.a)(w,e);return x.a.createElement(s,r()({},a,{className:i}),D.a.isNil(t)?o:t)}w.handledProps=["as","children","className","content"],w.propTypes={};var L=w;function R(e){var t=e.children,n=e.className,o=e.content,i=T()("header",n),a=Object(j.a)(R,e),s=Object(_.a)(R,e);return x.a.createElement(s,r()({},a,{className:i}),D.a.isNil(t)?o:t)}R.handledProps=["as","children","className","content"],R.propTypes={},R.create=Object(k.e)(R,function(e){return{content:e}});var S=R,I=n(290),M=n.n(I);function F(e){var t=e.children,n=e.className,o=e.content,i=T()("content",n),a=Object(j.a)(F,e),s=Object(_.a)(F,e);return x.a.createElement(s,r()({},a,{className:i}),D.a.isNil(t)?o:t)}F.handledProps=["as","children","className","content"],F.propTypes={},F.defaultProps={as:"li"},F.create=Object(k.e)(F,function(e){return{content:e}});var A=F;function H(e){var t=e.children,n=e.className,o=e.items,i=T()("list",n),a=Object(j.a)(H,e),s=Object(_.a)(H,e);return x.a.createElement(s,r()({},a,{className:i}),D.a.isNil(t)?M()(o,A.create):t)}H.handledProps=["as","children","className","items"],H.propTypes={},H.defaultProps={as:"ul"},H.create=Object(k.e)(H,function(e){return{items:e}});var U=H;n.d(t,"a",function(){return B});var B=function(e){function t(){var e,n;a()(this,t);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return n=c()(this,(e=d()(t)).call.apply(e,[this].concat(r))),v()(m()(m()(n)),"handleDismiss",function(e){var t=n.props.onDismiss;t&&t(e,n.props)}),n}return h()(t,e),l()(t,[{key:"render",value:function(){var e=this.props,n=e.attached,o=e.children,i=e.className,a=e.color,s=e.compact,l=e.content,u=e.error,c=e.floating,p=e.header,d=e.hidden,f=e.icon,h=e.info,g=e.list,m=e.negative,b=e.onDismiss,v=e.positive,y=e.size,E=e.success,C=e.visible,w=e.warning,R=T()("ui",a,y,Object(N.a)(s,"compact"),Object(N.a)(u,"error"),Object(N.a)(c,"floating"),Object(N.a)(d,"hidden"),Object(N.a)(f,"icon"),Object(N.a)(h,"info"),Object(N.a)(m,"negative"),Object(N.a)(v,"positive"),Object(N.a)(E,"success"),Object(N.a)(C,"visible"),Object(N.a)(w,"warning"),Object(N.b)(n,"attached"),"message",i),I=b&&x.a.createElement(P.a,{name:"close",onClick:this.handleDismiss}),M=Object(j.a)(t,this.props),F=Object(_.a)(t,this.props);return D.a.isNil(o)?x.a.createElement(F,r()({},M,{className:R}),I,P.a.create(f,{autoGenerateKey:!1}),(!O()(p)||!O()(l)||!O()(g))&&x.a.createElement(L,null,S.create(p,{autoGenerateKey:!1}),U.create(g,{autoGenerateKey:!1}),Object(k.c)(l,{autoGenerateKey:!1}))):x.a.createElement(F,r()({},M,{className:R}),I,o)}}]),t}(C.Component);v()(B,"Content",L),v()(B,"Header",S),v()(B,"List",U),v()(B,"Item",A),v()(B,"handledProps",["as","attached","children","className","color","compact","content","error","floating","header","hidden","icon","info","list","negative","onDismiss","positive","size","success","visible","warning"]),B.propTypes={}},469:function(e,t,n){"use strict";var o=n(8),r=n(35),i=n(50),a=n(2),s=n.n(a),l=n(4),u=n.n(l),c=n(268),p=n.n(c),d=n(106),f=n.n(d),h=!1,g=s.a.createContext(null),m="unmounted",b="exited",v="entering",y="entered",O=function(e){function t(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=b,o.appearStatus=v):r=y:r=t.unmountOnExit||t.mountOnEnter?m:b,o.state={status:r},o.nextCallback=null,o}Object(i.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===m?{status:b}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==v&&n!==y&&(t=v):n!==v&&n!==y||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!==typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===v){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:f.a.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===b&&this.setState({status:m})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[f.a.findDOMNode(this),o],i=r[0],a=r[1],s=this.getTimeouts(),l=o?s.appear:s.enter;!e&&!n||h?this.safeSetState({status:y},function(){t.props.onEntered(i)}):(this.props.onEnter(i,a),this.safeSetState({status:v},function(){t.props.onEntering(i,a),t.onTransitionEnd(l,function(){t.safeSetState({status:y},function(){t.props.onEntered(i,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:f.a.findDOMNode(this);t&&!h?(this.props.onExit(o),this.safeSetState({status:"exiting"},function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:b},function(){e.props.onExited(o)})})})):this.safeSetState({status:b},function(){e.props.onExited(o)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:f.a.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],a=r[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===m)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return s.a.createElement(g.Provider,{value:null},"function"===typeof n?n(e,o):s.a.cloneElement(s.a.Children.only(n),o))},t}(s.a.Component);function E(){}O.contextType=g,O.propTypes={},O.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:E,onEntering:E,onEntered:E,onExit:E,onExiting:E,onExited:E},O.UNMOUNTED=m,O.EXITED=b,O.ENTERING=v,O.ENTERED=y,O.EXITING="exiting";var T=O,C=n(108);function x(e,t){var n=Object.create(null);return e&&a.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&Object(a.isValidElement)(e)?t(e):e}(e)}),n}function N(e,t,n){return null!=n[t]?n[t]:e.props[t]}function j(e,t,n){var o=x(e.children),r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o,r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(r[l])for(o=0;o<r[l].length;o++){var u=r[l][o];s[r[l][o]]=n(u)}s[l]=n(l)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}(t,o);return Object.keys(r).forEach(function(i){var s=r[i];if(Object(a.isValidElement)(s)){var l=i in t,u=i in o,c=t[i],p=Object(a.isValidElement)(c)&&!c.props.in;!u||l&&!p?u||!l||p?u&&l&&Object(a.isValidElement)(c)&&(r[i]=Object(a.cloneElement)(s,{onExited:n.bind(null,s),in:c.props.in,exit:N(s,"exit",e),enter:N(s,"enter",e)})):r[i]=Object(a.cloneElement)(s,{in:!1}):r[i]=Object(a.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:N(s,"exit",e),enter:N(s,"enter",e)})}}),r}var _=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},D=function(e){function t(t,n){var o,r=(o=e.call(this,t,n)||this).handleExited.bind(Object(C.a)(o));return o.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},o}Object(i.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,o,r=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,o=i,x(n.children,function(e){return Object(a.cloneElement)(e,{onExited:o.bind(null,e),in:!0,appear:N(e,"appear",n),enter:N(e,"enter",n),exit:N(e,"exit",n)})})):j(e,r,i),firstRender:!1}},n.handleExited=function(e,t){var n=x(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=Object(o.a)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=Object(r.a)(e,["component","childFactory"]),i=this.state.contextValue,a=_(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?s.a.createElement(g.Provider,{value:i},a):s.a.createElement(g.Provider,{value:i},s.a.createElement(t,o,a))},t}(s.a.Component);D.propTypes={},D.defaultProps={component:"div",childFactory:function(e){return e}};var k=D;n.d(t,"a",function(){return K}),n.d(t,"b",function(){return se});var P={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},w={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},L={SHOW:0,CLEAR:1,DID_MOUNT:2,WILL_UNMOUNT:3,ON_CHANGE:4},R=function(){},S="Toastify";function I(e){return"number"===typeof e&&!isNaN(e)&&e>0}function M(e){return Object.keys(e).map(function(t){return e[t]})}var F=!("undefined"===typeof window||!window.document||!window.document.createElement);var A,H=((A=function(e,t,n){var o=e[t];return!1===o||I(o)?null:new Error(n+" expect "+t+" \n to be a valid Number > 0 or equal to false. "+o+" given.")}).isRequired=function(e,t,n){if("undefined"===typeof e[t])return new Error("The prop "+t+" is marked as required in \n "+n+", but its value is undefined.");A(e,t,n)},A),U={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e){return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(function(e){return clearTimeout(e)}),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];this.list.has(e)&&this.list.get(e).forEach(function(n){var r=setTimeout(function(){n.apply(void 0,o)},0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(r)})}};function B(e){var t=e.enter,n=e.exit,i=e.duration,a=void 0===i?750:i,l=e.appendPosition,u=void 0!==l&&l;return function(e){var i,l,c=e.children,p=e.position,d=e.preventExitTransition,f=Object(r.a)(e,["children","position","preventExitTransition"]),h=u?t+"--"+p:t,g=u?n+"--"+p:n;Array.isArray(a)&&2===a.length?(i=a[0],l=a[1]):i=l=a;return s.a.createElement(T,Object(o.a)({},f,{timeout:d?0:{enter:i,exit:l},onEnter:function(e){e.classList.add(h),e.style.animationFillMode="forwards",e.style.animationDuration=.001*i+"s"},onEntered:function(e){e.classList.remove(h),e.style.cssText=""},onExit:d?R:function(e){e.classList.add(g),e.style.animationFillMode="forwards",e.style.animationDuration=.001*l+"s"}}),c)}}function q(e){var t,n,r=e.delay,i=e.isRunning,a=e.closeToast,l=e.type,u=e.hide,c=e.className,d=e.style,f=e.controlledProgress,h=e.progress,g=e.rtl,m=Object(o.a)({},d,{animationDuration:r+"ms",animationPlayState:i?"running":"paused",opacity:u?0:1,transform:f?"scaleX("+h+")":null}),b=p()(S+"__progress-bar",f?S+"__progress-bar--controlled":S+"__progress-bar--animated",S+"__progress-bar--"+l,((t={})[S+"__progress-bar--rtl"]=g,t),c),v=((n={})[f&&h>=1?"onTransitionEnd":"onAnimationEnd"]=f&&h<1?null:a,n);return s.a.createElement("div",Object(o.a)({className:b,style:m},v))}function W(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}q.propTypes={delay:H.isRequired,isRunning:u.a.bool.isRequired,closeToast:u.a.func.isRequired,rtl:u.a.bool.isRequired,type:u.a.string,hide:u.a.bool,className:u.a.oneOfType([u.a.string,u.a.object]),progress:u.a.number,controlledProgress:u.a.bool},q.defaultProps={type:w.DEFAULT,hide:!1};var G=F&&/(msie|trident)/i.test(navigator.userAgent),X=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).state={isRunning:!0,preventExitTransition:!1},t.flag={canCloseOnClick:!0,canDrag:!1},t.drag={start:0,x:0,y:0,deltaX:0,removalDistance:0},t.boundingRect=null,t.ref=null,t.pauseToast=function(){t.props.autoClose&&t.setState({isRunning:!1})},t.playToast=function(){t.props.autoClose&&t.setState({isRunning:!0})},t.onDragStart=function(e){t.flag.canCloseOnClick=!0,t.flag.canDrag=!0,t.boundingRect=t.ref.getBoundingClientRect(),t.ref.style.transition="",t.drag.start=t.drag.x=W(e.nativeEvent),t.drag.removalDistance=t.ref.offsetWidth*(t.props.draggablePercent/100)},t.onDragMove=function(e){t.flag.canDrag&&(t.state.isRunning&&t.pauseToast(),t.drag.x=W(e),t.drag.deltaX=t.drag.x-t.drag.start,t.drag.y=function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}(e),t.drag.start!==t.drag.x&&(t.flag.canCloseOnClick=!1),t.ref.style.transform="translateX("+t.drag.deltaX+"px)",t.ref.style.opacity=1-Math.abs(t.drag.deltaX/t.drag.removalDistance))},t.onDragEnd=function(e){if(t.flag.canDrag){if(t.flag.canDrag=!1,Math.abs(t.drag.deltaX)>t.drag.removalDistance)return void t.setState({preventExitTransition:!0},t.props.closeToast);t.ref.style.transition="transform 0.2s, opacity 0.2s",t.ref.style.transform="translateX(0)",t.ref.style.opacity=1}},t.onDragTransitionEnd=function(){if(t.boundingRect){var e=t.boundingRect,n=e.top,o=e.bottom,r=e.left,i=e.right;t.props.pauseOnHover&&t.drag.x>=r&&t.drag.x<=i&&t.drag.y>=n&&t.drag.y<=o?t.pauseToast():t.playToast()}},t.onExitTransitionEnd=function(){if(G)t.props.onExited();else{var e=t.ref.scrollHeight,n=t.ref.style;requestAnimationFrame(function(){n.minHeight="initial",n.height=e+"px",n.transition="all 0.4s ",requestAnimationFrame(function(){n.height=0,n.padding=0,n.margin=0}),setTimeout(function(){return t.props.onExited()},400)})}},t}Object(i.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onOpen(this.props.children.props),this.props.draggable&&this.bindDragEvents(),this.props.pauseOnFocusLoss&&this.bindFocusEvents()},n.componentDidUpdate=function(e){e.draggable!==this.props.draggable&&(this.props.draggable?this.bindDragEvents():this.unbindDragEvents()),e.pauseOnFocusLoss!==this.props.pauseOnFocusLoss&&(this.props.pauseOnFocusLoss?this.bindFocusEvents():this.unbindFocusEvents())},n.componentWillUnmount=function(){this.props.onClose(this.props.children.props),this.props.draggable&&this.unbindDragEvents(),this.props.pauseOnFocusLoss&&this.unbindFocusEvents()},n.bindFocusEvents=function(){window.addEventListener("focus",this.playToast),window.addEventListener("blur",this.pauseToast)},n.unbindFocusEvents=function(){window.removeEventListener("focus",this.playToast),window.removeEventListener("blur",this.pauseToast)},n.bindDragEvents=function(){document.addEventListener("mousemove",this.onDragMove),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchmove",this.onDragMove),document.addEventListener("touchend",this.onDragEnd)},n.unbindDragEvents=function(){document.removeEventListener("mousemove",this.onDragMove),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchmove",this.onDragMove),document.removeEventListener("touchend",this.onDragEnd)},n.render=function(){var e,t=this,n=this.props,r=n.closeButton,i=n.children,a=n.autoClose,l=n.pauseOnHover,u=n.onClick,c=n.closeOnClick,d=n.type,f=n.hideProgressBar,h=n.closeToast,g=n.transition,m=n.position,b=n.className,v=n.bodyClassName,y=n.progressClassName,O=n.progressStyle,E=n.updateId,T=n.role,C=n.progress,x=n.rtl,N={className:p()(S+"__toast",S+"__toast--"+d,(e={},e[S+"__toast--rtl"]=x,e),b)};a&&l&&(N.onMouseEnter=this.pauseToast,N.onMouseLeave=this.playToast),c&&(N.onClick=function(e){u&&u(e),t.flag.canCloseOnClick&&h()});var j=parseFloat(C)===C;return s.a.createElement(g,{in:this.props.in,appear:!0,onExited:this.onExitTransitionEnd,position:m,preventExitTransition:this.state.preventExitTransition},s.a.createElement("div",Object(o.a)({onClick:u},N,{ref:function(e){return t.ref=e},onMouseDown:this.onDragStart,onTouchStart:this.onDragStart,onMouseUp:this.onDragTransitionEnd,onTouchEnd:this.onDragTransitionEnd}),s.a.createElement("div",Object(o.a)({},this.props.in&&{role:T},{className:p()(S+"__toast-body",v)}),i),r&&r,(a||j)&&s.a.createElement(q,Object(o.a)({},E&&!j?{key:"pb-"+E}:{},{rtl:x,delay:a,isRunning:this.state.isRunning,closeToast:h,hide:f,type:d,style:O,className:y,controlledProgress:j,progress:C}))))},t}(a.Component);function V(e){var t=e.closeToast,n=e.type,o=e.ariaLabel;return s.a.createElement("button",{className:S+"__close-button "+S+"__close-button--"+n,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":o},"\u2716\ufe0e")}X.propTypes={closeButton:u.a.oneOfType([u.a.node,u.a.bool]).isRequired,autoClose:H.isRequired,children:u.a.node.isRequired,closeToast:u.a.func.isRequired,position:u.a.oneOf(M(P)).isRequired,pauseOnHover:u.a.bool.isRequired,pauseOnFocusLoss:u.a.bool.isRequired,closeOnClick:u.a.bool.isRequired,transition:u.a.func.isRequired,rtl:u.a.bool.isRequired,hideProgressBar:u.a.bool.isRequired,draggable:u.a.bool.isRequired,draggablePercent:u.a.number.isRequired,in:u.a.bool,onExited:u.a.func,onOpen:u.a.func,onClose:u.a.func,type:u.a.oneOf(M(w)),className:u.a.oneOfType([u.a.string,u.a.object]),bodyClassName:u.a.oneOfType([u.a.string,u.a.object]),progressClassName:u.a.oneOfType([u.a.string,u.a.object]),progressStyle:u.a.object,progress:u.a.number,updateId:u.a.oneOfType([u.a.string,u.a.number]),ariaLabel:u.a.string,containerId:u.a.oneOfType([u.a.string,u.a.number]),role:u.a.string},X.defaultProps={type:w.DEFAULT,in:!0,onOpen:R,onClose:R,className:null,bodyClassName:null,progressClassName:null,updateId:null},V.propTypes={closeToast:u.a.func,arialLabel:u.a.string},V.defaultProps={ariaLabel:"close"};var z=B({enter:S+"__bounce-enter",exit:S+"__bounce-exit",appendPosition:!0}),K=(B({enter:S+"__slide-enter",exit:S+"__slide-exit",duration:[450,750],appendPosition:!0}),B({enter:S+"__zoom-enter",exit:S+"__zoom-exit"}),B({enter:S+"__flip-enter",exit:S+"__flip-exit"}),function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).state={toast:[]},t.toastKey=1,t.collection={},t.isToastActive=function(e){return-1!==t.state.toast.indexOf(e)},t}Object(i.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;U.cancelEmit(L.WILL_UNMOUNT).on(L.SHOW,function(t,n){return e.ref?e.buildToast(t,n):null}).on(L.CLEAR,function(t){return e.ref?null==t?e.clear():e.removeToast(t):null}).emit(L.DID_MOUNT,this)},n.componentWillUnmount=function(){U.emit(L.WILL_UNMOUNT,this)},n.removeToast=function(e){this.setState({toast:this.state.toast.filter(function(t){return t!==e})},this.dispatchChange)},n.dispatchChange=function(){U.emit(L.ON_CHANGE,this.state.toast.length,this.props.containerId)},n.makeCloseButton=function(e,t,n){var o=this,r=this.props.closeButton;return Object(a.isValidElement)(e)||!1===e?r=e:!0===e&&(r=this.props.closeButton&&"boolean"!==typeof this.props.closeButton?this.props.closeButton:s.a.createElement(V,null)),!1!==r&&Object(a.cloneElement)(r,{closeToast:function(){return o.removeToast(t)},type:n})},n.getAutoCloseDelay=function(e){return!1===e||I(e)?e:this.props.autoClose},n.canBeRendered=function(e){return Object(a.isValidElement)(e)||"string"===typeof e||"number"===typeof e||"function"===typeof e},n.parseClassName=function(e){return"string"===typeof e?e:null!==e&&"object"===typeof e&&"toString"in e?e.toString():null},n.belongToContainer=function(e){return e.containerId===this.props.containerId},n.buildToast=function(e,t){var n=this,o=t.delay,i=Object(r.a)(t,["delay"]);if(!this.canBeRendered(e))throw new Error("The element you provided cannot be rendered. You provided an element of type "+typeof e);var s=i.toastId,l=i.updateId;if(!(this.props.enableMultiContainer&&!this.belongToContainer(i)||this.isToastActive(s)&&null==l)){var u=function(){return n.removeToast(s)},c={id:s,key:i.key||this.toastKey++,type:i.type,closeToast:u,updateId:i.updateId,rtl:this.props.rtl,position:i.position||this.props.position,transition:i.transition||this.props.transition,className:this.parseClassName(i.className||this.props.toastClassName),bodyClassName:this.parseClassName(i.bodyClassName||this.props.bodyClassName),onClick:i.onClick||this.props.onClick,closeButton:this.makeCloseButton(i.closeButton,s,i.type),pauseOnHover:"boolean"===typeof i.pauseOnHover?i.pauseOnHover:this.props.pauseOnHover,pauseOnFocusLoss:"boolean"===typeof i.pauseOnFocusLoss?i.pauseOnFocusLoss:this.props.pauseOnFocusLoss,draggable:"boolean"===typeof i.draggable?i.draggable:this.props.draggable,draggablePercent:"number"!==typeof i.draggablePercent||isNaN(i.draggablePercent)?this.props.draggablePercent:i.draggablePercent,closeOnClick:"boolean"===typeof i.closeOnClick?i.closeOnClick:this.props.closeOnClick,progressClassName:this.parseClassName(i.progressClassName||this.props.progressClassName),progressStyle:this.props.progressStyle,autoClose:this.getAutoCloseDelay(i.autoClose),hideProgressBar:"boolean"===typeof i.hideProgressBar?i.hideProgressBar:this.props.hideProgressBar,progress:parseFloat(i.progress),role:"string"===typeof i.role?i.role:this.props.role};"function"===typeof i.onOpen&&(c.onOpen=i.onOpen),"function"===typeof i.onClose&&(c.onClose=i.onClose),Object(a.isValidElement)(e)&&"string"!==typeof e.type&&"number"!==typeof e.type?e=Object(a.cloneElement)(e,{closeToast:u}):"function"===typeof e&&(e=e({closeToast:u})),I(o)?setTimeout(function(){n.appendToast(c,e,i.staleToastId)},o):this.appendToast(c,e,i.staleToastId)}},n.appendToast=function(e,t,n){var r,i=e.id,a=e.updateId;this.collection=Object(o.a)({},this.collection,((r={})[i]={options:e,content:t,position:e.position},r)),this.setState({toast:(a?[].concat(this.state.toast):[].concat(this.state.toast,[i])).filter(function(e){return e!==n})},this.dispatchChange)},n.clear=function(){this.setState({toast:[]})},n.renderToast=function(){var e=this,t={},n=this.props,r=n.className,i=n.style;return(n.newestOnTop?Object.keys(this.collection).reverse():Object.keys(this.collection)).forEach(function(n){var r=e.collection[n],i=r.position,a=r.options,l=r.content;t[i]||(t[i]=[]),-1!==e.state.toast.indexOf(a.id)?t[i].push(s.a.createElement(X,Object(o.a)({},a,{isDocumentHidden:e.state.isDocumentHidden,key:"toast-"+a.key}),l)):(t[i].push(null),delete e.collection[n])}),Object.keys(t).map(function(n){var a,l=1===t[n].length&&null===t[n][0],u={className:p()(S+"__toast-container",S+"__toast-container--"+n,(a={},a[S+"__toast-container--rtl"]=e.props.rtl,a),e.parseClassName(r)),style:l?Object(o.a)({},i,{pointerEvents:"none"}):Object(o.a)({},i)};return s.a.createElement(k,Object(o.a)({},u,{key:"container-"+n}),t[n])})},n.render=function(){var e=this;return s.a.createElement("div",{ref:function(t){return e.ref=t},className:""+S},this.renderToast())},t}(a.Component));K.propTypes={position:u.a.oneOf(M(P)),autoClose:H,closeButton:u.a.oneOfType([u.a.node,u.a.bool]),hideProgressBar:u.a.bool,pauseOnHover:u.a.bool,closeOnClick:u.a.bool,newestOnTop:u.a.bool,className:u.a.oneOfType([u.a.string,u.a.object]),style:u.a.object,toastClassName:u.a.oneOfType([u.a.string,u.a.object]),bodyClassName:u.a.oneOfType([u.a.string,u.a.object]),progressClassName:u.a.oneOfType([u.a.string,u.a.object]),progressStyle:u.a.object,transition:u.a.func,rtl:u.a.bool,draggable:u.a.bool,draggablePercent:u.a.number,pauseOnFocusLoss:u.a.bool,enableMultiContainer:u.a.bool,containerId:u.a.oneOfType([u.a.string,u.a.number]),role:u.a.string,onClick:u.a.func},K.defaultProps={position:P.TOP_RIGHT,transition:z,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:s.a.createElement(V,null),pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,className:null,style:null,toastClassName:null,bodyClassName:null,progressClassName:null,progressStyle:null,role:"alert"};var Q=new Map,Y=null,J=null,Z={},$=[],ee=!1;function te(){return Q.size>0}function ne(e,t){var n=function(e){return te()?e?Q.get(e):Q.get(Y):null}(t.containerId);if(!n)return null;var o=n.collection[e];return"undefined"===typeof o?null:o}function oe(e,t){return Object(o.a)({},e,{type:t,toastId:ie(e)})}function re(){return(Math.random().toString(36)+Date.now().toString(36)).substr(2,10)}function ie(e){return e&&("string"===typeof e.toastId||"number"===typeof e.toastId&&!isNaN(e.toastId))?e.toastId:re()}function ae(e,t){return te()?U.emit(L.SHOW,e,t):($.push({action:L.SHOW,content:e,options:t}),ee&&F&&(ee=!1,J=document.createElement("div"),document.body.appendChild(J),Object(d.render)(s.a.createElement(K,Z),J))),t.toastId}var se=function(e,t){return ae(e,oe(t,t&&t.type||w.DEFAULT))},le=function(e){w[e]!==w.DEFAULT&&(se[w[e].toLowerCase()]=function(t,n){return ae(t,oe(n,n&&n.type||w[e]))})};for(var ue in w)le(ue);se.warn=se.warning,se.dismiss=function(e){return void 0===e&&(e=null),te()&&U.emit(L.CLEAR,e)},se.isActive=function(e){var t=!1;return Q.size>0&&Q.forEach(function(n){n.isToastActive(e)&&(t=!0)}),t},se.update=function(e,t){void 0===t&&(t={}),setTimeout(function(){var n=ne(e,t);if(n){var r=n.options,i=n.content,a=Object(o.a)({},r,{},t,{toastId:t.toastId||e});t.toastId&&t.toastId!==e?a.staleToastId=e:a.updateId=re();var s="undefined"!==typeof a.render?a.render:i;delete a.render,ae(s,a)}},0)},se.done=function(e){se.update(e,{progress:1})},se.onChange=function(e){"function"===typeof e&&U.on(L.ON_CHANGE,e)},se.configure=function(e){ee=!0,Z=e},se.POSITION=P,se.TYPE=w,U.on(L.DID_MOUNT,function(e){Y=e.props.containerId||e,Q.set(Y,e),$.forEach(function(e){U.emit(e.action,e.content,e.options)}),$=[]}).on(L.WILL_UNMOUNT,function(e){e?Q.delete(e.props.containerId||e):Q.clear(),0===Q.size&&U.off(L.SHOW).off(L.CLEAR),F&&J&&document.body.removeChild(J)})},956:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Detector=t.Offline=t.Online=void 0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(2),a=n(4),s=(o=a)&&o.__esModule?o:{default:o};function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p="undefined"!==typeof navigator,d=function(e){var t=e.url,n=e.timeout;return new Promise(function(e){var o=function(){return e(!1)},r=new XMLHttpRequest;r.onerror=o,r.ontimeout=o,r.onreadystatechange=function(){r.readyState===r.HEADERS_RECEIVED&&(r.status?e(!0):o())},r.open("GET",t),r.timeout=n,r.send()})},f={children:s.default.node,onChange:s.default.func,polling:s.default.oneOfType([s.default.shape({url:s.default.string,interval:s.default.number,timeout:s.default.number}),s.default.bool]),wrapperType:s.default.string},h={polling:!0,wrapperType:"span"},g={enabled:p&&/Windows.*Chrome|Windows.*Firefox|Linux.*Chrome/.test(navigator.userAgent),url:"https://httpbin.org/get",timeout:5e3,interval:5e3},m=function(e){function t(){l(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={online:!p||"boolean"!==typeof navigator.onLine||navigator.onLine},e.goOnline=e.goOnline.bind(e),e.goOffline=e.goOffline.bind(e),e}return c(t,i.Component),r(t,[{key:"componentDidMount",value:function(){window.addEventListener("online",this.goOnline),window.addEventListener("offline",this.goOffline),this.getPollingConfig().enabled&&this.startPolling()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("online",this.goOnline),window.removeEventListener("offline",this.goOffline),this.pollingId&&this.stopPolling()}},{key:"renderChildren",value:function(){var e=this.props,t=e.children,n=e.wrapperType;return(0,i.isValidElement)(t)?t:t?i.createElement.apply(void 0,[n,{}].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(i.Children.toArray(t)))):null}},{key:"getPollingConfig",value:function(){switch(this.props.polling){case!0:return g;case!1:return{enabled:!1};default:return Object.assign({},g,this.props.polling)}}},{key:"goOnline",value:function(){this.state.online||(this.callOnChangeHandler(!0),this.setState({online:!0}))}},{key:"goOffline",value:function(){this.state.online&&(this.callOnChangeHandler(!1),this.setState({online:!1}))}},{key:"callOnChangeHandler",value:function(e){this.props.onChange&&this.props.onChange(e)}},{key:"startPolling",value:function(){var e=this,t=this.getPollingConfig().interval;this.pollingId=setInterval(function(){var t=e.getPollingConfig(),n=t.url,o=t.timeout;d({url:n,timeout:o}).then(function(t){t?e.goOnline():e.goOffline()})},t)}},{key:"stopPolling",value:function(){clearInterval(this.pollingId)}}]),t}();m.propTypes=f,m.defaultProps=h;var b=t.Online=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,m),r(t,[{key:"render",value:function(){return this.state.online?this.renderChildren():null}}]),t}();b.propTypes=f,b.defaultProps=h;var v=t.Offline=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,m),r(t,[{key:"render",value:function(){return this.state.online?null:this.renderChildren()}}]),t}();v.propTypes=f,v.defaultProps=h;var y=t.Detector=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,m),r(t,[{key:"render",value:function(){return this.props.render({online:this.state.online})}}]),t}();y.propTypes=Object.assign({},f,{render:s.default.func.isRequired}),y.defaultProps=h}}]);
//# sourceMappingURL=91.42349384.chunk.js.map
|