{"version":3,"sources":["webpack:////apps/roverpass/shared/node_modules/path-to-regexp/index.js","webpack:////apps/roverpass/shared/node_modules/path-to-regexp/node_modules/isarray/index.js","webpack:////apps/roverpass/shared/node_modules/react-router/esm/react-router.js","webpack:////apps/roverpass/shared/node_modules/react-router-dom/esm/react-router-dom.js","webpack:////apps/roverpass/shared/node_modules/resolve-pathname/esm/resolve-pathname.js","webpack:////apps/roverpass/shared/node_modules/value-equal/esm/value-equal.js","webpack:////apps/roverpass/shared/node_modules/history/esm/history.js","webpack:////apps/roverpass/shared/node_modules/tiny-invariant/dist/tiny-invariant.esm.js"],"names":["isarray","module","exports","pathToRegexp","parse","compile","str","options","tokensToFunction","tokensToRegExp","PATH_REGEXP","RegExp","join","res","tokens","key","index","path","defaultDelimiter","delimiter","exec","m","escaped","offset","slice","length","next","prefix","name","capture","group","modifier","asterisk","push","partial","repeat","optional","pattern","escapeGroup","escapeString","substr","encodeURIComponentPretty","encodeURI","replace","c","charCodeAt","toString","toUpperCase","matches","Array","i","flags","obj","opts","data","encode","pretty","encodeURIComponent","token","segment","value","TypeError","JSON","stringify","j","test","attachKeys","re","keys","sensitive","strict","end","route","endsWithDelimiter","groups","source","match","regexpToRegexp","parts","arrayToRegexp","stringToRegexp","isArray","arr","Object","prototype","call","MAX_SIGNED_31_BIT_INT","commonjsGlobal","globalThis","window","global","createContext","defaultValue","calculateChangedBits","_Provider$childContex","_Consumer$contextType","contextProp","getUniqueId","Provider","_React$Component","_this","handlers","_len","arguments","args","_key","apply","this","concat","emitter","props","on","handler","off","filter","h","get","set","newValue","changedBits","forEach","_proto","getChildContext","_ref","componentWillReceiveProps","nextProps","oldValue","x","y","render","children","Component","childContextTypes","object","isRequired","Consumer","_React$Component2","_this2","_len2","_key2","observedBits","state","getValue","onUpdate","setState","_proto2","undefined","componentDidMount","context","componentWillUnmount","contextTypes","createNamedContext","displayName","historyContext","Router","location","history","_isMounted","_pendingLocation","staticContext","unlisten","listen","computeRootMatch","pathname","url","params","isExact","createElement","Lifecycle","onMount","componentDidUpdate","prevProps","onUnmount","cache","cacheLimit","cacheCount","generatePath","generator","compilePath","Redirect","computedMatch","to","_ref$push","method","self","prevLocation","cache$1","cacheLimit$1","cacheCount$1","matchPath","_options","_options$exact","exact","_options$strict","_options$sensitive","reduce","matched","_compilePath","cacheKey","pathCache","result","regexp","compilePath$1","values","memo","Route","context$1","_this$props","component","Children","count","isEmptyChildren","addLeadingSlash","charAt","stripBasename","basename","base","indexOf","createURL","staticHandler","methodName","noop","Switch","element","child","isValidElement","from","cloneElement","withRouter","C","wrappedComponentRef","remainingProps","ref","WrappedComponent","useContext","useHistory","useLocation","useParams","useRouteMatch","BrowserRouter","resolveToLocation","currentLocation","normalizeToLocation","forwardRefShim","forwardRef","LinkAnchor","forwardedRef","innerRef","navigate","_onClick","onClick","rest","target","event","ex","preventDefault","defaultPrevented","button","metaKey","altKey","ctrlKey","shiftKey","isModifiedEvent","Link","_ref2","_ref2$component","href","createHref","isDuplicateNavigation","forwardRefShim$1","forwardRef$1","NavLink","_ref$ariaCurrent","ariaCurrent","_ref$activeClassName","activeClassName","activeStyle","classNameProp","className","isActiveProp","isActive","locationProp","styleProp","style","toLocation","escapedPath","classnames","joinClassnames","isAbsolute","spliceOne","list","k","n","pop","hasTrailingSlash","toParts","split","fromParts","isToAbs","isFromAbs","mustEndAbs","last","up","part","unshift","valueOf","valueEqual","a","b","every","item","aValue","bValue","assign","stripLeadingSlash","toLowerCase","hasBasename","stripTrailingSlash","createPath","search","hash","createLocation","hashIndex","searchIndex","parsePath","decodeURI","e","URIError","locationsAreEqual","createTransitionManager","prompt","listeners","setPrompt","nextPrompt","confirmTransitionTo","action","getUserConfirmation","callback","appendListener","fn","listener","notifyListeners","canUseDOM","document","getConfirmation","message","confirm","PopStateEvent","HashChangeEvent","getHistoryState","createBrowserHistory","ua","globalHistory","canUseHistory","navigator","userAgent","needsHashChangeListener","_props","_props$forceRefresh","forceRefresh","_props$getUserConfirm","_props$keyLength","keyLength","getDOMLocation","historyState","_window$location","createKey","Math","random","transitionManager","nextState","handlePopState","isExtraneousPopstateEvent","handlePop","handleHashChange","forceNextPop","ok","fromLocation","toIndex","allKeys","fromIndex","delta","go","revertPop","initialLocation","listenerCount","checkDOMListeners","addEventListener","removeEventListener","isBlocked","pushState","prevIndex","nextKeys","replaceState","goBack","goForward","block","unblock","HashChangeEvent$1","HashPathCoders","hashbang","encodePath","decodePath","noslash","slash","stripHash","getHashPath","substring","replaceHashPath","createHashHistory","_props$hashType","hashType","_HashPathCoders$hashT","ignorePath","encodedPath","allPaths","lastIndexOf","baseTag","querySelector","getAttribute","pushHashPath","nextPaths","clamp","lowerBound","upperBound","min","max","createMemoryHistory","_props$initialEntries","initialEntries","_props$initialIndex","initialIndex","entries","map","entry","nextIndex","nextEntries","splice","canGo","isProduction","invariant","condition","Error","provided"],"mappings":"8EAAA,IAAIA,EAAU,EAAQ,MAKtBC,EAAOC,QAAUC,EACjBF,EAAOC,QAAQE,MAAQA,EACvBH,EAAOC,QAAQG,QAgGf,SAAiBC,EAAKC,GACpB,OAAOC,EAAiBJ,EAAME,EAAKC,GAAUA,EAC/C,EAjGAN,EAAOC,QAAQM,iBAAmBA,EAClCP,EAAOC,QAAQO,eAAiBA,EAOhC,IAAIC,EAAc,IAAIC,OAAO,CAG7B,UAOA,0GAA0GC,KAAK,KAAM,KASrH,SAASR,EAAME,EAAKC,GAOlB,IANA,IAKIM,EALAC,EAAS,GACTC,EAAM,EACNC,EAAQ,EACRC,EAAO,GACPC,EAAmBX,GAAWA,EAAQY,WAAa,IAEf,OAAhCN,EAAMH,EAAYU,KAAKd,KAAe,CAC5C,IAAIe,EAAIR,EAAI,GACRS,EAAUT,EAAI,GACdU,EAASV,EAAIG,MAKjB,GAJAC,GAAQX,EAAIkB,MAAMR,EAAOO,GACzBP,EAAQO,EAASF,EAAEI,OAGfH,EACFL,GAAQK,EAAQ,OADlB,CAIA,IAAII,EAAOpB,EAAIU,GACXW,EAASd,EAAI,GACbe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hG,GAC5B,IAAIgG,EAAJ,CAGA,GAAIF,EACF,MAAM,IAAIG,MAAM/Z,GAElB,IAAIga,EAA8B,oBAAZlG,EAAyBA,IAAYA,EACvD7R,EAAQ+X,EAAW,GAAG/U,OAAOjF,EAAQ,MAAMiF,OAAO+U,GAAYha,EAClE,MAAM,IAAI+Z,MAAM9X,EANhB,CAOF,C","file":"js/vendors~accounts_autopay~accounts_payment~accounts_payment_methods~accounts_reservation_payments~adm~f07c78ca-97fd14d83e072674efc5.chunk.js","sourcesContent":["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+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'].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 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 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 var partial = prefix != null && next != null && next !== prefix;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = res[2] || defaultDelimiter;\n var pattern = capture || group;\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 ? '.*' : '[^' + escapeString(delimiter) + ']+?'\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 return tokens;\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 return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n var value = data[token.name];\n var segment;\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\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 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 for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\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 path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n continue;\n }\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n path += token.prefix + segment;\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 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 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 for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\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 options = options || {};\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 if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = '(?:' + token.pattern + ')';\n keys.push(token);\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\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 route += capture;\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 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 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 options = options || {};\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */keys);\n }\n if (isarray(path)) {\n return arrayToRegexp( /** @type {!Array} */path, /** @type {!Array} */keys, options);\n }\n return stringToRegexp( /** @type {string} */path, /** @type {!Array} */keys, options);\n}","module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\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';\nvar MAX_SIGNED_31_BIT_INT = 1073741823;\nvar commonjsGlobal = typeof globalThis !== \"undefined\" // 'global proper'\n?\n// eslint-disable-next-line no-undef\nglobalThis : typeof window !== \"undefined\" ? window // Browser\n: typeof global !== \"undefined\" ? global // node.js\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\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}\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}\nfunction onlyChild(children) {\n return Array.isArray(children) ? children[0] : children;\n}\nfunction createReactContext(defaultValue, calculateChangedBits) {\n var _Provider$childContex, _Consumer$contextType;\n var contextProp = \"__create-react-context-\" + getUniqueId() + \"__\";\n var Provider = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Provider, _React$Component);\n function Provider() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\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 var _proto = Provider.prototype;\n _proto.getChildContext = function getChildContext() {\n var _ref;\n return _ref = {}, _ref[contextProp] = this.emitter, _ref;\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 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 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 changedBits |= 0;\n if (changedBits !== 0) {\n this.emitter.set(nextProps.value, changedBits);\n }\n }\n }\n };\n _proto.render = function render() {\n return this.props.children;\n };\n return Provider;\n }(React.Component);\n Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);\n var Consumer = /*#__PURE__*/function (_React$Component2) {\n _inheritsLoose(Consumer, _React$Component2);\n function Consumer() {\n var _this2;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\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 _this2.onUpdate = function (newValue, changedBits) {\n var observedBits = _this2.observedBits | 0;\n if ((observedBits & changedBits) !== 0) {\n _this2.setState({\n value: _this2.getValue()\n });\n }\n };\n return _this2;\n }\n var _proto2 = Consumer.prototype;\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 _proto2.componentDidMount = function componentDidMount() {\n if (this.context[contextProp]) {\n this.context[contextProp].on(this.onUpdate);\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 _proto2.componentWillUnmount = function componentWillUnmount() {\n if (this.context[contextProp]) {\n this.context[contextProp].off(this.onUpdate);\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 _proto2.render = function render() {\n return onlyChild(this.props.children)(this.state.value);\n };\n return Consumer;\n }(React.Component);\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};\nvar historyContext = /*#__PURE__*/createNamedContext(\"Router-History\");\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 Router.computeRootMatch = function computeRootMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n function Router(props) {\n var _this;\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 if (!props.staticContext) {\n _this.unlisten = props.history.listen(function (location) {\n _this._pendingLocation = location;\n });\n }\n return _this;\n }\n var _proto = Router.prototype;\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n this._isMounted = true;\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 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 if (this._pendingLocation) {\n this.setState({\n location: this._pendingLocation\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 _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 return Router;\n}(React.Component);\nif (process.env.NODE_ENV !== \"production\") {\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 function MemoryRouter() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createMemoryHistory(_this.props);\n return _this;\n }\n var _proto = MemoryRouter.prototype;\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n return MemoryRouter;\n}(React.Component);\nif (process.env.NODE_ENV !== \"production\") {\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}\nvar Lifecycle = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Lifecycle, _React$Component);\n function Lifecycle() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Lifecycle.prototype;\n _proto.componentDidMount = function componentDidMount() {\n if (this.props.onMount) this.props.onMount.call(this, this);\n };\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.props.onUnmount) this.props.onUnmount.call(this, this);\n };\n _proto.render = function render() {\n return null;\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}\nif (process.env.NODE_ENV !== \"production\") {\n var messageType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);\n}\nvar cache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\nfunction compilePath(path) {\n if (cache[path]) return cache[path];\n var generator = pathToRegexp.compile(path);\n if (cacheCount < cacheLimit) {\n cache[path] = generator;\n cacheCount++;\n }\n return generator;\n}\n/**\n * Public API for generating a URL pathname from a path and parameters.\n */\n\nfunction generatePath(path, params) {\n if (path === void 0) {\n path = \"/\";\n }\n if (params === void 0) {\n params = {};\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 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 if (!locationsAreEqual(prevLocation, _extends({}, location, {\n key: prevLocation.key\n }))) {\n method(location);\n }\n },\n to: to\n });\n });\n}\nif (process.env.NODE_ENV !== \"production\") {}\nvar cache$1 = {};\nvar cacheLimit$1 = 10000;\nvar cacheCount$1 = 0;\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 if (cacheCount$1 < cacheLimit$1) {\n pathCache[path] = result;\n cacheCount$1++;\n }\n return result;\n}\n/**\n * Public API for matching a URL pathname to a path.\n */\n\nfunction matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\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 var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\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}\nfunction isEmptyChildren(children) {\n return React.Children.count(children) === 0;\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\nvar Route = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Route, _React$Component);\n function Route() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Route.prototype;\n _proto.render = function render() {\n var _this = this;\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 var props = _extends({}, context$1, {\n location: location,\n match: match\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 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 return Route;\n}(React.Component);\nif (process.env.NODE_ENV !== \"production\") {\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 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}\nfunction addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n}\nfunction addBasename(basename, location) {\n if (!basename) return location;\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\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}\nfunction createURL(location) {\n return typeof location === \"string\" ? location : createPath(location);\n}\nfunction staticHandler(methodName) {\n return function () {\n process.env.NODE_ENV !== \"production\" ? invariant(false, \"You cannot %s with \", methodName) : invariant(false);\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\nvar StaticRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(StaticRouter, _React$Component);\n function StaticRouter() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.handlePush = function (location) {\n return _this.navigateTo(location, \"PUSH\");\n };\n _this.handleReplace = function (location) {\n return _this.navigateTo(location, \"REPLACE\");\n };\n _this.handleListen = function () {\n return noop;\n };\n _this.handleBlock = function () {\n return noop;\n };\n return _this;\n }\n var _proto = StaticRouter.prototype;\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 _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 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 return StaticRouter;\n}(React.Component);\nif (process.env.NODE_ENV !== \"production\") {\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 function Switch() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Switch.prototype;\n _proto.render = function render() {\n var _this = this;\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 return Switch;\n}(React.Component);\nif (process.env.NODE_ENV !== \"production\") {\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 var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutPropertiesLoose(props, [\"wrappedComponentRef\"]);\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 C.displayName = displayName;\n C.WrappedComponent = Component;\n if (process.env.NODE_ENV !== \"production\") {}\n return hoistStatics(C, Component);\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 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 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 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 var location = useLocation();\n var match = useContext(context).match;\n return path ? matchPath(location.pathname, path) : match;\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 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 global$1[key] = \"esm\";\n }\n}\nexport { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, historyContext as __HistoryContext, context as __RouterContext, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter };","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 function BrowserRouter() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createBrowserHistory(_this.props);\n return _this;\n }\n var _proto = BrowserRouter.prototype;\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n return BrowserRouter;\n}(React.Component);\nif (process.env.NODE_ENV !== \"production\") {\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 function HashRouter() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createHashHistory(_this.props);\n return _this;\n }\n var _proto = HashRouter.prototype;\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n return HashRouter;\n}(React.Component);\nif (process.env.NODE_ENV !== \"production\") {\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}\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};\nvar forwardRefShim = function forwardRefShim(C) {\n return C;\n};\nvar forwardRef = React.forwardRef;\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\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 var target = rest.target;\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 if (!event.defaultPrevented &&\n // onClick prevented default\n event.button === 0 && (\n // ignore everything but left clicks\n !target || target === \"_self\") &&\n // 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 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 return /*#__PURE__*/React.createElement(\"a\", props);\n});\nif (process.env.NODE_ENV !== \"production\") {\n LinkAnchor.displayName = \"LinkAnchor\";\n}\n/**\n * The public API for rendering a history-aware .\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 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 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 if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n return /*#__PURE__*/React.createElement(component, props);\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}\nvar forwardRefShim$1 = function forwardRefShim(C) {\n return C;\n};\nvar forwardRef$1 = React.forwardRef;\nif (typeof forwardRef$1 === \"undefined\") {\n forwardRef$1 = forwardRefShim$1;\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 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\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 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 if (isActive) {\n className = joinClassnames(className, activeClassName);\n style = _extends({}, style, activeStyle);\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 if (forwardRefShim$1 !== forwardRef$1) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n return /*#__PURE__*/React.createElement(Link, props);\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}\nexport { BrowserRouter, HashRouter, Link, NavLink };","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 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 var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\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 if (!fromParts.length) return '/';\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 var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\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 if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n var result = fromParts.join('/');\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n return result;\n}\nexport default resolvePathname;","function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true;\n\n // Otherwise, if either of them == null they are not equal.\n if (a == null || b == null) return false;\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n return Object.keys(Object.assign({}, a, b)).every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n return false;\n}\nexport default valueEqual;","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';\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 if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\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}\nfunction createLocation(path, state, key, currentLocation) {\n var location;\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 if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n if (state !== undefined && location.state === undefined) location.state = state;\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 if (key) location.key = key;\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 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}\nfunction createTransitionManager() {\n var prompt = null;\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 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 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 var listeners = [];\n function appendListener(fn) {\n var isActive = true;\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\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 function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\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}\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\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\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\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 function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\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 function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n var transitionManager = createTransitionManager();\n function setState(nextState) {\n _extends(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n var forceNextPop = false;\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 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 if (delta) {\n forceNextPop = true;\n go(delta);\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 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 if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\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 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 if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\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 function go(n) {\n globalHistory.go(n);\n }\n function goBack() {\n go(-1);\n }\n function goForward() {\n go(1);\n }\n var listenerCount = 0;\n function checkDOMListeners(delta) {\n listenerCount += delta;\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 var isBlocked = false;\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n var unblock = transitionManager.setPrompt(prompt);\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n return unblock();\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 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}\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};\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\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}\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\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 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 var transitionManager = createTransitionManager();\n function setState(nextState) {\n _extends(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n var forceNextPop = false;\n var ignorePath = null;\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\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 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 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 if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\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 if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n return href + '#' + encodePath(basename + createPath(location));\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 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 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 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 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 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 function goBack() {\n go(-1);\n }\n function goForward() {\n go(1);\n }\n var listenerCount = 0;\n function checkDOMListeners(delta) {\n listenerCount += delta;\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 var isBlocked = false;\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n var unblock = transitionManager.setPrompt(prompt);\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n return unblock();\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 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}\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\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\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 function setState(nextState) {\n _extends(history, nextState);\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\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 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 if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\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 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 function goBack() {\n go(-1);\n }\n function goForward() {\n go(1);\n }\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n return transitionManager.setPrompt(prompt);\n }\n function listen(listener) {\n return transitionManager.appendListener(listener);\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}\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };","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}\nexport { invariant as default };"],"sourceRoot":""}