Socket
Socket
Sign inDemoInstall

react-router

Package Overview
Dependencies
Maintainers
1
Versions
501
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router - npm Package Compare versions

Comparing version 4.1.2 to 4.2.0

8

es/matchPath.js

@@ -8,3 +8,3 @@ import pathToRegexp from 'path-to-regexp';

var compilePath = function compilePath(pattern, options) {
var cacheKey = '' + options.end + options.strict;
var cacheKey = '' + options.end + options.strict + options.sensitive;
var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});

@@ -40,5 +40,7 @@

_options$strict = _options.strict,
strict = _options$strict === undefined ? false : _options$strict;
strict = _options$strict === undefined ? false : _options$strict,
_options$sensitive = _options.sensitive,
sensitive = _options$sensitive === undefined ? false : _options$sensitive;
var _compilePath = compilePath(path, { end: exact, strict: strict }),
var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),
re = _compilePath.re,

@@ -45,0 +47,0 @@ keys = _compilePath.keys;

@@ -7,2 +7,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

import warning from 'warning';
import React from 'react';

@@ -32,2 +33,6 @@ import PropTypes from 'prop-types';

MemoryRouter.prototype.componentWillMount = function componentWillMount() {
warning(!this.props.history, '<MemoryRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { MemoryRouter as Router }`.');
};
MemoryRouter.prototype.render = function render() {

@@ -34,0 +39,0 @@ return React.createElement(Router, { history: this.history, children: this.props.children });

@@ -9,2 +9,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

import PropTypes from 'prop-types';
import invariant from 'invariant';

@@ -39,2 +40,4 @@ /**

Prompt.prototype.componentWillMount = function componentWillMount() {
invariant(this.context.router, 'You should not use <Prompt> outside a <Router>');
if (this.props.when) this.enable(this.props.message);

@@ -41,0 +44,0 @@ };

@@ -9,5 +9,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

import PropTypes from 'prop-types';
import warning from 'warning';
import invariant from 'invariant';
import { createLocation, locationsAreEqual } from 'history';
/**
* The public API for updating the location programatically
* The public API for updating the location programmatically
* with a component.

@@ -30,2 +33,4 @@ */

Redirect.prototype.componentWillMount = function componentWillMount() {
invariant(this.context.router, 'You should not use <Redirect> outside a <Router>');
if (this.isStatic()) this.perform();

@@ -38,2 +43,14 @@ };

Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
var prevTo = createLocation(prevProps.to);
var nextTo = createLocation(this.props.to);
if (locationsAreEqual(prevTo, nextTo)) {
warning(false, 'You tried to redirect to the same route you\'re currently on: ' + ('"' + nextTo.pathname + nextTo.search + '"'));
return;
}
this.perform();
};
Redirect.prototype.perform = function perform() {

@@ -63,3 +80,3 @@ var history = this.context.router.history;

from: PropTypes.string,
to: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired
};

@@ -66,0 +83,0 @@ Redirect.defaultProps = {

@@ -10,2 +10,3 @@ 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; };

import warning from 'warning';
import invariant from 'invariant';
import React from 'react';

@@ -15,2 +16,6 @@ import PropTypes from 'prop-types';

var isEmptyChildren = function isEmptyChildren(children) {
return React.Children.count(children) === 0;
};
/**

@@ -48,3 +53,3 @@ * The public API for matching a single path and rendering.

Route.prototype.computeMatch = function computeMatch(_ref, _ref2) {
Route.prototype.computeMatch = function computeMatch(_ref, router) {
var computedMatch = _ref.computedMatch,

@@ -54,24 +59,22 @@ location = _ref.location,

strict = _ref.strict,
exact = _ref.exact;
var route = _ref2.route;
exact = _ref.exact,
sensitive = _ref.sensitive;
if (computedMatch) return computedMatch; // <Switch> already computed the match for us
invariant(router, 'You should not use <Route> or withRouter() outside a <Router>');
var route = router.route;
var pathname = (location || route.location).pathname;
return path ? matchPath(pathname, { path: path, strict: strict, exact: exact }) : route.match;
return path ? matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }) : route.match;
};
Route.prototype.componentWillMount = function componentWillMount() {
var _props = this.props,
component = _props.component,
render = _props.render,
children = _props.children;
warning(!(this.props.component && this.props.render), 'You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored');
warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), 'You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored');
warning(!(component && render), 'You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored');
warning(!(component && children), 'You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored');
warning(!(render && children), 'You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored');
warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), 'You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored');
};

@@ -91,6 +94,6 @@

var match = this.state.match;
var _props2 = this.props,
children = _props2.children,
component = _props2.component,
render = _props2.render;
var _props = this.props,
children = _props.children,
component = _props.component,
render = _props.render;
var _context$router = this.context.router,

@@ -107,4 +110,3 @@ history = _context$router.history,

match ? render(props) : null : children ? // children come last, always called
typeof children === 'function' ? children(props) : !Array.isArray(children) || children.length ? // Preact defaults to empty children array
React.Children.only(children) : null : null;
typeof children === 'function' ? children(props) : !isEmptyChildren(children) ? React.Children.only(children) : null : null;
};

@@ -120,2 +122,3 @@

strict: PropTypes.bool,
sensitive: PropTypes.bool,
component: PropTypes.func,

@@ -122,0 +125,0 @@ render: PropTypes.func,

@@ -11,2 +11,3 @@ 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; };

import warning from 'warning';
import invariant from 'invariant';

@@ -122,2 +123,6 @@ import React from 'react';

StaticRouter.prototype.componentWillMount = function componentWillMount() {
warning(!this.props.history, '<StaticRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { StaticRouter as Router }`.');
};
StaticRouter.prototype.render = function render() {

@@ -124,0 +129,0 @@ var _props = this.props,

@@ -10,2 +10,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

import warning from 'warning';
import invariant from 'invariant';
import matchPath from './matchPath';

@@ -26,2 +27,6 @@

Switch.prototype.componentWillMount = function componentWillMount() {
invariant(this.context.router, 'You should not use <Switch> outside a <Router>');
};
Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {

@@ -48,2 +53,3 @@ warning(!(nextProps.location && !this.props.location), '<Switch> 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.');

strict = _element$props.strict,
sensitive = _element$props.sensitive,
from = _element$props.from;

@@ -55,3 +61,3 @@

child = element;
match = path ? matchPath(location.pathname, { path: path, exact: exact, strict: strict }) : route.match;
match = path ? matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }) : route.match;
}

@@ -58,0 +64,0 @@ });

@@ -16,3 +16,3 @@ 'use strict';

var compilePath = function compilePath(pattern, options) {
var cacheKey = '' + options.end + options.strict;
var cacheKey = '' + options.end + options.strict + options.sensitive;
var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});

@@ -48,5 +48,7 @@

_options$strict = _options.strict,
strict = _options$strict === undefined ? false : _options$strict;
strict = _options$strict === undefined ? false : _options$strict,
_options$sensitive = _options.sensitive,
sensitive = _options$sensitive === undefined ? false : _options$sensitive;
var _compilePath = compilePath(path, { end: exact, strict: strict }),
var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),
re = _compilePath.re,

@@ -53,0 +55,0 @@ keys = _compilePath.keys;

@@ -5,2 +5,6 @@ 'use strict';

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _react = require('react');

@@ -48,2 +52,6 @@

MemoryRouter.prototype.componentWillMount = function componentWillMount() {
(0, _warning2.default)(!this.props.history, '<MemoryRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { MemoryRouter as Router }`.');
};
MemoryRouter.prototype.render = function render() {

@@ -50,0 +58,0 @@ return _react2.default.createElement(_Router2.default, { history: this.history, children: this.props.children });

{
"name": "react-router",
"version": "4.1.2",
"version": "4.2.0",
"description": "Declarative routing for React",

@@ -19,6 +19,6 @@ "repository": "ReactTraining/react-router",

"Switch.js",
"es",
"index.js",
"matchPath.js",
"withRouter.js",
"es",
"umd"

@@ -31,16 +31,16 @@ ],

"watch": "babel ./modules -d . --ignore __tests__ --watch",
"prepublish": "node ./tools/build.js",
"prepublishOnly": "node ./tools/build.js",
"clean": "git clean -fdX .",
"lint": "eslint modules",
"test": "karma start --single-run"
"test": "jest"
},
"peerDependencies": {
"react": "^15"
"react": ">=15"
},
"dependencies": {
"history": "^4.6.0",
"hoist-non-react-statics": "^1.2.0",
"history": "^4.7.2",
"hoist-non-react-statics": "^2.3.0",
"invariant": "^2.2.2",
"loose-envify": "^1.3.1",
"path-to-regexp": "^1.5.3",
"path-to-regexp": "^1.7.0",
"prop-types": "^15.5.4",

@@ -50,30 +50,25 @@ "warning": "^3.0.0"

"devDependencies": {
"babel-cli": "^6.18.0",
"babel-eslint": "^6.0.4",
"babel-loader": "^6.2.10",
"babel-cli": "^6.26.0",
"babel-eslint": "^7.0.4",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-transform-react-remove-prop-types": "^0.2.11",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.8",
"babel-preset-es2015": "^6.14.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.5.0",
"eslint": "^3.19.0",
"eslint": "^4.5.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-react": "^6.10.3",
"expect": "^1.20.1",
"eslint-plugin-react": "^7.3.0",
"gzip-size": "^3.0.0",
"in-publish": "^2.0.0",
"karma": "^0.13.22",
"karma-browserstack-launcher": "^1.0.1",
"karma-chrome-launcher": "^1.0.1",
"karma-mocha": "^1.0.1",
"karma-mocha-reporter": "^2.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"mocha": "^2.5.3",
"pretty-bytes": "^3.0.1",
"jest": "^20.0.4",
"pretty-bytes": "^4.0.2",
"react": "^15.4.2",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.3.0",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
"rollup": "^0.48.2",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-commonjs": "^8.2.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^1.1.1",
"rollup-plugin-uglify": "^2.0.1"
},

@@ -80,0 +75,0 @@ "browserify": {

@@ -13,2 +13,6 @@ 'use strict';

var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -49,2 +53,4 @@

Prompt.prototype.componentWillMount = function componentWillMount() {
(0, _invariant2.default)(this.context.router, 'You should not use <Prompt> outside a <Router>');
if (this.props.when) this.enable(this.props.message);

@@ -51,0 +57,0 @@ };

@@ -11,2 +11,5 @@ # react-router

**Note:** This package provides the core routing functionality for React Router, but you might not want to install it directly. If you are writing an application that will run in the browser, you should instead install `react-router-dom`. Similarly, if you are writing a React Native application, you should instead install `react-router-native`. Both of those will install `react-router` as a dependency.
Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:

@@ -13,0 +16,0 @@

@@ -13,2 +13,12 @@ 'use strict';

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
var _history = require('history');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -23,3 +33,3 @@

/**
* The public API for updating the location programatically
* The public API for updating the location programmatically
* with a component.

@@ -41,2 +51,4 @@ */

Redirect.prototype.componentWillMount = function componentWillMount() {
(0, _invariant2.default)(this.context.router, 'You should not use <Redirect> outside a <Router>');
if (this.isStatic()) this.perform();

@@ -49,2 +61,14 @@ };

Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
var prevTo = (0, _history.createLocation)(prevProps.to);
var nextTo = (0, _history.createLocation)(this.props.to);
if ((0, _history.locationsAreEqual)(prevTo, nextTo)) {
(0, _warning2.default)(false, 'You tried to redirect to the same route you\'re currently on: ' + ('"' + nextTo.pathname + nextTo.search + '"'));
return;
}
this.perform();
};
Redirect.prototype.perform = function perform() {

@@ -74,3 +98,3 @@ var history = this.context.router.history;

from: _propTypes2.default.string,
to: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object])
to: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]).isRequired
};

@@ -77,0 +101,0 @@ Redirect.defaultProps = {

@@ -11,2 +11,6 @@ 'use strict';

var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
var _react = require('react');

@@ -32,5 +36,10 @@

var isEmptyChildren = function isEmptyChildren(children) {
return _react2.default.Children.count(children) === 0;
};
/**
* The public API for matching a single path and rendering.
*/
var Route = function (_React$Component) {

@@ -64,3 +73,3 @@ _inherits(Route, _React$Component);

Route.prototype.computeMatch = function computeMatch(_ref, _ref2) {
Route.prototype.computeMatch = function computeMatch(_ref, router) {
var computedMatch = _ref.computedMatch,

@@ -70,24 +79,22 @@ location = _ref.location,

strict = _ref.strict,
exact = _ref.exact;
var route = _ref2.route;
exact = _ref.exact,
sensitive = _ref.sensitive;
if (computedMatch) return computedMatch; // <Switch> already computed the match for us
(0, _invariant2.default)(router, 'You should not use <Route> or withRouter() outside a <Router>');
var route = router.route;
var pathname = (location || route.location).pathname;
return path ? (0, _matchPath2.default)(pathname, { path: path, strict: strict, exact: exact }) : route.match;
return path ? (0, _matchPath2.default)(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }) : route.match;
};
Route.prototype.componentWillMount = function componentWillMount() {
var _props = this.props,
component = _props.component,
render = _props.render,
children = _props.children;
(0, _warning2.default)(!(this.props.component && this.props.render), 'You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored');
(0, _warning2.default)(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), 'You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored');
(0, _warning2.default)(!(component && render), 'You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored');
(0, _warning2.default)(!(component && children), 'You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored');
(0, _warning2.default)(!(render && children), 'You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored');
(0, _warning2.default)(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), 'You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored');
};

@@ -107,6 +114,6 @@

var match = this.state.match;
var _props2 = this.props,
children = _props2.children,
component = _props2.component,
render = _props2.render;
var _props = this.props,
children = _props.children,
component = _props.component,
render = _props.render;
var _context$router = this.context.router,

@@ -123,4 +130,3 @@ history = _context$router.history,

match ? render(props) : null : children ? // children come last, always called
typeof children === 'function' ? children(props) : !Array.isArray(children) || children.length ? // Preact defaults to empty children array
_react2.default.Children.only(children) : null : null;
typeof children === 'function' ? children(props) : !isEmptyChildren(children) ? _react2.default.Children.only(children) : null : null;
};

@@ -136,2 +142,3 @@

strict: _propTypes2.default.bool,
sensitive: _propTypes2.default.bool,
component: _propTypes2.default.func,

@@ -138,0 +145,0 @@ render: _propTypes2.default.func,

@@ -7,2 +7,6 @@ 'use strict';

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _invariant = require('invariant');

@@ -140,2 +144,6 @@

StaticRouter.prototype.componentWillMount = function componentWillMount() {
(0, _warning2.default)(!this.props.history, '<StaticRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { StaticRouter as Router }`.');
};
StaticRouter.prototype.render = function render() {

@@ -142,0 +150,0 @@ var _props = this.props,

@@ -17,2 +17,6 @@ 'use strict';

var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
var _matchPath = require('./matchPath');

@@ -42,2 +46,6 @@

Switch.prototype.componentWillMount = function componentWillMount() {
(0, _invariant2.default)(this.context.router, 'You should not use <Switch> outside a <Router>');
};
Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {

@@ -64,2 +72,3 @@ (0, _warning2.default)(!(nextProps.location && !this.props.location), '<Switch> 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.');

strict = _element$props.strict,
sensitive = _element$props.sensitive,
from = _element$props.from;

@@ -71,3 +80,3 @@

child = element;
match = path ? (0, _matchPath2.default)(location.pathname, { path: path, exact: exact, strict: strict }) : route.match;
match = path ? (0, _matchPath2.default)(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }) : route.match;
}

@@ -74,0 +83,0 @@ });

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactRouter=e(require("react")):t.ReactRouter=e(t.React)}(this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.withRouter=e.matchPath=e.Switch=e.StaticRouter=e.Router=e.Route=e.Redirect=e.Prompt=e.MemoryRouter=void 0;var o=n(9),i=r(o),a=n(10),u=r(a),c=n(11),s=r(c),l=n(7),f=r(l),p=n(4),h=r(p),d=n(12),y=r(d),m=n(13),v=r(m),b=n(5),g=r(b),x=n(14),w=r(x);e.MemoryRouter=i.default,e.Prompt=u.default,e.Redirect=s.default,e.Route=f.default,e.Router=h.default,e.StaticRouter=y.default,e.Switch=v.default,e.matchPath=g.default,e.withRouter=w.default},function(t,e,n){t.exports=n(23)()},function(e,n){e.exports=t},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=n(3),s=(r(c),n(8)),l=r(s),f=n(2),p=r(f),h=n(1),d=r(h),y=function(t){function e(){var n,r,a;o(this,e);for(var u=arguments.length,c=Array(u),s=0;s<u;s++)c[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(c))),r.state={match:r.computeMatch(r.props.history.location.pathname)},a=n,i(r,a)}return a(e,t),e.prototype.getChildContext=function(){return{router:u({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},e.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},e.prototype.componentWillMount=function(){var t=this,e=this.props,n=e.children,r=e.history;null!=n&&1!==p.default.Children.count(n)?(0,l.default)(!1):void 0,this.unlisten=r.listen(function(){t.setState({match:t.computeMatch(r.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?p.default.Children.only(t):null},e}(p.default.Component);y.contextTypes={router:d.default.object},y.childContextTypes={router:d.default.object.isRequired},e.default=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(21),i=r(o),a={},u=1e4,c=0,s=function(t,e){var n=""+e.end+e.strict,r=a[n]||(a[n]={});if(r[t])return r[t];var o=[],s=(0,i.default)(t,o,e),l={re:s,keys:o};return c<u&&(r[t]=l,c++),l},l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof e&&(e={path:e});var n=e,r=n.path,o=void 0===r?"/":r,i=n.exact,a=void 0!==i&&i,u=n.strict,c=void 0!==u&&u,l=s(o,{end:a,strict:c}),f=l.re,p=l.keys,h=f.exec(t);if(!h)return null;var d=h[0],y=h.slice(1),m=t===d;return a&&!m?null:{path:o,url:"/"===o&&""===d?"/":d,isExact:m,params:p.reduce(function(t,e,n){return t[e.name]=y[n],t},{})}};e.default=l},function(t,e){"use strict";e.__esModule=!0;var n=(e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},e.hasBasename=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)});e.stripBasename=function(t,e){return n(t,e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");o!==-1&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return i!==-1&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},e.createPath=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=n(3),s=(r(c),n(2)),l=r(s),f=n(1),p=r(f),h=n(5),d=r(h),y=function(t){function e(){var n,r,a;o(this,e);for(var u=arguments.length,c=Array(u),s=0;s<u;s++)c[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(c))),r.state={match:r.computeMatch(r.props,r.context.router)},a=n,i(r,a)}return a(e,t),e.prototype.getChildContext=function(){return{router:u({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},e.prototype.computeMatch=function(t,e){var n=t.computedMatch,r=t.location,o=t.path,i=t.strict,a=t.exact,u=e.route;if(n)return n;var c=(r||u.location).pathname;return o?(0,d.default)(c,{path:o,strict:i,exact:a}):u.match},e.prototype.componentWillMount=function(){var t=this.props;t.component,t.render,t.children},e.prototype.componentWillReceiveProps=function(t,e){this.setState({match:this.computeMatch(t,e.router)})},e.prototype.render=function t(){var e=this.state.match,n=this.props,r=n.children,o=n.component,t=n.render,i=this.context.router,a=i.history,u=i.route,c=i.staticContext,s=this.props.location||u.location,f={match:e,location:s,history:a,staticContext:c};return o?e?l.default.createElement(o,f):null:t?e?t(f):null:r?"function"==typeof r?r(f):!Array.isArray(r)||r.length?l.default.Children.only(r):null:null},e}(l.default.Component);y.contextTypes={router:p.default.shape({history:p.default.object.isRequired,route:p.default.object.isRequired,staticContext:p.default.object})},y.childContextTypes={router:p.default.object.isRequired},e.default=y},function(t,e,n){"use strict";var r=function(t,e,n,r,o,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,u],l=0;c=new Error(e.replace(/%s/g,function(){return s[l++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var u=n(2),c=r(u),s=n(1),l=(r(s),n(18)),f=r(l),p=n(4),h=r(p),d=function(t){function e(){var n,r,a;o(this,e);for(var u=arguments.length,c=Array(u),s=0;s<u;s++)c[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(c))),r.history=(0,f.default)(r.props),a=n,i(r,a)}return a(e,t),e.prototype.render=function(){return c.default.createElement(h.default,{history:this.history,children:this.props.children})},e}(c.default.Component);e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var u=n(2),c=r(u),s=n(1),l=r(s),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(c.default.Component);f.defaultProps={when:!0},f.contextTypes={router:l.default.shape({history:l.default.shape({block:l.default.func.isRequired}).isRequired}).isRequired},e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var u=n(2),c=r(u),s=n(1),l=r(s),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.perform=function(){var t=this.context.router.history,e=this.props,n=e.push,r=e.to;n?t.push(r):t.replace(r)},e.prototype.render=function(){return null},e}(c.default.Component);f.defaultProps={push:!1},f.contextTypes={router:l.default.shape({history:l.default.shape({push:l.default.func.isRequired,replace:l.default.func.isRequired}).isRequired,staticContext:l.default.object}).isRequired},e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=n(8),l=r(s),f=n(2),p=r(f),h=n(1),d=r(h),y=n(6),m=n(4),v=r(m),b=function(t){var e=t.pathname,n=void 0===e?"/":e,r=t.search,o=void 0===r?"":r,i=t.hash,a=void 0===i?"":i;return{pathname:n,search:"?"===o?"":o,hash:"#"===a?"":a}},g=function(t,e){return t?c({},e,{pathname:(0,y.addLeadingSlash)(t)+e.pathname}):e},x=function(t,e){if(!t)return e;var n=(0,y.addLeadingSlash)(t);return 0!==e.pathname.indexOf(n)?e:c({},e,{pathname:e.pathname.substr(n.length)})},w=function(t){return"string"==typeof t?(0,y.parsePath)(t):b(t)},_=function(t){return"string"==typeof t?t:(0,y.createPath)(t)},O=function(t){return function(){(0,l.default)(!1)}},R=function(){},j=function(t){function e(){var n,r,o;i(this,e);for(var u=arguments.length,c=Array(u),s=0;s<u;s++)c[s]=arguments[s];return n=r=a(this,t.call.apply(t,[this].concat(c))),r.createHref=function(t){return(0,y.addLeadingSlash)(r.props.basename+_(t))},r.handlePush=function(t){var e=r.props,n=e.basename,o=e.context;o.action="PUSH",o.location=g(n,w(t)),o.url=_(o.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,o=e.context;o.action="REPLACE",o.location=g(n,w(t)),o.url=_(o.location)},r.handleListen=function(){return R},r.handleBlock=function(){return R},o=n,a(r,o)}return u(e,t),e.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},e.prototype.render=function(){var t=this.props,e=t.basename,n=(t.context,t.location),r=o(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:x(e,w(n)),push:this.handlePush,replace:this.handleReplace,go:O("go"),goBack:O("goBack"),goForward:O("goForward"),listen:this.handleListen,block:this.handleBlock};return p.default.createElement(v.default,c({},r,{history:i}))},e}(p.default.Component);j.defaultProps={basename:"",location:"/"},j.childContextTypes={router:d.default.object.isRequired},e.default=j},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var u=n(2),c=r(u),s=n(1),l=r(s),f=n(3),p=(r(f),n(5)),h=r(p),d=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillReceiveProps=function(t){},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,n=this.props.location||t.location,r=void 0,o=void 0;return c.default.Children.forEach(e,function(e){if(c.default.isValidElement(e)){var i=e.props,a=i.path,u=i.exact,s=i.strict,l=i.from,f=a||l;null==r&&(o=e,r=f?(0,h.default)(n.pathname,{path:f,exact:u,strict:s}):t.match)}}),r?c.default.cloneElement(o,{location:n,computedMatch:r}):null},e}(c.default.Component);d.contextTypes={router:l.default.shape({route:l.default.object.isRequired}).isRequired},e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(2),u=r(a),c=n(1),s=(r(c),n(20)),l=r(s),f=n(7),p=r(f),h=function(t){var e=function(e){var n=e.wrappedComponentRef,r=o(e,["wrappedComponentRef"]);return u.default.createElement(p.default,{render:function(e){return u.default.createElement(t,i({},r,e,{ref:n}))}})};return e.displayName="withRouter("+(t.displayName||t.name)+")",e.WrappedComponent=t,(0,l.default)(e,t)};e.default=h},function(t,e){"use strict";function n(t){return function(){return t}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,i,a,u,c){if(o(e),!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,u,c],f=0;s=new Error(e.replace(/%s/g,function(){return l[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(t){};t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(25),a=r(i),u=n(26),c=r(u),s=n(6);e.createLocation=function(t,e,n,r){var i=void 0;"string"==typeof t?(i=(0,s.parsePath)(t),i.state=e):(i=o({},t),void 0===i.pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,a.default)(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,c.default)(t.state,e.state)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(3),u=r(a),c=n(6),s=n(17),l=n(19),f=r(l),p=function(t,e,n){return Math.min(Math.max(t,e),n)},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,a=t.initialIndex,l=void 0===a?0:a,h=t.keyLength,d=void 0===h?6:h,y=(0,f.default)(),m=function(t){i(C,t),C.length=C.entries.length,y.notifyListeners(C.location,C.action)},v=function(){return Math.random().toString(36).substr(2,d)},b=p(l,0,r.length-1),g=r.map(function(t){return"string"==typeof t?(0,s.createLocation)(t,void 0,v()):(0,s.createLocation)(t,void 0,t.key||v())}),x=c.createPath,w=function(t,n){(0,u.default)(!("object"===("undefined"==typeof t?"undefined":o(t))&&void 0!==t.state&&void 0!==n),"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");var r="PUSH",i=(0,s.createLocation)(t,n,v(),C.location);y.confirmTransitionTo(i,r,e,function(t){if(t){var e=C.index,n=e+1,o=C.entries.slice(0);o.length>n?o.splice(n,o.length-n,i):o.push(i),m({action:r,location:i,index:n,entries:o})}})},_=function(t,n){(0,u.default)(!("object"===("undefined"==typeof t?"undefined":o(t))&&void 0!==t.state&&void 0!==n),"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");var r="REPLACE",i=(0,s.createLocation)(t,n,v(),C.location);y.confirmTransitionTo(i,r,e,function(t){t&&(C.entries[C.index]=i,m({action:r,location:i}))})},O=function(t){var n=p(C.index+t,0,C.entries.length-1),r="POP",o=C.entries[n];y.confirmTransitionTo(o,r,e,function(t){t?m({action:r,location:o,index:n}):m()})},R=function(){return O(-1)},j=function(){return O(1)},P=function(t){var e=C.index+t;return e>=0&&e<C.entries.length},E=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return y.setPrompt(t)},T=function(t){return y.appendListener(t)},C={length:g.length,action:"POP",location:g[b],index:b,entries:g,createHref:x,push:w,replace:_,go:O,goBack:R,goForward:j,canGo:P,block:E,listen:T};return C};e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(3),i=r(o),a=function(){var t=null,e=function(e){return(0,i.default)(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},n=function(e,n,r,o){if(null!=t){var a="function"==typeof t?t(e,n):t;"string"==typeof a?"function"==typeof r?r(a,o):((0,i.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(a!==!1)}else o(!0)},r=[],o=function(t){var e=!0,n=function(){e&&t.apply(void 0,arguments)};return r.push(n),function(){e=!1,r=r.filter(function(t){return t!==n})}},a=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];r.forEach(function(t){return t.apply(void 0,e)})};return{setPrompt:e,confirmTransitionTo:n,appendListener:o,notifyListeners:a}};e.default=a},function(t,e){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;t.exports=function(t,e,i){if("string"!=typeof e){var a=Object.getOwnPropertyNames(e);o&&(a=a.concat(Object.getOwnPropertySymbols(e)));for(var u=0;u<a.length;++u)if(!(n[a[u]]||r[a[u]]||i&&i[a[u]]))try{t[a[u]]=e[a[u]]}catch(t){}}return t}},function(t,e,n){function r(t,e){for(var n,r=[],o=0,i=0,a="",u=e&&e.delimiter||"/";null!=(n=b.exec(t));){var l=n[0],f=n[1],p=n.index;if(a+=t.slice(i,p),i=p+l.length,f)a+=f[1];else{var h=t[i],d=n[2],y=n[3],m=n[4],v=n[5],g=n[6],x=n[7];a&&(r.push(a),a="");var w=null!=d&&null!=h&&h!==d,_="+"===g||"*"===g,O="?"===g||"*"===g,R=n[2]||u,j=m||v;r.push({name:y||o++,prefix:d||"",delimiter:R,optional:O,repeat:_,partial:w,asterisk:!!x,pattern:j?s(j):x?".*":"[^"+c(R)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function o(t,e){return u(r(t,e))}function i(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function a(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function u(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",u=n||{},c=r||{},s=c.pretty?i:encodeURIComponent,l=0;l<t.length;l++){var f=t[l];if("string"!=typeof f){var p,h=u[f.name];if(null==h){if(f.optional){f.partial&&(o+=f.prefix);continue}throw new TypeError('Expected "'+f.name+'" to be defined')}if(v(h)){if(!f.repeat)throw new TypeError('Expected "'+f.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(f.optional)continue;throw new TypeError('Expected "'+f.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(p=s(h[d]),!e[l].test(p))throw new TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===d?f.prefix:f.delimiter)+p}}else{if(p=f.asterisk?a(h):s(h),!e[l].test(p))throw new TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+p+'"');o+=f.prefix+p}}else o+=f}return o}}function c(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function f(t){return t.sensitive?"":"i"}function p(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}function h(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(m(t[o],e,n).source);var i=new RegExp("(?:"+r.join("|")+")",f(n));return l(i,e)}function d(t,e,n){return y(r(t,n),e,n)}function y(t,e,n){v(e)||(n=e||n,e=[]),n=n||{};for(var r=n.strict,o=n.end!==!1,i="",a=0;a<t.length;a++){var u=t[a];if("string"==typeof u)i+=c(u);else{var s=c(u.prefix),p="(?:"+u.pattern+")";e.push(u),u.repeat&&(p+="(?:"+s+p+")*"),p=u.optional?u.partial?s+"("+p+")?":"(?:"+s+"("+p+"))?":s+"("+p+")",i+=p}}var h=c(n.delimiter||"/"),d=i.slice(-h.length)===h;return r||(i=(d?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":r&&d?"":"(?="+h+"|$)",l(new RegExp("^"+i,f(n)),e)}function m(t,e,n){return v(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?p(t,e):v(t)?h(t,e,n):d(t,e,n)}var v=n(22);t.exports=m,t.exports.parse=r,t.exports.compile=o,t.exports.tokensToFunction=u,t.exports.tokensToRegExp=y;var b=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r=n(15),o=n(16),i=n(24);t.exports=function(){function t(t,e,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";var n=function(t){return"/"===t.charAt(0)},r=function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()},o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=t&&t.split("/")||[],i=e&&e.split("/")||[],a=t&&n(t),u=e&&n(e),c=a||u;if(t&&n(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";var s=void 0;if(i.length){var l=i[i.length-1];s="."===l||".."===l||""===l}else s=!1;for(var f=0,p=i.length;p>=0;p--){var h=i[p];"."===h?r(i,p):".."===h?(r(i,p),f++):f&&(r(i,p),f--)}if(!c)for(;f--;f)i.unshift("..");!c||""===i[0]||i[0]&&n(i[0])||i.unshift("");var d=i.join("/");return s&&"/"!==d.substr(-1)&&(d+="/"),d};t.exports=o},function(t,e){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function t(e,r){if(e===r)return!0;if(null==e||null==r)return!1;if(Array.isArray(e))return Array.isArray(r)&&e.length===r.length&&e.every(function(e,n){return t(e,r[n])});var o="undefined"==typeof e?"undefined":n(e),i="undefined"==typeof r?"undefined":n(r);if(o!==i)return!1;if("object"===o){var a=e.valueOf(),u=r.valueOf();if(a!==e||u!==r)return t(a,u);var c=Object.keys(e),s=Object.keys(r);return c.length===s.length&&c.every(function(n){return t(e[n],r[n])})}return!1};e.default=r}])});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReactRouter={},t.React)}(this,function(t,e){"use strict";function n(t,e){return e={exports:{}},t(e,e.exports),e.exports}function r(t){return function(){return t}}function o(t){return"/"===t.charAt(0)}function i(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],a=t&&o(t),c=e&&o(e),u=a||c;if(t&&o(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var s=void 0;if(r.length){var p=r[r.length-1];s="."===p||".."===p||""===p}else s=!1;for(var h=0,l=r.length;l>=0;l--){var f=r[l];"."===f?i(r,l):".."===f?(i(r,l),h++):h&&(i(r,l),h--)}if(!u)for(;h--;h)r.unshift("..");!u||""===r[0]||r[0]&&o(r[0])||r.unshift("");var d=r.join("/");return s&&"/"!==d.substr(-1)&&(d+="/"),d}function c(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(t,n){return c(t,e[n])});var n=void 0===t?"undefined":U(t);if(n!==(void 0===e?"undefined":U(e)))return!1;if("object"===n){var r=t.valueOf(),o=e.valueOf();if(r!==t||o!==e)return c(r,o);var i=Object.keys(t),a=Object.keys(e);return i.length===a.length&&i.every(function(n){return c(t[n],e[n])})}return!1}function u(t,e){for(var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=ct.exec(t));){var u=n[0],s=n[1],p=n.index;if(a+=t.slice(i,p),i=p+u.length,s)a+=s[1];else{var h=t[i],d=n[2],y=n[3],m=n[4],v=n[5],g=n[6],b=n[7];a&&(r.push(a),a="");var x=null!=d&&null!=h&&h!==d,R="+"===g||"*"===g,O="?"===g||"*"===g,P=n[2]||c,w=m||v;r.push({name:y||o++,prefix:d||"",delimiter:P,optional:O,repeat:R,partial:x,asterisk:!!b,pattern:w?f(w):b?".*":"[^"+l(P)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function s(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function p(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function h(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",i=n||{},a=(r||{}).pretty?s:encodeURIComponent,c=0;c<t.length;c++){var u=t[c];if("string"!=typeof u){var h,l=i[u.name];if(null==l){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(nt(l)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<l.length;f++){if(h=a(l[f]),!e[c].test(h))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(h)+"`");o+=(0===f?u.prefix:u.delimiter)+h}}else{if(h=u.asterisk?p(l):a(l),!e[c].test(h))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+h+'"');o+=u.prefix+h}}else o+=u}return o}}function l(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function f(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function d(t,e){return t.keys=e,t}function y(t){return t.sensitive?"":"i"}function m(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return d(t,e)}function v(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(x(t[o],e,n).source);return d(new RegExp("(?:"+r.join("|")+")",y(n)),e)}function g(t,e,n){return b(u(t,n),e,n)}function b(t,e,n){nt(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=l(c);else{var u=l(c.prefix),s="(?:"+c.pattern+")";e.push(c),c.repeat&&(s+="(?:"+u+s+")*"),i+=s=c.optional?c.partial?u+"("+s+")?":"(?:"+u+"("+s+"))?":u+"("+s+")"}}var p=l(n.delimiter||"/"),h=i.slice(-p.length)===p;return r||(i=(h?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":r&&h?"":"(?="+p+"|$)",d(new RegExp("^"+i,y(n)),e)}function x(t,e,n){return nt(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?m(t,e):nt(t)?v(t,e,n):g(t,e,n)}e=e&&e.hasOwnProperty("default")?e.default:e;var R=function(){},O=R,P=function(){};P.thatReturns=r,P.thatReturnsFalse=r(!1),P.thatReturnsTrue=r(!0),P.thatReturnsNull=r(null),P.thatReturnsThis=function(){return this},P.thatReturnsArgument=function(t){return t};var w=P,E=function(t){},j=function(t,e,n,r,o,i,a,c){if(E(e),!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,c],p=0;(u=new Error(e.replace(/%s/g,function(){return s[p++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},C="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",T=function(){function t(t,e,n,r,o,i){i!==C&&j(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=w,n.PropTypes=n,n},k=n(function(t){t.exports=T()}),A=n(function(t,e){e.__esModule=!0;e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t};var n=e.hasBasename=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)};e.stripBasename=function(t,e){return n(t,e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},e.createPath=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}}),S=A.addLeadingSlash,M=A.parsePath,_=A.createPath,L=Object.freeze({default:a}),U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q=Object.freeze({default:c}),I=L&&a||L,W=q&&c||q,$=n(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=n(I),i=n(W);e.createLocation=function(t,e,n,i){var a=void 0;"string"==typeof t?(a=(0,A.parsePath)(t)).state=e:(void 0===(a=r({},t)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(a.key=n),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=(0,o.default)(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,i.default)(t.state,e.state)}}),H=n(function(t,e){e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(O);e.default=function(){var t=null,e=[];return{setPrompt:function(e){return(0,n.default)(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,r,o,i){if(null!=t){var a="function"==typeof t?t(e,r):t;"string"==typeof a?"function"==typeof o?o(a,i):((0,n.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},appendListener:function(t){var n=!0,r=function(){n&&t.apply(void 0,arguments)};return e.push(r),function(){n=!1,e=e.filter(function(t){return t!==r})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach(function(t){return t.apply(void 0,n)})}}}}),N=function(t){return t&&t.__esModule?t.default:t}(n(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(O),a=n(H),c=function(t,e,n){return Math.min(Math.max(t,e),n)};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,u=void 0===n?["/"]:n,s=t.initialIndex,p=void 0===s?0:s,h=t.keyLength,l=void 0===h?6:h,f=(0,a.default)(),d=function(t){o(x,t),x.length=x.entries.length,f.notifyListeners(x.location,x.action)},y=function(){return Math.random().toString(36).substr(2,l)},m=c(p,0,u.length-1),v=u.map(function(t){return"string"==typeof t?(0,$.createLocation)(t,void 0,y()):(0,$.createLocation)(t,void 0,t.key||y())}),g=A.createPath,b=function(t){var n=c(x.index+t,0,x.entries.length-1),r=x.entries[n];f.confirmTransitionTo(r,"POP",e,function(t){t?d({action:"POP",location:r,index:n}):d()})},x={length:v.length,action:"POP",location:v[m],index:m,entries:v,createHref:g,push:function(t,n){(0,i.default)(!("object"===(void 0===t?"undefined":r(t))&&void 0!==t.state&&void 0!==n),"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");var o=(0,$.createLocation)(t,n,y(),x.location);f.confirmTransitionTo(o,"PUSH",e,function(t){if(t){var e=x.index+1,n=x.entries.slice(0);n.length>e?n.splice(e,n.length-e,o):n.push(o),d({action:"PUSH",location:o,index:e,entries:n})}})},replace:function(t,n){(0,i.default)(!("object"===(void 0===t?"undefined":r(t))&&void 0!==t.state&&void 0!==n),"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");var o=(0,$.createLocation)(t,n,y(),x.location);f.confirmTransitionTo(o,"REPLACE",e,function(t){t&&(x.entries[x.index]=o,d({action:"REPLACE",location:o}))})},go:b,goBack:function(){return b(-1)},goForward:function(){return b(1)},canGo:function(t){var e=x.index+t;return e>=0&&e<x.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.setPrompt(t)},listen:function(t){return f.appendListener(t)}};return x}})),B=function(t,e,n,r,o,i,a,c){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,c],p=0;(u=new Error(e.replace(/%s/g,function(){return s[p++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},D=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},F=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},V=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},Y=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},z=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},J=function(t){function n(){var e,r,o;D(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=z(this,t.call.apply(t,[this].concat(a))),r.state={match:r.computeMatch(r.props.history.location.pathname)},o=e,z(r,o)}return V(n,t),n.prototype.getChildContext=function(){return{router:F({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},n.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},n.prototype.componentWillMount=function(){var t=this,n=this.props,r=n.children,o=n.history;null!=r&&1!==e.Children.count(r)&&B(!1),this.unlisten=o.listen(function(){t.setState({match:t.computeMatch(o.location.pathname)})})},n.prototype.componentWillReceiveProps=function(t){},n.prototype.componentWillUnmount=function(){this.unlisten()},n.prototype.render=function(){var t=this.props.children;return t?e.Children.only(t):null},n}(e.Component);J.contextTypes={router:k.object},J.childContextTypes={router:k.object.isRequired};var G=function(t){function n(){var e,r,o;D(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=z(this,t.call.apply(t,[this].concat(a))),r.history=N(r.props),o=e,z(r,o)}return V(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(J,{history:this.history,children:this.props.children})},n}(e.Component),K=function(t){function e(){return D(this,e),z(this,t.apply(this,arguments))}return V(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){this.context.router||B(!1),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(e.Component);K.defaultProps={when:!0},K.contextTypes={router:k.shape({history:k.shape({block:k.func.isRequired}).isRequired}).isRequired};var Q=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},X=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Z=function(t,e,n,r){var o=void 0;"string"==typeof t?(o=Q(t)).state=e:(void 0===(o=X({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},tt=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&c(t.state,e.state)},et=function(t){function e(){return D(this,e),z(this,t.apply(this,arguments))}return V(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){this.context.router||B(!1),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=Z(t.to),n=Z(this.props.to);tt(e,n)||this.perform()},e.prototype.perform=function(){var t=this.context.router.history,e=this.props,n=e.push,r=e.to;n?t.push(r):t.replace(r)},e.prototype.render=function(){return null},e}(e.Component);et.defaultProps={push:!1},et.contextTypes={router:k.shape({history:k.shape({push:k.func.isRequired,replace:k.func.isRequired}).isRequired,staticContext:k.object}).isRequired};var nt=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},rt=x,ot=u,it=h,at=b,ct=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");rt.parse=ot,rt.compile=function(t,e){return h(u(t,e))},rt.tokensToFunction=it,rt.tokensToRegExp=at;var ut={},st=0,pt=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=ut[n]||(ut[n]={});if(r[t])return r[t];var o=[],i={re:rt(t,o,e),keys:o};return st<1e4&&(r[t]=i,st++),i},ht=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof e&&(e={path:e});var n=e,r=n.path,o=void 0===r?"/":r,i=n.exact,a=void 0!==i&&i,c=n.strict,u=void 0!==c&&c,s=n.sensitive,p=pt(o,{end:a,strict:u,sensitive:void 0!==s&&s}),h=p.re,l=p.keys,f=h.exec(t);if(!f)return null;var d=f[0],y=f.slice(1),m=t===d;return a&&!m?null:{path:o,url:"/"===o&&""===d?"/":d,isExact:m,params:l.reduce(function(t,e,n){return t[e.name]=y[n],t},{})}},lt=function(t){return 0===e.Children.count(t)},ft=function(t){function n(){var e,r,o;D(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=z(this,t.call.apply(t,[this].concat(a))),r.state={match:r.computeMatch(r.props,r.context.router)},o=e,z(r,o)}return V(n,t),n.prototype.getChildContext=function(){return{router:F({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},n.prototype.computeMatch=function(t,e){var n=t.computedMatch,r=t.location,o=t.path,i=t.strict,a=t.exact,c=t.sensitive;if(n)return n;e||B(!1);var u=e.route,s=(r||u.location).pathname;return o?ht(s,{path:o,strict:i,exact:a,sensitive:c}):u.match},n.prototype.componentWillMount=function(){},n.prototype.componentWillReceiveProps=function(t,e){this.setState({match:this.computeMatch(t,e.router)})},n.prototype.render=function(){var t=this.state.match,n=this.props,r=n.children,o=n.component,i=n.render,a=this.context.router,c=a.history,u=a.route,s=a.staticContext,p={match:t,location:this.props.location||u.location,history:c,staticContext:s};return o?t?e.createElement(o,p):null:i?t?i(p):null:r?"function"==typeof r?r(p):lt(r)?null:e.Children.only(r):null},n}(e.Component);ft.contextTypes={router:k.shape({history:k.object.isRequired,route:k.object.isRequired,staticContext:k.object})},ft.childContextTypes={router:k.object.isRequired};var dt=function(t){var e=t.pathname,n=void 0===e?"/":e,r=t.search,o=void 0===r?"":r,i=t.hash,a=void 0===i?"":i;return{pathname:n,search:"?"===o?"":o,hash:"#"===a?"":a}},yt=function(t,e){return t?F({},e,{pathname:S(t)+e.pathname}):e},mt=function(t,e){if(!t)return e;var n=S(t);return 0!==e.pathname.indexOf(n)?e:F({},e,{pathname:e.pathname.substr(n.length)})},vt=function(t){return"string"==typeof t?M(t):dt(t)},gt=function(t){return"string"==typeof t?t:_(t)},bt=function(t){return function(){B(!1)}},xt=function(){},Rt=function(t){function n(){var e,r,o;D(this,n);for(var i=arguments.length,a=Array(i),c=0;c<i;c++)a[c]=arguments[c];return e=r=z(this,t.call.apply(t,[this].concat(a))),r.createHref=function(t){return S(r.props.basename+gt(t))},r.handlePush=function(t){var e=r.props,n=e.basename,o=e.context;o.action="PUSH",o.location=yt(n,vt(t)),o.url=gt(o.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,o=e.context;o.action="REPLACE",o.location=yt(n,vt(t)),o.url=gt(o.location)},r.handleListen=function(){return xt},r.handleBlock=function(){return xt},o=e,z(r,o)}return V(n,t),n.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},n.prototype.componentWillMount=function(){},n.prototype.render=function(){var t=this.props,n=t.basename,r=(t.context,t.location),o=Y(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:mt(n,vt(r)),push:this.handlePush,replace:this.handleReplace,go:bt(),goBack:bt(),goForward:bt(),listen:this.handleListen,block:this.handleBlock};return e.createElement(J,F({},o,{history:i}))},n}(e.Component);Rt.defaultProps={basename:"",location:"/"},Rt.childContextTypes={router:k.object.isRequired};var Ot=function(t){function n(){return D(this,n),z(this,t.apply(this,arguments))}return V(n,t),n.prototype.componentWillMount=function(){this.context.router||B(!1)},n.prototype.componentWillReceiveProps=function(t){},n.prototype.render=function(){var t=this.context.router.route,n=this.props.children,r=this.props.location||t.location,o=void 0,i=void 0;return e.Children.forEach(n,function(n){if(e.isValidElement(n)){var a=n.props,c=a.path,u=a.exact,s=a.strict,p=a.sensitive,h=a.from,l=c||h;null==o&&(i=n,o=l?ht(r.pathname,{path:l,exact:u,strict:s,sensitive:p}):t.match)}}),o?e.cloneElement(i,{location:r,computedMatch:o}):null},n}(e.Component);Ot.contextTypes={router:k.shape({route:k.object.isRequired}).isRequired};var Pt={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},wt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Et=Object.defineProperty,jt=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,Tt=Object.getOwnPropertyDescriptor,kt=Object.getPrototypeOf,At=kt&&kt(Object),St=function t(e,n,r){if("string"!=typeof n){if(At){var o=kt(n);o&&o!==At&&t(e,o,r)}var i=jt(n);Ct&&(i=i.concat(Ct(n)));for(var a=0;a<i.length;++a){var c=i[a];if(!(Pt[c]||wt[c]||r&&r[c])){var u=Tt(n,c);try{Et(e,c,u)}catch(t){}}}return e}return e};t.MemoryRouter=G,t.Prompt=K,t.Redirect=et,t.Route=ft,t.Router=J,t.StaticRouter=Rt,t.Switch=Ot,t.matchPath=ht,t.withRouter=function(t){var n=function(n){var r=n.wrappedComponentRef,o=Y(n,["wrappedComponentRef"]);return e.createElement(ft,{render:function(n){return e.createElement(t,F({},o,n,{ref:r}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,St(n,t)},Object.defineProperty(t,"__esModule",{value:!0})});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc