{"version":3,"sources":["../../src/utils.js","../../src/MessageChannel/methods/broadcastChannel.js","../../src/MessageChannel/ObliviousSet.js","../../src/MessageChannel/methods/localStorage.js","../../src/MessageChannel/methods/simulate.js","../../src/MessageChannel/methodChooser.js","../../src/MessageChannel/MessageChannel.js","../../src/MessageChannel/leaderElection.js","../../src/TabManager.js","../../src/IdleTimer.js","../../src/useIdleTimer.js","../node_modules/@babel/runtime/helpers/inherits.js","../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/asyncToGenerator.js","../node_modules/@babel/runtime/regenerator/index.js","../node_modules/react-toastify/node_modules/classnames/index.js","../node_modules/react-toastify/node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/react-toastify/node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/react-ripples/esm/createRipples.js","../node_modules/react-ripples/esm/withAttrs.js","../node_modules/react-ripples/esm/index.js","../node_modules/react-toastify/node_modules/react-transition-group/esm/config.js","../node_modules/react-toastify/node_modules/react-transition-group/esm/TransitionGroupContext.js","../node_modules/react-toastify/node_modules/react-transition-group/esm/Transition.js","../node_modules/react-toastify/node_modules/react-transition-group/esm/utils/ChildMapping.js","../node_modules/react-toastify/node_modules/react-transition-group/esm/TransitionGroup.js","../node_modules/react-toastify/esm/react-toastify.js","../node_modules/regenerator-runtime/runtime.js","../node_modules/@babel/runtime/helpers/typeof.js","../node_modules/react-toastify/node_modules/prop-types/index.js"],"names":["IS_BROWSER","window","DEFAULT_ELEMENT","document","DEFAULT_EVENTS","debounced","fn","delay","timerId","result","args","clearTimeout","setTimeout","cancel","throttled","lastCall","now","Date","getTime","lastMs","additional","microSeconds","ms","randomToken","Math","random","toString","substring","sleep","time","Promise","resolve","create","channelName","state","messagesCallback","bc","BroadcastChannel","onmessage","msg","data","close","channelState","onMessage","postMessage","messageJson","err","reject","canBeUsed","type","averageResponseTime","ObliviousSet","ttl","set","Set","timeMap","Map","value","this","has","add","_removeTooOldValues","clear","olderThen","iterator","Symbol","next","get","getLocalStorage","localStorage","e","addStorageEventListener","key","listener","ev","JSON","parse","newValue","addEventListener","ls","setItem","removeItem","options","Error","uuid","eMIs","removeTimeout","msgObj","token","messagesCallbackTime","removeEventListener","writeObj","stringify","createEvent","initEvent","dispatchEvent","userAgent","navigator","toLowerCase","includes","defaultTime","SIMULATE_CHANNELS","name","Array","from","filter","channel","forEach","METHODS","BroadcastChannelMethod","LocalStorageMethod","chooseMethod","SimulateMethod","method","find","m","useMethod","map","MessageChannel","closed","_isListening","_onMessageListener","_addEventListeners","message","internal","_unSendMessagePromises","_beforeClose","_preparePromises","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj","awaitPrepare","then","all","_this","_state","messageChannel","sendPromise","maybePromise","s","_hasMessageListeners","length","push","listenerFn","o","LeaderElection","_channel","_options","isLeader","isDead","_isApplying","_reApply","_unloadFns","_listeners","_intervals","_duplicateListeners","_duplicateCalled","_onBeforeDie","a","unloadFn","die","stopCriteria","handleMessage","context","_this2","action","_sendMessage","responseTime","leaderElector","isLeaderListener","success","applyOnce","_awaitLeadershipPromise","resolved","finish","clearInterval","interval","whenDeathListener","setInterval","fallbackInterval","onBeforeDie","_this3","uFn","msgJson","postInternal","TabManager","emitOnAllTabs","callbacks","start","reset","pause","resume","elector","_leaderElector","registry","leader","allIdle","awaitLeadership","id","idle","active","onIdle","onActive","isIdle","Object","values","every","v","send","isActive","some","onDuplicate","isAllIdle","setAllIdle","bool","IdleTimer","Component","props","oldDate","lastActive","lastIdle","idleTime","remaining","pageX","pageY","tId","eventsBound","callbackRefs","debounce","throttle","_onAction","onAction","eventsThrottle","handleEvent","_handleEvent","bind","startOnMount","startManually","_toggleIdleState","getRemainingTime","getElapsedTime","getLastActiveTime","getLastIdleTime","getTotalIdleTime","getTotalActiveTime","_setupTabManager","_bindEvents","prevProps","_unbindEvents","timeout","manager","console","error","children","crossTab","assign","element","events","passive","capture","force","setState","prevState","_this4","stopOnIdle","elapsedTimeSinceLastActive","remote","timeLeft","useIdleTimer","useRef","firstLoad","_timeout","emitOnIdle","emitOnActive","emitOnAction","useEffect","current","intermediateOnAction","useMemo","callOnAction","nextIdle","eventsWereBound","propTypes","PropTypes","number","arrayOf","string","func","oneOfType","object","shape","oneOf","defaultProps","setPrototypeOf","module","exports","subClass","superClass","TypeError","prototype","constructor","writable","configurable","defineProperty","__esModule","_typeof","assertThisInitialized","self","call","_getPrototypeOf","getPrototypeOf","__proto__","asyncGeneratorStep","gen","_next","_throw","arg","info","done","arguments","apply","undefined","hasOwn","hasOwnProperty","classNames","classes","i","argType","isArray","inner","join","default","ReactPropTypesSecret","require","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","location","propFullName","secret","getShim","isRequired","ReactPropTypes","array","bigint","symbol","any","elementType","instanceOf","node","objectOf","exact","checkPropTypes","__extends","extendStatics","d","b","p","__","__assign","t","n","__rest","indexOf","getOwnPropertySymbols","propertyIsEnumerable","boxStyle","position","display","overflow","withAttrs","React","createElement","_a","_super","class_1","timer","onClick","during","color","stopPropagation","rect","currentTarget","getBoundingClientRect","left","scrollX","top","scrollY","size","max","width","height","rippleStyle","opacity","transform","transition","backgroundColor","borderRadius","pointerEvents","componentWillUnmount","render","className","trim","style","PureComponent","displayName","createRipples","createContext","Transition","_React$Component","initialStatus","appear","isMounting","enter","appearStatus","in","unmountOnExit","mountOnEnter","status","nextCallback","_inheritsLoose","getDerivedStateFromProps","_ref","_proto","componentDidMount","updateStatus","componentDidUpdate","nextStatus","cancelNextCallback","getTimeouts","exit","mounting","performEnter","performExit","appearing","_ref2","nodeRef","ReactDOM","findDOMNode","maybeNode","maybeAppearing","timeouts","enterTimeout","config","safeSetState","onEntered","onEnter","onEntering","onTransitionEnd","onExit","onExiting","onExited","nextState","callback","setNextCallback","event","handler","doesNotHaveTimeoutOrListener","addEndListener","_ref3","maybeNextCallback","_this$props","childProps","_objectWithoutPropertiesLoose","TransitionGroupContext","Provider","cloneElement","Children","only","noop","contextType","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","getChildMapping","mapFn","c","child","isValidElement","mapper","getProp","prop","getNextChildMapping","nextProps","prevChildMapping","nextChildMapping","prev","getValueForKey","nextKeysPending","pendingKeys","prevKey","childMapping","nextKey","pendingNextKey","mergeChildMappings","keys","hasPrev","hasNext","prevChild","isLeaving","k","TransitionGroup","handleExited","_assertThisInitialized","contextValue","firstRender","mounted","currentChildMapping","_extends","component","childFactory","POSITION","TOP_LEFT","TOP_RIGHT","TOP_CENTER","BOTTOM_LEFT","BOTTOM_RIGHT","BOTTOM_CENTER","TYPE","INFO","SUCCESS","WARNING","ERROR","DEFAULT","ACTION","NOOP","isValidDelay","val","isNaN","objectValues","canUseDom","falseOrDelay","eventManager","list","emitQueue","on","off","delete","cancelEmit","timers","emit","_len","_key","cssTransition","_ref$duration","duration","_ref$appendPosition","appendPosition","enterDuration","exitDuration","preventExitTransition","enterClassName","exitClassName","classList","animationFillMode","animationDuration","remove","cssText","ProgressBar","_cx","_animationEvent","isRunning","closeToast","hide","userStyle","controlledProgress","progress","rtl","animationPlayState","cx","RT_NAMESPACE","animationEvent","getX","targetTouches","clientX","getY","clientY","iLoveInternetExplorer","test","Toast","_Component","concat","flag","canCloseOnClick","canDrag","drag","x","y","deltaX","removalDistance","boundingRect","ref","pauseToast","autoClose","playToast","onDragStart","nativeEvent","offsetWidth","draggablePercent","onDragMove","abs","onDragEnd","onDragTransitionEnd","_this$boundingRect","bottom","right","pauseOnHover","onExitTransitionEnd","scrollHeight","requestAnimationFrame","minHeight","padding","margin","onOpen","draggable","bindDragEvents","pauseOnFocusLoss","bindFocusEvents","unbindDragEvents","unbindFocusEvents","onClose","closeButton","closeOnClick","hideProgressBar","bodyClassName","progressClassName","progressStyle","updateId","role","toastProps","onMouseEnter","onMouseLeave","parseFloat","onMouseDown","onTouchStart","onMouseUp","onTouchEnd","CloseButton","ariaLabel","containerId","arialLabel","Bounce","ToastContainer","toast","toastKey","collection","isToastActive","content","buildToast","removeToast","dispatchChange","makeCloseButton","toastClose","toastId","getAutoCloseDelay","toastAutoClose","canBeRendered","parseClassName","belongToContainer","enableMultiContainer","toastOptions","toastClassName","appendToast","staleToastId","_extends2","renderToast","_this5","toastToRender","newestOnTop","reverse","_this5$collection$toa","isDocumentHidden","disablePointer","_this6","containers","latestInstance","containerDomNode","containerConfig","queue","lazy","isAnyContainerMounted","getToast","container","getContainer","mergeOptions","getToastId","generateToastId","substr","dispatchToast","body","appendChild","_loop","warn","warning","dismiss","update","oldOptions","oldContent","nextOptions","onChange","configure","containerInstance","item","removeChild","runtime","Op","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","_invoke","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","__await","unwrapped","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","isGeneratorFunction","genFun","ctor","mark","awrap","async","iter","pop","skipTempReset","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function"],"mappings":";qUAMaA,EACuD,YAA/C,oBAAXC,4BAA8CA,OAArB,Y,MAAA,GAAqBA,SAO3CC,EAAkBF,EAAaG,SAAW,GAO1CC,EAAiB,CAC5B,YACA,UACA,QACA,iBACA,aACA,YACA,aACA,YACA,gBACA,gBACA,oBAaK,SAASC,EAAWC,EAAIC,OACzBC,WACKC,+BAAWC,6CACdF,GACFG,aA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AAKA,EAAG,CACpD,IAAIgb,EAAQ/rB,KAAKosB,WAAWrb,GAC5B,GAAIgb,EAAMC,SAAWA,EAAQ,CAC3B,IAAItB,EAASqB,EAAMO,WACnB,GAAoB,UAAhB5B,EAAOnrB,KAAkB,CAC3B,IAAIwuB,EAASrD,EAAOra,IACpBgc,EAAcN,GAEhB,OAAOgC,GAMX,MAAM,IAAItsB,MAAM,0BAGlBusB,cAAe,SAASzB,EAAUZ,EAAYC,GAa5C,OAZA5rB,KAAKkqB,SAAW,CACd5pB,SAAUgJ,EAAOijB,GACjBZ,WAAYA,EACZC,QAASA,GAGS,SAAhB5rB,KAAKuD,SAGPvD,KAAKqQ,SA9rBPK,GAisBO2Z,IAQJrb,EA9sBM,CAqtBgBD,EAAOC,SAGtC,IACEif,mBAAqBnF,EACrB,MAAOoF,GAWmB,kBAAfC,WACTA,WAAWF,mBAAqBnF,EAEhCsF,SAAS,IAAK,yBAAdA,CAAwCtF,K,kBC/uB5C,SAASpZ,EAAQ/K,GAGf,OAAQoK,EAAOC,QAAUU,EAAU,mBAAqBnP,QAAU,iBAAmBA,OAAOD,SAAW,SAAUqE,GAC/G,cAAcA,GACZ,SAAUA,GACZ,OAAOA,GAAO,mBAAqBpE,QAAUoE,EAAI0K,cAAgB9O,QAAUoE,IAAQpE,OAAO6O,UAAY,gBAAkBzK,GACvHoK,EAAOC,QAAQS,YAAa,EAAMV,EAAOC,QAAiB,QAAID,EAAOC,QAAUU,EAAQ/K,GAG5FoK,EAAOC,QAAUU,EAASX,EAAOC,QAAQS,YAAa,EAAMV,EAAOC,QAAiB,QAAID,EAAOC,S,0CCO7FD,EAAOC,QAAUsC,EAAQ,KAARA","file":"static/js/32.509dd633.chunk.js","sourcesContent":["/**\n * Determine if we are in a browser\n * or a server environment\n * @type {Boolean}\n * @private\n */\nexport const IS_BROWSER =\n (typeof window === 'undefined' ? 'undefined' : typeof window) === 'object'\n\n/**\n * Default element to listen for events on\n * @type {Object}\n * @private\n */\nexport const DEFAULT_ELEMENT = IS_BROWSER ? document : {}\n\n/**\n * The default events to determine activity\n * @type {Array}\n * @private\n */\nexport const DEFAULT_EVENTS = [\n 'mousemove',\n 'keydown',\n 'wheel',\n 'DOMMouseScroll',\n 'mousewheel',\n 'mousedown',\n 'touchstart',\n 'touchmove',\n 'MSPointerDown',\n 'MSPointerMove',\n 'visibilitychange'\n]\n\n/**\n * Creates a debounced function that delays invoking func until\n * after delay milliseconds has elapsed since the last time the\n * debounced function was invoked.\n * @name debounced\n * @param {Function} fn Function to debounce\n * @param {Number} delay How long to wait\n * @return {Function} Executed Function\n * @private\n **/\nexport function debounced (fn, delay) {\n let timerId\n function result (...args) {\n if (timerId) {\n clearTimeout(timerId)\n }\n timerId = setTimeout(() => {\n fn(...args)\n timerId = null\n }, delay)\n }\n\n result.cancel = function () {\n clearTimeout(timerId)\n }\n\n return result\n}\n\n/**\n * Creates a throttled function that only invokes func at most\n * once per every wait milliseconds.\n * @name throttled\n * @param {Function} fn Function to debounce\n * @param {Number} delay How long to wait\n * @return {Function} Executed Function\n * @private\n **/\nexport function throttled (fn, delay) {\n let lastCall = 0\n return function (...args) {\n const now = new Date().getTime()\n if (now - lastCall < delay) {\n return\n }\n lastCall = now\n return fn(...args)\n }\n}\n\nlet lastMs = 0\nlet additional = 0\n\n/**\n * Returns current time in microseconds.\n *\n * @returns {Number} current time in microseconds\n * @private\n */\nexport function microSeconds () {\n const ms = new Date().getTime()\n if (ms === lastMs) {\n additional++\n return ms * 1000 + additional\n } else {\n lastMs = ms\n additional = 0\n return ms * 1000\n }\n}\n\n/**\n * Generate and return a random token.\n *\n * @returns {String} Random token.\n * @private\n */\nexport function randomToken () {\n return Math.random().toString(36).substring(2)\n}\n\n/**\n * Checks if a js object is a promise.\n *\n * @param {*} obj Any javascript object.\n * @returns {Boolean} Wether or not this object is a promise.\n */\nexport function isPromise (obj) {\n if (obj && typeof obj.then === 'function') {\n /* istanbul ignore next */\n return true\n } else {\n return false\n }\n}\n\n/**\n * Sleeps for x amount of milliseconds.\n *\n * @param {Number} time Amount of time in milliseconds.\n * @returns {Promise}\n * @private\n */\nexport function sleep (time = 0) {\n return new Promise(resolve => setTimeout(resolve, time))\n}\n\n/**\n * Get the current timestamp.\n *\n * @returns {Number}\n * @private\n */\nexport function now () {\n return new Date().getTime()\n}\n\n/**\n * Waits until the given function returns true\n * @param {function} fn\n * @return {Promise}\n */\nexport function waitUntil (fn, timeout = 0, interval = 20) {\n let timedOut = false\n let ok = false\n\n /* istanbul ignore next */\n if (timeout !== 0) {\n sleep(timeout).then(() => {\n timedOut = true\n })\n }\n\n return new Promise((resolve, reject) => {\n const runLoop = () => {\n if (ok) {\n resolve()\n return\n }\n /* istanbul ignore next */\n if (timedOut) {\n reject(new Error(`❌ waitUntil reached timeout of ${timeout}ms`))\n return\n }\n sleep(interval).then(() => {\n ok = fn()\n runLoop()\n })\n }\n runLoop()\n })\n}\n","/* eslint-env browser */\nimport { microSeconds } from '../../utils'\n\nexport const type = 'broadcastChannel'\n\nexport function create (channelName) {\n const state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName)\n }\n\n state.bc.onmessage = msg => {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data)\n }\n }\n\n return state\n}\n\nexport function close (channelState) {\n channelState.bc.close()\n}\n\nexport function postMessage (channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false)\n return Promise.resolve()\n } catch (err) {\n /* istanbul ignore next */\n return Promise.reject(err)\n }\n}\n\nexport function onMessage (channelState, fn) {\n channelState.messagesCallback = fn\n}\n\nexport function canBeUsed () {\n if (typeof BroadcastChannel === 'function') {\n return true\n } else {\n /* istanbul ignore next */\n return false\n }\n}\n\nexport function averageResponseTime () {\n return 150\n}\n\nexport default {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n}\n","import { now } from '../utils'\n\nexport default class ObliviousSet {\n constructor (ttl = 1000 * 60) {\n this.ttl = ttl\n this.set = new Set()\n this.timeMap = new Map()\n }\n\n has (value) {\n return this.set.has(value)\n }\n\n add (value) {\n this.timeMap.set(value, now())\n this.set.add(value)\n this._removeTooOldValues()\n }\n\n clear () {\n this.set.clear()\n this.timeMap.clear()\n }\n\n _removeTooOldValues () {\n const olderThen = now() - this.ttl\n const iterator = this.set[Symbol.iterator]()\n\n while (true) {\n const value = iterator.next().value\n if (!value) return // no more elements\n const time = this.timeMap.get(value)\n if (time < olderThen) {\n this.timeMap.delete(value)\n this.set.delete(value)\n } else {\n // We reached a value that is not old enough\n return\n }\n }\n }\n}\n","import ObliviousSet from '../ObliviousSet'\n\nimport {\n randomToken,\n microSeconds\n} from '../../utils'\n\nexport const type = 'localStorage'\n\n/**\n * Returns local storage instance\n */\nexport function getLocalStorage () {\n let localStorage\n if (typeof window === 'undefined') return null\n try {\n localStorage = window.localStorage\n localStorage = window['ie8-eventlistener/storage'] || window.localStorage\n } catch (e) {\n // New versions of Firefox throw a Security exception\n // if cookies are disabled. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1028153\n }\n return localStorage\n}\n\nexport function storageKey (channelName) {\n return channelName\n}\n\n/**\n* writes the new message to the storage\n* and fires the storage-event so other readers can find it\n*/\nexport function postMessage (channelState, messageJson) {\n return new Promise(resolve => {\n const key = storageKey(channelState.channelName)\n const writeObj = {\n token: randomToken(),\n time: new Date().getTime(),\n data: messageJson,\n uuid: channelState.uuid\n }\n const value = JSON.stringify(writeObj)\n getLocalStorage().setItem(key, value)\n\n /**\n * StorageEvent does not fire the 'storage' event\n * in the window that changes the state of the local storage.\n * So we fire it manually\n */\n const ev = document.createEvent('Event')\n ev.initEvent('storage', true, true)\n ev.key = key\n ev.newValue = value\n window.dispatchEvent(ev)\n\n resolve()\n })\n}\n\nexport function addStorageEventListener (channelName, fn) {\n const key = storageKey(channelName)\n const listener = ev => {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue))\n }\n }\n window.addEventListener('storage', listener)\n return listener\n}\nexport function removeStorageEventListener (listener) {\n window.removeEventListener('storage', listener)\n}\n\nexport function create (channelName, options = {}) {\n if (!canBeUsed()) {\n /* istanbul ignore next */\n throw new Error('❌ localStorage cannot be used.')\n }\n\n const uuid = randomToken()\n\n /**\n * eMIs\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n const eMIs = new ObliviousSet(options.removeTimeout)\n\n const state = {\n channelName,\n uuid,\n eMIs // emittedMessagesIds\n }\n\n state.listener = addStorageEventListener(\n channelName,\n (msgObj) => {\n if (!state.messagesCallback) return // no listener\n if (msgObj.uuid === uuid) return // own message\n if (!msgObj.token || eMIs.has(msgObj.token)) return // already emitted\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime) return // too old\n\n eMIs.add(msgObj.token)\n state.messagesCallback(msgObj.data)\n }\n )\n\n return state\n}\n\nexport function close (channelState) {\n removeStorageEventListener(channelState.listener)\n}\n\nexport function onMessage (channelState, fn, time) {\n channelState.messagesCallbackTime = time\n channelState.messagesCallback = fn\n}\n\nexport function canBeUsed () {\n const ls = getLocalStorage()\n\n if (!ls) return false\n\n try {\n const key = '__check'\n ls.setItem(key, 'works')\n ls.removeItem(key)\n } catch (e) {\n // Safari 10 in private mode will not allow write access to local\n // storage and fail with a QuotaExceededError. See\n // https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API#Private_Browsing_Incognito_modes\n\n /* istanbul ignore next */\n return false\n }\n\n return true\n}\n\n/* istanbul ignore next */\nexport function averageResponseTime () {\n const defaultTime = 120\n const userAgent = navigator.userAgent.toLowerCase()\n if (userAgent.includes('safari') && !userAgent.includes('chrome')) {\n // safari is much slower so this time is higher\n return defaultTime * 2\n }\n return defaultTime\n}\n\nexport default {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n}\n","import { microSeconds } from '../../utils'\n\nexport const type = 'simulate'\n\nconst SIMULATE_CHANNELS = new Set()\n\nexport function create (channelName) {\n const state = {\n name: channelName,\n messagesCallback: null\n }\n SIMULATE_CHANNELS.add(state)\n\n return state\n}\n\nexport function close (channelState) {\n SIMULATE_CHANNELS.delete(channelState)\n}\n\nexport function postMessage (channelState, messageJson) {\n return new Promise(resolve => setTimeout(() => {\n const channelArray = Array.from(SIMULATE_CHANNELS)\n channelArray\n .filter(channel => channel.name === channelState.name)\n .filter(channel => channel !== channelState)\n .filter(channel => !!channel.messagesCallback)\n .forEach(channel => channel.messagesCallback(messageJson))\n resolve()\n }, 5))\n}\n\nexport function onMessage (channelState, fn) {\n channelState.messagesCallback = fn\n}\n\n/* istanbul ignore next */\nexport function canBeUsed () {\n return true\n}\n\n/* istanbul ignore next */\nexport function averageResponseTime () {\n return 5\n}\n\nexport default {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n}\n","import BroadcastChannelMethod from './methods/broadcastChannel'\nimport LocalStorageMethod from './methods/localStorage'\nimport SimulateMethod from './methods/simulate'\n\n// Order is important\nconst METHODS = [\n BroadcastChannelMethod,\n LocalStorageMethod\n]\n\nexport function chooseMethod (options = {}) {\n if (options.type) {\n // For testing\n if (options.type === 'simulate') {\n return SimulateMethod\n }\n\n // Chosen type\n const method = METHODS.find(m => m.type === options.type)\n if (!method) throw new Error(`❌ Method ${options.type} is not supported.`)\n else return method\n }\n\n const useMethod = METHODS.find(method => method.canBeUsed())\n\n /* istanbul ignore next */\n if (!useMethod) {\n throw new Error(`❌ No method found ${JSON.stringify(METHODS.map(m => m.type))}`)\n }\n return useMethod\n}\n","import { chooseMethod } from './methodChooser'\nimport { isPromise } from '../utils'\n\nexport class MessageChannel {\n constructor (name, options = {}) {\n this.name = name\n this.options = options\n this.method = chooseMethod(this.options)\n this.closed = false\n\n // isListening\n this._isListening = false\n\n /**\n * _onMessageListener\n * setting onmessage twice,\n * will overwrite the first listener\n */\n this._onMessageListener = null\n\n /**\n * _addEventListeners\n */\n this._addEventListeners = {\n message: [],\n internal: []\n }\n\n /**\n * Un send message promises\n * where the sending is still in progress\n * @type {Set}\n */\n this._unSendMessagePromises = new Set()\n\n /**\n * _beforeClose\n * array of promises that will be awaited\n * before the channel is closed\n */\n this._beforeClose = []\n\n /**\n * _preparePromise\n */\n this._preparePromises = null\n _prepareChannel(this)\n }\n\n postMessage (msg) {\n if (this.closed) {\n throw new Error(\n '❌ Cannot post message after channel has closed'\n )\n }\n return _post(this, 'message', msg)\n }\n\n postInternal (msg) {\n return _post(this, 'internal', msg)\n }\n\n set onmessage (fn) {\n const time = this.method.microSeconds()\n const listenObj = {\n time,\n fn\n }\n _removeListenerObject(this, 'message', this._onMessageListener)\n if (fn && typeof fn === 'function') {\n this._onMessageListener = listenObj\n _addListenerObject(this, 'message', listenObj)\n } else {\n /* istanbul ignore next */\n this._onMessageListener = null\n }\n }\n\n /* istanbul ignore next */\n get onmessage () {\n return this._onMessageListener\n }\n\n addEventListener (type, fn) {\n const time = this.method.microSeconds()\n const listenObj = {\n time,\n fn\n }\n _addListenerObject(this, type, listenObj)\n }\n\n removeEventListener (type, fn) {\n const obj = this._addEventListeners[type].find(obj => obj.fn === fn)\n _removeListenerObject(this, type, obj)\n }\n\n close () {\n if (this.closed) {\n return\n }\n this.closed = true\n const awaitPrepare = this._preparePromises ? this._preparePromises : Promise.resolve()\n\n this._onMessageListener = null\n this._addEventListeners.message = []\n\n return awaitPrepare\n // Wait until all current sending are processed\n .then(() => Promise.all(Array.from(this._unSendMessagePromises)))\n // Run before-close hooks\n .then(() => Promise.all(this._beforeClose.map(fn => fn())))\n // Close the channel\n .then(() => this.method.close(this._state))\n }\n\n get type () {\n return this.method.type\n }\n\n isClosed () {\n return this.closed\n }\n}\n\nfunction _post (messageChannel, type, msg) {\n const time = messageChannel.method.microSeconds()\n const msgObj = {\n time,\n type,\n data: msg\n }\n\n const awaitPrepare = messageChannel._preparePromises ? messageChannel._preparePromises : Promise.resolve()\n return awaitPrepare.then(() => {\n const sendPromise = messageChannel.method.postMessage(\n messageChannel._state,\n msgObj\n )\n\n // add/remove to un-send messages list\n messageChannel._unSendMessagePromises.add(sendPromise)\n sendPromise\n .catch()\n .then(() => messageChannel._unSendMessagePromises.delete(sendPromise))\n\n return sendPromise\n })\n}\n\nfunction _prepareChannel (channel) {\n const maybePromise = channel.method.create(channel.name, channel.options)\n /* istanbul ignore next */\n if (isPromise(maybePromise)) {\n channel._preparePromises = maybePromise\n maybePromise.then(s => {\n channel._state = s\n })\n } else {\n channel._state = maybePromise\n }\n}\n\nfunction _hasMessageListeners (channel) {\n if (channel._addEventListeners.message.length > 0) return true\n if (channel._addEventListeners.internal.length > 0) return true\n return false\n}\n\nfunction _addListenerObject (channel, type, obj) {\n channel._addEventListeners[type].push(obj)\n _startListening(channel)\n}\n\nfunction _removeListenerObject (channel, type, obj) {\n channel._addEventListeners[type] = channel._addEventListeners[type].filter(o => o !== obj)\n _stopListening(channel)\n}\n\nfunction _startListening (channel) {\n if (!channel._isListening && _hasMessageListeners(channel)) {\n // someone is listening, start subscribing\n\n const listenerFn = msgObj => {\n channel._addEventListeners[msgObj.type].forEach(obj => {\n if (msgObj.time >= obj.time) {\n obj.fn(msgObj.data)\n }\n })\n }\n\n const time = channel.method.microSeconds()\n if (channel._preparePromises) {\n /* istanbul ignore next */\n channel._preparePromises.then(() => {\n channel._isListening = true\n channel.method.onMessage(\n channel._state,\n listenerFn,\n time\n )\n })\n } else {\n channel._isListening = true\n channel.method.onMessage(\n channel._state,\n listenerFn,\n time\n )\n }\n }\n}\n\nfunction _stopListening (channel) {\n if (channel._isListening && !_hasMessageListeners(channel)) {\n // no one is listening, stop subscribing\n channel._isListening = false\n const time = channel.method.microSeconds()\n channel.method.onMessage(\n channel._state,\n null,\n time\n )\n }\n}\n","import { IS_BROWSER, sleep, randomToken } from '../utils'\n\nclass LeaderElection {\n constructor (channel, options) {\n this._channel = channel\n this._options = options\n\n this.isLeader = false\n this.isDead = false\n this.token = randomToken()\n\n this._isApplying = false\n this._reApply = false\n\n // things to clean up\n this._unloadFns = []\n this._listeners = []\n this._intervals = []\n this._duplicateListeners = () => { }\n this._duplicateCalled = false\n this._onBeforeDie = async () => {}\n\n const unloadFn = async () => this.die()\n\n if (IS_BROWSER) {\n window.addEventListener('beforeUnload', unloadFn)\n window.addEventListener('unload', unloadFn)\n\n this._unloadFns.push(['beforeUnload', unloadFn])\n this._unloadFns.push(['unload', unloadFn])\n }\n }\n\n applyOnce () {\n if (this.isLeader) return Promise.resolve(false)\n if (this.isDead) return Promise.resolve(false)\n\n // do nothing if already running\n if (this._isApplying) {\n this._reApply = true\n return Promise.resolve(false)\n }\n this._isApplying = true\n\n let stopCriteria = false\n const received = []\n\n const handleMessage = (msg) => {\n if (msg.context === 'leader' && msg.token !== this.token) {\n received.push(msg)\n\n if (msg.action === 'apply') {\n // Other is applying\n if (msg.token > this.token) {\n // Other has higher token, stop applying\n stopCriteria = true\n }\n }\n\n if (msg.action === 'tell') {\n // Other is already leader\n stopCriteria = true\n }\n }\n }\n this._channel.addEventListener('internal', handleMessage)\n\n return _sendMessage(this, 'apply') // send out that this one is applying\n .then(() => sleep(this._options.responseTime)) // let others time to respond\n .then(() => {\n if (stopCriteria) return Promise.reject(new Error())\n else return _sendMessage(this, 'apply')\n })\n .then(() => sleep(this._options.responseTime)) // let others time to respond\n .then(() => {\n if (stopCriteria) return Promise.reject(new Error())\n else return _sendMessage(this)\n })\n .then(() => beLeader(this)) // no one disagreed -> this one is now leader\n .then(() => true)\n .catch(() => false) // apply not successful\n .then(success => {\n this._channel.removeEventListener('internal', handleMessage)\n this._isApplying = false\n if (!success && this._reApply) {\n this._reApply = false\n return this.applyOnce()\n } else return success\n })\n }\n\n awaitLeadership () {\n if (\n !this._awaitLeadershipPromise\n ) {\n this._awaitLeadershipPromise = _awaitLeadershipOnce(this)\n }\n return this._awaitLeadershipPromise\n }\n\n set onDuplicate (fn) {\n this._duplicateListeners = fn\n }\n\n /* istanbul ignore next */\n get onDuplicate () {\n return this._duplicateListeners\n }\n\n set onBeforeDie (fn) {\n this._onBeforeDie = fn\n }\n\n /* istanbul ignore next */\n get onBeforeDie () {\n return this._onBeforeDie\n }\n\n async die () {\n if (this.isDead) return\n this.isDead = true\n\n await this.onBeforeDie()\n this._listeners.forEach(listener => this._channel.removeEventListener('internal', listener))\n this._intervals.forEach(interval => clearInterval(interval))\n this._unloadFns.forEach(uFn => {\n if (IS_BROWSER) {\n window.removeEventListener(uFn[0], uFn[1])\n }\n })\n return _sendMessage(this, 'death')\n }\n}\n\nfunction _awaitLeadershipOnce (leaderElector) {\n if (leaderElector.isLeader) return Promise.resolve()\n\n return new Promise(resolve => {\n let resolved = false\n\n function finish () {\n /* istanbul ignore next */\n if (resolved) {\n return\n }\n resolved = true\n clearInterval(interval)\n leaderElector._channel.removeEventListener('internal', whenDeathListener)\n resolve(true)\n }\n\n // try once now\n leaderElector.applyOnce().then(() => {\n if (leaderElector.isLeader) {\n finish()\n }\n })\n\n // try on fallbackInterval\n const interval = setInterval(() => {\n /* istanbul ignore next */\n leaderElector.applyOnce().then(() => {\n if (leaderElector.isLeader) {\n finish()\n }\n })\n }, leaderElector._options.fallbackInterval)\n leaderElector._intervals.push(interval)\n\n // try when other leader dies\n const whenDeathListener = msg => {\n if (msg.context === 'leader' && msg.action === 'death') {\n leaderElector.applyOnce().then(() => {\n if (leaderElector.isLeader) finish()\n })\n }\n }\n leaderElector._channel.addEventListener('internal', whenDeathListener)\n leaderElector._listeners.push(whenDeathListener)\n })\n}\n\n/**\n * Sends and internal message over the broadcast-channel\n */\nfunction _sendMessage (leaderElector, action) {\n const msgJson = {\n context: 'leader',\n action,\n token: leaderElector.token\n }\n return leaderElector._channel.postInternal(msgJson)\n}\n\nexport function beLeader (leaderElector) {\n leaderElector.isLeader = true\n\n const isLeaderListener = msg => {\n if (msg.context === 'leader' && msg.action === 'apply') {\n _sendMessage(leaderElector, 'tell')\n }\n\n if (msg.context === 'leader' && msg.action === 'tell' && !leaderElector._duplicateCalled) {\n /**\n * Another instance is also leader!\n * This can happen on rare events\n * like when the CPU is at 100% for long time\n * or the tabs are open very long and the browser throttles them.\n */\n leaderElector._duplicateCalled = true\n leaderElector._duplicateListeners() // message the lib user so the app can handle the problem\n _sendMessage(leaderElector, 'tell') // ensure other leader also knows the problem\n }\n }\n leaderElector._channel.addEventListener('internal', isLeaderListener)\n leaderElector._listeners.push(isLeaderListener)\n return _sendMessage(leaderElector, 'tell')\n}\n\nexport function createLeaderElection (channel, options) {\n if (channel._leaderElector) {\n throw new Error('❌ MessageChannel already has a leader-elector')\n }\n\n const elector = new LeaderElection(channel, options)\n channel._beforeClose.push(async () => elector.die())\n\n channel._leaderElector = elector\n return elector\n}\n","import { MessageChannel, createLeaderElection } from './MessageChannel'\nexport const TabManager = ({\n type,\n channelName,\n fallbackInterval,\n responseTime,\n emitOnAllTabs,\n callbacks,\n start,\n reset,\n pause,\n resume\n}) => {\n const channel = new MessageChannel(channelName, { type })\n const elector = createLeaderElection(channel, { fallbackInterval, responseTime })\n const registry = {}\n\n // Register self\n registry[elector.token] = false\n\n let leader = false\n let allIdle = true\n\n const isLeader = () => leader\n\n elector.awaitLeadership().then(() => {\n leader = true\n })\n\n channel.addEventListener('message', ([type, id]) => {\n switch (type) {\n case 'register':\n registry[id] = false\n break\n case 'deregister':\n delete registry[id]\n break\n case 'idle':\n idle(id)\n break\n case 'active':\n active(id)\n break\n case 'emitIdle':\n callbacks.onIdle()\n break\n case 'emitActive':\n callbacks.onActive()\n break\n case 'start':\n start(true)\n break\n case 'reset':\n reset(true)\n break\n case 'pause':\n pause(true)\n break\n case 'resume':\n resume(true)\n break\n default:\n // no op\n }\n })\n\n const setAllIdle = bool => {\n allIdle = bool\n }\n\n const isAllIdle = () => allIdle\n\n const idle = (id = elector.token) => {\n registry[id] = true\n const isIdle = Object.values(registry).every(v => v)\n if (!allIdle && isIdle) {\n allIdle = true\n if (isLeader()) {\n callbacks.onIdle()\n if (emitOnAllTabs) send('emitIdle')\n } else {\n send('idle')\n }\n }\n }\n\n const active = (id = elector.token) => {\n registry[id] = false\n const isActive = Object.values(registry).some(v => !v)\n if (allIdle && isActive) {\n allIdle = false\n if (isLeader()) {\n callbacks.onActive()\n if (emitOnAllTabs) send('emitActive')\n } else {\n send('active')\n }\n }\n }\n\n /* istanbul ignore next */\n elector.onDuplicate = async () => await elector.die()\n elector.onBeforeDie = async () => await send('deregister')\n\n const send = async message => channel.postMessage([message, elector.token])\n\n const close = async () => {\n await elector.die()\n await channel.close()\n }\n\n // Register self with remote tabs\n send('register')\n\n return { close, send, isLeader, idle, active, isAllIdle, setAllIdle }\n}\n","/**\n * ___ _ _ _____ _\n * |_ _|__| | | __|_ _(_)_ __ ___ ___ _ __\n * | |/ _` | |/ _ \\| | | | '_ ` _ \\ / _ \\ '__|\n * | | (_| | | __/| | | | | | | | | __/ |\n * |___\\__,_|_|\\___||_| |_|_| |_| |_|\\___|_|\n *\n * @name IdleTimer\n * @author Randy Lebeau\n * @private\n */\n\nimport { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport { TabManager } from './TabManager'\nimport { IS_BROWSER, DEFAULT_ELEMENT, DEFAULT_EVENTS, debounced, throttled } from './utils'\n\n/**\n * Detects when your user is idle\n * @class IdleTimer\n * @private\n */\nclass IdleTimer extends Component {\n /**\n * Creates an instance of IdleTimer\n * bind all of our internal events here\n * for best performance\n * @param {Object} props\n * @return {IdleTimer}\n * @private\n */\n constructor (props) {\n super(props)\n\n /**\n * Sets initial component state\n * @type {Object}\n * @private\n */\n this.state = {\n idle: false,\n oldDate: +new Date(),\n lastActive: +new Date(),\n lastIdle: null,\n idleTime: 0,\n remaining: null,\n pageX: null,\n pageY: null\n }\n\n /**\n * The timer instance\n * @type {Timeout}\n * @private\n */\n this.tId = null\n\n /**\n * Wether or not events are bound\n * @type {boolean}\n * @private\n */\n this.eventsBound = false\n\n this.callbackRefs = {}\n\n // Debounce and throttle can't both be set\n if (props.debounce > 0 && props.throttle > 0) {\n throw new Error('onAction can either be throttled or debounced (not both)')\n }\n\n // Create debounced action if applicable\n if (props.debounce > 0) {\n this._onAction = debounced(props.onAction, props.debounce)\n\n // Create throttled action if applicable\n } else if (props.throttle > 0) {\n this._onAction = throttled(props.onAction, props.throttle)\n\n // Set custom onAction\n } else {\n this._onAction = props.onAction\n }\n\n // Create a throttle event handler if applicable\n if (props.eventsThrottle > 0) {\n this.handleEvent = throttled(this._handleEvent.bind(this), props.eventsThrottle)\n } else {\n this.handleEvent = this._handleEvent.bind(this)\n }\n\n // If startOnMount is set, idle state defaults to true\n if (!props.startOnMount || props.startManually) {\n this.state.idle = true\n }\n\n // Bind all events to component scope, built for speed 🚀\n this._toggleIdleState = this._toggleIdleState.bind(this)\n this.start = this.start.bind(this)\n this.reset = this.reset.bind(this)\n this.pause = this.pause.bind(this)\n this.resume = this.resume.bind(this)\n this.isIdle = this.isIdle.bind(this)\n this.getRemainingTime = this.getRemainingTime.bind(this)\n this.getElapsedTime = this.getElapsedTime.bind(this)\n this.getLastActiveTime = this.getLastActiveTime.bind(this)\n this.getLastIdleTime = this.getLastIdleTime.bind(this)\n this.getTotalIdleTime = this.getTotalIdleTime.bind(this)\n this.getTotalActiveTime = this.getTotalActiveTime.bind(this)\n }\n\n /**\n * Runs once the component has mounted\n * here we handle automatically starting\n * the idletimer\n * @private\n */\n componentDidMount () {\n const { startOnMount, startManually } = this.props\n\n // Set up cross tab\n this._setupTabManager()\n\n if (startManually) return\n if (startOnMount) {\n this.start()\n } else {\n this._bindEvents()\n }\n }\n\n componentDidUpdate (prevProps) {\n // Update debounce function\n if ((prevProps.debounce !== this.props.debounce) && this.props.debounce > 0) {\n if (this._onAction.cancel) this._onAction.cancel()\n this._onAction = debounced(this.props.onAction, this.props.debounce)\n } else\n // Update throttle function\n if ((prevProps.throttle !== this.props.throttle) && this.props.throttle > 0) {\n if (this._onAction.cancel) this._onAction.cancel()\n this._onAction = throttled(this.props.onAction, this.props.throttle)\n } else\n // Remove throttle or debounce\n if (\n (prevProps.throttle && this.props.throttle === 0) ||\n (prevProps.debounce && this.props.debounce === 0)\n ) {\n if (this._onAction.cancel) this._onAction.cancel()\n this._onAction = this.props.onAction\n }\n\n // Update event throttle function\n if (prevProps.eventsThrottle !== this.props.eventsThrottle) {\n this._unbindEvents()\n this.handleEvent = throttled(this._handleEvent.bind(this), this.props.eventsThrottle)\n this._bindEvents()\n }\n // Update timeout value\n if (prevProps.timeout !== this.props.timeout) {\n if (this.state.idle) this.reset()\n }\n\n // Update callback refs\n if (prevProps.onActive !== this.props.onActive) this.callbackRefs.onActive = this.props.onActive\n if (prevProps.onIdle !== this.props.onIdle) this.callbackRefs.onIdle = this.props.onIdle\n }\n\n /**\n * Called before the component un-mounts\n * here we clear the timer and remove\n * all the event listeners\n * @private\n */\n componentWillUnmount () {\n // Clear timeout to prevent delayed state changes\n clearTimeout(this.tId)\n this._unbindEvents(true)\n // Cancel any debounced onAction handlers\n if (this._onAction.cancel) this._onAction.cancel()\n /* istanbul ignore next */\n if (this.manager) {\n this.manager.close().catch(console.error)\n }\n }\n\n /**\n * Render children if IdleTimer is used as a wrapper\n * @return {Component} children\n * @private\n */\n render () {\n const { children } = this.props\n return children || null\n }\n\n /**\n * Setup the Tab Manager.\n * @private\n */\n _setupTabManager () {\n const { crossTab, onIdle, onActive } = this.props\n this.callbackRefs = { onIdle, onActive }\n\n /* istanbul ignore next */\n if (crossTab) {\n const {\n type,\n channelName,\n fallbackInterval,\n responseTime,\n emitOnAllTabs\n } = Object.assign({\n channelName: 'idle-timer',\n fallbackInterval: 2000,\n responseTime: 100,\n removeTimeout: 1000 * 60,\n emitOnAllTabs: false\n }, crossTab === true ? {} : crossTab)\n\n this.manager = TabManager({\n type,\n channelName,\n fallbackInterval,\n responseTime,\n emitOnAllTabs,\n callbacks: this.callbackRefs,\n start: this.start,\n reset: this.reset,\n pause: this.pause,\n resume: this.resume\n })\n }\n }\n\n /**\n * Binds the specified events\n * @private\n */\n _bindEvents () {\n // Don't bind events if\n // we are not in a browser\n if (!IS_BROWSER) return\n // Otherwise we bind all the events\n // to the supplied element\n const { element, events, passive, capture } = this.props\n if (!this.eventsBound) {\n events.forEach(e => {\n element.addEventListener(e, this.handleEvent, {\n capture,\n passive\n })\n })\n this.eventsBound = true\n }\n }\n\n /**\n * Unbinds all the bound events\n * @private\n */\n _unbindEvents (force = false) {\n // If we are not in a browser\n // we don't need to unbind events\n if (!IS_BROWSER) return\n // Unbind all events\n const { element, events, passive, capture } = this.props\n if (this.eventsBound || force) {\n events.forEach(e => {\n element.removeEventListener(e, this.handleEvent, {\n capture,\n passive\n })\n })\n this.eventsBound = false\n }\n }\n\n /**\n * Toggles the idle state and calls\n * the correct action function\n * @private\n */\n _toggleIdleState (e) {\n // Fire the appropriate action\n // and pass the event through\n // Toggle the idle state\n this.setState((prevState) => ({\n idle: !prevState.idle,\n lastIdle: !prevState.idle ? (+new Date()) - this.props.timeout : prevState.lastIdle,\n idleTime: prevState.idle ? prevState.idleTime + (+new Date()) - prevState.lastIdle : prevState.idleTime\n }), () => {\n const { onActive, onIdle, stopOnIdle } = this.props\n const { idle } = this.state\n if (idle) {\n if (stopOnIdle) {\n // Clear any existing timeout\n clearTimeout(this.tId)\n this.tId = null\n // Unbind events\n this._unbindEvents()\n }\n\n if (this.manager) {\n /* istanbul ignore next */\n this.manager.idle()\n } else {\n onIdle(e)\n }\n } else {\n this._bindEvents()\n if (this.manager) {\n /* istanbul ignore next */\n this.manager.active()\n } else {\n onActive(e)\n }\n }\n })\n }\n\n /**\n * Event handler for supported event types\n * @param {Object} e event object\n * @private\n */\n _handleEvent (e) {\n const { remaining, pageX, pageY, idle } = this.state\n const { timeout, stopOnIdle } = this.props\n\n // Fire onAction event\n this._onAction(e)\n\n // Already active, ignore events\n if (remaining) return\n\n // Mousemove event\n if (e.type === 'mousemove') {\n // If coords are same, it didn't move\n /* istanbul ignore next */\n if (e.pageX === pageX && e.pageY === pageY) {\n return\n }\n // If coords don't exist how could it move\n if (typeof e.pageX === 'undefined' && typeof e.pageY === 'undefined') {\n return\n }\n // Under 200 ms is hard to do\n // continuous activity will bypass this\n /* istanbul ignore next */\n const elapsed = this.getElapsedTime()\n /* istanbul ignore next */\n if (elapsed < 200) {\n return\n }\n }\n\n // Clear any existing timeout\n clearTimeout(this.tId)\n this.tId = null\n\n // Determine last time User was active, as can't rely on setTimeout ticking at the correct interval\n const elapsedTimeSinceLastActive = +new Date() - this.getLastActiveTime()\n\n // If the user is idle or last active time is more than timeout, flip the idle state\n if ((idle && !stopOnIdle) || (!idle && elapsedTimeSinceLastActive > timeout)) {\n this._toggleIdleState(e)\n }\n\n // Store when the user was last active\n // and update the mouse coordinates\n this.setState({\n lastActive: +new Date(),\n pageX: e.pageX,\n pageY: e.pageY\n })\n\n // If the user is idle and stopOnIdle flag is not set\n // set a new timeout\n if (idle) {\n if (!stopOnIdle) {\n this.tId = setTimeout(this._toggleIdleState, timeout)\n }\n } else {\n this.tId = setTimeout(this._toggleIdleState, timeout)\n }\n }\n\n /**\n * Set initial state and start timer\n * @name start\n */\n start (remote = true) {\n // Clear timeout\n clearTimeout(this.tId)\n this.tId = null\n\n // Bind the events\n this._bindEvents()\n\n // Reset state\n this.setState({\n idle: false,\n oldDate: +new Date(),\n lastActive: +new Date(),\n remaining: null\n })\n\n if (this.manager) {\n /* istanbul ignore next */\n this.manager.setAllIdle(false)\n /* istanbul ignore next */\n if (!remote && this.props.crossTab.emitOnAllTabs) {\n this.manager.send('start')\n }\n }\n\n // Set new timeout\n const { timeout } = this.props\n this.tId = setTimeout(this._toggleIdleState, timeout)\n }\n\n /**\n * Restore initial state and restart timer, calling onActive\n * @name reset\n */\n reset (remote = false) {\n // Clear timeout\n clearTimeout(this.tId)\n this.tId = null\n\n // Bind the events\n this._bindEvents()\n\n if (this.state.idle) {\n if (this.manager) {\n /* istanbul ignore next */\n this.manager.active()\n } else {\n this.props.onActive()\n }\n }\n\n if (this.manager) {\n /* istanbul ignore next */\n this.manager.setAllIdle(false)\n /* istanbul ignore next */\n if (!remote && this.props.crossTab.emitOnAllTabs) {\n this.manager.send('reset')\n }\n }\n\n // Reset state\n this.setState({\n idle: false,\n oldDate: +new Date(),\n lastActive: +new Date(),\n remaining: null\n })\n\n // Set new timeout\n const { timeout } = this.props\n this.tId = setTimeout(this._toggleIdleState, timeout)\n }\n\n /**\n * Store remaining time and stop timer\n * @name pause\n */\n pause (remote = false) {\n // Timer is already paused\n const { remaining } = this.state\n if (remaining !== null) return\n\n // Unbind events\n this._unbindEvents()\n\n // Clear existing timeout\n clearTimeout(this.tId)\n this.tId = null\n\n // Send event to other tabs\n if (this.manager) {\n /* istanbul ignore next */\n if (!remote && this.props.crossTab.emitOnAllTabs) {\n this.manager.send('pause')\n }\n }\n\n // Define how much is left on the timer\n this.setState({\n remaining: this.getRemainingTime()\n })\n }\n\n /**\n * Resumes a paused timer\n * @name resume\n */\n resume (remote = false) {\n // Timer is not paused\n const { remaining, idle } = this.state\n if (remaining === null) return\n\n // Bind events\n this._bindEvents()\n\n // Send event to other tabs\n if (this.manager) {\n /* istanbul ignore next */\n if (!remote && this.props.crossTab.emitOnAllTabs) {\n this.manager.send('resume')\n }\n }\n\n // Start timer and clear remaining\n // if we are in the active state\n if (!idle) {\n // Set a new timeout\n this.tId = setTimeout(this._toggleIdleState, remaining)\n // Set new state\n this.setState({ remaining: null, lastActive: +new Date() })\n }\n }\n\n /**\n * Time remaining before idle\n * @name getRemainingTime\n * @return {number} Milliseconds remaining\n */\n getRemainingTime () {\n const { remaining, lastActive } = this.state\n const { timeout } = this.props\n\n // If idle there is no time remaining\n if (remaining !== null) {\n return remaining < 0 ? 0 : remaining\n }\n\n // Determine remaining, if negative idle didn't finish flipping, just return 0\n const timeLeft = timeout - ((+new Date()) - lastActive)\n return timeLeft < 0 ? 0 : timeLeft\n }\n\n /**\n * How much time has elapsed\n * @name getElapsedTime\n * @return {Timestamp}\n */\n getElapsedTime () {\n const { oldDate } = this.state\n return (+new Date()) - oldDate\n }\n\n /**\n * Last time the user was idle\n * @name getLastIdleTime\n * @return {Timestamp}\n */\n getLastIdleTime () {\n const { lastIdle } = this.state\n return lastIdle\n }\n\n /**\n * Total time the user was idle\n * @name getTotalIdleTime\n * @return {number}\n */\n getTotalIdleTime () {\n const { idle, lastIdle, idleTime } = this.state\n if (idle) {\n return ((+new Date()) - lastIdle) + idleTime\n } else {\n return idleTime\n }\n }\n\n /**\n * Last time the user was active\n * @name getLastActiveTime\n * @return {Timestamp}\n */\n getLastActiveTime () {\n const { lastActive } = this.state\n return lastActive\n }\n\n /**\n * Total time the user was active\n * @name getTotalActiveTime\n * @return {number}\n */\n getTotalActiveTime () {\n return this.getElapsedTime() - this.getTotalIdleTime()\n }\n\n /**\n * Returns wether or not the user is idle\n * @name isIdle\n * @return {boolean}\n */\n isIdle () {\n const { idle } = this.state\n return idle\n }\n\n /**\n * Returns wether or not this is the leader tab\n * @name isLeader\n * @return {boolean}\n */\n isLeader () {\n return this.manager ? this.manager.isLeader() : true\n }\n}\n\n/**\n * Type checks for every property\n * @type {Object}\n * @private\n */\nIdleTimer.propTypes = {\n /**\n * Activity Timeout in milliseconds\n * default: 1200000\n * @type {Number}\n */\n timeout: PropTypes.number,\n /**\n * DOM events to listen to\n * default: see [default events](https://github.com/SupremeTechnopriest/react-idle-timer#default-events)\n * @type {Array}\n */\n events: PropTypes.arrayOf(PropTypes.string),\n /**\n * Function to call when user is idle\n * default: () => {}\n * @type {Function}\n */\n onIdle: PropTypes.func,\n /**\n * Function to call when user becomes active\n * default: () => {}\n * @type {Function}\n */\n onActive: PropTypes.func,\n /**\n * Function to call on user actions\n * default: () => {}\n * @type {Function}\n */\n onAction: PropTypes.func,\n /**\n * Debounce the onAction function by setting delay in milliseconds\n * default: 0\n * @type {Number}\n */\n debounce: PropTypes.number,\n /**\n * Throttle the onAction function by setting delay in milliseconds\n * default: 0\n * @type {Number}\n */\n throttle: PropTypes.number,\n /**\n * Throttle the event handler function by setting delay in milliseconds\n * default: 200\n * @type {Number}\n */\n eventsThrottle: PropTypes.number,\n /**\n * Element reference to bind activity listeners to\n * default: document\n * @type {Object}\n */\n element: PropTypes.oneOfType([PropTypes.object, PropTypes.element]),\n /**\n * Start the timer on mount\n * default: true\n * @type {Boolean}\n */\n startOnMount: PropTypes.bool,\n /**\n * Require the timer to be started manually.\n * default: false\n * @type {Boolean}\n */\n startManually: PropTypes.bool,\n /**\n * Once the user goes idle the IdleTimer will not\n * reset on user input instead, reset() must be\n * called manually to restart the timer\n * default: false\n * @type {Boolean}\n */\n stopOnIdle: PropTypes.bool,\n /**\n * Bind events passively\n * default: true\n * @type {Boolean}\n */\n passive: PropTypes.bool,\n /**\n * Capture events\n * default: true\n * @type {Boolean}\n */\n capture: PropTypes.bool,\n /**\n * Cross Tab functionality.\n * default: false\n * @type {Boolean|Object}\n */\n crossTab: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.shape({\n type: PropTypes.oneOf(['broadcastChannel', 'localStorage', 'simulate']),\n channelName: PropTypes.string,\n fallbackInterval: PropTypes.number,\n responseTime: PropTypes.number,\n removeTimeout: PropTypes.number,\n emitOnAllTabs: PropTypes.bool\n })\n ])\n}\n\n/**\n * Sets default property values\n * @type {Object}\n * @private\n */\nIdleTimer.defaultProps = {\n timeout: 1000 * 60 * 20,\n element: DEFAULT_ELEMENT,\n events: DEFAULT_EVENTS,\n onIdle: () => { },\n onActive: () => { },\n onAction: () => { },\n debounce: 0,\n throttle: 0,\n eventsThrottle: 200,\n startOnMount: true,\n startManually: false,\n stopOnIdle: false,\n capture: true,\n passive: true,\n crossTab: false\n}\n\nexport default IdleTimer\n","/**\n * ___ _ _ _____ _\n * |_ _|__| | | __|_ _(_)_ __ ___ ___ _ __\n * | |/ _` | |/ _ \\| | | | '_ ` _ \\ / _ \\ '__|\n * | | (_| | | __/| | | | | | | | | __/ |\n * |___\\__,_|_|\\___||_| |_|_| |_| |_|\\___|_|\n *\n * @name useIdleTimer\n * @author Randy Lebeau\n * @private\n */\n\nimport { useEffect, useRef, useMemo } from 'react'\nimport PropTypes from 'prop-types'\nimport { TabManager } from './TabManager'\nimport { IS_BROWSER, DEFAULT_ELEMENT, DEFAULT_EVENTS, debounced, throttled } from './utils'\n\n/**\n * Detects when your user is idle\n * @function useIdleTimer\n * @private\n */\nfunction useIdleTimer ({\n timeout = 1000 * 60 * 20,\n element = DEFAULT_ELEMENT,\n events = DEFAULT_EVENTS,\n onIdle = () => { },\n onActive = () => { },\n onAction = () => { },\n debounce = 0,\n throttle = 0,\n eventsThrottle = 200,\n startOnMount = true,\n startManually = false,\n stopOnIdle = false,\n capture = true,\n passive = true,\n crossTab = false\n} = {}) {\n const eventsBound = useRef(false)\n const idle = useRef(true)\n const oldDate = useRef(+new Date())\n const remaining = useRef(null)\n const pageX = useRef(null)\n const pageY = useRef(null)\n const tId = useRef(null)\n const lastActive = useRef(null)\n const lastIdle = useRef(null)\n const idleTime = useRef(0)\n const firstLoad = useRef(true)\n const _timeout = useRef(timeout)\n const manager = useRef(null)\n\n /* istanbul ignore next */\n if (crossTab) {\n if (crossTab === true) crossTab = {}\n crossTab = Object.assign({\n channelName: 'idle-timer',\n fallbackInterval: 2000,\n responseTime: 100,\n removeTimeout: 1000 * 60,\n emitOnAllTabs: false\n }, crossTab)\n }\n\n // Event emitters\n const emitOnIdle = useRef(onIdle)\n const emitOnActive = useRef(onActive)\n const emitOnAction = useRef(onAction)\n\n useEffect(() => {\n emitOnIdle.current = onIdle\n }, [onIdle])\n\n useEffect(() => {\n emitOnActive.current = onActive\n }, [onActive])\n\n useEffect(() => {\n emitOnAction.current = onAction\n }, [onAction])\n\n const intermediateOnAction = useMemo(() => {\n function callOnAction (e) {\n emitOnAction.current(e)\n }\n\n // Cancel any existing debounce timeouts\n if (callOnAction.cancel) callOnAction.cancel()\n\n // Create debounced action if applicable\n if (debounce > 0) {\n return debounced(callOnAction, debounce)\n\n // Create throttled action if applicable\n } else if (throttle > 0) {\n return throttled(callOnAction, throttle)\n\n // No throttle or debounce\n } else {\n return callOnAction\n }\n }, [throttle, debounce])\n\n /**\n * Toggles the idle state and calls\n * the correct action function\n * @private\n */\n const _toggleIdleState = e => {\n const nextIdle = !idle.current\n idle.current = nextIdle\n if (nextIdle) {\n if (stopOnIdle) {\n // Clear any existing timeout\n clearTimeout(tId.current)\n tId.current = null\n // Unbind events\n _unbindEvents()\n }\n lastIdle.current = (+new Date()) - _timeout.current\n if (manager.current) {\n /* istanbul ignore next */\n manager.current.idle()\n } else {\n emitOnIdle.current(e)\n }\n } else {\n idleTime.current += (+new Date()) - lastIdle.current\n _bindEvents()\n if (manager.current) {\n /* istanbul ignore next */\n manager.current.active()\n } else {\n emitOnActive.current(e)\n }\n }\n }\n\n /**\n * Event handler\n * @param {Event} e\n */\n const _handleEvent = e => {\n // Fire onAction event\n intermediateOnAction(e)\n\n // Already active, ignore events\n if (remaining.current) return\n\n // Mousemove event\n /* istanbul ignore next */\n if (e.type === 'mousemove') {\n // If coords are same, it didn't move\n if (e.pageX === pageX && e.pageY === pageY) {\n return\n }\n // If coords don't exist how could it move\n if (typeof e.pageX === 'undefined' && typeof e.pageY === 'undefined') {\n return\n }\n // Under 200 ms is hard to do\n // continuous activity will bypass this\n const elapsed = getElapsedTime()\n if (elapsed < 200) {\n return\n }\n }\n\n // Clear any existing timeout\n clearTimeout(tId.current)\n tId.current = null\n\n // Determine last time User was active, as can't rely on setTimeout ticking at the correct interval\n const elapsedTimeSinceLastActive = +new Date() - getLastActiveTime()\n\n // If the user is idle or last active time is more than timeout, flip the idle state\n if (\n (idle.current && !stopOnIdle) ||\n (!idle.current && elapsedTimeSinceLastActive > _timeout.current)\n ) {\n _toggleIdleState(e)\n }\n\n // Store when the user was last active\n // and update the mouse coordinates\n lastActive.current = +new Date()\n pageX.current = e.pageX\n pageY.current = e.pageY\n\n // If the user is active, set a new timeout\n if (!idle.current) {\n tId.current = setTimeout(_toggleIdleState, _timeout.current)\n }\n }\n\n /**\n * Reference to current handleEvent function.\n * @private\n */\n const handleEvent = useRef(_handleEvent)\n\n /**\n * Binds the specified events\n * @private\n */\n const _bindEvents = () => {\n // Don't bind events if\n // we are not in a browser\n if (!IS_BROWSER) return\n // Otherwise we bind all the events\n // to the supplied element\n if (!eventsBound.current) {\n events.forEach(e => {\n element.addEventListener(e, handleEvent.current, {\n capture,\n passive\n })\n })\n eventsBound.current = true\n }\n }\n\n /**\n * Unbinds all the bound events\n * @private\n */\n const _unbindEvents = (force = false) => {\n // If we are not in a browser\n // we don't need to unbind events\n if (!IS_BROWSER) return\n // Unbind all events\n if (eventsBound.current || force) {\n events.forEach(e => {\n element.removeEventListener(e, handleEvent.current, {\n capture,\n passive\n })\n })\n eventsBound.current = false\n }\n }\n\n /**\n * Time remaining before idle\n * @name getRemainingTime\n * @return {number} Milliseconds remaining\n */\n const getRemainingTime = () => {\n // If idle there is no time remaining\n if (remaining.current !== null) {\n return remaining.current < 0 ? 0 : remaining.current\n }\n\n // Determine remaining, if negative idle didn't finish flipping, just return 0\n const timeLeft = _timeout.current - ((+new Date()) - lastActive.current)\n return timeLeft < 0 ? 0 : timeLeft\n }\n\n /**\n * How much time has elapsed\n * @name getElapsedTime\n * @return {Timestamp}\n */\n const getElapsedTime = () => (+new Date()) - oldDate.current\n\n /**\n * Last time the user was idle\n * @name getLastIdleTime\n * @return {Timestamp}\n */\n const getLastIdleTime = () => lastIdle.current\n\n /**\n * Get the total time user is idle\n * @name getTotalIdleTime\n * @return {number} Milliseconds idle\n */\n const getTotalIdleTime = () => {\n if (idle.current) {\n return ((+new Date()) - lastIdle.current) + idleTime.current\n } else {\n return idleTime.current\n }\n }\n\n /**\n * Last time the user was active\n * @name getLastActiveTime\n * @return {Timestamp}\n */\n const getLastActiveTime = () => lastActive.current\n\n /**\n * Get the total time user is active\n * @name getTotalActiveTime\n * @return {number} Milliseconds active\n */\n const getTotalActiveTime = () => getElapsedTime() - getTotalIdleTime()\n\n /**\n * Returns wether or not the user is idle\n * @name isIdle\n * @return {Boolean}\n */\n const isIdle = () => idle.current\n\n /**\n * Returns wether or not this is the leader tab\n * @returns {Boolean}\n */\n const isLeader = () => manager.current ? manager.current.isLeader() : true\n\n /**\n * Set initial state and start timer\n * @name reset\n */\n const start = (remote = false) => {\n // Clear timeout\n clearTimeout(tId.current)\n tId.current = null\n\n // Bind the events\n _bindEvents()\n\n // Set state\n idle.current = false\n oldDate.current = +new Date()\n lastActive.current = +new Date()\n remaining.current = null\n\n if (manager.current) {\n /* istanbul ignore next */\n manager.current.setAllIdle(false)\n /* istanbul ignore next */\n if (!remote && crossTab.emitOnAllTabs) {\n manager.current.send('start')\n }\n }\n\n // Set new timeout\n tId.current = setTimeout(_toggleIdleState, _timeout.current)\n }\n\n /**\n * Restore initial state and restart timer, calling onActive\n * @name reset\n */\n const reset = (remote = false) => {\n // Clear timeout\n clearTimeout(tId.current)\n tId.current = null\n\n // Bind the events\n _bindEvents()\n\n // Emit active\n if (idle.current) {\n if (manager.current) {\n /* istanbul ignore next */\n manager.current.active()\n } else {\n emitOnActive.current()\n }\n }\n\n // Reset state\n idle.current = false\n oldDate.current = +new Date()\n lastActive.current = +new Date()\n remaining.current = null\n\n if (manager.current) {\n /* istanbul ignore next */\n manager.current.setAllIdle(false)\n /* istanbul ignore next */\n if (!remote && crossTab.emitOnAllTabs) {\n manager.current.send('reset')\n }\n }\n\n // Set new timeout\n tId.current = setTimeout(_toggleIdleState, _timeout.current)\n }\n\n /**\n * Store remaining time and stop timer\n * @name pause\n */\n const pause = (remote = false) => {\n // Timer is already paused\n if (remaining.current !== null) return\n\n // Unbind events\n _unbindEvents()\n\n // Clear existing timeout\n clearTimeout(tId.current)\n tId.current = null\n\n // Define how much is left on the timer\n remaining.current = getRemainingTime()\n\n if (manager.current) {\n /* istanbul ignore next */\n if (!remote && crossTab.emitOnAllTabs) {\n manager.current.send('pause')\n }\n }\n }\n\n /**\n * Resumes a paused timer\n * @name resume\n */\n const resume = (remote = false) => {\n // Timer is not paused\n if (remaining.current === null) return\n\n // Bind events\n _bindEvents()\n\n // Start timer and clear remaining\n // if we are in the idle state\n if (!idle.current) {\n // Set a new timeout\n tId.current = setTimeout(_toggleIdleState, remaining.current)\n // Set states\n remaining.current = null\n lastActive.current = +new Date()\n }\n\n if (manager.current) {\n /* istanbul ignore next */\n if (!remote && crossTab.emitOnAllTabs) {\n manager.current.send('resume')\n }\n }\n }\n\n /**\n * Hook lifecycle\n */\n useEffect(() => {\n // Debounce and throttle can't both be set\n if (debounce > 0 && throttle > 0) {\n throw new Error('onAction can either be throttled or debounced (not both)')\n }\n\n // Set up cross tab\n /* istanbul ignore next */\n if (crossTab) {\n manager.current = TabManager({\n type: crossTab.type,\n channelName: crossTab.channelName,\n fallbackInterval: crossTab.fallbackInterval,\n responseTime: crossTab.responseTime,\n emitOnAllTabs: crossTab.emitOnAllTabs,\n callbacks: {\n onIdle: emitOnIdle.current,\n onActive: emitOnActive.current\n },\n start,\n reset,\n pause,\n resume\n })\n }\n\n // If startOnMount is enabled, start the timer\n if (startManually) {\n return async () => {\n clearTimeout(tId.current)\n _unbindEvents(true)\n if (crossTab) await manager.current.close()\n }\n }\n\n if (startOnMount) {\n start()\n } else {\n _bindEvents()\n }\n\n // Clear and unbind on unmount\n return async () => {\n clearTimeout(tId.current)\n _unbindEvents(true)\n if (intermediateOnAction.cancel) intermediateOnAction.cancel()\n if (crossTab) await manager.current.close()\n }\n }, [])\n\n useEffect(() => {\n const eventsWereBound = eventsBound.current\n if (eventsWereBound) _unbindEvents()\n if (eventsThrottle > 0) {\n handleEvent.current = throttled(_handleEvent, eventsThrottle)\n } else {\n handleEvent.current = _handleEvent\n }\n if (eventsWereBound) _bindEvents()\n }, [eventsThrottle])\n\n useEffect(() => {\n _timeout.current = timeout\n if (!firstLoad.current && idle.current) {\n reset()\n }\n firstLoad.current = false\n }, [timeout])\n\n return {\n isIdle,\n isLeader,\n start,\n pause,\n reset,\n resume,\n getLastIdleTime,\n getTotalIdleTime,\n getLastActiveTime,\n getTotalActiveTime,\n getElapsedTime,\n getRemainingTime\n }\n}\n\n/**\n * Type checks for every property\n * @type {Object}\n * @private\n */\nuseIdleTimer.propTypes = {\n /**\n * Activity Timeout in milliseconds\n * default: 1200000\n * @type {number}\n */\n timeout: PropTypes.number,\n /**\n * DOM events to listen to\n * default: see [default events](https://github.com/SupremeTechnopriest/react-idle-timer#default-events)\n * @type {Array}\n */\n events: PropTypes.arrayOf(PropTypes.string),\n /**\n * Function to call when user is idle.\n * default: () => {}\n * @type {Function}\n */\n onIdle: PropTypes.func,\n /**\n * Function to call when user becomes active.\n * default: () => {}\n * @type {Function}\n */\n onActive: PropTypes.func,\n /**\n * Function to call on user actions.\n * default: () => {}\n * @type {Function}\n */\n onAction: PropTypes.func,\n /**\n * Debounce the onAction function by setting delay in milliseconds.\n * default: 0\n * @type {number}\n */\n debounce: PropTypes.number,\n /**\n * Throttle the onAction function by setting delay in milliseconds.\n * default: 0\n * @type {number}\n */\n throttle: PropTypes.number,\n /**\n * Throttle the event handler function by setting delay in milliseconds.\n * default: 200\n * @type {number}\n */\n eventsThrottle: PropTypes.number,\n /**\n * Element reference to bind activity listeners to.\n * default: document\n * @type {Object}\n */\n element: PropTypes.oneOfType([PropTypes.object, PropTypes.element]),\n /**\n * Start the timer on mount.\n * default: true\n * @type {Boolean}\n */\n startOnMount: PropTypes.bool,\n /**\n * Require the timer to be started manually.\n * default: false\n * @type {Boolean}\n */\n startManually: PropTypes.bool,\n /**\n * Once the user goes idle the IdleTimer will not\n * reset on user input instead, start() or reset() must be\n * called manually to restart the timer.\n * default: false\n * @type {Boolean}\n */\n stopOnIdle: PropTypes.bool,\n /**\n * Bind events passively.\n * default: true\n * @type {Boolean}\n */\n passive: PropTypes.bool,\n /**\n * Capture events.\n * default: true\n * @type {Boolean}\n */\n capture: PropTypes.bool,\n /**\n * Cross Tab functionality.\n * default: false\n * @type {Boolean|Object}\n */\n crossTab: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.shape({\n type: PropTypes.oneOf(['broadcastChannel', 'localStorage', 'simulate']),\n channelName: PropTypes.string,\n fallbackInterval: PropTypes.number,\n responseTime: PropTypes.number,\n removeTimeout: PropTypes.number,\n emitOnAllTabs: PropTypes.bool\n })\n ])\n}\n\n/**\n * Sets default property values\n * @type {Object}\n * @private\n */\nuseIdleTimer.defaultProps = {\n timeout: 1000 * 60 * 20,\n element: DEFAULT_ELEMENT,\n events: DEFAULT_EVENTS,\n onIdle: () => { },\n onActive: () => { },\n onAction: () => { },\n debounce: 0,\n throttle: 0,\n eventsThrottle: 200,\n startOnMount: true,\n startManually: false,\n stopOnIdle: false,\n capture: true,\n passive: true,\n crossTab: false\n}\n\nexport default useIdleTimer\n","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","module.exports = require(\"regenerator-runtime\");\n","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React from 'react';\nimport PropTypes from 'prop-types';\nvar boxStyle = {\n position: 'relative',\n display: 'inline-flex',\n overflow: 'hidden',\n};\nexport var createRipples = function (defaultProps) {\n if (defaultProps === void 0) { defaultProps = {}; }\n var _a;\n return _a = (function (_super) {\n __extends(class_1, _super);\n function class_1(props) {\n var _this = _super.call(this, props) || this;\n _this.timer = 0;\n _this.onClick = function (ev) {\n var _a = _this.props, during = _a.during, onClick = _a.onClick, color = _a.color;\n ev.stopPropagation();\n var pageX = ev.pageX, pageY = ev.pageY, currentTarget = ev.currentTarget;\n var rect = currentTarget.getBoundingClientRect();\n var left = pageX - (rect.left + window.scrollX);\n var top = pageY - (rect.top + window.scrollY);\n var size = Math.max(rect.width, rect.height);\n _this.setState(function (state) {\n return {\n rippleStyle: __assign({}, state.rippleStyle, { left: left,\n top: top, opacity: 1, transform: 'translate(-50%, -50%)', transition: 'initial', backgroundColor: color }),\n };\n }, function () {\n _this.timer = setTimeout(function () {\n _this.setState(function (state) { return ({\n rippleStyle: __assign({}, state.rippleStyle, { opacity: 0, transform: \"scale(\" + size / 9 + \")\", transition: \"all \" + during + \"ms\" }),\n }); });\n }, 50);\n });\n if (onClick)\n onClick(ev);\n };\n _this.state = {\n rippleStyle: {\n position: 'absolute',\n borderRadius: '50%',\n opacity: 0,\n width: 35,\n height: 35,\n transform: 'translate(-50%, -50%)',\n pointerEvents: 'none',\n },\n };\n return _this;\n }\n class_1.prototype.componentWillUnmount = function () {\n clearTimeout(this.timer);\n };\n class_1.prototype.render = function () {\n var _a = this.props, children = _a.children, during = _a.during, color = _a.color, onClick = _a.onClick, className = _a.className, props = __rest(_a, [\"children\", \"during\", \"color\", \"onClick\", \"className\"]);\n var rippleStyle = this.state.rippleStyle;\n return (React.createElement(\"div\", __assign({}, props, { className: (\"react-ripples \" + className).trim(), style: boxStyle, onClick: this.onClick }),\n children,\n React.createElement(\"s\", { style: rippleStyle })));\n };\n return class_1;\n }(React.PureComponent)),\n _a.displayName = 'Ripples',\n _a.propTypes = {\n during: PropTypes.number,\n color: PropTypes.string,\n onClick: PropTypes.func,\n className: PropTypes.string,\n },\n _a.defaultProps = __assign({ during: 600, color: 'rgba(0, 0, 0, .3)', className: '', onClick: function () { } }, defaultProps),\n _a;\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport React from 'react';\nvar withAttrs = function (Component) { return function (props) { return (React.createElement(Component, __assign({}, props))); }; };\nexport default withAttrs;\n","import { createRipples } from './createRipples';\nimport withAttrs from './withAttrs';\nexport default withAttrs(createRipples());\nexport * from './createRipples';\n","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport React, { Component, isValidElement, cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport { Transition, TransitionGroup } from 'react-transition-group';\nimport { render } from 'react-dom';\n\nvar POSITION = {\n TOP_LEFT: 'top-left',\n TOP_RIGHT: 'top-right',\n TOP_CENTER: 'top-center',\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_RIGHT: 'bottom-right',\n BOTTOM_CENTER: 'bottom-center'\n};\nvar TYPE = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n DEFAULT: 'default'\n};\nvar ACTION = {\n SHOW: 0,\n CLEAR: 1,\n DID_MOUNT: 2,\n WILL_UNMOUNT: 3,\n ON_CHANGE: 4\n};\nvar NOOP = function NOOP() {};\nvar RT_NAMESPACE = 'Toastify';\n\nfunction isValidDelay(val) {\n return typeof val === 'number' && !isNaN(val) && val > 0;\n}\nfunction objectValues(obj) {\n return Object.keys(obj).map(function (key) {\n return obj[key];\n });\n}\nvar canUseDom = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nfunction withRequired(fn) {\n fn.isRequired = function (props, propName, componentName) {\n var prop = props[propName];\n\n if (typeof prop === 'undefined') {\n return new Error(\"The prop \" + propName + \" is marked as required in \\n \" + componentName + \", but its value is undefined.\");\n }\n\n fn(props, propName, componentName);\n };\n\n return fn;\n}\n\nvar falseOrDelay = withRequired(function (props, propName, componentName) {\n var prop = props[propName];\n\n if (prop !== false && !isValidDelay(prop)) {\n return new Error(componentName + \" expect \" + propName + \" \\n to be a valid Number > 0 or equal to false. \" + prop + \" given.\");\n }\n\n return null;\n});\n\nvar eventManager = {\n list: new Map(),\n emitQueue: new Map(),\n on: function on(event, callback) {\n this.list.has(event) || this.list.set(event, []);\n this.list.get(event).push(callback);\n return this;\n },\n off: function off(event) {\n this.list.delete(event);\n return this;\n },\n cancelEmit: function cancelEmit(event) {\n var timers = this.emitQueue.get(event);\n\n if (timers) {\n timers.forEach(function (timer) {\n return clearTimeout(timer);\n });\n this.emitQueue.delete(event);\n }\n\n return this;\n },\n\n /**\n * Enqueue the event at the end of the call stack\n * Doing so let the user call toast as follow:\n * toast('1')\n * toast('2')\n * toast('3')\n * Without setTimemout the code above will not work\n */\n emit: function emit(event) {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n this.list.has(event) && this.list.get(event).forEach(function (callback) {\n var timer = setTimeout(function () {\n callback.apply(void 0, args);\n }, 0);\n _this.emitQueue.has(event) || _this.emitQueue.set(event, []);\n\n _this.emitQueue.get(event).push(timer);\n });\n }\n};\n\nfunction cssTransition(_ref) {\n var enter = _ref.enter,\n exit = _ref.exit,\n _ref$duration = _ref.duration,\n duration = _ref$duration === void 0 ? 750 : _ref$duration,\n _ref$appendPosition = _ref.appendPosition,\n appendPosition = _ref$appendPosition === void 0 ? false : _ref$appendPosition;\n return function Animation(_ref2) {\n var children = _ref2.children,\n position = _ref2.position,\n preventExitTransition = _ref2.preventExitTransition,\n props = _objectWithoutPropertiesLoose(_ref2, [\"children\", \"position\", \"preventExitTransition\"]);\n\n var enterClassName = appendPosition ? enter + \"--\" + position : enter;\n var exitClassName = appendPosition ? exit + \"--\" + position : exit;\n var enterDuration, exitDuration;\n\n if (Array.isArray(duration) && duration.length === 2) {\n enterDuration = duration[0];\n exitDuration = duration[1];\n } else {\n enterDuration = exitDuration = duration;\n }\n\n var onEnter = function onEnter(node) {\n node.classList.add(enterClassName);\n node.style.animationFillMode = 'forwards';\n node.style.animationDuration = enterDuration * 0.001 + \"s\";\n };\n\n var onEntered = function onEntered(node) {\n node.classList.remove(enterClassName);\n node.style.cssText = '';\n };\n\n var onExit = function onExit(node) {\n node.classList.add(exitClassName);\n node.style.animationFillMode = 'forwards';\n node.style.animationDuration = exitDuration * 0.001 + \"s\";\n };\n\n return React.createElement(Transition, _extends({}, props, {\n timeout: preventExitTransition ? 0 : {\n enter: enterDuration,\n exit: exitDuration\n },\n onEnter: onEnter,\n onEntered: onEntered,\n onExit: preventExitTransition ? NOOP : onExit\n }), children);\n };\n}\n\nfunction ProgressBar(_ref) {\n var _cx, _animationEvent;\n\n var delay = _ref.delay,\n isRunning = _ref.isRunning,\n closeToast = _ref.closeToast,\n type = _ref.type,\n hide = _ref.hide,\n className = _ref.className,\n userStyle = _ref.style,\n controlledProgress = _ref.controlledProgress,\n progress = _ref.progress,\n rtl = _ref.rtl;\n\n var style = _extends({}, userStyle, {\n animationDuration: delay + \"ms\",\n animationPlayState: isRunning ? 'running' : 'paused',\n opacity: hide ? 0 : 1,\n transform: controlledProgress ? \"scaleX(\" + progress + \")\" : null\n });\n\n var classNames = cx(RT_NAMESPACE + \"__progress-bar\", controlledProgress ? RT_NAMESPACE + \"__progress-bar--controlled\" : RT_NAMESPACE + \"__progress-bar--animated\", RT_NAMESPACE + \"__progress-bar--\" + type, (_cx = {}, _cx[RT_NAMESPACE + \"__progress-bar--rtl\"] = rtl, _cx), className);\n var animationEvent = (_animationEvent = {}, _animationEvent[controlledProgress && progress >= 1 ? 'onTransitionEnd' : 'onAnimationEnd'] = controlledProgress && progress < 1 ? null : closeToast, _animationEvent);\n return React.createElement(\"div\", _extends({\n className: classNames,\n style: style\n }, animationEvent));\n}\n\nProgressBar.propTypes = {\n /**\n * The animation delay which determine when to close the toast\n */\n delay: falseOrDelay.isRequired,\n\n /**\n * Whether or not the animation is running or paused\n */\n isRunning: PropTypes.bool.isRequired,\n\n /**\n * Func to close the current toast\n */\n closeToast: PropTypes.func.isRequired,\n\n /**\n * Support rtl content\n */\n rtl: PropTypes.bool.isRequired,\n\n /**\n * Optional type : info, success ...\n */\n type: PropTypes.string,\n\n /**\n * Hide or not the progress bar\n */\n hide: PropTypes.bool,\n\n /**\n * Optionnal className\n */\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * Controlled progress value\n */\n progress: PropTypes.number,\n\n /**\n * Tell wether or not controlled progress bar is used\n */\n controlledProgress: PropTypes.bool\n};\nProgressBar.defaultProps = {\n type: TYPE.DEFAULT,\n hide: false\n};\n\nfunction getX(e) {\n return e.targetTouches && e.targetTouches.length >= 1 ? e.targetTouches[0].clientX : e.clientX;\n}\n\nfunction getY(e) {\n return e.targetTouches && e.targetTouches.length >= 1 ? e.targetTouches[0].clientY : e.clientY;\n}\n\nvar iLoveInternetExplorer = canUseDom && /(msie|trident)/i.test(navigator.userAgent);\n\nvar Toast =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(Toast, _Component);\n\n function Toast() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.state = {\n isRunning: true,\n preventExitTransition: false\n };\n _this.flag = {\n canCloseOnClick: true,\n canDrag: false\n };\n _this.drag = {\n start: 0,\n x: 0,\n y: 0,\n deltaX: 0,\n removalDistance: 0\n };\n _this.boundingRect = null;\n _this.ref = null;\n\n _this.pauseToast = function () {\n if (_this.props.autoClose) {\n _this.setState({\n isRunning: false\n });\n }\n };\n\n _this.playToast = function () {\n if (_this.props.autoClose) {\n _this.setState({\n isRunning: true\n });\n }\n };\n\n _this.onDragStart = function (e) {\n _this.flag.canCloseOnClick = true;\n _this.flag.canDrag = true;\n _this.boundingRect = _this.ref.getBoundingClientRect();\n _this.ref.style.transition = '';\n _this.drag.start = _this.drag.x = getX(e.nativeEvent);\n _this.drag.removalDistance = _this.ref.offsetWidth * (_this.props.draggablePercent / 100);\n };\n\n _this.onDragMove = function (e) {\n if (_this.flag.canDrag) {\n if (_this.state.isRunning) {\n _this.pauseToast();\n }\n\n _this.drag.x = getX(e);\n _this.drag.deltaX = _this.drag.x - _this.drag.start;\n _this.drag.y = getY(e); // prevent false positif during a toast click\n\n _this.drag.start !== _this.drag.x && (_this.flag.canCloseOnClick = false);\n _this.ref.style.transform = \"translateX(\" + _this.drag.deltaX + \"px)\";\n _this.ref.style.opacity = 1 - Math.abs(_this.drag.deltaX / _this.drag.removalDistance);\n }\n };\n\n _this.onDragEnd = function (e) {\n if (_this.flag.canDrag) {\n _this.flag.canDrag = false;\n\n if (Math.abs(_this.drag.deltaX) > _this.drag.removalDistance) {\n _this.setState({\n preventExitTransition: true\n }, _this.props.closeToast);\n\n return;\n }\n\n _this.ref.style.transition = 'transform 0.2s, opacity 0.2s';\n _this.ref.style.transform = 'translateX(0)';\n _this.ref.style.opacity = 1;\n }\n };\n\n _this.onDragTransitionEnd = function () {\n if (_this.boundingRect) {\n var _this$boundingRect = _this.boundingRect,\n top = _this$boundingRect.top,\n bottom = _this$boundingRect.bottom,\n left = _this$boundingRect.left,\n right = _this$boundingRect.right;\n\n if (_this.props.pauseOnHover && _this.drag.x >= left && _this.drag.x <= right && _this.drag.y >= top && _this.drag.y <= bottom) {\n _this.pauseToast();\n } else {\n _this.playToast();\n }\n }\n };\n\n _this.onExitTransitionEnd = function () {\n if (iLoveInternetExplorer) {\n _this.props.onExited();\n\n return;\n }\n\n var height = _this.ref.scrollHeight;\n var style = _this.ref.style;\n requestAnimationFrame(function () {\n style.minHeight = 'initial';\n style.height = height + 'px';\n style.transition = 'all 0.4s ';\n requestAnimationFrame(function () {\n style.height = 0;\n style.padding = 0;\n style.margin = 0;\n });\n setTimeout(function () {\n return _this.props.onExited();\n }, 400);\n });\n };\n\n return _this;\n }\n\n var _proto = Toast.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.props.onOpen(this.props.children.props);\n\n if (this.props.draggable) {\n this.bindDragEvents();\n } // Maybe I could bind the event in the ToastContainer and rely on delegation\n\n\n if (this.props.pauseOnFocusLoss) {\n this.bindFocusEvents();\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (prevProps.draggable !== this.props.draggable) {\n if (this.props.draggable) {\n this.bindDragEvents();\n } else {\n this.unbindDragEvents();\n }\n }\n\n if (prevProps.pauseOnFocusLoss !== this.props.pauseOnFocusLoss) {\n if (this.props.pauseOnFocusLoss) {\n this.bindFocusEvents();\n } else {\n this.unbindFocusEvents();\n }\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.props.onClose(this.props.children.props);\n\n if (this.props.draggable) {\n this.unbindDragEvents();\n }\n\n if (this.props.pauseOnFocusLoss) {\n this.unbindFocusEvents();\n }\n };\n\n _proto.bindFocusEvents = function bindFocusEvents() {\n window.addEventListener('focus', this.playToast);\n window.addEventListener('blur', this.pauseToast);\n };\n\n _proto.unbindFocusEvents = function unbindFocusEvents() {\n window.removeEventListener('focus', this.playToast);\n window.removeEventListener('blur', this.pauseToast);\n };\n\n _proto.bindDragEvents = function bindDragEvents() {\n document.addEventListener('mousemove', this.onDragMove);\n document.addEventListener('mouseup', this.onDragEnd);\n document.addEventListener('touchmove', this.onDragMove);\n document.addEventListener('touchend', this.onDragEnd);\n };\n\n _proto.unbindDragEvents = function unbindDragEvents() {\n document.removeEventListener('mousemove', this.onDragMove);\n document.removeEventListener('mouseup', this.onDragEnd);\n document.removeEventListener('touchmove', this.onDragMove);\n document.removeEventListener('touchend', this.onDragEnd);\n };\n\n _proto.render = function render() {\n var _cx,\n _this2 = this;\n\n var _this$props = this.props,\n closeButton = _this$props.closeButton,\n children = _this$props.children,\n autoClose = _this$props.autoClose,\n pauseOnHover = _this$props.pauseOnHover,\n onClick = _this$props.onClick,\n closeOnClick = _this$props.closeOnClick,\n type = _this$props.type,\n hideProgressBar = _this$props.hideProgressBar,\n closeToast = _this$props.closeToast,\n Transition = _this$props.transition,\n position = _this$props.position,\n className = _this$props.className,\n bodyClassName = _this$props.bodyClassName,\n progressClassName = _this$props.progressClassName,\n progressStyle = _this$props.progressStyle,\n updateId = _this$props.updateId,\n role = _this$props.role,\n progress = _this$props.progress,\n rtl = _this$props.rtl;\n var toastProps = {\n className: cx(RT_NAMESPACE + \"__toast\", RT_NAMESPACE + \"__toast--\" + type, (_cx = {}, _cx[RT_NAMESPACE + \"__toast--rtl\"] = rtl, _cx), className)\n };\n\n if (autoClose && pauseOnHover) {\n toastProps.onMouseEnter = this.pauseToast;\n toastProps.onMouseLeave = this.playToast;\n } // prevent toast from closing when user drags the toast\n\n\n if (closeOnClick) {\n toastProps.onClick = function (e) {\n onClick && onClick(e);\n _this2.flag.canCloseOnClick && closeToast();\n };\n }\n\n var controlledProgress = parseFloat(progress) === progress;\n return React.createElement(Transition, {\n in: this.props.in,\n appear: true,\n onExited: this.onExitTransitionEnd,\n position: position,\n preventExitTransition: this.state.preventExitTransition\n }, React.createElement(\"div\", _extends({\n onClick: onClick\n }, toastProps, {\n ref: function ref(_ref) {\n return _this2.ref = _ref;\n },\n onMouseDown: this.onDragStart,\n onTouchStart: this.onDragStart,\n onMouseUp: this.onDragTransitionEnd,\n onTouchEnd: this.onDragTransitionEnd\n }), React.createElement(\"div\", _extends({}, this.props.in && {\n role: role\n }, {\n className: cx(RT_NAMESPACE + \"__toast-body\", bodyClassName)\n }), children), closeButton && closeButton, (autoClose || controlledProgress) && React.createElement(ProgressBar, _extends({}, updateId && !controlledProgress ? {\n key: \"pb-\" + updateId\n } : {}, {\n rtl: rtl,\n delay: autoClose,\n isRunning: this.state.isRunning,\n closeToast: closeToast,\n hide: hideProgressBar,\n type: type,\n style: progressStyle,\n className: progressClassName,\n controlledProgress: controlledProgress,\n progress: progress\n }))));\n };\n\n return Toast;\n}(Component);\n\nToast.propTypes = {\n closeButton: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]).isRequired,\n autoClose: falseOrDelay.isRequired,\n children: PropTypes.node.isRequired,\n closeToast: PropTypes.func.isRequired,\n position: PropTypes.oneOf(objectValues(POSITION)).isRequired,\n pauseOnHover: PropTypes.bool.isRequired,\n pauseOnFocusLoss: PropTypes.bool.isRequired,\n closeOnClick: PropTypes.bool.isRequired,\n transition: PropTypes.func.isRequired,\n rtl: PropTypes.bool.isRequired,\n hideProgressBar: PropTypes.bool.isRequired,\n draggable: PropTypes.bool.isRequired,\n draggablePercent: PropTypes.number.isRequired,\n in: PropTypes.bool,\n onExited: PropTypes.func,\n onOpen: PropTypes.func,\n onClose: PropTypes.func,\n type: PropTypes.oneOf(objectValues(TYPE)),\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n bodyClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n progressClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n progressStyle: PropTypes.object,\n progress: PropTypes.number,\n updateId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n ariaLabel: PropTypes.string,\n containerId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n role: PropTypes.string\n};\nToast.defaultProps = {\n type: TYPE.DEFAULT,\n in: true,\n onOpen: NOOP,\n onClose: NOOP,\n className: null,\n bodyClassName: null,\n progressClassName: null,\n updateId: null\n};\n\nfunction CloseButton(_ref) {\n var closeToast = _ref.closeToast,\n type = _ref.type,\n ariaLabel = _ref.ariaLabel;\n return React.createElement(\"button\", {\n className: RT_NAMESPACE + \"__close-button \" + RT_NAMESPACE + \"__close-button--\" + type,\n type: \"button\",\n onClick: function onClick(e) {\n e.stopPropagation();\n closeToast(e);\n },\n \"aria-label\": ariaLabel\n }, \"\\u2716\\uFE0E\");\n}\n\nCloseButton.propTypes = {\n closeToast: PropTypes.func,\n arialLabel: PropTypes.string\n};\nCloseButton.defaultProps = {\n ariaLabel: 'close'\n};\n\nvar Bounce = cssTransition({\n enter: RT_NAMESPACE + \"__bounce-enter\",\n exit: RT_NAMESPACE + \"__bounce-exit\",\n appendPosition: true\n});\nvar Slide = cssTransition({\n enter: RT_NAMESPACE + \"__slide-enter\",\n exit: RT_NAMESPACE + \"__slide-exit\",\n duration: [450, 750],\n appendPosition: true\n});\nvar Zoom = cssTransition({\n enter: RT_NAMESPACE + \"__zoom-enter\",\n exit: RT_NAMESPACE + \"__zoom-exit\"\n});\nvar Flip = cssTransition({\n enter: RT_NAMESPACE + \"__flip-enter\",\n exit: RT_NAMESPACE + \"__flip-exit\"\n});\n\nvar ToastContainer =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(ToastContainer, _Component);\n\n function ToastContainer() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.state = {\n toast: []\n };\n _this.toastKey = 1;\n _this.collection = {};\n\n _this.isToastActive = function (id) {\n return _this.state.toast.indexOf(id) !== -1;\n };\n\n return _this;\n }\n\n var _proto = ToastContainer.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n eventManager.cancelEmit(ACTION.WILL_UNMOUNT).on(ACTION.SHOW, function (content, options) {\n return _this2.ref ? _this2.buildToast(content, options) : null;\n }).on(ACTION.CLEAR, function (id) {\n return !_this2.ref ? null : id == null ? _this2.clear() : _this2.removeToast(id);\n }).emit(ACTION.DID_MOUNT, this);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n eventManager.emit(ACTION.WILL_UNMOUNT, this);\n };\n\n _proto.removeToast = function removeToast(id) {\n this.setState({\n toast: this.state.toast.filter(function (v) {\n return v !== id;\n })\n }, this.dispatchChange);\n };\n\n _proto.dispatchChange = function dispatchChange() {\n eventManager.emit(ACTION.ON_CHANGE, this.state.toast.length, this.props.containerId);\n };\n\n _proto.makeCloseButton = function makeCloseButton(toastClose, toastId, type) {\n var _this3 = this;\n\n var closeButton = this.props.closeButton;\n\n if (isValidElement(toastClose) || toastClose === false) {\n closeButton = toastClose;\n } else if (toastClose === true) {\n closeButton = this.props.closeButton && typeof this.props.closeButton !== 'boolean' ? this.props.closeButton : React.createElement(CloseButton, null);\n }\n\n return closeButton === false ? false : cloneElement(closeButton, {\n closeToast: function closeToast() {\n return _this3.removeToast(toastId);\n },\n type: type\n });\n };\n\n _proto.getAutoCloseDelay = function getAutoCloseDelay(toastAutoClose) {\n return toastAutoClose === false || isValidDelay(toastAutoClose) ? toastAutoClose : this.props.autoClose;\n };\n\n _proto.canBeRendered = function canBeRendered(content) {\n return isValidElement(content) || typeof content === 'string' || typeof content === 'number' || typeof content === 'function';\n };\n\n _proto.parseClassName = function parseClassName(prop) {\n if (typeof prop === 'string') {\n return prop;\n } else if (prop !== null && typeof prop === 'object' && 'toString' in prop) {\n return prop.toString();\n }\n\n return null;\n };\n\n _proto.belongToContainer = function belongToContainer(_ref) {\n var containerId = _ref.containerId;\n return containerId === this.props.containerId;\n };\n\n _proto.buildToast = function buildToast(content, _ref2) {\n var _this4 = this;\n\n var delay = _ref2.delay,\n options = _objectWithoutPropertiesLoose(_ref2, [\"delay\"]);\n\n if (!this.canBeRendered(content)) {\n throw new Error(\"The element you provided cannot be rendered. You provided an element of type \" + typeof content);\n }\n\n var toastId = options.toastId,\n updateId = options.updateId; // Check for multi-container and also for duplicate toastId\n // Maybe it would be better to extract it\n\n if (this.props.enableMultiContainer && !this.belongToContainer(options) || this.isToastActive(toastId) && updateId == null) {\n return;\n }\n\n var closeToast = function closeToast() {\n return _this4.removeToast(toastId);\n };\n\n var toastOptions = {\n id: toastId,\n // ⚠️ if no options.key, this.toastKey - 1 is assigned\n key: options.key || this.toastKey++,\n type: options.type,\n closeToast: closeToast,\n updateId: options.updateId,\n rtl: this.props.rtl,\n position: options.position || this.props.position,\n transition: options.transition || this.props.transition,\n className: this.parseClassName(options.className || this.props.toastClassName),\n bodyClassName: this.parseClassName(options.bodyClassName || this.props.bodyClassName),\n onClick: options.onClick || this.props.onClick,\n closeButton: this.makeCloseButton(options.closeButton, toastId, options.type),\n pauseOnHover: typeof options.pauseOnHover === 'boolean' ? options.pauseOnHover : this.props.pauseOnHover,\n pauseOnFocusLoss: typeof options.pauseOnFocusLoss === 'boolean' ? options.pauseOnFocusLoss : this.props.pauseOnFocusLoss,\n draggable: typeof options.draggable === 'boolean' ? options.draggable : this.props.draggable,\n draggablePercent: typeof options.draggablePercent === 'number' && !isNaN(options.draggablePercent) ? options.draggablePercent : this.props.draggablePercent,\n closeOnClick: typeof options.closeOnClick === 'boolean' ? options.closeOnClick : this.props.closeOnClick,\n progressClassName: this.parseClassName(options.progressClassName || this.props.progressClassName),\n progressStyle: this.props.progressStyle,\n autoClose: this.getAutoCloseDelay(options.autoClose),\n hideProgressBar: typeof options.hideProgressBar === 'boolean' ? options.hideProgressBar : this.props.hideProgressBar,\n progress: parseFloat(options.progress),\n role: typeof options.role === 'string' ? options.role : this.props.role\n };\n typeof options.onOpen === 'function' && (toastOptions.onOpen = options.onOpen);\n typeof options.onClose === 'function' && (toastOptions.onClose = options.onClose); // add closeToast function to react component only\n\n if (isValidElement(content) && typeof content.type !== 'string' && typeof content.type !== 'number') {\n content = cloneElement(content, {\n closeToast: closeToast\n });\n } else if (typeof content === 'function') {\n content = content({\n closeToast: closeToast\n });\n }\n\n if (isValidDelay(delay)) {\n setTimeout(function () {\n _this4.appendToast(toastOptions, content, options.staleToastId);\n }, delay);\n } else {\n this.appendToast(toastOptions, content, options.staleToastId);\n }\n };\n\n _proto.appendToast = function appendToast(options, content, staleToastId) {\n var _extends2;\n\n var id = options.id,\n updateId = options.updateId;\n this.collection = _extends({}, this.collection, (_extends2 = {}, _extends2[id] = {\n options: options,\n content: content,\n position: options.position\n }, _extends2));\n this.setState({\n toast: (updateId ? [].concat(this.state.toast) : [].concat(this.state.toast, [id])).filter(function (id) {\n return id !== staleToastId;\n })\n }, this.dispatchChange);\n };\n\n _proto.clear = function clear() {\n this.setState({\n toast: []\n });\n };\n\n _proto.renderToast = function renderToast() {\n var _this5 = this;\n\n var toastToRender = {};\n var _this$props = this.props,\n className = _this$props.className,\n style = _this$props.style,\n newestOnTop = _this$props.newestOnTop;\n var collection = newestOnTop ? Object.keys(this.collection).reverse() : Object.keys(this.collection); // group toast by position\n\n collection.forEach(function (toastId) {\n var _this5$collection$toa = _this5.collection[toastId],\n position = _this5$collection$toa.position,\n options = _this5$collection$toa.options,\n content = _this5$collection$toa.content;\n toastToRender[position] || (toastToRender[position] = []);\n\n if (_this5.state.toast.indexOf(options.id) !== -1) {\n toastToRender[position].push(React.createElement(Toast, _extends({}, options, {\n isDocumentHidden: _this5.state.isDocumentHidden,\n key: \"toast-\" + options.key\n }), content));\n } else {\n toastToRender[position].push(null);\n delete _this5.collection[toastId];\n }\n });\n return Object.keys(toastToRender).map(function (position) {\n var _cx;\n\n var disablePointer = toastToRender[position].length === 1 && toastToRender[position][0] === null;\n var props = {\n className: cx(RT_NAMESPACE + \"__toast-container\", RT_NAMESPACE + \"__toast-container--\" + position, (_cx = {}, _cx[RT_NAMESPACE + \"__toast-container--rtl\"] = _this5.props.rtl, _cx), _this5.parseClassName(className)),\n style: disablePointer ? _extends({}, style, {\n pointerEvents: 'none'\n }) : _extends({}, style)\n };\n return React.createElement(TransitionGroup, _extends({}, props, {\n key: \"container-\" + position\n }), toastToRender[position]);\n });\n };\n\n _proto.render = function render() {\n var _this6 = this;\n\n return React.createElement(\"div\", {\n ref: function ref(node) {\n return _this6.ref = node;\n },\n className: \"\" + RT_NAMESPACE\n }, this.renderToast());\n };\n\n return ToastContainer;\n}(Component);\n\nToastContainer.propTypes = {\n /**\n * Set toast position\n */\n position: PropTypes.oneOf(objectValues(POSITION)),\n\n /**\n * Disable or set autoClose delay\n */\n autoClose: falseOrDelay,\n\n /**\n * Disable or set a custom react element for the close button\n */\n closeButton: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),\n\n /**\n * Hide or not progress bar when autoClose is enabled\n */\n hideProgressBar: PropTypes.bool,\n\n /**\n * Pause toast duration on hover\n */\n pauseOnHover: PropTypes.bool,\n\n /**\n * Dismiss toast on click\n */\n closeOnClick: PropTypes.bool,\n\n /**\n * Newest on top\n */\n newestOnTop: PropTypes.bool,\n\n /**\n * An optional className\n */\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional style\n */\n style: PropTypes.object,\n\n /**\n * An optional className for the toast\n */\n toastClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional className for the toast body\n */\n bodyClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional className for the toast progress bar\n */\n progressClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * An optional style for the toast progress bar\n */\n progressStyle: PropTypes.object,\n\n /**\n * Define enter and exit transition using react-transition-group\n */\n transition: PropTypes.func,\n\n /**\n * Support rtl display\n */\n rtl: PropTypes.bool,\n\n /**\n * Allow toast to be draggable\n */\n draggable: PropTypes.bool,\n\n /**\n * The percentage of the toast's width it takes for a drag to dismiss a toast\n */\n draggablePercent: PropTypes.number,\n\n /**\n * Pause the toast on focus loss\n */\n pauseOnFocusLoss: PropTypes.bool,\n\n /**\n * Show the toast only if it includes containerId and it's the same as containerId\n */\n enableMultiContainer: PropTypes.bool,\n\n /**\n * Set id to handle multiple container\n */\n containerId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Set role attribute for the toast body\n */\n role: PropTypes.string,\n\n /**\n * Fired when clicking inside toaster\n */\n onClick: PropTypes.func\n};\nToastContainer.defaultProps = {\n position: POSITION.TOP_RIGHT,\n transition: Bounce,\n rtl: false,\n autoClose: 5000,\n hideProgressBar: false,\n closeButton: React.createElement(CloseButton, null),\n pauseOnHover: true,\n pauseOnFocusLoss: true,\n closeOnClick: true,\n newestOnTop: false,\n draggable: true,\n draggablePercent: 80,\n className: null,\n style: null,\n toastClassName: null,\n bodyClassName: null,\n progressClassName: null,\n progressStyle: null,\n role: 'alert'\n};\n\nvar containers = new Map();\nvar latestInstance = null;\nvar containerDomNode = null;\nvar containerConfig = {};\nvar queue = [];\nvar lazy = false;\n/**\n * Check whether any container is currently mounted in the DOM\n */\n\nfunction isAnyContainerMounted() {\n return containers.size > 0;\n}\n/**\n * Get the container by id. Returns the last container declared when no id is given.\n */\n\n\nfunction getContainer(containerId) {\n if (!isAnyContainerMounted()) return null;\n if (!containerId) return containers.get(latestInstance);\n return containers.get(containerId);\n}\n/**\n * Get the toast by id, given it's in the DOM, otherwise returns null\n */\n\n\nfunction getToast(toastId, _ref) {\n var containerId = _ref.containerId;\n var container = getContainer(containerId);\n if (!container) return null;\n var toast = container.collection[toastId];\n if (typeof toast === 'undefined') return null;\n return toast;\n}\n/**\n * Merge provided options with the defaults settings and generate the toastId\n */\n\n\nfunction mergeOptions(options, type) {\n return _extends({}, options, {\n type: type,\n toastId: getToastId(options)\n });\n}\n/**\n * Generate a random toastId\n */\n\n\nfunction generateToastId() {\n return (Math.random().toString(36) + Date.now().toString(36)).substr(2, 10);\n}\n/**\n * Generate a toastId or use the one provided\n */\n\n\nfunction getToastId(options) {\n if (options && (typeof options.toastId === 'string' || typeof options.toastId === 'number' && !isNaN(options.toastId))) {\n return options.toastId;\n }\n\n return generateToastId();\n}\n/**\n * If the container is not mounted, the toast is enqueued and\n * the container lazy mounted\n */\n\n\nfunction dispatchToast(content, options) {\n if (isAnyContainerMounted()) {\n eventManager.emit(ACTION.SHOW, content, options);\n } else {\n queue.push({\n action: ACTION.SHOW,\n content: content,\n options: options\n });\n\n if (lazy && canUseDom) {\n lazy = false;\n containerDomNode = document.createElement('div');\n document.body.appendChild(containerDomNode);\n render(React.createElement(ToastContainer, containerConfig), containerDomNode);\n }\n }\n\n return options.toastId;\n}\n\nvar toast = function toast(content, options) {\n return dispatchToast(content, mergeOptions(options, options && options.type || TYPE.DEFAULT));\n};\n/**\n * For each available type create a shortcut\n */\n\n\nvar _loop = function _loop(t) {\n if (TYPE[t] !== TYPE.DEFAULT) {\n toast[TYPE[t].toLowerCase()] = function (content, options) {\n return dispatchToast(content, mergeOptions(options, options && options.type || TYPE[t]));\n };\n }\n};\n\nfor (var t in TYPE) {\n _loop(t);\n}\n/**\n * Maybe I should remove warning in favor of warn, I don't know\n */\n\n\ntoast.warn = toast.warning;\n/**\n * Remove toast programmaticaly\n */\n\ntoast.dismiss = function (id) {\n if (id === void 0) {\n id = null;\n }\n\n return isAnyContainerMounted() && eventManager.emit(ACTION.CLEAR, id);\n};\n/**\n * return true if one container is displaying the toast\n */\n\n\ntoast.isActive = function (id) {\n var isToastActive = false;\n\n if (containers.size > 0) {\n containers.forEach(function (container) {\n if (container.isToastActive(id)) {\n isToastActive = true;\n }\n });\n }\n\n return isToastActive;\n};\n\ntoast.update = function (toastId, options) {\n if (options === void 0) {\n options = {};\n }\n\n // if you call toast and toast.update directly nothing will be displayed\n // this is why I defered the update\n setTimeout(function () {\n var toast = getToast(toastId, options);\n\n if (toast) {\n var oldOptions = toast.options,\n oldContent = toast.content;\n\n var nextOptions = _extends({}, oldOptions, {}, options, {\n toastId: options.toastId || toastId\n });\n\n if (!options.toastId || options.toastId === toastId) {\n nextOptions.updateId = generateToastId();\n } else {\n nextOptions.staleToastId = toastId;\n }\n\n var content = typeof nextOptions.render !== 'undefined' ? nextOptions.render : oldContent;\n delete nextOptions.render;\n dispatchToast(content, nextOptions);\n }\n }, 0);\n};\n/**\n * Used for controlled progress bar.\n */\n\n\ntoast.done = function (id) {\n toast.update(id, {\n progress: 1\n });\n};\n/**\n * Track changes. The callback get the number of toast displayed\n */\n\n\ntoast.onChange = function (callback) {\n if (typeof callback === 'function') {\n eventManager.on(ACTION.ON_CHANGE, callback);\n }\n};\n/**\n * Configure the ToastContainer when lazy mounted\n */\n\n\ntoast.configure = function (config) {\n lazy = true;\n containerConfig = config;\n};\n\ntoast.POSITION = POSITION;\ntoast.TYPE = TYPE;\n/**\n * Wait until the ToastContainer is mounted to dispatch the toast\n * and attach isActive method\n */\n\neventManager.on(ACTION.DID_MOUNT, function (containerInstance) {\n latestInstance = containerInstance.props.containerId || containerInstance;\n containers.set(latestInstance, containerInstance);\n queue.forEach(function (item) {\n eventManager.emit(item.action, item.content, item.options);\n });\n queue = [];\n}).on(ACTION.WILL_UNMOUNT, function (containerInstance) {\n if (containerInstance) containers.delete(containerInstance.props.containerId || containerInstance);else containers.clear();\n\n if (containers.size === 0) {\n eventManager.off(ACTION.SHOW).off(ACTION.CLEAR);\n }\n\n if (canUseDom && containerDomNode) {\n document.body.removeChild(containerDomNode);\n }\n});\n\nexport { Bounce, Flip, Slide, ToastContainer, POSITION as ToastPosition, TYPE as ToastType, Zoom, cssTransition, toast };\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n"],"sourceRoot":""}