From c0ad2ef2db60eec0b6d77b321010e385a0b69526 Mon Sep 17 00:00:00 2001 From: akhalyavka Date: Tue, 21 Jul 2015 17:31:04 +0300 Subject: [PATCH 1/4] typos, feed style --- project/admin/views.py | 1 + project/auth/views.py | 4 ++- project/static/css/feed.css | 50 ++++++++++++++++++++++++---------- project/static/js/dist/feed.js | 25 +++++++++++------ project/static/js/feed.jsx | 25 +++++++++++------ 5 files changed, 74 insertions(+), 31 deletions(-) diff --git a/project/admin/views.py b/project/admin/views.py index 66e9160..773182d 100644 --- a/project/admin/views.py +++ b/project/admin/views.py @@ -125,6 +125,7 @@ def register_section(*, section_name, list_endpoint, list_endpoint="user_list", ) + @admin_app.route("/") def mainpage(): sections = {} diff --git a/project/auth/views.py b/project/auth/views.py index 95d06c4..99799b1 100644 --- a/project/auth/views.py +++ b/project/auth/views.py @@ -45,7 +45,8 @@ def reset(): def confirm_reset(token): success = User.bl.reset_password(token) if success: - flash("Вы успешно сбросили пароль! Новый пароль отправлен по электронной почте") + flash("Вы успешно сбросили пароль! " + "Новый пароль отправлен по электронной почте") return redirect(url_for('auth.login')) else: abort(404) @@ -56,6 +57,7 @@ def logout(): session.pop('user_id', None) return redirect(url_for('auth.login')) + @auth.before_request def add_login_to_g(): if session['user_id']: diff --git a/project/static/css/feed.css b/project/static/css/feed.css index 80254c4..14bf983 100644 --- a/project/static/css/feed.css +++ b/project/static/css/feed.css @@ -2,7 +2,7 @@ width: 30px; height: 30px; margin-left: 9px; - margin-top: 7.5px; + margin-top: 6%; float: left; } .vacancyTitle { @@ -11,12 +11,42 @@ text-align: center; margin-top: 8px; margin-right: 25px; - font-family: sans-serif; + font-family: sans-serif !important; +} + + +.vacancyTitle > a { + color: #000000; + font-family: sans-serif +} + +.vacancyTitle > a:hover { + color: #123456; + + text-decoration: none; } + .vacancyDescr { margin-left: 15%; font-family: sans-serif; + margin-right: 11%; + margin-top: 20px; + font-size: 16px; +} + +.vacancyCity { + margin-left: 4%; + font-family: sans-serif; + display: inline; width: 80%; + font-size: 20px; +} + +.vacancySalary { + float: right; + display: inline; + margin-right: 11%; + font-size: 20px !important; } .panel { @@ -25,14 +55,6 @@ width: 100%; } -.vacancyNodeCompressed, .vacancyNodeExpanded { - -} - -.vacancyNodeCompressed { - height: 70px; -} - .vacancyBox { width: 400px; margin: 20px; @@ -112,13 +134,13 @@ } .btn-circle { - width: 30px; - height: 30px; + width: 35px; + height: 35px; text-align: center; padding: 6px 0; - font-size: 12px; + font-size: 13.125px; line-height: 1.428571429; - border-radius: 15px; + border-radius: 17.5px; } .btn-circle.btn-lg { diff --git a/project/static/js/dist/feed.js b/project/static/js/dist/feed.js index c36491d..818a8ee 100644 --- a/project/static/js/dist/feed.js +++ b/project/static/js/dist/feed.js @@ -71,10 +71,18 @@ var VacancyNodeCompressed = React.createClass({displayName: "VacancyNodeCompress this.props.click(e); }, render: function() { + city_id = this.state.data.city_id + citylist = this.props.citylist + city = citylist.filter(function(n) { + return n.id == city_id; + }).map(function(n) { + return n.name; + }); return ( - React.createElement("div", {className: "panel panel-default"}, + React.createElement("div", {className: "panel panel-default vacancyNodeCompressed"}, React.createElement(ExpandButton, {expanded: this.props.expanded, ref: "button", click: this.handleButtonClick}), - React.createElement("p", {className: "vacancyTitle"}, this.state.data.title) + React.createElement("p", {className: "vacancyTitle"}, " ", React.createElement("a", {href: this.state.data.name_in_url}, this.state.data.title)), + React.createElement("p", {className: "vacancyCity"}, city), " ", React.createElement("p", {className: "vacancySalary"}, this.state.data.salary) ) ); } @@ -101,15 +109,16 @@ var VacancyNodeExpanded = React.createClass({displayName: "VacancyNodeExpanded", render: function() { city_id = this.state.data.city_id citylist = this.props.citylist - city = citylist.filter(function(i, n) { + city = citylist.filter(function(n) { return n.id == city_id; + }).map(function(n) { + return n.name; }); - alert(city); return ( - React.createElement("div", {className: "panel panel-default"}, + React.createElement("div", {className: "panel panel-default vacancyNodeExpanded"}, React.createElement(ExpandButton, {expanded: this.props.expanded, ref: "button", click: this.handleButtonClick}), - React.createElement("p", {className: "vacancyCity"}, city), - React.createElement("p", {className: "vacancyTitle"}, this.state.data.title), + React.createElement("p", {className: "vacancyTitle"}, " ", React.createElement("a", {href: this.state.data.name_in_url}, this.state.data.title)), + React.createElement("p", {className: "vacancyCity"}, city), " ", React.createElement("p", {className: "vacancySalary"}, this.state.data.salary), React.createElement("p", {className: "vacancyDescr"}, this.state.data.short_description), React.createElement("button", {type: "button", onClick: this.handleToVacancyClick, className: "btn btn-info goToVacancyButton"}, "Перейти к вакансии") ) @@ -136,7 +145,7 @@ var VacancyNode = React.createClass({displayName: "VacancyNode", }, render: function() { if (!this.state.expanded) { - return (React.createElement(VacancyNodeCompressed, {expanded: this.state.expanded, ref: "node", className: "col-xs-6 col-sm-4", data: this.props.data, click: this.handleButtonClick})); + return (React.createElement(VacancyNodeCompressed, {citylist: this.props.citylist, expanded: this.state.expanded, ref: "node", className: "col-xs-6 col-sm-4", data: this.props.data, click: this.handleButtonClick})); } else { return (React.createElement(VacancyNodeExpanded, {citylist: this.props.citylist, expanded: this.state.expanded, ref: "node", className: "col-xs-6 col-sm-4", data: this.props.data, click: this.handleButtonClick})); } diff --git a/project/static/js/feed.jsx b/project/static/js/feed.jsx index ce288cd..f908dce 100644 --- a/project/static/js/feed.jsx +++ b/project/static/js/feed.jsx @@ -70,10 +70,18 @@ var VacancyNodeCompressed = React.createClass({ this.props.click(e); }, render: function() { + city_id = this.state.data.city_id + citylist = this.props.citylist + city = citylist.filter(function(n) { + return n.id == city_id; + }).map(function(n) { + return n.name; + }); return ( -
+
-

{this.state.data.title}

+

{this.state.data.title}

+

{city}

{this.state.data.salary}

); } @@ -100,15 +108,16 @@ var VacancyNodeExpanded = React.createClass({ render: function() { city_id = this.state.data.city_id citylist = this.props.citylist - city = citylist.filter(function(i, n) { + city = citylist.filter(function(n) { return n.id == city_id; + }).map(function(n) { + return n.name; }); - alert(city); return ( -
+
-

{city}

-

{this.state.data.title}

+

{this.state.data.title}

+

{city}

{this.state.data.salary}

{this.state.data.short_description}

@@ -135,7 +144,7 @@ var VacancyNode = React.createClass({ }, render: function() { if (!this.state.expanded) { - return (); + return (); } else { return (); } From 05149e29e722d0c6e8dcc05cb7641c8d06c33f38 Mon Sep 17 00:00:00 2001 From: akhalyavka Date: Tue, 21 Jul 2015 17:56:57 +0300 Subject: [PATCH 2/4] form change --- project/admin/views.py | 1 - project/auth/forms.py | 11 ++++------- project/auth/views.py | 4 ++-- project/bl/auth.py | 8 -------- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/project/admin/views.py b/project/admin/views.py index dc81f0b..8e462e0 100644 --- a/project/admin/views.py +++ b/project/admin/views.py @@ -130,7 +130,6 @@ def register_section(*, section_name, list_endpoint, user_detail = EntryDetail.as_view( name='user_detail', create_form=RegisterForm, - update_form=UserEditForm, model=User, success_url="user_list", ) diff --git a/project/auth/forms.py b/project/auth/forms.py index 605b8aa..b4a4ca6 100644 --- a/project/auth/forms.py +++ b/project/auth/forms.py @@ -81,6 +81,10 @@ def __init__(self, *args, **kwargs): password = PasswordField( label='Пароль', validators=[ + EqualTo( + 'confirmation', + message='Пароли не совпадают' + ), PasswordFormat, Length( 6, @@ -90,10 +94,3 @@ def __init__(self, *args, **kwargs): ] ) confirmation = PasswordField(label='Подтвердите пароль') - - def validate(self): - super(UserEditForm, self).validate() - EqualTo( - 'confirmation', - message='Пароли не совпадают' - )(self, self.password) diff --git a/project/auth/views.py b/project/auth/views.py index af112c4..b3441b4 100644 --- a/project/auth/views.py +++ b/project/auth/views.py @@ -15,12 +15,12 @@ def login(): if user: session['user_id'] = user.id g.user = user - return redirect(url_for('admin.vacancy_list')) + return redirect(url_for('admin.mainpage')) else: flash("Неправильный логин и/или пароль") if session.get('user_id'): - return redirect(url_for('admin.vacancy_list')) + return redirect(url_for('admin.mainpage')) return render_template( 'login.html', diff --git a/project/bl/auth.py b/project/bl/auth.py index b1fed69..42c3223 100644 --- a/project/bl/auth.py +++ b/project/bl/auth.py @@ -26,14 +26,6 @@ def create(self, data): model.save() return model - def update(self, data): - model = self.model - for key, value in data.items(): - setattr(model, key, value) - model.bl.set_password(data['password']) - model.save() - return model - def forgot_password(self, email): from project.models import Token from .mail import send_mail From 46af77429cba835c00d2e78c650159485e92432a Mon Sep 17 00:00:00 2001 From: akhalyavka Date: Wed, 22 Jul 2015 15:11:02 +0300 Subject: [PATCH 3/4] feed links, password change form --- project/admin/views.py | 13 +- project/auth/forms.py | 17 +- project/auth/validators.py | 9 + project/auth/views.py | 25 +- project/static/js/dist/feed.js | 1172 ++++++++++++++++++++++++----- project/static/js/feed.jsx | 87 ++- project/static/js/feedfactory.js | 2 +- project/templates/admin/main.html | 6 + 8 files changed, 1132 insertions(+), 199 deletions(-) diff --git a/project/admin/views.py b/project/admin/views.py index 8e462e0..705eb7b 100644 --- a/project/admin/views.py +++ b/project/admin/views.py @@ -1,7 +1,7 @@ from flask import Blueprint, render_template, url_for, session, g, redirect from project.admin.forms import VacancyForm, CategoryForm, CityForm from project.admin.utils import EntryDetail, EntryList -from project.auth.forms import RegisterForm, UserEditForm +from project.auth.forms import RegisterForm from project.models import Vacancy, Category, City, User SECTIONS = {} # list_name: list_endpoint @@ -9,16 +9,6 @@ admin_app = Blueprint('admin', __name__) - -@admin_app.before_request -def add_login_to_g(): - if 'user_id' in session: - user = User.query.get(session['user_id']) - g.user = user - else: - g.user = None - - @admin_app.before_request def check_user_logged_in(): if 'user_id' in session: @@ -26,7 +16,6 @@ def check_user_logged_in(): return redirect(url_for("auth.login")) - def register_section(*, section_name, list_endpoint, list_route, detail_route, list_view, detail_view): diff --git a/project/auth/forms.py b/project/auth/forms.py index b4a4ca6..8c2ea52 100644 --- a/project/auth/forms.py +++ b/project/auth/forms.py @@ -1,7 +1,7 @@ from flask_wtf import Form from wtforms import StringField, PasswordField from wtforms.validators import DataRequired, EqualTo, Email, Length -from .validators import LoginFormat, PasswordFormat, Exists +from .validators import LoginFormat, PasswordFormat, Exists, PasswordCorrect class ResetForm(Form): @@ -15,7 +15,6 @@ class ResetForm(Form): ], ) - class LoginForm(Form): login = StringField( 'Логин', @@ -74,12 +73,16 @@ class RegisterForm(Form): ) -class UserEditForm(RegisterForm): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) +class PasswordEditForm(Form): + old_password = PasswordField( + label='Старый пароль', + validators=[ + PasswordCorrect(), + ] + ) - password = PasswordField( - label='Пароль', + new_password = PasswordField( + label='Новый пароль', validators=[ EqualTo( 'confirmation', diff --git a/project/auth/validators.py b/project/auth/validators.py index efe1333..10714b6 100644 --- a/project/auth/validators.py +++ b/project/auth/validators.py @@ -1,5 +1,7 @@ from wtforms.validators import Regexp, ValidationError from project.models import User +from werkzeug.security import check_password_hash +from flask import g # alphanumeric and special chars (-_.) # Can not start with a digit, underscore or special character @@ -17,6 +19,13 @@ ' цифр и символов (_.-), начинаться с буквы,' ' содержать хоть одну цифру') +class PasswordCorrect(object): + def __init__(self, message=None): + self.message = message or 'Неверный пароль' + + def __call__(self, _, field): + if not check_password_hash(g.user.password, field.data): + raise ValidationError(self.message) class Exists(object): def __init__(self, message=None, reverse=False): diff --git a/project/auth/views.py b/project/auth/views.py index b3441b4..e4c47eb 100644 --- a/project/auth/views.py +++ b/project/auth/views.py @@ -1,11 +1,18 @@ from flask import render_template, Blueprint, flash, session, redirect, \ url_for, abort, g -from .forms import LoginForm, ResetForm +from .forms import LoginForm, ResetForm, PasswordEditForm from .decorators import login_required from project.models import User auth = Blueprint('auth', __name__) +@auth.before_app_request +def add_login_to_g(): + if 'user_id' in session: + user = User.query.get(session['user_id']) + g.user = user + else: + g.user = None @auth.route('/login', methods=['GET', 'POST']) def login(): @@ -55,6 +62,22 @@ def confirm_reset(token): else: abort(404) +@auth.route('/password_change', methods=['GET', 'POST']) +@login_required +def change_password(): + form = PasswordEditForm() + if form.validate_on_submit(): + User.bl.set_password(form.data['new_password']) + flash('Ваш пароль успешно изменён') + return redirect(url_for('admin.mainpage')) + return render_template( + 'login.html', + title='Смена пароля', + submit='Сменить', + form=form, + ) + + @auth.route('/logout', methods=['GET']) @login_required diff --git a/project/static/js/dist/feed.js b/project/static/js/dist/feed.js index 818a8ee..e6ea9f0 100644 --- a/project/static/js/dist/feed.js +++ b/project/static/js/dist/feed.js @@ -1,7 +1,22 @@ (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;oamount-1) { page=amount-1; } + if (page<0) { + page=0; + } offset = per_page*page; filtered_data = this.getList().slice(offset, offset+per_page) var vaclist = filtered_data.map(function(p) { @@ -212,8 +248,18 @@ var SpecSelect = React.createClass({displayName: "SpecSelect", this.props.list.map(function(p) { options.push({ value: p.id, label: p.name }) }); + + initial_value = options.filter(function(n) { + return n.value == this.props.value; + }.bind(this)).map(function(n) { + return n.label; + })[0]; + + if (this.props.value == 0) { + initial_value = ''; + } return ( - React.createElement(Select, {onChange: this.handleChange, clearable: false, options: options, placeholder: "Категория", className: "categoryDropdown"} + React.createElement(Select, {onChange: this.handleChange, clearable: false, value: initial_value, options: options, placeholder: "Категория", className: "categoryDropdown"} ) ); } @@ -233,8 +279,19 @@ var CitySelect = React.createClass({displayName: "CitySelect", this.props.list.map(function(p) { options.push({ value: p.id, label: p.name }) }); + + initial_value = options.filter(function(n) { + return n.value == this.props.value; + }.bind(this)).map(function(n) { + return n.label; + })[0]; + + if (this.props.value == 0) { + initial_value = ''; + } + return ( - React.createElement(Select, {onChange: this.handleChange, clearable: false, options: options, placeholder: "Город", className: "cityDropdown"} + React.createElement(Select, {onChange: this.handleChange, clearable: false, value: initial_value, options: options, placeholder: "Город", className: "cityDropdown"} ) ); } @@ -253,20 +310,34 @@ var VacancyBox = React.createClass({displayName: "VacancyBox", this.setState({ category: parseInt(val) }); + navigate('?city={0}&category={1}&page={2}'.format(this.state.city, val, this.refs.list.state.page), true); }, handleCitySelect: function(childComponent, val) { this.setState({ city: parseInt(val) }); + navigate('?city={0}&category={1}&page={2}'.format(val, this.state.category, this.refs.list.state.page), true); }, componentDidMount: function() { + qs = $.QueryString; + var city_id = '0'; + var category_id = '0'; + if ('city' in qs) { + city_id = $.QueryString['city']; + } + if ('category' in qs) { + category_id = $.QueryString['category']; + } $.get( 'list', function(result) { this.setState({ data: result, + city: parseInt(city_id), + category: parseInt(category_id), }); }.bind(this)); + }, render: function() { results = this.state.data.vacancies; @@ -274,9 +345,9 @@ var VacancyBox = React.createClass({displayName: "VacancyBox", amount = Math.ceil(results.length / 2); return ( React.createElement("div", {className: "vacancyBox"}, - React.createElement(SpecSelect, {onChange: this.handleSpecSelect, list: this.state.data.categories, ref: "select"}), - React.createElement(CitySelect, {onChange: this.handleCitySelect, list: this.state.data.cities, ref: "select"}), - React.createElement(VacancyList, {per_page: 5, data: results, citylist: this.state.data.cities, category: this.state.category, city: this.state.city, ref: "list"}) + React.createElement(SpecSelect, {onChange: this.handleSpecSelect, value: this.state.category, list: this.state.data.categories, ref: "select"}), + React.createElement(CitySelect, {onChange: this.handleCitySelect, value: this.state.city, list: this.state.data.cities, ref: "select"}), + React.createElement(VacancyList, {per_page: 5, data: results, parent: this, citylist: this.state.data.cities, category: this.state.category, city: this.state.city, ref: "list"}) ) ); } @@ -284,15 +355,15 @@ var VacancyBox = React.createClass({displayName: "VacancyBox", module.exports = VacancyBox; -},{"jquery":4,"react":163,"react-select":5}],2:[function(require,module,exports){ +},{"jquery":4,"react":171,"react-mini-router":5,"react-select":13}],2:[function(require,module,exports){ var React = require('react'); var $ = require('jquery'); -var feed = React.createFactory(require('./feed.jsx')); // need to specify the jsx extension +var feed = React.createFactory(require('./feed.jsx')); React.render(feed(), document.body); -},{"./feed.jsx":1,"jquery":4,"react":163}],3:[function(require,module,exports){ +},{"./feed.jsx":1,"jquery":4,"react":171}],3:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -9597,6 +9668,767 @@ return jQuery; })); },{}],5:[function(require,module,exports){ +module.exports = { + RouterMixin: require('./lib/RouterMixin'), + navigate: require('./lib/navigate') +}; +},{"./lib/RouterMixin":6,"./lib/navigate":9}],6:[function(require,module,exports){ +var React = require('react'), + EventListener = require('react/lib/EventListener'), + pathToRegexp = require('path-to-regexp'), + urllite = require('urllite/lib/core'), + detect = require('./detect'); + +var PropValidation = { + path: React.PropTypes.string, + root: React.PropTypes.string, + useHistory: React.PropTypes.bool +}; + +module.exports = { + + propTypes: PropValidation, + + contextTypes: PropValidation, + + childContextTypes: PropValidation, + + getChildContext: function() { + return { + path: this.state.path, + root: this.state.root, + useHistory: this.state.useHistory + } + }, + + getDefaultProps: function() { + return { + routes: {} + }; + }, + + getInitialState: function() { + return { + path: getInitialPath(this), + root: this.props.root || this.context.path || '', + useHistory: (this.props.history || this.context.useHistory) && detect.hasPushState + }; + }, + + componentWillMount: function() { + this.setState({ _routes: processRoutes(this.state.root, this.routes, this) }); + }, + + componentDidMount: function() { + var _events = this._events = []; + + _events.push(EventListener.listen(this.getDOMNode(), 'click', this.handleClick)); + + if (this.state.useHistory) { + _events.push(EventListener.listen(window, 'popstate', this.onPopState)); + } else { + if (window.location.hash.indexOf('#!') === -1) { + window.location.hash = '#!/'; + } + + _events.push(EventListener.listen(window, 'hashchange', this.onPopState)); + } + }, + + componentWillUnmount: function() { + this._events.forEach(function(listener) { + listener.remove(); + }); + }, + + onPopState: function() { + var url = urllite(window.location.href), + hash = url.hash || '', + path = this.state.useHistory ? url.pathname : hash.slice(2); + + if (path.length === 0) path = '/'; + + this.setState({ path: path + url.search }); + }, + + renderCurrentRoute: function() { + var path = this.state.path, + url = urllite(path), + queryParams = parseSearch(url.search); + + var parsedPath = url.pathname; + + if (!parsedPath || parsedPath.length === 0) parsedPath = '/'; + + var matchedRoute = this.matchRoute(parsedPath); + + if (matchedRoute) { + return matchedRoute.handler.apply(this, matchedRoute.params.concat(queryParams)); + } else if (this.notFound) { + return this.notFound(parsedPath, queryParams); + } else { + throw new Error('No route matched path: ' + parsedPath); + } + }, + + handleClick: function(evt) { + var self = this, + url = getHref(evt); + + if (url && self.matchRoute(url.pathname)) { + evt.preventDefault(); + + // See: http://facebook.github.io/react/docs/interactivity-and-dynamic-uis.html + // Give any component event listeners a chance to fire in the current event loop, + // since they happen at the end of the bubbling phase. (Allows an onClick prop to + // work correctly on the event target component.) + setTimeout(function() { + var pathWithSearch = url.pathname + (url.search || ''); + if (pathWithSearch.length === 0) pathWithSearch = '/'; + + if (self.state.useHistory) { + window.history.pushState({}, '', pathWithSearch); + } else { + window.location.hash = '!' + pathWithSearch; + } + + self.setState({ path: pathWithSearch}); + }, 0); + } + }, + + matchRoute: function(path) { + if (!path) { + return false; + } + + var matchedRoute = {}; + + this.state._routes.some(function(route) { + var matches = route.pattern.exec(path); + + if (matches) { + matchedRoute.handler = route.handler; + matchedRoute.params = matches.slice(1, route.params.length + 1); + + return true; + } + + return false; + }); + + return matchedRoute.handler ? matchedRoute : false; + } + +}; + +function getInitialPath(component) { + var path = component.props.path || component.context.path, + hash, + url; + + if (!path && detect.canUseDOM) { + url = urllite(window.location.href); + + if (component.props.history) { + path = url.pathname + url.search; + } else if (url.hash) { + hash = urllite(url.hash.slice(2)); + path = hash.pathname + hash.search; + } + } + + return path || '/'; +} + +function getHref(evt) { + if (evt.defaultPrevented) { + return; + } + + if (evt.metaKey || evt.ctrlKey || evt.shiftKey) { + return; + } + + if (evt.button !== 0) { + return; + } + + var elt = evt.target; + + // Since a click could originate from a child element of the tag, + // walk back up the tree to find it. + while (elt && elt.nodeName !== 'A') { + elt = elt.parentNode; + } + + if (!elt) { + return; + } + + if (elt.target && elt.target !== '_self') { + return; + } + + if (!!elt.attributes.download) { + return; + } + + var linkURL = urllite(elt.href); + var windowURL = urllite(window.location.href); + + if (linkURL.protocol !== windowURL.protocol || linkURL.host !== windowURL.host) { + return; + } + + return linkURL; +} + +function processRoutes(root, routes, component) { + var patterns = [], + path, pattern, keys, handler, handlerFn; + + for (path in routes) { + if (routes.hasOwnProperty(path)) { + keys = []; + pattern = pathToRegexp(root + path, keys); + handler = routes[path]; + handlerFn = component[handler]; + + patterns.push({ pattern: pattern, params: keys, handler: handlerFn }); + } + } + + return patterns; +} + +function parseSearch(str) { + var parsed = {}; + + if (str.indexOf('?') === 0) str = str.slice(1); + + var pairs = str.split('&'); + + pairs.forEach(function(pair) { + var keyVal = pair.split('='); + + parsed[decodeURIComponent(keyVal[0])] = decodeURIComponent(keyVal[1]); + }); + + return parsed; +} + +},{"./detect":7,"path-to-regexp":10,"react":171,"react/lib/EventListener":31,"urllite/lib/core":12}],7:[function(require,module,exports){ +var canUseDOM = !!( + typeof window !== 'undefined' && + window.document && + window.document.createElement +); + +module.exports = { + canUseDOM: canUseDOM, + hasPushState: canUseDOM && window.history && 'pushState' in window.history, + hasHashbang: function() { + return canUseDOM && window.location.hash.indexOf('#!') === 0; + }, + hasEventConstructor: function() { + return typeof window.Event == "function"; + } +}; + +},{}],8:[function(require,module,exports){ +var detect = require('./detect'); + +module.exports = { + createEvent: function(name) { + if (detect.hasEventConstructor()) { + return new window.Event(name); + } else { + var event = document.createEvent('Event'); + event.initEvent(name, true, false); + return event; + } + } +}; + +},{"./detect":7}],9:[function(require,module,exports){ +var detect = require('./detect'); +var event = require('./event'); + +module.exports = function triggerUrl(url, silent) { + if (detect.hasHashbang()) { + window.location.hash = '#!' + url; + } else if (detect.hasPushState) { + window.history.pushState({}, '', url); + if (!silent) { + window.dispatchEvent(event.createEvent('popstate')); + } + } else { + console.error("Browser does not support pushState, and hash is missing a hashbang prefix!"); + } +}; + +},{"./detect":7,"./event":8}],10:[function(require,module,exports){ +var isarray = require('isarray') + +/** + * Expose `pathToRegexp`. + */ +module.exports = pathToRegexp +module.exports.parse = parse +module.exports.compile = compile +module.exports.tokensToFunction = tokensToFunction +module.exports.tokensToRegExp = tokensToRegExp + +/** + * The main path matching regexp utility. + * + * @type {RegExp} + */ +var PATH_REGEXP = new RegExp([ + // Match escaped characters that would otherwise appear in future matches. + // This allows the user to escape special characters that won't transform. + '(\\\\.)', + // Match Express-style parameters and un-named parameters with a prefix + // and optional suffixes. Matches appear as: + // + // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined] + // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined] + // "/*" => ["/", undefined, undefined, undefined, undefined, "*"] + '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))' +].join('|'), 'g') + +/** + * Parse a string for the raw tokens. + * + * @param {String} str + * @return {Array} + */ +function parse (str) { + var tokens = [] + var key = 0 + var index = 0 + var path = '' + var res + + while ((res = PATH_REGEXP.exec(str)) != null) { + var m = res[0] + var escaped = res[1] + var offset = res.index + path += str.slice(index, offset) + index = offset + m.length + + // Ignore already escaped sequences. + if (escaped) { + path += escaped[1] + continue + } + + // Push the current path onto the tokens. + if (path) { + tokens.push(path) + path = '' + } + + var prefix = res[2] + var name = res[3] + var capture = res[4] + var group = res[5] + var suffix = res[6] + var asterisk = res[7] + + var repeat = suffix === '+' || suffix === '*' + var optional = suffix === '?' || suffix === '*' + var delimiter = prefix || '/' + var pattern = capture || group || (asterisk ? '.*' : '[^' + delimiter + ']+?') + + tokens.push({ + name: name || key++, + prefix: prefix || '', + delimiter: delimiter, + optional: optional, + repeat: repeat, + pattern: escapeGroup(pattern) + }) + } + + // Match any characters still remaining. + if (index < str.length) { + path += str.substr(index) + } + + // If the path exists, push it onto the end. + if (path) { + tokens.push(path) + } + + return tokens +} + +/** + * Compile a string to a template function for the path. + * + * @param {String} str + * @return {Function} + */ +function compile (str) { + return tokensToFunction(parse(str)) +} + +/** + * Expose a method for transforming tokens into the path function. + */ +function tokensToFunction (tokens) { + // Compile all the tokens into regexps. + var matches = new Array(tokens.length) + + // Compile all the patterns before compilation. + for (var i = 0; i < tokens.length; i++) { + if (typeof tokens[i] === 'object') { + matches[i] = new RegExp('^' + tokens[i].pattern + '$') + } + } + + return function (obj) { + var path = '' + + obj = obj || {} + + for (var i = 0; i < tokens.length; i++) { + var key = tokens[i] + + if (typeof key === 'string') { + path += key + + continue + } + + var value = obj[key.name] + + if (value == null) { + if (key.optional) { + continue + } else { + throw new TypeError('Expected "' + key.name + '" to be defined') + } + } + + if (isarray(value)) { + if (!key.repeat) { + throw new TypeError('Expected "' + key.name + '" to not repeat') + } + + if (value.length === 0) { + if (key.optional) { + continue + } else { + throw new TypeError('Expected "' + key.name + '" to not be empty') + } + } + + for (var j = 0; j < value.length; j++) { + if (!matches[i].test(value[j])) { + throw new TypeError('Expected all "' + key.name + '" to match "' + key.pattern + '"') + } + + path += (j === 0 ? key.prefix : key.delimiter) + encodeURIComponent(value[j]) + } + + continue + } + + if (!matches[i].test(value)) { + throw new TypeError('Expected "' + key.name + '" to match "' + key.pattern + '"') + } + + path += key.prefix + encodeURIComponent(value) + } + + return path + } +} + +/** + * Escape a regular expression string. + * + * @param {String} str + * @return {String} + */ +function escapeString (str) { + return str.replace(/([.+*?=^!:${}()[\]|\/])/g, '\\$1') +} + +/** + * Escape the capturing group by escaping special characters and meaning. + * + * @param {String} group + * @return {String} + */ +function escapeGroup (group) { + return group.replace(/([=!:$\/()])/g, '\\$1') +} + +/** + * Attach the keys as a property of the regexp. + * + * @param {RegExp} re + * @param {Array} keys + * @return {RegExp} + */ +function attachKeys (re, keys) { + re.keys = keys + return re +} + +/** + * Get the flags for a regexp from the options. + * + * @param {Object} options + * @return {String} + */ +function flags (options) { + return options.sensitive ? '' : 'i' +} + +/** + * Pull out keys from a regexp. + * + * @param {RegExp} path + * @param {Array} keys + * @return {RegExp} + */ +function regexpToRegexp (path, keys) { + // Use a negative lookahead to match only capturing groups. + var groups = path.source.match(/\((?!\?)/g) + + if (groups) { + for (var i = 0; i < groups.length; i++) { + keys.push({ + name: i, + prefix: null, + delimiter: null, + optional: false, + repeat: false, + pattern: null + }) + } + } + + return attachKeys(path, keys) +} + +/** + * Transform an array into a regexp. + * + * @param {Array} path + * @param {Array} keys + * @param {Object} options + * @return {RegExp} + */ +function arrayToRegexp (path, keys, options) { + var parts = [] + + for (var i = 0; i < path.length; i++) { + parts.push(pathToRegexp(path[i], keys, options).source) + } + + var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options)) + + return attachKeys(regexp, keys) +} + +/** + * Create a path regexp from string input. + * + * @param {String} path + * @param {Array} keys + * @param {Object} options + * @return {RegExp} + */ +function stringToRegexp (path, keys, options) { + var tokens = parse(path) + var re = tokensToRegExp(tokens, options) + + // Attach keys back to the regexp. + for (var i = 0; i < tokens.length; i++) { + if (typeof tokens[i] !== 'string') { + keys.push(tokens[i]) + } + } + + return attachKeys(re, keys) +} + +/** + * Expose a function for taking tokens and returning a RegExp. + * + * @param {Array} tokens + * @param {Array} keys + * @param {Object} options + * @return {RegExp} + */ +function tokensToRegExp (tokens, options) { + options = options || {} + + var strict = options.strict + var end = options.end !== false + var route = '' + var lastToken = tokens[tokens.length - 1] + var endsWithSlash = typeof lastToken === 'string' && /\/$/.test(lastToken) + + // Iterate over the tokens and create our regexp string. + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i] + + if (typeof token === 'string') { + route += escapeString(token) + } else { + var prefix = escapeString(token.prefix) + var capture = token.pattern + + if (token.repeat) { + capture += '(?:' + prefix + capture + ')*' + } + + if (token.optional) { + if (prefix) { + capture = '(?:' + prefix + '(' + capture + '))?' + } else { + capture = '(' + capture + ')?' + } + } else { + capture = prefix + '(' + capture + ')' + } + + route += capture + } + } + + // In non-strict mode we allow a slash at the end of match. If the path to + // match already ends with a slash, we remove it for consistency. The slash + // is valid at the end of a path match, not in the middle. This is important + // in non-ending mode, where "/test/" shouldn't match "/test//route". + if (!strict) { + route = (endsWithSlash ? route.slice(0, -2) : route) + '(?:\\/(?=$))?' + } + + if (end) { + route += '$' + } else { + // In non-ending mode, we need the capturing groups to match as much as + // possible by using a positive lookahead to the end or next path segment. + route += strict && endsWithSlash ? '' : '(?=\\/|$)' + } + + return new RegExp('^' + route, flags(options)) +} + +/** + * Normalize the given path string, returning a regular expression. + * + * An empty array can be passed in for the keys, which will hold the + * placeholder key descriptions. For example, using `/user/:id`, `keys` will + * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`. + * + * @param {(String|RegExp|Array)} path + * @param {Array} [keys] + * @param {Object} [options] + * @return {RegExp} + */ +function pathToRegexp (path, keys, options) { + keys = keys || [] + + if (!isarray(keys)) { + options = keys + keys = [] + } else if (!options) { + options = {} + } + + if (path instanceof RegExp) { + return regexpToRegexp(path, keys, options) + } + + if (isarray(path)) { + return arrayToRegexp(path, keys, options) + } + + return stringToRegexp(path, keys, options) +} + +},{"isarray":11}],11:[function(require,module,exports){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +},{}],12:[function(require,module,exports){ +(function() { + var URL, URL_PATTERN, defaults, urllite, + __hasProp = {}.hasOwnProperty; + + URL_PATTERN = /^(?:(?:([^:\/?\#]+:)\/+|(\/\/))(?:([a-z0-9-\._~%]+)(?::([a-z0-9-\._~%]+))?@)?(([a-z0-9-\._~%!$&'()*+,;=]+)(?::([0-9]+))?)?)?([^?\#]*?)(\?[^\#]*)?(\#.*)?$/; + + urllite = function(raw, opts) { + return urllite.URL.parse(raw, opts); + }; + + urllite.URL = URL = (function() { + function URL(props) { + var k, v, _ref; + for (k in defaults) { + if (!__hasProp.call(defaults, k)) continue; + v = defaults[k]; + this[k] = (_ref = props[k]) != null ? _ref : v; + } + this.host || (this.host = this.hostname && this.port ? "" + this.hostname + ":" + this.port : this.hostname ? this.hostname : ''); + this.origin || (this.origin = this.protocol ? "" + this.protocol + "//" + this.host : ''); + this.isAbsolutePathRelative = !this.host && this.pathname.charAt(0) === '/'; + this.isPathRelative = !this.host && this.pathname.charAt(0) !== '/'; + this.isRelative = this.isSchemeRelative || this.isAbsolutePathRelative || this.isPathRelative; + this.isAbsolute = !this.isRelative; + } + + URL.parse = function(raw) { + var m, pathname, protocol; + m = raw.toString().match(URL_PATTERN); + pathname = m[8] || ''; + protocol = m[1]; + return new urllite.URL({ + protocol: protocol, + username: m[3], + password: m[4], + hostname: m[6], + port: m[7], + pathname: protocol && pathname.charAt(0) !== '/' ? "/" + pathname : pathname, + search: m[9], + hash: m[10], + isSchemeRelative: m[2] != null + }); + }; + + return URL; + + })(); + + defaults = { + protocol: '', + username: '', + password: '', + host: '', + hostname: '', + port: '', + pathname: '', + search: '', + hash: '', + origin: '', + isSchemeRelative: false + }; + + module.exports = urllite; + +}).call(this); + +},{}],13:[function(require,module,exports){ /* disable some rules until we refactor more completely; fixing them now would cause conflicts with some open PRs unnecessarily. */ /* eslint react/jsx-sort-prop-types: 0, react/sort-comp: 0, react/prop-types: 0 */ @@ -10415,7 +11247,7 @@ var Select = React.createClass({ }); module.exports = Select; -},{"./Value":6,"classnames":7,"react":163,"react-input-autosize":8}],6:[function(require,module,exports){ +},{"./Value":14,"classnames":15,"react":171,"react-input-autosize":16}],14:[function(require,module,exports){ 'use strict'; var React = require('react'); @@ -10482,7 +11314,7 @@ var Value = React.createClass({ }); module.exports = Value; -},{"react":163}],7:[function(require,module,exports){ +},{"react":171}],15:[function(require,module,exports){ /*! Copyright (c) 2015 Jed Watson. Licensed under the MIT License (MIT), see @@ -10533,7 +11365,7 @@ module.exports = Value; }()); -},{}],8:[function(require,module,exports){ +},{}],16:[function(require,module,exports){ 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -10637,7 +11469,7 @@ var AutosizeInput = React.createClass({ }); module.exports = AutosizeInput; -},{"react":163}],9:[function(require,module,exports){ +},{"react":171}],17:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -10664,7 +11496,7 @@ var AutoFocusMixin = { module.exports = AutoFocusMixin; -},{"./focusNode":127}],10:[function(require,module,exports){ +},{"./focusNode":135}],18:[function(require,module,exports){ /** * Copyright 2013-2015 Facebook, Inc. * All rights reserved. @@ -11159,7 +11991,7 @@ var BeforeInputEventPlugin = { module.exports = BeforeInputEventPlugin; -},{"./EventConstants":22,"./EventPropagators":27,"./ExecutionEnvironment":28,"./FallbackCompositionState":29,"./SyntheticCompositionEvent":101,"./SyntheticInputEvent":105,"./keyOf":149}],11:[function(require,module,exports){ +},{"./EventConstants":30,"./EventPropagators":35,"./ExecutionEnvironment":36,"./FallbackCompositionState":37,"./SyntheticCompositionEvent":109,"./SyntheticInputEvent":113,"./keyOf":157}],19:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11284,7 +12116,7 @@ var CSSProperty = { module.exports = CSSProperty; -},{}],12:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -11466,7 +12298,7 @@ var CSSPropertyOperations = { module.exports = CSSPropertyOperations; }).call(this,require('_process')) -},{"./CSSProperty":11,"./ExecutionEnvironment":28,"./camelizeStyleName":116,"./dangerousStyleValue":121,"./hyphenateStyleName":141,"./memoizeStringOnly":151,"./warning":162,"_process":3}],13:[function(require,module,exports){ +},{"./CSSProperty":19,"./ExecutionEnvironment":36,"./camelizeStyleName":124,"./dangerousStyleValue":129,"./hyphenateStyleName":149,"./memoizeStringOnly":159,"./warning":170,"_process":3}],21:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -11566,7 +12398,7 @@ PooledClass.addPoolingTo(CallbackQueue); module.exports = CallbackQueue; }).call(this,require('_process')) -},{"./Object.assign":34,"./PooledClass":35,"./invariant":143,"_process":3}],14:[function(require,module,exports){ +},{"./Object.assign":42,"./PooledClass":43,"./invariant":151,"_process":3}],22:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11948,7 +12780,7 @@ var ChangeEventPlugin = { module.exports = ChangeEventPlugin; -},{"./EventConstants":22,"./EventPluginHub":24,"./EventPropagators":27,"./ExecutionEnvironment":28,"./ReactUpdates":95,"./SyntheticEvent":103,"./isEventSupported":144,"./isTextInputElement":146,"./keyOf":149}],15:[function(require,module,exports){ +},{"./EventConstants":30,"./EventPluginHub":32,"./EventPropagators":35,"./ExecutionEnvironment":36,"./ReactUpdates":103,"./SyntheticEvent":111,"./isEventSupported":152,"./isTextInputElement":154,"./keyOf":157}],23:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11973,7 +12805,7 @@ var ClientReactRootIndex = { module.exports = ClientReactRootIndex; -},{}],16:[function(require,module,exports){ +},{}],24:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -12111,7 +12943,7 @@ var DOMChildrenOperations = { module.exports = DOMChildrenOperations; }).call(this,require('_process')) -},{"./Danger":19,"./ReactMultiChildUpdateTypes":80,"./invariant":143,"./setTextContent":157,"_process":3}],17:[function(require,module,exports){ +},{"./Danger":27,"./ReactMultiChildUpdateTypes":88,"./invariant":151,"./setTextContent":165,"_process":3}],25:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -12410,7 +13242,7 @@ var DOMProperty = { module.exports = DOMProperty; }).call(this,require('_process')) -},{"./invariant":143,"_process":3}],18:[function(require,module,exports){ +},{"./invariant":151,"_process":3}],26:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -12602,7 +13434,7 @@ var DOMPropertyOperations = { module.exports = DOMPropertyOperations; }).call(this,require('_process')) -},{"./DOMProperty":17,"./quoteAttributeValueForBrowser":155,"./warning":162,"_process":3}],19:[function(require,module,exports){ +},{"./DOMProperty":25,"./quoteAttributeValueForBrowser":163,"./warning":170,"_process":3}],27:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -12789,7 +13621,7 @@ var Danger = { module.exports = Danger; }).call(this,require('_process')) -},{"./ExecutionEnvironment":28,"./createNodesFromMarkup":120,"./emptyFunction":122,"./getMarkupWrap":135,"./invariant":143,"_process":3}],20:[function(require,module,exports){ +},{"./ExecutionEnvironment":36,"./createNodesFromMarkup":128,"./emptyFunction":130,"./getMarkupWrap":143,"./invariant":151,"_process":3}],28:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -12828,7 +13660,7 @@ var DefaultEventPluginOrder = [ module.exports = DefaultEventPluginOrder; -},{"./keyOf":149}],21:[function(require,module,exports){ +},{"./keyOf":157}],29:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -12968,7 +13800,7 @@ var EnterLeaveEventPlugin = { module.exports = EnterLeaveEventPlugin; -},{"./EventConstants":22,"./EventPropagators":27,"./ReactMount":78,"./SyntheticMouseEvent":107,"./keyOf":149}],22:[function(require,module,exports){ +},{"./EventConstants":30,"./EventPropagators":35,"./ReactMount":86,"./SyntheticMouseEvent":115,"./keyOf":157}],30:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -13040,7 +13872,7 @@ var EventConstants = { module.exports = EventConstants; -},{"./keyMirror":148}],23:[function(require,module,exports){ +},{"./keyMirror":156}],31:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -13130,7 +13962,7 @@ var EventListener = { module.exports = EventListener; }).call(this,require('_process')) -},{"./emptyFunction":122,"_process":3}],24:[function(require,module,exports){ +},{"./emptyFunction":130,"_process":3}],32:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -13408,7 +14240,7 @@ var EventPluginHub = { module.exports = EventPluginHub; }).call(this,require('_process')) -},{"./EventPluginRegistry":25,"./EventPluginUtils":26,"./accumulateInto":113,"./forEachAccumulated":128,"./invariant":143,"_process":3}],25:[function(require,module,exports){ +},{"./EventPluginRegistry":33,"./EventPluginUtils":34,"./accumulateInto":121,"./forEachAccumulated":136,"./invariant":151,"_process":3}],33:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -13688,7 +14520,7 @@ var EventPluginRegistry = { module.exports = EventPluginRegistry; }).call(this,require('_process')) -},{"./invariant":143,"_process":3}],26:[function(require,module,exports){ +},{"./invariant":151,"_process":3}],34:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -13909,7 +14741,7 @@ var EventPluginUtils = { module.exports = EventPluginUtils; }).call(this,require('_process')) -},{"./EventConstants":22,"./invariant":143,"_process":3}],27:[function(require,module,exports){ +},{"./EventConstants":30,"./invariant":151,"_process":3}],35:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -14051,7 +14883,7 @@ var EventPropagators = { module.exports = EventPropagators; }).call(this,require('_process')) -},{"./EventConstants":22,"./EventPluginHub":24,"./accumulateInto":113,"./forEachAccumulated":128,"_process":3}],28:[function(require,module,exports){ +},{"./EventConstants":30,"./EventPluginHub":32,"./accumulateInto":121,"./forEachAccumulated":136,"_process":3}],36:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14095,7 +14927,7 @@ var ExecutionEnvironment = { module.exports = ExecutionEnvironment; -},{}],29:[function(require,module,exports){ +},{}],37:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14186,7 +15018,7 @@ PooledClass.addPoolingTo(FallbackCompositionState); module.exports = FallbackCompositionState; -},{"./Object.assign":34,"./PooledClass":35,"./getTextContentAccessor":138}],30:[function(require,module,exports){ +},{"./Object.assign":42,"./PooledClass":43,"./getTextContentAccessor":146}],38:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14397,7 +15229,7 @@ var HTMLDOMPropertyConfig = { module.exports = HTMLDOMPropertyConfig; -},{"./DOMProperty":17,"./ExecutionEnvironment":28}],31:[function(require,module,exports){ +},{"./DOMProperty":25,"./ExecutionEnvironment":36}],39:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -14553,7 +15385,7 @@ var LinkedValueUtils = { module.exports = LinkedValueUtils; }).call(this,require('_process')) -},{"./ReactPropTypes":86,"./invariant":143,"_process":3}],32:[function(require,module,exports){ +},{"./ReactPropTypes":94,"./invariant":151,"_process":3}],40:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -14610,7 +15442,7 @@ var LocalEventTrapMixin = { module.exports = LocalEventTrapMixin; }).call(this,require('_process')) -},{"./ReactBrowserEventEmitter":38,"./accumulateInto":113,"./forEachAccumulated":128,"./invariant":143,"_process":3}],33:[function(require,module,exports){ +},{"./ReactBrowserEventEmitter":46,"./accumulateInto":121,"./forEachAccumulated":136,"./invariant":151,"_process":3}],41:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14668,7 +15500,7 @@ var MobileSafariClickEventPlugin = { module.exports = MobileSafariClickEventPlugin; -},{"./EventConstants":22,"./emptyFunction":122}],34:[function(require,module,exports){ +},{"./EventConstants":30,"./emptyFunction":130}],42:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -14717,7 +15549,7 @@ function assign(target, sources) { module.exports = assign; -},{}],35:[function(require,module,exports){ +},{}],43:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -14833,7 +15665,7 @@ var PooledClass = { module.exports = PooledClass; }).call(this,require('_process')) -},{"./invariant":143,"_process":3}],36:[function(require,module,exports){ +},{"./invariant":151,"_process":3}],44:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -14985,7 +15817,7 @@ React.version = '0.13.3'; module.exports = React; }).call(this,require('_process')) -},{"./EventPluginUtils":26,"./ExecutionEnvironment":28,"./Object.assign":34,"./ReactChildren":40,"./ReactClass":41,"./ReactComponent":42,"./ReactContext":46,"./ReactCurrentOwner":47,"./ReactDOM":48,"./ReactDOMTextComponent":59,"./ReactDefaultInjection":62,"./ReactElement":65,"./ReactElementValidator":66,"./ReactInstanceHandles":74,"./ReactMount":78,"./ReactPerf":83,"./ReactPropTypes":86,"./ReactReconciler":89,"./ReactServerRendering":92,"./findDOMNode":125,"./onlyChild":152,"_process":3}],37:[function(require,module,exports){ +},{"./EventPluginUtils":34,"./ExecutionEnvironment":36,"./Object.assign":42,"./ReactChildren":48,"./ReactClass":49,"./ReactComponent":50,"./ReactContext":54,"./ReactCurrentOwner":55,"./ReactDOM":56,"./ReactDOMTextComponent":67,"./ReactDefaultInjection":70,"./ReactElement":73,"./ReactElementValidator":74,"./ReactInstanceHandles":82,"./ReactMount":86,"./ReactPerf":91,"./ReactPropTypes":94,"./ReactReconciler":97,"./ReactServerRendering":100,"./findDOMNode":133,"./onlyChild":160,"_process":3}],45:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -15016,7 +15848,7 @@ var ReactBrowserComponentMixin = { module.exports = ReactBrowserComponentMixin; -},{"./findDOMNode":125}],38:[function(require,module,exports){ +},{"./findDOMNode":133}],46:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -15369,7 +16201,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { module.exports = ReactBrowserEventEmitter; -},{"./EventConstants":22,"./EventPluginHub":24,"./EventPluginRegistry":25,"./Object.assign":34,"./ReactEventEmitterMixin":69,"./ViewportMetrics":112,"./isEventSupported":144}],39:[function(require,module,exports){ +},{"./EventConstants":30,"./EventPluginHub":32,"./EventPluginRegistry":33,"./Object.assign":42,"./ReactEventEmitterMixin":77,"./ViewportMetrics":120,"./isEventSupported":152}],47:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -15496,7 +16328,7 @@ var ReactChildReconciler = { module.exports = ReactChildReconciler; -},{"./ReactReconciler":89,"./flattenChildren":126,"./instantiateReactComponent":142,"./shouldUpdateReactComponent":159}],40:[function(require,module,exports){ +},{"./ReactReconciler":97,"./flattenChildren":134,"./instantiateReactComponent":150,"./shouldUpdateReactComponent":167}],48:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -15649,7 +16481,7 @@ var ReactChildren = { module.exports = ReactChildren; }).call(this,require('_process')) -},{"./PooledClass":35,"./ReactFragment":71,"./traverseAllChildren":161,"./warning":162,"_process":3}],41:[function(require,module,exports){ +},{"./PooledClass":43,"./ReactFragment":79,"./traverseAllChildren":169,"./warning":170,"_process":3}],49:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -16595,7 +17427,7 @@ var ReactClass = { module.exports = ReactClass; }).call(this,require('_process')) -},{"./Object.assign":34,"./ReactComponent":42,"./ReactCurrentOwner":47,"./ReactElement":65,"./ReactErrorUtils":68,"./ReactInstanceMap":75,"./ReactLifeCycle":76,"./ReactPropTypeLocationNames":84,"./ReactPropTypeLocations":85,"./ReactUpdateQueue":94,"./invariant":143,"./keyMirror":148,"./keyOf":149,"./warning":162,"_process":3}],42:[function(require,module,exports){ +},{"./Object.assign":42,"./ReactComponent":50,"./ReactCurrentOwner":55,"./ReactElement":73,"./ReactErrorUtils":76,"./ReactInstanceMap":83,"./ReactLifeCycle":84,"./ReactPropTypeLocationNames":92,"./ReactPropTypeLocations":93,"./ReactUpdateQueue":102,"./invariant":151,"./keyMirror":156,"./keyOf":157,"./warning":170,"_process":3}],50:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -16749,7 +17581,7 @@ if ("production" !== process.env.NODE_ENV) { module.exports = ReactComponent; }).call(this,require('_process')) -},{"./ReactUpdateQueue":94,"./invariant":143,"./warning":162,"_process":3}],43:[function(require,module,exports){ +},{"./ReactUpdateQueue":102,"./invariant":151,"./warning":170,"_process":3}],51:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -16796,7 +17628,7 @@ var ReactComponentBrowserEnvironment = { module.exports = ReactComponentBrowserEnvironment; -},{"./ReactDOMIDOperations":52,"./ReactMount":78}],44:[function(require,module,exports){ +},{"./ReactDOMIDOperations":60,"./ReactMount":86}],52:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -16857,7 +17689,7 @@ var ReactComponentEnvironment = { module.exports = ReactComponentEnvironment; }).call(this,require('_process')) -},{"./invariant":143,"_process":3}],45:[function(require,module,exports){ +},{"./invariant":151,"_process":3}],53:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -17770,7 +18602,7 @@ var ReactCompositeComponent = { module.exports = ReactCompositeComponent; }).call(this,require('_process')) -},{"./Object.assign":34,"./ReactComponentEnvironment":44,"./ReactContext":46,"./ReactCurrentOwner":47,"./ReactElement":65,"./ReactElementValidator":66,"./ReactInstanceMap":75,"./ReactLifeCycle":76,"./ReactNativeComponent":81,"./ReactPerf":83,"./ReactPropTypeLocationNames":84,"./ReactPropTypeLocations":85,"./ReactReconciler":89,"./ReactUpdates":95,"./emptyObject":123,"./invariant":143,"./shouldUpdateReactComponent":159,"./warning":162,"_process":3}],46:[function(require,module,exports){ +},{"./Object.assign":42,"./ReactComponentEnvironment":52,"./ReactContext":54,"./ReactCurrentOwner":55,"./ReactElement":73,"./ReactElementValidator":74,"./ReactInstanceMap":83,"./ReactLifeCycle":84,"./ReactNativeComponent":89,"./ReactPerf":91,"./ReactPropTypeLocationNames":92,"./ReactPropTypeLocations":93,"./ReactReconciler":97,"./ReactUpdates":103,"./emptyObject":131,"./invariant":151,"./shouldUpdateReactComponent":167,"./warning":170,"_process":3}],54:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -17848,7 +18680,7 @@ var ReactContext = { module.exports = ReactContext; }).call(this,require('_process')) -},{"./Object.assign":34,"./emptyObject":123,"./warning":162,"_process":3}],47:[function(require,module,exports){ +},{"./Object.assign":42,"./emptyObject":131,"./warning":170,"_process":3}],55:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17882,7 +18714,7 @@ var ReactCurrentOwner = { module.exports = ReactCurrentOwner; -},{}],48:[function(require,module,exports){ +},{}],56:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -18061,7 +18893,7 @@ var ReactDOM = mapObject({ module.exports = ReactDOM; }).call(this,require('_process')) -},{"./ReactElement":65,"./ReactElementValidator":66,"./mapObject":150,"_process":3}],49:[function(require,module,exports){ +},{"./ReactElement":73,"./ReactElementValidator":74,"./mapObject":158,"_process":3}],57:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18125,7 +18957,7 @@ var ReactDOMButton = ReactClass.createClass({ module.exports = ReactDOMButton; -},{"./AutoFocusMixin":9,"./ReactBrowserComponentMixin":37,"./ReactClass":41,"./ReactElement":65,"./keyMirror":148}],50:[function(require,module,exports){ +},{"./AutoFocusMixin":17,"./ReactBrowserComponentMixin":45,"./ReactClass":49,"./ReactElement":73,"./keyMirror":156}],58:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -18635,7 +19467,7 @@ ReactDOMComponent.injection = { module.exports = ReactDOMComponent; }).call(this,require('_process')) -},{"./CSSPropertyOperations":12,"./DOMProperty":17,"./DOMPropertyOperations":18,"./Object.assign":34,"./ReactBrowserEventEmitter":38,"./ReactComponentBrowserEnvironment":43,"./ReactMount":78,"./ReactMultiChild":79,"./ReactPerf":83,"./escapeTextContentForBrowser":124,"./invariant":143,"./isEventSupported":144,"./keyOf":149,"./warning":162,"_process":3}],51:[function(require,module,exports){ +},{"./CSSPropertyOperations":20,"./DOMProperty":25,"./DOMPropertyOperations":26,"./Object.assign":42,"./ReactBrowserEventEmitter":46,"./ReactComponentBrowserEnvironment":51,"./ReactMount":86,"./ReactMultiChild":87,"./ReactPerf":91,"./escapeTextContentForBrowser":132,"./invariant":151,"./isEventSupported":152,"./keyOf":157,"./warning":170,"_process":3}],59:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18684,7 +19516,7 @@ var ReactDOMForm = ReactClass.createClass({ module.exports = ReactDOMForm; -},{"./EventConstants":22,"./LocalEventTrapMixin":32,"./ReactBrowserComponentMixin":37,"./ReactClass":41,"./ReactElement":65}],52:[function(require,module,exports){ +},{"./EventConstants":30,"./LocalEventTrapMixin":40,"./ReactBrowserComponentMixin":45,"./ReactClass":49,"./ReactElement":73}],60:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -18852,7 +19684,7 @@ ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', { module.exports = ReactDOMIDOperations; }).call(this,require('_process')) -},{"./CSSPropertyOperations":12,"./DOMChildrenOperations":16,"./DOMPropertyOperations":18,"./ReactMount":78,"./ReactPerf":83,"./invariant":143,"./setInnerHTML":156,"_process":3}],53:[function(require,module,exports){ +},{"./CSSPropertyOperations":20,"./DOMChildrenOperations":24,"./DOMPropertyOperations":26,"./ReactMount":86,"./ReactPerf":91,"./invariant":151,"./setInnerHTML":164,"_process":3}],61:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18897,7 +19729,7 @@ var ReactDOMIframe = ReactClass.createClass({ module.exports = ReactDOMIframe; -},{"./EventConstants":22,"./LocalEventTrapMixin":32,"./ReactBrowserComponentMixin":37,"./ReactClass":41,"./ReactElement":65}],54:[function(require,module,exports){ +},{"./EventConstants":30,"./LocalEventTrapMixin":40,"./ReactBrowserComponentMixin":45,"./ReactClass":49,"./ReactElement":73}],62:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18943,7 +19775,7 @@ var ReactDOMImg = ReactClass.createClass({ module.exports = ReactDOMImg; -},{"./EventConstants":22,"./LocalEventTrapMixin":32,"./ReactBrowserComponentMixin":37,"./ReactClass":41,"./ReactElement":65}],55:[function(require,module,exports){ +},{"./EventConstants":30,"./LocalEventTrapMixin":40,"./ReactBrowserComponentMixin":45,"./ReactClass":49,"./ReactElement":73}],63:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -19120,7 +19952,7 @@ var ReactDOMInput = ReactClass.createClass({ module.exports = ReactDOMInput; }).call(this,require('_process')) -},{"./AutoFocusMixin":9,"./DOMPropertyOperations":18,"./LinkedValueUtils":31,"./Object.assign":34,"./ReactBrowserComponentMixin":37,"./ReactClass":41,"./ReactElement":65,"./ReactMount":78,"./ReactUpdates":95,"./invariant":143,"_process":3}],56:[function(require,module,exports){ +},{"./AutoFocusMixin":17,"./DOMPropertyOperations":26,"./LinkedValueUtils":39,"./Object.assign":42,"./ReactBrowserComponentMixin":45,"./ReactClass":49,"./ReactElement":73,"./ReactMount":86,"./ReactUpdates":103,"./invariant":151,"_process":3}],64:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -19172,7 +20004,7 @@ var ReactDOMOption = ReactClass.createClass({ module.exports = ReactDOMOption; }).call(this,require('_process')) -},{"./ReactBrowserComponentMixin":37,"./ReactClass":41,"./ReactElement":65,"./warning":162,"_process":3}],57:[function(require,module,exports){ +},{"./ReactBrowserComponentMixin":45,"./ReactClass":49,"./ReactElement":73,"./warning":170,"_process":3}],65:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19350,7 +20182,7 @@ var ReactDOMSelect = ReactClass.createClass({ module.exports = ReactDOMSelect; -},{"./AutoFocusMixin":9,"./LinkedValueUtils":31,"./Object.assign":34,"./ReactBrowserComponentMixin":37,"./ReactClass":41,"./ReactElement":65,"./ReactUpdates":95}],58:[function(require,module,exports){ +},{"./AutoFocusMixin":17,"./LinkedValueUtils":39,"./Object.assign":42,"./ReactBrowserComponentMixin":45,"./ReactClass":49,"./ReactElement":73,"./ReactUpdates":103}],66:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19563,7 +20395,7 @@ var ReactDOMSelection = { module.exports = ReactDOMSelection; -},{"./ExecutionEnvironment":28,"./getNodeForCharacterOffset":136,"./getTextContentAccessor":138}],59:[function(require,module,exports){ +},{"./ExecutionEnvironment":36,"./getNodeForCharacterOffset":144,"./getTextContentAccessor":146}],67:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19680,7 +20512,7 @@ assign(ReactDOMTextComponent.prototype, { module.exports = ReactDOMTextComponent; -},{"./DOMPropertyOperations":18,"./Object.assign":34,"./ReactComponentBrowserEnvironment":43,"./ReactDOMComponent":50,"./escapeTextContentForBrowser":124}],60:[function(require,module,exports){ +},{"./DOMPropertyOperations":26,"./Object.assign":42,"./ReactComponentBrowserEnvironment":51,"./ReactDOMComponent":58,"./escapeTextContentForBrowser":132}],68:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -19820,7 +20652,7 @@ var ReactDOMTextarea = ReactClass.createClass({ module.exports = ReactDOMTextarea; }).call(this,require('_process')) -},{"./AutoFocusMixin":9,"./DOMPropertyOperations":18,"./LinkedValueUtils":31,"./Object.assign":34,"./ReactBrowserComponentMixin":37,"./ReactClass":41,"./ReactElement":65,"./ReactUpdates":95,"./invariant":143,"./warning":162,"_process":3}],61:[function(require,module,exports){ +},{"./AutoFocusMixin":17,"./DOMPropertyOperations":26,"./LinkedValueUtils":39,"./Object.assign":42,"./ReactBrowserComponentMixin":45,"./ReactClass":49,"./ReactElement":73,"./ReactUpdates":103,"./invariant":151,"./warning":170,"_process":3}],69:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19893,7 +20725,7 @@ var ReactDefaultBatchingStrategy = { module.exports = ReactDefaultBatchingStrategy; -},{"./Object.assign":34,"./ReactUpdates":95,"./Transaction":111,"./emptyFunction":122}],62:[function(require,module,exports){ +},{"./Object.assign":42,"./ReactUpdates":103,"./Transaction":119,"./emptyFunction":130}],70:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -20052,7 +20884,7 @@ module.exports = { }; }).call(this,require('_process')) -},{"./BeforeInputEventPlugin":10,"./ChangeEventPlugin":14,"./ClientReactRootIndex":15,"./DefaultEventPluginOrder":20,"./EnterLeaveEventPlugin":21,"./ExecutionEnvironment":28,"./HTMLDOMPropertyConfig":30,"./MobileSafariClickEventPlugin":33,"./ReactBrowserComponentMixin":37,"./ReactClass":41,"./ReactComponentBrowserEnvironment":43,"./ReactDOMButton":49,"./ReactDOMComponent":50,"./ReactDOMForm":51,"./ReactDOMIDOperations":52,"./ReactDOMIframe":53,"./ReactDOMImg":54,"./ReactDOMInput":55,"./ReactDOMOption":56,"./ReactDOMSelect":57,"./ReactDOMTextComponent":59,"./ReactDOMTextarea":60,"./ReactDefaultBatchingStrategy":61,"./ReactDefaultPerf":63,"./ReactElement":65,"./ReactEventListener":70,"./ReactInjection":72,"./ReactInstanceHandles":74,"./ReactMount":78,"./ReactReconcileTransaction":88,"./SVGDOMPropertyConfig":96,"./SelectEventPlugin":97,"./ServerReactRootIndex":98,"./SimpleEventPlugin":99,"./createFullPageComponent":119,"_process":3}],63:[function(require,module,exports){ +},{"./BeforeInputEventPlugin":18,"./ChangeEventPlugin":22,"./ClientReactRootIndex":23,"./DefaultEventPluginOrder":28,"./EnterLeaveEventPlugin":29,"./ExecutionEnvironment":36,"./HTMLDOMPropertyConfig":38,"./MobileSafariClickEventPlugin":41,"./ReactBrowserComponentMixin":45,"./ReactClass":49,"./ReactComponentBrowserEnvironment":51,"./ReactDOMButton":57,"./ReactDOMComponent":58,"./ReactDOMForm":59,"./ReactDOMIDOperations":60,"./ReactDOMIframe":61,"./ReactDOMImg":62,"./ReactDOMInput":63,"./ReactDOMOption":64,"./ReactDOMSelect":65,"./ReactDOMTextComponent":67,"./ReactDOMTextarea":68,"./ReactDefaultBatchingStrategy":69,"./ReactDefaultPerf":71,"./ReactElement":73,"./ReactEventListener":78,"./ReactInjection":80,"./ReactInstanceHandles":82,"./ReactMount":86,"./ReactReconcileTransaction":96,"./SVGDOMPropertyConfig":104,"./SelectEventPlugin":105,"./ServerReactRootIndex":106,"./SimpleEventPlugin":107,"./createFullPageComponent":127,"_process":3}],71:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20318,7 +21150,7 @@ var ReactDefaultPerf = { module.exports = ReactDefaultPerf; -},{"./DOMProperty":17,"./ReactDefaultPerfAnalysis":64,"./ReactMount":78,"./ReactPerf":83,"./performanceNow":154}],64:[function(require,module,exports){ +},{"./DOMProperty":25,"./ReactDefaultPerfAnalysis":72,"./ReactMount":86,"./ReactPerf":91,"./performanceNow":162}],72:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20524,7 +21356,7 @@ var ReactDefaultPerfAnalysis = { module.exports = ReactDefaultPerfAnalysis; -},{"./Object.assign":34}],65:[function(require,module,exports){ +},{"./Object.assign":42}],73:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -20832,7 +21664,7 @@ ReactElement.isValidElement = function(object) { module.exports = ReactElement; }).call(this,require('_process')) -},{"./Object.assign":34,"./ReactContext":46,"./ReactCurrentOwner":47,"./warning":162,"_process":3}],66:[function(require,module,exports){ +},{"./Object.assign":42,"./ReactContext":54,"./ReactCurrentOwner":55,"./warning":170,"_process":3}],74:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -21297,7 +22129,7 @@ var ReactElementValidator = { module.exports = ReactElementValidator; }).call(this,require('_process')) -},{"./ReactCurrentOwner":47,"./ReactElement":65,"./ReactFragment":71,"./ReactNativeComponent":81,"./ReactPropTypeLocationNames":84,"./ReactPropTypeLocations":85,"./getIteratorFn":134,"./invariant":143,"./warning":162,"_process":3}],67:[function(require,module,exports){ +},{"./ReactCurrentOwner":55,"./ReactElement":73,"./ReactFragment":79,"./ReactNativeComponent":89,"./ReactPropTypeLocationNames":92,"./ReactPropTypeLocations":93,"./getIteratorFn":142,"./invariant":151,"./warning":170,"_process":3}],75:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -21392,7 +22224,7 @@ var ReactEmptyComponent = { module.exports = ReactEmptyComponent; }).call(this,require('_process')) -},{"./ReactElement":65,"./ReactInstanceMap":75,"./invariant":143,"_process":3}],68:[function(require,module,exports){ +},{"./ReactElement":73,"./ReactInstanceMap":83,"./invariant":151,"_process":3}],76:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -21424,7 +22256,7 @@ var ReactErrorUtils = { module.exports = ReactErrorUtils; -},{}],69:[function(require,module,exports){ +},{}],77:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -21474,7 +22306,7 @@ var ReactEventEmitterMixin = { module.exports = ReactEventEmitterMixin; -},{"./EventPluginHub":24}],70:[function(require,module,exports){ +},{"./EventPluginHub":32}],78:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -21657,7 +22489,7 @@ var ReactEventListener = { module.exports = ReactEventListener; -},{"./EventListener":23,"./ExecutionEnvironment":28,"./Object.assign":34,"./PooledClass":35,"./ReactInstanceHandles":74,"./ReactMount":78,"./ReactUpdates":95,"./getEventTarget":133,"./getUnboundedScrollPosition":139}],71:[function(require,module,exports){ +},{"./EventListener":31,"./ExecutionEnvironment":36,"./Object.assign":42,"./PooledClass":43,"./ReactInstanceHandles":82,"./ReactMount":86,"./ReactUpdates":103,"./getEventTarget":141,"./getUnboundedScrollPosition":147}],79:[function(require,module,exports){ (function (process){ /** * Copyright 2015, Facebook, Inc. @@ -21842,7 +22674,7 @@ var ReactFragment = { module.exports = ReactFragment; }).call(this,require('_process')) -},{"./ReactElement":65,"./warning":162,"_process":3}],72:[function(require,module,exports){ +},{"./ReactElement":73,"./warning":170,"_process":3}],80:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -21884,7 +22716,7 @@ var ReactInjection = { module.exports = ReactInjection; -},{"./DOMProperty":17,"./EventPluginHub":24,"./ReactBrowserEventEmitter":38,"./ReactClass":41,"./ReactComponentEnvironment":44,"./ReactDOMComponent":50,"./ReactEmptyComponent":67,"./ReactNativeComponent":81,"./ReactPerf":83,"./ReactRootIndex":91,"./ReactUpdates":95}],73:[function(require,module,exports){ +},{"./DOMProperty":25,"./EventPluginHub":32,"./ReactBrowserEventEmitter":46,"./ReactClass":49,"./ReactComponentEnvironment":52,"./ReactDOMComponent":58,"./ReactEmptyComponent":75,"./ReactNativeComponent":89,"./ReactPerf":91,"./ReactRootIndex":99,"./ReactUpdates":103}],81:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -22019,7 +22851,7 @@ var ReactInputSelection = { module.exports = ReactInputSelection; -},{"./ReactDOMSelection":58,"./containsNode":117,"./focusNode":127,"./getActiveElement":129}],74:[function(require,module,exports){ +},{"./ReactDOMSelection":66,"./containsNode":125,"./focusNode":135,"./getActiveElement":137}],82:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -22355,7 +23187,7 @@ var ReactInstanceHandles = { module.exports = ReactInstanceHandles; }).call(this,require('_process')) -},{"./ReactRootIndex":91,"./invariant":143,"_process":3}],75:[function(require,module,exports){ +},{"./ReactRootIndex":99,"./invariant":151,"_process":3}],83:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -22404,7 +23236,7 @@ var ReactInstanceMap = { module.exports = ReactInstanceMap; -},{}],76:[function(require,module,exports){ +},{}],84:[function(require,module,exports){ /** * Copyright 2015, Facebook, Inc. * All rights reserved. @@ -22441,7 +23273,7 @@ var ReactLifeCycle = { module.exports = ReactLifeCycle; -},{}],77:[function(require,module,exports){ +},{}],85:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -22489,7 +23321,7 @@ var ReactMarkupChecksum = { module.exports = ReactMarkupChecksum; -},{"./adler32":114}],78:[function(require,module,exports){ +},{"./adler32":122}],86:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -23380,7 +24212,7 @@ ReactPerf.measureMethods(ReactMount, 'ReactMount', { module.exports = ReactMount; }).call(this,require('_process')) -},{"./DOMProperty":17,"./ReactBrowserEventEmitter":38,"./ReactCurrentOwner":47,"./ReactElement":65,"./ReactElementValidator":66,"./ReactEmptyComponent":67,"./ReactInstanceHandles":74,"./ReactInstanceMap":75,"./ReactMarkupChecksum":77,"./ReactPerf":83,"./ReactReconciler":89,"./ReactUpdateQueue":94,"./ReactUpdates":95,"./containsNode":117,"./emptyObject":123,"./getReactRootElementInContainer":137,"./instantiateReactComponent":142,"./invariant":143,"./setInnerHTML":156,"./shouldUpdateReactComponent":159,"./warning":162,"_process":3}],79:[function(require,module,exports){ +},{"./DOMProperty":25,"./ReactBrowserEventEmitter":46,"./ReactCurrentOwner":55,"./ReactElement":73,"./ReactElementValidator":74,"./ReactEmptyComponent":75,"./ReactInstanceHandles":82,"./ReactInstanceMap":83,"./ReactMarkupChecksum":85,"./ReactPerf":91,"./ReactReconciler":97,"./ReactUpdateQueue":102,"./ReactUpdates":103,"./containsNode":125,"./emptyObject":131,"./getReactRootElementInContainer":145,"./instantiateReactComponent":150,"./invariant":151,"./setInnerHTML":164,"./shouldUpdateReactComponent":167,"./warning":170,"_process":3}],87:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -23810,7 +24642,7 @@ var ReactMultiChild = { module.exports = ReactMultiChild; -},{"./ReactChildReconciler":39,"./ReactComponentEnvironment":44,"./ReactMultiChildUpdateTypes":80,"./ReactReconciler":89}],80:[function(require,module,exports){ +},{"./ReactChildReconciler":47,"./ReactComponentEnvironment":52,"./ReactMultiChildUpdateTypes":88,"./ReactReconciler":97}],88:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -23843,7 +24675,7 @@ var ReactMultiChildUpdateTypes = keyMirror({ module.exports = ReactMultiChildUpdateTypes; -},{"./keyMirror":148}],81:[function(require,module,exports){ +},{"./keyMirror":156}],89:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -23950,7 +24782,7 @@ var ReactNativeComponent = { module.exports = ReactNativeComponent; }).call(this,require('_process')) -},{"./Object.assign":34,"./invariant":143,"_process":3}],82:[function(require,module,exports){ +},{"./Object.assign":42,"./invariant":151,"_process":3}],90:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -24062,7 +24894,7 @@ var ReactOwner = { module.exports = ReactOwner; }).call(this,require('_process')) -},{"./invariant":143,"_process":3}],83:[function(require,module,exports){ +},{"./invariant":151,"_process":3}],91:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -24166,7 +24998,7 @@ function _noMeasure(objName, fnName, func) { module.exports = ReactPerf; }).call(this,require('_process')) -},{"_process":3}],84:[function(require,module,exports){ +},{"_process":3}],92:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -24194,7 +25026,7 @@ if ("production" !== process.env.NODE_ENV) { module.exports = ReactPropTypeLocationNames; }).call(this,require('_process')) -},{"_process":3}],85:[function(require,module,exports){ +},{"_process":3}],93:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -24218,7 +25050,7 @@ var ReactPropTypeLocations = keyMirror({ module.exports = ReactPropTypeLocations; -},{"./keyMirror":148}],86:[function(require,module,exports){ +},{"./keyMirror":156}],94:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -24567,7 +25399,7 @@ function getPreciseType(propValue) { module.exports = ReactPropTypes; -},{"./ReactElement":65,"./ReactFragment":71,"./ReactPropTypeLocationNames":84,"./emptyFunction":122}],87:[function(require,module,exports){ +},{"./ReactElement":73,"./ReactFragment":79,"./ReactPropTypeLocationNames":92,"./emptyFunction":130}],95:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -24623,7 +25455,7 @@ PooledClass.addPoolingTo(ReactPutListenerQueue); module.exports = ReactPutListenerQueue; -},{"./Object.assign":34,"./PooledClass":35,"./ReactBrowserEventEmitter":38}],88:[function(require,module,exports){ +},{"./Object.assign":42,"./PooledClass":43,"./ReactBrowserEventEmitter":46}],96:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -24799,7 +25631,7 @@ PooledClass.addPoolingTo(ReactReconcileTransaction); module.exports = ReactReconcileTransaction; -},{"./CallbackQueue":13,"./Object.assign":34,"./PooledClass":35,"./ReactBrowserEventEmitter":38,"./ReactInputSelection":73,"./ReactPutListenerQueue":87,"./Transaction":111}],89:[function(require,module,exports){ +},{"./CallbackQueue":21,"./Object.assign":42,"./PooledClass":43,"./ReactBrowserEventEmitter":46,"./ReactInputSelection":81,"./ReactPutListenerQueue":95,"./Transaction":119}],97:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -24923,7 +25755,7 @@ var ReactReconciler = { module.exports = ReactReconciler; }).call(this,require('_process')) -},{"./ReactElementValidator":66,"./ReactRef":90,"_process":3}],90:[function(require,module,exports){ +},{"./ReactElementValidator":74,"./ReactRef":98,"_process":3}],98:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -24994,7 +25826,7 @@ ReactRef.detachRefs = function(instance, element) { module.exports = ReactRef; -},{"./ReactOwner":82}],91:[function(require,module,exports){ +},{"./ReactOwner":90}],99:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -25025,7 +25857,7 @@ var ReactRootIndex = { module.exports = ReactRootIndex; -},{}],92:[function(require,module,exports){ +},{}],100:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -25107,7 +25939,7 @@ module.exports = { }; }).call(this,require('_process')) -},{"./ReactElement":65,"./ReactInstanceHandles":74,"./ReactMarkupChecksum":77,"./ReactServerRenderingTransaction":93,"./emptyObject":123,"./instantiateReactComponent":142,"./invariant":143,"_process":3}],93:[function(require,module,exports){ +},{"./ReactElement":73,"./ReactInstanceHandles":82,"./ReactMarkupChecksum":85,"./ReactServerRenderingTransaction":101,"./emptyObject":131,"./instantiateReactComponent":150,"./invariant":151,"_process":3}],101:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -25220,7 +26052,7 @@ PooledClass.addPoolingTo(ReactServerRenderingTransaction); module.exports = ReactServerRenderingTransaction; -},{"./CallbackQueue":13,"./Object.assign":34,"./PooledClass":35,"./ReactPutListenerQueue":87,"./Transaction":111,"./emptyFunction":122}],94:[function(require,module,exports){ +},{"./CallbackQueue":21,"./Object.assign":42,"./PooledClass":43,"./ReactPutListenerQueue":95,"./Transaction":119,"./emptyFunction":130}],102:[function(require,module,exports){ (function (process){ /** * Copyright 2015, Facebook, Inc. @@ -25519,7 +26351,7 @@ var ReactUpdateQueue = { module.exports = ReactUpdateQueue; }).call(this,require('_process')) -},{"./Object.assign":34,"./ReactCurrentOwner":47,"./ReactElement":65,"./ReactInstanceMap":75,"./ReactLifeCycle":76,"./ReactUpdates":95,"./invariant":143,"./warning":162,"_process":3}],95:[function(require,module,exports){ +},{"./Object.assign":42,"./ReactCurrentOwner":55,"./ReactElement":73,"./ReactInstanceMap":83,"./ReactLifeCycle":84,"./ReactUpdates":103,"./invariant":151,"./warning":170,"_process":3}],103:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -25801,7 +26633,7 @@ var ReactUpdates = { module.exports = ReactUpdates; }).call(this,require('_process')) -},{"./CallbackQueue":13,"./Object.assign":34,"./PooledClass":35,"./ReactCurrentOwner":47,"./ReactPerf":83,"./ReactReconciler":89,"./Transaction":111,"./invariant":143,"./warning":162,"_process":3}],96:[function(require,module,exports){ +},{"./CallbackQueue":21,"./Object.assign":42,"./PooledClass":43,"./ReactCurrentOwner":55,"./ReactPerf":91,"./ReactReconciler":97,"./Transaction":119,"./invariant":151,"./warning":170,"_process":3}],104:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -25895,7 +26727,7 @@ var SVGDOMPropertyConfig = { module.exports = SVGDOMPropertyConfig; -},{"./DOMProperty":17}],97:[function(require,module,exports){ +},{"./DOMProperty":25}],105:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26090,7 +26922,7 @@ var SelectEventPlugin = { module.exports = SelectEventPlugin; -},{"./EventConstants":22,"./EventPropagators":27,"./ReactInputSelection":73,"./SyntheticEvent":103,"./getActiveElement":129,"./isTextInputElement":146,"./keyOf":149,"./shallowEqual":158}],98:[function(require,module,exports){ +},{"./EventConstants":30,"./EventPropagators":35,"./ReactInputSelection":81,"./SyntheticEvent":111,"./getActiveElement":137,"./isTextInputElement":154,"./keyOf":157,"./shallowEqual":166}],106:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26121,7 +26953,7 @@ var ServerReactRootIndex = { module.exports = ServerReactRootIndex; -},{}],99:[function(require,module,exports){ +},{}],107:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -26549,7 +27381,7 @@ var SimpleEventPlugin = { module.exports = SimpleEventPlugin; }).call(this,require('_process')) -},{"./EventConstants":22,"./EventPluginUtils":26,"./EventPropagators":27,"./SyntheticClipboardEvent":100,"./SyntheticDragEvent":102,"./SyntheticEvent":103,"./SyntheticFocusEvent":104,"./SyntheticKeyboardEvent":106,"./SyntheticMouseEvent":107,"./SyntheticTouchEvent":108,"./SyntheticUIEvent":109,"./SyntheticWheelEvent":110,"./getEventCharCode":130,"./invariant":143,"./keyOf":149,"./warning":162,"_process":3}],100:[function(require,module,exports){ +},{"./EventConstants":30,"./EventPluginUtils":34,"./EventPropagators":35,"./SyntheticClipboardEvent":108,"./SyntheticDragEvent":110,"./SyntheticEvent":111,"./SyntheticFocusEvent":112,"./SyntheticKeyboardEvent":114,"./SyntheticMouseEvent":115,"./SyntheticTouchEvent":116,"./SyntheticUIEvent":117,"./SyntheticWheelEvent":118,"./getEventCharCode":138,"./invariant":151,"./keyOf":157,"./warning":170,"_process":3}],108:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26594,7 +27426,7 @@ SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); module.exports = SyntheticClipboardEvent; -},{"./SyntheticEvent":103}],101:[function(require,module,exports){ +},{"./SyntheticEvent":111}],109:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26639,7 +27471,7 @@ SyntheticEvent.augmentClass( module.exports = SyntheticCompositionEvent; -},{"./SyntheticEvent":103}],102:[function(require,module,exports){ +},{"./SyntheticEvent":111}],110:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26678,7 +27510,7 @@ SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); module.exports = SyntheticDragEvent; -},{"./SyntheticMouseEvent":107}],103:[function(require,module,exports){ +},{"./SyntheticMouseEvent":115}],111:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26844,7 +27676,7 @@ PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler); module.exports = SyntheticEvent; -},{"./Object.assign":34,"./PooledClass":35,"./emptyFunction":122,"./getEventTarget":133}],104:[function(require,module,exports){ +},{"./Object.assign":42,"./PooledClass":43,"./emptyFunction":130,"./getEventTarget":141}],112:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26883,7 +27715,7 @@ SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); module.exports = SyntheticFocusEvent; -},{"./SyntheticUIEvent":109}],105:[function(require,module,exports){ +},{"./SyntheticUIEvent":117}],113:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26929,7 +27761,7 @@ SyntheticEvent.augmentClass( module.exports = SyntheticInputEvent; -},{"./SyntheticEvent":103}],106:[function(require,module,exports){ +},{"./SyntheticEvent":111}],114:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27016,7 +27848,7 @@ SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); module.exports = SyntheticKeyboardEvent; -},{"./SyntheticUIEvent":109,"./getEventCharCode":130,"./getEventKey":131,"./getEventModifierState":132}],107:[function(require,module,exports){ +},{"./SyntheticUIEvent":117,"./getEventCharCode":138,"./getEventKey":139,"./getEventModifierState":140}],115:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27097,7 +27929,7 @@ SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); module.exports = SyntheticMouseEvent; -},{"./SyntheticUIEvent":109,"./ViewportMetrics":112,"./getEventModifierState":132}],108:[function(require,module,exports){ +},{"./SyntheticUIEvent":117,"./ViewportMetrics":120,"./getEventModifierState":140}],116:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27145,7 +27977,7 @@ SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); module.exports = SyntheticTouchEvent; -},{"./SyntheticUIEvent":109,"./getEventModifierState":132}],109:[function(require,module,exports){ +},{"./SyntheticUIEvent":117,"./getEventModifierState":140}],117:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27207,7 +28039,7 @@ SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); module.exports = SyntheticUIEvent; -},{"./SyntheticEvent":103,"./getEventTarget":133}],110:[function(require,module,exports){ +},{"./SyntheticEvent":111,"./getEventTarget":141}],118:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27268,7 +28100,7 @@ SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); module.exports = SyntheticWheelEvent; -},{"./SyntheticMouseEvent":107}],111:[function(require,module,exports){ +},{"./SyntheticMouseEvent":115}],119:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -27509,7 +28341,7 @@ var Transaction = { module.exports = Transaction; }).call(this,require('_process')) -},{"./invariant":143,"_process":3}],112:[function(require,module,exports){ +},{"./invariant":151,"_process":3}],120:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27538,7 +28370,7 @@ var ViewportMetrics = { module.exports = ViewportMetrics; -},{}],113:[function(require,module,exports){ +},{}],121:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -27604,7 +28436,7 @@ function accumulateInto(current, next) { module.exports = accumulateInto; }).call(this,require('_process')) -},{"./invariant":143,"_process":3}],114:[function(require,module,exports){ +},{"./invariant":151,"_process":3}],122:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27638,7 +28470,7 @@ function adler32(data) { module.exports = adler32; -},{}],115:[function(require,module,exports){ +},{}],123:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27670,7 +28502,7 @@ function camelize(string) { module.exports = camelize; -},{}],116:[function(require,module,exports){ +},{}],124:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -27712,7 +28544,7 @@ function camelizeStyleName(string) { module.exports = camelizeStyleName; -},{"./camelize":115}],117:[function(require,module,exports){ +},{"./camelize":123}],125:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27756,7 +28588,7 @@ function containsNode(outerNode, innerNode) { module.exports = containsNode; -},{"./isTextNode":147}],118:[function(require,module,exports){ +},{"./isTextNode":155}],126:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27842,7 +28674,7 @@ function createArrayFromMixed(obj) { module.exports = createArrayFromMixed; -},{"./toArray":160}],119:[function(require,module,exports){ +},{"./toArray":168}],127:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -27904,7 +28736,7 @@ function createFullPageComponent(tag) { module.exports = createFullPageComponent; }).call(this,require('_process')) -},{"./ReactClass":41,"./ReactElement":65,"./invariant":143,"_process":3}],120:[function(require,module,exports){ +},{"./ReactClass":49,"./ReactElement":73,"./invariant":151,"_process":3}],128:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -27994,7 +28826,7 @@ function createNodesFromMarkup(markup, handleScript) { module.exports = createNodesFromMarkup; }).call(this,require('_process')) -},{"./ExecutionEnvironment":28,"./createArrayFromMixed":118,"./getMarkupWrap":135,"./invariant":143,"_process":3}],121:[function(require,module,exports){ +},{"./ExecutionEnvironment":36,"./createArrayFromMixed":126,"./getMarkupWrap":143,"./invariant":151,"_process":3}],129:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28052,7 +28884,7 @@ function dangerousStyleValue(name, value) { module.exports = dangerousStyleValue; -},{"./CSSProperty":11}],122:[function(require,module,exports){ +},{"./CSSProperty":19}],130:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28086,7 +28918,7 @@ emptyFunction.thatReturnsArgument = function(arg) { return arg; }; module.exports = emptyFunction; -},{}],123:[function(require,module,exports){ +},{}],131:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -28110,7 +28942,7 @@ if ("production" !== process.env.NODE_ENV) { module.exports = emptyObject; }).call(this,require('_process')) -},{"_process":3}],124:[function(require,module,exports){ +},{"_process":3}],132:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28150,7 +28982,7 @@ function escapeTextContentForBrowser(text) { module.exports = escapeTextContentForBrowser; -},{}],125:[function(require,module,exports){ +},{}],133:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -28223,7 +29055,7 @@ function findDOMNode(componentOrElement) { module.exports = findDOMNode; }).call(this,require('_process')) -},{"./ReactCurrentOwner":47,"./ReactInstanceMap":75,"./ReactMount":78,"./invariant":143,"./isNode":145,"./warning":162,"_process":3}],126:[function(require,module,exports){ +},{"./ReactCurrentOwner":55,"./ReactInstanceMap":83,"./ReactMount":86,"./invariant":151,"./isNode":153,"./warning":170,"_process":3}],134:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -28281,7 +29113,7 @@ function flattenChildren(children) { module.exports = flattenChildren; }).call(this,require('_process')) -},{"./traverseAllChildren":161,"./warning":162,"_process":3}],127:[function(require,module,exports){ +},{"./traverseAllChildren":169,"./warning":170,"_process":3}],135:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -28310,7 +29142,7 @@ function focusNode(node) { module.exports = focusNode; -},{}],128:[function(require,module,exports){ +},{}],136:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28341,7 +29173,7 @@ var forEachAccumulated = function(arr, cb, scope) { module.exports = forEachAccumulated; -},{}],129:[function(require,module,exports){ +},{}],137:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28370,7 +29202,7 @@ function getActiveElement() /*?DOMElement*/ { module.exports = getActiveElement; -},{}],130:[function(require,module,exports){ +},{}],138:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28422,7 +29254,7 @@ function getEventCharCode(nativeEvent) { module.exports = getEventCharCode; -},{}],131:[function(require,module,exports){ +},{}],139:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28527,7 +29359,7 @@ function getEventKey(nativeEvent) { module.exports = getEventKey; -},{"./getEventCharCode":130}],132:[function(require,module,exports){ +},{"./getEventCharCode":138}],140:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28574,7 +29406,7 @@ function getEventModifierState(nativeEvent) { module.exports = getEventModifierState; -},{}],133:[function(require,module,exports){ +},{}],141:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28605,7 +29437,7 @@ function getEventTarget(nativeEvent) { module.exports = getEventTarget; -},{}],134:[function(require,module,exports){ +},{}],142:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28649,7 +29481,7 @@ function getIteratorFn(maybeIterable) { module.exports = getIteratorFn; -},{}],135:[function(require,module,exports){ +},{}],143:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -28768,7 +29600,7 @@ function getMarkupWrap(nodeName) { module.exports = getMarkupWrap; }).call(this,require('_process')) -},{"./ExecutionEnvironment":28,"./invariant":143,"_process":3}],136:[function(require,module,exports){ +},{"./ExecutionEnvironment":36,"./invariant":151,"_process":3}],144:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28843,7 +29675,7 @@ function getNodeForCharacterOffset(root, offset) { module.exports = getNodeForCharacterOffset; -},{}],137:[function(require,module,exports){ +},{}],145:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28878,7 +29710,7 @@ function getReactRootElementInContainer(container) { module.exports = getReactRootElementInContainer; -},{}],138:[function(require,module,exports){ +},{}],146:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28915,7 +29747,7 @@ function getTextContentAccessor() { module.exports = getTextContentAccessor; -},{"./ExecutionEnvironment":28}],139:[function(require,module,exports){ +},{"./ExecutionEnvironment":36}],147:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28955,7 +29787,7 @@ function getUnboundedScrollPosition(scrollable) { module.exports = getUnboundedScrollPosition; -},{}],140:[function(require,module,exports){ +},{}],148:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28988,7 +29820,7 @@ function hyphenate(string) { module.exports = hyphenate; -},{}],141:[function(require,module,exports){ +},{}],149:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29029,7 +29861,7 @@ function hyphenateStyleName(string) { module.exports = hyphenateStyleName; -},{"./hyphenate":140}],142:[function(require,module,exports){ +},{"./hyphenate":148}],150:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -29167,7 +29999,7 @@ function instantiateReactComponent(node, parentCompositeType) { module.exports = instantiateReactComponent; }).call(this,require('_process')) -},{"./Object.assign":34,"./ReactCompositeComponent":45,"./ReactEmptyComponent":67,"./ReactNativeComponent":81,"./invariant":143,"./warning":162,"_process":3}],143:[function(require,module,exports){ +},{"./Object.assign":42,"./ReactCompositeComponent":53,"./ReactEmptyComponent":75,"./ReactNativeComponent":89,"./invariant":151,"./warning":170,"_process":3}],151:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -29224,7 +30056,7 @@ var invariant = function(condition, format, a, b, c, d, e, f) { module.exports = invariant; }).call(this,require('_process')) -},{"_process":3}],144:[function(require,module,exports){ +},{"_process":3}],152:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29289,7 +30121,7 @@ function isEventSupported(eventNameSuffix, capture) { module.exports = isEventSupported; -},{"./ExecutionEnvironment":28}],145:[function(require,module,exports){ +},{"./ExecutionEnvironment":36}],153:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29316,7 +30148,7 @@ function isNode(object) { module.exports = isNode; -},{}],146:[function(require,module,exports){ +},{}],154:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29359,7 +30191,7 @@ function isTextInputElement(elem) { module.exports = isTextInputElement; -},{}],147:[function(require,module,exports){ +},{}],155:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29384,7 +30216,7 @@ function isTextNode(object) { module.exports = isTextNode; -},{"./isNode":145}],148:[function(require,module,exports){ +},{"./isNode":153}],156:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -29439,7 +30271,7 @@ var keyMirror = function(obj) { module.exports = keyMirror; }).call(this,require('_process')) -},{"./invariant":143,"_process":3}],149:[function(require,module,exports){ +},{"./invariant":151,"_process":3}],157:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29475,7 +30307,7 @@ var keyOf = function(oneKeyObj) { module.exports = keyOf; -},{}],150:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29528,7 +30360,7 @@ function mapObject(object, callback, context) { module.exports = mapObject; -},{}],151:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29561,7 +30393,7 @@ function memoizeStringOnly(callback) { module.exports = memoizeStringOnly; -},{}],152:[function(require,module,exports){ +},{}],160:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -29601,7 +30433,7 @@ function onlyChild(children) { module.exports = onlyChild; }).call(this,require('_process')) -},{"./ReactElement":65,"./invariant":143,"_process":3}],153:[function(require,module,exports){ +},{"./ReactElement":73,"./invariant":151,"_process":3}],161:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29629,7 +30461,7 @@ if (ExecutionEnvironment.canUseDOM) { module.exports = performance || {}; -},{"./ExecutionEnvironment":28}],154:[function(require,module,exports){ +},{"./ExecutionEnvironment":36}],162:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29657,7 +30489,7 @@ var performanceNow = performance.now.bind(performance); module.exports = performanceNow; -},{"./performance":153}],155:[function(require,module,exports){ +},{"./performance":161}],163:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29685,7 +30517,7 @@ function quoteAttributeValueForBrowser(value) { module.exports = quoteAttributeValueForBrowser; -},{"./escapeTextContentForBrowser":124}],156:[function(require,module,exports){ +},{"./escapeTextContentForBrowser":132}],164:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29774,7 +30606,7 @@ if (ExecutionEnvironment.canUseDOM) { module.exports = setInnerHTML; -},{"./ExecutionEnvironment":28}],157:[function(require,module,exports){ +},{"./ExecutionEnvironment":36}],165:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29816,7 +30648,7 @@ if (ExecutionEnvironment.canUseDOM) { module.exports = setTextContent; -},{"./ExecutionEnvironment":28,"./escapeTextContentForBrowser":124,"./setInnerHTML":156}],158:[function(require,module,exports){ +},{"./ExecutionEnvironment":36,"./escapeTextContentForBrowser":132,"./setInnerHTML":164}],166:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29860,7 +30692,7 @@ function shallowEqual(objA, objB) { module.exports = shallowEqual; -},{}],159:[function(require,module,exports){ +},{}],167:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -29964,7 +30796,7 @@ function shouldUpdateReactComponent(prevElement, nextElement) { module.exports = shouldUpdateReactComponent; }).call(this,require('_process')) -},{"./warning":162,"_process":3}],160:[function(require,module,exports){ +},{"./warning":170,"_process":3}],168:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -30036,7 +30868,7 @@ function toArray(obj) { module.exports = toArray; }).call(this,require('_process')) -},{"./invariant":143,"_process":3}],161:[function(require,module,exports){ +},{"./invariant":151,"_process":3}],169:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -30289,7 +31121,7 @@ function traverseAllChildren(children, callback, traverseContext) { module.exports = traverseAllChildren; }).call(this,require('_process')) -},{"./ReactElement":65,"./ReactFragment":71,"./ReactInstanceHandles":74,"./getIteratorFn":134,"./invariant":143,"./warning":162,"_process":3}],162:[function(require,module,exports){ +},{"./ReactElement":73,"./ReactFragment":79,"./ReactInstanceHandles":82,"./getIteratorFn":142,"./invariant":151,"./warning":170,"_process":3}],170:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -30352,7 +31184,7 @@ if ("production" !== process.env.NODE_ENV) { module.exports = warning; }).call(this,require('_process')) -},{"./emptyFunction":122,"_process":3}],163:[function(require,module,exports){ +},{"./emptyFunction":130,"_process":3}],171:[function(require,module,exports){ module.exports = require('./lib/React'); -},{"./lib/React":36}]},{},[2]); +},{"./lib/React":44}]},{},[2]); diff --git a/project/static/js/feed.jsx b/project/static/js/feed.jsx index f908dce..386f391 100644 --- a/project/static/js/feed.jsx +++ b/project/static/js/feed.jsx @@ -1,6 +1,21 @@ -var React = require('react'); +var React = require('react'), + navigate = require('react-mini-router').navigate, + Select = require('react-select'); + var $ = require('jquery'); -var Select = require('react-select'); + +$.QueryString = (function(a) { + if (a == "") return {}; + var b = {}; + for (var i = 0; i < a.length; ++i) + { + var p=a[i].split('='); + if (p.length != 2) continue; + b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " ")); + } + return b; + })(window.location.search.substr(1).split('&')) + function range(start, stop, step) { if (typeof stop == 'undefined') { @@ -25,6 +40,18 @@ function range(start, stop, step) { return result; }; +if (!String.prototype.format) { + String.prototype.format = function() { + var args = arguments; + return this.replace(/{(\d+)}/g, function(match, number) { + return typeof args[number] != 'undefined' + ? args[number] + : match + ; + }); + }; +} + var Paginate = React.createClass({ handleClick: function(e) { this.props.click(e, e.target.id); @@ -153,8 +180,13 @@ var VacancyNode = React.createClass({ var VacancyList = React.createClass({ getInitialState: function () { + qs = $.QueryString; + var page = '1'; + if ('page' in qs) { + page = $.QueryString['page']; + } return { - page: 0 + page: parseInt(page)-1 }; }, getList: function() { @@ -173,6 +205,7 @@ var VacancyList = React.createClass({ }, handlePageClick: function(e, val) { this.setState({page: parseInt(val)}); + navigate('?city={0}&category={1}&page={2}'.format(this.props.parent.state.city, this.props.parent.state.category, parseInt(val)+1), true); }, render: function() { @@ -183,6 +216,9 @@ var VacancyList = React.createClass({ if (page>amount-1) { page=amount-1; } + if (page<0) { + page=0; + } offset = per_page*page; filtered_data = this.getList().slice(offset, offset+per_page) var vaclist = filtered_data.map(function(p) { @@ -211,8 +247,18 @@ var SpecSelect = React.createClass({ this.props.list.map(function(p) { options.push({ value: p.id, label: p.name }) }); + + initial_value = options.filter(function(n) { + return n.value == this.props.value; + }.bind(this)).map(function(n) { + return n.label; + })[0]; + + if (this.props.value == 0) { + initial_value = ''; + } return ( - ); } @@ -232,8 +278,19 @@ var CitySelect = React.createClass({ this.props.list.map(function(p) { options.push({ value: p.id, label: p.name }) }); + + initial_value = options.filter(function(n) { + return n.value == this.props.value; + }.bind(this)).map(function(n) { + return n.label; + })[0]; + + if (this.props.value == 0) { + initial_value = ''; + } + return ( - ); } @@ -252,20 +309,34 @@ var VacancyBox = React.createClass({ this.setState({ category: parseInt(val) }); + navigate('?city={0}&category={1}&page={2}'.format(this.state.city, val, this.refs.list.state.page), true); }, handleCitySelect: function(childComponent, val) { this.setState({ city: parseInt(val) }); + navigate('?city={0}&category={1}&page={2}'.format(val, this.state.category, this.refs.list.state.page), true); }, componentDidMount: function() { + qs = $.QueryString; + var city_id = '0'; + var category_id = '0'; + if ('city' in qs) { + city_id = $.QueryString['city']; + } + if ('category' in qs) { + category_id = $.QueryString['category']; + } $.get( 'list', function(result) { this.setState({ data: result, + city: parseInt(city_id), + category: parseInt(category_id), }); }.bind(this)); + }, render: function() { results = this.state.data.vacancies; @@ -273,9 +344,9 @@ var VacancyBox = React.createClass({ amount = Math.ceil(results.length / 2); return (
- - - + + +
); } diff --git a/project/static/js/feedfactory.js b/project/static/js/feedfactory.js index 9b417b1..7617b28 100644 --- a/project/static/js/feedfactory.js +++ b/project/static/js/feedfactory.js @@ -2,5 +2,5 @@ var React = require('react'); var $ = require('jquery'); -var feed = React.createFactory(require('./feed.jsx')); // need to specify the jsx extension +var feed = React.createFactory(require('./feed.jsx')); React.render(feed(), document.body); diff --git a/project/templates/admin/main.html b/project/templates/admin/main.html index 1a1ff92..7c2fe4d 100644 --- a/project/templates/admin/main.html +++ b/project/templates/admin/main.html @@ -9,5 +9,11 @@
{% endfor %} + +
+ +
{% endblock %} From d14ff0b8c1fc2897b90554d6ce9149c6ef4cc1c2 Mon Sep 17 00:00:00 2001 From: akhalyavka Date: Wed, 22 Jul 2015 15:44:54 +0300 Subject: [PATCH 4/4] pep8 format --- project/admin/views.py | 4 +++- project/auth/forms.py | 1 + project/auth/validators.py | 2 ++ project/auth/views.py | 4 +++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/project/admin/views.py b/project/admin/views.py index 705eb7b..35f7f20 100644 --- a/project/admin/views.py +++ b/project/admin/views.py @@ -1,4 +1,4 @@ -from flask import Blueprint, render_template, url_for, session, g, redirect +from flask import Blueprint, render_template, url_for, session, redirect from project.admin.forms import VacancyForm, CategoryForm, CityForm from project.admin.utils import EntryDetail, EntryList from project.auth.forms import RegisterForm @@ -9,6 +9,7 @@ admin_app = Blueprint('admin', __name__) + @admin_app.before_request def check_user_logged_in(): if 'user_id' in session: @@ -16,6 +17,7 @@ def check_user_logged_in(): return redirect(url_for("auth.login")) + def register_section(*, section_name, list_endpoint, list_route, detail_route, list_view, detail_view): diff --git a/project/auth/forms.py b/project/auth/forms.py index 8c2ea52..2800d51 100644 --- a/project/auth/forms.py +++ b/project/auth/forms.py @@ -15,6 +15,7 @@ class ResetForm(Form): ], ) + class LoginForm(Form): login = StringField( 'Логин', diff --git a/project/auth/validators.py b/project/auth/validators.py index 10714b6..63351b7 100644 --- a/project/auth/validators.py +++ b/project/auth/validators.py @@ -19,6 +19,7 @@ ' цифр и символов (_.-), начинаться с буквы,' ' содержать хоть одну цифру') + class PasswordCorrect(object): def __init__(self, message=None): self.message = message or 'Неверный пароль' @@ -27,6 +28,7 @@ def __call__(self, _, field): if not check_password_hash(g.user.password, field.data): raise ValidationError(self.message) + class Exists(object): def __init__(self, message=None, reverse=False): if message: diff --git a/project/auth/views.py b/project/auth/views.py index e4c47eb..f25e3cb 100644 --- a/project/auth/views.py +++ b/project/auth/views.py @@ -6,6 +6,7 @@ auth = Blueprint('auth', __name__) + @auth.before_app_request def add_login_to_g(): if 'user_id' in session: @@ -14,6 +15,7 @@ def add_login_to_g(): else: g.user = None + @auth.route('/login', methods=['GET', 'POST']) def login(): form = LoginForm() @@ -62,6 +64,7 @@ def confirm_reset(token): else: abort(404) + @auth.route('/password_change', methods=['GET', 'POST']) @login_required def change_password(): @@ -78,7 +81,6 @@ def change_password(): ) - @auth.route('/logout', methods=['GET']) @login_required def logout():