Socket
Socket
Sign inDemoInstall

react-router

Package Overview
Dependencies
Maintainers
4
Versions
498
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.0.0-alpha.3 to 4.0.0-alpha.4

locationBroadcast.js

27

BrowserRouter.js

@@ -28,9 +28,16 @@ 'use strict';

var basename = _ref.basename;
var forceRefresh = _ref.forceRefresh;
var getUserConfirmation = _ref.getUserConfirmation;
var keyLength = _ref.keyLength;
var rest = _objectWithoutProperties(_ref, ['basename', 'keyLength']);
var props = _objectWithoutProperties(_ref, ['basename', 'forceRefresh', 'getUserConfirmation', 'keyLength']);
return _react2.default.createElement(
_BrowserHistory2.default,
{ basename: basename, keyLength: keyLength },
{
basename: basename,
forceRefresh: forceRefresh,
getUserConfirmation: getUserConfirmation,
keyLength: keyLength
},
function (_ref2) {

@@ -47,3 +54,3 @@ var history = _ref2.history;

blockTransitions: history.block
}, rest));
}, props));
}

@@ -53,8 +60,12 @@ );

BrowserRouter.propTypes = {
basename: _react.PropTypes.string,
keyLength: _react.PropTypes.number,
children: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.node])
};
if (process.env.NODE_ENV !== 'production') {
BrowserRouter.propTypes = {
basename: _react.PropTypes.string,
forceRefresh: _react.PropTypes.bool,
getUserConfirmation: _react.PropTypes.func,
keyLength: _react.PropTypes.number,
children: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.node])
};
}
exports.default = BrowserRouter;

@@ -28,9 +28,14 @@ 'use strict';

var basename = _ref.basename;
var getUserConfirmation = _ref.getUserConfirmation;
var hashType = _ref.hashType;
var rest = _objectWithoutProperties(_ref, ['basename', 'hashType']);
var props = _objectWithoutProperties(_ref, ['basename', 'getUserConfirmation', 'hashType']);
return _react2.default.createElement(
_HashHistory2.default,
{ basename: basename, hashType: hashType },
{
basename: basename,
getUserConfirmation: getUserConfirmation,
hashType: hashType
},
function (_ref2) {

@@ -46,4 +51,4 @@ var history = _ref2.history;

onReplace: history.replace,
onGo: history.go
}, rest));
blockTransitions: history.block
}, props));
}

@@ -53,8 +58,11 @@ );

HashRouter.propTypes = {
basename: _react.PropTypes.string,
hashType: _react.PropTypes.string,
children: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.node])
};
if (process.env.NODE_ENV !== 'production') {
HashRouter.propTypes = {
basename: _react.PropTypes.string,
getUserConfirmation: _react.PropTypes.func,
hashType: _react.PropTypes.string,
children: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.node])
};
}
exports.default = HashRouter;
'use strict';
exports.__esModule = true;
exports.createServerRenderContext = exports.matchPattern = exports.StaticRouter = exports.ServerRouter = exports.MemoryRouter = exports.HashRouter = exports.BrowserRouter = exports.Redirect = exports.NavigationPrompt = exports.Miss = exports.Match = exports.Link = undefined;
exports.propTypes = exports.createServerRenderContext = exports.matchPattern = exports.StaticRouter = exports.ServerRouter = exports.MemoryRouter = exports.HashRouter = exports.BrowserRouter = exports.Redirect = exports.NavigationPrompt = exports.Miss = exports.Match = exports.Link = undefined;

@@ -54,2 +54,8 @@ var _Link2 = require('./Link');

var _PropTypes = require('./PropTypes');
var _propTypes = _interopRequireWildcard(_PropTypes);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -80,2 +86,6 @@

exports.createServerRenderContext = _createServerRenderContext3.default;
exports.createServerRenderContext = _createServerRenderContext3.default;
// React PropTypes for all Components
exports.propTypes = _propTypes;

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

var _locationBroadcast = require('./locationBroadcast');
var _PropTypes = require('./PropTypes');

@@ -53,41 +55,49 @@

Link.prototype.render = function render() {
var router = this.context.router;
var _props = this.props;
var to = _props.to;
var style = _props.style;
var activeStyle = _props.activeStyle;
var className = _props.className;
var activeClassName = _props.activeClassName;
var location = _props.location;
var getIsActive = _props.isActive;
var activeOnlyWhenExact = _props.activeOnlyWhenExact;
var _this2 = this;
var rest = _objectWithoutProperties(_props, ['to', 'style', 'activeStyle', 'className', 'activeClassName', 'location', 'isActive', 'activeOnlyWhenExact']);
return _react2.default.createElement(
_locationBroadcast.LocationSubscriber,
null,
function (contextLocation) {
var router = _this2.context.router;
var _props = _this2.props;
var to = _props.to;
var style = _props.style;
var activeStyle = _props.activeStyle;
var className = _props.className;
var activeClassName = _props.activeClassName;
var propLocation = _props.location;
var getIsActive = _props.isActive;
var activeOnlyWhenExact = _props.activeOnlyWhenExact;
var currentLocation = location || this.context.location;
var rest = _objectWithoutProperties(_props, ['to', 'style', 'activeStyle', 'className', 'activeClassName', 'location', 'isActive', 'activeOnlyWhenExact']);
var isActive = getIsActive(currentLocation, createLocationDescriptor(to), this.props);
var currentLocation = propLocation || contextLocation;
// If children is a function, we are using a Function as Children Component
// so useful values will be passed down to the children function.
if (typeof rest.children == 'function') {
return rest.children({
isActive: isActive,
location: location,
href: router ? router.createHref(to) : to,
onClick: this.handleClick,
transition: this.handleTransition
});
}
var isActive = getIsActive(currentLocation, createLocationDescriptor(to), _this2.props);
// Maybe we should use <Match> here? Not sure how the custom `isActive`
// prop would shake out, also, this check happens a LOT so maybe its good
// to optimize here w/ a faster isActive check, so we'd need to bench mark
// any attempt at changing to use <Match>
return _react2.default.createElement('a', _extends({}, rest, {
href: router ? router.createHref(to) : to,
onClick: this.handleClick,
style: isActive ? _extends({}, style, activeStyle) : style,
className: isActive ? [className, activeClassName].join(' ').trim() : className
}));
// If children is a function, we are using a Function as Children Component
// so useful values will be passed down to the children function.
if (typeof rest.children == 'function') {
return rest.children({
isActive: isActive,
currentLocation: currentLocation,
href: router ? router.createHref(to) : to,
onClick: _this2.handleClick,
transition: _this2.handleTransition
});
}
// Maybe we should use <Match> here? Not sure how the custom `isActive`
// prop would shake out, also, this check happens a LOT so maybe its good
// to optimize here w/ a faster isActive check, so we'd need to benchmark
// any attempt at changing to use <Match>
return _react2.default.createElement('a', _extends({}, rest, {
href: router ? router.createHref(to) : to,
onClick: _this2.handleClick,
style: isActive ? _extends({}, style, activeStyle) : style,
className: isActive ? [className, activeClassName].join(' ').trim() : className
}));
}
);
};

@@ -98,21 +108,2 @@

// we should probably use LocationUtils.createLocationDescriptor
Link.propTypes = {
to: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]).isRequired,
activeStyle: _react.PropTypes.object,
activeClassName: _react.PropTypes.string,
location: _react.PropTypes.object,
activeOnlyWhenExact: _react.PropTypes.bool,
isActive: _react.PropTypes.func,
children: _react.PropTypes.oneOfType([_react.PropTypes.node, _react.PropTypes.func]),
// props we have to deal with but aren't necessarily
// part of the Link API
style: _react.PropTypes.object,
className: _react.PropTypes.string,
target: _react.PropTypes.string,
onClick: _react.PropTypes.func
};
Link.defaultProps = {

@@ -129,5 +120,26 @@ activeOnlyWhenExact: false,

Link.contextTypes = {
router: _PropTypes.router, // TODO: This should be required, lazy testers be damned
location: _PropTypes.location // TODO: This should also be required
router: _PropTypes.routerContext
};
if (process.env.NODE_ENV !== 'production') {
Link.propTypes = {
to: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]).isRequired,
activeStyle: _react.PropTypes.object,
activeClassName: _react.PropTypes.string,
location: _react.PropTypes.object,
activeOnlyWhenExact: _react.PropTypes.bool,
isActive: _react.PropTypes.func,
children: _react.PropTypes.oneOfType([_react.PropTypes.node, _react.PropTypes.func]),
// props we have to deal with but aren't necessarily
// part of the Link API
style: _react.PropTypes.object,
className: _react.PropTypes.string,
target: _react.PropTypes.string,
onClick: _react.PropTypes.func
};
}
// we should probably use LocationUtils.createLocationDescriptor
var createLocationDescriptor = function createLocationDescriptor(to) {

@@ -134,0 +146,0 @@ return (typeof to === 'undefined' ? 'undefined' : _typeof(to)) === 'object' ? to : { pathname: to };

'use strict';
exports.__esModule = true;
exports.createRouterPath = exports.createRouterLocation = undefined;
exports.createRouterPath = exports.createRouterLocation = exports.locationsAreEqual = undefined;
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 _PathUtils = require('history/PathUtils');
var _LocationUtils = require('react-history/LocationUtils');
var createRouterLocation = function createRouterLocation(input, parseQuery, stringifyQuery) {
Object.defineProperty(exports, 'locationsAreEqual', {
enumerable: true,
get: function get() {
return _LocationUtils.locationsAreEqual;
}
});
var _PathUtils = require('react-history/PathUtils');
var createRouterLocation = exports.createRouterLocation = function createRouterLocation(input, parseQueryString, stringifyQuery) {
if (typeof input === 'string') {
var location = (0, _PathUtils.parsePath)(input);
location.query = location.search !== '' ? parseQuery(location.search) : null;
location.query = location.search !== '' ? parseQueryString(location.search) : null;
return location;

@@ -22,3 +31,3 @@ } else {

state: input.state || null,
query: input.query || (input.search ? parseQuery(input.search) : null)
query: input.query || (input.search ? parseQueryString(input.search) : null)
};

@@ -28,9 +37,6 @@ }

var createRouterPath = function createRouterPath(input, stringifyQuery) {
var createRouterPath = exports.createRouterPath = function createRouterPath(input, stringifyQuery) {
return typeof input === 'string' ? input : (0, _PathUtils.createPath)(_extends({}, input, {
search: input.search || (input.query ? '?' + stringifyQuery(input.query) : '')
}));
};
exports.createRouterLocation = createRouterLocation;
exports.createRouterPath = createRouterPath;
};

@@ -19,2 +19,4 @@ 'use strict';

var _locationBroadcast = require('./locationBroadcast');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -85,6 +87,2 @@

RegisterMatch.propTypes = {
children: _react.PropTypes.node.isRequired,
match: _react.PropTypes.any
};
RegisterMatch.contextTypes = {

@@ -95,2 +93,10 @@ match: _react.PropTypes.object,

if (process.env.NODE_ENV !== 'production') {
RegisterMatch.propTypes = {
children: _react.PropTypes.node.isRequired,
match: _react.PropTypes.any
};
}
var Match = function (_React$Component2) {

@@ -106,26 +112,31 @@ _inherits(Match, _React$Component2);

Match.prototype.render = function render() {
var _props = this.props;
var children = _props.children;
var render = _props.render;
var Component = _props.component;
var pattern = _props.pattern;
var location = _props.location;
var exactly = _props.exactly;
var _context = this.context;
var locationContext = _context.location;
var matchContext = _context.match;
var _this3 = this;
var loc = location || locationContext;
var parent = matchContext && matchContext.parent;
var match = (0, _matchPattern2.default)(pattern, loc, exactly, parent);
var props = _extends({}, match, { location: loc, pattern: pattern });
return _react2.default.createElement(
_locationBroadcast.LocationSubscriber,
null,
function (locationContext) {
var _props = _this3.props;
var children = _props.children;
var render = _props.render;
var Component = _props.component;
var pattern = _props.pattern;
var location = _props.location;
var exactly = _props.exactly;
var matchContext = _this3.context.match;
return _react2.default.createElement(
RegisterMatch,
{ match: match },
_react2.default.createElement(
_MatchProvider2.default,
{ match: match },
children ? children(_extends({ matched: !!match }, props)) : match ? render ? render(props) : _react2.default.createElement(Component, props) : null
)
var loc = location || locationContext;
var parent = matchContext && matchContext.parent;
var match = (0, _matchPattern2.default)(pattern, loc, exactly, parent);
var props = _extends({}, match, { location: loc, pattern: pattern });
return _react2.default.createElement(
RegisterMatch,
{ match: match },
_react2.default.createElement(
_MatchProvider2.default,
{ match: match },
children ? children(_extends({ matched: !!match }, props)) : match ? render ? render(props) : _react2.default.createElement(Component, props) : null
)
);
}
);

@@ -137,11 +148,2 @@ };

Match.propTypes = {
pattern: _react.PropTypes.string,
exactly: _react.PropTypes.bool,
location: _react.PropTypes.object,
children: _react.PropTypes.func,
render: _react.PropTypes.func,
component: _react.PropTypes.func
};
Match.defaultProps = {

@@ -154,2 +156,16 @@ exactly: false

};
if (process.env.NODE_ENV !== 'production') {
Match.propTypes = {
pattern: _react.PropTypes.string,
exactly: _react.PropTypes.bool,
location: _react.PropTypes.object,
children: _react.PropTypes.func,
render: _react.PropTypes.func,
component: _react.PropTypes.func
};
}
exports.default = Match;

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

MatchProvider.propTypes = {
match: _react.PropTypes.any,
children: _react.PropTypes.node
};
MatchProvider.childContextTypes = {

@@ -116,2 +112,11 @@ match: _PropTypes.matchContext.isRequired

};
if (process.env.NODE_ENV !== 'production') {
MatchProvider.propTypes = {
match: _react.PropTypes.any,
children: _react.PropTypes.node
};
}
exports.default = MatchProvider;

@@ -27,2 +27,3 @@ 'use strict';

var MemoryRouter = function MemoryRouter(_ref) {
var getUserConfirmation = _ref.getUserConfirmation;
var initialEntries = _ref.initialEntries;

@@ -32,3 +33,3 @@ var initialIndex = _ref.initialIndex;

var rest = _objectWithoutProperties(_ref, ['initialEntries', 'initialIndex', 'keyLength']);
var props = _objectWithoutProperties(_ref, ['getUserConfirmation', 'initialEntries', 'initialIndex', 'keyLength']);

@@ -38,2 +39,3 @@ return _react2.default.createElement(

{
getUserConfirmation: getUserConfirmation,
initialEntries: initialEntries,

@@ -52,4 +54,4 @@ initialIndex: initialIndex,

onReplace: history.replace,
canGo: history.canGo
}, rest));
blockTransitions: history.block
}, props));
}

@@ -59,9 +61,12 @@ );

MemoryRouter.propTypes = {
initialEntries: _react.PropTypes.array,
initialIndex: _react.PropTypes.number,
keyLength: _react.PropTypes.number,
children: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.node])
};
if (process.env.NODE_ENV !== 'production') {
MemoryRouter.propTypes = {
getUserConfirmation: _react.PropTypes.func,
initialEntries: _react.PropTypes.array,
initialIndex: _react.PropTypes.number,
keyLength: _react.PropTypes.number,
children: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.node])
};
}
exports.default = MemoryRouter;

@@ -75,8 +75,2 @@ 'use strict';

Miss.propTypes = {
children: _react.PropTypes.node,
location: _PropTypes.location,
render: _react.PropTypes.func,
component: _react.PropTypes.func
};
Miss.contextTypes = {

@@ -87,2 +81,13 @@ match: _react.PropTypes.object,

};
if (process.env.NODE_ENV !== 'production') {
Miss.propTypes = {
children: _react.PropTypes.node,
location: _PropTypes.location,
render: _react.PropTypes.func,
component: _react.PropTypes.func
};
}
exports.default = Miss;
{
"name": "react-router",
"version": "4.0.0-alpha.3",
"version": "4.0.0-alpha.4",
"description": "Declarative routing for React",

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

"dependencies": {
"history": "^4.0.0",
"path-to-regexp": "^1.5.3",
"query-string": "4.2.3",
"react-history": "^0.13.0"
"react-broadcast": "^0.1.1",
"react-history": "^0.14.0"
},

@@ -43,2 +43,3 @@ "peerDependencies": {

"babel-loader": "^6.2.4",
"babel-plugin-dev-expression": "^0.2.1",
"babel-preset-es2015": "^6.14.0",

@@ -45,0 +46,0 @@ "babel-preset-es2015-loose": "^8.0.0",

'use strict';
exports.__esModule = true;
exports.historyContext = exports.action = exports.router = exports.location = exports.history = exports.matchContext = undefined;
exports.routerContext = exports.location = exports.history = exports.matchContext = exports.action = undefined;
var _react = require('react');
var action = exports.action = _react.PropTypes.oneOf(['PUSH', 'REPLACE', 'POP']);
var matchContext = exports.matchContext = _react.PropTypes.shape({

@@ -29,15 +31,7 @@ addMatch: _react.PropTypes.func.isRequired,

var router = exports.router = _react.PropTypes.shape({
createHref: _react.PropTypes.func.isRequired,
var routerContext = exports.routerContext = _react.PropTypes.shape({
transitionTo: _react.PropTypes.func.isRequired,
replaceWith: _react.PropTypes.func.isRequired,
blockTransitions: _react.PropTypes.func.isRequired
});
var action = exports.action = _react.PropTypes.oneOf(['PUSH', 'REPLACE', 'POP']);
var historyContext = exports.historyContext = _react.PropTypes.shape({
push: _react.PropTypes.func.isRequired,
replace: _react.PropTypes.func.isRequired,
go: _react.PropTypes.func.isRequired
blockTransitions: _react.PropTypes.func.isRequired,
createHref: _react.PropTypes.func.isRequired
});

@@ -40,7 +40,7 @@ # React Router [![Travis][build-badge]][build]

Please read [our docs here](https://react-router-website-xvufzcovng.now.sh/).
Please read [our docs here](https://react-router.now.sh/).
## v4 FAQ
### Why the huge change? (AGAIN?!)
### Why the huge change?

@@ -96,12 +96,25 @@ **tl;dr** Declarative Composability.

We know things have been rocky. Our previous API was fighting against
React, causing a ton of churn. With v4, our only API is components that
receive props, so, it's hard to imagine a big change again. Now that
we're embracing (not fighting) React's declarative composability, we
think this API will last as long as React itself, because that's all it
is.
We know things have been rocky for a lot of people regarding the router
API, to the point that the router has a reputation for huge API
overhauls.
Not only that, but we're excited to create and encourage building an
ecosystem of addons to this stable base.
We went back and audited the changes to the major versions. From 0.13
to 1.0 there were huge, backwards incompatible, changes. From 1.0 to 2.0
there were some subtle, but fully backwards compatible changes, and 3.0
will be 2.0 but without any deprecation warnings.
It has been 18 months since the release of 1.0. So, if you've kept
up with only the non-beta releases, you've only had to update your code
once in a year and a half.
Our previous API was fighting against React. With v4, our only API is
components that receive props, so, it's hard to imagine a big change
again. Now that we're embracing (not fighting) React's declarative
composability, we think this API will last as long as React itself,
because that's all it is.
We're excited to create and encourage building an ecosystem of addons to
this stable base. In the words of Cheng Lou, we've become more powerful
(https://www.youtube.com/watch?v=mVVNJKv9esE).
### Why did you get rid of feature [x]?

@@ -197,3 +210,5 @@

### Where are the examples?!?
The examples are now located under [the website](/website/examples).

@@ -200,0 +215,0 @@ ## Thanks

@@ -50,9 +50,14 @@ 'use strict';

Redirect.propTypes = {
to: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]).isRequired
};
Redirect.contextTypes = {
router: _PropTypes.router,
router: _PropTypes.routerContext,
serverRouter: _react.PropTypes.object
};
if (process.env.NODE_ENV !== 'production') {
Redirect.propTypes = {
to: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]).isRequired
};
}
exports.default = Redirect;

@@ -61,10 +61,15 @@ 'use strict';

ServerRouter.propTypes = {
context: _react.PropTypes.object.isRequired,
location: _react.PropTypes.string.isRequired,
children: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.node])
};
ServerRouter.childContextTypes = {
serverRouter: _react.PropTypes.object.isRequired
};
if (process.env.NODE_ENV !== 'production') {
ServerRouter.propTypes = {
context: _react.PropTypes.object.isRequired,
location: _react.PropTypes.string.isRequired,
children: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.node])
};
}
exports.default = ServerRouter;

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

var _LocationUtils = require('./LocationUtils');
var _MatchProvider = require('./MatchProvider');

@@ -18,2 +16,6 @@

var _locationBroadcast = require('./locationBroadcast');
var _LocationUtils = require('./LocationUtils');
var _PropTypes = require('./PropTypes');

@@ -29,3 +31,3 @@

var defaultStringifyQuery = function defaultStringifyQuery(query) {
var stringifyQuery = function stringifyQuery(query) {
return (0, _queryString.stringify)(query).replace(/%20/g, '+');

@@ -38,62 +40,77 @@ };

function StaticRouter() {
var _temp, _this, _ret;
_classCallCheck(this, StaticRouter);
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.transitionTo = function (location) {
_this.props.onPush(_this.createLocation(location));
}, _this.replaceWith = function (location) {
_this.props.onReplace(_this.createLocation(location));
}, _this.blockTransitions = function (prompt) {
_this.props.blockTransitions(prompt);
}, _this.createHref = function (to) {
var path = (0, _LocationUtils.createRouterPath)(to, _this.props.stringifyQuery);
if (_this.props.basename) path = _this.props.basename + path;
return _this.props.createHref(path);
}, _this.state = {
location: null
}, _temp), _possibleConstructorReturn(_this, _ret);
}
StaticRouter.prototype.createLocationForContext = function createLocationForContext(loc) {
StaticRouter.prototype.createLocation = function createLocation(location) {
var _props = this.props;
var parseQuery = _props.parseQuery;
var parseQueryString = _props.parseQueryString;
var stringifyQuery = _props.stringifyQuery;
return (0, _LocationUtils.createRouterLocation)(loc, parseQuery, stringifyQuery);
return (0, _LocationUtils.createRouterLocation)(location, parseQueryString, stringifyQuery);
};
StaticRouter.prototype.getChildContext = function getChildContext() {
var _this2 = this;
var createHref = function createHref(to) {
var path = (0, _LocationUtils.createRouterPath)(to, _this2.props.stringifyQuery);
if (_this2.props.basename) path = _this2.props.basename + path;
return _this2.props.createHref(path);
StaticRouter.prototype.getRouterContext = function getRouterContext() {
return {
transitionTo: this.transitionTo,
replaceWith: this.replaceWith,
blockTransitions: this.blockTransitions,
createHref: this.createHref
};
};
var location = this.getLocation();
StaticRouter.prototype.getChildContext = function getChildContext() {
return {
location: location,
router: {
createHref: createHref,
transitionTo: function transitionTo(loc) {
_this2.props.onPush(_this2.createLocationForContext(loc));
},
replaceWith: function replaceWith(loc) {
_this2.props.onReplace(_this2.createLocationForContext(loc));
},
blockTransitions: function blockTransitions(getPromptMessage) {
_this2.props.blockTransitions(getPromptMessage);
}
}
router: this.getRouterContext()
};
};
StaticRouter.prototype.getLocation = function getLocation() {
// TODO: maybe memoize this on willReceiveProps to get extreme w/ perf
var _props2 = this.props;
var location = _props2.location;
var parseQuery = _props2.parseQuery;
var stringifyQuery = _props2.stringifyQuery;
StaticRouter.prototype.componentWillMount = function componentWillMount() {
this.setState({
location: this.createLocation(this.props.location)
});
};
return (0, _LocationUtils.createRouterLocation)(location, parseQuery, stringifyQuery);
StaticRouter.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
var nextLocation = this.createLocation(nextProps.location);
if (!(0, _LocationUtils.locationsAreEqual)(this.state.location, nextLocation)) this.setState({ location: nextLocation });
};
StaticRouter.prototype.render = function render() {
var children = this.props.children;
var location = this.state.location;
var _props2 = this.props;
var action = _props2.action;
var children = _props2.children;
var location = this.getLocation();
return _react2.default.createElement(
_MatchProvider2.default,
null,
typeof children === 'function' ? children({ location: location, router: this.getChildContext().router }) : _react2.default.Children.only(children)
_locationBroadcast.LocationBroadcast,
{ value: location },
_react2.default.createElement(
_MatchProvider2.default,
null,
typeof children === 'function' ? children({ action: action, location: location, router: this.getRouterContext() }) : _react2.default.Children.only(children)
)
);

@@ -105,26 +122,33 @@ };

StaticRouter.propTypes = {
action: _PropTypes.action.isRequired,
blockTransitions: _react.PropTypes.func,
children: _react.PropTypes.oneOfType([_react.PropTypes.node, _react.PropTypes.func]),
createHref: _react.PropTypes.func.isRequired,
location: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string]).isRequired,
basename: _react.PropTypes.string,
onPush: _react.PropTypes.func.isRequired,
onReplace: _react.PropTypes.func.isRequired,
stringifyQuery: _react.PropTypes.func.isRequired,
// TODO: parseQueryString
parseQuery: _react.PropTypes.func.isRequired
};
StaticRouter.defaultProps = {
stringifyQuery: stringifyQuery,
parseQueryString: _queryString.parse,
createHref: function createHref(path) {
return path;
},
stringifyQuery: defaultStringifyQuery,
parseQuery: _queryString.parse
}
};
StaticRouter.childContextTypes = {
router: _PropTypes.router.isRequired,
location: _PropTypes.location.isRequired
router: _PropTypes.routerContext.isRequired
};
if (process.env.NODE_ENV !== 'production') {
StaticRouter.propTypes = {
children: _react.PropTypes.oneOfType([_react.PropTypes.node, _react.PropTypes.func]),
action: _PropTypes.action.isRequired,
location: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string]).isRequired,
onPush: _react.PropTypes.func.isRequired,
onReplace: _react.PropTypes.func.isRequired,
blockTransitions: _react.PropTypes.func,
stringifyQuery: _react.PropTypes.func.isRequired,
parseQueryString: _react.PropTypes.func.isRequired,
createHref: _react.PropTypes.func.isRequired, // TODO: Clarify why this is useful
basename: _react.PropTypes.string // TODO: Feels like we should be able to remove this
};
}
exports.default = StaticRouter;

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactRouter=t(require("react")):e.ReactRouter=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.createServerRenderContext=t.matchPattern=t.StaticRouter=t.ServerRouter=t.MemoryRouter=t.HashRouter=t.BrowserRouter=t.Redirect=t.NavigationPrompt=t.Miss=t.Match=t.Link=void 0;var o=n(17),i=r(o),a=n(19),s=r(a),c=n(21),u=r(c),p=n(35),f=r(p),l=n(22),h=r(l),y=n(15),d=r(y),v=n(16),m=r(v),b=n(20),P=r(b),g=n(23),T=r(g),O=n(3),w=r(O),x=n(10),R=r(x),_=n(24),j=r(_);t.Link=i["default"],t.Match=s["default"],t.Miss=u["default"],t.NavigationPrompt=f["default"],t.Redirect=h["default"],t.BrowserRouter=d["default"],t.HashRouter=m["default"],t.MemoryRouter=P["default"],t.ServerRouter=T["default"],t.StaticRouter=w["default"],t.matchPattern=R["default"],t.createServerRenderContext=j["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";t.__esModule=!0,t.historyContext=t.action=t.router=t.location=t.history=t.matchContext=void 0;var r=n(1);t.matchContext=r.PropTypes.shape({addMatch:r.PropTypes.func.isRequired,removeMatch:r.PropTypes.func.isRequired}),t.history=r.PropTypes.shape({listen:r.PropTypes.func.isRequired,listenBefore:r.PropTypes.func.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired}),t.location=r.PropTypes.shape({pathname:r.PropTypes.string.isRequired,search:r.PropTypes.string.isRequired,hash:r.PropTypes.string.isRequired,state:r.PropTypes.any,key:r.PropTypes.string}),t.router=r.PropTypes.shape({createHref:r.PropTypes.func.isRequired,transitionTo:r.PropTypes.func.isRequired,replaceWith:r.PropTypes.func.isRequired,blockTransitions:r.PropTypes.func.isRequired}),t.action=r.PropTypes.oneOf(["PUSH","REPLACE","POP"]),t.historyContext=r.PropTypes.shape({push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(1),c=r(s),u=n(31),p=n(18),f=n(9),l=r(f),h=n(2),y=function(e){return(0,u.stringify)(e).replace(/%20/g,"+")},d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.createLocationForContext=function(e){var t=this.props,n=t.parseQuery,r=t.stringifyQuery;return(0,p.createRouterLocation)(e,n,r)},t.prototype.getChildContext=function(){var e=this,t=function(t){var n=(0,p.createRouterPath)(t,e.props.stringifyQuery);return e.props.basename&&(n=e.props.basename+n),e.props.createHref(n)},n=this.getLocation();return{location:n,router:{createHref:t,transitionTo:function(t){e.props.onPush(e.createLocationForContext(t))},replaceWith:function(t){e.props.onReplace(e.createLocationForContext(t))},blockTransitions:function(t){e.props.blockTransitions(t)}}}},t.prototype.getLocation=function(){var e=this.props,t=e.location,n=e.parseQuery,r=e.stringifyQuery;return(0,p.createRouterLocation)(t,n,r)},t.prototype.render=function(){var e=this.props.children,t=this.getLocation();return c["default"].createElement(l["default"],null,"function"==typeof e?e({location:t,router:this.getChildContext().router}):c["default"].Children.only(e))},t}(c["default"].Component);d.propTypes={action:h.action.isRequired,blockTransitions:s.PropTypes.func,children:s.PropTypes.oneOfType([s.PropTypes.node,s.PropTypes.func]),createHref:s.PropTypes.func.isRequired,location:s.PropTypes.oneOfType([s.PropTypes.object,s.PropTypes.string]).isRequired,basename:s.PropTypes.string,onPush:s.PropTypes.func.isRequired,onReplace:s.PropTypes.func.isRequired,stringifyQuery:s.PropTypes.func.isRequired,parseQuery:s.PropTypes.func.isRequired},d.defaultProps={createHref:function(e){return e},stringifyQuery:y,parseQuery:u.parse},d.childContextTypes={router:h.router.isRequired,location:h.location.isRequired},t["default"]=d},function(e,t){"use strict";t.__esModule=!0;t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e},t.stripPrefix=function(e,t){return 0===e.indexOf(t)?e.substr(t.length):e},t.parsePath=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");o!==-1&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return i!==-1&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(4),a=(t.createLocation=function(e,t,n){var r=void 0;return"string"==typeof e?(r=(0,i.parsePath)(e),r.state=t):(r=o({},e),r.pathname||(r.pathname="/"),r.search&&"?"!==r.search.charAt(0)&&(r.search="?"+r.search),r.hash&&"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash),void 0!==t&&void 0===r.state&&(r.state=t)),r.key=n,r},function s(e,t){if(null==e)return e==t;var n="undefined"==typeof e?"undefined":r(e),o="undefined"==typeof t?"undefined":r(t);if(n!==o)return!1;if(Array.isArray(e))return!(!Array.isArray(t)||e.length!==t.length)&&e.every(function(e,n){return s(e,t[n])});if("object"===n){var i=Object.keys(e),a=Object.keys(t);return i.length===a.length&&i.every(function(n){return s(e[n],t[n])})}return e===t});t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&a(e.state,t.state)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(5),i=(r(o),function(){var e=null,t=function(t){return e=t,function(){e===t&&(e=null)}},n=function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(i!==!1)}else o(!0)},r=[],o=function(e){return r.push(e),function(){r=r.filter(function(t){return t!==e})}},i=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.forEach(function(e){return e.apply(void 0,t)})};return{setPrompt:t,confirmTransitionTo:n,appendListener:o,notifyListeners:i}});t["default"]=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(1),c=r(s),u=n(14),p=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.getChildContext=function(){return{history:this.history}},t.prototype.setupHistory=function(e){var t=this,n=e.createHistory,r=e.historyOptions;this.history=n(r),this.unlisten=this.history.listen(function(){return t.forceUpdate()})},t.prototype.componentWillMount=function(){this.setupHistory(this.props)},t.prototype.componentWillReceiveProps=function(e){var t=this.props.historyOptions,n=e.historyOptions,r=!1;for(var o in n)if(n[o]!==t[o]){r=!0;break}r&&(this.unlisten(),this.setupHistory(e))},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.history,t=e.location,n=e.action;return this.props.children({history:e,location:t,action:n})},t}(c["default"].Component);p.propTypes={children:s.PropTypes.func.isRequired,createHistory:s.PropTypes.func.isRequired,historyOptions:s.PropTypes.object},p.childContextTypes={history:u.historyContext.isRequired},t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(1),c=r(s),u=n(2),p=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.addMatch=function(e){r.matches.push(e)},r.removeMatch=function(e){r.matches.splice(r.matches.indexOf(e),1)},r.matches=[],r.subscribers=[],r.hasMatches=null,r.serverRouterIndex=null,r}return a(t,e),t.prototype.getChildContext=function(){var e=this;return{match:{addMatch:this.addMatch,removeMatch:this.removeMatch,matches:this.matches,parent:this.props.match,serverRouterIndex:this.serverRouterIndex,subscribe:function(t){return e.subscribers.push(t),function(){e.subscribers.splice(e.subscribers.indexOf(t),1)}}}}},t.prototype.componentDidUpdate=function(){this.notifySubscribers()},t.prototype.componentWillMount=function(){var e=this.context.serverRouter;e&&(this.serverRouterIndex=e.registerMatchContext(this.matches))},t.prototype.componentDidMount=function(){this.notifySubscribers()},t.prototype.notifySubscribers=function(){var e=this;if(this.subscribers.length){var t=this.hasMatches;this.hasMatches=0!==this.matches.length,this.hasMatches!==t&&this.subscribers.forEach(function(t){return t(e.hasMatches)})}},t.prototype.render=function(){return this.props.children},t}(c["default"].Component);p.propTypes={match:s.PropTypes.any,children:s.PropTypes.node},p.childContextTypes={match:u.matchContext.isRequired},p.contextTypes={serverRouter:s.PropTypes.object},t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(30),i=r(o),a={},s=function(e){var t=a[e];if(!t){var n=[],r=(0,i["default"])(e,n);t=a[e]={keys:n,regex:r}}return t},c=function(e,t){return e.split("/").slice(0,t.split("/").length).join("/")},u=function(e,t,n){return t.slice(1).reduce(function(e,t,r){return e[n[r].name]=t,e},{})},p=function(e,t,n,r){var o=!n&&"/"===e;if(o)return{params:null,isExact:"/"===t.pathname,pathname:"/"};!n&&r&&"/"!==e.charAt(0)&&(e=r.pathname+("/"!==r.pathname.charAt(r.pathname.length-1)?"/":"")+e);var i=s(e),a=n?t.pathname:c(t.pathname,e),p=i.regex.exec(a);if(p){var f=u(e,p,i.keys),l=t.pathname.split("/").length,h=e.split("/").length,y=l===h;return{params:f,isExact:y,pathname:a}}return null};t["default"]=p},function(e,t){"use strict";t.__esModule=!0;t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(e.indexOf("Android 2.")===-1&&e.indexOf("Android 4.0")===-1||e.indexOf("Mobile Safari")===-1||e.indexOf("Chrome")!==-1||e.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},t.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1}},function(e,t){"use strict";t.__esModule=!0;t.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,i,a,s],p=0;c=new Error(t.replace(/%s/g,function(){return u[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};e.exports=r},function(e,t,n){"use strict";t.__esModule=!0,t.historyContext=t.location=t.action=void 0;var r=n(1),o=t.action=r.PropTypes.oneOf(["PUSH","REPLACE","POP"]),i=t.location=r.PropTypes.shape({pathname:r.PropTypes.string.isRequired,search:r.PropTypes.string.isRequired,hash:r.PropTypes.string.isRequired,state:r.PropTypes.object,key:r.PropTypes.string});t.historyContext=r.PropTypes.shape({action:o.isRequired,location:i.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired,goBack:r.PropTypes.func.isRequired,goForward:r.PropTypes.func.isRequired,canGo:r.PropTypes.func,block:r.PropTypes.func.isRequired})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),s=r(a),c=n(32),u=r(c),p=n(3),f=r(p),l=function(e){var t=e.basename,n=e.keyLength,r=o(e,["basename","keyLength"]);return s["default"].createElement(u["default"],{basename:t,keyLength:n},function(e){var n=e.history,o=e.action,a=e.location;return s["default"].createElement(f["default"],i({action:o,location:a,basename:t,onPush:n.push,onReplace:n.replace,blockTransitions:n.block},r))})};l.propTypes={basename:a.PropTypes.string,keyLength:a.PropTypes.number,children:a.PropTypes.oneOfType([a.PropTypes.func,a.PropTypes.node])},t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),s=r(a),c=n(33),u=r(c),p=n(3),f=r(p),l=function(e){var t=e.basename,n=e.hashType,r=o(e,["basename","hashType"]);return s["default"].createElement(u["default"],{basename:t,hashType:n},function(e){var n=e.history,o=e.action,a=e.location;return s["default"].createElement(f["default"],i({action:o,location:a,basename:t,onPush:n.push,onReplace:n.replace,onGo:n.go},r))})};l.propTypes={basename:a.PropTypes.string,hashType:a.PropTypes.string,children:a.PropTypes.oneOfType([a.PropTypes.func,a.PropTypes.node])},t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=n(1),f=r(p),l=n(2),h=function(e){function t(){var n,r,o;i(this,t);for(var s=arguments.length,c=Array(s),u=0;u<s;u++)c[u]=arguments[u];return n=r=a(this,e.call.apply(e,[this].concat(c))),r.handleClick=function(e){r.props.onClick&&r.props.onClick(e),e.defaultPrevented||r.props.target||b(e)||!m(e)||(e.preventDefault(),r.context.router.transitionTo(r.props.to))},r.handleTransition=function(){r.context.router.transitionTo(r.props.to)},o=n,a(r,o)}return s(t,e),t.prototype.render=function(){var e=this.context.router,t=this.props,n=t.to,r=t.style,i=t.activeStyle,a=t.className,s=t.activeClassName,c=t.location,p=t.isActive,l=(t.activeOnlyWhenExact,o(t,["to","style","activeStyle","className","activeClassName","location","isActive","activeOnlyWhenExact"])),h=c||this.context.location,d=p(h,y(n),this.props);return"function"==typeof l.children?l.children({isActive:d,location:c,href:e?e.createHref(n):n,onClick:this.handleClick,transition:this.handleTransition}):f["default"].createElement("a",u({},l,{href:e?e.createHref(n):n,onClick:this.handleClick,style:d?u({},r,i):r,className:d?[a,s].join(" ").trim():a}))},t}(f["default"].Component);h.propTypes={to:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.object]).isRequired,activeStyle:p.PropTypes.object,activeClassName:p.PropTypes.string,location:p.PropTypes.object,activeOnlyWhenExact:p.PropTypes.bool,isActive:p.PropTypes.func,children:p.PropTypes.oneOfType([p.PropTypes.node,p.PropTypes.func]),style:p.PropTypes.object,className:p.PropTypes.string,target:p.PropTypes.string,onClick:p.PropTypes.func},h.defaultProps={activeOnlyWhenExact:!1,className:"",activeClassName:"",style:{},activeStyle:{},isActive:function(e,t,n){return d(t.pathname,e.pathname,n.activeOnlyWhenExact)&&v(t.query,e.query)}},h.contextTypes={router:l.router,location:l.location};var y=function(e){return"object"===("undefined"==typeof e?"undefined":c(e))?e:{pathname:e}},d=function(e,t,n){return n?t===e:0===t.indexOf(e)},v=function(e,t){return null==t?null==e:null==e||P(e,t)},m=function(e){return 0===e.button},b=function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)},P=function g(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return g(e,t[n])});if("object"===("undefined"==typeof e?"undefined":c(e))){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!Object.prototype.hasOwnProperty.call(t,n))return!1;if(!g(e[n],t[n]))return!1}return!0}return String(e)===String(t)};t["default"]=h},function(e,t,n){"use strict";t.__esModule=!0,t.createRouterPath=t.createRouterLocation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(4),i=function(e,t,n){if("string"==typeof e){var r=(0,o.parsePath)(e);return r.query=""!==r.search?t(r.search):null,r}return{pathname:e.pathname||"",search:e.search||(e.query?"?"+n(e.query):""),hash:e.hash||"",state:e.state||null,query:e.query||(e.search?t(e.search):null)}},a=function(e,t){return"string"==typeof e?e:(0,o.createPath)(r({},e,{search:e.search||(e.query?"?"+t(e.query):"")}))};t.createRouterLocation=i,t.createRouterPath=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(1),u=r(c),p=n(9),f=r(p),l=n(10),h=r(l),y=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.registerMatch=function(){var e=this.context.match,t=this.props.match;t&&e&&e.addMatch(t)},t.prototype.componentWillMount=function(){this.context.serverRouter&&this.registerMatch()},t.prototype.componentDidMount=function(){this.context.serverRouter||this.registerMatch()},t.prototype.componentDidUpdate=function(e){var t=this.context.match;t&&(e.match&&!this.props.match?t.removeMatch(e.match):!e.match&&this.props.match&&t.addMatch(this.props.match))},t.prototype.componentWillUnmount=function(){this.props.match&&this.context.match.removeMatch(this.props.match)},t.prototype.render=function(){return u["default"].Children.only(this.props.children)},t}(u["default"].Component);y.propTypes={children:c.PropTypes.node.isRequired,match:c.PropTypes.any},y.contextTypes={match:c.PropTypes.object,serverRouter:c.PropTypes.object};var d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function n(){var e=this.props,t=e.children,n=e.render,r=e.component,o=e.pattern,i=e.location,a=e.exactly,c=this.context,p=c.location,l=c.match,d=i||p,v=l&&l.parent,m=(0,h["default"])(o,d,a,v),b=s({},m,{location:d,pattern:o});return u["default"].createElement(y,{match:m},u["default"].createElement(f["default"],{match:m},t?t(s({matched:!!m},b)):m?n?n(b):u["default"].createElement(r,b):null))},t}(u["default"].Component);d.propTypes={pattern:c.PropTypes.string,exactly:c.PropTypes.bool,location:c.PropTypes.object,children:c.PropTypes.func,render:c.PropTypes.func,component:c.PropTypes.func},d.defaultProps={exactly:!1},d.contextTypes={location:c.PropTypes.object,match:c.PropTypes.object},t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),s=r(a),c=n(34),u=r(c),p=n(3),f=r(p),l=function(e){var t=e.initialEntries,n=e.initialIndex,r=e.keyLength,a=o(e,["initialEntries","initialIndex","keyLength"]);return s["default"].createElement(u["default"],{initialEntries:t,initialIndex:n,keyLength:r},function(e){var t=e.history,n=e.action,r=e.location;return s["default"].createElement(f["default"],i({action:n,location:r,onPush:t.push,onReplace:t.replace,canGo:t.canGo},a))})};l.propTypes={initialEntries:a.PropTypes.array,initialIndex:a.PropTypes.number,keyLength:a.PropTypes.number,children:a.PropTypes.oneOfType([a.PropTypes.func,a.PropTypes.node])},t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(1),c=r(s),u=n(2),p=function(e){function t(n,r){o(this,t);var a=i(this,e.call(this,n,r));return r.match&&!r.serverRouter&&(a.unsubscribe=a.context.match.subscribe(function(e){a.setState({noMatchesInContext:!e})})),r.serverRouter&&r.serverRouter.registerMissPresence(r.match.serverRouterIndex),a.state={noMatchesInContext:!1},a}return a(t,e),t.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},t.prototype.render=function n(){var e=this.props,n=e.render,t=e.component,r=this.state.noMatchesInContext,o=this.props.location,i=o||this.context.location,a=this.context,s=a.serverRouter,u=a.match,p=s&&s.missedAtIndex(u.serverRouterIndex);return r||p?n?n({location:i}):c["default"].createElement(t,{location:i}):null},t}(c["default"].Component);p.propTypes={children:s.PropTypes.node,location:u.location,render:s.PropTypes.func,component:s.PropTypes.func},p.contextTypes={match:s.PropTypes.object,location:s.PropTypes.object,serverRouter:s.PropTypes.object},t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(1),c=r(s),u=n(2),p=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.componentWillMount=function(){this.context.serverRouter&&this.redirect()},t.prototype.componentDidMount=function(){this.redirect()},t.prototype.redirect=function(){var e=this.context.router;e&&e.replaceWith(this.props.to)},t.prototype.render=function(){return null},t}(c["default"].Component);p.propTypes={to:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.object]).isRequired},p.contextTypes={router:u.router,serverRouter:s.PropTypes.object},t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(1),p=r(u),f=n(3),l=r(f),h=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.getChildContext=function(){return{serverRouter:this.props.context}},t.prototype.render=function(){var e=this.props,t=e.context,n=e.location,r=o(e,["context","location"]),i=function(e){t.setRedirect(e)};return p["default"].createElement(l["default"],c({action:"POP",location:n,onReplace:i,onPush:i},r))},t}(p["default"].Component);h.propTypes={context:u.PropTypes.object.isRequired,location:u.PropTypes.string.isRequired,children:u.PropTypes.oneOfType([u.PropTypes.func,u.PropTypes.node])},h.childContextTypes={serverRouter:u.PropTypes.object.isRequired},t["default"]=h},function(e,t){"use strict";t.__esModule=!0;var n=function(){},r=function(){var e=!1,t=null,r=[],o=e?n:function(e){t||(t=e)},i=e?n:function(e){return r.push({hasMissComponent:!1,matchesByIdentity:e})-1},a=e?n:function(e){r[e].hasMissComponent=!0},s=function(){e=!0;var n=r.some(function(e,t){return c(t)});return{redirect:t,missed:n}},c=function(e){var t=r[e];return 0===t.matchesByIdentity.length&&t.hasMissComponent};return{setRedirect:o,registerMatchContext:i,registerMissPresence:a,getResult:s,missedAtIndex:c}};t["default"]=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),i=n(5),a=(r(i),n(13)),s=r(a),c=n(6),u=n(4),p=n(7),f=r(p),l=n(12),h=n(11),y="popstate",d="hashchange",v=function(){try{return window.history.state||{}}catch(e){return{}}},m=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];l.canUseDOM?void 0:(0,s["default"])(!1);var t=window.history,n=(0,h.supportsHistory)(),r=!(0,h.supportsPopStateOnHashChange)(),i=e.basename,a=void 0===i?"":i,p=e.forceRefresh,m=void 0!==p&&p,b=e.getUserConfirmation,P=void 0===b?h.getConfirmation:b,g=e.keyLength,T=void 0===g?6:g,O=function(e){var t=e||{},n=t.key,r=t.state,i=window.location,s=i.pathname,c=i.search,p=i.hash,f=s+c+p;return a&&(f=(0,u.stripPrefix)(f,a)),o({},(0,u.parsePath)(f),{state:r,key:n})},w=function(){return Math.random().toString(36).substr(2,T)},x=(0,f["default"])(),R=function(e){o(F,e),F.length=t.length,x.notifyListeners(F.location,F.action)},_=function(e){void 0!==e.state&&M(O(e.state))},j=function(){M(O(v()))},E=!1,M=function(e){E?(E=!1,R()):!function(){var t="POP";x.confirmTransitionTo(e,t,P,function(n){n?R({action:t,location:e}):C(e)})}()},C=function(e){var t=F.location,n=S.indexOf(t.key);n===-1&&(n=0);var r=S.indexOf(e.key);r===-1&&(r=0);var o=n-r;o&&(E=!0,A(o))},k=O(v()),S=[k.key],q=function(e,r){var o="PUSH",i=(0,c.createLocation)(e,r,w());x.confirmTransitionTo(i,o,P,function(e){if(e){var r=a+(0,u.createPath)(i),s=i.key,c=i.state;if(n)if(t.pushState({key:s,state:c},null,r),m)window.location.href=r;else{var p=S.indexOf(F.location.key),f=S.slice(0,p===-1?0:p+1);f.push(i.key),S=f,R({action:o,location:i})}else window.location.href=r}})},L=function(e,r){var o="REPLACE",i=(0,c.createLocation)(e,r,w());x.confirmTransitionTo(i,o,P,function(e){if(e){var r=a+(0,u.createPath)(i),s=i.key,c=i.state;if(n)if(t.replaceState({key:s,state:c},null,r),m)window.location.replace(r);else{var p=S.indexOf(F.location.key);p!==-1&&(S[p]=i.key),R({action:o,location:i})}else window.location.replace(r)}})},A=function(e){t.go(e)},U=function(){return A(-1)},I=function(){return A(1)},H=0,W=function(e){H+=e,1===H?((0,h.addEventListener)(window,y,_),r&&(0,h.addEventListener)(window,d,j)):0===H&&((0,h.removeEventListener)(window,y,_),r&&(0,h.removeEventListener)(window,d,j))},N=!1,B=function(){var e=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],t=x.setPrompt(e);return N||(W(1),N=!0),function(){return N&&(N=!1,W(-1)),t()}},D=function(e){var t=x.appendListener(e);return W(1),function(){return W(-1),t()}},F={length:t.length,action:"POP",location:k,
push:q,replace:L,go:A,goBack:U,goForward:I,block:B,listen:D};return F};t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(5),a=(r(i),n(13)),s=r(a),c=n(6),u=n(4),p=n(7),f=r(p),l=n(12),h=n(11),y="hashchange",d={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+(0,u.stripLeadingSlash)(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:u.stripLeadingSlash,decodePath:u.addLeadingSlash},slash:{encodePath:u.addLeadingSlash,decodePath:u.addLeadingSlash}},v=function(){var e=window.location.href,t=e.indexOf("#");return t===-1?"":e.substring(t+1)},m=function(e){return window.location.hash=e},b=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)},P=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];l.canUseDOM?void 0:(0,s["default"])(!1);var t=window.history,n=((0,h.supportsGoWithoutReloadUsingHash)(),e.basename),r=void 0===n?"":n,i=e.getUserConfirmation,a=void 0===i?h.getConfirmation:i,p=e.hashType,P=void 0===p?"slash":p,g=d[P],T=g.encodePath,O=g.decodePath,w=function(){var e=O(v());return r&&(e=(0,u.stripPrefix)(e,r)),(0,u.parsePath)(e)},x=(0,f["default"])(),R=function(e){o($,e),$.length=t.length,x.notifyListeners($.location,$.action)},_=!1,j=null,E=function(){var e=v(),t=T(e);if(e!==t)b(t);else{var n=w(),r=$.location;if(!_&&(0,c.locationsAreEqual)(r,n))return;if(j===(0,u.createPath)(n))return;j=null,M(n)}},M=function(e){_?(_=!1,R()):!function(){var t="POP";x.confirmTransitionTo(e,t,a,function(n){n?R({action:t,location:e}):C(e)})}()},C=function(e){var t=$.location,n=L.lastIndexOf((0,u.createPath)(t));n===-1&&(n=0);var r=L.lastIndexOf((0,u.createPath)(e));r===-1&&(r=0);var o=n-r;o&&(_=!0,I(o))},k=v(),S=T(k);k!==S&&b(S);var q=w(),L=[(0,u.createPath)(q)],A=function(e,t){var n="PUSH",o=(0,c.createLocation)(e);x.confirmTransitionTo(o,n,a,function(e){if(e){var t=(0,u.createPath)(o),i=T(r+t),a=v()!==i;if(a){j=t,m(i);var s=L.lastIndexOf((0,u.createPath)($.location)),c=L.slice(0,s===-1?0:s+1);c.push(t),L=c,R({action:n,location:o})}else R()}})},U=function(e,t){var n="REPLACE",o=(0,c.createLocation)(e);x.confirmTransitionTo(o,n,a,function(e){if(e){var t=(0,u.createPath)(o),i=T(r+t),a=v()!==i;a&&(j=t,b(i));var s=L.indexOf((0,u.createPath)($.location));s!==-1&&(L[s]=t),R({action:n,location:o})}})},I=function(e){t.go(e)},H=function(){return I(-1)},W=function(){return I(1)},N=0,B=function(e){N+=e,1===N?(0,h.addEventListener)(window,y,E):0===N&&(0,h.removeEventListener)(window,y,E)},D=!1,F=function(){var e=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],t=x.setPrompt(e);return D||(B(1),D=!0),function(){return D&&(D=!1,B(-1)),t()}},Q=function(e){var t=x.appendListener(e);return B(1),function(){return B(-1),t()}},$={length:t.length,action:"POP",location:q,push:A,replace:U,go:I,goBack:H,goForward:W,block:F,listen:Q};return $};t["default"]=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),i=n(5),a=(r(i),n(6)),s=n(7),c=r(s),u=function(e,t,n){return Math.min(Math.max(e,t),n)},p=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.getUserConfirmation,n=e.initialEntries,r=void 0===n?["/"]:n,i=e.initialIndex,s=void 0===i?0:i,p=e.keyLength,f=void 0===p?6:p,l=(0,c["default"])(),h=function(e){o(R,e),R.length=R.entries.length,l.notifyListeners(R.location,R.action)},y=function(){return Math.random().toString(36).substr(2,f)},d=u(s,0,r.length-1),v=r.map(function(e,t){return"string"==typeof e?(0,a.createLocation)(e,t?y():void 0):e}),m=function(e,n){var r="PUSH",o=(0,a.createLocation)(e,n,y());l.confirmTransitionTo(o,r,t,function(e){if(e){var t=R.index,n=t+1,i=R.entries.slice(0);i.length>n?i.splice(n,i.length-n,o):i.push(o),h({action:r,location:o,index:n,entries:i})}})},b=function(e,n){var r="REPLACE",o=(0,a.createLocation)(e,n,y());l.confirmTransitionTo(o,r,t,function(e){e&&(R.entries[R.index]=o,h({action:r,location:o}))})},P=function(e){var n=u(R.index+e,0,R.entries.length-1),r="POP",o=R.entries[n];l.confirmTransitionTo(o,r,t,function(e){e?h({action:r,location:o,index:n}):h()})},g=function(){return P(-1)},T=function(){return P(1)},O=function(e){var t=R.index+e;return t>=0&&t<R.entries.length},w=function(){var e=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];return l.setPrompt(e)},x=function(e){return l.appendListener(e)},R={length:v.length,action:"POP",location:v[d],index:d,entries:v,push:m,replace:b,go:P,goBack:g,goForward:T,canGo:O,block:w,listen:x};return R};t["default"]=p},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,s=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var u in r)o.call(r,u)&&(s[u]=r[u]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var p=0;p<a.length;p++)i.call(r,a[p])&&(s[a[p]]=r[a[p]])}}return s}},function(e,t,n){function r(e){for(var t,n=[],r=0,o=0,i="";null!=(t=b.exec(e));){var a=t[0],s=t[1],c=t.index;if(i+=e.slice(o,c),o=c+a.length,s)i+=s[1];else{var p=e[o],f=t[2],l=t[3],h=t[4],y=t[5],d=t[6],v=t[7];i&&(n.push(i),i="");var m=null!=f&&null!=p&&p!==f,P="+"===d||"*"===d,g="?"===d||"*"===d,T=t[2]||"/",O=h||y||(v?".*":"[^"+T+"]+?");n.push({name:l||r++,prefix:f||"",delimiter:T,optional:g,repeat:P,partial:m,asterisk:!!v,pattern:u(O)})}}return o<e.length&&(i+=e.substr(o)),i&&n.push(i),n}function o(e){return s(r(e))}function i(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function a(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function s(e){for(var t=new Array(e.length),n=0;n<e.length;n++)"object"==typeof e[n]&&(t[n]=new RegExp("^(?:"+e[n].pattern+")$"));return function(n,r){for(var o="",s=n||{},c=r||{},u=c.pretty?i:encodeURIComponent,p=0;p<e.length;p++){var f=e[p];if("string"!=typeof f){var l,h=s[f.name];if(null==h){if(f.optional){f.partial&&(o+=f.prefix);continue}throw new TypeError('Expected "'+f.name+'" to be defined')}if(m(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 y=0;y<h.length;y++){if(l=u(h[y]),!t[p].test(l))throw new TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(l)+"`");o+=(0===y?f.prefix:f.delimiter)+l}}else{if(l=f.asterisk?a(h):u(h),!t[p].test(l))throw new TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+l+'"');o+=f.prefix+l}}else o+=f}return o}}function c(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function u(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function p(e,t){return e.keys=t,e}function f(e){return e.sensitive?"":"i"}function l(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return p(e,t)}function h(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(v(e[o],t,n).source);var i=new RegExp("(?:"+r.join("|")+")",f(n));return p(i,t)}function y(e,t,n){for(var o=r(e),i=d(o,n),a=0;a<o.length;a++)"string"!=typeof o[a]&&t.push(o[a]);return p(i,t)}function d(e,t){t=t||{};for(var n=t.strict,r=t.end!==!1,o="",i=e[e.length-1],a="string"==typeof i&&/\/$/.test(i),s=0;s<e.length;s++){var u=e[s];if("string"==typeof u)o+=c(u);else{var p=c(u.prefix),l="(?:"+u.pattern+")";u.repeat&&(l+="(?:"+p+l+")*"),l=u.optional?u.partial?p+"("+l+")?":"(?:"+p+"("+l+"))?":p+"("+l+")",o+=l}}return n||(o=(a?o.slice(0,-2):o)+"(?:\\/(?=$))?"),o+=r?"$":n&&a?"":"(?=\\/|$)",new RegExp("^"+o,f(t))}function v(e,t,n){return t=t||[],m(t)?n||(n={}):(n=t,t=[]),e instanceof RegExp?l(e,t):m(e)?h(e,t,n):y(e,t,n)}var m=n(28);e.exports=v,e.exports.parse=r,e.exports.compile=o,e.exports.tokensToFunction=s,e.exports.tokensToRegExp=d;var b=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(e,t,n){"use strict";function r(e,t){return t.encode?t.strict?o(e):encodeURIComponent(e):e}var o=n(36),i=n(29);t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e){var t=Object.create(null);return"string"!=typeof e?t:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var n=e.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),void 0===t[r]?t[r]=o:Array.isArray(t[r])?t[r].push(o):t[r]=[t[r],o]}),t):t},t.stringify=function(e,t){var n={encode:!0,strict:!0};return t=i(n,t),e?Object.keys(e).sort().map(function(n){var o=e[n];if(void 0===o)return"";if(null===o)return r(n,t);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(e){void 0!==e&&(null===e?i.push(r(n,t)):i.push(r(n,t)+"="+r(e,t)))}),i.join("&")}return r(n,t)+"="+r(o,t)}).filter(function(e){return e.length>0}).join("&"):""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}t.__esModule=!0;var i=n(1),a=r(i),s=n(25),c=r(s),u=n(8),p=r(u),f=function(e){var t=e.children,n=o(e,["children"]);return a["default"].createElement(p["default"],{children:t,createHistory:c["default"],historyOptions:n})};f.propTypes={children:i.PropTypes.func.isRequired,basename:i.PropTypes.string,forceRefresh:i.PropTypes.bool,getUserConfirmation:i.PropTypes.func,keyLength:i.PropTypes.number},t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}t.__esModule=!0;var i=n(1),a=r(i),s=n(26),c=r(s),u=n(8),p=r(u),f=function(e){var t=e.children,n=o(e,["children"]);return a["default"].createElement(p["default"],{children:t,createHistory:c["default"],historyOptions:n})};f.propTypes={children:i.PropTypes.func.isRequired,basename:i.PropTypes.string,getUserConfirmation:i.PropTypes.func,hashType:i.PropTypes.oneOf(["hashbang","noslash","slash"])},t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}t.__esModule=!0;var i=n(1),a=r(i),s=n(27),c=r(s),u=n(8),p=r(u),f=function(e){var t=e.children,n=o(e,["children"]);return a["default"].createElement(p["default"],{children:t,createHistory:c["default"],historyOptions:n})};f.propTypes={children:i.PropTypes.func.isRequired,getUserConfirmation:i.PropTypes.func,initialEntries:i.PropTypes.array,initialIndex:i.PropTypes.number,keyLength:i.PropTypes.number},t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(1),c=r(s),u=n(14),p=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.block=function(){this.teardownPrompt||(this.teardownPrompt=this.context.history.block(this.props.message))},t.prototype.unblock=function(){this.teardownPrompt&&(this.teardownPrompt(),this.teardownPrompt=null)},t.prototype.componentWillMount=function(){this.props.when&&this.block()},t.prototype.componentWillReceiveProps=function(e){e.when?this.block():this.unblock()},t.prototype.componentWillUnmount=function(){this.unblock()},t.prototype.render=function(){return null},t}(c["default"].Component);p.contextTypes={history:u.historyContext.isRequired},p.propTypes={when:s.PropTypes.bool,message:s.PropTypes.oneOfType([s.PropTypes.func,s.PropTypes.string]).isRequired},p.defaultProps={when:!0},t["default"]=p},function(e,t){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}}])});
!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){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.propTypes=e.createServerRenderContext=e.matchPattern=e.StaticRouter=e.ServerRouter=e.MemoryRouter=e.HashRouter=e.BrowserRouter=e.Redirect=e.NavigationPrompt=e.Miss=e.Match=e.Link=void 0;var i=n(18),a=o(i),c=n(20),u=o(c),s=n(22),f=o(s),l=n(41),p=o(l),h=n(23),d=o(h),y=n(16),v=o(y),b=n(17),m=o(b),g=n(21),P=o(g),O=n(24),w=o(O),x=n(3),_=o(x),T=n(12),j=o(T),R=n(25),E=o(R),C=n(2),M=r(C);e.Link=a["default"],e.Match=u["default"],e.Miss=f["default"],e.NavigationPrompt=p["default"],e.Redirect=d["default"],e.BrowserRouter=v["default"],e.HashRouter=m["default"],e.MemoryRouter=P["default"],e.ServerRouter=w["default"],e.StaticRouter=_["default"],e.matchPattern=j["default"],e.createServerRenderContext=E["default"],e.propTypes=M},function(e,n){e.exports=t},function(t,e,n){"use strict";e.__esModule=!0,e.routerContext=e.location=e.history=e.matchContext=e.action=void 0;var r=n(1);e.action=r.PropTypes.oneOf(["PUSH","REPLACE","POP"]),e.matchContext=r.PropTypes.shape({addMatch:r.PropTypes.func.isRequired,removeMatch:r.PropTypes.func.isRequired}),e.history=r.PropTypes.shape({listen:r.PropTypes.func.isRequired,listenBefore:r.PropTypes.func.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired}),e.location=r.PropTypes.shape({pathname:r.PropTypes.string.isRequired,search:r.PropTypes.string.isRequired,hash:r.PropTypes.string.isRequired,state:r.PropTypes.any,key:r.PropTypes.string}),e.routerContext=r.PropTypes.shape({transitionTo:r.PropTypes.func.isRequired,replaceWith:r.PropTypes.func.isRequired,blockTransitions:r.PropTypes.func.isRequired,createHref:r.PropTypes.func.isRequired})},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 c=n(1),u=r(c),s=n(32),f=n(11),l=r(f),p=n(8),h=n(19),d=n(2),y=function(t){return(0,s.stringify)(t).replace(/%20/g,"+")},v=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.transitionTo=function(t){r.props.onPush(r.createLocation(t))},r.replaceWith=function(t){r.props.onReplace(r.createLocation(t))},r.blockTransitions=function(t){r.props.blockTransitions(t)},r.createHref=function(t){var e=(0,h.createRouterPath)(t,r.props.stringifyQuery);return r.props.basename&&(e=r.props.basename+e),r.props.createHref(e)},r.state={location:null},a=n,i(r,a)}return a(e,t),e.prototype.createLocation=function(t){var e=this.props,n=e.parseQueryString,r=e.stringifyQuery;return(0,h.createRouterLocation)(t,n,r)},e.prototype.getRouterContext=function(){return{transitionTo:this.transitionTo,replaceWith:this.replaceWith,blockTransitions:this.blockTransitions,createHref:this.createHref}},e.prototype.getChildContext=function(){return{router:this.getRouterContext()}},e.prototype.componentWillMount=function(){this.setState({location:this.createLocation(this.props.location)})},e.prototype.componentWillReceiveProps=function(t){var e=this.createLocation(t.location);(0,h.locationsAreEqual)(this.state.location,e)||this.setState({location:e})},e.prototype.render=function(){var t=this.state.location,e=this.props,n=e.action,r=e.children;return u["default"].createElement(p.LocationBroadcast,{value:t},u["default"].createElement(l["default"],null,"function"==typeof r?r({action:n,location:t,router:this.getRouterContext()}):u["default"].Children.only(r)))},e}(u["default"].Component);v.defaultProps={stringifyQuery:y,parseQueryString:s.parse,createHref:function(t){return t}},v.childContextTypes={router:d.routerContext.isRequired},e["default"]=v},function(t,e,n){"use strict";e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 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?"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(5),a=(e.createLocation=function(t,e,n){var r=void 0;return"string"==typeof t?(r=(0,i.parsePath)(t),r.state=e):(r=o({},t),r.pathname||(r.pathname="/"),r.search&&"?"!==r.search.charAt(0)&&(r.search="?"+r.search),r.hash&&"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash),void 0!==e&&void 0===r.state&&(r.state=e)),r.key=n,r},function c(t,e){if(null==t)return t==e;var n="undefined"==typeof t?"undefined":r(t),o="undefined"==typeof e?"undefined":r(e);if(n!==o)return!1;if(Array.isArray(t))return!(!Array.isArray(e)||t.length!==e.length)&&t.every(function(t,n){return c(t,e[n])});if("object"===n){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 t===e});e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&a(t.state,e.state)}},function(t,e){"use strict";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},e.stripPrefix=function(t,e){return 0===t.indexOf(e)?t.substr(e.length):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";var r=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],f=0;u=new Error(e.replace(/%s/g,function(){return s[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=r},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}}e.__esModule=!0,e.LocationSubscriber=e.LocationBroadcast=void 0;var o=n(1),i=r(o),a=n(35),c="location",u=function(t){var e=t.children,n=t.value;return i["default"].createElement(a.Broadcast,{channel:c,value:n,children:e})},s=function(t){var e=t.children;return i["default"].createElement(a.Subscriber,{channel:c,children:e})};e.LocationBroadcast=u,e.LocationSubscriber=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(7),i=(r(o),function(){var t=null,e=function(e){return t=e,function(){t===e&&(t=null)}},n=function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(i!==!1)}else o(!0)},r=[],o=function(t){return r.push(t),function(){r=r.filter(function(e){return e!==t})}},i=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.forEach(function(t){return t.apply(void 0,e)})};return{setPrompt:e,confirmTransitionTo:n,appendListener:o,notifyListeners:i}});e["default"]=i},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 c=n(1),u=r(c),s=n(15),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.getChildContext=function(){return{history:this.history}},e.prototype.setupHistory=function(t){var e=this,n=t.createHistory,r=t.historyOptions;this.history=n(r),this.unlisten=this.history.listen(function(){return e.forceUpdate()})},e.prototype.componentWillMount=function(){this.setupHistory(this.props)},e.prototype.componentWillReceiveProps=function(t){var e=this.props.historyOptions,n=t.historyOptions,r=!1;for(var o in n)if(n[o]!==e[o]){r=!0;break}r&&(this.unlisten(),this.setupHistory(t))},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.history,e=t.location,n=t.action;return this.props.children({history:t,location:e,action:n})},e}(u["default"].Component);f.propTypes={children:c.PropTypes.func.isRequired,createHistory:c.PropTypes.func.isRequired,historyOptions:c.PropTypes.object},f.childContextTypes={history:s.historyContext.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 c=n(1),u=r(c),s=n(2),f=function(t){function e(n){o(this,e);var r=i(this,t.call(this,n));return r.addMatch=function(t){r.matches.push(t)},r.removeMatch=function(t){r.matches.splice(r.matches.indexOf(t),1)},r.matches=[],r.subscribers=[],r.hasMatches=null,r.serverRouterIndex=null,r}return a(e,t),e.prototype.getChildContext=function(){var t=this;return{match:{addMatch:this.addMatch,removeMatch:this.removeMatch,matches:this.matches,parent:this.props.match,serverRouterIndex:this.serverRouterIndex,subscribe:function(e){return t.subscribers.push(e),function(){t.subscribers.splice(t.subscribers.indexOf(e),1)}}}}},e.prototype.componentDidUpdate=function(){this.notifySubscribers()},e.prototype.componentWillMount=function(){var t=this.context.serverRouter;t&&(this.serverRouterIndex=t.registerMatchContext(this.matches))},e.prototype.componentDidMount=function(){this.notifySubscribers()},e.prototype.notifySubscribers=function(){var t=this;if(this.subscribers.length){var e=this.hasMatches;this.hasMatches=0!==this.matches.length,this.hasMatches!==e&&this.subscribers.forEach(function(e){return e(t.hasMatches)})}},e.prototype.render=function(){return this.props.children},e}(u["default"].Component);f.childContextTypes={match:s.matchContext.isRequired},f.contextTypes={serverRouter:c.PropTypes.object},e["default"]=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(31),i=r(o),a={},c=function(t){var e=a[t];if(!e){var n=[],r=(0,i["default"])(t,n);e=a[t]={keys:n,regex:r}}return e},u=function(t,e){return t.split("/").slice(0,e.split("/").length).join("/")},s=function(t,e,n){return e.slice(1).reduce(function(t,e,r){return t[n[r].name]=e,t},{})},f=function(t,e,n,r){var o=!n&&"/"===t;if(o)return{params:null,isExact:"/"===e.pathname,pathname:"/"};!n&&r&&"/"!==t.charAt(0)&&(t=r.pathname+("/"!==r.pathname.charAt(r.pathname.length-1)?"/":"")+t);var i=c(t),a=n?e.pathname:u(e.pathname,t),f=i.regex.exec(a);if(f){var l=s(t,f,i.keys),p=e.pathname.split("/").length,h=t.split("/").length,d=p===h;return{params:l,isExact:d,pathname:a}}return null};e["default"]=f},function(t,e){"use strict";e.__esModule=!0;e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},e.getConfirmation=function(t,e){return e(window.confirm(t))},e.supportsHistory=function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)},e.supportsPopStateOnHashChange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},e.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1}},function(t,e){"use strict";e.__esModule=!0;e.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(t,e,n){"use strict";e.__esModule=!0,e.historyContext=e.location=e.action=void 0;var r=n(1),o=e.action=r.PropTypes.oneOf(["PUSH","REPLACE","POP"]),i=e.location=r.PropTypes.shape({pathname:r.PropTypes.string.isRequired,search:r.PropTypes.string.isRequired,hash:r.PropTypes.string.isRequired,state:r.PropTypes.object,key:r.PropTypes.string});e.historyContext=r.PropTypes.shape({action:o.isRequired,location:i.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired,goBack:r.PropTypes.func.isRequired,goForward:r.PropTypes.func.isRequired,canGo:r.PropTypes.func,block:r.PropTypes.func.isRequired})},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(1),c=r(a),u=n(36),s=r(u),f=n(3),l=r(f),p=function(t){var e=t.basename,n=t.forceRefresh,r=t.getUserConfirmation,a=t.keyLength,u=o(t,["basename","forceRefresh","getUserConfirmation","keyLength"]);return c["default"].createElement(s["default"],{basename:e,forceRefresh:n,getUserConfirmation:r,keyLength:a},function(t){var n=t.history,r=t.action,o=t.location;return c["default"].createElement(l["default"],i({action:r,location:o,basename:e,onPush:n.push,onReplace:n.replace,blockTransitions:n.block},u))})};e["default"]=p},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(1),c=r(a),u=n(37),s=r(u),f=n(3),l=r(f),p=function(t){var e=t.basename,n=t.getUserConfirmation,r=t.hashType,a=o(t,["basename","getUserConfirmation","hashType"]);return c["default"].createElement(s["default"],{basename:e,getUserConfirmation:n,hashType:r},function(t){var n=t.history,r=t.action,o=t.location;return c["default"].createElement(l["default"],i({action:r,location:o,basename:e,onPush:n.push,onReplace:n.replace,blockTransitions:n.block},a))})};e["default"]=p},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 c(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="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=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},f=n(1),l=r(f),p=n(8),h=n(2),d=function(t){function e(){var n,r,o;i(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=a(this,t.call.apply(t,[this].concat(u))),r.handleClick=function(t){r.props.onClick&&r.props.onClick(t),t.defaultPrevented||r.props.target||g(t)||!m(t)||(t.preventDefault(),r.context.router.transitionTo(r.props.to))},r.handleTransition=function(){r.context.router.transitionTo(r.props.to)},o=n,a(r,o)}return c(e,t),e.prototype.render=function(){var t=this;return l["default"].createElement(p.LocationSubscriber,null,function(e){var n=t.context.router,r=t.props,i=r.to,a=r.style,c=r.activeStyle,u=r.className,f=r.activeClassName,p=r.location,h=r.isActive,d=(r.activeOnlyWhenExact,o(r,["to","style","activeStyle","className","activeClassName","location","isActive","activeOnlyWhenExact"])),v=p||e,b=h(v,y(i),t.props);return"function"==typeof d.children?d.children({isActive:b,currentLocation:v,href:n?n.createHref(i):i,onClick:t.handleClick,transition:t.handleTransition}):l["default"].createElement("a",s({},d,{href:n?n.createHref(i):i,onClick:t.handleClick,style:b?s({},a,c):a,className:b?[u,f].join(" ").trim():u}))})},e}(l["default"].Component);d.defaultProps={activeOnlyWhenExact:!1,className:"",activeClassName:"",style:{},activeStyle:{},isActive:function(t,e,n){return v(e.pathname,t.pathname,n.activeOnlyWhenExact)&&b(e.query,t.query)}},d.contextTypes={router:h.routerContext};var y=function(t){return"object"===("undefined"==typeof t?"undefined":u(t))?t:{pathname:t}},v=function(t,e,n){return n?e===t:0===e.indexOf(t)},b=function(t,e){return null==e?null==t:null==t||P(t,e)},m=function(t){return 0===t.button},g=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},P=function O(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 O(t,e[n])});if("object"===("undefined"==typeof t?"undefined":u(t))){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))if(void 0===t[n]){if(void 0!==e[n])return!1}else{if(!Object.prototype.hasOwnProperty.call(e,n))return!1;if(!O(t[n],e[n]))return!1}return!0}return String(t)===String(e)};e["default"]=d},function(t,e,n){"use strict";e.__esModule=!0,e.createRouterPath=e.createRouterLocation=e.locationsAreEqual=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(38);Object.defineProperty(e,"locationsAreEqual",{enumerable:!0,get:function(){return o.locationsAreEqual}});var i=n(40);e.createRouterLocation=function(t,e,n){if("string"==typeof t){var r=(0,i.parsePath)(t);return r.query=""!==r.search?e(r.search):null,r}return{pathname:t.pathname||"",search:t.search||(t.query?"?"+n(t.query):""),hash:t.hash||"",state:t.state||null,query:t.query||(t.search?e(t.search):null)}},e.createRouterPath=function(t,e){return"string"==typeof t?t:(0,i.createPath)(r({},t,{search:t.search||(t.query?"?"+e(t.query):"")}))}},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 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},u=n(1),s=r(u),f=n(11),l=r(f),p=n(12),h=r(p),d=n(8),y=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.registerMatch=function(){var t=this.context.match,e=this.props.match;e&&t&&t.addMatch(e)},e.prototype.componentWillMount=function(){this.context.serverRouter&&this.registerMatch()},e.prototype.componentDidMount=function(){this.context.serverRouter||this.registerMatch()},e.prototype.componentDidUpdate=function(t){var e=this.context.match;e&&(t.match&&!this.props.match?e.removeMatch(t.match):!t.match&&this.props.match&&e.addMatch(this.props.match))},e.prototype.componentWillUnmount=function(){this.props.match&&this.context.match.removeMatch(this.props.match)},e.prototype.render=function(){return s["default"].Children.only(this.props.children)},e}(s["default"].Component);y.contextTypes={match:u.PropTypes.object,serverRouter:u.PropTypes.object};var v=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.render=function(){var t=this;return s["default"].createElement(d.LocationSubscriber,null,function(e){var n=t.props,r=n.children,o=n.render,i=n.component,a=n.pattern,u=n.location,f=n.exactly,p=t.context.match,d=u||e,v=p&&p.parent,b=(0,h["default"])(a,d,f,v),m=c({},b,{location:d,pattern:a});return s["default"].createElement(y,{match:b},s["default"].createElement(l["default"],{match:b},r?r(c({matched:!!b},m)):b?o?o(m):s["default"].createElement(i,m):null))})},e}(s["default"].Component);v.defaultProps={exactly:!1},v.contextTypes={location:u.PropTypes.object,match:u.PropTypes.object},e["default"]=v},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(1),c=r(a),u=n(39),s=r(u),f=n(3),l=r(f),p=function(t){var e=t.getUserConfirmation,n=t.initialEntries,r=t.initialIndex,a=t.keyLength,u=o(t,["getUserConfirmation","initialEntries","initialIndex","keyLength"]);return c["default"].createElement(s["default"],{getUserConfirmation:e,initialEntries:n,initialIndex:r,keyLength:a},function(t){var e=t.history,n=t.action,r=t.location;return c["default"].createElement(l["default"],i({action:n,location:r,onPush:e.push,onReplace:e.replace,blockTransitions:e.block},u))})};e["default"]=p},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 c=n(1),u=r(c),s=(n(2),function(t){function e(n,r){o(this,e);var a=i(this,t.call(this,n,r));return r.match&&!r.serverRouter&&(a.unsubscribe=a.context.match.subscribe(function(t){a.setState({noMatchesInContext:!t})})),r.serverRouter&&r.serverRouter.registerMissPresence(r.match.serverRouterIndex),a.state={noMatchesInContext:!1},a}return a(e,t),e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function n(){var t=this.props,n=t.render,e=t.component,r=this.state.noMatchesInContext,o=this.props.location,i=o||this.context.location,a=this.context,c=a.serverRouter,s=a.match,f=c&&c.missedAtIndex(s.serverRouterIndex);return r||f?n?n({location:i}):u["default"].createElement(e,{location:i}):null},e}(u["default"].Component));s.contextTypes={match:c.PropTypes.object,location:c.PropTypes.object,serverRouter:c.PropTypes.object},e["default"]=s},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 c=n(1),u=r(c),s=n(2),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){this.context.serverRouter&&this.redirect()},e.prototype.componentDidMount=function(){this.redirect()},e.prototype.redirect=function(){var t=this.context.router;t&&t.replaceWith(this.props.to)},e.prototype.render=function(){return null},e}(u["default"].Component);f.contextTypes={router:s.routerContext,serverRouter:c.PropTypes.object},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 c(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},s=n(1),f=r(s),l=n(3),p=r(l),h=function(t){function e(){return i(this,e),a(this,t.apply(this,arguments))}return c(e,t),e.prototype.getChildContext=function(){return{serverRouter:this.props.context}},e.prototype.render=function(){var t=this.props,e=t.context,n=t.location,r=o(t,["context","location"]),i=function(t){e.setRedirect(t)};return f["default"].createElement(p["default"],u({action:"POP",location:n,onReplace:i,onPush:i},r))},e}(f["default"].Component);h.childContextTypes={serverRouter:s.PropTypes.object.isRequired},e["default"]=h},function(t,e){"use strict";e.__esModule=!0;var n=function(){},r=function(){var t=!1,e=null,r=[],o=t?n:function(t){e||(e=t)},i=t?n:function(t){return r.push({hasMissComponent:!1,matchesByIdentity:t})-1},a=t?n:function(t){r[t].hasMissComponent=!0},c=function(){t=!0;var n=r.some(function(t,e){return u(e)});return{redirect:e,missed:n}},u=function(t){var e=r[t];return 0===e.matchesByIdentity.length&&e.hasMissComponent};return{setRedirect:o,registerMatchContext:i,registerMissPresence:a,getResult:c,missedAtIndex:u}};e["default"]=r},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?"symbol":typeof t},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(7),a=(r(i),n(6)),c=r(a),u=n(4),s=n(5),f=n(9),l=r(f),p=n(14),h=n(13),d="popstate",y="hashchange",v=function(){try{return window.history.state||{}}catch(t){return{}}},b=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];p.canUseDOM?void 0:(0,c["default"])(!1);var e=window.history,n=(0,h.supportsHistory)(),r=!(0,h.supportsPopStateOnHashChange)(),i=t.basename,a=void 0===i?"":i,f=t.forceRefresh,b=void 0!==f&&f,m=t.getUserConfirmation,g=void 0===m?h.getConfirmation:m,P=t.keyLength,O=void 0===P?6:P,w=function(t){var e=t||{},n=e.key,r=e.state,i=window.location,c=i.pathname,u=i.search,f=i.hash,l=c+u+f;return a&&(l=(0,s.stripPrefix)(l,a)),o({},(0,s.parsePath)(l),{state:r,key:n})},x=function(){return Math.random().toString(36).substr(2,O)},_=(0,l["default"])(),T=function(t){o($,t),$.length=e.length,_.notifyListeners($.location,$.action)},j=function(t){void 0!==t.state&&C(w(t.state))},R=function(){C(w(v()))},E=!1,C=function(t){E?(E=!1,T()):!function(){var e="POP";_.confirmTransitionTo(t,e,g,function(n){n?T({action:e,location:t}):M(t)})}()},M=function(t){var e=$.location,n=k.indexOf(e.key);n===-1&&(n=0);var r=k.indexOf(t.key);r===-1&&(r=0);var o=n-r;o&&(E=!0,A(o))},S=w(v()),k=[S.key],L=function(t,r){var o="PUSH",i=(0,u.createLocation)(t,r,x());_.confirmTransitionTo(i,o,g,function(t){if(t){var r=a+(0,s.createPath)(i),c=i.key,u=i.state;if(n)if(e.pushState({key:c,state:u},null,r),b)window.location.href=r;else{var f=k.indexOf($.location.key),l=k.slice(0,f===-1?0:f+1);l.push(i.key),k=l,T({action:o,location:i})}else window.location.href=r}})},q=function(t,r){var o="REPLACE",i=(0,u.createLocation)(t,r,x());_.confirmTransitionTo(i,o,g,function(t){if(t){var r=a+(0,s.createPath)(i),c=i.key,u=i.state;if(n)if(e.replaceState({key:c,state:u},null,r),b)window.location.replace(r);else{var f=k.indexOf($.location.key);f!==-1&&(k[f]=i.key),T({action:o,location:i})}else window.location.replace(r)}})},A=function(t){e.go(t)},U=function(){return A(-1)},I=function(){return A(1)},H=0,W=function(t){H+=t,1===H?((0,h.addEventListener)(window,d,j),r&&(0,h.addEventListener)(window,y,R)):0===H&&((0,h.removeEventListener)(window,d,j),r&&(0,h.removeEventListener)(window,y,R))},B=!1,N=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=_.setPrompt(t);return B||(W(1),B=!0),function(){return B&&(B=!1,W(-1)),e()}},D=function(t){var e=_.appendListener(t);return W(1),function(){return W(-1),e()}},$={length:e.length,action:"POP",location:S,push:L,replace:q,go:A,goBack:U,goForward:I,block:N,listen:D};return $};e["default"]=b},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!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(7),a=(r(i),n(6)),c=r(a),u=n(4),s=n(5),f=n(9),l=r(f),p=n(14),h=n(13),d="hashchange",y={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+(0,
s.stripLeadingSlash)(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:s.stripLeadingSlash,decodePath:s.addLeadingSlash},slash:{encodePath:s.addLeadingSlash,decodePath:s.addLeadingSlash}},v=function(){var t=window.location.href,e=t.indexOf("#");return e===-1?"":t.substring(e+1)},b=function(t){return window.location.hash=t},m=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},g=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];p.canUseDOM?void 0:(0,c["default"])(!1);var e=window.history,n=((0,h.supportsGoWithoutReloadUsingHash)(),t.basename),r=void 0===n?"":n,i=t.getUserConfirmation,a=void 0===i?h.getConfirmation:i,f=t.hashType,g=void 0===f?"slash":f,P=y[g],O=P.encodePath,w=P.decodePath,x=function(){var t=w(v());return r&&(t=(0,s.stripPrefix)(t,r)),(0,s.parsePath)(t)},_=(0,l["default"])(),T=function(t){o(Q,t),Q.length=e.length,_.notifyListeners(Q.location,Q.action)},j=!1,R=null,E=function(){var t=v(),e=O(t);if(t!==e)m(e);else{var n=x(),r=Q.location;if(!j&&(0,u.locationsAreEqual)(r,n))return;if(R===(0,s.createPath)(n))return;R=null,C(n)}},C=function(t){j?(j=!1,T()):!function(){var e="POP";_.confirmTransitionTo(t,e,a,function(n){n?T({action:e,location:t}):M(t)})}()},M=function(t){var e=Q.location,n=q.lastIndexOf((0,s.createPath)(e));n===-1&&(n=0);var r=q.lastIndexOf((0,s.createPath)(t));r===-1&&(r=0);var o=n-r;o&&(j=!0,I(o))},S=v(),k=O(S);S!==k&&m(k);var L=x(),q=[(0,s.createPath)(L)],A=function(t,e){var n="PUSH",o=(0,u.createLocation)(t);_.confirmTransitionTo(o,n,a,function(t){if(t){var e=(0,s.createPath)(o),i=O(r+e),a=v()!==i;if(a){R=e,b(i);var c=q.lastIndexOf((0,s.createPath)(Q.location)),u=q.slice(0,c===-1?0:c+1);u.push(e),q=u,T({action:n,location:o})}else T()}})},U=function(t,e){var n="REPLACE",o=(0,u.createLocation)(t);_.confirmTransitionTo(o,n,a,function(t){if(t){var e=(0,s.createPath)(o),i=O(r+e),a=v()!==i;a&&(R=e,m(i));var c=q.indexOf((0,s.createPath)(Q.location));c!==-1&&(q[c]=e),T({action:n,location:o})}})},I=function(t){e.go(t)},H=function(){return I(-1)},W=function(){return I(1)},B=0,N=function(t){B+=t,1===B?(0,h.addEventListener)(window,d,E):0===B&&(0,h.removeEventListener)(window,d,E)},D=!1,$=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=_.setPrompt(t);return D||(N(1),D=!0),function(){return D&&(D=!1,N(-1)),e()}},F=function(t){var e=_.appendListener(t);return N(1),function(){return N(-1),e()}},Q={length:e.length,action:"POP",location:L,push:A,replace:U,go:I,goBack:H,goForward:W,block:$,listen:F};return Q};e["default"]=g},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?"symbol":typeof t},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(7),a=(r(i),n(4)),c=n(9),u=r(c),s=function(t,e,n){return Math.min(Math.max(t,e),n)},f=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,i=t.initialIndex,c=void 0===i?0:i,f=t.keyLength,l=void 0===f?6:f,p=(0,u["default"])(),h=function(t){o(T,t),T.length=T.entries.length,p.notifyListeners(T.location,T.action)},d=function(){return Math.random().toString(36).substr(2,l)},y=s(c,0,r.length-1),v=r.map(function(t,e){return"string"==typeof t?(0,a.createLocation)(t,e?d():void 0):t}),b=function(t,n){var r="PUSH",o=(0,a.createLocation)(t,n,d());p.confirmTransitionTo(o,r,e,function(t){if(t){var e=T.index,n=e+1,i=T.entries.slice(0);i.length>n?i.splice(n,i.length-n,o):i.push(o),h({action:r,location:o,index:n,entries:i})}})},m=function(t,n){var r="REPLACE",o=(0,a.createLocation)(t,n,d());p.confirmTransitionTo(o,r,e,function(t){t&&(T.entries[T.index]=o,h({action:r,location:o}))})},g=function(t){var n=s(T.index+t,0,T.entries.length-1),r="POP",o=T.entries[n];p.confirmTransitionTo(o,r,e,function(t){t?h({action:r,location:o,index:n}):h()})},P=function(){return g(-1)},O=function(){return g(1)},w=function(t){var e=T.index+t;return e>=0&&e<T.entries.length},x=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];return p.setPrompt(t)},_=function(t){return p.appendListener(t)},T={length:v.length,action:"POP",location:v[y],index:y,entries:v,push:b,replace:m,go:g,goBack:P,goForward:O,canGo:w,block:x,listen:_};return T};e["default"]=f},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,a,c=n(t),u=1;u<arguments.length;u++){r=Object(arguments[u]);for(var s in r)o.call(r,s)&&(c[s]=r[s]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var f=0;f<a.length;f++)i.call(r,a[f])&&(c[a[f]]=r[a[f]])}}return c}},function(t,e,n){function r(t){for(var e,n=[],r=0,o=0,i="";null!=(e=m.exec(t));){var a=e[0],c=e[1],u=e.index;if(i+=t.slice(o,u),o=u+a.length,c)i+=c[1];else{var f=t[o],l=e[2],p=e[3],h=e[4],d=e[5],y=e[6],v=e[7];i&&(n.push(i),i="");var b=null!=l&&null!=f&&f!==l,g="+"===y||"*"===y,P="?"===y||"*"===y,O=e[2]||"/",w=h||d||(v?".*":"[^"+O+"]+?");n.push({name:p||r++,prefix:l||"",delimiter:O,optional:P,repeat:g,partial:b,asterisk:!!v,pattern:s(w)})}}return o<t.length&&(i+=t.substr(o)),i&&n.push(i),n}function o(t){return c(r(t))}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 c(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="",c=n||{},u=r||{},s=u.pretty?i:encodeURIComponent,f=0;f<t.length;f++){var l=t[f];if("string"!=typeof l){var p,h=c[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(b(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(p=s(h[d]),!e[f].test(p))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===d?l.prefix:l.delimiter)+p}}else{if(p=l.asterisk?a(h):s(h),!e[f].test(p))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+p+'"');o+=l.prefix+p}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function f(t,e){return t.keys=e,t}function l(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 f(t,e)}function h(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(v(t[o],e,n).source);var i=new RegExp("(?:"+r.join("|")+")",l(n));return f(i,e)}function d(t,e,n){for(var o=r(t),i=y(o,n),a=0;a<o.length;a++)"string"!=typeof o[a]&&e.push(o[a]);return f(i,e)}function y(t,e){e=e||{};for(var n=e.strict,r=e.end!==!1,o="",i=t[t.length-1],a="string"==typeof i&&/\/$/.test(i),c=0;c<t.length;c++){var s=t[c];if("string"==typeof s)o+=u(s);else{var f=u(s.prefix),p="(?:"+s.pattern+")";s.repeat&&(p+="(?:"+f+p+")*"),p=s.optional?s.partial?f+"("+p+")?":"(?:"+f+"("+p+"))?":f+"("+p+")",o+=p}}return n||(o=(a?o.slice(0,-2):o)+"(?:\\/(?=$))?"),o+=r?"$":n&&a?"":"(?=\\/|$)",new RegExp("^"+o,l(e))}function v(t,e,n){return e=e||[],b(e)?n||(n={}):(n=e,e=[]),t instanceof RegExp?p(t,e):b(t)?h(t,e,n):d(t,e,n)}var b=n(29);t.exports=v,t.exports.parse=r,t.exports.compile=o,t.exports.tokensToFunction=c,t.exports.tokensToRegExp=y;var m=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(t,e,n){"use strict";function r(t,e){return e.encode?e.strict?o(t):encodeURIComponent(t):t}var o=n(42),i=n(30);e.extract=function(t){return t.split("?")[1]||""},e.parse=function(t){var e=Object.create(null);return"string"!=typeof t?e:(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e},e.stringify=function(t,e){var n={encode:!0,strict:!0};return e=i(n,e),t?Object.keys(t).sort().map(function(n){var o=t[n];if(void 0===o)return"";if(null===o)return r(n,e);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(t){void 0!==t&&(null===t?i.push(r(n,e)):i.push(r(n,e)+"="+r(t,e)))}),i.join("&")}return r(n,e)+"="+r(o,e)}).filter(function(t){return t.length>0}).join("&"):""}},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 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},u=n(6),s=r(u),f=n(1),l=r(f),p=function(t){var e=[],n=t;return{publish:function(t){n=t,e.forEach(function(t){return t(n)})},subscribe:function(t){return e.push(t),t(n),function(){return e=e.filter(function(e){return e!==t})}}}},h=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.broadcast=p(r.props.value),a=n,i(r,a)}return a(e,t),e.prototype.getBroadcastsContext=function(){var t,e=this.props.channel,n=this.context.broadcasts;return c({},n,(t={},t[e]=this.broadcast.subscribe,t))},e.prototype.getChildContext=function(){return{broadcasts:this.getBroadcastsContext()}},e.prototype.componentWillReceiveProps=function(t){this.props.channel!==t.channel?(0,s["default"])(!1):void 0,this.props.value!==t.value&&this.broadcast.publish(t.value)},e.prototype.render=function(){return l["default"].Children.only(this.props.children)},e}(l["default"].Component);h.contextTypes={broadcasts:f.PropTypes.object},h.childContextTypes={broadcasts:f.PropTypes.object.isRequired},e["default"]=h},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 c=n(6),u=r(c),s=n(1),f=r(s),l=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.state={value:null},a=n,i(r,a)}return a(e,t),e.prototype.componentWillMount=function(){var t=this,e=this.props.channel;if(this.context.broadcasts){var n=this.context.broadcasts[e];"function"!=typeof n?(0,u["default"])(!1):void 0,this.unsubscribe=n(function(e){t.setState({value:e})})}},e.prototype.componentWillUnmount=function(){this.unsubscribe()},e.prototype.render=function(){return this.props.children(this.state.value)},e}(f["default"].Component);l.contextTypes={broadcasts:f["default"].PropTypes.object},e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.Subscriber=e.Broadcast=void 0;var o=n(33),i=r(o),a=n(34),c=r(a);e.Broadcast=i["default"],e.Subscriber=c["default"]},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=n(1),a=r(i),c=n(26),u=r(c),s=n(10),f=r(s),l=function(t){var e=t.children,n=o(t,["children"]);return a["default"].createElement(f["default"],{children:e,createHistory:u["default"],historyOptions:n})};l.propTypes={children:i.PropTypes.func.isRequired,basename:i.PropTypes.string,forceRefresh:i.PropTypes.bool,getUserConfirmation:i.PropTypes.func,keyLength:i.PropTypes.number},e["default"]=l},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=n(1),a=r(i),c=n(27),u=r(c),s=n(10),f=r(s),l=function(t){var e=t.children,n=o(t,["children"]);return a["default"].createElement(f["default"],{children:e,createHistory:u["default"],historyOptions:n})};l.propTypes={children:i.PropTypes.func.isRequired,basename:i.PropTypes.string,getUserConfirmation:i.PropTypes.func,hashType:i.PropTypes.oneOf(["hashbang","noslash","slash"])},e["default"]=l},function(t,e,n){"use strict";e.__esModule=!0;var r=n(4);Object.defineProperty(e,"createLocation",{enumerable:!0,get:function(){return r.createLocation}}),Object.defineProperty(e,"locationsAreEqual",{enumerable:!0,get:function(){return r.locationsAreEqual}})},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=n(1),a=r(i),c=n(28),u=r(c),s=n(10),f=r(s),l=function(t){var e=t.children,n=o(t,["children"]);return a["default"].createElement(f["default"],{children:e,createHistory:u["default"],historyOptions:n})};l.propTypes={children:i.PropTypes.func.isRequired,getUserConfirmation:i.PropTypes.func,initialEntries:i.PropTypes.array,initialIndex:i.PropTypes.number,keyLength:i.PropTypes.number},e["default"]=l},function(t,e,n){"use strict";e.__esModule=!0;var r=n(5);Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return r.parsePath}}),Object.defineProperty(e,"createPath",{enumerable:!0,get:function(){return r.createPath}})},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 c=n(1),u=r(c),s=n(15),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.block=function(){this.teardownPrompt||(this.teardownPrompt=this.context.history.block(this.props.message))},e.prototype.unblock=function(){this.teardownPrompt&&(this.teardownPrompt(),this.teardownPrompt=null)},e.prototype.componentWillMount=function(){this.props.when&&this.block()},e.prototype.componentWillReceiveProps=function(t){t.when?this.block():this.unblock()},e.prototype.componentWillUnmount=function(){this.unblock()},e.prototype.render=function(){return null},e}(u["default"].Component);f.contextTypes={history:s.historyContext.isRequired},f.propTypes={when:c.PropTypes.bool,message:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string]).isRequired},f.defaultProps={when:!0},e["default"]=f},function(t,e){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}}])});

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