\n );\n }\n});\n\nmodule.exports = TextInput;\n\n\n/** WEBPACK FOOTER **\n ** ./js/components/form/TextInput.jsx\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule DOMPropertyOperations\n * @typechecks static-only\n */\n\n\"use strict\";\n\nvar DOMProperty = require(\"./DOMProperty\");\n\nvar escapeTextForBrowser = require(\"./escapeTextForBrowser\");\nvar memoizeStringOnly = require(\"./memoizeStringOnly\");\nvar warning = require(\"./warning\");\n\nfunction shouldIgnoreValue(name, value) {\n return value == null ||\n (DOMProperty.hasBooleanValue[name] && !value) ||\n (DOMProperty.hasNumericValue[name] && isNaN(value)) ||\n (DOMProperty.hasPositiveNumericValue[name] && (value < 1)) ||\n (DOMProperty.hasOverloadedBooleanValue[name] && value === false);\n}\n\nvar processAttributeNameAndPrefix = memoizeStringOnly(function(name) {\n return escapeTextForBrowser(name) + '=\"';\n});\n\nif (\"production\" !== process.env.NODE_ENV) {\n var reactProps = {\n children: true,\n dangerouslySetInnerHTML: true,\n key: true,\n ref: true\n };\n var warnedProperties = {};\n\n var warnUnknownProperty = function(name) {\n if (reactProps.hasOwnProperty(name) && reactProps[name] ||\n warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {\n return;\n }\n\n warnedProperties[name] = true;\n var lowerCasedName = name.toLowerCase();\n\n // data-* attributes should be lowercase; suggest the lowercase version\n var standardName = (\n DOMProperty.isCustomAttribute(lowerCasedName) ?\n lowerCasedName :\n DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ?\n DOMProperty.getPossibleStandardName[lowerCasedName] :\n null\n );\n\n // For now, only warn when we have a suggested correction. This prevents\n // logging too much when using transferPropsTo.\n (\"production\" !== process.env.NODE_ENV ? warning(\n standardName == null,\n 'Unknown DOM property ' + name + '. Did you mean ' + standardName + '?'\n ) : null);\n\n };\n}\n\n/**\n * Operations for dealing with DOM properties.\n */\nvar DOMPropertyOperations = {\n\n /**\n * Creates markup for the ID property.\n *\n * @param {string} id Unescaped ID.\n * @return {string} Markup string.\n */\n createMarkupForID: function(id) {\n return processAttributeNameAndPrefix(DOMProperty.ID_ATTRIBUTE_NAME) +\n escapeTextForBrowser(id) + '\"';\n },\n\n /**\n * Creates markup for a property.\n *\n * @param {string} name\n * @param {*} value\n * @return {?string} Markup string, or null if the property was invalid.\n */\n createMarkupForProperty: function(name, value) {\n if (DOMProperty.isStandardName.hasOwnProperty(name) &&\n DOMProperty.isStandardName[name]) {\n if (shouldIgnoreValue(name, value)) {\n return '';\n }\n var attributeName = DOMProperty.getAttributeName[name];\n if (DOMProperty.hasBooleanValue[name] ||\n (DOMProperty.hasOverloadedBooleanValue[name] && value === true)) {\n return escapeTextForBrowser(attributeName);\n }\n return processAttributeNameAndPrefix(attributeName) +\n escapeTextForBrowser(value) + '\"';\n } else if (DOMProperty.isCustomAttribute(name)) {\n if (value == null) {\n return '';\n }\n return processAttributeNameAndPrefix(name) +\n escapeTextForBrowser(value) + '\"';\n } else if (\"production\" !== process.env.NODE_ENV) {\n warnUnknownProperty(name);\n }\n return null;\n },\n\n /**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n setValueForProperty: function(node, name, value) {\n if (DOMProperty.isStandardName.hasOwnProperty(name) &&\n DOMProperty.isStandardName[name]) {\n var mutationMethod = DOMProperty.getMutationMethod[name];\n if (mutationMethod) {\n mutationMethod(node, value);\n } else if (shouldIgnoreValue(name, value)) {\n this.deleteValueForProperty(node, name);\n } else if (DOMProperty.mustUseAttribute[name]) {\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n node.setAttribute(DOMProperty.getAttributeName[name], '' + value);\n } else {\n var propName = DOMProperty.getPropertyName[name];\n // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the\n // property type before comparing; only `value` does and is string.\n if (!DOMProperty.hasSideEffects[name] ||\n ('' + node[propName]) !== ('' + value)) {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propName] = value;\n }\n }\n } else if (DOMProperty.isCustomAttribute(name)) {\n if (value == null) {\n node.removeAttribute(name);\n } else {\n node.setAttribute(name, '' + value);\n }\n } else if (\"production\" !== process.env.NODE_ENV) {\n warnUnknownProperty(name);\n }\n },\n\n /**\n * Deletes the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n */\n deleteValueForProperty: function(node, name) {\n if (DOMProperty.isStandardName.hasOwnProperty(name) &&\n DOMProperty.isStandardName[name]) {\n var mutationMethod = DOMProperty.getMutationMethod[name];\n if (mutationMethod) {\n mutationMethod(node, undefined);\n } else if (DOMProperty.mustUseAttribute[name]) {\n node.removeAttribute(DOMProperty.getAttributeName[name]);\n } else {\n var propName = DOMProperty.getPropertyName[name];\n var defaultValue = DOMProperty.getDefaultValueForProperty(\n node.nodeName,\n propName\n );\n if (!DOMProperty.hasSideEffects[name] ||\n ('' + node[propName]) !== defaultValue) {\n node[propName] = defaultValue;\n }\n }\n } else if (DOMProperty.isCustomAttribute(name)) {\n node.removeAttribute(name);\n } else if (\"production\" !== process.env.NODE_ENV) {\n warnUnknownProperty(name);\n }\n }\n\n};\n\nmodule.exports = DOMPropertyOperations;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/DOMPropertyOperations.js\n ** module id = 18\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule EventPluginUtils\n */\n\n\"use strict\";\n\nvar EventConstants = require(\"./EventConstants\");\n\nvar invariant = require(\"./invariant\");\n\n/**\n * Injected dependencies:\n */\n\n/**\n * - `Mount`: [required] Module that can convert between React dom IDs and\n * actual node references.\n */\nvar injection = {\n Mount: null,\n injectMount: function(InjectedMount) {\n injection.Mount = InjectedMount;\n if (\"production\" !== process.env.NODE_ENV) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n InjectedMount && InjectedMount.getNode,\n 'EventPluginUtils.injection.injectMount(...): Injected Mount module ' +\n 'is missing getNode.'\n ) : invariant(InjectedMount && InjectedMount.getNode));\n }\n }\n};\n\nvar topLevelTypes = EventConstants.topLevelTypes;\n\nfunction isEndish(topLevelType) {\n return topLevelType === topLevelTypes.topMouseUp ||\n topLevelType === topLevelTypes.topTouchEnd ||\n topLevelType === topLevelTypes.topTouchCancel;\n}\n\nfunction isMoveish(topLevelType) {\n return topLevelType === topLevelTypes.topMouseMove ||\n topLevelType === topLevelTypes.topTouchMove;\n}\nfunction isStartish(topLevelType) {\n return topLevelType === topLevelTypes.topMouseDown ||\n topLevelType === topLevelTypes.topTouchStart;\n}\n\n\nvar validateEventDispatches;\nif (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches = function(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n\n var listenersIsArr = Array.isArray(dispatchListeners);\n var idsIsArr = Array.isArray(dispatchIDs);\n var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0;\n var listenersLen = listenersIsArr ?\n dispatchListeners.length :\n dispatchListeners ? 1 : 0;\n\n (\"production\" !== process.env.NODE_ENV ? invariant(\n idsIsArr === listenersIsArr && IDsLen === listenersLen,\n 'EventPluginUtils: Invalid `event`.'\n ) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen));\n };\n}\n\n/**\n * Invokes `cb(event, listener, id)`. Avoids using call if no scope is\n * provided. The `(listener,id)` pair effectively forms the \"dispatch\" but are\n * kept separate to conserve memory.\n */\nfunction forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}\n\n/**\n * Default implementation of PluginModule.executeDispatch().\n * @param {SyntheticEvent} SyntheticEvent to handle\n * @param {function} Application-level callback\n * @param {string} domID DOM id to pass to the callback.\n */\nfunction executeDispatch(event, listener, domID) {\n event.currentTarget = injection.Mount.getNode(domID);\n var returnValue = listener(event, domID);\n event.currentTarget = null;\n return returnValue;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches.\n */\nfunction executeDispatchesInOrder(event, executeDispatch) {\n forEachEventDispatch(event, executeDispatch);\n event._dispatchListeners = null;\n event._dispatchIDs = null;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches, but stops\n * at the first dispatch execution returning true, and returns that id.\n *\n * @return id of the first dispatch execution who's listener returns true, or\n * null if no listener returned true.\n */\nfunction executeDispatchesInOrderStopAtTrueImpl(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n if (dispatchListeners[i](event, dispatchIDs[i])) {\n return dispatchIDs[i];\n }\n }\n } else if (dispatchListeners) {\n if (dispatchListeners(event, dispatchIDs)) {\n return dispatchIDs;\n }\n }\n return null;\n}\n\n/**\n * @see executeDispatchesInOrderStopAtTrueImpl\n */\nfunction executeDispatchesInOrderStopAtTrue(event) {\n var ret = executeDispatchesInOrderStopAtTrueImpl(event);\n event._dispatchIDs = null;\n event._dispatchListeners = null;\n return ret;\n}\n\n/**\n * Execution of a \"direct\" dispatch - there must be at most one dispatch\n * accumulated on the event or it is considered an error. It doesn't really make\n * sense for an event with multiple dispatches (bubbled) to keep track of the\n * return values at each dispatch execution, but it does tend to make sense when\n * dealing with \"direct\" dispatches.\n *\n * @return The return value of executing the single dispatch.\n */\nfunction executeDirectDispatch(event) {\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n var dispatchListener = event._dispatchListeners;\n var dispatchID = event._dispatchIDs;\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !Array.isArray(dispatchListener),\n 'executeDirectDispatch(...): Invalid `event`.'\n ) : invariant(!Array.isArray(dispatchListener)));\n var res = dispatchListener ?\n dispatchListener(event, dispatchID) :\n null;\n event._dispatchListeners = null;\n event._dispatchIDs = null;\n return res;\n}\n\n/**\n * @param {SyntheticEvent} event\n * @return {bool} True iff number of dispatches accumulated is greater than 0.\n */\nfunction hasDispatches(event) {\n return !!event._dispatchListeners;\n}\n\n/**\n * General utilities that are useful in creating custom Event Plugins.\n */\nvar EventPluginUtils = {\n isEndish: isEndish,\n isMoveish: isMoveish,\n isStartish: isStartish,\n\n executeDirectDispatch: executeDirectDispatch,\n executeDispatch: executeDispatch,\n executeDispatchesInOrder: executeDispatchesInOrder,\n executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,\n hasDispatches: hasDispatches,\n injection: injection,\n useTouchEvents: false\n};\n\nmodule.exports = EventPluginUtils;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/EventPluginUtils.js\n ** module id = 19\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactChildren\n */\n\n\"use strict\";\n\nvar PooledClass = require(\"./PooledClass\");\n\nvar traverseAllChildren = require(\"./traverseAllChildren\");\nvar warning = require(\"./warning\");\n\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\nvar threeArgumentPooler = PooledClass.threeArgumentPooler;\n\n/**\n * PooledClass representing the bookkeeping associated with performing a child\n * traversal. Allows avoiding binding callbacks.\n *\n * @constructor ForEachBookKeeping\n * @param {!function} forEachFunction Function to perform traversal with.\n * @param {?*} forEachContext Context to perform context with.\n */\nfunction ForEachBookKeeping(forEachFunction, forEachContext) {\n this.forEachFunction = forEachFunction;\n this.forEachContext = forEachContext;\n}\nPooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);\n\nfunction forEachSingleChild(traverseContext, child, name, i) {\n var forEachBookKeeping = traverseContext;\n forEachBookKeeping.forEachFunction.call(\n forEachBookKeeping.forEachContext, child, i);\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc.\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n if (children == null) {\n return children;\n }\n\n var traverseContext =\n ForEachBookKeeping.getPooled(forEachFunc, forEachContext);\n traverseAllChildren(children, forEachSingleChild, traverseContext);\n ForEachBookKeeping.release(traverseContext);\n}\n\n/**\n * PooledClass representing the bookkeeping associated with performing a child\n * mapping. Allows avoiding binding callbacks.\n *\n * @constructor MapBookKeeping\n * @param {!*} mapResult Object containing the ordered map of results.\n * @param {!function} mapFunction Function to perform mapping with.\n * @param {?*} mapContext Context to perform mapping with.\n */\nfunction MapBookKeeping(mapResult, mapFunction, mapContext) {\n this.mapResult = mapResult;\n this.mapFunction = mapFunction;\n this.mapContext = mapContext;\n}\nPooledClass.addPoolingTo(MapBookKeeping, threeArgumentPooler);\n\nfunction mapSingleChildIntoContext(traverseContext, child, name, i) {\n var mapBookKeeping = traverseContext;\n var mapResult = mapBookKeeping.mapResult;\n\n var keyUnique = !mapResult.hasOwnProperty(name);\n (\"production\" !== process.env.NODE_ENV ? warning(\n keyUnique,\n 'ReactChildren.map(...): Encountered two children with the same key, ' +\n '`%s`. Child keys must be unique; when two children share a key, only ' +\n 'the first child will be used.',\n name\n ) : null);\n\n if (keyUnique) {\n var mappedChild =\n mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i);\n mapResult[name] = mappedChild;\n }\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * The provided mapFunction(child, key, index) will be called for each\n * leaf child.\n *\n * TODO: This may likely break any calls to `ReactChildren.map` that were\n * previously relying on the fact that we guarded against null children.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} mapFunction.\n * @param {*} mapContext Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var mapResult = {};\n var traverseContext = MapBookKeeping.getPooled(mapResult, func, context);\n traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);\n MapBookKeeping.release(traverseContext);\n return mapResult;\n}\n\nfunction forEachSingleChildDummy(traverseContext, child, name, i) {\n return null;\n}\n\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\nfunction countChildren(children, context) {\n return traverseAllChildren(children, forEachSingleChildDummy, null);\n}\n\nvar ReactChildren = {\n forEach: forEachChildren,\n map: mapChildren,\n count: countChildren\n};\n\nmodule.exports = ReactChildren;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactChildren.js\n ** module id = 20\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactComponent\n */\n\n\"use strict\";\n\nvar ReactElement = require(\"./ReactElement\");\nvar ReactOwner = require(\"./ReactOwner\");\nvar ReactUpdates = require(\"./ReactUpdates\");\n\nvar assign = require(\"./Object.assign\");\nvar invariant = require(\"./invariant\");\nvar keyMirror = require(\"./keyMirror\");\n\n/**\n * Every React component is in one of these life cycles.\n */\nvar ComponentLifeCycle = keyMirror({\n /**\n * Mounted components have a DOM node representation and are capable of\n * receiving new props.\n */\n MOUNTED: null,\n /**\n * Unmounted components are inactive and cannot receive new props.\n */\n UNMOUNTED: null\n});\n\nvar injected = false;\n\n/**\n * Optionally injectable environment dependent cleanup hook. (server vs.\n * browser etc). Example: A browser system caches DOM nodes based on component\n * ID and must remove that cache entry when this instance is unmounted.\n *\n * @private\n */\nvar unmountIDFromEnvironment = null;\n\n/**\n * The \"image\" of a component tree, is the platform specific (typically\n * serialized) data that represents a tree of lower level UI building blocks.\n * On the web, this \"image\" is HTML markup which describes a construction of\n * low level `div` and `span` nodes. Other platforms may have different\n * encoding of this \"image\". This must be injected.\n *\n * @private\n */\nvar mountImageIntoNode = null;\n\n/**\n * Components are the basic units of composition in React.\n *\n * Every component accepts a set of keyed input parameters known as \"props\" that\n * are initialized by the constructor. Once a component is mounted, the props\n * can be mutated using `setProps` or `replaceProps`.\n *\n * Every component is capable of the following operations:\n *\n * `mountComponent`\n * Initializes the component, renders markup, and registers event listeners.\n *\n * `receiveComponent`\n * Updates the rendered DOM nodes to match the given component.\n *\n * `unmountComponent`\n * Releases any resources allocated by this component.\n *\n * Components can also be \"owned\" by other components. Being owned by another\n * component means being constructed by that component. This is different from\n * being the child of a component, which means having a DOM representation that\n * is a child of the DOM representation of that component.\n *\n * @class ReactComponent\n */\nvar ReactComponent = {\n\n injection: {\n injectEnvironment: function(ReactComponentEnvironment) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !injected,\n 'ReactComponent: injectEnvironment() can only be called once.'\n ) : invariant(!injected));\n mountImageIntoNode = ReactComponentEnvironment.mountImageIntoNode;\n unmountIDFromEnvironment =\n ReactComponentEnvironment.unmountIDFromEnvironment;\n ReactComponent.BackendIDOperations =\n ReactComponentEnvironment.BackendIDOperations;\n injected = true;\n }\n },\n\n /**\n * @internal\n */\n LifeCycle: ComponentLifeCycle,\n\n /**\n * Injected module that provides ability to mutate individual properties.\n * Injected into the base class because many different subclasses need access\n * to this.\n *\n * @internal\n */\n BackendIDOperations: null,\n\n /**\n * Base functionality for every ReactComponent constructor. Mixed into the\n * `ReactComponent` prototype, but exposed statically for easy access.\n *\n * @lends {ReactComponent.prototype}\n */\n Mixin: {\n\n /**\n * Checks whether or not this component is mounted.\n *\n * @return {boolean} True if mounted, false otherwise.\n * @final\n * @protected\n */\n isMounted: function() {\n return this._lifeCycleState === ComponentLifeCycle.MOUNTED;\n },\n\n /**\n * Sets a subset of the props.\n *\n * @param {object} partialProps Subset of the next props.\n * @param {?function} callback Called after props are updated.\n * @final\n * @public\n */\n setProps: function(partialProps, callback) {\n // Merge with the pending element if it exists, otherwise with existing\n // element props.\n var element = this._pendingElement || this._currentElement;\n this.replaceProps(\n assign({}, element.props, partialProps),\n callback\n );\n },\n\n /**\n * Replaces all of the props.\n *\n * @param {object} props New props.\n * @param {?function} callback Called after props are updated.\n * @final\n * @public\n */\n replaceProps: function(props, callback) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n this.isMounted(),\n 'replaceProps(...): Can only update a mounted component.'\n ) : invariant(this.isMounted()));\n (\"production\" !== process.env.NODE_ENV ? invariant(\n this._mountDepth === 0,\n 'replaceProps(...): You called `setProps` or `replaceProps` on a ' +\n 'component with a parent. This is an anti-pattern since props will ' +\n 'get reactively updated when rendered. Instead, change the owner\\'s ' +\n '`render` method to pass the correct value as props to the component ' +\n 'where it is created.'\n ) : invariant(this._mountDepth === 0));\n // This is a deoptimized path. We optimize for always having a element.\n // This creates an extra internal element.\n this._pendingElement = ReactElement.cloneAndReplaceProps(\n this._pendingElement || this._currentElement,\n props\n );\n ReactUpdates.enqueueUpdate(this, callback);\n },\n\n /**\n * Schedule a partial update to the props. Only used for internal testing.\n *\n * @param {object} partialProps Subset of the next props.\n * @param {?function} callback Called after props are updated.\n * @final\n * @internal\n */\n _setPropsInternal: function(partialProps, callback) {\n // This is a deoptimized path. We optimize for always having a element.\n // This creates an extra internal element.\n var element = this._pendingElement || this._currentElement;\n this._pendingElement = ReactElement.cloneAndReplaceProps(\n element,\n assign({}, element.props, partialProps)\n );\n ReactUpdates.enqueueUpdate(this, callback);\n },\n\n /**\n * Base constructor for all React components.\n *\n * Subclasses that override this method should make sure to invoke\n * `ReactComponent.Mixin.construct.call(this, ...)`.\n *\n * @param {ReactElement} element\n * @internal\n */\n construct: function(element) {\n // This is the public exposed props object after it has been processed\n // with default props. The element's props represents the true internal\n // state of the props.\n this.props = element.props;\n // Record the component responsible for creating this component.\n // This is accessible through the element but we maintain an extra\n // field for compatibility with devtools and as a way to make an\n // incremental update. TODO: Consider deprecating this field.\n this._owner = element._owner;\n\n // All components start unmounted.\n this._lifeCycleState = ComponentLifeCycle.UNMOUNTED;\n\n // See ReactUpdates.\n this._pendingCallbacks = null;\n\n // We keep the old element and a reference to the pending element\n // to track updates.\n this._currentElement = element;\n this._pendingElement = null;\n },\n\n /**\n * Initializes the component, renders markup, and registers event listeners.\n *\n * NOTE: This does not insert any nodes into the DOM.\n *\n * Subclasses that override this method should make sure to invoke\n * `ReactComponent.Mixin.mountComponent.call(this, ...)`.\n *\n * @param {string} rootID DOM ID of the root node.\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {number} mountDepth number of components in the owner hierarchy.\n * @return {?string} Rendered markup to be inserted into the DOM.\n * @internal\n */\n mountComponent: function(rootID, transaction, mountDepth) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !this.isMounted(),\n 'mountComponent(%s, ...): Can only mount an unmounted component. ' +\n 'Make sure to avoid storing components between renders or reusing a ' +\n 'single component instance in multiple places.',\n rootID\n ) : invariant(!this.isMounted()));\n var ref = this._currentElement.ref;\n if (ref != null) {\n var owner = this._currentElement._owner;\n ReactOwner.addComponentAsRefTo(this, ref, owner);\n }\n this._rootNodeID = rootID;\n this._lifeCycleState = ComponentLifeCycle.MOUNTED;\n this._mountDepth = mountDepth;\n // Effectively: return '';\n },\n\n /**\n * Releases any resources allocated by `mountComponent`.\n *\n * NOTE: This does not remove any nodes from the DOM.\n *\n * Subclasses that override this method should make sure to invoke\n * `ReactComponent.Mixin.unmountComponent.call(this)`.\n *\n * @internal\n */\n unmountComponent: function() {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n this.isMounted(),\n 'unmountComponent(): Can only unmount a mounted component.'\n ) : invariant(this.isMounted()));\n var ref = this._currentElement.ref;\n if (ref != null) {\n ReactOwner.removeComponentAsRefFrom(this, ref, this._owner);\n }\n unmountIDFromEnvironment(this._rootNodeID);\n this._rootNodeID = null;\n this._lifeCycleState = ComponentLifeCycle.UNMOUNTED;\n },\n\n /**\n * Given a new instance of this component, updates the rendered DOM nodes\n * as if that instance was rendered instead.\n *\n * Subclasses that override this method should make sure to invoke\n * `ReactComponent.Mixin.receiveComponent.call(this, ...)`.\n *\n * @param {object} nextComponent Next set of properties.\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n receiveComponent: function(nextElement, transaction) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n this.isMounted(),\n 'receiveComponent(...): Can only update a mounted component.'\n ) : invariant(this.isMounted()));\n this._pendingElement = nextElement;\n this.performUpdateIfNecessary(transaction);\n },\n\n /**\n * If `_pendingElement` is set, update the component.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n performUpdateIfNecessary: function(transaction) {\n if (this._pendingElement == null) {\n return;\n }\n var prevElement = this._currentElement;\n var nextElement = this._pendingElement;\n this._currentElement = nextElement;\n this.props = nextElement.props;\n this._owner = nextElement._owner;\n this._pendingElement = null;\n this.updateComponent(transaction, prevElement);\n },\n\n /**\n * Updates the component's currently mounted representation.\n *\n * @param {ReactReconcileTransaction} transaction\n * @param {object} prevElement\n * @internal\n */\n updateComponent: function(transaction, prevElement) {\n var nextElement = this._currentElement;\n\n // If either the owner or a `ref` has changed, make sure the newest owner\n // has stored a reference to `this`, and the previous owner (if different)\n // has forgotten the reference to `this`. We use the element instead\n // of the public this.props because the post processing cannot determine\n // a ref. The ref conceptually lives on the element.\n\n // TODO: Should this even be possible? The owner cannot change because\n // it's forbidden by shouldUpdateReactComponent. The ref can change\n // if you swap the keys of but not the refs. Reconsider where this check\n // is made. It probably belongs where the key checking and\n // instantiateReactComponent is done.\n\n if (nextElement._owner !== prevElement._owner ||\n nextElement.ref !== prevElement.ref) {\n if (prevElement.ref != null) {\n ReactOwner.removeComponentAsRefFrom(\n this, prevElement.ref, prevElement._owner\n );\n }\n // Correct, even if the owner is the same, and only the ref has changed.\n if (nextElement.ref != null) {\n ReactOwner.addComponentAsRefTo(\n this,\n nextElement.ref,\n nextElement._owner\n );\n }\n }\n },\n\n /**\n * Mounts this component and inserts it into the DOM.\n *\n * @param {string} rootID DOM ID of the root node.\n * @param {DOMElement} container DOM element to mount into.\n * @param {boolean} shouldReuseMarkup If true, do not insert markup\n * @final\n * @internal\n * @see {ReactMount.render}\n */\n mountComponentIntoNode: function(rootID, container, shouldReuseMarkup) {\n var transaction = ReactUpdates.ReactReconcileTransaction.getPooled();\n transaction.perform(\n this._mountComponentIntoNode,\n this,\n rootID,\n container,\n transaction,\n shouldReuseMarkup\n );\n ReactUpdates.ReactReconcileTransaction.release(transaction);\n },\n\n /**\n * @param {string} rootID DOM ID of the root node.\n * @param {DOMElement} container DOM element to mount into.\n * @param {ReactReconcileTransaction} transaction\n * @param {boolean} shouldReuseMarkup If true, do not insert markup\n * @final\n * @private\n */\n _mountComponentIntoNode: function(\n rootID,\n container,\n transaction,\n shouldReuseMarkup) {\n var markup = this.mountComponent(rootID, transaction, 0);\n mountImageIntoNode(markup, container, shouldReuseMarkup);\n },\n\n /**\n * Checks if this component is owned by the supplied `owner` component.\n *\n * @param {ReactComponent} owner Component to check.\n * @return {boolean} True if `owners` owns this component.\n * @final\n * @internal\n */\n isOwnedBy: function(owner) {\n return this._owner === owner;\n },\n\n /**\n * Gets another component, that shares the same owner as this one, by ref.\n *\n * @param {string} ref of a sibling Component.\n * @return {?ReactComponent} the actual sibling Component.\n * @final\n * @internal\n */\n getSiblingByRef: function(ref) {\n var owner = this._owner;\n if (!owner || !owner.refs) {\n return null;\n }\n return owner.refs[ref];\n }\n }\n};\n\nmodule.exports = ReactComponent;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactComponent.js\n ** module id = 21\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactCompositeComponent\n */\n\n\"use strict\";\n\nvar ReactComponent = require(\"./ReactComponent\");\nvar ReactContext = require(\"./ReactContext\");\nvar ReactCurrentOwner = require(\"./ReactCurrentOwner\");\nvar ReactElement = require(\"./ReactElement\");\nvar ReactElementValidator = require(\"./ReactElementValidator\");\nvar ReactEmptyComponent = require(\"./ReactEmptyComponent\");\nvar ReactErrorUtils = require(\"./ReactErrorUtils\");\nvar ReactLegacyElement = require(\"./ReactLegacyElement\");\nvar ReactOwner = require(\"./ReactOwner\");\nvar ReactPerf = require(\"./ReactPerf\");\nvar ReactPropTransferer = require(\"./ReactPropTransferer\");\nvar ReactPropTypeLocations = require(\"./ReactPropTypeLocations\");\nvar ReactPropTypeLocationNames = require(\"./ReactPropTypeLocationNames\");\nvar ReactUpdates = require(\"./ReactUpdates\");\n\nvar assign = require(\"./Object.assign\");\nvar instantiateReactComponent = require(\"./instantiateReactComponent\");\nvar invariant = require(\"./invariant\");\nvar keyMirror = require(\"./keyMirror\");\nvar keyOf = require(\"./keyOf\");\nvar monitorCodeUse = require(\"./monitorCodeUse\");\nvar mapObject = require(\"./mapObject\");\nvar shouldUpdateReactComponent = require(\"./shouldUpdateReactComponent\");\nvar warning = require(\"./warning\");\n\nvar MIXINS_KEY = keyOf({mixins: null});\n\n/**\n * Policies that describe methods in `ReactCompositeComponentInterface`.\n */\nvar SpecPolicy = keyMirror({\n /**\n * These methods may be defined only once by the class specification or mixin.\n */\n DEFINE_ONCE: null,\n /**\n * These methods may be defined by both the class specification and mixins.\n * Subsequent definitions will be chained. These methods must return void.\n */\n DEFINE_MANY: null,\n /**\n * These methods are overriding the base ReactCompositeComponent class.\n */\n OVERRIDE_BASE: null,\n /**\n * These methods are similar to DEFINE_MANY, except we assume they return\n * objects. We try to merge the keys of the return values of all the mixed in\n * functions. If there is a key conflict we throw.\n */\n DEFINE_MANY_MERGED: null\n});\n\n\nvar injectedMixins = [];\n\n/**\n * Composite components are higher-level components that compose other composite\n * or native components.\n *\n * To create a new type of `ReactCompositeComponent`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return
Hello World
;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactCompositeComponentInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will available on the prototype.\n *\n * @interface ReactCompositeComponentInterface\n * @internal\n */\nvar ReactCompositeComponentInterface = {\n\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: SpecPolicy.DEFINE_MANY,\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: SpecPolicy.DEFINE_MANY,\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: SpecPolicy.DEFINE_MANY,\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: SpecPolicy.DEFINE_MANY,\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: SpecPolicy.DEFINE_MANY,\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED,\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: SpecPolicy.DEFINE_MANY_MERGED,\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: SpecPolicy.DEFINE_MANY_MERGED,\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return
Hello, {name}!
;\n * }\n *\n * @return {ReactComponent}\n * @nosideeffects\n * @required\n */\n render: SpecPolicy.DEFINE_ONCE,\n\n\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: SpecPolicy.DEFINE_MANY,\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: SpecPolicy.DEFINE_MANY,\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: SpecPolicy.DEFINE_MANY,\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: SpecPolicy.DEFINE_ONCE,\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: SpecPolicy.DEFINE_MANY,\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: SpecPolicy.DEFINE_MANY,\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: SpecPolicy.DEFINE_MANY,\n\n\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: SpecPolicy.OVERRIDE_BASE\n\n};\n\n/**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\nvar RESERVED_SPEC_KEYS = {\n displayName: function(Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function(Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function(Constructor, childContextTypes) {\n validateTypeDef(\n Constructor,\n childContextTypes,\n ReactPropTypeLocations.childContext\n );\n Constructor.childContextTypes = assign(\n {},\n Constructor.childContextTypes,\n childContextTypes\n );\n },\n contextTypes: function(Constructor, contextTypes) {\n validateTypeDef(\n Constructor,\n contextTypes,\n ReactPropTypeLocations.context\n );\n Constructor.contextTypes = assign(\n {},\n Constructor.contextTypes,\n contextTypes\n );\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function(Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(\n Constructor.getDefaultProps,\n getDefaultProps\n );\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function(Constructor, propTypes) {\n validateTypeDef(\n Constructor,\n propTypes,\n ReactPropTypeLocations.prop\n );\n Constructor.propTypes = assign(\n {},\n Constructor.propTypes,\n propTypes\n );\n },\n statics: function(Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n }\n};\n\nfunction getDeclarationErrorAddendum(component) {\n var owner = component._owner || null;\n if (owner && owner.constructor && owner.constructor.displayName) {\n return ' Check the render method of `' + owner.constructor.displayName +\n '`.';\n }\n return '';\n}\n\nfunction validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n typeof typeDef[propName] == 'function',\n '%s: %s type `%s` is invalid; it must be a function, usually from ' +\n 'React.PropTypes.',\n Constructor.displayName || 'ReactCompositeComponent',\n ReactPropTypeLocationNames[location],\n propName\n ) : invariant(typeof typeDef[propName] == 'function'));\n }\n }\n}\n\nfunction validateMethodOverride(proto, name) {\n var specPolicy = ReactCompositeComponentInterface.hasOwnProperty(name) ?\n ReactCompositeComponentInterface[name] :\n null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactCompositeComponentMixin.hasOwnProperty(name)) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n specPolicy === SpecPolicy.OVERRIDE_BASE,\n 'ReactCompositeComponentInterface: You are attempting to override ' +\n '`%s` from your class specification. Ensure that your method names ' +\n 'do not overlap with React methods.',\n name\n ) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE));\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (proto.hasOwnProperty(name)) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n specPolicy === SpecPolicy.DEFINE_MANY ||\n specPolicy === SpecPolicy.DEFINE_MANY_MERGED,\n 'ReactCompositeComponentInterface: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be due ' +\n 'to a mixin.',\n name\n ) : invariant(specPolicy === SpecPolicy.DEFINE_MANY ||\n specPolicy === SpecPolicy.DEFINE_MANY_MERGED));\n }\n}\n\nfunction validateLifeCycleOnReplaceState(instance) {\n var compositeLifeCycleState = instance._compositeLifeCycleState;\n (\"production\" !== process.env.NODE_ENV ? invariant(\n instance.isMounted() ||\n compositeLifeCycleState === CompositeLifeCycle.MOUNTING,\n 'replaceState(...): Can only update a mounted or mounting component.'\n ) : invariant(instance.isMounted() ||\n compositeLifeCycleState === CompositeLifeCycle.MOUNTING));\n (\"production\" !== process.env.NODE_ENV ? invariant(\n ReactCurrentOwner.current == null,\n 'replaceState(...): Cannot update during an existing state transition ' +\n '(such as within `render`). Render methods should be a pure function ' +\n 'of props and state.'\n ) : invariant(ReactCurrentOwner.current == null));\n (\"production\" !== process.env.NODE_ENV ? invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING,\n 'replaceState(...): Cannot update while unmounting component. This ' +\n 'usually means you called setState() on an unmounted component.'\n ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING));\n}\n\n/**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building `ReactCompositeComponent` classses.\n */\nfunction mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n return;\n }\n\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !ReactLegacyElement.isValidFactory(spec),\n 'ReactCompositeComponent: You\\'re attempting to ' +\n 'use a component class as a mixin. Instead, just use a regular object.'\n ) : invariant(!ReactLegacyElement.isValidFactory(spec)));\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !ReactElement.isValidElement(spec),\n 'ReactCompositeComponent: You\\'re attempting to ' +\n 'use a component as a mixin. Instead, just use a regular object.'\n ) : invariant(!ReactElement.isValidElement(spec)));\n\n var proto = Constructor.prototype;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above\n continue;\n }\n\n var property = spec[name];\n validateMethodOverride(proto, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactCompositeComponent methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isCompositeComponentMethod =\n ReactCompositeComponentInterface.hasOwnProperty(name);\n var isAlreadyDefined = proto.hasOwnProperty(name);\n var markedDontBind = property && property.__reactDontBind;\n var isFunction = typeof property === 'function';\n var shouldAutoBind =\n isFunction &&\n !isCompositeComponentMethod &&\n !isAlreadyDefined &&\n !markedDontBind;\n\n if (shouldAutoBind) {\n if (!proto.__reactAutoBindMap) {\n proto.__reactAutoBindMap = {};\n }\n proto.__reactAutoBindMap[name] = property;\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactCompositeComponentInterface[name];\n\n // These cases should already be caught by validateMethodOverride\n (\"production\" !== process.env.NODE_ENV ? invariant(\n isCompositeComponentMethod && (\n specPolicy === SpecPolicy.DEFINE_MANY_MERGED ||\n specPolicy === SpecPolicy.DEFINE_MANY\n ),\n 'ReactCompositeComponent: Unexpected spec policy %s for key %s ' +\n 'when mixing in component specs.',\n specPolicy,\n name\n ) : invariant(isCompositeComponentMethod && (\n specPolicy === SpecPolicy.DEFINE_MANY_MERGED ||\n specPolicy === SpecPolicy.DEFINE_MANY\n )));\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === SpecPolicy.DEFINE_MANY) {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (\"production\" !== process.env.NODE_ENV) {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n}\n\nfunction mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !isReserved,\n 'ReactCompositeComponent: You are attempting to define a reserved ' +\n 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' +\n 'as an instance property instead; it will still be accessible on the ' +\n 'constructor.',\n name\n ) : invariant(!isReserved));\n\n var isInherited = name in Constructor;\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !isInherited,\n 'ReactCompositeComponent: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be ' +\n 'due to a mixin.',\n name\n ) : invariant(!isInherited));\n Constructor[name] = property;\n }\n}\n\n/**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\nfunction mergeObjectsWithNoDuplicateKeys(one, two) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n one && two && typeof one === 'object' && typeof two === 'object',\n 'mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects'\n ) : invariant(one && two && typeof one === 'object' && typeof two === 'object'));\n\n mapObject(two, function(value, key) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n one[key] === undefined,\n 'mergeObjectsWithNoDuplicateKeys(): ' +\n 'Tried to merge two objects with the same key: `%s`. This conflict ' +\n 'may be due to a mixin; in particular, this may be caused by two ' +\n 'getInitialState() or getDefaultProps() methods returning objects ' +\n 'with clashing keys.',\n key\n ) : invariant(one[key] === undefined));\n one[key] = value;\n });\n return one;\n}\n\n/**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\nfunction createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n return mergeObjectsWithNoDuplicateKeys(a, b);\n };\n}\n\n/**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\nfunction createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n}\n\n/**\n * `ReactCompositeComponent` maintains an auxiliary life cycle state in\n * `this._compositeLifeCycleState` (which can be null).\n *\n * This is different from the life cycle state maintained by `ReactComponent` in\n * `this._lifeCycleState`. The following diagram shows how the states overlap in\n * time. There are times when the CompositeLifeCycle is null - at those times it\n * is only meaningful to look at ComponentLifeCycle alone.\n *\n * Top Row: ReactComponent.ComponentLifeCycle\n * Low Row: ReactComponent.CompositeLifeCycle\n *\n * +-------+---------------------------------+--------+\n * | UN | MOUNTED | UN |\n * |MOUNTED| | MOUNTED|\n * +-------+---------------------------------+--------+\n * | ^--------+ +-------+ +--------^ |\n * | | | | | | | |\n * | 0--|MOUNTING|-0-|RECEIVE|-0-| UN |--->0 |\n * | | | |PROPS | |MOUNTING| |\n * | | | | | | | |\n * | | | | | | | |\n * | +--------+ +-------+ +--------+ |\n * | | | |\n * +-------+---------------------------------+--------+\n */\nvar CompositeLifeCycle = keyMirror({\n /**\n * Components in the process of being mounted respond to state changes\n * differently.\n */\n MOUNTING: null,\n /**\n * Components in the process of being unmounted are guarded against state\n * changes.\n */\n UNMOUNTING: null,\n /**\n * Components that are mounted and receiving new props respond to state\n * changes differently.\n */\n RECEIVING_PROPS: null\n});\n\n/**\n * @lends {ReactCompositeComponent.prototype}\n */\nvar ReactCompositeComponentMixin = {\n\n /**\n * Base constructor for all composite component.\n *\n * @param {ReactElement} element\n * @final\n * @internal\n */\n construct: function(element) {\n // Children can be either an array or more than one argument\n ReactComponent.Mixin.construct.apply(this, arguments);\n ReactOwner.Mixin.construct.apply(this, arguments);\n\n this.state = null;\n this._pendingState = null;\n\n // This is the public post-processed context. The real context and pending\n // context lives on the element.\n this.context = null;\n\n this._compositeLifeCycleState = null;\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function() {\n return ReactComponent.Mixin.isMounted.call(this) &&\n this._compositeLifeCycleState !== CompositeLifeCycle.MOUNTING;\n },\n\n /**\n * Initializes the component, renders markup, and registers event listeners.\n *\n * @param {string} rootID DOM ID of the root node.\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {number} mountDepth number of components in the owner hierarchy\n * @return {?string} Rendered markup to be inserted into the DOM.\n * @final\n * @internal\n */\n mountComponent: ReactPerf.measure(\n 'ReactCompositeComponent',\n 'mountComponent',\n function(rootID, transaction, mountDepth) {\n ReactComponent.Mixin.mountComponent.call(\n this,\n rootID,\n transaction,\n mountDepth\n );\n this._compositeLifeCycleState = CompositeLifeCycle.MOUNTING;\n\n if (this.__reactAutoBindMap) {\n this._bindAutoBindMethods();\n }\n\n this.context = this._processContext(this._currentElement._context);\n this.props = this._processProps(this.props);\n\n this.state = this.getInitialState ? this.getInitialState() : null;\n (\"production\" !== process.env.NODE_ENV ? invariant(\n typeof this.state === 'object' && !Array.isArray(this.state),\n '%s.getInitialState(): must return an object or null',\n this.constructor.displayName || 'ReactCompositeComponent'\n ) : invariant(typeof this.state === 'object' && !Array.isArray(this.state)));\n\n this._pendingState = null;\n this._pendingForceUpdate = false;\n\n if (this.componentWillMount) {\n this.componentWillMount();\n // When mounting, calls to `setState` by `componentWillMount` will set\n // `this._pendingState` without triggering a re-render.\n if (this._pendingState) {\n this.state = this._pendingState;\n this._pendingState = null;\n }\n }\n\n this._renderedComponent = instantiateReactComponent(\n this._renderValidatedComponent(),\n this._currentElement.type // The wrapping type\n );\n\n // Done with mounting, `setState` will now trigger UI changes.\n this._compositeLifeCycleState = null;\n var markup = this._renderedComponent.mountComponent(\n rootID,\n transaction,\n mountDepth + 1\n );\n if (this.componentDidMount) {\n transaction.getReactMountReady().enqueue(this.componentDidMount, this);\n }\n return markup;\n }\n ),\n\n /**\n * Releases any resources allocated by `mountComponent`.\n *\n * @final\n * @internal\n */\n unmountComponent: function() {\n this._compositeLifeCycleState = CompositeLifeCycle.UNMOUNTING;\n if (this.componentWillUnmount) {\n this.componentWillUnmount();\n }\n this._compositeLifeCycleState = null;\n\n this._renderedComponent.unmountComponent();\n this._renderedComponent = null;\n\n ReactComponent.Mixin.unmountComponent.call(this);\n\n // Some existing components rely on this.props even after they've been\n // destroyed (in event handlers).\n // TODO: this.props = null;\n // TODO: this.state = null;\n },\n\n /**\n * Sets a subset of the state. Always use this or `replaceState` to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n setState: function(partialState, callback) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n typeof partialState === 'object' || partialState == null,\n 'setState(...): takes an object of state variables to update.'\n ) : invariant(typeof partialState === 'object' || partialState == null));\n if (\"production\" !== process.env.NODE_ENV){\n (\"production\" !== process.env.NODE_ENV ? warning(\n partialState != null,\n 'setState(...): You passed an undefined or null state object; ' +\n 'instead, use forceUpdate().'\n ) : null);\n }\n // Merge with `_pendingState` if it exists, otherwise with existing state.\n this.replaceState(\n assign({}, this._pendingState || this.state, partialState),\n callback\n );\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {object} completeState Next state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n replaceState: function(completeState, callback) {\n validateLifeCycleOnReplaceState(this);\n this._pendingState = completeState;\n if (this._compositeLifeCycleState !== CompositeLifeCycle.MOUNTING) {\n // If we're in a componentWillMount handler, don't enqueue a rerender\n // because ReactUpdates assumes we're in a browser context (which is wrong\n // for server rendering) and we're about to do a render anyway.\n // TODO: The callback here is ignored when setState is called from\n // componentWillMount. Either fix it or disallow doing so completely in\n // favor of getInitialState.\n ReactUpdates.enqueueUpdate(this, callback);\n }\n },\n\n /**\n * Filters the context object to only contain keys specified in\n * `contextTypes`, and asserts that they are valid.\n *\n * @param {object} context\n * @return {?object}\n * @private\n */\n _processContext: function(context) {\n var maskedContext = null;\n var contextTypes = this.constructor.contextTypes;\n if (contextTypes) {\n maskedContext = {};\n for (var contextName in contextTypes) {\n maskedContext[contextName] = context[contextName];\n }\n if (\"production\" !== process.env.NODE_ENV) {\n this._checkPropTypes(\n contextTypes,\n maskedContext,\n ReactPropTypeLocations.context\n );\n }\n }\n return maskedContext;\n },\n\n /**\n * @param {object} currentContext\n * @return {object}\n * @private\n */\n _processChildContext: function(currentContext) {\n var childContext = this.getChildContext && this.getChildContext();\n var displayName = this.constructor.displayName || 'ReactCompositeComponent';\n if (childContext) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n typeof this.constructor.childContextTypes === 'object',\n '%s.getChildContext(): childContextTypes must be defined in order to ' +\n 'use getChildContext().',\n displayName\n ) : invariant(typeof this.constructor.childContextTypes === 'object'));\n if (\"production\" !== process.env.NODE_ENV) {\n this._checkPropTypes(\n this.constructor.childContextTypes,\n childContext,\n ReactPropTypeLocations.childContext\n );\n }\n for (var name in childContext) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n name in this.constructor.childContextTypes,\n '%s.getChildContext(): key \"%s\" is not defined in childContextTypes.',\n displayName,\n name\n ) : invariant(name in this.constructor.childContextTypes));\n }\n return assign({}, currentContext, childContext);\n }\n return currentContext;\n },\n\n /**\n * Processes props by setting default values for unspecified props and\n * asserting that the props are valid. Does not mutate its argument; returns\n * a new props object with defaults merged in.\n *\n * @param {object} newProps\n * @return {object}\n * @private\n */\n _processProps: function(newProps) {\n if (\"production\" !== process.env.NODE_ENV) {\n var propTypes = this.constructor.propTypes;\n if (propTypes) {\n this._checkPropTypes(propTypes, newProps, ReactPropTypeLocations.prop);\n }\n }\n return newProps;\n },\n\n /**\n * Assert that the props are valid\n *\n * @param {object} propTypes Map of prop name to a ReactPropType\n * @param {object} props\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @private\n */\n _checkPropTypes: function(propTypes, props, location) {\n // TODO: Stop validating prop types here and only use the element\n // validation.\n var componentName = this.constructor.displayName;\n for (var propName in propTypes) {\n if (propTypes.hasOwnProperty(propName)) {\n var error =\n propTypes[propName](props, propName, componentName, location);\n if (error instanceof Error) {\n // We may want to extend this logic for similar errors in\n // renderComponent calls, so I'm abstracting it away into\n // a function to minimize refactoring in the future\n var addendum = getDeclarationErrorAddendum(this);\n (\"production\" !== process.env.NODE_ENV ? warning(false, error.message + addendum) : null);\n }\n }\n }\n },\n\n /**\n * If any of `_pendingElement`, `_pendingState`, or `_pendingForceUpdate`\n * is set, update the component.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n performUpdateIfNecessary: function(transaction) {\n var compositeLifeCycleState = this._compositeLifeCycleState;\n // Do not trigger a state transition if we are in the middle of mounting or\n // receiving props because both of those will already be doing this.\n if (compositeLifeCycleState === CompositeLifeCycle.MOUNTING ||\n compositeLifeCycleState === CompositeLifeCycle.RECEIVING_PROPS) {\n return;\n }\n\n if (this._pendingElement == null &&\n this._pendingState == null &&\n !this._pendingForceUpdate) {\n return;\n }\n\n var nextContext = this.context;\n var nextProps = this.props;\n var nextElement = this._currentElement;\n if (this._pendingElement != null) {\n nextElement = this._pendingElement;\n nextContext = this._processContext(nextElement._context);\n nextProps = this._processProps(nextElement.props);\n this._pendingElement = null;\n\n this._compositeLifeCycleState = CompositeLifeCycle.RECEIVING_PROPS;\n if (this.componentWillReceiveProps) {\n this.componentWillReceiveProps(nextProps, nextContext);\n }\n }\n\n this._compositeLifeCycleState = null;\n\n var nextState = this._pendingState || this.state;\n this._pendingState = null;\n\n var shouldUpdate =\n this._pendingForceUpdate ||\n !this.shouldComponentUpdate ||\n this.shouldComponentUpdate(nextProps, nextState, nextContext);\n\n if (\"production\" !== process.env.NODE_ENV) {\n if (typeof shouldUpdate === \"undefined\") {\n console.warn(\n (this.constructor.displayName || 'ReactCompositeComponent') +\n '.shouldComponentUpdate(): Returned undefined instead of a ' +\n 'boolean value. Make sure to return true or false.'\n );\n }\n }\n\n if (shouldUpdate) {\n this._pendingForceUpdate = false;\n // Will set `this.props`, `this.state` and `this.context`.\n this._performComponentUpdate(\n nextElement,\n nextProps,\n nextState,\n nextContext,\n transaction\n );\n } else {\n // If it's determined that a component should not update, we still want\n // to set props and state.\n this._currentElement = nextElement;\n this.props = nextProps;\n this.state = nextState;\n this.context = nextContext;\n\n // Owner cannot change because shouldUpdateReactComponent doesn't allow\n // it. TODO: Remove this._owner completely.\n this._owner = nextElement._owner;\n }\n },\n\n /**\n * Merges new props and state, notifies delegate methods of update and\n * performs update.\n *\n * @param {ReactElement} nextElement Next element\n * @param {object} nextProps Next public object to set as properties.\n * @param {?object} nextState Next object to set as state.\n * @param {?object} nextContext Next public object to set as context.\n * @param {ReactReconcileTransaction} transaction\n * @private\n */\n _performComponentUpdate: function(\n nextElement,\n nextProps,\n nextState,\n nextContext,\n transaction\n ) {\n var prevElement = this._currentElement;\n var prevProps = this.props;\n var prevState = this.state;\n var prevContext = this.context;\n\n if (this.componentWillUpdate) {\n this.componentWillUpdate(nextProps, nextState, nextContext);\n }\n\n this._currentElement = nextElement;\n this.props = nextProps;\n this.state = nextState;\n this.context = nextContext;\n\n // Owner cannot change because shouldUpdateReactComponent doesn't allow\n // it. TODO: Remove this._owner completely.\n this._owner = nextElement._owner;\n\n this.updateComponent(\n transaction,\n prevElement\n );\n\n if (this.componentDidUpdate) {\n transaction.getReactMountReady().enqueue(\n this.componentDidUpdate.bind(this, prevProps, prevState, prevContext),\n this\n );\n }\n },\n\n receiveComponent: function(nextElement, transaction) {\n if (nextElement === this._currentElement &&\n nextElement._owner != null) {\n // Since elements are immutable after the owner is rendered,\n // we can do a cheap identity compare here to determine if this is a\n // superfluous reconcile. It's possible for state to be mutable but such\n // change should trigger an update of the owner which would recreate\n // the element. We explicitly check for the existence of an owner since\n // it's possible for a element created outside a composite to be\n // deeply mutated and reused.\n return;\n }\n\n ReactComponent.Mixin.receiveComponent.call(\n this,\n nextElement,\n transaction\n );\n },\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @param {ReactElement} prevElement\n * @internal\n * @overridable\n */\n updateComponent: ReactPerf.measure(\n 'ReactCompositeComponent',\n 'updateComponent',\n function(transaction, prevParentElement) {\n ReactComponent.Mixin.updateComponent.call(\n this,\n transaction,\n prevParentElement\n );\n\n var prevComponentInstance = this._renderedComponent;\n var prevElement = prevComponentInstance._currentElement;\n var nextElement = this._renderValidatedComponent();\n if (shouldUpdateReactComponent(prevElement, nextElement)) {\n prevComponentInstance.receiveComponent(nextElement, transaction);\n } else {\n // These two IDs are actually the same! But nothing should rely on that.\n var thisID = this._rootNodeID;\n var prevComponentID = prevComponentInstance._rootNodeID;\n prevComponentInstance.unmountComponent();\n this._renderedComponent = instantiateReactComponent(\n nextElement,\n this._currentElement.type\n );\n var nextMarkup = this._renderedComponent.mountComponent(\n thisID,\n transaction,\n this._mountDepth + 1\n );\n ReactComponent.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(\n prevComponentID,\n nextMarkup\n );\n }\n }\n ),\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldUpdateComponent`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n forceUpdate: function(callback) {\n var compositeLifeCycleState = this._compositeLifeCycleState;\n (\"production\" !== process.env.NODE_ENV ? invariant(\n this.isMounted() ||\n compositeLifeCycleState === CompositeLifeCycle.MOUNTING,\n 'forceUpdate(...): Can only force an update on mounted or mounting ' +\n 'components.'\n ) : invariant(this.isMounted() ||\n compositeLifeCycleState === CompositeLifeCycle.MOUNTING));\n (\"production\" !== process.env.NODE_ENV ? invariant(\n compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING &&\n ReactCurrentOwner.current == null,\n 'forceUpdate(...): Cannot force an update while unmounting component ' +\n 'or within a `render` function.'\n ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING &&\n ReactCurrentOwner.current == null));\n this._pendingForceUpdate = true;\n ReactUpdates.enqueueUpdate(this, callback);\n },\n\n /**\n * @private\n */\n _renderValidatedComponent: ReactPerf.measure(\n 'ReactCompositeComponent',\n '_renderValidatedComponent',\n function() {\n var renderedComponent;\n var previousContext = ReactContext.current;\n ReactContext.current = this._processChildContext(\n this._currentElement._context\n );\n ReactCurrentOwner.current = this;\n try {\n renderedComponent = this.render();\n if (renderedComponent === null || renderedComponent === false) {\n renderedComponent = ReactEmptyComponent.getEmptyComponent();\n ReactEmptyComponent.registerNullComponentID(this._rootNodeID);\n } else {\n ReactEmptyComponent.deregisterNullComponentID(this._rootNodeID);\n }\n } finally {\n ReactContext.current = previousContext;\n ReactCurrentOwner.current = null;\n }\n (\"production\" !== process.env.NODE_ENV ? invariant(\n ReactElement.isValidElement(renderedComponent),\n '%s.render(): A valid ReactComponent must be returned. You may have ' +\n 'returned undefined, an array or some other invalid object.',\n this.constructor.displayName || 'ReactCompositeComponent'\n ) : invariant(ReactElement.isValidElement(renderedComponent)));\n return renderedComponent;\n }\n ),\n\n /**\n * @private\n */\n _bindAutoBindMethods: function() {\n for (var autoBindKey in this.__reactAutoBindMap) {\n if (!this.__reactAutoBindMap.hasOwnProperty(autoBindKey)) {\n continue;\n }\n var method = this.__reactAutoBindMap[autoBindKey];\n this[autoBindKey] = this._bindAutoBindMethod(ReactErrorUtils.guard(\n method,\n this.constructor.displayName + '.' + autoBindKey\n ));\n }\n },\n\n /**\n * Binds a method to the component.\n *\n * @param {function} method Method to be bound.\n * @private\n */\n _bindAutoBindMethod: function(method) {\n var component = this;\n var boundMethod = method.bind(component);\n if (\"production\" !== process.env.NODE_ENV) {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function(newThis ) {var args=Array.prototype.slice.call(arguments,1);\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n monitorCodeUse('react_bind_warning', { component: componentName });\n console.warn(\n 'bind(): React component methods may only be bound to the ' +\n 'component instance. See ' + componentName\n );\n } else if (!args.length) {\n monitorCodeUse('react_bind_warning', { component: componentName });\n console.warn(\n 'bind(): You are binding a component method to the component. ' +\n 'React does this for you automatically in a high-performance ' +\n 'way, so you can safely remove this call. See ' + componentName\n );\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n }\n};\n\nvar ReactCompositeComponentBase = function() {};\nassign(\n ReactCompositeComponentBase.prototype,\n ReactComponent.Mixin,\n ReactOwner.Mixin,\n ReactPropTransferer.Mixin,\n ReactCompositeComponentMixin\n);\n\n/**\n * Module for creating composite components.\n *\n * @class ReactCompositeComponent\n * @extends ReactComponent\n * @extends ReactOwner\n * @extends ReactPropTransferer\n */\nvar ReactCompositeComponent = {\n\n LifeCycle: CompositeLifeCycle,\n\n Base: ReactCompositeComponentBase,\n\n /**\n * Creates a composite component class given a class specification.\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n createClass: function(spec) {\n var Constructor = function(props) {\n // This constructor is overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted. This will later be used\n // by the stand-alone class implementation.\n };\n Constructor.prototype = new ReactCompositeComponentBase();\n Constructor.prototype.constructor = Constructor;\n\n injectedMixins.forEach(\n mixSpecIntoComponent.bind(null, Constructor)\n );\n\n mixSpecIntoComponent(Constructor, spec);\n\n // Initialize the defaultProps property after all mixins have been merged\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n (\"production\" !== process.env.NODE_ENV ? invariant(\n Constructor.prototype.render,\n 'createClass(...): Class specification must implement a `render` method.'\n ) : invariant(Constructor.prototype.render));\n\n if (\"production\" !== process.env.NODE_ENV) {\n if (Constructor.prototype.componentShouldUpdate) {\n monitorCodeUse(\n 'react_component_should_update_warning',\n { component: spec.displayName }\n );\n console.warn(\n (spec.displayName || 'A component') + ' has a method called ' +\n 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +\n 'The name is phrased as a question because the function is ' +\n 'expected to return a value.'\n );\n }\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactCompositeComponentInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n if (\"production\" !== process.env.NODE_ENV) {\n return ReactLegacyElement.wrapFactory(\n ReactElementValidator.createFactory(Constructor)\n );\n }\n return ReactLegacyElement.wrapFactory(\n ReactElement.createFactory(Constructor)\n );\n },\n\n injection: {\n injectMixin: function(mixin) {\n injectedMixins.push(mixin);\n }\n }\n};\n\nmodule.exports = ReactCompositeComponent;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactCompositeComponent.js\n ** module id = 22\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactContext\n */\n\n\"use strict\";\n\nvar assign = require(\"./Object.assign\");\n\n/**\n * Keeps track of the current context.\n *\n * The context is automatically passed down the component ownership hierarchy\n * and is accessible via `this.context` on ReactCompositeComponents.\n */\nvar ReactContext = {\n\n /**\n * @internal\n * @type {object}\n */\n current: {},\n\n /**\n * Temporarily extends the current context while executing scopedCallback.\n *\n * A typical use case might look like\n *\n * render: function() {\n * var children = ReactContext.withContext({foo: 'foo'}, () => (\n *\n * ));\n * return
{children}
;\n * }\n *\n * @param {object} newContext New context to merge into the existing context\n * @param {function} scopedCallback Callback to run with the new context\n * @return {ReactComponent|array}\n */\n withContext: function(newContext, scopedCallback) {\n var result;\n var previousContext = ReactContext.current;\n ReactContext.current = assign({}, previousContext, newContext);\n try {\n result = scopedCallback();\n } finally {\n ReactContext.current = previousContext;\n }\n return result;\n }\n\n};\n\nmodule.exports = ReactContext;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactContext.js\n ** module id = 23\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactCurrentOwner\n */\n\n\"use strict\";\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n *\n * The depth indicate how many composite components are above this render level.\n */\nvar ReactCurrentOwner = {\n\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n\n};\n\nmodule.exports = ReactCurrentOwner;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactCurrentOwner.js\n ** module id = 24\n ** module chunks = 0\n **/","/**\n * Copyright 2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactElement\n */\n\n\"use strict\";\n\nvar ReactContext = require(\"./ReactContext\");\nvar ReactCurrentOwner = require(\"./ReactCurrentOwner\");\n\nvar warning = require(\"./warning\");\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true\n};\n\n/**\n * Warn for mutations.\n *\n * @internal\n * @param {object} object\n * @param {string} key\n */\nfunction defineWarningProperty(object, key) {\n Object.defineProperty(object, key, {\n\n configurable: false,\n enumerable: true,\n\n get: function() {\n if (!this._store) {\n return null;\n }\n return this._store[key];\n },\n\n set: function(value) {\n (\"production\" !== process.env.NODE_ENV ? warning(\n false,\n 'Don\\'t set the ' + key + ' property of the component. ' +\n 'Mutate the existing props object instead.'\n ) : null);\n this._store[key] = value;\n }\n\n });\n}\n\n/**\n * This is updated to true if the membrane is successfully created.\n */\nvar useMutationMembrane = false;\n\n/**\n * Warn for mutations.\n *\n * @internal\n * @param {object} element\n */\nfunction defineMutationMembrane(prototype) {\n try {\n var pseudoFrozenProperties = {\n props: true\n };\n for (var key in pseudoFrozenProperties) {\n defineWarningProperty(prototype, key);\n }\n useMutationMembrane = true;\n } catch (x) {\n // IE will fail on defineProperty\n }\n}\n\n/**\n * Base constructor for all React elements. This is only used to make this\n * work with a dynamic instanceof check. Nothing should live on this prototype.\n *\n * @param {*} type\n * @param {string|object} ref\n * @param {*} key\n * @param {*} props\n * @internal\n */\nvar ReactElement = function(type, key, ref, owner, context, props) {\n // Built-in properties that belong on the element\n this.type = type;\n this.key = key;\n this.ref = ref;\n\n // Record the component responsible for creating this element.\n this._owner = owner;\n\n // TODO: Deprecate withContext, and then the context becomes accessible\n // through the owner.\n this._context = context;\n\n if (\"production\" !== process.env.NODE_ENV) {\n // The validation flag and props are currently mutative. We put them on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n this._store = { validated: false, props: props };\n\n // We're not allowed to set props directly on the object so we early\n // return and rely on the prototype membrane to forward to the backing\n // store.\n if (useMutationMembrane) {\n Object.freeze(this);\n return;\n }\n }\n\n this.props = props;\n};\n\n// We intentionally don't expose the function on the constructor property.\n// ReactElement should be indistinguishable from a plain object.\nReactElement.prototype = {\n _isReactElement: true\n};\n\nif (\"production\" !== process.env.NODE_ENV) {\n defineMutationMembrane(ReactElement.prototype);\n}\n\nReactElement.createElement = function(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n\n if (config != null) {\n ref = config.ref === undefined ? null : config.ref;\n if (\"production\" !== process.env.NODE_ENV) {\n (\"production\" !== process.env.NODE_ENV ? warning(\n config.key !== null,\n 'createElement(...): Encountered component with a `key` of null. In ' +\n 'a future version, this will be treated as equivalent to the string ' +\n '\\'null\\'; instead, provide an explicit key or use undefined.'\n ) : null);\n }\n // TODO: Change this back to `config.key === undefined`\n key = config.key == null ? null : '' + config.key;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (config.hasOwnProperty(propName) &&\n !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (typeof props[propName] === 'undefined') {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n return new ReactElement(\n type,\n key,\n ref,\n ReactCurrentOwner.current,\n ReactContext.current,\n props\n );\n};\n\nReactElement.createFactory = function(type) {\n var factory = ReactElement.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. .type === Foo.type.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n};\n\nReactElement.cloneAndReplaceProps = function(oldElement, newProps) {\n var newElement = new ReactElement(\n oldElement.type,\n oldElement.key,\n oldElement.ref,\n oldElement._owner,\n oldElement._context,\n newProps\n );\n\n if (\"production\" !== process.env.NODE_ENV) {\n // If the key on the original is valid, then the clone is valid\n newElement._store.validated = oldElement._store.validated;\n }\n return newElement;\n};\n\n/**\n * @param {?object} object\n * @return {boolean} True if `object` is a valid component.\n * @final\n */\nReactElement.isValidElement = function(object) {\n // ReactTestUtils is often used outside of beforeEach where as React is\n // within it. This leads to two different instances of React on the same\n // page. To identify a element from a different React instance we use\n // a flag instead of an instanceof check.\n var isElement = !!(object && object._isReactElement);\n // if (isElement && !(object instanceof ReactElement)) {\n // This is an indicator that you're using multiple versions of React at the\n // same time. This will screw with ownership and stuff. Fix it, please.\n // TODO: We could possibly warn here.\n // }\n return isElement;\n};\n\nmodule.exports = ReactElement;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactElement.js\n ** module id = 25\n ** module chunks = 0\n **/","/**\n * Copyright 2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactElementValidator\n */\n\n/**\n * ReactElementValidator provides a wrapper around a element factory\n * which validates the props passed to the element. This is intended to be\n * used only in DEV and could be replaced by a static type checker for languages\n * that support it.\n */\n\n\"use strict\";\n\nvar ReactElement = require(\"./ReactElement\");\nvar ReactPropTypeLocations = require(\"./ReactPropTypeLocations\");\nvar ReactCurrentOwner = require(\"./ReactCurrentOwner\");\n\nvar monitorCodeUse = require(\"./monitorCodeUse\");\n\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\nvar ownerHasKeyUseWarning = {\n 'react_key_warning': {},\n 'react_numeric_key_warning': {}\n};\nvar ownerHasMonitoredObjectMap = {};\n\nvar loggedTypeFailures = {};\n\nvar NUMERIC_PROPERTY_REGEX = /^\\d+$/;\n\n/**\n * Gets the current owner's displayName for use in warnings.\n *\n * @internal\n * @return {?string} Display name or undefined\n */\nfunction getCurrentOwnerDisplayName() {\n var current = ReactCurrentOwner.current;\n return current && current.constructor.displayName || undefined;\n}\n\n/**\n * Warn if the component doesn't have an explicit key assigned to it.\n * This component is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it.\n *\n * @internal\n * @param {ReactComponent} component Component that requires a key.\n * @param {*} parentType component's parent's type.\n */\nfunction validateExplicitKey(component, parentType) {\n if (component._store.validated || component.key != null) {\n return;\n }\n component._store.validated = true;\n\n warnAndMonitorForKeyUse(\n 'react_key_warning',\n 'Each child in an array should have a unique \"key\" prop.',\n component,\n parentType\n );\n}\n\n/**\n * Warn if the key is being defined as an object property but has an incorrect\n * value.\n *\n * @internal\n * @param {string} name Property name of the key.\n * @param {ReactComponent} component Component that requires a key.\n * @param {*} parentType component's parent's type.\n */\nfunction validatePropertyKey(name, component, parentType) {\n if (!NUMERIC_PROPERTY_REGEX.test(name)) {\n return;\n }\n warnAndMonitorForKeyUse(\n 'react_numeric_key_warning',\n 'Child objects should have non-numeric keys so ordering is preserved.',\n component,\n parentType\n );\n}\n\n/**\n * Shared warning and monitoring code for the key warnings.\n *\n * @internal\n * @param {string} warningID The id used when logging.\n * @param {string} message The base warning that gets output.\n * @param {ReactComponent} component Component that requires a key.\n * @param {*} parentType component's parent's type.\n */\nfunction warnAndMonitorForKeyUse(warningID, message, component, parentType) {\n var ownerName = getCurrentOwnerDisplayName();\n var parentName = parentType.displayName;\n\n var useName = ownerName || parentName;\n var memoizer = ownerHasKeyUseWarning[warningID];\n if (memoizer.hasOwnProperty(useName)) {\n return;\n }\n memoizer[useName] = true;\n\n message += ownerName ?\n (\" Check the render method of \" + ownerName + \".\") :\n (\" Check the renderComponent call using <\" + parentName + \">.\");\n\n // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n var childOwnerName = null;\n if (component._owner && component._owner !== ReactCurrentOwner.current) {\n // Name of the component that originally created this child.\n childOwnerName = component._owner.constructor.displayName;\n\n message += (\" It was passed a child from \" + childOwnerName + \".\");\n }\n\n message += ' See http://fb.me/react-warning-keys for more information.';\n monitorCodeUse(warningID, {\n component: useName,\n componentOwner: childOwnerName\n });\n console.warn(message);\n}\n\n/**\n * Log that we're using an object map. We're considering deprecating this\n * feature and replace it with proper Map and ImmutableMap data structures.\n *\n * @internal\n */\nfunction monitorUseOfObjectMap() {\n var currentName = getCurrentOwnerDisplayName() || '';\n if (ownerHasMonitoredObjectMap.hasOwnProperty(currentName)) {\n return;\n }\n ownerHasMonitoredObjectMap[currentName] = true;\n monitorCodeUse('react_object_map_children');\n}\n\n/**\n * Ensure that every component either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {*} component Statically passed child of any type.\n * @param {*} parentType component's parent's type.\n * @return {boolean}\n */\nfunction validateChildKeys(component, parentType) {\n if (Array.isArray(component)) {\n for (var i = 0; i < component.length; i++) {\n var child = component[i];\n if (ReactElement.isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (ReactElement.isValidElement(component)) {\n // This component was passed in a valid location.\n component._store.validated = true;\n } else if (component && typeof component === 'object') {\n monitorUseOfObjectMap();\n for (var name in component) {\n validatePropertyKey(name, component[name], parentType);\n }\n }\n}\n\n/**\n * Assert that the props are valid\n *\n * @param {string} componentName Name of the component for error messages.\n * @param {object} propTypes Map of prop name to a ReactPropType\n * @param {object} props\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @private\n */\nfunction checkPropTypes(componentName, propTypes, props, location) {\n for (var propName in propTypes) {\n if (propTypes.hasOwnProperty(propName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n error = propTypes[propName](props, propName, componentName, location);\n } catch (ex) {\n error = ex;\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n // This will soon use the warning module\n monitorCodeUse(\n 'react_failed_descriptor_type_check',\n { message: error.message }\n );\n }\n }\n }\n}\n\nvar ReactElementValidator = {\n\n createElement: function(type, props, children) {\n var element = ReactElement.createElement.apply(this, arguments);\n\n // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n if (element == null) {\n return element;\n }\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n\n var name = type.displayName;\n if (type.propTypes) {\n checkPropTypes(\n name,\n type.propTypes,\n element.props,\n ReactPropTypeLocations.prop\n );\n }\n if (type.contextTypes) {\n checkPropTypes(\n name,\n type.contextTypes,\n element._context,\n ReactPropTypeLocations.context\n );\n }\n return element;\n },\n\n createFactory: function(type) {\n var validatedFactory = ReactElementValidator.createElement.bind(\n null,\n type\n );\n validatedFactory.type = type;\n return validatedFactory;\n }\n\n};\n\nmodule.exports = ReactElementValidator;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactElementValidator.js\n ** module id = 26\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactDOM\n * @typechecks static-only\n */\n\n\"use strict\";\n\nvar ReactElement = require(\"./ReactElement\");\nvar ReactElementValidator = require(\"./ReactElementValidator\");\nvar ReactLegacyElement = require(\"./ReactLegacyElement\");\n\nvar mapObject = require(\"./mapObject\");\n\n/**\n * Create a factory that creates HTML tag elements.\n *\n * @param {string} tag Tag name (e.g. `div`).\n * @private\n */\nfunction createDOMFactory(tag) {\n if (\"production\" !== process.env.NODE_ENV) {\n return ReactLegacyElement.markNonLegacyFactory(\n ReactElementValidator.createFactory(tag)\n );\n }\n return ReactLegacyElement.markNonLegacyFactory(\n ReactElement.createFactory(tag)\n );\n}\n\n/**\n * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.\n * This is also accessible via `React.DOM`.\n *\n * @public\n */\nvar ReactDOM = mapObject({\n a: 'a',\n abbr: 'abbr',\n address: 'address',\n area: 'area',\n article: 'article',\n aside: 'aside',\n audio: 'audio',\n b: 'b',\n base: 'base',\n bdi: 'bdi',\n bdo: 'bdo',\n big: 'big',\n blockquote: 'blockquote',\n body: 'body',\n br: 'br',\n button: 'button',\n canvas: 'canvas',\n caption: 'caption',\n cite: 'cite',\n code: 'code',\n col: 'col',\n colgroup: 'colgroup',\n data: 'data',\n datalist: 'datalist',\n dd: 'dd',\n del: 'del',\n details: 'details',\n dfn: 'dfn',\n dialog: 'dialog',\n div: 'div',\n dl: 'dl',\n dt: 'dt',\n em: 'em',\n embed: 'embed',\n fieldset: 'fieldset',\n figcaption: 'figcaption',\n figure: 'figure',\n footer: 'footer',\n form: 'form',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n head: 'head',\n header: 'header',\n hr: 'hr',\n html: 'html',\n i: 'i',\n iframe: 'iframe',\n img: 'img',\n input: 'input',\n ins: 'ins',\n kbd: 'kbd',\n keygen: 'keygen',\n label: 'label',\n legend: 'legend',\n li: 'li',\n link: 'link',\n main: 'main',\n map: 'map',\n mark: 'mark',\n menu: 'menu',\n menuitem: 'menuitem',\n meta: 'meta',\n meter: 'meter',\n nav: 'nav',\n noscript: 'noscript',\n object: 'object',\n ol: 'ol',\n optgroup: 'optgroup',\n option: 'option',\n output: 'output',\n p: 'p',\n param: 'param',\n picture: 'picture',\n pre: 'pre',\n progress: 'progress',\n q: 'q',\n rp: 'rp',\n rt: 'rt',\n ruby: 'ruby',\n s: 's',\n samp: 'samp',\n script: 'script',\n section: 'section',\n select: 'select',\n small: 'small',\n source: 'source',\n span: 'span',\n strong: 'strong',\n style: 'style',\n sub: 'sub',\n summary: 'summary',\n sup: 'sup',\n table: 'table',\n tbody: 'tbody',\n td: 'td',\n textarea: 'textarea',\n tfoot: 'tfoot',\n th: 'th',\n thead: 'thead',\n time: 'time',\n title: 'title',\n tr: 'tr',\n track: 'track',\n u: 'u',\n ul: 'ul',\n 'var': 'var',\n video: 'video',\n wbr: 'wbr',\n\n // SVG\n circle: 'circle',\n defs: 'defs',\n ellipse: 'ellipse',\n g: 'g',\n line: 'line',\n linearGradient: 'linearGradient',\n mask: 'mask',\n path: 'path',\n pattern: 'pattern',\n polygon: 'polygon',\n polyline: 'polyline',\n radialGradient: 'radialGradient',\n rect: 'rect',\n stop: 'stop',\n svg: 'svg',\n text: 'text',\n tspan: 'tspan'\n\n}, createDOMFactory);\n\nmodule.exports = ReactDOM;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactDOM.js\n ** module id = 27\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactDOMComponent\n * @typechecks static-only\n */\n\n\"use strict\";\n\nvar CSSPropertyOperations = require(\"./CSSPropertyOperations\");\nvar DOMProperty = require(\"./DOMProperty\");\nvar DOMPropertyOperations = require(\"./DOMPropertyOperations\");\nvar ReactBrowserComponentMixin = require(\"./ReactBrowserComponentMixin\");\nvar ReactComponent = require(\"./ReactComponent\");\nvar ReactBrowserEventEmitter = require(\"./ReactBrowserEventEmitter\");\nvar ReactMount = require(\"./ReactMount\");\nvar ReactMultiChild = require(\"./ReactMultiChild\");\nvar ReactPerf = require(\"./ReactPerf\");\n\nvar assign = require(\"./Object.assign\");\nvar escapeTextForBrowser = require(\"./escapeTextForBrowser\");\nvar invariant = require(\"./invariant\");\nvar isEventSupported = require(\"./isEventSupported\");\nvar keyOf = require(\"./keyOf\");\nvar monitorCodeUse = require(\"./monitorCodeUse\");\n\nvar deleteListener = ReactBrowserEventEmitter.deleteListener;\nvar listenTo = ReactBrowserEventEmitter.listenTo;\nvar registrationNameModules = ReactBrowserEventEmitter.registrationNameModules;\n\n// For quickly matching children type, to test if can be treated as content.\nvar CONTENT_TYPES = {'string': true, 'number': true};\n\nvar STYLE = keyOf({style: null});\n\nvar ELEMENT_NODE_TYPE = 1;\n\n/**\n * @param {?object} props\n */\nfunction assertValidProps(props) {\n if (!props) {\n return;\n }\n // Note the use of `==` which checks for null or undefined.\n (\"production\" !== process.env.NODE_ENV ? invariant(\n props.children == null || props.dangerouslySetInnerHTML == null,\n 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'\n ) : invariant(props.children == null || props.dangerouslySetInnerHTML == null));\n if (\"production\" !== process.env.NODE_ENV) {\n if (props.contentEditable && props.children != null) {\n console.warn(\n 'A component is `contentEditable` and contains `children` managed by ' +\n 'React. It is now your responsibility to guarantee that none of those '+\n 'nodes are unexpectedly modified or duplicated. This is probably not ' +\n 'intentional.'\n );\n }\n }\n (\"production\" !== process.env.NODE_ENV ? invariant(\n props.style == null || typeof props.style === 'object',\n 'The `style` prop expects a mapping from style properties to values, ' +\n 'not a string.'\n ) : invariant(props.style == null || typeof props.style === 'object'));\n}\n\nfunction putListener(id, registrationName, listener, transaction) {\n if (\"production\" !== process.env.NODE_ENV) {\n // IE8 has no API for event capturing and the `onScroll` event doesn't\n // bubble.\n if (registrationName === 'onScroll' &&\n !isEventSupported('scroll', true)) {\n monitorCodeUse('react_no_scroll_event');\n console.warn('This browser doesn\\'t support the `onScroll` event');\n }\n }\n var container = ReactMount.findReactContainerForID(id);\n if (container) {\n var doc = container.nodeType === ELEMENT_NODE_TYPE ?\n container.ownerDocument :\n container;\n listenTo(registrationName, doc);\n }\n transaction.getPutListenerQueue().enqueuePutListener(\n id,\n registrationName,\n listener\n );\n}\n\n// For HTML, certain tags should omit their close tag. We keep a whitelist for\n// those special cased tags.\n\nvar omittedCloseTags = {\n 'area': true,\n 'base': true,\n 'br': true,\n 'col': true,\n 'embed': true,\n 'hr': true,\n 'img': true,\n 'input': true,\n 'keygen': true,\n 'link': true,\n 'meta': true,\n 'param': true,\n 'source': true,\n 'track': true,\n 'wbr': true\n // NOTE: menuitem's close tag should be omitted, but that causes problems.\n};\n\n// We accept any tag to be rendered but since this gets injected into abitrary\n// HTML, we want to make sure that it's a safe tag.\n// http://www.w3.org/TR/REC-xml/#NT-Name\n\nvar VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/; // Simplified subset\nvar validatedTagCache = {};\nvar hasOwnProperty = {}.hasOwnProperty;\n\nfunction validateDangerousTag(tag) {\n if (!hasOwnProperty.call(validatedTagCache, tag)) {\n (\"production\" !== process.env.NODE_ENV ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag)));\n validatedTagCache[tag] = true;\n }\n}\n\n/**\n * Creates a new React class that is idempotent and capable of containing other\n * React components. It accepts event listeners and DOM properties that are\n * valid according to `DOMProperty`.\n *\n * - Event listeners: `onClick`, `onMouseDown`, etc.\n * - DOM properties: `className`, `name`, `title`, etc.\n *\n * The `style` property functions differently from the DOM API. It accepts an\n * object mapping of style properties to values.\n *\n * @constructor ReactDOMComponent\n * @extends ReactComponent\n * @extends ReactMultiChild\n */\nfunction ReactDOMComponent(tag) {\n validateDangerousTag(tag);\n this._tag = tag;\n this.tagName = tag.toUpperCase();\n}\n\nReactDOMComponent.displayName = 'ReactDOMComponent';\n\nReactDOMComponent.Mixin = {\n\n /**\n * Generates root tag markup then recurses. This method has side effects and\n * is not idempotent.\n *\n * @internal\n * @param {string} rootID The root DOM ID for this node.\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {number} mountDepth number of components in the owner hierarchy\n * @return {string} The computed markup.\n */\n mountComponent: ReactPerf.measure(\n 'ReactDOMComponent',\n 'mountComponent',\n function(rootID, transaction, mountDepth) {\n ReactComponent.Mixin.mountComponent.call(\n this,\n rootID,\n transaction,\n mountDepth\n );\n assertValidProps(this.props);\n var closeTag = omittedCloseTags[this._tag] ? '' : '' + this._tag + '>';\n return (\n this._createOpenTagMarkupAndPutListeners(transaction) +\n this._createContentMarkup(transaction) +\n closeTag\n );\n }\n ),\n\n /**\n * Creates markup for the open tag and all attributes.\n *\n * This method has side effects because events get registered.\n *\n * Iterating over object properties is faster than iterating over arrays.\n * @see http://jsperf.com/obj-vs-arr-iteration\n *\n * @private\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @return {string} Markup of opening tag.\n */\n _createOpenTagMarkupAndPutListeners: function(transaction) {\n var props = this.props;\n var ret = '<' + this._tag;\n\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n var propValue = props[propKey];\n if (propValue == null) {\n continue;\n }\n if (registrationNameModules.hasOwnProperty(propKey)) {\n putListener(this._rootNodeID, propKey, propValue, transaction);\n } else {\n if (propKey === STYLE) {\n if (propValue) {\n propValue = props.style = assign({}, props.style);\n }\n propValue = CSSPropertyOperations.createMarkupForStyles(propValue);\n }\n var markup =\n DOMPropertyOperations.createMarkupForProperty(propKey, propValue);\n if (markup) {\n ret += ' ' + markup;\n }\n }\n }\n\n // For static pages, no need to put React ID and checksum. Saves lots of\n // bytes.\n if (transaction.renderToStaticMarkup) {\n return ret + '>';\n }\n\n var markupForID = DOMPropertyOperations.createMarkupForID(this._rootNodeID);\n return ret + ' ' + markupForID + '>';\n },\n\n /**\n * Creates markup for the content between the tags.\n *\n * @private\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @return {string} Content markup.\n */\n _createContentMarkup: function(transaction) {\n // Intentional use of != to avoid catching zero/false.\n var innerHTML = this.props.dangerouslySetInnerHTML;\n if (innerHTML != null) {\n if (innerHTML.__html != null) {\n return innerHTML.__html;\n }\n } else {\n var contentToUse =\n CONTENT_TYPES[typeof this.props.children] ? this.props.children : null;\n var childrenToUse = contentToUse != null ? null : this.props.children;\n if (contentToUse != null) {\n return escapeTextForBrowser(contentToUse);\n } else if (childrenToUse != null) {\n var mountImages = this.mountChildren(\n childrenToUse,\n transaction\n );\n return mountImages.join('');\n }\n }\n return '';\n },\n\n receiveComponent: function(nextElement, transaction) {\n if (nextElement === this._currentElement &&\n nextElement._owner != null) {\n // Since elements are immutable after the owner is rendered,\n // we can do a cheap identity compare here to determine if this is a\n // superfluous reconcile. It's possible for state to be mutable but such\n // change should trigger an update of the owner which would recreate\n // the element. We explicitly check for the existence of an owner since\n // it's possible for a element created outside a composite to be\n // deeply mutated and reused.\n return;\n }\n\n ReactComponent.Mixin.receiveComponent.call(\n this,\n nextElement,\n transaction\n );\n },\n\n /**\n * Updates a native DOM component after it has already been allocated and\n * attached to the DOM. Reconciles the root DOM node, then recurses.\n *\n * @param {ReactReconcileTransaction} transaction\n * @param {ReactElement} prevElement\n * @internal\n * @overridable\n */\n updateComponent: ReactPerf.measure(\n 'ReactDOMComponent',\n 'updateComponent',\n function(transaction, prevElement) {\n assertValidProps(this._currentElement.props);\n ReactComponent.Mixin.updateComponent.call(\n this,\n transaction,\n prevElement\n );\n this._updateDOMProperties(prevElement.props, transaction);\n this._updateDOMChildren(prevElement.props, transaction);\n }\n ),\n\n /**\n * Reconciles the properties by detecting differences in property values and\n * updating the DOM as necessary. This function is probably the single most\n * critical path for performance optimization.\n *\n * TODO: Benchmark whether checking for changed values in memory actually\n * improves performance (especially statically positioned elements).\n * TODO: Benchmark the effects of putting this at the top since 99% of props\n * do not change for a given reconciliation.\n * TODO: Benchmark areas that can be improved with caching.\n *\n * @private\n * @param {object} lastProps\n * @param {ReactReconcileTransaction} transaction\n */\n _updateDOMProperties: function(lastProps, transaction) {\n var nextProps = this.props;\n var propKey;\n var styleName;\n var styleUpdates;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) ||\n !lastProps.hasOwnProperty(propKey)) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = '';\n }\n }\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n deleteListener(this._rootNodeID, propKey);\n } else if (\n DOMProperty.isStandardName[propKey] ||\n DOMProperty.isCustomAttribute(propKey)) {\n ReactComponent.BackendIDOperations.deletePropertyByID(\n this._rootNodeID,\n propKey\n );\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps[propKey];\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) {\n continue;\n }\n if (propKey === STYLE) {\n if (nextProp) {\n nextProp = nextProps.style = assign({}, nextProp);\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) &&\n (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) &&\n lastProp[styleName] !== nextProp[styleName]) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n styleUpdates = nextProp;\n }\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n putListener(this._rootNodeID, propKey, nextProp, transaction);\n } else if (\n DOMProperty.isStandardName[propKey] ||\n DOMProperty.isCustomAttribute(propKey)) {\n ReactComponent.BackendIDOperations.updatePropertyByID(\n this._rootNodeID,\n propKey,\n nextProp\n );\n }\n }\n if (styleUpdates) {\n ReactComponent.BackendIDOperations.updateStylesByID(\n this._rootNodeID,\n styleUpdates\n );\n }\n },\n\n /**\n * Reconciles the children with the various properties that affect the\n * children content.\n *\n * @param {object} lastProps\n * @param {ReactReconcileTransaction} transaction\n */\n _updateDOMChildren: function(lastProps, transaction) {\n var nextProps = this.props;\n\n var lastContent =\n CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;\n var nextContent =\n CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;\n\n var lastHtml =\n lastProps.dangerouslySetInnerHTML &&\n lastProps.dangerouslySetInnerHTML.__html;\n var nextHtml =\n nextProps.dangerouslySetInnerHTML &&\n nextProps.dangerouslySetInnerHTML.__html;\n\n // Note the use of `!=` which checks for null or undefined.\n var lastChildren = lastContent != null ? null : lastProps.children;\n var nextChildren = nextContent != null ? null : nextProps.children;\n\n // If we're switching from children to content/html or vice versa, remove\n // the old content\n var lastHasContentOrHtml = lastContent != null || lastHtml != null;\n var nextHasContentOrHtml = nextContent != null || nextHtml != null;\n if (lastChildren != null && nextChildren == null) {\n this.updateChildren(null, transaction);\n } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {\n this.updateTextContent('');\n }\n\n if (nextContent != null) {\n if (lastContent !== nextContent) {\n this.updateTextContent('' + nextContent);\n }\n } else if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n ReactComponent.BackendIDOperations.updateInnerHTMLByID(\n this._rootNodeID,\n nextHtml\n );\n }\n } else if (nextChildren != null) {\n this.updateChildren(nextChildren, transaction);\n }\n },\n\n /**\n * Destroys all event registrations for this instance. Does not remove from\n * the DOM. That must be done by the parent.\n *\n * @internal\n */\n unmountComponent: function() {\n this.unmountChildren();\n ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);\n ReactComponent.Mixin.unmountComponent.call(this);\n }\n\n};\n\nassign(\n ReactDOMComponent.prototype,\n ReactComponent.Mixin,\n ReactDOMComponent.Mixin,\n ReactMultiChild.Mixin,\n ReactBrowserComponentMixin\n);\n\nmodule.exports = ReactDOMComponent;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactDOMComponent.js\n ** module id = 28\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactDefaultInjection\n */\n\n\"use strict\";\n\nvar BeforeInputEventPlugin = require(\"./BeforeInputEventPlugin\");\nvar ChangeEventPlugin = require(\"./ChangeEventPlugin\");\nvar ClientReactRootIndex = require(\"./ClientReactRootIndex\");\nvar CompositionEventPlugin = require(\"./CompositionEventPlugin\");\nvar DefaultEventPluginOrder = require(\"./DefaultEventPluginOrder\");\nvar EnterLeaveEventPlugin = require(\"./EnterLeaveEventPlugin\");\nvar ExecutionEnvironment = require(\"./ExecutionEnvironment\");\nvar HTMLDOMPropertyConfig = require(\"./HTMLDOMPropertyConfig\");\nvar MobileSafariClickEventPlugin = require(\"./MobileSafariClickEventPlugin\");\nvar ReactBrowserComponentMixin = require(\"./ReactBrowserComponentMixin\");\nvar ReactComponentBrowserEnvironment =\n require(\"./ReactComponentBrowserEnvironment\");\nvar ReactDefaultBatchingStrategy = require(\"./ReactDefaultBatchingStrategy\");\nvar ReactDOMComponent = require(\"./ReactDOMComponent\");\nvar ReactDOMButton = require(\"./ReactDOMButton\");\nvar ReactDOMForm = require(\"./ReactDOMForm\");\nvar ReactDOMImg = require(\"./ReactDOMImg\");\nvar ReactDOMInput = require(\"./ReactDOMInput\");\nvar ReactDOMOption = require(\"./ReactDOMOption\");\nvar ReactDOMSelect = require(\"./ReactDOMSelect\");\nvar ReactDOMTextarea = require(\"./ReactDOMTextarea\");\nvar ReactEventListener = require(\"./ReactEventListener\");\nvar ReactInjection = require(\"./ReactInjection\");\nvar ReactInstanceHandles = require(\"./ReactInstanceHandles\");\nvar ReactMount = require(\"./ReactMount\");\nvar SelectEventPlugin = require(\"./SelectEventPlugin\");\nvar ServerReactRootIndex = require(\"./ServerReactRootIndex\");\nvar SimpleEventPlugin = require(\"./SimpleEventPlugin\");\nvar SVGDOMPropertyConfig = require(\"./SVGDOMPropertyConfig\");\n\nvar createFullPageComponent = require(\"./createFullPageComponent\");\n\nfunction inject() {\n ReactInjection.EventEmitter.injectReactEventListener(\n ReactEventListener\n );\n\n /**\n * Inject modules for resolving DOM hierarchy and plugin ordering.\n */\n ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);\n ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);\n ReactInjection.EventPluginHub.injectMount(ReactMount);\n\n /**\n * Some important event plugins included by default (without having to require\n * them).\n */\n ReactInjection.EventPluginHub.injectEventPluginsByName({\n SimpleEventPlugin: SimpleEventPlugin,\n EnterLeaveEventPlugin: EnterLeaveEventPlugin,\n ChangeEventPlugin: ChangeEventPlugin,\n CompositionEventPlugin: CompositionEventPlugin,\n MobileSafariClickEventPlugin: MobileSafariClickEventPlugin,\n SelectEventPlugin: SelectEventPlugin,\n BeforeInputEventPlugin: BeforeInputEventPlugin\n });\n\n ReactInjection.NativeComponent.injectGenericComponentClass(\n ReactDOMComponent\n );\n\n ReactInjection.NativeComponent.injectComponentClasses({\n 'button': ReactDOMButton,\n 'form': ReactDOMForm,\n 'img': ReactDOMImg,\n 'input': ReactDOMInput,\n 'option': ReactDOMOption,\n 'select': ReactDOMSelect,\n 'textarea': ReactDOMTextarea,\n\n 'html': createFullPageComponent('html'),\n 'head': createFullPageComponent('head'),\n 'body': createFullPageComponent('body')\n });\n\n // This needs to happen after createFullPageComponent() otherwise the mixin\n // gets double injected.\n ReactInjection.CompositeComponent.injectMixin(ReactBrowserComponentMixin);\n\n ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);\n ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);\n\n ReactInjection.EmptyComponent.injectEmptyComponent('noscript');\n\n ReactInjection.Updates.injectReconcileTransaction(\n ReactComponentBrowserEnvironment.ReactReconcileTransaction\n );\n ReactInjection.Updates.injectBatchingStrategy(\n ReactDefaultBatchingStrategy\n );\n\n ReactInjection.RootIndex.injectCreateReactRootIndex(\n ExecutionEnvironment.canUseDOM ?\n ClientReactRootIndex.createReactRootIndex :\n ServerReactRootIndex.createReactRootIndex\n );\n\n ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);\n\n if (\"production\" !== process.env.NODE_ENV) {\n var url = (ExecutionEnvironment.canUseDOM && window.location.href) || '';\n if ((/[?&]react_perf\\b/).test(url)) {\n var ReactDefaultPerf = require(\"./ReactDefaultPerf\");\n ReactDefaultPerf.start();\n }\n }\n}\n\nmodule.exports = {\n inject: inject\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactDefaultInjection.js\n ** module id = 29\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactInstanceHandles\n * @typechecks static-only\n */\n\n\"use strict\";\n\nvar ReactRootIndex = require(\"./ReactRootIndex\");\n\nvar invariant = require(\"./invariant\");\n\nvar SEPARATOR = '.';\nvar SEPARATOR_LENGTH = SEPARATOR.length;\n\n/**\n * Maximum depth of traversals before we consider the possibility of a bad ID.\n */\nvar MAX_TREE_DEPTH = 100;\n\n/**\n * Creates a DOM ID prefix to use when mounting React components.\n *\n * @param {number} index A unique integer\n * @return {string} React root ID.\n * @internal\n */\nfunction getReactRootIDString(index) {\n return SEPARATOR + index.toString(36);\n}\n\n/**\n * Checks if a character in the supplied ID is a separator or the end.\n *\n * @param {string} id A React DOM ID.\n * @param {number} index Index of the character to check.\n * @return {boolean} True if the character is a separator or end of the ID.\n * @private\n */\nfunction isBoundary(id, index) {\n return id.charAt(index) === SEPARATOR || index === id.length;\n}\n\n/**\n * Checks if the supplied string is a valid React DOM ID.\n *\n * @param {string} id A React DOM ID, maybe.\n * @return {boolean} True if the string is a valid React DOM ID.\n * @private\n */\nfunction isValidID(id) {\n return id === '' || (\n id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR\n );\n}\n\n/**\n * Checks if the first ID is an ancestor of or equal to the second ID.\n *\n * @param {string} ancestorID\n * @param {string} descendantID\n * @return {boolean} True if `ancestorID` is an ancestor of `descendantID`.\n * @internal\n */\nfunction isAncestorIDOf(ancestorID, descendantID) {\n return (\n descendantID.indexOf(ancestorID) === 0 &&\n isBoundary(descendantID, ancestorID.length)\n );\n}\n\n/**\n * Gets the parent ID of the supplied React DOM ID, `id`.\n *\n * @param {string} id ID of a component.\n * @return {string} ID of the parent, or an empty string.\n * @private\n */\nfunction getParentID(id) {\n return id ? id.substr(0, id.lastIndexOf(SEPARATOR)) : '';\n}\n\n/**\n * Gets the next DOM ID on the tree path from the supplied `ancestorID` to the\n * supplied `destinationID`. If they are equal, the ID is returned.\n *\n * @param {string} ancestorID ID of an ancestor node of `destinationID`.\n * @param {string} destinationID ID of the destination node.\n * @return {string} Next ID on the path from `ancestorID` to `destinationID`.\n * @private\n */\nfunction getNextDescendantID(ancestorID, destinationID) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n isValidID(ancestorID) && isValidID(destinationID),\n 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.',\n ancestorID,\n destinationID\n ) : invariant(isValidID(ancestorID) && isValidID(destinationID)));\n (\"production\" !== process.env.NODE_ENV ? invariant(\n isAncestorIDOf(ancestorID, destinationID),\n 'getNextDescendantID(...): React has made an invalid assumption about ' +\n 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.',\n ancestorID,\n destinationID\n ) : invariant(isAncestorIDOf(ancestorID, destinationID)));\n if (ancestorID === destinationID) {\n return ancestorID;\n }\n // Skip over the ancestor and the immediate separator. Traverse until we hit\n // another separator or we reach the end of `destinationID`.\n var start = ancestorID.length + SEPARATOR_LENGTH;\n for (var i = start; i < destinationID.length; i++) {\n if (isBoundary(destinationID, i)) {\n break;\n }\n }\n return destinationID.substr(0, i);\n}\n\n/**\n * Gets the nearest common ancestor ID of two IDs.\n *\n * Using this ID scheme, the nearest common ancestor ID is the longest common\n * prefix of the two IDs that immediately preceded a \"marker\" in both strings.\n *\n * @param {string} oneID\n * @param {string} twoID\n * @return {string} Nearest common ancestor ID, or the empty string if none.\n * @private\n */\nfunction getFirstCommonAncestorID(oneID, twoID) {\n var minLength = Math.min(oneID.length, twoID.length);\n if (minLength === 0) {\n return '';\n }\n var lastCommonMarkerIndex = 0;\n // Use `<=` to traverse until the \"EOL\" of the shorter string.\n for (var i = 0; i <= minLength; i++) {\n if (isBoundary(oneID, i) && isBoundary(twoID, i)) {\n lastCommonMarkerIndex = i;\n } else if (oneID.charAt(i) !== twoID.charAt(i)) {\n break;\n }\n }\n var longestCommonID = oneID.substr(0, lastCommonMarkerIndex);\n (\"production\" !== process.env.NODE_ENV ? invariant(\n isValidID(longestCommonID),\n 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s',\n oneID,\n twoID,\n longestCommonID\n ) : invariant(isValidID(longestCommonID)));\n return longestCommonID;\n}\n\n/**\n * Traverses the parent path between two IDs (either up or down). The IDs must\n * not be the same, and there must exist a parent path between them. If the\n * callback returns `false`, traversal is stopped.\n *\n * @param {?string} start ID at which to start traversal.\n * @param {?string} stop ID at which to end traversal.\n * @param {function} cb Callback to invoke each ID with.\n * @param {?boolean} skipFirst Whether or not to skip the first node.\n * @param {?boolean} skipLast Whether or not to skip the last node.\n * @private\n */\nfunction traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {\n start = start || '';\n stop = stop || '';\n (\"production\" !== process.env.NODE_ENV ? invariant(\n start !== stop,\n 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.',\n start\n ) : invariant(start !== stop));\n var traverseUp = isAncestorIDOf(stop, start);\n (\"production\" !== process.env.NODE_ENV ? invariant(\n traverseUp || isAncestorIDOf(start, stop),\n 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' +\n 'not have a parent path.',\n start,\n stop\n ) : invariant(traverseUp || isAncestorIDOf(start, stop)));\n // Traverse from `start` to `stop` one depth at a time.\n var depth = 0;\n var traverse = traverseUp ? getParentID : getNextDescendantID;\n for (var id = start; /* until break */; id = traverse(id, stop)) {\n var ret;\n if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) {\n ret = cb(id, traverseUp, arg);\n }\n if (ret === false || id === stop) {\n // Only break //after// visiting `stop`.\n break;\n }\n (\"production\" !== process.env.NODE_ENV ? invariant(\n depth++ < MAX_TREE_DEPTH,\n 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' +\n 'traversing the React DOM ID tree. This may be due to malformed IDs: %s',\n start, stop\n ) : invariant(depth++ < MAX_TREE_DEPTH));\n }\n}\n\n/**\n * Manages the IDs assigned to DOM representations of React components. This\n * uses a specific scheme in order to traverse the DOM efficiently (e.g. in\n * order to simulate events).\n *\n * @internal\n */\nvar ReactInstanceHandles = {\n\n /**\n * Constructs a React root ID\n * @return {string} A React root ID.\n */\n createReactRootID: function() {\n return getReactRootIDString(ReactRootIndex.createReactRootIndex());\n },\n\n /**\n * Constructs a React ID by joining a root ID with a name.\n *\n * @param {string} rootID Root ID of a parent component.\n * @param {string} name A component's name (as flattened children).\n * @return {string} A React ID.\n * @internal\n */\n createReactID: function(rootID, name) {\n return rootID + name;\n },\n\n /**\n * Gets the DOM ID of the React component that is the root of the tree that\n * contains the React component with the supplied DOM ID.\n *\n * @param {string} id DOM ID of a React component.\n * @return {?string} DOM ID of the React component that is the root.\n * @internal\n */\n getReactRootIDFromNodeID: function(id) {\n if (id && id.charAt(0) === SEPARATOR && id.length > 1) {\n var index = id.indexOf(SEPARATOR, 1);\n return index > -1 ? id.substr(0, index) : id;\n }\n return null;\n },\n\n /**\n * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that\n * should would receive a `mouseEnter` or `mouseLeave` event.\n *\n * NOTE: Does not invoke the callback on the nearest common ancestor because\n * nothing \"entered\" or \"left\" that element.\n *\n * @param {string} leaveID ID being left.\n * @param {string} enterID ID being entered.\n * @param {function} cb Callback to invoke on each entered/left ID.\n * @param {*} upArg Argument to invoke the callback with on left IDs.\n * @param {*} downArg Argument to invoke the callback with on entered IDs.\n * @internal\n */\n traverseEnterLeave: function(leaveID, enterID, cb, upArg, downArg) {\n var ancestorID = getFirstCommonAncestorID(leaveID, enterID);\n if (ancestorID !== leaveID) {\n traverseParentPath(leaveID, ancestorID, cb, upArg, false, true);\n }\n if (ancestorID !== enterID) {\n traverseParentPath(ancestorID, enterID, cb, downArg, true, false);\n }\n },\n\n /**\n * Simulates the traversal of a two-phase, capture/bubble event dispatch.\n *\n * NOTE: This traversal happens on IDs without touching the DOM.\n *\n * @param {string} targetID ID of the target node.\n * @param {function} cb Callback to invoke.\n * @param {*} arg Argument to invoke the callback with.\n * @internal\n */\n traverseTwoPhase: function(targetID, cb, arg) {\n if (targetID) {\n traverseParentPath('', targetID, cb, arg, true, false);\n traverseParentPath(targetID, '', cb, arg, false, true);\n }\n },\n\n /**\n * Traverse a node ID, calling the supplied `cb` for each ancestor ID. For\n * example, passing `.0.$row-0.1` would result in `cb` getting called\n * with `.0`, `.0.$row-0`, and `.0.$row-0.1`.\n *\n * NOTE: This traversal happens on IDs without touching the DOM.\n *\n * @param {string} targetID ID of the target node.\n * @param {function} cb Callback to invoke.\n * @param {*} arg Argument to invoke the callback with.\n * @internal\n */\n traverseAncestors: function(targetID, cb, arg) {\n traverseParentPath('', targetID, cb, arg, true, false);\n },\n\n /**\n * Exposed for unit testing.\n * @private\n */\n _getFirstCommonAncestorID: getFirstCommonAncestorID,\n\n /**\n * Exposed for unit testing.\n * @private\n */\n _getNextDescendantID: getNextDescendantID,\n\n isAncestorIDOf: isAncestorIDOf,\n\n SEPARATOR: SEPARATOR\n\n};\n\nmodule.exports = ReactInstanceHandles;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactInstanceHandles.js\n ** module id = 30\n ** module chunks = 0\n **/","/**\n * Copyright 2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactLegacyElement\n */\n\n\"use strict\";\n\nvar ReactCurrentOwner = require(\"./ReactCurrentOwner\");\n\nvar invariant = require(\"./invariant\");\nvar monitorCodeUse = require(\"./monitorCodeUse\");\nvar warning = require(\"./warning\");\n\nvar legacyFactoryLogs = {};\nfunction warnForLegacyFactoryCall() {\n if (!ReactLegacyElementFactory._isLegacyCallWarningEnabled) {\n return;\n }\n var owner = ReactCurrentOwner.current;\n var name = owner && owner.constructor ? owner.constructor.displayName : '';\n if (!name) {\n name = 'Something';\n }\n if (legacyFactoryLogs.hasOwnProperty(name)) {\n return;\n }\n legacyFactoryLogs[name] = true;\n (\"production\" !== process.env.NODE_ENV ? warning(\n false,\n name + ' is calling a React component directly. ' +\n 'Use a factory or JSX instead. See: http://fb.me/react-legacyfactory'\n ) : null);\n monitorCodeUse('react_legacy_factory_call', { version: 3, name: name });\n}\n\nfunction warnForPlainFunctionType(type) {\n var isReactClass =\n type.prototype &&\n typeof type.prototype.mountComponent === 'function' &&\n typeof type.prototype.receiveComponent === 'function';\n if (isReactClass) {\n (\"production\" !== process.env.NODE_ENV ? warning(\n false,\n 'Did not expect to get a React class here. Use `Component` instead ' +\n 'of `Component.type` or `this.constructor`.'\n ) : null);\n } else {\n if (!type._reactWarnedForThisType) {\n try {\n type._reactWarnedForThisType = true;\n } catch (x) {\n // just incase this is a frozen object or some special object\n }\n monitorCodeUse(\n 'react_non_component_in_jsx',\n { version: 3, name: type.name }\n );\n }\n (\"production\" !== process.env.NODE_ENV ? warning(\n false,\n 'This JSX uses a plain function. Only React components are ' +\n 'valid in React\\'s JSX transform.'\n ) : null);\n }\n}\n\nfunction warnForNonLegacyFactory(type) {\n (\"production\" !== process.env.NODE_ENV ? warning(\n false,\n 'Do not pass React.DOM.' + type.type + ' to JSX or createFactory. ' +\n 'Use the string \"' + type.type + '\" instead.'\n ) : null);\n}\n\n/**\n * Transfer static properties from the source to the target. Functions are\n * rebound to have this reflect the original source.\n */\nfunction proxyStaticMethods(target, source) {\n if (typeof source !== 'function') {\n return;\n }\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n var value = source[key];\n if (typeof value === 'function') {\n var bound = value.bind(source);\n // Copy any properties defined on the function, such as `isRequired` on\n // a PropTypes validator.\n for (var k in value) {\n if (value.hasOwnProperty(k)) {\n bound[k] = value[k];\n }\n }\n target[key] = bound;\n } else {\n target[key] = value;\n }\n }\n }\n}\n\n// We use an object instead of a boolean because booleans are ignored by our\n// mocking libraries when these factories gets mocked.\nvar LEGACY_MARKER = {};\nvar NON_LEGACY_MARKER = {};\n\nvar ReactLegacyElementFactory = {};\n\nReactLegacyElementFactory.wrapCreateFactory = function(createFactory) {\n var legacyCreateFactory = function(type) {\n if (typeof type !== 'function') {\n // Non-function types cannot be legacy factories\n return createFactory(type);\n }\n\n if (type.isReactNonLegacyFactory) {\n // This is probably a factory created by ReactDOM we unwrap it to get to\n // the underlying string type. It shouldn't have been passed here so we\n // warn.\n if (\"production\" !== process.env.NODE_ENV) {\n warnForNonLegacyFactory(type);\n }\n return createFactory(type.type);\n }\n\n if (type.isReactLegacyFactory) {\n // This is probably a legacy factory created by ReactCompositeComponent.\n // We unwrap it to get to the underlying class.\n return createFactory(type.type);\n }\n\n if (\"production\" !== process.env.NODE_ENV) {\n warnForPlainFunctionType(type);\n }\n\n // Unless it's a legacy factory, then this is probably a plain function,\n // that is expecting to be invoked by JSX. We can just return it as is.\n return type;\n };\n return legacyCreateFactory;\n};\n\nReactLegacyElementFactory.wrapCreateElement = function(createElement) {\n var legacyCreateElement = function(type, props, children) {\n if (typeof type !== 'function') {\n // Non-function types cannot be legacy factories\n return createElement.apply(this, arguments);\n }\n\n var args;\n\n if (type.isReactNonLegacyFactory) {\n // This is probably a factory created by ReactDOM we unwrap it to get to\n // the underlying string type. It shouldn't have been passed here so we\n // warn.\n if (\"production\" !== process.env.NODE_ENV) {\n warnForNonLegacyFactory(type);\n }\n args = Array.prototype.slice.call(arguments, 0);\n args[0] = type.type;\n return createElement.apply(this, args);\n }\n\n if (type.isReactLegacyFactory) {\n // This is probably a legacy factory created by ReactCompositeComponent.\n // We unwrap it to get to the underlying class.\n if (type._isMockFunction) {\n // If this is a mock function, people will expect it to be called. We\n // will actually call the original mock factory function instead. This\n // future proofs unit testing that assume that these are classes.\n type.type._mockedReactClassConstructor = type;\n }\n args = Array.prototype.slice.call(arguments, 0);\n args[0] = type.type;\n return createElement.apply(this, args);\n }\n\n if (\"production\" !== process.env.NODE_ENV) {\n warnForPlainFunctionType(type);\n }\n\n // This is being called with a plain function we should invoke it\n // immediately as if this was used with legacy JSX.\n return type.apply(null, Array.prototype.slice.call(arguments, 1));\n };\n return legacyCreateElement;\n};\n\nReactLegacyElementFactory.wrapFactory = function(factory) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n typeof factory === 'function',\n 'This is suppose to accept a element factory'\n ) : invariant(typeof factory === 'function'));\n var legacyElementFactory = function(config, children) {\n // This factory should not be called when JSX is used. Use JSX instead.\n if (\"production\" !== process.env.NODE_ENV) {\n warnForLegacyFactoryCall();\n }\n return factory.apply(this, arguments);\n };\n proxyStaticMethods(legacyElementFactory, factory.type);\n legacyElementFactory.isReactLegacyFactory = LEGACY_MARKER;\n legacyElementFactory.type = factory.type;\n return legacyElementFactory;\n};\n\n// This is used to mark a factory that will remain. E.g. we're allowed to call\n// it as a function. However, you're not suppose to pass it to createElement\n// or createFactory, so it will warn you if you do.\nReactLegacyElementFactory.markNonLegacyFactory = function(factory) {\n factory.isReactNonLegacyFactory = NON_LEGACY_MARKER;\n return factory;\n};\n\n// Checks if a factory function is actually a legacy factory pretending to\n// be a class.\nReactLegacyElementFactory.isValidFactory = function(factory) {\n // TODO: This will be removed and moved into a class validator or something.\n return typeof factory === 'function' &&\n factory.isReactLegacyFactory === LEGACY_MARKER;\n};\n\nReactLegacyElementFactory.isValidClass = function(factory) {\n if (\"production\" !== process.env.NODE_ENV) {\n (\"production\" !== process.env.NODE_ENV ? warning(\n false,\n 'isValidClass is deprecated and will be removed in a future release. ' +\n 'Use a more specific validator instead.'\n ) : null);\n }\n return ReactLegacyElementFactory.isValidFactory(factory);\n};\n\nReactLegacyElementFactory._isLegacyCallWarningEnabled = true;\n\nmodule.exports = ReactLegacyElementFactory;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/react/lib/ReactLegacyElement.js\n ** module id = 31\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactMount\n */\n\n\"use strict\";\n\nvar DOMProperty = require(\"./DOMProperty\");\nvar ReactBrowserEventEmitter = require(\"./ReactBrowserEventEmitter\");\nvar ReactCurrentOwner = require(\"./ReactCurrentOwner\");\nvar ReactElement = require(\"./ReactElement\");\nvar ReactLegacyElement = require(\"./ReactLegacyElement\");\nvar ReactInstanceHandles = require(\"./ReactInstanceHandles\");\nvar ReactPerf = require(\"./ReactPerf\");\n\nvar containsNode = require(\"./containsNode\");\nvar deprecated = require(\"./deprecated\");\nvar getReactRootElementInContainer = require(\"./getReactRootElementInContainer\");\nvar instantiateReactComponent = require(\"./instantiateReactComponent\");\nvar invariant = require(\"./invariant\");\nvar shouldUpdateReactComponent = require(\"./shouldUpdateReactComponent\");\nvar warning = require(\"./warning\");\n\nvar createElement = ReactLegacyElement.wrapCreateElement(\n ReactElement.createElement\n);\n\nvar SEPARATOR = ReactInstanceHandles.SEPARATOR;\n\nvar ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;\nvar nodeCache = {};\n\nvar ELEMENT_NODE_TYPE = 1;\nvar DOC_NODE_TYPE = 9;\n\n/** Mapping from reactRootID to React component instance. */\nvar instancesByReactRootID = {};\n\n/** Mapping from reactRootID to `container` nodes. */\nvar containersByReactRootID = {};\n\nif (\"production\" !== process.env.NODE_ENV) {\n /** __DEV__-only mapping from reactRootID to root elements. */\n var rootElementsByReactRootID = {};\n}\n\n// Used to store breadth-first search state in findComponentRoot.\nvar findComponentRootReusableArray = [];\n\n/**\n * @param {DOMElement} container DOM element that may contain a React component.\n * @return {?string} A \"reactRoot\" ID, if a React component is rendered.\n */\nfunction getReactRootID(container) {\n var rootElement = getReactRootElementInContainer(container);\n return rootElement && ReactMount.getID(rootElement);\n}\n\n/**\n * Accessing node[ATTR_NAME] or calling getAttribute(ATTR_NAME) on a form\n * element can return its control whose name or ID equals ATTR_NAME. All\n * DOM nodes support `getAttributeNode` but this can also get called on\n * other objects so just return '' if we're given something other than a\n * DOM node (such as window).\n *\n * @param {?DOMElement|DOMWindow|DOMDocument|DOMTextNode} node DOM node.\n * @return {string} ID of the supplied `domNode`.\n */\nfunction getID(node) {\n var id = internalGetID(node);\n if (id) {\n if (nodeCache.hasOwnProperty(id)) {\n var cached = nodeCache[id];\n if (cached !== node) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !isValid(cached, id),\n 'ReactMount: Two valid but unequal nodes with the same `%s`: %s',\n ATTR_NAME, id\n ) : invariant(!isValid(cached, id)));\n\n nodeCache[id] = node;\n }\n } else {\n nodeCache[id] = node;\n }\n }\n\n return id;\n}\n\nfunction internalGetID(node) {\n // If node is something like a window, document, or text node, none of\n // which support attributes or a .getAttribute method, gracefully return\n // the empty string, as if the attribute were missing.\n return node && node.getAttribute && node.getAttribute(ATTR_NAME) || '';\n}\n\n/**\n * Sets the React-specific ID of the given node.\n *\n * @param {DOMElement} node The DOM node whose ID will be set.\n * @param {string} id The value of the ID attribute.\n */\nfunction setID(node, id) {\n var oldID = internalGetID(node);\n if (oldID !== id) {\n delete nodeCache[oldID];\n }\n node.setAttribute(ATTR_NAME, id);\n nodeCache[id] = node;\n}\n\n/**\n * Finds the node with the supplied React-generated DOM ID.\n *\n * @param {string} id A React-generated DOM ID.\n * @return {DOMElement} DOM node with the suppled `id`.\n * @internal\n */\nfunction getNode(id) {\n if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) {\n nodeCache[id] = ReactMount.findReactNodeByID(id);\n }\n return nodeCache[id];\n}\n\n/**\n * A node is \"valid\" if it is contained by a currently mounted container.\n *\n * This means that the node does not have to be contained by a document in\n * order to be considered valid.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @param {string} id The expected ID of the node.\n * @return {boolean} Whether the node is contained by a mounted container.\n */\nfunction isValid(node, id) {\n if (node) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n internalGetID(node) === id,\n 'ReactMount: Unexpected modification of `%s`',\n ATTR_NAME\n ) : invariant(internalGetID(node) === id));\n\n var container = ReactMount.findReactContainerForID(id);\n if (container && containsNode(container, node)) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Causes the cache to forget about one React-specific ID.\n *\n * @param {string} id The ID to forget.\n */\nfunction purgeID(id) {\n delete nodeCache[id];\n}\n\nvar deepestNodeSoFar = null;\nfunction findDeepestCachedAncestorImpl(ancestorID) {\n var ancestor = nodeCache[ancestorID];\n if (ancestor && isValid(ancestor, ancestorID)) {\n deepestNodeSoFar = ancestor;\n } else {\n // This node isn't populated in the cache, so presumably none of its\n // descendants are. Break out of the loop.\n return false;\n }\n}\n\n/**\n * Return the deepest cached node whose ID is a prefix of `targetID`.\n */\nfunction findDeepestCachedAncestor(targetID) {\n deepestNodeSoFar = null;\n ReactInstanceHandles.traverseAncestors(\n targetID,\n findDeepestCachedAncestorImpl\n );\n\n var foundNode = deepestNodeSoFar;\n deepestNodeSoFar = null;\n return foundNode;\n}\n\n/**\n * Mounting is the process of initializing a React component by creatings its\n * representative DOM elements and inserting them into a supplied `container`.\n * Any prior content inside `container` is destroyed in the process.\n *\n * ReactMount.render(\n * component,\n * document.getElementById('container')\n * );\n *\n *
<-- Supplied `container`.\n *
<-- Rendered reactRoot of React\n * // ... component.\n *
\n *
\n *\n * Inside of `container`, the first element rendered is the \"reactRoot\".\n */\nvar ReactMount = {\n /** Exposed for debugging purposes **/\n _instancesByReactRootID: instancesByReactRootID,\n\n /**\n * This is a hook provided to support rendering React components while\n * ensuring that the apparent scroll position of its `container` does not\n * change.\n *\n * @param {DOMElement} container The `container` being rendered into.\n * @param {function} renderCallback This must be called once to do the render.\n */\n scrollMonitor: function(container, renderCallback) {\n renderCallback();\n },\n\n /**\n * Take a component that's already mounted into the DOM and replace its props\n * @param {ReactComponent} prevComponent component instance already in the DOM\n * @param {ReactComponent} nextComponent component instance to render\n * @param {DOMElement} container container to render into\n * @param {?function} callback function triggered on completion\n */\n _updateRootComponent: function(\n prevComponent,\n nextComponent,\n container,\n callback) {\n var nextProps = nextComponent.props;\n ReactMount.scrollMonitor(container, function() {\n prevComponent.replaceProps(nextProps, callback);\n });\n\n if (\"production\" !== process.env.NODE_ENV) {\n // Record the root element in case it later gets transplanted.\n rootElementsByReactRootID[getReactRootID(container)] =\n getReactRootElementInContainer(container);\n }\n\n return prevComponent;\n },\n\n /**\n * Register a component into the instance map and starts scroll value\n * monitoring\n * @param {ReactComponent} nextComponent component instance to render\n * @param {DOMElement} container container to render into\n * @return {string} reactRoot ID prefix\n */\n _registerComponent: function(nextComponent, container) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n container && (\n container.nodeType === ELEMENT_NODE_TYPE ||\n container.nodeType === DOC_NODE_TYPE\n ),\n '_registerComponent(...): Target container is not a DOM element.'\n ) : invariant(container && (\n container.nodeType === ELEMENT_NODE_TYPE ||\n container.nodeType === DOC_NODE_TYPE\n )));\n\n ReactBrowserEventEmitter.ensureScrollValueMonitoring();\n\n var reactRootID = ReactMount.registerContainer(container);\n instancesByReactRootID[reactRootID] = nextComponent;\n return reactRootID;\n },\n\n /**\n * Render a new component into the DOM.\n * @param {ReactComponent} nextComponent component instance to render\n * @param {DOMElement} container container to render into\n * @param {boolean} shouldReuseMarkup if we should skip the markup insertion\n * @return {ReactComponent} nextComponent\n */\n _renderNewRootComponent: ReactPerf.measure(\n 'ReactMount',\n '_renderNewRootComponent',\n function(\n nextComponent,\n container,\n shouldReuseMarkup) {\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case.\n (\"production\" !== process.env.NODE_ENV ? warning(\n ReactCurrentOwner.current == null,\n '_renderNewRootComponent(): Render methods should be a pure function ' +\n 'of props and state; triggering nested component updates from ' +\n 'render is not allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n var componentInstance = instantiateReactComponent(nextComponent, null);\n var reactRootID = ReactMount._registerComponent(\n componentInstance,\n container\n );\n componentInstance.mountComponentIntoNode(\n reactRootID,\n container,\n shouldReuseMarkup\n );\n\n if (\"production\" !== process.env.NODE_ENV) {\n // Record the root element in case it later gets transplanted.\n rootElementsByReactRootID[reactRootID] =\n getReactRootElementInContainer(container);\n }\n\n return componentInstance;\n }\n ),\n\n /**\n * Renders a React component into the DOM in the supplied `container`.\n *\n * If the React component was previously rendered into `container`, this will\n * perform an update on it and only mutate the DOM as necessary to reflect the\n * latest React component.\n *\n * @param {ReactElement} nextElement Component element to render.\n * @param {DOMElement} container DOM element to render into.\n * @param {?function} callback function triggered on completion\n * @return {ReactComponent} Component instance rendered in `container`.\n */\n render: function(nextElement, container, callback) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n ReactElement.isValidElement(nextElement),\n 'renderComponent(): Invalid component element.%s',\n (\n typeof nextElement === 'string' ?\n ' Instead of passing an element string, make sure to instantiate ' +\n 'it by passing it to React.createElement.' :\n ReactLegacyElement.isValidFactory(nextElement) ?\n ' Instead of passing a component class, make sure to instantiate ' +\n 'it by passing it to React.createElement.' :\n // Check if it quacks like a element\n typeof nextElement.props !== \"undefined\" ?\n ' This may be caused by unintentionally loading two independent ' +\n 'copies of React.' :\n ''\n )\n ) : invariant(ReactElement.isValidElement(nextElement)));\n\n var prevComponent = instancesByReactRootID[getReactRootID(container)];\n\n if (prevComponent) {\n var prevElement = prevComponent._currentElement;\n if (shouldUpdateReactComponent(prevElement, nextElement)) {\n return ReactMount._updateRootComponent(\n prevComponent,\n nextElement,\n container,\n callback\n );\n } else {\n ReactMount.unmountComponentAtNode(container);\n }\n }\n\n var reactRootElement = getReactRootElementInContainer(container);\n var containerHasReactMarkup =\n reactRootElement && ReactMount.isRenderedByReact(reactRootElement);\n\n var shouldReuseMarkup = containerHasReactMarkup && !prevComponent;\n\n var component = ReactMount._renderNewRootComponent(\n nextElement,\n container,\n shouldReuseMarkup\n );\n callback && callback.call(component);\n return component;\n },\n\n /**\n * Constructs a component instance of `constructor` with `initialProps` and\n * renders it into the supplied `container`.\n *\n * @param {function} constructor React component constructor.\n * @param {?object} props Initial props of the component instance.\n * @param {DOMElement} container DOM element to render into.\n * @return {ReactComponent} Component instance rendered in `container`.\n */\n constructAndRenderComponent: function(constructor, props, container) {\n var element = createElement(constructor, props);\n return ReactMount.render(element, container);\n },\n\n /**\n * Constructs a component instance of `constructor` with `initialProps` and\n * renders it into a container node identified by supplied `id`.\n *\n * @param {function} componentConstructor React component constructor\n * @param {?object} props Initial props of the component instance.\n * @param {string} id ID of the DOM element to render into.\n * @return {ReactComponent} Component instance rendered in the container node.\n */\n constructAndRenderComponentByID: function(constructor, props, id) {\n var domNode = document.getElementById(id);\n (\"production\" !== process.env.NODE_ENV ? invariant(\n domNode,\n 'Tried to get element with id of \"%s\" but it is not present on the page.',\n id\n ) : invariant(domNode));\n return ReactMount.constructAndRenderComponent(constructor, props, domNode);\n },\n\n /**\n * Registers a container node into which React components will be rendered.\n * This also creates the \"reactRoot\" ID that will be assigned to the element\n * rendered within.\n *\n * @param {DOMElement} container DOM element to register as a container.\n * @return {string} The \"reactRoot\" ID of elements rendered within.\n */\n registerContainer: function(container) {\n var reactRootID = getReactRootID(container);\n if (reactRootID) {\n // If one exists, make sure it is a valid \"reactRoot\" ID.\n reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID);\n }\n if (!reactRootID) {\n // No valid \"reactRoot\" ID found, create one.\n reactRootID = ReactInstanceHandles.createReactRootID();\n }\n containersByReactRootID[reactRootID] = container;\n return reactRootID;\n },\n\n /**\n * Unmounts and destroys the React component rendered in the `container`.\n *\n * @param {DOMElement} container DOM element containing a React component.\n * @return {boolean} True if a component was found in and unmounted from\n * `container`\n */\n unmountComponentAtNode: function(container) {\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (Strictly speaking, unmounting won't cause a\n // render but we still don't expect to be in a render call here.)\n (\"production\" !== process.env.NODE_ENV ? warning(\n ReactCurrentOwner.current == null,\n 'unmountComponentAtNode(): Render methods should be a pure function of ' +\n 'props and state; triggering nested component updates from render is ' +\n 'not allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n var reactRootID = getReactRootID(container);\n var component = instancesByReactRootID[reactRootID];\n if (!component) {\n return false;\n }\n ReactMount.unmountComponentFromNode(component, container);\n delete instancesByReactRootID[reactRootID];\n delete containersByReactRootID[reactRootID];\n if (\"production\" !== process.env.NODE_ENV) {\n delete rootElementsByReactRootID[reactRootID];\n }\n return true;\n },\n\n /**\n * Unmounts a component and removes it from the DOM.\n *\n * @param {ReactComponent} instance React component instance.\n * @param {DOMElement} container DOM element to unmount from.\n * @final\n * @internal\n * @see {ReactMount.unmountComponentAtNode}\n */\n unmountComponentFromNode: function(instance, container) {\n instance.unmountComponent();\n\n if (container.nodeType === DOC_NODE_TYPE) {\n container = container.documentElement;\n }\n\n // http://jsperf.com/emptying-a-node\n while (container.lastChild) {\n container.removeChild(container.lastChild);\n }\n },\n\n /**\n * Finds the container DOM element that contains React component to which the\n * supplied DOM `id` belongs.\n *\n * @param {string} id The ID of an element rendered by a React component.\n * @return {?DOMElement} DOM element that contains the `id`.\n */\n findReactContainerForID: function(id) {\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id);\n var container = containersByReactRootID[reactRootID];\n\n if (\"production\" !== process.env.NODE_ENV) {\n var rootElement = rootElementsByReactRootID[reactRootID];\n if (rootElement && rootElement.parentNode !== container) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n // Call internalGetID here because getID calls isValid which calls\n // findReactContainerForID (this function).\n internalGetID(rootElement) === reactRootID,\n 'ReactMount: Root element ID differed from reactRootID.'\n ) : invariant(// Call internalGetID here because getID calls isValid which calls\n // findReactContainerForID (this function).\n internalGetID(rootElement) === reactRootID));\n\n var containerChild = container.firstChild;\n if (containerChild &&\n reactRootID === internalGetID(containerChild)) {\n // If the container has a new child with the same ID as the old\n // root element, then rootElementsByReactRootID[reactRootID] is\n // just stale and needs to be updated. The case that deserves a\n // warning is when the container is empty.\n rootElementsByReactRootID[reactRootID] = containerChild;\n } else {\n console.warn(\n 'ReactMount: Root element has been removed from its original ' +\n 'container. New container:', rootElement.parentNode\n );\n }\n }\n }\n\n return container;\n },\n\n /**\n * Finds an element rendered by React with the supplied ID.\n *\n * @param {string} id ID of a DOM node in the React component.\n * @return {DOMElement} Root DOM node of the React component.\n */\n findReactNodeByID: function(id) {\n var reactRoot = ReactMount.findReactContainerForID(id);\n return ReactMount.findComponentRoot(reactRoot, id);\n },\n\n /**\n * True if the supplied `node` is rendered by React.\n *\n * @param {*} node DOM Element to check.\n * @return {boolean} True if the DOM Element appears to be rendered by React.\n * @internal\n */\n isRenderedByReact: function(node) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n return false;\n }\n var id = ReactMount.getID(node);\n return id ? id.charAt(0) === SEPARATOR : false;\n },\n\n /**\n * Traverses up the ancestors of the supplied node to find a node that is a\n * DOM representation of a React component.\n *\n * @param {*} node\n * @return {?DOMEventTarget}\n * @internal\n */\n getFirstReactDOM: function(node) {\n var current = node;\n while (current && current.parentNode !== current) {\n if (ReactMount.isRenderedByReact(current)) {\n return current;\n }\n current = current.parentNode;\n }\n return null;\n },\n\n /**\n * Finds a node with the supplied `targetID` inside of the supplied\n * `ancestorNode`. Exploits the ID naming scheme to perform the search\n * quickly.\n *\n * @param {DOMEventTarget} ancestorNode Search from this root.\n * @pararm {string} targetID ID of the DOM representation of the component.\n * @return {DOMEventTarget} DOM node with the supplied `targetID`.\n * @internal\n */\n findComponentRoot: function(ancestorNode, targetID) {\n var firstChildren = findComponentRootReusableArray;\n var childIndex = 0;\n\n var deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode;\n\n firstChildren[0] = deepestAncestor.firstChild;\n firstChildren.length = 1;\n\n while (childIndex < firstChildren.length) {\n var child = firstChildren[childIndex++];\n var targetChild;\n\n while (child) {\n var childID = ReactMount.getID(child);\n if (childID) {\n // Even if we find the node we're looking for, we finish looping\n // through its siblings to ensure they're cached so that we don't have\n // to revisit this node again. Otherwise, we make n^2 calls to getID\n // when visiting the many children of a single node in order.\n\n if (targetID === childID) {\n targetChild = child;\n } else if (ReactInstanceHandles.isAncestorIDOf(childID, targetID)) {\n // If we find a child whose ID is an ancestor of the given ID,\n // then we can be sure that we only want to search the subtree\n // rooted at this child, so we can throw out the rest of the\n // search state.\n firstChildren.length = childIndex = 0;\n firstChildren.push(child.firstChild);\n }\n\n } else {\n // If this child had no ID, then there's a chance that it was\n // injected automatically by the browser, as when a `
`\n // element sprouts an extra `` child as a side effect of\n // `.innerHTML` parsing. Optimistically continue down this\n // branch, but not before examining the other siblings.\n firstChildren.push(child.firstChild);\n }\n\n child = child.nextSibling;\n }\n\n if (targetChild) {\n // Emptying firstChildren/findComponentRootReusableArray is\n // not necessary for correctness, but it helps the GC reclaim\n // any nodes that were left at the end of the search.\n firstChildren.length = 0;\n\n return targetChild;\n }\n }\n\n firstChildren.length = 0;\n\n (\"production\" !== process.env.NODE_ENV ? invariant(\n false,\n 'findComponentRoot(..., %s): Unable to find element. This probably ' +\n 'means the DOM was unexpectedly mutated (e.g., by the browser), ' +\n 'usually due to forgetting a when using tables, nesting tags ' +\n 'like