@matterbridge/frontend 3.5.2 → 3.5.3-dev-20260713-06633d2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@ import{a as e}from"./rolldown-runtime.js";import{c as t}from"./vendor_emotion.js
2
2
  10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},null),warning:i.createElement(function(){return i.createElement(F,null,i.createElement(`path`,{d:`M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z`}))},null),error:i.createElement(function(){return i.createElement(F,null,i.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,
3
3
  6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
4
4
  13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},null),info:i.createElement(function(){return i.createElement(F,null,i.createElement(`path`,{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
5
- 0 22,12A10,10 0 0,0 12,2Z`}))},null)},anchorOrigin:{vertical:`bottom`,horizontal:`left`},TransitionComponent:P,transitionDuration:{enter:225,exit:195}},ae=function(e,t){var n=function(e){return typeof e==`number`||e===null};return n(e)?e:n(t)?t:I.autoHideDuration},oe=function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,[`string`,`number`])?e:n(e,[`object`])?u({},I.transitionDuration,{},n(t,[`object`])&&t,{},e):n(t,[`string`,`number`])?t:n(t,[`object`])?u({},I.transitionDuration,{},t):I.transitionDuration},se=function(e,t){return function(n,r){return r===void 0&&(r=!1),r?u({},I[n],{},t[n],{},e[n]):n===`autoHideDuration`?ae(e.autoHideDuration,t.autoHideDuration):n===`transitionDuration`?oe(e.transitionDuration,t.transitionDuration):e[n]||t[n]||I[n]}};function L(e){return Object.entries(e).reduce(function(e,t){var r,i=t[0],a=t[1];return u({},e,(r={},r[i]=n(a),r))},{})}var R={SnackbarContainer:`notistack-SnackbarContainer`,Snackbar:`notistack-Snackbar`,CollapseWrapper:`notistack-CollapseWrapper`,MuiContent:`notistack-MuiContent`,MuiContentVariant:function(e){return`notistack-MuiContent-`+e}},ce=L({root:{height:0},entered:{height:`auto`}}),z=`0px`,B=175,le=(0,i.forwardRef)(function(e,t){var n=e.children,r=e.in,a=e.onExited,o=(0,i.useRef)(null),c=(0,i.useRef)(null),l=O(t,c),d=function(){return o.current?o.current.clientHeight:0};return(0,i.createElement)(T,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height=z},onEntered:function(e){e.style.height=`auto`},onEntering:function(e){var t=d(),n=k({timeout:B,mode:`enter`}),r=n.duration,i=n.easing;e.style.transitionDuration=typeof r==`string`?r:r+`ms`,e.style.height=t+`px`,e.style.transitionTimingFunction=i||``},onExit:function(e){e.style.height=d()+`px`},onExited:a,onExiting:function(e){j(e);var t=k({timeout:B,mode:`exit`}),n=t.duration,r=t.easing;e.style.transitionDuration=typeof n==`string`?n:n+`ms`,e.style.height=z,e.style.transitionTimingFunction=r||``},nodeRef:c,timeout:B},function(e,t){return(0,i.createElement)(`div`,Object.assign({ref:l,className:s(ce.root,e===`entered`&&ce.entered),style:u({pointerEvents:`all`,overflow:`hidden`,minHeight:z,transition:M(`height`)},e===`entered`&&{overflow:`visible`},{},e===`exited`&&!r&&{visibility:`hidden`})},t),(0,i.createElement)(`div`,{ref:o,className:R.CollapseWrapper,style:{display:`flex`,width:`100%`}},n))})});le.displayName=`Collapse`;var ue={right:`left`,left:`right`,bottom:`up`,top:`down`},de=function(e){return e.horizontal===`center`?ue[e.vertical]:ue[e.horizontal]},fe=function(e){return`anchorOrigin`+v(e)},pe=function(e){e===void 0&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return u({},t,(r={},r[n]=e[n],r))},{})},me=function(){};function V(e,t){return e.reduce(function(e,n){return n==null?e:function(){var r=[...arguments],i=[].concat(r);t&&i.indexOf(t)===-1&&i.push(t),e.apply(this,i),n.apply(this,i)}},me)}var he=typeof window<`u`?i.useLayoutEffect:i.useEffect;function H(e){var t=(0,i.useRef)(e);return he(function(){t.current=e}),(0,i.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var U=(0,i.forwardRef)(function(e,t){var n=e.children,r=e.className,a=e.autoHideDuration,o=e.disableWindowBlurListener,c=o===void 0?!1:o,l=e.onClose,u=e.id,d=e.open,f=e.SnackbarProps,p=f===void 0?{}:f,m=(0,i.useRef)(),h=H(function(){l&&l.apply(void 0,arguments)}),g=H(function(e){!l||e==null||(m.current&&clearTimeout(m.current),m.current=setTimeout(function(){h(null,`timeout`,u)},e))});(0,i.useEffect)(function(){return d&&g(a),function(){m.current&&clearTimeout(m.current)}},[d,a,g]);var _=function(){m.current&&clearTimeout(m.current)},v=(0,i.useCallback)(function(){a!=null&&g(a*.5)},[a,g]);return(0,i.useEffect)(function(){if(!c&&d)return window.addEventListener(`focus`,v),window.addEventListener(`blur`,_),function(){window.removeEventListener(`focus`,v),window.removeEventListener(`blur`,_)}},[c,v,d]),(0,i.createElement)(`div`,Object.assign({ref:t},p,{className:s(R.Snackbar,r),onMouseEnter:function(e){p.onMouseEnter&&p.onMouseEnter(e),_()},onMouseLeave:function(e){p.onMouseLeave&&p.onMouseLeave(e),v()}}),n)});U.displayName=`Snackbar`;var W,ge=L({root:(W={display:`flex`,flexWrap:`wrap`,flexGrow:1},W[g.upSm]={flexGrow:`initial`,minWidth:`288px`},W)}),_e=(0,i.forwardRef)(function(e,t){var n=e.className,r=f(e,[`className`]);return i.createElement(`div`,Object.assign({ref:t,className:s(ge.root,n)},r))});_e.displayName=`SnackbarContent`;var G=L({root:{backgroundColor:`#313131`,fontSize:`0.875rem`,lineHeight:1.43,letterSpacing:`0.01071em`,color:`#fff`,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:`20px`},default:{backgroundColor:`#313131`},success:{backgroundColor:`#43a047`},error:{backgroundColor:`#d32f2f`},warning:{backgroundColor:`#ff9800`},info:{backgroundColor:`#2196f3`},message:{display:`flex`,alignItems:`center`,padding:`8px 0`},action:{display:`flex`,alignItems:`center`,marginLeft:`auto`,paddingLeft:`16px`,marginRight:`-8px`}}),ve=`notistack-snackbar`,ye=(0,i.forwardRef)(function(e,t){var n=e.id,r=e.message,a=e.action,o=e.iconVariant,c=e.variant,l=e.hideIconVariant,u=e.style,d=e.className,f=o[c],p=a;return typeof p==`function`&&(p=p(n)),i.createElement(_e,{ref:t,role:`alert`,"aria-describedby":ve,style:u,className:s(R.MuiContent,R.MuiContentVariant(c),G.root,G[c],d,!l&&f&&G.lessPadding)},i.createElement(`div`,{id:ve,className:G.message},l?null:f,r),p&&i.createElement(`div`,{className:G.action},p))});ye.displayName=`MaterialDesignContent`;var be=(0,i.memo)(ye),xe=L({wrappedRoot:{width:`100%`,position:`relative`,transform:`translateX(0)`,top:0,right:0,bottom:0,left:0,minWidth:`288px`}}),Se=function(e){var t=(0,i.useRef)(),n=(0,i.useState)(!0),r=n[0],a=n[1],o=V([e.snack.onClose,e.onClose]),c=function(){e.snack.requestClose&&o(null,`instructed`,e.snack.id)},l=(0,i.useCallback)(function(){t.current=setTimeout(function(){a(function(e){return!e})},125)},[]);(0,i.useEffect)(function(){return function(){t.current&&clearTimeout(t.current)}},[]);var d=e.snack,p=e.classes,m=e.Component,h=m===void 0?be:m,g=(0,i.useMemo)(function(){return pe(p)},[p]),_=d.open,v=d.SnackbarProps,y=d.TransitionComponent,b=d.TransitionProps,x=d.transitionDuration,S=d.disableWindowBlurListener,C=d.content,w=f(d,[`open`,`SnackbarProps`,`TransitionComponent`,`TransitionProps`,`transitionDuration`,`disableWindowBlurListener`,`content`,`entered`,`requestClose`,`onEnter`,`onEntered`,`onExit`,`onExited`]),T=u({direction:de(w.anchorOrigin),timeout:x},b),E=C;typeof E==`function`&&(E=E(w.id,w.message));var D=[`onEnter`,`onEntered`,`onExit`,`onExited`].reduce(function(t,n){var r;return u({},t,(r={},r[n]=V([e.snack[n],e[n]],w.id),r))},{});return i.createElement(le,{in:r,onExited:D.onExited},i.createElement(U,{open:_,id:w.id,disableWindowBlurListener:S,autoHideDuration:w.autoHideDuration,className:s(xe.wrappedRoot,g.root,g[fe(w.anchorOrigin)]),SnackbarProps:v,onClose:o},i.createElement(y,Object.assign({},T,{appear:!0,in:_,onExit:D.onExit,onExited:l,onEnter:D.onEnter,onEntered:V([D.onEntered,c],w.id)}),E||i.createElement(h,Object.assign({},w)))))},K,q,J,Y,X,Z={view:{default:20,dense:4},snackbar:{default:6,dense:2}},Ce=`.`+R.CollapseWrapper,Q=16,$=L({root:(K={boxSizing:`border-box`,display:`flex`,maxHeight:`100%`,position:`fixed`,zIndex:1400,height:`auto`,width:`auto`,transition:M([`top`,`right`,`bottom`,`left`,`max-width`],{duration:300,easing:`ease`}),pointerEvents:`none`},K[Ce]={padding:Z.snackbar.default+`px 0px`,transition:`padding 300ms ease 0ms`},K.maxWidth=`calc(100% - `+Z.view.default*2+`px)`,K[g.downXs]={width:`100%`,maxWidth:`calc(100% - `+Q*2+`px)`},K),rootDense:(q={},q[Ce]={padding:Z.snackbar.dense+`px 0px`},q),top:{top:Z.view.default-Z.snackbar.default+`px`,flexDirection:`column`},bottom:{bottom:Z.view.default-Z.snackbar.default+`px`,flexDirection:`column-reverse`},left:(J={left:Z.view.default+`px`},J[g.upSm]={alignItems:`flex-start`},J[g.downXs]={left:Q+`px`},J),right:(Y={right:Z.view.default+`px`},Y[g.upSm]={alignItems:`flex-end`},Y[g.downXs]={right:Q+`px`},Y),center:(X={left:`50%`,transform:`translateX(-50%)`},X[g.upSm]={alignItems:`center`},X)}),we=(0,i.memo)(function(e){var t=e.classes,n=t===void 0?{}:t,r=e.anchorOrigin,a=e.dense,o=e.children,c=s(R.SnackbarContainer,$[r.vertical],$[r.horizontal],$.root,n.containerRoot,n[`containerAnchorOrigin`+v(r)],a&&$.rootDense);return i.createElement(`div`,{className:c},o)}),Te=function(e){return!(typeof e==`string`||(0,i.isValidElement)(e))},Ee=function(e){d(t,e);function t(t){var n=e.call(this,t)||this;return n.enqueueSnackbar=function(e,t){if(t===void 0&&(t={}),e==null)throw Error(`enqueueSnackbar called with invalid argument`);var r=Te(e)?e:t,i=Te(e)?e.message:e,a=r.key,o=r.preventDuplicate,c=f(r,[`key`,`preventDuplicate`]),l=y(a),d=l?a:new Date().getTime()+Math.random(),p=se(c,n.props),m=u({id:d},c,{message:i,open:!0,entered:!1,requestClose:!1,persist:p(`persist`),action:p(`action`),content:p(`content`),variant:p(`variant`),anchorOrigin:p(`anchorOrigin`),disableWindowBlurListener:p(`disableWindowBlurListener`),autoHideDuration:p(`autoHideDuration`),hideIconVariant:p(`hideIconVariant`),TransitionComponent:p(`TransitionComponent`),transitionDuration:p(`transitionDuration`),TransitionProps:p(`TransitionProps`,!0),iconVariant:p(`iconVariant`,!0),style:p(`style`,!0),SnackbarProps:p(`SnackbarProps`,!0),className:s(n.props.className,c.className)});return m.persist&&(m.autoHideDuration=void 0),n.setState(function(e){if(o===void 0&&n.props.preventDuplicate||o){var t=function(e){return l?e.id===d:e.message===i},r=e.queue.findIndex(t)>-1,a=e.snacks.findIndex(t)>-1;if(r||a)return e}return n.handleDisplaySnack(u({},e,{queue:[].concat(e.queue,[m])}))}),d},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?u({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return!t&&(!e.persist||r)?(t=!0,e.entered?(e.onClose&&e.onClose(null,`maxsnack`,e.id),n.props.onClose&&n.props.onClose(null,`maxsnack`,e.id),u({},e,{open:!1})):u({},e,{requestClose:!0})):u({},e)});return u({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!y(r))throw Error(`handleEnteredSnack Cannot be called with undefined key`);n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?u({},e,{entered:!0}):u({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=r===void 0;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return!i&&e.id!==r?u({},e):e.entered?u({},e,{open:!1}):u({},e,{requestClose:!0})}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});y(e)&&t&&t.onClose&&t.onClose(null,`instructed`,e),n.handleCloseSnack(null,`instructed`,e)},n.handleExitedSnack=function(e,t){if(!y(t))throw Error(`handleExitedSnack Cannot be called with undefined key`);n.setState(function(e){var r=n.processQueue(u({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return r.queue.length===0?r:n.handleDismissOldest(r)})},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(p(n)),closeSnackbar:n.closeSnackbar.bind(p(n))}},n}var n=t.prototype;return n.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,o=n.children,s=n.dense,c=s===void 0?!1:s,l=n.Components,d=l===void 0?{}:l,f=n.classes,p=this.state.snacks.reduce(function(e,t){var n,r=v(t.anchorOrigin),i=e[r]||[];return u({},e,(n={},n[r]=[].concat(i,[t]),n))},{}),m=Object.keys(p).map(function(t){var n=p[t],r=n[0];return i.createElement(we,{key:t,dense:c,anchorOrigin:r.anchorOrigin,classes:f},n.map(function(t){return i.createElement(Se,{key:t.id,snack:t,classes:f,Component:d[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:V([e.handleExitedSnack,e.props.onExited],t.id),onEntered:V([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return i.createElement(h.Provider,{value:t},o,r?(0,a.createPortal)(m,r):m)},l(t,[{key:`maxSnack`,get:function(){return this.props.maxSnack||I.maxSnack}}]),t}(i.Component),De=(function(){return(0,i.useContext)(h)});export{De as n,Ee as t};
5
+ 0 22,12A10,10 0 0,0 12,2Z`}))},null)},anchorOrigin:{vertical:`bottom`,horizontal:`left`},TransitionComponent:P,transitionDuration:{enter:225,exit:195}},ae=function(e,t){var n=function(e){return typeof e==`number`||e===null};return n(e)?e:n(t)?t:I.autoHideDuration},oe=function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,[`string`,`number`])?e:n(e,[`object`])?u({},I.transitionDuration,{},n(t,[`object`])&&t,{},e):n(t,[`string`,`number`])?t:n(t,[`object`])?u({},I.transitionDuration,{},t):I.transitionDuration},se=function(e,t){return function(n,r){return r===void 0&&(r=!1),r?u({},I[n],{},t[n],{},e[n]):n===`autoHideDuration`?ae(e.autoHideDuration,t.autoHideDuration):n===`transitionDuration`?oe(e.transitionDuration,t.transitionDuration):e[n]||t[n]||I[n]}};function L(e){return Object.entries(e).reduce(function(e,t){var r,i=t[0],a=t[1];return u({},e,(r={},r[i]=n(a),r))},{})}var R={SnackbarContainer:`notistack-SnackbarContainer`,Snackbar:`notistack-Snackbar`,CollapseWrapper:`notistack-CollapseWrapper`,MuiContent:`notistack-MuiContent`,MuiContentVariant:function(e){return`notistack-MuiContent-`+e}},ce=L({root:{height:0},entered:{height:`auto`}}),z=`0px`,B=175,le=(0,i.forwardRef)(function(e,t){var n=e.children,r=e.in,a=e.onExited,o=(0,i.useRef)(null),c=(0,i.useRef)(null),l=O(t,c),d=function(){return o.current?o.current.clientHeight:0};return(0,i.createElement)(T,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height=z},onEntered:function(e){e.style.height=`auto`},onEntering:function(e){var t=d(),n=k({timeout:B,mode:`enter`}),r=n.duration,i=n.easing;e.style.transitionDuration=typeof r==`string`?r:r+`ms`,e.style.height=t+`px`,e.style.transitionTimingFunction=i||``},onExit:function(e){e.style.height=d()+`px`},onExited:a,onExiting:function(e){j(e);var t=k({timeout:B,mode:`exit`}),n=t.duration,r=t.easing;e.style.transitionDuration=typeof n==`string`?n:n+`ms`,e.style.height=z,e.style.transitionTimingFunction=r||``},nodeRef:c,timeout:B},function(e,t){return(0,i.createElement)(`div`,Object.assign({ref:l,className:s(ce.root,e===`entered`&&ce.entered),style:u({pointerEvents:`all`,overflow:`hidden`,minHeight:z,transition:M(`height`)},e===`entered`&&{overflow:`visible`},{},e===`exited`&&!r&&{visibility:`hidden`})},t),(0,i.createElement)(`div`,{ref:o,className:R.CollapseWrapper,style:{display:`flex`,width:`100%`}},n))})});le.displayName=`Collapse`;var ue={right:`left`,left:`right`,bottom:`up`,top:`down`},de=function(e){return e.horizontal===`center`?ue[e.vertical]:ue[e.horizontal]},fe=function(e){return`anchorOrigin`+v(e)},pe=function(e){e===void 0&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return u({},t,(r={},r[n]=e[n],r))},{})},me=function(){};function V(e,t){return e.reduce(function(e,n){return n==null?e:function(){var r=[...arguments],i=[].concat(r);t&&i.indexOf(t)===-1&&i.push(t),e.apply(this,i),n.apply(this,i)}},me)}var he=typeof window<`u`?i.useLayoutEffect:i.useEffect;function H(e){var t=(0,i.useRef)(e);return he(function(){t.current=e}),(0,i.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var U=(0,i.forwardRef)(function(e,t){var n=e.children,r=e.className,a=e.autoHideDuration,o=e.disableWindowBlurListener,c=o!==void 0&&o,l=e.onClose,u=e.id,d=e.open,f=e.SnackbarProps,p=f===void 0?{}:f,m=(0,i.useRef)(),h=H(function(){l&&l.apply(void 0,arguments)}),g=H(function(e){!l||e==null||(m.current&&clearTimeout(m.current),m.current=setTimeout(function(){h(null,`timeout`,u)},e))});(0,i.useEffect)(function(){return d&&g(a),function(){m.current&&clearTimeout(m.current)}},[d,a,g]);var _=function(){m.current&&clearTimeout(m.current)},v=(0,i.useCallback)(function(){a!=null&&g(a*.5)},[a,g]);return(0,i.useEffect)(function(){if(!c&&d)return window.addEventListener(`focus`,v),window.addEventListener(`blur`,_),function(){window.removeEventListener(`focus`,v),window.removeEventListener(`blur`,_)}},[c,v,d]),(0,i.createElement)(`div`,Object.assign({ref:t},p,{className:s(R.Snackbar,r),onMouseEnter:function(e){p.onMouseEnter&&p.onMouseEnter(e),_()},onMouseLeave:function(e){p.onMouseLeave&&p.onMouseLeave(e),v()}}),n)});U.displayName=`Snackbar`;var W,ge=L({root:(W={display:`flex`,flexWrap:`wrap`,flexGrow:1},W[g.upSm]={flexGrow:`initial`,minWidth:`288px`},W)}),_e=(0,i.forwardRef)(function(e,t){var n=e.className,r=f(e,[`className`]);return i.createElement(`div`,Object.assign({ref:t,className:s(ge.root,n)},r))});_e.displayName=`SnackbarContent`;var G=L({root:{backgroundColor:`#313131`,fontSize:`0.875rem`,lineHeight:1.43,letterSpacing:`0.01071em`,color:`#fff`,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:`20px`},default:{backgroundColor:`#313131`},success:{backgroundColor:`#43a047`},error:{backgroundColor:`#d32f2f`},warning:{backgroundColor:`#ff9800`},info:{backgroundColor:`#2196f3`},message:{display:`flex`,alignItems:`center`,padding:`8px 0`},action:{display:`flex`,alignItems:`center`,marginLeft:`auto`,paddingLeft:`16px`,marginRight:`-8px`}}),ve=`notistack-snackbar`,ye=(0,i.forwardRef)(function(e,t){var n=e.id,r=e.message,a=e.action,o=e.iconVariant,c=e.variant,l=e.hideIconVariant,u=e.style,d=e.className,f=o[c],p=a;return typeof p==`function`&&(p=p(n)),i.createElement(_e,{ref:t,role:`alert`,"aria-describedby":ve,style:u,className:s(R.MuiContent,R.MuiContentVariant(c),G.root,G[c],d,!l&&f&&G.lessPadding)},i.createElement(`div`,{id:ve,className:G.message},l?null:f,r),p&&i.createElement(`div`,{className:G.action},p))});ye.displayName=`MaterialDesignContent`;var be=(0,i.memo)(ye),xe=L({wrappedRoot:{width:`100%`,position:`relative`,transform:`translateX(0)`,top:0,right:0,bottom:0,left:0,minWidth:`288px`}}),Se=function(e){var t=(0,i.useRef)(),n=(0,i.useState)(!0),r=n[0],a=n[1],o=V([e.snack.onClose,e.onClose]),c=function(){e.snack.requestClose&&o(null,`instructed`,e.snack.id)},l=(0,i.useCallback)(function(){t.current=setTimeout(function(){a(function(e){return!e})},125)},[]);(0,i.useEffect)(function(){return function(){t.current&&clearTimeout(t.current)}},[]);var d=e.snack,p=e.classes,m=e.Component,h=m===void 0?be:m,g=(0,i.useMemo)(function(){return pe(p)},[p]),_=d.open,v=d.SnackbarProps,y=d.TransitionComponent,b=d.TransitionProps,x=d.transitionDuration,S=d.disableWindowBlurListener,C=d.content,w=f(d,[`open`,`SnackbarProps`,`TransitionComponent`,`TransitionProps`,`transitionDuration`,`disableWindowBlurListener`,`content`,`entered`,`requestClose`,`onEnter`,`onEntered`,`onExit`,`onExited`]),T=u({direction:de(w.anchorOrigin),timeout:x},b),E=C;typeof E==`function`&&(E=E(w.id,w.message));var D=[`onEnter`,`onEntered`,`onExit`,`onExited`].reduce(function(t,n){var r;return u({},t,(r={},r[n]=V([e.snack[n],e[n]],w.id),r))},{});return i.createElement(le,{in:r,onExited:D.onExited},i.createElement(U,{open:_,id:w.id,disableWindowBlurListener:S,autoHideDuration:w.autoHideDuration,className:s(xe.wrappedRoot,g.root,g[fe(w.anchorOrigin)]),SnackbarProps:v,onClose:o},i.createElement(y,Object.assign({},T,{appear:!0,in:_,onExit:D.onExit,onExited:l,onEnter:D.onEnter,onEntered:V([D.onEntered,c],w.id)}),E||i.createElement(h,Object.assign({},w)))))},K,q,J,Y,X,Z={view:{default:20,dense:4},snackbar:{default:6,dense:2}},Ce=`.`+R.CollapseWrapper,Q=16,$=L({root:(K={boxSizing:`border-box`,display:`flex`,maxHeight:`100%`,position:`fixed`,zIndex:1400,height:`auto`,width:`auto`,transition:M([`top`,`right`,`bottom`,`left`,`max-width`],{duration:300,easing:`ease`}),pointerEvents:`none`},K[Ce]={padding:Z.snackbar.default+`px 0px`,transition:`padding 300ms ease 0ms`},K.maxWidth=`calc(100% - `+Z.view.default*2+`px)`,K[g.downXs]={width:`100%`,maxWidth:`calc(100% - `+Q*2+`px)`},K),rootDense:(q={},q[Ce]={padding:Z.snackbar.dense+`px 0px`},q),top:{top:Z.view.default-Z.snackbar.default+`px`,flexDirection:`column`},bottom:{bottom:Z.view.default-Z.snackbar.default+`px`,flexDirection:`column-reverse`},left:(J={left:Z.view.default+`px`},J[g.upSm]={alignItems:`flex-start`},J[g.downXs]={left:Q+`px`},J),right:(Y={right:Z.view.default+`px`},Y[g.upSm]={alignItems:`flex-end`},Y[g.downXs]={right:Q+`px`},Y),center:(X={left:`50%`,transform:`translateX(-50%)`},X[g.upSm]={alignItems:`center`},X)}),we=(0,i.memo)(function(e){var t=e.classes,n=t===void 0?{}:t,r=e.anchorOrigin,a=e.dense,o=e.children,c=s(R.SnackbarContainer,$[r.vertical],$[r.horizontal],$.root,n.containerRoot,n[`containerAnchorOrigin`+v(r)],a&&$.rootDense);return i.createElement(`div`,{className:c},o)}),Te=function(e){return!(typeof e==`string`||(0,i.isValidElement)(e))},Ee=function(e){d(t,e);function t(t){var n=e.call(this,t)||this;return n.enqueueSnackbar=function(e,t){if(t===void 0&&(t={}),e==null)throw Error(`enqueueSnackbar called with invalid argument`);var r=Te(e)?e:t,i=Te(e)?e.message:e,a=r.key,o=r.preventDuplicate,c=f(r,[`key`,`preventDuplicate`]),l=y(a),d=l?a:new Date().getTime()+Math.random(),p=se(c,n.props),m=u({id:d},c,{message:i,open:!0,entered:!1,requestClose:!1,persist:p(`persist`),action:p(`action`),content:p(`content`),variant:p(`variant`),anchorOrigin:p(`anchorOrigin`),disableWindowBlurListener:p(`disableWindowBlurListener`),autoHideDuration:p(`autoHideDuration`),hideIconVariant:p(`hideIconVariant`),TransitionComponent:p(`TransitionComponent`),transitionDuration:p(`transitionDuration`),TransitionProps:p(`TransitionProps`,!0),iconVariant:p(`iconVariant`,!0),style:p(`style`,!0),SnackbarProps:p(`SnackbarProps`,!0),className:s(n.props.className,c.className)});return m.persist&&(m.autoHideDuration=void 0),n.setState(function(e){if(o===void 0&&n.props.preventDuplicate||o){var t=function(e){return l?e.id===d:e.message===i},r=e.queue.findIndex(t)>-1,a=e.snacks.findIndex(t)>-1;if(r||a)return e}return n.handleDisplaySnack(u({},e,{queue:[].concat(e.queue,[m])}))}),d},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?u({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return!t&&(!e.persist||r)?(t=!0,e.entered?(e.onClose&&e.onClose(null,`maxsnack`,e.id),n.props.onClose&&n.props.onClose(null,`maxsnack`,e.id),u({},e,{open:!1})):u({},e,{requestClose:!0})):u({},e)});return u({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!y(r))throw Error(`handleEnteredSnack Cannot be called with undefined key`);n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?u({},e,{entered:!0}):u({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=r===void 0;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return!i&&e.id!==r?u({},e):e.entered?u({},e,{open:!1}):u({},e,{requestClose:!0})}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});y(e)&&t&&t.onClose&&t.onClose(null,`instructed`,e),n.handleCloseSnack(null,`instructed`,e)},n.handleExitedSnack=function(e,t){if(!y(t))throw Error(`handleExitedSnack Cannot be called with undefined key`);n.setState(function(e){var r=n.processQueue(u({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return r.queue.length===0?r:n.handleDismissOldest(r)})},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(p(n)),closeSnackbar:n.closeSnackbar.bind(p(n))}},n}var n=t.prototype;return n.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,o=n.children,s=n.dense,c=s!==void 0&&s,l=n.Components,d=l===void 0?{}:l,f=n.classes,p=this.state.snacks.reduce(function(e,t){var n,r=v(t.anchorOrigin),i=e[r]||[];return u({},e,(n={},n[r]=[].concat(i,[t]),n))},{}),m=Object.keys(p).map(function(t){var n=p[t],r=n[0];return i.createElement(we,{key:t,dense:c,anchorOrigin:r.anchorOrigin,classes:f},n.map(function(t){return i.createElement(Se,{key:t.id,snack:t,classes:f,Component:d[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:V([e.handleExitedSnack,e.props.onExited],t.id),onEntered:V([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return i.createElement(h.Provider,{value:t},o,r?(0,a.createPortal)(m,r):m)},l(t,[{key:`maxSnack`,get:function(){return this.props.maxSnack||I.maxSnack}}]),t}(i.Component),De=(function(){return(0,i.useContext)(h)});export{De as n,Ee as t};