text: "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n=require("react"),t=e(n),r=require("react-dom"),o=e(require("clsx")),a=e(require("@material-ui/core/Slide")),i=require("@material-ui/styles"),s=require("@material-ui/core/styles"),c=e(require("@material-ui/core/Collapse")),u=e(require("@material-ui/core/SvgIcon")),l=e(require("@material-ui/core/ClickAwayListener")),d=e(require("hoist-non-react-statics"));function f(){return(f=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function p(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n.indexOf(t=a[r])>=0||(o[t]=e[t]);return o}var m=t.createContext(),h={root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},g={containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}},k={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:a,transitionDuration:{enter:225,exit:195}},v=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},x=function(e){return Object.keys(e).filter((function(e){return!g[e]})).reduce((function(n,t){var r;return f({},n,((r={})[t]=e[t],r))}),{})},E={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},b=function(e){return"containerAnchorOrigin"+e},y=function(e){var n=e.horizontal;return"anchorOrigin"+v(e.vertical)+v(n)},C=function(e){return"variant"+v(e)},S=function(e){return!!e||0===e},O=function(e){return"number"==typeof e||null===e};function w(e,n,t){return void 0===e&&(e={}),void 0===n&&(n={}),void 0===t&&(t={}),f({},t,{},n,{},e)}var L=function(e){var n;return i.createStyles({root:(n={display:"flex",flexWrap:"wrap",flexGrow:1},n[e.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},n)})},T=n.forwardRef((function(e,n){var r=e.classes,a=e.className,i=p(e,["classes","className"]);return t.createElement("div",Object.assign({ref:n,className:o(r.root,a)},i))})),D=i.withStyles(L,{defaultTheme:s.createTheme()})(T),A={right:"left",left:"right",bottom:"up",top:"down"},q=function(e){return"center"!==e.horizontal?A[e.horizontal]:A[e.vertical]},I=function(e){return t.createElement(u,Object.assign({},e),t.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n        10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},M=function(e){return t.createElement(u,Object.assign({},e),t.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},H=function(e){return t.createElement(u,Object.assign({},e),t.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n        6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n        13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},R=function(e){return t.createElement(u,Object.assign({},e),t.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n        0 22,12A10,10 0 0,0 12,2Z"}))},N={fontSize:20,marginInlineEnd:8},j={default:void 0,success:t.createElement(I,{style:N}),warning:t.createElement(M,{style:N}),error:t.createElement(H,{style:N}),info:t.createElement(R,{style:N})};function V(e,n){return e.reduce((function(e,t){return null==t?e:function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var i=[].concat(o);n&&-1===i.indexOf(n)&&i.push(n),e.apply(this,i),t.apply(this,i)}}),(function(){}))}var P="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function z(e){var t=n.useRef(e);return P((function(){t.current=e})),n.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}var W=n.forwardRef((function(e,t){var r=e.children,o=e.autoHideDuration,a=e.ClickAwayListenerProps,i=e.disableWindowBlurListener,s=void 0!==i&&i,c=e.onClose,u=e.onMouseEnter,d=e.onMouseLeave,m=e.open,h=e.resumeHideDuration,g=p(e,["children","autoHideDuration","ClickAwayListenerProps","disableWindowBlurListener","onClose","onMouseEnter","onMouseLeave","open","resumeHideDuration"]),k=n.useRef(),v=z((function(){c&&c.apply(void 0,arguments)})),x=z((function(e){c&&null!=e&&(clearTimeout(k.current),k.current=setTimeout((function(){v(null,E.TIMEOUT)}),e))}));n.useEffect((function(){return m&&x(o),function(){clearTimeout(k.current)}}),[m,o,x]);var b=function(){clearTimeout(k.current)},y=n.useCallback((function(){null!=o&&x(null!=h?h:.5*o)}),[o,h,x]);return n.useEffect((function(){if(!s&&m)return window.addEventListener("focus",y),window.addEventListener("blur",b),function(){window.removeEventListener("focus",y),window.removeEventListener("blur",b)}}),[s,y,m]),n.createElement(l,f({onClickAway:function(e){c&&c(e,E.CLICKAWAY)}},a),n.createElement("div",f({onMouseEnter:function(e){u&&u(e),b()},onMouseLeave:function(e){d&&d(e),y()},ref:t},g),r))})),B=function(e){var n=s.emphasize(e.palette.background.default,"light"===(e.palette.mode||e.palette.type)?.8:.98);return i.createStyles(f({},h,{contentRoot:f({},e.typography.body2,{backgroundColor:n,color:e.palette.getContrastText(n),alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"}),lessPadding:{paddingLeft:20},variantSuccess:{backgroundColor:"#43a047",color:"#fff"},variantError:{backgroundColor:"#d32f2f",color:"#fff"},variantInfo:{backgroundColor:"#2196f3",color:"#fff"},variantWarning:{backgroundColor:"#ff9800",color:"#fff"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8},wrappedRoot:{position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0}}))},U=function(e){var r=e.classes,a=p(e,["classes"]),i=n.useRef(),s=n.useState(!0),u=s[0],l=s[1];n.useEffect((function(){return function(){i.current&&clearTimeout(i.current)}}),[]);var d=V([a.snack.onClose,a.onClose],a.snack.key),m=a.style,h=a.ariaAttributes,g=a.className,v=a.hideIconVariant,x=a.iconVariant,b=a.snack,S=a.action,O=a.content,L=a.TransitionComponent,T=a.TransitionProps,A=a.transitionDuration,I=p(a,["style","dense","ariaAttributes","className","hideIconVariant","iconVariant","snack","action","content","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),M=b.key,H=b.open,R=b.className,N=b.variant,P=b.content,z=b.action,B=b.ariaAttributes,U=b.anchorOrigin,K=b.message,_=b.TransitionComponent,X=b.TransitionProps,Z=b.transitionDuration,Q=p(b,["persist","key","open","entered","requestClose","className","variant","content","action","ariaAttributes","anchorOrigin","message","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),Y=f({},j,{},x)[N],G=f({"aria-describedby":"notistack-snackbar"},w(B,h)),F=_||L||k.TransitionComponent,J=w(Z,A,k.transitionDuration),$=f({direction:q(U)},w(X,T)),ee=z||S;"function"==typeof ee&&(ee=ee(M));var ne=P||O;"function"==typeof ne&&(ne=ne(M,b.message));var te=["onEnter","onEntering","onEntered","onExit","onExiting","onExited"].reduce((function(e,n){var t;return f({},e,((t={})[n]=V([a.snack[n],a[n]],a.snack.key),t))}),{});return t.createElement(c,{unmountOnExit:!0,timeout:175,in:u,onExited:te.onExited},t.createElement(W,Object.assign({},I,Q,{open:H,className:o(r.root,r.wrappedRoot,r[y(U)]),onClose:d}),t.createElement(F,Object.assign({appear:!0,in:H,timeout:J},$,{onExit:te.onExit,onExiting:te.onExiting,onExited:function(){i.current=setTimeout((function(){l(!u)}),125)},onEnter:te.onEnter,onEntering:te.onEntering,onEntered:V([te.onEntered,function(){a.snack.requestClose&&d(null,E.INSTRCUTED)}])}),ne||t.createElement(D,Object.assign({},G,{role:"alert",style:m,className:o(r.contentRoot,r[C(N)],g,R,!v&&Y&&r.lessPadding)}),t.createElement("div",{id:G["aria-describedby"],className:r.message},v?null:Y,K),ee&&t.createElement("div",{className:r.action},ee)))))},K=i.withStyles(B,{defaultTheme:s.createTheme()})(U),_="& > .MuiCollapse-container > .MuiCollapse-wrapper",X=i.makeStyles((function(e){var n,t,r,o,a;return{root:(n={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:e.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},n["& > .MuiCollapse-container"]={pointerEvents:"all"},n[_]={padding:"6px 0px",transition:"padding 300ms ease 0ms"},n.maxWidth="calc(100% - 40px)",n[e.breakpoints.down("xs")]={width:"100%",maxWidth:"calc(100% - 32px)"},n),rootDense:(t={},t[_]={padding:"2px 0px"},t),top:{top:14,flexDirection:"column"},bottom:{bottom:14,flexDirection:"column-reverse"},left:(r={left:20},r[e.breakpoints.up("sm")]={alignItems:"flex-start"},r[e.breakpoints.down("xs")]={left:"16px"},r),right:(o={right:20},o[e.breakpoints.up("sm")]={alignItems:"flex-end"},o[e.breakpoints.down("xs")]={right:"16px"},o),center:(a={left:"50%",transform:"translateX(-50%)"},a[e.breakpoints.up("sm")]={alignItems:"center"},a)}}),{defaultTheme:s.createTheme()}),Z=function(e){var n=X(),r=e.className,a=e.anchorOrigin,i=e.dense,s=p(e,["className","anchorOrigin","dense"]),c=o(n[a.vertical],n[a.horizontal],n.root,r,i&&n.rootDense);return t.createElement("div",Object.assign({className:c},s))},Q=t.memo(Z),Y=function(e){var n,a,i;function s(n){var t;return(t=e.call(this,n)||this).enqueueSnackbar=function(e,n){void 0===n&&(n={});var r=n.key,o=n.preventDuplicate,a=p(n,["key","preventDuplicate"]),i=S(r),s=i?r:(new Date).getTime()+Math.random(),c=function(e,n,t){return function(r){return"autoHideDuration"===r?O(e.autoHideDuration)?e.autoHideDuration:O(n.autoHideDuration)?n.autoHideDuration:k.autoHideDuration:e[r]||n[r]||t[r]}}(a,t.props,k),u=f({key:s},a,{message:e,open:!0,entered:!1,requestClose:!1,variant:c("variant"),anchorOrigin:c("anchorOrigin"),autoHideDuration:c("autoHideDuration")});return a.persist&&(u.autoHideDuration=void 0),t.setState((function(n){if(void 0===o&&t.props.preventDuplicate||o){var a=function(n){return i?n.key===r:n.message===e},s=n.queue.findIndex(a)>-1,c=n.snacks.findIndex(a)>-1;if(s||c)return n}return t.handleDisplaySnack(f({},n,{queue:[].concat(n.queue,[u])}))})),s},t.handleDisplaySnack=function(e){return e.snacks.length>=t.maxSnack?t.handleDismissOldest(e):t.processQueue(e)},t.processQueue=function(e){var n=e.queue;return n.length>0?f({},e,{snacks:[].concat(e.snacks,[n[0]]),queue:n.slice(1,n.length)}):e},t.handleDismissOldest=function(e){if(e.snacks.some((function(e){return!e.open||e.requestClose})))return e;var n=!1,r=!1;e.snacks.reduce((function(e,n){return e+(n.open&&n.persist?1:0)}),0)===t.maxSnack&&(r=!0);var o=e.snacks.map((function(e){return n||e.persist&&!r?f({},e):(n=!0,e.entered?(e.onClose&&e.onClose(null,E.MAXSNACK,e.key),t.props.onClose&&t.props.onClose(null,E.MAXSNACK,e.key),f({},e,{open:!1})):f({},e,{requestClose:!0}))}));return f({},e,{snacks:o})},t.handleEnteredSnack=function(e,n,r){if(!S(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");t.setState((function(e){return{snacks:e.snacks.map((function(e){return e.key===r?f({},e,{entered:!0}):f({},e)}))}}))},t.handleCloseSnack=function(e,n,r){if(t.props.onClose&&t.props.onClose(e,n,r),n!==E.CLICKAWAY){var o=void 0===r;t.setState((function(e){var n=e.queue;return{snacks:e.snacks.map((function(e){return o||e.key===r?f({},e,e.entered?{open:!1}:{requestClose:!0}):f({},e)})),queue:n.filter((function(e){return e.key!==r}))}}))}},t.closeSnackbar=function(e){var n=t.state.snacks.find((function(n){return n.key===e}));S(e)&&n&&n.onClose&&n.onClose(null,E.INSTRUCTED,e),t.handleCloseSnack(null,E.INSTRUCTED,e)},t.handleExitedSnack=function(e,n,r){var o=n||r;if(!S(o))throw new Error("handleExitedSnack Cannot be called with undefined key");t.setState((function(e){var n=t.processQueue(f({},e,{snacks:e.snacks.filter((function(e){return e.key!==o}))}));return 0===n.queue.length?n:t.handleDismissOldest(n)}))},t.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:t.enqueueSnackbar,closeSnackbar:t.closeSnackbar}},t}return a=e,(n=s).prototype=Object.create(a.prototype),n.prototype.constructor=n,n.__proto__=a,s.prototype.render=function(){var e=this,n=this.state.contextValue,a=this.props,i=a.iconVariant,s=a.dense,c=void 0===s?k.dense:s,u=a.hideIconVariant,l=void 0===u?k.hideIconVariant:u,d=a.domRoot,h=a.children,g=a.classes,E=void 0===g?{}:g,y=p(a,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),C=this.state.snacks.reduce((function(e,n){var t,r,o=""+v((r=n.anchorOrigin).vertical)+v(r.horizontal);return f({},e,((t={})[o]=[].concat(e[o]||[],[n]),t))}),{}),S=Object.keys(C).map((function(n){var r=C[n];return t.createElement(Q,{key:n,dense:c,anchorOrigin:r[0].anchorOrigin,className:o(E.containerRoot,E[b(n)])},r.map((function(n){return t.createElement(K,Object.assign({},y,{key:n.key,snack:n,dense:c,iconVariant:i,hideIconVariant:l,classes:x(E),onClose:e.handleCloseSnack,onExited:V([e.handleExitedSnack,e.props.onExited]),onEntered:V([e.handleEnteredSnack,e.props.onEntered])}))})))}));return t.createElement(m.Provider,{value:n},h,d?r.createPortal(S,d):S)},(i=[{key:"maxSnack",get:function(){return this.props.maxSnack||k.maxSnack}}])&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,i),s}(n.Component);exports.SnackbarContent=D,exports.SnackbarProvider=Y,exports.useSnackbar=function(){return n.useContext(m)},exports.withSnackbar=function(e){var n=t.forwardRef((function(n,r){return t.createElement(m.Consumer,null,(function(o){return t.createElement(e,f({},n,{ref:r,enqueueSnackbar:o.enqueueSnackbar,closeSnackbar:o.closeSnackbar}))}))}));return d(n,e),n};
  //# sourceMappingURL=notistack.cjs.production.min.js.map
  