From 8e15dad91fbf1b6b9417a0a8c5bebf1674f34bd8 Mon Sep 17 00:00:00 2001 From: Lucas Bassetti Date: Thu, 20 Jul 2017 09:25:00 -0300 Subject: [PATCH] update packages --- README.md | 8 + dist/react-css-loaders.js | 10179 +++++++++++++++++------------------- package.json | 10 +- 3 files changed, 4818 insertions(+), 5379 deletions(-) diff --git a/README.md b/README.md index 5645d4f..1a36572 100755 --- a/README.md +++ b/README.md @@ -154,6 +154,14 @@ npm install react-css-loaders --save | `duration` | `PropTypes.number` | `1.4` | | `size` | `PropTypes.number` | `10` | +## Authors + +| ![Lucas Bassetti](https://avatars3.githubusercontent.com/u/1014326?v=3&s=150)| +|:---------------------:| +| [Lucas Bassetti](https://github.com/LucasBassetti/) | + +See also the list of [contributors](https://github.com/LucasBassetti/react-css-loaders/contributors) who participated in this project. + ## How to Contribute Please check the [contributing guide](https://github.com/LucasBassetti/react-css-loaders/blob/master/contributing.md) diff --git a/dist/react-css-loaders.js b/dist/react-css-loaders.js index 3a09ba5..90582ac 100644 --- a/dist/react-css-loaders.js +++ b/dist/react-css-loaders.js @@ -43,9 +43,6 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { @@ -73,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 35); +/******/ return __webpack_require__(__webpack_require__.s = 22); /******/ }) /************************************************************************/ /******/ ([ @@ -283,7 +280,7 @@ process.umask = function() { return 0; }; -var emptyFunction = __webpack_require__(8); +var emptyFunction = __webpack_require__(10); /** * Similar to invariant but only logs a warning if the condition is not met. @@ -408,7 +405,7 @@ module.exports = invariant; "use strict"; -module.exports = __webpack_require__(44); +module.exports = __webpack_require__(24); /***/ }), @@ -439,11 +436,11 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(17)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(21)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(41)(); + module.exports = __webpack_require__(39)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) @@ -461,10 +458,22 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withTheme", function() { return wrapWithTheme; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServerStyleSheet", function() { return ServerStyleSheet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StyleSheetManager", function() { return StyleSheetManager; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_stylis__ = __webpack_require__(55); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_stylis___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_stylis__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_plain_object__ = __webpack_require__(41); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_plain_object___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_plain_object__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_stylis__ = __webpack_require__(43); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_stylis___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_stylis__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_is_function__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_is_function___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_is_function__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics__); + + + + @@ -525,21 +534,108 @@ function hyphenateStyleName(string) { var hyphenateStyleName_1 = hyphenateStyleName; -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; +// +var objToCss = function objToCss(obj, prevKey) { + var css = Object.keys(obj).map(function (key) { + if (__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(obj[key])) return objToCss(obj[key], key); + return hyphenateStyleName_1(key) + ': ' + obj[key] + ';'; + }).join(' '); + return prevKey ? prevKey + ' {\n ' + css + '\n}' : css; +}; + +var flatten = function flatten(chunks, executionContext) { + return chunks.reduce(function (ruleSet, chunk) { + /* Remove falsey values */ + if (chunk === undefined || chunk === null || chunk === false || chunk === '') return ruleSet; + /* Flatten ruleSet */ + if (Array.isArray(chunk)) return [].concat(ruleSet, flatten(chunk, executionContext)); + + /* Handle other components */ + // $FlowFixMe not sure how to make this pass + if (chunk.hasOwnProperty('styledComponentId')) return [].concat(ruleSet, ['.' + chunk.styledComponentId]); + + /* Either execute or defer the function */ + if (typeof chunk === 'function') { + return executionContext ? ruleSet.concat.apply(ruleSet, flatten([chunk(executionContext)], executionContext)) : ruleSet.concat(chunk); + } + + /* Handle objects */ + // $FlowFixMe have to add %checks somehow to isPlainObject + return ruleSet.concat(__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(chunk) ? objToCss(chunk) : chunk.toString()); + }, []); +}; + +// +var stylis = new __WEBPACK_IMPORTED_MODULE_1_stylis___default.a({ + global: false, + cascade: true, + keyframe: false, + prefix: true, + compress: false, + semicolon: true +}); + +var stringifyRules = function stringifyRules(rules, selector, prefix) { + var flatCSS = rules.join('').replace(/^\s*\/\/.*$/gm, ''); // replace JS comments + + var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS; + + return stylis(prefix || !selector ? '' : selector, cssStr); }; +// +var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); +var charsLength = chars.length; + +/* Some high number, usually 9-digit base-10. Map it to base-😎 */ +var generateAlphabeticName = function generateAlphabeticName(code) { + var name = ''; + var x = void 0; + for (x = code; x > charsLength; x = Math.floor(x / chars.length)) { + name = chars[x % charsLength] + name; + } + + return chars[x % charsLength] + name; +}; +// +var interleave = (function (strings, interpolations) { + return interpolations.reduce(function (array, interp, i) { + return array.concat(interp, strings[i + 1]); + }, [strings[0]]); +}); +// +var css = (function (strings) { + for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + interpolations[_key - 1] = arguments[_key]; + } + return flatten(interleave(strings, interpolations)); +}); +// +var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s+(\S+)\s+\*\//mg; +var extractCompsFromCSS = (function (maybeCSS) { + var css = '' + (maybeCSS || ''); // Definitely a string, and a clone + var existingComponents = []; + css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) { + existingComponents.push({ componentId: componentId, matchIndex: matchIndex }); + return match; + }); + return existingComponents.map(function (_ref, i) { + var componentId = _ref.componentId, + matchIndex = _ref.matchIndex; + var nextComp = existingComponents[i + 1]; + var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex); + return { componentId: componentId, cssFromDOM: cssFromDOM }; + }); +}); var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { @@ -631,148 +727,6 @@ var possibleConstructorReturn = function (self, call) { return call && (typeof call === "object" || typeof call === "function") ? call : self; }; -/*! - * isobject - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -var index$1 = function isObject(val) { - return val != null && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && !Array.isArray(val); -}; - -var isObject$1 = index$1; - -function isObjectObject(o) { - return isObject$1(o) === true && Object.prototype.toString.call(o) === '[object Object]'; -} - -var index = function isPlainObject(o) { - var ctor, prot; - - if (isObjectObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (typeof ctor !== 'function') return false; - - // If has modified prototype - prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } - - // Most likely a plain Object - return true; -}; - -// -var objToCss = function objToCss(obj, prevKey) { - var css = Object.keys(obj).map(function (key) { - if (index(obj[key])) return objToCss(obj[key], key); - return hyphenateStyleName_1(key) + ': ' + obj[key] + ';'; - }).join(' '); - return prevKey ? prevKey + ' {\n ' + css + '\n}' : css; -}; - -var flatten = function flatten(chunks, executionContext) { - return chunks.reduce(function (ruleSet, chunk) { - /* Remove falsey values */ - if (chunk === undefined || chunk === null || chunk === false || chunk === '') return ruleSet; - /* Flatten ruleSet */ - if (Array.isArray(chunk)) return [].concat(ruleSet, flatten(chunk, executionContext)); - - /* Handle other components */ - // $FlowFixMe not sure how to make this pass - if (chunk.hasOwnProperty('styledComponentId')) return [].concat(ruleSet, ['.' + chunk.styledComponentId]); - - /* Either execute or defer the function */ - if (typeof chunk === 'function') { - return executionContext ? ruleSet.concat.apply(ruleSet, flatten([chunk(executionContext)], executionContext)) : ruleSet.concat(chunk); - } - - /* Handle objects */ - // $FlowFixMe have to add %checks somehow to isPlainObject - return ruleSet.concat(index(chunk) ? objToCss(chunk) : chunk.toString()); - }, []); -}; - -// -__WEBPACK_IMPORTED_MODULE_0_stylis___default.a.set({ - global: false, - cascade: true, - keyframe: false, - prefix: true, - compress: false, - semicolon: true -}); - -var stringifyRules = function stringifyRules(rules, selector, prefix) { - var flatCSS = rules.join('').replace(/^\s*\/\/.*$/gm, ''); // replace JS comments - - var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS; - - return __WEBPACK_IMPORTED_MODULE_0_stylis___default()(prefix || !selector ? '' : selector, cssStr); -}; - -// -var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); -var charsLength = chars.length; - -/* Some high number, usually 9-digit base-10. Map it to base-😎 */ -var generateAlphabeticName = function generateAlphabeticName(code) { - var name = ''; - var x = void 0; - - for (x = code; x > charsLength; x = Math.floor(x / chars.length)) { - name = chars[x % charsLength] + name; - } - - return chars[x % charsLength] + name; -}; - -// - - -var interleave = (function (strings, interpolations) { - return interpolations.reduce(function (array, interp, i) { - return array.concat(interp, strings[i + 1]); - }, [strings[0]]); -}); - -// -var css = (function (strings) { - for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - interpolations[_key - 1] = arguments[_key]; - } - - return flatten(interleave(strings, interpolations)); -}); - -// -var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s+(\S+)\s+\*\//mg; - -var extractCompsFromCSS = (function (maybeCSS) { - var css = '' + (maybeCSS || ''); // Definitely a string, and a clone - var existingComponents = []; - css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) { - existingComponents.push({ componentId: componentId, matchIndex: matchIndex }); - return match; - }); - return existingComponents.map(function (_ref, i) { - var componentId = _ref.componentId, - matchIndex = _ref.matchIndex; - - var nextComp = existingComponents[i + 1]; - var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex); - return { componentId: componentId, cssFromDOM: cssFromDOM }; - }); -}); - // /* * Browser Style Sheet with Rehydration @@ -1076,859 +1030,169 @@ var StyleSheet = function () { createClass(StyleSheet, null, [{ key: 'instance', - get: function get() { + get: function get$$1() { return instance || (instance = StyleSheet.create()); } }]); return StyleSheet; }(); -function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; -} +var _StyleSheetManager$ch; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ +// +var StyleSheetManager = function (_Component) { + inherits(StyleSheetManager, _Component); -function makeEmptyFunction(arg) { - return function () { - return arg; - }; -} + function StyleSheetManager() { + classCallCheck(this, StyleSheetManager); + return possibleConstructorReturn(this, _Component.apply(this, arguments)); + } -/** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. - */ -var emptyFunction$1 = function emptyFunction$1() {}; + StyleSheetManager.prototype.getChildContext = function getChildContext() { + var _ref; -emptyFunction$1.thatReturns = makeEmptyFunction; -emptyFunction$1.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction$1.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction$1.thatReturnsNull = makeEmptyFunction(null); -emptyFunction$1.thatReturnsThis = function () { - return this; -}; -emptyFunction$1.thatReturnsArgument = function (arg) { - return arg; -}; + return _ref = {}, _ref[CONTEXT_KEY] = this.props.sheet, _ref; + }; -var emptyFunction_1 = emptyFunction$1; + StyleSheetManager.prototype.render = function render() { + /* eslint-disable react/prop-types */ + // Flow v0.43.1 will report an error accessing the `children` property, + // but v0.47.0 will not. It is necessary to use a type cast instead of + // a "fixme" comment to satisfy both Flow versions. + return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children); + }; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + return StyleSheetManager; +}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); -/** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ +StyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet).isRequired, _StyleSheetManager$ch); -var validateFormat = function validateFormat(format) {}; +StyleSheetManager.propTypes = { + sheet: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet).isRequired +}; -{ - validateFormat = function validateFormat(format) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } +// +var ServerTag = function () { + function ServerTag(isLocal) { + classCallCheck(this, ServerTag); + + this.isLocal = isLocal; + this.components = {}; + this.size = 0; + this.names = []; + } + + ServerTag.prototype.isFull = function isFull() { + return false; }; -} -function invariant$1(condition, format, a, b, c, d, e, f) { - validateFormat(format); + ServerTag.prototype.addComponent = function addComponent(componentId) { + if (this.components[componentId]) throw new Error('Trying to add Component \'' + componentId + '\' twice!'); + this.components[componentId] = { componentId: componentId, css: '' }; + this.size += 1; + }; - if (!condition) { - var error; - if (format === undefined) { - error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error(format.replace(/%s/g, function () { - return args[argIndex++]; - })); - error.name = 'Invariant Violation'; - } + ServerTag.prototype.inject = function inject(componentId, css, name) { + var comp = this.components[componentId]; - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -} + if (!comp) throw new Error('Must add a new component before you can inject css into it'); + if (comp.css === '') comp.css = '/* sc-component-id: ' + componentId + ' */\n'; -var invariant_1 = invariant$1; + comp.css += css.replace(/\n*$/, '\n'); -var emptyFunction$2 = emptyFunction_1; + if (name) this.names.push(name); + }; -/** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ + ServerTag.prototype.toHTML = function toHTML() { + var _this = this; -var warning$1 = emptyFunction$2; + var namesAttr = SC_ATTR + '="' + this.names.join(' ') + '"'; + var localAttr = LOCAL_ATTR + '="' + (this.isLocal ? 'true' : 'false') + '"'; + var css = Object.keys(this.components).map(function (key) { + return _this.components[key].css; + }).join(''); -{ - (function () { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } + return ''; + }; - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; + ServerTag.prototype.toReactElement = function toReactElement(key) { + var _attributes, + _this2 = this; - warning$1 = function warning$1(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } + var attributes = (_attributes = {}, _attributes[SC_ATTR] = this.names.join(' '), _attributes[LOCAL_ATTR] = this.isLocal.toString(), _attributes); + var css = Object.keys(this.components).map(function (k) { + return _this2.components[k].css; + }).join(''); - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } + return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('style', _extends({ + key: key, type: 'text/css' }, attributes, { + dangerouslySetInnerHTML: { __html: css } + })); + }; - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } + ServerTag.prototype.clone = function clone() { + var _this3 = this; - printWarning.apply(undefined, [format].concat(args)); - } - }; - })(); -} + var copy = new ServerTag(this.isLocal); + copy.names = [].concat(this.names); + copy.size = this.size; + copy.components = Object.keys(this.components).reduce(function (acc, key) { + acc[key] = _extends({}, _this3.components[key]); // eslint-disable-line no-param-reassign + return acc; + }, {}); -var warning_1 = warning$1; + return copy; + }; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ + return ServerTag; +}(); -var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; +var ServerStyleSheet = function () { + function ServerStyleSheet() { + classCallCheck(this, ServerStyleSheet); -var ReactPropTypesSecret_1 = ReactPropTypesSecret$1; + this.instance = StyleSheet.clone(StyleSheet.instance); + } -{ - var invariant$2 = invariant_1; - var warning$2 = warning_1; - var ReactPropTypesSecret$2 = ReactPropTypesSecret_1; - var loggedTypeFailures = {}; -} + ServerStyleSheet.prototype.collectStyles = function collectStyles(children) { + if (this.closed) throw new Error("Can't collect styles once you've called getStyleTags!"); + return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement( + StyleSheetManager, + { sheet: this.instance }, + children + ); + }; -/** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?Function} getStack Returns the component stack. - * @private - */ -function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) { - { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - invariant$2(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2); - } catch (ex) { - error = ex; - } - warning$2(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error === 'undefined' ? 'undefined' : _typeof(error)); - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; + ServerStyleSheet.prototype.getStyleTags = function getStyleTags() { + if (!this.closed) { + clones.splice(clones.indexOf(this.instance), 1); + this.closed = true; + } - var stack = getStack ? getStack() : ''; + return this.instance.toHTML(); + }; - warning$2(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); - } - } + ServerStyleSheet.prototype.getStyleElement = function getStyleElement() { + if (!this.closed) { + clones.splice(clones.indexOf(this.instance), 1); + this.closed = true; } - } -} -var checkPropTypes_1 = checkPropTypes$1; + return this.instance.toReactElements(); + }; -var emptyFunction = emptyFunction_1; -var invariant = invariant_1; -var warning = warning_1; + ServerStyleSheet.create = function create() { + return new StyleSheet(function (isLocal) { + return new ServerTag(isLocal); + }); + }; -var ReactPropTypesSecret = ReactPropTypesSecret_1; -var checkPropTypes = checkPropTypes_1; + return ServerStyleSheet; +}(); -var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, throwOnDirectAccess) { - /* global Symbol */ - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. +// - /** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } - * - * @param {?object} maybeIterable - * @return {?function} - */ - function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } - } - - /** - * Collection of methods that allow declaration and validation of props that are - * supplied to React components. Example usage: - * - * var Props = require('ReactPropTypes'); - * var MyArticle = React.createClass({ - * propTypes: { - * // An optional string prop named "description". - * description: Props.string, - * - * // A required enum prop named "category". - * category: Props.oneOf(['News','Photos']).isRequired, - * - * // A prop named "dialog" that requires an instance of Dialog. - * dialog: Props.instanceOf(Dialog).isRequired - * }, - * render: function() { ... } - * }); - * - * A more formal specification of how these methods are used: - * - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) - * decl := ReactPropTypes.{type}(.isRequired)? - * - * Each and every declaration produces a function with the same signature. This - * allows the creation of custom validation functions. For example: - * - * var MyLink = React.createClass({ - * propTypes: { - * // An optional string or URI prop named "href". - * href: function(props, propName, componentName) { - * var propValue = props[propName]; - * if (propValue != null && typeof propValue !== 'string' && - * !(propValue instanceof URI)) { - * return new Error( - * 'Expected a string or an URI for ' + propName + ' in ' + - * componentName - * ); - * } - * } - * }, - * render: function() {...} - * }); - * - * @internal - */ - - var ANONYMOUS = '<>'; - - // Important! - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. - var ReactPropTypes = { - array: createPrimitiveTypeChecker('array'), - bool: createPrimitiveTypeChecker('boolean'), - func: createPrimitiveTypeChecker('function'), - number: createPrimitiveTypeChecker('number'), - object: createPrimitiveTypeChecker('object'), - string: createPrimitiveTypeChecker('string'), - symbol: createPrimitiveTypeChecker('symbol'), - - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker - }; - - /** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ - /*eslint-disable no-self-compare*/ - function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } - } - /*eslint-enable no-self-compare*/ - - /** - * We use an Error-like object for backward compatibility as people may call - * PropTypes directly and inspect their output. However, we don't use real - * Errors anymore. We don't inspect their stack anyway, and creating them - * is prohibitively expensive if they are created too often, such as what - * happens in oneOfType() for any type before the one that matched. - */ - function PropTypeError(message) { - this.message = message; - this.stack = ''; - } - // Make `instanceof Error` still work for returned errors. - PropTypeError.prototype = Error.prototype; - - function createChainableTypeChecker(validate) { - { - var manualPropTypeCallCache = {}; - var manualPropTypeWarningCount = 0; - } - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - componentName = componentName || ANONYMOUS; - propFullName = propFullName || propName; - - if (secret !== ReactPropTypesSecret) { - if (throwOnDirectAccess) { - // New behavior only for users of `prop-types` package - invariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); - } else if ("development" !== 'production' && typeof console !== 'undefined') { - // Old behavior for people using React.PropTypes - var cacheKey = componentName + ':' + propName; - if (!manualPropTypeCallCache[cacheKey] && - // Avoid spamming the console because they are often not actionable except for lib authors - manualPropTypeWarningCount < 3) { - warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName); - manualPropTypeCallCache[cacheKey] = true; - manualPropTypeWarningCount++; - } - } - } - if (props[propName] == null) { - if (isRequired) { - if (props[propName] === null) { - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); - } - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); - } - return null; - } else { - return validate(props, propName, componentName, location, propFullName); - } - } - - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); - - return chainedCheckType; - } - - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== expectedType) { - // `propValue` being instance of, say, date/regexp, pass the 'object' - // check, but we can offer a more precise error message here rather than - // 'of type `object`'. - var preciseType = getPreciseType(propValue); - - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunction.thatReturnsNull); - } - - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); - } - var propValue = props[propName]; - if (!Array.isArray(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); - } - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); - if (error instanceof Error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!isValidElement(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var expectedClassName = expectedClass.name || ANONYMOUS; - var actualClassName = getClassName(props[propName]); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) { - warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.'); - return emptyFunction.thatReturnsNull; - } - - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - for (var i = 0; i < expectedValues.length; i++) { - if (is(propValue, expectedValues[i])) { - return null; - } - } - - var valuesString = JSON.stringify(expectedValues); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); - } - return createChainableTypeChecker(validate); - } - - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); - } - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); - } - for (var key in propValue) { - if (propValue.hasOwnProperty(key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error instanceof Error) { - return error; - } - } - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) { - warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.'); - return emptyFunction.thatReturnsNull; - } - - function validate(props, propName, componentName, location, propFullName) { - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { - return null; - } - } - - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); - } - return createChainableTypeChecker(validate); - } - - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - if (!isNode(props[propName])) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - if (!checker) { - continue; - } - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); - } - - function isNode(propValue) { - switch (typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue)) { - case 'number': - case 'string': - case 'undefined': - return true; - case 'boolean': - return !propValue; - case 'object': - if (Array.isArray(propValue)) { - return propValue.every(isNode); - } - if (propValue === null || isValidElement(propValue)) { - return true; - } - - var iteratorFn = getIteratorFn(propValue); - if (iteratorFn) { - var iterator = iteratorFn.call(propValue); - var step; - if (iteratorFn !== propValue.entries) { - while (!(step = iterator.next()).done) { - if (!isNode(step.value)) { - return false; - } - } - } else { - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - if (!isNode(entry[1])) { - return false; - } - } - } - } - } else { - return false; - } - - return true; - default: - return false; - } - } - - function isSymbol(propType, propValue) { - // Native Symbol. - if (propType === 'symbol') { - return true; - } - - // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' - if (propValue['@@toStringTag'] === 'Symbol') { - return true; - } - - // Fallback for non-spec compliant Symbols which are polyfilled. - if (typeof Symbol === 'function' && propValue instanceof Symbol) { - return true; - } - - return false; - } - - // Equivalent of `typeof` but with special handling for array and regexp. - function getPropType(propValue) { - var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue); - if (Array.isArray(propValue)) { - return 'array'; - } - if (propValue instanceof RegExp) { - // Old webkits (at least until Android 4.0) return 'function' rather than - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ - // passes PropTypes.object. - return 'object'; - } - if (isSymbol(propType, propValue)) { - return 'symbol'; - } - return propType; - } - - // This handles more types than `getPropType`. Only used for error messages. - // See `createPrimitiveTypeChecker`. - function getPreciseType(propValue) { - var propType = getPropType(propValue); - if (propType === 'object') { - if (propValue instanceof Date) { - return 'date'; - } else if (propValue instanceof RegExp) { - return 'regexp'; - } - } - return propType; - } - - // Returns class name of the object, if any. - function getClassName(propValue) { - if (!propValue.constructor || !propValue.constructor.name) { - return ANONYMOUS; - } - return propValue.constructor.name; - } - - ReactPropTypes.checkPropTypes = checkPropTypes; - ReactPropTypes.PropTypes = ReactPropTypes; - - return ReactPropTypes; -}; - -var index$3 = createCommonjsModule(function (module) { - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - { - var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element') || 0xeac7; - - var isValidElement = function isValidElement(object) { - return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - }; - - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = factoryWithTypeCheckers(isValidElement, throwOnDirectAccess); - } -}); - -var _StyleSheetManager$ch; - -// -var StyleSheetManager = function (_Component) { - inherits(StyleSheetManager, _Component); - - function StyleSheetManager() { - classCallCheck(this, StyleSheetManager); - return possibleConstructorReturn(this, _Component.apply(this, arguments)); - } - - StyleSheetManager.prototype.getChildContext = function getChildContext() { - var _ref; - - return _ref = {}, _ref[CONTEXT_KEY] = this.props.sheet, _ref; - }; - - StyleSheetManager.prototype.render = function render() { - /* eslint-disable react/prop-types */ - // Flow v0.43.1 will report an error accessing the `children` property, - // but v0.47.0 will not. It is necessary to use a type cast instead of - // a "fixme" comment to satisfy both Flow versions. - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.Children.only(this.props.children); - }; - - return StyleSheetManager; -}(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); - -StyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = index$3.instanceOf(StyleSheet).isRequired, _StyleSheetManager$ch); - -StyleSheetManager.propTypes = { - sheet: index$3.instanceOf(StyleSheet).isRequired -}; - -// -var ServerTag = function () { - function ServerTag(isLocal) { - classCallCheck(this, ServerTag); - - this.isLocal = isLocal; - this.components = {}; - this.size = 0; - this.names = []; - } - - ServerTag.prototype.isFull = function isFull() { - return false; - }; - - ServerTag.prototype.addComponent = function addComponent(componentId) { - if (this.components[componentId]) throw new Error('Trying to add Component \'' + componentId + '\' twice!'); - this.components[componentId] = { componentId: componentId, css: '' }; - this.size += 1; - }; - - ServerTag.prototype.inject = function inject(componentId, css, name) { - var comp = this.components[componentId]; - - if (!comp) throw new Error('Must add a new component before you can inject css into it'); - if (comp.css === '') comp.css = '/* sc-component-id: ' + componentId + ' */\n'; - - comp.css += css.replace(/\n*$/, '\n'); - - if (name) this.names.push(name); - }; - - ServerTag.prototype.toHTML = function toHTML() { - var _this = this; - - var namesAttr = SC_ATTR + '="' + this.names.join(' ') + '"'; - var localAttr = LOCAL_ATTR + '="' + (this.isLocal ? 'true' : 'false') + '"'; - var css = Object.keys(this.components).map(function (key) { - return _this.components[key].css; - }).join(''); - - return ''; - }; - - ServerTag.prototype.toReactElement = function toReactElement(key) { - var _attributes, - _this2 = this; - - var attributes = (_attributes = {}, _attributes[SC_ATTR] = this.names.join(' '), _attributes[LOCAL_ATTR] = this.isLocal.toString(), _attributes); - var css = Object.keys(this.components).map(function (k) { - return _this2.components[k].css; - }).join(''); - - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('style', _extends({ - key: key, type: 'text/css' }, attributes, { - dangerouslySetInnerHTML: { __html: css } - })); - }; - - ServerTag.prototype.clone = function clone() { - var _this3 = this; - - var copy = new ServerTag(this.isLocal); - copy.names = [].concat(this.names); - copy.size = this.size; - copy.components = Object.keys(this.components).reduce(function (acc, key) { - acc[key] = _extends({}, _this3.components[key]); // eslint-disable-line no-param-reassign - return acc; - }, {}); - - return copy; - }; - - return ServerTag; -}(); - -var ServerStyleSheet = function () { - function ServerStyleSheet() { - classCallCheck(this, ServerStyleSheet); - - this.instance = StyleSheet.clone(StyleSheet.instance); - } - - ServerStyleSheet.prototype.collectStyles = function collectStyles(children) { - if (this.closed) throw new Error("Can't collect styles once you've called getStyleTags!"); - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( - StyleSheetManager, - { sheet: this.instance }, - children - ); - }; - - ServerStyleSheet.prototype.getStyleTags = function getStyleTags() { - if (!this.closed) { - clones.splice(clones.indexOf(this.instance), 1); - this.closed = true; - } - - return this.instance.toHTML(); - }; - - ServerStyleSheet.prototype.getStyleElement = function getStyleElement() { - if (!this.closed) { - clones.splice(clones.indexOf(this.instance), 1); - this.closed = true; - } - - return this.instance.toReactElements(); - }; - - ServerStyleSheet.create = function create() { - return new StyleSheet(function (isLocal) { - return new ServerTag(isLocal); - }); - }; - - return ServerStyleSheet; -}(); - -// - -var LIMIT = 200; +var LIMIT = 200; var createWarnTooManyClasses = (function (displayName) { var generatedClasses = {}; @@ -2562,17 +1826,6 @@ function getComponentName(target) { return target.displayName || target.name || 'Component'; } -var index$4 = isFunction; - -var toString = Object.prototype.toString; - -function isFunction(fn) { - var string = toString.call(fn); - return string === '[object Function]' || typeof fn === 'function' && string !== '[object RegExp]' || typeof window !== 'undefined' && ( - // IE8 and below - fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt); -} - // /** * Creates a broadcast that can be listened to, i.e. simple event emitter @@ -2666,14 +1919,14 @@ var ThemeProvider = function (_Component) { ThemeProvider.prototype.getTheme = function getTheme(passedTheme) { var theme = passedTheme || this.props.theme; - if (index$4(theme)) { + if (__WEBPACK_IMPORTED_MODULE_4_is_function___default()(theme)) { var mergedTheme = theme(this.outerTheme); - if (!index(mergedTheme)) { + if (!__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(mergedTheme)) { throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!'); } return mergedTheme; } - if (!index(theme)) { + if (!__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(theme)) { throw new Error('[ThemeProvider] Please make your theme prop a plain object'); } return _extends({}, this.outerTheme, theme); @@ -2683,14 +1936,14 @@ var ThemeProvider = function (_Component) { if (!this.props.children) { return null; } - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.Children.only(this.props.children); + return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children); }; return ThemeProvider; -}(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); +}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); -ThemeProvider.childContextTypes = (_ThemeProvider$childC = {}, _ThemeProvider$childC[CHANNEL] = index$3.func.isRequired, _ThemeProvider$childC); -ThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL] = index$3.func, _ThemeProvider$contex); +ThemeProvider.childContextTypes = (_ThemeProvider$childC = {}, _ThemeProvider$childC[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func.isRequired, _ThemeProvider$childC); +ThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _ThemeProvider$contex); var _AbstractStyledCompon; @@ -2704,9 +1957,9 @@ var AbstractStyledComponent = function (_Component) { } return AbstractStyledComponent; -}(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); +}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); -AbstractStyledComponent.contextTypes = (_AbstractStyledCompon = {}, _AbstractStyledCompon[CHANNEL] = index$3.func, _AbstractStyledCompon[CONTEXT_KEY] = index$3.instanceOf(StyleSheet), _AbstractStyledCompon); +AbstractStyledComponent.contextTypes = (_AbstractStyledCompon = {}, _AbstractStyledCompon[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _AbstractStyledCompon[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), _AbstractStyledCompon); // @@ -2861,7 +2114,7 @@ var _StyledComponent = (function (ComponentStyle, constructWithOptions) { return acc; }, baseProps); - return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react__["createElement"])(target, propsForElement); + return Object(__WEBPACK_IMPORTED_MODULE_2_react__["createElement"])(target, propsForElement); }; return BaseStyledComponent; @@ -2908,7 +2161,7 @@ var _StyledComponent = (function (ComponentStyle, constructWithOptions) { createClass(StyledComponent, null, [{ key: 'extend', - get: function get() { + get: function get$$1() { var _ = options.displayName, __ = options.componentId, rulesFromOptions = options.rules, @@ -2928,7 +2181,7 @@ var _StyledComponent = (function (ComponentStyle, constructWithOptions) { return StyledComponent; }(ParentComponent); - StyledComponent.contextTypes = (_StyledComponent$cont = {}, _StyledComponent$cont[CHANNEL] = index$3.func, _StyledComponent$cont[CONTEXT_KEY] = index$3.instanceOf(StyleSheet), _StyledComponent$cont); + StyledComponent.contextTypes = (_StyledComponent$cont = {}, _StyledComponent$cont[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _StyledComponent$cont[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), _StyledComponent$cont); StyledComponent.displayName = displayName; StyledComponent.styledComponentId = styledComponentId; StyledComponent.attrs = attrs; @@ -3162,54 +2415,6 @@ var _constructWithOptions = (function (css) { return constructWithOptions; }); -/** - * Copyright 2015, Yahoo! Inc. - * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -var REACT_STATICS = { - childContextTypes: true, - contextTypes: true, - defaultProps: true, - displayName: true, - getDefaultProps: true, - mixins: true, - propTypes: true, - type: true -}; - -var KNOWN_STATICS = { - name: true, - length: true, - prototype: true, - caller: true, - arguments: true, - arity: true -}; - -var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; - -var index$5 = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { - if (typeof sourceComponent !== 'string') { - // don't hoist over string (html) components - var keys = Object.getOwnPropertyNames(sourceComponent); - - /* istanbul ignore else */ - if (isGetOwnPropertySymbolsAvailable) { - keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); - } - - for (var i = 0; i < keys.length; ++i) { - if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) { - try { - targetComponent[keys[i]] = sourceComponent[keys[i]]; - } catch (error) {} - } - } - } - - return targetComponent; -}; - // /* globals ReactClass */ @@ -3261,7 +2466,7 @@ var wrapWithTheme = function wrapWithTheme(Component$$1) { var theme = this.state.theme; - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(Component$$1, _extends({ + return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(Component$$1, _extends({ theme: theme }, this.props, { innerRef: isStyledComponent$$1 ? innerRef : undefined, @@ -3270,14 +2475,14 @@ var wrapWithTheme = function wrapWithTheme(Component$$1) { }; return WithTheme; - }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); WithTheme.displayName = 'WithTheme(' + componentName + ')'; WithTheme.styledComponentId = 'withTheme'; - WithTheme.contextTypes = (_WithTheme$contextTyp = {}, _WithTheme$contextTyp[CHANNEL] = index$3.func, _WithTheme$contextTyp); + WithTheme.contextTypes = (_WithTheme$contextTyp = {}, _WithTheme$contextTyp[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _WithTheme$contextTyp); - return index$5(WithTheme, Component$$1); + return __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics___default()(WithTheme, Component$$1); }; // @@ -3304,6 +2509,50 @@ var styled = _styled(StyledComponent, constructWithOptions); /* 6 */ /***/ (function(module, exports, __webpack_require__) { +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + +/** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + +function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; +} + +module.exports = reactProdInvariant; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2014-present, Facebook, Inc. @@ -3317,15 +2566,15 @@ var styled = _styled(StyledComponent, constructWithOptions); -var _assign = __webpack_require__(9); +var _assign = __webpack_require__(8); -var ReactCurrentOwner = __webpack_require__(10); +var ReactCurrentOwner = __webpack_require__(9); var warning = __webpack_require__(1); var canDefineProperty = __webpack_require__(11); var hasOwnProperty = Object.prototype.hasOwnProperty; -var REACT_ELEMENT_TYPE = __webpack_require__(18); +var REACT_ELEMENT_TYPE = __webpack_require__(17); var RESERVED_PROPS = { key: true, @@ -3609,134 +2858,46 @@ ReactElement.cloneElement = function (element, config, children) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { if (config[propName] === undefined && defaultProps !== undefined) { // Resolve default props - props[propName] = defaultProps[propName]; - } else { - props[propName] = config[propName]; - } - } - } - } - - // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - props.children = childArray; - } - - return ReactElement(element.type, key, ref, self, source, owner, props); -}; - -/** - * Verifies the object is a ReactElement. - * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement - * @param {?object} object - * @return {boolean} True if `object` is a valid component. - * @final - */ -ReactElement.isValidElement = function (object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; -}; - -module.exports = ReactElement; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - -/** - * WARNING: DO NOT manually require this module. - * This is a replacement for `invariant(...)` used by the error code system - * and will _only_ be required by the corresponding babel pass. - * It always throws. - */ - -function reactProdInvariant(code) { - var argCount = arguments.length - 1; - - var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; - - for (var argIdx = 0; argIdx < argCount; argIdx++) { - message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); - } - - message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; - - var error = new Error(message); - error.name = 'Invariant Violation'; - error.framesToPop = 1; // we don't care about reactProdInvariant's own frame - - throw error; -} - -module.exports = reactProdInvariant; - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } -function makeEmptyFunction(arg) { - return function () { - return arg; - }; -} + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); +}; /** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + * Verifies the object is a ReactElement. + * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a valid component. + * @final */ -var emptyFunction = function emptyFunction() {}; - -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; +ReactElement.isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; }; -module.exports = emptyFunction; +module.exports = ReactElement; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 9 */ +/* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3833,7 +2994,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { /***/ }), -/* 10 */ +/* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3869,12 +3030,14 @@ var ReactCurrentOwner = { module.exports = ReactCurrentOwner; /***/ }), -/* 11 */ +/* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. + + +/** + * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -3884,71 +3047,66 @@ module.exports = ReactCurrentOwner; * */ +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; -var canDefineProperty = false; -if (process.env.NODE_ENV !== 'production') { - try { - // $FlowFixMe https://github.com/facebook/flow/issues/285 - Object.defineProperty({}, 'x', { get: function () {} }); - canDefineProperty = true; - } catch (x) { - // IE will fail on defineProperty - } -} +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; -module.exports = canDefineProperty; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = emptyFunction; /***/ }), -/* 12 */ +/* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -var emptyObject = {}; - +var canDefineProperty = false; if (process.env.NODE_ENV !== 'production') { - Object.freeze(emptyObject); + try { + // $FlowFixMe https://github.com/facebook/flow/issues/285 + Object.defineProperty({}, 'x', { get: function () {} }); + canDefineProperty = true; + } catch (x) { + // IE will fail on defineProperty + } } -module.exports = emptyObject; +module.exports = canDefineProperty; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - - -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; - -module.exports = ReactPropTypesSecret; - - -/***/ }), -/* 14 */ +/* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3964,12 +3122,12 @@ module.exports = ReactPropTypesSecret; -var _prodInvariant = __webpack_require__(7); +var _prodInvariant = __webpack_require__(6); -var ReactNoopUpdateQueue = __webpack_require__(16); +var ReactNoopUpdateQueue = __webpack_require__(13); var canDefineProperty = __webpack_require__(11); -var emptyObject = __webpack_require__(12); +var emptyObject = __webpack_require__(14); var invariant = __webpack_require__(2); var warning = __webpack_require__(1); @@ -4068,7 +3226,135 @@ if (process.env.NODE_ENV !== 'production') { } } -module.exports = ReactComponent; +module.exports = ReactComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var warning = __webpack_require__(1); + +function warnNoop(publicInstance, callerName) { + if (process.env.NODE_ENV !== 'production') { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + } +} + +/** + * This is the abstract API for an update queue. + */ +var ReactNoopUpdateQueue = { + + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + enqueueCallback: function (publicInstance, callback) {}, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + warnNoop(publicInstance, 'setState'); + } +}; + +module.exports = ReactNoopUpdateQueue; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyObject = {}; + +if (process.env.NODE_ENV !== 'production') { + Object.freeze(emptyObject); +} + +module.exports = emptyObject; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), @@ -4089,9 +3375,9 @@ module.exports = ReactComponent; -var _prodInvariant = __webpack_require__(7); +var _prodInvariant = __webpack_require__(6); -var ReactCurrentOwner = __webpack_require__(10); +var ReactCurrentOwner = __webpack_require__(9); var invariant = __webpack_require__(2); var warning = __webpack_require__(1); @@ -4416,986 +3702,960 @@ module.exports = ReactComponentTreeHook; /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2015-present, Facebook, Inc. +/** + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. - * */ -var warning = __webpack_require__(1); +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -function warnNoop(publicInstance, callerName) { - if (process.env.NODE_ENV !== 'production') { - var constructor = publicInstance.constructor; - process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; - } -} +module.exports = ReactPropTypesSecret; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; /** - * This is the abstract API for an update queue. + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * */ -var ReactNoopUpdateQueue = { - - /** - * Checks whether or not this composite component is mounted. - * @param {ReactClass} publicInstance The instance we want to test. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - isMounted: function (publicInstance) { - return false; - }, - /** - * Enqueue a callback that will be executed after all the pending updates - * have processed. - * - * @param {ReactClass} publicInstance The instance to use as `this` context. - * @param {?function} callback Called after state is updated. - * @internal - */ - enqueueCallback: function (publicInstance, callback) {}, - /** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @internal - */ - enqueueForceUpdate: function (publicInstance) { - warnNoop(publicInstance, 'forceUpdate'); - }, - /** - * Replaces all of the state. Always use this or `setState` to mutate state. - * You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} completeState Next state. - * @internal - */ - enqueueReplaceState: function (publicInstance, completeState) { - warnNoop(publicInstance, 'replaceState'); - }, +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. - /** - * Sets a subset of the state. This only exists because _pendingState is - * internal. This provides a merging strategy that is not available to deep - * properties which is confusing. TODO: Expose pendingState or don't use it - * during the merge. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} partialState Next partial state to be merged with state. - * @internal - */ - enqueueSetState: function (publicInstance, partialState) { - warnNoop(publicInstance, 'setState'); - } -}; +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; -module.exports = ReactNoopUpdateQueue; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = REACT_ELEMENT_TYPE; /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** +/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. + * + * */ -var emptyFunction = __webpack_require__(8); -var invariant = __webpack_require__(2); -var warning = __webpack_require__(1); - -var ReactPropTypesSecret = __webpack_require__(13); -var checkPropTypes = __webpack_require__(39); +/* global Symbol */ -module.exports = function(isValidElement, throwOnDirectAccess) { - /* global Symbol */ - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. - /** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } - * - * @param {?object} maybeIterable - * @return {?function} - */ - function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; } +} - /** - * Collection of methods that allow declaration and validation of props that are - * supplied to React components. Example usage: - * - * var Props = require('ReactPropTypes'); - * var MyArticle = React.createClass({ - * propTypes: { - * // An optional string prop named "description". - * description: Props.string, - * - * // A required enum prop named "category". - * category: Props.oneOf(['News','Photos']).isRequired, - * - * // A prop named "dialog" that requires an instance of Dialog. - * dialog: Props.instanceOf(Dialog).isRequired - * }, - * render: function() { ... } - * }); - * - * A more formal specification of how these methods are used: - * - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) - * decl := ReactPropTypes.{type}(.isRequired)? - * - * Each and every declaration produces a function with the same signature. This - * allows the creation of custom validation functions. For example: - * - * var MyLink = React.createClass({ - * propTypes: { - * // An optional string or URI prop named "href". - * href: function(props, propName, componentName) { - * var propValue = props[propName]; - * if (propValue != null && typeof propValue !== 'string' && - * !(propValue instanceof URI)) { - * return new Error( - * 'Expected a string or an URI for ' + propName + ' in ' + - * componentName - * ); - * } - * } - * }, - * render: function() {...} - * }); - * - * @internal - */ +module.exports = getIteratorFn; - var ANONYMOUS = '<>'; +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { - // Important! - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. - var ReactPropTypes = { - array: createPrimitiveTypeChecker('array'), - bool: createPrimitiveTypeChecker('boolean'), - func: createPrimitiveTypeChecker('function'), - number: createPrimitiveTypeChecker('number'), - object: createPrimitiveTypeChecker('object'), - string: createPrimitiveTypeChecker('string'), - symbol: createPrimitiveTypeChecker('symbol'), +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker + + +var ReactPropTypeLocationNames = {}; + +if (process.env.NODE_ENV !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' }; +} - /** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ - /*eslint-disable no-self-compare*/ - function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } - } - /*eslint-enable no-self-compare*/ +module.exports = ReactPropTypeLocationNames; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - /** - * We use an Error-like object for backward compatibility as people may call - * PropTypes directly and inspect their output. However, we don't use real - * Errors anymore. We don't inspect their stack anyway, and creating them - * is prohibitively expensive if they are created too often, such as what - * happens in oneOfType() for any type before the one that matched. - */ - function PropTypeError(message) { - this.message = message; - this.stack = ''; - } - // Make `instanceof Error` still work for returned errors. - PropTypeError.prototype = Error.prototype; +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { - function createChainableTypeChecker(validate) { - if (process.env.NODE_ENV !== 'production') { - var manualPropTypeCallCache = {}; - var manualPropTypeWarningCount = 0; - } - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - componentName = componentName || ANONYMOUS; - propFullName = propFullName || propName; +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - if (secret !== ReactPropTypesSecret) { - if (throwOnDirectAccess) { - // New behavior only for users of `prop-types` package - invariant( - false, - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + - 'Use `PropTypes.checkPropTypes()` to call them. ' + - 'Read more at http://fb.me/use-check-prop-types' - ); - } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { - // Old behavior for people using React.PropTypes - var cacheKey = componentName + ':' + propName; - if ( - !manualPropTypeCallCache[cacheKey] && - // Avoid spamming the console because they are often not actionable except for lib authors - manualPropTypeWarningCount < 3 - ) { - warning( - false, - 'You are manually calling a React.PropTypes validation ' + - 'function for the `%s` prop on `%s`. This is deprecated ' + - 'and will throw in the standalone `prop-types` package. ' + - 'You may be seeing this warning due to a third-party PropTypes ' + - 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', - propFullName, - componentName - ); - manualPropTypeCallCache[cacheKey] = true; - manualPropTypeWarningCount++; - } - } - } - if (props[propName] == null) { - if (isRequired) { - if (props[propName] === null) { - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); - } - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); - } - return null; - } else { - return validate(props, propName, componentName, location, propFullName); - } - } +/** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); - return chainedCheckType; - } - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== expectedType) { - // `propValue` being instance of, say, date/regexp, pass the 'object' - // check, but we can offer a more precise error message here rather than - // 'of type `object`'. - var preciseType = getPreciseType(propValue); +var ReactCurrentOwner = __webpack_require__(9); +var ReactComponentTreeHook = __webpack_require__(15); +var ReactElement = __webpack_require__(7); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); - } - return null; - } - return createChainableTypeChecker(validate); - } +var checkReactTypeSpec = __webpack_require__(32); - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunction.thatReturnsNull); - } +var canDefineProperty = __webpack_require__(11); +var getIteratorFn = __webpack_require__(18); +var warning = __webpack_require__(1); - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); - } - var propValue = props[propName]; - if (!Array.isArray(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); - } - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); - if (error instanceof Error) { - return error; - } - } - return null; +function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; } - return createChainableTypeChecker(validate); } + return ''; +} - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!isValidElement(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); - } - return null; - } - return createChainableTypeChecker(validate); +function getSourceInfoErrorAddendum(elementProps) { + if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) { + var source = elementProps.__source; + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); + var lineNumber = source.lineNumber; + return ' Check your code at ' + fileName + ':' + lineNumber + '.'; } + return ''; +} - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var expectedClassName = expectedClass.name || ANONYMOUS; - var actualClassName = getClassName(props[propName]); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); - } - return null; +/** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ +var ownerHasKeyUseWarning = {}; + +function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + + if (!info) { + var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = ' Check the top-level render call using <' + parentName + '>.'; } - return createChainableTypeChecker(validate); } + return info; +} - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; - return emptyFunction.thatReturnsNull; - } +/** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ +function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - for (var i = 0; i < expectedValues.length; i++) { - if (is(propValue, expectedValues[i])) { - return null; - } - } + var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {}); - var valuesString = JSON.stringify(expectedValues); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); - } - return createChainableTypeChecker(validate); + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (memoizer[currentComponentErrorInfo]) { + return; } - - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); - } - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); - } - for (var key in propValue) { - if (propValue.hasOwnProperty(key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error instanceof Error) { - return error; - } - } - } - return null; - } - return createChainableTypeChecker(validate); + memoizer[currentComponentErrorInfo] = true; + + // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + var childOwner = ''; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; } - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; - return emptyFunction.thatReturnsNull; - } + process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0; +} - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (typeof checker !== 'function') { - warning( - false, - 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + - 'received %s at index %s.', - getPostfixForTypeWarning(checker), - i - ); - return emptyFunction.thatReturnsNull; +/** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ +function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (ReactElement.isValidElement(child)) { + validateExplicitKey(child, parentType); } } - - function validate(props, propName, componentName, location, propFullName) { - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { - return null; + } else if (ReactElement.isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + // Entry iterators provide implicit keys. + if (iteratorFn) { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (ReactElement.isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } } } - - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } - return createChainableTypeChecker(validate); } +} - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - if (!isNode(props[propName])) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); - } - return null; - } - return createChainableTypeChecker(validate); +/** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ +function validatePropTypes(element) { + var componentClass = element.type; + if (typeof componentClass !== 'function') { + return; } - - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - if (!checker) { - continue; - } - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); + var name = componentClass.displayName || componentClass.name; + if (componentClass.propTypes) { + checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null); } + if (typeof componentClass.getDefaultProps === 'function') { + process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0; + } +} - function isNode(propValue) { - switch (typeof propValue) { - case 'number': - case 'string': - case 'undefined': - return true; - case 'boolean': - return !propValue; - case 'object': - if (Array.isArray(propValue)) { - return propValue.every(isNode); - } - if (propValue === null || isValidElement(propValue)) { - return true; +var ReactElementValidator = { + + createElement: function (type, props, children) { + var validType = typeof type === 'string' || typeof type === 'function'; + // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + if (!validType) { + if (typeof type !== 'function' && typeof type !== 'string') { + var info = ''; + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { + info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; } - var iteratorFn = getIteratorFn(propValue); - if (iteratorFn) { - var iterator = iteratorFn.call(propValue); - var step; - if (iteratorFn !== propValue.entries) { - while (!(step = iterator.next()).done) { - if (!isNode(step.value)) { - return false; - } - } - } else { - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - if (!isNode(entry[1])) { - return false; - } - } - } - } + var sourceInfo = getSourceInfoErrorAddendum(props); + if (sourceInfo) { + info += sourceInfo; } else { - return false; + info += getDeclarationErrorAddendum(); } - return true; - default: - return false; - } - } + info += ReactComponentTreeHook.getCurrentStackAddendum(); - function isSymbol(propType, propValue) { - // Native Symbol. - if (propType === 'symbol') { - return true; + process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0; + } } - // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' - if (propValue['@@toStringTag'] === 'Symbol') { - return true; + var element = ReactElement.createElement.apply(this, arguments); + + // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + if (element == null) { + return element; } - // Fallback for non-spec compliant Symbols which are polyfilled. - if (typeof Symbol === 'function' && propValue instanceof Symbol) { - return true; + // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } } - return false; - } + validatePropTypes(element); - // Equivalent of `typeof` but with special handling for array and regexp. - function getPropType(propValue) { - var propType = typeof propValue; - if (Array.isArray(propValue)) { - return 'array'; - } - if (propValue instanceof RegExp) { - // Old webkits (at least until Android 4.0) return 'function' rather than - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ - // passes PropTypes.object. - return 'object'; - } - if (isSymbol(propType, propValue)) { - return 'symbol'; - } - return propType; - } + return element; + }, - // This handles more types than `getPropType`. Only used for error messages. - // See `createPrimitiveTypeChecker`. - function getPreciseType(propValue) { - if (typeof propValue === 'undefined' || propValue === null) { - return '' + propValue; - } - var propType = getPropType(propValue); - if (propType === 'object') { - if (propValue instanceof Date) { - return 'date'; - } else if (propValue instanceof RegExp) { - return 'regexp'; - } - } - return propType; - } + createFactory: function (type) { + var validatedFactory = ReactElementValidator.createElement.bind(null, type); + // Legacy hook TODO: Warn if this is accessed + validatedFactory.type = type; - // Returns a string that is postfixed to a warning about an invalid type. - // For example, "undefined" or "of type array" - function getPostfixForTypeWarning(value) { - var type = getPreciseType(value); - switch (type) { - case 'array': - case 'object': - return 'an ' + type; - case 'boolean': - case 'date': - case 'regexp': - return 'a ' + type; - default: - return type; + if (process.env.NODE_ENV !== 'production') { + if (canDefineProperty) { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + process.env.NODE_ENV !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0; + Object.defineProperty(this, 'type', { + value: type + }); + return type; + } + }); + } } - } - // Returns class name of the object, if any. - function getClassName(propValue) { - if (!propValue.constructor || !propValue.constructor.name) { - return ANONYMOUS; + return validatedFactory; + }, + + cloneElement: function (element, props, children) { + var newElement = ReactElement.cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); } - return propValue.constructor.name; + validatePropTypes(newElement); + return newElement; } - ReactPropTypes.checkPropTypes = checkPropTypes; - ReactPropTypes.PropTypes = ReactPropTypes; - - return ReactPropTypes; }; +module.exports = ReactElementValidator; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 18 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * Copyright 2014-present, Facebook, Inc. +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. - * - * */ -// The Symbol used to tag the ReactElement type. If there is no native Symbol -// nor polyfill, then a plain number is used for performance. +var emptyFunction = __webpack_require__(10); +var invariant = __webpack_require__(2); +var warning = __webpack_require__(1); -var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; +var ReactPropTypesSecret = __webpack_require__(16); +var checkPropTypes = __webpack_require__(36); -module.exports = REACT_ELEMENT_TYPE; +module.exports = function(isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ -/** - * ReactElementValidator provides a wrapper around a element factory - * which validates the props passed to the element. This is intended to be - * used only in DEV and could be replaced by a static type checker for languages - * that support it. - */ + var ANONYMOUS = '<>'; + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker + }; -var ReactCurrentOwner = __webpack_require__(10); -var ReactComponentTreeHook = __webpack_require__(15); -var ReactElement = __webpack_require__(6); + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ -var checkReactTypeSpec = __webpack_require__(52); + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; -var canDefineProperty = __webpack_require__(11); -var getIteratorFn = __webpack_require__(21); -var warning = __webpack_require__(1); + function createChainableTypeChecker(validate) { + if (process.env.NODE_ENV !== 'production') { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', + propFullName, + componentName + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); -function getDeclarationErrorAddendum() { - if (ReactCurrentOwner.current) { - var name = ReactCurrentOwner.current.getName(); - if (name) { - return ' Check the render method of `' + name + '`.'; + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; } + return createChainableTypeChecker(validate); } - return ''; -} -function getSourceInfoErrorAddendum(elementProps) { - if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) { - var source = elementProps.__source; - var fileName = source.fileName.replace(/^.*[\\\/]/, ''); - var lineNumber = source.lineNumber; - return ' Check your code at ' + fileName + ':' + lineNumber + '.'; + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); } - return ''; -} -/** - * Warn if there's no key explicitly set on dynamic arrays of children or - * object keys are not valid. This allows us to keep track of children between - * updates. - */ -var ownerHasKeyUseWarning = {}; - -function getCurrentComponentErrorInfo(parentType) { - var info = getDeclarationErrorAddendum(); + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } - if (!info) { - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; - if (parentName) { - info = ' Check the top-level render call using <' + parentName + '>.'; + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + return null; } + return createChainableTypeChecker(validate); } - return info; -} -/** - * Warn if the element doesn't have an explicit key assigned to it. - * This element is in an array. The array could grow and shrink or be - * reordered. All children that haven't already been validated are required to - * have a "key" property assigned to it. Error statuses are cached so a warning - * will only be shown once. - * - * @internal - * @param {ReactElement} element Element that requires a key. - * @param {*} parentType element's parent's type. - */ -function validateExplicitKey(element, parentType) { - if (!element._store || element._store.validated || element.key != null) { - return; + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); } - element._store.validated = true; - var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {}); + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - if (memoizer[currentComponentErrorInfo]) { - return; + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + return createChainableTypeChecker(validate); } - memoizer[currentComponentErrorInfo] = true; - // Usually the current owner is the offender, but if it accepts children as a - // property, it may be the creator of the child that's responsible for - // assigning it a key. - var childOwner = ''; - if (element && element._owner && element._owner !== ReactCurrentOwner.current) { - // Give the component that originally created this child. - childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); } - process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0; -} + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } -/** - * Ensure that every element either is passed in a static location, in an - * array with an explicit keys property defined, or in an object literal - * with valid key property. - * - * @internal - * @param {ReactNode} node Statically passed child of any type. - * @param {*} parentType node's parent's type. - */ -function validateChildKeys(node, parentType) { - if (typeof node !== 'object') { - return; - } - if (Array.isArray(node)) { - for (var i = 0; i < node.length; i++) { - var child = node[i]; - if (ReactElement.isValidElement(child)) { - validateExplicitKey(child, parentType); + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + warning( + false, + 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + + 'received %s at index %s.', + getPostfixForTypeWarning(checker), + i + ); + return emptyFunction.thatReturnsNull; } } - } else if (ReactElement.isValidElement(node)) { - // This element was passed in a valid location. - if (node._store) { - node._store.validated = true; - } - } else if (node) { - var iteratorFn = getIteratorFn(node); - // Entry iterators provide implicit keys. - if (iteratorFn) { - if (iteratorFn !== node.entries) { - var iterator = iteratorFn.call(node); - var step; - while (!(step = iterator.next()).done) { - if (ReactElement.isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; } } + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } + return createChainableTypeChecker(validate); } -} -/** - * Given an element, validate that its props follow the propTypes definition, - * provided by the type. - * - * @param {ReactElement} element - */ -function validatePropTypes(element) { - var componentClass = element.type; - if (typeof componentClass !== 'function') { - return; - } - var name = componentClass.displayName || componentClass.name; - if (componentClass.propTypes) { - checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null); - } - if (typeof componentClass.getDefaultProps === 'function') { - process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0; + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); } -} - -var ReactElementValidator = { - createElement: function (type, props, children) { - var validType = typeof type === 'string' || typeof type === 'function'; - // We warn in this case but don't throw. We expect the element creation to - // succeed and there will likely be errors in render. - if (!validType) { - if (typeof type !== 'function' && typeof type !== 'string') { - var info = ''; - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; } + } + return null; + } + return createChainableTypeChecker(validate); + } - var sourceInfo = getSourceInfoErrorAddendum(props); - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; } - info += ReactComponentTreeHook.getCurrentStackAddendum(); + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } - process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0; - } + return true; + default: + return false; } + } - var element = ReactElement.createElement.apply(this, arguments); - - // The result can be nullish if a mock or a custom function is used. - // TODO: Drop this when these are no longer allowed as the type argument. - if (element == null) { - return element; + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; } - // Skip key warning if the type isn't valid since our key validation logic - // doesn't expect a non-string/function type and can throw confusing errors. - // We don't want exception behavior to differ between dev and prod. - // (Rendering will throw with a helpful message and as soon as the type is - // fixed, the key warnings will appear.) - if (validType) { - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], type); - } + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; } - validatePropTypes(element); + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } - return element; - }, + return false; + } - createFactory: function (type) { - var validatedFactory = ReactElementValidator.createElement.bind(null, type); - // Legacy hook TODO: Warn if this is accessed - validatedFactory.type = type; + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } - if (process.env.NODE_ENV !== 'production') { - if (canDefineProperty) { - Object.defineProperty(validatedFactory, 'type', { - enumerable: false, - get: function () { - process.env.NODE_ENV !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0; - Object.defineProperty(this, 'type', { - value: type - }); - return type; - } - }); + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; } } + return propType; + } - return validatedFactory; - }, + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } - cloneElement: function (element, props, children) { - var newElement = ReactElement.cloneElement.apply(this, arguments); - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], newElement.type); + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; } - validatePropTypes(newElement); - return newElement; + return propValue.constructor.name; } + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; }; -module.exports = ReactElementValidator; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 20 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SpinLoader = exports.RotateSpinLoader = exports.ResizeSpinLoader = exports.CylinderSpinLoader = exports.CometSpinLoader = exports.BubbleSpinLoader = exports.BubbleLoader = exports.BarLoader = undefined; -var ReactPropTypeLocationNames = {}; +var _BarLoader = __webpack_require__(23); -if (process.env.NODE_ENV !== 'production') { - ReactPropTypeLocationNames = { - prop: 'prop', - context: 'context', - childContext: 'child context' - }; -} +var _BarLoader2 = _interopRequireDefault(_BarLoader); -module.exports = ReactPropTypeLocationNames; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +var _BubbleLoader = __webpack_require__(46); -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { +var _BubbleLoader2 = _interopRequireDefault(_BubbleLoader); -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ +var _BubbleSpinLoader = __webpack_require__(48); +var _BubbleSpinLoader2 = _interopRequireDefault(_BubbleSpinLoader); +var _CometSpinLoader = __webpack_require__(50); -/* global Symbol */ +var _CometSpinLoader2 = _interopRequireDefault(_CometSpinLoader); -var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; -var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. +var _CylinderSpinLoader = __webpack_require__(52); -/** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } - * - * @param {?object} maybeIterable - * @return {?function} - */ -function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } -} +var _CylinderSpinLoader2 = _interopRequireDefault(_CylinderSpinLoader); -module.exports = getIteratorFn; +var _ResizeSpinLoader = __webpack_require__(54); + +var _ResizeSpinLoader2 = _interopRequireDefault(_ResizeSpinLoader); + +var _RotateSpinLoader = __webpack_require__(56); + +var _RotateSpinLoader2 = _interopRequireDefault(_RotateSpinLoader); + +var _SpinLoader = __webpack_require__(58); + +var _SpinLoader2 = _interopRequireDefault(_SpinLoader); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.BarLoader = _BarLoader2.default; +exports.BubbleLoader = _BubbleLoader2.default; +exports.BubbleSpinLoader = _BubbleSpinLoader2.default; +exports.CometSpinLoader = _CometSpinLoader2.default; +exports.CylinderSpinLoader = _CylinderSpinLoader2.default; +exports.ResizeSpinLoader = _ResizeSpinLoader2.default; +exports.RotateSpinLoader = _RotateSpinLoader2.default; +exports.SpinLoader = _SpinLoader2.default; /***/ }), -/* 22 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5413,7 +4673,7 @@ var _propTypes = __webpack_require__(4); var _propTypes2 = _interopRequireDefault(_propTypes); -var _Bar = __webpack_require__(30); +var _Bar = __webpack_require__(40); var _Bar2 = _interopRequireDefault(_Bar); @@ -5438,697 +4698,1629 @@ BarLoader.defaultProps = { exports.default = BarLoader; /***/ }), -/* 23 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(3); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(4); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _BubbleSpin = __webpack_require__(31); - -var _BubbleSpin2 = _interopRequireDefault(_BubbleSpin); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var BubbleSpinLoader = function BubbleSpinLoader(props) { - return _react2.default.createElement(_BubbleSpin2.default, props); -}; +var _assign = __webpack_require__(8); -BubbleSpinLoader.propTypes = { - color: _propTypes2.default.string, - duration: _propTypes2.default.number, - size: _propTypes2.default.number -}; +var ReactChildren = __webpack_require__(25); +var ReactComponent = __webpack_require__(12); +var ReactPureComponent = __webpack_require__(29); +var ReactClass = __webpack_require__(30); +var ReactDOMFactories = __webpack_require__(31); +var ReactElement = __webpack_require__(7); +var ReactPropTypes = __webpack_require__(34); +var ReactVersion = __webpack_require__(37); -BubbleSpinLoader.defaultProps = { - color: '#000', - duration: 1.3, - size: 20 -}; +var onlyChild = __webpack_require__(38); +var warning = __webpack_require__(1); -exports.default = BubbleSpinLoader; +var createElement = ReactElement.createElement; +var createFactory = ReactElement.createFactory; +var cloneElement = ReactElement.cloneElement; -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { +if (process.env.NODE_ENV !== 'production') { + var canDefineProperty = __webpack_require__(11); + var ReactElementValidator = __webpack_require__(20); + var didWarnPropTypesDeprecated = false; + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; +} -"use strict"; +var __spread = _assign; +if (process.env.NODE_ENV !== 'production') { + var warned = false; + __spread = function () { + process.env.NODE_ENV !== 'production' ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0; + warned = true; + return _assign.apply(null, arguments); + }; +} -Object.defineProperty(exports, "__esModule", { - value: true -}); +var React = { -var _react = __webpack_require__(3); + // Modern -var _react2 = _interopRequireDefault(_react); + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + toArray: ReactChildren.toArray, + only: onlyChild + }, -var _propTypes = __webpack_require__(4); + Component: ReactComponent, + PureComponent: ReactPureComponent, -var _propTypes2 = _interopRequireDefault(_propTypes); + createElement: createElement, + cloneElement: cloneElement, + isValidElement: ReactElement.isValidElement, -var _Bubble = __webpack_require__(32); + // Classic -var _Bubble2 = _interopRequireDefault(_Bubble); + PropTypes: ReactPropTypes, + createClass: ReactClass.createClass, + createFactory: createFactory, + createMixin: function (mixin) { + // Currently a noop. Will be used to validate and trace mixins. + return mixin; + }, -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // This looks DOM specific but these are actually isomorphic helpers + // since they are just generating DOM strings. + DOM: ReactDOMFactories, -var BubbleLoader = function BubbleLoader(props) { - return _react2.default.createElement(_Bubble2.default, props); -}; + version: ReactVersion, -BubbleLoader.propTypes = { - color: _propTypes2.default.string, - duration: _propTypes2.default.number, - size: _propTypes2.default.number + // Deprecated hook for JSX spread, don't use this for anything. + __spread: __spread }; -BubbleLoader.defaultProps = { - color: '#000', - duration: 1.8, - size: 10 -}; +// TODO: Fix tests so that this deprecation warning doesn't cause failures. +if (process.env.NODE_ENV !== 'production') { + if (canDefineProperty) { + Object.defineProperty(React, 'PropTypes', { + get: function () { + process.env.NODE_ENV !== 'production' ? warning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated. Use ' + 'the prop-types package from npm instead.') : void 0; + didWarnPropTypesDeprecated = true; + return ReactPropTypes; + } + }); + } +} -exports.default = BubbleLoader; +module.exports = React; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(3); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(4); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _CometSpin = __webpack_require__(33); -var _CometSpin2 = _interopRequireDefault(_CometSpin); +var PooledClass = __webpack_require__(26); +var ReactElement = __webpack_require__(7); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var emptyFunction = __webpack_require__(10); +var traverseAllChildren = __webpack_require__(27); -var CometSpinLoader = function CometSpinLoader(props) { - return _react2.default.createElement(_CometSpin2.default, props); -}; +var twoArgumentPooler = PooledClass.twoArgumentPooler; +var fourArgumentPooler = PooledClass.fourArgumentPooler; -CometSpinLoader.propTypes = { - color: _propTypes2.default.string, - duration: _propTypes2.default.number, - size: _propTypes2.default.number -}; +var userProvidedKeyEscapeRegex = /\/+/g; +function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); +} -CometSpinLoader.defaultProps = { - color: '#000', - duration: 1.7, - size: 90 +/** + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. + * + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. + */ +function ForEachBookKeeping(forEachFunction, forEachContext) { + this.func = forEachFunction; + this.context = forEachContext; + this.count = 0; +} +ForEachBookKeeping.prototype.destructor = function () { + this.func = null; + this.context = null; + this.count = 0; }; +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); -exports.default = CometSpinLoader; - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + func.call(context, child, bookKeeping.count++); +} -Object.defineProperty(exports, "__esModule", { - value: true -}); +/** + * Iterates through children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ +function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); +} -var _react = __webpack_require__(3); +/** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; +} +MapBookKeeping.prototype.destructor = function () { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); -var _react2 = _interopRequireDefault(_react); +function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; -var _propTypes = __webpack_require__(4); -var _propTypes2 = _interopRequireDefault(_propTypes); + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + } else if (mappedChild != null) { + if (ReactElement.isValidElement(mappedChild)) { + mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); + } + result.push(mappedChild); + } +} -var _CylinderSpin = __webpack_require__(34); +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); +} -var _CylinderSpin2 = _interopRequireDefault(_CylinderSpin); +/** + * Maps children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ +function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function forEachSingleChildDummy(traverseContext, child, name) { + return null; +} -var CylinderSpinLoader = function CylinderSpinLoader(props) { - return _react2.default.createElement(_CylinderSpin2.default, props); -}; +/** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ +function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); +} -CylinderSpinLoader.propTypes = { - color: _propTypes2.default.string, - duration: _propTypes2.default.number, - size: _propTypes2.default.number -}; +/** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + */ +function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + return result; +} -CylinderSpinLoader.defaultProps = { - color: '#000', - duration: 1.1, - size: 25 +var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray }; -exports.default = CylinderSpinLoader; +module.exports = ReactChildren; /***/ }), -/* 27 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(3); -var _react2 = _interopRequireDefault(_react); +var _prodInvariant = __webpack_require__(6); -var _propTypes = __webpack_require__(4); +var invariant = __webpack_require__(2); -var _propTypes2 = _interopRequireDefault(_propTypes); +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; -var _ResizeSpin = __webpack_require__(36); +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; -var _ResizeSpin2 = _interopRequireDefault(_ResizeSpin); +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; -var ResizeSpinLoader = function ResizeSpinLoader(props) { - return _react2.default.createElement(_ResizeSpin2.default, props); +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } }; -ResizeSpinLoader.propTypes = { - background: _propTypes2.default.string, - color: _propTypes2.default.string, - duration: _propTypes2.default.number, - size: _propTypes2.default.number +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; }; -ResizeSpinLoader.defaultProps = { - background: '#fff', - color: '#000', - duration: 2, - size: 11 +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler }; -exports.default = ResizeSpinLoader; +module.exports = PooledClass; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 28 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(3); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(4); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _RotateSpin = __webpack_require__(37); - -var _RotateSpin2 = _interopRequireDefault(_RotateSpin); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var RotateSpinLoader = function RotateSpinLoader(props) { - return _react2.default.createElement(_RotateSpin2.default, props); -}; - -RotateSpinLoader.propTypes = { - color: _propTypes2.default.string, - duration: _propTypes2.default.number, - size: _propTypes2.default.number -}; -RotateSpinLoader.defaultProps = { - color: '#000', - duration: 1.1, - size: 10 -}; +var _prodInvariant = __webpack_require__(6); -exports.default = RotateSpinLoader; +var ReactCurrentOwner = __webpack_require__(9); +var REACT_ELEMENT_TYPE = __webpack_require__(17); -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { +var getIteratorFn = __webpack_require__(18); +var invariant = __webpack_require__(2); +var KeyEscapeUtils = __webpack_require__(28); +var warning = __webpack_require__(1); -"use strict"; +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; +/** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ -var _react = __webpack_require__(3); +var didWarnAboutMaps = false; -var _react2 = _interopRequireDefault(_react); +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} -var _propTypes = __webpack_require__(4); +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; -var _propTypes2 = _interopRequireDefault(_propTypes); + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } -var _Spin = __webpack_require__(38); + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } -var _Spin2 = _interopRequireDefault(_Spin); + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (process.env.NODE_ENV !== 'production') { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (process.env.NODE_ENV !== 'production') { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + } + } -var SpinLoader = function SpinLoader(props) { - return _react2.default.createElement(_Spin2.default, props); -}; + return subtreeCount; +} -SpinLoader.propTypes = { - background: _propTypes2.default.string, - color: _propTypes2.default.string, - duration: _propTypes2.default.number, - size: _propTypes2.default.number -}; +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } -SpinLoader.defaultProps = { - background: '#fff', - color: '#000', - duration: 1.4, - size: 10 -}; + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} -exports.default = SpinLoader; +module.exports = traverseAllChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 30 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _templateObject = _taggedTemplateLiteral(['\n 0%,\n 80%,\n 100% {\n box-shadow: 0 0;\n height: 4em;\n }\n 40% {\n box-shadow: 0 -2em;\n height: 5em;\n }\n'], ['\n 0%,\n 80%,\n 100% {\n box-shadow: 0 0;\n height: 4em;\n }\n 40% {\n box-shadow: 0 -2em;\n height: 5em;\n }\n']), - _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n color: ', ';\n font-size: ', ';\n height: 4em;\n margin: 88px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n\n &:before {\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n content: \'\';\n height: 4em;\n left: -1.5em;\n position: absolute;\n top: 0;\n width: 1em;\n }\n\n &:after {\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n content: \'\';\n height: 4em;\n left: 1.5em;\n position: absolute;\n top: 0;\n width: 1em;\n }\n'], ['\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n color: ', ';\n font-size: ', ';\n height: 4em;\n margin: 88px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n\n &:before {\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n content: \'\';\n height: 4em;\n left: -1.5em;\n position: absolute;\n top: 0;\n width: 1em;\n }\n\n &:after {\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n content: \'\';\n height: 4em;\n left: 1.5em;\n position: absolute;\n top: 0;\n width: 1em;\n }\n']); -var _styledComponents = __webpack_require__(5); +/** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ -var _styledComponents2 = _interopRequireDefault(_styledComponents); +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + return '$' + escapedString; +} -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } +/** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ +function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':' + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); -var loading = (0, _styledComponents.keyframes)(_templateObject); + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); +} -var Bar = _styledComponents2.default.div(_templateObject2, function (props) { - return loading + ' ' + props.duration + 's infinite ease-in-out'; -}, function (props) { - return props.duration * -0.16 + 's'; -}, function (props) { - return props.color; -}, function (props) { - return props.color; -}, function (props) { - return props.size + 'px'; -}, function (props) { - return loading + ' ' + props.duration + 's infinite ease-in-out;'; -}, function (props) { - return props.duration * -0.32 + 's'; -}, function (props) { - return props.color; -}, function (props) { - return loading + ' ' + props.duration + 's infinite ease-in-out'; -}, function (props) { - return props.duration * 0.08 + 's'; -}, function (props) { - return props.color; -}); +var KeyEscapeUtils = { + escape: escape, + unescape: unescape +}; -exports.default = Bar; +module.exports = KeyEscapeUtils; /***/ }), -/* 31 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _templateObject = _taggedTemplateLiteral(['\n 0%,\n 100% {\n box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 0;\n }\n 12.5% {\n box-shadow: 0 -3em 0 0, 2em -2em 0 0.2em, 3em 0 0 0, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;\n }\n 25% {\n box-shadow: 0 -3em 0 -0.5em, 2em -2em 0 0, 3em 0 0 0.2em, 2em 2em 0 0, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;\n }\n 37.5% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 0, 2em 2em 0 0.2em, 0 3em 0 0em, -2em 2em 0 -1em, -3em 0em 0 -1em, -2em -2em 0 -1em;\n }\n 50% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 0em, 0 3em 0 0.2em, -2em 2em 0 0, -3em 0em 0 -1em, -2em -2em 0 -1em;\n }\n 62.5% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 0, -2em 2em 0 0.2em, -3em 0 0 0, -2em -2em 0 -1em;\n }\n 75% {\n box-shadow: 0em -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0.2em, -2em -2em 0 0;\n }\n 87.5% {\n box-shadow: 0em -3em 0 0, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em;\n }\n'], ['\n 0%,\n 100% {\n box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 0;\n }\n 12.5% {\n box-shadow: 0 -3em 0 0, 2em -2em 0 0.2em, 3em 0 0 0, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;\n }\n 25% {\n box-shadow: 0 -3em 0 -0.5em, 2em -2em 0 0, 3em 0 0 0.2em, 2em 2em 0 0, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;\n }\n 37.5% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 0, 2em 2em 0 0.2em, 0 3em 0 0em, -2em 2em 0 -1em, -3em 0em 0 -1em, -2em -2em 0 -1em;\n }\n 50% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 0em, 0 3em 0 0.2em, -2em 2em 0 0, -3em 0em 0 -1em, -2em -2em 0 -1em;\n }\n 62.5% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 0, -2em 2em 0 0.2em, -3em 0 0 0, -2em -2em 0 -1em;\n }\n 75% {\n box-shadow: 0em -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0.2em, -2em -2em 0 0;\n }\n 87.5% {\n box-shadow: 0em -3em 0 0, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em;\n }\n']), - _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n border-radius: 50%;\n color: ', ';\n font-size: ', ';\n height: 1em;\n margin: 100px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n'], ['\n animation: ', ';\n border-radius: 50%;\n color: ', ';\n font-size: ', ';\n height: 1em;\n margin: 100px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n']); - -var _styledComponents = __webpack_require__(5); -var _styledComponents2 = _interopRequireDefault(_styledComponents); +var _assign = __webpack_require__(8); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var ReactComponent = __webpack_require__(12); +var ReactNoopUpdateQueue = __webpack_require__(13); -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } +var emptyObject = __webpack_require__(14); -var loading = (0, _styledComponents.keyframes)(_templateObject); +/** + * Base class helpers for the updating state of a component. + */ +function ReactPureComponent(props, context, updater) { + // Duplicated from ReactComponent. + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; +} -var BubbleSpin = _styledComponents2.default.div(_templateObject2, function (props) { - return loading + ' ' + props.duration + 's infinite linear;'; -}, function (props) { - return props.color; -}, function (props) { - return props.size + 'px'; -}); +function ComponentDummy() {} +ComponentDummy.prototype = ReactComponent.prototype; +ReactPureComponent.prototype = new ComponentDummy(); +ReactPureComponent.prototype.constructor = ReactPureComponent; +// Avoid an extra prototype jump for these methods. +_assign(ReactPureComponent.prototype, ReactComponent.prototype); +ReactPureComponent.prototype.isPureReactComponent = true; -exports.default = BubbleSpin; +module.exports = ReactPureComponent; /***/ }), -/* 32 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _templateObject = _taggedTemplateLiteral(['\n 0%,\n 80%,\n 100% {\n box-shadow: 0 2.5em 0 -1.3em;\n }\n 40% {\n box-shadow: 0 2.5em 0 0;\n }\n'], ['\n 0%,\n 80%,\n 100% {\n box-shadow: 0 2.5em 0 -1.3em;\n }\n 40% {\n box-shadow: 0 2.5em 0 0;\n }\n']), - _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n animation-delay: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n color: ', '\n font-size: ', ';\n height: 2.5em;\n margin: 80px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 2.5em;\n\n &:before {\n animation: ', ';\n animation-delay: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n content: \'\';\n height: 2.5em;\n left: -3.5em;\n position: absolute;\n top: 0;\n width: 2.5em;\n }\n\n &:after {\n animation: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n content: \'\';\n height: 2.5em;\n left: 3.5em;\n position: absolute;\n top: 0;\n width: 2.5em;\n }\n'], ['\n animation: ', ';\n animation-delay: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n color: ', '\n font-size: ', ';\n height: 2.5em;\n margin: 80px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 2.5em;\n\n &:before {\n animation: ', ';\n animation-delay: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n content: \'\';\n height: 2.5em;\n left: -3.5em;\n position: absolute;\n top: 0;\n width: 2.5em;\n }\n\n &:after {\n animation: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n content: \'\';\n height: 2.5em;\n left: 3.5em;\n position: absolute;\n top: 0;\n width: 2.5em;\n }\n']); +var _prodInvariant = __webpack_require__(6), + _assign = __webpack_require__(8); -var _styledComponents = __webpack_require__(5); +var ReactComponent = __webpack_require__(12); +var ReactElement = __webpack_require__(7); +var ReactPropTypeLocationNames = __webpack_require__(19); +var ReactNoopUpdateQueue = __webpack_require__(13); -var _styledComponents2 = _interopRequireDefault(_styledComponents); +var emptyObject = __webpack_require__(14); +var invariant = __webpack_require__(2); +var warning = __webpack_require__(1); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var MIXINS_KEY = 'mixins'; -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } +// Helper function to allow the creation of anonymous functions which do not +// have .name set to the name of the variable being assigned to. +function identity(fn) { + return fn; +} -var loading = (0, _styledComponents.keyframes)(_templateObject); +/** + * Policies that describe methods in `ReactClassInterface`. + */ -var Bubble = _styledComponents2.default.div(_templateObject2, function (props) { - return loading + ' ' + props.duration + 's infinite ease-in-out;'; -}, function (props) { - return props.duration * -0.16 + 's'; -}, function (props) { - return props.color; -}, function (props) { - return props.size + 'px'; -}, function (props) { - return loading + ' ' + props.duration + 's infinite ease-in-out;'; -}, function (props) { - return props.duration * -0.32 + 's'; -}, function (props) { - return loading + ' ' + props.duration + 's infinite ease-in-out;'; -}); -exports.default = Bubble; +var injectedMixins = []; -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return
Hello World
; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ +var ReactClassInterface = { -"use strict"; + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', -Object.defineProperty(exports, "__esModule", { - value: true -}); + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', -var _templateObject = _taggedTemplateLiteral(['\n 0% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n 5%,\n 95% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n 10%,\n 59% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em;\n }\n 20% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em;\n }\n 38% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em;\n }\n 100% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n'], ['\n 0% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n 5%,\n 95% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n 10%,\n 59% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em;\n }\n 20% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em;\n }\n 38% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em;\n }\n 100% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n']), - _templateObject2 = _taggedTemplateLiteral(['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n'], ['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n']), - _templateObject3 = _taggedTemplateLiteral(['\n animation: ', ';\n border-radius: 50%;\n color: ', ';\n font-size: ', ';\n height: 1em;\n margin: 72px auto;\n overflow: hidden;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n'], ['\n animation: ', ';\n border-radius: 50%;\n color: ', ';\n font-size: ', ';\n height: 1em;\n margin: 72px auto;\n overflow: hidden;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n']); + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', -var _styledComponents = __webpack_require__(5); + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', -var _styledComponents2 = _interopRequireDefault(_styledComponents); + // ==== Definition methods ==== -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', -var loading = (0, _styledComponents.keyframes)(_templateObject); + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', -var round = (0, _styledComponents.keyframes)(_templateObject2); + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return
Hello, {name}!
; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', -var CometSpin = _styledComponents2.default.div(_templateObject3, function (props) { - return loading + ' ' + props.duration + 's infinite ease, ' + round + ' ' + props.duration + 's infinite ease'; -}, function (props) { - return props.color; -}, function (props) { - return props.size + 'px'; -}); + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', -exports.default = CometSpin; + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', -"use strict"; + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', -Object.defineProperty(exports, "__esModule", { - value: true -}); + // ==== Advanced methods ==== -var _templateObject = _taggedTemplateLiteral(['\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ', ', 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.5), -1.8em -1.8em 0 0em rgba(', ', 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.7), 1.8em -1.8em 0 0em ', ', 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.5), 1.8em -1.8em 0 0em rgba(', ', 0.7), 2.5em 0em 0 0em ', ', 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.5), 2.5em 0em 0 0em rgba(', ', 0.7), 1.75em 1.75em 0 0em ', ', 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.5), 1.75em 1.75em 0 0em rgba(', ', 0.7), 0em 2.5em 0 0em ', ', -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.5), 0em 2.5em 0 0em rgba(', ', 0.7), -1.8em 1.8em 0 0em ', ', -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.5), -1.8em 1.8em 0 0em rgba(', ', 0.7), -2.6em 0em 0 0em ', ', -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.5), -2.6em 0em 0 0em rgba(', ', 0.7), -1.8em -1.8em 0 0em ', ';\n }\n '], ['\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ', ', 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.5), -1.8em -1.8em 0 0em rgba(', ', 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.7), 1.8em -1.8em 0 0em ', ', 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.5), 1.8em -1.8em 0 0em rgba(', ', 0.7), 2.5em 0em 0 0em ', ', 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.5), 2.5em 0em 0 0em rgba(', ', 0.7), 1.75em 1.75em 0 0em ', ', 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.5), 1.75em 1.75em 0 0em rgba(', ', 0.7), 0em 2.5em 0 0em ', ', -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.5), 0em 2.5em 0 0em rgba(', ', 0.7), -1.8em 1.8em 0 0em ', ', -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.5), -1.8em 1.8em 0 0em rgba(', ', 0.7), -2.6em 0em 0 0em ', ', -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.5), -2.6em 0em 0 0em rgba(', ', 0.7), -1.8em -1.8em 0 0em ', ';\n }\n ']), - _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 1em;\n margin: 100px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n'], ['\n animation: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 1em;\n margin: 100px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n']); + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' -var _styledComponents = __webpack_require__(5); +}; -var _styledComponents2 = _interopRequireDefault(_styledComponents); +/** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ +var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {} }; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an invariant so components + // don't show up in prod but only in __DEV__ + process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0; + } + } +} -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } +function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; -function animation(props) { - var d = document.createElement('div'); - d.style.color = props.color; - document.body.appendChild(d); - var rgbcolor = window.getComputedStyle(d).color; - var match = /rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*\d+[.d+]*)*\)/g.exec(rgbcolor); - var color = match[1] + ', ' + match[2] + ', ' + match[3]; + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + !(specPolicy === 'OVERRIDE_BASE') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0; + } - return (0, _styledComponents.keyframes)(_templateObject, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color); + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0; + } } -var CylinderSpin = _styledComponents2.default.div(_templateObject2, function (props) { - return animation(props) + ' ' + props.duration + 's infinite ease;'; -}, function (props) { - return props.size + 'px'; -}); +/** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ +function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (process.env.NODE_ENV !== 'production') { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; -exports.default = CylinderSpin; + process.env.NODE_ENV !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0; + } -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { + return; + } -"use strict"; + !(typeof spec !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0; + !!ReactElement.isValidElement(spec) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0; + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.SpinLoader = exports.RotateSpinLoader = exports.ResizeSpinLoader = exports.CylinderSpinLoader = exports.CometSpinLoader = exports.BubbleSpinLoader = exports.BubbleLoader = exports.BarLoader = undefined; + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } -var _BarLoader = __webpack_require__(22); + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } -var _BarLoader2 = _interopRequireDefault(_BarLoader); + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } -var _BubbleLoader = __webpack_require__(24); + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); -var _BubbleLoader2 = _interopRequireDefault(_BubbleLoader); + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; -var _BubbleSpinLoader = __webpack_require__(23); + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; -var _BubbleSpinLoader2 = _interopRequireDefault(_BubbleSpinLoader); + // These cases should already be caught by validateMethodOverride. + !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0; -var _CometSpinLoader = __webpack_require__(25); + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (process.env.NODE_ENV !== 'production') { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } +} -var _CometSpinLoader2 = _interopRequireDefault(_CometSpinLoader); +function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } -var _CylinderSpinLoader = __webpack_require__(26); + var isReserved = name in RESERVED_SPEC_KEYS; + !!isReserved ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0; -var _CylinderSpinLoader2 = _interopRequireDefault(_CylinderSpinLoader); + var isInherited = name in Constructor; + !!isInherited ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0; + Constructor[name] = property; + } +} -var _ResizeSpinLoader = __webpack_require__(27); +/** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ +function mergeIntoWithNoDuplicateKeys(one, two) { + !(one && two && typeof one === 'object' && typeof two === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0; -var _ResizeSpinLoader2 = _interopRequireDefault(_ResizeSpinLoader); + for (var key in two) { + if (two.hasOwnProperty(key)) { + !(one[key] === undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0; + one[key] = two[key]; + } + } + return one; +} -var _RotateSpinLoader = __webpack_require__(28); +/** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ +function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; +} -var _RotateSpinLoader2 = _interopRequireDefault(_RotateSpinLoader); +/** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ +function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; +} -var _SpinLoader = __webpack_require__(29); +/** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ +function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (process.env.NODE_ENV !== 'production') { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } -var _SpinLoader2 = _interopRequireDefault(_SpinLoader); + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0; + } else if (!args.length) { + process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0; + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ +function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } +} -exports.BarLoader = _BarLoader2.default; -exports.BubbleLoader = _BubbleLoader2.default; -exports.BubbleSpinLoader = _BubbleSpinLoader2.default; -exports.CometSpinLoader = _CometSpinLoader2.default; -exports.CylinderSpinLoader = _CylinderSpinLoader2.default; -exports.ResizeSpinLoader = _ResizeSpinLoader2.default; -exports.RotateSpinLoader = _RotateSpinLoader2.default; -exports.SpinLoader = _SpinLoader2.default; +/** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ +var ReactClassMixin = { -/***/ }), -/* 36 */ -/***/ (function(module, exports, __webpack_require__) { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'replaceState'); + } + }, -"use strict"; + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + return this.updater.isMounted(this); + } +}; +var ReactClassComponent = function () {}; +_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var didWarnDeprecated = false; -var _templateObject = _taggedTemplateLiteral(['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n'], ['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n']), - _templateObject2 = _taggedTemplateLiteral(['\n border-radius: 50%;\n box-shadow: inset 0 0 0 1em;\n color: ', ';\n font-size: ', ';\n height: 10em;\n margin: 55px auto;\n position: relative;\n text-indent: -99999em;\n transform: translateZ(0);\n width: 10em;\n\n &:before {\n animation: ', ';\n background: ', ';\n border-radius: 50%;\n border-radius: 10.2em 0 0 10.2em;\n content: \'\';\n height: 10.2em;\n left: -0.1em;\n position: absolute;\n top: -0.1em;\n transform-origin: 5.2em 5.1em;\n width: 5.2em;\n }\n\n &:after {\n animation: ', ';\n background: ', ';\n border-radius: 50%;\n border-radius: 0 10.2em 10.2em 0;\n content: \'\';\n height: 10.2em;\n left: 5.1em;\n position: absolute;\n top: -0.1em;\n transform-origin: 0px 5.1em;\n width: 5.2em;\n }\n'], ['\n border-radius: 50%;\n box-shadow: inset 0 0 0 1em;\n color: ', ';\n font-size: ', ';\n height: 10em;\n margin: 55px auto;\n position: relative;\n text-indent: -99999em;\n transform: translateZ(0);\n width: 10em;\n\n &:before {\n animation: ', ';\n background: ', ';\n border-radius: 50%;\n border-radius: 10.2em 0 0 10.2em;\n content: \'\';\n height: 10.2em;\n left: -0.1em;\n position: absolute;\n top: -0.1em;\n transform-origin: 5.2em 5.1em;\n width: 5.2em;\n }\n\n &:after {\n animation: ', ';\n background: ', ';\n border-radius: 50%;\n border-radius: 0 10.2em 10.2em 0;\n content: \'\';\n height: 10.2em;\n left: 5.1em;\n position: absolute;\n top: -0.1em;\n transform-origin: 0px 5.1em;\n width: 5.2em;\n }\n']); +/** + * Module for creating composite components. + * + * @class ReactClass + */ +var ReactClass = { -var _styledComponents = __webpack_require__(5); + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + createClass: function (spec) { + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(didWarnDeprecated, '%s: React.createClass is deprecated and will be removed in version 16. ' + 'Use plain JavaScript classes instead. If you\'re not yet ready to ' + 'migrate, create-react-class is available on npm as a ' + 'drop-in replacement.', spec && spec.displayName || 'A Component') : void 0; + didWarnDeprecated = true; + } -var _styledComponents2 = _interopRequireDefault(_styledComponents); + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0; + } -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } -var loading = (0, _styledComponents.keyframes)(_templateObject); + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; -var ResizeSpin = _styledComponents2.default.div(_templateObject2, function (props) { - return props.color; -}, function (props) { - return props.size + 'px'; -}, function (props) { - return loading + ' ' + props.duration + 's infinite ease 1.5s'; -}, function (props) { - return props.background; -}, function (props) { - return loading + ' ' + props.duration + 's infinite ease'; -}, function (props) { - return props.background; -}); + this.state = null; -exports.default = ResizeSpin; + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { + var initialState = this.getInitialState ? this.getInitialState() : null; + if (process.env.NODE_ENV !== 'production') { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0; -"use strict"; + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); -Object.defineProperty(exports, "__esModule", { - value: true -}); + mixSpecIntoComponent(Constructor, spec); -var _templateObject = _taggedTemplateLiteral(['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n'], ['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n']), - _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n border: ', ';\n border-left: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 10em;\n margin: 60px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 10em;\n\n &:after {\n border-radius: 50%;\n height: 10em;\n width: 10em;\n }\n'], ['\n animation: ', ';\n border: ', ';\n border-left: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 10em;\n margin: 60px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 10em;\n\n &:after {\n border-radius: 50%;\n height: 10em;\n width: 10em;\n }\n']); + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } -var _styledComponents = __webpack_require__(5); + if (process.env.NODE_ENV !== 'production') { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } -var _styledComponents2 = _interopRequireDefault(_styledComponents); + !Constructor.prototype.render ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0; + } -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } -var loading = (0, _styledComponents.keyframes)(_templateObject); + return Constructor; + }, -function getColor(props) { - var d = document.createElement('div'); - d.style.color = props.color; - document.body.appendChild(d); - var rgbcolor = window.getComputedStyle(d).color; - var match = /rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*\d+[.d+]*)*\)/g.exec(rgbcolor); - var color = match[1] + ', ' + match[2] + ', ' + match[3]; - return color; -} + injection: { + injectMixin: function (mixin) { + injectedMixins.push(mixin); + } + } -var RotateSpin = _styledComponents2.default.div(_templateObject2, function (props) { - return loading + ' ' + props.duration + 's infinite linear'; -}, function (props) { - return '1.1em solid rgba(' + getColor(props) + ', 0.2)'; -}, function (props) { - return '1.1em solid ' + props.color; -}, function (props) { - return props.size + 'px'; -}); +}; -exports.default = RotateSpin; +module.exports = ReactClass; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 38 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _templateObject = _taggedTemplateLiteral(['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n'], ['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n']), - _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n background: ', ';\n background: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 11em;\n margin: 50px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 11em;\n\n &:before {\n background: ', ';\n border-radius: 100% 0 0 0;\n content: \'\';\n height: 50%;\n left: 0;\n position: absolute;\n top: 0;\n width: 50%;\n }\n\n &:after {\n background: ', ';\n border-radius: 50%;\n bottom: 0;\n content: \'\';\n height: 75%;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n width: 75%;\n }\n'], ['\n animation: ', ';\n background: ', ';\n background: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 11em;\n margin: 50px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 11em;\n\n &:before {\n background: ', ';\n border-radius: 100% 0 0 0;\n content: \'\';\n height: 50%;\n left: 0;\n position: absolute;\n top: 0;\n width: 50%;\n }\n\n &:after {\n background: ', ';\n border-radius: 50%;\n bottom: 0;\n content: \'\';\n height: 75%;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n width: 75%;\n }\n']); - -var _styledComponents = __webpack_require__(5); - -var _styledComponents2 = _interopRequireDefault(_styledComponents); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var ReactElement = __webpack_require__(7); -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } +/** + * Create a factory that creates HTML tag elements. + * + * @private + */ +var createDOMFactory = ReactElement.createFactory; +if (process.env.NODE_ENV !== 'production') { + var ReactElementValidator = __webpack_require__(20); + createDOMFactory = ReactElementValidator.createFactory; +} -var loading = (0, _styledComponents.keyframes)(_templateObject); +/** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * This is also accessible via `React.DOM`. + * + * @public + */ +var ReactDOMFactories = { + a: createDOMFactory('a'), + abbr: createDOMFactory('abbr'), + address: createDOMFactory('address'), + area: createDOMFactory('area'), + article: createDOMFactory('article'), + aside: createDOMFactory('aside'), + audio: createDOMFactory('audio'), + b: createDOMFactory('b'), + base: createDOMFactory('base'), + bdi: createDOMFactory('bdi'), + bdo: createDOMFactory('bdo'), + big: createDOMFactory('big'), + blockquote: createDOMFactory('blockquote'), + body: createDOMFactory('body'), + br: createDOMFactory('br'), + button: createDOMFactory('button'), + canvas: createDOMFactory('canvas'), + caption: createDOMFactory('caption'), + cite: createDOMFactory('cite'), + code: createDOMFactory('code'), + col: createDOMFactory('col'), + colgroup: createDOMFactory('colgroup'), + data: createDOMFactory('data'), + datalist: createDOMFactory('datalist'), + dd: createDOMFactory('dd'), + del: createDOMFactory('del'), + details: createDOMFactory('details'), + dfn: createDOMFactory('dfn'), + dialog: createDOMFactory('dialog'), + div: createDOMFactory('div'), + dl: createDOMFactory('dl'), + dt: createDOMFactory('dt'), + em: createDOMFactory('em'), + embed: createDOMFactory('embed'), + fieldset: createDOMFactory('fieldset'), + figcaption: createDOMFactory('figcaption'), + figure: createDOMFactory('figure'), + footer: createDOMFactory('footer'), + form: createDOMFactory('form'), + h1: createDOMFactory('h1'), + h2: createDOMFactory('h2'), + h3: createDOMFactory('h3'), + h4: createDOMFactory('h4'), + h5: createDOMFactory('h5'), + h6: createDOMFactory('h6'), + head: createDOMFactory('head'), + header: createDOMFactory('header'), + hgroup: createDOMFactory('hgroup'), + hr: createDOMFactory('hr'), + html: createDOMFactory('html'), + i: createDOMFactory('i'), + iframe: createDOMFactory('iframe'), + img: createDOMFactory('img'), + input: createDOMFactory('input'), + ins: createDOMFactory('ins'), + kbd: createDOMFactory('kbd'), + keygen: createDOMFactory('keygen'), + label: createDOMFactory('label'), + legend: createDOMFactory('legend'), + li: createDOMFactory('li'), + link: createDOMFactory('link'), + main: createDOMFactory('main'), + map: createDOMFactory('map'), + mark: createDOMFactory('mark'), + menu: createDOMFactory('menu'), + menuitem: createDOMFactory('menuitem'), + meta: createDOMFactory('meta'), + meter: createDOMFactory('meter'), + nav: createDOMFactory('nav'), + noscript: createDOMFactory('noscript'), + object: createDOMFactory('object'), + ol: createDOMFactory('ol'), + optgroup: createDOMFactory('optgroup'), + option: createDOMFactory('option'), + output: createDOMFactory('output'), + p: createDOMFactory('p'), + param: createDOMFactory('param'), + picture: createDOMFactory('picture'), + pre: createDOMFactory('pre'), + progress: createDOMFactory('progress'), + q: createDOMFactory('q'), + rp: createDOMFactory('rp'), + rt: createDOMFactory('rt'), + ruby: createDOMFactory('ruby'), + s: createDOMFactory('s'), + samp: createDOMFactory('samp'), + script: createDOMFactory('script'), + section: createDOMFactory('section'), + select: createDOMFactory('select'), + small: createDOMFactory('small'), + source: createDOMFactory('source'), + span: createDOMFactory('span'), + strong: createDOMFactory('strong'), + style: createDOMFactory('style'), + sub: createDOMFactory('sub'), + summary: createDOMFactory('summary'), + sup: createDOMFactory('sup'), + table: createDOMFactory('table'), + tbody: createDOMFactory('tbody'), + td: createDOMFactory('td'), + textarea: createDOMFactory('textarea'), + tfoot: createDOMFactory('tfoot'), + th: createDOMFactory('th'), + thead: createDOMFactory('thead'), + time: createDOMFactory('time'), + title: createDOMFactory('title'), + tr: createDOMFactory('tr'), + track: createDOMFactory('track'), + u: createDOMFactory('u'), + ul: createDOMFactory('ul'), + 'var': createDOMFactory('var'), + video: createDOMFactory('video'), + wbr: createDOMFactory('wbr'), -var Spin = _styledComponents2.default.div(_templateObject2, function (props) { - return loading + ' ' + props.duration + 's infinite linear;'; -}, function (props) { - return props.color; -}, function (props) { - return 'linear-gradient(to right, ' + props.color + ' 10%, rgba(255, 255, 255, 0) 42%);'; -}, function (props) { - return props.size + 'px'; -}, function (props) { - return props.color; -}, function (props) { - return props.background; -}); + // SVG + circle: createDOMFactory('circle'), + clipPath: createDOMFactory('clipPath'), + defs: createDOMFactory('defs'), + ellipse: createDOMFactory('ellipse'), + g: createDOMFactory('g'), + image: createDOMFactory('image'), + line: createDOMFactory('line'), + linearGradient: createDOMFactory('linearGradient'), + mask: createDOMFactory('mask'), + path: createDOMFactory('path'), + pattern: createDOMFactory('pattern'), + polygon: createDOMFactory('polygon'), + polyline: createDOMFactory('polyline'), + radialGradient: createDOMFactory('radialGradient'), + rect: createDOMFactory('rect'), + stop: createDOMFactory('stop'), + svg: createDOMFactory('svg'), + text: createDOMFactory('text'), + tspan: createDOMFactory('tspan') +}; -exports.default = Spin; +module.exports = ReactDOMFactories; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 39 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6139,17 +6331,32 @@ exports.default = Spin; * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. + * */ -if (process.env.NODE_ENV !== 'production') { - var invariant = __webpack_require__(2); - var warning = __webpack_require__(1); - var ReactPropTypesSecret = __webpack_require__(13); - var loggedTypeFailures = {}; +var _prodInvariant = __webpack_require__(6); + +var ReactPropTypeLocationNames = __webpack_require__(19); +var ReactPropTypesSecret = __webpack_require__(33); + +var invariant = __webpack_require__(2); +var warning = __webpack_require__(1); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(15); } +var loggedTypeFailures = {}; + /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. @@ -6158,208 +6365,59 @@ if (process.env.NODE_ENV !== 'production') { * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. - * @param {?Function} getStack Returns the component stack. + * @param {?object} element The React element that is being type-checked + * @param {?number} debugID The React component instance that is being type-checked * @private */ -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { - if (process.env.NODE_ENV !== 'production') { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; +function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; - var stack = getStack ? getStack() : ''; + var componentStackInfo = ''; - warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(15); + } + if (debugID !== null) { + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); + } else if (element !== null) { + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); + } } + + process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; } } } -} - -module.exports = checkPropTypes; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - - -// React 15.5 references this module, and assumes PropTypes are still callable in production. -// Therefore we re-export development-only version with all the PropTypes checks here. -// However if one is migrating to the `prop-types` npm library, they will go through the -// `index.js` entry point, and it will branch depending on the environment. -var factory = __webpack_require__(17); -module.exports = function(isValidElement) { - // It is still allowed in 15.5. - var throwOnDirectAccess = false; - return factory(isValidElement, throwOnDirectAccess); -}; - - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - - -var emptyFunction = __webpack_require__(8); -var invariant = __webpack_require__(2); -var ReactPropTypesSecret = __webpack_require__(13); - -module.exports = function() { - function shim(props, propName, componentName, location, propFullName, secret) { - if (secret === ReactPropTypesSecret) { - // It is still safe when called from React. - return; - } - invariant( - false, - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + - 'Use PropTypes.checkPropTypes() to call them. ' + - 'Read more at http://fb.me/use-check-prop-types' - ); - }; - shim.isRequired = shim; - function getShim() { - return shim; - }; - // Important! - // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. - var ReactPropTypes = { - array: shim, - bool: shim, - func: shim, - number: shim, - object: shim, - string: shim, - symbol: shim, - - any: shim, - arrayOf: getShim, - element: shim, - instanceOf: getShim, - node: shim, - objectOf: getShim, - oneOf: getShim, - oneOfType: getShim, - shape: getShim - }; - - ReactPropTypes.checkPropTypes = emptyFunction; - ReactPropTypes.PropTypes = ReactPropTypes; - - return ReactPropTypes; -}; - - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - - -/** - * Escape and wrap key so it is safe to use as a reactid - * - * @param {string} key to be escaped. - * @return {string} the escaped key. - */ - -function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - '=': '=0', - ':': '=2' - }; - var escapedString = ('' + key).replace(escapeRegex, function (match) { - return escaperLookup[match]; - }); - - return '$' + escapedString; -} - -/** - * Unescape and unwrap key for human-readable display - * - * @param {string} key to unescape. - * @return {string} the unescaped key. - */ -function unescape(key) { - var unescapeRegex = /(=0|=2)/g; - var unescaperLookup = { - '=0': '=', - '=2': ':' - }; - var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); - - return ('' + keySubstring).replace(unescapeRegex, function (match) { - return unescaperLookup[match]; - }); -} - -var KeyEscapeUtils = { - escape: escape, - unescape: unescape -}; +} -module.exports = KeyEscapeUtils; +module.exports = checkReactTypeSpec; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 43 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** +/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -6372,108 +6430,64 @@ module.exports = KeyEscapeUtils; -var _prodInvariant = __webpack_require__(7); +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -var invariant = __webpack_require__(2); +module.exports = ReactPropTypesSecret; + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; /** - * Static poolers. Several custom versions for each potential number of - * arguments. A completely generic pooler is easy to implement, but would - * require accessing the `arguments` object. In each of these, `this` refers to - * the Class itself, not an instance. If any others are needed, simply add them - * here, or in their own files. + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * */ -var oneArgumentPooler = function (copyFieldsFrom) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, copyFieldsFrom); - return instance; - } else { - return new Klass(copyFieldsFrom); - } -}; -var twoArgumentPooler = function (a1, a2) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2); - return instance; - } else { - return new Klass(a1, a2); - } -}; -var threeArgumentPooler = function (a1, a2, a3) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3); - return instance; - } else { - return new Klass(a1, a2, a3); - } -}; -var fourArgumentPooler = function (a1, a2, a3, a4) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3, a4); - return instance; - } else { - return new Klass(a1, a2, a3, a4); - } -}; +var _require = __webpack_require__(7), + isValidElement = _require.isValidElement; -var standardReleaser = function (instance) { - var Klass = this; - !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; - instance.destructor(); - if (Klass.instancePool.length < Klass.poolSize) { - Klass.instancePool.push(instance); - } -}; +var factory = __webpack_require__(35); -var DEFAULT_POOL_SIZE = 10; -var DEFAULT_POOLER = oneArgumentPooler; +module.exports = factory(isValidElement); +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; /** - * Augments `CopyConstructor` to be a poolable class, augmenting only the class - * itself (statically) not adding any prototypical fields. Any CopyConstructor - * you give this may have a `poolSize` property, and will look for a - * prototypical `destructor` on instances. + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * @param {Function} CopyConstructor Constructor that can be used to reset. - * @param {Function} pooler Customizable pooler. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. */ -var addPoolingTo = function (CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared - var NewKlass = CopyConstructor; - NewKlass.instancePool = []; - NewKlass.getPooled = pooler || DEFAULT_POOLER; - if (!NewKlass.poolSize) { - NewKlass.poolSize = DEFAULT_POOL_SIZE; - } - NewKlass.release = standardReleaser; - return NewKlass; -}; -var PooledClass = { - addPoolingTo: addPoolingTo, - oneArgumentPooler: oneArgumentPooler, - twoArgumentPooler: twoArgumentPooler, - threeArgumentPooler: threeArgumentPooler, - fourArgumentPooler: fourArgumentPooler + + +// React 15.5 references this module, and assumes PropTypes are still callable in production. +// Therefore we re-export development-only version with all the PropTypes checks here. +// However if one is migrating to the `prop-types` npm library, they will go through the +// `index.js` entry point, and it will branch depending on the environment. +var factory = __webpack_require__(21); +module.exports = function(isValidElement) { + // It is still allowed in 15.5. + var throwOnDirectAccess = false; + return factory(isValidElement, throwOnDirectAccess); }; -module.exports = PooledClass; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 44 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6484,110 +6498,88 @@ module.exports = PooledClass; * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. - * */ -var _assign = __webpack_require__(9); - -var ReactChildren = __webpack_require__(45); -var ReactComponent = __webpack_require__(14); -var ReactPureComponent = __webpack_require__(50); -var ReactClass = __webpack_require__(46); -var ReactDOMFactories = __webpack_require__(47); -var ReactElement = __webpack_require__(6); -var ReactPropTypes = __webpack_require__(48); -var ReactVersion = __webpack_require__(51); - -var onlyChild = __webpack_require__(53); -var warning = __webpack_require__(1); - -var createElement = ReactElement.createElement; -var createFactory = ReactElement.createFactory; -var cloneElement = ReactElement.cloneElement; - -if (process.env.NODE_ENV !== 'production') { - var canDefineProperty = __webpack_require__(11); - var ReactElementValidator = __webpack_require__(19); - var didWarnPropTypesDeprecated = false; - createElement = ReactElementValidator.createElement; - createFactory = ReactElementValidator.createFactory; - cloneElement = ReactElementValidator.cloneElement; -} - -var __spread = _assign; - if (process.env.NODE_ENV !== 'production') { - var warned = false; - __spread = function () { - process.env.NODE_ENV !== 'production' ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0; - warned = true; - return _assign.apply(null, arguments); - }; + var invariant = __webpack_require__(2); + var warning = __webpack_require__(1); + var ReactPropTypesSecret = __webpack_require__(16); + var loggedTypeFailures = {}; } -var React = { - - // Modern - - Children: { - map: ReactChildren.map, - forEach: ReactChildren.forEach, - count: ReactChildren.count, - toArray: ReactChildren.toArray, - only: onlyChild - }, - - Component: ReactComponent, - PureComponent: ReactPureComponent, +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (process.env.NODE_ENV !== 'production') { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; - createElement: createElement, - cloneElement: cloneElement, - isValidElement: ReactElement.isValidElement, + var stack = getStack ? getStack() : ''; - // Classic + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } +} - PropTypes: ReactPropTypes, - createClass: ReactClass.createClass, - createFactory: createFactory, - createMixin: function (mixin) { - // Currently a noop. Will be used to validate and trace mixins. - return mixin; - }, +module.exports = checkPropTypes; - // This looks DOM specific but these are actually isomorphic helpers - // since they are just generating DOM strings. - DOM: ReactDOMFactories, +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - version: ReactVersion, +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { - // Deprecated hook for JSX spread, don't use this for anything. - __spread: __spread -}; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -// TODO: Fix tests so that this deprecation warning doesn't cause failures. -if (process.env.NODE_ENV !== 'production') { - if (canDefineProperty) { - Object.defineProperty(React, 'PropTypes', { - get: function () { - process.env.NODE_ENV !== 'production' ? warning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated. Use ' + 'the prop-types package from npm instead.') : void 0; - didWarnPropTypesDeprecated = true; - return ReactPropTypes; - } - }); - } -} -module.exports = React; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +module.exports = '15.5.4'; /***/ }), -/* 45 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** +/* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -6598,2890 +6590,2329 @@ module.exports = React; */ +var _prodInvariant = __webpack_require__(6); -var PooledClass = __webpack_require__(43); -var ReactElement = __webpack_require__(6); - -var emptyFunction = __webpack_require__(8); -var traverseAllChildren = __webpack_require__(54); - -var twoArgumentPooler = PooledClass.twoArgumentPooler; -var fourArgumentPooler = PooledClass.fourArgumentPooler; +var ReactElement = __webpack_require__(7); -var userProvidedKeyEscapeRegex = /\/+/g; -function escapeUserProvidedKey(text) { - return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); -} +var invariant = __webpack_require__(2); /** - * PooledClass representing the bookkeeping associated with performing a child - * traversal. Allows avoiding binding callbacks. + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. * - * @constructor ForEachBookKeeping - * @param {!function} forEachFunction Function to perform traversal with. - * @param {?*} forEachContext Context to perform context with. + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. */ -function ForEachBookKeeping(forEachFunction, forEachContext) { - this.func = forEachFunction; - this.context = forEachContext; - this.count = 0; +function onlyChild(children) { + !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; + return children; } -ForEachBookKeeping.prototype.destructor = function () { - this.func = null; - this.context = null; - this.count = 0; -}; -PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); -function forEachSingleChild(bookKeeping, child, name) { - var func = bookKeeping.func, - context = bookKeeping.context; +module.exports = onlyChild; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - func.call(context, child, bookKeeping.count++); -} +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; /** - * Iterates through children that are typically specified as `props.children`. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach - * - * The provided forEachFunc(child, index) will be called for each - * leaf child. + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * @param {?*} children Children tree container. - * @param {function(*, int)} forEachFunc - * @param {*} forEachContext Context for forEachContext. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. */ -function forEachChildren(children, forEachFunc, forEachContext) { - if (children == null) { - return children; - } - var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); - traverseAllChildren(children, forEachSingleChild, traverseContext); - ForEachBookKeeping.release(traverseContext); -} -/** - * PooledClass representing the bookkeeping associated with performing a child - * mapping. Allows avoiding binding callbacks. - * - * @constructor MapBookKeeping - * @param {!*} mapResult Object containing the ordered map of results. - * @param {!function} mapFunction Function to perform mapping with. - * @param {?*} mapContext Context to perform mapping with. - */ -function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { - this.result = mapResult; - this.keyPrefix = keyPrefix; - this.func = mapFunction; - this.context = mapContext; - this.count = 0; -} -MapBookKeeping.prototype.destructor = function () { - this.result = null; - this.keyPrefix = null; - this.func = null; - this.context = null; - this.count = 0; -}; -PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); -function mapSingleChildIntoContext(bookKeeping, child, childKey) { - var result = bookKeeping.result, - keyPrefix = bookKeeping.keyPrefix, - func = bookKeeping.func, - context = bookKeeping.context; +var emptyFunction = __webpack_require__(10); +var invariant = __webpack_require__(2); +var ReactPropTypesSecret = __webpack_require__(16); - var mappedChild = func.call(context, child, bookKeeping.count++); - if (Array.isArray(mappedChild)) { - mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); - } else if (mappedChild != null) { - if (ReactElement.isValidElement(mappedChild)) { - mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, - // Keep both the (mapped) and old keys if they differ, just as - // traverseAllChildren used to do for objects as children - keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; } - result.push(mappedChild); - } -} + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, -function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { - var escapedPrefix = ''; - if (prefix != null) { - escapedPrefix = escapeUserProvidedKey(prefix) + '/'; - } - var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); - traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); - MapBookKeeping.release(traverseContext); -} + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim + }; -/** - * Maps children that are typically specified as `props.children`. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map - * - * The provided mapFunction(child, key, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} func The map function. - * @param {*} context Context for mapFunction. - * @return {object} Object containing the ordered map of results. - */ -function mapChildren(children, func, context) { - if (children == null) { - return children; - } - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, func, context); - return result; -} + ReactPropTypes.checkPropTypes = emptyFunction; + ReactPropTypes.PropTypes = ReactPropTypes; -function forEachSingleChildDummy(traverseContext, child, name) { - return null; -} + return ReactPropTypes; +}; -/** - * Count the number of children that are typically specified as - * `props.children`. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count - * - * @param {?*} children Children tree container. - * @return {number} The number of children. - */ -function countChildren(children, context) { - return traverseAllChildren(children, forEachSingleChildDummy, null); -} -/** - * Flatten a children object (typically specified as `props.children`) and - * return an array with appropriately re-keyed children. +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _templateObject = _taggedTemplateLiteral(['\n 0%,\n 80%,\n 100% {\n box-shadow: 0 0;\n height: 4em;\n }\n 40% {\n box-shadow: 0 -2em;\n height: 5em;\n }\n'], ['\n 0%,\n 80%,\n 100% {\n box-shadow: 0 0;\n height: 4em;\n }\n 40% {\n box-shadow: 0 -2em;\n height: 5em;\n }\n']), + _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n color: ', ';\n font-size: ', ';\n height: 4em;\n margin: 88px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n\n &:before {\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n content: \'\';\n height: 4em;\n left: -1.5em;\n position: absolute;\n top: 0;\n width: 1em;\n }\n\n &:after {\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n content: \'\';\n height: 4em;\n left: 1.5em;\n position: absolute;\n top: 0;\n width: 1em;\n }\n'], ['\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n color: ', ';\n font-size: ', ';\n height: 4em;\n margin: 88px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n\n &:before {\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n content: \'\';\n height: 4em;\n left: -1.5em;\n position: absolute;\n top: 0;\n width: 1em;\n }\n\n &:after {\n animation: ', ';\n animation-delay: ', ';\n background: ', ';\n content: \'\';\n height: 4em;\n left: 1.5em;\n position: absolute;\n top: 0;\n width: 1em;\n }\n']); + +var _styledComponents = __webpack_require__(5); + +var _styledComponents2 = _interopRequireDefault(_styledComponents); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + +var loading = (0, _styledComponents.keyframes)(_templateObject); + +var Bar = _styledComponents2.default.div(_templateObject2, function (props) { + return loading + ' ' + props.duration + 's infinite ease-in-out'; +}, function (props) { + return props.duration * -0.16 + 's'; +}, function (props) { + return props.color; +}, function (props) { + return props.color; +}, function (props) { + return props.size + 'px'; +}, function (props) { + return loading + ' ' + props.duration + 's infinite ease-in-out;'; +}, function (props) { + return props.duration * -0.32 + 's'; +}, function (props) { + return props.color; +}, function (props) { + return loading + ' ' + props.duration + 's infinite ease-in-out'; +}, function (props) { + return props.duration * 0.08 + 's'; +}, function (props) { + return props.color; +}); + +exports.default = Bar; + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * is-plain-object * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. */ -function toArray(children) { - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); - return result; + + + +var isObject = __webpack_require__(42); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; } -var ReactChildren = { - forEach: forEachChildren, - map: mapChildren, - mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, - count: countChildren, - toArray: toArray +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; }; -module.exports = ReactChildren; /***/ }), -/* 46 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. +/*! + * isobject * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +/* + * __ ___ + * _____/ /___ __/ (_)____ + * / ___/ __/ / / / / / ___/ + * (__ ) /_/ /_/ / / (__ ) + * /____/\__/\__, /_/_/____/ + * /____/ * + * light - weight css preprocessor @licence MIT */ +/* eslint-disable */ +(function (factory) { + true ? (module['exports'] = factory(null)) : + typeof define === 'function' && define['amd'] ? define(factory(null)) : + (window['stylis'] = factory(null)) +}(/** @param {*=} options */function factory (options) { + + 'use strict' + + /** + * Notes + * + * The [''] pattern is used to support closure compiler + * the jsdoc signatures are also used to the same effect + * + * ---- + * + * int + int + int === n4 [faster] + * + * vs + * + * int === n1 && int === n2 && int === n3 + * + * ---- + * + * switch (int) { case ints...} [faster] + * + * vs + * + * if (int == 1 && int === 2 ...) + * + * ---- + * + * The (first*n1 + second*n2 + third*n3) format used in the property parser + * is a simple way to hash the sequence of characters + * taking into account the index they occur in + * since any number of 3 character sequences could produce duplicates. + * + * On the other hand sequences that are directly tied to the index of the character + * resolve a far more accurate measure, it's also faster + * to evaluate one condition in a switch statement + * than three in an if statement regardless of the added math. + * + * This allows the vendor prefixer to be both small and fast. + */ + + var nullptn = /^\0+/g /* matches leading null characters */ + var formatptn = /[\0\r\f]/g /* matches new line, null and formfeed characters */ + var colonptn = /: */g /* splits animation rules */ + var cursorptn = /zoo|gra/ /* assert cursor varient */ + var transformptn = /([,: ])(transform)/g /* vendor prefix transform, older webkit */ + var animationptn = /,+\s*(?![^(]*[)])/g /* splits multiple shorthand notation animations */ + var propertiesptn = / +\s*(?![^(]*[)])/g /* animation properties */ + var elementptn = / *[\0] */g /* selector elements */ + var selectorptn = /,\r+?/g /* splits selectors */ + var andptn = /([\t\r\n ])*\f?&/g /* match & */ + var escapeptn = /:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g /* matches :global(.*) */ + var invalidptn = /\W+/g /* removes invalid characters from keyframes */ + var keyframeptn = /@(k\w+)\s*(\S*)\s*/ /* matches @keyframes $1 */ + var plcholdrptn = /::(place)/g /* match ::placeholder varient */ + var readonlyptn = /:(read-only)/g /* match :read-only varient */ + var beforeptn = /\s+(?=[{\];=:>])/g /* matches \s before ] ; = : */ + var afterptn = /([[}=:>])\s+/g /* matches \s after characters [ } = : */ + var tailptn = /(\{[^{]+?);(?=\})/g /* matches tail semi-colons ;} */ + var whiteptn = /\s{2,}/g /* matches repeating whitespace */ + var pseudoptn = /([^\(])(:+) */g /* pseudo element */ + var writingptn = /[svh]\w+-[tblr]{2}/ /* match writing mode property values */ + /* vendors */ + var webkit = '-webkit-' + var moz = '-moz-' + var ms = '-ms-' + /* character codes */ + var SEMICOLON = 59 /* ; */ + var CLOSEBRACES = 125 /* } */ + var OPENBRACES = 123 /* { */ + var OPENPARENTHESES = 40 /* ( */ + var CLOSEPARENTHESES = 41 /* ) */ + var OPENBRACKET = 91 /* [ */ + var CLOSEBRACKET = 93 /* ] */ + var NEWLINE = 10 /* \n */ + var CARRIAGE = 13 /* \r */ + var TAB = 9 /* \t */ + var AT = 64 /* @ */ + var SPACE = 32 /* */ + var AND = 38 /* & */ + var DASH = 45 /* - */ + var UNDERSCORE = 95 /* _ */ + var STAR = 42 /* * */ + var COMMA = 44 /* , */ + var COLON = 58 /* : */ + var SINGLEQUOTE = 39 /* ' */ + var DOUBLEQUOTE = 34 /* " */ + var FOWARDSLASH = 47 /* / */ + var GREATERTHAN = 62 /* > */ + var PLUS = 43 /* + */ + var TILDE = 126 /* ~ */ + var NULL = 0 /* \0 */ + var FORMFEED = 12 /* \f */ + var VERTICALTAB = 11 /* \v */ -var _prodInvariant = __webpack_require__(7), - _assign = __webpack_require__(9); + /* special identifiers */ + var KEYFRAME = 107 /* k */ + var MEDIA = 109 /* m */ + var SUPPORTS = 115 /* s */ + var PLACEHOLDER = 112 /* p */ + var READONLY = 111 /* o */ + var IMPORT = 169 /* i */ + var CHARSET = 163 /* c */ + var DOCUMENT = 100 /* d */ -var ReactComponent = __webpack_require__(14); -var ReactElement = __webpack_require__(6); -var ReactPropTypeLocationNames = __webpack_require__(20); -var ReactNoopUpdateQueue = __webpack_require__(16); + var column = 1 /* current column */ + var line = 1 /* current line numebr */ + var pattern = 0 /* :pattern */ -var emptyObject = __webpack_require__(12); -var invariant = __webpack_require__(2); -var warning = __webpack_require__(1); + var cascade = 1 /* #id h1 h2 vs h1#id h2#id */ + var vendor = 1 /* vendor prefix */ + var escape = 1 /* escape :global() pattern */ + var compress = 0 /* compress output */ + var semicolon = 0 /* no/semicolon option */ + var preserve = 0 /* preserve empty selectors */ -var MIXINS_KEY = 'mixins'; + /* empty reference */ + var array = [] -// Helper function to allow the creation of anonymous functions which do not -// have .name set to the name of the variable being assigned to. -function identity(fn) { - return fn; -} + /* plugins */ + var plugins = [] + var plugged = 0 + + /* plugin context */ + var POSTS = -2 + var PREPS = -1 + var UNKWN = 0 + var PROPS = 1 + var BLCKS = 2 + var ATRUL = 3 + + /* plugin newline context */ + var unkwn = 0 + + /* keyframe animation */ + var keyed = 1 + var key = '' + + /* selector namespace */ + var nscopealt = '' + var nscope = '' + + /** + * Compile + * + * @param {Array} parent + * @param {Array} current + * @param {string} body + * @param {number} id + * @return {string} + */ + function compile (parent, current, body, id) { + var bracket = 0 /* brackets [] */ + var comment = 0 /* comments /* // or /* */ + var parentheses = 0 /* functions () */ + var quote = 0 /* quotes '', "" */ + + var first = 0 /* first character code */ + var second = 0 /* second character code */ + var code = 0 /* current character code */ + var tail = 0 /* previous character code */ + var trail = 0 /* character before previous code */ + var peak = 0 /* previous non-whitespace code */ + + var counter = 0 /* count sequence termination */ + var context = 0 /* track current context */ + var atrule = 0 /* track @at-rule context */ + var pseudo = 0 /* track pseudo token index */ + var caret = 0 /* current character index */ + var format = 0 /* control character formating context */ + var insert = 0 /* auto semicolon insertion */ + var invert = 0 /* inverted selector pattern */ + var length = 0 /* generic length address */ + var eof = body.length /* end of file(length) */ + var eol = eof - 1 /* end of file(characters) */ + + var char = '' /* current character */ + var chars = '' /* current buffer of characters */ + var child = '' /* next buffer of characters */ + var out = '' /* compiled body */ + var children = '' /* compiled children */ + var flat = '' /* compiled leafs */ + var selector /* generic selector address */ + var result /* generic address */ -/** - * Policies that describe methods in `ReactClassInterface`. - */ + // ...build body + while (caret < eof) { + code = body.charCodeAt(caret) + if (comment + quote + parentheses + bracket === 0) { + // eof varient + if (caret === eol) { + if (format > 0) { + chars = chars.replace(formatptn, '') + } -var injectedMixins = []; + if ((chars = chars.trim()).length > 0) { + switch (code) { + case SPACE: + case TAB: + case SEMICOLON: + case CARRIAGE: + case NEWLINE: { + break + } + default: { + chars += body.charAt(caret) + } + } -/** - * Composite components are higher-level components that compose other composite - * or host components. - * - * To create a new type of `ReactClass`, pass a specification of - * your new class to `React.createClass`. The only requirement of your class - * specification is that you implement a `render` method. - * - * var MyComponent = React.createClass({ - * render: function() { - * return
Hello World
; - * } - * }); - * - * The class specification supports a specific protocol of methods that have - * special meaning (e.g. `render`). See `ReactClassInterface` for - * more the comprehensive protocol. Any other properties and methods in the - * class specification will be available on the prototype. - * - * @interface ReactClassInterface - * @internal - */ -var ReactClassInterface = { + code = SEMICOLON + } + } - /** - * An array of Mixin objects to include when defining your component. - * - * @type {array} - * @optional - */ - mixins: 'DEFINE_MANY', + // auto semicolon insertion + if (insert === 1) { + switch (code) { + // false flags + case OPENBRACES: + case COMMA: { + insert = 0 + break + } + // ignore + case TAB: + case CARRIAGE: + case NEWLINE: + case SPACE: { + break + } + // valid + default: { + caret-- + code = SEMICOLON + } + } + } - /** - * An object containing properties and methods that should be defined on - * the component's constructor instead of its prototype (static methods). - * - * @type {object} - * @optional - */ - statics: 'DEFINE_MANY', + // token varient + switch (code) { + case OPENBRACES: { + chars = chars.trim() + first = chars.charCodeAt(0) + counter = 1 + caret++ - /** - * Definition of prop types for this component. - * - * @type {object} - * @optional - */ - propTypes: 'DEFINE_MANY', + while (caret < eof) { + code = body.charCodeAt(caret) - /** - * Definition of context types for this component. - * - * @type {object} - * @optional - */ - contextTypes: 'DEFINE_MANY', + switch (code) { + case OPENBRACES: { + counter++ + break + } + case CLOSEBRACES: { + counter-- + break + } + } - /** - * Definition of context types this component sets for its children. - * - * @type {object} - * @optional - */ - childContextTypes: 'DEFINE_MANY', + if (counter === 0) { + break + } - // ==== Definition methods ==== + child += body.charAt(caret++) + } - /** - * Invoked when the component is mounted. Values in the mapping will be set on - * `this.props` if that prop is not specified (i.e. using an `in` check). - * - * This method is invoked before `getInitialState` and therefore cannot rely - * on `this.state` or use `this.setState`. - * - * @return {object} - * @optional - */ - getDefaultProps: 'DEFINE_MANY_MERGED', + if (first === NULL) { + first = (chars = chars.replace(nullptn, '').trim()).charCodeAt(0) + } - /** - * Invoked once before the component is mounted. The return value will be used - * as the initial value of `this.state`. - * - * getInitialState: function() { - * return { - * isOn: false, - * fooBaz: new BazFoo() - * } - * } - * - * @return {object} - * @optional - */ - getInitialState: 'DEFINE_MANY_MERGED', + switch (first) { + // @at-rule + case AT: { + if (format > 0) { + chars = chars.replace(formatptn, '') + } - /** - * @return {object} - * @optional - */ - getChildContext: 'DEFINE_MANY_MERGED', + second = chars.charCodeAt(1) - /** - * Uses props from `this.props` and state from `this.state` to render the - * structure of the component. - * - * No guarantees are made about when or how often this method is invoked, so - * it must not have side effects. - * - * render: function() { - * var name = this.props.name; - * return
Hello, {name}!
; - * } - * - * @return {ReactComponent} - * @required - */ - render: 'DEFINE_ONCE', + switch (second) { + case DOCUMENT: + case MEDIA: + case SUPPORTS: { + selector = current + break + } + default: { + selector = array + } + } - // ==== Delegate methods ==== + child = compile(current, selector, child, second) + length = child.length - /** - * Invoked when the component is initially created and about to be mounted. - * This may have side effects, but any external subscriptions or data created - * by this method must be cleaned up in `componentWillUnmount`. - * - * @optional - */ - componentWillMount: 'DEFINE_MANY', + // preserve empty @at-rule + if (preserve > 0 && length === 0) { + length = chars.length + } - /** - * Invoked when the component has been mounted and has a DOM representation. - * However, there is no guarantee that the DOM node is in the document. - * - * Use this as an opportunity to operate on the DOM when the component has - * been mounted (initialized and rendered) for the first time. - * - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidMount: 'DEFINE_MANY', + // execute plugins, @at-rule context + if (plugged > 0) { + selector = select(array, chars, invert) + result = proxy(ATRUL, child, selector, current, line, column, length, second) + chars = selector.join('') - /** - * Invoked before the component receives new props. - * - * Use this as an opportunity to react to a prop transition by updating the - * state using `this.setState`. Current props are accessed via `this.props`. - * - * componentWillReceiveProps: function(nextProps, nextContext) { - * this.setState({ - * likesIncreasing: nextProps.likeCount > this.props.likeCount - * }); - * } - * - * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop - * transition may cause a state change, but the opposite is not true. If you - * need it, you are probably looking for `componentWillUpdate`. - * - * @param {object} nextProps - * @optional - */ - componentWillReceiveProps: 'DEFINE_MANY', + if (result !== void 0) { + if ((length = (child = result.trim()).length) === 0) { + second = 0 + child = '' + } + } + } - /** - * Invoked while deciding if the component should be updated as a result of - * receiving new props, state and/or context. - * - * Use this as an opportunity to `return false` when you're certain that the - * transition to the new props/state/context will not require a component - * update. - * - * shouldComponentUpdate: function(nextProps, nextState, nextContext) { - * return !equal(nextProps, this.props) || - * !equal(nextState, this.state) || - * !equal(nextContext, this.context); - * } - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @return {boolean} True if the component should update. - * @optional - */ - shouldComponentUpdate: 'DEFINE_ONCE', + if (length > 0) { + switch (second) { + case DOCUMENT: + case MEDIA: + case SUPPORTS: { + child = chars + '{' + child + '}' + break + } + case KEYFRAME: { + chars = chars.replace(keyframeptn, '$1 $2' + (keyed > 0 ? key : '')) + child = chars + '{' + child + '}' + child = '@' + (vendor > 0 ? webkit + child + '@' + child : child) + break + } + default: { + child = chars + child + } + } + } else { + child = '' + } - /** - * Invoked when the component is about to update due to a transition from - * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` - * and `nextContext`. - * - * Use this as an opportunity to perform preparation before an update occurs. - * - * NOTE: You **cannot** use `this.setState()` in this method. - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @param {ReactReconcileTransaction} transaction - * @optional - */ - componentWillUpdate: 'DEFINE_MANY', + break + } + // selector + default: { + child = compile(current, select(current, chars, invert), child, id) + } + } - /** - * Invoked when the component's DOM representation has been updated. - * - * Use this as an opportunity to operate on the DOM when the component has - * been updated. - * - * @param {object} prevProps - * @param {?object} prevState - * @param {?object} prevContext - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidUpdate: 'DEFINE_MANY', + children += child - /** - * Invoked when the component is about to be removed from its parent and have - * its DOM representation destroyed. - * - * Use this as an opportunity to deallocate any external resources. - * - * NOTE: There is no `componentDidUnmount` since your component will have been - * destroyed by that point. - * - * @optional - */ - componentWillUnmount: 'DEFINE_MANY', + // reset + context = 0 + insert = 0 + pseudo = 0 + format = 0 + invert = 0 + atrule = 0 + chars = '' + child = '' - // ==== Advanced methods ==== + code = body.charCodeAt(++caret) + break + } + case CLOSEBRACES: + case SEMICOLON: { + chars = (format > 0 ? chars.replace(formatptn, '') : chars).trim() + + if (code !== CLOSEBRACES || chars.length > 0) { + // monkey-patch missing colon + if (pseudo === 0) { + first = chars.charCodeAt(0) - /** - * Updates the component's currently mounted DOM representation. - * - * By default, this implements React's rendering and reconciliation algorithm. - * Sophisticated clients may wish to override this. - * - * @param {ReactReconcileTransaction} transaction - * @internal - * @overridable - */ - updateComponent: 'OVERRIDE_BASE' + // first character is a letter or dash, buffer has a space character + if ((first === DASH || first > 96 && first < 123) && chars.indexOf(' ')) { + chars = chars.replace(' ', ': ') + } + } -}; + // execute plugins, property context + if (plugged > 0) { + if ((result = proxy(PROPS, chars, current, parent, line, column, out.length, id)) !== void 0) { + if ((chars = result.trim()).length === 0) { + chars = '\0\0' + } + } + } -/** - * Mapping from class specification keys to special processing functions. - * - * Although these are declared like instance properties in the specification - * when defining classes using `React.createClass`, they are actually static - * and are accessible on the constructor instead of the prototype. Despite - * being static, they must be defined outside of the "statics" key under - * which all other static methods are defined. - */ -var RESERVED_SPEC_KEYS = { - displayName: function (Constructor, displayName) { - Constructor.displayName = displayName; - }, - mixins: function (Constructor, mixins) { - if (mixins) { - for (var i = 0; i < mixins.length; i++) { - mixSpecIntoComponent(Constructor, mixins[i]); - } - } - }, - childContextTypes: function (Constructor, childContextTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, childContextTypes, 'childContext'); - } - Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); - }, - contextTypes: function (Constructor, contextTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, contextTypes, 'context'); - } - Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); - }, - /** - * Special case getDefaultProps which should move into statics but requires - * automatic merging. - */ - getDefaultProps: function (Constructor, getDefaultProps) { - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps); - } else { - Constructor.getDefaultProps = getDefaultProps; - } - }, - propTypes: function (Constructor, propTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, propTypes, 'prop'); - } - Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); - }, - statics: function (Constructor, statics) { - mixStaticSpecIntoComponent(Constructor, statics); - }, - autobind: function () {} }; + first = chars.charCodeAt(0) + second = chars.charCodeAt(1) -function validateTypeDef(Constructor, typeDef, location) { - for (var propName in typeDef) { - if (typeDef.hasOwnProperty(propName)) { - // use a warning instead of an invariant so components - // don't show up in prod but only in __DEV__ - process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0; - } - } -} + switch (first + second) { + case NULL: { + break + } + case IMPORT: + case CHARSET: { + flat += chars + body.charAt(caret) + break + } + default: { + out += pseudo > 0 ? property(chars, first, second, chars.charCodeAt(2)) : chars + ';' + } + } + } -function validateMethodOverride(isAlreadyDefined, name) { - var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + // reset + context = 0 + insert = 0 + pseudo = 0 + format = 0 + invert = 0 + chars = '' - // Disallow overriding of base class methods unless explicitly allowed. - if (ReactClassMixin.hasOwnProperty(name)) { - !(specPolicy === 'OVERRIDE_BASE') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0; - } + caret++ + break + } + } + } - // Disallow defining methods more than once unless explicitly allowed. - if (isAlreadyDefined) { - !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0; - } -} + // parse characters + switch (code) { + case CARRIAGE: + case NEWLINE: { + // auto insert semicolon + if (comment + quote + parentheses + bracket + semicolon === 0) { + // valid non-whitespace characters that + // may precede a newline + switch (peak) { + case AT: + case TILDE: + case GREATERTHAN: + case STAR: + case PLUS: + case FOWARDSLASH: + case DASH: + case COLON: + case COMMA: + case SEMICOLON: + case OPENBRACES: + case CLOSEBRACES: { + break + } + default: { + // current buffer has a colon + if (pseudo > 0) { + insert = 1 + } + } + } + } -/** - * Mixin helper which handles policy validation and reserved - * specification keys when building React classes. - */ -function mixSpecIntoComponent(Constructor, spec) { - if (!spec) { - if (process.env.NODE_ENV !== 'production') { - var typeofSpec = typeof spec; - var isMixinValid = typeofSpec === 'object' && spec !== null; + // terminate line comment + if (comment === FOWARDSLASH) { + comment = 0 + } - process.env.NODE_ENV !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0; - } + // execute plugins, newline context + if (plugged * unkwn > 0) { + proxy(UNKWN, chars, current, parent, line, column, out.length, id) + } - return; - } + // next line, reset column position + column = 1 + line++ - !(typeof spec !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0; - !!ReactElement.isValidElement(spec) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0; + break + } + default: { + // increment column position + column++ - var proto = Constructor.prototype; - var autoBindPairs = proto.__reactAutoBindPairs; + // current character + char = body.charAt(caret) - // By handling mixins before any other properties, we ensure the same - // chaining order is applied to methods with DEFINE_MANY policy, whether - // mixins are listed before or after these methods in the spec. - if (spec.hasOwnProperty(MIXINS_KEY)) { - RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); - } + if (code === TAB && quote === 0) { + switch (tail) { + case TAB: + case SPACE: { + char = '' + break + } + default: { + char = parentheses === 0 ? '' : ' ' + } + } + } + + // remove comments, escape functions, strings, attributes and prepare selectors + switch (code) { + // escape breaking control characters + case NULL: { + char = '\\0' + break + } + case FORMFEED: { + char = '\\f' + break + } + case VERTICALTAB: { + char = '\\v' + break + } + // & + case AND: { + // inverted selector pattern i.e html & + if (quote + comment + bracket === 0 && cascade > 0) { + invert = 1 + format = 1 + char = '\f' + char + } + break + } + // ::paceholder, l + // :read-ony, l + case 108: { + if (quote + comment + bracket + pattern === 0 && pseudo > 0) { + switch (caret - pseudo) { + // ::placeholder + case 2: { + if (tail === PLACEHOLDER && body.charCodeAt(caret-3) === COLON) { + pattern = tail + } + } + // :read-only + case 8: { + if (trail === READONLY) { + pattern = trail + } + } + } + } + break + } + // : + case COLON: { + if (quote + comment + bracket === 0) { + pseudo = caret + } + break + } + // selectors + case COMMA: { + if (comment + parentheses + quote + bracket === 0) { + format = 1 + char += '\r' + } + break + } + // quotes + case DOUBLEQUOTE: { + if (comment === 0) { + quote = quote === code ? 0 : (quote === 0 ? code : quote) + // " last character, add synthetic padding + if (caret === eol) { + eol++ + eof++ + } + } + break + } + case SINGLEQUOTE: { + if (comment === 0) { + quote = quote === code ? 0 : (quote === 0 ? code : quote) + // ' last character, add synthetic padding + if (caret === eol) { + eol++ + eof++ + } + } + break + } + // attributes + case OPENBRACKET: { + if (quote + comment + parentheses === 0) { + bracket++ + } + break + } + case CLOSEBRACKET: { + if (quote + comment + parentheses === 0) { + bracket-- + } + break + } + // functions + case CLOSEPARENTHESES: { + if (quote + comment + bracket === 0) { + // ) last character, add synthetic padding + if (caret === eol) { + eol++ + eof++ + } - for (var name in spec) { - if (!spec.hasOwnProperty(name)) { - continue; - } + parentheses-- + } + break + } + case OPENPARENTHESES: { + if (quote + comment + bracket === 0) { + if (context === 0) { + switch (tail*2 + trail*3) { + // :matches + case 533: { + break + } + // :global, :not, :nth-child etc... + default: { + counter = 0 + context = 1 + } + } + } - if (name === MIXINS_KEY) { - // We have already handled mixins in a special case above. - continue; - } + parentheses++ + } + break + } + case AT: { + if (comment + parentheses + quote + bracket + pseudo + atrule === 0) { + atrule = 1 + } + break + } + // block/line comments + case STAR: + case FOWARDSLASH: { + if (quote + bracket + parentheses > 0) { + break + } - var property = spec[name]; - var isAlreadyDefined = proto.hasOwnProperty(name); - validateMethodOverride(isAlreadyDefined, name); + switch (comment) { + // initialize line/block comment context + case 0: { + switch (code*2 + body.charCodeAt(caret+1)*3) { + // // + case 235: { + comment = FOWARDSLASH + break + } + // /* + case 220: { + comment = STAR + break + } + } + break + } + // end block comment context + case STAR: { + if (code === FOWARDSLASH && tail === STAR) { + char = '' + comment = 0 + } + } + } + } + } - if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { - RESERVED_SPEC_KEYS[name](Constructor, property); - } else { - // Setup methods on prototype: - // The following member methods should not be automatically bound: - // 1. Expected ReactClass methods (in the "interface"). - // 2. Overridden methods (that were mixed in). - var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); - var isFunction = typeof property === 'function'; - var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + // ignore comment blocks + if (comment === 0) { + // aggressive isolation mode, divide each individual selector + // including selectors in :not function but excluding selectors in :global function + if (cascade + quote + bracket + atrule === 0 && id !== KEYFRAME && code !== SEMICOLON) { + switch (code) { + case COMMA: + case TILDE: + case GREATERTHAN: + case PLUS: + case CLOSEPARENTHESES: + case OPENPARENTHESES: { + if (context === 0) { + // outside of an isolated context i.e nth-child(<...>) + switch (tail) { + case TAB: + case SPACE: + case NEWLINE: + case CARRIAGE: { + char = char + '\0' + break + } + default: { + char = '\0' + char + (code === COMMA ? '' : '\0') + } + } + format = 1 + } else { + // within an isolated context, sleep untill it's terminated + switch (code) { + case OPENPARENTHESES: { + context = ++counter + break + } + case CLOSEPARENTHESES: { + if ((context = --counter) === 0) { + format = 1 + char += '\0' + } + break + } + } + } + break + } + case SPACE: { + switch (tail) { + case NULL: + case OPENBRACES: + case CLOSEBRACES: + case SEMICOLON: + case COMMA: + case FORMFEED: + case TAB: + case SPACE: + case NEWLINE: + case CARRIAGE: { + break + } + default: { + // ignore in isolated contexts + if (context === 0) { + format = 1 + char += '\0' + } + } + } + } + } + } - if (shouldAutoBind) { - autoBindPairs.push(name, property); - proto[name] = property; - } else { - if (isAlreadyDefined) { - var specPolicy = ReactClassInterface[name]; + // concat buffer of characters + chars += char - // These cases should already be caught by validateMethodOverride. - !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0; + // previous non-whitespace character code + if (code !== SPACE) { + peak = code + } + } + } + } - // For methods which are defined more than once, call the existing - // methods before calling the new property, merging if appropriate. - if (specPolicy === 'DEFINE_MANY_MERGED') { - proto[name] = createMergedResultFunction(proto[name], property); - } else if (specPolicy === 'DEFINE_MANY') { - proto[name] = createChainedFunction(proto[name], property); - } - } else { - proto[name] = property; - if (process.env.NODE_ENV !== 'production') { - // Add verbose displayName to the function, which helps when looking - // at profiling tools. - if (typeof property === 'function' && spec.displayName) { - proto[name].displayName = spec.displayName + '_' + name; - } - } - } - } - } - } -} + // tail character codes + trail = tail + tail = code -function mixStaticSpecIntoComponent(Constructor, statics) { - if (!statics) { - return; - } - for (var name in statics) { - var property = statics[name]; - if (!statics.hasOwnProperty(name)) { - continue; - } + // visit every character + caret++ + } - var isReserved = name in RESERVED_SPEC_KEYS; - !!isReserved ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0; + length = out.length - var isInherited = name in Constructor; - !!isInherited ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0; - Constructor[name] = property; - } -} + // preserve empty selector + if (preserve > 0) { + if (length === 0 && children.length === 0 && (current[0].length === 0) === false) { + if (id !== MEDIA || (current.length === 1 && (cascade > 0 ? nscopealt : nscope) === current[0])) { + length = current.join(',').length + 2 + } + } + } -/** - * Merge two objects, but throw if both contain the same key. - * - * @param {object} one The first object, which is mutated. - * @param {object} two The second object - * @return {object} one after it has been mutated to contain everything in two. - */ -function mergeIntoWithNoDuplicateKeys(one, two) { - !(one && two && typeof one === 'object' && typeof two === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0; + if (length > 0) { + // cascade isolation mode + if (cascade === 0 && id !== KEYFRAME) { + isolate(current) + } - for (var key in two) { - if (two.hasOwnProperty(key)) { - !(one[key] === undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0; - one[key] = two[key]; - } - } - return one; -} + // execute plugins, block context + if (plugged > 0) { + result = proxy(BLCKS, out, current, parent, line, column, length, id) -/** - * Creates a function that invokes two functions and merges their return values. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ -function createMergedResultFunction(one, two) { - return function mergedResult() { - var a = one.apply(this, arguments); - var b = two.apply(this, arguments); - if (a == null) { - return b; - } else if (b == null) { - return a; - } - var c = {}; - mergeIntoWithNoDuplicateKeys(c, a); - mergeIntoWithNoDuplicateKeys(c, b); - return c; - }; -} + if (result !== void 0 && (out = result).length === 0) { + return flat + out + children + } + } -/** - * Creates a function that invokes two functions and ignores their return vales. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ -function createChainedFunction(one, two) { - return function chainedFunction() { - one.apply(this, arguments); - two.apply(this, arguments); - }; -} + out = current.join(',') + '{' + out + '}' -/** - * Binds a method to the component. - * - * @param {object} component Component whose method is going to be bound. - * @param {function} method Method to be bound. - * @return {function} The bound method. - */ -function bindAutoBindMethod(component, method) { - var boundMethod = method.bind(component); - if (process.env.NODE_ENV !== 'production') { - boundMethod.__reactBoundContext = component; - boundMethod.__reactBoundMethod = method; - boundMethod.__reactBoundArguments = null; - var componentName = component.constructor.displayName; - var _bind = boundMethod.bind; - boundMethod.bind = function (newThis) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } + if (vendor*pattern > 0) { + switch (pattern) { + // ::read-only + case READONLY: { + out = out.replace(readonlyptn, ':'+moz+'$1')+out + break + } + // ::placeholder + case PLACEHOLDER: { + out = ( + out.replace(plcholdrptn, '::' + webkit + 'input-$1') + + out.replace(plcholdrptn, '::' + moz + '$1') + + out.replace(plcholdrptn, ':' + ms + 'input-$1') + out + ) + break + } + } + pattern = 0 + } + } - // User is trying to bind() an autobound method; we effectively will - // ignore the value of "this" that the user is trying to use, so - // let's warn. - if (newThis !== component && newThis !== null) { - process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0; - } else if (!args.length) { - process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0; - return boundMethod; - } - var reboundMethod = _bind.apply(boundMethod, arguments); - reboundMethod.__reactBoundContext = component; - reboundMethod.__reactBoundMethod = method; - reboundMethod.__reactBoundArguments = args; - return reboundMethod; - }; - } - return boundMethod; -} + return flat + out + children + } -/** - * Binds all auto-bound methods in a component. - * - * @param {object} component Component whose method is going to be bound. - */ -function bindAutoBindMethods(component) { - var pairs = component.__reactAutoBindPairs; - for (var i = 0; i < pairs.length; i += 2) { - var autoBindKey = pairs[i]; - var method = pairs[i + 1]; - component[autoBindKey] = bindAutoBindMethod(component, method); - } -} + /** + * Select + * + * @param {Array} parent + * @param {string} current + * @param {number} invert + * @return {Array} + */ + function select (parent, current, invert) { + var selectors = current.trim().split(selectorptn) + var out = selectors -/** - * Add more to the ReactClass base class. These are all legacy features and - * therefore not already part of the modern ReactComponent. - */ -var ReactClassMixin = { + var length = selectors.length + var l = parent.length - /** - * TODO: This will be deprecated because state should always keep a consistent - * type signature and the only use case for this, is to avoid that. - */ - replaceState: function (newState, callback) { - this.updater.enqueueReplaceState(this, newState); - if (callback) { - this.updater.enqueueCallback(this, callback, 'replaceState'); - } - }, + switch (l) { + // 0-1 parent selectors + case 0: + case 1: { + for (var i = 0, selector = l === 0 ? '' : parent[0] + ' '; i < length; i++) { + out[i] = scope(selector, out[i], invert, l).trim() + } + break + } + // >2 parent selectors, nested + default: { + for (var i = 0, j = 0, out = []; i < length; i++) { + for (var k = 0; k < l; k++) { + out[j++] = scope(parent[k] + ' ', selectors[i], invert, l).trim() + } + } + } + } - /** - * Checks whether or not this composite component is mounted. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - isMounted: function () { - return this.updater.isMounted(this); - } -}; + return out + } -var ReactClassComponent = function () {}; -_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + /** + * Scope + * + * @param {string} parent + * @param {string} current + * @param {number} invert + * @param {number} level + * @return {string} + */ + function scope (parent, current, invert, level) { + var selector = current + var code = selector.charCodeAt(0) -var didWarnDeprecated = false; + // trim leading whitespace + if (code < 33) { + code = (selector = selector.trim()).charCodeAt(0) + } -/** - * Module for creating composite components. - * - * @class ReactClass - */ -var ReactClass = { + switch (code) { + // & + case AND: { + switch (cascade + level) { + case 0: + case 1: { + if (parent.trim().length === 0) { + break + } + } + default: { + return selector.replace(andptn, '$1'+parent.trim()) + } + } + break + } + // : + case COLON: { + switch (selector.charCodeAt(1)) { + // g in :global + case 103: { + if (escape > 0 && cascade > 0) { + return selector.replace(escapeptn, '$1').replace(andptn, '$1'+nscope) + } + break + } + default: { + // :hover + return parent.trim() + selector + } + } + } + default: { + // html & + if (invert*cascade > 0 && selector.indexOf('\f') > 0) { + return selector.replace(andptn, (parent.charCodeAt(0) === COLON ? '' : '$1')+parent.trim()) + } + } + } - /** - * Creates a composite component class given a class specification. - * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass - * - * @param {object} spec Class specification (which must define `render`). - * @return {function} Component constructor function. - * @public - */ - createClass: function (spec) { - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(didWarnDeprecated, '%s: React.createClass is deprecated and will be removed in version 16. ' + 'Use plain JavaScript classes instead. If you\'re not yet ready to ' + 'migrate, create-react-class is available on npm as a ' + 'drop-in replacement.', spec && spec.displayName || 'A Component') : void 0; - didWarnDeprecated = true; - } + return parent + selector + } - // To keep our warnings more understandable, we'll use a little hack here to - // ensure that Constructor.name !== 'Constructor'. This makes sure we don't - // unnecessarily identify a class without displayName as 'Constructor'. - var Constructor = identity(function (props, context, updater) { - // This constructor gets overridden by mocks. The argument is used - // by mocks to assert on what gets mounted. + /** + * Property + * + * @param {string} input + * @param {number} first + * @param {number} second + * @param {number} third + * @return {string} + */ + function property (input, first, second, third) { + var out = input + ';' + var index = 0 + var hash = (first*2) + (second*3) + (third*4) + var cache - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0; - } + // animation: a, n, i characters + if (hash === 944) { + out = animation(out) + } else if (vendor > 0) { + // vendor prefix + switch (hash) { + // color/column, c, o, l + case 963: { + // column + if (out.charCodeAt(5) === 110) { + out = webkit + out + out + } + break + } + // appearance: a, p, p + case 978: { + out = webkit + out + moz + out + out + break + } + // hyphens: h, y, p + // user-select: u, s, e + case 1019: + case 983: { + out = webkit + out + moz + out + ms + out + out + break + } + // background/backface-visibility, b, a, c + case 883: { + // backface-visibility, - + if (out.charCodeAt(8) === DASH) { + out = webkit + out + out + } + break + } + // flex: f, l, e + case 932: { + out = webkit + out + ms + out + out + break + } + // order: o, r, d + case 964: { + out = webkit + out + ms + 'flex' + '-' + out + out + break + } + // justify-content, j, u, s + case 1023: { + cache = out.substring(out.indexOf(':', 15)).replace('flex-', '') + out = webkit + 'box-pack' + cache + webkit + out + ms + 'flex-pack' + cache + out + break + } + // display(flex/inline-flex/inline-box): d, i, s + case 975: { + index = (out = input).length-10 + cache = (out.charCodeAt(index) === 33 ? out.substring(0, index) : out).substring(8).trim() + + switch (hash = cache.charCodeAt(0) + (cache.charCodeAt(7)|0)) { + // inline- + case 203: { + // inline-box + if (cache.charCodeAt(8) > 110) { + out = out.replace(cache, webkit+cache)+';'+out + } + break + } + // inline-flex + // flex + case 207: + case 102: { + out = ( + out.replace(cache, webkit+(hash > 102 ? 'inline-' : '')+'box')+';'+ + out.replace(cache, webkit+cache)+';'+ + out.replace(cache, ms+cache+'box')+';'+ + out + ) + } + } + + out += ';' + break + } + // align-items, align-center, align-self: a, l, i, - + case 938: { + if (out.charCodeAt(5) === DASH) { + switch (out.charCodeAt(6)) { + // align-items, i + case 105: { + cache = out.replace('-items', '') + out = webkit + out + webkit + 'box-' + cache + ms + 'flex-' + cache + out + break + } + // align-self, s + case 115: { + out = webkit + out + ms + 'flex-item-' + out.replace('-self', '') + out + break + } + // align-content + default: { + out = webkit + out + ms + 'flex-line-pack' + out.replace('align-content', '') + out + } + } + } + break + } + // cursor, c, u, r + case 1005: { + if (cursorptn.test(out)) { + out = out.replace(colonptn, ': ' + webkit) + out.replace(colonptn, ': ' + moz) + out + } + break + } + // width: min-content / width: max-content + case 953: { + if ((index = out.indexOf('-content', 9)) > 0) { + // width: min-content / width: max-content + cache = out.substring(index - 3) + out = 'width:' + webkit + cache + 'width:' + moz + cache + 'width:' + cache + } + break + } + // text-size-adjust: t, e, x + case 1015: { + if (input.charCodeAt(9) !== DASH) { + break + } + } + // transform, transition: t, r, a + case 962: { + out = webkit + out + (out.charCodeAt(5) === 102 ? ms + out : '') + out - // Wire up auto-binding - if (this.__reactAutoBindPairs.length) { - bindAutoBindMethods(this); - } + // transitions + if (second + third === 211 && out.charCodeAt(13) === 105 && out.indexOf('transform', 10) > 0) { + out = out.substring(0, out.indexOf(';', 27) + 1).replace(transformptn, '$1' + webkit + '$2') + out + } - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; + break + } + // writing-mode, w, r, i + case 1000: { + cache = out.substring(13).trim() + index = cache.indexOf('-')+1 + + switch (cache.charCodeAt(0)+cache.charCodeAt(index)) { + // vertical-lr + case 226: { + cache = out.replace(writingptn, 'tb') + break + } + // vertical-rl + case 232: { + cache = out.replace(writingptn, 'tb-rl') + break + } + // horizontal-tb + case 220: { + cache = out.replace(writingptn, 'lr') + break + } + default: { + return out + } + } - this.state = null; + out = webkit+out+ms+cache+out + break + } + } + } - // ReactClasses doesn't have constructors. Instead, they use the - // getInitialState and componentWillMount methods for initialization. + return out + } - var initialState = this.getInitialState ? this.getInitialState() : null; - if (process.env.NODE_ENV !== 'production') { - // We allow auto-mocks to proceed as if they're returning null. - if (initialState === undefined && this.getInitialState._isMockFunction) { - // This is probably bad practice. Consider warning here and - // deprecating this convenience. - initialState = null; - } - } - !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0; + /** + * Animation + * + * @param {string} input + * @return {string} + */ + function animation (input) { + var length = input.length + var index = input.indexOf(':', 9) + 1 + var declare = input.substring(0, index).trim() + var body = input.substring(index, length-1).trim() + var out = '' - this.state = initialState; - }); - Constructor.prototype = new ReactClassComponent(); - Constructor.prototype.constructor = Constructor; - Constructor.prototype.__reactAutoBindPairs = []; + // shorthand + if (input.charCodeAt(9) !== DASH) { + // split in case of multiple animations + var list = body.split(animationptn) - injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + for (var i = 0, index = 0, length = list.length; i < length; index = 0, i++) { + var value = list[i] + var items = value.split(propertiesptn) - mixSpecIntoComponent(Constructor, spec); + while (value = items[index]) { + var peak = value.charCodeAt(0) - // Initialize the defaultProps property after all mixins have been merged. - if (Constructor.getDefaultProps) { - Constructor.defaultProps = Constructor.getDefaultProps(); - } + if (keyed === 1 && ( + // letters + (peak > AT && peak < 90) || (peak > 96 && peak < 123) || peak === UNDERSCORE || + // dash but not in sequence i.e -- + (peak === DASH && value.charCodeAt(1) !== DASH) + )) { + // not a number/function + switch (isNaN(parseFloat(value)) + (value.indexOf('(') !== -1)) { + case 1: { + switch (value) { + // not a valid reserved keyword + case 'infinite': case 'alternate': case 'backwards': case 'running': + case 'normal': case 'forwards': case 'both': case 'none': case 'linear': + case 'ease': case 'ease-in': case 'ease-out': case 'ease-in-out': + case 'paused': case 'reverse': case 'alternate-reverse': case 'inherit': + case 'initial': case 'unset': case 'step-start': case 'step-end': { + break + } + default: { + value += key + } + } + } + } + } - if (process.env.NODE_ENV !== 'production') { - // This is a tag to indicate that the use of these method names is ok, - // since it's used with createClass. If it's not, then it's likely a - // mistake so we'll warn you to use the static property, property - // initializer or constructor respectively. - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps.isReactClassApproved = {}; - } - if (Constructor.prototype.getInitialState) { - Constructor.prototype.getInitialState.isReactClassApproved = {}; - } - } + items[index++] = value + } - !Constructor.prototype.render ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0; + out += (i === 0 ? '' : ',') + items.join(' ') + } + } else { + // animation-name, n + out += input.charCodeAt(10) === 110 ? body + (keyed === 1 ? key : '') : body + } - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0; - process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0; - } + out = declare + out + ';' - // Reduce time spent doing lookups by setting these on the prototype. - for (var methodName in ReactClassInterface) { - if (!Constructor.prototype[methodName]) { - Constructor.prototype[methodName] = null; - } - } + return vendor > 0 ? webkit + out + out : out + } - return Constructor; - }, + /** + * Isolate + * + * @param {Array} selectors + */ + function isolate (selectors) { + for (var i = 0, length = selectors.length, padding, element; i < length; i++) { + // split individual elements in a selector i.e h1 h2 === [h1, h2] + var elements = selectors[i].split(elementptn) + var out = '' - injection: { - injectMixin: function (mixin) { - injectedMixins.push(mixin); - } - } + for (var j = 0, size = 0, tail = 0, code = 0, l = elements.length; j < l; j++) { + // empty element + if ((size = (element = elements[j]).length) === 0 && l > 1) { + continue + } -}; + tail = out.charCodeAt(out.length-1) + code = element.charCodeAt(0) + padding = '' -module.exports = ReactClass; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + if (j !== 0) { + // determine if we need padding + switch (tail) { + case STAR: + case TILDE: + case GREATERTHAN: + case PLUS: + case SPACE: + case OPENPARENTHESES: { + break + } + default: { + padding = ' ' + } + } + } -/***/ }), -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { + switch (code) { + case AND: { + element = padding + nscopealt + } + case TILDE: + case GREATERTHAN: + case PLUS: + case SPACE: + case CLOSEPARENTHESES: + case OPENPARENTHESES: { + break + } + case OPENBRACKET: { + element = padding + element + nscopealt + break + } + case COLON: { + switch (element.charCodeAt(1)*2 + element.charCodeAt(2)*3) { + // :global + case 530: { + if (escape > 0) { + element = padding + element.substring(8, size - 1) + break + } + } + // :hover, :nth-child(), ... + default: { + if (j < 1 || elements[j-1].length < 1) { + element = padding + nscopealt + element + } + } + } + break + } + case COMMA: { + padding = '' + } + default: { + if (size > 1 && element.indexOf(':') > 0) { + element = padding + element.replace(pseudoptn, '$1' + nscopealt + '$2') + } else { + element = padding + element + nscopealt + } + } + } -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + out += element + } + selectors[i] = out.replace(formatptn, '').trim() + } + } + /** + * Proxy + * + * @param {number} context + * @param {string} content + * @param {Array} selectors + * @param {Array} parents + * @param {number} line + * @param {number} column + * @param {number} length + * @param {number} id + * @return {(string|void|*)} + */ + function proxy (context, content, selectors, parents, line, column, length, id) { + for (var i = 0, out = content, next; i < plugged; i++) { + switch (next = plugins[i].call(stylis, context, out, selectors, parents, line, column, length, id)) { + case void 0: + case false: + case true: + case null: { + break + } + default: { + out = next + } + } + } -var ReactElement = __webpack_require__(6); + switch (out) { + case void 0: + case false: + case true: + case null: + case content: { + break + } + default: { + return out + } + } + } -/** - * Create a factory that creates HTML tag elements. - * - * @private - */ -var createDOMFactory = ReactElement.createFactory; -if (process.env.NODE_ENV !== 'production') { - var ReactElementValidator = __webpack_require__(19); - createDOMFactory = ReactElementValidator.createFactory; -} + /** + * Minify + * + * @param {(string|*)} output + * @return {string} + */ + function minify (output) { + return output + .replace(formatptn, '') + .replace(beforeptn, '') + .replace(afterptn, '$1') + .replace(tailptn, '$1') + .replace(whiteptn, ' ') + } -/** - * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. - * This is also accessible via `React.DOM`. - * - * @public - */ -var ReactDOMFactories = { - a: createDOMFactory('a'), - abbr: createDOMFactory('abbr'), - address: createDOMFactory('address'), - area: createDOMFactory('area'), - article: createDOMFactory('article'), - aside: createDOMFactory('aside'), - audio: createDOMFactory('audio'), - b: createDOMFactory('b'), - base: createDOMFactory('base'), - bdi: createDOMFactory('bdi'), - bdo: createDOMFactory('bdo'), - big: createDOMFactory('big'), - blockquote: createDOMFactory('blockquote'), - body: createDOMFactory('body'), - br: createDOMFactory('br'), - button: createDOMFactory('button'), - canvas: createDOMFactory('canvas'), - caption: createDOMFactory('caption'), - cite: createDOMFactory('cite'), - code: createDOMFactory('code'), - col: createDOMFactory('col'), - colgroup: createDOMFactory('colgroup'), - data: createDOMFactory('data'), - datalist: createDOMFactory('datalist'), - dd: createDOMFactory('dd'), - del: createDOMFactory('del'), - details: createDOMFactory('details'), - dfn: createDOMFactory('dfn'), - dialog: createDOMFactory('dialog'), - div: createDOMFactory('div'), - dl: createDOMFactory('dl'), - dt: createDOMFactory('dt'), - em: createDOMFactory('em'), - embed: createDOMFactory('embed'), - fieldset: createDOMFactory('fieldset'), - figcaption: createDOMFactory('figcaption'), - figure: createDOMFactory('figure'), - footer: createDOMFactory('footer'), - form: createDOMFactory('form'), - h1: createDOMFactory('h1'), - h2: createDOMFactory('h2'), - h3: createDOMFactory('h3'), - h4: createDOMFactory('h4'), - h5: createDOMFactory('h5'), - h6: createDOMFactory('h6'), - head: createDOMFactory('head'), - header: createDOMFactory('header'), - hgroup: createDOMFactory('hgroup'), - hr: createDOMFactory('hr'), - html: createDOMFactory('html'), - i: createDOMFactory('i'), - iframe: createDOMFactory('iframe'), - img: createDOMFactory('img'), - input: createDOMFactory('input'), - ins: createDOMFactory('ins'), - kbd: createDOMFactory('kbd'), - keygen: createDOMFactory('keygen'), - label: createDOMFactory('label'), - legend: createDOMFactory('legend'), - li: createDOMFactory('li'), - link: createDOMFactory('link'), - main: createDOMFactory('main'), - map: createDOMFactory('map'), - mark: createDOMFactory('mark'), - menu: createDOMFactory('menu'), - menuitem: createDOMFactory('menuitem'), - meta: createDOMFactory('meta'), - meter: createDOMFactory('meter'), - nav: createDOMFactory('nav'), - noscript: createDOMFactory('noscript'), - object: createDOMFactory('object'), - ol: createDOMFactory('ol'), - optgroup: createDOMFactory('optgroup'), - option: createDOMFactory('option'), - output: createDOMFactory('output'), - p: createDOMFactory('p'), - param: createDOMFactory('param'), - picture: createDOMFactory('picture'), - pre: createDOMFactory('pre'), - progress: createDOMFactory('progress'), - q: createDOMFactory('q'), - rp: createDOMFactory('rp'), - rt: createDOMFactory('rt'), - ruby: createDOMFactory('ruby'), - s: createDOMFactory('s'), - samp: createDOMFactory('samp'), - script: createDOMFactory('script'), - section: createDOMFactory('section'), - select: createDOMFactory('select'), - small: createDOMFactory('small'), - source: createDOMFactory('source'), - span: createDOMFactory('span'), - strong: createDOMFactory('strong'), - style: createDOMFactory('style'), - sub: createDOMFactory('sub'), - summary: createDOMFactory('summary'), - sup: createDOMFactory('sup'), - table: createDOMFactory('table'), - tbody: createDOMFactory('tbody'), - td: createDOMFactory('td'), - textarea: createDOMFactory('textarea'), - tfoot: createDOMFactory('tfoot'), - th: createDOMFactory('th'), - thead: createDOMFactory('thead'), - time: createDOMFactory('time'), - title: createDOMFactory('title'), - tr: createDOMFactory('tr'), - track: createDOMFactory('track'), - u: createDOMFactory('u'), - ul: createDOMFactory('ul'), - 'var': createDOMFactory('var'), - video: createDOMFactory('video'), - wbr: createDOMFactory('wbr'), + /** + * Use + * + * @param {(Array|function(...?)|number|void)?} plugin + */ + function use (plugin) { + switch (plugin) { + case void 0: + case null: { + plugged = plugins.length = 0 + break + } + default: { + switch (plugin.constructor) { + case Array: { + for (var i = 0, length = plugin.length; i < length; i++) { + use(plugin[i]) + } + break + } + case Function: { + plugins[plugged++] = plugin + break + } + case Boolean: { + unkwn = !!plugin|0 + } + } + } + } - // SVG - circle: createDOMFactory('circle'), - clipPath: createDOMFactory('clipPath'), - defs: createDOMFactory('defs'), - ellipse: createDOMFactory('ellipse'), - g: createDOMFactory('g'), - image: createDOMFactory('image'), - line: createDOMFactory('line'), - linearGradient: createDOMFactory('linearGradient'), - mask: createDOMFactory('mask'), - path: createDOMFactory('path'), - pattern: createDOMFactory('pattern'), - polygon: createDOMFactory('polygon'), - polyline: createDOMFactory('polyline'), - radialGradient: createDOMFactory('radialGradient'), - rect: createDOMFactory('rect'), - stop: createDOMFactory('stop'), - svg: createDOMFactory('svg'), - text: createDOMFactory('text'), - tspan: createDOMFactory('tspan') -}; + return use + } -module.exports = ReactDOMFactories; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + /** + * Set + * + * @param {*} options + */ + function set (options) { + for (var name in options) { + var value = options[name] + switch (name) { + case 'keyframe': keyed = value|0; break + case 'global': escape = value|0; break + case 'cascade': cascade = value|0; break + case 'compress': compress = value|0; break + case 'prefix': vendor = value|0; break + case 'semicolon': semicolon = value|0; break + case 'preserve': preserve = value|0; break + } + } -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { + return set + } -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + /** + * Stylis + * + * @param {string} selector + * @param {string} input + * @return {*} + */ + function stylis (selector, input) { + if (this !== void 0 && this.constructor === stylis) { + return factory(selector) + } + // setup + var ns = selector + var code = ns.charCodeAt(0) + // trim leading whitespace + if (code < 33) { + code = (ns = ns.trim()).charCodeAt(0) + } -var _require = __webpack_require__(6), - isValidElement = _require.isValidElement; + // keyframe/animation namespace + if (keyed > 0) { + key = ns.replace(invalidptn, code === OPENBRACKET ? '' : '-') + } -var factory = __webpack_require__(40); + // reset, used to assert if a plugin is moneky-patching the return value + code = 1 -module.exports = factory(isValidElement); + // cascade/isolate + if (cascade === 1) { + nscope = ns + } else { + nscopealt = ns + } -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { + var selectors = [nscope] + var result -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ + // execute plugins, pre-process context + if (plugged > 0) { + result = proxy(PREPS, input, selectors, selectors, line, column, 0, 0) + if (result !== void 0 && typeof result === 'string') { + input = result + } + } + // build + var output = compile(array, selectors, input, 0) -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + // execute plugins, post-process context + if (plugged > 0) { + result = proxy(POSTS, output, selectors, selectors, line, column, output.length, 0) + + // bypass minification + if (result !== void 0 && typeof(output = result) !== 'string') { + code = 0 + } + } -module.exports = ReactPropTypesSecret; + // reset + key = '' + nscope = '' + nscopealt = '' + pattern = 0 + line = 1 + column = 1 -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { + return compress*code === 0 ? output : minify(output) + } -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + stylis['use'] = use + stylis['set'] = set + if (options !== void 0) { + set(options) + } + return stylis +})); -var _assign = __webpack_require__(9); -var ReactComponent = __webpack_require__(14); -var ReactNoopUpdateQueue = __webpack_require__(16); +/***/ }), +/* 44 */ +/***/ (function(module, exports) { -var emptyObject = __webpack_require__(12); +module.exports = isFunction -/** - * Base class helpers for the updating state of a component. - */ -function ReactPureComponent(props, context, updater) { - // Duplicated from ReactComponent. - this.props = props; - this.context = context; - this.refs = emptyObject; - // We initialize the default updater but the real one gets injected by the - // renderer. - this.updater = updater || ReactNoopUpdateQueue; -} +var toString = Object.prototype.toString -function ComponentDummy() {} -ComponentDummy.prototype = ReactComponent.prototype; -ReactPureComponent.prototype = new ComponentDummy(); -ReactPureComponent.prototype.constructor = ReactPureComponent; -// Avoid an extra prototype jump for these methods. -_assign(ReactPureComponent.prototype, ReactComponent.prototype); -ReactPureComponent.prototype.isPureReactComponent = true; +function isFunction (fn) { + var string = toString.call(fn) + return string === '[object Function]' || + (typeof fn === 'function' && string !== '[object RegExp]') || + (typeof window !== 'undefined' && + // IE8 and below + (fn === window.setTimeout || + fn === window.alert || + fn === window.confirm || + fn === window.prompt)) +}; -module.exports = ReactPureComponent; /***/ }), -/* 51 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ +var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true +}; + +var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true +}; + +var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + +module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) { + + } + } + } + } + + return targetComponent; +}; -module.exports = '15.5.4'; /***/ }), -/* 52 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _prodInvariant = __webpack_require__(7); +var _react = __webpack_require__(3); -var ReactPropTypeLocationNames = __webpack_require__(20); -var ReactPropTypesSecret = __webpack_require__(49); +var _react2 = _interopRequireDefault(_react); -var invariant = __webpack_require__(2); -var warning = __webpack_require__(1); +var _propTypes = __webpack_require__(4); -var ReactComponentTreeHook; +var _propTypes2 = _interopRequireDefault(_propTypes); -if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { - // Temporary hack. - // Inline requires don't work well with Jest: - // https://github.com/facebook/react/issues/7240 - // Remove the inline requires when we don't need them anymore: - // https://github.com/facebook/react/pull/7178 - ReactComponentTreeHook = __webpack_require__(15); -} +var _Bubble = __webpack_require__(47); -var loggedTypeFailures = {}; +var _Bubble2 = _interopRequireDefault(_Bubble); -/** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?object} element The React element that is being type-checked - * @param {?number} debugID The React component instance that is being type-checked - * @private - */ -function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var componentStackInfo = ''; +var BubbleLoader = function BubbleLoader(props) { + return _react2.default.createElement(_Bubble2.default, props); +}; - if (process.env.NODE_ENV !== 'production') { - if (!ReactComponentTreeHook) { - ReactComponentTreeHook = __webpack_require__(15); - } - if (debugID !== null) { - componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); - } else if (element !== null) { - componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); - } - } +BubbleLoader.propTypes = { + color: _propTypes2.default.string, + duration: _propTypes2.default.number, + size: _propTypes2.default.number +}; - process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; - } - } - } -} +BubbleLoader.defaultProps = { + color: '#000', + duration: 1.8, + size: 10 +}; -module.exports = checkReactTypeSpec; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +exports.default = BubbleLoader; /***/ }), -/* 53 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ -var _prodInvariant = __webpack_require__(7); +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _templateObject = _taggedTemplateLiteral(['\n 0%,\n 80%,\n 100% {\n box-shadow: 0 2.5em 0 -1.3em;\n }\n 40% {\n box-shadow: 0 2.5em 0 0;\n }\n'], ['\n 0%,\n 80%,\n 100% {\n box-shadow: 0 2.5em 0 -1.3em;\n }\n 40% {\n box-shadow: 0 2.5em 0 0;\n }\n']), + _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n animation-delay: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n color: ', '\n font-size: ', ';\n height: 2.5em;\n margin: 80px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 2.5em;\n\n &:before {\n animation: ', ';\n animation-delay: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n content: \'\';\n height: 2.5em;\n left: -3.5em;\n position: absolute;\n top: 0;\n width: 2.5em;\n }\n\n &:after {\n animation: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n content: \'\';\n height: 2.5em;\n left: 3.5em;\n position: absolute;\n top: 0;\n width: 2.5em;\n }\n'], ['\n animation: ', ';\n animation-delay: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n color: ', '\n font-size: ', ';\n height: 2.5em;\n margin: 80px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 2.5em;\n\n &:before {\n animation: ', ';\n animation-delay: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n content: \'\';\n height: 2.5em;\n left: -3.5em;\n position: absolute;\n top: 0;\n width: 2.5em;\n }\n\n &:after {\n animation: ', ';\n animation-fill-mode: both;\n border-radius: 50%;\n content: \'\';\n height: 2.5em;\n left: 3.5em;\n position: absolute;\n top: 0;\n width: 2.5em;\n }\n']); + +var _styledComponents = __webpack_require__(5); -var ReactElement = __webpack_require__(6); +var _styledComponents2 = _interopRequireDefault(_styledComponents); -var invariant = __webpack_require__(2); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Returns the first child in a collection of children and verifies that there - * is only one child in the collection. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only - * - * The current implementation of this function assumes that a single child gets - * passed without a wrapper, but the purpose of this helper function is to - * abstract away the particular structure of children. - * - * @param {?object} children Child collection structure. - * @return {ReactElement} The first and only `ReactElement` contained in the - * structure. - */ -function onlyChild(children) { - !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; - return children; -} +function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } -module.exports = onlyChild; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +var loading = (0, _styledComponents.keyframes)(_templateObject); + +var Bubble = _styledComponents2.default.div(_templateObject2, function (props) { + return loading + ' ' + props.duration + 's infinite ease-in-out;'; +}, function (props) { + return props.duration * -0.16 + 's'; +}, function (props) { + return props.color; +}, function (props) { + return props.size + 'px'; +}, function (props) { + return loading + ' ' + props.duration + 's infinite ease-in-out;'; +}, function (props) { + return props.duration * -0.32 + 's'; +}, function (props) { + return loading + ' ' + props.duration + 's infinite ease-in-out;'; +}); + +exports.default = Bubble; /***/ }), -/* 54 */ +/* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -var _prodInvariant = __webpack_require__(7); +Object.defineProperty(exports, "__esModule", { + value: true +}); -var ReactCurrentOwner = __webpack_require__(10); -var REACT_ELEMENT_TYPE = __webpack_require__(18); +var _react = __webpack_require__(3); -var getIteratorFn = __webpack_require__(21); -var invariant = __webpack_require__(2); -var KeyEscapeUtils = __webpack_require__(42); -var warning = __webpack_require__(1); +var _react2 = _interopRequireDefault(_react); -var SEPARATOR = '.'; -var SUBSEPARATOR = ':'; +var _propTypes = __webpack_require__(4); -/** - * This is inlined from ReactElement since this file is shared between - * isomorphic and renderers. We could extract this to a - * - */ +var _propTypes2 = _interopRequireDefault(_propTypes); -/** - * TODO: Test that a single child and an array with one item have the same key - * pattern. - */ +var _BubbleSpin = __webpack_require__(49); -var didWarnAboutMaps = false; +var _BubbleSpin2 = _interopRequireDefault(_BubbleSpin); -/** - * Generate a key string that identifies a component within a set. - * - * @param {*} component A component that could contain a manual key. - * @param {number} index Index that is used if a manual key is not provided. - * @return {string} - */ -function getComponentKey(component, index) { - // Do some typechecking here since we call this blindly. We want to ensure - // that we don't block potential future ES APIs. - if (component && typeof component === 'object' && component.key != null) { - // Explicit key - return KeyEscapeUtils.escape(component.key); - } - // Implicit key determined by the index in the set - return index.toString(36); -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * @param {?*} children Children tree container. - * @param {!string} nameSoFar Name of the key path so far. - * @param {!function} callback Callback to invoke with each child found. - * @param {?*} traverseContext Used to pass information throughout the traversal - * process. - * @return {!number} The number of children in this subtree. - */ -function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { - var type = typeof children; +var BubbleSpinLoader = function BubbleSpinLoader(props) { + return _react2.default.createElement(_BubbleSpin2.default, props); +}; - if (type === 'undefined' || type === 'boolean') { - // All of the above are perceived as null. - children = null; - } +BubbleSpinLoader.propTypes = { + color: _propTypes2.default.string, + duration: _propTypes2.default.number, + size: _propTypes2.default.number +}; - if (children === null || type === 'string' || type === 'number' || - // The following is inlined from ReactElement. This means we can optimize - // some checks. React Fiber also inlines this logic for similar purposes. - type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { - callback(traverseContext, children, - // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows. - nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); - return 1; - } +BubbleSpinLoader.defaultProps = { + color: '#000', + duration: 1.3, + size: 20 +}; - var child; - var nextName; - var subtreeCount = 0; // Count of children found in the current subtree. - var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; +exports.default = BubbleSpinLoader; - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getComponentKey(child, i); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } else { - var iteratorFn = getIteratorFn(children); - if (iteratorFn) { - var iterator = iteratorFn.call(children); - var step; - if (iteratorFn !== children.entries) { - var ii = 0; - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getComponentKey(child, ii++); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } else { - if (process.env.NODE_ENV !== 'production') { - var mapsAsChildrenAddendum = ''; - if (ReactCurrentOwner.current) { - var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); - if (mapsAsChildrenOwnerName) { - mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; - } - } - process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; - didWarnAboutMaps = true; - } - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - child = entry[1]; - nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } - } - } else if (type === 'object') { - var addendum = ''; - if (process.env.NODE_ENV !== 'production') { - addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; - if (children._isReactElement) { - addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.'; - } - if (ReactCurrentOwner.current) { - var name = ReactCurrentOwner.current.getName(); - if (name) { - addendum += ' Check the render method of `' + name + '`.'; - } - } - } - var childrenString = String(children); - true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; - } - } +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { - return subtreeCount; -} +"use strict"; -/** - * Traverses children that are typically specified as `props.children`, but - * might also be specified through attributes: - * - * - `traverseAllChildren(this.props.children, ...)` - * - `traverseAllChildren(this.props.leftPanelChildren, ...)` - * - * The `traverseContext` is an optional argument that is passed through the - * entire traversal. It can be used to store accumulations or anything else that - * the callback might find relevant. - * - * @param {?*} children Children tree object. - * @param {!function} callback To invoke upon traversing each child. - * @param {?*} traverseContext Context for traversal. - * @return {!number} The number of children in this subtree. - */ -function traverseAllChildren(children, callback, traverseContext) { - if (children == null) { - return 0; - } - return traverseAllChildrenImpl(children, '', callback, traverseContext); -} +Object.defineProperty(exports, "__esModule", { + value: true +}); -module.exports = traverseAllChildren; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +var _templateObject = _taggedTemplateLiteral(['\n 0%,\n 100% {\n box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 0;\n }\n 12.5% {\n box-shadow: 0 -3em 0 0, 2em -2em 0 0.2em, 3em 0 0 0, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;\n }\n 25% {\n box-shadow: 0 -3em 0 -0.5em, 2em -2em 0 0, 3em 0 0 0.2em, 2em 2em 0 0, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;\n }\n 37.5% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 0, 2em 2em 0 0.2em, 0 3em 0 0em, -2em 2em 0 -1em, -3em 0em 0 -1em, -2em -2em 0 -1em;\n }\n 50% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 0em, 0 3em 0 0.2em, -2em 2em 0 0, -3em 0em 0 -1em, -2em -2em 0 -1em;\n }\n 62.5% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 0, -2em 2em 0 0.2em, -3em 0 0 0, -2em -2em 0 -1em;\n }\n 75% {\n box-shadow: 0em -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0.2em, -2em -2em 0 0;\n }\n 87.5% {\n box-shadow: 0em -3em 0 0, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em;\n }\n'], ['\n 0%,\n 100% {\n box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 0;\n }\n 12.5% {\n box-shadow: 0 -3em 0 0, 2em -2em 0 0.2em, 3em 0 0 0, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;\n }\n 25% {\n box-shadow: 0 -3em 0 -0.5em, 2em -2em 0 0, 3em 0 0 0.2em, 2em 2em 0 0, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em;\n }\n 37.5% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 0, 2em 2em 0 0.2em, 0 3em 0 0em, -2em 2em 0 -1em, -3em 0em 0 -1em, -2em -2em 0 -1em;\n }\n 50% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 0em, 0 3em 0 0.2em, -2em 2em 0 0, -3em 0em 0 -1em, -2em -2em 0 -1em;\n }\n 62.5% {\n box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 0, -2em 2em 0 0.2em, -3em 0 0 0, -2em -2em 0 -1em;\n }\n 75% {\n box-shadow: 0em -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0.2em, -2em -2em 0 0;\n }\n 87.5% {\n box-shadow: 0em -3em 0 0, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em;\n }\n']), + _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n border-radius: 50%;\n color: ', ';\n font-size: ', ';\n height: 1em;\n margin: 100px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n'], ['\n animation: ', ';\n border-radius: 50%;\n color: ', ';\n font-size: ', ';\n height: 1em;\n margin: 100px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n']); -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { +var _styledComponents = __webpack_require__(5); -/* - * __ ___ - * _____/ /___ __/ (_)____ - * / ___/ __/ / / / / / ___/ - * (__ ) /_/ /_/ / / (__ ) - * /____/\__/\__, /_/_/____/ - * /____/ - * - * light - weight css preprocessor @licence MIT - */ -/* eslint-disable */ -(function (factory) { - true ? (module['exports'] = factory()) : - typeof define === 'function' && define['amd'] ? define(factory()) : - (window['stylis'] = factory()) -}(function () { +var _styledComponents2 = _interopRequireDefault(_styledComponents); - 'use strict' +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /** - * Notes - * - * The [''] pattern is used to support closure compiler - * the jsdoc signatures are also used to the same effect - * - * ---- - * - * int + int + int === n4 [faster] - * - * vs - * - * int === n1 && int === n2 && int === n3 - * - * ---- - * - * switch (int) { case ints...} [faster] - * - * vs - * - * if (int == 1 && int === 2 ...) - * - * ---- - * - * The (first*n1 + second*n2 + third*n3) format used in the property parser - * is a simple way to hash the sequence of characters - * taking into account the index they occur in - * since any number of 3 character sequences could produce duplicates. - * - * On the other hand sequences that are directly tied to the index of the character - * resolve a far more accurate measure, it's also faster - * to evaluate one condition in a switch statement - * than three in an if statement regardless of the added math. - * - * This allows the vendor prefixer to be both small and fast. - */ +function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - var nullptn = /^\0+/g /* matches leading null characters */ - var formatptn = /[\0\r\f]/g /* matches new line, null and formfeed characters */ - var colonptn = /: */g /* splits animation rules */ - var cursorptn = /zoo|gra/ /* assert cursor varient */ - var transformptn = /([,: ])(transform)/g /* vendor prefix transform, older webkit */ - var animationptn = /,+\s*(?![^(]*[)])/g /* splits multiple shorthand notation animations */ - var propertiesptn = / +\s*(?![^(]*[)])/g /* animation properties */ - var elementptn = / *[\0] */g /* selector elements */ - var selectorptn = /,\r+?/g /* splits selectors */ - var andptn = /\f?&/g /* match & */ - var escapeptn = /:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g /* matches :global(.*) */ - var invalidptn = /\W+/g /* removes invalid characters from keyframes */ - var keyframeptn = /@(k\w+)\s*(\S*)\s*/ /* matches @keyframes $1 */ - var plcholdrptn = /::(place)/g /* match ::placeholder varient */ - var readonlyptn = /:(read-only)/g /* match :read-only varient */ - var beforeptn = /\s+(?=[{\];=:>])/g /* matches \s before ] ; = : */ - var afterptn = /([[}=:>])\s+/g /* matches \s after characters [ } = : */ - var tailptn = /(\{[^{]+?);(?=\})/g /* matches tail semi-colons ;} */ - var whiteptn = /\s{2,}/g /* matches repeating whitespace */ - var pseudoptn = /([^\(])(:+) */g /* pseudo element */ +var loading = (0, _styledComponents.keyframes)(_templateObject); - /* vendors */ - var webkit = '-webkit-' - var moz = '-moz-' - var ms = '-ms-' +var BubbleSpin = _styledComponents2.default.div(_templateObject2, function (props) { + return loading + ' ' + props.duration + 's infinite linear;'; +}, function (props) { + return props.color; +}, function (props) { + return props.size + 'px'; +}); - /* character codes */ - var SEMICOLON = 59 /* ; */ - var CLOSEBRACES = 125 /* } */ - var OPENBRACES = 123 /* { */ - var OPENPARENTHESES = 40 /* ( */ - var CLOSEPARENTHESES = 41 /* ) */ - var OPENBRACKET = 91 /* [ */ - var CLOSEBRACKET = 93 /* ] */ - var NEWLINE = 10 /* \n */ - var CARRIAGE = 13 /* \r */ - var TAB = 9 /* \t */ - var AT = 64 /* @ */ - var SPACE = 32 /* */ - var AND = 38 /* & */ - var DASH = 45 /* - */ - var UNDERSCORE = 95 /* _ */ - var STAR = 42 /* * */ - var COMMA = 44 /* , */ - var COLON = 58 /* : */ - var SINGLEQUOTE = 39 /* ' */ - var DOUBLEQUOTE = 34 /* " */ - var FOWARDSLASH = 47 /* / */ - var GREATERTHAN = 62 /* > */ - var PLUS = 43 /* + */ - var TILDE = 126 /* ~ */ - var NULL = 0 /* \0 */ - var FORMFEED = 12 /* \f */ - var VERTICALTAB = 11 /* \v */ +exports.default = BubbleSpin; - /* special identifiers */ - var KEYFRAME = 107 /* k */ - var MEDIA = 109 /* m */ - var SUPPORTS = 115 /* s */ - var PLACEHOLDER = 112 /* p */ - var READONLY = 111 /* o */ - var IMPORT = 169 /* i */ - var CHARSET = 163 /* c */ - var PAGE = 112 /* p */ - var DOCUMENT = 100 /* d */ +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { - var column = 1 /* current column */ - var line = 1 /* current line numebr */ - var pattern = 0 /* :pattern */ +"use strict"; - var cascade = 1 /* #id h1 h2 vs h1#id h2#id */ - var vendor = 1 /* vendor prefix */ - var escape = 1 /* escape :global() pattern */ - var compress = 0 /* compress output */ - var semicolon = 0 /* no/semicolon option */ - /* empty reference */ - var array = [] +Object.defineProperty(exports, "__esModule", { + value: true +}); - /* plugins */ - var plugins = [] - var plugged = 0 +var _react = __webpack_require__(3); - /* plugin context */ - var POSTS = -2 - var PREPS = -1 - var UNKWN = 0 - var PROPS = 1 - var BLCKS = 2 - var ATRUL = 3 +var _react2 = _interopRequireDefault(_react); - /* plugin newline context */ - var unkwn = 0 +var _propTypes = __webpack_require__(4); - /* keyframe animation */ - var keyed = 1 - var key = '' +var _propTypes2 = _interopRequireDefault(_propTypes); - /* selector namespace */ - var nscopealt = '' - var nscope = '' +var _CometSpin = __webpack_require__(51); - /** - * Compile - * - * @param {Array} parent - * @param {Array} current - * @param {string} body - * @param {number} id - * @return {string} - */ - function compile (parent, current, body, id) { - var bracket = 0 /* brackets [] */ - var comment = 0 /* comments /* // or /* */ - var parentheses = 0 /* functions () */ - var quote = 0 /* quotes '', "" */ +var _CometSpin2 = _interopRequireDefault(_CometSpin); - var first = 0 /* first character code */ - var second = 0 /* second character code */ - var code = 0 /* current character code */ - var tail = 0 /* previous character code */ - var trail = 0 /* character before previous code */ - var peak = 0 /* previous non-whitespace code */ - - var counter = 0 /* count sequence termination */ - var context = 0 /* track current context */ - var atrule = 0 /* track @at-rule context */ - var pseudo = 0 /* track pseudo token index */ - var caret = 0 /* current character index */ - var format = 0 /* control character formating context */ - var insert = 0 /* auto semicolon insertion */ - var invert = 0 /* inverted selector pattern */ - var length = 0 /* generic length address */ - var eof = body.length /* end of file(length) */ - var eol = eof - 1 /* end of file(characters) */ +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var char = '' /* current character */ - var chars = '' /* current buffer of characters */ - var child = '' /* next buffer of characters */ - var out = '' /* compiled body */ - var children = '' /* compiled children */ - var flat = '' /* compiled leafs */ - var selector /* generic selector address */ - var result /* generic address */ +var CometSpinLoader = function CometSpinLoader(props) { + return _react2.default.createElement(_CometSpin2.default, props); +}; - // ...build body - while (caret < eof) { - code = body.charCodeAt(caret) +CometSpinLoader.propTypes = { + color: _propTypes2.default.string, + duration: _propTypes2.default.number, + size: _propTypes2.default.number +}; - if (comment + quote + parentheses + bracket === 0) { - // eof varient - if (caret === eol) { - if (format > 0) { - chars = chars.replace(formatptn, '') - } +CometSpinLoader.defaultProps = { + color: '#000', + duration: 1.7, + size: 90 +}; - if ((chars = chars.trim()).length > 0) { - switch (code) { - case SPACE: - case TAB: - case SEMICOLON: - case CARRIAGE: - case NEWLINE: { - break - } - default: { - chars += body.charAt(caret) - } - } +exports.default = CometSpinLoader; - code = SEMICOLON - } - } +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { - // auto semicolon insertion - if (insert === 1) { - switch (code) { - // false flags - case OPENBRACES: - case COMMA: { - insert = 0 - break - } - // ignore - case TAB: - case CARRIAGE: - case NEWLINE: - case SPACE: { - break - } - // valid - default: { - caret-- - code = SEMICOLON - } - } - } +"use strict"; - // token varient - switch (code) { - case OPENBRACES: { - chars = chars.trim() - first = chars.charCodeAt(0) - counter = 1 - caret++ - while (caret < eof) { - code = body.charCodeAt(caret) +Object.defineProperty(exports, "__esModule", { + value: true +}); - switch (code) { - case OPENBRACES: { - counter++ - break - } - case CLOSEBRACES: { - counter-- - break - } - } +var _templateObject = _taggedTemplateLiteral(['\n 0% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n 5%,\n 95% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n 10%,\n 59% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em;\n }\n 20% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em;\n }\n 38% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em;\n }\n 100% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n'], ['\n 0% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n 5%,\n 95% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n 10%,\n 59% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em;\n }\n 20% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em;\n }\n 38% {\n box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em;\n }\n 100% {\n box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;\n }\n']), + _templateObject2 = _taggedTemplateLiteral(['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n'], ['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n']), + _templateObject3 = _taggedTemplateLiteral(['\n animation: ', ';\n border-radius: 50%;\n color: ', ';\n font-size: ', ';\n height: 1em;\n margin: 72px auto;\n overflow: hidden;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n'], ['\n animation: ', ';\n border-radius: 50%;\n color: ', ';\n font-size: ', ';\n height: 1em;\n margin: 72px auto;\n overflow: hidden;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n']); - if (counter === 0) { - break - } +var _styledComponents = __webpack_require__(5); - child += body.charAt(caret++) - } +var _styledComponents2 = _interopRequireDefault(_styledComponents); - if (first === NULL) { - first = (chars = chars.replace(nullptn, '').trim()).charCodeAt(0) - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - switch (first) { - // @at-rule - case AT: { - if (format > 0) { - chars = chars.replace(formatptn, '') - } +function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - second = chars.charCodeAt(1) +var loading = (0, _styledComponents.keyframes)(_templateObject); - switch (second) { - case DOCUMENT: - case PAGE: - case MEDIA: - case SUPPORTS: { - selector = current - break - } - default: { - selector = array - } - } +var round = (0, _styledComponents.keyframes)(_templateObject2); - child = compile(current, selector, child, second) - length = child.length +var CometSpin = _styledComponents2.default.div(_templateObject3, function (props) { + return loading + ' ' + props.duration + 's infinite ease, ' + round + ' ' + props.duration + 's infinite ease'; +}, function (props) { + return props.color; +}, function (props) { + return props.size + 'px'; +}); - // execute plugins, @at-rule context - if (plugged > 0) { - selector = select(array, chars, invert) - result = proxy(ATRUL, child, selector, current, line, column, out.length, second) - chars = selector.join('') +exports.default = CometSpin; - if (result !== void 0) { - if ((length = (child = result.trim()).length) === 0) { - second = 0 - child = '' - } - } - } +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { - if (length > 0) { - switch (second) { - case DOCUMENT: - case PAGE: - case MEDIA: - case SUPPORTS: { - child = chars + '{' + child + '}' - break - } - case KEYFRAME: { - chars = chars.replace(keyframeptn, '$1 $2' + (keyed > 0 ? key : '')) - child = chars + '{' + child + '}' - child = '@' + (vendor > 0 ? webkit + child + '@' + child : child) - break - } - default: { - child = chars + child - } - } - } else { - child = '' - } +"use strict"; - break - } - // selector - default: { - child = compile(current, select(current, chars, invert), child, id) - } - } - children += child +Object.defineProperty(exports, "__esModule", { + value: true +}); - // reset - context = 0 - insert = 0 - pseudo = 0 - format = 0 - invert = 0 - atrule = 0 - chars = '' - child = '' +var _react = __webpack_require__(3); - caret++ - break - } - case CLOSEBRACES: - case SEMICOLON: { - chars = (format > 0 ? chars.replace(formatptn, '') : chars).trim() - - if (code !== CLOSEBRACES || chars.length > 0) { - // monkey-patch missing colon - if (pseudo === 0) { - first = chars.charCodeAt(0) +var _react2 = _interopRequireDefault(_react); - // first character is a letter or dash, buffer has a space character - if ((first === DASH || first > 96 && first < 123) && chars.indexOf(' ')) { - chars = chars.replace(' ', ': ') - } - } +var _propTypes = __webpack_require__(4); - // execute plugins, property context - if (plugged > 0) { - if ((result = proxy(PROPS, chars, current, parent, line, column, out.length, id)) !== void 0) { - if ((chars = result.trim()).length === 0) { - chars = '\0\0' - } - } - } +var _propTypes2 = _interopRequireDefault(_propTypes); - first = chars.charCodeAt(0) - second = chars.charCodeAt(1) +var _CylinderSpin = __webpack_require__(53); - switch (first + second) { - case NULL: { - break - } - case IMPORT: - case CHARSET: { - flat += chars + body.charAt(caret) - break - } - default: { - out += pseudo > 0 ? property(chars, first, second, chars.charCodeAt(2)) : chars + ';' - } - } - } +var _CylinderSpin2 = _interopRequireDefault(_CylinderSpin); - // reset - context = 0 - insert = 0 - pseudo = 0 - format = 0 - invert = 0 - chars = '' +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - caret++ - break - } - } - } +var CylinderSpinLoader = function CylinderSpinLoader(props) { + return _react2.default.createElement(_CylinderSpin2.default, props); +}; - // parse characters - switch (code) { - case CARRIAGE: - case NEWLINE: { - // auto insert semicolon - if (comment + quote + parentheses + bracket + semicolon === 0) { - // valid non-whitespace characters that - // may precede a newline - switch (peak) { - case AT: - case TILDE: - case GREATERTHAN: - case STAR: - case PLUS: - case FOWARDSLASH: - case DASH: - case COLON: - case COMMA: - case SEMICOLON: - case OPENBRACES: - case CLOSEBRACES: { - break - } - default: { - // current buffer has a colon - if (pseudo > 0) { - insert = 1 - } - } - } - } +CylinderSpinLoader.propTypes = { + color: _propTypes2.default.string, + duration: _propTypes2.default.number, + size: _propTypes2.default.number +}; - // terminate line comment - if (comment === FOWARDSLASH) { - comment = 0 - } +CylinderSpinLoader.defaultProps = { + color: '#000', + duration: 1.1, + size: 25 +}; + +exports.default = CylinderSpinLoader; - // execute plugins, newline context - if (plugged * unkwn > 0) { - proxy(UNKWN, chars, current, parent, line, column, out.length, id) - } +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { - // next line, reset column position - column = 1 - line++ +"use strict"; - break - } - default: { - // increment column position - column++ - // ignore tabs - if (code === TAB) { - break - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - // current character - char = body.charAt(caret) +var _templateObject = _taggedTemplateLiteral(['\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ', ', 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.5), -1.8em -1.8em 0 0em rgba(', ', 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.7), 1.8em -1.8em 0 0em ', ', 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.5), 1.8em -1.8em 0 0em rgba(', ', 0.7), 2.5em 0em 0 0em ', ', 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.5), 2.5em 0em 0 0em rgba(', ', 0.7), 1.75em 1.75em 0 0em ', ', 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.5), 1.75em 1.75em 0 0em rgba(', ', 0.7), 0em 2.5em 0 0em ', ', -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.5), 0em 2.5em 0 0em rgba(', ', 0.7), -1.8em 1.8em 0 0em ', ', -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.5), -1.8em 1.8em 0 0em rgba(', ', 0.7), -2.6em 0em 0 0em ', ', -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.5), -2.6em 0em 0 0em rgba(', ', 0.7), -1.8em -1.8em 0 0em ', ';\n }\n '], ['\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ', ', 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.5), -1.8em -1.8em 0 0em rgba(', ', 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.7), 1.8em -1.8em 0 0em ', ', 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.5), 1.8em -1.8em 0 0em rgba(', ', 0.7), 2.5em 0em 0 0em ', ', 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.5), 2.5em 0em 0 0em rgba(', ', 0.7), 1.75em 1.75em 0 0em ', ', 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.5), 1.75em 1.75em 0 0em rgba(', ', 0.7), 0em 2.5em 0 0em ', ', -1.8em 1.8em 0 0em rgba(', ', 0.2), -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.5), 0em 2.5em 0 0em rgba(', ', 0.7), -1.8em 1.8em 0 0em ', ', -2.6em 0em 0 0em rgba(', ', 0.2), -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.5), -1.8em 1.8em 0 0em rgba(', ', 0.7), -2.6em 0em 0 0em ', ', -1.8em -1.8em 0 0em rgba(', ', 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(', ', 0.2), 1.8em -1.8em 0 0em rgba(', ', 0.2), 2.5em 0em 0 0em rgba(', ', 0.2), 1.75em 1.75em 0 0em rgba(', ', 0.2), 0em 2.5em 0 0em rgba(', ', 0.2), -1.8em 1.8em 0 0em rgba(', ', 0.5), -2.6em 0em 0 0em rgba(', ', 0.7), -1.8em -1.8em 0 0em ', ';\n }\n ']), + _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 1em;\n margin: 100px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n'], ['\n animation: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 1em;\n margin: 100px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 1em;\n']); - // remove comments, escape functions, strings, attributes and prepare selectors - switch (code) { - // escape breaking control characters - case NULL: { - char = '\\0' - break - } - case FORMFEED: { - char = '\\f' - break - } - case VERTICALTAB: { - char = '\\v' - break - } - // & - case AND: { - // inverted selector pattern i.e html & - if (quote + comment + bracket === 0 && cascade > 0) { - invert = 1 - format = 1 - char = '\f' + char - } - break - } - // ::paceholder, l - // :read-ony, l - case 108: { - if (quote + comment + bracket + pattern === 0 && pseudo > 0) { - switch (caret - pseudo) { - // ::placeholder - case 2: { - if (tail === PLACEHOLDER && body.charCodeAt(caret-3) === COLON) { - pattern = tail - } - } - // :read-only - case 8: { - if (trail === READONLY) { - pattern = trail - } - } - } - } - break - } - // : - case COLON: { - if (quote + comment + bracket === 0) { - pseudo = caret - } - break - } - // selectors - case COMMA: { - if (comment + parentheses + quote + bracket === 0) { - format = 1 - char += '\r' - } - break - } - // quotes - case DOUBLEQUOTE: { - if (comment === 0) { - quote = quote === code ? 0 : (quote === 0 ? code : quote) - } - break - } - case SINGLEQUOTE: { - if (comment === 0) { - quote = quote === code ? 0 : (quote === 0 ? code : quote) - } - break - } - // attributes - case OPENBRACKET: { - if (quote + comment + parentheses === 0) { - bracket++ - } - break - } - case CLOSEBRACKET: { - if (quote + comment + parentheses === 0) { - bracket-- - } - break - } - // functions - case CLOSEPARENTHESES: { - if (quote + comment + bracket === 0) { - // ) is the last character, add synthetic padding to avoid skipping this buffer - if (caret === eol) { - eol++ - eof++ - } +var _styledComponents = __webpack_require__(5); - parentheses-- - } - break - } - case OPENPARENTHESES: { - if (quote + comment + bracket === 0) { - if (context === 0) { - switch (tail*2 + trail*3) { - // :matches - case 533: { - break - } - // :global, :not, :nth-child etc... - default: { - counter = 0 - context = 1 - } - } - } +var _styledComponents2 = _interopRequireDefault(_styledComponents); - parentheses++ - } - break - } - case AT: { - if (comment + parentheses + quote + bracket + pseudo + atrule === 0) { - atrule = 1 - } - break - } - // block/line comments - case STAR: - case FOWARDSLASH: { - if (quote + bracket + parentheses > 0) { - break - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - switch (comment) { - // initialize line/block comment context - case 0: { - switch (code*2 + body.charCodeAt(caret+1)*3) { - // // - case 235: { - comment = FOWARDSLASH - break - } - // /* - case 220: { - comment = STAR - break - } - } - break - } - // end block comment context - case STAR: { - if (code === FOWARDSLASH && tail === STAR) { - char = '' - comment = 0 - } - } - } - } - } +function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - // ignore comment blocks - if (comment === 0) { - // aggressive isolation mode, divide each individual selector - // including selectors in :not function but excluding selectors in :global function - if (cascade + quote + bracket + atrule === 0 && id !== KEYFRAME && code !== SEMICOLON) { - switch (code) { - case COMMA: - case TILDE: - case GREATERTHAN: - case PLUS: - case CLOSEPARENTHESES: - case OPENPARENTHESES: { - if (context === 0) { - // outside of an isolated context i.e nth-child(<...>) - switch (tail) { - case TAB: - case SPACE: - case NEWLINE: - case CARRIAGE: { - char = char + '\0' - break - } - default: { - char = '\0' + char + (code === COMMA ? '' : '\0') - } - } - format = 1 - } else { - // within an isolated context, sleep untill it's terminated - switch (code) { - case OPENPARENTHESES: { - context = ++counter - break - } - case CLOSEPARENTHESES: { - if ((context = --counter) === 0) { - format = 1 - char += '\0' - } - break - } - } - } - break - } - case SPACE: { - switch (tail) { - case NULL: - case OPENBRACES: - case CLOSEBRACES: - case SEMICOLON: - case COMMA: - case FORMFEED: - case TAB: - case SPACE: - case NEWLINE: - case CARRIAGE: { - break - } - default: { - // ignore in isolated contexts - if (context === 0) { - format = 1 - char += '\0' - } - } - } - } - } - } +function animation(props) { + var d = document.createElement('div'); + d.style.color = props.color; + document.body.appendChild(d); + var rgbcolor = window.getComputedStyle(d).color; + var match = /rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*\d+[.d+]*)*\)/g.exec(rgbcolor); + var color = match[1] + ', ' + match[2] + ', ' + match[3]; - // concat buffer of characters - chars += char + return (0, _styledComponents.keyframes)(_templateObject, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color, color, color, color, color, color, color, color, color, props.color); +} - // previous non-whitespace character code - if (code !== SPACE) { - peak = code - } - } - } - } +var CylinderSpin = _styledComponents2.default.div(_templateObject2, function (props) { + return animation(props) + ' ' + props.duration + 's infinite ease;'; +}, function (props) { + return props.size + 'px'; +}); - // tail character codes - trail = tail - tail = code +exports.default = CylinderSpin; - // visit every character - caret++ - } +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { - length = out.length +"use strict"; - // execute plugins, block context - if (length > 0 && plugged > 0) { - result = proxy(BLCKS, out, current, parent, line, column, length, id) - if (result !== void 0) { - length = (out = result).length - } - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - if (length > 0) { - // cascade isolation mode - if (cascade === 0 && id !== KEYFRAME) { - isolate(current) - } +var _react = __webpack_require__(3); - out = current.join(',') + '{' + out + '}' +var _react2 = _interopRequireDefault(_react); - if (vendor*pattern > 0) { - switch (pattern) { - case READONLY: { - out = out.replace(readonlyptn, ':'+moz+'$1')+out - break - } - case PLACEHOLDER: { - // ::placeholder vendor prefix - out = ( - out.replace(plcholdrptn, '::' + webkit + 'input-$1') + - out.replace(plcholdrptn, '::' + moz + '$1') + - out.replace(plcholdrptn, ':' + ms + 'input-$1') + out - ) - break - } - } - pattern = 0 - } - } +var _propTypes = __webpack_require__(4); - return flat + out + children - } +var _propTypes2 = _interopRequireDefault(_propTypes); - /** - * Select - * - * @param {Array} parent - * @param {string} current - * @param {number} invert - * @return {Array} - */ - function select (parent, current, invert) { - var selectors = current.trim().split(selectorptn) - var out = selectors +var _ResizeSpin = __webpack_require__(55); - var length = selectors.length - var l = parent.length +var _ResizeSpin2 = _interopRequireDefault(_ResizeSpin); - switch (l) { - // 0-1 parent selectors - case 0: - case 1: { - for (var i = 0, selector = l === 0 ? '' : parent[0] + ' '; i < length; i++) { - out[i] = scope(selector, out[i], invert, l).trim() - } - break - } - // >2 parent selectors, nested - default: { - for (var i = 0, j = 0, out = []; i < length; i++) { - for (var k = 0; k < l; k++) { - out[j++] = scope(parent[k] + ' ', selectors[i], invert, l).trim() - } - } - } - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return out - } +var ResizeSpinLoader = function ResizeSpinLoader(props) { + return _react2.default.createElement(_ResizeSpin2.default, props); +}; - /** - * Scope - * - * @param {string} parent - * @param {string} current - * @param {number} invert - * @param {number} level - * @return {string} - */ - function scope (parent, current, invert, level) { - var selector = current - var code = selector.charCodeAt(0) +ResizeSpinLoader.propTypes = { + background: _propTypes2.default.string, + color: _propTypes2.default.string, + duration: _propTypes2.default.number, + size: _propTypes2.default.number +}; - // trim leading whitespace - if (code < 33) { - code = (selector = selector.trim()).charCodeAt(0) - } +ResizeSpinLoader.defaultProps = { + background: '#fff', + color: '#000', + duration: 2, + size: 11 +}; - switch (code) { - // & - case AND: { - switch (cascade + level) { - case 0: - case 1: { - if (parent.trim().length === 0) { - break - } - } - default: { - return selector.replace(andptn, parent.trim()) - } - } - break - } - // : - case COLON: { - switch (selector.charCodeAt(1)) { - // g in :global - case 103: { - if (escape > 0 && cascade > 0) { - return selector.replace(escapeptn, '$1').replace(andptn, nscope) - } - break - } - default: { - // :hover - return parent.trim() + selector - } - } - } - default: { - // html & - if (invert*cascade > 0 && selector.indexOf('\f') > 0) { - return selector.replace(andptn, parent.trim()) - } - } - } +exports.default = ResizeSpinLoader; - return parent + selector - } +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Property - * - * @param {string} input - * @param {number} first - * @param {number} second - * @param {number} third - * @return {string} - */ - function property (input, first, second, third) { - var out = input + ';' - var index = 0 - var hash = (first*2) + (second*3) + (third*4) - var cache +"use strict"; - // animation: a, n, i characters - if (hash === 944) { - out = animation(out) - } else if (vendor > 0) { - // vendor prefix - switch (hash) { - // background/backface-visibility, b, a, c - case 883: { - // backface-visibility, - - if (out.charCodeAt(8) === DASH) { - out = webkit + out + out - } - break - } - // appearance: a, p, p - case 978: { - out = webkit + out + moz + out + out - break - } - // hyphens: h, y, p - // user-select: u, s, e - case 1019: - case 983: { - out = webkit + out + moz + out + ms + out + out - break - } - // flex: f, l, e - case 932: { - out = webkit + out + ms + out + out - break - } - case 964: { - // order: o, r, d - out = webkit + out + ms + 'flex' + '-' + out + out - break - } - // justify-content, j, u, s - case 1023: { - cache = out.substring(out.indexOf(':', 15)).replace('flex-', '') - out = webkit + 'box-pack' + cache + webkit + out + ms + 'flex-pack' + cache + out - break - } - // display(flex/inline-flex/inline-box): d, i, s - case 975: { - index = (out = input).length-10 - cache = (out.charCodeAt(index) === 33 ? out.substring(0, index) : out).substring(8).trim() - switch (hash = cache.charCodeAt(0) + (cache.charCodeAt(7)|0)) { - // inline- - case 203: { - // inline-box - if (cache.charCodeAt(8) > 110) { - out = out.replace(cache, webkit+cache)+';'+out - } - break - } - // inline-flex - // flex - case 207: - case 102: { - out = ( - out.replace(cache, webkit+(hash > 102 ? 'inline-' : '')+'box')+';'+ - out.replace(cache, webkit+cache)+';'+ - out.replace(cache, ms+cache+'box')+';'+ - out - ) - } - } - - out += ';' - break - } - // align-items, align-center, align-self: a, l, i, - - case 938: { - if (out.charCodeAt(5) === DASH) { - switch (out.charCodeAt(6)) { - // align-items, i - case 105: { - cache = out.replace('-items', '') - out = webkit + out + webkit + 'box-' + cache + ms + 'flex-' + cache + out - break - } - // align-self, s - case 115: { - out = webkit + out + ms + 'flex-item-' + out.replace('-self', '') + out - break - } - // align-content - default: { - out = webkit + out + ms + 'flex-line-pack' + out.replace('align-content', '') + out - } - } - } - break - } - // cursor, c, u, r - case 1005: { - if (cursorptn.test(out)) { - out = out.replace(colonptn, ': ' + webkit) + out.replace(colonptn, ': ' + moz) + out - } - break - } - // width: min-content / width: max-content - case 953: { - if ((index = out.indexOf('-content', 9)) > 0) { - // width: min-content / width: max-content - cache = out.substring(index - 3) - out = 'width:' + webkit + cache + 'width:' + moz + cache + 'width:' + cache - } - break - } - // transform, transition: t, r, a - // text-size-adjust: t, e, x - case 962: - case 1015: { - out = webkit + out + (out.charCodeAt(5) === 102 ? ms + out : '') + out +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _templateObject = _taggedTemplateLiteral(['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n'], ['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n']), + _templateObject2 = _taggedTemplateLiteral(['\n border-radius: 50%;\n box-shadow: inset 0 0 0 1em;\n color: ', ';\n font-size: ', ';\n height: 10em;\n margin: 55px auto;\n position: relative;\n text-indent: -99999em;\n transform: translateZ(0);\n width: 10em;\n\n &:before {\n animation: ', ';\n background: ', ';\n border-radius: 50%;\n border-radius: 10.2em 0 0 10.2em;\n content: \'\';\n height: 10.2em;\n left: -0.1em;\n position: absolute;\n top: -0.1em;\n transform-origin: 5.2em 5.1em;\n width: 5.2em;\n }\n\n &:after {\n animation: ', ';\n background: ', ';\n border-radius: 50%;\n border-radius: 0 10.2em 10.2em 0;\n content: \'\';\n height: 10.2em;\n left: 5.1em;\n position: absolute;\n top: -0.1em;\n transform-origin: 0px 5.1em;\n width: 5.2em;\n }\n'], ['\n border-radius: 50%;\n box-shadow: inset 0 0 0 1em;\n color: ', ';\n font-size: ', ';\n height: 10em;\n margin: 55px auto;\n position: relative;\n text-indent: -99999em;\n transform: translateZ(0);\n width: 10em;\n\n &:before {\n animation: ', ';\n background: ', ';\n border-radius: 50%;\n border-radius: 10.2em 0 0 10.2em;\n content: \'\';\n height: 10.2em;\n left: -0.1em;\n position: absolute;\n top: -0.1em;\n transform-origin: 5.2em 5.1em;\n width: 5.2em;\n }\n\n &:after {\n animation: ', ';\n background: ', ';\n border-radius: 50%;\n border-radius: 0 10.2em 10.2em 0;\n content: \'\';\n height: 10.2em;\n left: 5.1em;\n position: absolute;\n top: -0.1em;\n transform-origin: 0px 5.1em;\n width: 5.2em;\n }\n']); + +var _styledComponents = __webpack_require__(5); + +var _styledComponents2 = _interopRequireDefault(_styledComponents); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + +var loading = (0, _styledComponents.keyframes)(_templateObject); + +var ResizeSpin = _styledComponents2.default.div(_templateObject2, function (props) { + return props.color; +}, function (props) { + return props.size + 'px'; +}, function (props) { + return loading + ' ' + props.duration + 's infinite ease 1.5s'; +}, function (props) { + return props.background; +}, function (props) { + return loading + ' ' + props.duration + 's infinite ease'; +}, function (props) { + return props.background; +}); + +exports.default = ResizeSpin; - // transitions - if (second + third === 211 && out.charCodeAt(13) === 105 && out.indexOf('transform', 10) > 0) { - out = out.substring(0, out.indexOf(';', 27) + 1).replace(transformptn, '$1' + webkit + '$2') + out - } +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { - break - } - } - } +"use strict"; - return out - } - /** - * Animation - * - * @param {string} input - * @return {string} - */ - function animation (input) { - var length = input.length - var index = input.indexOf(':', 9) + 1 - var declare = input.substring(0, index).trim() - var body = input.substring(index, length-1).trim() - var out = '' +Object.defineProperty(exports, "__esModule", { + value: true +}); - // shorthand - if (input.charCodeAt(9) !== DASH) { - // split in case of multiple animations - var list = body.split(animationptn) +var _react = __webpack_require__(3); - for (var i = 0, index = 0, length = list.length; i < length; index = 0, i++) { - var value = list[i] - var items = value.split(propertiesptn) +var _react2 = _interopRequireDefault(_react); - while (value = items[index]) { - var peak = value.charCodeAt(0) +var _propTypes = __webpack_require__(4); - if (keyed === 1 && ( - // letters - (peak > AT && peak < 90) || (peak > 96 && peak < 123) || peak === UNDERSCORE || - // dash but not in sequence i.e -- - (peak === DASH && value.charCodeAt(1) !== DASH) - )) { - // not a number/function - switch (isNaN(parseFloat(value)) + (value.indexOf('(') !== -1)) { - case 1: { - switch (value) { - // not a valid reserved keyword - case 'infinite': case 'alternate': case 'backwards': case 'running': - case 'normal': case 'forwards': case 'both': case 'none': case 'linear': - case 'ease': case 'ease-in': case 'ease-out': case 'ease-in-out': - case 'paused': case 'reversed': case 'alternate-reverse': case 'inherit': - case 'initial': case 'unset': case 'step-start': case 'step-end': { - break - } - default: { - value += key - } - } - } - } - } +var _propTypes2 = _interopRequireDefault(_propTypes); - items[index++] = value - } +var _RotateSpin = __webpack_require__(57); - out += (i === 0 ? '' : ',') + items.join(' ') - } - } else { - // animation-name, n - out += input.charCodeAt(10) === 110 ? body + (keyed === 1 ? key : '') : body - } +var _RotateSpin2 = _interopRequireDefault(_RotateSpin); - out = declare + out + ';' +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return vendor > 0 ? webkit + out + out : out - } +var RotateSpinLoader = function RotateSpinLoader(props) { + return _react2.default.createElement(_RotateSpin2.default, props); +}; - /** - * Isolate - * - * @param {Array} selectors - */ - function isolate (selectors) { - for (var i = 0, length = selectors.length, padding, element; i < length; i++) { - // split individual elements in a selector i.e h1 h2 === [h1, h2] - var elements = selectors[i].split(elementptn) - var out = '' +RotateSpinLoader.propTypes = { + color: _propTypes2.default.string, + duration: _propTypes2.default.number, + size: _propTypes2.default.number +}; - for (var j = 0, size = 0, tail = 0, code = 0, l = elements.length; j < l; j++) { - // empty element - if ((size = (element = elements[j]).length) === 0 && l > 1) { - continue - } +RotateSpinLoader.defaultProps = { + color: '#000', + duration: 1.1, + size: 10 +}; - tail = out.charCodeAt(out.length-1) - code = element.charCodeAt(0) - padding = '' +exports.default = RotateSpinLoader; - if (j !== 0) { - // determine if we need padding - switch (tail) { - case STAR: - case TILDE: - case GREATERTHAN: - case PLUS: - case SPACE: - case OPENPARENTHESES: { - break - } - default: { - padding = ' ' - } - } - } +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _templateObject = _taggedTemplateLiteral(['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n'], ['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n']), + _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n border: ', ';\n border-left: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 10em;\n margin: 60px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 10em;\n\n &:after {\n border-radius: 50%;\n height: 10em;\n width: 10em;\n }\n'], ['\n animation: ', ';\n border: ', ';\n border-left: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 10em;\n margin: 60px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 10em;\n\n &:after {\n border-radius: 50%;\n height: 10em;\n width: 10em;\n }\n']); + +var _styledComponents = __webpack_require__(5); + +var _styledComponents2 = _interopRequireDefault(_styledComponents); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + +var loading = (0, _styledComponents.keyframes)(_templateObject); + +function getColor(props) { + var d = document.createElement('div'); + d.style.color = props.color; + document.body.appendChild(d); + var rgbcolor = window.getComputedStyle(d).color; + var match = /rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*\d+[.d+]*)*\)/g.exec(rgbcolor); + var color = match[1] + ', ' + match[2] + ', ' + match[3]; + return color; +} + +var RotateSpin = _styledComponents2.default.div(_templateObject2, function (props) { + return loading + ' ' + props.duration + 's infinite linear'; +}, function (props) { + return '1.1em solid rgba(' + getColor(props) + ', 0.2)'; +}, function (props) { + return '1.1em solid ' + props.color; +}, function (props) { + return props.size + 'px'; +}); + +exports.default = RotateSpin; + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; - switch (code) { - case AND: { - element = padding + nscopealt - } - case TILDE: - case GREATERTHAN: - case PLUS: - case SPACE: - case CLOSEPARENTHESES: - case OPENPARENTHESES: { - break - } - case OPENBRACKET: { - element = padding + element + nscopealt - break - } - case COLON: { - switch (element.charCodeAt(1)*2 + element.charCodeAt(2)*3) { - // :global - case 530: { - if (escape > 0) { - element = padding + element.substring(8, size - 1) - break - } - } - // :hover, :nth-child(), ... - default: { - if (j < 1 || elements[j-1].length < 1) { - element = padding + nscopealt + element - } - } - } - break - } - case COMMA: { - padding = '' - } - default: { - if (size > 1 && element.indexOf(':') > 0) { - element = padding + element.replace(pseudoptn, '$1' + nscopealt + '$2') - } else { - element = padding + element + nscopealt - } - } - } - out += element - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - selectors[i] = out.replace(formatptn, '').trim() - } - } +var _react = __webpack_require__(3); - /** - * Proxy - * - * @param {number} context - * @param {string} content - * @param {Array} selectors - * @param {Array} parents - * @param {number} line - * @param {number} column - * @param {number} length - * @param {number} id - * @return {(string|void|*)} - */ - function proxy (context, content, selectors, parents, line, column, length, id) { - for (var i = 0, out = content, next; i < plugged; i++) { - switch (next = plugins[i].call(stylis, context, out, selectors, parents, line, column, length, id)) { - case void 0: - case false: - case true: - case null: { - break - } - default: { - out = next - } - } - } +var _react2 = _interopRequireDefault(_react); - switch (out) { - case void 0: - case false: - case true: - case null: - case content: { - break - } - default: { - return out - } - } - } +var _propTypes = __webpack_require__(4); - /** - * Minify - * - * @param {(string|*)} output - * @return {string} - */ - function minify (output) { - return output - .replace(formatptn, '') - .replace(beforeptn, '') - .replace(afterptn, '$1') - .replace(tailptn, '$1') - .replace(whiteptn, ' ') - } +var _propTypes2 = _interopRequireDefault(_propTypes); - /** - * Use - * - * @param {(Array|function(...?)|number|void)?} plugin - */ - function use (plugin) { - switch (plugin) { - case void 0: - case null: { - plugged = plugins.length = 0 - break - } - default: { - switch (plugin.constructor) { - case Array: { - for (var i = 0, length = plugin.length; i < length; i++) { - use(plugin[i]) - } - break - } - case Function: { - plugins[plugged++] = plugin - break - } - case Boolean: { - unkwn = !!plugin|0 - } - } - } - } +var _Spin = __webpack_require__(59); - return use - } +var _Spin2 = _interopRequireDefault(_Spin); - /** - * Set - * - * @param {Object} options - */ - function set (options) { - for (var name in options) { - var value = options[name] - switch (name) { - case 'keyframe': keyed = value|0; break - case 'global': escape = value|0; break - case 'cascade': cascade = value|0; break - case 'compress': compress = value|0; break - case 'prefix': vendor = value|0; break - case 'semicolon': semicolon = value|0; break - } - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return set - } +var SpinLoader = function SpinLoader(props) { + return _react2.default.createElement(_Spin2.default, props); +}; - /** - * Stylis - * - * @param {string} selector - * @param {string} input - * @return {(string|*)} - */ - function stylis (selector, input) { - // setup - var ns = selector - var code = ns.charCodeAt(0) +SpinLoader.propTypes = { + background: _propTypes2.default.string, + color: _propTypes2.default.string, + duration: _propTypes2.default.number, + size: _propTypes2.default.number +}; - // trim leading whitespace - if (code < 33) { - code = (ns = ns.trim()).charCodeAt(0) - } +SpinLoader.defaultProps = { + background: '#fff', + color: '#000', + duration: 1.4, + size: 10 +}; - // keyframe/animation namespace - if (keyed > 0) { - key = ns.replace(invalidptn, code === OPENBRACKET ? '' : '-') - } +exports.default = SpinLoader; - // reset, used to assert if a plugin is moneky-patching the return value - code = 1 +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { - // cascade/isolate - if (cascade === 1) { - nscope = ns - } else { - nscopealt = ns - } +"use strict"; - var selectors = [nscope] - // execute plugins, pre-process context - if (plugged > 0) { - proxy(PREPS, input, selectors, selectors, line, column, 0, 0) - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - // build - var output = compile(array, selectors, input, 0) +var _templateObject = _taggedTemplateLiteral(['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n'], ['\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n']), + _templateObject2 = _taggedTemplateLiteral(['\n animation: ', ';\n background: ', ';\n background: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 11em;\n margin: 50px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 11em;\n\n &:before {\n background: ', ';\n border-radius: 100% 0 0 0;\n content: \'\';\n height: 50%;\n left: 0;\n position: absolute;\n top: 0;\n width: 50%;\n }\n\n &:after {\n background: ', ';\n border-radius: 50%;\n bottom: 0;\n content: \'\';\n height: 75%;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n width: 75%;\n }\n'], ['\n animation: ', ';\n background: ', ';\n background: ', ';\n border-radius: 50%;\n font-size: ', ';\n height: 11em;\n margin: 50px auto;\n position: relative;\n text-indent: -9999em;\n transform: translateZ(0);\n width: 11em;\n\n &:before {\n background: ', ';\n border-radius: 100% 0 0 0;\n content: \'\';\n height: 50%;\n left: 0;\n position: absolute;\n top: 0;\n width: 50%;\n }\n\n &:after {\n background: ', ';\n border-radius: 50%;\n bottom: 0;\n content: \'\';\n height: 75%;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n width: 75%;\n }\n']); - // execute plugins, post-process context - if (plugged > 0) { - var result = proxy(POSTS, output, selectors, selectors, line, column, output.length, 0) - - if (result !== void 0) { - // bypass minification - if (typeof(output = result) !== 'string') { - code = 0 - } - } - } +var _styledComponents = __webpack_require__(5); - // reset - key = '' - nscope = '' - nscopealt = '' - pattern = 0 - line = 1 - column = 1 +var _styledComponents2 = _interopRequireDefault(_styledComponents); - return compress*code === 0 ? output : minify(output) - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - stylis['use'] = use - stylis['set'] = set +function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - return stylis -})); +var loading = (0, _styledComponents.keyframes)(_templateObject); + +var Spin = _styledComponents2.default.div(_templateObject2, function (props) { + return loading + ' ' + props.duration + 's infinite linear;'; +}, function (props) { + return props.color; +}, function (props) { + return 'linear-gradient(to right, ' + props.color + ' 10%, rgba(255, 255, 255, 0) 42%);'; +}, function (props) { + return props.size + 'px'; +}, function (props) { + return props.color; +}, function (props) { + return props.background; +}); +exports.default = Spin; /***/ }) /******/ ]); diff --git a/package.json b/package.json index d286bb1..a698ec1 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-css-loaders", - "version": "0.0.3", + "version": "0.0.4", "description": "React CSS Loaders", "main": "dist/react-css-loaders.min.js", "scripts": { @@ -48,7 +48,7 @@ "devDependencies": { "babel-core": "^6.7.7", "babel-eslint": "^7.1.1", - "babel-loader": "^6.2.4", + "babel-loader": "^7.1.1", "babel-polyfill": "^6.7.4", "babel-preset-es2015": "6.24.0", "babel-preset-react": "^6.11.1", @@ -70,8 +70,8 @@ "nyc": "^10.2.0", "react-addons-test-utils": "^15.5.0", "sinon": "^2.1.0", - "webpack": "^2.6.1", - "webpack-dev-server": "^2.5.0" + "webpack": "^3.3.0", + "webpack-dev-server": "^2.5.1" }, "dependencies": { "prop-types": "^15.5.8", @@ -79,6 +79,6 @@ "react-dom": "^15.5.4" }, "peerDependencies": { - "styled-components": "^2.1.0" + "styled-components": "^2.x" } }