UNPKG

@b2b-apps/connected-react-router

Version:
1,725 lines (1,404 loc) 392 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["ConnectedReactRouter"] = factory(); else root["ConnectedReactRouter"] = factory(); })(this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 85); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(78); } else { module.exports = __webpack_require__(77); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 2 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if (process.env.NODE_ENV !== 'production') { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== 'production') { var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; var isValidElement = function(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; }; // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(76)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(75)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule warning */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var __DEV__ = process.env.NODE_ENV !== 'production'; var warning = function() {}; if (__DEV__) { var printWarning = function printWarning(format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} } warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (!condition) { printWarning.apply(null, [format].concat(args)); } }; } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ function makeEmptyFunction(arg) { return function () { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ var emptyFunction = function emptyFunction() {}; emptyFunction.thatReturns = makeEmptyFunction; emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); emptyFunction.thatReturnsThis = function () { return this; }; emptyFunction.thatReturnsArgument = function (arg) { return arg; }; module.exports = emptyFunction; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var validateFormat = function validateFormat(format) {}; if (process.env.NODE_ENV !== 'production') { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 8 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return addLeadingSlash; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return stripLeadingSlash; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return hasBasename; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return stripBasename; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return stripTrailingSlash; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return parsePath; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createPath; }); var addLeadingSlash = function addLeadingSlash(path) { return path.charAt(0) === '/' ? path : '/' + path; }; var stripLeadingSlash = function stripLeadingSlash(path) { return path.charAt(0) === '/' ? path.substr(1) : path; }; var hasBasename = function hasBasename(path, prefix) { return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path); }; var stripBasename = function stripBasename(path, prefix) { return hasBasename(path, prefix) ? path.substr(prefix.length) : path; }; var stripTrailingSlash = function stripTrailingSlash(path) { return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; }; var parsePath = function parsePath(path) { var pathname = path || '/'; var search = ''; var hash = ''; var hashIndex = pathname.indexOf('#'); if (hashIndex !== -1) { hash = pathname.substr(hashIndex); pathname = pathname.substr(0, hashIndex); } var searchIndex = pathname.indexOf('?'); if (searchIndex !== -1) { search = pathname.substr(searchIndex); pathname = pathname.substr(0, searchIndex); } return { pathname: pathname, search: search === '?' ? '' : search, hash: hash === '#' ? '' : hash }; }; var createPath = function createPath(location) { var pathname = location.pathname, search = location.search, hash = location.hash; var path = pathname || '/'; if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search; if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash; return path; }; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) { Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /** * This action type will be dispatched when your history * receives a location change. */ var LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; var onLocationChanged = exports.onLocationChanged = function onLocationChanged(location, action) { return { type: _get__('LOCATION_CHANGE'), payload: { location: location, action: action } }; }; /** * This action type will be dispatched by the history actions below. * If you're writing a middleware to watch for navigation events, be sure to * look for actions of this type. */ var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; var updateLocation = function updateLocation(method) { return function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return { type: _get__('CALL_HISTORY_METHOD'), payload: { method: method, args: args } }; }; }; /** * These actions correspond to the history API. * The associated routerMiddleware will capture these events before they get to * your reducer and reissue them as the matching function on your history. */ var push = exports.push = _get__('updateLocation')('push'); var replace = exports.replace = _get__('updateLocation')('replace'); var go = exports.go = _get__('updateLocation')('go'); var goBack = exports.goBack = _get__('updateLocation')('goBack'); var goForward = exports.goForward = _get__('updateLocation')('goForward'); var routerActions = exports.routerActions = { push: _get__('push'), replace: _get__('replace'), go: _get__('go'), goBack: _get__('goBack'), goForward: _get__('goForward') }; function _getGlobalObject() { try { if (!!global) { return global; } } catch (e) { try { if (!!window) { return window; } } catch (e) { return this; } } } ; var _RewireModuleId__ = null; function _getRewireModuleId__() { if (_RewireModuleId__ === null) { var globalVariable = _getGlobalObject(); if (!globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__) { globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__ = 0; } _RewireModuleId__ = __$$GLOBAL_REWIRE_NEXT_MODULE_ID__++; } return _RewireModuleId__; } function _getRewireRegistry__() { var theGlobalVariable = _getGlobalObject(); if (!theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__) { theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); } return __$$GLOBAL_REWIRE_REGISTRY__; } function _getRewiredData__() { var moduleId = _getRewireModuleId__(); var registry = _getRewireRegistry__(); var rewireData = registry[moduleId]; if (!rewireData) { registry[moduleId] = Object.create(null); rewireData = registry[moduleId]; } return rewireData; } (function registerResetAll() { var theGlobalVariable = _getGlobalObject(); if (!theGlobalVariable['__rewire_reset_all__']) { theGlobalVariable['__rewire_reset_all__'] = function () { theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); }; } })(); var INTENTIONAL_UNDEFINED = '__INTENTIONAL_UNDEFINED__'; var _RewireAPI__ = {}; (function () { function addPropertyToAPIObject(name, value) { Object.defineProperty(_RewireAPI__, name, { value: value, enumerable: false, configurable: true }); } addPropertyToAPIObject('__get__', _get__); addPropertyToAPIObject('__GetDependency__', _get__); addPropertyToAPIObject('__Rewire__', _set__); addPropertyToAPIObject('__set__', _set__); addPropertyToAPIObject('__reset__', _reset__); addPropertyToAPIObject('__ResetDependency__', _reset__); addPropertyToAPIObject('__with__', _with__); })(); function _get__(variableName) { var rewireData = _getRewiredData__(); if (rewireData[variableName] === undefined) { return _get_original__(variableName); } else { var value = rewireData[variableName]; if (value === INTENTIONAL_UNDEFINED) { return undefined; } else { return value; } } } function _get_original__(variableName) { switch (variableName) { case 'LOCATION_CHANGE': return LOCATION_CHANGE; case 'CALL_HISTORY_METHOD': return CALL_HISTORY_METHOD; case 'updateLocation': return updateLocation; case 'push': return push; case 'replace': return replace; case 'go': return go; case 'goBack': return goBack; case 'goForward': return goForward; } return undefined; } function _assign__(variableName, value) { var rewireData = _getRewiredData__(); if (rewireData[variableName] === undefined) { return _set_original__(variableName, value); } else { return rewireData[variableName] = value; } } function _set_original__(variableName, _value) { switch (variableName) {} return undefined; } function _update_operation__(operation, variableName, prefix) { var oldValue = _get__(variableName); var newValue = operation === '++' ? oldValue + 1 : oldValue - 1; _assign__(variableName, newValue); return prefix ? newValue : oldValue; } function _set__(variableName, value) { var rewireData = _getRewiredData__(); if ((typeof variableName === 'undefined' ? 'undefined' : _typeof(variableName)) === 'object') { Object.keys(variableName).forEach(function (name) { rewireData[name] = variableName[name]; }); } else { if (value === undefined) { rewireData[variableName] = INTENTIONAL_UNDEFINED; } else { rewireData[variableName] = value; } return function () { _reset__(variableName); }; } } function _reset__(variableName) { var rewireData = _getRewiredData__(); delete rewireData[variableName]; if (Object.keys(rewireData).length == 0) { delete _getRewireRegistry__()[_getRewireModuleId__]; } ; } function _with__(object) { var rewireData = _getRewiredData__(); var rewiredVariableNames = Object.keys(object); var previousValues = {}; function reset() { rewiredVariableNames.forEach(function (variableName) { rewireData[variableName] = previousValues[variableName]; }); } return function (callback) { rewiredVariableNames.forEach(function (variableName) { previousValues[variableName] = rewireData[variableName]; rewireData[variableName] = object[variableName]; }); var result = callback(); if (!!result && typeof result.then == 'function') { result.then(reset).catch(reset); } else { reset(); } return result; }; } exports.__get__ = _get__; exports.__GetDependency__ = _get__; exports.__Rewire__ = _set__; exports.__set__ = _set__; exports.__ResetDependency__ = _reset__; exports.__RewireAPI__ = _RewireAPI__; exports.default = _RewireAPI__; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 10 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return locationsAreEqual; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(80); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(83); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(8); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var createLocation = function createLocation(path, state, key, currentLocation) { var location = void 0; if (typeof path === 'string') { // Two-arg form: push(path, state) location = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__PathUtils__["b" /* parsePath */])(path); location.state = state; } else { // One-arg form: push(location) location = _extends({}, path); if (location.pathname === undefined) location.pathname = ''; if (location.search) { if (location.search.charAt(0) !== '?') location.search = '?' + location.search; } else { location.search = ''; } if (location.hash) { if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash; } else { location.hash = ''; } if (state !== undefined && location.state === undefined) location.state = state; } try { location.pathname = decodeURI(location.pathname); } catch (e) { if (e instanceof URIError) { throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.'); } else { throw e; } } if (key) location.key = key; if (currentLocation) { // Resolve incomplete/relative pathname relative to current location. if (!location.pathname) { location.pathname = currentLocation.pathname; } else if (location.pathname.charAt(0) !== '/') { location.pathname = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_resolve_pathname__["a" /* default */])(location.pathname, currentLocation.pathname); } } else { // When there is no prior location and pathname is empty, set it to / if (!location.pathname) { location.pathname = '/'; } } return location; }; var locationsAreEqual = function locationsAreEqual(a, b) { return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_value_equal__["a" /* default */])(a.state, b.state); }; /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = function() {}; if (process.env.NODE_ENV !== 'production') { warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (format.length < 10 || (/^[s\W]*$/).test(format)) { throw new Error( 'The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format ); } if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch(x) {} } }; } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) { Object.defineProperty(exports, "__esModule", { value: true }); exports.__RewireAPI__ = exports.__ResetDependency__ = exports.__set__ = exports.__Rewire__ = exports.__GetDependency__ = exports.__get__ = exports.createMatchSelector = exports.getAction = exports.getLocation = exports.routerMiddleware = exports.connectRouter = exports.ConnectedRouter = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.LOCATION_CHANGE = undefined; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createAll = __webpack_require__(37); var _createAll2 = _interopRequireDefault(_createAll); var _plain = __webpack_require__(42); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _get__2 = _get__('createAll')(_get__('plainStructure')); var LOCATION_CHANGE = _get__2.LOCATION_CHANGE, CALL_HISTORY_METHOD = _get__2.CALL_HISTORY_METHOD, push = _get__2.push, replace = _get__2.replace, go = _get__2.go, goBack = _get__2.goBack, goForward = _get__2.goForward, routerActions = _get__2.routerActions, ConnectedRouter = _get__2.ConnectedRouter, connectRouter = _get__2.connectRouter, routerMiddleware = _get__2.routerMiddleware, getLocation = _get__2.getLocation, getAction = _get__2.getAction, createMatchSelector = _get__2.createMatchSelector; exports.LOCATION_CHANGE = LOCATION_CHANGE; exports.CALL_HISTORY_METHOD = CALL_HISTORY_METHOD; exports.push = push; exports.replace = replace; exports.go = go; exports.goBack = goBack; exports.goForward = goForward; exports.routerActions = routerActions; exports.ConnectedRouter = ConnectedRouter; exports.connectRouter = connectRouter; exports.routerMiddleware = routerMiddleware; exports.getLocation = getLocation; exports.getAction = getAction; exports.createMatchSelector = createMatchSelector; function _getGlobalObject() { try { if (!!global) { return global; } } catch (e) { try { if (!!window) { return window; } } catch (e) { return this; } } } ; var _RewireModuleId__ = null; function _getRewireModuleId__() { if (_RewireModuleId__ === null) { var globalVariable = _getGlobalObject(); if (!globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__) { globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__ = 0; } _RewireModuleId__ = __$$GLOBAL_REWIRE_NEXT_MODULE_ID__++; } return _RewireModuleId__; } function _getRewireRegistry__() { var theGlobalVariable = _getGlobalObject(); if (!theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__) { theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); } return __$$GLOBAL_REWIRE_REGISTRY__; } function _getRewiredData__() { var moduleId = _getRewireModuleId__(); var registry = _getRewireRegistry__(); var rewireData = registry[moduleId]; if (!rewireData) { registry[moduleId] = Object.create(null); rewireData = registry[moduleId]; } return rewireData; } (function registerResetAll() { var theGlobalVariable = _getGlobalObject(); if (!theGlobalVariable['__rewire_reset_all__']) { theGlobalVariable['__rewire_reset_all__'] = function () { theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); }; } })(); var INTENTIONAL_UNDEFINED = '__INTENTIONAL_UNDEFINED__'; var _RewireAPI__ = {}; (function () { function addPropertyToAPIObject(name, value) { Object.defineProperty(_RewireAPI__, name, { value: value, enumerable: false, configurable: true }); } addPropertyToAPIObject('__get__', _get__); addPropertyToAPIObject('__GetDependency__', _get__); addPropertyToAPIObject('__Rewire__', _set__); addPropertyToAPIObject('__set__', _set__); addPropertyToAPIObject('__reset__', _reset__); addPropertyToAPIObject('__ResetDependency__', _reset__); addPropertyToAPIObject('__with__', _with__); })(); function _get__(variableName) { var rewireData = _getRewiredData__(); if (rewireData[variableName] === undefined) { return _get_original__(variableName); } else { var value = rewireData[variableName]; if (value === INTENTIONAL_UNDEFINED) { return undefined; } else { return value; } } } function _get_original__(variableName) { switch (variableName) { case 'createAll': return _createAll2.default; case 'plainStructure': return _plain2.default; } return undefined; } function _assign__(variableName, value) { var rewireData = _getRewiredData__(); if (rewireData[variableName] === undefined) { return _set_original__(variableName, value); } else { return rewireData[variableName] = value; } } function _set_original__(variableName, _value) { switch (variableName) {} return undefined; } function _update_operation__(operation, variableName, prefix) { var oldValue = _get__(variableName); var newValue = operation === '++' ? oldValue + 1 : oldValue - 1; _assign__(variableName, newValue); return prefix ? newValue : oldValue; } function _set__(variableName, value) { var rewireData = _getRewiredData__(); if ((typeof variableName === 'undefined' ? 'undefined' : _typeof(variableName)) === 'object') { Object.keys(variableName).forEach(function (name) { rewireData[name] = variableName[name]; }); } else { if (value === undefined) { rewireData[variableName] = INTENTIONAL_UNDEFINED; } else { rewireData[variableName] = value; } return function () { _reset__(variableName); }; } } function _reset__(variableName) { var rewireData = _getRewiredData__(); delete rewireData[variableName]; if (Object.keys(rewireData).length == 0) { delete _getRewireRegistry__()[_getRewireModuleId__]; } ; } function _with__(object) { var rewireData = _getRewiredData__(); var rewiredVariableNames = Object.keys(object); var previousValues = {}; function reset() { rewiredVariableNames.forEach(function (variableName) { rewireData[variableName] = previousValues[variableName]; }); } return function (callback) { rewiredVariableNames.forEach(function (variableName) { previousValues[variableName] = rewireData[variableName]; rewireData[variableName] = object[variableName]; }); var result = callback(); if (!!result && typeof result.then == 'function') { result.then(reset).catch(reset); } else { reset(); } return result; }; } exports.__get__ = _get__; exports.__GetDependency__ = _get__; exports.__Rewire__ = _set__; exports.__set__ = _set__; exports.__ResetDependency__ = _reset__; exports.__RewireAPI__ = _RewireAPI__; exports.default = _RewireAPI__; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var emptyFunction = __webpack_require__(6); /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = emptyFunction; if (process.env.NODE_ENV !== 'production') { var printWarning = function printWarning(format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; warning = function warning(condition, format) { if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { return; // Ignore CompositeComponent proptype check. } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 15 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); var createTransitionManager = function createTransitionManager() { var prompt = null; var setPrompt = function setPrompt(nextPrompt) { __WEBPACK_IMPORTED_MODULE_0_warning___default()(prompt == null, 'A history supports only one prompt at a time'); prompt = nextPrompt; return function () { if (prompt === nextPrompt) prompt = null; }; }; var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) { // TODO: If another transition starts while we're still confirming // the previous one, we may end up in a weird state. Figure out the // best way to handle this. if (prompt != null) { var result = typeof prompt === 'function' ? prompt(location, action) : prompt; if (typeof result === 'string') { if (typeof getUserConfirmation === 'function') { getUserConfirmation(result, callback); } else { __WEBPACK_IMPORTED_MODULE_0_warning___default()(false, 'A history needs a getUserConfirmation function in order to use a prompt message'); callback(true); } } else { // Return false from a transition hook to cancel the transition. callback(result !== false); } } else { callback(true); } }; var listeners = []; var appendListener = function appendListener(fn) { var isActive = true; var listener = function listener() { if (isActive) fn.apply(undefined, arguments); }; listeners.push(listener); return function () { isActive = false; listeners = listeners.filter(function (item) { return item !== listener; }); }; }; var notifyListeners = function notifyListeners() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } listeners.forEach(function (listener) { return listener.apply(undefined, args); }); }; return { setPrompt: setPrompt, confirmTransitionTo: confirmTransitionTo, appendListener: appendListener, notifyListeners: notifyListeners }; }; /* harmony default export */ __webpack_exports__["a"] = (createTransitionManager); /***/ }), /* 16 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(43); /* unused harmony reexport createBrowserHistory */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(44); /* unused harmony reexport createHashHistory */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(45); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(10); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(8); /* unused harmony reexport parsePath */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_4__PathUtils__["a"]; }); /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== 'production') { var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; var isValidElement = function(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; }; // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(57)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(56)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 19 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = warning; /** * Prints a warning in the console if it exists. * * @param {String} message The warning message. * @returns {void} */ function warning(message) { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message); } /* eslint-enable no-console */ try { // This error was thrown as a convenience so that if you enable // "break on all exceptions" in your console, // it would pause the execution at this line. throw new Error(message); /* eslint-disable no-empty */ } catch (e) {} /* eslint-enable no-empty */ } /***/ }), /* 20 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE