+
+
+
+ );
+ }
+});
\ No newline at end of file
diff --git a/jsx/other/Settings.js b/jsx/other/Settings.js
index 9f4bc38..561e874 100755
--- a/jsx/other/Settings.js
+++ b/jsx/other/Settings.js
@@ -16,7 +16,7 @@ var ReactBootstrap = require('react-bootstrap')
, Button = ReactBootstrap.Button
, Input = ReactBootstrap.Input
-module.exports = Home = React.createClass({
+module.exports = Settings = React.createClass({
mixins: [
SetIntervalMixin,
@@ -66,7 +66,6 @@ module.exports = Home = React.createClass({
wrapperClassName='col-xs-8' className="settings-host"/>
-
);
diff --git a/node_modules/react-router/README.md b/node_modules/react-router/README.md
old mode 100755
new mode 100644
index 985c291..246ebb1
--- a/node_modules/react-router/README.md
+++ b/node_modules/react-router/README.md
@@ -1,18 +1,14 @@
+[![build status](https://img.shields.io/travis/rackt/react-router/0.13.x.svg?style=flat-square)](https://travis-ci.org/rackt/react-router)
[![npm package](https://img.shields.io/npm/v/react-router.svg?style=flat-square)](https://www.npmjs.org/package/react-router)
-[![build status](https://img.shields.io/travis/rackt/react-router/master.svg?style=flat-square)](https://travis-ci.org/rackt/react-router)
-[![dependency status](https://img.shields.io/david/rackt/react-router.svg?style=flat-square)](https://david-dm.org/rackt/react-router)
-[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/rackt/react-router?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+[![react-router channel on slack](https://img.shields.io/badge/slack-react--router@reactiflux-61DAFB.svg?style=flat-square)](http://www.reactiflux.com)
React Router
============
A complete routing library for React.
-Docs
-----
-
-- [Guide: Overview](/docs/guides/overview.md)
-- [API](/docs/api/)
+* [Guides](/docs/guides)
+* [Docs](/doc)
Important Notes
---------------
@@ -124,7 +120,7 @@ Related Modules
- [rnr-constrained-route](https://github.com/bjyoungblood/rnr-constrained-route) - validate paths
and parameters on route handlers.
-- [react-router-bootstrap](https://github.com/mtscout6/react-router-bootstrap) - Integration with [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) components.
+- [react-router-bootstrap](https://github.com/react-bootstrap/react-router-bootstrap) - Integration with [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) components.
- [react-router-proxy-loader](https://github.com/odysseyscience/react-router-proxy-loader) - A Webpack loader to dynamically load react-router components on-demand
Contributing
diff --git a/node_modules/react-router/lib/Cancellation.js b/node_modules/react-router/lib/Cancellation.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/History.js b/node_modules/react-router/lib/History.js
old mode 100755
new mode 100644
index f6194ad..eb14e2d
--- a/node_modules/react-router/lib/History.js
+++ b/node_modules/react-router/lib/History.js
@@ -1,7 +1,7 @@
'use strict';
-var invariant = require('react/lib/invariant');
-var canUseDOM = require('react/lib/ExecutionEnvironment').canUseDOM;
+var invariant = require('invariant');
+var canUseDOM = require('can-use-dom');
var History = {
diff --git a/node_modules/react-router/lib/Match.js b/node_modules/react-router/lib/Match.js
old mode 100755
new mode 100644
index ec5f8bc..e113e1b
--- a/node_modules/react-router/lib/Match.js
+++ b/node_modules/react-router/lib/Match.js
@@ -1,10 +1,10 @@
+/* jshint -W084 */
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
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; }; })();
-/* jshint -W084 */
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
var PathUtils = require('./PathUtils');
function deepSearch(route, pathname, query) {
@@ -27,29 +27,20 @@ function deepSearch(route, pathname, query) {
// No child routes matched; try the default route.
var defaultRoute = route.defaultRoute;
- if (defaultRoute && (params = PathUtils.extractParams(defaultRoute.path, pathname))) {
- return new Match(pathname, params, query, [route, defaultRoute]);
- } // Does the "not found" route match?
+ if (defaultRoute && (params = PathUtils.extractParams(defaultRoute.path, pathname))) return new Match(pathname, params, query, [route, defaultRoute]);
+
+ // Does the "not found" route match?
var notFoundRoute = route.notFoundRoute;
- if (notFoundRoute && (params = PathUtils.extractParams(notFoundRoute.path, pathname))) {
- return new Match(pathname, params, query, [route, notFoundRoute]);
- } // Last attempt: check this route.
+ if (notFoundRoute && (params = PathUtils.extractParams(notFoundRoute.path, pathname))) return new Match(pathname, params, query, [route, notFoundRoute]);
+
+ // Last attempt: check this route.
var params = PathUtils.extractParams(route.path, pathname);
- if (params) {
- return new Match(pathname, params, query, [route]);
- }return null;
+ if (params) return new Match(pathname, params, query, [route]);
+
+ return null;
}
var Match = (function () {
- function Match(pathname, params, query, routes) {
- _classCallCheck(this, Match);
-
- this.pathname = pathname;
- this.params = params;
- this.query = query;
- this.routes = routes;
- }
-
_createClass(Match, null, [{
key: 'findMatch',
@@ -69,6 +60,15 @@ var Match = (function () {
}
}]);
+ function Match(pathname, params, query, routes) {
+ _classCallCheck(this, Match);
+
+ this.pathname = pathname;
+ this.params = params;
+ this.query = query;
+ this.routes = routes;
+ }
+
return Match;
})();
diff --git a/node_modules/react-router/lib/Navigation.js b/node_modules/react-router/lib/Navigation.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/PathUtils.js b/node_modules/react-router/lib/PathUtils.js
old mode 100755
new mode 100644
index c39d210..f190579
--- a/node_modules/react-router/lib/PathUtils.js
+++ b/node_modules/react-router/lib/PathUtils.js
@@ -1,12 +1,12 @@
'use strict';
-var invariant = require('react/lib/invariant');
+var invariant = require('invariant');
var assign = require('object-assign');
var qs = require('qs');
var paramCompileMatcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|[*.()\[\]\\+|{}^$]/g;
var paramInjectMatcher = /:([a-zA-Z_$][a-zA-Z0-9_$?]*[?]?)|[*]/g;
-var paramInjectTrailingSlashMatcher = /\/\/\?|\/\?\/|\/\?/g;
+var paramInjectTrailingSlashMatcher = /\/\/\?|\/\?\/|\/\?(?![^\/=]+=.*$)/g;
var queryMatcher = /\?(.*)$/;
var _compiledPatterns = {};
@@ -71,9 +71,9 @@ var PathUtils = {
var match = path.match(matcher);
- if (!match) {
- return null;
- }var params = {};
+ if (!match) return null;
+
+ var params = {};
paramNames.forEach(function (paramName, index) {
params[paramName] = match[index + 1];
@@ -143,9 +143,9 @@ var PathUtils = {
var queryString = qs.stringify(query, { arrayFormat: 'brackets' });
- if (queryString) {
- return PathUtils.withoutQuery(path) + '?' + queryString;
- }return PathUtils.withoutQuery(path);
+ if (queryString) return PathUtils.withoutQuery(path) + '?' + queryString;
+
+ return PathUtils.withoutQuery(path);
}
};
diff --git a/node_modules/react-router/lib/PropTypes.js b/node_modules/react-router/lib/PropTypes.js
old mode 100755
new mode 100644
index fdee9be..08d1270
--- a/node_modules/react-router/lib/PropTypes.js
+++ b/node_modules/react-router/lib/PropTypes.js
@@ -10,9 +10,7 @@ var PropTypes = assign({}, ReactPropTypes, {
* Indicates that a prop should be falsy.
*/
falsy: function falsy(props, propName, componentName) {
- if (props[propName]) {
- return new Error('<' + componentName + '> should not have a "' + propName + '" prop');
- }
+ if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop');
},
/**
diff --git a/node_modules/react-router/lib/Redirect.js b/node_modules/react-router/lib/Redirect.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/Route.js b/node_modules/react-router/lib/Route.js
old mode 100755
new mode 100644
index b2d4ac1..50407bc
--- a/node_modules/react-router/lib/Route.js
+++ b/node_modules/react-router/lib/Route.js
@@ -1,56 +1,18 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
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; }; })();
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
var assign = require('react/lib/Object.assign');
-var invariant = require('react/lib/invariant');
-var warning = require('react/lib/warning');
+var invariant = require('invariant');
+var warning = require('./warning');
var PathUtils = require('./PathUtils');
var _currentRoute;
var Route = (function () {
- function Route(name, path, ignoreScrollBehavior, isDefault, isNotFound, onEnter, onLeave, handler) {
- _classCallCheck(this, Route);
-
- this.name = name;
- this.path = path;
- this.paramNames = PathUtils.extractParamNames(this.path);
- this.ignoreScrollBehavior = !!ignoreScrollBehavior;
- this.isDefault = !!isDefault;
- this.isNotFound = !!isNotFound;
- this.onEnter = onEnter;
- this.onLeave = onLeave;
- this.handler = handler;
- }
-
- _createClass(Route, [{
- key: 'appendChild',
-
- /**
- * Appends the given route to this route's child routes.
- */
- value: function appendChild(route) {
- invariant(route instanceof Route, 'route.appendChild must use a valid Route');
-
- if (!this.childRoutes) this.childRoutes = [];
-
- this.childRoutes.push(route);
- }
- }, {
- key: 'toString',
- value: function toString() {
- var string = '';
-
- return string;
- }
- }], [{
+ _createClass(Route, null, [{
key: 'createRoute',
/**
@@ -149,28 +111,26 @@ var Route = (function () {
return route;
}
- }, {
- key: 'createDefaultRoute',
/**
* Creates and returns a route that is rendered when its parent matches
* the current URL.
*/
+ }, {
+ key: 'createDefaultRoute',
value: function createDefaultRoute(options) {
return Route.createRoute(assign({}, options, { isDefault: true }));
}
- }, {
- key: 'createNotFoundRoute',
/**
* Creates and returns a route that is rendered when its parent matches
* the current URL but none of its siblings do.
*/
+ }, {
+ key: 'createNotFoundRoute',
value: function createNotFoundRoute(options) {
return Route.createRoute(assign({}, options, { isNotFound: true }));
}
- }, {
- key: 'createRedirect',
/**
* Creates and returns a route that automatically redirects the transition
@@ -184,6 +144,8 @@ var Route = (function () {
* - query The query to use in the redirect URL. Defaults
* to using the current query
*/
+ }, {
+ key: 'createRedirect',
value: function createRedirect(options) {
return Route.createRoute(assign({}, options, {
path: options.path || options.from || '*',
@@ -194,6 +156,46 @@ var Route = (function () {
}
}]);
+ function Route(name, path, ignoreScrollBehavior, isDefault, isNotFound, onEnter, onLeave, handler) {
+ _classCallCheck(this, Route);
+
+ this.name = name;
+ this.path = path;
+ this.paramNames = PathUtils.extractParamNames(this.path);
+ this.ignoreScrollBehavior = !!ignoreScrollBehavior;
+ this.isDefault = !!isDefault;
+ this.isNotFound = !!isNotFound;
+ this.onEnter = onEnter;
+ this.onLeave = onLeave;
+ this.handler = handler;
+ }
+
+ /**
+ * Appends the given route to this route's child routes.
+ */
+
+ _createClass(Route, [{
+ key: 'appendChild',
+ value: function appendChild(route) {
+ invariant(route instanceof Route, 'route.appendChild must use a valid Route');
+
+ if (!this.childRoutes) this.childRoutes = [];
+
+ this.childRoutes.push(route);
+ }
+ }, {
+ key: 'toString',
+ value: function toString() {
+ var string = '';
+
+ return string;
+ }
+ }]);
+
return Route;
})();
diff --git a/node_modules/react-router/lib/ScrollHistory.js b/node_modules/react-router/lib/ScrollHistory.js
old mode 100755
new mode 100644
index 52a585f..8fbd377
--- a/node_modules/react-router/lib/ScrollHistory.js
+++ b/node_modules/react-router/lib/ScrollHistory.js
@@ -1,16 +1,16 @@
'use strict';
-var invariant = require('react/lib/invariant');
-var canUseDOM = require('react/lib/ExecutionEnvironment').canUseDOM;
+var invariant = require('invariant');
+var canUseDOM = require('can-use-dom');
var getWindowScrollPosition = require('./getWindowScrollPosition');
function shouldUpdateScroll(state, prevState) {
- if (!prevState) {
- return true;
- } // Don't update scroll position when only the query has changed.
- if (state.pathname === prevState.pathname) {
- return false;
- }var routes = state.routes;
+ if (!prevState) return true;
+
+ // Don't update scroll position when only the query has changed.
+ if (state.pathname === prevState.pathname) return false;
+
+ var routes = state.routes;
var prevRoutes = prevState.routes;
var sharedAncestorRoutes = routes.filter(function (route) {
@@ -63,9 +63,9 @@ var ScrollHistory = {
},
_updateScroll: function _updateScroll(prevState) {
- if (!shouldUpdateScroll(this.state, prevState)) {
- return;
- }var scrollBehavior = this.constructor.getScrollBehavior();
+ if (!shouldUpdateScroll(this.state, prevState)) return;
+
+ var scrollBehavior = this.constructor.getScrollBehavior();
if (scrollBehavior) scrollBehavior.updateScrollPosition(this.constructor.getScrollPosition(this.state.path), this.state.action);
}
diff --git a/node_modules/react-router/lib/State.js b/node_modules/react-router/lib/State.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/TestUtils.js b/node_modules/react-router/lib/TestUtils.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/Transition.js b/node_modules/react-router/lib/Transition.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/actions/LocationActions.js b/node_modules/react-router/lib/actions/LocationActions.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/behaviors/ImitateBrowserBehavior.js b/node_modules/react-router/lib/behaviors/ImitateBrowserBehavior.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/behaviors/ScrollToTopBehavior.js b/node_modules/react-router/lib/behaviors/ScrollToTopBehavior.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/components/ActiveHandler.js b/node_modules/react-router/lib/components/ActiveHandler.js
old mode 100755
new mode 100644
index 13844be..b2ec962
--- a/node_modules/react-router/lib/components/ActiveHandler.js
+++ b/node_modules/react-router/lib/components/ActiveHandler.js
@@ -1,10 +1,12 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
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 _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var React = require('react');
var ContextWrapper = require('./ContextWrapper');
@@ -19,15 +21,17 @@ var REF_NAME = '__routeHandler__';
*/
var RouteHandler = (function (_React$Component) {
+ _inherits(RouteHandler, _React$Component);
+
function RouteHandler() {
_classCallCheck(this, RouteHandler);
- if (_React$Component != null) {
- _React$Component.apply(this, arguments);
- }
+ _get(Object.getPrototypeOf(RouteHandler.prototype), 'constructor', this).apply(this, arguments);
}
- _inherits(RouteHandler, _React$Component);
+ // TODO: Include these in the above class definition
+ // once we can use ES7 property initializers.
+ // https://github.com/babel/babel/issues/619
_createClass(RouteHandler, [{
key: 'getChildContext',
@@ -66,9 +70,9 @@ var RouteHandler = (function (_React$Component) {
value: function createChildRouteHandler(props) {
var route = this.context.router.getRouteAtDepth(this.getRouteDepth());
- if (route == null) {
- return null;
- }var childProps = assign({}, props || this.props, {
+ if (route == null) return null;
+
+ var childProps = assign({}, props || this.props, {
ref: REF_NAME,
params: this.context.router.getCurrentParams(),
query: this.context.router.getCurrentQuery()
@@ -92,10 +96,6 @@ var RouteHandler = (function (_React$Component) {
return RouteHandler;
})(React.Component);
-// TODO: Include these in the above class definition
-// once we can use ES7 property initializers.
-// https://github.com/babel/babel/issues/619
-
RouteHandler.contextTypes = {
routeDepth: PropTypes.number.isRequired,
router: PropTypes.router.isRequired
diff --git a/node_modules/react-router/lib/components/ContextWrapper.js b/node_modules/react-router/lib/components/ContextWrapper.js
old mode 100755
new mode 100644
index e92a81a..ad59ddf
--- a/node_modules/react-router/lib/components/ContextWrapper.js
+++ b/node_modules/react-router/lib/components/ContextWrapper.js
@@ -1,30 +1,30 @@
-'use strict';
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
-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 _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
-
/**
* This component is necessary to get around a context warning
* present in React 0.13.0. It sovles this by providing a separation
* between the "owner" and "parent" contexts.
*/
+'use strict';
+
+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 _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
var React = require('react');
var ContextWrapper = (function (_React$Component) {
+ _inherits(ContextWrapper, _React$Component);
+
function ContextWrapper() {
_classCallCheck(this, ContextWrapper);
- if (_React$Component != null) {
- _React$Component.apply(this, arguments);
- }
+ _get(Object.getPrototypeOf(ContextWrapper.prototype), 'constructor', this).apply(this, arguments);
}
- _inherits(ContextWrapper, _React$Component);
-
_createClass(ContextWrapper, [{
key: 'render',
value: function render() {
diff --git a/node_modules/react-router/lib/components/DefaultRoute.js b/node_modules/react-router/lib/components/DefaultRoute.js
old mode 100755
new mode 100644
index 016a2f8..31ca7d3
--- a/node_modules/react-router/lib/components/DefaultRoute.js
+++ b/node_modules/react-router/lib/components/DefaultRoute.js
@@ -1,8 +1,10 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
+var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
-var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var PropTypes = require('../PropTypes');
var RouteHandler = require('./RouteHandler');
@@ -16,23 +18,21 @@ var Route = require('./Route');
*/
var DefaultRoute = (function (_Route) {
+ _inherits(DefaultRoute, _Route);
+
function DefaultRoute() {
_classCallCheck(this, DefaultRoute);
- if (_Route != null) {
- _Route.apply(this, arguments);
- }
+ _get(Object.getPrototypeOf(DefaultRoute.prototype), 'constructor', this).apply(this, arguments);
}
- _inherits(DefaultRoute, _Route);
+ // TODO: Include these in the above class definition
+ // once we can use ES7 property initializers.
+ // https://github.com/babel/babel/issues/619
return DefaultRoute;
})(Route);
-// TODO: Include these in the above class definition
-// once we can use ES7 property initializers.
-// https://github.com/babel/babel/issues/619
-
DefaultRoute.propTypes = {
name: PropTypes.string,
path: PropTypes.falsy,
diff --git a/node_modules/react-router/lib/components/Link.js b/node_modules/react-router/lib/components/Link.js
old mode 100755
new mode 100644
index fdda8f6..49d58d8
--- a/node_modules/react-router/lib/components/Link.js
+++ b/node_modules/react-router/lib/components/Link.js
@@ -1,10 +1,12 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
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 _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var React = require('react');
var assign = require('react/lib/Object.assign');
@@ -38,15 +40,17 @@ function isModifiedEvent(event) {
*/
var Link = (function (_React$Component) {
+ _inherits(Link, _React$Component);
+
function Link() {
_classCallCheck(this, Link);
- if (_React$Component != null) {
- _React$Component.apply(this, arguments);
- }
+ _get(Object.getPrototypeOf(Link.prototype), 'constructor', this).apply(this, arguments);
}
- _inherits(Link, _React$Component);
+ // TODO: Include these in the above class definition
+ // once we can use ES7 property initializers.
+ // https://github.com/babel/babel/issues/619
_createClass(Link, [{
key: 'handleClick',
@@ -56,30 +60,30 @@ var Link = (function (_React$Component) {
if (this.props.onClick) clickResult = this.props.onClick(event);
- if (isModifiedEvent(event) || !isLeftClickEvent(event)) {
- return;
- }if (clickResult === false || event.defaultPrevented === true) allowTransition = false;
+ if (isModifiedEvent(event) || !isLeftClickEvent(event)) return;
+
+ if (clickResult === false || event.defaultPrevented === true) allowTransition = false;
event.preventDefault();
if (allowTransition) this.context.router.transitionTo(this.props.to, this.props.params, this.props.query);
}
- }, {
- key: 'getHref',
/**
* Returns the value of the "href" attribute to use on the DOM element.
*/
+ }, {
+ key: 'getHref',
value: function getHref() {
return this.context.router.makeHref(this.props.to, this.props.params, this.props.query);
}
- }, {
- key: 'getClassName',
/**
* Returns the value of the "class" attribute to use on the DOM element, which contains
* the value of the activeClassName property when this is active.
*/
+ }, {
+ key: 'getClassName',
value: function getClassName() {
var className = this.props.className;
@@ -110,10 +114,6 @@ var Link = (function (_React$Component) {
return Link;
})(React.Component);
-// TODO: Include these in the above class definition
-// once we can use ES7 property initializers.
-// https://github.com/babel/babel/issues/619
-
Link.contextTypes = {
router: PropTypes.router.isRequired
};
diff --git a/node_modules/react-router/lib/components/NotFoundRoute.js b/node_modules/react-router/lib/components/NotFoundRoute.js
old mode 100755
new mode 100644
index a0d00f3..22a7518
--- a/node_modules/react-router/lib/components/NotFoundRoute.js
+++ b/node_modules/react-router/lib/components/NotFoundRoute.js
@@ -1,8 +1,10 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
+var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
-var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var PropTypes = require('../PropTypes');
var RouteHandler = require('./RouteHandler');
@@ -17,23 +19,21 @@ var Route = require('./Route');
*/
var NotFoundRoute = (function (_Route) {
+ _inherits(NotFoundRoute, _Route);
+
function NotFoundRoute() {
_classCallCheck(this, NotFoundRoute);
- if (_Route != null) {
- _Route.apply(this, arguments);
- }
+ _get(Object.getPrototypeOf(NotFoundRoute.prototype), 'constructor', this).apply(this, arguments);
}
- _inherits(NotFoundRoute, _Route);
+ // TODO: Include these in the above class definition
+ // once we can use ES7 property initializers.
+ // https://github.com/babel/babel/issues/619
return NotFoundRoute;
})(Route);
-// TODO: Include these in the above class definition
-// once we can use ES7 property initializers.
-// https://github.com/babel/babel/issues/619
-
NotFoundRoute.propTypes = {
name: PropTypes.string,
path: PropTypes.falsy,
diff --git a/node_modules/react-router/lib/components/Redirect.js b/node_modules/react-router/lib/components/Redirect.js
old mode 100755
new mode 100644
index 0e7cebb..0451a86
--- a/node_modules/react-router/lib/components/Redirect.js
+++ b/node_modules/react-router/lib/components/Redirect.js
@@ -1,8 +1,10 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
+var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
-var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var PropTypes = require('../PropTypes');
var Route = require('./Route');
@@ -13,23 +15,21 @@ var Route = require('./Route');
*/
var Redirect = (function (_Route) {
+ _inherits(Redirect, _Route);
+
function Redirect() {
_classCallCheck(this, Redirect);
- if (_Route != null) {
- _Route.apply(this, arguments);
- }
+ _get(Object.getPrototypeOf(Redirect.prototype), 'constructor', this).apply(this, arguments);
}
- _inherits(Redirect, _Route);
+ // TODO: Include these in the above class definition
+ // once we can use ES7 property initializers.
+ // https://github.com/babel/babel/issues/619
return Redirect;
})(Route);
-// TODO: Include these in the above class definition
-// once we can use ES7 property initializers.
-// https://github.com/babel/babel/issues/619
-
Redirect.propTypes = {
path: PropTypes.string,
from: PropTypes.string, // Alias for path.
diff --git a/node_modules/react-router/lib/components/Route.js b/node_modules/react-router/lib/components/Route.js
old mode 100755
new mode 100644
index 19664f1..dc0b373
--- a/node_modules/react-router/lib/components/Route.js
+++ b/node_modules/react-router/lib/components/Route.js
@@ -1,13 +1,15 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
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 _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var React = require('react');
-var invariant = require('react/lib/invariant');
+var invariant = require('invariant');
var PropTypes = require('../PropTypes');
var RouteHandler = require('./RouteHandler');
@@ -42,7 +44,7 @@ var RouteHandler = require('./RouteHandler');
* var App = React.createClass({
* render: function () {
* return (
- *
+ *
*
*
* );
@@ -53,15 +55,17 @@ var RouteHandler = require('./RouteHandler');
*/
var Route = (function (_React$Component) {
+ _inherits(Route, _React$Component);
+
function Route() {
_classCallCheck(this, Route);
- if (_React$Component != null) {
- _React$Component.apply(this, arguments);
- }
+ _get(Object.getPrototypeOf(Route.prototype), 'constructor', this).apply(this, arguments);
}
- _inherits(Route, _React$Component);
+ // TODO: Include these in the above class definition
+ // once we can use ES7 property initializers.
+ // https://github.com/babel/babel/issues/619
_createClass(Route, [{
key: 'render',
@@ -73,10 +77,6 @@ var Route = (function (_React$Component) {
return Route;
})(React.Component);
-// TODO: Include these in the above class definition
-// once we can use ES7 property initializers.
-// https://github.com/babel/babel/issues/619
-
Route.propTypes = {
name: PropTypes.string,
path: PropTypes.string,
diff --git a/node_modules/react-router/lib/components/RouteHandler.js b/node_modules/react-router/lib/components/RouteHandler.js
old mode 100755
new mode 100644
index 13844be..b2ec962
--- a/node_modules/react-router/lib/components/RouteHandler.js
+++ b/node_modules/react-router/lib/components/RouteHandler.js
@@ -1,10 +1,12 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
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 _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var React = require('react');
var ContextWrapper = require('./ContextWrapper');
@@ -19,15 +21,17 @@ var REF_NAME = '__routeHandler__';
*/
var RouteHandler = (function (_React$Component) {
+ _inherits(RouteHandler, _React$Component);
+
function RouteHandler() {
_classCallCheck(this, RouteHandler);
- if (_React$Component != null) {
- _React$Component.apply(this, arguments);
- }
+ _get(Object.getPrototypeOf(RouteHandler.prototype), 'constructor', this).apply(this, arguments);
}
- _inherits(RouteHandler, _React$Component);
+ // TODO: Include these in the above class definition
+ // once we can use ES7 property initializers.
+ // https://github.com/babel/babel/issues/619
_createClass(RouteHandler, [{
key: 'getChildContext',
@@ -66,9 +70,9 @@ var RouteHandler = (function (_React$Component) {
value: function createChildRouteHandler(props) {
var route = this.context.router.getRouteAtDepth(this.getRouteDepth());
- if (route == null) {
- return null;
- }var childProps = assign({}, props || this.props, {
+ if (route == null) return null;
+
+ var childProps = assign({}, props || this.props, {
ref: REF_NAME,
params: this.context.router.getCurrentParams(),
query: this.context.router.getCurrentQuery()
@@ -92,10 +96,6 @@ var RouteHandler = (function (_React$Component) {
return RouteHandler;
})(React.Component);
-// TODO: Include these in the above class definition
-// once we can use ES7 property initializers.
-// https://github.com/babel/babel/issues/619
-
RouteHandler.contextTypes = {
routeDepth: PropTypes.number.isRequired,
router: PropTypes.router.isRequired
diff --git a/node_modules/react-router/lib/createRouter.js b/node_modules/react-router/lib/createRouter.js
old mode 100755
new mode 100644
index 83216a7..83731f3
--- a/node_modules/react-router/lib/createRouter.js
+++ b/node_modules/react-router/lib/createRouter.js
@@ -2,9 +2,9 @@
'use strict';
var React = require('react');
-var warning = require('react/lib/warning');
-var invariant = require('react/lib/invariant');
-var canUseDOM = require('react/lib/ExecutionEnvironment').canUseDOM;
+var warning = require('./warning');
+var invariant = require('invariant');
+var canUseDOM = require('can-use-dom');
var LocationActions = require('./actions/LocationActions');
var ImitateBrowserBehavior = require('./behaviors/ImitateBrowserBehavior');
var HashLocation = require('./locations/HashLocation');
@@ -35,9 +35,9 @@ var DEFAULT_LOCATION = canUseDOM ? HashLocation : '/';
var DEFAULT_SCROLL_BEHAVIOR = canUseDOM ? ImitateBrowserBehavior : null;
function hasProperties(object, properties) {
- for (var propertyName in properties) if (properties.hasOwnProperty(propertyName) && object[propertyName] !== properties[propertyName]) {
- return false;
- }return true;
+ for (var propertyName in properties) if (properties.hasOwnProperty(propertyName) && object[propertyName] !== properties[propertyName]) return false;
+
+ return true;
}
function hasMatch(routes, route, prevParams, nextParams, prevQuery, nextQuery) {
@@ -81,15 +81,15 @@ function routeIsActive(activeRoutes, routeName) {
}
function paramsAreActive(activeParams, params) {
- for (var property in params) if (String(activeParams[property]) !== String(params[property])) {
- return false;
- }return true;
+ for (var property in params) if (String(activeParams[property]) !== String(params[property])) return false;
+
+ return true;
}
function queryIsActive(activeQuery, query) {
- for (var property in query) if (String(activeQuery[property]) !== String(query[property])) {
- return false;
- }return true;
+ for (var property in query) if (String(activeQuery[property]) !== String(query[property])) return false;
+
+ return true;
}
/**
@@ -301,9 +301,7 @@ function createRouter(options) {
var prevPath = state.path;
var isRefreshing = action == null;
- if (prevPath === path && !isRefreshing) {
- return;
- } // Nothing to do!
+ if (prevPath === path && !isRefreshing) return; // Nothing to do!
// Record the scroll position as early as possible to
// get it before browsers try update it automatically.
@@ -460,9 +458,9 @@ function createRouter(options) {
* Returns true if the given route, params, and query are active.
*/
isActive: function isActive(to, params, query) {
- if (PathUtils.isAbsolute(to)) {
- return to === state.path;
- }return routeIsActive(state.routes, to) && paramsAreActive(state.params, params) && (query == null || queryIsActive(state.query, query));
+ if (PathUtils.isAbsolute(to)) return to === state.path;
+
+ return routeIsActive(state.routes, to) && paramsAreActive(state.params, params) && (query == null || queryIsActive(state.query, query));
}
},
diff --git a/node_modules/react-router/lib/createRoutesFromReactChildren.js b/node_modules/react-router/lib/createRoutesFromReactChildren.js
old mode 100755
new mode 100644
index 8abf8d3..067f4e5
--- a/node_modules/react-router/lib/createRoutesFromReactChildren.js
+++ b/node_modules/react-router/lib/createRoutesFromReactChildren.js
@@ -3,7 +3,7 @@
var React = require('react');
var assign = require('react/lib/Object.assign');
-var warning = require('react/lib/warning');
+var warning = require('./warning');
var DefaultRoute = require('./components/DefaultRoute');
var NotFoundRoute = require('./components/NotFoundRoute');
var Redirect = require('./components/Redirect');
@@ -34,20 +34,20 @@ function createRouteOptions(props) {
}
function createRouteFromReactElement(element) {
- if (!React.isValidElement(element)) {
- return;
- }var type = element.type;
+ if (!React.isValidElement(element)) return;
+
+ var type = element.type;
var props = assign({}, type.defaultProps, element.props);
if (type.propTypes) checkPropTypes(type.displayName, type.propTypes, props);
- if (type === DefaultRoute) {
- return Route.createDefaultRoute(createRouteOptions(props));
- }if (type === NotFoundRoute) {
- return Route.createNotFoundRoute(createRouteOptions(props));
- }if (type === Redirect) {
- return Route.createRedirect(createRouteOptions(props));
- }return Route.createRoute(createRouteOptions(props), function () {
+ if (type === DefaultRoute) return Route.createDefaultRoute(createRouteOptions(props));
+
+ if (type === NotFoundRoute) return Route.createNotFoundRoute(createRouteOptions(props));
+
+ if (type === Redirect) return Route.createRedirect(createRouteOptions(props));
+
+ return Route.createRoute(createRouteOptions(props), function () {
if (props.children) createRoutesFromReactChildren(props.children);
});
}
diff --git a/node_modules/react-router/lib/getWindowScrollPosition.js b/node_modules/react-router/lib/getWindowScrollPosition.js
old mode 100755
new mode 100644
index 10b0705..b0e025e
--- a/node_modules/react-router/lib/getWindowScrollPosition.js
+++ b/node_modules/react-router/lib/getWindowScrollPosition.js
@@ -1,7 +1,7 @@
'use strict';
-var invariant = require('react/lib/invariant');
-var canUseDOM = require('react/lib/ExecutionEnvironment').canUseDOM;
+var invariant = require('invariant');
+var canUseDOM = require('can-use-dom');
/**
* Returns the current scroll position of the window as { x, y }.
diff --git a/node_modules/react-router/lib/index.js b/node_modules/react-router/lib/index.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/isReactChildren.js b/node_modules/react-router/lib/isReactChildren.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/locations/HashLocation.js b/node_modules/react-router/lib/locations/HashLocation.js
old mode 100755
new mode 100644
index 26067da..9cbf68b
--- a/node_modules/react-router/lib/locations/HashLocation.js
+++ b/node_modules/react-router/lib/locations/HashLocation.js
@@ -23,9 +23,9 @@ function notifyChange(type) {
function ensureSlash() {
var path = HashLocation.getCurrentPath();
- if (path.charAt(0) === '/') {
- return true;
- }HashLocation.replace('/' + path);
+ if (path.charAt(0) === '/') return true;
+
+ HashLocation.replace('/' + path);
return false;
}
diff --git a/node_modules/react-router/lib/locations/HistoryLocation.js b/node_modules/react-router/lib/locations/HistoryLocation.js
old mode 100755
new mode 100644
index 5054461..73f3648
--- a/node_modules/react-router/lib/locations/HistoryLocation.js
+++ b/node_modules/react-router/lib/locations/HistoryLocation.js
@@ -18,9 +18,7 @@ function notifyChange(type) {
}
function onPopState(event) {
- if (event.state === undefined) {
- return;
- } // Ignore extraneous popstate events in WebKit.
+ if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.
notifyChange(LocationActions.POP);
}
diff --git a/node_modules/react-router/lib/locations/RefreshLocation.js b/node_modules/react-router/lib/locations/RefreshLocation.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/locations/StaticLocation.js b/node_modules/react-router/lib/locations/StaticLocation.js
old mode 100755
new mode 100644
index e2e14dc..c018d51
--- a/node_modules/react-router/lib/locations/StaticLocation.js
+++ b/node_modules/react-router/lib/locations/StaticLocation.js
@@ -1,10 +1,10 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
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 invariant = require('react/lib/invariant');
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+var invariant = require('invariant');
function throwCannotModify() {
invariant(false, 'You cannot modify a static location');
@@ -23,6 +23,10 @@ var StaticLocation = (function () {
this.path = path;
}
+ // TODO: Include these in the above class definition
+ // once we can use ES7 property initializers.
+ // https://github.com/babel/babel/issues/619
+
_createClass(StaticLocation, [{
key: 'getCurrentPath',
value: function getCurrentPath() {
@@ -38,10 +42,6 @@ var StaticLocation = (function () {
return StaticLocation;
})();
-// TODO: Include these in the above class definition
-// once we can use ES7 property initializers.
-// https://github.com/babel/babel/issues/619
-
StaticLocation.prototype.push = throwCannotModify;
StaticLocation.prototype.replace = throwCannotModify;
StaticLocation.prototype.pop = throwCannotModify;
diff --git a/node_modules/react-router/lib/locations/TestLocation.js b/node_modules/react-router/lib/locations/TestLocation.js
old mode 100755
new mode 100644
index bb02b18..8a76a43
--- a/node_modules/react-router/lib/locations/TestLocation.js
+++ b/node_modules/react-router/lib/locations/TestLocation.js
@@ -1,10 +1,10 @@
'use strict';
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
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 invariant = require('react/lib/invariant');
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+
+var invariant = require('invariant');
var LocationActions = require('../actions/LocationActions');
var History = require('../History');
@@ -18,15 +18,11 @@ var TestLocation = (function () {
this.history = history || [];
this.listeners = [];
+ this.needsDOM = false;
this._updateHistoryLength();
}
_createClass(TestLocation, [{
- key: 'needsDOM',
- get: function () {
- return false;
- }
- }, {
key: '_updateHistoryLength',
value: function _updateHistoryLength() {
History.length = this.history.length;
diff --git a/node_modules/react-router/lib/runRouter.js b/node_modules/react-router/lib/runRouter.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/supportsHistory.js b/node_modules/react-router/lib/supportsHistory.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/lib/warning.js b/node_modules/react-router/lib/warning.js
new file mode 100644
index 0000000..ffda22c
--- /dev/null
+++ b/node_modules/react-router/lib/warning.js
@@ -0,0 +1,59 @@
+/**
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of https://github.com/facebook/react/tree/0.13-stable.
+ * An additional grant of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule warning
+ */
+
+"use strict";
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var __DEV__ = process.env.NODE_ENV !== 'production';
+
+var warning = function warning() {};
+
+if (__DEV__) {
+ warning = function (condition, format) {
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
+ args[_key - 2] = arguments[_key];
+ }
+
+ if (format === undefined) {
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+ }
+
+ if (format.length < 10 || /^[s\W]*$/.test(format)) {
+ throw new Error('The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format);
+ }
+
+ if (format.indexOf('Failed Composite propType: ') === 0) {
+ return; // Ignore CompositeComponent proptype check.
+ }
+
+ if (!condition) {
+ var argIndex = 0;
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
+ return args[argIndex++];
+ });
+ console.warn(message);
+ try {
+ // --- Welcome to debugging React ---
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch (x) {}
+ }
+ };
+}
+
+module.exports = warning;
\ No newline at end of file
diff --git a/node_modules/react-router/node_modules/can-use-dom/.npmignore b/node_modules/react-router/node_modules/can-use-dom/.npmignore
new file mode 100644
index 0000000..59d842b
--- /dev/null
+++ b/node_modules/react-router/node_modules/can-use-dom/.npmignore
@@ -0,0 +1,28 @@
+# Logs
+logs
+*.log
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directory
+# Commenting this out is preferred by some people, see
+# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
+node_modules
+
+# Users Environment Variables
+.lock-wscript
diff --git a/node_modules/react-router/node_modules/can-use-dom/LICENSE b/node_modules/react-router/node_modules/can-use-dom/LICENSE
new file mode 100644
index 0000000..1d4da86
--- /dev/null
+++ b/node_modules/react-router/node_modules/can-use-dom/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Kiran Abburi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/node_modules/react-router/node_modules/can-use-dom/index.js b/node_modules/react-router/node_modules/can-use-dom/index.js
new file mode 100644
index 0000000..d9ef82c
--- /dev/null
+++ b/node_modules/react-router/node_modules/can-use-dom/index.js
@@ -0,0 +1,7 @@
+var canUseDOM = !!(
+ typeof window !== 'undefined' &&
+ window.document &&
+ window.document.createElement
+);
+
+module.exports = canUseDOM;
\ No newline at end of file
diff --git a/node_modules/react-router/node_modules/can-use-dom/package.json b/node_modules/react-router/node_modules/can-use-dom/package.json
new file mode 100644
index 0000000..920031d
--- /dev/null
+++ b/node_modules/react-router/node_modules/can-use-dom/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "can-use-dom",
+ "version": "0.1.0",
+ "description": "Test if you can use dom in the current environment",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/akiran/can-use-dom.git"
+ },
+ "keywords": [
+ "isomorphic"
+ ],
+ "author": {
+ "name": "Kiran Abburi"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/akiran/can-use-dom/issues"
+ },
+ "homepage": "https://github.com/akiran/can-use-dom",
+ "devDependencies": {
+ "jsdom": "^3.1.0",
+ "mocha": "^2.1.0",
+ "should": "^4.6.3"
+ },
+ "gitHead": "0d49ab2adaacdd6c0160c6aafd474be4904a2e52",
+ "_id": "can-use-dom@0.1.0",
+ "_shasum": "22cc4a34a0abc43950f42c6411024a3f6366b45a",
+ "_from": "can-use-dom@0.1.0",
+ "_npmVersion": "2.1.3",
+ "_nodeVersion": "0.10.26",
+ "_npmUser": {
+ "name": "akiran",
+ "email": "kiran.coder0@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "akiran",
+ "email": "kiran.coder0@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "22cc4a34a0abc43950f42c6411024a3f6366b45a",
+ "tarball": "http://registry.npmjs.org/can-use-dom/-/can-use-dom-0.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/can-use-dom/-/can-use-dom-0.1.0.tgz"
+}
diff --git a/node_modules/react-router/node_modules/can-use-dom/test.js b/node_modules/react-router/node_modules/can-use-dom/test.js
new file mode 100644
index 0000000..70a3c8d
--- /dev/null
+++ b/node_modules/react-router/node_modules/can-use-dom/test.js
@@ -0,0 +1,20 @@
+var should = require('should');
+// var jsdom = require('jsdom');
+
+describe('canUseDOM', function () {
+ it('should return false in nodejs environment', function (done) {
+ var canUseDOM = require('./index');
+ canUseDOM.should.be.false;
+ done();
+ });
+
+ // it('should return true in browser', function (done) {
+ // jsdom.env('', function (err, window) {
+ // global.document = jsdom.jsdom('');
+ // global.window = document.defaultView;
+ // var canUseDOM = require('./index');
+ // canUseDOM.should.be.true;
+ // done();
+ // });
+ // });
+});
\ No newline at end of file
diff --git a/node_modules/react-router/node_modules/invariant/CHANGELOG.md b/node_modules/react-router/node_modules/invariant/CHANGELOG.md
new file mode 100644
index 0000000..5326f1a
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/CHANGELOG.md
@@ -0,0 +1,33 @@
+2.1.1 / 2015-09-20
+==================
+
+ * Use correct SPDX license.
+ * Test "browser.js" using browserify.
+ * Switch from "envify" to "loose-envify".
+
+2.1.0 / 2015-06-03
+==================
+
+ * Add "envify" as a dependency.
+ * Fixed license field in "package.json".
+
+2.0.0 / 2015-02-21
+==================
+
+ * Switch to using the "browser" field. There are now browser and server versions that respect the "format" in production.
+
+1.0.2 / 2014-09-24
+==================
+
+ * Added tests, npmignore and gitignore.
+ * Clarifications in README.
+
+1.0.1 / 2014-09-24
+==================
+
+ * Actually include 'invariant.js'.
+
+1.0.0 / 2014-09-24
+==================
+
+ * Initial release.
diff --git a/node_modules/react-router/node_modules/invariant/README.md b/node_modules/react-router/node_modules/invariant/README.md
new file mode 100644
index 0000000..813ee26
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/README.md
@@ -0,0 +1,35 @@
+# invariant
+
+[![Build Status](https://travis-ci.org/zertosh/invariant.svg?branch=master)](https://travis-ci.org/zertosh/invariant)
+
+A mirror of Facebook's `invariant` (e.g. [React](https://github.com/facebook/react/blob/v0.13.3/src/vendor/core/invariant.js), [flux](https://github.com/facebook/flux/blob/2.0.2/src/invariant.js)).
+
+## Install
+
+With [npm](http://npmjs.org) do:
+
+```sh
+npm install invariant
+```
+
+## `invariant(condition, message)`
+
+```js
+var invariant = require('invariant');
+
+invariant(someTruthyVal, 'This will not throw');
+// No errors
+
+invariant(someFalseyVal, 'This will throw an error with this message');
+// Error: Invariant Violation: This will throw an error with this message
+```
+
+**Note:** When `process.env.NODE_ENV` is not `production`, the message is required. If omitted, `invariant` will throw regardless of the truthiness of the condition. When `process.env.NODE_ENV` is `production`, the message is optional – so they can be minified away.
+
+### Browser
+
+When used with [browserify](https://github.com/substack/node-browserify), it'll use `browser.js` (instead of `invariant.js`) and the [envify](https://github.com/hughsk/envify) transform will inline the value of `process.env.NODE_ENV`.
+
+### Node
+
+The node version is optimized around the performance implications of accessing `process.env`. The value of `process.env.NODE_ENV` is cached, and repeatedly used instead of reading `proces.env`. See [Server rendering is slower with npm react #812](https://github.com/facebook/react/issues/812)
diff --git a/node_modules/react-router/node_modules/invariant/browser.js b/node_modules/react-router/node_modules/invariant/browser.js
new file mode 100644
index 0000000..29ead50
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/browser.js
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+'use strict';
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var invariant = function(condition, format, a, b, c, d, e, f) {
+ if (process.env.NODE_ENV !== 'production') {
+ if (format === undefined) {
+ throw new Error('invariant requires an error message argument');
+ }
+ }
+
+ if (!condition) {
+ var error;
+ if (format === undefined) {
+ error = new Error(
+ 'Minified exception occurred; use the non-minified dev environment ' +
+ 'for the full error message and additional helpful warnings.'
+ );
+ } else {
+ var args = [a, b, c, d, e, f];
+ var argIndex = 0;
+ error = new Error(
+ format.replace(/%s/g, function() { return args[argIndex++]; })
+ );
+ error.name = 'Invariant Violation';
+ }
+
+ error.framesToPop = 1; // we don't care about invariant's own frame
+ throw error;
+ }
+};
+
+module.exports = invariant;
diff --git a/node_modules/react-router/node_modules/invariant/invariant.js b/node_modules/react-router/node_modules/invariant/invariant.js
new file mode 100644
index 0000000..fce2a95
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/invariant.js
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+'use strict';
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var __DEV__ = process.env.NODE_ENV !== 'production';
+
+var invariant = function(condition, format, a, b, c, d, e, f) {
+ if (__DEV__) {
+ if (format === undefined) {
+ throw new Error('invariant requires an error message argument');
+ }
+ }
+
+ if (!condition) {
+ var error;
+ if (format === undefined) {
+ error = new Error(
+ 'Minified exception occurred; use the non-minified dev environment ' +
+ 'for the full error message and additional helpful warnings.'
+ );
+ } else {
+ var args = [a, b, c, d, e, f];
+ var argIndex = 0;
+ error = new Error(
+ format.replace(/%s/g, function() { return args[argIndex++]; })
+ );
+ error.name = 'Invariant Violation';
+ }
+
+ error.framesToPop = 1; // we don't care about invariant's own frame
+ throw error;
+ }
+};
+
+module.exports = invariant;
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/.npmignore b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/.npmignore
new file mode 100644
index 0000000..cbc25da
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/.npmignore
@@ -0,0 +1,3 @@
+bench/
+test/
+.travis.yml
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/README.md b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/README.md
new file mode 100644
index 0000000..5f038f1
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/README.md
@@ -0,0 +1,45 @@
+# loose-envify
+
+[![Build Status](https://travis-ci.org/zertosh/loose-envify.svg?branch=master)](https://travis-ci.org/zertosh/loose-envify)
+
+Fast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster.
+
+## Gotchas
+
+* Doesn't handle broken syntax.
+* Doesn't look inside embedded expressions in template strings.
+ - **this won't work:**
+ ```js
+ console.log(`the current env is ${process.env.NODE_ENV}`);
+ ```
+* Doesn't replace oddly-spaced or oddly-commented expressions.
+ - **this won't work:**
+ ```js
+ console.log(process./*won't*/env./*work*/NODE_ENV);
+ ```
+
+## Usage/Options
+
+loose-envify has the exact same interface as [envify](https://github.com/hughsk/envify).
+
+## Benchmark
+
+```
+envify:
+
+ $ for i in {1..5}; do node bench/bench.js 'envify'; done
+ 708ms
+ 727ms
+ 791ms
+ 719ms
+ 720ms
+
+loose-envify:
+
+ $ for i in {1..5}; do node bench/bench.js '../'; done
+ 51ms
+ 52ms
+ 52ms
+ 52ms
+ 52ms
+```
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/custom.js b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/custom.js
new file mode 100644
index 0000000..3a87148
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/custom.js
@@ -0,0 +1,2 @@
+// envify compatibility
+module.exports = require('./loose-envify');
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/index.js b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/index.js
new file mode 100644
index 0000000..23a3279
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/index.js
@@ -0,0 +1 @@
+module.exports = require('./loose-envify')(process.env);
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/loose-envify.js b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/loose-envify.js
new file mode 100644
index 0000000..b5a5be2
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/loose-envify.js
@@ -0,0 +1,36 @@
+'use strict';
+
+var stream = require('stream');
+var util = require('util');
+var replace = require('./replace');
+
+var jsonExtRe = /\.json$/;
+
+module.exports = function(rootEnv) {
+ rootEnv = rootEnv || process.env;
+ return function (file, trOpts) {
+ if (jsonExtRe.test(file)) {
+ return stream.PassThrough();
+ }
+ var envs = trOpts ? [rootEnv, trOpts] : [rootEnv];
+ return new LooseEnvify(envs);
+ };
+};
+
+function LooseEnvify(envs) {
+ stream.Transform.call(this);
+ this._data = '';
+ this._envs = envs;
+}
+util.inherits(LooseEnvify, stream.Transform);
+
+LooseEnvify.prototype._transform = function(buf, enc, cb) {
+ this._data += buf;
+ cb();
+};
+
+LooseEnvify.prototype._flush = function(cb) {
+ var replaced = replace(this._data, this._envs);
+ this.push(replaced);
+ cb();
+};
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/LICENSE b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/LICENSE
new file mode 100644
index 0000000..f2500e9
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014, 2015 Simon Lydell
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/changelog.md b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/changelog.md
new file mode 100644
index 0000000..7a92a50
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/changelog.md
@@ -0,0 +1,65 @@
+### Version 1.0.2 (2015-10-18) ###
+
+- Improved: Limited npm package contents for a smaller download. Thanks to
+ @zertosh!
+
+
+### Version 1.0.1 (2015-06-20) ###
+
+- Fixed: Declared an undeclared variable.
+
+
+### Version 1.0.0 (2015-02-26) ###
+
+- Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That
+ type is now equivalent to the Punctuator token in the ECMAScript
+ specification. (Backwards-incompatible change.)
+- Fixed: A `-` followed by a number is now correctly matched as a punctuator
+ followed by a number. It used to be matched as just a number, but there is no
+ such thing as negative number literals. (Possibly backwards-incompatible
+ change.)
+
+
+### Version 0.4.1 (2015-02-21) ###
+
+- Added: Support for the regex `u` flag.
+
+
+### Version 0.4.0 (2015-02-21) ###
+
+- Improved: `jsTokens.matchToToken` performance.
+- Added: Support for octal and binary number literals.
+- Added: Support for template strings.
+
+
+### Version 0.3.1 (2015-01-06) ###
+
+- Fixed: Support for unicode spaces. They used to be allowed in names (which is
+ very confusing), and some unicode newlines were wrongly allowed in strings and
+ regexes.
+
+
+### Version 0.3.0 (2014-12-19) ###
+
+- Changed: The `jsTokens.names` array has been replaced with the
+ `jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no
+ longer part of the public API; instead use said function. See this [gist] for
+ an example. (Backwards-incompatible change.)
+- Changed: The empty string is now considered an “invalid” token, instead an
+ “empty” token (its own group). (Backwards-incompatible change.)
+- Removed: component support. (Backwards-incompatible change.)
+
+[gist]: https://gist.github.com/lydell/be49dbf80c382c473004
+
+
+### Version 0.2.0 (2014-06-19) ###
+
+- Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own
+ category (“functionArrow”), for simplicity. (Backwards-incompatible change.)
+- Added: ES6 splats (`...`) are now matched as an operator (instead of three
+ punctuations). (Backwards-incompatible change.)
+
+
+### Version 0.1.0 (2014-03-08) ###
+
+- Initial release.
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/index.js b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/index.js
new file mode 100644
index 0000000..f3969e9
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/index.js
@@ -0,0 +1,19 @@
+// Copyright 2014, 2015 Simon Lydell
+// X11 (“MIT”) Licensed. (See LICENSE.)
+
+// This regex comes from regex.coffee, and is inserted here by generate-index.js
+// (run `npm run build`).
+module.exports = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g
+
+module.exports.matchToToken = function(match) {
+ var token = {type: "invalid", value: match[0]}
+ if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4])
+ else if (match[ 5]) token.type = "comment"
+ else if (match[ 6]) token.type = "comment", token.closed = !!match[7]
+ else if (match[ 8]) token.type = "regex"
+ else if (match[ 9]) token.type = "number"
+ else if (match[10]) token.type = "name"
+ else if (match[11]) token.type = "punctuator"
+ else if (match[12]) token.type = "whitespace"
+ return token
+}
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/package.json b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/package.json
new file mode 100644
index 0000000..80c2064
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/package.json
@@ -0,0 +1,61 @@
+{
+ "name": "js-tokens",
+ "version": "1.0.2",
+ "author": {
+ "name": "Simon Lydell"
+ },
+ "license": "MIT",
+ "description": "A regex that tokenizes JavaScript.",
+ "keywords": [
+ "JavaScript",
+ "js",
+ "token",
+ "tokenize",
+ "regex"
+ ],
+ "files": [
+ "index.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lydell/js-tokens.git"
+ },
+ "scripts": {
+ "test": "mocha --ui tdd",
+ "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js",
+ "build": "node generate-index.js",
+ "dev": "npm run build && npm test"
+ },
+ "devDependencies": {
+ "coffee-script": "~1.9.3",
+ "esprima": "^2.3.0",
+ "everything.js": "^1.0.3",
+ "mocha": "^2.2.5"
+ },
+ "gitHead": "90f0f0a217984625180414763234c923aeee4af5",
+ "bugs": {
+ "url": "https://github.com/lydell/js-tokens/issues"
+ },
+ "homepage": "https://github.com/lydell/js-tokens#readme",
+ "_id": "js-tokens@1.0.2",
+ "_shasum": "8647f7e13f64ac15d9357a59a346c804d53b3efe",
+ "_from": "js-tokens@^1.0.1",
+ "_npmVersion": "2.14.7",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "name": "lydell",
+ "email": "simon.lydell@gmail.com"
+ },
+ "dist": {
+ "shasum": "8647f7e13f64ac15d9357a59a346c804d53b3efe",
+ "tarball": "http://registry.npmjs.org/js-tokens/-/js-tokens-1.0.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "lydell",
+ "email": "simon.lydell@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.2.tgz"
+}
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/readme.md b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/readme.md
new file mode 100644
index 0000000..d53b466
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/node_modules/js-tokens/readme.md
@@ -0,0 +1,204 @@
+Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.png?branch=master)](https://travis-ci.org/lydell/js-tokens)
+========
+
+A regex that tokenizes JavaScript.
+
+```js
+var jsTokens = require("js-tokens")
+
+var jsString = "var foo=opts.foo;\n..."
+
+jsString.match(jsTokens)
+// ["var", " ", "foo", "=", "opts", ".", "foo", ";", "\n", ...]
+```
+
+
+Installation
+============
+
+- `npm install js-tokens`
+
+```js
+var jsTokens = require("js-tokens")
+```
+
+
+Usage
+=====
+
+### `jsTokens` ###
+
+A regex with the `g` flag that matches JavaScript tokens.
+
+The regex _always_ matches, even invalid JavaScript and the empty string.
+
+The next match is always directly after the previous.
+
+### `var token = jsTokens.matchToToken(match)` ###
+
+Takes a `match` returned by `jsTokens.exec(string)`, and returns a `{type:
+String, value: String}` object. The following types are available:
+
+- string
+- comment
+- regex
+- number
+- name
+- punctuator
+- whitespace
+- invalid
+
+Multi-line comments and strings also have a `closed` property indicating if the
+token was closed or not (see below).
+
+Comments and strings both come in several flavors. To distinguish them, check if
+the token starts with `//`, `/*`, `'`, `"` or `` ` ``.
+
+Names are ECMAScript IdentifierNames, that is, including both identifiers and
+keywords. You may use [is-keyword-js] to tell them apart.
+
+Whitespace includes both line terminators and other whitespace.
+
+For example usage, please see this [gist].
+
+[is-keyword-js]: https://github.com/crissdev/is-keyword-js
+[gist]: https://gist.github.com/lydell/be49dbf80c382c473004
+
+
+Invalid code handling
+=====================
+
+Unterminated strings are still matched as strings. JavaScript strings cannot
+contain (unescaped) newlines, so unterminated strings simply end at the end of
+the line. Unterminated template strings can contain unescaped newlines, though,
+so they go on to the end of input.
+
+Unterminated multi-line comments are also still matched as comments. They
+simply go on to the end of the input.
+
+Unterminated regex literals are likely matched as division and whatever is
+inside the regex.
+
+Invalid ASCII characters have their own capturing group.
+
+Invalid non-ASCII characters are treated as names, to simplify the matching of
+names (except unicode spaces which are treated as whitespace).
+
+Regex literals may contain invalid regex syntax. They are still matched as
+regex literals. They may also contain repeated regex flags, to keep the regex
+simple.
+
+Strings may contain invalid escape sequences.
+
+
+Limitations
+===========
+
+Tokenizing JavaScript using regexes—in fact, _one single regex_—won’t be
+perfect. But that’s not the point either.
+
+You may compare jsTokens with [esprima] by using `esprima-compare.js`.
+See `npm run esprima-compare`!
+
+[esprima]: http://esprima.org/
+
+### Template string interpolation ###
+
+Template strings are matched as single tokens, from the starting `` ` `` to the
+ending `` ` ``, including interpolations (whose tokens are not matched
+individually).
+
+Matching template string interpolations requires recursive balancing of `{` and
+`}`—something that JavaScript regexes cannot do. Only one level of nesting is
+supported.
+
+### Division and regex literals collision ###
+
+Consider this example:
+
+```js
+var g = 9.82
+var number = bar / 2/g
+
+var regex = / 2/g
+```
+
+A human can easily understand that in the `number` line we’re dealing with
+division, and in the `regex` line we’re dealing with a regex literal. How come?
+Because humans can look at the whole code to put the `/` characters in context.
+A JavaScript regex cannot. It only sees forwards.
+
+When the `jsTokens` regex scans throught the above, it will see the following
+at the end of both the `number` and `regex` rows:
+
+```js
+/ 2/g
+```
+
+It is then impossible to know if that is a regex literal, or part of an
+expression dealing with division.
+
+Here is a similar case:
+
+```js
+foo /= 2/g
+foo(/= 2/g)
+```
+
+The first line divides the `foo` variable with `2/g`. The second line calls the
+`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only
+sees forwards, it cannot tell the two cases apart.
+
+There are some cases where we _can_ tell division and regex literals apart,
+though.
+
+First off, we have the simple cases where there’s only one slash in the line:
+
+```js
+var foo = 2/g
+foo /= 2
+```
+
+Regex literals cannot contain newlines, so the above cases are correctly
+identified as division. Things are only problematic when there are more than
+one non-comment slash in a single line.
+
+Secondly, not every character is a valid regex flag.
+
+```js
+var number = bar / 2/e
+```
+
+The above example is also correctly identified as division, because `e` is not a
+valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`
+(any letter) as flags, but it is not worth it since it increases the amount of
+ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are
+allowed. This means that the above example will be identified as division as
+long as you don’t rename the `e` variable to some permutation of `gmiyu` 1 to 5
+characters long.
+
+Lastly, we can look _forward_ for information.
+
+- If the token following what looks like a regex literal is not valid after a
+ regex literal, but is valid in a division expression, then the regex literal
+ is treated as division instead. For example, a flagless regex cannot be
+ followed by a string, number or name, but all of those three can be the
+ denominator of a division.
+- Generally, if what looks like a regex literal is followed by an operator, the
+ regex literal is treated as division instead. This is because regexes are
+ seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division
+ could likely be part of such an expression.
+
+Please consult the regex source and the test cases for precise information on
+when regex or division is matched (should you need to know). In short, you
+could sum it up as:
+
+If the end of a statement looks like a regex literal (even if it isn’t), it
+will be treated as one. Otherwise it should work as expected (if you write sane
+code).
+
+
+License
+=======
+
+[The X11 (“MIT”) License](LICENSE).
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/package.json b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/package.json
new file mode 100644
index 0000000..b6fa2c9
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "loose-envify",
+ "version": "1.1.0",
+ "description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST",
+ "keywords": [
+ "environment",
+ "variables",
+ "browserify",
+ "browserify-transform",
+ "transform",
+ "source",
+ "configuration"
+ ],
+ "homepage": "https://github.com/zertosh/loose-envify",
+ "license": "MIT",
+ "author": {
+ "name": "Andres Suarez",
+ "email": "zertosh@gmail.com"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/zertosh/loose-envify.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "dependencies": {
+ "js-tokens": "^1.0.1"
+ },
+ "devDependencies": {
+ "browserify": "^11.0.1",
+ "envify": "^3.4.0",
+ "tap": "^1.4.0"
+ },
+ "gitHead": "f536f4fdbde317d77827ac8655c6c8473928b9e1",
+ "bugs": {
+ "url": "https://github.com/zertosh/loose-envify/issues"
+ },
+ "_id": "loose-envify@1.1.0",
+ "_shasum": "527582d62cff4e04da3f9976c7110d3392ec7e0c",
+ "_from": "loose-envify@^1.0.0",
+ "_npmVersion": "2.14.4",
+ "_nodeVersion": "4.1.2",
+ "_npmUser": {
+ "name": "zertosh",
+ "email": "zertosh@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "zertosh",
+ "email": "zertosh@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "527582d62cff4e04da3f9976c7110d3392ec7e0c",
+ "tarball": "http://registry.npmjs.org/loose-envify/-/loose-envify-1.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.1.0.tgz"
+}
diff --git a/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/replace.js b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/replace.js
new file mode 100644
index 0000000..a5ccbe3
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/node_modules/loose-envify/replace.js
@@ -0,0 +1,65 @@
+'use strict';
+
+var jsTokens = require('js-tokens');
+
+var processEnvRe = /\bprocess\.env\.[_$a-zA-Z][$\w]+\b/;
+var spaceOrCommentRe = /^(?:\s|\/[/*])/;
+
+function replace(src, envs) {
+ if (!processEnvRe.test(src)) {
+ return src;
+ }
+
+ var out = '';
+ var purge = envs.some(function(env) {
+ return env._ && env._.indexOf('purge') !== -1;
+ });
+
+ jsTokens.lastIndex = 0
+ var parts = src.match(jsTokens);
+
+ for (var i = 0; i < parts.length; i++) {
+ if (parts[i ] === 'process' &&
+ parts[i + 1] === '.' &&
+ parts[i + 2] === 'env' &&
+ parts[i + 3] === '.') {
+ var prevCodeToken = getAdjacentCodeToken(-1, parts, i);
+ var nextCodeToken = getAdjacentCodeToken(1, parts, i + 4);
+ var replacement = getReplacementString(envs, parts[i + 4], purge);
+ if (prevCodeToken !== '.' &&
+ nextCodeToken !== '.' &&
+ nextCodeToken !== '=' &&
+ typeof replacement === 'string') {
+ out += replacement;
+ i += 4;
+ continue;
+ }
+ }
+ out += parts[i];
+ }
+
+ return out;
+}
+
+function getAdjacentCodeToken(dir, parts, i) {
+ while (true) {
+ var part = parts[i += dir];
+ if (!spaceOrCommentRe.test(part)) {
+ return part;
+ }
+ }
+}
+
+function getReplacementString(envs, name, purge) {
+ for (var j = 0; j < envs.length; j++) {
+ var env = envs[j];
+ if (typeof env[name] !== 'undefined') {
+ return JSON.stringify(env[name]);
+ }
+ }
+ if (purge) {
+ return 'undefined';
+ }
+}
+
+module.exports = replace;
diff --git a/node_modules/react-router/node_modules/invariant/package.json b/node_modules/react-router/node_modules/invariant/package.json
new file mode 100644
index 0000000..30cf562
--- /dev/null
+++ b/node_modules/react-router/node_modules/invariant/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "invariant",
+ "version": "2.2.0",
+ "description": "invariant",
+ "keywords": [
+ "test"
+ ],
+ "license": "BSD-3-Clause",
+ "author": {
+ "name": "Andres Suarez",
+ "email": "zertosh@gmail.com"
+ },
+ "files": [
+ "invariant.js",
+ "browser.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zertosh/invariant.git"
+ },
+ "scripts": {
+ "test": "NODE_ENV=production tap test/*.js && NODE_ENV=development tap test/*.js"
+ },
+ "dependencies": {
+ "loose-envify": "^1.0.0"
+ },
+ "devDependencies": {
+ "browserify": "^11.0.1",
+ "tap": "^1.4.0"
+ },
+ "main": "invariant.js",
+ "browser": "browser.js",
+ "browserify": {
+ "transform": [
+ "loose-envify"
+ ]
+ },
+ "gitHead": "1660eab9f183183e71ef57a7765bb1121680fff9",
+ "bugs": {
+ "url": "https://github.com/zertosh/invariant/issues"
+ },
+ "homepage": "https://github.com/zertosh/invariant#readme",
+ "_id": "invariant@2.2.0",
+ "_shasum": "c8d7e847366a49cc18b622f058a689d481e895f2",
+ "_from": "invariant@^2.0.0",
+ "_npmVersion": "2.14.7",
+ "_nodeVersion": "4.2.2",
+ "_npmUser": {
+ "name": "zertosh",
+ "email": "zertosh@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "zertosh",
+ "email": "zertosh@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "c8d7e847366a49cc18b622f058a689d481e895f2",
+ "tarball": "http://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz"
+}
diff --git a/node_modules/react-router/node_modules/object-assign/index.js b/node_modules/react-router/node_modules/object-assign/index.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/object-assign/license b/node_modules/react-router/node_modules/object-assign/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/react-router/node_modules/object-assign/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/react-router/node_modules/object-assign/package.json b/node_modules/react-router/node_modules/object-assign/package.json
old mode 100755
new mode 100644
index b03ee5a..235a003
--- a/node_modules/react-router/node_modules/object-assign/package.json
+++ b/node_modules/react-router/node_modules/object-assign/package.json
@@ -1,11 +1,11 @@
{
"name": "object-assign",
- "version": "2.0.0",
+ "version": "2.1.1",
"description": "ES6 Object.assign() ponyfill",
"license": "MIT",
"repository": {
"type": "git",
- "url": "git+https://github.com/sindresorhus/object-assign.git"
+ "url": "https://github.com/sindresorhus/object-assign"
},
"author": {
"name": "Sindre Sorhus",
@@ -43,26 +43,25 @@
"url": "https://github.com/sindresorhus/object-assign/issues"
},
"homepage": "https://github.com/sindresorhus/object-assign",
- "_id": "object-assign@2.0.0",
- "_shasum": "f8309b09083b01261ece3ef7373f2b57b8dd7042",
- "_from": "object-assign@>=2.0.0 <3.0.0",
- "_npmVersion": "2.1.5",
- "_nodeVersion": "0.10.32",
+ "_id": "object-assign@2.1.1",
+ "_shasum": "43c36e5d569ff8e4816c4efa8be02d26967c18aa",
+ "_from": "object-assign@^2.0.0",
+ "_npmVersion": "2.10.1",
+ "_nodeVersion": "0.12.4",
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
+ "dist": {
+ "shasum": "43c36e5d569ff8e4816c4efa8be02d26967c18aa",
+ "tarball": "http://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz"
+ },
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
- "dist": {
- "shasum": "f8309b09083b01261ece3ef7373f2b57b8dd7042",
- "tarball": "http://registry.npmjs.org/object-assign/-/object-assign-2.0.0.tgz"
- },
"directories": {},
- "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz"
}
diff --git a/node_modules/react-router/node_modules/object-assign/readme.md b/node_modules/react-router/node_modules/object-assign/readme.md
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/qs/.jshintignore b/node_modules/react-router/node_modules/qs/.jshintignore
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/qs/.jshintrc b/node_modules/react-router/node_modules/qs/.jshintrc
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/qs/.npmignore b/node_modules/react-router/node_modules/qs/.npmignore
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/qs/.travis.yml b/node_modules/react-router/node_modules/qs/.travis.yml
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/qs/CHANGELOG.md b/node_modules/react-router/node_modules/qs/CHANGELOG.md
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/qs/CONTRIBUTING.md b/node_modules/react-router/node_modules/qs/CONTRIBUTING.md
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/qs/Makefile b/node_modules/react-router/node_modules/qs/Makefile
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/qs/index.js b/node_modules/react-router/node_modules/qs/index.js
old mode 100755
new mode 100644
diff --git a/node_modules/react-router/node_modules/qs/package.json b/node_modules/react-router/node_modules/qs/package.json
old mode 100755
new mode 100644
index 4cf67cf..4ccd458
--- a/node_modules/react-router/node_modules/qs/package.json
+++ b/node_modules/react-router/node_modules/qs/package.json
@@ -14,7 +14,7 @@
},
"repository": {
"type": "git",
- "url": "git+https://github.com/hapijs/qs.git"
+ "url": "https://github.com/hapijs/qs.git"
},
"keywords": [
"querystring",
@@ -54,6 +54,5 @@
"tarball": "http://registry.npmjs.org/qs/-/qs-2.4.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/qs/-/qs-2.4.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/qs/-/qs-2.4.1.tgz"
}
diff --git a/node_modules/react-router/package.json b/node_modules/react-router/package.json
old mode 100755
new mode 100644
index 60509c7..b803840
--- a/node_modules/react-router/package.json
+++ b/node_modules/react-router/package.json
@@ -1,11 +1,11 @@
{
"name": "react-router",
- "version": "0.13.3",
+ "version": "0.13.5",
"description": "A complete routing library for React.js",
"main": "lib",
"repository": {
"type": "git",
- "url": "https://github.com/rackt/react-router.git"
+ "url": "git+https://github.com/rackt/react-router.git"
},
"homepage": "https://github.com/rackt/react-router/blob/latest/README.md",
"bugs": {
@@ -17,9 +17,11 @@
],
"license": "MIT",
"peerDependencies": {
- "react": "0.13.x"
+ "react": "0.13.x||0.14.x"
},
"dependencies": {
+ "can-use-dom": "0.1.0",
+ "invariant": "^2.0.0",
"object-assign": "^2.0.0",
"qs": "2.4.1"
},
@@ -35,13 +37,13 @@
"routes",
"router"
],
- "_id": "react-router@0.13.3",
+ "_id": "react-router@0.13.5",
"scripts": {},
- "_shasum": "95455dd19d2c04c7b2957ff7fccda76031ac29b1",
- "_from": "react-router@>=0.13.2 <0.14.0",
- "_resolved": "https://registry.npmjs.org/react-router/-/react-router-0.13.3.tgz",
- "_npmVersion": "2.5.1",
- "_nodeVersion": "0.12.0",
+ "_shasum": "02e3e2821c1a38d0573733ab1abfb1c388516733",
+ "_from": "react-router@0.13.5",
+ "_resolved": "https://registry.npmjs.org/react-router/-/react-router-0.13.5.tgz",
+ "_npmVersion": "3.3.10",
+ "_nodeVersion": "4.2.1",
"_npmUser": {
"name": "ryanflorence",
"email": "rpflorence@gmail.com"
@@ -57,8 +59,8 @@
}
],
"dist": {
- "shasum": "95455dd19d2c04c7b2957ff7fccda76031ac29b1",
- "tarball": "http://registry.npmjs.org/react-router/-/react-router-0.13.3.tgz"
+ "shasum": "02e3e2821c1a38d0573733ab1abfb1c388516733",
+ "tarball": "http://registry.npmjs.org/react-router/-/react-router-0.13.5.tgz"
},
"directories": {}
}
diff --git a/node_modules/react-router/umd/ReactRouter.js b/node_modules/react-router/umd/ReactRouter.js
old mode 100755
new mode 100644
index 81b8307..c73f480
--- a/node_modules/react-router/umd/ReactRouter.js
+++ b/node_modules/react-router/umd/ReactRouter.js
@@ -7,45 +7,45 @@
exports["ReactRouter"] = factory(require("react"));
else
root["ReactRouter"] = factory(root["React"]);
-})(this, function(__WEBPACK_EXTERNAL_MODULE_21__) {
+})(this, function(__WEBPACK_EXTERNAL_MODULE_4__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
-/******/
+
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
-/******/
+
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
-/******/
+
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
-/******/
+
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
+
/******/ // Flag the module as loaded
/******/ module.loaded = true;
-/******/
+
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
-/******/
-/******/
+
+
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
-/******/
+
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
-/******/
+
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
-/******/
+
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
@@ -57,34 +57,34 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
exports.DefaultRoute = __webpack_require__(1);
- exports.Link = __webpack_require__(2);
- exports.NotFoundRoute = __webpack_require__(3);
- exports.Redirect = __webpack_require__(4);
- exports.Route = __webpack_require__(5);
- exports.ActiveHandler = __webpack_require__(6);
+ exports.Link = __webpack_require__(18);
+ exports.NotFoundRoute = __webpack_require__(19);
+ exports.Redirect = __webpack_require__(20);
+ exports.Route = __webpack_require__(17);
+ exports.ActiveHandler = __webpack_require__(15);
exports.RouteHandler = exports.ActiveHandler;
- exports.HashLocation = __webpack_require__(7);
- exports.HistoryLocation = __webpack_require__(8);
- exports.RefreshLocation = __webpack_require__(9);
- exports.StaticLocation = __webpack_require__(10);
- exports.TestLocation = __webpack_require__(11);
+ exports.HashLocation = __webpack_require__(21);
+ exports.HistoryLocation = __webpack_require__(25);
+ exports.RefreshLocation = __webpack_require__(26);
+ exports.StaticLocation = __webpack_require__(27);
+ exports.TestLocation = __webpack_require__(28);
- exports.ImitateBrowserBehavior = __webpack_require__(12);
- exports.ScrollToTopBehavior = __webpack_require__(13);
+ exports.ImitateBrowserBehavior = __webpack_require__(29);
+ exports.ScrollToTopBehavior = __webpack_require__(30);
- exports.History = __webpack_require__(14);
- exports.Navigation = __webpack_require__(15);
- exports.State = __webpack_require__(16);
+ exports.History = __webpack_require__(23);
+ exports.Navigation = __webpack_require__(31);
+ exports.State = __webpack_require__(32);
- exports.createRoute = __webpack_require__(17).createRoute;
- exports.createDefaultRoute = __webpack_require__(17).createDefaultRoute;
- exports.createNotFoundRoute = __webpack_require__(17).createNotFoundRoute;
- exports.createRedirect = __webpack_require__(17).createRedirect;
- exports.createRoutesFromReactChildren = __webpack_require__(18);
+ exports.createRoute = __webpack_require__(5).createRoute;
+ exports.createDefaultRoute = __webpack_require__(5).createDefaultRoute;
+ exports.createNotFoundRoute = __webpack_require__(5).createNotFoundRoute;
+ exports.createRedirect = __webpack_require__(5).createRedirect;
+ exports.createRoutesFromReactChildren = __webpack_require__(33);
- exports.create = __webpack_require__(19);
- exports.run = __webpack_require__(20);
+ exports.create = __webpack_require__(34);
+ exports.run = __webpack_require__(43);
/***/ },
/* 1 */
@@ -92,13 +92,15 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
+ var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
- var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
- var PropTypes = __webpack_require__(22);
- var RouteHandler = __webpack_require__(6);
- var Route = __webpack_require__(5);
+ function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ var PropTypes = __webpack_require__(2);
+ var RouteHandler = __webpack_require__(15);
+ var Route = __webpack_require__(17);
/**
* A component is a special kind of that
@@ -108,23 +110,21 @@ return /******/ (function(modules) { // webpackBootstrap
*/
var DefaultRoute = (function (_Route) {
+ _inherits(DefaultRoute, _Route);
+
function DefaultRoute() {
_classCallCheck(this, DefaultRoute);
- if (_Route != null) {
- _Route.apply(this, arguments);
- }
+ _get(Object.getPrototypeOf(DefaultRoute.prototype), 'constructor', this).apply(this, arguments);
}
- _inherits(DefaultRoute, _Route);
+ // TODO: Include these in the above class definition
+ // once we can use ES7 property initializers.
+ // https://github.com/babel/babel/issues/619
return DefaultRoute;
})(Route);
- // TODO: Include these in the above class definition
- // once we can use ES7 property initializers.
- // https://github.com/babel/babel/issues/619
-
DefaultRoute.propTypes = {
name: PropTypes.string,
path: PropTypes.falsy,
@@ -144,2435 +144,2016 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
+ var assign = __webpack_require__(3);
+ var ReactPropTypes = __webpack_require__(4).PropTypes;
+ var Route = __webpack_require__(5);
- 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 PropTypes = assign({}, ReactPropTypes, {
- var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+ /**
+ * Indicates that a prop should be falsy.
+ */
+ falsy: function falsy(props, propName, componentName) {
+ if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop');
+ },
- var React = __webpack_require__(21);
- var assign = __webpack_require__(33);
- var PropTypes = __webpack_require__(22);
+ /**
+ * Indicates that a prop should be a Route object.
+ */
+ route: ReactPropTypes.instanceOf(Route),
- function isLeftClickEvent(event) {
- return event.button === 0;
- }
+ /**
+ * Indicates that a prop should be a Router object.
+ */
+ //router: ReactPropTypes.instanceOf(Router) // TODO
+ router: ReactPropTypes.func
- function isModifiedEvent(event) {
- return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
- }
+ });
+
+ module.exports = PropTypes;
+
+/***/ },
+/* 3 */
+/***/ function(module, exports) {
/**
- * components are used to create an element that links to a route.
- * When that route is active, the link gets an "active" class name (or the
- * value of its `activeClassName` prop).
- *
- * For example, assuming you have the following route:
- *
- *
- *
- * You could use the following component to link to that route:
- *
- *
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
*
- * In addition to params, links may pass along query string parameters
- * using the `query` prop.
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
*
- *
+ * @providesModule Object.assign
*/
- var Link = (function (_React$Component) {
- function Link() {
- _classCallCheck(this, Link);
-
- if (_React$Component != null) {
- _React$Component.apply(this, arguments);
- }
- }
-
- _inherits(Link, _React$Component);
-
- _createClass(Link, [{
- key: 'handleClick',
- value: function handleClick(event) {
- var allowTransition = true;
- var clickResult;
-
- if (this.props.onClick) clickResult = this.props.onClick(event);
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign
- if (isModifiedEvent(event) || !isLeftClickEvent(event)) {
- return;
- }if (clickResult === false || event.defaultPrevented === true) allowTransition = false;
+ 'use strict';
- event.preventDefault();
+ function assign(target, sources) {
+ if (target == null) {
+ throw new TypeError('Object.assign target cannot be null or undefined');
+ }
- if (allowTransition) this.context.router.transitionTo(this.props.to, this.props.params, this.props.query);
- }
- }, {
- key: 'getHref',
+ var to = Object(target);
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
- /**
- * Returns the value of the "href" attribute to use on the DOM element.
- */
- value: function getHref() {
- return this.context.router.makeHref(this.props.to, this.props.params, this.props.query);
+ for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
+ var nextSource = arguments[nextIndex];
+ if (nextSource == null) {
+ continue;
}
- }, {
- key: 'getClassName',
-
- /**
- * Returns the value of the "class" attribute to use on the DOM element, which contains
- * the value of the activeClassName property when this is active.
- */
- value: function getClassName() {
- var className = this.props.className;
- if (this.getActiveState()) className += ' ' + this.props.activeClassName;
-
- return className;
- }
- }, {
- key: 'getActiveState',
- value: function getActiveState() {
- return this.context.router.isActive(this.props.to, this.props.params, this.props.query);
- }
- }, {
- key: 'render',
- value: function render() {
- var props = assign({}, this.props, {
- href: this.getHref(),
- className: this.getClassName(),
- onClick: this.handleClick.bind(this)
- });
+ var from = Object(nextSource);
- if (props.activeStyle && this.getActiveState()) props.style = props.activeStyle;
+ // We don't currently support accessors nor proxies. Therefore this
+ // copy cannot throw. If we ever supported this then we must handle
+ // exceptions and side-effects. We don't support symbols so they won't
+ // be transferred.
- return React.DOM.a(props, this.props.children);
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
}
- }]);
-
- return Link;
- })(React.Component);
-
- // TODO: Include these in the above class definition
- // once we can use ES7 property initializers.
- // https://github.com/babel/babel/issues/619
+ }
- Link.contextTypes = {
- router: PropTypes.router.isRequired
- };
+ return to;
+ }
- Link.propTypes = {
- activeClassName: PropTypes.string.isRequired,
- to: PropTypes.oneOfType([PropTypes.string, PropTypes.route]).isRequired,
- params: PropTypes.object,
- query: PropTypes.object,
- activeStyle: PropTypes.object,
- onClick: PropTypes.func
- };
+ module.exports = assign;
- Link.defaultProps = {
- activeClassName: 'active',
- className: ''
- };
+/***/ },
+/* 4 */
+/***/ function(module, exports) {
- module.exports = Link;
+ module.exports = __WEBPACK_EXTERNAL_MODULE_4__;
/***/ },
-/* 3 */
+/* 5 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
-
- var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
-
- var PropTypes = __webpack_require__(22);
- var RouteHandler = __webpack_require__(6);
- var Route = __webpack_require__(5);
-
- /**
- * A is a special kind of that
- * renders when the beginning of its parent's path matches
- * but none of its siblings do, including any .
- * Only one such route may be used at any given level in the
- * route hierarchy.
- */
+ 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 NotFoundRoute = (function (_Route) {
- function NotFoundRoute() {
- _classCallCheck(this, NotFoundRoute);
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
- if (_Route != null) {
- _Route.apply(this, arguments);
- }
- }
+ var assign = __webpack_require__(3);
+ var invariant = __webpack_require__(6);
+ var warning = __webpack_require__(7);
+ var PathUtils = __webpack_require__(8);
- _inherits(NotFoundRoute, _Route);
+ var _currentRoute;
- return NotFoundRoute;
- })(Route);
+ var Route = (function () {
+ _createClass(Route, null, [{
+ key: 'createRoute',
- // TODO: Include these in the above class definition
- // once we can use ES7 property initializers.
- // https://github.com/babel/babel/issues/619
+ /**
+ * Creates and returns a new route. Options may be a URL pathname string
+ * with placeholders for named params or an object with any of the following
+ * properties:
+ *
+ * - name The name of the route. This is used to lookup a
+ * route relative to its parent route and should be
+ * unique among all child routes of the same parent
+ * - path A URL pathname string with optional placeholders
+ * that specify the names of params to extract from
+ * the URL when the path matches. Defaults to `/${name}`
+ * when there is a name given, or the path of the parent
+ * route, or /
+ * - ignoreScrollBehavior True to make this route (and all descendants) ignore
+ * the scroll behavior of the router
+ * - isDefault True to make this route the default route among all
+ * its siblings
+ * - isNotFound True to make this route the "not found" route among
+ * all its siblings
+ * - onEnter A transition hook that will be called when the
+ * router is going to enter this route
+ * - onLeave A transition hook that will be called when the
+ * router is going to leave this route
+ * - handler A React component that will be rendered when
+ * this route is active
+ * - parentRoute The parent route to use for this route. This option
+ * is automatically supplied when creating routes inside
+ * the callback to another invocation of createRoute. You
+ * only ever need to use this when declaring routes
+ * independently of one another to manually piece together
+ * the route hierarchy
+ *
+ * The callback may be used to structure your route hierarchy. Any call to
+ * createRoute, createDefaultRoute, createNotFoundRoute, or createRedirect
+ * inside the callback automatically uses this route as its parent.
+ */
+ value: function createRoute(options, callback) {
+ options = options || {};
- NotFoundRoute.propTypes = {
- name: PropTypes.string,
- path: PropTypes.falsy,
- children: PropTypes.falsy,
- handler: PropTypes.func.isRequired
- };
+ if (typeof options === 'string') options = { path: options };
- NotFoundRoute.defaultProps = {
- handler: RouteHandler
- };
+ var parentRoute = _currentRoute;
- module.exports = NotFoundRoute;
+ if (parentRoute) {
+ warning(options.parentRoute == null || options.parentRoute === parentRoute, 'You should not use parentRoute with createRoute inside another route\'s child callback; it is ignored');
+ } else {
+ parentRoute = options.parentRoute;
+ }
-/***/ },
-/* 4 */
-/***/ function(module, exports, __webpack_require__) {
+ var name = options.name;
+ var path = options.path || name;
- 'use strict';
+ if (path && !(options.isDefault || options.isNotFound)) {
+ if (PathUtils.isAbsolute(path)) {
+ if (parentRoute) {
+ invariant(path === parentRoute.path || parentRoute.paramNames.length === 0, 'You cannot nest path "%s" inside "%s"; the parent requires URL parameters', path, parentRoute.path);
+ }
+ } else if (parentRoute) {
+ // Relative paths extend their parent.
+ path = PathUtils.join(parentRoute.path, path);
+ } else {
+ path = '/' + path;
+ }
+ } else {
+ path = parentRoute ? parentRoute.path : '/';
+ }
- var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
+ if (options.isNotFound && !/\*$/.test(path)) path += '*'; // Auto-append * to the path of not found routes.
- var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+ var route = new Route(name, path, options.ignoreScrollBehavior, options.isDefault, options.isNotFound, options.onEnter, options.onLeave, options.handler);
- var PropTypes = __webpack_require__(22);
- var Route = __webpack_require__(5);
+ if (parentRoute) {
+ if (route.isDefault) {
+ invariant(parentRoute.defaultRoute == null, '%s may not have more than one default route', parentRoute);
- /**
- * A component is a special kind of that always
- * redirects to another route when it matches.
- */
+ parentRoute.defaultRoute = route;
+ } else if (route.isNotFound) {
+ invariant(parentRoute.notFoundRoute == null, '%s may not have more than one not found route', parentRoute);
- var Redirect = (function (_Route) {
- function Redirect() {
- _classCallCheck(this, Redirect);
+ parentRoute.notFoundRoute = route;
+ }
+
+ parentRoute.appendChild(route);
+ }
+
+ // Any routes created in the callback
+ // use this route as their parent.
+ if (typeof callback === 'function') {
+ var currentRoute = _currentRoute;
+ _currentRoute = route;
+ callback.call(route, route);
+ _currentRoute = currentRoute;
+ }
- if (_Route != null) {
- _Route.apply(this, arguments);
+ return route;
}
- }
- _inherits(Redirect, _Route);
+ /**
+ * Creates and returns a route that is rendered when its parent matches
+ * the current URL.
+ */
+ }, {
+ key: 'createDefaultRoute',
+ value: function createDefaultRoute(options) {
+ return Route.createRoute(assign({}, options, { isDefault: true }));
+ }
- return Redirect;
- })(Route);
+ /**
+ * Creates and returns a route that is rendered when its parent matches
+ * the current URL but none of its siblings do.
+ */
+ }, {
+ key: 'createNotFoundRoute',
+ value: function createNotFoundRoute(options) {
+ return Route.createRoute(assign({}, options, { isNotFound: true }));
+ }
- // TODO: Include these in the above class definition
- // once we can use ES7 property initializers.
- // https://github.com/babel/babel/issues/619
+ /**
+ * Creates and returns a route that automatically redirects the transition
+ * to another route. In addition to the normal options to createRoute, this
+ * function accepts the following options:
+ *
+ * - from An alias for the `path` option. Defaults to *
+ * - to The path/route/route name to redirect to
+ * - params The params to use in the redirect URL. Defaults
+ * to using the current params
+ * - query The query to use in the redirect URL. Defaults
+ * to using the current query
+ */
+ }, {
+ key: 'createRedirect',
+ value: function createRedirect(options) {
+ return Route.createRoute(assign({}, options, {
+ path: options.path || options.from || '*',
+ onEnter: function onEnter(transition, params, query) {
+ transition.redirect(options.to, options.params || params, options.query || query);
+ }
+ }));
+ }
+ }]);
- Redirect.propTypes = {
- path: PropTypes.string,
- from: PropTypes.string, // Alias for path.
- to: PropTypes.string,
- handler: PropTypes.falsy
- };
+ function Route(name, path, ignoreScrollBehavior, isDefault, isNotFound, onEnter, onLeave, handler) {
+ _classCallCheck(this, Route);
- // Redirects should not have a default handler
- Redirect.defaultProps = {};
+ this.name = name;
+ this.path = path;
+ this.paramNames = PathUtils.extractParamNames(this.path);
+ this.ignoreScrollBehavior = !!ignoreScrollBehavior;
+ this.isDefault = !!isDefault;
+ this.isNotFound = !!isNotFound;
+ this.onEnter = onEnter;
+ this.onLeave = onLeave;
+ this.handler = handler;
+ }
- module.exports = Redirect;
+ /**
+ * Appends the given route to this route's child routes.
+ */
-/***/ },
-/* 5 */
-/***/ function(module, exports, __webpack_require__) {
+ _createClass(Route, [{
+ key: 'appendChild',
+ value: function appendChild(route) {
+ invariant(route instanceof Route, 'route.appendChild must use a valid Route');
- 'use strict';
+ if (!this.childRoutes) this.childRoutes = [];
+
+ this.childRoutes.push(route);
+ }
+ }, {
+ key: 'toString',
+ value: function toString() {
+ var string = '';
+
+ return string;
+ }
+ }]);
+
+ return Route;
+ })();
- var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+ module.exports = Route;
- var React = __webpack_require__(21);
- var invariant = __webpack_require__(34);
- var PropTypes = __webpack_require__(22);
- var RouteHandler = __webpack_require__(6);
+/***/ },
+/* 6 */
+/***/ function(module, exports, __webpack_require__) {
/**
- * components specify components that are rendered to the page when the
- * URL matches a given pattern.
- *
- * Routes are arranged in a nested tree structure. When a new URL is requested,
- * the tree is searched depth-first to find a route whose path matches the URL.
- * When one is found, all routes in the tree that lead to it are considered
- * "active" and their components are rendered into the DOM, nested in the same
- * order as they are in the tree.
- *
- * The preferred way to configure a router is using JSX. The XML-like syntax is
- * a great way to visualize how routes are laid out in an application.
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
*
- * var routes = [
- *
- *
- *
- *
- *
- * ];
- *
- * Router.run(routes, function (Handler) {
- * React.render(, document.body);
- * });
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
*
- * Handlers for Route components that contain children can render their active
- * child route using a element.
+ * @providesModule invariant
+ */
+
+ 'use strict';
+
+ /**
+ * Use invariant() to assert state which your program assumes to be true.
*
- * var App = React.createClass({
- * render: function () {
- * return (
- *