diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index bfb841d..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-# http://editorconfig.org
-root = true
-
-[*]
-indent_style = space
-indent_size = 2
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[*.md]
-trim_trailing_whitespace = false
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a48cf0d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+public
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..891377e
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "themes/gokarna"]
+ path = themes/gokarna
+ url = https://github.com/526avijitgupta/gokarna
diff --git a/src/node_modules/acorn/dist/.keep b/.hugo_build.lock
similarity index 100%
rename from src/node_modules/acorn/dist/.keep
rename to .hugo_build.lock
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index d368dec..0000000
--- a/.jshintrc
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "node": true,
- "esnext": true,
- "bitwise": true,
- "camelcase": true,
- "curly": true,
- "eqeqeq": true,
- "immed": true,
- "indent": 2,
- "latedef": true,
- "newcap": true,
- "noarg": true,
- "quotmark": "single",
- "undef": true,
- "unused": true,
- "strict": true
-}
diff --git a/README.md b/README.md
index 72a51ae..e6730c9 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,2 @@
# Vertinext
-Source of my Personal Website. Currently this uses React and React-Router.
+Source of my Personal Website. Now using Hugo with the Gokarna theme.
diff --git a/Sitemap b/Sitemap
deleted file mode 100644
index e5212e3..0000000
--- a/Sitemap
+++ /dev/null
@@ -1 +0,0 @@
-http://www.vertinext.com/index.html
diff --git a/archetypes/default.md b/archetypes/default.md
new file mode 100644
index 0000000..c6f3fce
--- /dev/null
+++ b/archetypes/default.md
@@ -0,0 +1,5 @@
++++
+title = '{{ replace .File.ContentBaseName "-" " " | title }}'
+date = {{ .Date }}
+draft = true
++++
diff --git a/content/pages/_index.md b/content/pages/_index.md
new file mode 100644
index 0000000..f471f67
--- /dev/null
+++ b/content/pages/_index.md
@@ -0,0 +1,17 @@
++++
+date = 2024-02-26T01:11:55-05:00
+type = 'page'
+image = 'Test'
++++
+
+# Projects
+A list of projects I've worked on that I like to showcase.
+
+## [PyMoe](https://github.com/ccubed/PyMoe)
+PyMoe started out as a library I used in my AngelBot project to interact with the APIs available at various websites focusing on Anime, Manga, Light Novels, Web Novels, and Visual Novels. It has now become it's own independent project supporting the latest versions of Python 3 and recently updated to include several new services. It has over eighty stars and is currently used in over six hundred projects on Github.
+
+## [Earl](https://github.com/ccubed/Earl)
+Earl also started out as a library to be used in Angelbot, however it later grew into a more general use project. Earl is a C++ extension for Python built against CPython to allow native packing and unpacking of the External Term Format used by Erlang. At the time, this was created to make parsing the ETF data received by Discord faster. Bots made in other languages had a slight speed advantage at parsing ETF. This extension leveled the playing field by utilizing C++ to very quickly serialize ETF into and out of Python objects.
+
+## [Downloop](https://github.com/ccubed/Downloop)
+Downloop was a hobby project to create a Python image host with a built in web interface and API that would allow anyone to programmatically create and distribute a link to a hosted image. Downloop was focused on privacy and kept no data on who uploaded what. Images were not stored by name making them completely anonymous and all images were returned as binary data. It was able to shard itself automatically to distribute load, direct requests to the correct shard, and separated all stored image data into different root database tables based on shard. This meant that no one shard had a copy of all the images and that shards didn't know what existed between them. It also meant that we had no way to recover an image link if someone lost their initial link given upon image upload.
\ No newline at end of file
diff --git a/hugo.toml b/hugo.toml
new file mode 100644
index 0000000..169baf4
--- /dev/null
+++ b/hugo.toml
@@ -0,0 +1,53 @@
+baseURL = 'https://www.vertinext.com'
+defaultContentLanguage = 'en-us'
+languageCode = 'en-us'
+title = 'Charles Click'
+theme = 'gokarna'
+enableRobotsTXT = true
+
+[menu]
+ [[menu.main]]
+ identifier = 'home'
+ url = '/'
+ pre = ' '
+ post = ''
+ name = 'Home'
+ weight = 1
+ [[menu.main]]
+ identifier = 'projects'
+ url = '/pages/'
+ pre = ' '
+ post = ''
+ name = 'Projects'
+ weight = 2
+ [[menu.main]]
+ identifier = 'github'
+ url = 'https://www.github.com/ccubed'
+ weight = 3
+ pre = ' '
+ name = 'Github'
+ [[menu.main]]
+ identifier = 'keybase'
+ url = 'https://keybase.io/cclick'
+ weight = 4
+ pre = ' '
+ name = 'Keybase'
+ [[menu.main]]
+ identifier = 'resume'
+ url = 'https://drive.google.com/file/d/1xIWfZk8b3xa9ygUxurgAyUwHblPE_CrB/view?usp=sharing'
+ weight = 5
+ pre = ' '
+ name = 'Resume'
+
+[params]
+ avatarURL = '/images/Avatar.jpg'
+ avatarSize = 'size-m'
+ description = 'Sometimes I ask the computer to do things'
+ footer = 'Charles Click @ vertinext.com'
+ socialIcons = [
+ {name = 'linkedin', url = 'https://www.linkedin.com/in/charles-click-b078a959/'},
+ {name = 'mastodon', url = 'https://mastodon.social/@RoryEjinn'},
+ {name = 'twitch', url = 'https://www.twitch.tv/teshiko'},
+ {name = 'email', url = 'ccubed.techno@gmail.com'}
+ ]
+ metaKeywords = ['vertinext', 'charles click', 'portfolio', 'cooper']
\ No newline at end of file
diff --git a/src/App/Components/BlogPost.js b/src/App/Components/BlogPost.js
deleted file mode 100644
index a10c1df..0000000
--- a/src/App/Components/BlogPost.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import React from 'react';
-import Spinner from 'react-spinkit';
-
-class BlogPost extends React.Component {
-
- render(){
-
- return(
Specific Post );
-
- }
-
-}
-
-module.exports = BlogPost;
diff --git a/src/App/Components/GitItem.js b/src/App/Components/GitItem.js
deleted file mode 100644
index 408bac0..0000000
--- a/src/App/Components/GitItem.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import React from 'react';
-import Spinner from 'react-spinkit';
-
-class Gititem extends React.Component {
-
- constructor(props){
-
- super();
-
- }
-
- render() {
-
- var repoNodes = [];
-
- if( this.props.data.length > 0 ){
-
- this.props.data.forEach(function(repo){
-
- repoNodes.push(
-
- {repo.name}
- {repo.description ? repo.description : "No description given."}
-
- );
-
- });
-
- }
-
- return repoNodes.length > 0 ? () : ( );
-
- }
-}
-
-module.exports = Gititem;
diff --git a/src/App/Components/GitListing.js b/src/App/Components/GitListing.js
deleted file mode 100644
index 705ffeb..0000000
--- a/src/App/Components/GitListing.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import React from 'react';
-import GitItem from './GitItem';
-
-class GitListing extends React.Component {
-
- constructor(props){
-
- super(props);
- this.state = {data: []};
-
- }
-
- loadGitRepos(){
-
- $.ajax({
- url: "https://api.github.com/users/ccubed/repos",
- dataType: 'json',
- success: (data) =>{
- this.setState({data: data});
- },
- error: (xhr, status, err) => {
- console.error("api.github.com", status, err.toString());
- }
- });
-
- }
-
- componentDidMount(){
-
- this.loadGitRepos();
-
- }
-
- render(){
-
- return ()
-
- }
-
-}
-
-module.exports = GitListing;
diff --git a/src/App/Components/HostLists.js b/src/App/Components/HostLists.js
deleted file mode 100644
index 88f6273..0000000
--- a/src/App/Components/HostLists.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import React from 'react';
-
-class HostLists extends React.Component {
-
-render(){
-
- return(
-
-
- )
-
-}
-
-}
-
-module.exports = HostLists;
diff --git a/src/App/Components/Menu.js b/src/App/Components/Menu.js
deleted file mode 100644
index abf35e2..0000000
--- a/src/App/Components/Menu.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react';
-import MenuItem from './MenuItem';
-
-class Menu extends React.Component {
- render() {
- return (
-
-
-
- );
- }
-}
-
-module.exports = Menu;
diff --git a/src/App/Components/MenuItem.js b/src/App/Components/MenuItem.js
deleted file mode 100644
index 883e950..0000000
--- a/src/App/Components/MenuItem.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import React from 'react';
-import {Link} from 'react-router';
-
-class MenuItem extends React.Component {
- render() {
- return (
-
-
- {this.props.text}
-
-
- );
- }
-}
-
-module.exports = MenuItem;
diff --git a/src/App/Components/RecentPosts.js b/src/App/Components/RecentPosts.js
deleted file mode 100644
index f4719ca..0000000
--- a/src/App/Components/RecentPosts.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import React from 'react';
-import Spinner from 'react-spinkit';
-
-class RecentPosts extends React.Component {
-
- render(){
-
- return(Recent Posts );
-
- }
-
-}
-
-module.exports = RecentPosts;
diff --git a/src/App/Core/App.js b/src/App/Core/App.js
deleted file mode 100644
index 8ea46b3..0000000
--- a/src/App/Core/App.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import React from 'react';
-import Router from 'react-router';
-import routes from './Routes';
-
-Router.run(routes, (Handler) => React.render( , document.body));
diff --git a/src/App/Core/Layout.js b/src/App/Core/Layout.js
deleted file mode 100644
index 4a4bb83..0000000
--- a/src/App/Core/Layout.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import React from 'react';
-import Router from 'react-router';
-var {RouteHandler} = Router;
-
-import Menu from '../Components/Menu';
-
-class App extends React.Component {
- render() {
- return (
-
-
-
-
- );
- }
-}
-
-module.exports = App;
diff --git a/src/App/Core/Routes.js b/src/App/Core/Routes.js
deleted file mode 100644
index 9c94ad9..0000000
--- a/src/App/Core/Routes.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import React from 'react';
-import Router from 'react-router';
-var {DefaultRoute, Route} = Router;
-
-import Layout from './Layout';
-import Home from '../Views/Home';
-import Gitrepos from '../Views/Gitrepos';
-import Hosts from '../Views/Hosts';
-import Blog from '../Views/Blog';
-
-var routes = (
-
-
-
-
-
-
-);
-
-module.exports = routes;
diff --git a/src/App/Views/Blog.js b/src/App/Views/Blog.js
deleted file mode 100644
index 6289198..0000000
--- a/src/App/Views/Blog.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import React from 'react';
-import BlogPost from '../Components/BlogPost';
-import RecentPosts from '../Components/RecentPosts';
-
-class Blog extends React.Component {
- render() {
- return (
-
- );
- }
-}
-
-module.exports = Blog;
diff --git a/src/App/Views/Gitrepos.js b/src/App/Views/Gitrepos.js
deleted file mode 100644
index 264afe6..0000000
--- a/src/App/Views/Gitrepos.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import React from 'react';
-import GitListing from '../Components/GitListing';
-
-class Gitrepos extends React.Component {
- render() {
- return (
-
- );
- }
-}
-
-module.exports = Gitrepos;
diff --git a/src/App/Views/Home.js b/src/App/Views/Home.js
deleted file mode 100644
index a0318df..0000000
--- a/src/App/Views/Home.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from 'react';
-
-class Home extends React.Component {
- render() {
- return (
-
-
-
-
-
-
Charles C Click
- Email:
CharlesClick@vertinext.com
- Skillset: Web Development
- This Website:
React and
Materialize
-
- I am a coder and web developer in Knoxville, TN, who also hosts websites, games and other services through a personal server. There is a list of my Github repositories and currently hosted games and services available on other pages.
-
-
-
-
-
-
-
- );
- }
-}
-
-module.exports = Home;
diff --git a/src/App/Views/Hosts.js b/src/App/Views/Hosts.js
deleted file mode 100644
index 56423c8..0000000
--- a/src/App/Views/Hosts.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import React from 'react';
-import HostLists from '../Components/HostLists';
-
-class Hosts extends React.Component {
- render() {
- return (
-
- );
- }
-}
-
-module.exports = Hosts;
diff --git a/src/App/app.js b/src/App/app.js
deleted file mode 100644
index 38226c9..0000000
--- a/src/App/app.js
+++ /dev/null
@@ -1 +0,0 @@
-import './Core/App';
diff --git a/src/App/index.html b/src/App/index.html
deleted file mode 100644
index dba13d3..0000000
--- a/src/App/index.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Charles Click
-
-
-
-
-
-
-
-
-
diff --git a/src/build/app.js b/src/build/app.js
deleted file mode 100644
index 8942ef1..0000000
--- a/src/build/app.js
+++ /dev/null
@@ -1,24120 +0,0 @@
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0) {
-
- this.props.data.forEach(function (repo) {
-
- repoNodes.push(_react2['default'].createElement(
- 'li',
- { className: 'collection-item avatar' },
- _react2['default'].createElement('img', { className: 'circle', src: repo.owner.avatar_url, alt: repo.owner.login }),
- _react2['default'].createElement(
- 'span',
- { className: 'title' },
- _react2['default'].createElement(
- 'a',
- { href: repo.html_url },
- repo.name
- )
- ),
- _react2['default'].createElement(
- 'p',
- null,
- repo.description ? repo.description : "No description given."
- ),
- _react2['default'].createElement(
- 'a',
- { href: repo.forks_url, className: 'secondary-content' },
- _react2['default'].createElement('i', { className: 'fa fa-code-fork fa-2x' })
- )
- ));
- });
- }
-
- return repoNodes.length > 0 ? _react2['default'].createElement(
- 'ul',
- { className: 'collection' },
- repoNodes
- ) : _react2['default'].createElement(_reactSpinkit2['default'], { spinnerName: 'three-bounce' });
- }
- }]);
-
- return Gititem;
-})(_react2['default'].Component);
-
-module.exports = Gititem;
-
-},{"react":227,"react-spinkit":72}],3:[function(require,module,exports){
-'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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var _GitItem = require('./GitItem');
-
-var _GitItem2 = _interopRequireDefault(_GitItem);
-
-var GitListing = (function (_React$Component) {
- _inherits(GitListing, _React$Component);
-
- function GitListing(props) {
- _classCallCheck(this, GitListing);
-
- _get(Object.getPrototypeOf(GitListing.prototype), 'constructor', this).call(this, props);
- this.state = { data: [] };
- }
-
- _createClass(GitListing, [{
- key: 'loadGitRepos',
- value: function loadGitRepos() {
- var _this = this;
-
- $.ajax({
- url: "https://api.github.com/users/ccubed/repos",
- dataType: 'json',
- success: function success(data) {
- _this.setState({ data: data });
- },
- error: function error(xhr, status, err) {
- console.error("api.github.com", status, err.toString());
- }
- });
- }
- }, {
- key: 'componentDidMount',
- value: function componentDidMount() {
-
- this.loadGitRepos();
- }
- }, {
- key: 'render',
- value: function render() {
-
- return _react2['default'].createElement(
- 'div',
- { className: 'container' },
- _react2['default'].createElement(
- 'div',
- { className: 'row' },
- _react2['default'].createElement(
- 'div',
- { className: 'col s6 m12' },
- _react2['default'].createElement(_GitItem2['default'], { data: this.state.data })
- )
- )
- );
- }
- }]);
-
- return GitListing;
-})(_react2['default'].Component);
-
-module.exports = GitListing;
-
-},{"./GitItem":2,"react":227}],4:[function(require,module,exports){
-"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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var HostLists = (function (_React$Component) {
- _inherits(HostLists, _React$Component);
-
- function HostLists() {
- _classCallCheck(this, HostLists);
-
- _get(Object.getPrototypeOf(HostLists.prototype), "constructor", this).apply(this, arguments);
- }
-
- _createClass(HostLists, [{
- key: "render",
- value: function render() {
-
- return _react2["default"].createElement(
- "table",
- { className: "highlight centered" },
- _react2["default"].createElement(
- "thead",
- null,
- _react2["default"].createElement(
- "tr",
- null,
- _react2["default"].createElement(
- "th",
- { "data-field": "url" },
- "URL"
- ),
- _react2["default"].createElement(
- "th",
- { "data-field": "desc" },
- "Description"
- )
- )
- ),
- _react2["default"].createElement(
- "tbody",
- null,
- _react2["default"].createElement(
- "tr",
- null,
- _react2["default"].createElement(
- "td",
- null,
- _react2["default"].createElement(
- "a",
- { href: "https://www.vertinext.com" },
- "www.vertinext.com"
- )
- ),
- _react2["default"].createElement(
- "td",
- null,
- "This Website"
- )
- ),
- _react2["default"].createElement(
- "tr",
- null,
- _react2["default"].createElement(
- "td",
- null,
- _react2["default"].createElement(
- "a",
- { href: "https://kingsmouth.vertinext.com" },
- "kingsmouth.vertinext.com"
- )
- ),
- _react2["default"].createElement(
- "td",
- null,
- "Website built for a now defunct text game. Acted as an admin interface."
- )
- ),
- _react2["default"].createElement(
- "tr",
- null,
- _react2["default"].createElement(
- "td",
- null,
- _react2["default"].createElement(
- "a",
- { href: "https://safehaven.vertinext.com" },
- "safehaven.vertinext.com"
- )
- ),
- _react2["default"].createElement(
- "td",
- null,
- "Wiki for a text game"
- )
- ),
- _react2["default"].createElement(
- "tr",
- null,
- _react2["default"].createElement(
- "td",
- null,
- _react2["default"].createElement(
- "a",
- { href: "https://welltrackr.vertinext.com" },
- "welltrackr.vertinext.com"
- )
- ),
- _react2["default"].createElement(
- "td",
- null,
- "Mock health tracking website made for family that never got used"
- )
- ),
- _react2["default"].createElement(
- "tr",
- null,
- _react2["default"].createElement(
- "td",
- null,
- _react2["default"].createElement(
- "a",
- { href: "http://git.vertinext.com" },
- "git.vertinext.com"
- )
- ),
- _react2["default"].createElement(
- "td",
- null,
- "Personal gitlab server"
- )
- ),
- _react2["default"].createElement(
- "tr",
- null,
- _react2["default"].createElement(
- "td",
- null,
- _react2["default"].createElement(
- "a",
- { href: "http://radialblur.vertinext.com" },
- "radialblur.vertinext.com"
- )
- ),
- _react2["default"].createElement(
- "td",
- null,
- "Django website for a text based game"
- )
- )
- )
- );
- }
- }]);
-
- return HostLists;
-})(_react2["default"].Component);
-
-module.exports = HostLists;
-
-},{"react":227}],5:[function(require,module,exports){
-'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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var _MenuItem = require('./MenuItem');
-
-var _MenuItem2 = _interopRequireDefault(_MenuItem);
-
-var Menu = (function (_React$Component) {
- _inherits(Menu, _React$Component);
-
- function Menu() {
- _classCallCheck(this, Menu);
-
- _get(Object.getPrototypeOf(Menu.prototype), 'constructor', this).apply(this, arguments);
- }
-
- _createClass(Menu, [{
- key: 'render',
- value: function render() {
- return _react2['default'].createElement(
- 'nav',
- null,
- _react2['default'].createElement(
- 'div',
- { 'class': 'nav-wrapper' },
- _react2['default'].createElement(
- 'ul',
- { 'class': 'left' },
- _react2['default'].createElement(_MenuItem2['default'], { route: 'app', text: 'Home' }),
- _react2['default'].createElement(_MenuItem2['default'], { route: 'gitrepos', text: 'Github Repos' }),
- _react2['default'].createElement(_MenuItem2['default'], { route: 'hosting', text: 'Hosting' }),
- _react2['default'].createElement(_MenuItem2['default'], { route: 'blog', text: 'Blog' })
- )
- )
- );
- }
- }]);
-
- return Menu;
-})(_react2['default'].Component);
-
-module.exports = Menu;
-
-},{"./MenuItem":6,"react":227}],6:[function(require,module,exports){
-'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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var _reactRouter = require('react-router');
-
-var MenuItem = (function (_React$Component) {
- _inherits(MenuItem, _React$Component);
-
- function MenuItem() {
- _classCallCheck(this, MenuItem);
-
- _get(Object.getPrototypeOf(MenuItem.prototype), 'constructor', this).apply(this, arguments);
- }
-
- _createClass(MenuItem, [{
- key: 'render',
- value: function render() {
- return _react2['default'].createElement(
- 'li',
- null,
- _react2['default'].createElement(
- _reactRouter.Link,
- { to: this.props.route },
- this.props.text
- )
- );
- }
- }]);
-
- return MenuItem;
-})(_react2['default'].Component);
-
-module.exports = MenuItem;
-
-},{"react":227,"react-router":45}],7:[function(require,module,exports){
-'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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var _reactSpinkit = require('react-spinkit');
-
-var _reactSpinkit2 = _interopRequireDefault(_reactSpinkit);
-
-var RecentPosts = (function (_React$Component) {
- _inherits(RecentPosts, _React$Component);
-
- function RecentPosts() {
- _classCallCheck(this, RecentPosts);
-
- _get(Object.getPrototypeOf(RecentPosts.prototype), 'constructor', this).apply(this, arguments);
- }
-
- _createClass(RecentPosts, [{
- key: 'render',
- value: function render() {
-
- return _react2['default'].createElement(
- 'h3',
- null,
- 'Recent Posts'
- );
- }
- }]);
-
- return RecentPosts;
-})(_react2['default'].Component);
-
-module.exports = RecentPosts;
-
-},{"react":227,"react-spinkit":72}],8:[function(require,module,exports){
-'use strict';
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-var _react = require('react');
-
-var _react2 = _interopRequireDefault(_react);
-
-var _reactRouter = require('react-router');
-
-var _reactRouter2 = _interopRequireDefault(_reactRouter);
-
-var _Routes = require('./Routes');
-
-var _Routes2 = _interopRequireDefault(_Routes);
-
-_reactRouter2['default'].run(_Routes2['default'], function (Handler) {
- return _react2['default'].render(_react2['default'].createElement(Handler, null), document.body);
-});
-
-},{"./Routes":10,"react":227,"react-router":45}],9:[function(require,module,exports){
-'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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var _reactRouter = require('react-router');
-
-var _reactRouter2 = _interopRequireDefault(_reactRouter);
-
-var _ComponentsMenu = require('../Components/Menu');
-
-var _ComponentsMenu2 = _interopRequireDefault(_ComponentsMenu);
-
-var RouteHandler = _reactRouter2['default'].RouteHandler;
-
-var App = (function (_React$Component) {
- _inherits(App, _React$Component);
-
- function App() {
- _classCallCheck(this, App);
-
- _get(Object.getPrototypeOf(App.prototype), 'constructor', this).apply(this, arguments);
- }
-
- _createClass(App, [{
- key: 'render',
- value: function render() {
- return _react2['default'].createElement(
- 'div',
- null,
- _react2['default'].createElement(_ComponentsMenu2['default'], null),
- _react2['default'].createElement(RouteHandler, null)
- );
- }
- }]);
-
- return App;
-})(_react2['default'].Component);
-
-module.exports = App;
-
-},{"../Components/Menu":5,"react":227,"react-router":45}],10:[function(require,module,exports){
-'use strict';
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-var _react = require('react');
-
-var _react2 = _interopRequireDefault(_react);
-
-var _reactRouter = require('react-router');
-
-var _reactRouter2 = _interopRequireDefault(_reactRouter);
-
-var _Layout = require('./Layout');
-
-var _Layout2 = _interopRequireDefault(_Layout);
-
-var _ViewsHome = require('../Views/Home');
-
-var _ViewsHome2 = _interopRequireDefault(_ViewsHome);
-
-var _ViewsGitrepos = require('../Views/Gitrepos');
-
-var _ViewsGitrepos2 = _interopRequireDefault(_ViewsGitrepos);
-
-var _ViewsHosts = require('../Views/Hosts');
-
-var _ViewsHosts2 = _interopRequireDefault(_ViewsHosts);
-
-var _ViewsBlog = require('../Views/Blog');
-
-var _ViewsBlog2 = _interopRequireDefault(_ViewsBlog);
-
-var DefaultRoute = _reactRouter2['default'].DefaultRoute;
-var Route = _reactRouter2['default'].Route;
-
-var routes = _react2['default'].createElement(
- Route,
- { name: 'app', path: '/', handler: _Layout2['default'] },
- _react2['default'].createElement(Route, { name: 'gitrepos', path: 'gitrepos', handler: _ViewsGitrepos2['default'] }),
- _react2['default'].createElement(Route, { name: 'hosting', path: 'hosting', handler: _ViewsHosts2['default'] }),
- _react2['default'].createElement(Route, { name: 'blog', path: 'blog', handler: _ViewsBlog2['default'] }),
- _react2['default'].createElement(DefaultRoute, { handler: _ViewsHome2['default'] })
-);
-
-module.exports = routes;
-
-},{"../Views/Blog":11,"../Views/Gitrepos":12,"../Views/Home":13,"../Views/Hosts":14,"./Layout":9,"react":227,"react-router":45}],11:[function(require,module,exports){
-'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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var _ComponentsBlogPost = require('../Components/BlogPost');
-
-var _ComponentsBlogPost2 = _interopRequireDefault(_ComponentsBlogPost);
-
-var _ComponentsRecentPosts = require('../Components/RecentPosts');
-
-var _ComponentsRecentPosts2 = _interopRequireDefault(_ComponentsRecentPosts);
-
-var Blog = (function (_React$Component) {
- _inherits(Blog, _React$Component);
-
- function Blog() {
- _classCallCheck(this, Blog);
-
- _get(Object.getPrototypeOf(Blog.prototype), 'constructor', this).apply(this, arguments);
- }
-
- _createClass(Blog, [{
- key: 'render',
- value: function render() {
- return _react2['default'].createElement(_ComponentsRecentPosts2['default'], null);
- }
- }]);
-
- return Blog;
-})(_react2['default'].Component);
-
-module.exports = Blog;
-
-},{"../Components/BlogPost":1,"../Components/RecentPosts":7,"react":227}],12:[function(require,module,exports){
-'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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var _ComponentsGitListing = require('../Components/GitListing');
-
-var _ComponentsGitListing2 = _interopRequireDefault(_ComponentsGitListing);
-
-var Gitrepos = (function (_React$Component) {
- _inherits(Gitrepos, _React$Component);
-
- function Gitrepos() {
- _classCallCheck(this, Gitrepos);
-
- _get(Object.getPrototypeOf(Gitrepos.prototype), 'constructor', this).apply(this, arguments);
- }
-
- _createClass(Gitrepos, [{
- key: 'render',
- value: function render() {
- return _react2['default'].createElement(_ComponentsGitListing2['default'], null);
- }
- }]);
-
- return Gitrepos;
-})(_react2['default'].Component);
-
-module.exports = Gitrepos;
-
-},{"../Components/GitListing":3,"react":227}],13:[function(require,module,exports){
-"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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var Home = (function (_React$Component) {
- _inherits(Home, _React$Component);
-
- function Home() {
- _classCallCheck(this, Home);
-
- _get(Object.getPrototypeOf(Home.prototype), "constructor", this).apply(this, arguments);
- }
-
- _createClass(Home, [{
- key: "render",
- value: function render() {
- return _react2["default"].createElement(
- "div",
- { className: "container" },
- _react2["default"].createElement(
- "div",
- { className: "row" },
- _react2["default"].createElement(
- "div",
- { className: "col s12" },
- _react2["default"].createElement(
- "div",
- { className: "card hoverable" },
- _react2["default"].createElement(
- "div",
- { className: "card-content red-text" },
- _react2["default"].createElement(
- "span",
- { className: "card-title red-text" },
- "Charles C Click"
- ),
- _react2["default"].createElement("br", null),
- "Email: ",
- _react2["default"].createElement(
- "a",
- { href: "mailto:CharlesClick@vertinext.com" },
- "CharlesClick@vertinext.com"
- ),
- _react2["default"].createElement("br", null),
- "Skillset: Web Development",
- _react2["default"].createElement("br", null),
- "This Website: ",
- _react2["default"].createElement(
- "a",
- { href: "https://facebook.github.io/react/" },
- "React"
- ),
- " and ",
- _react2["default"].createElement(
- "a",
- { href: "http://materializecss.com/" },
- "Materialize"
- ),
- _react2["default"].createElement("br", null),
- _react2["default"].createElement(
- "blockquote",
- null,
- "I am a coder and web developer in Knoxville, TN, who also hosts websites, games and other services through a personal server. There is a list of my Github repositories and currently hosted games and services available on other pages."
- )
- ),
- _react2["default"].createElement(
- "div",
- { className: "card-action red-text" },
- _react2["default"].createElement(
- "a",
- { href: "https://docs.google.com/document/d/1ykS2_34-GQd0SbrjpG9NbBvq40L62qWxGJc43KAjOD8/edit?usp=sharing" },
- "View Resume"
- )
- )
- )
- )
- )
- );
- }
- }]);
-
- return Home;
-})(_react2["default"].Component);
-
-module.exports = Home;
-
-},{"react":227}],14:[function(require,module,exports){
-'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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
-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 _react2 = _interopRequireDefault(_react);
-
-var _ComponentsHostLists = require('../Components/HostLists');
-
-var _ComponentsHostLists2 = _interopRequireDefault(_ComponentsHostLists);
-
-var Hosts = (function (_React$Component) {
- _inherits(Hosts, _React$Component);
-
- function Hosts() {
- _classCallCheck(this, Hosts);
-
- _get(Object.getPrototypeOf(Hosts.prototype), 'constructor', this).apply(this, arguments);
- }
-
- _createClass(Hosts, [{
- key: 'render',
- value: function render() {
- return _react2['default'].createElement(
- 'div',
- { className: 'container' },
- _react2['default'].createElement(
- 'div',
- { className: 'row' },
- _react2['default'].createElement(
- 'div',
- { className: 'col s12' },
- _react2['default'].createElement(_ComponentsHostLists2['default'], null)
- )
- )
- );
- }
- }]);
-
- return Hosts;
-})(_react2['default'].Component);
-
-module.exports = Hosts;
-
-},{"../Components/HostLists":4,"react":227}],15:[function(require,module,exports){
-'use strict';
-
-require('./Core/App');
-
-},{"./Core/App":8}],16:[function(require,module,exports){
-var canUseDOM = !!(
- typeof window !== 'undefined' &&
- window.document &&
- window.document.createElement
-);
-
-module.exports = canUseDOM;
-},{}],17:[function(require,module,exports){
-/*!
- Copyright (c) 2015 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
-*/
-
-function classNames() {
- var classes = '';
- var arg;
-
- for (var i = 0; i < arguments.length; i++) {
- arg = arguments[i];
- if (!arg) {
- continue;
- }
-
- if ('string' === typeof arg || 'number' === typeof arg) {
- classes += ' ' + arg;
- } else if (Object.prototype.toString.call(arg) === '[object Array]') {
- classes += ' ' + classNames.apply(null, arg);
- } else if ('object' === typeof arg) {
- for (var key in arg) {
- if (!arg.hasOwnProperty(key) || !arg[key]) {
- continue;
- }
- classes += ' ' + key;
- }
- }
- }
- return classes.substr(1);
-}
-
-// safely export classNames for node / browserify
-if (typeof module !== 'undefined' && module.exports) {
- module.exports = classNames;
-}
-
-// safely export classNames for RequireJS
-if (typeof define !== 'undefined' && define.amd) {
- define('classnames', [], function() {
- return classNames;
- });
-}
-
-},{}],18:[function(require,module,exports){
-'use strict'
-
-function injectStyleTag (document, fileName, cb) {
- var style = document.getElementById(fileName)
-
- if (style) {
- cb(style)
- } else {
- var head = document.getElementsByTagName('head')[0]
-
- style = document.createElement('style')
- if (fileName != null) style.id = fileName
- cb(style)
- head.appendChild(style)
- }
-
- return style
-}
-
-module.exports = function (css, customDocument, fileName) {
- var doc = customDocument || document
- /* istanbul ignore if: not supported by Electron */
- if (doc.createStyleSheet) {
- var sheet = doc.createStyleSheet()
- sheet.cssText = css
- return sheet.ownerNode
- } else {
- return injectStyleTag(doc, fileName, function (style) {
- /* istanbul ignore if: not supported by Electron */
- if (style.styleSheet) {
- style.styleSheet.cssText = css
- } else {
- style.innerHTML = css
- }
- })
- }
-}
-
-module.exports.byUrl = function (url) {
- /* istanbul ignore if: not supported by Electron */
- if (document.createStyleSheet) {
- return document.createStyleSheet(url).ownerNode
- } else {
- var head = document.getElementsByTagName('head')[0]
- var link = document.createElement('link')
-
- link.rel = 'stylesheet'
- link.href = url
-
- head.appendChild(link)
- return link
- }
-}
-
-},{}],19:[function(require,module,exports){
-(function (process){
-/**
- * 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;
-
-}).call(this,require('_process'))
-},{"_process":20}],20:[function(require,module,exports){
-// shim for using process in browser
-
-var process = module.exports = {};
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
-
-function cleanUpNextTick() {
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
-}
-
-function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = setTimeout(cleanUpNextTick);
- draining = true;
-
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- clearTimeout(timeout);
-}
-
-process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- setTimeout(drainQueue, 0);
- }
-};
-
-// v8 likes predictible objects
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
-
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
-
-},{}],21:[function(require,module,exports){
-/**
- * Represents a cancellation caused by navigating away
- * before the previous transition has fully resolved.
- */
-"use strict";
-
-function Cancellation() {}
-
-module.exports = Cancellation;
-},{}],22:[function(require,module,exports){
-'use strict';
-
-var invariant = require('invariant');
-var canUseDOM = require('can-use-dom');
-
-var History = {
-
- /**
- * The current number of entries in the history.
- *
- * Note: This property is read-only.
- */
- length: 1,
-
- /**
- * Sends the browser back one entry in the history.
- */
- back: function back() {
- invariant(canUseDOM, 'Cannot use History.back without a DOM');
-
- // Do this first so that History.length will
- // be accurate in location change listeners.
- History.length -= 1;
-
- window.history.back();
- }
-
-};
-
-module.exports = History;
-},{"can-use-dom":16,"invariant":19}],23:[function(require,module,exports){
-/* jshint -W084 */
-'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; }; })();
-
-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) {
- // Check the subtree first to find the most deeply-nested match.
- var childRoutes = route.childRoutes;
- if (childRoutes) {
- var match, childRoute;
- for (var i = 0, len = childRoutes.length; i < len; ++i) {
- childRoute = childRoutes[i];
-
- if (childRoute.isDefault || childRoute.isNotFound) continue; // Check these in order later.
-
- if (match = deepSearch(childRoute, pathname, query)) {
- // A route in the subtree matched! Add this route and we're done.
- match.routes.unshift(route);
- return match;
- }
- }
- }
-
- // 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?
- 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.
- var params = PathUtils.extractParams(route.path, pathname);
- if (params) return new Match(pathname, params, query, [route]);
-
- return null;
-}
-
-var Match = (function () {
- _createClass(Match, null, [{
- key: 'findMatch',
-
- /**
- * Attempts to match depth-first a route in the given route's
- * subtree against the given path and returns the match if it
- * succeeds, null if no match can be made.
- */
- value: function findMatch(routes, path) {
- var pathname = PathUtils.withoutQuery(path);
- var query = PathUtils.extractQuery(path);
- var match = null;
-
- for (var i = 0, len = routes.length; match == null && i < len; ++i) match = deepSearch(routes[i], pathname, query);
-
- return match;
- }
- }]);
-
- function Match(pathname, params, query, routes) {
- _classCallCheck(this, Match);
-
- this.pathname = pathname;
- this.params = params;
- this.query = query;
- this.routes = routes;
- }
-
- return Match;
-})();
-
-module.exports = Match;
-},{"./PathUtils":25}],24:[function(require,module,exports){
-'use strict';
-
-var PropTypes = require('./PropTypes');
-
-/**
- * A mixin for components that modify the URL.
- *
- * Example:
- *
- * var MyLink = React.createClass({
- * mixins: [ Router.Navigation ],
- * handleClick(event) {
- * event.preventDefault();
- * this.transitionTo('aRoute', { the: 'params' }, { the: 'query' });
- * },
- * render() {
- * return (
- * Click me!
- * );
- * }
- * });
- */
-var Navigation = {
-
- contextTypes: {
- router: PropTypes.router.isRequired
- },
-
- /**
- * Returns an absolute URL path created from the given route
- * name, URL parameters, and query values.
- */
- makePath: function makePath(to, params, query) {
- return this.context.router.makePath(to, params, query);
- },
-
- /**
- * Returns a string that may safely be used as the href of a
- * link to the route with the given name.
- */
- makeHref: function makeHref(to, params, query) {
- return this.context.router.makeHref(to, params, query);
- },
-
- /**
- * Transitions to the URL specified in the arguments by pushing
- * a new URL onto the history stack.
- */
- transitionTo: function transitionTo(to, params, query) {
- this.context.router.transitionTo(to, params, query);
- },
-
- /**
- * Transitions to the URL specified in the arguments by replacing
- * the current URL in the history stack.
- */
- replaceWith: function replaceWith(to, params, query) {
- this.context.router.replaceWith(to, params, query);
- },
-
- /**
- * Transitions to the previous URL.
- */
- goBack: function goBack() {
- return this.context.router.goBack();
- }
-
-};
-
-module.exports = Navigation;
-},{"./PropTypes":26}],25:[function(require,module,exports){
-'use strict';
-
-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 queryMatcher = /\?(.*)$/;
-
-var _compiledPatterns = {};
-
-function compilePattern(pattern) {
- if (!(pattern in _compiledPatterns)) {
- var paramNames = [];
- var source = pattern.replace(paramCompileMatcher, function (match, paramName) {
- if (paramName) {
- paramNames.push(paramName);
- return '([^/?#]+)';
- } else if (match === '*') {
- paramNames.push('splat');
- return '(.*?)';
- } else {
- return '\\' + match;
- }
- });
-
- _compiledPatterns[pattern] = {
- matcher: new RegExp('^' + source + '$', 'i'),
- paramNames: paramNames
- };
- }
-
- return _compiledPatterns[pattern];
-}
-
-var PathUtils = {
-
- /**
- * Returns true if the given path is absolute.
- */
- isAbsolute: function isAbsolute(path) {
- return path.charAt(0) === '/';
- },
-
- /**
- * Joins two URL paths together.
- */
- join: function join(a, b) {
- return a.replace(/\/*$/, '/') + b;
- },
-
- /**
- * Returns an array of the names of all parameters in the given pattern.
- */
- extractParamNames: function extractParamNames(pattern) {
- return compilePattern(pattern).paramNames;
- },
-
- /**
- * Extracts the portions of the given URL path that match the given pattern
- * and returns an object of param name => value pairs. Returns null if the
- * pattern does not match the given path.
- */
- extractParams: function extractParams(pattern, path) {
- var _compilePattern = compilePattern(pattern);
-
- var matcher = _compilePattern.matcher;
- var paramNames = _compilePattern.paramNames;
-
- var match = path.match(matcher);
-
- if (!match) return null;
-
- var params = {};
-
- paramNames.forEach(function (paramName, index) {
- params[paramName] = match[index + 1];
- });
-
- return params;
- },
-
- /**
- * Returns a version of the given route path with params interpolated. Throws
- * if there is a dynamic segment of the route path for which there is no param.
- */
- injectParams: function injectParams(pattern, params) {
- params = params || {};
-
- var splatIndex = 0;
-
- return pattern.replace(paramInjectMatcher, function (match, paramName) {
- paramName = paramName || 'splat';
-
- // If param is optional don't check for existence
- if (paramName.slice(-1) === '?') {
- paramName = paramName.slice(0, -1);
-
- if (params[paramName] == null) return '';
- } else {
- invariant(params[paramName] != null, 'Missing "%s" parameter for path "%s"', paramName, pattern);
- }
-
- var segment;
- if (paramName === 'splat' && Array.isArray(params[paramName])) {
- segment = params[paramName][splatIndex++];
-
- invariant(segment != null, 'Missing splat # %s for path "%s"', splatIndex, pattern);
- } else {
- segment = params[paramName];
- }
-
- return segment;
- }).replace(paramInjectTrailingSlashMatcher, '/');
- },
-
- /**
- * Returns an object that is the result of parsing any query string contained
- * in the given path, null if the path contains no query string.
- */
- extractQuery: function extractQuery(path) {
- var match = path.match(queryMatcher);
- return match && qs.parse(match[1]);
- },
-
- /**
- * Returns a version of the given path without the query string.
- */
- withoutQuery: function withoutQuery(path) {
- return path.replace(queryMatcher, '');
- },
-
- /**
- * Returns a version of the given path with the parameters in the given
- * query merged into the query string.
- */
- withQuery: function withQuery(path, query) {
- var existingQuery = PathUtils.extractQuery(path);
-
- if (existingQuery) query = query ? assign(existingQuery, query) : existingQuery;
-
- var queryString = qs.stringify(query, { arrayFormat: 'brackets' });
-
- if (queryString) return PathUtils.withoutQuery(path) + '?' + queryString;
-
- return PathUtils.withoutQuery(path);
- }
-
-};
-
-module.exports = PathUtils;
-},{"invariant":19,"object-assign":55,"qs":56}],26:[function(require,module,exports){
-'use strict';
-
-var assign = require('react/lib/Object.assign');
-var ReactPropTypes = require('react').PropTypes;
-var Route = require('./Route');
-
-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');
- },
-
- /**
- * Indicates that a prop should be a Route object.
- */
- route: ReactPropTypes.instanceOf(Route),
-
- /**
- * Indicates that a prop should be a Router object.
- */
- //router: ReactPropTypes.instanceOf(Router) // TODO
- router: ReactPropTypes.func
-
-});
-
-module.exports = PropTypes;
-},{"./Route":28,"react":227,"react/lib/Object.assign":98}],27:[function(require,module,exports){
-/**
- * Encapsulates a redirect to the given route.
- */
-"use strict";
-
-function Redirect(to, params, query) {
- this.to = to;
- this.params = params;
- this.query = query;
-}
-
-module.exports = Redirect;
-},{}],28:[function(require,module,exports){
-'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; }; })();
-
-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('invariant');
-var warning = require('./warning');
-var PathUtils = require('./PathUtils');
-
-var _currentRoute;
-
-var Route = (function () {
- _createClass(Route, null, [{
- key: 'createRoute',
-
- /**
- * 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 || {};
-
- if (typeof options === 'string') options = { path: options };
-
- var parentRoute = _currentRoute;
-
- 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;
- }
-
- var name = options.name;
- var path = options.path || name;
-
- 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 : '/';
- }
-
- if (options.isNotFound && !/\*$/.test(path)) path += '*'; // Auto-append * to the path of not found routes.
-
- var route = new Route(name, path, options.ignoreScrollBehavior, options.isDefault, options.isNotFound, options.onEnter, options.onLeave, options.handler);
-
- if (parentRoute) {
- if (route.isDefault) {
- invariant(parentRoute.defaultRoute == null, '%s may not have more than one default route', parentRoute);
-
- parentRoute.defaultRoute = route;
- } else if (route.isNotFound) {
- invariant(parentRoute.notFoundRoute == null, '%s may not have more than one not found route', parentRoute);
-
- 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;
- }
-
- return 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 }));
- }
-
- /**
- * 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 }));
- }
-
- /**
- * 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);
- }
- }));
- }
- }]);
-
- 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;
-})();
-
-module.exports = Route;
-},{"./PathUtils":25,"./warning":54,"invariant":19,"react/lib/Object.assign":98}],29:[function(require,module,exports){
-'use strict';
-
-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;
- var prevRoutes = prevState.routes;
-
- var sharedAncestorRoutes = routes.filter(function (route) {
- return prevRoutes.indexOf(route) !== -1;
- });
-
- return !sharedAncestorRoutes.some(function (route) {
- return route.ignoreScrollBehavior;
- });
-}
-
-/**
- * Provides the router with the ability to manage window scroll position
- * according to its scroll behavior.
- */
-var ScrollHistory = {
-
- statics: {
-
- /**
- * Records curent scroll position as the last known position for the given URL path.
- */
- recordScrollPosition: function recordScrollPosition(path) {
- if (!this.scrollHistory) this.scrollHistory = {};
-
- this.scrollHistory[path] = getWindowScrollPosition();
- },
-
- /**
- * Returns the last known scroll position for the given URL path.
- */
- getScrollPosition: function getScrollPosition(path) {
- if (!this.scrollHistory) this.scrollHistory = {};
-
- return this.scrollHistory[path] || null;
- }
-
- },
-
- componentWillMount: function componentWillMount() {
- invariant(this.constructor.getScrollBehavior() == null || canUseDOM, 'Cannot use scroll behavior without a DOM');
- },
-
- componentDidMount: function componentDidMount() {
- this._updateScroll();
- },
-
- componentDidUpdate: function componentDidUpdate(prevProps, prevState) {
- this._updateScroll(prevState);
- },
-
- _updateScroll: function _updateScroll(prevState) {
- if (!shouldUpdateScroll(this.state, prevState)) return;
-
- var scrollBehavior = this.constructor.getScrollBehavior();
-
- if (scrollBehavior) scrollBehavior.updateScrollPosition(this.constructor.getScrollPosition(this.state.path), this.state.action);
- }
-
-};
-
-module.exports = ScrollHistory;
-},{"./getWindowScrollPosition":44,"can-use-dom":16,"invariant":19}],30:[function(require,module,exports){
-'use strict';
-
-var PropTypes = require('./PropTypes');
-
-/**
- * A mixin for components that need to know the path, routes, URL
- * params and query that are currently active.
- *
- * Example:
- *
- * var AboutLink = React.createClass({
- * mixins: [ Router.State ],
- * render() {
- * var className = this.props.className;
- *
- * if (this.isActive('about'))
- * className += ' is-active';
- *
- * return React.DOM.a({ className: className }, this.props.children);
- * }
- * });
- */
-var State = {
-
- contextTypes: {
- router: PropTypes.router.isRequired
- },
-
- /**
- * Returns the current URL path.
- */
- getPath: function getPath() {
- return this.context.router.getCurrentPath();
- },
-
- /**
- * Returns the current URL path without the query string.
- */
- getPathname: function getPathname() {
- return this.context.router.getCurrentPathname();
- },
-
- /**
- * Returns an object of the URL params that are currently active.
- */
- getParams: function getParams() {
- return this.context.router.getCurrentParams();
- },
-
- /**
- * Returns an object of the query params that are currently active.
- */
- getQuery: function getQuery() {
- return this.context.router.getCurrentQuery();
- },
-
- /**
- * Returns an array of the routes that are currently active.
- */
- getRoutes: function getRoutes() {
- return this.context.router.getCurrentRoutes();
- },
-
- /**
- * A helper method to determine if a given route, params, and query
- * are active.
- */
- isActive: function isActive(to, params, query) {
- return this.context.router.isActive(to, params, query);
- }
-
-};
-
-module.exports = State;
-},{"./PropTypes":26}],31:[function(require,module,exports){
-/* jshint -W058 */
-
-'use strict';
-
-var Cancellation = require('./Cancellation');
-var Redirect = require('./Redirect');
-
-/**
- * Encapsulates a transition to a given path.
- *
- * The willTransitionTo and willTransitionFrom handlers receive
- * an instance of this class as their first argument.
- */
-function Transition(path, retry) {
- this.path = path;
- this.abortReason = null;
- // TODO: Change this to router.retryTransition(transition)
- this.retry = retry.bind(this);
-}
-
-Transition.prototype.abort = function (reason) {
- if (this.abortReason == null) this.abortReason = reason || 'ABORT';
-};
-
-Transition.prototype.redirect = function (to, params, query) {
- this.abort(new Redirect(to, params, query));
-};
-
-Transition.prototype.cancel = function () {
- this.abort(new Cancellation());
-};
-
-Transition.from = function (transition, routes, components, callback) {
- routes.reduce(function (callback, route, index) {
- return function (error) {
- if (error || transition.abortReason) {
- callback(error);
- } else if (route.onLeave) {
- try {
- route.onLeave(transition, components[index], callback);
-
- // If there is no callback in the argument list, call it automatically.
- if (route.onLeave.length < 3) callback();
- } catch (e) {
- callback(e);
- }
- } else {
- callback();
- }
- };
- }, callback)();
-};
-
-Transition.to = function (transition, routes, params, query, callback) {
- routes.reduceRight(function (callback, route) {
- return function (error) {
- if (error || transition.abortReason) {
- callback(error);
- } else if (route.onEnter) {
- try {
- route.onEnter(transition, params, query, callback);
-
- // If there is no callback in the argument list, call it automatically.
- if (route.onEnter.length < 4) callback();
- } catch (e) {
- callback(e);
- }
- } else {
- callback();
- }
- };
- }, callback)();
-};
-
-module.exports = Transition;
-},{"./Cancellation":21,"./Redirect":27}],32:[function(require,module,exports){
-/**
- * Actions that modify the URL.
- */
-'use strict';
-
-var LocationActions = {
-
- /**
- * Indicates a new location is being pushed to the history stack.
- */
- PUSH: 'push',
-
- /**
- * Indicates the current location should be replaced.
- */
- REPLACE: 'replace',
-
- /**
- * Indicates the most recent entry should be removed from the history stack.
- */
- POP: 'pop'
-
-};
-
-module.exports = LocationActions;
-},{}],33:[function(require,module,exports){
-'use strict';
-
-var LocationActions = require('../actions/LocationActions');
-
-/**
- * A scroll behavior that attempts to imitate the default behavior
- * of modern browsers.
- */
-var ImitateBrowserBehavior = {
-
- updateScrollPosition: function updateScrollPosition(position, actionType) {
- switch (actionType) {
- case LocationActions.PUSH:
- case LocationActions.REPLACE:
- window.scrollTo(0, 0);
- break;
- case LocationActions.POP:
- if (position) {
- window.scrollTo(position.x, position.y);
- } else {
- window.scrollTo(0, 0);
- }
- break;
- }
- }
-
-};
-
-module.exports = ImitateBrowserBehavior;
-},{"../actions/LocationActions":32}],34:[function(require,module,exports){
-/**
- * A scroll behavior that always scrolls to the top of the page
- * after a transition.
- */
-"use strict";
-
-var ScrollToTopBehavior = {
-
- updateScrollPosition: function updateScrollPosition() {
- window.scrollTo(0, 0);
- }
-
-};
-
-module.exports = ScrollToTopBehavior;
-},{}],35:[function(require,module,exports){
-/**
- * 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);
-
- _get(Object.getPrototypeOf(ContextWrapper.prototype), 'constructor', this).apply(this, arguments);
- }
-
- _createClass(ContextWrapper, [{
- key: 'render',
- value: function render() {
- return this.props.children;
- }
- }]);
-
- return ContextWrapper;
-})(React.Component);
-
-module.exports = ContextWrapper;
-},{"react":227}],36:[function(require,module,exports){
-'use strict';
-
-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 PropTypes = require('../PropTypes');
-var RouteHandler = require('./RouteHandler');
-var Route = require('./Route');
-
-/**
- * A component is a special kind of that
- * renders when its parent matches but none of its siblings do.
- * Only one such route may be used at any given level in the
- * route hierarchy.
- */
-
-var DefaultRoute = (function (_Route) {
- _inherits(DefaultRoute, _Route);
-
- function DefaultRoute() {
- _classCallCheck(this, DefaultRoute);
-
- _get(Object.getPrototypeOf(DefaultRoute.prototype), 'constructor', this).apply(this, arguments);
- }
-
- // 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);
-
-DefaultRoute.propTypes = {
- name: PropTypes.string,
- path: PropTypes.falsy,
- children: PropTypes.falsy,
- handler: PropTypes.func.isRequired
-};
-
-DefaultRoute.defaultProps = {
- handler: RouteHandler
-};
-
-module.exports = DefaultRoute;
-},{"../PropTypes":26,"./Route":40,"./RouteHandler":41}],37:[function(require,module,exports){
-'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 assign = require('react/lib/Object.assign');
-var PropTypes = require('../PropTypes');
-
-function isLeftClickEvent(event) {
- return event.button === 0;
-}
-
-function isModifiedEvent(event) {
- return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
-}
-
-/**
- * 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:
- *
- *
- *
- * In addition to params, links may pass along query string parameters
- * using the `query` prop.
- *
- *
- */
-
-var Link = (function (_React$Component) {
- _inherits(Link, _React$Component);
-
- function Link() {
- _classCallCheck(this, Link);
-
- _get(Object.getPrototypeOf(Link.prototype), 'constructor', this).apply(this, arguments);
- }
-
- // 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',
- value: function handleClick(event) {
- var allowTransition = true;
- var clickResult;
-
- if (this.props.onClick) clickResult = this.props.onClick(event);
-
- 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);
- }
-
- /**
- * 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);
- }
-
- /**
- * 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;
-
- 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)
- });
-
- if (props.activeStyle && this.getActiveState()) props.style = props.activeStyle;
-
- return React.DOM.a(props, this.props.children);
- }
- }]);
-
- return Link;
-})(React.Component);
-
-Link.contextTypes = {
- router: PropTypes.router.isRequired
-};
-
-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
-};
-
-Link.defaultProps = {
- activeClassName: 'active',
- className: ''
-};
-
-module.exports = Link;
-},{"../PropTypes":26,"react":227,"react/lib/Object.assign":98}],38:[function(require,module,exports){
-'use strict';
-
-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 PropTypes = require('../PropTypes');
-var RouteHandler = require('./RouteHandler');
-var Route = require('./Route');
-
-/**
- * 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 NotFoundRoute = (function (_Route) {
- _inherits(NotFoundRoute, _Route);
-
- function NotFoundRoute() {
- _classCallCheck(this, NotFoundRoute);
-
- _get(Object.getPrototypeOf(NotFoundRoute.prototype), 'constructor', this).apply(this, arguments);
- }
-
- // 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);
-
-NotFoundRoute.propTypes = {
- name: PropTypes.string,
- path: PropTypes.falsy,
- children: PropTypes.falsy,
- handler: PropTypes.func.isRequired
-};
-
-NotFoundRoute.defaultProps = {
- handler: RouteHandler
-};
-
-module.exports = NotFoundRoute;
-},{"../PropTypes":26,"./Route":40,"./RouteHandler":41}],39:[function(require,module,exports){
-'use strict';
-
-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 PropTypes = require('../PropTypes');
-var Route = require('./Route');
-
-/**
- * A component is a special kind of that always
- * redirects to another route when it matches.
- */
-
-var Redirect = (function (_Route) {
- _inherits(Redirect, _Route);
-
- function Redirect() {
- _classCallCheck(this, Redirect);
-
- _get(Object.getPrototypeOf(Redirect.prototype), 'constructor', this).apply(this, arguments);
- }
-
- // 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);
-
-Redirect.propTypes = {
- path: PropTypes.string,
- from: PropTypes.string, // Alias for path.
- to: PropTypes.string,
- handler: PropTypes.falsy
-};
-
-// Redirects should not have a default handler
-Redirect.defaultProps = {};
-
-module.exports = Redirect;
-},{"../PropTypes":26,"./Route":40}],40:[function(require,module,exports){
-'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 invariant = require('invariant');
-var PropTypes = require('../PropTypes');
-var RouteHandler = require('./RouteHandler');
-
-/**
- * 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.
- *
- * var routes = [
- *
- *
- *
- *
- *
- * ];
- *
- * Router.run(routes, function (Handler) {
- * React.render( , document.body);
- * });
- *
- * Handlers for Route components that contain children can render their active
- * child route using a element.
- *
- * var App = React.createClass({
- * render: function () {
- * return (
- *
- *
- *
- * );
- * }
- * });
- *
- * If no handler is provided for the route, it will render a matched child route.
- */
-
-var Route = (function (_React$Component) {
- _inherits(Route, _React$Component);
-
- function Route() {
- _classCallCheck(this, Route);
-
- _get(Object.getPrototypeOf(Route.prototype), 'constructor', this).apply(this, arguments);
- }
-
- // 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',
- value: function render() {
- invariant(false, '%s elements are for router configuration only and should not be rendered', this.constructor.name);
- }
- }]);
-
- return Route;
-})(React.Component);
-
-Route.propTypes = {
- name: PropTypes.string,
- path: PropTypes.string,
- handler: PropTypes.func,
- ignoreScrollBehavior: PropTypes.bool
-};
-
-Route.defaultProps = {
- handler: RouteHandler
-};
-
-module.exports = Route;
-},{"../PropTypes":26,"./RouteHandler":41,"invariant":19,"react":227}],41:[function(require,module,exports){
-'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 = require('./ContextWrapper');
-var assign = require('react/lib/Object.assign');
-var PropTypes = require('../PropTypes');
-
-var REF_NAME = '__routeHandler__';
-
-/**
- * A component renders the active child route handler
- * when routes are nested.
- */
-
-var RouteHandler = (function (_React$Component) {
- _inherits(RouteHandler, _React$Component);
-
- function RouteHandler() {
- _classCallCheck(this, RouteHandler);
-
- _get(Object.getPrototypeOf(RouteHandler.prototype), 'constructor', this).apply(this, arguments);
- }
-
- // 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',
- value: function getChildContext() {
- return {
- routeDepth: this.context.routeDepth + 1
- };
- }
- }, {
- key: 'componentDidMount',
- value: function componentDidMount() {
- this._updateRouteComponent(this.refs[REF_NAME]);
- }
- }, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate() {
- this._updateRouteComponent(this.refs[REF_NAME]);
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- this._updateRouteComponent(null);
- }
- }, {
- key: '_updateRouteComponent',
- value: function _updateRouteComponent(component) {
- this.context.router.setRouteComponentAtDepth(this.getRouteDepth(), component);
- }
- }, {
- key: 'getRouteDepth',
- value: function getRouteDepth() {
- return this.context.routeDepth;
- }
- }, {
- key: 'createChildRouteHandler',
- value: function createChildRouteHandler(props) {
- var route = this.context.router.getRouteAtDepth(this.getRouteDepth());
-
- if (route == null) return null;
-
- var childProps = assign({}, props || this.props, {
- ref: REF_NAME,
- params: this.context.router.getCurrentParams(),
- query: this.context.router.getCurrentQuery()
- });
-
- return React.createElement(route.handler, childProps);
- }
- }, {
- key: 'render',
- value: function render() {
- var handler = this.createChildRouteHandler();
- // for things like that don't like null
- return handler ? React.createElement(
- ContextWrapper,
- null,
- handler
- ) : React.createElement('script', null);
- }
- }]);
-
- return RouteHandler;
-})(React.Component);
-
-RouteHandler.contextTypes = {
- routeDepth: PropTypes.number.isRequired,
- router: PropTypes.router.isRequired
-};
-
-RouteHandler.childContextTypes = {
- routeDepth: PropTypes.number.isRequired
-};
-
-module.exports = RouteHandler;
-},{"../PropTypes":26,"./ContextWrapper":35,"react":227,"react/lib/Object.assign":98}],42:[function(require,module,exports){
-(function (process){
-/* jshint -W058 */
-'use strict';
-
-var React = require('react');
-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');
-var HistoryLocation = require('./locations/HistoryLocation');
-var RefreshLocation = require('./locations/RefreshLocation');
-var StaticLocation = require('./locations/StaticLocation');
-var ScrollHistory = require('./ScrollHistory');
-var createRoutesFromReactChildren = require('./createRoutesFromReactChildren');
-var isReactChildren = require('./isReactChildren');
-var Transition = require('./Transition');
-var PropTypes = require('./PropTypes');
-var Redirect = require('./Redirect');
-var History = require('./History');
-var Cancellation = require('./Cancellation');
-var Match = require('./Match');
-var Route = require('./Route');
-var supportsHistory = require('./supportsHistory');
-var PathUtils = require('./PathUtils');
-
-/**
- * The default location for new routers.
- */
-var DEFAULT_LOCATION = canUseDOM ? HashLocation : '/';
-
-/**
- * The default scroll behavior for new routers.
- */
-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;
-}
-
-function hasMatch(routes, route, prevParams, nextParams, prevQuery, nextQuery) {
- return routes.some(function (r) {
- if (r !== route) return false;
-
- var paramNames = route.paramNames;
- var paramName;
-
- // Ensure that all params the route cares about did not change.
- for (var i = 0, len = paramNames.length; i < len; ++i) {
- paramName = paramNames[i];
-
- if (nextParams[paramName] !== prevParams[paramName]) return false;
- }
-
- // Ensure the query hasn't changed.
- return hasProperties(prevQuery, nextQuery) && hasProperties(nextQuery, prevQuery);
- });
-}
-
-function addRoutesToNamedRoutes(routes, namedRoutes) {
- var route;
- for (var i = 0, len = routes.length; i < len; ++i) {
- route = routes[i];
-
- if (route.name) {
- invariant(namedRoutes[route.name] == null, 'You may not have more than one route named "%s"', route.name);
-
- namedRoutes[route.name] = route;
- }
-
- if (route.childRoutes) addRoutesToNamedRoutes(route.childRoutes, namedRoutes);
- }
-}
-
-function routeIsActive(activeRoutes, routeName) {
- return activeRoutes.some(function (route) {
- return route.name === routeName;
- });
-}
-
-function paramsAreActive(activeParams, params) {
- 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;
-}
-
-/**
- * Creates and returns a new router using the given options. A router
- * is a ReactComponent class that knows how to react to changes in the
- * URL and keep the contents of the page in sync.
- *
- * Options may be any of the following:
- *
- * - routes (required) The route config
- * - location The location to use. Defaults to HashLocation when
- * the DOM is available, "/" otherwise
- * - scrollBehavior The scroll behavior to use. Defaults to ImitateBrowserBehavior
- * when the DOM is available, null otherwise
- * - onError A function that is used to handle errors
- * - onAbort A function that is used to handle aborted transitions
- *
- * When rendering in a server-side environment, the location should simply
- * be the URL path that was used in the request, including the query string.
- */
-function createRouter(options) {
- options = options || {};
-
- if (isReactChildren(options)) options = { routes: options };
-
- var mountedComponents = [];
- var location = options.location || DEFAULT_LOCATION;
- var scrollBehavior = options.scrollBehavior || DEFAULT_SCROLL_BEHAVIOR;
- var state = {};
- var nextState = {};
- var pendingTransition = null;
- var dispatchHandler = null;
-
- if (typeof location === 'string') location = new StaticLocation(location);
-
- if (location instanceof StaticLocation) {
- warning(!canUseDOM || process.env.NODE_ENV === 'test', 'You should not use a static location in a DOM environment because ' + 'the router will not be kept in sync with the current URL');
- } else {
- invariant(canUseDOM || location.needsDOM === false, 'You cannot use %s without a DOM', location);
- }
-
- // Automatically fall back to full page refreshes in
- // browsers that don't support the HTML history API.
- if (location === HistoryLocation && !supportsHistory()) location = RefreshLocation;
-
- var Router = React.createClass({
-
- displayName: 'Router',
-
- statics: {
-
- isRunning: false,
-
- cancelPendingTransition: function cancelPendingTransition() {
- if (pendingTransition) {
- pendingTransition.cancel();
- pendingTransition = null;
- }
- },
-
- clearAllRoutes: function clearAllRoutes() {
- Router.cancelPendingTransition();
- Router.namedRoutes = {};
- Router.routes = [];
- },
-
- /**
- * Adds routes to this router from the given children object (see ReactChildren).
- */
- addRoutes: function addRoutes(routes) {
- if (isReactChildren(routes)) routes = createRoutesFromReactChildren(routes);
-
- addRoutesToNamedRoutes(routes, Router.namedRoutes);
-
- Router.routes.push.apply(Router.routes, routes);
- },
-
- /**
- * Replaces routes of this router from the given children object (see ReactChildren).
- */
- replaceRoutes: function replaceRoutes(routes) {
- Router.clearAllRoutes();
- Router.addRoutes(routes);
- Router.refresh();
- },
-
- /**
- * Performs a match of the given path against this router and returns an object
- * with the { routes, params, pathname, query } that match. Returns null if no
- * match can be made.
- */
- match: function match(path) {
- return Match.findMatch(Router.routes, path);
- },
-
- /**
- * Returns an absolute URL path created from the given route
- * name, URL parameters, and query.
- */
- makePath: function makePath(to, params, query) {
- var path;
- if (PathUtils.isAbsolute(to)) {
- path = to;
- } else {
- var route = to instanceof Route ? to : Router.namedRoutes[to];
-
- invariant(route instanceof Route, 'Cannot find a route named "%s"', to);
-
- path = route.path;
- }
-
- return PathUtils.withQuery(PathUtils.injectParams(path, params), query);
- },
-
- /**
- * Returns a string that may safely be used as the href of a link
- * to the route with the given name, URL parameters, and query.
- */
- makeHref: function makeHref(to, params, query) {
- var path = Router.makePath(to, params, query);
- return location === HashLocation ? '#' + path : path;
- },
-
- /**
- * Transitions to the URL specified in the arguments by pushing
- * a new URL onto the history stack.
- */
- transitionTo: function transitionTo(to, params, query) {
- var path = Router.makePath(to, params, query);
-
- if (pendingTransition) {
- // Replace so pending location does not stay in history.
- location.replace(path);
- } else {
- location.push(path);
- }
- },
-
- /**
- * Transitions to the URL specified in the arguments by replacing
- * the current URL in the history stack.
- */
- replaceWith: function replaceWith(to, params, query) {
- location.replace(Router.makePath(to, params, query));
- },
-
- /**
- * Transitions to the previous URL if one is available. Returns true if the
- * router was able to go back, false otherwise.
- *
- * Note: The router only tracks history entries in your application, not the
- * current browser session, so you can safely call this function without guarding
- * against sending the user back to some other site. However, when using
- * RefreshLocation (which is the fallback for HistoryLocation in browsers that
- * don't support HTML5 history) this method will *always* send the client back
- * because we cannot reliably track history length.
- */
- goBack: function goBack() {
- if (History.length > 1 || location === RefreshLocation) {
- location.pop();
- return true;
- }
-
- warning(false, 'goBack() was ignored because there is no router history');
-
- return false;
- },
-
- handleAbort: options.onAbort || function (abortReason) {
- if (location instanceof StaticLocation) throw new Error('Unhandled aborted transition! Reason: ' + abortReason);
-
- if (abortReason instanceof Cancellation) {
- return;
- } else if (abortReason instanceof Redirect) {
- location.replace(Router.makePath(abortReason.to, abortReason.params, abortReason.query));
- } else {
- location.pop();
- }
- },
-
- handleError: options.onError || function (error) {
- // Throw so we don't silently swallow async errors.
- throw error; // This error probably originated in a transition hook.
- },
-
- handleLocationChange: function handleLocationChange(change) {
- Router.dispatch(change.path, change.type);
- },
-
- /**
- * Performs a transition to the given path and calls callback(error, abortReason)
- * when the transition is finished. If both arguments are null the router's state
- * was updated. Otherwise the transition did not complete.
- *
- * In a transition, a router first determines which routes are involved by beginning
- * with the current route, up the route tree to the first parent route that is shared
- * with the destination route, and back down the tree to the destination route. The
- * willTransitionFrom hook is invoked on all route handlers we're transitioning away
- * from, in reverse nesting order. Likewise, the willTransitionTo hook is invoked on
- * all route handlers we're transitioning to.
- *
- * Both willTransitionFrom and willTransitionTo hooks may either abort or redirect the
- * transition. To resolve asynchronously, they may use the callback argument. If no
- * hooks wait, the transition is fully synchronous.
- */
- dispatch: function dispatch(path, action) {
- Router.cancelPendingTransition();
-
- var prevPath = state.path;
- var isRefreshing = action == null;
-
- 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.
- if (prevPath && action === LocationActions.PUSH) Router.recordScrollPosition(prevPath);
-
- var match = Router.match(path);
-
- warning(match != null, 'No route matches path "%s". Make sure you have somewhere in your routes', path, path);
-
- if (match == null) match = {};
-
- var prevRoutes = state.routes || [];
- var prevParams = state.params || {};
- var prevQuery = state.query || {};
-
- var nextRoutes = match.routes || [];
- var nextParams = match.params || {};
- var nextQuery = match.query || {};
-
- var fromRoutes, toRoutes;
- if (prevRoutes.length) {
- fromRoutes = prevRoutes.filter(function (route) {
- return !hasMatch(nextRoutes, route, prevParams, nextParams, prevQuery, nextQuery);
- });
-
- toRoutes = nextRoutes.filter(function (route) {
- return !hasMatch(prevRoutes, route, prevParams, nextParams, prevQuery, nextQuery);
- });
- } else {
- fromRoutes = [];
- toRoutes = nextRoutes;
- }
-
- var transition = new Transition(path, Router.replaceWith.bind(Router, path));
- pendingTransition = transition;
-
- var fromComponents = mountedComponents.slice(prevRoutes.length - fromRoutes.length);
-
- Transition.from(transition, fromRoutes, fromComponents, function (error) {
- if (error || transition.abortReason) return dispatchHandler.call(Router, error, transition); // No need to continue.
-
- Transition.to(transition, toRoutes, nextParams, nextQuery, function (error) {
- dispatchHandler.call(Router, error, transition, {
- path: path,
- action: action,
- pathname: match.pathname,
- routes: nextRoutes,
- params: nextParams,
- query: nextQuery
- });
- });
- });
- },
-
- /**
- * Starts this router and calls callback(router, state) when the route changes.
- *
- * If the router's location is static (i.e. a URL path in a server environment)
- * the callback is called only once. Otherwise, the location should be one of the
- * Router.*Location objects (e.g. Router.HashLocation or Router.HistoryLocation).
- */
- run: function run(callback) {
- invariant(!Router.isRunning, 'Router is already running');
-
- dispatchHandler = function (error, transition, newState) {
- if (error) Router.handleError(error);
-
- if (pendingTransition !== transition) return;
-
- pendingTransition = null;
-
- if (transition.abortReason) {
- Router.handleAbort(transition.abortReason);
- } else {
- callback.call(Router, Router, nextState = newState);
- }
- };
-
- if (!(location instanceof StaticLocation)) {
- if (location.addChangeListener) location.addChangeListener(Router.handleLocationChange);
-
- Router.isRunning = true;
- }
-
- // Bootstrap using the current path.
- Router.refresh();
- },
-
- refresh: function refresh() {
- Router.dispatch(location.getCurrentPath(), null);
- },
-
- stop: function stop() {
- Router.cancelPendingTransition();
-
- if (location.removeChangeListener) location.removeChangeListener(Router.handleLocationChange);
-
- Router.isRunning = false;
- },
-
- getLocation: function getLocation() {
- return location;
- },
-
- getScrollBehavior: function getScrollBehavior() {
- return scrollBehavior;
- },
-
- getRouteAtDepth: function getRouteAtDepth(routeDepth) {
- var routes = state.routes;
- return routes && routes[routeDepth];
- },
-
- setRouteComponentAtDepth: function setRouteComponentAtDepth(routeDepth, component) {
- mountedComponents[routeDepth] = component;
- },
-
- /**
- * Returns the current URL path + query string.
- */
- getCurrentPath: function getCurrentPath() {
- return state.path;
- },
-
- /**
- * Returns the current URL path without the query string.
- */
- getCurrentPathname: function getCurrentPathname() {
- return state.pathname;
- },
-
- /**
- * Returns an object of the currently active URL parameters.
- */
- getCurrentParams: function getCurrentParams() {
- return state.params;
- },
-
- /**
- * Returns an object of the currently active query parameters.
- */
- getCurrentQuery: function getCurrentQuery() {
- return state.query;
- },
-
- /**
- * Returns an array of the currently active routes.
- */
- getCurrentRoutes: function getCurrentRoutes() {
- return state.routes;
- },
-
- /**
- * 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));
- }
-
- },
-
- mixins: [ScrollHistory],
-
- propTypes: {
- children: PropTypes.falsy
- },
-
- childContextTypes: {
- routeDepth: PropTypes.number.isRequired,
- router: PropTypes.router.isRequired
- },
-
- getChildContext: function getChildContext() {
- return {
- routeDepth: 1,
- router: Router
- };
- },
-
- getInitialState: function getInitialState() {
- return state = nextState;
- },
-
- componentWillReceiveProps: function componentWillReceiveProps() {
- this.setState(state = nextState);
- },
-
- componentWillUnmount: function componentWillUnmount() {
- Router.stop();
- },
-
- render: function render() {
- var route = Router.getRouteAtDepth(0);
- return route ? React.createElement(route.handler, this.props) : null;
- }
-
- });
-
- Router.clearAllRoutes();
-
- if (options.routes) Router.addRoutes(options.routes);
-
- return Router;
-}
-
-module.exports = createRouter;
-}).call(this,require('_process'))
-},{"./Cancellation":21,"./History":22,"./Match":23,"./PathUtils":25,"./PropTypes":26,"./Redirect":27,"./Route":28,"./ScrollHistory":29,"./Transition":31,"./actions/LocationActions":32,"./behaviors/ImitateBrowserBehavior":33,"./createRoutesFromReactChildren":43,"./isReactChildren":46,"./locations/HashLocation":47,"./locations/HistoryLocation":48,"./locations/RefreshLocation":49,"./locations/StaticLocation":50,"./supportsHistory":53,"./warning":54,"_process":20,"can-use-dom":16,"invariant":19,"react":227}],43:[function(require,module,exports){
-/* jshint -W084 */
-'use strict';
-
-var React = require('react');
-var assign = require('react/lib/Object.assign');
-var warning = require('./warning');
-var DefaultRoute = require('./components/DefaultRoute');
-var NotFoundRoute = require('./components/NotFoundRoute');
-var Redirect = require('./components/Redirect');
-var Route = require('./Route');
-
-function checkPropTypes(componentName, propTypes, props) {
- componentName = componentName || 'UnknownComponent';
-
- for (var propName in propTypes) {
- if (propTypes.hasOwnProperty(propName)) {
- var error = propTypes[propName](props, propName, componentName);
-
- if (error instanceof Error) warning(false, error.message);
- }
- }
-}
-
-function createRouteOptions(props) {
- var options = assign({}, props);
- var handler = options.handler;
-
- if (handler) {
- options.onEnter = handler.willTransitionTo;
- options.onLeave = handler.willTransitionFrom;
- }
-
- return options;
-}
-
-function createRouteFromReactElement(element) {
- 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 (props.children) createRoutesFromReactChildren(props.children);
- });
-}
-
-/**
- * Creates and returns an array of routes created from the given
- * ReactChildren, all of which should be one of , ,
- * , or , e.g.:
- *
- * var { createRoutesFromReactChildren, Route, Redirect } = require('react-router');
- *
- * var routes = createRoutesFromReactChildren(
- *
- *
- *
- *
- *
- *
- * );
- */
-function createRoutesFromReactChildren(children) {
- var routes = [];
-
- React.Children.forEach(children, function (child) {
- if (child = createRouteFromReactElement(child)) routes.push(child);
- });
-
- return routes;
-}
-
-module.exports = createRoutesFromReactChildren;
-},{"./Route":28,"./components/DefaultRoute":36,"./components/NotFoundRoute":38,"./components/Redirect":39,"./warning":54,"react":227,"react/lib/Object.assign":98}],44:[function(require,module,exports){
-'use strict';
-
-var invariant = require('invariant');
-var canUseDOM = require('can-use-dom');
-
-/**
- * Returns the current scroll position of the window as { x, y }.
- */
-function getWindowScrollPosition() {
- invariant(canUseDOM, 'Cannot get current scroll position without a DOM');
-
- return {
- x: window.pageXOffset || document.documentElement.scrollLeft,
- y: window.pageYOffset || document.documentElement.scrollTop
- };
-}
-
-module.exports = getWindowScrollPosition;
-},{"can-use-dom":16,"invariant":19}],45:[function(require,module,exports){
-'use strict';
-
-exports.DefaultRoute = require('./components/DefaultRoute');
-exports.Link = require('./components/Link');
-exports.NotFoundRoute = require('./components/NotFoundRoute');
-exports.Redirect = require('./components/Redirect');
-exports.Route = require('./components/Route');
-exports.ActiveHandler = require('./components/RouteHandler');
-exports.RouteHandler = exports.ActiveHandler;
-
-exports.HashLocation = require('./locations/HashLocation');
-exports.HistoryLocation = require('./locations/HistoryLocation');
-exports.RefreshLocation = require('./locations/RefreshLocation');
-exports.StaticLocation = require('./locations/StaticLocation');
-exports.TestLocation = require('./locations/TestLocation');
-
-exports.ImitateBrowserBehavior = require('./behaviors/ImitateBrowserBehavior');
-exports.ScrollToTopBehavior = require('./behaviors/ScrollToTopBehavior');
-
-exports.History = require('./History');
-exports.Navigation = require('./Navigation');
-exports.State = require('./State');
-
-exports.createRoute = require('./Route').createRoute;
-exports.createDefaultRoute = require('./Route').createDefaultRoute;
-exports.createNotFoundRoute = require('./Route').createNotFoundRoute;
-exports.createRedirect = require('./Route').createRedirect;
-exports.createRoutesFromReactChildren = require('./createRoutesFromReactChildren');
-
-exports.create = require('./createRouter');
-exports.run = require('./runRouter');
-},{"./History":22,"./Navigation":24,"./Route":28,"./State":30,"./behaviors/ImitateBrowserBehavior":33,"./behaviors/ScrollToTopBehavior":34,"./components/DefaultRoute":36,"./components/Link":37,"./components/NotFoundRoute":38,"./components/Redirect":39,"./components/Route":40,"./components/RouteHandler":41,"./createRouter":42,"./createRoutesFromReactChildren":43,"./locations/HashLocation":47,"./locations/HistoryLocation":48,"./locations/RefreshLocation":49,"./locations/StaticLocation":50,"./locations/TestLocation":51,"./runRouter":52}],46:[function(require,module,exports){
-'use strict';
-
-var React = require('react');
-
-function isValidChild(object) {
- return object == null || React.isValidElement(object);
-}
-
-function isReactChildren(object) {
- return isValidChild(object) || Array.isArray(object) && object.every(isValidChild);
-}
-
-module.exports = isReactChildren;
-},{"react":227}],47:[function(require,module,exports){
-'use strict';
-
-var LocationActions = require('../actions/LocationActions');
-var History = require('../History');
-
-var _listeners = [];
-var _isListening = false;
-var _actionType;
-
-function notifyChange(type) {
- if (type === LocationActions.PUSH) History.length += 1;
-
- var change = {
- path: HashLocation.getCurrentPath(),
- type: type
- };
-
- _listeners.forEach(function (listener) {
- listener.call(HashLocation, change);
- });
-}
-
-function ensureSlash() {
- var path = HashLocation.getCurrentPath();
-
- if (path.charAt(0) === '/') return true;
-
- HashLocation.replace('/' + path);
-
- return false;
-}
-
-function onHashChange() {
- if (ensureSlash()) {
- // If we don't have an _actionType then all we know is the hash
- // changed. It was probably caused by the user clicking the Back
- // button, but may have also been the Forward button or manual
- // manipulation. So just guess 'pop'.
- var curActionType = _actionType;
- _actionType = null;
- notifyChange(curActionType || LocationActions.POP);
- }
-}
-
-/**
- * A Location that uses `window.location.hash`.
- */
-var HashLocation = {
-
- addChangeListener: function addChangeListener(listener) {
- _listeners.push(listener);
-
- // Do this BEFORE listening for hashchange.
- ensureSlash();
-
- if (!_isListening) {
- if (window.addEventListener) {
- window.addEventListener('hashchange', onHashChange, false);
- } else {
- window.attachEvent('onhashchange', onHashChange);
- }
-
- _isListening = true;
- }
- },
-
- removeChangeListener: function removeChangeListener(listener) {
- _listeners = _listeners.filter(function (l) {
- return l !== listener;
- });
-
- if (_listeners.length === 0) {
- if (window.removeEventListener) {
- window.removeEventListener('hashchange', onHashChange, false);
- } else {
- window.removeEvent('onhashchange', onHashChange);
- }
-
- _isListening = false;
- }
- },
-
- push: function push(path) {
- _actionType = LocationActions.PUSH;
- window.location.hash = path;
- },
-
- replace: function replace(path) {
- _actionType = LocationActions.REPLACE;
- window.location.replace(window.location.pathname + window.location.search + '#' + path);
- },
-
- pop: function pop() {
- _actionType = LocationActions.POP;
- History.back();
- },
-
- getCurrentPath: function getCurrentPath() {
- return decodeURI(
- // We can't use window.location.hash here because it's not
- // consistent across browsers - Firefox will pre-decode it!
- window.location.href.split('#')[1] || '');
- },
-
- toString: function toString() {
- return '';
- }
-
-};
-
-module.exports = HashLocation;
-},{"../History":22,"../actions/LocationActions":32}],48:[function(require,module,exports){
-'use strict';
-
-var LocationActions = require('../actions/LocationActions');
-var History = require('../History');
-
-var _listeners = [];
-var _isListening = false;
-
-function notifyChange(type) {
- var change = {
- path: HistoryLocation.getCurrentPath(),
- type: type
- };
-
- _listeners.forEach(function (listener) {
- listener.call(HistoryLocation, change);
- });
-}
-
-function onPopState(event) {
- if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.
-
- notifyChange(LocationActions.POP);
-}
-
-/**
- * A Location that uses HTML5 history.
- */
-var HistoryLocation = {
-
- addChangeListener: function addChangeListener(listener) {
- _listeners.push(listener);
-
- if (!_isListening) {
- if (window.addEventListener) {
- window.addEventListener('popstate', onPopState, false);
- } else {
- window.attachEvent('onpopstate', onPopState);
- }
-
- _isListening = true;
- }
- },
-
- removeChangeListener: function removeChangeListener(listener) {
- _listeners = _listeners.filter(function (l) {
- return l !== listener;
- });
-
- if (_listeners.length === 0) {
- if (window.addEventListener) {
- window.removeEventListener('popstate', onPopState, false);
- } else {
- window.removeEvent('onpopstate', onPopState);
- }
-
- _isListening = false;
- }
- },
-
- push: function push(path) {
- window.history.pushState({ path: path }, '', path);
- History.length += 1;
- notifyChange(LocationActions.PUSH);
- },
-
- replace: function replace(path) {
- window.history.replaceState({ path: path }, '', path);
- notifyChange(LocationActions.REPLACE);
- },
-
- pop: History.back,
-
- getCurrentPath: function getCurrentPath() {
- return decodeURI(window.location.pathname + window.location.search);
- },
-
- toString: function toString() {
- return '';
- }
-
-};
-
-module.exports = HistoryLocation;
-},{"../History":22,"../actions/LocationActions":32}],49:[function(require,module,exports){
-'use strict';
-
-var HistoryLocation = require('./HistoryLocation');
-var History = require('../History');
-
-/**
- * A Location that uses full page refreshes. This is used as
- * the fallback for HistoryLocation in browsers that do not
- * support the HTML5 history API.
- */
-var RefreshLocation = {
-
- push: function push(path) {
- window.location = path;
- },
-
- replace: function replace(path) {
- window.location.replace(path);
- },
-
- pop: History.back,
-
- getCurrentPath: HistoryLocation.getCurrentPath,
-
- toString: function toString() {
- return '';
- }
-
-};
-
-module.exports = RefreshLocation;
-},{"../History":22,"./HistoryLocation":48}],50:[function(require,module,exports){
-'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; }; })();
-
-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');
-}
-
-/**
- * A location that only ever contains a single path. Useful in
- * stateless environments like servers where there is no path history,
- * only the path that was used in the request.
- */
-
-var StaticLocation = (function () {
- function StaticLocation(path) {
- _classCallCheck(this, StaticLocation);
-
- 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() {
- return this.path;
- }
- }, {
- key: 'toString',
- value: function toString() {
- return '';
- }
- }]);
-
- return StaticLocation;
-})();
-
-StaticLocation.prototype.push = throwCannotModify;
-StaticLocation.prototype.replace = throwCannotModify;
-StaticLocation.prototype.pop = throwCannotModify;
-
-module.exports = StaticLocation;
-},{"invariant":19}],51:[function(require,module,exports){
-'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; }; })();
-
-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');
-
-/**
- * A location that is convenient for testing and does not require a DOM.
- */
-
-var TestLocation = (function () {
- function TestLocation(history) {
- _classCallCheck(this, TestLocation);
-
- this.history = history || [];
- this.listeners = [];
- this.needsDOM = false;
- this._updateHistoryLength();
- }
-
- _createClass(TestLocation, [{
- key: '_updateHistoryLength',
- value: function _updateHistoryLength() {
- History.length = this.history.length;
- }
- }, {
- key: '_notifyChange',
- value: function _notifyChange(type) {
- var change = {
- path: this.getCurrentPath(),
- type: type
- };
-
- for (var i = 0, len = this.listeners.length; i < len; ++i) this.listeners[i].call(this, change);
- }
- }, {
- key: 'addChangeListener',
- value: function addChangeListener(listener) {
- this.listeners.push(listener);
- }
- }, {
- key: 'removeChangeListener',
- value: function removeChangeListener(listener) {
- this.listeners = this.listeners.filter(function (l) {
- return l !== listener;
- });
- }
- }, {
- key: 'push',
- value: function push(path) {
- this.history.push(path);
- this._updateHistoryLength();
- this._notifyChange(LocationActions.PUSH);
- }
- }, {
- key: 'replace',
- value: function replace(path) {
- invariant(this.history.length, 'You cannot replace the current path with no history');
-
- this.history[this.history.length - 1] = path;
-
- this._notifyChange(LocationActions.REPLACE);
- }
- }, {
- key: 'pop',
- value: function pop() {
- this.history.pop();
- this._updateHistoryLength();
- this._notifyChange(LocationActions.POP);
- }
- }, {
- key: 'getCurrentPath',
- value: function getCurrentPath() {
- return this.history[this.history.length - 1];
- }
- }, {
- key: 'toString',
- value: function toString() {
- return '';
- }
- }]);
-
- return TestLocation;
-})();
-
-module.exports = TestLocation;
-},{"../History":22,"../actions/LocationActions":32,"invariant":19}],52:[function(require,module,exports){
-'use strict';
-
-var createRouter = require('./createRouter');
-
-/**
- * A high-level convenience method that creates, configures, and
- * runs a router in one shot. The method signature is:
- *
- * Router.run(routes[, location ], callback);
- *
- * Using `window.location.hash` to manage the URL, you could do:
- *
- * Router.run(routes, function (Handler) {
- * React.render( , document.body);
- * });
- *
- * Using HTML5 history and a custom "cursor" prop:
- *
- * Router.run(routes, Router.HistoryLocation, function (Handler) {
- * React.render(, document.body);
- * });
- *
- * Returns the newly created router.
- *
- * Note: If you need to specify further options for your router such
- * as error/abort handling or custom scroll behavior, use Router.create
- * instead.
- *
- * var router = Router.create(options);
- * router.run(function (Handler) {
- * // ...
- * });
- */
-function runRouter(routes, location, callback) {
- if (typeof location === 'function') {
- callback = location;
- location = null;
- }
-
- var router = createRouter({
- routes: routes,
- location: location
- });
-
- router.run(callback);
-
- return router;
-}
-
-module.exports = runRouter;
-},{"./createRouter":42}],53:[function(require,module,exports){
-'use strict';
-
-function supportsHistory() {
- /*! taken from modernizr
- * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
- * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
- * changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586
- */
- var ua = navigator.userAgent;
- if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {
- return false;
- }
- return window.history && 'pushState' in window.history;
-}
-
-module.exports = supportsHistory;
-},{}],54:[function(require,module,exports){
-(function (process){
-/**
- * Copyright 2014-2015, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of 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;
-}).call(this,require('_process'))
-},{"_process":20}],55:[function(require,module,exports){
-'use strict';
-
-function ToObject(val) {
- if (val == null) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-module.exports = Object.assign || function (target, source) {
- var from;
- var keys;
- var to = ToObject(target);
-
- for (var s = 1; s < arguments.length; s++) {
- from = arguments[s];
- keys = Object.keys(Object(from));
-
- for (var i = 0; i < keys.length; i++) {
- to[keys[i]] = from[keys[i]];
- }
- }
-
- return to;
-};
-
-},{}],56:[function(require,module,exports){
-module.exports = require('./lib/');
-
-},{"./lib/":57}],57:[function(require,module,exports){
-// Load modules
-
-var Stringify = require('./stringify');
-var Parse = require('./parse');
-
-
-// Declare internals
-
-var internals = {};
-
-
-module.exports = {
- stringify: Stringify,
- parse: Parse
-};
-
-},{"./parse":58,"./stringify":59}],58:[function(require,module,exports){
-// Load modules
-
-var Utils = require('./utils');
-
-
-// Declare internals
-
-var internals = {
- delimiter: '&',
- depth: 5,
- arrayLimit: 20,
- parameterLimit: 1000
-};
-
-
-internals.parseValues = function (str, options) {
-
- var obj = {};
- var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
-
- for (var i = 0, il = parts.length; i < il; ++i) {
- var part = parts[i];
- var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
-
- if (pos === -1) {
- obj[Utils.decode(part)] = '';
- }
- else {
- var key = Utils.decode(part.slice(0, pos));
- var val = Utils.decode(part.slice(pos + 1));
-
- if (Object.prototype.hasOwnProperty(key)) {
- continue;
- }
-
- if (!obj.hasOwnProperty(key)) {
- obj[key] = val;
- }
- else {
- obj[key] = [].concat(obj[key]).concat(val);
- }
- }
- }
-
- return obj;
-};
-
-
-internals.parseObject = function (chain, val, options) {
-
- if (!chain.length) {
- return val;
- }
-
- var root = chain.shift();
-
- var obj = {};
- if (root === '[]') {
- obj = [];
- obj = obj.concat(internals.parseObject(chain, val, options));
- }
- else {
- var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
- var index = parseInt(cleanRoot, 10);
- var indexString = '' + index;
- if (!isNaN(index) &&
- root !== cleanRoot &&
- indexString === cleanRoot &&
- index >= 0 &&
- index <= options.arrayLimit) {
-
- obj = [];
- obj[index] = internals.parseObject(chain, val, options);
- }
- else {
- obj[cleanRoot] = internals.parseObject(chain, val, options);
- }
- }
-
- return obj;
-};
-
-
-internals.parseKeys = function (key, val, options) {
-
- if (!key) {
- return;
- }
-
- // The regex chunks
-
- var parent = /^([^\[\]]*)/;
- var child = /(\[[^\[\]]*\])/g;
-
- // Get the parent
-
- var segment = parent.exec(key);
-
- // Don't allow them to overwrite object prototype properties
-
- if (Object.prototype.hasOwnProperty(segment[1])) {
- return;
- }
-
- // Stash the parent if it exists
-
- var keys = [];
- if (segment[1]) {
- keys.push(segment[1]);
- }
-
- // Loop through children appending to the array until we hit depth
-
- var i = 0;
- while ((segment = child.exec(key)) !== null && i < options.depth) {
-
- ++i;
- if (!Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
- keys.push(segment[1]);
- }
- }
-
- // If there's a remainder, just add whatever is left
-
- if (segment) {
- keys.push('[' + key.slice(segment.index) + ']');
- }
-
- return internals.parseObject(keys, val, options);
-};
-
-
-module.exports = function (str, options) {
-
- if (str === '' ||
- str === null ||
- typeof str === 'undefined') {
-
- return {};
- }
-
- options = options || {};
- options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;
- options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;
- options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;
- options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;
-
- var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;
- var obj = {};
-
- // Iterate over the keys and setup the new object
-
- var keys = Object.keys(tempObj);
- for (var i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- var newObj = internals.parseKeys(key, tempObj[key], options);
- obj = Utils.merge(obj, newObj);
- }
-
- return Utils.compact(obj);
-};
-
-},{"./utils":60}],59:[function(require,module,exports){
-// Load modules
-
-var Utils = require('./utils');
-
-
-// Declare internals
-
-var internals = {
- delimiter: '&',
- arrayPrefixGenerators: {
- brackets: function (prefix, key) {
- return prefix + '[]';
- },
- indices: function (prefix, key) {
- return prefix + '[' + key + ']';
- },
- repeat: function (prefix, key) {
- return prefix;
- }
- }
-};
-
-
-internals.stringify = function (obj, prefix, generateArrayPrefix) {
-
- if (Utils.isBuffer(obj)) {
- obj = obj.toString();
- }
- else if (obj instanceof Date) {
- obj = obj.toISOString();
- }
- else if (obj === null) {
- obj = '';
- }
-
- if (typeof obj === 'string' ||
- typeof obj === 'number' ||
- typeof obj === 'boolean') {
-
- return [encodeURIComponent(prefix) + '=' + encodeURIComponent(obj)];
- }
-
- var values = [];
-
- if (typeof obj === 'undefined') {
- return values;
- }
-
- var objKeys = Object.keys(obj);
- for (var i = 0, il = objKeys.length; i < il; ++i) {
- var key = objKeys[i];
- if (Array.isArray(obj)) {
- values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix));
- }
- else {
- values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix));
- }
- }
-
- return values;
-};
-
-
-module.exports = function (obj, options) {
-
- options = options || {};
- var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
-
- var keys = [];
-
- if (typeof obj !== 'object' ||
- obj === null) {
-
- return '';
- }
-
- var arrayFormat;
- if (options.arrayFormat in internals.arrayPrefixGenerators) {
- arrayFormat = options.arrayFormat;
- }
- else if ('indices' in options) {
- arrayFormat = options.indices ? 'indices' : 'repeat';
- }
- else {
- arrayFormat = 'indices';
- }
-
- var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];
-
- var objKeys = Object.keys(obj);
- for (var i = 0, il = objKeys.length; i < il; ++i) {
- var key = objKeys[i];
- keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix));
- }
-
- return keys.join(delimiter);
-};
-
-},{"./utils":60}],60:[function(require,module,exports){
-// Load modules
-
-
-// Declare internals
-
-var internals = {};
-
-
-exports.arrayToObject = function (source) {
-
- var obj = {};
- for (var i = 0, il = source.length; i < il; ++i) {
- if (typeof source[i] !== 'undefined') {
-
- obj[i] = source[i];
- }
- }
-
- return obj;
-};
-
-
-exports.merge = function (target, source) {
-
- if (!source) {
- return target;
- }
-
- if (typeof source !== 'object') {
- if (Array.isArray(target)) {
- target.push(source);
- }
- else {
- target[source] = true;
- }
-
- return target;
- }
-
- if (typeof target !== 'object') {
- target = [target].concat(source);
- return target;
- }
-
- if (Array.isArray(target) &&
- !Array.isArray(source)) {
-
- target = exports.arrayToObject(target);
- }
-
- var keys = Object.keys(source);
- for (var k = 0, kl = keys.length; k < kl; ++k) {
- var key = keys[k];
- var value = source[key];
-
- if (!target[key]) {
- target[key] = value;
- }
- else {
- target[key] = exports.merge(target[key], value);
- }
- }
-
- return target;
-};
-
-
-exports.decode = function (str) {
-
- try {
- return decodeURIComponent(str.replace(/\+/g, ' '));
- } catch (e) {
- return str;
- }
-};
-
-
-exports.compact = function (obj, refs) {
-
- if (typeof obj !== 'object' ||
- obj === null) {
-
- return obj;
- }
-
- refs = refs || [];
- var lookup = refs.indexOf(obj);
- if (lookup !== -1) {
- return refs[lookup];
- }
-
- refs.push(obj);
-
- if (Array.isArray(obj)) {
- var compacted = [];
-
- for (var i = 0, il = obj.length; i < il; ++i) {
- if (typeof obj[i] !== 'undefined') {
- compacted.push(obj[i]);
- }
- }
-
- return compacted;
- }
-
- var keys = Object.keys(obj);
- for (i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- obj[key] = exports.compact(obj[key], refs);
- }
-
- return obj;
-};
-
-
-exports.isRegExp = function (obj) {
- return Object.prototype.toString.call(obj) === '[object RegExp]';
-};
-
-
-exports.isBuffer = function (obj) {
-
- if (obj === null ||
- typeof obj === 'undefined') {
-
- return false;
- }
-
- return !!(obj.constructor &&
- obj.constructor.isBuffer &&
- obj.constructor.isBuffer(obj));
-};
-
-},{}],61:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".chasing-dots {\n width: 27px;\n height: 27px;\n position: relative;\n\n -webkit-animation: rotate 2.0s infinite linear;\n animation: rotate 2.0s infinite linear;\n}\n\n.dot1, .dot2 {\n width: 60%;\n height: 60%;\n display: inline-block;\n position: absolute;\n top: 0;\n background-color: #333;\n border-radius: 100%;\n\n -webkit-animation: bounce 2.0s infinite ease-in-out;\n animation: bounce 2.0s infinite ease-in-out;\n}\n\n.dot2 {\n top: auto;\n bottom: 0px;\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s;\n}\n\n@-webkit-keyframes rotate { 100% { -webkit-transform: rotate(360deg) }}\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n -webkit-transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% { -webkit-transform: scale(0.0) }\n 50% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: scale(0.0);\n -webkit-transform: scale(0.0);\n } 50% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n}\n\n";
-inject(css, undefined, '_1ikdv7n');
-module.exports = css;
-
-},{"./../../cssify":18}],62:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".circle-wrapper {\n width: 22px;\n height: 22px;\n position: relative;\n}\n\n.circle {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.circle:before {\n content: '';\n display: block;\n margin: 0 auto;\n width: 20%;\n height: 20%;\n background-color: #333;\n\n border-radius: 100%;\n -webkit-animation: bouncedelay 1.2s infinite ease-in-out;\n animation: bouncedelay 1.2s infinite ease-in-out;\n /* Prevent first frame from flickering when animation starts */\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n}\n\n.circle2 { -webkit-transform: rotate(30deg); transform: rotate(30deg) }\n.circle3 { -webkit-transform: rotate(60deg); transform: rotate(60deg) }\n.circle4 { -webkit-transform: rotate(90deg); transform: rotate(90deg) }\n.circle5 { -webkit-transform: rotate(120deg); transform: rotate(120deg) }\n.circle6 { -webkit-transform: rotate(150deg); transform: rotate(150deg) }\n.circle7 { -webkit-transform: rotate(180deg); transform: rotate(180deg) }\n.circle8 { -webkit-transform: rotate(210deg); transform: rotate(210deg) }\n.circle9 { -webkit-transform: rotate(240deg); transform: rotate(240deg) }\n.circle10 { -webkit-transform: rotate(270deg); transform: rotate(270deg) }\n.circle11 { -webkit-transform: rotate(300deg); transform: rotate(300deg) }\n.circle12 { -webkit-transform: rotate(330deg); transform: rotate(330deg) }\n\n.circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s }\n.circle3:before { -webkit-animation-delay: -1.0s; animation-delay: -1.0s }\n.circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s }\n.circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s }\n.circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s }\n.circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s }\n.circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s }\n.circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s }\n.circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s }\n.circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s }\n.circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s }\n\n@-webkit-keyframes bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0.0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0.0);\n transform: scale(0.0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n\n";
-inject(css, undefined, '_1knys15');
-module.exports = css;
-
-},{"./../../cssify":18}],63:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".cube-grid {\n width:27px;\n height:27px;\n}\n\n.cube {\n width:33%;\n height:33%;\n background:#333;\n float:left;\n -webkit-animation: scaleDelay 1.3s infinite ease-in-out;\n animation: scaleDelay 1.3s infinite ease-in-out;\n}\n\n/*\n * Spinner positions\n * 1 2 3\n * 4 5 6\n * 7 8 9\n */\n\n.spinner .cube:nth-child(1) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s }\n.spinner .cube:nth-child(2) { -webkit-animation-delay: 0.3s; animation-delay: 0.3s }\n.spinner .cube:nth-child(3) { -webkit-animation-delay: 0.4s; animation-delay: 0.4s }\n.spinner .cube:nth-child(4) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s }\n.spinner .cube:nth-child(5) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s }\n.spinner .cube:nth-child(6) { -webkit-animation-delay: 0.3s; animation-delay: 0.3s }\n.spinner .cube:nth-child(7) { -webkit-animation-delay: 0.0s; animation-delay: 0.0s }\n.spinner .cube:nth-child(8) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s }\n.spinner .cube:nth-child(9) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s }\n\n@-webkit-keyframes scaleDelay {\n 0%, 70%, 100% { -webkit-transform:scale3D(1.0, 1.0, 1.0) }\n 35% { -webkit-transform:scale3D(0.0, 0.0, 1.0) }\n}\n\n@keyframes scaleDelay {\n 0%, 70%, 100% { -webkit-transform:scale3D(1.0, 1.0, 1.0); transform:scale3D(1.0, 1.0, 1.0) }\n 35% { -webkit-transform:scale3D(1.0, 1.0, 1.0); transform:scale3D(0.0, 0.0, 1.0) }\n}\n\n";
-inject(css, undefined, '_1fw5czj');
-module.exports = css;
-
-},{"./../../cssify":18}],64:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".double-bounce {\n width: 27px;\n height: 27px;\n\n position: relative;\n}\n\n.double-bounce1, .double-bounce2 {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: #333;\n opacity: 0.6;\n position: absolute;\n top: 0;\n left: 0;\n\n -webkit-animation: bounce 2.0s infinite ease-in-out;\n animation: bounce 2.0s infinite ease-in-out;\n}\n\n.double-bounce2 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s;\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% { -webkit-transform: scale(0.0) }\n 50% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: scale(0.0);\n -webkit-transform: scale(0.0);\n } 50% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n}\n\n";
-inject(css, undefined, '_120xwj7');
-module.exports = css;
-
-},{"./../../cssify":18}],65:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = "@-webkit-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@-moz-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@-ms-keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.fade-in {\n -webkit-animation: fade-in 2s;\n -moz-animation: fade-in 2s;\n -o-animation: fade-in 2s;\n -ms-animation: fade-in 2s;\n}\n";
-inject(css, undefined, '_1xlaefr');
-module.exports = css;
-
-},{"./../../cssify":18}],66:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".pulse {\n width: 27px;\n height: 27px;\n background-color: #333;\n\n border-radius: 100%;\n -webkit-animation: scaleout 1.0s infinite ease-in-out;\n animation: scaleout 1.0s infinite ease-in-out;\n}\n\n@-webkit-keyframes scaleout {\n 0% { -webkit-transform: scale(0.0) }\n 100% {\n -webkit-transform: scale(1.0);\n opacity: 0;\n }\n}\n\n@keyframes scaleout {\n 0% {\n transform: scale(0.0);\n -webkit-transform: scale(0.0);\n } 100% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n opacity: 0;\n }\n}\n\n";
-inject(css, undefined, '_1sgxhdw');
-module.exports = css;
-
-},{"./../../cssify":18}],67:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".rotating-plane {\n width: 27px;\n height: 27px;\n background-color: #333;\n\n -webkit-animation: rotateplane 1.2s infinite ease-in-out;\n animation: rotateplane 1.2s infinite ease-in-out;\n}\n\n@-webkit-keyframes rotateplane {\n 0% { -webkit-transform: perspective(120px) }\n 50% { -webkit-transform: perspective(120px) rotateY(180deg) }\n 100% { -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg) }\n}\n\n@keyframes rotateplane {\n 0% {\n transform: perspective(120px) rotateX(0deg) rotateY(0deg);\n -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg);\n } 50% {\n transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);\n -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);\n } 100% {\n transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);\n -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);\n }\n}\n\n";
-inject(css, undefined, '_nsud8c');
-module.exports = css;
-
-},{"./../../cssify":18}],68:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".three-bounce > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: bouncedelay 1.4s infinite ease-in-out;\n animation: bouncedelay 1.4s infinite ease-in-out;\n /* Prevent first frame from flickering when animation starts */\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n}\n\n.three-bounce .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.three-bounce .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0.0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes bouncedelay {\n 0%, 80%, 100% {\n transform: scale(0.0);\n -webkit-transform: scale(0.0);\n } 40% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n}\n";
-inject(css, undefined, '_17be1wo');
-module.exports = css;
-
-},{"./../../cssify":18}],69:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".wandering-cubes {\n width: 27px;\n height: 27px;\n position: relative;\n}\n\n.cube1, .cube2 {\n background-color: #333;\n width: 10px;\n height: 10px;\n position: absolute;\n top: 0;\n left: 0;\n\n -webkit-animation: cubemove 1.8s infinite ease-in-out;\n animation: cubemove 1.8s infinite ease-in-out;\n}\n\n.cube2 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s;\n}\n\n@-webkit-keyframes cubemove {\n 25% { -webkit-transform: translateX(22px) rotate(-90deg) scale(0.5) }\n 50% { -webkit-transform: translateX(22px) translateY(22px) rotate(-180deg) }\n 75% { -webkit-transform: translateX(0px) translateY(22px) rotate(-270deg) scale(0.5) }\n 100% { -webkit-transform: rotate(-360deg) }\n}\n\n@keyframes cubemove {\n 25% { \n transform: translateX(42px) rotate(-90deg) scale(0.5);\n -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5);\n } 50% {\n /* Hack to make FF rotate in the right direction */\n transform: translateX(42px) translateY(42px) rotate(-179deg);\n -webkit-transform: translateX(42px) translateY(42px) rotate(-179deg);\n } 50.1% {\n transform: translateX(42px) translateY(42px) rotate(-180deg);\n -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg);\n } 75% {\n transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);\n -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);\n } 100% {\n transform: rotate(-360deg);\n -webkit-transform: rotate(-360deg);\n }\n}\n\n";
-inject(css, undefined, '_17oun3z');
-module.exports = css;
-
-},{"./../../cssify":18}],70:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".wave {\n width: 50px;\n height: 27px;\n}\n\n.wave > div {\n background-color: #333;\n height: 100%;\n width: 6px;\n display: inline-block;\n\n -webkit-animation: stretchdelay 1.2s infinite ease-in-out;\n animation: stretchdelay 1.2s infinite ease-in-out;\n}\n\n.wave .rect2 {\n -webkit-animation-delay: -1.1s;\n animation-delay: -1.1s;\n}\n\n.wave .rect3 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s;\n}\n\n.wave .rect4 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s;\n}\n\n.wave .rect5 {\n -webkit-animation-delay: -0.8s;\n animation-delay: -0.8s;\n}\n\n@-webkit-keyframes stretchdelay {\n 0%, 40%, 100% { -webkit-transform: scaleY(0.4) }\n 20% { -webkit-transform: scaleY(1.0) }\n}\n\n@keyframes stretchdelay {\n 0%, 40%, 100% {\n transform: scaleY(0.4);\n -webkit-transform: scaleY(0.4);\n } 20% {\n transform: scaleY(1.0);\n -webkit-transform: scaleY(1.0);\n }\n}\n\n";
-inject(css, undefined, '_19kjo1q');
-module.exports = css;
-
-},{"./../../cssify":18}],71:[function(require,module,exports){
-var inject = require('./../../cssify');
-var css = ".wordpress {\n background: #333;\n width: 27px;\n height: 27px;\n display: inline-block;\n border-radius: 27px;\n position: relative;\n -webkit-animation: inner-circle 1s linear infinite;\n animation: inner-circle 1s linear infinite;\n}\n\n.inner-circle {\n display: block;\n background: #fff;\n width: 8px;\n height: 8px;\n position: absolute;\n border-radius: 8px;\n top: 5px;\n left: 5px;\n}\n\n@-webkit-keyframes inner-circle {\n 0% { -webkit-transform: rotate(0); }\n 100% { -webkit-transform: rotate(360deg); }\n}\n\n@keyframes inner-circle {\n 0% { transform: rotate(0); -webkit-transform:rotate(0); }\n 100% { transform: rotate(360deg); -webkit-transform:rotate(360deg); }\n}\n\n";
-inject(css, undefined, '_f8og2a');
-module.exports = css;
-
-},{"./../../cssify":18}],72:[function(require,module,exports){
-// Generated by CoffeeScript 1.9.1
-var React, cx, objectAssign;
-
-React = require('react');
-
-cx = require('classnames');
-
-objectAssign = require('react/lib/Object.assign');
-
-module.exports = React.createClass({
- displayName: "SpinKit",
- propTypes: {
- spinnerName: React.PropTypes.string.isRequired,
- noFadeIn: React.PropTypes.bool,
- overrideSpinnerClassName: React.PropTypes.string
- },
- getDefaultProps: function() {
- return {
- spinnerName: 'three-bounce',
- noFadeIn: false,
- overrideSpinnerClassName: ""
- };
- },
- render: function() {
- var classTests, classes;
- classTests = {
- "fade-in": !this.props.noFadeIn,
- spinner: this.props.overrideSpinnerClassName === ""
- };
- classTests[this.props.overrideSpinnerClassName] = this.props.overrideSpinnerClassName;
- classes = cx(classTests);
- if (this.props.className) {
- classes = classes + " " + this.props.className;
- }
- if (!this.props.noFadeIn) {
- require('../css/fade-in.css');
- }
- switch (this.props.spinnerName) {
- case "three-bounce":
- require('../css/three-bounce.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": "three-bounce " + classes
- }), React.createElement("div", {
- "className": "bounce1"
- }), React.createElement("div", {
- "className": "bounce2"
- }), React.createElement("div", {
- "className": "bounce3"
- }));
- case "double-bounce":
- require('../css/double-bounce.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": "double-bounce " + classes
- }), React.createElement("div", {
- "className": "double-bounce1"
- }), React.createElement("div", {
- "className": "double-bounce2"
- }));
- case "rotating-plane":
- require('../css/rotating-plane.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": classes
- }), React.createElement("div", {
- "className": "rotating-plane"
- }));
- case "wave":
- require('../css/wave.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": "wave " + classes
- }), React.createElement("div", {
- "className": "rect1"
- }), React.createElement("div", {
- "className": "rect2"
- }), React.createElement("div", {
- "className": "rect3"
- }), React.createElement("div", {
- "className": "rect4"
- }), React.createElement("div", {
- "className": "rect5"
- }));
- case "wandering-cubes":
- require('../css/wandering-cubes.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": "wandering-cubes " + classes
- }), React.createElement("div", {
- "className": "cube1"
- }), React.createElement("div", {
- "className": "cube2"
- }));
- case "pulse":
- require('../css/pulse.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": classes
- }), React.createElement("div", {
- "className": "pulse"
- }));
- case "chasing-dots":
- require('../css/chasing-dots.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": classes
- }), React.createElement("div", {
- "className": "chasing-dots"
- }, React.createElement("div", {
- "className": "dot1"
- }), React.createElement("div", {
- "className": "dot2"
- })));
- case "circle":
- require('../css/circle.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": "circle-wrapper " + classes
- }), React.createElement("div", {
- "className": "circle1 circle"
- }), React.createElement("div", {
- "className": "circle2 circle"
- }), React.createElement("div", {
- "className": "circle3 circle"
- }), React.createElement("div", {
- "className": "circle4 circle"
- }), React.createElement("div", {
- "className": "circle5 circle"
- }), React.createElement("div", {
- "className": "circle6 circle"
- }), React.createElement("div", {
- "className": "circle7 circle"
- }), React.createElement("div", {
- "className": "circle8 circle"
- }), React.createElement("div", {
- "className": "circle9 circle"
- }), React.createElement("div", {
- "className": "circle10 circle"
- }), React.createElement("div", {
- "className": "circle11 circle"
- }), React.createElement("div", {
- "className": "circle12 circle"
- }));
- case "cube-grid":
- require('../css/cube-grid.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": "cube-grid " + classes
- }), React.createElement("div", {
- "className": "cube"
- }), React.createElement("div", {
- "className": "cube"
- }), React.createElement("div", {
- "className": "cube"
- }), React.createElement("div", {
- "className": "cube"
- }), React.createElement("div", {
- "className": "cube"
- }), React.createElement("div", {
- "className": "cube"
- }), React.createElement("div", {
- "className": "cube"
- }), React.createElement("div", {
- "className": "cube"
- }), React.createElement("div", {
- "className": "cube"
- }));
- case "wordpress":
- require('../css/wordpress.css');
- return React.createElement("div", React.__spread({}, this.props, {
- "className": classes
- }), React.createElement("div", {
- "className": "wordpress"
- }, React.createElement("span", {
- "className": "inner-circle"
- })));
- }
- }
-});
-
-},{"../css/chasing-dots.css":61,"../css/circle.css":62,"../css/cube-grid.css":63,"../css/double-bounce.css":64,"../css/fade-in.css":65,"../css/pulse.css":66,"../css/rotating-plane.css":67,"../css/three-bounce.css":68,"../css/wandering-cubes.css":69,"../css/wave.css":70,"../css/wordpress.css":71,"classnames":17,"react":227,"react/lib/Object.assign":98}],73:[function(require,module,exports){
-/**
- * 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.
- *
- * @providesModule AutoFocusMixin
- * @typechecks static-only
- */
-
-'use strict';
-
-var focusNode = require("./focusNode");
-
-var AutoFocusMixin = {
- componentDidMount: function() {
- if (this.props.autoFocus) {
- focusNode(this.getDOMNode());
- }
- }
-};
-
-module.exports = AutoFocusMixin;
-
-},{"./focusNode":191}],74:[function(require,module,exports){
-/**
- * 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.
- *
- * @providesModule BeforeInputEventPlugin
- * @typechecks static-only
- */
-
-'use strict';
-
-var EventConstants = require("./EventConstants");
-var EventPropagators = require("./EventPropagators");
-var ExecutionEnvironment = require("./ExecutionEnvironment");
-var FallbackCompositionState = require("./FallbackCompositionState");
-var SyntheticCompositionEvent = require("./SyntheticCompositionEvent");
-var SyntheticInputEvent = require("./SyntheticInputEvent");
-
-var keyOf = require("./keyOf");
-
-var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
-var START_KEYCODE = 229;
-
-var canUseCompositionEvent = (
- ExecutionEnvironment.canUseDOM &&
- 'CompositionEvent' in window
-);
-
-var documentMode = null;
-if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
- documentMode = document.documentMode;
-}
-
-// Webkit offers a very useful `textInput` event that can be used to
-// directly represent `beforeInput`. The IE `textinput` event is not as
-// useful, so we don't use it.
-var canUseTextInputEvent = (
- ExecutionEnvironment.canUseDOM &&
- 'TextEvent' in window &&
- !documentMode &&
- !isPresto()
-);
-
-// In IE9+, we have access to composition events, but the data supplied
-// by the native compositionend event may be incorrect. Japanese ideographic
-// spaces, for instance (\u3000) are not recorded correctly.
-var useFallbackCompositionData = (
- ExecutionEnvironment.canUseDOM &&
- (
- (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11)
- )
-);
-
-/**
- * Opera <= 12 includes TextEvent in window, but does not fire
- * text input events. Rely on keypress instead.
- */
-function isPresto() {
- var opera = window.opera;
- return (
- typeof opera === 'object' &&
- typeof opera.version === 'function' &&
- parseInt(opera.version(), 10) <= 12
- );
-}
-
-var SPACEBAR_CODE = 32;
-var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
-
-var topLevelTypes = EventConstants.topLevelTypes;
-
-// Events and their corresponding property names.
-var eventTypes = {
- beforeInput: {
- phasedRegistrationNames: {
- bubbled: keyOf({onBeforeInput: null}),
- captured: keyOf({onBeforeInputCapture: null})
- },
- dependencies: [
- topLevelTypes.topCompositionEnd,
- topLevelTypes.topKeyPress,
- topLevelTypes.topTextInput,
- topLevelTypes.topPaste
- ]
- },
- compositionEnd: {
- phasedRegistrationNames: {
- bubbled: keyOf({onCompositionEnd: null}),
- captured: keyOf({onCompositionEndCapture: null})
- },
- dependencies: [
- topLevelTypes.topBlur,
- topLevelTypes.topCompositionEnd,
- topLevelTypes.topKeyDown,
- topLevelTypes.topKeyPress,
- topLevelTypes.topKeyUp,
- topLevelTypes.topMouseDown
- ]
- },
- compositionStart: {
- phasedRegistrationNames: {
- bubbled: keyOf({onCompositionStart: null}),
- captured: keyOf({onCompositionStartCapture: null})
- },
- dependencies: [
- topLevelTypes.topBlur,
- topLevelTypes.topCompositionStart,
- topLevelTypes.topKeyDown,
- topLevelTypes.topKeyPress,
- topLevelTypes.topKeyUp,
- topLevelTypes.topMouseDown
- ]
- },
- compositionUpdate: {
- phasedRegistrationNames: {
- bubbled: keyOf({onCompositionUpdate: null}),
- captured: keyOf({onCompositionUpdateCapture: null})
- },
- dependencies: [
- topLevelTypes.topBlur,
- topLevelTypes.topCompositionUpdate,
- topLevelTypes.topKeyDown,
- topLevelTypes.topKeyPress,
- topLevelTypes.topKeyUp,
- topLevelTypes.topMouseDown
- ]
- }
-};
-
-// Track whether we've ever handled a keypress on the space key.
-var hasSpaceKeypress = false;
-
-/**
- * Return whether a native keypress event is assumed to be a command.
- * This is required because Firefox fires `keypress` events for key commands
- * (cut, copy, select-all, etc.) even though no character is inserted.
- */
-function isKeypressCommand(nativeEvent) {
- return (
- (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
- // ctrlKey && altKey is equivalent to AltGr, and is not a command.
- !(nativeEvent.ctrlKey && nativeEvent.altKey)
- );
-}
-
-
-/**
- * Translate native top level events into event types.
- *
- * @param {string} topLevelType
- * @return {object}
- */
-function getCompositionEventType(topLevelType) {
- switch (topLevelType) {
- case topLevelTypes.topCompositionStart:
- return eventTypes.compositionStart;
- case topLevelTypes.topCompositionEnd:
- return eventTypes.compositionEnd;
- case topLevelTypes.topCompositionUpdate:
- return eventTypes.compositionUpdate;
- }
-}
-
-/**
- * Does our fallback best-guess model think this event signifies that
- * composition has begun?
- *
- * @param {string} topLevelType
- * @param {object} nativeEvent
- * @return {boolean}
- */
-function isFallbackCompositionStart(topLevelType, nativeEvent) {
- return (
- topLevelType === topLevelTypes.topKeyDown &&
- nativeEvent.keyCode === START_KEYCODE
- );
-}
-
-/**
- * Does our fallback mode think that this event is the end of composition?
- *
- * @param {string} topLevelType
- * @param {object} nativeEvent
- * @return {boolean}
- */
-function isFallbackCompositionEnd(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case topLevelTypes.topKeyUp:
- // Command keys insert or clear IME input.
- return (END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1);
- case topLevelTypes.topKeyDown:
- // Expect IME keyCode on each keydown. If we get any other
- // code we must have exited earlier.
- return (nativeEvent.keyCode !== START_KEYCODE);
- case topLevelTypes.topKeyPress:
- case topLevelTypes.topMouseDown:
- case topLevelTypes.topBlur:
- // Events are not possible without cancelling IME.
- return true;
- default:
- return false;
- }
-}
-
-/**
- * Google Input Tools provides composition data via a CustomEvent,
- * with the `data` property populated in the `detail` object. If this
- * is available on the event object, use it. If not, this is a plain
- * composition event and we have nothing special to extract.
- *
- * @param {object} nativeEvent
- * @return {?string}
- */
-function getDataFromCustomEvent(nativeEvent) {
- var detail = nativeEvent.detail;
- if (typeof detail === 'object' && 'data' in detail) {
- return detail.data;
- }
- return null;
-}
-
-// Track the current IME composition fallback object, if any.
-var currentComposition = null;
-
-/**
- * @param {string} topLevelType Record from `EventConstants`.
- * @param {DOMEventTarget} topLevelTarget The listening component root node.
- * @param {string} topLevelTargetID ID of `topLevelTarget`.
- * @param {object} nativeEvent Native browser event.
- * @return {?object} A SyntheticCompositionEvent.
- */
-function extractCompositionEvent(
- topLevelType,
- topLevelTarget,
- topLevelTargetID,
- nativeEvent
-) {
- var eventType;
- var fallbackData;
-
- if (canUseCompositionEvent) {
- eventType = getCompositionEventType(topLevelType);
- } else if (!currentComposition) {
- if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
- eventType = eventTypes.compositionStart;
- }
- } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
- eventType = eventTypes.compositionEnd;
- }
-
- if (!eventType) {
- return null;
- }
-
- if (useFallbackCompositionData) {
- // The current composition is stored statically and must not be
- // overwritten while composition continues.
- if (!currentComposition && eventType === eventTypes.compositionStart) {
- currentComposition = FallbackCompositionState.getPooled(topLevelTarget);
- } else if (eventType === eventTypes.compositionEnd) {
- if (currentComposition) {
- fallbackData = currentComposition.getData();
- }
- }
- }
-
- var event = SyntheticCompositionEvent.getPooled(
- eventType,
- topLevelTargetID,
- nativeEvent
- );
-
- if (fallbackData) {
- // Inject data generated from fallback path into the synthetic event.
- // This matches the property of native CompositionEventInterface.
- event.data = fallbackData;
- } else {
- var customData = getDataFromCustomEvent(nativeEvent);
- if (customData !== null) {
- event.data = customData;
- }
- }
-
- EventPropagators.accumulateTwoPhaseDispatches(event);
- return event;
-}
-
-/**
- * @param {string} topLevelType Record from `EventConstants`.
- * @param {object} nativeEvent Native browser event.
- * @return {?string} The string corresponding to this `beforeInput` event.
- */
-function getNativeBeforeInputChars(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case topLevelTypes.topCompositionEnd:
- return getDataFromCustomEvent(nativeEvent);
- case topLevelTypes.topKeyPress:
- /**
- * If native `textInput` events are available, our goal is to make
- * use of them. However, there is a special case: the spacebar key.
- * In Webkit, preventing default on a spacebar `textInput` event
- * cancels character insertion, but it *also* causes the browser
- * to fall back to its default spacebar behavior of scrolling the
- * page.
- *
- * Tracking at:
- * https://code.google.com/p/chromium/issues/detail?id=355103
- *
- * To avoid this issue, use the keypress event as if no `textInput`
- * event is available.
- */
- var which = nativeEvent.which;
- if (which !== SPACEBAR_CODE) {
- return null;
- }
-
- hasSpaceKeypress = true;
- return SPACEBAR_CHAR;
-
- case topLevelTypes.topTextInput:
- // Record the characters to be added to the DOM.
- var chars = nativeEvent.data;
-
- // If it's a spacebar character, assume that we have already handled
- // it at the keypress level and bail immediately. Android Chrome
- // doesn't give us keycodes, so we need to blacklist it.
- if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
- return null;
- }
-
- return chars;
-
- default:
- // For other native event types, do nothing.
- return null;
- }
-}
-
-/**
- * For browsers that do not provide the `textInput` event, extract the
- * appropriate string to use for SyntheticInputEvent.
- *
- * @param {string} topLevelType Record from `EventConstants`.
- * @param {object} nativeEvent Native browser event.
- * @return {?string} The fallback string for this `beforeInput` event.
- */
-function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
- // If we are currently composing (IME) and using a fallback to do so,
- // try to extract the composed characters from the fallback object.
- if (currentComposition) {
- if (
- topLevelType === topLevelTypes.topCompositionEnd ||
- isFallbackCompositionEnd(topLevelType, nativeEvent)
- ) {
- var chars = currentComposition.getData();
- FallbackCompositionState.release(currentComposition);
- currentComposition = null;
- return chars;
- }
- return null;
- }
-
- switch (topLevelType) {
- case topLevelTypes.topPaste:
- // If a paste event occurs after a keypress, throw out the input
- // chars. Paste events should not lead to BeforeInput events.
- return null;
- case topLevelTypes.topKeyPress:
- /**
- * As of v27, Firefox may fire keypress events even when no character
- * will be inserted. A few possibilities:
- *
- * - `which` is `0`. Arrow keys, Esc key, etc.
- *
- * - `which` is the pressed key code, but no char is available.
- * Ex: 'AltGr + d` in Polish. There is no modified character for
- * this key combination and no character is inserted into the
- * document, but FF fires the keypress for char code `100` anyway.
- * No `input` event will occur.
- *
- * - `which` is the pressed key code, but a command combination is
- * being used. Ex: `Cmd+C`. No character is inserted, and no
- * `input` event will occur.
- */
- if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
- return String.fromCharCode(nativeEvent.which);
- }
- return null;
- case topLevelTypes.topCompositionEnd:
- return useFallbackCompositionData ? null : nativeEvent.data;
- default:
- return null;
- }
-}
-
-/**
- * Extract a SyntheticInputEvent for `beforeInput`, based on either native
- * `textInput` or fallback behavior.
- *
- * @param {string} topLevelType Record from `EventConstants`.
- * @param {DOMEventTarget} topLevelTarget The listening component root node.
- * @param {string} topLevelTargetID ID of `topLevelTarget`.
- * @param {object} nativeEvent Native browser event.
- * @return {?object} A SyntheticInputEvent.
- */
-function extractBeforeInputEvent(
- topLevelType,
- topLevelTarget,
- topLevelTargetID,
- nativeEvent
-) {
- var chars;
-
- if (canUseTextInputEvent) {
- chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
- } else {
- chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
- }
-
- // If no characters are being inserted, no BeforeInput event should
- // be fired.
- if (!chars) {
- return null;
- }
-
- var event = SyntheticInputEvent.getPooled(
- eventTypes.beforeInput,
- topLevelTargetID,
- nativeEvent
- );
-
- event.data = chars;
- EventPropagators.accumulateTwoPhaseDispatches(event);
- return event;
-}
-
-/**
- * Create an `onBeforeInput` event to match
- * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
- *
- * This event plugin is based on the native `textInput` event
- * available in Chrome, Safari, Opera, and IE. This event fires after
- * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
- *
- * `beforeInput` is spec'd but not implemented in any browsers, and
- * the `input` event does not provide any useful information about what has
- * actually been added, contrary to the spec. Thus, `textInput` is the best
- * available event to identify the characters that have actually been inserted
- * into the target node.
- *
- * This plugin is also responsible for emitting `composition` events, thus
- * allowing us to share composition fallback code for both `beforeInput` and
- * `composition` event types.
- */
-var BeforeInputEventPlugin = {
-
- eventTypes: eventTypes,
-
- /**
- * @param {string} topLevelType Record from `EventConstants`.
- * @param {DOMEventTarget} topLevelTarget The listening component root node.
- * @param {string} topLevelTargetID ID of `topLevelTarget`.
- * @param {object} nativeEvent Native browser event.
- * @return {*} An accumulation of synthetic events.
- * @see {EventPluginHub.extractEvents}
- */
- extractEvents: function(
- topLevelType,
- topLevelTarget,
- topLevelTargetID,
- nativeEvent
- ) {
- return [
- extractCompositionEvent(
- topLevelType,
- topLevelTarget,
- topLevelTargetID,
- nativeEvent
- ),
- extractBeforeInputEvent(
- topLevelType,
- topLevelTarget,
- topLevelTargetID,
- nativeEvent
- )
- ];
- }
-};
-
-module.exports = BeforeInputEventPlugin;
-
-},{"./EventConstants":86,"./EventPropagators":91,"./ExecutionEnvironment":92,"./FallbackCompositionState":93,"./SyntheticCompositionEvent":165,"./SyntheticInputEvent":169,"./keyOf":213}],75:[function(require,module,exports){
-/**
- * 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.
- *
- * @providesModule CSSProperty
- */
-
-'use strict';
-
-/**
- * CSS properties which accept numbers but are not in units of "px".
- */
-var isUnitlessNumber = {
- boxFlex: true,
- boxFlexGroup: true,
- columnCount: true,
- flex: true,
- flexGrow: true,
- flexPositive: true,
- flexShrink: true,
- flexNegative: true,
- fontWeight: true,
- lineClamp: true,
- lineHeight: true,
- opacity: true,
- order: true,
- orphans: true,
- widows: true,
- zIndex: true,
- zoom: true,
-
- // SVG-related properties
- fillOpacity: true,
- strokeDashoffset: true,
- strokeOpacity: true,
- strokeWidth: true
-};
-
-/**
- * @param {string} prefix vendor-specific prefix, eg: Webkit
- * @param {string} key style name, eg: transitionDuration
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
- * WebkitTransitionDuration
- */
-function prefixKey(prefix, key) {
- return prefix + key.charAt(0).toUpperCase() + key.substring(1);
-}
-
-/**
- * Support style names that may come passed in prefixed by adding permutations
- * of vendor prefixes.
- */
-var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
-
-// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
-// infinite loop, because it iterates over the newly added props too.
-Object.keys(isUnitlessNumber).forEach(function(prop) {
- prefixes.forEach(function(prefix) {
- isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
- });
-});
-
-/**
- * Most style properties can be unset by doing .style[prop] = '' but IE8
- * doesn't like doing that with shorthand properties so for the properties that
- * IE8 breaks on, which are listed here, we instead unset each of the
- * individual properties. See http://bugs.jquery.com/ticket/12385.
- * The 4-value 'clock' properties like margin, padding, border-width seem to
- * behave without any problems. Curiously, list-style works too without any
- * special prodding.
- */
-var shorthandPropertyExpansions = {
- background: {
- backgroundImage: true,
- backgroundPosition: true,
- backgroundRepeat: true,
- backgroundColor: true
- },
- border: {
- borderWidth: true,
- borderStyle: true,
- borderColor: true
- },
- borderBottom: {
- borderBottomWidth: true,
- borderBottomStyle: true,
- borderBottomColor: true
- },
- borderLeft: {
- borderLeftWidth: true,
- borderLeftStyle: true,
- borderLeftColor: true
- },
- borderRight: {
- borderRightWidth: true,
- borderRightStyle: true,
- borderRightColor: true
- },
- borderTop: {
- borderTopWidth: true,
- borderTopStyle: true,
- borderTopColor: true
- },
- font: {
- fontStyle: true,
- fontVariant: true,
- fontWeight: true,
- fontSize: true,
- lineHeight: true,
- fontFamily: true
- }
-};
-
-var CSSProperty = {
- isUnitlessNumber: isUnitlessNumber,
- shorthandPropertyExpansions: shorthandPropertyExpansions
-};
-
-module.exports = CSSProperty;
-
-},{}],76:[function(require,module,exports){
-(function (process){
-/**
- * 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.
- *
- * @providesModule CSSPropertyOperations
- * @typechecks static-only
- */
-
-'use strict';
-
-var CSSProperty = require("./CSSProperty");
-var ExecutionEnvironment = require("./ExecutionEnvironment");
-
-var camelizeStyleName = require("./camelizeStyleName");
-var dangerousStyleValue = require("./dangerousStyleValue");
-var hyphenateStyleName = require("./hyphenateStyleName");
-var memoizeStringOnly = require("./memoizeStringOnly");
-var warning = require("./warning");
-
-var processStyleName = memoizeStringOnly(function(styleName) {
- return hyphenateStyleName(styleName);
-});
-
-var styleFloatAccessor = 'cssFloat';
-if (ExecutionEnvironment.canUseDOM) {
- // IE8 only supports accessing cssFloat (standard) as styleFloat
- if (document.documentElement.style.cssFloat === undefined) {
- styleFloatAccessor = 'styleFloat';
- }
-}
-
-if ("production" !== process.env.NODE_ENV) {
- // 'msTransform' is correct, but the other prefixes should be capitalized
- var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
-
- // style values shouldn't contain a semicolon
- var badStyleValueWithSemicolonPattern = /;\s*$/;
-
- var warnedStyleNames = {};
- var warnedStyleValues = {};
-
- var warnHyphenatedStyleName = function(name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
- ("production" !== process.env.NODE_ENV ? warning(
- false,
- 'Unsupported style property %s. Did you mean %s?',
- name,
- camelizeStyleName(name)
- ) : null);
- };
-
- var warnBadVendoredStyleName = function(name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
- ("production" !== process.env.NODE_ENV ? warning(
- false,
- 'Unsupported vendor-prefixed style property %s. Did you mean %s?',
- name,
- name.charAt(0).toUpperCase() + name.slice(1)
- ) : null);
- };
-
- var warnStyleValueWithSemicolon = function(name, value) {
- if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
- return;
- }
-
- warnedStyleValues[value] = true;
- ("production" !== process.env.NODE_ENV ? warning(
- false,
- 'Style property values shouldn\'t contain a semicolon. ' +
- 'Try "%s: %s" instead.',
- name,
- value.replace(badStyleValueWithSemicolonPattern, '')
- ) : null);
- };
-
- /**
- * @param {string} name
- * @param {*} value
- */
- var warnValidStyle = function(name, value) {
- if (name.indexOf('-') > -1) {
- warnHyphenatedStyleName(name);
- } else if (badVendoredStyleNamePattern.test(name)) {
- warnBadVendoredStyleName(name);
- } else if (badStyleValueWithSemicolonPattern.test(value)) {
- warnStyleValueWithSemicolon(name, value);
- }
- };
-}
-
-/**
- * Operations for dealing with CSS properties.
- */
-var CSSPropertyOperations = {
-
- /**
- * Serializes a mapping of style properties for use as inline styles:
- *
- * > createMarkupForStyles({width: '200px', height: 0})
- * "width:200px;height:0;"
- *
- * Undefined values are ignored so that declarative programming is easier.
- * The result should be HTML-escaped before insertion into the DOM.
- *
- * @param {object} styles
- * @return {?string}
- */
- createMarkupForStyles: function(styles) {
- var serialized = '';
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
- var styleValue = styles[styleName];
- if ("production" !== process.env.NODE_ENV) {
- warnValidStyle(styleName, styleValue);
- }
- if (styleValue != null) {
- serialized += processStyleName(styleName) + ':';
- serialized += dangerousStyleValue(styleName, styleValue) + ';';
- }
- }
- return serialized || null;
- },
-
- /**
- * Sets the value for multiple styles on a node. If a value is specified as
- * '' (empty string), the corresponding style property will be unset.
- *
- * @param {DOMElement} node
- * @param {object} styles
- */
- setValueForStyles: function(node, styles) {
- var style = node.style;
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
- if ("production" !== process.env.NODE_ENV) {
- warnValidStyle(styleName, styles[styleName]);
- }
- var styleValue = dangerousStyleValue(styleName, styles[styleName]);
- if (styleName === 'float') {
- styleName = styleFloatAccessor;
- }
- if (styleValue) {
- style[styleName] = styleValue;
- } else {
- var expansion = CSSProperty.shorthandPropertyExpansions[styleName];
- if (expansion) {
- // Shorthand property that IE8 won't like unsetting, so unset each
- // component to placate it
- for (var individualStyleName in expansion) {
- style[individualStyleName] = '';
- }
- } else {
- style[styleName] = '';
- }
- }
- }
- }
-
-};
-
-module.exports = CSSPropertyOperations;
-
-}).call(this,require('_process'))
-},{"./CSSProperty":75,"./ExecutionEnvironment":92,"./camelizeStyleName":180,"./dangerousStyleValue":185,"./hyphenateStyleName":205,"./memoizeStringOnly":215,"./warning":226,"_process":20}],77:[function(require,module,exports){
-(function (process){
-/**
- * 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.
- *
- * @providesModule CallbackQueue
- */
-
-'use strict';
-
-var PooledClass = require("./PooledClass");
-
-var assign = require("./Object.assign");
-var invariant = require("./invariant");
-
-/**
- * A specialized pseudo-event module to help keep track of components waiting to
- * be notified when their DOM representations are available for use.
- *
- * This implements `PooledClass`, so you should never need to instantiate this.
- * Instead, use `CallbackQueue.getPooled()`.
- *
- * @class ReactMountReady
- * @implements PooledClass
- * @internal
- */
-function CallbackQueue() {
- this._callbacks = null;
- this._contexts = null;
-}
-
-assign(CallbackQueue.prototype, {
-
- /**
- * Enqueues a callback to be invoked when `notifyAll` is invoked.
- *
- * @param {function} callback Invoked when `notifyAll` is invoked.
- * @param {?object} context Context to call `callback` with.
- * @internal
- */
- enqueue: function(callback, context) {
- this._callbacks = this._callbacks || [];
- this._contexts = this._contexts || [];
- this._callbacks.push(callback);
- this._contexts.push(context);
- },
-
- /**
- * Invokes all enqueued callbacks and clears the queue. This is invoked after
- * the DOM representation of a component has been created or updated.
- *
- * @internal
- */
- notifyAll: function() {
- var callbacks = this._callbacks;
- var contexts = this._contexts;
- if (callbacks) {
- ("production" !== process.env.NODE_ENV ? invariant(
- callbacks.length === contexts.length,
- 'Mismatched list of contexts in callback queue'
- ) : invariant(callbacks.length === contexts.length));
- this._callbacks = null;
- this._contexts = null;
- for (var i = 0, l = callbacks.length; i < l; i++) {
- callbacks[i].call(contexts[i]);
- }
- callbacks.length = 0;
- contexts.length = 0;
- }
- },
-
- /**
- * Resets the internal queue.
- *
- * @internal
- */
- reset: function() {
- this._callbacks = null;
- this._contexts = null;
- },
-
- /**
- * `PooledClass` looks for this.
- */
- destructor: function() {
- this.reset();
- }
-
-});
-
-PooledClass.addPoolingTo(CallbackQueue);
-
-module.exports = CallbackQueue;
-
-}).call(this,require('_process'))
-},{"./Object.assign":98,"./PooledClass":99,"./invariant":207,"_process":20}],78:[function(require,module,exports){
-/**
- * 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.
- *
- * @providesModule ChangeEventPlugin
- */
-
-'use strict';
-
-var EventConstants = require("./EventConstants");
-var EventPluginHub = require("./EventPluginHub");
-var EventPropagators = require("./EventPropagators");
-var ExecutionEnvironment = require("./ExecutionEnvironment");
-var ReactUpdates = require("./ReactUpdates");
-var SyntheticEvent = require("./SyntheticEvent");
-
-var isEventSupported = require("./isEventSupported");
-var isTextInputElement = require("./isTextInputElement");
-var keyOf = require("./keyOf");
-
-var topLevelTypes = EventConstants.topLevelTypes;
-
-var eventTypes = {
- change: {
- phasedRegistrationNames: {
- bubbled: keyOf({onChange: null}),
- captured: keyOf({onChangeCapture: null})
- },
- dependencies: [
- topLevelTypes.topBlur,
- topLevelTypes.topChange,
- topLevelTypes.topClick,
- topLevelTypes.topFocus,
- topLevelTypes.topInput,
- topLevelTypes.topKeyDown,
- topLevelTypes.topKeyUp,
- topLevelTypes.topSelectionChange
- ]
- }
-};
-
-/**
- * For IE shims
- */
-var activeElement = null;
-var activeElementID = null;
-var activeElementValue = null;
-var activeElementValueProp = null;
-
-/**
- * SECTION: handle `change` event
- */
-function shouldUseChangeEvent(elem) {
- return (
- elem.nodeName === 'SELECT' ||
- (elem.nodeName === 'INPUT' && elem.type === 'file')
- );
-}
-
-var doesChangeEventBubble = false;
-if (ExecutionEnvironment.canUseDOM) {
- // See `handleChange` comment below
- doesChangeEventBubble = isEventSupported('change') && (
- (!('documentMode' in document) || document.documentMode > 8)
- );
-}
-
-function manualDispatchChangeEvent(nativeEvent) {
- var event = SyntheticEvent.getPooled(
- eventTypes.change,
- activeElementID,
- nativeEvent
- );
- EventPropagators.accumulateTwoPhaseDispatches(event);
-
- // If change and propertychange bubbled, we'd just bind to it like all the
- // other events and have it go through ReactBrowserEventEmitter. Since it
- // doesn't, we manually listen for the events and so we have to enqueue and
- // process the abstract event manually.
- //
- // Batching is necessary here in order to ensure that all event handlers run
- // before the next rerender (including event handlers attached to ancestor
- // elements instead of directly on the input). Without this, controlled
- // components don't work properly in conjunction with event bubbling because
- // the component is rerendered and the value reverted before all the event
- // handlers can run. See https://github.com/facebook/react/issues/708.
- ReactUpdates.batchedUpdates(runEventInBatch, event);
-}
-
-function runEventInBatch(event) {
- EventPluginHub.enqueueEvents(event);
- EventPluginHub.processEventQueue();
-}
-
-function startWatchingForChangeEventIE8(target, targetID) {
- activeElement = target;
- activeElementID = targetID;
- activeElement.attachEvent('onchange', manualDispatchChangeEvent);
-}
-
-function stopWatchingForChangeEventIE8() {
- if (!activeElement) {
- return;
- }
- activeElement.detachEvent('onchange', manualDispatchChangeEvent);
- activeElement = null;
- activeElementID = null;
-}
-
-function getTargetIDForChangeEvent(
- topLevelType,
- topLevelTarget,
- topLevelTargetID) {
- if (topLevelType === topLevelTypes.topChange) {
- return topLevelTargetID;
- }
-}
-function handleEventsForChangeEventIE8(
- topLevelType,
- topLevelTarget,
- topLevelTargetID) {
- if (topLevelType === topLevelTypes.topFocus) {
- // stopWatching() should be a noop here but we call it just in case we
- // missed a blur event somehow.
- stopWatchingForChangeEventIE8();
- startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID);
- } else if (topLevelType === topLevelTypes.topBlur) {
- stopWatchingForChangeEventIE8();
- }
-}
-
-
-/**
- * SECTION: handle `input` event
- */
-var isInputEventSupported = false;
-if (ExecutionEnvironment.canUseDOM) {
- // IE9 claims to support the input event but fails to trigger it when
- // deleting text, so we ignore its input events
- isInputEventSupported = isEventSupported('input') && (
- (!('documentMode' in document) || document.documentMode > 9)
- );
-}
-
-/**
- * (For old IE.) Replacement getter/setter for the `value` property that gets
- * set on the active element.
- */
-var newValueProp = {
- get: function() {
- return activeElementValueProp.get.call(this);
- },
- set: function(val) {
- // Cast to a string so we can do equality checks.
- activeElementValue = '' + val;
- activeElementValueProp.set.call(this, val);
- }
-};
-
-/**
- * (For old IE.) Starts tracking propertychange events on the passed-in element
- * and override the value property so that we can distinguish user events from
- * value changes in JS.
- */
-function startWatchingForValueChange(target, targetID) {
- activeElement = target;
- activeElementID = targetID;
- activeElementValue = target.value;
- activeElementValueProp = Object.getOwnPropertyDescriptor(
- target.constructor.prototype,
- 'value'
- );
-
- Object.defineProperty(activeElement, 'value', newValueProp);
- activeElement.attachEvent('onpropertychange', handlePropertyChange);
-}
-
-/**
- * (For old IE.) Removes the event listeners from the currently-tracked element,
- * if any exists.
- */
-function stopWatchingForValueChange() {
- if (!activeElement) {
- return;
- }
-
- // delete restores the original property definition
- delete activeElement.value;
- activeElement.detachEvent('onpropertychange', handlePropertyChange);
-
- activeElement = null;
- activeElementID = null;
- activeElementValue = null;
- activeElementValueProp = null;
-}
-
-/**
- * (For old IE.) Handles a propertychange event, sending a `change` event if
- * the value of the active element has changed.
- */
-function handlePropertyChange(nativeEvent) {
- if (nativeEvent.propertyName !== 'value') {
- return;
- }
- var value = nativeEvent.srcElement.value;
- if (value === activeElementValue) {
- return;
- }
- activeElementValue = value;
-
- manualDispatchChangeEvent(nativeEvent);
-}
-
-/**
- * If a `change` event should be fired, returns the target's ID.
- */
-function getTargetIDForInputEvent(
- topLevelType,
- topLevelTarget,
- topLevelTargetID) {
- if (topLevelType === topLevelTypes.topInput) {
- // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
- // what we want so fall through here and trigger an abstract event
- return topLevelTargetID;
- }
-}
-
-// For IE8 and IE9.
-function handleEventsForInputEventIE(
- topLevelType,
- topLevelTarget,
- topLevelTargetID) {
- if (topLevelType === topLevelTypes.topFocus) {
- // In IE8, we can capture almost all .value changes by adding a
- // propertychange handler and looking for events with propertyName
- // equal to 'value'
- // In IE9, propertychange fires for most input events but is buggy and
- // doesn't fire when text is deleted, but conveniently, selectionchange
- // appears to fire in all of the remaining cases so we catch those and
- // forward the event if the value has changed
- // In either case, we don't want to call the event handler if the value
- // is changed from JS so we redefine a setter for `.value` that updates
- // our activeElementValue variable, allowing us to ignore those changes
- //
- // stopWatching() should be a noop here but we call it just in case we
- // missed a blur event somehow.
- stopWatchingForValueChange();
- startWatchingForValueChange(topLevelTarget, topLevelTargetID);
- } else if (topLevelType === topLevelTypes.topBlur) {
- stopWatchingForValueChange();
- }
-}
-
-// For IE8 and IE9.
-function getTargetIDForInputEventIE(
- topLevelType,
- topLevelTarget,
- topLevelTargetID) {
- if (topLevelType === topLevelTypes.topSelectionChange ||
- topLevelType === topLevelTypes.topKeyUp ||
- topLevelType === topLevelTypes.topKeyDown) {
- // On the selectionchange event, the target is just document which isn't
- // helpful for us so just check activeElement instead.
- //
- // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
- // propertychange on the first input event after setting `value` from a
- // script and fires only keydown, keypress, keyup. Catching keyup usually
- // gets it and catching keydown lets us fire an event for the first
- // keystroke if user does a key repeat (it'll be a little delayed: right
- // before the second keystroke). Other input methods (e.g., paste) seem to
- // fire selectionchange normally.
- if (activeElement && activeElement.value !== activeElementValue) {
- activeElementValue = activeElement.value;
- return activeElementID;
- }
- }
-}
-
-
-/**
- * SECTION: handle `click` event
- */
-function shouldUseClickEvent(elem) {
- // Use the `click` event to detect changes to checkbox and radio inputs.
- // This approach works across all browsers, whereas `change` does not fire
- // until `blur` in IE8.
- return (
- elem.nodeName === 'INPUT' &&
- (elem.type === 'checkbox' || elem.type === 'radio')
- );
-}
-
-function getTargetIDForClickEvent(
- topLevelType,
- topLevelTarget,
- topLevelTargetID) {
- if (topLevelType === topLevelTypes.topClick) {
- return topLevelTargetID;
- }
-}
-
-/**
- * This plugin creates an `onChange` event that normalizes change events
- * across form elements. This event fires at a time when it's possible to
- * change the element's value without seeing a flicker.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - select
- */
-var ChangeEventPlugin = {
-
- eventTypes: eventTypes,
-
- /**
- * @param {string} topLevelType Record from `EventConstants`.
- * @param {DOMEventTarget} topLevelTarget The listening component root node.
- * @param {string} topLevelTargetID ID of `topLevelTarget`.
- * @param {object} nativeEvent Native browser event.
- * @return {*} An accumulation of synthetic events.
- * @see {EventPluginHub.extractEvents}
- */
- extractEvents: function(
- topLevelType,
- topLevelTarget,
- topLevelTargetID,
- nativeEvent) {
-
- var getTargetIDFunc, handleEventFunc;
- if (shouldUseChangeEvent(topLevelTarget)) {
- if (doesChangeEventBubble) {
- getTargetIDFunc = getTargetIDForChangeEvent;
- } else {
- handleEventFunc = handleEventsForChangeEventIE8;
- }
- } else if (isTextInputElement(topLevelTarget)) {
- if (isInputEventSupported) {
- getTargetIDFunc = getTargetIDForInputEvent;
- } else {
- getTargetIDFunc = getTargetIDForInputEventIE;
- handleEventFunc = handleEventsForInputEventIE;
- }
- } else if (shouldUseClickEvent(topLevelTarget)) {
- getTargetIDFunc = getTargetIDForClickEvent;
- }
-
- if (getTargetIDFunc) {
- var targetID = getTargetIDFunc(
- topLevelType,
- topLevelTarget,
- topLevelTargetID
- );
- if (targetID) {
- var event = SyntheticEvent.getPooled(
- eventTypes.change,
- targetID,
- nativeEvent
- );
- EventPropagators.accumulateTwoPhaseDispatches(event);
- return event;
- }
- }
-
- if (handleEventFunc) {
- handleEventFunc(
- topLevelType,
- topLevelTarget,
- topLevelTargetID
- );
- }
- }
-
-};
-
-module.exports = ChangeEventPlugin;
-
-},{"./EventConstants":86,"./EventPluginHub":88,"./EventPropagators":91,"./ExecutionEnvironment":92,"./ReactUpdates":159,"./SyntheticEvent":167,"./isEventSupported":208,"./isTextInputElement":210,"./keyOf":213}],79:[function(require,module,exports){
-/**
- * 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.
- *
- * @providesModule ClientReactRootIndex
- * @typechecks
- */
-
-'use strict';
-
-var nextReactRootIndex = 0;
-
-var ClientReactRootIndex = {
- createReactRootIndex: function() {
- return nextReactRootIndex++;
- }
-};
-
-module.exports = ClientReactRootIndex;
-
-},{}],80:[function(require,module,exports){
-(function (process){
-/**
- * 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.
- *
- * @providesModule DOMChildrenOperations
- * @typechecks static-only
- */
-
-'use strict';
-
-var Danger = require("./Danger");
-var ReactMultiChildUpdateTypes = require("./ReactMultiChildUpdateTypes");
-
-var setTextContent = require("./setTextContent");
-var invariant = require("./invariant");
-
-/**
- * Inserts `childNode` as a child of `parentNode` at the `index`.
- *
- * @param {DOMElement} parentNode Parent node in which to insert.
- * @param {DOMElement} childNode Child node to insert.
- * @param {number} index Index at which to insert the child.
- * @internal
- */
-function insertChildAt(parentNode, childNode, index) {
- // By exploiting arrays returning `undefined` for an undefined index, we can
- // rely exclusively on `insertBefore(node, null)` instead of also using
- // `appendChild(node)`. However, using `undefined` is not allowed by all
- // browsers so we must replace it with `null`.
- parentNode.insertBefore(
- childNode,
- parentNode.childNodes[index] || null
- );
-}
-
-/**
- * Operations for updating with DOM children.
- */
-var DOMChildrenOperations = {
-
- dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,
-
- updateTextContent: setTextContent,
-
- /**
- * Updates a component's children by processing a series of updates. The
- * update configurations are each expected to have a `parentNode` property.
- *
- * @param {array} updates List of update configurations.
- * @param {array} markupList List of markup strings.
- * @internal
- */
- processUpdates: function(updates, markupList) {
- var update;
- // Mapping from parent IDs to initial child orderings.
- var initialChildren = null;
- // List of children that will be moved or removed.
- var updatedChildren = null;
-
- for (var i = 0; i < updates.length; i++) {
- update = updates[i];
- if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING ||
- update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) {
- var updatedIndex = update.fromIndex;
- var updatedChild = update.parentNode.childNodes[updatedIndex];
- var parentID = update.parentID;
-
- ("production" !== process.env.NODE_ENV ? invariant(
- updatedChild,
- 'processUpdates(): Unable to find child %s of element. This ' +
- 'probably means the DOM was unexpectedly mutated (e.g., by the ' +
- 'browser), usually due to forgetting a when using tables, ' +
- 'nesting tags like