From 66dfc63def173255ab09615c31a30b6fda48a36b Mon Sep 17 00:00:00 2001 From: Vladimir Ivanov Date: Thu, 11 Aug 2016 15:21:55 +0300 Subject: [PATCH 1/3] Projects' infrastructure imrovements More information in package.json More simple jsx-loader instead of babel-loader. --- package.json | 12 ++++++++++-- webpack.config.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 824652e..001224a 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,18 @@ { "name": "react-bootstrap-slider", "version": "0.0.5", - "description": "", + "description": "This is port of Bootstrap Slider to a React component.", "author": "Jack Callister", "license": "ISC", "main": "components/slider.js", + "repository": { + "type": "git", + "url": "https://github.com/jarsbe/react-bootstrap-slider.git" + }, + "bugs": { + "url": "https://github.com/jarsbe/react-bootstrap-slider/issues" + }, + "homepage": "https://github.com/jarsbe/react-bootstrap-slider", "dependencies": { "bootstrap": "^3.3.1", "bootstrap-slider": "^4.3.0", @@ -12,7 +20,7 @@ "react": "^0.13.3" }, "devDependencies": { - "babel-loader": "^5.3.2", + "jsx-loader": "^0.13.2", "webpack": "^1.4.12" } } diff --git a/webpack.config.js b/webpack.config.js index ddf3512..965d2dc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,7 +5,7 @@ module.exports = { }, module: { loaders: [ - { test: /\.js$/, loader: 'babel-loader' } + { test: /\.jsx?$/, loader: 'jsx' } ] } }; From 3b857634471a4230c8c6afba9f72574e7a71bd30 Mon Sep 17 00:00:00 2001 From: Vladimir Ivanov Date: Thu, 11 Aug 2016 16:37:20 +0300 Subject: [PATCH 2/3] Added all options from original slider Now component is using all options as original plus supports options defaults. --- bundle.js | 17048 +++++++++++++++++++++++++++++++++-------- components/main.js | 10 +- components/slider.js | 119 +- 3 files changed, 14023 insertions(+), 3154 deletions(-) diff --git a/bundle.js b/bundle.js index c966c70..b017250 100644 --- a/bundle.js +++ b/bundle.js @@ -44,24 +44,23 @@ /* 0 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - var React = __webpack_require__(1), Slider = __webpack_require__(157); - var App = React.createClass({ - displayName: 'App', + var App = React.createClass({displayName: "App", - getInitialState: function getInitialState() { + getInitialState: function() { return { value: 5, - max: 10 + min: 1, + max : 10, + step: 2 }; }, - increment: function increment(event) { + increment: function(event) { var value = this.state.value; - if (value >= this.state.max) { + if(value >= this.state.max) { value = this.state.max - 1; } this.setState({ @@ -69,22 +68,22 @@ }); }, - didChange: function didChange(event) { + didChange: function(event) { var value = event.value || event; this.setState({ value: value }); }, - render: function render() { - return React.createElement( - 'div', - null, - React.createElement(Slider, { min: 0, max: this.state.max, step: 1, value: this.state.value, toolTip: false, onSlide: this.didChange }), - React.createElement( - 'button', - { onClick: this.increment }, - 'Increment' + render: function() { + return ( + React.createElement("div", null, + React.createElement(Slider, {onSlide: this.didChange, + min: this.state.min, + max: this.state.max, + step: this.state.step, + value: this.state.value}), + React.createElement("button", {onClick: this.increment}, "Increment") ) ); } @@ -92,14 +91,14 @@ React.render(React.createElement(App, null), document.body); + /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = __webpack_require__(2); + /***/ }, /* 2 */ /***/ function(module, exports, __webpack_require__) { @@ -165,14 +164,14 @@ Component: ReactComponent, DOM: ReactDOM, PropTypes: ReactPropTypes, - initializeTouchEvents: function initializeTouchEvents(shouldUseTouch) { + initializeTouchEvents: function(shouldUseTouch) { EventPluginUtils.useTouchEvents = shouldUseTouch; }, createClass: ReactClass.createClass, createElement: createElement, cloneElement: cloneElement, createFactory: createFactory, - createMixin: function createMixin(mixin) { + createMixin: function(mixin) { // Currently a noop. Will be used to validate and trace mixins. return mixin; }, @@ -192,7 +191,9 @@ // Inject the runtime into a devtools global hook regardless of browser. // Allows for debugging when the hook is injected on the page. - if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ CurrentOwner: ReactCurrentOwner, InstanceHandles: ReactInstanceHandles, @@ -210,20 +211,37 @@ // link if not installed. if (navigator.userAgent.indexOf('Chrome') > -1) { if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { - console.debug('Download the React DevTools for a better development experience: ' + 'https://fb.me/react-devtools'); + console.debug( + 'Download the React DevTools for a better development experience: ' + + 'https://fb.me/react-devtools' + ); } } var expectedFeatures = [ - // shims - Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim, - - // shams - Object.create, Object.freeze]; + // shims + Array.isArray, + Array.prototype.every, + Array.prototype.forEach, + Array.prototype.indexOf, + Array.prototype.map, + Date.now, + Function.prototype.bind, + Object.keys, + String.prototype.split, + String.prototype.trim, + + // shams + Object.create, + Object.freeze + ]; for (var i = 0; i < expectedFeatures.length; i++) { if (!expectedFeatures[i]) { - console.error('One or more ES5 shim/shams expected by React are not available: ' + 'https://fb.me/react-warning-polyfills'); + console.error( + 'One or more ES5 shim/shams expected by React are not available: ' + + 'https://fb.me/react-warning-polyfills' + ); break; } } @@ -233,6 +251,7 @@ React.version = '0.13.3'; module.exports = React; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -240,16 +259,83 @@ /***/ function(module, exports) { // shim for using process in browser + var process = module.exports = {}; - 'use strict'; + // cached from whatever global is present so that test runners that stub it + // don't break things. But we need to wrap it in a try catch in case it is + // wrapped in strict mode code which doesn't define any globals. It's inside a + // function because try/catches deoptimize in certain engines. - var process = module.exports = {}; + var cachedSetTimeout; + var cachedClearTimeout; + + (function () { + try { + cachedSetTimeout = setTimeout; + } catch (e) { + cachedSetTimeout = function () { + throw new Error('setTimeout is not defined'); + } + } + try { + cachedClearTimeout = clearTimeout; + } catch (e) { + cachedClearTimeout = function () { + throw new Error('clearTimeout is not defined'); + } + } + } ()) + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + + } + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + + } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); @@ -265,11 +351,11 @@ if (draining) { return; } - var timeout = setTimeout(cleanUpNextTick); + var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; - while (len) { + while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { @@ -282,7 +368,7 @@ } currentQueue = null; draining = false; - clearTimeout(timeout); + runClearTimeout(timeout); } process.nextTick = function (fun) { @@ -294,7 +380,7 @@ } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { - setTimeout(drainQueue, 0); + runTimeout(drainQueue); } }; @@ -327,15 +413,12 @@ throw new Error('process.binding is not supported'); }; - process.cwd = function () { - return '/'; - }; + process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; - process.umask = function () { - return 0; - }; + process.umask = function() { return 0; }; + /***/ }, /* 4 */ @@ -368,10 +451,14 @@ */ var injection = { Mount: null, - injectMount: function injectMount(InjectedMount) { + injectMount: function(InjectedMount) { injection.Mount = InjectedMount; if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? invariant(InjectedMount && InjectedMount.getNode, 'EventPluginUtils.injection.injectMount(...): Injected Mount module ' + 'is missing getNode.') : invariant(InjectedMount && InjectedMount.getNode); + ("production" !== process.env.NODE_ENV ? invariant( + InjectedMount && InjectedMount.getNode, + 'EventPluginUtils.injection.injectMount(...): Injected Mount module ' + + 'is missing getNode.' + ) : invariant(InjectedMount && InjectedMount.getNode)); } } }; @@ -379,28 +466,38 @@ var topLevelTypes = EventConstants.topLevelTypes; function isEndish(topLevelType) { - return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel; + return topLevelType === topLevelTypes.topMouseUp || + topLevelType === topLevelTypes.topTouchEnd || + topLevelType === topLevelTypes.topTouchCancel; } function isMoveish(topLevelType) { - return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove; + return topLevelType === topLevelTypes.topMouseMove || + topLevelType === topLevelTypes.topTouchMove; } function isStartish(topLevelType) { - return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart; + return topLevelType === topLevelTypes.topMouseDown || + topLevelType === topLevelTypes.topTouchStart; } + var validateEventDispatches; if ("production" !== process.env.NODE_ENV) { - validateEventDispatches = function (event) { + validateEventDispatches = function(event) { var dispatchListeners = event._dispatchListeners; var dispatchIDs = event._dispatchIDs; var listenersIsArr = Array.isArray(dispatchListeners); var idsIsArr = Array.isArray(dispatchIDs); var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0; - var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; - - "production" !== process.env.NODE_ENV ? invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen); + var listenersLen = listenersIsArr ? + dispatchListeners.length : + dispatchListeners ? 1 : 0; + + ("production" !== process.env.NODE_ENV ? invariant( + idsIsArr === listenersIsArr && IDsLen === listenersLen, + 'EventPluginUtils: Invalid `event`.' + ) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen)); }; } @@ -506,8 +603,13 @@ } var dispatchListener = event._dispatchListeners; var dispatchID = event._dispatchIDs; - "production" !== process.env.NODE_ENV ? invariant(!Array.isArray(dispatchListener), 'executeDirectDispatch(...): Invalid `event`.') : invariant(!Array.isArray(dispatchListener)); - var res = dispatchListener ? dispatchListener(event, dispatchID) : null; + ("production" !== process.env.NODE_ENV ? invariant( + !Array.isArray(dispatchListener), + 'executeDirectDispatch(...): Invalid `event`.' + ) : invariant(!Array.isArray(dispatchListener))); + var res = dispatchListener ? + dispatchListener(event, dispatchID) : + null; event._dispatchListeners = null; event._dispatchIDs = null; return res; @@ -539,6 +641,7 @@ }; module.exports = EventPluginUtils; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -560,7 +663,7 @@ var keyMirror = __webpack_require__(6); - var PropagationPhases = keyMirror({ bubbled: null, captured: null }); + var PropagationPhases = keyMirror({bubbled: null, captured: null}); /** * Types of raw signals from the browser caught at the top level. @@ -616,6 +719,7 @@ module.exports = EventConstants; + /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { @@ -654,10 +758,13 @@ * @param {object} obj * @return {object} */ - var keyMirror = function keyMirror(obj) { + var keyMirror = function(obj) { var ret = {}; var key; - "production" !== process.env.NODE_ENV ? invariant(obj instanceof Object && !Array.isArray(obj), 'keyMirror(...): Argument must be an object.') : invariant(obj instanceof Object && !Array.isArray(obj)); + ("production" !== process.env.NODE_ENV ? invariant( + obj instanceof Object && !Array.isArray(obj), + 'keyMirror(...): Argument must be an object.' + ) : invariant(obj instanceof Object && !Array.isArray(obj))); for (key in obj) { if (!obj.hasOwnProperty(key)) { continue; @@ -668,6 +775,7 @@ }; module.exports = keyMirror; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -698,7 +806,7 @@ * will remain to ensure logic does not differ in production. */ - var invariant = function invariant(condition, format, a, b, c, d, e, f) { + var invariant = function(condition, format, a, b, c, d, e, f) { if ("production" !== process.env.NODE_ENV) { if (format === undefined) { throw new Error('invariant requires an error message argument'); @@ -708,13 +816,17 @@ 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.'); + 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('Invariant Violation: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - })); + error = new Error( + 'Invariant Violation: ' + + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); } error.framesToPop = 1; // we don't care about invariant's own frame @@ -723,6 +835,7 @@ }; module.exports = invariant; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -767,7 +880,8 @@ function forEachSingleChild(traverseContext, child, name, i) { var forEachBookKeeping = traverseContext; - forEachBookKeeping.forEachFunction.call(forEachBookKeeping.forEachContext, child, i); + forEachBookKeeping.forEachFunction.call( + forEachBookKeeping.forEachContext, child, i); } /** @@ -785,7 +899,8 @@ return children; } - var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + var traverseContext = + ForEachBookKeeping.getPooled(forEachFunc, forEachContext); traverseAllChildren(children, forEachSingleChild, traverseContext); ForEachBookKeeping.release(traverseContext); } @@ -812,11 +927,18 @@ var keyUnique = !mapResult.hasOwnProperty(name); if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(keyUnique, 'ReactChildren.map(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.', name) : null; + ("production" !== process.env.NODE_ENV ? warning( + keyUnique, + 'ReactChildren.map(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.', + name + ) : null); } if (keyUnique) { - var mappedChild = mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i); + var mappedChild = + mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i); mapResult[name] = mappedChild; } } @@ -869,6 +991,7 @@ }; module.exports = ReactChildren; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -897,7 +1020,7 @@ * the Class itself, not an instance. If any others are needed, simply add them * here, or in their own files. */ - var oneArgumentPooler = function oneArgumentPooler(copyFieldsFrom) { + var oneArgumentPooler = function(copyFieldsFrom) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -908,7 +1031,7 @@ } }; - var twoArgumentPooler = function twoArgumentPooler(a1, a2) { + var twoArgumentPooler = function(a1, a2) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -919,7 +1042,7 @@ } }; - var threeArgumentPooler = function threeArgumentPooler(a1, a2, a3) { + var threeArgumentPooler = function(a1, a2, a3) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -930,7 +1053,7 @@ } }; - var fiveArgumentPooler = function fiveArgumentPooler(a1, a2, a3, a4, a5) { + var fiveArgumentPooler = function(a1, a2, a3, a4, a5) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -941,9 +1064,12 @@ } }; - var standardReleaser = function standardReleaser(instance) { + var standardReleaser = function(instance) { var Klass = this; - "production" !== process.env.NODE_ENV ? invariant(instance instanceof Klass, 'Trying to release an instance into a pool of a different type.') : invariant(instance instanceof Klass); + ("production" !== process.env.NODE_ENV ? invariant( + instance instanceof Klass, + 'Trying to release an instance into a pool of a different type.' + ) : invariant(instance instanceof Klass)); if (instance.destructor) { instance.destructor(); } @@ -964,7 +1090,7 @@ * @param {Function} CopyConstructor Constructor that can be used to reset. * @param {Function} pooler Customizable pooler. */ - var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) { + var addPoolingTo = function(CopyConstructor, pooler) { var NewKlass = CopyConstructor; NewKlass.instancePool = []; NewKlass.getPooled = pooler || DEFAULT_POOLER; @@ -984,6 +1110,7 @@ }; module.exports = PooledClass; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1024,27 +1151,44 @@ // Feature test. Don't even try to issue this warning if we can't use // enumerable: false. - var dummy = function dummy() { + var dummy = function() { return 1; }; - Object.defineProperty({}, fragmentKey, { enumerable: false, value: true }); + Object.defineProperty( + {}, + fragmentKey, + {enumerable: false, value: true} + ); - Object.defineProperty({}, 'key', { enumerable: true, get: dummy }); + Object.defineProperty( + {}, + 'key', + {enumerable: true, get: dummy} + ); canWarnForReactFragment = true; - } catch (x) {} + } catch (x) { } - var proxyPropertyAccessWithWarning = function proxyPropertyAccessWithWarning(obj, key) { + var proxyPropertyAccessWithWarning = function(obj, key) { Object.defineProperty(obj, key, { enumerable: true, - get: function get() { - "production" !== process.env.NODE_ENV ? warning(this[didWarnKey], 'A ReactFragment is an opaque type. Accessing any of its ' + 'properties is deprecated. Pass it to one of the React.Children ' + 'helpers.') : null; + get: function() { + ("production" !== process.env.NODE_ENV ? warning( + this[didWarnKey], + 'A ReactFragment is an opaque type. Accessing any of its ' + + 'properties is deprecated. Pass it to one of the React.Children ' + + 'helpers.' + ) : null); this[didWarnKey] = true; return this[fragmentKey][key]; }, - set: function set(value) { - "production" !== process.env.NODE_ENV ? warning(this[didWarnKey], 'A ReactFragment is an immutable opaque type. Mutating its ' + 'properties is deprecated.') : null; + set: function(value) { + ("production" !== process.env.NODE_ENV ? warning( + this[didWarnKey], + 'A ReactFragment is an immutable opaque type. Mutating its ' + + 'properties is deprecated.' + ) : null); this[didWarnKey] = true; this[fragmentKey][key] = value; } @@ -1053,12 +1197,12 @@ var issuedWarnings = {}; - var didWarnForFragment = function didWarnForFragment(fragment) { + var didWarnForFragment = function(fragment) { // We use the keys and the type of the value as a heuristic to dedupe the // warning to avoid spamming too much. var fragmentCacheKey = ''; for (var key in fragment) { - fragmentCacheKey += key + ':' + typeof fragment[key] + ','; + fragmentCacheKey += key + ':' + (typeof fragment[key]) + ','; } var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey]; issuedWarnings[fragmentCacheKey] = true; @@ -1069,14 +1213,22 @@ var ReactFragment = { // Wrap a keyed object in an opaque proxy that warns you if you access any // of its properties. - create: function create(object) { + create: function(object) { if ("production" !== process.env.NODE_ENV) { if (typeof object !== 'object' || !object || Array.isArray(object)) { - "production" !== process.env.NODE_ENV ? warning(false, 'React.addons.createFragment only accepts a single object.', object) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'React.addons.createFragment only accepts a single object.', + object + ) : null); return object; } if (ReactElement.isValidElement(object)) { - "production" !== process.env.NODE_ENV ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'React.addons.createFragment does not accept a ReactElement ' + + 'without a wrapper object.' + ) : null); return object; } if (canWarnForReactFragment) { @@ -1101,11 +1253,16 @@ }, // Extract the original keyed object from the fragment opaque type. Warn if // a plain object is passed here. - extract: function extract(fragment) { + extract: function(fragment) { if ("production" !== process.env.NODE_ENV) { if (canWarnForReactFragment) { if (!fragment[fragmentKey]) { - "production" !== process.env.NODE_ENV ? warning(didWarnForFragment(fragment), 'Any use of a keyed object should be wrapped in ' + 'React.addons.createFragment(object) before being passed as a ' + 'child.') : null; + ("production" !== process.env.NODE_ENV ? warning( + didWarnForFragment(fragment), + 'Any use of a keyed object should be wrapped in ' + + 'React.addons.createFragment(object) before being passed as a ' + + 'child.' + ) : null); return fragment; } return fragment[fragmentKey]; @@ -1116,7 +1273,7 @@ // Check if this is a fragment and if so, extract the keyed object. If it // is a fragment-like object, warn that it should be wrapped. Ignore if we // can't determine what kind of object this is. - extractIfFragment: function extractIfFragment(fragment) { + extractIfFragment: function(fragment) { if ("production" !== process.env.NODE_ENV) { if (canWarnForReactFragment) { // If it is the opaque type, return the keyed object. @@ -1127,7 +1284,8 @@ // it is probably meant as a fragment, so we can warn early. Defer, // the warning to extract. for (var key in fragment) { - if (fragment.hasOwnProperty(key) && ReactElement.isValidElement(fragment[key])) { + if (fragment.hasOwnProperty(key) && + ReactElement.isValidElement(fragment[key])) { // This looks like a fragment object, we should provide an // early warning. return ReactFragment.extract(fragment); @@ -1140,6 +1298,7 @@ }; module.exports = ReactFragment; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1183,15 +1342,20 @@ configurable: false, enumerable: true, - get: function get() { + get: function() { if (!this._store) { return null; } return this._store[key]; }, - set: function set(value) { - "production" !== process.env.NODE_ENV ? warning(false, 'Don\'t set the %s property of the React element. Instead, ' + 'specify the correct value when initially creating the element.', key) : null; + set: function(value) { + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Don\'t set the %s property of the React element. Instead, ' + + 'specify the correct value when initially creating the element.', + key + ) : null); this._store[key] = value; } @@ -1233,7 +1397,7 @@ * @param {*} props * @internal */ - var ReactElement = function ReactElement(type, key, ref, owner, context, props) { + var ReactElement = function(type, key, ref, owner, context, props) { // Built-in properties that belong on the element this.type = type; this.key = key; @@ -1251,7 +1415,7 @@ // an external backing store so that we can freeze the whole object. // This can be replaced with a WeakMap once they are implemented in // commonly used development environments. - this._store = { props: props, originalProps: assign({}, props) }; + this._store = {props: props, originalProps: assign({}, props)}; // To make comparing ReactElements easier for testing purposes, we make // the validation flag non-enumerable (where possible, which should @@ -1263,7 +1427,8 @@ enumerable: false, writable: true }); - } catch (x) {} + } catch (x) { + } this._store.validated = false; // We're not allowed to set props directly on the object so we early @@ -1288,7 +1453,7 @@ defineMutationMembrane(ReactElement.prototype); } - ReactElement.createElement = function (type, config, children) { + ReactElement.createElement = function(type, config, children) { var propName; // Reserved names are extracted @@ -1302,7 +1467,8 @@ key = config.key === undefined ? null : '' + config.key; // Remaining properties are added to a new props object for (propName in config) { - if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } @@ -1331,10 +1497,17 @@ } } - return new ReactElement(type, key, ref, ReactCurrentOwner.current, ReactContext.current, props); + return new ReactElement( + type, + key, + ref, + ReactCurrentOwner.current, + ReactContext.current, + props + ); }; - ReactElement.createFactory = function (type) { + ReactElement.createFactory = function(type) { var factory = ReactElement.createElement.bind(null, type); // Expose the type on the factory and the prototype so that it can be // easily accessed on elements. E.g. .type === Foo.type. @@ -1345,8 +1518,15 @@ return factory; }; - ReactElement.cloneAndReplaceProps = function (oldElement, newProps) { - var newElement = new ReactElement(oldElement.type, oldElement.key, oldElement.ref, oldElement._owner, oldElement._context, newProps); + ReactElement.cloneAndReplaceProps = function(oldElement, newProps) { + var newElement = new ReactElement( + oldElement.type, + oldElement.key, + oldElement.ref, + oldElement._owner, + oldElement._context, + newProps + ); if ("production" !== process.env.NODE_ENV) { // If the key on the original is valid, then the clone is valid @@ -1355,7 +1535,7 @@ return newElement; }; - ReactElement.cloneElement = function (element, config, children) { + ReactElement.cloneElement = function(element, config, children) { var propName; // Original props are copied @@ -1379,7 +1559,8 @@ } // Remaining properties override existing props for (propName in config) { - if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } @@ -1398,7 +1579,14 @@ props.children = childArray; } - return new ReactElement(element.type, key, ref, owner, element._context, props); + return new ReactElement( + element.type, + key, + ref, + owner, + element._context, + props + ); }; /** @@ -1406,7 +1594,7 @@ * @return {boolean} True if `object` is a valid component. * @final */ - ReactElement.isValidElement = function (object) { + ReactElement.isValidElement = function(object) { // ReactTestUtils is often used outside of beforeEach where as React is // within it. This leads to two different instances of React on the same // page. To identify a element from a different React instance we use @@ -1421,6 +1609,7 @@ }; module.exports = ReactElement; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1476,9 +1665,13 @@ * @param {function} scopedCallback Callback to run with the new context * @return {ReactComponent|array} */ - withContext: function withContext(newContext, scopedCallback) { + withContext: function(newContext, scopedCallback) { if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(didWarn, 'withContext is deprecated and will be removed in a future version. ' + 'Use a wrapper component with getChildContext instead.') : null; + ("production" !== process.env.NODE_ENV ? warning( + didWarn, + 'withContext is deprecated and will be removed in a future version. ' + + 'Use a wrapper component with getChildContext instead.' + ) : null); didWarn = true; } @@ -1497,6 +1690,7 @@ }; module.exports = ReactContext; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1551,6 +1745,7 @@ module.exports = assign; + /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { @@ -1575,6 +1770,7 @@ } module.exports = emptyObject; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1606,14 +1802,19 @@ var warning = emptyFunction; if ("production" !== process.env.NODE_ENV) { - warning = function (condition, format) { - for (var args = [], $__0 = 2, $__1 = arguments.length; $__0 < $__1; $__0++) args.push(arguments[$__0]); + warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); } if (format.length < 10 || /^[s\W]*$/.test(format)) { - throw new Error('The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format); + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); } if (format.indexOf('Failed Composite propType: ') === 0) { @@ -1622,21 +1823,20 @@ if (!condition) { var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); + var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];}); console.warn(message); try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); - } catch (x) {} + } catch(x) {} } }; } module.exports = warning; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1654,10 +1854,8 @@ * @providesModule emptyFunction */ - "use strict"; - function makeEmptyFunction(arg) { - return function () { + return function() { return arg; }; } @@ -1673,15 +1871,12 @@ emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); - emptyFunction.thatReturnsThis = function () { - return this; - }; - emptyFunction.thatReturnsArgument = function (arg) { - return arg; - }; + emptyFunction.thatReturnsThis = function() { return this; }; + emptyFunction.thatReturnsArgument = function(arg) { return arg; }; module.exports = emptyFunction; + /***/ }, /* 17 */ /***/ function(module, exports) { @@ -1719,6 +1914,7 @@ module.exports = ReactCurrentOwner; + /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { @@ -1789,7 +1985,10 @@ * @return {string} An escaped string. */ function escapeUserProvidedKey(text) { - return ('' + text).replace(userProvidedKeyEscapeRegex, userProvidedKeyEscaper); + return ('' + text).replace( + userProvidedKeyEscapeRegex, + userProvidedKeyEscaper + ); } /** @@ -1812,7 +2011,13 @@ * process. * @return {!number} The number of children in this subtree. */ - function traverseAllChildrenImpl(children, nameSoFar, indexSoFar, callback, traverseContext) { + function traverseAllChildrenImpl( + children, + nameSoFar, + indexSoFar, + callback, + traverseContext + ) { var type = typeof children; if (type === 'undefined' || type === 'boolean') { @@ -1820,11 +2025,18 @@ children = null; } - if (children === null || type === 'string' || type === 'number' || ReactElement.isValidElement(children)) { - 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, indexSoFar); + if (children === null || + type === 'string' || + type === 'number' || + ReactElement.isValidElement(children)) { + 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, + indexSoFar + ); return 1; } @@ -1834,9 +2046,18 @@ if (Array.isArray(children)) { for (var i = 0; i < children.length; i++) { child = children[i]; - nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + getComponentKey(child, i); + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + getComponentKey(child, i) + ); nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); } } else { var iteratorFn = getIteratorFn(children); @@ -1847,13 +2068,27 @@ var ii = 0; while (!(step = iterator.next()).done) { child = step.value; - nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + getComponentKey(child, ii++); + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + getComponentKey(child, ii++) + ); nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); } } else { if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? 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.') : null; + ("production" !== process.env.NODE_ENV ? 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.' + ) : null); didWarnAboutMaps = true; } // Iterator will provide entry [k,v] tuples rather than values. @@ -1861,21 +2096,45 @@ var entry = step.value; if (entry) { child = entry[1]; - nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + + getComponentKey(child, 0) + ); nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); } } } } else if (type === 'object') { - "production" !== process.env.NODE_ENV ? invariant(children.nodeType !== 1, 'traverseAllChildren(...): Encountered an invalid child; DOM ' + 'elements are not valid children of React components.') : invariant(children.nodeType !== 1); + ("production" !== process.env.NODE_ENV ? invariant( + children.nodeType !== 1, + 'traverseAllChildren(...): Encountered an invalid child; DOM ' + + 'elements are not valid children of React components.' + ) : invariant(children.nodeType !== 1)); var fragment = ReactFragment.extract(children); for (var key in fragment) { if (fragment.hasOwnProperty(key)) { child = fragment[key]; - nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + wrapUserProvidedKey(key) + SUBSEPARATOR + getComponentKey(child, 0); + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + wrapUserProvidedKey(key) + SUBSEPARATOR + + getComponentKey(child, 0) + ); nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); } } } @@ -1909,6 +2168,7 @@ } module.exports = traverseAllChildren; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1972,7 +2232,9 @@ * @private */ function isValidID(id) { - return id === '' || id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR; + return id === '' || ( + id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR + ); } /** @@ -1984,7 +2246,10 @@ * @internal */ function isAncestorIDOf(ancestorID, descendantID) { - return descendantID.indexOf(ancestorID) === 0 && isBoundary(descendantID, ancestorID.length); + return ( + descendantID.indexOf(ancestorID) === 0 && + isBoundary(descendantID, ancestorID.length) + ); } /** @@ -2008,8 +2273,19 @@ * @private */ function getNextDescendantID(ancestorID, destinationID) { - "production" !== process.env.NODE_ENV ? invariant(isValidID(ancestorID) && isValidID(destinationID), 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', ancestorID, destinationID) : invariant(isValidID(ancestorID) && isValidID(destinationID)); - "production" !== process.env.NODE_ENV ? invariant(isAncestorIDOf(ancestorID, destinationID), 'getNextDescendantID(...): React has made an invalid assumption about ' + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', ancestorID, destinationID) : invariant(isAncestorIDOf(ancestorID, destinationID)); + ("production" !== process.env.NODE_ENV ? invariant( + isValidID(ancestorID) && isValidID(destinationID), + 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', + ancestorID, + destinationID + ) : invariant(isValidID(ancestorID) && isValidID(destinationID))); + ("production" !== process.env.NODE_ENV ? invariant( + isAncestorIDOf(ancestorID, destinationID), + 'getNextDescendantID(...): React has made an invalid assumption about ' + + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', + ancestorID, + destinationID + ) : invariant(isAncestorIDOf(ancestorID, destinationID))); if (ancestorID === destinationID) { return ancestorID; } @@ -2051,7 +2327,13 @@ } } var longestCommonID = oneID.substr(0, lastCommonMarkerIndex); - "production" !== process.env.NODE_ENV ? invariant(isValidID(longestCommonID), 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', oneID, twoID, longestCommonID) : invariant(isValidID(longestCommonID)); + ("production" !== process.env.NODE_ENV ? invariant( + isValidID(longestCommonID), + 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', + oneID, + twoID, + longestCommonID + ) : invariant(isValidID(longestCommonID))); return longestCommonID; } @@ -2070,13 +2352,23 @@ function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) { start = start || ''; stop = stop || ''; - "production" !== process.env.NODE_ENV ? invariant(start !== stop, 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', start) : invariant(start !== stop); + ("production" !== process.env.NODE_ENV ? invariant( + start !== stop, + 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', + start + ) : invariant(start !== stop)); var traverseUp = isAncestorIDOf(stop, start); - "production" !== process.env.NODE_ENV ? invariant(traverseUp || isAncestorIDOf(start, stop), 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + 'not have a parent path.', start, stop) : invariant(traverseUp || isAncestorIDOf(start, stop)); + ("production" !== process.env.NODE_ENV ? invariant( + traverseUp || isAncestorIDOf(start, stop), + 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + + 'not have a parent path.', + start, + stop + ) : invariant(traverseUp || isAncestorIDOf(start, stop))); // Traverse from `start` to `stop` one depth at a time. var depth = 0; var traverse = traverseUp ? getParentID : getNextDescendantID; - for (var id = start;; /* until break */id = traverse(id, stop)) { + for (var id = start; /* until break */; id = traverse(id, stop)) { var ret; if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) { ret = cb(id, traverseUp, arg); @@ -2085,7 +2377,12 @@ // Only break //after// visiting `stop`. break; } - "production" !== process.env.NODE_ENV ? invariant(depth++ < MAX_TREE_DEPTH, 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', start, stop) : invariant(depth++ < MAX_TREE_DEPTH); + ("production" !== process.env.NODE_ENV ? invariant( + depth++ < MAX_TREE_DEPTH, + 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', + start, stop + ) : invariant(depth++ < MAX_TREE_DEPTH)); } } @@ -2102,7 +2399,7 @@ * Constructs a React root ID * @return {string} A React root ID. */ - createReactRootID: function createReactRootID() { + createReactRootID: function() { return getReactRootIDString(ReactRootIndex.createReactRootIndex()); }, @@ -2114,7 +2411,7 @@ * @return {string} A React ID. * @internal */ - createReactID: function createReactID(rootID, name) { + createReactID: function(rootID, name) { return rootID + name; }, @@ -2126,7 +2423,7 @@ * @return {?string} DOM ID of the React component that is the root. * @internal */ - getReactRootIDFromNodeID: function getReactRootIDFromNodeID(id) { + getReactRootIDFromNodeID: function(id) { if (id && id.charAt(0) === SEPARATOR && id.length > 1) { var index = id.indexOf(SEPARATOR, 1); return index > -1 ? id.substr(0, index) : id; @@ -2148,7 +2445,7 @@ * @param {*} downArg Argument to invoke the callback with on entered IDs. * @internal */ - traverseEnterLeave: function traverseEnterLeave(leaveID, enterID, cb, upArg, downArg) { + traverseEnterLeave: function(leaveID, enterID, cb, upArg, downArg) { var ancestorID = getFirstCommonAncestorID(leaveID, enterID); if (ancestorID !== leaveID) { traverseParentPath(leaveID, ancestorID, cb, upArg, false, true); @@ -2168,7 +2465,7 @@ * @param {*} arg Argument to invoke the callback with. * @internal */ - traverseTwoPhase: function traverseTwoPhase(targetID, cb, arg) { + traverseTwoPhase: function(targetID, cb, arg) { if (targetID) { traverseParentPath('', targetID, cb, arg, true, false); traverseParentPath(targetID, '', cb, arg, false, true); @@ -2187,7 +2484,7 @@ * @param {*} arg Argument to invoke the callback with. * @internal */ - traverseAncestors: function traverseAncestors(targetID, cb, arg) { + traverseAncestors: function(targetID, cb, arg) { traverseParentPath('', targetID, cb, arg, true, false); }, @@ -2210,6 +2507,7 @@ }; module.exports = ReactInstanceHandles; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -2234,7 +2532,7 @@ /** * @param {function} _createReactRootIndex */ - injectCreateReactRootIndex: function injectCreateReactRootIndex(_createReactRootIndex) { + injectCreateReactRootIndex: function(_createReactRootIndex) { ReactRootIndex.createReactRootIndex = _createReactRootIndex; } }; @@ -2246,6 +2544,7 @@ module.exports = ReactRootIndex; + /***/ }, /* 21 */ /***/ function(module, exports) { @@ -2283,7 +2582,9 @@ * @return {?function} */ function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + var iteratorFn = maybeIterable && ( + (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]) + ); if (typeof iteratorFn === 'function') { return iteratorFn; } @@ -2291,6 +2592,7 @@ module.exports = getIteratorFn; + /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { @@ -2346,10 +2648,22 @@ * @final * @protected */ - ReactComponent.prototype.setState = function (partialState, callback) { - "production" !== process.env.NODE_ENV ? invariant(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null, 'setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.') : invariant(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null); + ReactComponent.prototype.setState = function(partialState, callback) { + ("production" !== process.env.NODE_ENV ? invariant( + typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null, + 'setState(...): takes an object of state variables to update or a ' + + 'function which returns an object of state variables.' + ) : invariant(typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null)); if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : null; + ("production" !== process.env.NODE_ENV ? warning( + partialState != null, + 'setState(...): You passed an undefined or null state object; ' + + 'instead, use forceUpdate().' + ) : null); } ReactUpdateQueue.enqueueSetState(this, partialState); if (callback) { @@ -2371,7 +2685,7 @@ * @final * @protected */ - ReactComponent.prototype.forceUpdate = function (callback) { + ReactComponent.prototype.forceUpdate = function(callback) { ReactUpdateQueue.enqueueForceUpdate(this); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); @@ -2385,17 +2699,39 @@ */ if ("production" !== process.env.NODE_ENV) { var deprecatedAPIs = { - getDOMNode: ['getDOMNode', 'Use React.findDOMNode(component) instead.'], - isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], - replaceProps: ['replaceProps', 'Instead, call React.render again at the top level.'], - replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'], - setProps: ['setProps', 'Instead, call React.render again at the top level.'] + getDOMNode: [ + 'getDOMNode', + 'Use React.findDOMNode(component) instead.' + ], + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.' + ], + replaceProps: [ + 'replaceProps', + 'Instead, call React.render again at the top level.' + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).' + ], + setProps: [ + 'setProps', + 'Instead, call React.render again at the top level.' + ] }; - var defineDeprecationWarning = function defineDeprecationWarning(methodName, info) { + var defineDeprecationWarning = function(methodName, info) { try { Object.defineProperty(ReactComponent.prototype, methodName, { - get: function get() { - "production" !== process.env.NODE_ENV ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : null; + get: function() { + ("production" !== process.env.NODE_ENV ? warning( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1] + ) : null); return undefined; } }); @@ -2411,6 +2747,7 @@ } module.exports = ReactComponent; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -2451,7 +2788,13 @@ } function getInternalInstanceReadyForUpdate(publicInstance, callerName) { - "production" !== process.env.NODE_ENV ? invariant(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition ' + '(such as within `render`). Render methods should be a pure function ' + 'of props and state.', callerName) : invariant(ReactCurrentOwner.current == null); + ("production" !== process.env.NODE_ENV ? invariant( + ReactCurrentOwner.current == null, + '%s(...): Cannot update during an existing state transition ' + + '(such as within `render`). Render methods should be a pure function ' + + 'of props and state.', + callerName + ) : invariant(ReactCurrentOwner.current == null)); var internalInstance = ReactInstanceMap.get(publicInstance); if (!internalInstance) { @@ -2459,7 +2802,14 @@ // Only warn when we have a callerName. Otherwise we should be silent. // We're probably calling from enqueueCallback. We don't want to warn // there because we already warned for the corresponding lifecycle method. - "production" !== process.env.NODE_ENV ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted ' + 'component. This is a no-op.', callerName, callerName) : null; + ("production" !== process.env.NODE_ENV ? warning( + !callerName, + '%s(...): Can only update a mounted or mounting component. ' + + 'This usually means you called %s() on an unmounted ' + + 'component. This is a no-op.', + callerName, + callerName + ) : null); } return null; } @@ -2485,8 +2835,13 @@ * @param {?function} callback Called after state is updated. * @internal */ - enqueueCallback: function enqueueCallback(publicInstance, callback) { - "production" !== process.env.NODE_ENV ? invariant(typeof callback === 'function', 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + 'isn\'t callable.') : invariant(typeof callback === 'function'); + enqueueCallback: function(publicInstance, callback) { + ("production" !== process.env.NODE_ENV ? invariant( + typeof callback === 'function', + 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + + 'isn\'t callable.' + ) : invariant(typeof callback === 'function')); var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); // Previously we would throw an error if we didn't have an internal @@ -2494,7 +2849,8 @@ // behavior we have in other enqueue* methods. // We also need to ignore callbacks in componentWillMount. See // enqueueUpdates. - if (!internalInstance || internalInstance === ReactLifeCycle.currentlyMountingInstance) { + if (!internalInstance || + internalInstance === ReactLifeCycle.currentlyMountingInstance) { return null; } @@ -2510,8 +2866,13 @@ enqueueUpdate(internalInstance); }, - enqueueCallbackInternal: function enqueueCallbackInternal(internalInstance, callback) { - "production" !== process.env.NODE_ENV ? invariant(typeof callback === 'function', 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + 'isn\'t callable.') : invariant(typeof callback === 'function'); + enqueueCallbackInternal: function(internalInstance, callback) { + ("production" !== process.env.NODE_ENV ? invariant( + typeof callback === 'function', + 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + + 'isn\'t callable.' + ) : invariant(typeof callback === 'function')); if (internalInstance._pendingCallbacks) { internalInstance._pendingCallbacks.push(callback); } else { @@ -2533,8 +2894,11 @@ * @param {ReactClass} publicInstance The instance that should rerender. * @internal */ - enqueueForceUpdate: function enqueueForceUpdate(publicInstance) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); + enqueueForceUpdate: function(publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'forceUpdate' + ); if (!internalInstance) { return; @@ -2556,8 +2920,11 @@ * @param {object} completeState Next state. * @internal */ - enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); + enqueueReplaceState: function(publicInstance, completeState) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'replaceState' + ); if (!internalInstance) { return; @@ -2579,14 +2946,19 @@ * @param {object} partialState Next partial state to be merged with state. * @internal */ - enqueueSetState: function enqueueSetState(publicInstance, partialState) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); + enqueueSetState: function(publicInstance, partialState) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'setState' + ); if (!internalInstance) { return; } - var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); + var queue = + internalInstance._pendingStateQueue || + (internalInstance._pendingStateQueue = []); queue.push(partialState); enqueueUpdate(internalInstance); @@ -2599,20 +2971,34 @@ * @param {object} partialProps Subset of the next props. * @internal */ - enqueueSetProps: function enqueueSetProps(publicInstance, partialProps) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setProps'); + enqueueSetProps: function(publicInstance, partialProps) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'setProps' + ); if (!internalInstance) { return; } - "production" !== process.env.NODE_ENV ? invariant(internalInstance._isTopLevel, 'setProps(...): You called `setProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + 'get reactively updated when rendered. Instead, change the owner\'s ' + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(internalInstance._isTopLevel); + ("production" !== process.env.NODE_ENV ? invariant( + internalInstance._isTopLevel, + 'setProps(...): You called `setProps` on a ' + + 'component with a parent. This is an anti-pattern since props will ' + + 'get reactively updated when rendered. Instead, change the owner\'s ' + + '`render` method to pass the correct value as props to the component ' + + 'where it is created.' + ) : invariant(internalInstance._isTopLevel)); // Merge with the pending element if it exists, otherwise with existing // element props. - var element = internalInstance._pendingElement || internalInstance._currentElement; + var element = internalInstance._pendingElement || + internalInstance._currentElement; var props = assign({}, element.props, partialProps); - internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(element, props); + internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( + element, + props + ); enqueueUpdate(internalInstance); }, @@ -2624,24 +3010,38 @@ * @param {object} props New props. * @internal */ - enqueueReplaceProps: function enqueueReplaceProps(publicInstance, props) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceProps'); + enqueueReplaceProps: function(publicInstance, props) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'replaceProps' + ); if (!internalInstance) { return; } - "production" !== process.env.NODE_ENV ? invariant(internalInstance._isTopLevel, 'replaceProps(...): You called `replaceProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + 'get reactively updated when rendered. Instead, change the owner\'s ' + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(internalInstance._isTopLevel); + ("production" !== process.env.NODE_ENV ? invariant( + internalInstance._isTopLevel, + 'replaceProps(...): You called `replaceProps` on a ' + + 'component with a parent. This is an anti-pattern since props will ' + + 'get reactively updated when rendered. Instead, change the owner\'s ' + + '`render` method to pass the correct value as props to the component ' + + 'where it is created.' + ) : invariant(internalInstance._isTopLevel)); // Merge with the pending element if it exists, otherwise with existing // element props. - var element = internalInstance._pendingElement || internalInstance._currentElement; - internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(element, props); + var element = internalInstance._pendingElement || + internalInstance._currentElement; + internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( + element, + props + ); enqueueUpdate(internalInstance); }, - enqueueElementInternal: function enqueueElementInternal(internalInstance, newElement) { + enqueueElementInternal: function(internalInstance, newElement) { internalInstance._pendingElement = newElement; enqueueUpdate(internalInstance); } @@ -2649,6 +3049,7 @@ }; module.exports = ReactUpdateQueue; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -2691,6 +3092,7 @@ module.exports = ReactLifeCycle; + /***/ }, /* 25 */ /***/ function(module, exports) { @@ -2723,19 +3125,19 @@ * transform these to strings for IE support. When this transform is fully * supported we can rename it. */ - remove: function remove(key) { + remove: function(key) { key._reactInternalInstance = undefined; }, - get: function get(key) { + get: function(key) { return key._reactInternalInstance; }, - has: function has(key) { + has: function(key) { return key._reactInternalInstance !== undefined; }, - set: function set(key, value) { + set: function(key, value) { key._reactInternalInstance = value; } @@ -2743,6 +3145,7 @@ module.exports = ReactInstanceMap; + /***/ }, /* 26 */ /***/ function(module, exports, __webpack_require__) { @@ -2778,14 +3181,18 @@ var batchingStrategy = null; function ensureInjected() { - "production" !== process.env.NODE_ENV ? invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy, 'ReactUpdates: must inject a reconcile transaction class and batching ' + 'strategy') : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy); + ("production" !== process.env.NODE_ENV ? invariant( + ReactUpdates.ReactReconcileTransaction && batchingStrategy, + 'ReactUpdates: must inject a reconcile transaction class and batching ' + + 'strategy' + ) : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy)); } var NESTED_UPDATES = { - initialize: function initialize() { + initialize: function() { this.dirtyComponentsLength = dirtyComponents.length; }, - close: function close() { + close: function() { if (this.dirtyComponentsLength !== dirtyComponents.length) { // Additional updates were enqueued by componentDidUpdate handlers or // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run @@ -2801,10 +3208,10 @@ }; var UPDATE_QUEUEING = { - initialize: function initialize() { + initialize: function() { this.callbackQueue.reset(); }, - close: function close() { + close: function() { this.callbackQueue.notifyAll(); } }; @@ -2815,15 +3222,18 @@ this.reinitializeTransaction(); this.dirtyComponentsLength = null; this.callbackQueue = CallbackQueue.getPooled(); - this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(); + this.reconcileTransaction = + ReactUpdates.ReactReconcileTransaction.getPooled(); } - assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, { - getTransactionWrappers: function getTransactionWrappers() { + assign( + ReactUpdatesFlushTransaction.prototype, + Transaction.Mixin, { + getTransactionWrappers: function() { return TRANSACTION_WRAPPERS; }, - destructor: function destructor() { + destructor: function() { this.dirtyComponentsLength = null; CallbackQueue.release(this.callbackQueue); this.callbackQueue = null; @@ -2831,10 +3241,17 @@ this.reconcileTransaction = null; }, - perform: function perform(method, scope, a) { + perform: function(method, scope, a) { // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` // with this transaction's wrappers around it. - return Transaction.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); + return Transaction.Mixin.perform.call( + this, + this.reconcileTransaction.perform, + this.reconcileTransaction, + method, + scope, + a + ); } }); @@ -2858,7 +3275,13 @@ function runBatchedUpdates(transaction) { var len = transaction.dirtyComponentsLength; - "production" !== process.env.NODE_ENV ? invariant(len === dirtyComponents.length, 'Expected flush transaction\'s stored dirty-components length (%s) to ' + 'match dirty-components array length (%s).', len, dirtyComponents.length) : invariant(len === dirtyComponents.length); + ("production" !== process.env.NODE_ENV ? invariant( + len === dirtyComponents.length, + 'Expected flush transaction\'s stored dirty-components length (%s) to ' + + 'match dirty-components array length (%s).', + len, + dirtyComponents.length + ) : invariant(len === dirtyComponents.length)); // Since reconciling a component higher in the owner hierarchy usually (not // always -- see shouldComponentUpdate()) will reconcile children, reconcile @@ -2877,17 +3300,23 @@ var callbacks = component._pendingCallbacks; component._pendingCallbacks = null; - ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction); + ReactReconciler.performUpdateIfNecessary( + component, + transaction.reconcileTransaction + ); if (callbacks) { for (var j = 0; j < callbacks.length; j++) { - transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); + transaction.callbackQueue.enqueue( + callbacks[j], + component.getPublicInstance() + ); } } } } - var flushBatchedUpdates = function flushBatchedUpdates() { + var flushBatchedUpdates = function() { // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents // array and perform any updates enqueued by mount-ready handlers (i.e., // componentDidUpdate) but we need to check here too in order to catch @@ -2908,7 +3337,11 @@ } } }; - flushBatchedUpdates = ReactPerf.measure('ReactUpdates', 'flushBatchedUpdates', flushBatchedUpdates); + flushBatchedUpdates = ReactPerf.measure( + 'ReactUpdates', + 'flushBatchedUpdates', + flushBatchedUpdates + ); /** * Mark a component as needing a rerender, adding an optional callback to a @@ -2922,7 +3355,13 @@ // verify that that's the case. (This is called by each top-level update // function, like setProps, setState, forceUpdate, etc.; creation and // destruction of top-level components is guarded in ReactMount.) - "production" !== process.env.NODE_ENV ? warning(ReactCurrentOwner.current == null, 'enqueueUpdate(): Render methods should be a pure function of props ' + 'and state; triggering nested component updates from render is not ' + 'allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate.') : null; + ("production" !== process.env.NODE_ENV ? warning( + ReactCurrentOwner.current == null, + 'enqueueUpdate(): Render methods should be a pure function of props ' + + 'and state; triggering nested component updates from render is not ' + + 'allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate.' + ) : null); if (!batchingStrategy.isBatchingUpdates) { batchingStrategy.batchedUpdates(enqueueUpdate, component); @@ -2937,21 +3376,37 @@ * if no updates are currently being performed. */ function asap(callback, context) { - "production" !== process.env.NODE_ENV ? invariant(batchingStrategy.isBatchingUpdates, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(batchingStrategy.isBatchingUpdates); + ("production" !== process.env.NODE_ENV ? invariant( + batchingStrategy.isBatchingUpdates, + 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + + 'updates are not being batched.' + ) : invariant(batchingStrategy.isBatchingUpdates)); asapCallbackQueue.enqueue(callback, context); asapEnqueued = true; } var ReactUpdatesInjection = { - injectReconcileTransaction: function injectReconcileTransaction(ReconcileTransaction) { - "production" !== process.env.NODE_ENV ? invariant(ReconcileTransaction, 'ReactUpdates: must provide a reconcile transaction class') : invariant(ReconcileTransaction); + injectReconcileTransaction: function(ReconcileTransaction) { + ("production" !== process.env.NODE_ENV ? invariant( + ReconcileTransaction, + 'ReactUpdates: must provide a reconcile transaction class' + ) : invariant(ReconcileTransaction)); ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; }, - injectBatchingStrategy: function injectBatchingStrategy(_batchingStrategy) { - "production" !== process.env.NODE_ENV ? invariant(_batchingStrategy, 'ReactUpdates: must provide a batching strategy') : invariant(_batchingStrategy); - "production" !== process.env.NODE_ENV ? invariant(typeof _batchingStrategy.batchedUpdates === 'function', 'ReactUpdates: must provide a batchedUpdates() function') : invariant(typeof _batchingStrategy.batchedUpdates === 'function'); - "production" !== process.env.NODE_ENV ? invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean', 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean'); + injectBatchingStrategy: function(_batchingStrategy) { + ("production" !== process.env.NODE_ENV ? invariant( + _batchingStrategy, + 'ReactUpdates: must provide a batching strategy' + ) : invariant(_batchingStrategy)); + ("production" !== process.env.NODE_ENV ? invariant( + typeof _batchingStrategy.batchedUpdates === 'function', + 'ReactUpdates: must provide a batchedUpdates() function' + ) : invariant(typeof _batchingStrategy.batchedUpdates === 'function')); + ("production" !== process.env.NODE_ENV ? invariant( + typeof _batchingStrategy.isBatchingUpdates === 'boolean', + 'ReactUpdates: must provide an isBatchingUpdates boolean attribute' + ) : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean')); batchingStrategy = _batchingStrategy; } }; @@ -2973,6 +3428,7 @@ }; module.exports = ReactUpdates; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3022,7 +3478,7 @@ * @param {?object} context Context to call `callback` with. * @internal */ - enqueue: function enqueue(callback, context) { + enqueue: function(callback, context) { this._callbacks = this._callbacks || []; this._contexts = this._contexts || []; this._callbacks.push(callback); @@ -3035,11 +3491,14 @@ * * @internal */ - notifyAll: function notifyAll() { + notifyAll: function() { var callbacks = this._callbacks; var contexts = this._contexts; if (callbacks) { - "production" !== process.env.NODE_ENV ? invariant(callbacks.length === contexts.length, 'Mismatched list of contexts in callback queue') : invariant(callbacks.length === contexts.length); + ("production" !== process.env.NODE_ENV ? invariant( + callbacks.length === contexts.length, + 'Mismatched list of contexts in callback queue' + ) : invariant(callbacks.length === contexts.length)); this._callbacks = null; this._contexts = null; for (var i = 0, l = callbacks.length; i < l; i++) { @@ -3055,7 +3514,7 @@ * * @internal */ - reset: function reset() { + reset: function() { this._callbacks = null; this._contexts = null; }, @@ -3063,7 +3522,7 @@ /** * `PooledClass` looks for this. */ - destructor: function destructor() { + destructor: function() { this.reset(); } @@ -3072,6 +3531,7 @@ PooledClass.addPoolingTo(CallbackQueue); module.exports = CallbackQueue; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3114,13 +3574,17 @@ * @param {string} objectName * @param {object} methodNames */ - measureMethods: function measureMethods(object, objectName, methodNames) { + measureMethods: function(object, objectName, methodNames) { if ("production" !== process.env.NODE_ENV) { for (var key in methodNames) { if (!methodNames.hasOwnProperty(key)) { continue; } - object[key] = ReactPerf.measure(objectName, methodNames[key], object[key]); + object[key] = ReactPerf.measure( + objectName, + methodNames[key], + object[key] + ); } } }, @@ -3133,10 +3597,10 @@ * @param {function} func * @return {function} */ - measure: function measure(objName, fnName, func) { + measure: function(objName, fnName, func) { if ("production" !== process.env.NODE_ENV) { var measuredFunc = null; - var wrapper = function wrapper() { + var wrapper = function() { if (ReactPerf.enableMeasure) { if (!measuredFunc) { measuredFunc = ReactPerf.storedMeasure(objName, fnName, func); @@ -3155,7 +3619,7 @@ /** * @param {function} measure */ - injectMeasure: function injectMeasure(measure) { + injectMeasure: function(measure) { ReactPerf.storedMeasure = measure; } } @@ -3174,6 +3638,7 @@ } module.exports = ReactPerf; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3216,10 +3681,12 @@ * @final * @internal */ - mountComponent: function mountComponent(internalInstance, rootID, transaction, context) { + mountComponent: function(internalInstance, rootID, transaction, context) { var markup = internalInstance.mountComponent(rootID, transaction, context); if ("production" !== process.env.NODE_ENV) { - ReactElementValidator.checkAndWarnForMutatedProps(internalInstance._currentElement); + ReactElementValidator.checkAndWarnForMutatedProps( + internalInstance._currentElement + ); } transaction.getReactMountReady().enqueue(attachRefs, internalInstance); return markup; @@ -3231,7 +3698,7 @@ * @final * @internal */ - unmountComponent: function unmountComponent(internalInstance) { + unmountComponent: function(internalInstance) { ReactRef.detachRefs(internalInstance, internalInstance._currentElement); internalInstance.unmountComponent(); }, @@ -3245,7 +3712,9 @@ * @param {object} context * @internal */ - receiveComponent: function receiveComponent(internalInstance, nextElement, transaction, context) { + receiveComponent: function( + internalInstance, nextElement, transaction, context + ) { var prevElement = internalInstance._currentElement; if (nextElement === prevElement && nextElement._owner != null) { @@ -3263,7 +3732,10 @@ ReactElementValidator.checkAndWarnForMutatedProps(nextElement); } - var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + var refsChanged = ReactRef.shouldUpdateRefs( + prevElement, + nextElement + ); if (refsChanged) { ReactRef.detachRefs(internalInstance, prevElement); @@ -3283,13 +3755,17 @@ * @param {ReactReconcileTransaction} transaction * @internal */ - performUpdateIfNecessary: function performUpdateIfNecessary(internalInstance, transaction) { + performUpdateIfNecessary: function( + internalInstance, + transaction + ) { internalInstance.performUpdateIfNecessary(transaction); } }; module.exports = ReactReconciler; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3331,14 +3807,14 @@ } } - ReactRef.attachRefs = function (instance, element) { + ReactRef.attachRefs = function(instance, element) { var ref = element.ref; if (ref != null) { attachRef(ref, instance, element._owner); } }; - ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { + ReactRef.shouldUpdateRefs = function(prevElement, nextElement) { // If either the owner or a `ref` has changed, make sure the newest owner // has stored a reference to `this`, and the previous owner (if different) // has forgotten the reference to `this`. We use the element instead @@ -3351,10 +3827,13 @@ // is made. It probably belongs where the key checking and // instantiateReactComponent is done. - return nextElement._owner !== prevElement._owner || nextElement.ref !== prevElement.ref; + return ( + nextElement._owner !== prevElement._owner || + nextElement.ref !== prevElement.ref + ); }; - ReactRef.detachRefs = function (instance, element) { + ReactRef.detachRefs = function(instance, element) { var ref = element.ref; if (ref != null) { detachRef(ref, instance, element._owner); @@ -3363,6 +3842,7 @@ module.exports = ReactRef; + /***/ }, /* 31 */ /***/ function(module, exports, __webpack_require__) { @@ -3419,8 +3899,11 @@ * @return {boolean} True if `object` is a valid owner. * @final */ - isValidOwner: function isValidOwner(object) { - return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); + isValidOwner: function(object) { + return !!( + (object && + typeof object.attachRef === 'function' && typeof object.detachRef === 'function') + ); }, /** @@ -3432,8 +3915,15 @@ * @final * @internal */ - addComponentAsRefTo: function addComponentAsRefTo(component, ref, owner) { - "production" !== process.env.NODE_ENV ? invariant(ReactOwner.isValidOwner(owner), 'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' + 'usually means that you\'re trying to add a ref to a component that ' + 'doesn\'t have an owner (that is, was not created inside of another ' + 'component\'s `render` method). Try rendering this component inside of ' + 'a new top-level component which will hold the ref.') : invariant(ReactOwner.isValidOwner(owner)); + addComponentAsRefTo: function(component, ref, owner) { + ("production" !== process.env.NODE_ENV ? invariant( + ReactOwner.isValidOwner(owner), + 'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' + + 'usually means that you\'re trying to add a ref to a component that ' + + 'doesn\'t have an owner (that is, was not created inside of another ' + + 'component\'s `render` method). Try rendering this component inside of ' + + 'a new top-level component which will hold the ref.' + ) : invariant(ReactOwner.isValidOwner(owner))); owner.attachRef(ref, component); }, @@ -3446,8 +3936,15 @@ * @final * @internal */ - removeComponentAsRefFrom: function removeComponentAsRefFrom(component, ref, owner) { - "production" !== process.env.NODE_ENV ? invariant(ReactOwner.isValidOwner(owner), 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' + 'usually means that you\'re trying to remove a ref to a component that ' + 'doesn\'t have an owner (that is, was not created inside of another ' + 'component\'s `render` method). Try rendering this component inside of ' + 'a new top-level component which will hold the ref.') : invariant(ReactOwner.isValidOwner(owner)); + removeComponentAsRefFrom: function(component, ref, owner) { + ("production" !== process.env.NODE_ENV ? invariant( + ReactOwner.isValidOwner(owner), + 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' + + 'usually means that you\'re trying to remove a ref to a component that ' + + 'doesn\'t have an owner (that is, was not created inside of another ' + + 'component\'s `render` method). Try rendering this component inside of ' + + 'a new top-level component which will hold the ref.' + ) : invariant(ReactOwner.isValidOwner(owner))); // Check that `component` is still the current ref because we do not want to // detach the ref if another component stole it. if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) { @@ -3458,6 +3955,7 @@ }; module.exports = ReactOwner; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3542,7 +4040,9 @@ */ function getCurrentOwnerDisplayName() { var current = ReactCurrentOwner.current; - return current && getName(current) || undefined; + return ( + current && getName(current) || undefined + ); } /** @@ -3561,7 +4061,11 @@ } element._store.validated = true; - warnAndMonitorForKeyUse('Each child in an array or iterator should have a unique "key" prop.', element, parentType); + warnAndMonitorForKeyUse( + 'Each child in an array or iterator should have a unique "key" prop.', + element, + parentType + ); } /** @@ -3577,7 +4081,11 @@ if (!NUMERIC_PROPERTY_REGEX.test(name)) { return; } - warnAndMonitorForKeyUse('Child objects should have non-numeric keys so ordering is preserved.', element, parentType); + warnAndMonitorForKeyUse( + 'Child objects should have non-numeric keys so ordering is preserved.', + element, + parentType + ); } /** @@ -3590,29 +4098,42 @@ */ function warnAndMonitorForKeyUse(message, element, parentType) { var ownerName = getCurrentOwnerDisplayName(); - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + var parentName = typeof parentType === 'string' ? + parentType : parentType.displayName || parentType.name; var useName = ownerName || parentName; - var memoizer = ownerHasKeyUseWarning[message] || (ownerHasKeyUseWarning[message] = {}); + var memoizer = ownerHasKeyUseWarning[message] || ( + (ownerHasKeyUseWarning[message] = {}) + ); if (memoizer.hasOwnProperty(useName)) { return; } memoizer[useName] = true; - var parentOrOwnerAddendum = ownerName ? " Check the render method of " + ownerName + "." : parentName ? " Check the React.render call using <" + parentName + ">." : ''; + var parentOrOwnerAddendum = + ownerName ? (" Check the render method of " + ownerName + ".") : + parentName ? (" Check the React.render call using <" + parentName + ">.") : + ''; // 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 childOwnerAddendum = ''; - if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + if (element && + element._owner && + element._owner !== ReactCurrentOwner.current) { // Name of the component that originally created this child. var childOwnerName = getName(element._owner); - childOwnerAddendum = " It was passed a child from " + childOwnerName + "."; + childOwnerAddendum = (" It was passed a child from " + childOwnerName + "."); } - "production" !== process.env.NODE_ENV ? warning(false, message + '%s%s See https://fb.me/react-warning-keys for more information.', parentOrOwnerAddendum, childOwnerAddendum) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + message + '%s%s See https://fb.me/react-warning-keys for more information.', + parentOrOwnerAddendum, + childOwnerAddendum + ) : null); } /** @@ -3678,7 +4199,14 @@ try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. - "production" !== process.env.NODE_ENV ? invariant(typeof propTypes[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(typeof propTypes[propName] === 'function'); + ("production" !== process.env.NODE_ENV ? invariant( + typeof propTypes[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + propName + ) : invariant(typeof propTypes[propName] === 'function')); error = propTypes[propName](props, propName, componentName, location); } catch (ex) { error = ex; @@ -3689,7 +4217,7 @@ loggedTypeFailures[error.message] = true; var addendum = getDeclarationErrorAddendum(this); - "production" !== process.env.NODE_ENV ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null; + ("production" !== process.env.NODE_ENV ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null); } } } @@ -3706,7 +4234,8 @@ function warnForPropsMutation(propName, element) { var type = element.type; var elementName = typeof type === 'string' ? type : type.displayName; - var ownerName = element._owner ? element._owner.getPublicInstance().constructor.displayName : null; + var ownerName = element._owner ? + element._owner.getPublicInstance().constructor.displayName : null; var warningKey = propName + '|' + elementName + '|' + ownerName; if (warnedPropsMutations.hasOwnProperty(warningKey)) { @@ -3723,7 +4252,15 @@ ownerInfo = ' The element was created by ' + ownerName + '.'; } - "production" !== process.env.NODE_ENV ? warning(false, 'Don\'t set .props.%s of the React component%s. Instead, specify the ' + 'correct value when initially creating the element or use ' + 'React.cloneElement to make a new element with updated props.%s', propName, elementInfo, ownerInfo) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Don\'t set .props.%s of the React component%s. Instead, specify the ' + + 'correct value when initially creating the element or use ' + + 'React.cloneElement to make a new element with updated props.%s', + propName, + elementInfo, + ownerInfo + ) : null); } // Inline Object.is polyfill @@ -3759,7 +4296,8 @@ for (var propName in props) { if (props.hasOwnProperty(propName)) { - if (!originalProps.hasOwnProperty(propName) || !is(originalProps[propName], props[propName])) { + if (!originalProps.hasOwnProperty(propName) || + !is(originalProps[propName], props[propName])) { warnForPropsMutation(propName, element); // Copy over the new value so that the two props objects match again @@ -3784,13 +4322,24 @@ // to a composite class which may have propTypes. // TODO: Validating a string's propTypes is not decoupled from the // rendering target which is problematic. - var componentClass = ReactNativeComponent.getComponentClassForElement(element); + var componentClass = ReactNativeComponent.getComponentClassForElement( + element + ); var name = componentClass.displayName || componentClass.name; if (componentClass.propTypes) { - checkPropTypes(name, componentClass.propTypes, element.props, ReactPropTypeLocations.prop); + checkPropTypes( + name, + componentClass.propTypes, + element.props, + ReactPropTypeLocations.prop + ); } if (typeof componentClass.getDefaultProps === 'function') { - "production" !== process.env.NODE_ENV ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : null; + ("production" !== process.env.NODE_ENV ? warning( + componentClass.getDefaultProps.isReactClassApproved, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.' + ) : null); } } @@ -3798,10 +4347,15 @@ checkAndWarnForMutatedProps: checkAndWarnForMutatedProps, - createElement: function createElement(type, props, children) { + createElement: function(type, props, children) { // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. - "production" !== process.env.NODE_ENV ? warning(type != null, 'React.createElement: type should not be null or undefined. It should ' + 'be a string (for DOM elements) or a ReactClass (for composite ' + 'components).') : null; + ("production" !== process.env.NODE_ENV ? warning( + type != null, + 'React.createElement: type should not be null or undefined. It should ' + + 'be a string (for DOM elements) or a ReactClass (for composite ' + + 'components).' + ) : null); var element = ReactElement.createElement.apply(this, arguments); @@ -3820,32 +4374,44 @@ return element; }, - createFactory: function createFactory(type) { - var validatedFactory = ReactElementValidator.createElement.bind(null, type); + createFactory: function(type) { + var validatedFactory = ReactElementValidator.createElement.bind( + null, + type + ); // Legacy hook TODO: Warn if this is accessed validatedFactory.type = type; if ("production" !== process.env.NODE_ENV) { try { - Object.defineProperty(validatedFactory, 'type', { - enumerable: false, - get: function get() { - "production" !== process.env.NODE_ENV ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : null; - Object.defineProperty(this, 'type', { - value: type - }); - return type; + Object.defineProperty( + validatedFactory, + 'type', + { + enumerable: false, + get: function() { + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.' + ) : null); + Object.defineProperty(this, 'type', { + value: type + }); + return type; + } } - }); + ); } catch (x) { // IE will fail on defineProperty (es5-shim/sham too) } } + return validatedFactory; }, - cloneElement: function cloneElement(element, props, children) { + 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); @@ -3857,6 +4423,7 @@ }; module.exports = ReactElementValidator; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3886,6 +4453,7 @@ module.exports = ReactPropTypeLocations; + /***/ }, /* 34 */ /***/ function(module, exports, __webpack_require__) { @@ -3914,6 +4482,7 @@ } module.exports = ReactPropTypeLocationNames; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3945,22 +4514,22 @@ var ReactNativeComponentInjection = { // This accepts a class that receives the tag string. This is a catch all // that can render any kind of tag. - injectGenericComponentClass: function injectGenericComponentClass(componentClass) { + injectGenericComponentClass: function(componentClass) { genericComponentClass = componentClass; }, // This accepts a text component class that takes the text string to be // rendered as props. - injectTextComponentClass: function injectTextComponentClass(componentClass) { + injectTextComponentClass: function(componentClass) { textComponentClass = componentClass; }, // This accepts a keyed object with classes as values. Each key represents a // tag. That particular tag will use this class instead of the generic one. - injectComponentClasses: function injectComponentClasses(componentClasses) { + injectComponentClasses: function(componentClasses) { assign(tagToComponentClass, componentClasses); }, // Temporary hack since we expect DOM refs to behave like composites, // for this release. - injectAutoWrapper: function injectAutoWrapper(wrapperFactory) { + injectAutoWrapper: function(wrapperFactory) { autoGenerateWrapperClass = wrapperFactory; } }; @@ -3990,7 +4559,11 @@ * @return {function} The internal class constructor function. */ function createInternalComponent(element) { - "production" !== process.env.NODE_ENV ? invariant(genericComponentClass, 'There is no registered component for the tag %s', element.type) : invariant(genericComponentClass); + ("production" !== process.env.NODE_ENV ? invariant( + genericComponentClass, + 'There is no registered component for the tag %s', + element.type + ) : invariant(genericComponentClass)); return new genericComponentClass(element.type, element.props); } @@ -4019,6 +4592,7 @@ }; module.exports = ReactNativeComponent; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -4109,7 +4683,7 @@ * That can be useful if you decide to make your subclass of this mixin a * "PooledClass". */ - reinitializeTransaction: function reinitializeTransaction() { + reinitializeTransaction: function() { this.transactionWrappers = this.getTransactionWrappers(); if (!this.wrapperInitData) { this.wrapperInitData = []; @@ -4127,7 +4701,7 @@ */ getTransactionWrappers: null, - isInTransaction: function isInTransaction() { + isInTransaction: function() { return !!this._isInTransaction; }, @@ -4142,8 +4716,12 @@ * Helps prevent need to bind in many cases. * @return Return value from `method`. */ - perform: function perform(method, scope, a, b, c, d, e, f) { - "production" !== process.env.NODE_ENV ? invariant(!this.isInTransaction(), 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(!this.isInTransaction()); + perform: function(method, scope, a, b, c, d, e, f) { + ("production" !== process.env.NODE_ENV ? invariant( + !this.isInTransaction(), + 'Transaction.perform(...): Cannot initialize a transaction when there ' + + 'is already an outstanding transaction.' + ) : invariant(!this.isInTransaction())); var errorThrown; var ret; try { @@ -4163,7 +4741,8 @@ // by invoking `closeAll`. try { this.closeAll(0); - } catch (err) {} + } catch (err) { + } } else { // Since `method` didn't throw, we don't want to silence the exception // here. @@ -4176,7 +4755,7 @@ return ret; }, - initializeAll: function initializeAll(startIndex) { + initializeAll: function(startIndex) { var transactionWrappers = this.transactionWrappers; for (var i = startIndex; i < transactionWrappers.length; i++) { var wrapper = transactionWrappers[i]; @@ -4186,7 +4765,9 @@ // of initialize -- if it's still set to OBSERVED_ERROR in the finally // block, it means wrapper.initialize threw. this.wrapperInitData[i] = Transaction.OBSERVED_ERROR; - this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; + this.wrapperInitData[i] = wrapper.initialize ? + wrapper.initialize.call(this) : + null; } finally { if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) { // The initializer for wrapper i threw an error; initialize the @@ -4194,7 +4775,8 @@ // that the first error is the one to bubble up. try { this.initializeAll(i + 1); - } catch (err) {} + } catch (err) { + } } } } @@ -4206,8 +4788,11 @@ * (`close`rs that correspond to initializers that failed will not be * invoked). */ - closeAll: function closeAll(startIndex) { - "production" !== process.env.NODE_ENV ? invariant(this.isInTransaction(), 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(this.isInTransaction()); + closeAll: function(startIndex) { + ("production" !== process.env.NODE_ENV ? invariant( + this.isInTransaction(), + 'Transaction.closeAll(): Cannot close transaction when none are open.' + ) : invariant(this.isInTransaction())); var transactionWrappers = this.transactionWrappers; for (var i = startIndex; i < transactionWrappers.length; i++) { var wrapper = transactionWrappers[i]; @@ -4230,7 +4815,8 @@ // first error is the one to bubble up. try { this.closeAll(i + 1); - } catch (e) {} + } catch (e) { + } } } } @@ -4250,6 +4836,7 @@ }; module.exports = Transaction; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -4285,7 +4872,7 @@ var keyOf = __webpack_require__(39); var warning = __webpack_require__(15); - var MIXINS_KEY = keyOf({ mixins: null }); + var MIXINS_KEY = keyOf({mixins: null}); /** * Policies that describe methods in `ReactClassInterface`. @@ -4312,6 +4899,7 @@ DEFINE_MANY_MERGED: null }); + var injectedMixins = []; /** @@ -4433,6 +5021,8 @@ */ render: SpecPolicy.DEFINE_ONCE, + + // ==== Delegate methods ==== /** @@ -4543,6 +5133,8 @@ */ componentWillUnmount: SpecPolicy.DEFINE_MANY, + + // ==== Advanced methods ==== /** @@ -4569,47 +5161,74 @@ * which all other static methods are defined. */ var RESERVED_SPEC_KEYS = { - displayName: function displayName(Constructor, _displayName) { - Constructor.displayName = _displayName; + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; }, - mixins: function mixins(Constructor, _mixins) { - if (_mixins) { - for (var i = 0; i < _mixins.length; i++) { - mixSpecIntoComponent(Constructor, _mixins[i]); + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); } } }, - childContextTypes: function childContextTypes(Constructor, _childContextTypes) { + childContextTypes: function(Constructor, childContextTypes) { if ("production" !== process.env.NODE_ENV) { - validateTypeDef(Constructor, _childContextTypes, ReactPropTypeLocations.childContext); + validateTypeDef( + Constructor, + childContextTypes, + ReactPropTypeLocations.childContext + ); } - Constructor.childContextTypes = assign({}, Constructor.childContextTypes, _childContextTypes); + Constructor.childContextTypes = assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); }, - contextTypes: function contextTypes(Constructor, _contextTypes) { + contextTypes: function(Constructor, contextTypes) { if ("production" !== process.env.NODE_ENV) { - validateTypeDef(Constructor, _contextTypes, ReactPropTypeLocations.context); + validateTypeDef( + Constructor, + contextTypes, + ReactPropTypeLocations.context + ); } - Constructor.contextTypes = assign({}, Constructor.contextTypes, _contextTypes); + Constructor.contextTypes = assign( + {}, + Constructor.contextTypes, + contextTypes + ); }, /** * Special case getDefaultProps which should move into statics but requires * automatic merging. */ - getDefaultProps: function getDefaultProps(Constructor, _getDefaultProps) { + getDefaultProps: function(Constructor, getDefaultProps) { if (Constructor.getDefaultProps) { - Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, _getDefaultProps); + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); } else { - Constructor.getDefaultProps = _getDefaultProps; + Constructor.getDefaultProps = getDefaultProps; } }, - propTypes: function propTypes(Constructor, _propTypes) { + propTypes: function(Constructor, propTypes) { if ("production" !== process.env.NODE_ENV) { - validateTypeDef(Constructor, _propTypes, ReactPropTypeLocations.prop); + validateTypeDef( + Constructor, + propTypes, + ReactPropTypeLocations.prop + ); } - Constructor.propTypes = assign({}, Constructor.propTypes, _propTypes); + Constructor.propTypes = assign( + {}, + Constructor.propTypes, + propTypes + ); }, - statics: function statics(Constructor, _statics) { - mixStaticSpecIntoComponent(Constructor, _statics); + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); } }; @@ -4618,22 +5237,45 @@ if (typeDef.hasOwnProperty(propName)) { // use a warning instead of an invariant so components // don't show up in prod but not in __DEV__ - "production" !== process.env.NODE_ENV ? 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) : null; + ("production" !== process.env.NODE_ENV ? 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 + ) : null); } } } function validateMethodOverride(proto, name) { - var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? + ReactClassInterface[name] : + null; // Disallow overriding of base class methods unless explicitly allowed. if (ReactClassMixin.hasOwnProperty(name)) { - "production" !== process.env.NODE_ENV ? invariant(specPolicy === SpecPolicy.OVERRIDE_BASE, 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE); + ("production" !== process.env.NODE_ENV ? invariant( + specPolicy === SpecPolicy.OVERRIDE_BASE, + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE)); } // Disallow defining methods more than once unless explicitly allowed. if (proto.hasOwnProperty(name)) { - "production" !== process.env.NODE_ENV ? invariant(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED, 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name) : invariant(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED); + ("production" !== process.env.NODE_ENV ? invariant( + specPolicy === SpecPolicy.DEFINE_MANY || + specPolicy === SpecPolicy.DEFINE_MANY_MERGED, + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ) : invariant(specPolicy === SpecPolicy.DEFINE_MANY || + specPolicy === SpecPolicy.DEFINE_MANY_MERGED)); } } @@ -4646,8 +5288,16 @@ return; } - "production" !== process.env.NODE_ENV ? invariant(typeof spec !== 'function', 'ReactClass: You\'re attempting to ' + 'use a component class as a mixin. Instead, just use a regular object.') : invariant(typeof spec !== 'function'); - "production" !== process.env.NODE_ENV ? invariant(!ReactElement.isValidElement(spec), 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.') : invariant(!ReactElement.isValidElement(spec)); + ("production" !== process.env.NODE_ENV ? invariant( + typeof spec !== 'function', + 'ReactClass: You\'re attempting to ' + + 'use a component class as a mixin. Instead, just use a regular object.' + ) : invariant(typeof spec !== 'function')); + ("production" !== process.env.NODE_ENV ? invariant( + !ReactElement.isValidElement(spec), + 'ReactClass: You\'re attempting to ' + + 'use a component as a mixin. Instead, just use a regular object.' + ) : invariant(!ReactElement.isValidElement(spec))); var proto = Constructor.prototype; @@ -4678,11 +5328,16 @@ // 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 isReactClassMethod = + ReactClassInterface.hasOwnProperty(name); var isAlreadyDefined = proto.hasOwnProperty(name); var markedDontBind = property && property.__reactDontBind; var isFunction = typeof property === 'function'; - var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && !markedDontBind; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + !markedDontBind; if (shouldAutoBind) { if (!proto.__reactAutoBindMap) { @@ -4695,7 +5350,17 @@ var specPolicy = ReactClassInterface[name]; // These cases should already be caught by validateMethodOverride - "production" !== process.env.NODE_ENV ? invariant(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name) : invariant(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)); + ("production" !== process.env.NODE_ENV ? invariant( + isReactClassMethod && ( + (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) + ), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ) : invariant(isReactClassMethod && ( + (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) + ))); // For methods which are defined more than once, call the existing // methods before calling the new property, merging if appropriate. @@ -4729,11 +5394,24 @@ continue; } - var isReserved = (name in RESERVED_SPEC_KEYS); - "production" !== process.env.NODE_ENV ? invariant(!isReserved, '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) : invariant(!isReserved); - - var isInherited = (name in Constructor); - "production" !== process.env.NODE_ENV ? invariant(!isInherited, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name) : invariant(!isInherited); + var isReserved = name in RESERVED_SPEC_KEYS; + ("production" !== process.env.NODE_ENV ? invariant( + !isReserved, + '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 + ) : invariant(!isReserved)); + + var isInherited = name in Constructor; + ("production" !== process.env.NODE_ENV ? invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ) : invariant(!isInherited)); Constructor[name] = property; } } @@ -4746,11 +5424,22 @@ * @return {object} one after it has been mutated to contain everything in two. */ function mergeIntoWithNoDuplicateKeys(one, two) { - "production" !== process.env.NODE_ENV ? invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : invariant(one && two && typeof one === 'object' && typeof two === 'object'); + ("production" !== process.env.NODE_ENV ? invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ) : invariant(one && two && typeof one === 'object' && typeof two === 'object')); for (var key in two) { if (two.hasOwnProperty(key)) { - "production" !== process.env.NODE_ENV ? invariant(one[key] === undefined, '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) : invariant(one[key] === undefined); + ("production" !== process.env.NODE_ENV ? invariant( + one[key] === undefined, + '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 + ) : invariant(one[key] === undefined)); one[key] = two[key]; } } @@ -4812,15 +5501,25 @@ var componentName = component.constructor.displayName; var _bind = boundMethod.bind; /* eslint-disable block-scoped-var, no-undef */ - boundMethod.bind = function (newThis) { - for (var args = [], $__0 = 1, $__1 = arguments.length; $__0 < $__1; $__0++) args.push(arguments[$__0]); + boundMethod.bind = function(newThis ) {for (var args=[],$__0=1,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__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) { - "production" !== process.env.NODE_ENV ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ) : null); } else if (!args.length) { - "production" !== process.env.NODE_ENV ? 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) : null; + ("production" !== process.env.NODE_ENV ? 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 + ) : null); return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); @@ -4843,16 +5542,27 @@ for (var autoBindKey in component.__reactAutoBindMap) { if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) { var method = component.__reactAutoBindMap[autoBindKey]; - component[autoBindKey] = bindAutoBindMethod(component, ReactErrorUtils.guard(method, component.constructor.displayName + '.' + autoBindKey)); + component[autoBindKey] = bindAutoBindMethod( + component, + ReactErrorUtils.guard( + method, + component.constructor.displayName + '.' + autoBindKey + ) + ); } } } var typeDeprecationDescriptor = { enumerable: false, - get: function get() { + get: function() { var displayName = this.displayName || this.name || 'Component'; - "production" !== process.env.NODE_ENV ? warning(false, '%s.type is deprecated. Use %s directly to access the class.', displayName, displayName) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + '%s.type is deprecated. Use %s directly to access the class.', + displayName, + displayName + ) : null); Object.defineProperty(this, 'type', { value: this }); @@ -4870,7 +5580,7 @@ * 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 replaceState(newState, callback) { + replaceState: function(newState, callback) { ReactUpdateQueue.enqueueReplaceState(this, newState); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); @@ -4883,16 +5593,27 @@ * @protected * @final */ - isMounted: function isMounted() { + isMounted: function() { if ("production" !== process.env.NODE_ENV) { var owner = ReactCurrentOwner.current; if (owner !== null) { - "production" !== process.env.NODE_ENV ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : null; + ("production" !== process.env.NODE_ENV ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component' + ) : null); owner._warnedAboutRefsInRender = true; } } var internalInstance = ReactInstanceMap.get(this); - return internalInstance && internalInstance !== ReactLifeCycle.currentlyMountingInstance; + return ( + internalInstance && + internalInstance !== ReactLifeCycle.currentlyMountingInstance + ); }, /** @@ -4904,7 +5625,7 @@ * @public * @deprecated */ - setProps: function setProps(partialProps, callback) { + setProps: function(partialProps, callback) { ReactUpdateQueue.enqueueSetProps(this, partialProps); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); @@ -4920,7 +5641,7 @@ * @public * @deprecated */ - replaceProps: function replaceProps(newProps, callback) { + replaceProps: function(newProps, callback) { ReactUpdateQueue.enqueueReplaceProps(this, newProps); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); @@ -4928,8 +5649,12 @@ } }; - var ReactClassComponent = function ReactClassComponent() {}; - assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + var ReactClassComponent = function() {}; + assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin + ); /** * Module for creating composite components. @@ -4945,13 +5670,17 @@ * @return {function} Component constructor function. * @public */ - createClass: function createClass(spec) { - var Constructor = function Constructor(props, context) { + createClass: function(spec) { + var Constructor = function(props, context) { // This constructor is overridden by mocks. The argument is used // by mocks to assert on what gets mounted. if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : null; + ("production" !== process.env.NODE_ENV ? warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory' + ) : null); } // Wire up auto-binding @@ -4969,20 +5698,27 @@ var initialState = this.getInitialState ? this.getInitialState() : null; if ("production" !== process.env.NODE_ENV) { // We allow auto-mocks to proceed as if they're returning null. - if (typeof initialState === 'undefined' && this.getInitialState._isMockFunction) { + if (typeof initialState === 'undefined' && + this.getInitialState._isMockFunction) { // This is probably bad practice. Consider warning here and // deprecating this convenience. initialState = null; } } - "production" !== process.env.NODE_ENV ? invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : invariant(typeof initialState === 'object' && !Array.isArray(initialState)); + ("production" !== process.env.NODE_ENV ? invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); this.state = initialState; }; Constructor.prototype = new ReactClassComponent(); Constructor.prototype.constructor = Constructor; - injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + injectedMixins.forEach( + mixSpecIntoComponent.bind(null, Constructor) + ); mixSpecIntoComponent(Constructor, spec); @@ -5004,10 +5740,20 @@ } } - "production" !== process.env.NODE_ENV ? invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.') : invariant(Constructor.prototype.render); + ("production" !== process.env.NODE_ENV ? invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ) : invariant(Constructor.prototype.render)); if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? 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') : null; + ("production" !== process.env.NODE_ENV ? 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' + ) : null); } // Reduce time spent doing lookups by setting these on the prototype. @@ -5031,7 +5777,7 @@ }, injection: { - injectMixin: function injectMixin(mixin) { + injectMixin: function(mixin) { injectedMixins.push(mixin); } } @@ -5039,6 +5785,7 @@ }; module.exports = ReactClass; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -5069,13 +5816,14 @@ * @param {string} name The name of the guard * @return {function} */ - guard: function guard(func, name) { + guard: function(func, name) { return func; } }; module.exports = ReactErrorUtils; + /***/ }, /* 39 */ /***/ function(module, exports) { @@ -5101,9 +5849,7 @@ * 'xa12' in that case. Resolve keys you want to use once at startup time, then * reuse those resolutions. */ - "use strict"; - - var keyOf = function keyOf(oneKeyObj) { + var keyOf = function(oneKeyObj) { var key; for (key in oneKeyObj) { if (!oneKeyObj.hasOwnProperty(key)) { @@ -5114,8 +5860,10 @@ return null; }; + module.exports = keyOf; + /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { @@ -5295,6 +6043,7 @@ }, createDOMFactory); module.exports = ReactDOM; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -5353,6 +6102,7 @@ module.exports = mapObject; + /***/ }, /* 42 */ /***/ function(module, exports, __webpack_require__) { @@ -5372,7 +6122,8 @@ 'use strict'; var DOMPropertyOperations = __webpack_require__(43); - var ReactComponentBrowserEnvironment = __webpack_require__(47); + var ReactComponentBrowserEnvironment = + __webpack_require__(47); var ReactDOMComponent = __webpack_require__(87); var assign = __webpack_require__(13); @@ -5393,7 +6144,7 @@ * @extends ReactComponent * @internal */ - var ReactDOMTextComponent = function ReactDOMTextComponent(props) { + var ReactDOMTextComponent = function(props) { // This constructor and its argument is currently used by mocks. }; @@ -5403,7 +6154,7 @@ * @param {ReactText} text * @internal */ - construct: function construct(text) { + construct: function(text) { // TODO: This is really a ReactText (ReactNode), not a ReactElement this._currentElement = text; this._stringText = '' + text; @@ -5422,7 +6173,7 @@ * @return {string} Markup for this text node. * @internal */ - mountComponent: function mountComponent(rootID, transaction, context) { + mountComponent: function(rootID, transaction, context) { this._rootNodeID = rootID; var escapedText = escapeTextContentForBrowser(this._stringText); @@ -5433,7 +6184,11 @@ return escapedText; } - return '' + escapedText + ''; + return ( + '' + + escapedText + + '' + ); }, /** @@ -5443,7 +6198,7 @@ * @param {ReactReconcileTransaction} transaction * @internal */ - receiveComponent: function receiveComponent(nextText, transaction) { + receiveComponent: function(nextText, transaction) { if (nextText !== this._currentElement) { this._currentElement = nextText; var nextStringText = '' + nextText; @@ -5452,12 +6207,15 @@ // and/or updateComponent to do the actual update for consistency with // other component types? this._stringText = nextStringText; - ReactDOMComponent.BackendIDOperations.updateTextContentByID(this._rootNodeID, nextStringText); + ReactDOMComponent.BackendIDOperations.updateTextContentByID( + this._rootNodeID, + nextStringText + ); } } }, - unmountComponent: function unmountComponent() { + unmountComponent: function() { ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); } @@ -5465,6 +6223,7 @@ module.exports = ReactDOMTextComponent; + /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { @@ -5489,7 +6248,11 @@ var warning = __webpack_require__(15); function shouldIgnoreValue(name, value) { - return value == null || DOMProperty.hasBooleanValue[name] && !value || DOMProperty.hasNumericValue[name] && isNaN(value) || DOMProperty.hasPositiveNumericValue[name] && value < 1 || DOMProperty.hasOverloadedBooleanValue[name] && value === false; + return value == null || + (DOMProperty.hasBooleanValue[name] && !value) || + (DOMProperty.hasNumericValue[name] && isNaN(value)) || + (DOMProperty.hasPositiveNumericValue[name] && (value < 1)) || + (DOMProperty.hasOverloadedBooleanValue[name] && value === false); } if ("production" !== process.env.NODE_ENV) { @@ -5501,8 +6264,9 @@ }; var warnedProperties = {}; - var warnUnknownProperty = function warnUnknownProperty(name) { - if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + var warnUnknownProperty = function(name) { + if (reactProps.hasOwnProperty(name) && reactProps[name] || + warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { return; } @@ -5510,11 +6274,23 @@ var lowerCasedName = name.toLowerCase(); // data-* attributes should be lowercase; suggest the lowercase version - var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; + var standardName = ( + DOMProperty.isCustomAttribute(lowerCasedName) ? + lowerCasedName : + DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? + DOMProperty.getPossibleStandardName[lowerCasedName] : + null + ); // For now, only warn when we have a suggested correction. This prevents // logging too much when using transferPropsTo. - "production" !== process.env.NODE_ENV ? warning(standardName == null, 'Unknown DOM property %s. Did you mean %s?', name, standardName) : null; + ("production" !== process.env.NODE_ENV ? warning( + standardName == null, + 'Unknown DOM property %s. Did you mean %s?', + name, + standardName + ) : null); + }; } @@ -5529,8 +6305,9 @@ * @param {string} id Unescaped ID. * @return {string} Markup string. */ - createMarkupForID: function createMarkupForID(id) { - return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); + createMarkupForID: function(id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + + quoteAttributeValueForBrowser(id); }, /** @@ -5540,13 +6317,15 @@ * @param {*} value * @return {?string} Markup string, or null if the property was invalid. */ - createMarkupForProperty: function createMarkupForProperty(name, value) { - if (DOMProperty.isStandardName.hasOwnProperty(name) && DOMProperty.isStandardName[name]) { + createMarkupForProperty: function(name, value) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { if (shouldIgnoreValue(name, value)) { return ''; } var attributeName = DOMProperty.getAttributeName[name]; - if (DOMProperty.hasBooleanValue[name] || DOMProperty.hasOverloadedBooleanValue[name] && value === true) { + if (DOMProperty.hasBooleanValue[name] || + (DOMProperty.hasOverloadedBooleanValue[name] && value === true)) { return attributeName; } return attributeName + '=' + quoteAttributeValueForBrowser(value); @@ -5568,8 +6347,9 @@ * @param {string} name * @param {*} value */ - setValueForProperty: function setValueForProperty(node, name, value) { - if (DOMProperty.isStandardName.hasOwnProperty(name) && DOMProperty.isStandardName[name]) { + setValueForProperty: function(node, name, value) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { var mutationMethod = DOMProperty.getMutationMethod[name]; if (mutationMethod) { mutationMethod(node, value); @@ -5583,7 +6363,8 @@ var propName = DOMProperty.getPropertyName[name]; // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the // property type before comparing; only `value` does and is string. - if (!DOMProperty.hasSideEffects[name] || '' + node[propName] !== '' + value) { + if (!DOMProperty.hasSideEffects[name] || + ('' + node[propName]) !== ('' + value)) { // Contrary to `setAttribute`, object properties are properly // `toString`ed by IE8/9. node[propName] = value; @@ -5606,8 +6387,9 @@ * @param {DOMElement} node * @param {string} name */ - deleteValueForProperty: function deleteValueForProperty(node, name) { - if (DOMProperty.isStandardName.hasOwnProperty(name) && DOMProperty.isStandardName[name]) { + deleteValueForProperty: function(node, name) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { var mutationMethod = DOMProperty.getMutationMethod[name]; if (mutationMethod) { mutationMethod(node, undefined); @@ -5615,8 +6397,12 @@ node.removeAttribute(DOMProperty.getAttributeName[name]); } else { var propName = DOMProperty.getPropertyName[name]; - var defaultValue = DOMProperty.getDefaultValueForProperty(node.nodeName, propName); - if (!DOMProperty.hasSideEffects[name] || '' + node[propName] !== defaultValue) { + var defaultValue = DOMProperty.getDefaultValueForProperty( + node.nodeName, + propName + ); + if (!DOMProperty.hasSideEffects[name] || + ('' + node[propName]) !== defaultValue) { node[propName] = defaultValue; } } @@ -5630,6 +6416,7 @@ }; module.exports = DOMPropertyOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -5696,18 +6483,27 @@ * * @param {object} domPropertyConfig the config as described above. */ - injectDOMPropertyConfig: function injectDOMPropertyConfig(domPropertyConfig) { + injectDOMPropertyConfig: function(domPropertyConfig) { var Properties = domPropertyConfig.Properties || {}; var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; if (domPropertyConfig.isCustomAttribute) { - DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + DOMProperty._isCustomAttributeFunctions.push( + domPropertyConfig.isCustomAttribute + ); } for (var propName in Properties) { - "production" !== process.env.NODE_ENV ? invariant(!DOMProperty.isStandardName.hasOwnProperty(propName), 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + '\'%s\' which has already been injected. You may be accidentally ' + 'injecting the same DOM property config twice, or you may be ' + 'injecting two configs that have conflicting property names.', propName) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName)); + ("production" !== process.env.NODE_ENV ? invariant( + !DOMProperty.isStandardName.hasOwnProperty(propName), + 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + + '\'%s\' which has already been injected. You may be accidentally ' + + 'injecting the same DOM property config twice, or you may be ' + + 'injecting two configs that have conflicting property names.', + propName + ) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName))); DOMProperty.isStandardName[propName] = true; @@ -5722,7 +6518,10 @@ DOMProperty.getAttributeName[propName] = lowerCased; } - DOMProperty.getPropertyName[propName] = DOMPropertyNames.hasOwnProperty(propName) ? DOMPropertyNames[propName] : propName; + DOMProperty.getPropertyName[propName] = + DOMPropertyNames.hasOwnProperty(propName) ? + DOMPropertyNames[propName] : + propName; if (DOMMutationMethods.hasOwnProperty(propName)) { DOMProperty.getMutationMethod[propName] = DOMMutationMethods[propName]; @@ -5731,17 +6530,45 @@ } var propConfig = Properties[propName]; - DOMProperty.mustUseAttribute[propName] = checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE); - DOMProperty.mustUseProperty[propName] = checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY); - DOMProperty.hasSideEffects[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS); - DOMProperty.hasBooleanValue[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE); - DOMProperty.hasNumericValue[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE); - DOMProperty.hasPositiveNumericValue[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE); - DOMProperty.hasOverloadedBooleanValue[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE); - - "production" !== process.env.NODE_ENV ? invariant(!DOMProperty.mustUseAttribute[propName] || !DOMProperty.mustUseProperty[propName], 'DOMProperty: Cannot require using both attribute and property: %s', propName) : invariant(!DOMProperty.mustUseAttribute[propName] || !DOMProperty.mustUseProperty[propName]); - "production" !== process.env.NODE_ENV ? invariant(DOMProperty.mustUseProperty[propName] || !DOMProperty.hasSideEffects[propName], 'DOMProperty: Properties that have side effects must use property: %s', propName) : invariant(DOMProperty.mustUseProperty[propName] || !DOMProperty.hasSideEffects[propName]); - "production" !== process.env.NODE_ENV ? invariant(!!DOMProperty.hasBooleanValue[propName] + !!DOMProperty.hasNumericValue[propName] + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName) : invariant(!!DOMProperty.hasBooleanValue[propName] + !!DOMProperty.hasNumericValue[propName] + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1); + DOMProperty.mustUseAttribute[propName] = + checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE); + DOMProperty.mustUseProperty[propName] = + checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY); + DOMProperty.hasSideEffects[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS); + DOMProperty.hasBooleanValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE); + DOMProperty.hasNumericValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE); + DOMProperty.hasPositiveNumericValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE); + DOMProperty.hasOverloadedBooleanValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE); + + ("production" !== process.env.NODE_ENV ? invariant( + !DOMProperty.mustUseAttribute[propName] || + !DOMProperty.mustUseProperty[propName], + 'DOMProperty: Cannot require using both attribute and property: %s', + propName + ) : invariant(!DOMProperty.mustUseAttribute[propName] || + !DOMProperty.mustUseProperty[propName])); + ("production" !== process.env.NODE_ENV ? invariant( + DOMProperty.mustUseProperty[propName] || + !DOMProperty.hasSideEffects[propName], + 'DOMProperty: Properties that have side effects must use property: %s', + propName + ) : invariant(DOMProperty.mustUseProperty[propName] || + !DOMProperty.hasSideEffects[propName])); + ("production" !== process.env.NODE_ENV ? invariant( + !!DOMProperty.hasBooleanValue[propName] + + !!DOMProperty.hasNumericValue[propName] + + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1, + 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + + 'numeric value, but not a combination: %s', + propName + ) : invariant(!!DOMProperty.hasBooleanValue[propName] + + !!DOMProperty.hasNumericValue[propName] + + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1)); } } }; @@ -5856,7 +6683,7 @@ * Checks whether a property name is a custom attribute. * @method */ - isCustomAttribute: function isCustomAttribute(attributeName) { + isCustomAttribute: function(attributeName) { for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; if (isCustomAttributeFn(attributeName)) { @@ -5874,7 +6701,7 @@ * TODO: Is it better to grab all the possible properties when creating an * element to avoid having to create the same element twice? */ - getDefaultValueForProperty: function getDefaultValueForProperty(nodeName, prop) { + getDefaultValueForProperty: function(nodeName, prop) { var nodeDefaults = defaultValueCache[nodeName]; var testElement; if (!nodeDefaults) { @@ -5891,6 +6718,7 @@ }; module.exports = DOMProperty; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -5924,6 +6752,7 @@ module.exports = quoteAttributeValueForBrowser; + /***/ }, /* 46 */ /***/ function(module, exports) { @@ -5967,6 +6796,7 @@ module.exports = escapeTextContentForBrowser; + /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { @@ -5996,9 +6826,11 @@ */ var ReactComponentBrowserEnvironment = { - processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + processChildrenUpdates: + ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, - replaceNodeWithMarkupByID: ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID, + replaceNodeWithMarkupByID: + ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID, /** * If a particular environment requires that some resources be cleaned up, @@ -6007,7 +6839,7 @@ * * @private */ - unmountIDFromEnvironment: function unmountIDFromEnvironment(rootNodeID) { + unmountIDFromEnvironment: function(rootNodeID) { ReactMount.purgeID(rootNodeID); } @@ -6015,6 +6847,7 @@ module.exports = ReactComponentBrowserEnvironment; + /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { @@ -6051,7 +6884,8 @@ * @private */ var INVALID_PROPERTY_ERRORS = { - dangerouslySetInnerHTML: '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.', + dangerouslySetInnerHTML: + '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.', style: '`style` must be set using `updateStylesByID()`.' }; @@ -6070,9 +6904,13 @@ * @param {*} value New value of the property. * @internal */ - updatePropertyByID: function updatePropertyByID(id, name, value) { + updatePropertyByID: function(id, name, value) { var node = ReactMount.getNode(id); - "production" !== process.env.NODE_ENV ? invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name), 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)); + ("production" !== process.env.NODE_ENV ? invariant( + !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), + 'updatePropertyByID(...): %s', + INVALID_PROPERTY_ERRORS[name] + ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); // If we're updating to null or undefined, we should remove the property // from the DOM node instead of inadvertantly setting to a string. This @@ -6092,9 +6930,13 @@ * @param {string} name A property name to remove, see `DOMProperty`. * @internal */ - deletePropertyByID: function deletePropertyByID(id, name, value) { + deletePropertyByID: function(id, name, value) { var node = ReactMount.getNode(id); - "production" !== process.env.NODE_ENV ? invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name), 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)); + ("production" !== process.env.NODE_ENV ? invariant( + !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), + 'updatePropertyByID(...): %s', + INVALID_PROPERTY_ERRORS[name] + ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); DOMPropertyOperations.deleteValueForProperty(node, name, value); }, @@ -6106,7 +6948,7 @@ * @param {object} styles Mapping from styles to values. * @internal */ - updateStylesByID: function updateStylesByID(id, styles) { + updateStylesByID: function(id, styles) { var node = ReactMount.getNode(id); CSSPropertyOperations.setValueForStyles(node, styles); }, @@ -6118,7 +6960,7 @@ * @param {string} html An HTML string. * @internal */ - updateInnerHTMLByID: function updateInnerHTMLByID(id, html) { + updateInnerHTMLByID: function(id, html) { var node = ReactMount.getNode(id); setInnerHTML(node, html); }, @@ -6130,7 +6972,7 @@ * @param {string} content Text content. * @internal */ - updateTextContentByID: function updateTextContentByID(id, content) { + updateTextContentByID: function(id, content) { var node = ReactMount.getNode(id); DOMChildrenOperations.updateTextContent(node, content); }, @@ -6143,7 +6985,7 @@ * @internal * @see {Danger.dangerouslyReplaceNodeWithMarkup} */ - dangerouslyReplaceNodeWithMarkupByID: function dangerouslyReplaceNodeWithMarkupByID(id, markup) { + dangerouslyReplaceNodeWithMarkupByID: function(id, markup) { var node = ReactMount.getNode(id); DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup); }, @@ -6155,7 +6997,7 @@ * @param {array} markup List of markup strings. * @internal */ - dangerouslyProcessChildrenUpdates: function dangerouslyProcessChildrenUpdates(updates, markup) { + dangerouslyProcessChildrenUpdates: function(updates, markup) { for (var i = 0; i < updates.length; i++) { updates[i].parentNode = ReactMount.getNode(updates[i].parentID); } @@ -6174,6 +7016,7 @@ }); module.exports = ReactDOMIDOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -6203,7 +7046,7 @@ var memoizeStringOnly = __webpack_require__(57); var warning = __webpack_require__(15); - var processStyleName = memoizeStringOnly(function (styleName) { + var processStyleName = memoizeStringOnly(function(styleName) { return hyphenateStyleName(styleName); }); @@ -6225,38 +7068,54 @@ var warnedStyleNames = {}; var warnedStyleValues = {}; - var warnHyphenatedStyleName = function warnHyphenatedStyleName(name) { + var warnHyphenatedStyleName = function(name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; - "production" !== process.env.NODE_ENV ? warning(false, 'Unsupported style property %s. Did you mean %s?', name, camelizeStyleName(name)) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Unsupported style property %s. Did you mean %s?', + name, + camelizeStyleName(name) + ) : null); }; - var warnBadVendoredStyleName = function warnBadVendoredStyleName(name) { + var warnBadVendoredStyleName = function(name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; - "production" !== process.env.NODE_ENV ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1) + ) : null); }; - var warnStyleValueWithSemicolon = function warnStyleValueWithSemicolon(name, value) { + var warnStyleValueWithSemicolon = function(name, value) { if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { return; } warnedStyleValues[value] = true; - "production" !== process.env.NODE_ENV ? warning(false, 'Style property values shouldn\'t contain a semicolon. ' + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Style property values shouldn\'t contain a semicolon. ' + + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, '') + ) : null); }; /** * @param {string} name * @param {*} value */ - var warnValidStyle = function warnValidStyle(name, value) { + var warnValidStyle = function(name, value) { if (name.indexOf('-') > -1) { warnHyphenatedStyleName(name); } else if (badVendoredStyleNamePattern.test(name)) { @@ -6284,7 +7143,7 @@ * @param {object} styles * @return {?string} */ - createMarkupForStyles: function createMarkupForStyles(styles) { + createMarkupForStyles: function(styles) { var serialized = ''; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { @@ -6309,7 +7168,7 @@ * @param {DOMElement} node * @param {object} styles */ - setValueForStyles: function setValueForStyles(node, styles) { + setValueForStyles: function(node, styles) { var style = node.style; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { @@ -6342,6 +7201,7 @@ }; module.exports = CSSPropertyOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -6408,8 +7268,8 @@ // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an // infinite loop, because it iterates over the newly added props too. - Object.keys(isUnitlessNumber).forEach(function (prop) { - prefixes.forEach(function (prefix) { + Object.keys(isUnitlessNumber).forEach(function(prop) { + prefixes.forEach(function(prefix) { isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; }); }); @@ -6472,6 +7332,7 @@ module.exports = CSSProperty; + /***/ }, /* 51 */ /***/ function(module, exports) { @@ -6491,7 +7352,10 @@ "use strict"; - var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + var canUseDOM = !!( + (typeof window !== 'undefined' && + window.document && window.document.createElement) + ); /** * Simple, lightweight module assisting with the detection and context of @@ -6505,7 +7369,8 @@ canUseWorkers: typeof Worker !== 'undefined', - canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + canUseEventListeners: + canUseDOM && !!(window.addEventListener || window.attachEvent), canUseViewport: canUseDOM && !!window.screen, @@ -6515,6 +7380,7 @@ module.exports = ExecutionEnvironment; + /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { @@ -6560,6 +7426,7 @@ module.exports = camelizeStyleName; + /***/ }, /* 53 */ /***/ function(module, exports) { @@ -6576,8 +7443,6 @@ * @typechecks */ - "use strict"; - var _hyphenPattern = /-(.)/g; /** @@ -6590,13 +7455,14 @@ * @return {string} */ function camelize(string) { - return string.replace(_hyphenPattern, function (_, character) { + return string.replace(_hyphenPattern, function(_, character) { return character.toUpperCase(); }); } module.exports = camelize; + /***/ }, /* 54 */ /***/ function(module, exports, __webpack_require__) { @@ -6645,7 +7511,8 @@ } var isNonNumeric = isNaN(value); - if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + if (isNonNumeric || value === 0 || + isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { return '' + value; // cast to string } @@ -6657,6 +7524,7 @@ module.exports = dangerousStyleValue; + /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { @@ -6701,6 +7569,7 @@ module.exports = hyphenateStyleName; + /***/ }, /* 56 */ /***/ function(module, exports) { @@ -6717,8 +7586,6 @@ * @typechecks */ - 'use strict'; - var _uppercasePattern = /([A-Z])/g; /** @@ -6739,6 +7606,7 @@ module.exports = hyphenate; + /***/ }, /* 57 */ /***/ function(module, exports) { @@ -6765,7 +7633,7 @@ */ function memoizeStringOnly(callback) { var cache = {}; - return function (string) { + return function(string) { if (!cache.hasOwnProperty(string)) { cache[string] = callback.call(this, string); } @@ -6775,6 +7643,7 @@ module.exports = memoizeStringOnly; + /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { @@ -6812,7 +7681,10 @@ // rely exclusively on `insertBefore(node, null)` instead of also using // `appendChild(node)`. However, using `undefined` is not allowed by all // browsers so we must replace it with `null`. - parentNode.insertBefore(childNode, parentNode.childNodes[index] || null); + parentNode.insertBefore( + childNode, + parentNode.childNodes[index] || null + ); } /** @@ -6832,7 +7704,7 @@ * @param {array} markupList List of markup strings. * @internal */ - processUpdates: function processUpdates(updates, markupList) { + processUpdates: function(updates, markupList) { var update; // Mapping from parent IDs to initial child orderings. var initialChildren = null; @@ -6841,12 +7713,23 @@ for (var i = 0; i < updates.length; i++) { update = updates[i]; - if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) { + if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || + update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) { var updatedIndex = update.fromIndex; var updatedChild = update.parentNode.childNodes[updatedIndex]; var parentID = update.parentID; - "production" !== process.env.NODE_ENV ? invariant(updatedChild, 'processUpdates(): Unable to find child %s of element. This ' + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + 'browser), usually due to forgetting a when using tables, ' + 'nesting tags like
,

, or , or using non-SVG elements ' + 'in an parent. Try inspecting the child nodes of the element ' + 'with React ID `%s`.', updatedIndex, parentID) : invariant(updatedChild); + ("production" !== process.env.NODE_ENV ? invariant( + updatedChild, + 'processUpdates(): Unable to find child %s of element. This ' + + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + + 'browser), usually due to forgetting a when using tables, ' + + 'nesting tags like
,

, or , or using non-SVG elements ' + + 'in an parent. Try inspecting the child nodes of the element ' + + 'with React ID `%s`.', + updatedIndex, + parentID + ) : invariant(updatedChild)); initialChildren = initialChildren || {}; initialChildren[parentID] = initialChildren[parentID] || []; @@ -6870,13 +7753,24 @@ update = updates[k]; switch (update.type) { case ReactMultiChildUpdateTypes.INSERT_MARKUP: - insertChildAt(update.parentNode, renderedMarkup[update.markupIndex], update.toIndex); + insertChildAt( + update.parentNode, + renderedMarkup[update.markupIndex], + update.toIndex + ); break; case ReactMultiChildUpdateTypes.MOVE_EXISTING: - insertChildAt(update.parentNode, initialChildren[update.parentID][update.fromIndex], update.toIndex); + insertChildAt( + update.parentNode, + initialChildren[update.parentID][update.fromIndex], + update.toIndex + ); break; case ReactMultiChildUpdateTypes.TEXT_CONTENT: - setTextContent(update.parentNode, update.textContent); + setTextContent( + update.parentNode, + update.textContent + ); break; case ReactMultiChildUpdateTypes.REMOVE_NODE: // Already removed by the for-loop above. @@ -6888,6 +7782,7 @@ }; module.exports = DOMChildrenOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -6946,13 +7841,22 @@ * @return {array} List of rendered nodes. * @internal */ - dangerouslyRenderMarkup: function dangerouslyRenderMarkup(markupList) { - "production" !== process.env.NODE_ENV ? invariant(ExecutionEnvironment.canUseDOM, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'React.renderToString for server rendering.') : invariant(ExecutionEnvironment.canUseDOM); + dangerouslyRenderMarkup: function(markupList) { + ("production" !== process.env.NODE_ENV ? invariant( + ExecutionEnvironment.canUseDOM, + 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + + 'thread. Make sure `window` and `document` are available globally ' + + 'before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' + ) : invariant(ExecutionEnvironment.canUseDOM)); var nodeName; var markupByNodeName = {}; // Group markup by `nodeName` if a wrap is necessary, else by '*'. for (var i = 0; i < markupList.length; i++) { - "production" !== process.env.NODE_ENV ? invariant(markupList[i], 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(markupList[i]); + ("production" !== process.env.NODE_ENV ? invariant( + markupList[i], + 'dangerouslyRenderMarkup(...): Missing markup.' + ) : invariant(markupList[i])); nodeName = getNodeName(markupList[i]); nodeName = getMarkupWrap(nodeName) ? nodeName : '*'; markupByNodeName[nodeName] = markupByNodeName[nodeName] || []; @@ -6977,41 +7881,61 @@ // Push the requested markup with an additional RESULT_INDEX_ATTR // attribute. If the markup does not start with a < character, it // will be discarded below (with an appropriate console.error). - markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP, - // This index will be parsed back out below. - '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" '); + markupListByNodeName[resultIndex] = markup.replace( + OPEN_TAG_NAME_EXP, + // This index will be parsed back out below. + '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ' + ); } } // Render each group of markup with similar wrapping `nodeName`. - var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with ` @@ -8240,35 +9314,87 @@ firstChildren.length = 0; - "production" !== process.env.NODE_ENV ? invariant(false, 'findComponentRoot(..., %s): Unable to find element. This probably ' + 'means the DOM was unexpectedly mutated (e.g., by the browser), ' + 'usually due to forgetting a when using tables, nesting tags ' + 'like ,

, or , or using non-SVG elements in an ' + 'parent. ' + 'Try inspecting the child nodes of the element with React ID `%s`.', targetID, ReactMount.getID(ancestorNode)) : invariant(false); - }, - - _mountImageIntoNode: function _mountImageIntoNode(markup, container, shouldReuseMarkup) { - "production" !== process.env.NODE_ENV ? invariant(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE), 'mountComponentIntoNode(...): Target container is not valid.') : invariant(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)); + ("production" !== process.env.NODE_ENV ? invariant( + false, + 'findComponentRoot(..., %s): Unable to find element. This probably ' + + 'means the DOM was unexpectedly mutated (e.g., by the browser), ' + + 'usually due to forgetting a when using tables, nesting tags ' + + 'like
,

, or , or using non-SVG elements in an ' + + 'parent. ' + + 'Try inspecting the child nodes of the element with React ID `%s`.', + targetID, + ReactMount.getID(ancestorNode) + ) : invariant(false)); + }, + + _mountImageIntoNode: function(markup, container, shouldReuseMarkup) { + ("production" !== process.env.NODE_ENV ? invariant( + container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ), + 'mountComponentIntoNode(...): Target container is not valid.' + ) : invariant(container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ))); if (shouldReuseMarkup) { var rootElement = getReactRootElementInContainer(container); if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { return; } else { - var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + var checksum = rootElement.getAttribute( + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + ); rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); var rootMarkup = rootElement.outerHTML; - rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); + rootElement.setAttribute( + ReactMarkupChecksum.CHECKSUM_ATTR_NAME, + checksum + ); var diffIndex = firstDifferenceIndex(markup, rootMarkup); - var difference = ' (client) ' + markup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); - - "production" !== process.env.NODE_ENV ? invariant(container.nodeType !== DOC_NODE_TYPE, 'You\'re trying to render a component to the document using ' + 'server rendering but the checksum was invalid. This usually ' + 'means you rendered a different component type or props on ' + 'the client from the one on the server, or your render() ' + 'methods are impure. React cannot handle this case due to ' + 'cross-browser quirks by rendering at the document root. You ' + 'should look for environment dependent code in your components ' + 'and ensure the props are the same client and server side:\n%s', difference) : invariant(container.nodeType !== DOC_NODE_TYPE); + var difference = ' (client) ' + + markup.substring(diffIndex - 20, diffIndex + 20) + + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + + ("production" !== process.env.NODE_ENV ? invariant( + container.nodeType !== DOC_NODE_TYPE, + 'You\'re trying to render a component to the document using ' + + 'server rendering but the checksum was invalid. This usually ' + + 'means you rendered a different component type or props on ' + + 'the client from the one on the server, or your render() ' + + 'methods are impure. React cannot handle this case due to ' + + 'cross-browser quirks by rendering at the document root. You ' + + 'should look for environment dependent code in your components ' + + 'and ensure the props are the same client and server side:\n%s', + difference + ) : invariant(container.nodeType !== DOC_NODE_TYPE)); if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'React attempted to reuse markup in a container but the ' + + 'checksum was invalid. This generally means that you are ' + + 'using server rendering and the markup generated on the ' + + 'server was not what the client was expecting. React injected ' + + 'new markup to compensate which works but you have lost many ' + + 'of the benefits of server rendering. Instead, figure out ' + + 'why the markup being generated is different on the client ' + + 'or server:\n%s', + difference + ) : null); } } } - "production" !== process.env.NODE_ENV ? invariant(container.nodeType !== DOC_NODE_TYPE, 'You\'re trying to render a component to the document but ' + 'you didn\'t use server rendering. We can\'t do this ' + 'without using server rendering due to cross-browser quirks. ' + 'See React.renderToString() for server rendering.') : invariant(container.nodeType !== DOC_NODE_TYPE); + ("production" !== process.env.NODE_ENV ? invariant( + container.nodeType !== DOC_NODE_TYPE, + 'You\'re trying to render a component to the document but ' + + 'you didn\'t use server rendering. We can\'t do this ' + + 'without using server rendering due to cross-browser quirks. ' + + 'See React.renderToString() for server rendering.' + ) : invariant(container.nodeType !== DOC_NODE_TYPE)); setInnerHTML(container, markup); }, @@ -8296,6 +9422,7 @@ }); module.exports = ReactMount; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -8463,8 +9590,10 @@ /** * @param {object} ReactEventListener */ - injectReactEventListener: function injectReactEventListener(ReactEventListener) { - ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); + injectReactEventListener: function(ReactEventListener) { + ReactEventListener.setHandleTopLevel( + ReactBrowserEventEmitter.handleTopLevel + ); ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; } }, @@ -8474,7 +9603,7 @@ * * @param {boolean} enabled True if callbacks should be enabled. */ - setEnabled: function setEnabled(enabled) { + setEnabled: function(enabled) { if (ReactBrowserEventEmitter.ReactEventListener) { ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); } @@ -8483,8 +9612,10 @@ /** * @return {boolean} True if callbacks are enabled. */ - isEnabled: function isEnabled() { - return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()); + isEnabled: function() { + return !!( + (ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()) + ); }, /** @@ -8508,49 +9639,93 @@ * @param {string} registrationName Name of listener (e.g. `onClick`). * @param {object} contentDocumentHandle Document which owns the container */ - listenTo: function listenTo(registrationName, contentDocumentHandle) { + listenTo: function(registrationName, contentDocumentHandle) { var mountAt = contentDocumentHandle; var isListening = getListeningForDocument(mountAt); - var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; + var dependencies = EventPluginRegistry. + registrationNameDependencies[registrationName]; var topLevelTypes = EventConstants.topLevelTypes; for (var i = 0, l = dependencies.length; i < l; i++) { var dependency = dependencies[i]; - if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { + if (!( + (isListening.hasOwnProperty(dependency) && isListening[dependency]) + )) { if (dependency === topLevelTypes.topWheel) { if (isEventSupported('wheel')) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'wheel', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topWheel, + 'wheel', + mountAt + ); } else if (isEventSupported('mousewheel')) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'mousewheel', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topWheel, + 'mousewheel', + mountAt + ); } else { // Firefox needs to capture a different mouse scroll event. // @see http://www.quirksmode.org/dom/events/tests/scroll.html - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'DOMMouseScroll', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topWheel, + 'DOMMouseScroll', + mountAt + ); } } else if (dependency === topLevelTypes.topScroll) { if (isEventSupported('scroll', true)) { - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, 'scroll', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelTypes.topScroll, + 'scroll', + mountAt + ); } else { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topScroll, + 'scroll', + ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE + ); } - } else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) { + } else if (dependency === topLevelTypes.topFocus || + dependency === topLevelTypes.topBlur) { if (isEventSupported('focus', true)) { - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, 'focus', mountAt); - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, 'blur', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelTypes.topFocus, + 'focus', + mountAt + ); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelTypes.topBlur, + 'blur', + mountAt + ); } else if (isEventSupported('focusin')) { // IE has `focusin` and `focusout` events which bubble. // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, 'focusin', mountAt); - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, 'focusout', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topFocus, + 'focusin', + mountAt + ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topBlur, + 'focusout', + mountAt + ); } // to make sure blur and focus event listeners are only attached once isListening[topLevelTypes.topBlur] = true; isListening[topLevelTypes.topFocus] = true; } else if (topEventMapping.hasOwnProperty(dependency)) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + dependency, + topEventMapping[dependency], + mountAt + ); } isListening[dependency] = true; @@ -8558,12 +9733,20 @@ } }, - trapBubbledEvent: function trapBubbledEvent(topLevelType, handlerBaseName, handle) { - return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle); + trapBubbledEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelType, + handlerBaseName, + handle + ); }, - trapCapturedEvent: function trapCapturedEvent(topLevelType, handlerBaseName, handle) { - return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle); + trapCapturedEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelType, + handlerBaseName, + handle + ); }, /** @@ -8574,7 +9757,7 @@ * * @see http://www.quirksmode.org/dom/events/scroll.html */ - ensureScrollValueMonitoring: function ensureScrollValueMonitoring() { + ensureScrollValueMonitoring: function() { if (!isMonitoringScrollValue) { var refresh = ViewportMetrics.refreshScrollValues; ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); @@ -8598,6 +9781,7 @@ module.exports = ReactBrowserEventEmitter; + /***/ }, /* 69 */ /***/ function(module, exports, __webpack_require__) { @@ -8639,7 +9823,7 @@ * @param {?object} event Synthetic event to be dispatched. * @private */ - var executeDispatchesAndRelease = function executeDispatchesAndRelease(event) { + var executeDispatchesAndRelease = function(event) { if (event) { var executeDispatch = EventPluginUtils.executeDispatch; // Plugins can provide custom behavior when dispatching events. @@ -8662,8 +9846,14 @@ var InstanceHandle = null; function validateInstanceHandle() { - var valid = InstanceHandle && InstanceHandle.traverseTwoPhase && InstanceHandle.traverseEnterLeave; - "production" !== process.env.NODE_ENV ? invariant(valid, 'InstanceHandle not injected before use!') : invariant(valid); + var valid = + InstanceHandle && + InstanceHandle.traverseTwoPhase && + InstanceHandle.traverseEnterLeave; + ("production" !== process.env.NODE_ENV ? invariant( + valid, + 'InstanceHandle not injected before use!' + ) : invariant(valid)); } /** @@ -8705,14 +9895,14 @@ * @param {object} InjectedInstanceHandle * @public */ - injectInstanceHandle: function injectInstanceHandle(InjectedInstanceHandle) { + injectInstanceHandle: function(InjectedInstanceHandle) { InstanceHandle = InjectedInstanceHandle; if ("production" !== process.env.NODE_ENV) { validateInstanceHandle(); } }, - getInstanceHandle: function getInstanceHandle() { + getInstanceHandle: function() { if ("production" !== process.env.NODE_ENV) { validateInstanceHandle(); } @@ -8743,10 +9933,15 @@ * @param {string} registrationName Name of listener (e.g. `onClick`). * @param {?function} listener The callback to store. */ - putListener: function putListener(id, registrationName, listener) { - "production" !== process.env.NODE_ENV ? invariant(!listener || typeof listener === 'function', 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : invariant(!listener || typeof listener === 'function'); - - var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); + putListener: function(id, registrationName, listener) { + ("production" !== process.env.NODE_ENV ? invariant( + !listener || typeof listener === 'function', + 'Expected %s listener to be a function, instead got type %s', + registrationName, typeof listener + ) : invariant(!listener || typeof listener === 'function')); + + var bankForRegistrationName = + listenerBank[registrationName] || (listenerBank[registrationName] = {}); bankForRegistrationName[id] = listener; }, @@ -8755,7 +9950,7 @@ * @param {string} registrationName Name of listener (e.g. `onClick`). * @return {?function} The stored callback. */ - getListener: function getListener(id, registrationName) { + getListener: function(id, registrationName) { var bankForRegistrationName = listenerBank[registrationName]; return bankForRegistrationName && bankForRegistrationName[id]; }, @@ -8766,7 +9961,7 @@ * @param {string} id ID of the DOM element. * @param {string} registrationName Name of listener (e.g. `onClick`). */ - deleteListener: function deleteListener(id, registrationName) { + deleteListener: function(id, registrationName) { var bankForRegistrationName = listenerBank[registrationName]; if (bankForRegistrationName) { delete bankForRegistrationName[id]; @@ -8778,7 +9973,7 @@ * * @param {string} id ID of the DOM element. */ - deleteAllListeners: function deleteAllListeners(id) { + deleteAllListeners: function(id) { for (var registrationName in listenerBank) { delete listenerBank[registrationName][id]; } @@ -8795,14 +9990,23 @@ * @return {*} An accumulation of synthetic events. * @internal */ - extractEvents: function extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) { + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { var events; var plugins = EventPluginRegistry.plugins; for (var i = 0, l = plugins.length; i < l; i++) { // Not every plugin in the ordering may be loaded at runtime. var possiblePlugin = plugins[i]; if (possiblePlugin) { - var extractedEvents = possiblePlugin.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent); + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ); if (extractedEvents) { events = accumulateInto(events, extractedEvents); } @@ -8818,7 +10022,7 @@ * @param {*} events An accumulation of synthetic events. * @internal */ - enqueueEvents: function enqueueEvents(events) { + enqueueEvents: function(events) { if (events) { eventQueue = accumulateInto(eventQueue, events); } @@ -8829,29 +10033,34 @@ * * @internal */ - processEventQueue: function processEventQueue() { + processEventQueue: function() { // Set `eventQueue` to null before processing it so that we can tell if more // events get enqueued while processing. var processingEventQueue = eventQueue; eventQueue = null; forEachAccumulated(processingEventQueue, executeDispatchesAndRelease); - "production" !== process.env.NODE_ENV ? invariant(!eventQueue, 'processEventQueue(): Additional events were enqueued while processing ' + 'an event queue. Support for this has not yet been implemented.') : invariant(!eventQueue); + ("production" !== process.env.NODE_ENV ? invariant( + !eventQueue, + 'processEventQueue(): Additional events were enqueued while processing ' + + 'an event queue. Support for this has not yet been implemented.' + ) : invariant(!eventQueue)); }, /** * These are needed for tests only. Do not use! */ - __purge: function __purge() { + __purge: function() { listenerBank = {}; }, - __getListenerBank: function __getListenerBank() { + __getListenerBank: function() { return listenerBank; } }; module.exports = EventPluginHub; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -8897,15 +10106,38 @@ for (var pluginName in namesToPlugins) { var PluginModule = namesToPlugins[pluginName]; var pluginIndex = EventPluginOrder.indexOf(pluginName); - "production" !== process.env.NODE_ENV ? invariant(pluginIndex > -1, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(pluginIndex > -1); + ("production" !== process.env.NODE_ENV ? invariant( + pluginIndex > -1, + 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + + 'the plugin ordering, `%s`.', + pluginName + ) : invariant(pluginIndex > -1)); if (EventPluginRegistry.plugins[pluginIndex]) { continue; } - "production" !== process.env.NODE_ENV ? invariant(PluginModule.extractEvents, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(PluginModule.extractEvents); + ("production" !== process.env.NODE_ENV ? invariant( + PluginModule.extractEvents, + 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + + 'method, but `%s` does not.', + pluginName + ) : invariant(PluginModule.extractEvents)); EventPluginRegistry.plugins[pluginIndex] = PluginModule; var publishedEvents = PluginModule.eventTypes; for (var eventName in publishedEvents) { - "production" !== process.env.NODE_ENV ? invariant(publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName), 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName)); + ("production" !== process.env.NODE_ENV ? invariant( + publishEventForPlugin( + publishedEvents[eventName], + PluginModule, + eventName + ), + 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', + eventName, + pluginName + ) : invariant(publishEventForPlugin( + publishedEvents[eventName], + PluginModule, + eventName + ))); } } } @@ -8919,7 +10151,12 @@ * @private */ function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { - "production" !== process.env.NODE_ENV ? invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName), 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName)); + ("production" !== process.env.NODE_ENV ? invariant( + !EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName), + 'EventPluginHub: More than one plugin attempted to publish the same ' + + 'event name, `%s`.', + eventName + ) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName))); EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; @@ -8927,12 +10164,20 @@ for (var phaseName in phasedRegistrationNames) { if (phasedRegistrationNames.hasOwnProperty(phaseName)) { var phasedRegistrationName = phasedRegistrationNames[phaseName]; - publishRegistrationName(phasedRegistrationName, PluginModule, eventName); + publishRegistrationName( + phasedRegistrationName, + PluginModule, + eventName + ); } } return true; } else if (dispatchConfig.registrationName) { - publishRegistrationName(dispatchConfig.registrationName, PluginModule, eventName); + publishRegistrationName( + dispatchConfig.registrationName, + PluginModule, + eventName + ); return true; } return false; @@ -8947,9 +10192,15 @@ * @private */ function publishRegistrationName(registrationName, PluginModule, eventName) { - "production" !== process.env.NODE_ENV ? invariant(!EventPluginRegistry.registrationNameModules[registrationName], 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(!EventPluginRegistry.registrationNameModules[registrationName]); + ("production" !== process.env.NODE_ENV ? invariant( + !EventPluginRegistry.registrationNameModules[registrationName], + 'EventPluginHub: More than one plugin attempted to publish the same ' + + 'registration name, `%s`.', + registrationName + ) : invariant(!EventPluginRegistry.registrationNameModules[registrationName])); EventPluginRegistry.registrationNameModules[registrationName] = PluginModule; - EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies; + EventPluginRegistry.registrationNameDependencies[registrationName] = + PluginModule.eventTypes[eventName].dependencies; } /** @@ -8988,8 +10239,12 @@ * @internal * @see {EventPluginHub.injection.injectEventPluginOrder} */ - injectEventPluginOrder: function injectEventPluginOrder(InjectedEventPluginOrder) { - "production" !== process.env.NODE_ENV ? invariant(!EventPluginOrder, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(!EventPluginOrder); + injectEventPluginOrder: function(InjectedEventPluginOrder) { + ("production" !== process.env.NODE_ENV ? invariant( + !EventPluginOrder, + 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + + 'once. You are likely trying to load more than one copy of React.' + ) : invariant(!EventPluginOrder)); // Clone the ordering so it cannot be dynamically mutated. EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder); recomputePluginOrdering(); @@ -9005,15 +10260,21 @@ * @internal * @see {EventPluginHub.injection.injectEventPluginsByName} */ - injectEventPluginsByName: function injectEventPluginsByName(injectedNamesToPlugins) { + injectEventPluginsByName: function(injectedNamesToPlugins) { var isOrderingDirty = false; for (var pluginName in injectedNamesToPlugins) { if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { continue; } var PluginModule = injectedNamesToPlugins[pluginName]; - if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) { - "production" !== process.env.NODE_ENV ? invariant(!namesToPlugins[pluginName], 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(!namesToPlugins[pluginName]); + if (!namesToPlugins.hasOwnProperty(pluginName) || + namesToPlugins[pluginName] !== PluginModule) { + ("production" !== process.env.NODE_ENV ? invariant( + !namesToPlugins[pluginName], + 'EventPluginRegistry: Cannot inject two different event plugins ' + + 'using the same name, `%s`.', + pluginName + ) : invariant(!namesToPlugins[pluginName])); namesToPlugins[pluginName] = PluginModule; isOrderingDirty = true; } @@ -9030,16 +10291,20 @@ * @return {?object} The plugin that created the supplied event. * @internal */ - getPluginModuleForEvent: function getPluginModuleForEvent(event) { + getPluginModuleForEvent: function(event) { var dispatchConfig = event.dispatchConfig; if (dispatchConfig.registrationName) { - return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; + return EventPluginRegistry.registrationNameModules[ + dispatchConfig.registrationName + ] || null; } for (var phase in dispatchConfig.phasedRegistrationNames) { if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) { continue; } - var PluginModule = EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]]; + var PluginModule = EventPluginRegistry.registrationNameModules[ + dispatchConfig.phasedRegistrationNames[phase] + ]; if (PluginModule) { return PluginModule; } @@ -9051,7 +10316,7 @@ * Exposed for unit testing. * @private */ - _resetEventPlugins: function _resetEventPlugins() { + _resetEventPlugins: function() { EventPluginOrder = null; for (var pluginName in namesToPlugins) { if (namesToPlugins.hasOwnProperty(pluginName)) { @@ -9078,6 +10343,7 @@ }; module.exports = EventPluginRegistry; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -9114,7 +10380,10 @@ */ function accumulateInto(current, next) { - "production" !== process.env.NODE_ENV ? invariant(next != null, 'accumulateInto(...): Accumulated items must not be null or undefined.') : invariant(next != null); + ("production" !== process.env.NODE_ENV ? invariant( + next != null, + 'accumulateInto(...): Accumulated items must not be null or undefined.' + ) : invariant(next != null)); if (current == null) { return next; } @@ -9143,6 +10412,7 @@ } module.exports = accumulateInto; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -9169,7 +10439,7 @@ * handling the case when there is exactly one item (and we do not need to * allocate an array). */ - var forEachAccumulated = function forEachAccumulated(arr, cb, scope) { + var forEachAccumulated = function(arr, cb, scope) { if (Array.isArray(arr)) { arr.forEach(cb, scope); } else if (arr) { @@ -9179,6 +10449,7 @@ module.exports = forEachAccumulated; + /***/ }, /* 73 */ /***/ function(module, exports, __webpack_require__) { @@ -9214,8 +10485,17 @@ * @param {string} topLevelTargetID ID of `topLevelTarget`. * @param {object} nativeEvent Native environment event. */ - handleTopLevel: function handleTopLevel(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) { - var events = EventPluginHub.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent); + handleTopLevel: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + var events = EventPluginHub.extractEvents( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ); runEventQueueInBatch(events); } @@ -9223,6 +10503,7 @@ module.exports = ReactEventEmitterMixin; + /***/ }, /* 74 */ /***/ function(module, exports) { @@ -9246,7 +10527,7 @@ currentScrollTop: 0, - refreshScrollValues: function refreshScrollValues(scrollPosition) { + refreshScrollValues: function(scrollPosition) { ViewportMetrics.currentScrollLeft = scrollPosition.x; ViewportMetrics.currentScrollTop = scrollPosition.y; } @@ -9255,6 +10536,7 @@ module.exports = ViewportMetrics; + /***/ }, /* 75 */ /***/ function(module, exports, __webpack_require__) { @@ -9276,10 +10558,12 @@ var useHasFeature; if (ExecutionEnvironment.canUseDOM) { - useHasFeature = document.implementation && document.implementation.hasFeature && - // always returns true in newer browsers as per the standard. - // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature - document.implementation.hasFeature('', '') !== true; + useHasFeature = + document.implementation && + document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; } /** @@ -9297,12 +10581,13 @@ * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function isEventSupported(eventNameSuffix, capture) { - if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { + if (!ExecutionEnvironment.canUseDOM || + capture && !('addEventListener' in document)) { return false; } var eventName = 'on' + eventNameSuffix; - var isSupported = (eventName in document); + var isSupported = eventName in document; if (!isSupported) { var element = document.createElement('div'); @@ -9320,6 +10605,7 @@ module.exports = isEventSupported; + /***/ }, /* 76 */ /***/ function(module, exports, __webpack_require__) { @@ -9348,13 +10634,13 @@ var nullComponentIDsRegistry = {}; var ReactEmptyComponentInjection = { - injectEmptyComponent: function injectEmptyComponent(emptyComponent) { + injectEmptyComponent: function(emptyComponent) { component = ReactElement.createFactory(emptyComponent); } }; - var ReactEmptyComponentType = function ReactEmptyComponentType() {}; - ReactEmptyComponentType.prototype.componentDidMount = function () { + var ReactEmptyComponentType = function() {}; + ReactEmptyComponentType.prototype.componentDidMount = function() { var internalInstance = ReactInstanceMap.get(this); // TODO: Make sure we run these methods in the correct order, we shouldn't // need this check. We're going to assume if we're here it means we ran @@ -9365,7 +10651,7 @@ } registerNullComponentID(internalInstance._rootNodeID); }; - ReactEmptyComponentType.prototype.componentWillUnmount = function () { + ReactEmptyComponentType.prototype.componentWillUnmount = function() { var internalInstance = ReactInstanceMap.get(this); // TODO: Get rid of this check. See TODO in componentDidMount. if (!internalInstance) { @@ -9373,8 +10659,12 @@ } deregisterNullComponentID(internalInstance._rootNodeID); }; - ReactEmptyComponentType.prototype.render = function () { - "production" !== process.env.NODE_ENV ? invariant(component, 'Trying to return null from a render, but no null placeholder component ' + 'was injected.') : invariant(component); + ReactEmptyComponentType.prototype.render = function() { + ("production" !== process.env.NODE_ENV ? invariant( + component, + 'Trying to return null from a render, but no null placeholder component ' + + 'was injected.' + ) : invariant(component)); return component(); }; @@ -9411,6 +10701,7 @@ }; module.exports = ReactEmptyComponent; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -9439,9 +10730,12 @@ * @param {string} markup Markup string * @return {string} Markup string with checksum attribute attached */ - addChecksumToMarkup: function addChecksumToMarkup(markup) { + addChecksumToMarkup: function(markup) { var checksum = adler32(markup); - return markup.replace('>', ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '">'); + return markup.replace( + '>', + ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '">' + ); }, /** @@ -9449,8 +10743,10 @@ * @param {DOMElement} element root React element * @returns {boolean} whether or not the markup is the same */ - canReuseMarkup: function canReuseMarkup(markup, element) { - var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + canReuseMarkup: function(markup, element) { + var existingChecksum = element.getAttribute( + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + ); existingChecksum = existingChecksum && parseInt(existingChecksum, 10); var markupChecksum = adler32(markup); return markupChecksum === existingChecksum; @@ -9459,6 +10755,7 @@ module.exports = ReactMarkupChecksum; + /***/ }, /* 78 */ /***/ function(module, exports) { @@ -9491,11 +10788,12 @@ a = (a + data.charCodeAt(i)) % MOD; b = (b + a) % MOD; } - return a | b << 16; + return a | (b << 16); } module.exports = adler32; + /***/ }, /* 79 */ /***/ function(module, exports, __webpack_require__) { @@ -9512,8 +10810,6 @@ * @typechecks */ - "use strict"; - var isTextNode = __webpack_require__(80); /*jslint bitwise:true */ @@ -9525,37 +10821,27 @@ * @param {?DOMNode} innerNode Inner DOM node. * @return {boolean} True if `outerNode` contains or is `innerNode`. */ - function containsNode(_x, _x2) { - var _again = true; - - _function: while (_again) { - var outerNode = _x, - innerNode = _x2; - _again = false; - - if (!outerNode || !innerNode) { - return false; - } else if (outerNode === innerNode) { - return true; - } else if (isTextNode(outerNode)) { - return false; - } else if (isTextNode(innerNode)) { - _x = outerNode; - _x2 = innerNode.parentNode; - _again = true; - continue _function; - } else if (outerNode.contains) { - return outerNode.contains(innerNode); - } else if (outerNode.compareDocumentPosition) { - return !!(outerNode.compareDocumentPosition(innerNode) & 16); - } else { - return false; - } + function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if (outerNode.contains) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; } } module.exports = containsNode; + /***/ }, /* 80 */ /***/ function(module, exports, __webpack_require__) { @@ -9572,8 +10858,6 @@ * @typechecks */ - "use strict"; - var isNode = __webpack_require__(81); /** @@ -9586,6 +10870,7 @@ module.exports = isTextNode; + /***/ }, /* 81 */ /***/ function(module, exports) { @@ -9606,14 +10891,17 @@ * @param {*} object The object to check. * @return {boolean} Whether or not the object is a DOM node. */ - 'use strict'; - function isNode(object) { - return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); + return !!(object && ( + ((typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && + typeof object.nodeType === 'number' && + typeof object.nodeName === 'string')) + )); } module.exports = isNode; + /***/ }, /* 82 */ /***/ function(module, exports) { @@ -9652,6 +10940,7 @@ module.exports = getReactRootElementInContainer; + /***/ }, /* 83 */ /***/ function(module, exports, __webpack_require__) { @@ -9679,10 +10968,14 @@ var warning = __webpack_require__(15); // To avoid a cyclic dependency, we create the final class in this module - var ReactCompositeComponentWrapper = function ReactCompositeComponentWrapper() {}; - assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent.Mixin, { - _instantiateReactComponent: instantiateReactComponent - }); + var ReactCompositeComponentWrapper = function() { }; + assign( + ReactCompositeComponentWrapper.prototype, + ReactCompositeComponent.Mixin, + { + _instantiateReactComponent: instantiateReactComponent + } + ); /** * Check if the type reference is a known internal type. I.e. not a user @@ -9692,7 +10985,12 @@ * @return {boolean} Returns true if this is a valid internal type. */ function isInternalComponentType(type) { - return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function'; + return ( + typeof type === 'function' && + typeof type.prototype !== 'undefined' && + typeof type.prototype.mountComponent === 'function' && + typeof type.prototype.receiveComponent === 'function' + ); } /** @@ -9713,31 +11011,46 @@ if (typeof node === 'object') { var element = node; if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(element && (typeof element.type === 'function' || typeof element.type === 'string'), 'Only functions or strings can be mounted as React components.') : null; + ("production" !== process.env.NODE_ENV ? warning( + element && (typeof element.type === 'function' || + typeof element.type === 'string'), + 'Only functions or strings can be mounted as React components.' + ) : null); } // Special case string values - if (parentCompositeType === element.type && typeof element.type === 'string') { + if (parentCompositeType === element.type && + typeof element.type === 'string') { // Avoid recursion if the wrapper renders itself. instance = ReactNativeComponent.createInternalComponent(element); // All native components are currently wrapped in a composite so we're // safe to assume that this is what we should instantiate. } else if (isInternalComponentType(element.type)) { - // This is temporarily available for custom components that are not string - // represenations. I.e. ART. Once those are updated to use the string - // representation, we can drop this code path. - instance = new element.type(element); - } else { - instance = new ReactCompositeComponentWrapper(); - } + // This is temporarily available for custom components that are not string + // represenations. I.e. ART. Once those are updated to use the string + // representation, we can drop this code path. + instance = new element.type(element); + } else { + instance = new ReactCompositeComponentWrapper(); + } } else if (typeof node === 'string' || typeof node === 'number') { instance = ReactNativeComponent.createInstanceForText(node); } else { - "production" !== process.env.NODE_ENV ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : invariant(false); + ("production" !== process.env.NODE_ENV ? invariant( + false, + 'Encountered invalid React node of type %s', + typeof node + ) : invariant(false)); } if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(typeof instance.construct === 'function' && typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : null; + ("production" !== process.env.NODE_ENV ? warning( + typeof instance.construct === 'function' && + typeof instance.mountComponent === 'function' && + typeof instance.receiveComponent === 'function' && + typeof instance.unmountComponent === 'function', + 'Only React Components can be mounted.' + ) : null); } // Sets up the instance. This can probably just move into the constructor now. @@ -9766,6 +11079,7 @@ } module.exports = instantiateReactComponent; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -9863,7 +11177,7 @@ * @final * @internal */ - construct: function construct(element) { + construct: function(element) { this._currentElement = element; this._rootNodeID = null; this._instance = null; @@ -9893,7 +11207,7 @@ * @final * @internal */ - mountComponent: function mountComponent(rootID, transaction, context) { + mountComponent: function(rootID, transaction, context) { this._context = context; this._mountOrder = nextMountID++; this._rootNodeID = rootID; @@ -9901,7 +11215,9 @@ var publicProps = this._processProps(this._currentElement.props); var publicContext = this._processContext(this._currentElement._context); - var Component = ReactNativeComponent.getComponentClassForElement(this._currentElement); + var Component = ReactNativeComponent.getComponentClassForElement( + this._currentElement + ); // Initialize the public class var inst = new Component(publicProps, publicContext); @@ -9909,7 +11225,14 @@ if ("production" !== process.env.NODE_ENV) { // This will throw later in _renderValidatedComponent, but add an early // warning now to help debugging - "production" !== process.env.NODE_ENV ? warning(inst.render != null, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render` in your ' + 'component or you may have accidentally tried to render an element ' + 'whose type is a function that isn\'t a React component.', Component.displayName || Component.name || 'Component') : null; + ("production" !== process.env.NODE_ENV ? warning( + inst.render != null, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render` in your ' + + 'component or you may have accidentally tried to render an element ' + + 'whose type is a function that isn\'t a React component.', + Component.displayName || Component.name || 'Component' + ) : null); } // These should be set up in the constructor, but as a convenience for @@ -9931,18 +11254,53 @@ // Since plain JS classes are defined without any special initialization // logic, we can not catch common errors early. Therefore, we have to // catch them here, at initialization time, instead. - "production" !== process.env.NODE_ENV ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : null; - "production" !== process.env.NODE_ENV ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : null; - "production" !== process.env.NODE_ENV ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : null; - "production" !== process.env.NODE_ENV ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : null; - "production" !== process.env.NODE_ENV ? warning(typeof inst.componentShouldUpdate !== 'function', '%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.', this.getName() || 'A component') : null; + ("production" !== process.env.NODE_ENV ? warning( + !inst.getInitialState || + inst.getInitialState.isReactClassApproved, + 'getInitialState was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', + this.getName() || 'a component' + ) : null); + ("production" !== process.env.NODE_ENV ? warning( + !inst.getDefaultProps || + inst.getDefaultProps.isReactClassApproved, + 'getDefaultProps was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Use a static property to define defaultProps instead.', + this.getName() || 'a component' + ) : null); + ("production" !== process.env.NODE_ENV ? warning( + !inst.propTypes, + 'propTypes was defined as an instance property on %s. Use a static ' + + 'property to define propTypes instead.', + this.getName() || 'a component' + ) : null); + ("production" !== process.env.NODE_ENV ? warning( + !inst.contextTypes, + 'contextTypes was defined as an instance property on %s. Use a ' + + 'static property to define contextTypes instead.', + this.getName() || 'a component' + ) : null); + ("production" !== process.env.NODE_ENV ? warning( + typeof inst.componentShouldUpdate !== 'function', + '%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.', + (this.getName() || 'A component') + ) : null); } var initialState = inst.state; if (initialState === undefined) { inst.state = initialState = null; } - "production" !== process.env.NODE_ENV ? invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : invariant(typeof initialState === 'object' && !Array.isArray(initialState)); + ("production" !== process.env.NODE_ENV ? invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.state: must be set to an object or null', + this.getName() || 'ReactCompositeComponent' + ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); this._pendingStateQueue = null; this._pendingReplaceState = false; @@ -9969,10 +11327,17 @@ ReactLifeCycle.currentlyMountingInstance = previouslyMounting; } - this._renderedComponent = this._instantiateReactComponent(renderedElement, this._currentElement.type // The wrapping type + this._renderedComponent = this._instantiateReactComponent( + renderedElement, + this._currentElement.type // The wrapping type ); - var markup = ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, this._mergeChildContext(context, childContext)); + var markup = ReactReconciler.mountComponent( + this._renderedComponent, + rootID, + transaction, + this._mergeChildContext(context, childContext) + ); if (inst.componentDidMount) { transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); } @@ -9986,7 +11351,7 @@ * @final * @internal */ - unmountComponent: function unmountComponent() { + unmountComponent: function() { var inst = this._instance; if (inst.componentWillUnmount) { @@ -10034,11 +11399,14 @@ * @final * @internal */ - _setPropsInternal: function _setPropsInternal(partialProps, callback) { + _setPropsInternal: function(partialProps, callback) { // This is a deoptimized path. We optimize for always having an element. // This creates an extra internal element. var element = this._pendingElement || this._currentElement; - this._pendingElement = ReactElement.cloneAndReplaceProps(element, assign({}, element.props, partialProps)); + this._pendingElement = ReactElement.cloneAndReplaceProps( + element, + assign({}, element.props, partialProps) + ); ReactUpdates.enqueueUpdate(this, callback); }, @@ -10050,7 +11418,7 @@ * @return {?object} * @private */ - _maskContext: function _maskContext(context) { + _maskContext: function(context) { var maskedContext = null; // This really should be getting the component class for the element, // but we know that we're not going to need it for built-ins. @@ -10076,12 +11444,18 @@ * @return {?object} * @private */ - _processContext: function _processContext(context) { + _processContext: function(context) { var maskedContext = this._maskContext(context); if ("production" !== process.env.NODE_ENV) { - var Component = ReactNativeComponent.getComponentClassForElement(this._currentElement); + var Component = ReactNativeComponent.getComponentClassForElement( + this._currentElement + ); if (Component.contextTypes) { - this._checkPropTypes(Component.contextTypes, maskedContext, ReactPropTypeLocations.context); + this._checkPropTypes( + Component.contextTypes, + maskedContext, + ReactPropTypeLocations.context + ); } } return maskedContext; @@ -10092,23 +11466,37 @@ * @return {object} * @private */ - _getValidatedChildContext: function _getValidatedChildContext(currentContext) { + _getValidatedChildContext: function(currentContext) { var inst = this._instance; var childContext = inst.getChildContext && inst.getChildContext(); if (childContext) { - "production" !== process.env.NODE_ENV ? invariant(typeof inst.constructor.childContextTypes === 'object', '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', this.getName() || 'ReactCompositeComponent') : invariant(typeof inst.constructor.childContextTypes === 'object'); + ("production" !== process.env.NODE_ENV ? invariant( + typeof inst.constructor.childContextTypes === 'object', + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + this.getName() || 'ReactCompositeComponent' + ) : invariant(typeof inst.constructor.childContextTypes === 'object')); if ("production" !== process.env.NODE_ENV) { - this._checkPropTypes(inst.constructor.childContextTypes, childContext, ReactPropTypeLocations.childContext); + this._checkPropTypes( + inst.constructor.childContextTypes, + childContext, + ReactPropTypeLocations.childContext + ); } for (var name in childContext) { - "production" !== process.env.NODE_ENV ? invariant(name in inst.constructor.childContextTypes, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : invariant(name in inst.constructor.childContextTypes); + ("production" !== process.env.NODE_ENV ? invariant( + name in inst.constructor.childContextTypes, + '%s.getChildContext(): key "%s" is not defined in childContextTypes.', + this.getName() || 'ReactCompositeComponent', + name + ) : invariant(name in inst.constructor.childContextTypes)); } return childContext; } return null; }, - _mergeChildContext: function _mergeChildContext(currentContext, childContext) { + _mergeChildContext: function(currentContext, childContext) { if (childContext) { return assign({}, currentContext, childContext); } @@ -10124,11 +11512,17 @@ * @return {object} * @private */ - _processProps: function _processProps(newProps) { + _processProps: function(newProps) { if ("production" !== process.env.NODE_ENV) { - var Component = ReactNativeComponent.getComponentClassForElement(this._currentElement); + var Component = ReactNativeComponent.getComponentClassForElement( + this._currentElement + ); if (Component.propTypes) { - this._checkPropTypes(Component.propTypes, newProps, ReactPropTypeLocations.prop); + this._checkPropTypes( + Component.propTypes, + newProps, + ReactPropTypeLocations.prop + ); } } return newProps; @@ -10142,7 +11536,7 @@ * @param {string} location e.g. "prop", "context", "child context" * @private */ - _checkPropTypes: function _checkPropTypes(propTypes, props, location) { + _checkPropTypes: function(propTypes, props, location) { // TODO: Stop validating prop types here and only use the element // validation. var componentName = this.getName(); @@ -10152,7 +11546,14 @@ try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. - "production" !== process.env.NODE_ENV ? invariant(typeof propTypes[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually ' + 'from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(typeof propTypes[propName] === 'function'); + ("production" !== process.env.NODE_ENV ? invariant( + typeof propTypes[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually ' + + 'from React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + propName + ) : invariant(typeof propTypes[propName] === 'function')); error = propTypes[propName](props, propName, componentName, location); } catch (ex) { error = ex; @@ -10165,22 +11566,38 @@ if (location === ReactPropTypeLocations.prop) { // Preface gives us something to blacklist in warning module - "production" !== process.env.NODE_ENV ? warning(false, 'Failed Composite propType: %s%s', error.message, addendum) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Failed Composite propType: %s%s', + error.message, + addendum + ) : null); } else { - "production" !== process.env.NODE_ENV ? warning(false, 'Failed Context Types: %s%s', error.message, addendum) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Failed Context Types: %s%s', + error.message, + addendum + ) : null); } } } } }, - receiveComponent: function receiveComponent(nextElement, transaction, nextContext) { + receiveComponent: function(nextElement, transaction, nextContext) { var prevElement = this._currentElement; var prevContext = this._context; this._pendingElement = null; - this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); + this.updateComponent( + transaction, + prevElement, + nextElement, + prevContext, + nextContext + ); }, /** @@ -10190,17 +11607,30 @@ * @param {ReactReconcileTransaction} transaction * @internal */ - performUpdateIfNecessary: function performUpdateIfNecessary(transaction) { + performUpdateIfNecessary: function(transaction) { if (this._pendingElement != null) { - ReactReconciler.receiveComponent(this, this._pendingElement || this._currentElement, transaction, this._context); + ReactReconciler.receiveComponent( + this, + this._pendingElement || this._currentElement, + transaction, + this._context + ); } if (this._pendingStateQueue !== null || this._pendingForceUpdate) { if ("production" !== process.env.NODE_ENV) { - ReactElementValidator.checkAndWarnForMutatedProps(this._currentElement); + ReactElementValidator.checkAndWarnForMutatedProps( + this._currentElement + ); } - this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); + this.updateComponent( + transaction, + this._currentElement, + this._currentElement, + this._context, + this._context + ); } }, @@ -10208,14 +11638,23 @@ * Compare two contexts, warning if they are different * TODO: Remove this check when owner-context is removed */ - _warnIfContextsDiffer: function _warnIfContextsDiffer(ownerBasedContext, parentBasedContext) { + _warnIfContextsDiffer: function(ownerBasedContext, parentBasedContext) { ownerBasedContext = this._maskContext(ownerBasedContext); parentBasedContext = this._maskContext(parentBasedContext); var parentKeys = Object.keys(parentBasedContext).sort(); var displayName = this.getName() || 'ReactCompositeComponent'; for (var i = 0; i < parentKeys.length; i++) { var key = parentKeys[i]; - "production" !== process.env.NODE_ENV ? warning(ownerBasedContext[key] === parentBasedContext[key], 'owner-based and parent-based contexts differ ' + '(values: `%s` vs `%s`) for key (%s) while mounting %s ' + '(see: http://fb.me/react-context-by-parent)', ownerBasedContext[key], parentBasedContext[key], key, displayName) : null; + ("production" !== process.env.NODE_ENV ? warning( + ownerBasedContext[key] === parentBasedContext[key], + 'owner-based and parent-based contexts differ ' + + '(values: `%s` vs `%s`) for key (%s) while mounting %s ' + + '(see: http://fb.me/react-context-by-parent)', + ownerBasedContext[key], + parentBasedContext[key], + key, + displayName + ) : null); } }, @@ -10234,7 +11673,13 @@ * @internal * @overridable */ - updateComponent: function updateComponent(transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { + updateComponent: function( + transaction, + prevParentElement, + nextParentElement, + prevUnmaskedContext, + nextUnmaskedContext + ) { var inst = this._instance; var nextContext = inst.context; @@ -10247,7 +11692,10 @@ if ("production" !== process.env.NODE_ENV) { if (nextUnmaskedContext != null) { - this._warnIfContextsDiffer(nextParentElement._context, nextUnmaskedContext); + this._warnIfContextsDiffer( + nextParentElement._context, + nextUnmaskedContext + ); } } @@ -10262,16 +11710,31 @@ var nextState = this._processPendingState(nextProps, nextContext); - var shouldUpdate = this._pendingForceUpdate || !inst.shouldComponentUpdate || inst.shouldComponentUpdate(nextProps, nextState, nextContext); + var shouldUpdate = + this._pendingForceUpdate || + !inst.shouldComponentUpdate || + inst.shouldComponentUpdate(nextProps, nextState, nextContext); if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(typeof shouldUpdate !== 'undefined', '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : null; + ("production" !== process.env.NODE_ENV ? warning( + typeof shouldUpdate !== 'undefined', + '%s.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.', + this.getName() || 'ReactCompositeComponent' + ) : null); } if (shouldUpdate) { this._pendingForceUpdate = false; // Will set `this.props`, `this.state` and `this.context`. - this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); + this._performComponentUpdate( + nextParentElement, + nextProps, + nextState, + nextContext, + transaction, + nextUnmaskedContext + ); } else { // If it's determined that a component should not update, we still want // to set props and state but we shortcut the rest of the update. @@ -10283,7 +11746,7 @@ } }, - _processPendingState: function _processPendingState(props, context) { + _processPendingState: function(props, context) { var inst = this._instance; var queue = this._pendingStateQueue; var replace = this._pendingReplaceState; @@ -10301,7 +11764,12 @@ var nextState = assign({}, replace ? queue[0] : inst.state); for (var i = replace ? 1 : 0; i < queue.length; i++) { var partial = queue[i]; - assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); + assign( + nextState, + typeof partial === 'function' ? + partial.call(inst, nextState, props, context) : + partial + ); } return nextState; @@ -10319,7 +11787,14 @@ * @param {?object} unmaskedContext * @private */ - _performComponentUpdate: function _performComponentUpdate(nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { + _performComponentUpdate: function( + nextElement, + nextProps, + nextState, + nextContext, + transaction, + unmaskedContext + ) { var inst = this._instance; var prevProps = inst.props; @@ -10339,7 +11814,10 @@ this._updateRenderedComponent(transaction, unmaskedContext); if (inst.componentDidUpdate) { - transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); + transaction.getReactMountReady().enqueue( + inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), + inst + ); } }, @@ -10349,21 +11827,34 @@ * @param {ReactReconcileTransaction} transaction * @internal */ - _updateRenderedComponent: function _updateRenderedComponent(transaction, context) { + _updateRenderedComponent: function(transaction, context) { var prevComponentInstance = this._renderedComponent; var prevRenderedElement = prevComponentInstance._currentElement; var childContext = this._getValidatedChildContext(); var nextRenderedElement = this._renderValidatedComponent(childContext); if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { - ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._mergeChildContext(context, childContext)); + ReactReconciler.receiveComponent( + prevComponentInstance, + nextRenderedElement, + transaction, + this._mergeChildContext(context, childContext) + ); } else { // These two IDs are actually the same! But nothing should rely on that. var thisID = this._rootNodeID; var prevComponentID = prevComponentInstance._rootNodeID; ReactReconciler.unmountComponent(prevComponentInstance); - this._renderedComponent = this._instantiateReactComponent(nextRenderedElement, this._currentElement.type); - var nextMarkup = ReactReconciler.mountComponent(this._renderedComponent, thisID, transaction, this._mergeChildContext(context, childContext)); + this._renderedComponent = this._instantiateReactComponent( + nextRenderedElement, + this._currentElement.type + ); + var nextMarkup = ReactReconciler.mountComponent( + this._renderedComponent, + thisID, + transaction, + this._mergeChildContext(context, childContext) + ); this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup); } }, @@ -10371,19 +11862,23 @@ /** * @protected */ - _replaceNodeWithMarkupByID: function _replaceNodeWithMarkupByID(prevComponentID, nextMarkup) { - ReactComponentEnvironment.replaceNodeWithMarkupByID(prevComponentID, nextMarkup); + _replaceNodeWithMarkupByID: function(prevComponentID, nextMarkup) { + ReactComponentEnvironment.replaceNodeWithMarkupByID( + prevComponentID, + nextMarkup + ); }, /** * @protected */ - _renderValidatedComponentWithoutOwnerOrContext: function _renderValidatedComponentWithoutOwnerOrContext() { + _renderValidatedComponentWithoutOwnerOrContext: function() { var inst = this._instance; var renderedComponent = inst.render(); if ("production" !== process.env.NODE_ENV) { // We allow auto-mocks to proceed as if they're returning null. - if (typeof renderedComponent === 'undefined' && inst.render._isMockFunction) { + if (typeof renderedComponent === 'undefined' && + inst.render._isMockFunction) { // This is probably bad practice. Consider warning here and // deprecating this convenience. renderedComponent = null; @@ -10396,21 +11891,31 @@ /** * @private */ - _renderValidatedComponent: function _renderValidatedComponent(childContext) { + _renderValidatedComponent: function(childContext) { var renderedComponent; var previousContext = ReactContext.current; - ReactContext.current = this._mergeChildContext(this._currentElement._context, childContext); + ReactContext.current = this._mergeChildContext( + this._currentElement._context, + childContext + ); ReactCurrentOwner.current = this; try { - renderedComponent = this._renderValidatedComponentWithoutOwnerOrContext(); + renderedComponent = + this._renderValidatedComponentWithoutOwnerOrContext(); } finally { ReactContext.current = previousContext; ReactCurrentOwner.current = null; } - "production" !== process.env.NODE_ENV ? invariant( - // TODO: An `isValidNode` function would probably be more appropriate - renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent), '%s.render(): A valid ReactComponent must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : invariant( // TODO: An `isValidNode` function would probably be more appropriate - renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent)); + ("production" !== process.env.NODE_ENV ? invariant( + // TODO: An `isValidNode` function would probably be more appropriate + renderedComponent === null || renderedComponent === false || + ReactElement.isValidElement(renderedComponent), + '%s.render(): A valid ReactComponent must be returned. You may have ' + + 'returned undefined, an array or some other invalid object.', + this.getName() || 'ReactCompositeComponent' + ) : invariant(// TODO: An `isValidNode` function would probably be more appropriate + renderedComponent === null || renderedComponent === false || + ReactElement.isValidElement(renderedComponent))); return renderedComponent; }, @@ -10422,9 +11927,9 @@ * @final * @private */ - attachRef: function attachRef(ref, component) { + attachRef: function(ref, component) { var inst = this.getPublicInstance(); - var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; + var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs; refs[ref] = component.getPublicInstance(); }, @@ -10435,7 +11940,7 @@ * @final * @private */ - detachRef: function detachRef(ref) { + detachRef: function(ref) { var refs = this.getPublicInstance().refs; delete refs[ref]; }, @@ -10446,10 +11951,14 @@ * @return {string} The name or null. * @internal */ - getName: function getName() { + getName: function() { var type = this._currentElement.type; var constructor = this._instance && this._instance.constructor; - return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; + return ( + type.displayName || (constructor && constructor.displayName) || + type.name || (constructor && constructor.name) || + null + ); }, /** @@ -10460,7 +11969,7 @@ * @return {ReactComponent} the public component instance. * @internal */ - getPublicInstance: function getPublicInstance() { + getPublicInstance: function() { return this._instance; }, @@ -10469,11 +11978,15 @@ }; - ReactPerf.measureMethods(ReactCompositeComponentMixin, 'ReactCompositeComponent', { - mountComponent: 'mountComponent', - updateComponent: 'updateComponent', - _renderValidatedComponent: '_renderValidatedComponent' - }); + ReactPerf.measureMethods( + ReactCompositeComponentMixin, + 'ReactCompositeComponent', + { + mountComponent: 'mountComponent', + updateComponent: 'updateComponent', + _renderValidatedComponent: '_renderValidatedComponent' + } + ); var ReactCompositeComponent = { @@ -10482,6 +11995,7 @@ }; module.exports = ReactCompositeComponent; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -10527,11 +12041,17 @@ processChildrenUpdates: null, injection: { - injectEnvironment: function injectEnvironment(environment) { - "production" !== process.env.NODE_ENV ? invariant(!injected, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : invariant(!injected); - ReactComponentEnvironment.unmountIDFromEnvironment = environment.unmountIDFromEnvironment; - ReactComponentEnvironment.replaceNodeWithMarkupByID = environment.replaceNodeWithMarkupByID; - ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; + injectEnvironment: function(environment) { + ("production" !== process.env.NODE_ENV ? invariant( + !injected, + 'ReactCompositeComponent: injectEnvironment() can only be called once.' + ) : invariant(!injected)); + ReactComponentEnvironment.unmountIDFromEnvironment = + environment.unmountIDFromEnvironment; + ReactComponentEnvironment.replaceNodeWithMarkupByID = + environment.replaceNodeWithMarkupByID; + ReactComponentEnvironment.processChildrenUpdates = + environment.processChildrenUpdates; injected = true; } } @@ -10539,6 +12059,7 @@ }; module.exports = ReactComponentEnvironment; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -10577,36 +12098,62 @@ var prevType = typeof prevElement; var nextType = typeof nextElement; if (prevType === 'string' || prevType === 'number') { - return nextType === 'string' || nextType === 'number'; + return (nextType === 'string' || nextType === 'number'); } else { - if (nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key) { + if (nextType === 'object' && + prevElement.type === nextElement.type && + prevElement.key === nextElement.key) { var ownersMatch = prevElement._owner === nextElement._owner; var prevName = null; var nextName = null; var nextDisplayName = null; if ("production" !== process.env.NODE_ENV) { if (!ownersMatch) { - if (prevElement._owner != null && prevElement._owner.getPublicInstance() != null && prevElement._owner.getPublicInstance().constructor != null) { - prevName = prevElement._owner.getPublicInstance().constructor.displayName; + if (prevElement._owner != null && + prevElement._owner.getPublicInstance() != null && + prevElement._owner.getPublicInstance().constructor != null) { + prevName = + prevElement._owner.getPublicInstance().constructor.displayName; } - if (nextElement._owner != null && nextElement._owner.getPublicInstance() != null && nextElement._owner.getPublicInstance().constructor != null) { - nextName = nextElement._owner.getPublicInstance().constructor.displayName; + if (nextElement._owner != null && + nextElement._owner.getPublicInstance() != null && + nextElement._owner.getPublicInstance().constructor != null) { + nextName = + nextElement._owner.getPublicInstance().constructor.displayName; } - if (nextElement.type != null && nextElement.type.displayName != null) { + if (nextElement.type != null && + nextElement.type.displayName != null) { nextDisplayName = nextElement.type.displayName; } if (nextElement.type != null && typeof nextElement.type === 'string') { nextDisplayName = nextElement.type; } - if (typeof nextElement.type !== 'string' || nextElement.type === 'input' || nextElement.type === 'textarea') { - if (prevElement._owner != null && prevElement._owner._isOwnerNecessary === false || nextElement._owner != null && nextElement._owner._isOwnerNecessary === false) { + if (typeof nextElement.type !== 'string' || + nextElement.type === 'input' || + nextElement.type === 'textarea') { + if ((prevElement._owner != null && + prevElement._owner._isOwnerNecessary === false) || + (nextElement._owner != null && + nextElement._owner._isOwnerNecessary === false)) { if (prevElement._owner != null) { prevElement._owner._isOwnerNecessary = true; } if (nextElement._owner != null) { nextElement._owner._isOwnerNecessary = true; } - "production" !== process.env.NODE_ENV ? warning(false, '<%s /> is being rendered by both %s and %s using the same ' + 'key (%s) in the same place. Currently, this means that ' + 'they don\'t preserve state. This behavior should be very ' + 'rare so we\'re considering deprecating it. Please contact ' + 'the React team and explain your use case so that we can ' + 'take that into consideration.', nextDisplayName || 'Unknown Component', prevName || '[Unknown]', nextName || '[Unknown]', prevElement.key) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + '<%s /> is being rendered by both %s and %s using the same ' + + 'key (%s) in the same place. Currently, this means that ' + + 'they don\'t preserve state. This behavior should be very ' + + 'rare so we\'re considering deprecating it. Please contact ' + + 'the React team and explain your use case so that we can ' + + 'take that into consideration.', + nextDisplayName || 'Unknown Component', + prevName || '[Unknown]', + nextName || '[Unknown]', + prevElement.key + ) : null); } } } @@ -10619,6 +12166,7 @@ } module.exports = shouldUpdateReactComponent; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -10645,7 +12193,8 @@ var DOMProperty = __webpack_require__(44); var DOMPropertyOperations = __webpack_require__(43); var ReactBrowserEventEmitter = __webpack_require__(68); - var ReactComponentBrowserEnvironment = __webpack_require__(47); + var ReactComponentBrowserEnvironment = + __webpack_require__(47); var ReactMount = __webpack_require__(67); var ReactMultiChild = __webpack_require__(88); var ReactPerf = __webpack_require__(28); @@ -10662,9 +12211,9 @@ var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules; // For quickly matching children type, to test if can be treated as content. - var CONTENT_TYPES = { 'string': true, 'number': true }; + var CONTENT_TYPES = {'string': true, 'number': true}; - var STYLE = keyOf({ style: null }); + var STYLE = keyOf({style: null}); var ELEMENT_NODE_TYPE = 1; @@ -10682,28 +12231,62 @@ } // Note the use of `==` which checks for null or undefined. if (props.dangerouslySetInnerHTML != null) { - "production" !== process.env.NODE_ENV ? invariant(props.children == null, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : invariant(props.children == null); - "production" !== process.env.NODE_ENV ? invariant(typeof props.dangerouslySetInnerHTML === 'object' && '__html' in props.dangerouslySetInnerHTML, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + 'for more information.') : invariant(typeof props.dangerouslySetInnerHTML === 'object' && '__html' in props.dangerouslySetInnerHTML); + ("production" !== process.env.NODE_ENV ? invariant( + props.children == null, + 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.' + ) : invariant(props.children == null)); + ("production" !== process.env.NODE_ENV ? invariant( + typeof props.dangerouslySetInnerHTML === 'object' && + '__html' in props.dangerouslySetInnerHTML, + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + + 'for more information.' + ) : invariant(typeof props.dangerouslySetInnerHTML === 'object' && + '__html' in props.dangerouslySetInnerHTML)); } if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : null; - "production" !== process.env.NODE_ENV ? warning(!props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : null; - } - "production" !== process.env.NODE_ENV ? invariant(props.style == null || typeof props.style === 'object', 'The `style` prop expects a mapping from style properties to values, ' + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + 'using JSX.') : invariant(props.style == null || typeof props.style === 'object'); + ("production" !== process.env.NODE_ENV ? warning( + props.innerHTML == null, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.' + ) : null); + ("production" !== process.env.NODE_ENV ? warning( + !props.contentEditable || props.children == null, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.' + ) : null); + } + ("production" !== process.env.NODE_ENV ? invariant( + props.style == null || typeof props.style === 'object', + 'The `style` prop expects a mapping from style properties to values, ' + + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + + 'using JSX.' + ) : invariant(props.style == null || typeof props.style === 'object')); } function putListener(id, registrationName, listener, transaction) { if ("production" !== process.env.NODE_ENV) { // IE8 has no API for event capturing and the `onScroll` event doesn't // bubble. - "production" !== process.env.NODE_ENV ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : null; + ("production" !== process.env.NODE_ENV ? warning( + registrationName !== 'onScroll' || isEventSupported('scroll', true), + 'This browser doesn\'t support the `onScroll` event' + ) : null); } var container = ReactMount.findReactContainerForID(id); if (container) { - var doc = container.nodeType === ELEMENT_NODE_TYPE ? container.ownerDocument : container; + var doc = container.nodeType === ELEMENT_NODE_TYPE ? + container.ownerDocument : + container; listenTo(registrationName, doc); } - transaction.getPutListenerQueue().enqueuePutListener(id, registrationName, listener); + transaction.getPutListenerQueue().enqueuePutListener( + id, + registrationName, + listener + ); } // For HTML, certain tags should omit their close tag. We keep a whitelist for @@ -10734,11 +12317,11 @@ var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset var validatedTagCache = {}; - var hasOwnProperty = ({}).hasOwnProperty; + var hasOwnProperty = {}.hasOwnProperty; function validateDangerousTag(tag) { if (!hasOwnProperty.call(validatedTagCache, tag)) { - "production" !== process.env.NODE_ENV ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag)); + ("production" !== process.env.NODE_ENV ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag))); validatedTagCache[tag] = true; } } @@ -10769,7 +12352,7 @@ ReactDOMComponent.Mixin = { - construct: function construct(element) { + construct: function(element) { this._currentElement = element; }, @@ -10782,11 +12365,15 @@ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction * @return {string} The computed markup. */ - mountComponent: function mountComponent(rootID, transaction, context) { + mountComponent: function(rootID, transaction, context) { this._rootNodeID = rootID; assertValidProps(this._currentElement.props); var closeTag = omittedCloseTags[this._tag] ? '' : ''; - return this._createOpenTagMarkupAndPutListeners(transaction) + this._createContentMarkup(transaction, context) + closeTag; + return ( + this._createOpenTagMarkupAndPutListeners(transaction) + + this._createContentMarkup(transaction, context) + + closeTag + ); }, /** @@ -10801,7 +12388,7 @@ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction * @return {string} Markup of opening tag. */ - _createOpenTagMarkupAndPutListeners: function _createOpenTagMarkupAndPutListeners(transaction) { + _createOpenTagMarkupAndPutListeners: function(transaction) { var props = this._currentElement.props; var ret = '<' + this._tag; @@ -10822,7 +12409,8 @@ } propValue = CSSPropertyOperations.createMarkupForStyles(propValue); } - var markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + var markup = + DOMPropertyOperations.createMarkupForProperty(propKey, propValue); if (markup) { ret += ' ' + markup; } @@ -10847,9 +12435,11 @@ * @param {object} context * @return {string} Content markup. */ - _createContentMarkup: function _createContentMarkup(transaction, context) { + _createContentMarkup: function(transaction, context) { var prefix = ''; - if (this._tag === 'listing' || this._tag === 'pre' || this._tag === 'textarea') { + if (this._tag === 'listing' || + this._tag === 'pre' || + this._tag === 'textarea') { // Add an initial newline because browsers ignore the first newline in // a

,
, or ";support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;})();var strundefined=typeof undefined;support.focusinBubbles = "onfocusin" in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;function returnTrue(){return true;}function returnFalse(){return false;}function safeActiveElement(){try{return document.activeElement;}catch(err) {}} /*
-	 * Helper functions for managing events -- not part of the public interface.
-	 * Props to Dean Edwards' addEvent library for many of the ideas.
-	 */jQuery.event = {global:{},add:function add(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.get(elem); // Don't attach events to noData or text/comment nodes (but allow plain objects)
-	if(!elemData){return;} // Caller can pass in an object of custom data in lieu of the handler
-	if(handler.handler){handleObjIn = handler;handler = handleObjIn.handler;selector = handleObjIn.selector;} // Make sure that the handler has a unique ID, used to find/remove it later
-	if(!handler.guid){handler.guid = jQuery.guid++;} // Init the element's event structure and main handler, if this is the first
-	if(!(events = elemData.events)){events = elemData.events = {};}if(!(eventHandle = elemData.handle)){eventHandle = elemData.handle = function(e){ // Discard the second event of a jQuery.event.trigger() and
-	// when an event is called after a page has unloaded
-	return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type?jQuery.event.dispatch.apply(elem,arguments):undefined;};} // Handle multiple events separated by a space
-	types = (types || "").match(rnotwhite) || [""];t = types.length;while(t--) {tmp = rtypenamespace.exec(types[t]) || [];type = origType = tmp[1];namespaces = (tmp[2] || "").split(".").sort(); // There *must* be a type, no attaching namespace-only handlers
-	if(!type){continue;} // If event changes its type, use the special event handlers for the changed type
-	special = jQuery.event.special[type] || {}; // If selector defined, determine special event api type, otherwise given type
-	type = (selector?special.delegateType:special.bindType) || type; // Update special based on newly reset type
-	special = jQuery.event.special[type] || {}; // handleObj is passed to all event handlers
-	handleObj = jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector && jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn); // Init the event handler queue if we're the first
-	if(!(handlers = events[type])){handlers = events[type] = [];handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false
-	if(!special.setup || special.setup.call(elem,data,namespaces,eventHandle) === false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false);}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid = handler.guid;}} // Add to the element's handler list, delegates in front
-	if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else {handlers.push(handleObj);} // Keep track of which events have ever been used, for event optimization
-	jQuery.event.global[type] = true;}}, // Detach an event or set of events from an element
-	remove:function remove(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.hasData(elem) && data_priv.get(elem);if(!elemData || !(events = elemData.events)){return;} // Once for each type.namespace in types; type may be omitted
-	types = (types || "").match(rnotwhite) || [""];t = types.length;while(t--) {tmp = rtypenamespace.exec(types[t]) || [];type = origType = tmp[1];namespaces = (tmp[2] || "").split(".").sort(); // Unbind all events (on this namespace, if provided) for the element
-	if(!type){for(type in events) {jQuery.event.remove(elem,type + types[t],handler,selector,true);}continue;}special = jQuery.event.special[type] || {};type = (selector?special.delegateType:special.bindType) || type;handlers = events[type] || [];tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); // Remove matching events
-	origCount = j = handlers.length;while(j--) {handleObj = handlers[j];if((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--;}if(special.remove){special.remove.call(elem,handleObj);}}} // Remove generic event handler if we removed something and no more handlers exist
-	// (avoids potential for endless recursion during removal of special event handlers)
-	if(origCount && !handlers.length){if(!special.teardown || special.teardown.call(elem,namespaces,elemData.handle) === false){jQuery.removeEvent(elem,type,elemData.handle);}delete events[type];}} // Remove the expando if it's no longer used
-	if(jQuery.isEmptyObject(events)){delete elemData.handle;data_priv.remove(elem,"events");}},trigger:function trigger(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem || document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur = tmp = elem = elem || document; // Don't do events on text and comment nodes
-	if(elem.nodeType === 3 || elem.nodeType === 8){return;} // focus/blur morphs to focusin/out; ensure we're not firing them right now
-	if(rfocusMorph.test(type + jQuery.event.triggered)){return;}if(type.indexOf(".") >= 0){ // Namespaced trigger; create a regexp to match event type in handle()
-	namespaces = type.split(".");type = namespaces.shift();namespaces.sort();}ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string
-	event = event[jQuery.expando]?event:new jQuery.Event(type,typeof event === "object" && event); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
-	event.isTrigger = onlyHandlers?2:3;event.namespace = namespaces.join(".");event.namespace_re = event.namespace?new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"):null; // Clean up the event in case it is being reused
-	event.result = undefined;if(!event.target){event.target = elem;} // Clone any incoming data and prepend the event, creating the handler arg list
-	data = data == null?[event]:jQuery.makeArray(data,[event]); // Allow special events to draw outside the lines
-	special = jQuery.event.special[type] || {};if(!onlyHandlers && special.trigger && special.trigger.apply(elem,data) === false){return;} // Determine event propagation path in advance, per W3C events spec (#9951)
-	// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
-	if(!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)){bubbleType = special.delegateType || type;if(!rfocusMorph.test(bubbleType + type)){cur = cur.parentNode;}for(;cur;cur = cur.parentNode) {eventPath.push(cur);tmp = cur;} // Only add window if we got to document (e.g., not plain obj or detached DOM)
-	if(tmp === (elem.ownerDocument || document)){eventPath.push(tmp.defaultView || tmp.parentWindow || window);}} // Fire handlers on the event path
-	i = 0;while((cur = eventPath[i++]) && !event.isPropagationStopped()) {event.type = i > 1?bubbleType:special.bindType || type; // jQuery handler
-	handle = (data_priv.get(cur,"events") || {})[event.type] && data_priv.get(cur,"handle");if(handle){handle.apply(cur,data);} // Native handler
-	handle = ontype && cur[ontype];if(handle && handle.apply && jQuery.acceptData(cur)){event.result = handle.apply(cur,data);if(event.result === false){event.preventDefault();}}}event.type = type; // If nobody prevented the default action, do it now
-	if(!onlyHandlers && !event.isDefaultPrevented()){if((!special._default || special._default.apply(eventPath.pop(),data) === false) && jQuery.acceptData(elem)){ // Call a native DOM method on the target with the same name name as the event.
-	// Don't do default actions on window, that's where global variables be (#6170)
-	if(ontype && jQuery.isFunction(elem[type]) && !jQuery.isWindow(elem)){ // Don't re-trigger an onFOO event when we call its FOO() method
-	tmp = elem[ontype];if(tmp){elem[ontype] = null;} // Prevent re-triggering of the same event, since we already bubbled it above
-	jQuery.event.triggered = type;elem[type]();jQuery.event.triggered = undefined;if(tmp){elem[ontype] = tmp;}}}}return event.result;},dispatch:function dispatch(event){ // Make a writable jQuery.Event from the native event object
-	event = jQuery.event.fix(event);var i,j,ret,matched,handleObj,handlerQueue=[],args=_slice.call(arguments),handlers=(data_priv.get(this,"events") || {})[event.type] || [],special=jQuery.event.special[event.type] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event
-	args[0] = event;event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired
-	if(special.preDispatch && special.preDispatch.call(this,event) === false){return;} // Determine handlers
-	handlerQueue = jQuery.event.handlers.call(this,event,handlers); // Run delegates first; they may want to stop propagation beneath us
-	i = 0;while((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {event.currentTarget = matched.elem;j = 0;while((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) { // Triggered event must either 1) have no namespace, or 2) have namespace(s)
-	// a subset or equal to those in the bound event (both can have no namespace).
-	if(!event.namespace_re || event.namespace_re.test(handleObj.namespace)){event.handleObj = handleObj;event.data = handleObj.data;ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem,args);if(ret !== undefined){if((event.result = ret) === false){event.preventDefault();event.stopPropagation();}}}}} // Call the postDispatch hook for the mapped type
-	if(special.postDispatch){special.postDispatch.call(this,event);}return event.result;},handlers:function handlers(event,_handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=_handlers.delegateCount,cur=event.target; // Find delegate handlers
-	// Black-hole SVG  instance trees (#13180)
-	// Avoid non-left-click bubbling in Firefox (#3861)
-	if(delegateCount && cur.nodeType && (!event.button || event.type !== "click")){for(;cur !== this;cur = cur.parentNode || this) { // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
-	if(cur.disabled !== true || event.type !== "click"){matches = [];for(i = 0;i < delegateCount;i++) {handleObj = _handlers[i]; // Don't conflict with Object.prototype properties (#13203)
-	sel = handleObj.selector + " ";if(matches[sel] === undefined){matches[sel] = handleObj.needsContext?jQuery(sel,this).index(cur) >= 0:jQuery.find(sel,this,null,[cur]).length;}if(matches[sel]){matches.push(handleObj);}}if(matches.length){handlerQueue.push({elem:cur,handlers:matches});}}}} // Add the remaining (directly-bound) handlers
-	if(delegateCount < _handlers.length){handlerQueue.push({elem:this,handlers:_handlers.slice(delegateCount)});}return handlerQueue;}, // Includes some event props shared by KeyEvent and MouseEvent
-	props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function filter(event,original){ // Add which for key events
-	if(event.which == null){event.which = original.charCode != null?original.charCode:original.keyCode;}return event;}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function filter(event,original){var eventDoc,doc,body,button=original.button; // Calculate pageX/Y if missing and clientX/Y available
-	if(event.pageX == null && original.clientX != null){eventDoc = event.target.ownerDocument || document;doc = eventDoc.documentElement;body = eventDoc.body;event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);} // Add which for click: 1 === left; 2 === middle; 3 === right
-	// Note: button is not normalized, so don't use it
-	if(!event.which && button !== undefined){event.which = button & 1?1:button & 2?3:button & 4?2:0;}return event;}},fix:function fix(event){if(event[jQuery.expando]){return event;} // Create a writable copy of the event object and normalize some properties
-	var i,prop,copy,type=event.type,originalEvent=event,fixHook=this.fixHooks[type];if(!fixHook){this.fixHooks[type] = fixHook = rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{};}copy = fixHook.props?this.props.concat(fixHook.props):this.props;event = new jQuery.Event(originalEvent);i = copy.length;while(i--) {prop = copy[i];event[prop] = originalEvent[prop];} // Support: Cordova 2.5 (WebKit) (#13255)
-	// All events should have a target; Cordova deviceready doesn't
-	if(!event.target){event.target = document;} // Support: Safari 6.0+, Chrome<28
-	// Target should not be a text node (#504, #13143)
-	if(event.target.nodeType === 3){event.target = event.target.parentNode;}return fixHook.filter?fixHook.filter(event,originalEvent):event;},special:{load:{ // Prevent triggered image.load events from bubbling to window.load
-	noBubble:true},focus:{ // Fire native event if possible so blur/focus sequence is correct
-	trigger:function trigger(){if(this !== safeActiveElement() && this.focus){this.focus();return false;}},delegateType:"focusin"},blur:{trigger:function trigger(){if(this === safeActiveElement() && this.blur){this.blur();return false;}},delegateType:"focusout"},click:{ // For checkbox, fire native event so checked state will be right
-	trigger:function trigger(){if(this.type === "checkbox" && this.click && jQuery.nodeName(this,"input")){this.click();return false;}}, // For cross-browser consistency, don't fire native .click() on links
-	_default:function _default(event){return jQuery.nodeName(event.target,"a");}},beforeunload:{postDispatch:function postDispatch(event){ // Support: Firefox 20+
-	// Firefox doesn't alert if the returnValue field is not set.
-	if(event.result !== undefined && event.originalEvent){event.originalEvent.returnValue = event.result;}}}},simulate:function simulate(type,elem,event,bubble){ // Piggyback on a donor event to simulate a different one.
-	// Fake originalEvent to avoid donor's stopPropagation, but if the
-	// simulated event prevents default then we do the same on the donor.
-	var e=jQuery.extend(new jQuery.Event(),event,{type:type,isSimulated:true,originalEvent:{}});if(bubble){jQuery.event.trigger(e,null,elem);}else {jQuery.event.dispatch.call(elem,e);}if(e.isDefaultPrevented()){event.preventDefault();}}};jQuery.removeEvent = function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle,false);}};jQuery.Event = function(src,props){ // Allow instantiation without the 'new' keyword
-	if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props);} // Event object
-	if(src && src.type){this.originalEvent = src;this.type = src.type; // Events bubbling up the document may have been marked as prevented
-	// by a handler lower down the tree; reflect the correct value.
-	this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined &&  // Support: Android<4.0
-	src.returnValue === false?returnTrue:returnFalse; // Event type
-	}else {this.type = src;} // Put explicitly provided properties onto the event object
-	if(props){jQuery.extend(this,props);} // Create a timestamp if incoming event doesn't have one
-	this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed
-	this[jQuery.expando] = true;}; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-	// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-	jQuery.Event.prototype = {isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function preventDefault(){var e=this.originalEvent;this.isDefaultPrevented = returnTrue;if(e && e.preventDefault){e.preventDefault();}},stopPropagation:function stopPropagation(){var e=this.originalEvent;this.isPropagationStopped = returnTrue;if(e && e.stopPropagation){e.stopPropagation();}},stopImmediatePropagation:function stopImmediatePropagation(){var e=this.originalEvent;this.isImmediatePropagationStopped = returnTrue;if(e && e.stopImmediatePropagation){e.stopImmediatePropagation();}this.stopPropagation();}}; // Create mouseenter/leave events using mouseover/out and event-time checks
-	// Support: Chrome 15+
-	jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig] = {delegateType:fix,bindType:fix,handle:function handle(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj; // For mousenter/leave call the handler if related is outside the target.
-	// NB: No relatedTarget if the mouse left/entered the browser window
-	if(!related || related !== target && !jQuery.contains(target,related)){event.type = handleObj.origType;ret = handleObj.handler.apply(this,arguments);event.type = fix;}return ret;}};}); // Support: Firefox, Chrome, Safari
-	// Create "bubbling" focus and blur events
-	if(!support.focusinBubbles){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){ // Attach a single capturing handler on the document while someone wants focusin/focusout
-	var handler=function handler(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),true);};jQuery.event.special[fix] = {setup:function setup(){var doc=this.ownerDocument || this,attaches=data_priv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true);}data_priv.access(doc,fix,(attaches || 0) + 1);},teardown:function teardown(){var doc=this.ownerDocument || this,attaches=data_priv.access(doc,fix) - 1;if(!attaches){doc.removeEventListener(orig,handler,true);data_priv.remove(doc,fix);}else {data_priv.access(doc,fix,attaches);}}};});}jQuery.fn.extend({on:function on(types,selector,data,fn, /*INTERNAL*/one){var origFn,type; // Types can be a map of types/handlers
-	if(typeof types === "object"){ // ( types-Object, selector, data )
-	if(typeof selector !== "string"){ // ( types-Object, data )
-	data = data || selector;selector = undefined;}for(type in types) {this.on(type,selector,data,types[type],one);}return this;}if(data == null && fn == null){ // ( types, fn )
-	fn = selector;data = selector = undefined;}else if(fn == null){if(typeof selector === "string"){ // ( types, selector, fn )
-	fn = data;data = undefined;}else { // ( types, data, fn )
-	fn = data;data = selector;selector = undefined;}}if(fn === false){fn = returnFalse;}else if(!fn){return this;}if(one === 1){origFn = fn;fn = function(event){ // Can use an empty set, since event contains the info
-	jQuery().off(event);return origFn.apply(this,arguments);}; // Use same guid so caller can remove using origFn
-	fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);}return this.each(function(){jQuery.event.add(this,types,fn,data,selector);});},one:function one(types,selector,data,fn){return this.on(types,selector,data,fn,1);},off:function off(types,selector,fn){var handleObj,type;if(types && types.preventDefault && types.handleObj){ // ( event )  dispatched jQuery.Event
-	handleObj = types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType + "." + handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this;}if(typeof types === "object"){ // ( types-object [, selector] )
-	for(type in types) {this.off(type,selector,types[type]);}return this;}if(selector === false || typeof selector === "function"){ // ( types [, fn] )
-	fn = selector;selector = undefined;}if(fn === false){fn = returnFalse;}return this.each(function(){jQuery.event.remove(this,types,fn,selector);});},trigger:function trigger(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function triggerHandler(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true);}}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i, // checked="checked" or checked
-	rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*\s*$/g, // We have to close these tags to support XHTML (#13200)
-	wrapMap={ // Support: IE9
-	option:[1,""],thead:[1,"
","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]}; // Support: IE9 - wrapMap.optgroup = wrapMap.option;wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;wrapMap.th = wrapMap.td; // Support: 1.x compatibility - // Manipulating tables requires a tbody - function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table") && jQuery.nodeName(content.nodeType !== 11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody")):elem;} // Replace/restore the type attribute of script elements for safe DOM manipulation - function disableScript(elem){elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;return elem;}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type = match[1];}else {elem.removeAttribute("type");}return elem;} // Mark scripts as having already been evaluated - function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i < l;i++) {data_priv.set(elems[i],"globalEval",!refElements || data_priv.get(refElements[i],"globalEval"));}}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType !== 1){return;} // 1. Copy private data: events, handlers, etc. - if(data_priv.hasData(src)){pdataOld = data_priv.access(src);pdataCur = data_priv.set(dest,pdataOld);events = pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events = {};for(type in events) {for(i = 0,l = events[type].length;i < l;i++) {jQuery.event.add(dest,type,events[type][i]);}}}} // 2. Copy user data - if(data_user.hasData(src)){udataOld = data_user.access(src);udataCur = jQuery.extend({},udataOld);data_user.set(dest,udataCur);}}function getAll(context,tag){var ret=context.getElementsByTagName?context.getElementsByTagName(tag || "*"):context.querySelectorAll?context.querySelectorAll(tag || "*"):[];return tag === undefined || tag && jQuery.nodeName(context,tag)?jQuery.merge([context],ret):ret;} // Fix IE bugs, see support tests - function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. - if(nodeName === "input" && rcheckableType.test(src.type)){dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options - }else if(nodeName === "input" || nodeName === "textarea"){dest.defaultValue = src.defaultValue;}}jQuery.extend({clone:function clone(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem); // Fix IE cloning issues - if(!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)){ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll(clone);srcElements = getAll(elem);for(i = 0,l = srcElements.length;i < l;i++) {fixInput(srcElements[i],destElements[i]);}} // Copy the events from the original to the clone - if(dataAndEvents){if(deepDataAndEvents){srcElements = srcElements || getAll(elem);destElements = destElements || getAll(clone);for(i = 0,l = srcElements.length;i < l;i++) {cloneCopyEvent(srcElements[i],destElements[i]);}}else {cloneCopyEvent(elem,clone);}} // Preserve script evaluation history - destElements = getAll(clone,"script");if(destElements.length > 0){setGlobalEval(destElements,!inPage && getAll(elem,"script"));} // Return the cloned set - return clone;},buildFragment:function buildFragment(elems,context,scripts,selection){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i < l;i++) {elem = elems[i];if(elem || elem === 0){ // Add nodes directly - if(jQuery.type(elem) === "object"){ // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge(nodes,elem.nodeType?[elem]:elem); // Convert non-html into a text node - }else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem)); // Convert html into DOM nodes - }else {tmp = tmp || fragment.appendChild(context.createElement("div")); // Deserialize a standard representation - tag = (rtagName.exec(elem) || ["",""])[1].toLowerCase();wrap = wrapMap[tag] || wrapMap._default;tmp.innerHTML = wrap[1] + elem.replace(rxhtmlTag,"<$1>") + wrap[2]; // Descend through wrappers to the right content - j = wrap[0];while(j--) {tmp = tmp.lastChild;} // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge(nodes,tmp.childNodes); // Remember the top-level container - tmp = fragment.firstChild; // Ensure the created nodes are orphaned (#12392) - tmp.textContent = "";}}} // Remove wrapper from fragment - fragment.textContent = "";i = 0;while(elem = nodes[i++]) { // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if(selection && jQuery.inArray(elem,selection) !== -1){continue;}contains = jQuery.contains(elem.ownerDocument,elem); // Append to fragment - tmp = getAll(fragment.appendChild(elem),"script"); // Preserve script evaluation history - if(contains){setGlobalEval(tmp);} // Capture executables - if(scripts){j = 0;while(elem = tmp[j++]) {if(rscriptType.test(elem.type || "")){scripts.push(elem);}}}}return fragment;},cleanData:function cleanData(elems){var data,elem,type,key,special=jQuery.event.special,i=0;for(;(elem = elems[i]) !== undefined;i++) {if(jQuery.acceptData(elem)){key = elem[data_priv.expando];if(key && (data = data_priv.cache[key])){if(data.events){for(type in data.events) {if(special[type]){jQuery.event.remove(elem,type); // This is a shortcut to avoid jQuery.event.remove's overhead - }else {jQuery.removeEvent(elem,type,data.handle);}}}if(data_priv.cache[key]){ // Discard any remaining `private` data - delete data_priv.cache[key];}}} // Discard any remaining `user` data - delete data_user.cache[elem[data_user.expando]];}}});jQuery.fn.extend({text:function text(value){return access(this,function(value){return value === undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9){this.textContent = value;}});},null,value,arguments.length);},append:function append(){return this.domManip(arguments,function(elem){if(this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9){var target=manipulationTarget(this,elem);target.appendChild(elem);}});},prepend:function prepend(){return this.domManip(arguments,function(elem){if(this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild);}});},before:function before(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this);}});},after:function after(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling);}});},remove:function remove(selector,keepData /* Internal Use Only */){var elem,elems=selector?jQuery.filter(selector,this):this,i=0;for(;(elem = elems[i]) != null;i++) {if(!keepData && elem.nodeType === 1){jQuery.cleanData(getAll(elem));}if(elem.parentNode){if(keepData && jQuery.contains(elem.ownerDocument,elem)){setGlobalEval(getAll(elem,"script"));}elem.parentNode.removeChild(elem);}}return this;},empty:function empty(){var elem,i=0;for(;(elem = this[i]) != null;i++) {if(elem.nodeType === 1){ // Prevent memory leaks - jQuery.cleanData(getAll(elem,false)); // Remove any remaining nodes - elem.textContent = "";}}return this;},clone:function clone(dataAndEvents,deepDataAndEvents){dataAndEvents = dataAndEvents == null?false:dataAndEvents;deepDataAndEvents = deepDataAndEvents == null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function html(value){return access(this,function(value){var elem=this[0] || {},i=0,l=this.length;if(value === undefined && elem.nodeType === 1){return elem.innerHTML;} // See if we can take a shortcut and just use innerHTML - if(typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[(rtagName.exec(value) || ["",""])[1].toLowerCase()]){value = value.replace(rxhtmlTag,"<$1>");try{for(;i < l;i++) {elem = this[i] || {}; // Remove element nodes and prevent memory leaks - if(elem.nodeType === 1){jQuery.cleanData(getAll(elem,false));elem.innerHTML = value;}}elem = 0; // If using innerHTML throws an exception, use the fallback method - }catch(e) {}}if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function replaceWith(){var arg=arguments[0]; // Make the changes, replacing each context element with the new content - this.domManip(arguments,function(elem){arg = this.parentNode;jQuery.cleanData(getAll(this));if(arg){arg.replaceChild(elem,this);}}); // Force removal if there was no new content (e.g., from empty arguments) - return arg && (arg.length || arg.nodeType)?this:this.remove();},detach:function detach(selector){return this.remove(selector,true);},domManip:function domManip(args,callback){ // Flatten any nested arrays - args = concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=this.length,set=this,iNoClone=l - 1,value=args[0],isFunction=jQuery.isFunction(value); // We can't cloneNode fragments that contain checked, in WebKit - if(isFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)){return this.each(function(index){var self=set.eq(index);if(isFunction){args[0] = value.call(this,index,self.html());}self.domManip(args,callback);});}if(l){fragment = jQuery.buildFragment(args,this[0].ownerDocument,false,this);first = fragment.firstChild;if(fragment.childNodes.length === 1){fragment = first;}if(first){scripts = jQuery.map(getAll(fragment,"script"),disableScript);hasScripts = scripts.length; // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for(;i < l;i++) {node = fragment;if(i !== iNoClone){node = jQuery.clone(node,true,true); // Keep references to cloned scripts for later restoration - if(hasScripts){ // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge(scripts,getAll(node,"script"));}}callback.call(this[i],node,i);}if(hasScripts){doc = scripts[scripts.length - 1].ownerDocument; // Reenable scripts - jQuery.map(scripts,restoreScript); // Evaluate executable scripts on first document insertion - for(i = 0;i < hasScripts;i++) {node = scripts[i];if(rscriptType.test(node.type || "") && !data_priv.access(node,"globalEval") && jQuery.contains(doc,node)){if(node.src){ // Optional AJAX dependency, but won't run scripts if not present - if(jQuery._evalUrl){jQuery._evalUrl(node.src);}}else {jQuery.globalEval(node.textContent.replace(rcleanScript,""));}}}}}}return this;}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name] = function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length - 1,i=0;for(;i <= last;i++) {elems = i === last?this:this.clone(true);jQuery(insert[i])[original](elems); // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply(ret,elems.get());}return this.pushStack(ret);};});var iframe,elemdisplay={}; /** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ // Called only from within defaultDisplay - function actualDisplay(name,doc){var style,elem=jQuery(doc.createElement(name)).appendTo(doc.body), // getDefaultComputedStyle might be reliably used only on attached element - display=window.getDefaultComputedStyle && (style = window.getDefaultComputedStyle(elem[0]))? // Use of this method is a temporary fix (more like optimization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display:jQuery.css(elem[0],"display"); // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach();return display;} /** - * Try to determine the default display value of an element - * @param {String} nodeName - */function defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];if(!display){display = actualDisplay(nodeName,doc); // If the simple way fails, read from inside an iframe - if(display === "none" || !display){ // Use the already-created iframe if possible - iframe = (iframe || jQuery("