react-router
Advanced tools
Comparing version 4.0.0-2 to 4.0.0-alpha.3
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
@@ -44,2 +42,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
location: location, | ||
basename: basename, | ||
onPush: history.push, | ||
@@ -46,0 +45,0 @@ onReplace: history.replace, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
var k = function k() {}; | ||
@@ -7,0 +5,0 @@ |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
@@ -44,2 +42,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
location: location, | ||
basename: basename, | ||
onPush: history.push, | ||
@@ -46,0 +45,0 @@ onReplace: history.replace, |
16
index.js
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.matchPattern = exports.StaticRouter = exports.ServerRouter = exports.MemoryRouter = exports.HashRouter = exports.BrowserRouter = exports.Redirect = exports.NavigationPrompt = exports.Miss = exports.Match = exports.Link = undefined; | ||
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; | ||
@@ -52,2 +50,6 @@ var _Link2 = require('./Link'); | ||
var _createServerRenderContext2 = require('./createServerRenderContext'); | ||
var _createServerRenderContext3 = _interopRequireDefault(_createServerRenderContext2); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -74,2 +76,6 @@ | ||
exports.matchPattern = _matchPattern3.default; | ||
exports.matchPattern = _matchPattern3.default; | ||
// Util for server rendering context | ||
exports.createServerRenderContext = _createServerRenderContext3.default; |
74
Link.js
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
@@ -11,4 +9,2 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require('react'); | ||
@@ -34,4 +30,2 @@ | ||
function Link() { | ||
var _ref; | ||
var _temp, _this, _ret; | ||
@@ -45,3 +39,3 @@ | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Link.__proto__ || Object.getPrototypeOf(Link)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (event) { | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) { | ||
if (_this.props.onClick) _this.props.onClick(event); | ||
@@ -55,38 +49,49 @@ | ||
} | ||
}, _this.handleTransition = function () { | ||
_this.context.router.transitionTo(_this.props.to); | ||
}, _temp), _possibleConstructorReturn(_this, _ret); | ||
} | ||
_createClass(Link, [{ | ||
key: 'render', | ||
value: 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; | ||
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 rest = _objectWithoutProperties(_props, ['to', 'style', 'activeStyle', 'className', 'activeClassName', 'location', 'isActive', 'activeOnlyWhenExact']); | ||
var rest = _objectWithoutProperties(_props, ['to', 'style', 'activeStyle', 'className', 'activeClassName', 'location', 'isActive', 'activeOnlyWhenExact']); | ||
var currentLocation = location || this.context.location; | ||
var currentLocation = location || this.context.location; | ||
var isActive = getIsActive(currentLocation, createLocationDescriptor(to), this.props); | ||
var isActive = getIsActive(currentLocation, createLocationDescriptor(to), this.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, { | ||
// 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, | ||
style: isActive ? _extends({}, style, activeStyle) : style, | ||
className: isActive ? [className, activeClassName].join(' ').trim() : className | ||
})); | ||
transition: this.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 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 | ||
})); | ||
}; | ||
return Link; | ||
@@ -105,2 +110,3 @@ }(_react2.default.Component); | ||
isActive: _react.PropTypes.func, | ||
children: _react.PropTypes.oneOfType([_react.PropTypes.node, _react.PropTypes.func]), | ||
@@ -133,3 +139,3 @@ // props we have to deal with but aren't necessarily | ||
var pathIsActive = function pathIsActive(to, pathname, activeOnlyWhenExact) { | ||
return activeOnlyWhenExact ? pathname === to : pathname.startsWith(to); | ||
return activeOnlyWhenExact ? pathname === to : pathname.indexOf(to) === 0; | ||
}; | ||
@@ -136,0 +142,0 @@ |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
exports.createRouterPath = exports.createRouterLocation = undefined; | ||
@@ -7,0 +5,0 @@ |
137
Match.js
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
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 _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require('react'); | ||
@@ -37,58 +33,50 @@ | ||
return _possibleConstructorReturn(this, (RegisterMatch.__proto__ || Object.getPrototypeOf(RegisterMatch)).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
_createClass(RegisterMatch, [{ | ||
key: 'registerMatch', | ||
value: function registerMatch() { | ||
var matchContext = this.context.match; | ||
var match = this.props.match; | ||
RegisterMatch.prototype.registerMatch = function registerMatch() { | ||
var matchContext = this.context.match; | ||
var match = this.props.match; | ||
if (match && matchContext) { | ||
matchContext.addMatch(match); | ||
} | ||
if (match && matchContext) { | ||
matchContext.addMatch(match); | ||
} | ||
}, { | ||
key: 'componentWillMount', | ||
value: function componentWillMount() { | ||
if (this.context.serverRouter) { | ||
this.registerMatch(); | ||
} | ||
}; | ||
RegisterMatch.prototype.componentWillMount = function componentWillMount() { | ||
if (this.context.serverRouter) { | ||
this.registerMatch(); | ||
} | ||
}, { | ||
key: 'componentDidMount', | ||
value: function componentDidMount() { | ||
if (!this.context.serverRouter) { | ||
this.registerMatch(); | ||
} | ||
}; | ||
RegisterMatch.prototype.componentDidMount = function componentDidMount() { | ||
if (!this.context.serverRouter) { | ||
this.registerMatch(); | ||
} | ||
}, { | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate(prevProps) { | ||
var match = this.context.match; | ||
}; | ||
RegisterMatch.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { | ||
var match = this.context.match; | ||
if (match) { | ||
if (prevProps.match && !this.props.match) { | ||
match.removeMatch(prevProps.match); | ||
} else if (!prevProps.match && this.props.match) { | ||
match.addMatch(this.props.match); | ||
} | ||
if (match) { | ||
if (prevProps.match && !this.props.match) { | ||
match.removeMatch(prevProps.match); | ||
} else if (!prevProps.match && this.props.match) { | ||
match.addMatch(this.props.match); | ||
} | ||
} | ||
}, { | ||
key: 'componentWillUnmount', | ||
value: function componentWillUnmount() { | ||
if (this.props.match) { | ||
this.context.match.removeMatch(this.props.match); | ||
} | ||
}; | ||
RegisterMatch.prototype.componentWillUnmount = function componentWillUnmount() { | ||
if (this.props.match) { | ||
this.context.match.removeMatch(this.props.match); | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
return _react2.default.Children.only(this.props.children); | ||
} | ||
}]); | ||
}; | ||
RegisterMatch.prototype.render = function render() { | ||
return _react2.default.Children.only(this.props.children); | ||
}; | ||
return RegisterMatch; | ||
@@ -112,35 +100,32 @@ }(_react2.default.Component); | ||
return _possibleConstructorReturn(this, (Match.__proto__ || Object.getPrototypeOf(Match)).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _React$Component2.apply(this, arguments)); | ||
} | ||
_createClass(Match, [{ | ||
key: 'render', | ||
value: 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; | ||
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 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 }); | ||
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, | ||
return _react2.default.createElement( | ||
RegisterMatch, | ||
{ match: match }, | ||
_react2.default.createElement( | ||
_MatchProvider2.default, | ||
{ 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 | ||
) | ||
); | ||
} | ||
}]); | ||
children ? children(_extends({ matched: !!match }, props)) : match ? render ? render(props) : _react2.default.createElement(Component, props) : null | ||
) | ||
); | ||
}; | ||
@@ -147,0 +132,0 @@ return Match; |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
@@ -7,0 +5,0 @@ var _pathToRegexp = require('path-to-regexp'); |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require('react'); | ||
@@ -29,3 +25,5 @@ | ||
var _this = _possibleConstructorReturn(this, (MatchProvider.__proto__ || Object.getPrototypeOf(MatchProvider)).call(this, props)); | ||
// **IMPORTANT** we must mutate matches, never reassign, in order for | ||
// server rendering to work w/ the two-pass render approach for Miss | ||
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); | ||
@@ -40,7 +38,2 @@ _this.addMatch = function (match) { | ||
_this.parent = props.match; | ||
// React doesn't support a parent calling `setState` from an descendant's | ||
// componentWillMount, so we use an instance property to track matches | ||
// **IMPORTANT** we must mutate matches, never reassign, in order for | ||
// server rendering to work | ||
_this.matches = []; | ||
@@ -53,68 +46,60 @@ _this.subscribers = []; | ||
_createClass(MatchProvider, [{ | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
var _this2 = this; | ||
MatchProvider.prototype.getChildContext = function getChildContext() { | ||
var _this2 = this; | ||
return { | ||
match: { | ||
addMatch: this.addMatch, | ||
removeMatch: this.removeMatch, | ||
matches: this.matches, | ||
parent: this.parent, | ||
serverRouterIndex: this.serverRouterIndex, | ||
subscribe: function subscribe(fn) { | ||
_this2.subscribers.push(fn); | ||
return function () { | ||
_this2.subscribers.splice(_this2.subscribers.indexOf(fn), 1); | ||
}; | ||
} | ||
return { | ||
match: { | ||
addMatch: this.addMatch, | ||
removeMatch: this.removeMatch, | ||
matches: this.matches, | ||
parent: this.props.match, | ||
serverRouterIndex: this.serverRouterIndex, | ||
subscribe: function subscribe(fn) { | ||
_this2.subscribers.push(fn); | ||
return function () { | ||
_this2.subscribers.splice(_this2.subscribers.indexOf(fn), 1); | ||
}; | ||
} | ||
}; | ||
} | ||
}, { | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate() { | ||
this.notifySubscribers(); | ||
} | ||
}, { | ||
key: 'componentWillMount', | ||
value: function componentWillMount() { | ||
var serverRouter = this.context.serverRouter; | ||
} | ||
}; | ||
}; | ||
if (serverRouter) { | ||
this.serverRouterIndex = serverRouter.registerMatchContext(this.matches); | ||
} | ||
MatchProvider.prototype.componentDidUpdate = function componentDidUpdate() { | ||
this.notifySubscribers(); | ||
}; | ||
MatchProvider.prototype.componentWillMount = function componentWillMount() { | ||
var serverRouter = this.context.serverRouter; | ||
if (serverRouter) { | ||
this.serverRouterIndex = serverRouter.registerMatchContext(this.matches); | ||
} | ||
}, { | ||
key: 'componentDidMount', | ||
value: function componentDidMount() { | ||
this.notifySubscribers(); | ||
} | ||
}, { | ||
key: 'notifySubscribers', | ||
value: function notifySubscribers() { | ||
var _this3 = this; | ||
}; | ||
// React's contract is that cDM of descendants is called before cDM of | ||
// ancestors, so here we can safely check if we found a match | ||
if (this.subscribers.length) { | ||
var hadMatches = this.hasMatches; | ||
this.hasMatches = this.matches.length !== 0; | ||
// optimization, don't notify if nothing changed initial will be null, so | ||
// we can get initial render correct | ||
if (this.hasMatches !== hadMatches) { | ||
this.subscribers.forEach(function (fn) { | ||
return fn(_this3.hasMatches); | ||
}); | ||
} | ||
MatchProvider.prototype.componentDidMount = function componentDidMount() { | ||
this.notifySubscribers(); | ||
}; | ||
MatchProvider.prototype.notifySubscribers = function notifySubscribers() { | ||
var _this3 = this; | ||
// React's contract is that cDM of descendants is called before cDM of | ||
// ancestors, so here we can safely check if we found a match | ||
if (this.subscribers.length) { | ||
var hadMatches = this.hasMatches; | ||
this.hasMatches = this.matches.length !== 0; | ||
// optimization, don't notify if nothing changed initial will be null, so | ||
// we can get initial render correct | ||
if (this.hasMatches !== hadMatches) { | ||
this.subscribers.forEach(function (fn) { | ||
return fn(_this3.hasMatches); | ||
}); | ||
} | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
return this.props.children; | ||
} | ||
}]); | ||
}; | ||
MatchProvider.prototype.render = function render() { | ||
return this.props.children; | ||
}; | ||
return MatchProvider; | ||
@@ -121,0 +106,0 @@ }(_react2.default.Component); |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
@@ -7,0 +5,0 @@ 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; }; |
54
Miss.js
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require('react'); | ||
@@ -30,3 +26,3 @@ | ||
// ignore if rendered out of context (probably for unit tests) | ||
var _this = _possibleConstructorReturn(this, (Miss.__proto__ || Object.getPrototypeOf(Miss)).call(this, props, context)); | ||
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); | ||
@@ -51,31 +47,27 @@ if (context.match && !context.serverRouter) { | ||
_createClass(Miss, [{ | ||
key: 'componentWillUnmount', | ||
value: function componentWillUnmount() { | ||
if (this.unsubscribe) { | ||
this.unsubscribe(); | ||
} | ||
Miss.prototype.componentWillUnmount = function componentWillUnmount() { | ||
if (this.unsubscribe) { | ||
this.unsubscribe(); | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
var _props = this.props; | ||
var render = _props.render; | ||
var Component = _props.component; | ||
var noMatchesInContext = this.state.noMatchesInContext; | ||
var locationProp = this.props.location; | ||
}; | ||
var location = locationProp || this.context.location; | ||
var _context = this.context; | ||
var serverRouter = _context.serverRouter; | ||
var match = _context.match; | ||
Miss.prototype.render = function render() { | ||
var _props = this.props; | ||
var render = _props.render; | ||
var Component = _props.component; | ||
var noMatchesInContext = this.state.noMatchesInContext; | ||
var locationProp = this.props.location; | ||
var noMatchesOnServerContext = serverRouter && serverRouter.missedAtIndex(match.serverRouterIndex); | ||
if (noMatchesInContext || noMatchesOnServerContext) { | ||
return render ? render({ location: location }) : _react2.default.createElement(Component, { location: location }); | ||
} else { | ||
return null; | ||
} | ||
var location = locationProp || this.context.location; | ||
var _context = this.context; | ||
var serverRouter = _context.serverRouter; | ||
var match = _context.match; | ||
var noMatchesOnServerContext = serverRouter && serverRouter.missedAtIndex(match.serverRouterIndex); | ||
if (noMatchesInContext || noMatchesOnServerContext) { | ||
return render ? render({ location: location }) : _react2.default.createElement(Component, { location: location }); | ||
} else { | ||
return null; | ||
} | ||
}]); | ||
}; | ||
@@ -82,0 +74,0 @@ return Miss; |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
@@ -7,0 +5,0 @@ var _Prompt = require('react-history/Prompt'); |
{ | ||
"name": "react-router", | ||
"version": "4.0.0-2", | ||
"description": "Declarative Routing for React.js", | ||
"repository": "reactjs/react-router", | ||
"version": "4.0.0-alpha.3", | ||
"description": "Declarative routing for React", | ||
"repository": "ReactTraining/react-router", | ||
"license": "MIT", | ||
@@ -11,2 +11,7 @@ "authors": [ | ||
], | ||
"files": [ | ||
"*.js", | ||
"*.md", | ||
"umd" | ||
], | ||
"scripts": { | ||
@@ -20,2 +25,3 @@ "start": "echo 'Make sure to `cd website && npm install`' && cd website && npm run dev", | ||
"prepublish": "node ./scripts/build.js", | ||
"clean": "rm $(ls modules | grep -v __)", | ||
"test": "npm run lint && karma start", | ||
@@ -31,4 +37,3 @@ "lint": "eslint modules" | ||
"peerDependencies": { | ||
"react": "15.x", | ||
"react-dom": "15.x" | ||
"react": "15.x" | ||
}, | ||
@@ -40,8 +45,9 @@ "devDependencies": { | ||
"babel-loader": "^6.2.4", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-preset-es2015": "^6.14.0", | ||
"babel-preset-es2015-loose": "^8.0.0", | ||
"babel-preset-react": "^6.5.0", | ||
"babel-preset-stage-1": "^6.5.0", | ||
"eslint": "^2.12.0", | ||
"eslint-plugin-import": "^1.8.1", | ||
"eslint-plugin-react": "^5.1.1", | ||
"eslint": "^2.13.1", | ||
"eslint-plugin-import": "^1.15.0", | ||
"eslint-plugin-react": "^5.2.2", | ||
"expect": "^1.20.1", | ||
@@ -59,5 +65,5 @@ "gzip-size": "^3.0.0", | ||
"pretty-bytes": "^3.0.1", | ||
"react": "^15.1.0", | ||
"react": "^15.3.0", | ||
"react-addons-test-utils": "^15.3.1", | ||
"react-dom": "^15.1.0", | ||
"react-dom": "^15.3.0", | ||
"readline-sync": "^1.4.4", | ||
@@ -64,0 +70,0 @@ "webpack": "^1.13.1", |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
exports.historyContext = exports.action = exports.router = exports.location = exports.history = exports.matchContext = undefined; | ||
@@ -7,0 +5,0 @@ |
203
README.md
@@ -1,28 +0,201 @@ | ||
React Router | ||
============ | ||
# React Router [![Travis][build-badge]][build] | ||
Declarative routing for [React.js][react]. | ||
[build-badge]: https://img.shields.io/travis/ReactTraining/react-router/v4.svg?style=flat-square | ||
[build]: https://travis-ci.org/ReactTraining/react-router | ||
Docs | ||
---- | ||
<img src="/logo/Vertical@2x.png" height="150"/> | ||
https://react-router-website-uxmsaeusnn.now.sh/ | ||
Declarative routing for [React](https://facebook.github.io/react). | ||
Installation | ||
------------ | ||
React Router keeps your UI in sync with the URL. Make the URL your first thought, not an after-thought. | ||
### NPM | ||
## Installation | ||
Using [npm](https://www.npmjs.com/): | ||
$ npm install --save react-router@next | ||
Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else: | ||
```js | ||
// using an ES6 transpiler, like babel | ||
import { BrowserRouter, Match, Link } from 'react-router' | ||
// not using an ES6 transpiler | ||
var BrowserRouter = require('react-router').BrowserRouter | ||
var Match = require('react-router').Match | ||
var Link = require('react-router').Link | ||
``` | ||
npm install react-router@4.0.0-2 | ||
``` | ||
### Script Tag Global | ||
The UMD build is also available on [unpkg](https://unpkg.com): | ||
```html | ||
<script src="https://unpkg.com/react-router@4.0.0-2"></script> | ||
<script src="https://unpkg.com/react-router@next/umd/react-router.min.js"></script> | ||
``` | ||
You'll find the modules on `window.ReactRouter` | ||
You can find the library on `window.ReactRouter`. | ||
[react]:https://facebook.github.io/react/ | ||
## Docs | ||
Please read [our docs here](https://react-router-website-xvufzcovng.now.sh/). | ||
## v4 FAQ | ||
### Why the huge change? (AGAIN?!) | ||
**tl;dr** Declarative Composability. | ||
We've never been this excited about React Router. Like you, we've | ||
learned a lot about React since we first picked it up. We built a Router | ||
the best we knew how along the way. What we've learned most is that we | ||
love React because of its **declarative composability**. | ||
As we looked at the router, it didn't work that way because of the | ||
static route configuration. You couldn't even wrap a Route! | ||
```js | ||
// NOPE! | ||
const CoolRoute = (props) => <Route {...props} cool={true}/> | ||
``` | ||
For apps to participate in rendering of route components, we had to | ||
create APIs we were never actually comfortable with, like `<Router | ||
createElement render>` and `createRouterMiddleware`. We took | ||
`createElement` away from you and had to give it back! | ||
We had to recreate the lifecycle hooks with `onEnter`, `onLeave`, and | ||
`onChange`. React already has `componentWillMount`, | ||
`componentWillReceiveProps` and `componentWillUnmount`. | ||
Route configs described your view hierarchy. Turns out, React components | ||
already describe view hierarchy. | ||
To code-split, we had to introduce `getComponent` and `getChildRoutes`. | ||
Hot module replacement libs had to do specific hacks for routes to work. | ||
The list goes on and on. | ||
React Router was not a React router, it was a routing framework for | ||
React. An accidental framework with APIs that were not only redundant | ||
with React, but incredibly difficult to build an ecosystem around. | ||
What did we do? We took everything we've learned and love about React | ||
(and we're still learning!) and applied it to routing. It started with | ||
the quest to actually render a `<Route>` (we used to just strip their | ||
props). It ended with removing the idea of routes completely (surprised | ||
us too) and a completely component based API, which actually means no | ||
API at all. | ||
You control routing by rendering components and passing props. Finally, | ||
we have a solid base for us and others to build an ecosystem on top of. | ||
In other words, it's Just React™ and you're going to love it. | ||
### How long until another huge API overhaul? | ||
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. | ||
Not only that, but we're excited to create and encourage building an | ||
ecosystem of addons to this stable base. | ||
### Why did you get rid of feature [x]? | ||
We've been pulled a lot of directions with bleeding edge use-cases that | ||
nobody really has generic answers for: server rendering, code-splitting | ||
while avoiding waterfalls, anticipating streamed server rendering, loading | ||
data before rendering anything, etc. We unconsciously tried to solve this | ||
stuff when all we really want to be doing is keeping rendered UI in sync | ||
with the url. That's our scope of responsibility. | ||
By using components as our only API, features we had that are important | ||
to you can be implemented on top of these components. | ||
We will be creating some addons and hope to see others too. | ||
### What about scrolling? | ||
We have some code close to being published that will manage the scroll | ||
positions of window and individual elements. | ||
### What about Redux? | ||
We have a `<ControlledRouter>` close to being published that makes redux | ||
integration with React Router the same as ... uh ... integrating an | ||
`<input>` with Redux. | ||
### What about route transition hooks? (example needed) | ||
Because we are just components, you have the component lifecycle as | ||
transition hooks. They are completely parallel. The only difference is | ||
that the route transition hooks could be asynchronous. The problem with | ||
that was you weren't in the render lifecycle so you couldn't use React | ||
to indicate to the user something was happening. | ||
```js | ||
<Route onEnter={(_, cb) => { | ||
loadStuffForever(() => { | ||
// WHAT IS THE USER SEEING RIGHT NOW? | ||
cb() | ||
}) | ||
}}/> | ||
``` | ||
One use case was loading data and waiting to render the next screen | ||
until the data landed. With a component, you can save the previous | ||
children, render them while loading, and then render your new children | ||
when you're done. We'll have an example of this eventually. | ||
### I liked seeing all my routes in one place, now what? | ||
Check out the "Route Config" example. | ||
### I want to load data before rendering, now what? | ||
See below | ||
### The route config is important to the ecosystem, now what? | ||
We have started an addon that we hope people who are interested in this | ||
will take ownership of here: https://github.com/ReactTraining/react-router-addons-routes | ||
### What about upgrading? | ||
We believe very strongly in iterative migration, not rewrites, for | ||
applications. We are working on a migration guide, but the basic | ||
strategy is that both versions will be runnable in tandem (due to npm | ||
limitations, we'll publish the previous version separately so both can | ||
be installed). | ||
You will be able to take routes one-by-one and migrate them to the new | ||
API. Additionally, the config addon mentioned above may help out here. | ||
### What the heck happened to v3? | ||
It's in beta, will be released shortly. It's basically just v2 but w/o | ||
any warnings of deprecated 1.0 API. | ||
### Do I have to upgrade? | ||
No. Leave your package.json at v2/3 and move on with your life. We'll | ||
be merging bug fixes for v2/3 indefinitely. | ||
### We're Pumped! | ||
We've received a ton of great feedback from people we really admire in | ||
the React community so we know we've found something special that's a | ||
bit unprecendented in the world of UI routing. | ||
We've never been more excited about React Router. It's no longer a | ||
router for React, it is truly a React Router. | ||
## Thanks | ||
Thanks to [our sponsors](/SPONSORS.md) for supporting the development of React Router. | ||
Also, thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to run our build in real browsers. |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require('react'); | ||
@@ -29,30 +25,24 @@ | ||
return _possibleConstructorReturn(this, (Redirect.__proto__ || Object.getPrototypeOf(Redirect)).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
_createClass(Redirect, [{ | ||
key: 'componentWillMount', | ||
value: function componentWillMount() { | ||
if (this.context.serverRouter) this.redirect(); | ||
} | ||
}, { | ||
key: 'componentDidMount', | ||
value: function componentDidMount() { | ||
this.redirect(); | ||
} | ||
}, { | ||
key: 'redirect', | ||
value: function redirect() { | ||
var router = this.context.router; | ||
// so that folks can unit test w/o hassle | ||
Redirect.prototype.componentWillMount = function componentWillMount() { | ||
if (this.context.serverRouter) this.redirect(); | ||
}; | ||
if (router) router.replaceWith(this.props.to); | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
return null; | ||
} | ||
}]); | ||
Redirect.prototype.componentDidMount = function componentDidMount() { | ||
this.redirect(); | ||
}; | ||
Redirect.prototype.redirect = function redirect() { | ||
var router = this.context.router; | ||
// so that folks can unit test w/o hassle | ||
if (router) router.replaceWith(this.props.to); | ||
}; | ||
Redirect.prototype.render = function render() { | ||
return null; | ||
}; | ||
return Redirect; | ||
@@ -59,0 +49,0 @@ }(_react2.default.Component); |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
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 _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require('react'); | ||
@@ -35,32 +31,29 @@ | ||
return _possibleConstructorReturn(this, (ServerRouter.__proto__ || Object.getPrototypeOf(ServerRouter)).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
_createClass(ServerRouter, [{ | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
return { | ||
serverRouter: this.props.context | ||
}; | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
var _props = this.props; | ||
var context = _props.context; | ||
ServerRouter.prototype.getChildContext = function getChildContext() { | ||
return { | ||
serverRouter: this.props.context | ||
}; | ||
}; | ||
var rest = _objectWithoutProperties(_props, ['context']); | ||
ServerRouter.prototype.render = function render() { | ||
var _props = this.props; | ||
var context = _props.context; | ||
var location = _props.location; | ||
var redirect = function redirect(location) { | ||
context.setRedirect(location); | ||
}; | ||
return _react2.default.createElement(_StaticRouter2.default, _extends({ | ||
action: 'POP', | ||
location: location, | ||
onReplace: redirect, | ||
onPush: redirect | ||
}, rest)); | ||
} | ||
}]); | ||
var rest = _objectWithoutProperties(_props, ['context', 'location']); | ||
var redirect = function redirect(location) { | ||
context.setRedirect(location); | ||
}; | ||
return _react2.default.createElement(_StaticRouter2.default, _extends({ | ||
action: 'POP', | ||
location: location, | ||
onReplace: redirect, | ||
onPush: redirect | ||
}, rest)); | ||
}; | ||
return ServerRouter; | ||
@@ -67,0 +60,0 @@ }(_react2.default.Component); |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _queryString = require('query-string'); | ||
var _react = require('react'); | ||
var _LocationUtils = require('./LocationUtils'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _MatchProvider = require('./MatchProvider'); | ||
@@ -19,4 +17,2 @@ | ||
var _LocationUtils = require('./LocationUtils'); | ||
var _PropTypes = require('./PropTypes'); | ||
@@ -42,68 +38,63 @@ | ||
return _possibleConstructorReturn(this, (StaticRouter.__proto__ || Object.getPrototypeOf(StaticRouter)).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
_createClass(StaticRouter, [{ | ||
key: 'createLocationForContext', | ||
value: function createLocationForContext(loc) { | ||
var _props = this.props; | ||
var parseQuery = _props.parseQuery; | ||
var stringifyQuery = _props.stringifyQuery; | ||
StaticRouter.prototype.createLocationForContext = function createLocationForContext(loc) { | ||
var _props = this.props; | ||
var parseQuery = _props.parseQuery; | ||
var stringifyQuery = _props.stringifyQuery; | ||
return (0, _LocationUtils.createRouterLocation)(loc, parseQuery, stringifyQuery); | ||
} | ||
}, { | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
var _this2 = this; | ||
return (0, _LocationUtils.createRouterLocation)(loc, parseQuery, stringifyQuery); | ||
}; | ||
var createHref = function createHref(to) { | ||
var path = (0, _LocationUtils.createRouterPath)(to, _this2.props.stringifyQuery); | ||
return _this2.props.createHref(path); | ||
}; | ||
StaticRouter.prototype.getChildContext = function getChildContext() { | ||
var _this2 = this; | ||
var location = this.getLocation(); | ||
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); | ||
}; | ||
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); | ||
} | ||
var location = this.getLocation(); | ||
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); | ||
} | ||
}; | ||
} | ||
}, { | ||
key: 'getLocation', | ||
value: 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; | ||
} | ||
}; | ||
}; | ||
return (0, _LocationUtils.createRouterLocation)(location, parseQuery, stringifyQuery); | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
var children = this.props.children; | ||
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; | ||
var location = this.getLocation(); | ||
return (0, _LocationUtils.createRouterLocation)(location, parseQuery, stringifyQuery); | ||
}; | ||
return _react2.default.createElement( | ||
_MatchProvider2.default, | ||
null, | ||
typeof children === 'function' ? children({ location: location, router: this.getChildContext().router }) : children | ||
); | ||
} | ||
}]); | ||
StaticRouter.prototype.render = function render() { | ||
var children = this.props.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) | ||
); | ||
}; | ||
return StaticRouter; | ||
@@ -118,2 +109,3 @@ }(_react2.default.Component); | ||
location: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string]).isRequired, | ||
basename: _react.PropTypes.string, | ||
onPush: _react.PropTypes.func.isRequired, | ||
@@ -120,0 +112,0 @@ onReplace: _react.PropTypes.func.isRequired, |
@@ -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}}Object.defineProperty(t,"__esModule",{value:!0}),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),u=r(a),c=n(21),s=r(c),p=n(34),f=r(p),l=n(22),h=r(l),y=n(15),d=r(y),v=n(16),b=r(v),P=n(20),m=r(P),g=n(23),T=r(g),O=n(3),w=r(O),x=n(10),_=r(x);t.Link=i["default"],t.Match=u["default"],t.Miss=s["default"],t.NavigationPrompt=f["default"],t.Redirect=h["default"],t.BrowserRouter=d["default"],t.HashRouter=b["default"],t.MemoryRouter=m["default"],t.ServerRouter=T["default"],t.StaticRouter=w["default"],t.matchPattern=_["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(30),s=n(1),p=r(s),f=n(9),l=r(f),h=n(18),y=n(2),d=function(e){return(0,c.stringify)(e).replace(/%20/g,"+")},v=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:"createLocationForContext",value:function(e){var t=this.props,n=t.parseQuery,r=t.stringifyQuery;return(0,h.createRouterLocation)(e,n,r)}},{key:"getChildContext",value:function(){var e=this,t=function(t){var n=(0,h.createRouterPath)(t,e.props.stringifyQuery);return 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)}}}}},{key:"getLocation",value:function(){var e=this.props,t=e.location,n=e.parseQuery,r=e.stringifyQuery;return(0,h.createRouterLocation)(t,n,r)}},{key:"render",value:function(){var e=this.props.children,t=this.getLocation();return p["default"].createElement(l["default"],null,"function"==typeof e?e({location:t,router:this.getChildContext().router}):e)}}]),t}(p["default"].Component);v.propTypes={action:y.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,onPush:s.PropTypes.func.isRequired,onReplace:s.PropTypes.func.isRequired,stringifyQuery:s.PropTypes.func.isRequired,parseQuery:s.PropTypes.func.isRequired},v.defaultProps={createHref:function(e){return e},stringifyQuery:d,parseQuery:c.parse},v.childContextTypes={router:y.router.isRequired,location:y.location.isRequired},t["default"]=v},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";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 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},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(5),u=(r(a),n(4)),c=(t.createLocation=function(e,t,n){var r=void 0;return"string"==typeof e?(r=(0,u.parsePath)(e),r.state=t):(r=i({},e),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":o(e),r="undefined"==typeof t?"undefined":o(t);if(n!==r)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&&c(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 u=n(1),c=r(u),s=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:u.PropTypes.func.isRequired,createHistory:u.PropTypes.func.isRequired,historyOptions:u.PropTypes.object},p.childContextTypes={history:s.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)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),s=r(c),p=n(2),f=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.addMatch=function(e){n.matches.push(e)},n.removeMatch=function(e){n.matches.splice(n.matches.indexOf(e),1)},n.parent=e.match,n.matches=[],n.subscribers=[],n.hasMatches=null,n.serverRouterIndex=null,n}return a(t,e),u(t,[{key:"getChildContext",value:function(){var e=this;return{match:{addMatch:this.addMatch,removeMatch:this.removeMatch,matches:this.matches,parent:this.parent,serverRouterIndex:this.serverRouterIndex,subscribe:function(t){return e.subscribers.push(t),function(){e.subscribers.splice(e.subscribers.indexOf(t),1)}}}}}},{key:"componentDidUpdate",value:function(){this.notifySubscribers()}},{key:"componentWillMount",value:function(){var e=this.context.serverRouter;e&&(this.serverRouterIndex=e.registerMatchContext(this.matches))}},{key:"componentDidMount",value:function(){this.notifySubscribers()}},{key:"notifySubscribers",value: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)})}}},{key:"render",value:function(){return this.props.children}}]),t}(s["default"].Component);f.propTypes={match:c.PropTypes.any,children:c.PropTypes.node},f.childContextTypes={match:p.matchContext.isRequired},f.contextTypes={serverRouter:c.PropTypes.object},t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(29),i=r(o),a={},u=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("/")},s=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=u(e),a=n?t.pathname:c(t.pathname,e),p=i.regex.exec(a);if(p){var f=s(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,u){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 s=[n,r,o,i,a,u],p=0;c=new Error(t.replace(/%s/g,function(){return s[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}Object.defineProperty(t,"__esModule",{value:!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),u=r(a),c=n(31),s=r(c),p=n(3),f=r(p),l=function(e){var t=e.basename,n=e.keyLength,r=o(e,["basename","keyLength"]);return u["default"].createElement(s["default"],{basename:t,keyLength:n},function(e){var t=e.history,n=e.action,o=e.location;return u["default"].createElement(f["default"],i({action:n,location:o,onPush:t.push,onReplace:t.replace,blockTransitions:t.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}Object.defineProperty(t,"__esModule",{value:!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),u=r(a),c=n(32),s=r(c),p=n(3),f=r(p),l=function(e){var t=e.basename,n=e.hashType,r=o(e,["basename","hashType"]);return u["default"].createElement(s["default"],{basename:t,hashType:n},function(e){var t=e.history,n=e.action,o=e.location;return u["default"].createElement(f["default"],i({action:n,location:o,onPush:t.push,onReplace:t.replace,onGo:t.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 u(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)}Object.defineProperty(t,"__esModule",{value:!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},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},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),l=r(f),h=n(2),y=function(e){function t(){var e,n,r,o;i(this,t);for(var u=arguments.length,c=Array(u),s=0;s<u;s++)c[s]=arguments[s];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.handleClick=function(e){r.props.onClick&&r.props.onClick(e),e.defaultPrevented||r.props.target||m(e)||!P(e)||(e.preventDefault(),r.context.router.transitionTo(r.props.to))},o=n,a(r,o)}return u(t,e),p(t,[{key:"render",value:function(){var e=this.context.router,t=this.props,n=t.to,r=t.style,i=t.activeStyle,a=t.className,u=t.activeClassName,c=t.location,p=t.isActive,f=(t.activeOnlyWhenExact,o(t,["to","style","activeStyle","className","activeClassName","location","isActive","activeOnlyWhenExact"])),h=c||this.context.location,y=p(h,d(n),this.props);return l["default"].createElement("a",s({},f,{href:e?e.createHref(n):n,onClick:this.handleClick,style:y?s({},r,i):r,className:y?[a,u].join(" ").trim():a}))}}]),t}(l["default"].Component);y.propTypes={to:f.PropTypes.oneOfType([f.PropTypes.string,f.PropTypes.object]).isRequired,activeStyle:f.PropTypes.object,activeClassName:f.PropTypes.string,location:f.PropTypes.object,activeOnlyWhenExact:f.PropTypes.bool,isActive:f.PropTypes.func,style:f.PropTypes.object,className:f.PropTypes.string,target:f.PropTypes.string,onClick:f.PropTypes.func},y.defaultProps={activeOnlyWhenExact:!1,className:"",activeClassName:"",style:{},activeStyle:{},isActive:function(e,t,n){return v(t.pathname,e.pathname,n.activeOnlyWhenExact)&&b(t.query,e.query)}},y.contextTypes={router:h.router,location:h.location};var d=function(e){return"object"===("undefined"==typeof e?"undefined":c(e))?e:{pathname:e}},v=function(e,t,n){return n?t===e:t.startsWith(e)},b=function(e,t){return null==t?null==e:null==e||g(e,t)},P=function(e){return 0===e.button},m=function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)},g=function T(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 T(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(!T(e[n],t[n]))return!1}return!0}return String(e)===String(t)};t["default"]=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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)}Object.defineProperty(t,"__esModule",{value:!0});var 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},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),p=r(s),f=n(9),l=r(f),h=n(10),y=r(h),d=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),c(t,[{key:"registerMatch",value:function(){var e=this.context.match,t=this.props.match;t&&e&&e.addMatch(t)}},{key:"componentWillMount",value:function(){this.context.serverRouter&&this.registerMatch()}},{key:"componentDidMount",value:function(){this.context.serverRouter||this.registerMatch()}},{key:"componentDidUpdate",value: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))}},{key:"componentWillUnmount",value:function(){this.props.match&&this.context.match.removeMatch(this.props.match)}},{key:"render",value:function(){return p["default"].Children.only(this.props.children)}}]),t}(p["default"].Component);d.propTypes={children:s.PropTypes.node.isRequired,match:s.PropTypes.any},d.contextTypes={match:s.PropTypes.object,serverRouter:s.PropTypes.object};var v=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),c(t,[{key:"render",value: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,s=c.location,f=c.match,h=i||s,v=f&&f.parent,b=(0,y["default"])(o,h,a,v),P=u({},b,{location:h,pattern:o});return p["default"].createElement(d,{match:b},p["default"].createElement(l["default"],{match:b},t?t(u({matched:!!b},P)):b?n?n(P):p["default"].createElement(r,P):null))}}]),t}(p["default"].Component);v.propTypes={pattern:s.PropTypes.string,exactly:s.PropTypes.bool,location:s.PropTypes.object,children:s.PropTypes.func,render:s.PropTypes.func,component:s.PropTypes.func},v.defaultProps={exactly:!1},v.contextTypes={location:s.PropTypes.object,match:s.PropTypes.object},t["default"]=v},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}Object.defineProperty(t,"__esModule",{value:!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),u=r(a),c=n(33),s=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 u["default"].createElement(s["default"],{initialEntries:t,initialIndex:n,keyLength:r},function(e){var t=e.history,n=e.action,r=e.location;return u["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)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),s=r(c),p=n(2),f=function(e){function t(e,n){o(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return n.match&&!n.serverRouter&&(r.unsubscribe=r.context.match.subscribe(function(e){r.setState({noMatchesInContext:!e})})),n.serverRouter&&n.serverRouter.registerMissPresence(n.match.serverRouterIndex),r.state={noMatchesInContext:!1},r}return a(t,e),u(t,[{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"render",value: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,u=a.serverRouter,c=a.match,p=u&&u.missedAtIndex(c.serverRouterIndex);return r||p?n?n({location:i}):s["default"].createElement(t,{location:i}):null}}]),t}(s["default"].Component);f.propTypes={children:c.PropTypes.node,location:p.location,render:c.PropTypes.func,component:c.PropTypes.func},f.contextTypes={match:c.PropTypes.object,location:c.PropTypes.object,serverRouter:c.PropTypes.object},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)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),s=r(c),p=n(2),f=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:"componentWillMount",value:function(){this.context.serverRouter&&this.redirect()}},{key:"componentDidMount",value:function(){this.redirect()}},{key:"redirect",value:function(){var e=this.context.router;e&&e.replaceWith(this.props.to)}},{key:"render",value:function(){return null}}]),t}(s["default"].Component);f.propTypes={to:c.PropTypes.oneOfType([c.PropTypes.string,c.PropTypes.object]).isRequired},f.contextTypes={router:p.router,serverRouter:c.PropTypes.object},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}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 u(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)}Object.defineProperty(t,"__esModule",{value:!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},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(1),f=r(p),l=n(3),h=r(l),y=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,[{key:"getChildContext",value:function(){return{serverRouter:this.props.context}}},{key:"render",value:function(){var e=this.props,t=e.context,n=o(e,["context"]),r=function(e){t.setRedirect(e)};return f["default"].createElement(h["default"],c({action:"POP",location:location,onReplace:r,onPush:r},n))}}]),t}(f["default"].Component);y.propTypes={context:p.PropTypes.object.isRequired,location:p.PropTypes.string.isRequired,children:p.PropTypes.oneOfType([p.PropTypes.func,p.PropTypes.node])},y.childContextTypes={serverRouter:p.PropTypes.object.isRequired},t["default"]=y},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)),u=r(a),c=n(6),s=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{}}},b=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];l.canUseDOM?void 0:(0,u["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,b=void 0!==p&&p,P=e.getUserConfirmation,m=void 0===P?h.getConfirmation:P,g=e.keyLength,T=void 0===g?6:g,O=function(e){var t=e||{},n=t.key,r=t.state,i=window.location,u=i.pathname,c=i.search,p=i.hash,f=u+c+p;return a&&(f=(0,s.stripPrefix)(f,a)),o({},(0,s.parsePath)(f),{state:r,key:n})},w=function(){return Math.random().toString(36).substr(2,T)},x=(0,f["default"])(),_=function(e){o(Q,e),Q.length=t.length,x.notifyListeners(Q.location,Q.action)},j=function(e){void 0!==e.state&&k(O(e.state))},R=function(){k(O(v()))},E=!1,k=function(e){E?(E=!1,_()):!function(){var t="POP";x.confirmTransitionTo(e,t,m,function(n){n?_({action:t,location:e}):M(e)})}()},M=function(e){var t=Q.location,n=q.indexOf(t.key);n===-1&&(n=0);var r=q.indexOf(e.key);r===-1&&(r=0);var o=n-r; | ||
o&&(E=!0,A(o))},C=O(v()),q=[C.key],L=function(e,r){var o="PUSH",i=(0,c.createLocation)(e,r,w());x.confirmTransitionTo(i,o,m,function(e){if(e){var r=a+(0,s.createPath)(i),u=i.key,c=i.state;if(n)if(t.pushState({key:u,state:c},null,r),b)window.location.href=r;else{var p=q.indexOf(Q.location.key),f=q.slice(0,p===-1?0:p+1);f.push(i.key),q=f,_({action:o,location:i})}else window.location.href=r}})},S=function(e,r){var o="REPLACE",i=(0,c.createLocation)(e,r,w());x.confirmTransitionTo(i,o,m,function(e){if(e){var r=a+(0,s.createPath)(i),u=i.key,c=i.state;if(n)if(t.replaceState({key:u,state:c},null,r),b)window.location.replace(r);else{var p=q.indexOf(Q.location.key);p!==-1&&(q[p]=i.key),_({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,j),r&&(0,h.addEventListener)(window,d,R)):0===H&&((0,h.removeEventListener)(window,y,j),r&&(0,h.removeEventListener)(window,d,R))},N=!1,D=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()}},F=function(e){var t=x.appendListener(e);return W(1),function(){return W(-1),t()}},Q={length:t.length,action:"POP",location:C,push:L,replace:S,go:A,goBack:U,goForward:I,block:D,listen:F};return Q};t["default"]=b},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)),u=r(a),c=n(6),s=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,s.stripLeadingSlash)(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:s.stripLeadingSlash,decodePath:s.addLeadingSlash},slash:{encodePath:s.addLeadingSlash,decodePath:s.addLeadingSlash}},v=function(){var e=window.location.href,t=e.indexOf("#");return t===-1?"":e.substring(t+1)},b=function(e){return window.location.hash=e},P=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)},m=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];l.canUseDOM?void 0:(0,u["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,m=void 0===p?"slash":p,g=d[m],T=g.encodePath,O=g.decodePath,w=function(){var e=O(v());return r&&(e=(0,s.stripPrefix)(e,r)),(0,s.parsePath)(e)},x=(0,f["default"])(),_=function(e){o(B,e),B.length=t.length,x.notifyListeners(B.location,B.action)},j=!1,R=null,E=function(){var e=v(),t=T(e);if(e!==t)P(t);else{var n=w(),r=B.location;if(!j&&(0,c.locationsAreEqual)(r,n))return;if(R===(0,s.createPath)(n))return;R=null,k(n)}},k=function(e){j?(j=!1,_()):!function(){var t="POP";x.confirmTransitionTo(e,t,a,function(n){n?_({action:t,location:e}):M(e)})}()},M=function(e){var t=B.location,n=S.lastIndexOf((0,s.createPath)(t));n===-1&&(n=0);var r=S.lastIndexOf((0,s.createPath)(e));r===-1&&(r=0);var o=n-r;o&&(j=!0,I(o))},C=v(),q=T(C);C!==q&&P(q);var L=w(),S=[(0,s.createPath)(L)],A=function(e,t){var n="PUSH",o=(0,c.createLocation)(e);x.confirmTransitionTo(o,n,a,function(e){if(e){var t=(0,s.createPath)(o),i=T(r+t),a=v()!==i;if(a){R=t,b(i);var u=S.lastIndexOf((0,s.createPath)(B.location)),c=S.slice(0,u===-1?0:u+1);c.push(t),S=c,_({action:n,location:o})}else _()}})},U=function(e,t){var n="REPLACE",o=(0,c.createLocation)(e);x.confirmTransitionTo(o,n,a,function(e){if(e){var t=(0,s.createPath)(o),i=T(r+t),a=v()!==i;a&&(R=t,P(i));var u=S.indexOf((0,s.createPath)(B.location));u!==-1&&(S[u]=t),_({action:n,location:o})}})},I=function(e){t.go(e)},H=function(){return I(-1)},W=function(){return I(1)},N=0,D=function(e){N+=e,1===N?(0,h.addEventListener)(window,y,E):0===N&&(0,h.removeEventListener)(window,y,E)},F=!1,Q=function(){var e=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],t=x.setPrompt(e);return F||(D(1),F=!0),function(){return F&&(F=!1,D(-1)),t()}},$=function(e){var t=x.appendListener(e);return D(1),function(){return D(-1),t()}},B={length:t.length,action:"POP",location:L,push:A,replace:U,go:I,goBack:H,goForward:W,block:Q,listen:$};return B};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(6),a=n(7),u=r(a),c=function(e,t,n){return Math.min(Math.max(e,t),n)},s=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.getUserConfirmation,n=e.initialEntries,r=void 0===n?["/"]:n,a=e.initialIndex,s=void 0===a?0:a,p=e.keyLength,f=void 0===p?6:p,l=(0,u["default"])(),h=function(e){o(_,e),_.length=_.entries.length,l.notifyListeners(_.location,_.action)},y=function(){return Math.random().toString(36).substr(2,f)},d=c(s,0,r.length-1),v=r.map(function(e,t){return"string"==typeof e?(0,i.createLocation)(e,t?y():void 0):e}),b=function(e,n){var r="PUSH",o=(0,i.createLocation)(e,n,y());l.confirmTransitionTo(o,r,t,function(e){if(e){var t=_.index,n=t+1,i=_.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})}})},P=function(e,n){var r="REPLACE",o=(0,i.createLocation)(e,n,y());l.confirmTransitionTo(o,r,t,function(e){e&&(_.entries[_.index]=o,h({action:r,location:o}))})},m=function(e){var n=c(_.index+e,0,_.entries.length-1),r="POP",o=_.entries[n];l.confirmTransitionTo(o,r,t,function(e){e?h({action:r,location:o,index:n}):h()})},g=function(){return m(-1)},T=function(){return m(1)},O=function(e){var t=_.index+e;return t>=0&&t<_.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)},_={length:v.length,action:"POP",location:v[d],index:d,entries:v,push:b,replace:P,go:m,goBack:g,goForward:T,canGo:O,block:w,listen:x};return _};t["default"]=s},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,u=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var s in r)o.call(r,s)&&(u[s]=r[s]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var p=0;p<a.length;p++)i.call(r,a[p])&&(u[a[p]]=r[a[p]])}}return u}},function(e,t,n){function r(e){for(var t,n=[],r=0,o=0,i="";null!=(t=P.exec(e));){var a=t[0],u=t[1],c=t.index;if(i+=e.slice(o,c),o=c+a.length,u)i+=u[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 b=null!=f&&null!=p&&p!==f,m="+"===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:m,partial:b,asterisk:!!v,pattern:s(O)})}}return o<e.length&&(i+=e.substr(o)),i&&n.push(i),n}function o(e){return u(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 u(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="",u=n||{},c=r||{},s=c.pretty?i:encodeURIComponent,p=0;p<e.length;p++){var f=e[p];if("string"!=typeof f){var l,h=u[f.name];if(null==h){if(f.optional){f.partial&&(o+=f.prefix);continue}throw new TypeError('Expected "'+f.name+'" to be defined')}if(b(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=s(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):s(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 s(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),u=0;u<e.length;u++){var s=e[u];if("string"==typeof s)o+=c(s);else{var p=c(s.prefix),l="(?:"+s.pattern+")";s.repeat&&(l+="(?:"+p+l+")*"),l=s.optional?s.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||[],b(t)?n||(n={}):(n=t,t=[]),e instanceof RegExp?l(e,t):b(e)?h(e,t,n):y(e,t,n)}var b=n(27);e.exports=v,e.exports.parse=r,e.exports.compile=o,e.exports.tokensToFunction=u,e.exports.tokensToRegExp=d;var P=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(35),i=n(28);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),u=n(24),c=r(u),s=n(8),p=r(s),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),u=n(25),c=r(u),s=n(8),p=r(s),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),u=n(26),c=r(u),s=n(8),p=r(s),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 u=n(1),c=r(u),s=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:s.historyContext.isRequired},p.propTypes={when:u.PropTypes.bool,message:u.PropTypes.oneOfType([u.PropTypes.func,u.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(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()})}}])}); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
5
202
216213
29
24
3894
6