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CACL,IAAI5b,EAASonB,EAAaxL,EAAM5b,QAC5B8mB,EAAU,MAAQlL,EAAM+J,QAAU,IAEtC5V,EAAK3M,KAAKwY,GAENA,EAAM4J,SACRsB,GAAW,MAAQ9mB,EAAS8mB,EAAU,MAaxCuB,GANIvB,EAJAlL,EAAM2J,SACH3J,EAAM6J,QAGCzlB,EAAS,IAAM8mB,EAAU,KAFzB,MAAQ9mB,EAAS,IAAM8mB,EAAU,MAKnC9mB,EAAS,IAAM8mB,EAAU,GAIvC,CACF,CAEA,IAAIxB,EAAY8B,EAAahY,EAAQkW,WAAa,KAC9CgD,EAAoBD,EAAM/nB,OAAOglB,EAAU9lB,UAAY8lB,EAkB3D,OAZKtW,IACHqZ,GAASC,EAAoBD,EAAM/nB,MAAM,GAAIglB,EAAU9lB,QAAU6oB,GAAS,MAAQ/C,EAAY,WAI9F+C,GADExY,EACO,IAIAb,GAAUsZ,EAAoB,GAAK,MAAQhD,EAAY,MAG3DM,EAAW,IAAIT,OAAO,IAAMkD,EAAOtC,EAAM3W,IAAWW,EAC7D,C,WCnZAiV,EAAOC,QAAUvhB,MAAMkE,SAAW,SAAU2gB,GAC1C,MAA8C,kBAAvC5O,OAAOxT,UAAUgE,SAAS7E,KAAKijB,EACxC,C","sources":["webpack://rp-majoitus-client/./node_modules/resolve-pathname/esm/resolve-pathname.js","webpack://rp-majoitus-client/./node_modules/tiny-invariant/dist/esm/tiny-invariant.js","webpack://rp-majoitus-client/./node_modules/history/esm/history.js","webpack://rp-majoitus-client/./node_modules/react-router/esm/react-router.js","webpack://rp-majoitus-client/./node_modules/react-router-dom/esm/react-router-dom.js","webpack://rp-majoitus-client/./src/views/AccommodationReservation/AccommodationReservation.js","webpack://rp-majoitus-client/./src/components/useOnScreen.js","webpack://rp-majoitus-client/./src/views/AccommodationReservation/index.js","webpack://rp-majoitus-client/./node_modules/path-to-regexp/index.js","webpack://rp-majoitus-client/./node_modules/path-to-regexp/node_modules/isarray/index.js"],"sourcesContent":["function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\n\nexport { invariant as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };\n","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { createMemoryHistory, createLocation, locationsAreEqual, createPath } from 'history';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport pathToRegexp from 'path-to-regexp';\nimport { isValidElementType } from 'react-is';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport hoistStatics from 'hoist-non-react-statics';\n\nvar MAX_SIGNED_31_BIT_INT = 1073741823;\nvar commonjsGlobal = typeof globalThis !== \"undefined\" // 'global proper'\n? // eslint-disable-next-line no-undef\nglobalThis : typeof window !== \"undefined\" ? window // Browser\n: typeof global !== \"undefined\" ? global // node.js\n: {};\n\nfunction getUniqueId() {\n var key = \"__global_unique_id__\";\n return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;\n} // Inlined Object.is polyfill.\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n\n\nfunction objectIs(x, y) {\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // eslint-disable-next-line no-self-compare\n return x !== x && y !== y;\n }\n}\n\nfunction createEventEmitter(value) {\n var handlers = [];\n return {\n on: function on(handler) {\n handlers.push(handler);\n },\n off: function off(handler) {\n handlers = handlers.filter(function (h) {\n return h !== handler;\n });\n },\n get: function get() {\n return value;\n },\n set: function set(newValue, changedBits) {\n value = newValue;\n handlers.forEach(function (handler) {\n return handler(value, changedBits);\n });\n }\n };\n}\n\nfunction onlyChild(children) {\n return Array.isArray(children) ? children[0] : children;\n}\n\nfunction createReactContext(defaultValue, calculateChangedBits) {\n var _Provider$childContex, _Consumer$contextType;\n\n var contextProp = \"__create-react-context-\" + getUniqueId() + \"__\";\n\n var Provider = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Provider, _React$Component);\n\n function Provider() {\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 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.emitter = createEventEmitter(_this.props.value);\n return _this;\n }\n\n var _proto = Provider.prototype;\n\n _proto.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[contextProp] = this.emitter, _ref;\n };\n\n _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.value !== nextProps.value) {\n var oldValue = this.props.value;\n var newValue = nextProps.value;\n var changedBits;\n\n if (objectIs(oldValue, newValue)) {\n changedBits = 0; // No change\n } else {\n changedBits = typeof calculateChangedBits === \"function\" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, \"calculateChangedBits: Expected the return value to be a \" + \"31-bit integer. Instead received: \" + changedBits) : void 0;\n }\n\n changedBits |= 0;\n\n if (changedBits !== 0) {\n this.emitter.set(nextProps.value, changedBits);\n }\n }\n }\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return Provider;\n }(React.Component);\n\n Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);\n\n var Consumer = /*#__PURE__*/function (_React$Component2) {\n _inheritsLoose(Consumer, _React$Component2);\n\n function Consumer() {\n var _this2;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;\n _this2.observedBits = void 0;\n _this2.state = {\n value: _this2.getValue()\n };\n\n _this2.onUpdate = function (newValue, changedBits) {\n var observedBits = _this2.observedBits | 0;\n\n if ((observedBits & changedBits) !== 0) {\n _this2.setState({\n value: _this2.getValue()\n });\n }\n };\n\n return _this2;\n }\n\n var _proto2 = Consumer.prototype;\n\n _proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var observedBits = nextProps.observedBits;\n this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n : observedBits;\n };\n\n _proto2.componentDidMount = function componentDidMount() {\n if (this.context[contextProp]) {\n this.context[contextProp].on(this.onUpdate);\n }\n\n var observedBits = this.props.observedBits;\n this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n : observedBits;\n };\n\n _proto2.componentWillUnmount = function componentWillUnmount() {\n if (this.context[contextProp]) {\n this.context[contextProp].off(this.onUpdate);\n }\n };\n\n _proto2.getValue = function getValue() {\n if (this.context[contextProp]) {\n return this.context[contextProp].get();\n } else {\n return defaultValue;\n }\n };\n\n _proto2.render = function render() {\n return onlyChild(this.props.children)(this.state.value);\n };\n\n return Consumer;\n }(React.Component);\n\n Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);\n return {\n Provider: Provider,\n Consumer: Consumer\n };\n}\n\n// MIT License\nvar createContext = React.createContext || createReactContext;\n\n// TODO: Replace with React.createContext once we can assume React 16+\n\nvar createNamedContext = function createNamedContext(name) {\n var context = createContext();\n context.displayName = name;\n return context;\n};\n\nvar historyContext = /*#__PURE__*/createNamedContext(\"Router-History\");\n\nvar context = /*#__PURE__*/createNamedContext(\"Router\");\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Router, _React$Component);\n\n Router.computeRootMatch = function computeRootMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n function Router(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n location: props.history.location\n }; // This is a bit of a hack. We have to start listening for location\n // changes here in the constructor in case there are any s\n // on the initial render. If there are, they will replace/push when\n // they mount and since cDM fires in children before parents, we may\n // get a new location before the is mounted.\n\n _this._isMounted = false;\n _this._pendingLocation = null;\n\n if (!props.staticContext) {\n _this.unlisten = props.history.listen(function (location) {\n _this._pendingLocation = location;\n });\n }\n\n return _this;\n }\n\n var _proto = Router.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n this._isMounted = true;\n\n if (this.unlisten) {\n // Any pre-mount location changes have been captured at\n // this point, so unregister the listener.\n this.unlisten();\n }\n\n if (!this.props.staticContext) {\n this.unlisten = this.props.history.listen(function (location) {\n if (_this2._isMounted) {\n _this2.setState({\n location: location\n });\n }\n });\n }\n\n if (this._pendingLocation) {\n this.setState({\n location: this._pendingLocation\n });\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.unlisten) {\n this.unlisten();\n this._isMounted = false;\n this._pendingLocation = null;\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(context.Provider, {\n value: {\n history: this.props.history,\n location: this.state.location,\n match: Router.computeRootMatch(this.state.location.pathname),\n staticContext: this.props.staticContext\n }\n }, /*#__PURE__*/React.createElement(historyContext.Provider, {\n children: this.props.children || null,\n value: this.props.history\n }));\n };\n\n return Router;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n Router.propTypes = {\n children: PropTypes.node,\n history: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n };\n\n Router.prototype.componentDidUpdate = function (prevProps) {\n process.env.NODE_ENV !== \"production\" ? warning(prevProps.history === this.props.history, \"You cannot change \") : void 0;\n };\n}\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\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 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createMemoryHistory(_this.props);\n return _this;\n }\n\n var _proto = MemoryRouter.prototype;\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return MemoryRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n MemoryRouter.propTypes = {\n initialEntries: PropTypes.array,\n initialIndex: PropTypes.number,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n };\n\n MemoryRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\") : void 0;\n };\n}\n\nvar Lifecycle = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Lifecycle, _React$Component);\n\n function Lifecycle() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Lifecycle.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n if (this.props.onMount) this.props.onMount.call(this, this);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.props.onUnmount) this.props.onUnmount.call(this, this);\n };\n\n _proto.render = function render() {\n return null;\n };\n\n return Lifecycle;\n}(React.Component);\n\n/**\n * The public API for prompting the user before navigating away from a screen.\n */\n\nfunction Prompt(_ref) {\n var message = _ref.message,\n _ref$when = _ref.when,\n when = _ref$when === void 0 ? true : _ref$when;\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n if (!when || context.staticContext) return null;\n var method = context.history.block;\n return /*#__PURE__*/React.createElement(Lifecycle, {\n onMount: function onMount(self) {\n self.release = method(message);\n },\n onUpdate: function onUpdate(self, prevProps) {\n if (prevProps.message !== message) {\n self.release();\n self.release = method(message);\n }\n },\n onUnmount: function onUnmount(self) {\n self.release();\n },\n message: message\n });\n });\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n var messageType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);\n Prompt.propTypes = {\n when: PropTypes.bool,\n message: messageType.isRequired\n };\n}\n\nvar cache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nfunction compilePath(path) {\n if (cache[path]) return cache[path];\n var generator = pathToRegexp.compile(path);\n\n if (cacheCount < cacheLimit) {\n cache[path] = generator;\n cacheCount++;\n }\n\n return generator;\n}\n/**\n * Public API for generating a URL pathname from a path and parameters.\n */\n\n\nfunction generatePath(path, params) {\n if (path === void 0) {\n path = \"/\";\n }\n\n if (params === void 0) {\n params = {};\n }\n\n return path === \"/\" ? path : compilePath(path)(params, {\n pretty: true\n });\n}\n\n/**\n * The public API for navigating programmatically with a component.\n */\n\nfunction Redirect(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to,\n _ref$push = _ref.push,\n push = _ref$push === void 0 ? false : _ref$push;\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var history = context.history,\n staticContext = context.staticContext;\n var method = push ? history.push : history.replace;\n var location = createLocation(computedMatch ? typeof to === \"string\" ? generatePath(to, computedMatch.params) : _extends({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n }) : to); // When rendering in a static context,\n // set the new location immediately.\n\n if (staticContext) {\n method(location);\n return null;\n }\n\n return /*#__PURE__*/React.createElement(Lifecycle, {\n onMount: function onMount() {\n method(location);\n },\n onUpdate: function onUpdate(self, prevProps) {\n var prevLocation = createLocation(prevProps.to);\n\n if (!locationsAreEqual(prevLocation, _extends({}, location, {\n key: prevLocation.key\n }))) {\n method(location);\n }\n },\n to: to\n });\n });\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n Redirect.propTypes = {\n push: PropTypes.bool,\n from: PropTypes.string,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n };\n}\n\nvar cache$1 = {};\nvar cacheLimit$1 = 10000;\nvar cacheCount$1 = 0;\n\nfunction compilePath$1(path, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});\n if (pathCache[path]) return pathCache[path];\n var keys = [];\n var regexp = pathToRegexp(path, keys, options);\n var result = {\n regexp: regexp,\n keys: keys\n };\n\n if (cacheCount$1 < cacheLimit$1) {\n pathCache[path] = result;\n cacheCount$1++;\n }\n\n return result;\n}\n/**\n * Public API for matching a URL pathname to a path.\n */\n\n\nfunction matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}\n\nfunction isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n}\n\nfunction evalChildrenDev(children, props, path) {\n var value = children(props);\n process.env.NODE_ENV !== \"production\" ? warning(value !== undefined, \"You returned `undefined` from the `children` function of \" + (\", but you \") + \"should have returned a React element or `null`\") : void 0;\n return value || null;\n}\n/**\n * The public API for matching a single path and rendering.\n */\n\n\nvar Route = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Route, _React$Component);\n\n function Route() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Route.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context$1) {\n !context$1 ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var location = _this.props.location || context$1.location;\n var match = _this.props.computedMatch ? _this.props.computedMatch // already computed the match for us\n : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;\n\n var props = _extends({}, context$1, {\n location: location,\n match: match\n });\n\n var _this$props = _this.props,\n children = _this$props.children,\n component = _this$props.component,\n render = _this$props.render; // Preact uses an empty array as children by\n // default, so use null if that's the case.\n\n if (Array.isArray(children) && isEmptyChildren(children)) {\n children = null;\n }\n\n return /*#__PURE__*/React.createElement(context.Provider, {\n value: props\n }, props.match ? children ? typeof children === \"function\" ? process.env.NODE_ENV !== \"production\" ? evalChildrenDev(children, props, _this.props.path) : children(props) : children : component ? /*#__PURE__*/React.createElement(component, props) : render ? render(props) : null : typeof children === \"function\" ? process.env.NODE_ENV !== \"production\" ? evalChildrenDev(children, props, _this.props.path) : children(props) : null);\n });\n };\n\n return Route;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n Route.propTypes = {\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n component: function component(props, propName) {\n if (props[propName] && !isValidElementType(props[propName])) {\n return new Error(\"Invalid prop 'component' supplied to 'Route': the prop is not a valid React component\");\n }\n },\n exact: PropTypes.bool,\n location: PropTypes.object,\n path: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n render: PropTypes.func,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool\n };\n\n Route.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.component), \"You should not use and in the same route; will be ignored\") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.render), \"You should not use and in the same route; will be ignored\") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\") : void 0;\n };\n\n Route.prototype.componentDidUpdate = function (prevProps) {\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.location && !prevProps.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(!this.props.location && prevProps.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : void 0;\n };\n}\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n}\n\nfunction addBasename(basename, location) {\n if (!basename) return location;\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n}\n\nfunction stripBasename(basename, location) {\n if (!basename) return location;\n var base = addLeadingSlash(basename);\n if (location.pathname.indexOf(base) !== 0) return location;\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n}\n\nfunction createURL(location) {\n return typeof location === \"string\" ? location : createPath(location);\n}\n\nfunction staticHandler(methodName) {\n return function () {\n process.env.NODE_ENV !== \"production\" ? invariant(false, \"You cannot %s with \", methodName) : invariant(false) ;\n };\n}\n\nfunction noop() {}\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\n\nvar StaticRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(StaticRouter, _React$Component);\n\n function StaticRouter() {\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 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handlePush = function (location) {\n return _this.navigateTo(location, \"PUSH\");\n };\n\n _this.handleReplace = function (location) {\n return _this.navigateTo(location, \"REPLACE\");\n };\n\n _this.handleListen = function () {\n return noop;\n };\n\n _this.handleBlock = function () {\n return noop;\n };\n\n return _this;\n }\n\n var _proto = StaticRouter.prototype;\n\n _proto.navigateTo = function navigateTo(location, action) {\n var _this$props = this.props,\n _this$props$basename = _this$props.basename,\n basename = _this$props$basename === void 0 ? \"\" : _this$props$basename,\n _this$props$context = _this$props.context,\n context = _this$props$context === void 0 ? {} : _this$props$context;\n context.action = action;\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n _this$props2$basename = _this$props2.basename,\n basename = _this$props2$basename === void 0 ? \"\" : _this$props2$basename,\n _this$props2$context = _this$props2.context,\n context = _this$props2$context === void 0 ? {} : _this$props2$context,\n _this$props2$location = _this$props2.location,\n location = _this$props2$location === void 0 ? \"/\" : _this$props2$location,\n rest = _objectWithoutPropertiesLoose(_this$props2, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: function createHref(path) {\n return addLeadingSlash(basename + createURL(path));\n },\n action: \"POP\",\n location: stripBasename(basename, createLocation(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n return /*#__PURE__*/React.createElement(Router, _extends({}, rest, {\n history: history,\n staticContext: context\n }));\n };\n\n return StaticRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n StaticRouter.propTypes = {\n basename: PropTypes.string,\n context: PropTypes.object,\n location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n };\n\n StaticRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\") : void 0;\n };\n}\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Switch, _React$Component);\n\n function Switch() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Switch.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var location = _this.props.location || context.location;\n var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()\n // here because toArray adds keys to all child elements and we do not want\n // to trigger an unmount/remount for two s that render the same\n // component at different URLs.\n\n React.Children.forEach(_this.props.children, function (child) {\n if (match == null && /*#__PURE__*/React.isValidElement(child)) {\n element = child;\n var path = child.props.path || child.props.from;\n match = path ? matchPath(location.pathname, _extends({}, child.props, {\n path: path\n })) : context.match;\n }\n });\n return match ? /*#__PURE__*/React.cloneElement(element, {\n location: location,\n computedMatch: match\n }) : null;\n });\n };\n\n return Switch;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n Switch.propTypes = {\n children: PropTypes.node,\n location: PropTypes.object\n };\n\n Switch.prototype.componentDidUpdate = function (prevProps) {\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.location && !prevProps.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(!this.props.location && prevProps.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : void 0;\n };\n}\n\n/**\n * A public higher-order component to access the imperative API\n */\n\nfunction withRouter(Component) {\n var displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutPropertiesLoose(props, [\"wrappedComponentRef\"]);\n\n return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use <\" + displayName + \" /> outside a \") : invariant(false) : void 0;\n return /*#__PURE__*/React.createElement(Component, _extends({}, remainingProps, context, {\n ref: wrappedComponentRef\n }));\n });\n };\n\n C.displayName = displayName;\n C.WrappedComponent = Component;\n\n if (process.env.NODE_ENV !== \"production\") {\n C.propTypes = {\n wrappedComponentRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object])\n };\n }\n\n return hoistStatics(C, Component);\n}\n\nvar useContext = React.useContext;\nfunction useHistory() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useHistory()\") : invariant(false) : void 0;\n }\n\n return useContext(historyContext);\n}\nfunction useLocation() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useLocation()\") : invariant(false) : void 0;\n }\n\n return useContext(context).location;\n}\nfunction useParams() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useParams()\") : invariant(false) : void 0;\n }\n\n var match = useContext(context).match;\n return match ? match.params : {};\n}\nfunction useRouteMatch(path) {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useRouteMatch()\") : invariant(false) : void 0;\n }\n\n var location = useLocation();\n var match = useContext(context).match;\n return path ? matchPath(location.pathname, path) : match;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n if (typeof window !== \"undefined\") {\n var global$1 = window;\n var key = \"__react_router_build__\";\n var buildNames = {\n cjs: \"CommonJS\",\n esm: \"ES modules\",\n umd: \"UMD\"\n };\n\n if (global$1[key] && global$1[key] !== \"esm\") {\n var initialBuildName = buildNames[global$1[key]];\n var secondaryBuildName = buildNames[\"esm\"]; // TODO: Add link to article that explains in detail how to avoid\n // loading 2 different builds.\n\n throw new Error(\"You are loading the \" + secondaryBuildName + \" build of React Router \" + (\"on a page that is already running the \" + initialBuildName + \" \") + \"build, so things won't work right.\");\n }\n\n global$1[key] = \"esm\";\n }\n}\n\nexport { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, historyContext as __HistoryContext, context as __RouterContext, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter };\n//# sourceMappingURL=react-router.js.map\n","import { Router, __RouterContext, matchPath } from 'react-router';\nexport { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter } from 'react-router';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport React from 'react';\nimport { createBrowserHistory, createHashHistory, createLocation, createPath } from 'history';\nimport PropTypes from 'prop-types';\nimport warning from 'tiny-warning';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport invariant from 'tiny-invariant';\n\n/**\n * The public API for a that uses HTML5 history.\n */\n\nvar BrowserRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\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 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createBrowserHistory(_this.props);\n return _this;\n }\n\n var _proto = BrowserRouter.prototype;\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return BrowserRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n BrowserRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number\n };\n\n BrowserRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\") : void 0;\n };\n}\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(HashRouter, _React$Component);\n\n function HashRouter() {\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 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createHashHistory(_this.props);\n return _this;\n }\n\n var _proto = HashRouter.prototype;\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return HashRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n HashRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"])\n };\n\n HashRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\") : void 0;\n };\n}\n\nvar resolveToLocation = function resolveToLocation(to, currentLocation) {\n return typeof to === \"function\" ? to(currentLocation) : to;\n};\nvar normalizeToLocation = function normalizeToLocation(to, currentLocation) {\n return typeof to === \"string\" ? createLocation(to, null, null, currentLocation) : to;\n};\n\nvar forwardRefShim = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nvar LinkAnchor = forwardRef(function (_ref, forwardedRef) {\n var innerRef = _ref.innerRef,\n navigate = _ref.navigate,\n _onClick = _ref.onClick,\n rest = _objectWithoutPropertiesLoose(_ref, [\"innerRef\", \"navigate\", \"onClick\"]);\n\n var target = rest.target;\n\n var props = _extends({}, rest, {\n onClick: function onClick(event) {\n try {\n if (_onClick) _onClick(event);\n } catch (ex) {\n event.preventDefault();\n throw ex;\n }\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && ( // ignore everything but left clicks\n !target || target === \"_self\") && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n navigate();\n }\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.ref = innerRef;\n }\n /* eslint-disable-next-line jsx-a11y/anchor-has-content */\n\n\n return /*#__PURE__*/React.createElement(\"a\", props);\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n LinkAnchor.displayName = \"LinkAnchor\";\n}\n/**\n * The public API for rendering a history-aware .\n */\n\n\nvar Link = forwardRef(function (_ref2, forwardedRef) {\n var _ref2$component = _ref2.component,\n component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,\n replace = _ref2.replace,\n to = _ref2.to,\n innerRef = _ref2.innerRef,\n rest = _objectWithoutPropertiesLoose(_ref2, [\"component\", \"replace\", \"to\", \"innerRef\"]);\n\n return /*#__PURE__*/React.createElement(__RouterContext.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var history = context.history;\n var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);\n var href = location ? history.createHref(location) : \"\";\n\n var props = _extends({}, rest, {\n href: href,\n navigate: function navigate() {\n var location = resolveToLocation(to, context.location);\n var isDuplicateNavigation = createPath(context.location) === createPath(normalizeToLocation(location));\n var method = replace || isDuplicateNavigation ? history.replace : history.push;\n method(location);\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return /*#__PURE__*/React.createElement(component, props);\n });\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n var toType = PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func]);\n var refType = PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.shape({\n current: PropTypes.any\n })]);\n Link.displayName = \"Link\";\n Link.propTypes = {\n innerRef: refType,\n onClick: PropTypes.func,\n replace: PropTypes.bool,\n target: PropTypes.string,\n to: toType.isRequired\n };\n}\n\nvar forwardRefShim$1 = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef$1 = React.forwardRef;\n\nif (typeof forwardRef$1 === \"undefined\") {\n forwardRef$1 = forwardRefShim$1;\n}\n\nfunction joinClassnames() {\n for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {\n classnames[_key] = arguments[_key];\n }\n\n return classnames.filter(function (i) {\n return i;\n }).join(\" \");\n}\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\n\n\nvar NavLink = forwardRef$1(function (_ref, forwardedRef) {\n var _ref$ariaCurrent = _ref[\"aria-current\"],\n ariaCurrent = _ref$ariaCurrent === void 0 ? \"page\" : _ref$ariaCurrent,\n _ref$activeClassName = _ref.activeClassName,\n activeClassName = _ref$activeClassName === void 0 ? \"active\" : _ref$activeClassName,\n activeStyle = _ref.activeStyle,\n classNameProp = _ref.className,\n exact = _ref.exact,\n isActiveProp = _ref.isActive,\n locationProp = _ref.location,\n sensitive = _ref.sensitive,\n strict = _ref.strict,\n styleProp = _ref.style,\n to = _ref.to,\n innerRef = _ref.innerRef,\n rest = _objectWithoutPropertiesLoose(_ref, [\"aria-current\", \"activeClassName\", \"activeStyle\", \"className\", \"exact\", \"isActive\", \"location\", \"sensitive\", \"strict\", \"style\", \"to\", \"innerRef\"]);\n\n return /*#__PURE__*/React.createElement(__RouterContext.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var currentLocation = locationProp || context.location;\n var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);\n var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n var match = escapedPath ? matchPath(currentLocation.pathname, {\n path: escapedPath,\n exact: exact,\n sensitive: sensitive,\n strict: strict\n }) : null;\n var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);\n var className = typeof classNameProp === \"function\" ? classNameProp(isActive) : classNameProp;\n var style = typeof styleProp === \"function\" ? styleProp(isActive) : styleProp;\n\n if (isActive) {\n className = joinClassnames(className, activeClassName);\n style = _extends({}, style, activeStyle);\n }\n\n var props = _extends({\n \"aria-current\": isActive && ariaCurrent || null,\n className: className,\n style: style,\n to: toLocation\n }, rest); // React 15 compat\n\n\n if (forwardRefShim$1 !== forwardRef$1) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return /*#__PURE__*/React.createElement(Link, props);\n });\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n NavLink.displayName = \"NavLink\";\n var ariaCurrentType = PropTypes.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\", \"false\"]);\n NavLink.propTypes = _extends({}, Link.propTypes, {\n \"aria-current\": ariaCurrentType,\n activeClassName: PropTypes.string,\n activeStyle: PropTypes.object,\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n exact: PropTypes.bool,\n isActive: PropTypes.func,\n location: PropTypes.object,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool,\n style: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n });\n}\n\nexport { BrowserRouter, HashRouter, Link, NavLink };\n//# sourceMappingURL=react-router-dom.js.map\n","import React, { useState, useEffect, useRef } from 'react';\nimport AccommodationSearchForm from 'Views/AccommodationSearch/components/AccommodationSearchForm';\nimport moment from 'moment';\nimport { console } from 'window-or-global';\nimport Cookies from 'js-cookie';\nimport { useMediaQuery } from 'react-responsive';\n\nimport { sendEcommerceEvent } from '../../components/GA4';\nimport { useOnScreen } from '../../components/useOnScreen';\n\nconst queryString = window.location.search;\nconst urlParams = new URLSearchParams(queryString);\nconst API_DATE_FORMAT = 'YYYY-MM-DD';\n\nconst AccommodationReservation = () => {\n const widgetElementRef = useRef(null);\n const bookingWidgetIsOnScreen = useOnScreen(widgetElementRef);\n const isTabletOrMobile = useMediaQuery({ query: '(max-width: 1080px)' });\n\n const [pets, setPets] = useState(urlParams.get('pets') == 1 ? true : false);\n const [selectedExtras, setSelectedExtras] = useState([]);\n const [startDate, setStartDate] = useState(\n urlParams.get('startDate')\n ? moment(urlParams.get('startDate'), API_DATE_FORMAT)\n : undefined\n );\n const [endDate, setEndDate] = useState(\n urlParams.get('endDate')\n ? moment(urlParams.get('endDate'), API_DATE_FORMAT)\n : undefined\n );\n const [adults, setAdults] = useState(parseInt(urlParams.get('adults')) || 2);\n const [children, setChildren] = useState(\n parseInt(urlParams.get('children')) || 0\n );\n const [infants, setInfants] = useState(\n parseInt(urlParams.get('infants')) || 0\n );\n const [availability, setAvailability] = useState([]);\n const [availabilityPets, setAvailabilityPets] = useState([]);\n const [availabilityFound, setAvailabilityFound] = useState(true);\n const [loadingAvailabilities, setLoadingAvailabilities] = useState();\n const [loadingAccommodations, setLoadingAccommodations] = useState();\n const [loadingOwnershipInfo, setLoadingOwnershipInfo] = useState(true);\n const [addingToCart, setAddingToCart] = useState(false);\n const [fetchingCampaigns, setFetchingCampaigns] = useState(true);\n const [products, setProducts] = useState({\n data: null,\n });\n const [redirect, setRedirect] = useState();\n // Total price, including additional services.\n const [price, setPrice] = useState();\n // Price for the product.\n const [apiPrice, setApiPrice] = useState();\n const [errorMessage, setErrorMessage] = useState();\n const [allCampaigns, setAllCampaigns] = useState();\n // userOwnsApartment: user the is the owner of the current product.\n const [userOwnsApartment, setIsOwner] = useState(false);\n // userIsOwner: user has any owned rooms.\n const [userIsOwner, setUserIsOwner] = useState(false);\n const [ownersRateplanCode, setOwnersRateplanCode] = useState(false);\n const [quickRateplanCode, setQuickRateplanCode] = useState(false);\n const hotellinxIds = drupalSettings.hotellinx_ids;\n const numberOfNights =\n startDate && endDate\n ? Array.from(moment.range(startDate, endDate).by('day')).length - 1\n : 0;\n const numberOfGuests = adults + children;\n\n const [email, setEmail] = useState();\n const [ownershipData, setOwnerShipData] = useState();\n const dataLayer = window.dataLayer;\n const [hasQuota, setHasQuota] = useState(true);\n\n const extraServices = drupalSettings.accommodation_extra_services;\n\n const getHotellinxIdPets = (value = pets) => {\n // True returns \"with pets\" id and false \"no pets\" id.\n if (Object.values(hotellinxIds).includes(true)) {\n return Object.keys(hotellinxIds).find(\n (key) => hotellinxIds[key] === value\n );\n } else {\n return Object.keys(hotellinxIds).find(\n (key) => hotellinxIds[key] === false\n );\n }\n };\n\n const roomAllowsPets = () => {\n return Object.values(hotellinxIds).includes(true);\n };\n\n async function fetchAvailabilities() {\n const API_URL = `${process.env.IPS_API_URL}/api/availabilities`;\n setLoadingAvailabilities(true);\n\n // Fetch availabilities for two months at a time.\n for (let dayStep = 0; dayStep < 558; dayStep = dayStep + 62) {\n await fetch(\n `${API_URL}?resort=${\n drupalSettings.active_site\n }&roomTypeId=${getHotellinxIdPets()}&startDate=${moment()\n .add(dayStep, 'days')\n .format(API_DATE_FORMAT)}&endDate=${moment()\n .add(dayStep + 62, 'days')\n .format(API_DATE_FORMAT)}`,\n {\n method: 'GET',\n }\n ).then((response) => {\n setLoadingAvailabilities(false);\n if (response.ok) {\n response.json().then((data) => {\n data.map((value) => {\n if (value.roomTypeId == getHotellinxIdPets(false)) {\n setAvailability((oldStateArray) =>\n [...oldStateArray, value.availability].flat()\n );\n }\n if (value.roomTypeId == getHotellinxIdPets(true)) {\n setAvailabilityPets((oldStateArray) =>\n [...oldStateArray, value.availability].flat()\n );\n }\n });\n setAvailabilityFound(true);\n });\n } else {\n console.log('fetchAvailabilities: error getting data');\n setAvailabilityFound(false);\n }\n });\n }\n }\n\n function getAccommodations() {\n const roomTypeIds = pets\n ? getHotellinxIdPets()\n : Object.keys(hotellinxIds).toString();\n\n const API_URL = `${process.env.IPS_API_URL}/api/accommodations?resort=${drupalSettings.active_site}&roomTypeIds=${roomTypeIds}&`;\n\n const headers = {\n method: 'GET',\n headers: {\n token: Cookies.get('mo.id.token.Azure.AD.B2C'),\n email,\n },\n };\n\n if (hotellinxIds && startDate && endDate) {\n setProducts({ data: null });\n setLoadingAccommodations(true);\n setErrorMessage(null);\n setOwnersRateplanCode(null);\n setQuickRateplanCode(null);\n setPrice(null);\n\n fetch(`${API_URL}${urlParams.toString()}`, headers).then((response) => {\n if (response.ok) {\n response.json().then((data) => {\n // Sort results by lowest price.\n data.result.sort((a, b) => a.price - b.price);\n\n if (data.result[0].price) {\n // Price of only the accommodation.\n const priceFromApi = parseFloat(data.result[0].price);\n setApiPrice(priceFromApi);\n\n let additionalPrice = 0;\n selectedExtras.forEach((extraId) => {\n const extra = extraServices.find(\n (service) => parseInt(service.id) === parseInt(extraId)\n );\n additionalPrice += parseFloat(extra.price);\n });\n // Total price with extra services.\n setPrice(additionalPrice + priceFromApi);\n }\n\n setProducts({ data: data.result });\n if (data.ownershipData) {\n setOwnerShipData(data.ownershipData);\n checkIfOwner(data.ownershipData);\n } else {\n setLoadingAccommodations(false);\n }\n const item_category = data.result[0].field_capacity.name;\n const item_category2 = data.result[0].field_housing_type_list[0];\n sendEcommerceEvent(\n dataLayer,\n 'view_item',\n true,\n data.result[0].roomName,\n userOwnsApartment ? 0 : data.result[0].price,\n item_category,\n item_category2\n );\n });\n } else {\n console.log('getAccommodations: error getting data');\n response.json().then((data) => {\n // If the user lands on the page but gets an error message,\n // we should still check if he is an owner, so we can display info on the\n // calendar correctly, for example excluding the minimum stay dates.\n if (data.ownershipData && !userIsOwner) {\n checkIfOwner(data.ownershipData);\n }\n switch (response.status) {\n case 452:\n setErrorMessage(\n Drupal.t(\n 'Number of guests exceeds the maximum for this room type.'\n )\n );\n break;\n\n case 453:\n setErrorMessage(\n Drupal.t(\n 'No availability for this period. Please consider a different room type.'\n )\n );\n break;\n\n case 454: {\n // Get the minimum stay value from the error message.\n const message = data.error.split('=');\n const minStay = message[1][0];\n setErrorMessage(\n drupalSettings.min_stay_message.replace(/@nights/g, minStay)\n );\n break;\n }\n case 455: {\n // Reservation length exceeds the maximum.\n setErrorMessage(\n drupalSettings.reservation_length_error_message\n );\n break;\n }\n case 456:\n case 457: {\n // Reservation contains days that can't be booked online.\n setErrorMessage(\n drupalSettings.continuous_availability_error_message\n );\n break;\n }\n\n default:\n setErrorMessage(data.error);\n }\n });\n }\n });\n\n // Don't try to fetch with reservation type params if the user\n // isn't logged in through azure.\n if (\n !drupalSettings.user.roles ||\n !drupalSettings.user.roles.includes('owner')\n ) {\n return;\n }\n\n let ratePlancodesFetched = 0;\n // Rateplan codes for owner's options.\n fetch(`${API_URL}${urlParams.toString()}&reservationType=1`, headers)\n .then((response) => {\n if (response.ok) {\n response.json().then((data) => {\n // If the price isn't zero, owner doesn't have quota left.\n if (parseInt(data.result[0].price) !== 0) {\n setHasQuota(false);\n } else {\n setHasQuota(true);\n }\n setOwnersRateplanCode(data.result[0].rateplanCode);\n });\n } else {\n console.log(\n 'getAccommodations: error getting data for reservationType 1'\n );\n }\n })\n .finally(() => {\n // Checking that both requests with the reservation type\n // have been completed.\n ratePlancodesFetched++;\n if (ratePlancodesFetched === 2) {\n setLoadingAccommodations(false);\n }\n });\n\n fetch(`${API_URL}${urlParams.toString()}&reservationType=2`, headers)\n .then((response) => {\n if (response.ok) {\n response.json().then((data) => {\n setQuickRateplanCode(data.result[0].rateplanCode);\n });\n } else {\n console.log(\n 'getAccommodations: error getting data for reservationType 2'\n );\n }\n })\n .finally(() => {\n ratePlancodesFetched++;\n if (ratePlancodesFetched === 2) {\n setLoadingAccommodations(false);\n }\n });\n }\n }\n\n function filterCampaignExpired({ attributes }) {\n return moment(attributes.field_end_date).isAfter();\n }\n\n function filterCampaignApartmentId({ relationships }) {\n return relationships.field_products.data.some((value) =>\n value.id.includes(drupalSettings.product_uuid)\n );\n }\n\n function getAllActiveCampaigns() {\n if (allCampaigns) {\n return allCampaigns\n .filter(filterCampaignApartmentId)\n .filter(filterCampaignExpired);\n }\n }\n\n function disableBooking() {\n if (\n !price ||\n loadingAvailabilities ||\n loadingAccommodations ||\n addingToCart ||\n userOwnsApartment ||\n !availabilityFound ||\n fetchingCampaigns\n ) {\n return true;\n }\n\n return false;\n }\n\n async function fetchCampaigns() {\n const API_URL = `${drupalSettings.base_url}/${drupalSettings.current_language}/jsonapi/node/campaign`;\n\n const response = await fetch(API_URL, {\n method: 'GET',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/vnd.api+json',\n },\n });\n\n if (response.ok) {\n const { data } = await response.json();\n setAllCampaigns(data);\n }\n }\n\n function checkIfOwner(data = null) {\n const currentRoomId = getHotellinxIdPets();\n const rooms = data ? data.rooms : ownershipData.rooms;\n\n setUserIsOwner(true);\n\n if (rooms.some((room) => room.roomTypeId == currentRoomId)) {\n setIsOwner(true);\n } else {\n setIsOwner(false);\n }\n }\n\n // Fetch and filter campaign info.\n useEffect(() => {\n async function getData() {\n await fetchCampaigns();\n setFetchingCampaigns(false);\n }\n getData();\n }, [setAllCampaigns]);\n useEffect(() => {\n getAllActiveCampaigns();\n }, [allCampaigns]);\n\n // Get the ownership info if the dates aren't set.\n useEffect(() => {\n const fetchOwnerShipInfo = async () => {\n let ownershipData = {};\n const API_URL = `${process.env.IPS_API_URL}/api/accommodations?resort=${drupalSettings.active_site}&`;\n const headers = {\n method: 'GET',\n headers: {\n token: Cookies.get('mo.id.token.Azure.AD.B2C'),\n email,\n },\n };\n const accommodationsResponse = await fetch(\n `${API_URL}${urlParams.toString()}`,\n headers\n );\n\n if (accommodationsResponse.ok) {\n const accommodationsData = await accommodationsResponse.json();\n if (accommodationsData.ownershipData) {\n ownershipData = accommodationsData.ownershipData;\n checkIfOwner(ownershipData);\n }\n }\n\n setOwnerShipData(ownershipData);\n setLoadingOwnershipInfo(false);\n };\n\n // No need to check ownership data if the user isn't an owner.\n if (\n !drupalSettings.user.roles ||\n !drupalSettings.user.roles.includes('owner')\n ) {\n return;\n }\n\n // Run only if there's no dates, and the user is authenticated.\n if (!startDate && !endDate) {\n if (!ownershipData) {\n fetchOwnerShipInfo();\n }\n }\n\n if (ownershipData && Object.keys(ownershipData).length > 0) {\n checkIfOwner();\n }\n }, [pets, email, drupalSettings.user]);\n\n function filterContainingCampaigns({ attributes }) {\n if (endDate) {\n let range = moment.range(startDate, endDate);\n // We check that the campaign dates either overlap the reservation or that\n // the reservation falls strictly inside campaign start or end date,\n // depending on the campaign.\n if (!attributes.field_campaign_strict_date_check) {\n return range.overlaps(\n moment.range(attributes.field_start_date, attributes.field_end_date)\n );\n } else {\n return (\n startDate.isSameOrAfter(moment(attributes.field_start_date), 'day') &&\n endDate.isSameOrBefore(moment(attributes.field_end_date), 'day')\n );\n }\n } else {\n return false;\n }\n }\n\n function disableOwnerReservation() {\n if (\n errorMessage ||\n loadingAccommodations ||\n !availabilityFound ||\n addingToCart ||\n !quickRateplanCode ||\n !ownersRateplanCode\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function filterCampaignMinimumNights({ attributes }) {\n if (attributes.field_nights_min) {\n if (startDate && endDate) {\n let range = moment.range(startDate, endDate);\n return Array.from(range.by('day')).length > attributes.field_nights_min;\n } else {\n return false;\n }\n } else {\n return true;\n }\n }\n\n function filterCampaignMaximumNights({ attributes }) {\n if (attributes.field_nights_max) {\n if (startDate && endDate) {\n let range = moment.range(startDate, endDate);\n return (\n Array.from(range.by('day')).length - 1 <= attributes.field_nights_max\n );\n } else {\n return false;\n }\n } else {\n return true;\n }\n }\n\n function filterCampaignMinimumAmount({ attributes }) {\n if (attributes.field_total_min) {\n if (price) {\n return price >= attributes.field_total_min;\n } else {\n return false;\n }\n } else {\n return true;\n }\n }\n\n function showActiveCampaigns() {\n if (getAllActiveCampaigns()) {\n return getAllActiveCampaigns()\n .filter(filterContainingCampaigns)\n .filter(filterCampaignMinimumNights)\n .filter(filterCampaignMaximumNights)\n .filter(filterCampaignMinimumAmount);\n }\n }\n\n useEffect(() => {\n if (endDate) {\n showActiveCampaigns();\n }\n }, [endDate]);\n\n function updateUrlParams() {\n if (startDate && endDate) {\n urlParams.set('startDate', startDate.format(API_DATE_FORMAT));\n urlParams.set('endDate', endDate.format(API_DATE_FORMAT));\n } else {\n urlParams.delete('startDate');\n urlParams.delete('endDate');\n }\n urlParams.set('adults', adults);\n urlParams.set('children', children);\n urlParams.set('infants', infants);\n urlParams.set('pets', pets && roomAllowsPets() ? 1 : 0);\n\n window.history.replaceState({}, '', `${location.pathname}?${urlParams}`);\n }\n\n useEffect(() => {\n async function getEmail() {\n const userInfoResponse = await fetch(\n `${drupalSettings.base_url}/getUserInfo`\n );\n if (userInfoResponse.ok) {\n const userData = await userInfoResponse.json();\n setEmail(userData[0].mail);\n } else {\n setEmail('empty');\n // Ownership info won't be fetched.\n setLoadingOwnershipInfo(false);\n }\n }\n\n getEmail();\n }, []);\n\n useEffect(() => {\n if (email) {\n updateUrlParams();\n setSelectedExtras([]);\n getAccommodations();\n }\n }, [startDate, endDate, pets, adults, children, email]);\n\n useEffect(() => {\n updateUrlParams();\n }, [children, adults, infants]);\n\n useEffect(() => {\n fetchAvailabilities();\n }, [setAvailability]);\n\n useEffect(() => {\n if (redirect) {\n window.location.replace(redirect);\n }\n }, [redirect]);\n\n // Set selected extra services.\n function onExtraServiceChange(e) {\n if (e.target.checked) {\n setSelectedExtras([...selectedExtras, e.target.value]);\n } else {\n const newExtras = selectedExtras.filter(\n (extra) => extra !== e.target.value\n );\n setSelectedExtras(newExtras);\n }\n }\n\n // Update the displayed price.\n useEffect(() => {\n let additionalPrice = 0;\n selectedExtras.map((selectedExtra) => {\n const extra = extraServices.find(\n (service) => parseInt(service.id) === parseInt(selectedExtra)\n );\n additionalPrice += parseFloat(extra.price);\n });\n\n if (apiPrice) {\n setPrice(apiPrice + additionalPrice);\n }\n }, [selectedExtras, apiPrice]);\n\n function addToCart(e, rateplanCodeType) {\n e.preventDefault();\n\n // We want to have one single variation of the correct type.\n let product;\n if (products.data.length == 0) {\n // No products, nothing to do.\n return;\n }\n if (products.data.length == 1) {\n // Either there is only one variation, or travelling with pets.\n product = products.data[0];\n }\n if (products.data.length > 1) {\n // Both pets and non pets in the products; we choose the non pets.\n product = products.data.filter((p) => {\n return p.petApproved == false;\n })[0];\n }\n\n // Prevent item from accidentally being added twice.\n if (addingToCart) return;\n setAddingToCart(true);\n\n let rateplanCode = product.rateplanCode\n ? `&rateplanCode=${product.rateplanCode}`\n : '';\n let price = product.price ? `&price=${product.price}` : '';\n\n const requestOptions = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n\n body: JSON.stringify([\n {\n purchased_entity_type: 'commerce_product_variation',\n purchased_entity_id: product.variationId,\n quantity: '1',\n combine: false, // False will create another order item, while true will increment an existing item.\n },\n ]),\n };\n\n const activeRateplanCodeType = () => {\n // The token also has to be added here, since it can be inaccessible to PHP due to caching\n // later when the order price is validated.\n if (rateplanCodeType == 'owner') {\n return `&rateplanCode=${ownersRateplanCode}&reservationType=1`;\n }\n if (rateplanCodeType == 'quick') {\n return `&rateplanCode=${quickRateplanCode}&reservationType=2`;\n }\n return rateplanCode;\n };\n\n const token = Cookies.get('mo.id.token.Azure.AD.B2C');\n\n fetch(\n `${drupalSettings.base_url}/${\n drupalSettings.path.currentLanguage\n }/cart/add?_format=json&adults=${adults}\n\t\t\t\t&startDate=${startDate.format(API_DATE_FORMAT)}\n\t\t\t\t&endDate=${endDate.format(API_DATE_FORMAT)}\n\t\t\t\t&children=${children}\n\t\t\t\t&infants=${infants}\n\t\t\t\t&pets=${roomAllowsPets() ? pets : false}\n\t\t\t\t${userOwnsApartment ? '&price=0' : price}\n\t\t\t\t${activeRateplanCodeType()}\n\t\t\t\t${token ? `&token=${token}` : ''}\n ${\n selectedExtras.length > 0\n ? `&extraServices=${selectedExtras.toString()}`\n : ''\n }\n `,\n requestOptions\n ).then(() => {\n const item_category = product.field_capacity.name;\n const item_category2 = product.field_housing_type_list[0];\n sendEcommerceEvent(\n dataLayer,\n 'add_to_cart',\n true,\n product.roomName,\n userOwnsApartment ? 0 : product.price,\n item_category,\n item_category2\n );\n\n setRedirect(`/${drupalSettings.path.currentLanguage}/cart`);\n });\n }\n\n // Calculate benefits. Param 'client' is for public and 'hlx' for Hotellinx use.\n function modifyCampaignCommentString(campaign, target = 'client') {\n let calculatedValue = '';\n const benefitComment =\n target == 'client'\n ? campaign.field_comment_for_client\n : campaign.field_hlx_comment;\n\n let fieldbenefitItemValue = 0;\n let fieldbenefitItemInternal = 0;\n\n if (!(campaign.field_benefit_item_value == null)) {\n fieldbenefitItemValue = campaign.field_benefit_item_value.number;\n }\n\n if (!(campaign.field_benefit_item_val_internal == null)) {\n fieldbenefitItemInternal =\n campaign.field_benefit_item_val_internal.number;\n }\n\n const benefitItemValue =\n target == 'client' ? fieldbenefitItemValue : fieldbenefitItemInternal;\n\n if (campaign.field_benefit_formula == 'nights') {\n calculatedValue =\n numberOfNights *\n benefitItemValue *\n campaign.field_benefit_item_multiplier;\n } else if (campaign.field_benefit_formula == 'people') {\n calculatedValue =\n numberOfGuests *\n benefitItemValue *\n campaign.field_benefit_item_multiplier;\n } else if (campaign.field_benefit_formula == 'nights_people') {\n calculatedValue = numberOfNights * numberOfGuests * benefitItemValue;\n } else if (campaign.field_benefit_formula == 'per_reservation') {\n calculatedValue =\n campaign.field_benefit_item_multiplier * benefitItemValue;\n }\n\n return benefitComment\n .replace(/@items/g, campaign.field_benefit_item_multiplier)\n .replace(/@value/g, calculatedValue);\n }\n\n function onFloatingSubmitClick(e) {\n e.preventDefault();\n\n // If we already have a price, add the item to the cart.\n // Otherwise scrolls to the booking element.\n // For owners, it always scrolls since they usually have two booking options.\n if (!userOwnsApartment && price) {\n addToCart(e);\n return;\n }\n\n const bookingWidgetElement = document.getElementById(\n 'accommodation_reservation'\n );\n\n if (bookingWidgetElement) {\n bookingWidgetElement.scrollIntoView({ behavior: 'smooth' });\n }\n }\n\n return (\n
\n {/* Fixed button component that can be used to scroll to the booking widget. */}\n \n
\n \n {userOwnsApartment\n ? Drupal.t('Make booking request')\n : `${Drupal.t('Book this room')} ${\n price\n ? new Intl.NumberFormat('fi-FI', {\n style: 'currency',\n currency: 'EUR',\n }).format(parseFloat(price))\n : ''\n }`}\n \n
\n
\n\n {userOwnsApartment && (\n
\n
\n {Drupal.t('Ski-InnĀ®-owner')}\n
\n )}\n \n \n \n {showActiveCampaigns() && !userOwnsApartment\n ? showActiveCampaigns().map((value, index) => (\n
\n {modifyCampaignCommentString(value.attributes)}\n
\n ))\n : null}\n \n );\n};\n\nexport default AccommodationReservation;\n","import { useEffect, useState, useRef } from 'react';\n\n/**\n * Used for tracking if an element is in view.\n */\nexport function useOnScreen(ref) {\n const [isOnScreen, setIsOnScreen] = useState(false);\n const observerRef = useRef();\n\n useEffect(() => {\n observerRef.current = new IntersectionObserver(([entry]) =>\n setIsOnScreen(entry.isIntersecting)\n );\n }, []);\n\n useEffect(() => {\n observerRef.current.observe(ref.current);\n\n return () => {\n observerRef.current.disconnect();\n };\n }, [ref]);\n\n return isOnScreen;\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport { BrowserRouter as Router } from 'react-router-dom';\n\nimport AccommodationReservation from './AccommodationReservation';\n\nconst root = ReactDOM.createRoot(\n document.getElementById('accommodation_reservation')\n);\n\nroot.render(\n \n \n \n \n \n);\n","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = prefix || defaultDelimiter\n var pattern = capture || group\n var prevText = prefix || (typeof tokens[tokens.length - 1] === 'string' ? tokens[tokens.length - 1] : '')\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : restrictBacktrack(delimiter, prevText))\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\nfunction restrictBacktrack(delimiter, prevText) {\n if (!prevText || prevText.indexOf(delimiter) > -1) {\n return '[^' + escapeString(delimiter) + ']+?'\n }\n\n return escapeString(prevText) + '|(?:(?!' + escapeString(prevText) + ')[^' + escapeString(delimiter) + '])+?'\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n","module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n"],"names":["isAbsolute","pathname","charAt","spliceOne","list","index","i","k","n","length","pop","condition","message","Error","addLeadingSlash","path","stripBasename","prefix","toLowerCase","indexOf","hasBasename","substr","stripTrailingSlash","slice","createPath","location","search","hash","state","key","currentLocation","hashIndex","searchIndex","parsePath","undefined","decodeURI","e","URIError","to","from","hasTrailingSlash","toParts","split","fromParts","isToAbs","isFromAbs","mustEndAbs","concat","last","up","part","unshift","result","join","createTransitionManager","prompt","listeners","setPrompt","nextPrompt","confirmTransitionTo","action","getUserConfirmation","callback","appendListener","fn","isActive","listener","apply","arguments","push","filter","item","notifyListeners","_len","args","Array","_key","forEach","canUseDOM","window","document","createElement","getConfirmation","confirm","PopStateEvent","HashChangeEvent","getHistoryState","history","MAX_SIGNED_31_BIT_INT","commonjsGlobal","globalThis","g","createContext","defaultValue","calculateChangedBits","_Provider$childContex","_Consumer$contextType","contextProp","Provider","_React$Component","_this","value","handlers","call","this","emitter","props","on","handler","off","h","get","set","newValue","changedBits","_proto","prototype","getChildContext","_ref","componentWillReceiveProps","nextProps","oldValue","x","y","render","children","childContextTypes","isRequired","Consumer","_React$Component2","_this2","_len2","_key2","observedBits","getValue","onUpdate","setState","_proto2","componentDidMount","context","componentWillUnmount","isArray","contextTypes","createNamedContext","name","displayName","historyContext","Router","_isMounted","_pendingLocation","staticContext","unlisten","listen","computeRootMatch","url","params","isExact","match","cache$1","cacheCount$1","BrowserRouter","ua","globalHistory","canUseHistory","navigator","userAgent","needsHashChangeListener","_props","_props$forceRefresh","forceRefresh","_props$getUserConfirm","_props$keyLength","keyLength","basename","getDOMLocation","historyState","_window$location","createKey","Math","random","toString","transitionManager","nextState","handlePopState","event","isExtraneousPopstateEvent","handlePop","handleHashChange","forceNextPop","ok","fromLocation","toLocation","toIndex","allKeys","fromIndex","delta","go","revertPop","initialLocation","createHref","listenerCount","checkDOMListeners","addEventListener","removeEventListener","isBlocked","href","pushState","prevIndex","nextKeys","replace","replaceState","goBack","goForward","block","unblock","createBrowserHistory","resolveToLocation","normalizeToLocation","forwardRefShim","C","forwardRef","LinkAnchor","forwardedRef","innerRef","navigate","_onClick","onClick","rest","target","ex","preventDefault","defaultPrevented","button","metaKey","altKey","ctrlKey","shiftKey","isModifiedEvent","ref","Link","_ref2","_ref2$component","component","isDuplicateNavigation","forwardRefShim$1","forwardRef$1","_ref$ariaCurrent","ariaCurrent","_ref$activeClassName","activeClassName","activeStyle","classNameProp","className","exact","isActiveProp","locationProp","sensitive","strict","styleProp","style","escapedPath","options","_options","_options$exact","_options$strict","_options$sensitive","reduce","matched","_compilePath","cacheKey","end","pathCache","keys","regexp","compilePath$1","exec","values","memo","matchPath","classnames","joinClassnames","queryString","urlParams","URLSearchParams","API_DATE_FORMAT","widgetElementRef","useRef","bookingWidgetIsOnScreen","_useState","useState","_useState2","_slicedToArray","isOnScreen","setIsOnScreen","observerRef","useEffect","current","IntersectionObserver","entry","isIntersecting","observe","disconnect","useOnScreen","isTabletOrMobile","useMediaQuery","query","pets","setPets","_useState3","_useState4","selectedExtras","setSelectedExtras","_useState5","moment","_useState6","startDate","setStartDate","_useState7","_useState8","endDate","setEndDate","_useState9","parseInt","_useState10","adults","setAdults","_useState11","_useState12","setChildren","_useState13","_useState14","infants","setInfants","_useState15","_useState16","availability","setAvailability","_useState17","_useState18","availabilityPets","setAvailabilityPets","_useState19","_useState20","availabilityFound","setAvailabilityFound","_useState21","_useState22","loadingAvailabilities","setLoadingAvailabilities","_useState23","_useState24","loadingAccommodations","setLoadingAccommodations","_useState25","_useState26","loadingOwnershipInfo","setLoadingOwnershipInfo","_useState27","_useState28","addingToCart","setAddingToCart","_useState29","_useState30","fetchingCampaigns","setFetchingCampaigns","_useState31","data","_useState32","products","setProducts","_useState33","_useState34","redirect","setRedirect","_useState35","_useState36","price","setPrice","_useState37","_useState38","apiPrice","setApiPrice","_useState39","_useState40","errorMessage","setErrorMessage","_useState41","_useState42","allCampaigns","setAllCampaigns","_useState43","_useState44","userOwnsApartment","setIsOwner","_useState45","_useState46","userIsOwner","setUserIsOwner","_useState47","_useState48","ownersRateplanCode","setOwnersRateplanCode","_useState49","_useState50","quickRateplanCode","setQuickRateplanCode","hotellinxIds","drupalSettings","hotellinx_ids","numberOfNights","by","numberOfGuests","_useState51","_useState52","email","setEmail","_useState53","_useState54","ownershipData","setOwnerShipData","dataLayer","_useState55","_useState56","hasQuota","setHasQuota","extraServices","accommodation_extra_services","getHotellinxIdPets","Object","includes","find","roomAllowsPets","_fetchAvailabilities","_asyncToGenerator","_regeneratorRuntime","_callee4","API_URL","dayStep","_context4","prev","next","process","fetch","active_site","add","format","method","then","response","json","map","roomTypeId","oldStateArray","_toConsumableArray","flat","console","log","stop","getAccommodations","roomTypeIds","headers","token","Cookies","sort","a","b","priceFromApi","parseFloat","additionalPrice","extraId","extra","service","id","checkIfOwner","item_category","field_capacity","item_category2","field_housing_type_list","sendEcommerceEvent","roomName","status","Drupal","t","minStay","error","min_stay_message","reservation_length_error_message","continuous_availability_error_message","user","roles","ratePlancodesFetched","rateplanCode","filterCampaignExpired","attributes","field_end_date","isAfter","filterCampaignApartmentId","relationships","field_products","some","product_uuid","getAllActiveCampaigns","fetchCampaigns","_fetchCampaigns","_callee5","_yield$response$json","_context5","base_url","current_language","credentials","sent","currentRoomId","rooms","room","filterContainingCampaigns","_ref4","range","field_campaign_strict_date_check","isSameOrAfter","field_start_date","isSameOrBefore","overlaps","filterCampaignMinimumNights","_ref5","field_nights_min","filterCampaignMaximumNights","_ref6","field_nights_max","filterCampaignMinimumAmount","_ref7","field_total_min","showActiveCampaigns","updateUrlParams","addToCart","rateplanCodeType","product","p","petApproved","requestOptions","body","JSON","stringify","purchased_entity_type","purchased_entity_id","variationId","quantity","combine","currentLanguage","_getData","_callee","_context","getData","fetchOwnerShipInfo","_ref3","_callee2","accommodationsResponse","accommodationsData","_context2","_getEmail","_callee3","userInfoResponse","userData","_context3","mail","getEmail","fetchAvailabilities","selectedExtra","React","display","backgroundColor","bookingWidgetElement","getElementById","scrollIntoView","behavior","disabled","Intl","NumberFormat","currency","AccommodationSearchForm","kids","onSubmit","isSubmitting","availableDates","maxGuests","activeCampaigns","setDatesFirst","disableOwnerReservation","disableBooking","onExtraServiceChange","checked","newExtras","selectedServices","campaign","calculatedValue","benefitComment","field_comment_for_client","field_hlx_comment","fieldbenefitItemValue","fieldbenefitItemInternal","field_benefit_item_value","number","field_benefit_item_val_internal","benefitItemValue","field_benefit_formula","field_benefit_item_multiplier","modifyCampaignCommentString","ReactDOM","AccommodationReservation","isarray","module","exports","pathToRegexp","RegExp","groups","source","delimiter","optional","repeat","partial","asterisk","pattern","attachKeys","regexpToRegexp","parts","flags","arrayToRegexp","tokensToRegExp","parse","stringToRegexp","compile","str","tokensToFunction","PATH_REGEXP","res","tokens","defaultDelimiter","m","escaped","offset","capture","group","modifier","prevText","escapeGroup","restrictBacktrack","escapeString","encodeURIComponentPretty","encodeURI","c","charCodeAt","toUpperCase","matches","obj","opts","encode","pretty","encodeURIComponent","segment","TypeError","j","test","re","route","endsWithDelimiter","arr"],"sourceRoot":""}