/**1* React (with addons) v0.13.32*/3(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){4/**5* Copyright 2013-2015, Facebook, Inc.6* All rights reserved.7*8* This source code is licensed under the BSD-style license found in the9* LICENSE file in the root directory of this source tree. An additional grant10* of patent rights can be found in the PATENTS file in the same directory.11*12* @providesModule ReactWithAddons13*/1415/**16* This module exists purely in the open source project, and is meant as a way17* to create a separate standalone build of React. This build has "addons", or18* functionality we've built and think might be useful but doesn't have a good19* place to live inside React core.20*/2122'use strict';2324var LinkedStateMixin = _dereq_(25);25var React = _dereq_(31);26var ReactComponentWithPureRenderMixin =27_dereq_(42);28var ReactCSSTransitionGroup = _dereq_(34);29var ReactFragment = _dereq_(69);30var ReactTransitionGroup = _dereq_(98);31var ReactUpdates = _dereq_(100);3233var cx = _dereq_(127);34var cloneWithProps = _dereq_(122);35var update = _dereq_(170);3637React.addons = {38CSSTransitionGroup: ReactCSSTransitionGroup,39LinkedStateMixin: LinkedStateMixin,40PureRenderMixin: ReactComponentWithPureRenderMixin,41TransitionGroup: ReactTransitionGroup,4243batchedUpdates: ReactUpdates.batchedUpdates,44classSet: cx,45cloneWithProps: cloneWithProps,46createFragment: ReactFragment.create,47update: update48};4950if ("production" !== "development") {51React.addons.Perf = _dereq_(61);52React.addons.TestUtils = _dereq_(95);53}5455module.exports = React;5657},{"100":100,"122":122,"127":127,"170":170,"25":25,"31":31,"34":34,"42":42,"61":61,"69":69,"95":95,"98":98}],2:[function(_dereq_,module,exports){58/**59* Copyright 2013-2015, Facebook, Inc.60* All rights reserved.61*62* This source code is licensed under the BSD-style license found in the63* LICENSE file in the root directory of this source tree. An additional grant64* of patent rights can be found in the PATENTS file in the same directory.65*66* @providesModule AutoFocusMixin67* @typechecks static-only68*/6970'use strict';7172var focusNode = _dereq_(134);7374var AutoFocusMixin = {75componentDidMount: function() {76if (this.props.autoFocus) {77focusNode(this.getDOMNode());78}79}80};8182module.exports = AutoFocusMixin;8384},{"134":134}],3:[function(_dereq_,module,exports){85/**86* Copyright 2013-2015 Facebook, Inc.87* All rights reserved.88*89* This source code is licensed under the BSD-style license found in the90* LICENSE file in the root directory of this source tree. An additional grant91* of patent rights can be found in the PATENTS file in the same directory.92*93* @providesModule BeforeInputEventPlugin94* @typechecks static-only95*/9697'use strict';9899var EventConstants = _dereq_(16);100var EventPropagators = _dereq_(21);101var ExecutionEnvironment = _dereq_(22);102var FallbackCompositionState = _dereq_(23);103var SyntheticCompositionEvent = _dereq_(106);104var SyntheticInputEvent = _dereq_(110);105106var keyOf = _dereq_(157);107108var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space109var START_KEYCODE = 229;110111var canUseCompositionEvent = (112ExecutionEnvironment.canUseDOM &&113'CompositionEvent' in window114);115116var documentMode = null;117if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {118documentMode = document.documentMode;119}120121// Webkit offers a very useful `textInput` event that can be used to122// directly represent `beforeInput`. The IE `textinput` event is not as123// useful, so we don't use it.124var canUseTextInputEvent = (125ExecutionEnvironment.canUseDOM &&126'TextEvent' in window &&127!documentMode &&128!isPresto()129);130131// In IE9+, we have access to composition events, but the data supplied132// by the native compositionend event may be incorrect. Japanese ideographic133// spaces, for instance (\u3000) are not recorded correctly.134var useFallbackCompositionData = (135ExecutionEnvironment.canUseDOM &&136(137(!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11)138)139);140141/**142* Opera <= 12 includes TextEvent in window, but does not fire143* text input events. Rely on keypress instead.144*/145function isPresto() {146var opera = window.opera;147return (148typeof opera === 'object' &&149typeof opera.version === 'function' &&150parseInt(opera.version(), 10) <= 12151);152}153154var SPACEBAR_CODE = 32;155var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);156157var topLevelTypes = EventConstants.topLevelTypes;158159// Events and their corresponding property names.160var eventTypes = {161beforeInput: {162phasedRegistrationNames: {163bubbled: keyOf({onBeforeInput: null}),164captured: keyOf({onBeforeInputCapture: null})165},166dependencies: [167topLevelTypes.topCompositionEnd,168topLevelTypes.topKeyPress,169topLevelTypes.topTextInput,170topLevelTypes.topPaste171]172},173compositionEnd: {174phasedRegistrationNames: {175bubbled: keyOf({onCompositionEnd: null}),176captured: keyOf({onCompositionEndCapture: null})177},178dependencies: [179topLevelTypes.topBlur,180topLevelTypes.topCompositionEnd,181topLevelTypes.topKeyDown,182topLevelTypes.topKeyPress,183topLevelTypes.topKeyUp,184topLevelTypes.topMouseDown185]186},187compositionStart: {188phasedRegistrationNames: {189bubbled: keyOf({onCompositionStart: null}),190captured: keyOf({onCompositionStartCapture: null})191},192dependencies: [193topLevelTypes.topBlur,194topLevelTypes.topCompositionStart,195topLevelTypes.topKeyDown,196topLevelTypes.topKeyPress,197topLevelTypes.topKeyUp,198topLevelTypes.topMouseDown199]200},201compositionUpdate: {202phasedRegistrationNames: {203bubbled: keyOf({onCompositionUpdate: null}),204captured: keyOf({onCompositionUpdateCapture: null})205},206dependencies: [207topLevelTypes.topBlur,208topLevelTypes.topCompositionUpdate,209topLevelTypes.topKeyDown,210topLevelTypes.topKeyPress,211topLevelTypes.topKeyUp,212topLevelTypes.topMouseDown213]214}215};216217// Track whether we've ever handled a keypress on the space key.218var hasSpaceKeypress = false;219220/**221* Return whether a native keypress event is assumed to be a command.222* This is required because Firefox fires `keypress` events for key commands223* (cut, copy, select-all, etc.) even though no character is inserted.224*/225function isKeypressCommand(nativeEvent) {226return (227(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&228// ctrlKey && altKey is equivalent to AltGr, and is not a command.229!(nativeEvent.ctrlKey && nativeEvent.altKey)230);231}232233234/**235* Translate native top level events into event types.236*237* @param {string} topLevelType238* @return {object}239*/240function getCompositionEventType(topLevelType) {241switch (topLevelType) {242case topLevelTypes.topCompositionStart:243return eventTypes.compositionStart;244case topLevelTypes.topCompositionEnd:245return eventTypes.compositionEnd;246case topLevelTypes.topCompositionUpdate:247return eventTypes.compositionUpdate;248}249}250251/**252* Does our fallback best-guess model think this event signifies that253* composition has begun?254*255* @param {string} topLevelType256* @param {object} nativeEvent257* @return {boolean}258*/259function isFallbackCompositionStart(topLevelType, nativeEvent) {260return (261topLevelType === topLevelTypes.topKeyDown &&262nativeEvent.keyCode === START_KEYCODE263);264}265266/**267* Does our fallback mode think that this event is the end of composition?268*269* @param {string} topLevelType270* @param {object} nativeEvent271* @return {boolean}272*/273function isFallbackCompositionEnd(topLevelType, nativeEvent) {274switch (topLevelType) {275case topLevelTypes.topKeyUp:276// Command keys insert or clear IME input.277return (END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1);278case topLevelTypes.topKeyDown:279// Expect IME keyCode on each keydown. If we get any other280// code we must have exited earlier.281return (nativeEvent.keyCode !== START_KEYCODE);282case topLevelTypes.topKeyPress:283case topLevelTypes.topMouseDown:284case topLevelTypes.topBlur:285// Events are not possible without cancelling IME.286return true;287default:288return false;289}290}291292/**293* Google Input Tools provides composition data via a CustomEvent,294* with the `data` property populated in the `detail` object. If this295* is available on the event object, use it. If not, this is a plain296* composition event and we have nothing special to extract.297*298* @param {object} nativeEvent299* @return {?string}300*/301function getDataFromCustomEvent(nativeEvent) {302var detail = nativeEvent.detail;303if (typeof detail === 'object' && 'data' in detail) {304return detail.data;305}306return null;307}308309// Track the current IME composition fallback object, if any.310var currentComposition = null;311312/**313* @param {string} topLevelType Record from `EventConstants`.314* @param {DOMEventTarget} topLevelTarget The listening component root node.315* @param {string} topLevelTargetID ID of `topLevelTarget`.316* @param {object} nativeEvent Native browser event.317* @return {?object} A SyntheticCompositionEvent.318*/319function extractCompositionEvent(320topLevelType,321topLevelTarget,322topLevelTargetID,323nativeEvent324) {325var eventType;326var fallbackData;327328if (canUseCompositionEvent) {329eventType = getCompositionEventType(topLevelType);330} else if (!currentComposition) {331if (isFallbackCompositionStart(topLevelType, nativeEvent)) {332eventType = eventTypes.compositionStart;333}334} else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {335eventType = eventTypes.compositionEnd;336}337338if (!eventType) {339return null;340}341342if (useFallbackCompositionData) {343// The current composition is stored statically and must not be344// overwritten while composition continues.345if (!currentComposition && eventType === eventTypes.compositionStart) {346currentComposition = FallbackCompositionState.getPooled(topLevelTarget);347} else if (eventType === eventTypes.compositionEnd) {348if (currentComposition) {349fallbackData = currentComposition.getData();350}351}352}353354var event = SyntheticCompositionEvent.getPooled(355eventType,356topLevelTargetID,357nativeEvent358);359360if (fallbackData) {361// Inject data generated from fallback path into the synthetic event.362// This matches the property of native CompositionEventInterface.363event.data = fallbackData;364} else {365var customData = getDataFromCustomEvent(nativeEvent);366if (customData !== null) {367event.data = customData;368}369}370371EventPropagators.accumulateTwoPhaseDispatches(event);372return event;373}374375/**376* @param {string} topLevelType Record from `EventConstants`.377* @param {object} nativeEvent Native browser event.378* @return {?string} The string corresponding to this `beforeInput` event.379*/380function getNativeBeforeInputChars(topLevelType, nativeEvent) {381switch (topLevelType) {382case topLevelTypes.topCompositionEnd:383return getDataFromCustomEvent(nativeEvent);384case topLevelTypes.topKeyPress:385/**386* If native `textInput` events are available, our goal is to make387* use of them. However, there is a special case: the spacebar key.388* In Webkit, preventing default on a spacebar `textInput` event389* cancels character insertion, but it *also* causes the browser390* to fall back to its default spacebar behavior of scrolling the391* page.392*393* Tracking at:394* https://code.google.com/p/chromium/issues/detail?id=355103395*396* To avoid this issue, use the keypress event as if no `textInput`397* event is available.398*/399var which = nativeEvent.which;400if (which !== SPACEBAR_CODE) {401return null;402}403404hasSpaceKeypress = true;405return SPACEBAR_CHAR;406407case topLevelTypes.topTextInput:408// Record the characters to be added to the DOM.409var chars = nativeEvent.data;410411// If it's a spacebar character, assume that we have already handled412// it at the keypress level and bail immediately. Android Chrome413// doesn't give us keycodes, so we need to blacklist it.414if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {415return null;416}417418return chars;419420default:421// For other native event types, do nothing.422return null;423}424}425426/**427* For browsers that do not provide the `textInput` event, extract the428* appropriate string to use for SyntheticInputEvent.429*430* @param {string} topLevelType Record from `EventConstants`.431* @param {object} nativeEvent Native browser event.432* @return {?string} The fallback string for this `beforeInput` event.433*/434function getFallbackBeforeInputChars(topLevelType, nativeEvent) {435// If we are currently composing (IME) and using a fallback to do so,436// try to extract the composed characters from the fallback object.437if (currentComposition) {438if (439topLevelType === topLevelTypes.topCompositionEnd ||440isFallbackCompositionEnd(topLevelType, nativeEvent)441) {442var chars = currentComposition.getData();443FallbackCompositionState.release(currentComposition);444currentComposition = null;445return chars;446}447return null;448}449450switch (topLevelType) {451case topLevelTypes.topPaste:452// If a paste event occurs after a keypress, throw out the input453// chars. Paste events should not lead to BeforeInput events.454return null;455case topLevelTypes.topKeyPress:456/**457* As of v27, Firefox may fire keypress events even when no character458* will be inserted. A few possibilities:459*460* - `which` is `0`. Arrow keys, Esc key, etc.461*462* - `which` is the pressed key code, but no char is available.463* Ex: 'AltGr + d` in Polish. There is no modified character for464* this key combination and no character is inserted into the465* document, but FF fires the keypress for char code `100` anyway.466* No `input` event will occur.467*468* - `which` is the pressed key code, but a command combination is469* being used. Ex: `Cmd+C`. No character is inserted, and no470* `input` event will occur.471*/472if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {473return String.fromCharCode(nativeEvent.which);474}475return null;476case topLevelTypes.topCompositionEnd:477return useFallbackCompositionData ? null : nativeEvent.data;478default:479return null;480}481}482483/**484* Extract a SyntheticInputEvent for `beforeInput`, based on either native485* `textInput` or fallback behavior.486*487* @param {string} topLevelType Record from `EventConstants`.488* @param {DOMEventTarget} topLevelTarget The listening component root node.489* @param {string} topLevelTargetID ID of `topLevelTarget`.490* @param {object} nativeEvent Native browser event.491* @return {?object} A SyntheticInputEvent.492*/493function extractBeforeInputEvent(494topLevelType,495topLevelTarget,496topLevelTargetID,497nativeEvent498) {499var chars;500501if (canUseTextInputEvent) {502chars = getNativeBeforeInputChars(topLevelType, nativeEvent);503} else {504chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);505}506507// If no characters are being inserted, no BeforeInput event should508// be fired.509if (!chars) {510return null;511}512513var event = SyntheticInputEvent.getPooled(514eventTypes.beforeInput,515topLevelTargetID,516nativeEvent517);518519event.data = chars;520EventPropagators.accumulateTwoPhaseDispatches(event);521return event;522}523524/**525* Create an `onBeforeInput` event to match526* http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.527*528* This event plugin is based on the native `textInput` event529* available in Chrome, Safari, Opera, and IE. This event fires after530* `onKeyPress` and `onCompositionEnd`, but before `onInput`.531*532* `beforeInput` is spec'd but not implemented in any browsers, and533* the `input` event does not provide any useful information about what has534* actually been added, contrary to the spec. Thus, `textInput` is the best535* available event to identify the characters that have actually been inserted536* into the target node.537*538* This plugin is also responsible for emitting `composition` events, thus539* allowing us to share composition fallback code for both `beforeInput` and540* `composition` event types.541*/542var BeforeInputEventPlugin = {543544eventTypes: eventTypes,545546/**547* @param {string} topLevelType Record from `EventConstants`.548* @param {DOMEventTarget} topLevelTarget The listening component root node.549* @param {string} topLevelTargetID ID of `topLevelTarget`.550* @param {object} nativeEvent Native browser event.551* @return {*} An accumulation of synthetic events.552* @see {EventPluginHub.extractEvents}553*/554extractEvents: function(555topLevelType,556topLevelTarget,557topLevelTargetID,558nativeEvent559) {560return [561extractCompositionEvent(562topLevelType,563topLevelTarget,564topLevelTargetID,565nativeEvent566),567extractBeforeInputEvent(568topLevelType,569topLevelTarget,570topLevelTargetID,571nativeEvent572)573];574}575};576577module.exports = BeforeInputEventPlugin;578579},{"106":106,"110":110,"157":157,"16":16,"21":21,"22":22,"23":23}],4:[function(_dereq_,module,exports){580/**581* Copyright 2013-2015, Facebook, Inc.582* All rights reserved.583*584* This source code is licensed under the BSD-style license found in the585* LICENSE file in the root directory of this source tree. An additional grant586* of patent rights can be found in the PATENTS file in the same directory.587*588* @providesModule CSSCore589* @typechecks590*/591592var invariant = _dereq_(150);593594/**595* The CSSCore module specifies the API (and implements most of the methods)596* that should be used when dealing with the display of elements (via their597* CSS classes and visibility on screen. It is an API focused on mutating the598* display and not reading it as no logical state should be encoded in the599* display of elements.600*/601602var CSSCore = {603604/**605* Adds the class passed in to the element if it doesn't already have it.606*607* @param {DOMElement} element the element to set the class on608* @param {string} className the CSS className609* @return {DOMElement} the element passed in610*/611addClass: function(element, className) {612("production" !== "development" ? invariant(613!/\s/.test(className),614'CSSCore.addClass takes only a single class name. "%s" contains ' +615'multiple classes.', className616) : invariant(!/\s/.test(className)));617618if (className) {619if (element.classList) {620element.classList.add(className);621} else if (!CSSCore.hasClass(element, className)) {622element.className = element.className + ' ' + className;623}624}625return element;626},627628/**629* Removes the class passed in from the element630*631* @param {DOMElement} element the element to set the class on632* @param {string} className the CSS className633* @return {DOMElement} the element passed in634*/635removeClass: function(element, className) {636("production" !== "development" ? invariant(637!/\s/.test(className),638'CSSCore.removeClass takes only a single class name. "%s" contains ' +639'multiple classes.', className640) : invariant(!/\s/.test(className)));641642if (className) {643if (element.classList) {644element.classList.remove(className);645} else if (CSSCore.hasClass(element, className)) {646element.className = element.className647.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1')648.replace(/\s+/g, ' ') // multiple spaces to one649.replace(/^\s*|\s*$/g, ''); // trim the ends650}651}652return element;653},654655/**656* Helper to add or remove a class from an element based on a condition.657*658* @param {DOMElement} element the element to set the class on659* @param {string} className the CSS className660* @param {*} bool condition to whether to add or remove the class661* @return {DOMElement} the element passed in662*/663conditionClass: function(element, className, bool) {664return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className);665},666667/**668* Tests whether the element has the class specified.669*670* @param {DOMNode|DOMWindow} element the element to set the class on671* @param {string} className the CSS className672* @return {boolean} true if the element has the class, false if not673*/674hasClass: function(element, className) {675("production" !== "development" ? invariant(676!/\s/.test(className),677'CSS.hasClass takes only a single class name.'678) : invariant(!/\s/.test(className)));679if (element.classList) {680return !!className && element.classList.contains(className);681}682return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1;683}684685};686687module.exports = CSSCore;688689},{"150":150}],5:[function(_dereq_,module,exports){690/**691* Copyright 2013-2015, Facebook, Inc.692* All rights reserved.693*694* This source code is licensed under the BSD-style license found in the695* LICENSE file in the root directory of this source tree. An additional grant696* of patent rights can be found in the PATENTS file in the same directory.697*698* @providesModule CSSProperty699*/700701'use strict';702703/**704* CSS properties which accept numbers but are not in units of "px".705*/706var isUnitlessNumber = {707boxFlex: true,708boxFlexGroup: true,709columnCount: true,710flex: true,711flexGrow: true,712flexPositive: true,713flexShrink: true,714flexNegative: true,715fontWeight: true,716lineClamp: true,717lineHeight: true,718opacity: true,719order: true,720orphans: true,721widows: true,722zIndex: true,723zoom: true,724725// SVG-related properties726fillOpacity: true,727strokeDashoffset: true,728strokeOpacity: true,729strokeWidth: true730};731732/**733* @param {string} prefix vendor-specific prefix, eg: Webkit734* @param {string} key style name, eg: transitionDuration735* @return {string} style name prefixed with `prefix`, properly camelCased, eg:736* WebkitTransitionDuration737*/738function prefixKey(prefix, key) {739return prefix + key.charAt(0).toUpperCase() + key.substring(1);740}741742/**743* Support style names that may come passed in prefixed by adding permutations744* of vendor prefixes.745*/746var prefixes = ['Webkit', 'ms', 'Moz', 'O'];747748// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an749// infinite loop, because it iterates over the newly added props too.750Object.keys(isUnitlessNumber).forEach(function(prop) {751prefixes.forEach(function(prefix) {752isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];753});754});755756/**757* Most style properties can be unset by doing .style[prop] = '' but IE8758* doesn't like doing that with shorthand properties so for the properties that759* IE8 breaks on, which are listed here, we instead unset each of the760* individual properties. See http://bugs.jquery.com/ticket/12385.761* The 4-value 'clock' properties like margin, padding, border-width seem to762* behave without any problems. Curiously, list-style works too without any763* special prodding.764*/765var shorthandPropertyExpansions = {766background: {767backgroundImage: true,768backgroundPosition: true,769backgroundRepeat: true,770backgroundColor: true771},772border: {773borderWidth: true,774borderStyle: true,775borderColor: true776},777borderBottom: {778borderBottomWidth: true,779borderBottomStyle: true,780borderBottomColor: true781},782borderLeft: {783borderLeftWidth: true,784borderLeftStyle: true,785borderLeftColor: true786},787borderRight: {788borderRightWidth: true,789borderRightStyle: true,790borderRightColor: true791},792borderTop: {793borderTopWidth: true,794borderTopStyle: true,795borderTopColor: true796},797font: {798fontStyle: true,799fontVariant: true,800fontWeight: true,801fontSize: true,802lineHeight: true,803fontFamily: true804}805};806807var CSSProperty = {808isUnitlessNumber: isUnitlessNumber,809shorthandPropertyExpansions: shorthandPropertyExpansions810};811812module.exports = CSSProperty;813814},{}],6:[function(_dereq_,module,exports){815/**816* Copyright 2013-2015, Facebook, Inc.817* All rights reserved.818*819* This source code is licensed under the BSD-style license found in the820* LICENSE file in the root directory of this source tree. An additional grant821* of patent rights can be found in the PATENTS file in the same directory.822*823* @providesModule CSSPropertyOperations824* @typechecks static-only825*/826827'use strict';828829var CSSProperty = _dereq_(5);830var ExecutionEnvironment = _dereq_(22);831832var camelizeStyleName = _dereq_(121);833var dangerousStyleValue = _dereq_(128);834var hyphenateStyleName = _dereq_(148);835var memoizeStringOnly = _dereq_(159);836var warning = _dereq_(171);837838var processStyleName = memoizeStringOnly(function(styleName) {839return hyphenateStyleName(styleName);840});841842var styleFloatAccessor = 'cssFloat';843if (ExecutionEnvironment.canUseDOM) {844// IE8 only supports accessing cssFloat (standard) as styleFloat845if (document.documentElement.style.cssFloat === undefined) {846styleFloatAccessor = 'styleFloat';847}848}849850if ("production" !== "development") {851// 'msTransform' is correct, but the other prefixes should be capitalized852var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;853854// style values shouldn't contain a semicolon855var badStyleValueWithSemicolonPattern = /;\s*$/;856857var warnedStyleNames = {};858var warnedStyleValues = {};859860var warnHyphenatedStyleName = function(name) {861if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {862return;863}864865warnedStyleNames[name] = true;866("production" !== "development" ? warning(867false,868'Unsupported style property %s. Did you mean %s?',869name,870camelizeStyleName(name)871) : null);872};873874var warnBadVendoredStyleName = function(name) {875if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {876return;877}878879warnedStyleNames[name] = true;880("production" !== "development" ? warning(881false,882'Unsupported vendor-prefixed style property %s. Did you mean %s?',883name,884name.charAt(0).toUpperCase() + name.slice(1)885) : null);886};887888var warnStyleValueWithSemicolon = function(name, value) {889if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {890return;891}892893warnedStyleValues[value] = true;894("production" !== "development" ? warning(895false,896'Style property values shouldn\'t contain a semicolon. ' +897'Try "%s: %s" instead.',898name,899value.replace(badStyleValueWithSemicolonPattern, '')900) : null);901};902903/**904* @param {string} name905* @param {*} value906*/907var warnValidStyle = function(name, value) {908if (name.indexOf('-') > -1) {909warnHyphenatedStyleName(name);910} else if (badVendoredStyleNamePattern.test(name)) {911warnBadVendoredStyleName(name);912} else if (badStyleValueWithSemicolonPattern.test(value)) {913warnStyleValueWithSemicolon(name, value);914}915};916}917918/**919* Operations for dealing with CSS properties.920*/921var CSSPropertyOperations = {922923/**924* Serializes a mapping of style properties for use as inline styles:925*926* > createMarkupForStyles({width: '200px', height: 0})927* "width:200px;height:0;"928*929* Undefined values are ignored so that declarative programming is easier.930* The result should be HTML-escaped before insertion into the DOM.931*932* @param {object} styles933* @return {?string}934*/935createMarkupForStyles: function(styles) {936var serialized = '';937for (var styleName in styles) {938if (!styles.hasOwnProperty(styleName)) {939continue;940}941var styleValue = styles[styleName];942if ("production" !== "development") {943warnValidStyle(styleName, styleValue);944}945if (styleValue != null) {946serialized += processStyleName(styleName) + ':';947serialized += dangerousStyleValue(styleName, styleValue) + ';';948}949}950return serialized || null;951},952953/**954* Sets the value for multiple styles on a node. If a value is specified as955* '' (empty string), the corresponding style property will be unset.956*957* @param {DOMElement} node958* @param {object} styles959*/960setValueForStyles: function(node, styles) {961var style = node.style;962for (var styleName in styles) {963if (!styles.hasOwnProperty(styleName)) {964continue;965}966if ("production" !== "development") {967warnValidStyle(styleName, styles[styleName]);968}969var styleValue = dangerousStyleValue(styleName, styles[styleName]);970if (styleName === 'float') {971styleName = styleFloatAccessor;972}973if (styleValue) {974style[styleName] = styleValue;975} else {976var expansion = CSSProperty.shorthandPropertyExpansions[styleName];977if (expansion) {978// Shorthand property that IE8 won't like unsetting, so unset each979// component to placate it980for (var individualStyleName in expansion) {981style[individualStyleName] = '';982}983} else {984style[styleName] = '';985}986}987}988}989990};991992module.exports = CSSPropertyOperations;993994},{"121":121,"128":128,"148":148,"159":159,"171":171,"22":22,"5":5}],7:[function(_dereq_,module,exports){995/**996* Copyright 2013-2015, Facebook, Inc.997* All rights reserved.998*999* This source code is licensed under the BSD-style license found in the1000* LICENSE file in the root directory of this source tree. An additional grant1001* of patent rights can be found in the PATENTS file in the same directory.1002*1003* @providesModule CallbackQueue1004*/10051006'use strict';10071008var PooledClass = _dereq_(30);10091010var assign = _dereq_(29);1011var invariant = _dereq_(150);10121013/**1014* A specialized pseudo-event module to help keep track of components waiting to1015* be notified when their DOM representations are available for use.1016*1017* This implements `PooledClass`, so you should never need to instantiate this.1018* Instead, use `CallbackQueue.getPooled()`.1019*1020* @class ReactMountReady1021* @implements PooledClass1022* @internal1023*/1024function CallbackQueue() {1025this._callbacks = null;1026this._contexts = null;1027}10281029assign(CallbackQueue.prototype, {10301031/**1032* Enqueues a callback to be invoked when `notifyAll` is invoked.1033*1034* @param {function} callback Invoked when `notifyAll` is invoked.1035* @param {?object} context Context to call `callback` with.1036* @internal1037*/1038enqueue: function(callback, context) {1039this._callbacks = this._callbacks || [];1040this._contexts = this._contexts || [];1041this._callbacks.push(callback);1042this._contexts.push(context);1043},10441045/**1046* Invokes all enqueued callbacks and clears the queue. This is invoked after1047* the DOM representation of a component has been created or updated.1048*1049* @internal1050*/1051notifyAll: function() {1052var callbacks = this._callbacks;1053var contexts = this._contexts;1054if (callbacks) {1055("production" !== "development" ? invariant(1056callbacks.length === contexts.length,1057'Mismatched list of contexts in callback queue'1058) : invariant(callbacks.length === contexts.length));1059this._callbacks = null;1060this._contexts = null;1061for (var i = 0, l = callbacks.length; i < l; i++) {1062callbacks[i].call(contexts[i]);1063}1064callbacks.length = 0;1065contexts.length = 0;1066}1067},10681069/**1070* Resets the internal queue.1071*1072* @internal1073*/1074reset: function() {1075this._callbacks = null;1076this._contexts = null;1077},10781079/**1080* `PooledClass` looks for this.1081*/1082destructor: function() {1083this.reset();1084}10851086});10871088PooledClass.addPoolingTo(CallbackQueue);10891090module.exports = CallbackQueue;10911092},{"150":150,"29":29,"30":30}],8:[function(_dereq_,module,exports){1093/**1094* Copyright 2013-2015, Facebook, Inc.1095* All rights reserved.1096*1097* This source code is licensed under the BSD-style license found in the1098* LICENSE file in the root directory of this source tree. An additional grant1099* of patent rights can be found in the PATENTS file in the same directory.1100*1101* @providesModule ChangeEventPlugin1102*/11031104'use strict';11051106var EventConstants = _dereq_(16);1107var EventPluginHub = _dereq_(18);1108var EventPropagators = _dereq_(21);1109var ExecutionEnvironment = _dereq_(22);1110var ReactUpdates = _dereq_(100);1111var SyntheticEvent = _dereq_(108);11121113var isEventSupported = _dereq_(151);1114var isTextInputElement = _dereq_(153);1115var keyOf = _dereq_(157);11161117var topLevelTypes = EventConstants.topLevelTypes;11181119var eventTypes = {1120change: {1121phasedRegistrationNames: {1122bubbled: keyOf({onChange: null}),1123captured: keyOf({onChangeCapture: null})1124},1125dependencies: [1126topLevelTypes.topBlur,1127topLevelTypes.topChange,1128topLevelTypes.topClick,1129topLevelTypes.topFocus,1130topLevelTypes.topInput,1131topLevelTypes.topKeyDown,1132topLevelTypes.topKeyUp,1133topLevelTypes.topSelectionChange1134]1135}1136};11371138/**1139* For IE shims1140*/1141var activeElement = null;1142var activeElementID = null;1143var activeElementValue = null;1144var activeElementValueProp = null;11451146/**1147* SECTION: handle `change` event1148*/1149function shouldUseChangeEvent(elem) {1150return (1151elem.nodeName === 'SELECT' ||1152(elem.nodeName === 'INPUT' && elem.type === 'file')1153);1154}11551156var doesChangeEventBubble = false;1157if (ExecutionEnvironment.canUseDOM) {1158// See `handleChange` comment below1159doesChangeEventBubble = isEventSupported('change') && (1160(!('documentMode' in document) || document.documentMode > 8)1161);1162}11631164function manualDispatchChangeEvent(nativeEvent) {1165var event = SyntheticEvent.getPooled(1166eventTypes.change,1167activeElementID,1168nativeEvent1169);1170EventPropagators.accumulateTwoPhaseDispatches(event);11711172// If change and propertychange bubbled, we'd just bind to it like all the1173// other events and have it go through ReactBrowserEventEmitter. Since it1174// doesn't, we manually listen for the events and so we have to enqueue and1175// process the abstract event manually.1176//1177// Batching is necessary here in order to ensure that all event handlers run1178// before the next rerender (including event handlers attached to ancestor1179// elements instead of directly on the input). Without this, controlled1180// components don't work properly in conjunction with event bubbling because1181// the component is rerendered and the value reverted before all the event1182// handlers can run. See https://github.com/facebook/react/issues/708.1183ReactUpdates.batchedUpdates(runEventInBatch, event);1184}11851186function runEventInBatch(event) {1187EventPluginHub.enqueueEvents(event);1188EventPluginHub.processEventQueue();1189}11901191function startWatchingForChangeEventIE8(target, targetID) {1192activeElement = target;1193activeElementID = targetID;1194activeElement.attachEvent('onchange', manualDispatchChangeEvent);1195}11961197function stopWatchingForChangeEventIE8() {1198if (!activeElement) {1199return;1200}1201activeElement.detachEvent('onchange', manualDispatchChangeEvent);1202activeElement = null;1203activeElementID = null;1204}12051206function getTargetIDForChangeEvent(1207topLevelType,1208topLevelTarget,1209topLevelTargetID) {1210if (topLevelType === topLevelTypes.topChange) {1211return topLevelTargetID;1212}1213}1214function handleEventsForChangeEventIE8(1215topLevelType,1216topLevelTarget,1217topLevelTargetID) {1218if (topLevelType === topLevelTypes.topFocus) {1219// stopWatching() should be a noop here but we call it just in case we1220// missed a blur event somehow.1221stopWatchingForChangeEventIE8();1222startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID);1223} else if (topLevelType === topLevelTypes.topBlur) {1224stopWatchingForChangeEventIE8();1225}1226}122712281229/**1230* SECTION: handle `input` event1231*/1232var isInputEventSupported = false;1233if (ExecutionEnvironment.canUseDOM) {1234// IE9 claims to support the input event but fails to trigger it when1235// deleting text, so we ignore its input events1236isInputEventSupported = isEventSupported('input') && (1237(!('documentMode' in document) || document.documentMode > 9)1238);1239}12401241/**1242* (For old IE.) Replacement getter/setter for the `value` property that gets1243* set on the active element.1244*/1245var newValueProp = {1246get: function() {1247return activeElementValueProp.get.call(this);1248},1249set: function(val) {1250// Cast to a string so we can do equality checks.1251activeElementValue = '' + val;1252activeElementValueProp.set.call(this, val);1253}1254};12551256/**1257* (For old IE.) Starts tracking propertychange events on the passed-in element1258* and override the value property so that we can distinguish user events from1259* value changes in JS.1260*/1261function startWatchingForValueChange(target, targetID) {1262activeElement = target;1263activeElementID = targetID;1264activeElementValue = target.value;1265activeElementValueProp = Object.getOwnPropertyDescriptor(1266target.constructor.prototype,1267'value'1268);12691270Object.defineProperty(activeElement, 'value', newValueProp);1271activeElement.attachEvent('onpropertychange', handlePropertyChange);1272}12731274/**1275* (For old IE.) Removes the event listeners from the currently-tracked element,1276* if any exists.1277*/1278function stopWatchingForValueChange() {1279if (!activeElement) {1280return;1281}12821283// delete restores the original property definition1284delete activeElement.value;1285activeElement.detachEvent('onpropertychange', handlePropertyChange);12861287activeElement = null;1288activeElementID = null;1289activeElementValue = null;1290activeElementValueProp = null;1291}12921293/**1294* (For old IE.) Handles a propertychange event, sending a `change` event if1295* the value of the active element has changed.1296*/1297function handlePropertyChange(nativeEvent) {1298if (nativeEvent.propertyName !== 'value') {1299return;1300}1301var value = nativeEvent.srcElement.value;1302if (value === activeElementValue) {1303return;1304}1305activeElementValue = value;13061307manualDispatchChangeEvent(nativeEvent);1308}13091310/**1311* If a `change` event should be fired, returns the target's ID.1312*/1313function getTargetIDForInputEvent(1314topLevelType,1315topLevelTarget,1316topLevelTargetID) {1317if (topLevelType === topLevelTypes.topInput) {1318// In modern browsers (i.e., not IE8 or IE9), the input event is exactly1319// what we want so fall through here and trigger an abstract event1320return topLevelTargetID;1321}1322}13231324// For IE8 and IE9.1325function handleEventsForInputEventIE(1326topLevelType,1327topLevelTarget,1328topLevelTargetID) {1329if (topLevelType === topLevelTypes.topFocus) {1330// In IE8, we can capture almost all .value changes by adding a1331// propertychange handler and looking for events with propertyName1332// equal to 'value'1333// In IE9, propertychange fires for most input events but is buggy and1334// doesn't fire when text is deleted, but conveniently, selectionchange1335// appears to fire in all of the remaining cases so we catch those and1336// forward the event if the value has changed1337// In either case, we don't want to call the event handler if the value1338// is changed from JS so we redefine a setter for `.value` that updates1339// our activeElementValue variable, allowing us to ignore those changes1340//1341// stopWatching() should be a noop here but we call it just in case we1342// missed a blur event somehow.1343stopWatchingForValueChange();1344startWatchingForValueChange(topLevelTarget, topLevelTargetID);1345} else if (topLevelType === topLevelTypes.topBlur) {1346stopWatchingForValueChange();1347}1348}13491350// For IE8 and IE9.1351function getTargetIDForInputEventIE(1352topLevelType,1353topLevelTarget,1354topLevelTargetID) {1355if (topLevelType === topLevelTypes.topSelectionChange ||1356topLevelType === topLevelTypes.topKeyUp ||1357topLevelType === topLevelTypes.topKeyDown) {1358// On the selectionchange event, the target is just document which isn't1359// helpful for us so just check activeElement instead.1360//1361// 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire1362// propertychange on the first input event after setting `value` from a1363// script and fires only keydown, keypress, keyup. Catching keyup usually1364// gets it and catching keydown lets us fire an event for the first1365// keystroke if user does a key repeat (it'll be a little delayed: right1366// before the second keystroke). Other input methods (e.g., paste) seem to1367// fire selectionchange normally.1368if (activeElement && activeElement.value !== activeElementValue) {1369activeElementValue = activeElement.value;1370return activeElementID;1371}1372}1373}137413751376/**1377* SECTION: handle `click` event1378*/1379function shouldUseClickEvent(elem) {1380// Use the `click` event to detect changes to checkbox and radio inputs.1381// This approach works across all browsers, whereas `change` does not fire1382// until `blur` in IE8.1383return (1384elem.nodeName === 'INPUT' &&1385(elem.type === 'checkbox' || elem.type === 'radio')1386);1387}13881389function getTargetIDForClickEvent(1390topLevelType,1391topLevelTarget,1392topLevelTargetID) {1393if (topLevelType === topLevelTypes.topClick) {1394return topLevelTargetID;1395}1396}13971398/**1399* This plugin creates an `onChange` event that normalizes change events1400* across form elements. This event fires at a time when it's possible to1401* change the element's value without seeing a flicker.1402*1403* Supported elements are:1404* - input (see `isTextInputElement`)1405* - textarea1406* - select1407*/1408var ChangeEventPlugin = {14091410eventTypes: eventTypes,14111412/**1413* @param {string} topLevelType Record from `EventConstants`.1414* @param {DOMEventTarget} topLevelTarget The listening component root node.1415* @param {string} topLevelTargetID ID of `topLevelTarget`.1416* @param {object} nativeEvent Native browser event.1417* @return {*} An accumulation of synthetic events.1418* @see {EventPluginHub.extractEvents}1419*/1420extractEvents: function(1421topLevelType,1422topLevelTarget,1423topLevelTargetID,1424nativeEvent) {14251426var getTargetIDFunc, handleEventFunc;1427if (shouldUseChangeEvent(topLevelTarget)) {1428if (doesChangeEventBubble) {1429getTargetIDFunc = getTargetIDForChangeEvent;1430} else {1431handleEventFunc = handleEventsForChangeEventIE8;1432}1433} else if (isTextInputElement(topLevelTarget)) {1434if (isInputEventSupported) {1435getTargetIDFunc = getTargetIDForInputEvent;1436} else {1437getTargetIDFunc = getTargetIDForInputEventIE;1438handleEventFunc = handleEventsForInputEventIE;1439}1440} else if (shouldUseClickEvent(topLevelTarget)) {1441getTargetIDFunc = getTargetIDForClickEvent;1442}14431444if (getTargetIDFunc) {1445var targetID = getTargetIDFunc(1446topLevelType,1447topLevelTarget,1448topLevelTargetID1449);1450if (targetID) {1451var event = SyntheticEvent.getPooled(1452eventTypes.change,1453targetID,1454nativeEvent1455);1456EventPropagators.accumulateTwoPhaseDispatches(event);1457return event;1458}1459}14601461if (handleEventFunc) {1462handleEventFunc(1463topLevelType,1464topLevelTarget,1465topLevelTargetID1466);1467}1468}14691470};14711472module.exports = ChangeEventPlugin;14731474},{"100":100,"108":108,"151":151,"153":153,"157":157,"16":16,"18":18,"21":21,"22":22}],9:[function(_dereq_,module,exports){1475/**1476* Copyright 2013-2015, Facebook, Inc.1477* All rights reserved.1478*1479* This source code is licensed under the BSD-style license found in the1480* LICENSE file in the root directory of this source tree. An additional grant1481* of patent rights can be found in the PATENTS file in the same directory.1482*1483* @providesModule ClientReactRootIndex1484* @typechecks1485*/14861487'use strict';14881489var nextReactRootIndex = 0;14901491var ClientReactRootIndex = {1492createReactRootIndex: function() {1493return nextReactRootIndex++;1494}1495};14961497module.exports = ClientReactRootIndex;14981499},{}],10:[function(_dereq_,module,exports){1500/**1501* Copyright 2013-2015, Facebook, Inc.1502* All rights reserved.1503*1504* This source code is licensed under the BSD-style license found in the1505* LICENSE file in the root directory of this source tree. An additional grant1506* of patent rights can be found in the PATENTS file in the same directory.1507*1508* @providesModule DOMChildrenOperations1509* @typechecks static-only1510*/15111512'use strict';15131514var Danger = _dereq_(13);1515var ReactMultiChildUpdateTypes = _dereq_(79);15161517var setTextContent = _dereq_(165);1518var invariant = _dereq_(150);15191520/**1521* Inserts `childNode` as a child of `parentNode` at the `index`.1522*1523* @param {DOMElement} parentNode Parent node in which to insert.1524* @param {DOMElement} childNode Child node to insert.1525* @param {number} index Index at which to insert the child.1526* @internal1527*/1528function insertChildAt(parentNode, childNode, index) {1529// By exploiting arrays returning `undefined` for an undefined index, we can1530// rely exclusively on `insertBefore(node, null)` instead of also using1531// `appendChild(node)`. However, using `undefined` is not allowed by all1532// browsers so we must replace it with `null`.1533parentNode.insertBefore(1534childNode,1535parentNode.childNodes[index] || null1536);1537}15381539/**1540* Operations for updating with DOM children.1541*/1542var DOMChildrenOperations = {15431544dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,15451546updateTextContent: setTextContent,15471548/**1549* Updates a component's children by processing a series of updates. The1550* update configurations are each expected to have a `parentNode` property.1551*1552* @param {array<object>} updates List of update configurations.1553* @param {array<string>} markupList List of markup strings.1554* @internal1555*/1556processUpdates: function(updates, markupList) {1557var update;1558// Mapping from parent IDs to initial child orderings.1559var initialChildren = null;1560// List of children that will be moved or removed.1561var updatedChildren = null;15621563for (var i = 0; i < updates.length; i++) {1564update = updates[i];1565if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING ||1566update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) {1567var updatedIndex = update.fromIndex;1568var updatedChild = update.parentNode.childNodes[updatedIndex];1569var parentID = update.parentID;15701571("production" !== "development" ? invariant(1572updatedChild,1573'processUpdates(): Unable to find child %s of element. This ' +1574'probably means the DOM was unexpectedly mutated (e.g., by the ' +1575'browser), usually due to forgetting a <tbody> when using tables, ' +1576'nesting tags like <form>, <p>, or <a>, or using non-SVG elements ' +1577'in an <svg> parent. Try inspecting the child nodes of the element ' +1578'with React ID `%s`.',1579updatedIndex,1580parentID1581) : invariant(updatedChild));15821583initialChildren = initialChildren || {};1584initialChildren[parentID] = initialChildren[parentID] || [];1585initialChildren[parentID][updatedIndex] = updatedChild;15861587updatedChildren = updatedChildren || [];1588updatedChildren.push(updatedChild);1589}1590}15911592var renderedMarkup = Danger.dangerouslyRenderMarkup(markupList);15931594// Remove updated children first so that `toIndex` is consistent.1595if (updatedChildren) {1596for (var j = 0; j < updatedChildren.length; j++) {1597updatedChildren[j].parentNode.removeChild(updatedChildren[j]);1598}1599}16001601for (var k = 0; k < updates.length; k++) {1602update = updates[k];1603switch (update.type) {1604case ReactMultiChildUpdateTypes.INSERT_MARKUP:1605insertChildAt(1606update.parentNode,1607renderedMarkup[update.markupIndex],1608update.toIndex1609);1610break;1611case ReactMultiChildUpdateTypes.MOVE_EXISTING:1612insertChildAt(1613update.parentNode,1614initialChildren[update.parentID][update.fromIndex],1615update.toIndex1616);1617break;1618case ReactMultiChildUpdateTypes.TEXT_CONTENT:1619setTextContent(1620update.parentNode,1621update.textContent1622);1623break;1624case ReactMultiChildUpdateTypes.REMOVE_NODE:1625// Already removed by the for-loop above.1626break;1627}1628}1629}16301631};16321633module.exports = DOMChildrenOperations;16341635},{"13":13,"150":150,"165":165,"79":79}],11:[function(_dereq_,module,exports){1636/**1637* Copyright 2013-2015, Facebook, Inc.1638* All rights reserved.1639*1640* This source code is licensed under the BSD-style license found in the1641* LICENSE file in the root directory of this source tree. An additional grant1642* of patent rights can be found in the PATENTS file in the same directory.1643*1644* @providesModule DOMProperty1645* @typechecks static-only1646*/16471648/*jslint bitwise: true */16491650'use strict';16511652var invariant = _dereq_(150);16531654function checkMask(value, bitmask) {1655return (value & bitmask) === bitmask;1656}16571658var DOMPropertyInjection = {1659/**1660* Mapping from normalized, camelcased property names to a configuration that1661* specifies how the associated DOM property should be accessed or rendered.1662*/1663MUST_USE_ATTRIBUTE: 0x1,1664MUST_USE_PROPERTY: 0x2,1665HAS_SIDE_EFFECTS: 0x4,1666HAS_BOOLEAN_VALUE: 0x8,1667HAS_NUMERIC_VALUE: 0x10,1668HAS_POSITIVE_NUMERIC_VALUE: 0x20 | 0x10,1669HAS_OVERLOADED_BOOLEAN_VALUE: 0x40,16701671/**1672* Inject some specialized knowledge about the DOM. This takes a config object1673* with the following properties:1674*1675* isCustomAttribute: function that given an attribute name will return true1676* if it can be inserted into the DOM verbatim. Useful for data-* or aria-*1677* attributes where it's impossible to enumerate all of the possible1678* attribute names,1679*1680* Properties: object mapping DOM property name to one of the1681* DOMPropertyInjection constants or null. If your attribute isn't in here,1682* it won't get written to the DOM.1683*1684* DOMAttributeNames: object mapping React attribute name to the DOM1685* attribute name. Attribute names not specified use the **lowercase**1686* normalized name.1687*1688* DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.1689* Property names not specified use the normalized name.1690*1691* DOMMutationMethods: Properties that require special mutation methods. If1692* `value` is undefined, the mutation method should unset the property.1693*1694* @param {object} domPropertyConfig the config as described above.1695*/1696injectDOMPropertyConfig: function(domPropertyConfig) {1697var Properties = domPropertyConfig.Properties || {};1698var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};1699var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};1700var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};17011702if (domPropertyConfig.isCustomAttribute) {1703DOMProperty._isCustomAttributeFunctions.push(1704domPropertyConfig.isCustomAttribute1705);1706}17071708for (var propName in Properties) {1709("production" !== "development" ? invariant(1710!DOMProperty.isStandardName.hasOwnProperty(propName),1711'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' +1712'\'%s\' which has already been injected. You may be accidentally ' +1713'injecting the same DOM property config twice, or you may be ' +1714'injecting two configs that have conflicting property names.',1715propName1716) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName)));17171718DOMProperty.isStandardName[propName] = true;17191720var lowerCased = propName.toLowerCase();1721DOMProperty.getPossibleStandardName[lowerCased] = propName;17221723if (DOMAttributeNames.hasOwnProperty(propName)) {1724var attributeName = DOMAttributeNames[propName];1725DOMProperty.getPossibleStandardName[attributeName] = propName;1726DOMProperty.getAttributeName[propName] = attributeName;1727} else {1728DOMProperty.getAttributeName[propName] = lowerCased;1729}17301731DOMProperty.getPropertyName[propName] =1732DOMPropertyNames.hasOwnProperty(propName) ?1733DOMPropertyNames[propName] :1734propName;17351736if (DOMMutationMethods.hasOwnProperty(propName)) {1737DOMProperty.getMutationMethod[propName] = DOMMutationMethods[propName];1738} else {1739DOMProperty.getMutationMethod[propName] = null;1740}17411742var propConfig = Properties[propName];1743DOMProperty.mustUseAttribute[propName] =1744checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE);1745DOMProperty.mustUseProperty[propName] =1746checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY);1747DOMProperty.hasSideEffects[propName] =1748checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS);1749DOMProperty.hasBooleanValue[propName] =1750checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE);1751DOMProperty.hasNumericValue[propName] =1752checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE);1753DOMProperty.hasPositiveNumericValue[propName] =1754checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE);1755DOMProperty.hasOverloadedBooleanValue[propName] =1756checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE);17571758("production" !== "development" ? invariant(1759!DOMProperty.mustUseAttribute[propName] ||1760!DOMProperty.mustUseProperty[propName],1761'DOMProperty: Cannot require using both attribute and property: %s',1762propName1763) : invariant(!DOMProperty.mustUseAttribute[propName] ||1764!DOMProperty.mustUseProperty[propName]));1765("production" !== "development" ? invariant(1766DOMProperty.mustUseProperty[propName] ||1767!DOMProperty.hasSideEffects[propName],1768'DOMProperty: Properties that have side effects must use property: %s',1769propName1770) : invariant(DOMProperty.mustUseProperty[propName] ||1771!DOMProperty.hasSideEffects[propName]));1772("production" !== "development" ? invariant(1773!!DOMProperty.hasBooleanValue[propName] +1774!!DOMProperty.hasNumericValue[propName] +1775!!DOMProperty.hasOverloadedBooleanValue[propName] <= 1,1776'DOMProperty: Value can be one of boolean, overloaded boolean, or ' +1777'numeric value, but not a combination: %s',1778propName1779) : invariant(!!DOMProperty.hasBooleanValue[propName] +1780!!DOMProperty.hasNumericValue[propName] +1781!!DOMProperty.hasOverloadedBooleanValue[propName] <= 1));1782}1783}1784};1785var defaultValueCache = {};17861787/**1788* DOMProperty exports lookup objects that can be used like functions:1789*1790* > DOMProperty.isValid['id']1791* true1792* > DOMProperty.isValid['foobar']1793* undefined1794*1795* Although this may be confusing, it performs better in general.1796*1797* @see http://jsperf.com/key-exists1798* @see http://jsperf.com/key-missing1799*/1800var DOMProperty = {18011802ID_ATTRIBUTE_NAME: 'data-reactid',18031804/**1805* Checks whether a property name is a standard property.1806* @type {Object}1807*/1808isStandardName: {},18091810/**1811* Mapping from lowercase property names to the properly cased version, used1812* to warn in the case of missing properties.1813* @type {Object}1814*/1815getPossibleStandardName: {},18161817/**1818* Mapping from normalized names to attribute names that differ. Attribute1819* names are used when rendering markup or with `*Attribute()`.1820* @type {Object}1821*/1822getAttributeName: {},18231824/**1825* Mapping from normalized names to properties on DOM node instances.1826* (This includes properties that mutate due to external factors.)1827* @type {Object}1828*/1829getPropertyName: {},18301831/**1832* Mapping from normalized names to mutation methods. This will only exist if1833* mutation cannot be set simply by the property or `setAttribute()`.1834* @type {Object}1835*/1836getMutationMethod: {},18371838/**1839* Whether the property must be accessed and mutated as an object property.1840* @type {Object}1841*/1842mustUseAttribute: {},18431844/**1845* Whether the property must be accessed and mutated using `*Attribute()`.1846* (This includes anything that fails `<propName> in <element>`.)1847* @type {Object}1848*/1849mustUseProperty: {},18501851/**1852* Whether or not setting a value causes side effects such as triggering1853* resources to be loaded or text selection changes. We must ensure that1854* the value is only set if it has changed.1855* @type {Object}1856*/1857hasSideEffects: {},18581859/**1860* Whether the property should be removed when set to a falsey value.1861* @type {Object}1862*/1863hasBooleanValue: {},18641865/**1866* Whether the property must be numeric or parse as a1867* numeric and should be removed when set to a falsey value.1868* @type {Object}1869*/1870hasNumericValue: {},18711872/**1873* Whether the property must be positive numeric or parse as a positive1874* numeric and should be removed when set to a falsey value.1875* @type {Object}1876*/1877hasPositiveNumericValue: {},18781879/**1880* Whether the property can be used as a flag as well as with a value. Removed1881* when strictly equal to false; present without a value when strictly equal1882* to true; present with a value otherwise.1883* @type {Object}1884*/1885hasOverloadedBooleanValue: {},18861887/**1888* All of the isCustomAttribute() functions that have been injected.1889*/1890_isCustomAttributeFunctions: [],18911892/**1893* Checks whether a property name is a custom attribute.1894* @method1895*/1896isCustomAttribute: function(attributeName) {1897for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {1898var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];1899if (isCustomAttributeFn(attributeName)) {1900return true;1901}1902}1903return false;1904},19051906/**1907* Returns the default property value for a DOM property (i.e., not an1908* attribute). Most default values are '' or false, but not all. Worse yet,1909* some (in particular, `type`) vary depending on the type of element.1910*1911* TODO: Is it better to grab all the possible properties when creating an1912* element to avoid having to create the same element twice?1913*/1914getDefaultValueForProperty: function(nodeName, prop) {1915var nodeDefaults = defaultValueCache[nodeName];1916var testElement;1917if (!nodeDefaults) {1918defaultValueCache[nodeName] = nodeDefaults = {};1919}1920if (!(prop in nodeDefaults)) {1921testElement = document.createElement(nodeName);1922nodeDefaults[prop] = testElement[prop];1923}1924return nodeDefaults[prop];1925},19261927injection: DOMPropertyInjection1928};19291930module.exports = DOMProperty;19311932},{"150":150}],12:[function(_dereq_,module,exports){1933/**1934* Copyright 2013-2015, Facebook, Inc.1935* All rights reserved.1936*1937* This source code is licensed under the BSD-style license found in the1938* LICENSE file in the root directory of this source tree. An additional grant1939* of patent rights can be found in the PATENTS file in the same directory.1940*1941* @providesModule DOMPropertyOperations1942* @typechecks static-only1943*/19441945'use strict';19461947var DOMProperty = _dereq_(11);19481949var quoteAttributeValueForBrowser = _dereq_(163);1950var warning = _dereq_(171);19511952function shouldIgnoreValue(name, value) {1953return value == null ||1954(DOMProperty.hasBooleanValue[name] && !value) ||1955(DOMProperty.hasNumericValue[name] && isNaN(value)) ||1956(DOMProperty.hasPositiveNumericValue[name] && (value < 1)) ||1957(DOMProperty.hasOverloadedBooleanValue[name] && value === false);1958}19591960if ("production" !== "development") {1961var reactProps = {1962children: true,1963dangerouslySetInnerHTML: true,1964key: true,1965ref: true1966};1967var warnedProperties = {};19681969var warnUnknownProperty = function(name) {1970if (reactProps.hasOwnProperty(name) && reactProps[name] ||1971warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {1972return;1973}19741975warnedProperties[name] = true;1976var lowerCasedName = name.toLowerCase();19771978// data-* attributes should be lowercase; suggest the lowercase version1979var standardName = (1980DOMProperty.isCustomAttribute(lowerCasedName) ?1981lowerCasedName :1982DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ?1983DOMProperty.getPossibleStandardName[lowerCasedName] :1984null1985);19861987// For now, only warn when we have a suggested correction. This prevents1988// logging too much when using transferPropsTo.1989("production" !== "development" ? warning(1990standardName == null,1991'Unknown DOM property %s. Did you mean %s?',1992name,1993standardName1994) : null);19951996};1997}19981999/**2000* Operations for dealing with DOM properties.2001*/2002var DOMPropertyOperations = {20032004/**2005* Creates markup for the ID property.2006*2007* @param {string} id Unescaped ID.2008* @return {string} Markup string.2009*/2010createMarkupForID: function(id) {2011return DOMProperty.ID_ATTRIBUTE_NAME + '=' +2012quoteAttributeValueForBrowser(id);2013},20142015/**2016* Creates markup for a property.2017*2018* @param {string} name2019* @param {*} value2020* @return {?string} Markup string, or null if the property was invalid.2021*/2022createMarkupForProperty: function(name, value) {2023if (DOMProperty.isStandardName.hasOwnProperty(name) &&2024DOMProperty.isStandardName[name]) {2025if (shouldIgnoreValue(name, value)) {2026return '';2027}2028var attributeName = DOMProperty.getAttributeName[name];2029if (DOMProperty.hasBooleanValue[name] ||2030(DOMProperty.hasOverloadedBooleanValue[name] && value === true)) {2031return attributeName;2032}2033return attributeName + '=' + quoteAttributeValueForBrowser(value);2034} else if (DOMProperty.isCustomAttribute(name)) {2035if (value == null) {2036return '';2037}2038return name + '=' + quoteAttributeValueForBrowser(value);2039} else if ("production" !== "development") {2040warnUnknownProperty(name);2041}2042return null;2043},20442045/**2046* Sets the value for a property on a node.2047*2048* @param {DOMElement} node2049* @param {string} name2050* @param {*} value2051*/2052setValueForProperty: function(node, name, value) {2053if (DOMProperty.isStandardName.hasOwnProperty(name) &&2054DOMProperty.isStandardName[name]) {2055var mutationMethod = DOMProperty.getMutationMethod[name];2056if (mutationMethod) {2057mutationMethod(node, value);2058} else if (shouldIgnoreValue(name, value)) {2059this.deleteValueForProperty(node, name);2060} else if (DOMProperty.mustUseAttribute[name]) {2061// `setAttribute` with objects becomes only `[object]` in IE8/9,2062// ('' + value) makes it output the correct toString()-value.2063node.setAttribute(DOMProperty.getAttributeName[name], '' + value);2064} else {2065var propName = DOMProperty.getPropertyName[name];2066// Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the2067// property type before comparing; only `value` does and is string.2068if (!DOMProperty.hasSideEffects[name] ||2069('' + node[propName]) !== ('' + value)) {2070// Contrary to `setAttribute`, object properties are properly2071// `toString`ed by IE8/9.2072node[propName] = value;2073}2074}2075} else if (DOMProperty.isCustomAttribute(name)) {2076if (value == null) {2077node.removeAttribute(name);2078} else {2079node.setAttribute(name, '' + value);2080}2081} else if ("production" !== "development") {2082warnUnknownProperty(name);2083}2084},20852086/**2087* Deletes the value for a property on a node.2088*2089* @param {DOMElement} node2090* @param {string} name2091*/2092deleteValueForProperty: function(node, name) {2093if (DOMProperty.isStandardName.hasOwnProperty(name) &&2094DOMProperty.isStandardName[name]) {2095var mutationMethod = DOMProperty.getMutationMethod[name];2096if (mutationMethod) {2097mutationMethod(node, undefined);2098} else if (DOMProperty.mustUseAttribute[name]) {2099node.removeAttribute(DOMProperty.getAttributeName[name]);2100} else {2101var propName = DOMProperty.getPropertyName[name];2102var defaultValue = DOMProperty.getDefaultValueForProperty(2103node.nodeName,2104propName2105);2106if (!DOMProperty.hasSideEffects[name] ||2107('' + node[propName]) !== defaultValue) {2108node[propName] = defaultValue;2109}2110}2111} else if (DOMProperty.isCustomAttribute(name)) {2112node.removeAttribute(name);2113} else if ("production" !== "development") {2114warnUnknownProperty(name);2115}2116}21172118};21192120module.exports = DOMPropertyOperations;21212122},{"11":11,"163":163,"171":171}],13:[function(_dereq_,module,exports){2123/**2124* Copyright 2013-2015, Facebook, Inc.2125* All rights reserved.2126*2127* This source code is licensed under the BSD-style license found in the2128* LICENSE file in the root directory of this source tree. An additional grant2129* of patent rights can be found in the PATENTS file in the same directory.2130*2131* @providesModule Danger2132* @typechecks static-only2133*/21342135/*jslint evil: true, sub: true */21362137'use strict';21382139var ExecutionEnvironment = _dereq_(22);21402141var createNodesFromMarkup = _dereq_(126);2142var emptyFunction = _dereq_(129);2143var getMarkupWrap = _dereq_(142);2144var invariant = _dereq_(150);21452146var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/;2147var RESULT_INDEX_ATTR = 'data-danger-index';21482149/**2150* Extracts the `nodeName` from a string of markup.2151*2152* NOTE: Extracting the `nodeName` does not require a regular expression match2153* because we make assumptions about React-generated markup (i.e. there are no2154* spaces surrounding the opening tag and there is at least one attribute).2155*2156* @param {string} markup String of markup.2157* @return {string} Node name of the supplied markup.2158* @see http://jsperf.com/extract-nodename2159*/2160function getNodeName(markup) {2161return markup.substring(1, markup.indexOf(' '));2162}21632164var Danger = {21652166/**2167* Renders markup into an array of nodes. The markup is expected to render2168* into a list of root nodes. Also, the length of `resultList` and2169* `markupList` should be the same.2170*2171* @param {array<string>} markupList List of markup strings to render.2172* @return {array<DOMElement>} List of rendered nodes.2173* @internal2174*/2175dangerouslyRenderMarkup: function(markupList) {2176("production" !== "development" ? invariant(2177ExecutionEnvironment.canUseDOM,2178'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' +2179'thread. Make sure `window` and `document` are available globally ' +2180'before requiring React when unit testing or use ' +2181'React.renderToString for server rendering.'2182) : invariant(ExecutionEnvironment.canUseDOM));2183var nodeName;2184var markupByNodeName = {};2185// Group markup by `nodeName` if a wrap is necessary, else by '*'.2186for (var i = 0; i < markupList.length; i++) {2187("production" !== "development" ? invariant(2188markupList[i],2189'dangerouslyRenderMarkup(...): Missing markup.'2190) : invariant(markupList[i]));2191nodeName = getNodeName(markupList[i]);2192nodeName = getMarkupWrap(nodeName) ? nodeName : '*';2193markupByNodeName[nodeName] = markupByNodeName[nodeName] || [];2194markupByNodeName[nodeName][i] = markupList[i];2195}2196var resultList = [];2197var resultListAssignmentCount = 0;2198for (nodeName in markupByNodeName) {2199if (!markupByNodeName.hasOwnProperty(nodeName)) {2200continue;2201}2202var markupListByNodeName = markupByNodeName[nodeName];22032204// This for-in loop skips the holes of the sparse array. The order of2205// iteration should follow the order of assignment, which happens to match2206// numerical index order, but we don't rely on that.2207var resultIndex;2208for (resultIndex in markupListByNodeName) {2209if (markupListByNodeName.hasOwnProperty(resultIndex)) {2210var markup = markupListByNodeName[resultIndex];22112212// Push the requested markup with an additional RESULT_INDEX_ATTR2213// attribute. If the markup does not start with a < character, it2214// will be discarded below (with an appropriate console.error).2215markupListByNodeName[resultIndex] = markup.replace(2216OPEN_TAG_NAME_EXP,2217// This index will be parsed back out below.2218'$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" '2219);2220}2221}22222223// Render each group of markup with similar wrapping `nodeName`.2224var renderNodes = createNodesFromMarkup(2225markupListByNodeName.join(''),2226emptyFunction // Do nothing special with <script> tags.2227);22282229for (var j = 0; j < renderNodes.length; ++j) {2230var renderNode = renderNodes[j];2231if (renderNode.hasAttribute &&2232renderNode.hasAttribute(RESULT_INDEX_ATTR)) {22332234resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR);2235renderNode.removeAttribute(RESULT_INDEX_ATTR);22362237("production" !== "development" ? invariant(2238!resultList.hasOwnProperty(resultIndex),2239'Danger: Assigning to an already-occupied result index.'2240) : invariant(!resultList.hasOwnProperty(resultIndex)));22412242resultList[resultIndex] = renderNode;22432244// This should match resultList.length and markupList.length when2245// we're done.2246resultListAssignmentCount += 1;22472248} else if ("production" !== "development") {2249console.error(2250'Danger: Discarding unexpected node:',2251renderNode2252);2253}2254}2255}22562257// Although resultList was populated out of order, it should now be a dense2258// array.2259("production" !== "development" ? invariant(2260resultListAssignmentCount === resultList.length,2261'Danger: Did not assign to every index of resultList.'2262) : invariant(resultListAssignmentCount === resultList.length));22632264("production" !== "development" ? invariant(2265resultList.length === markupList.length,2266'Danger: Expected markup to render %s nodes, but rendered %s.',2267markupList.length,2268resultList.length2269) : invariant(resultList.length === markupList.length));22702271return resultList;2272},22732274/**2275* Replaces a node with a string of markup at its current position within its2276* parent. The markup must render into a single root node.2277*2278* @param {DOMElement} oldChild Child node to replace.2279* @param {string} markup Markup to render in place of the child node.2280* @internal2281*/2282dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) {2283("production" !== "development" ? invariant(2284ExecutionEnvironment.canUseDOM,2285'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' +2286'worker thread. Make sure `window` and `document` are available ' +2287'globally before requiring React when unit testing or use ' +2288'React.renderToString for server rendering.'2289) : invariant(ExecutionEnvironment.canUseDOM));2290("production" !== "development" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup));2291("production" !== "development" ? invariant(2292oldChild.tagName.toLowerCase() !== 'html',2293'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' +2294'<html> node. This is because browser quirks make this unreliable ' +2295'and/or slow. If you want to render to the root you must use ' +2296'server rendering. See React.renderToString().'2297) : invariant(oldChild.tagName.toLowerCase() !== 'html'));22982299var newChild = createNodesFromMarkup(markup, emptyFunction)[0];2300oldChild.parentNode.replaceChild(newChild, oldChild);2301}23022303};23042305module.exports = Danger;23062307},{"126":126,"129":129,"142":142,"150":150,"22":22}],14:[function(_dereq_,module,exports){2308/**2309* Copyright 2013-2015, Facebook, Inc.2310* All rights reserved.2311*2312* This source code is licensed under the BSD-style license found in the2313* LICENSE file in the root directory of this source tree. An additional grant2314* of patent rights can be found in the PATENTS file in the same directory.2315*2316* @providesModule DefaultEventPluginOrder2317*/23182319'use strict';23202321var keyOf = _dereq_(157);23222323/**2324* Module that is injectable into `EventPluginHub`, that specifies a2325* deterministic ordering of `EventPlugin`s. A convenient way to reason about2326* plugins, without having to package every one of them. This is better than2327* having plugins be ordered in the same order that they are injected because2328* that ordering would be influenced by the packaging order.2329* `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that2330* preventing default on events is convenient in `SimpleEventPlugin` handlers.2331*/2332var DefaultEventPluginOrder = [2333keyOf({ResponderEventPlugin: null}),2334keyOf({SimpleEventPlugin: null}),2335keyOf({TapEventPlugin: null}),2336keyOf({EnterLeaveEventPlugin: null}),2337keyOf({ChangeEventPlugin: null}),2338keyOf({SelectEventPlugin: null}),2339keyOf({BeforeInputEventPlugin: null}),2340keyOf({AnalyticsEventPlugin: null}),2341keyOf({MobileSafariClickEventPlugin: null})2342];23432344module.exports = DefaultEventPluginOrder;23452346},{"157":157}],15:[function(_dereq_,module,exports){2347/**2348* Copyright 2013-2015, Facebook, Inc.2349* All rights reserved.2350*2351* This source code is licensed under the BSD-style license found in the2352* LICENSE file in the root directory of this source tree. An additional grant2353* of patent rights can be found in the PATENTS file in the same directory.2354*2355* @providesModule EnterLeaveEventPlugin2356* @typechecks static-only2357*/23582359'use strict';23602361var EventConstants = _dereq_(16);2362var EventPropagators = _dereq_(21);2363var SyntheticMouseEvent = _dereq_(112);23642365var ReactMount = _dereq_(77);2366var keyOf = _dereq_(157);23672368var topLevelTypes = EventConstants.topLevelTypes;2369var getFirstReactDOM = ReactMount.getFirstReactDOM;23702371var eventTypes = {2372mouseEnter: {2373registrationName: keyOf({onMouseEnter: null}),2374dependencies: [2375topLevelTypes.topMouseOut,2376topLevelTypes.topMouseOver2377]2378},2379mouseLeave: {2380registrationName: keyOf({onMouseLeave: null}),2381dependencies: [2382topLevelTypes.topMouseOut,2383topLevelTypes.topMouseOver2384]2385}2386};23872388var extractedEvents = [null, null];23892390var EnterLeaveEventPlugin = {23912392eventTypes: eventTypes,23932394/**2395* For almost every interaction we care about, there will be both a top-level2396* `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that2397* we do not extract duplicate events. However, moving the mouse into the2398* browser from outside will not fire a `mouseout` event. In this case, we use2399* the `mouseover` top-level event.2400*2401* @param {string} topLevelType Record from `EventConstants`.2402* @param {DOMEventTarget} topLevelTarget The listening component root node.2403* @param {string} topLevelTargetID ID of `topLevelTarget`.2404* @param {object} nativeEvent Native browser event.2405* @return {*} An accumulation of synthetic events.2406* @see {EventPluginHub.extractEvents}2407*/2408extractEvents: function(2409topLevelType,2410topLevelTarget,2411topLevelTargetID,2412nativeEvent) {2413if (topLevelType === topLevelTypes.topMouseOver &&2414(nativeEvent.relatedTarget || nativeEvent.fromElement)) {2415return null;2416}2417if (topLevelType !== topLevelTypes.topMouseOut &&2418topLevelType !== topLevelTypes.topMouseOver) {2419// Must not be a mouse in or mouse out - ignoring.2420return null;2421}24222423var win;2424if (topLevelTarget.window === topLevelTarget) {2425// `topLevelTarget` is probably a window object.2426win = topLevelTarget;2427} else {2428// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.2429var doc = topLevelTarget.ownerDocument;2430if (doc) {2431win = doc.defaultView || doc.parentWindow;2432} else {2433win = window;2434}2435}24362437var from, to;2438if (topLevelType === topLevelTypes.topMouseOut) {2439from = topLevelTarget;2440to =2441getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement) ||2442win;2443} else {2444from = win;2445to = topLevelTarget;2446}24472448if (from === to) {2449// Nothing pertains to our managed components.2450return null;2451}24522453var fromID = from ? ReactMount.getID(from) : '';2454var toID = to ? ReactMount.getID(to) : '';24552456var leave = SyntheticMouseEvent.getPooled(2457eventTypes.mouseLeave,2458fromID,2459nativeEvent2460);2461leave.type = 'mouseleave';2462leave.target = from;2463leave.relatedTarget = to;24642465var enter = SyntheticMouseEvent.getPooled(2466eventTypes.mouseEnter,2467toID,2468nativeEvent2469);2470enter.type = 'mouseenter';2471enter.target = to;2472enter.relatedTarget = from;24732474EventPropagators.accumulateEnterLeaveDispatches(leave, enter, fromID, toID);24752476extractedEvents[0] = leave;2477extractedEvents[1] = enter;24782479return extractedEvents;2480}24812482};24832484module.exports = EnterLeaveEventPlugin;24852486},{"112":112,"157":157,"16":16,"21":21,"77":77}],16:[function(_dereq_,module,exports){2487/**2488* Copyright 2013-2015, Facebook, Inc.2489* All rights reserved.2490*2491* This source code is licensed under the BSD-style license found in the2492* LICENSE file in the root directory of this source tree. An additional grant2493* of patent rights can be found in the PATENTS file in the same directory.2494*2495* @providesModule EventConstants2496*/24972498'use strict';24992500var keyMirror = _dereq_(156);25012502var PropagationPhases = keyMirror({bubbled: null, captured: null});25032504/**2505* Types of raw signals from the browser caught at the top level.2506*/2507var topLevelTypes = keyMirror({2508topBlur: null,2509topChange: null,2510topClick: null,2511topCompositionEnd: null,2512topCompositionStart: null,2513topCompositionUpdate: null,2514topContextMenu: null,2515topCopy: null,2516topCut: null,2517topDoubleClick: null,2518topDrag: null,2519topDragEnd: null,2520topDragEnter: null,2521topDragExit: null,2522topDragLeave: null,2523topDragOver: null,2524topDragStart: null,2525topDrop: null,2526topError: null,2527topFocus: null,2528topInput: null,2529topKeyDown: null,2530topKeyPress: null,2531topKeyUp: null,2532topLoad: null,2533topMouseDown: null,2534topMouseMove: null,2535topMouseOut: null,2536topMouseOver: null,2537topMouseUp: null,2538topPaste: null,2539topReset: null,2540topScroll: null,2541topSelectionChange: null,2542topSubmit: null,2543topTextInput: null,2544topTouchCancel: null,2545topTouchEnd: null,2546topTouchMove: null,2547topTouchStart: null,2548topWheel: null2549});25502551var EventConstants = {2552topLevelTypes: topLevelTypes,2553PropagationPhases: PropagationPhases2554};25552556module.exports = EventConstants;25572558},{"156":156}],17:[function(_dereq_,module,exports){2559/**2560* Copyright 2013-2015, Facebook, Inc.2561*2562* Licensed under the Apache License, Version 2.0 (the "License");2563* you may not use this file except in compliance with the License.2564* You may obtain a copy of the License at2565*2566* http://www.apache.org/licenses/LICENSE-2.02567*2568* Unless required by applicable law or agreed to in writing, software2569* distributed under the License is distributed on an "AS IS" BASIS,2570* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.2571* See the License for the specific language governing permissions and2572* limitations under the License.2573*2574* @providesModule EventListener2575* @typechecks2576*/25772578var emptyFunction = _dereq_(129);25792580/**2581* Upstream version of event listener. Does not take into account specific2582* nature of platform.2583*/2584var EventListener = {2585/**2586* Listen to DOM events during the bubble phase.2587*2588* @param {DOMEventTarget} target DOM element to register listener on.2589* @param {string} eventType Event type, e.g. 'click' or 'mouseover'.2590* @param {function} callback Callback function.2591* @return {object} Object with a `remove` method.2592*/2593listen: function(target, eventType, callback) {2594if (target.addEventListener) {2595target.addEventListener(eventType, callback, false);2596return {2597remove: function() {2598target.removeEventListener(eventType, callback, false);2599}2600};2601} else if (target.attachEvent) {2602target.attachEvent('on' + eventType, callback);2603return {2604remove: function() {2605target.detachEvent('on' + eventType, callback);2606}2607};2608}2609},26102611/**2612* Listen to DOM events during the capture phase.2613*2614* @param {DOMEventTarget} target DOM element to register listener on.2615* @param {string} eventType Event type, e.g. 'click' or 'mouseover'.2616* @param {function} callback Callback function.2617* @return {object} Object with a `remove` method.2618*/2619capture: function(target, eventType, callback) {2620if (!target.addEventListener) {2621if ("production" !== "development") {2622console.error(2623'Attempted to listen to events during the capture phase on a ' +2624'browser that does not support the capture phase. Your application ' +2625'will not receive some events.'2626);2627}2628return {2629remove: emptyFunction2630};2631} else {2632target.addEventListener(eventType, callback, true);2633return {2634remove: function() {2635target.removeEventListener(eventType, callback, true);2636}2637};2638}2639},26402641registerDefault: function() {}2642};26432644module.exports = EventListener;26452646},{"129":129}],18:[function(_dereq_,module,exports){2647/**2648* Copyright 2013-2015, Facebook, Inc.2649* All rights reserved.2650*2651* This source code is licensed under the BSD-style license found in the2652* LICENSE file in the root directory of this source tree. An additional grant2653* of patent rights can be found in the PATENTS file in the same directory.2654*2655* @providesModule EventPluginHub2656*/26572658'use strict';26592660var EventPluginRegistry = _dereq_(19);2661var EventPluginUtils = _dereq_(20);26622663var accumulateInto = _dereq_(118);2664var forEachAccumulated = _dereq_(135);2665var invariant = _dereq_(150);26662667/**2668* Internal store for event listeners2669*/2670var listenerBank = {};26712672/**2673* Internal queue of events that have accumulated their dispatches and are2674* waiting to have their dispatches executed.2675*/2676var eventQueue = null;26772678/**2679* Dispatches an event and releases it back into the pool, unless persistent.2680*2681* @param {?object} event Synthetic event to be dispatched.2682* @private2683*/2684var executeDispatchesAndRelease = function(event) {2685if (event) {2686var executeDispatch = EventPluginUtils.executeDispatch;2687// Plugins can provide custom behavior when dispatching events.2688var PluginModule = EventPluginRegistry.getPluginModuleForEvent(event);2689if (PluginModule && PluginModule.executeDispatch) {2690executeDispatch = PluginModule.executeDispatch;2691}2692EventPluginUtils.executeDispatchesInOrder(event, executeDispatch);26932694if (!event.isPersistent()) {2695event.constructor.release(event);2696}2697}2698};26992700/**2701* - `InstanceHandle`: [required] Module that performs logical traversals of DOM2702* hierarchy given ids of the logical DOM elements involved.2703*/2704var InstanceHandle = null;27052706function validateInstanceHandle() {2707var valid =2708InstanceHandle &&2709InstanceHandle.traverseTwoPhase &&2710InstanceHandle.traverseEnterLeave;2711("production" !== "development" ? invariant(2712valid,2713'InstanceHandle not injected before use!'2714) : invariant(valid));2715}27162717/**2718* This is a unified interface for event plugins to be installed and configured.2719*2720* Event plugins can implement the following properties:2721*2722* `extractEvents` {function(string, DOMEventTarget, string, object): *}2723* Required. When a top-level event is fired, this method is expected to2724* extract synthetic events that will in turn be queued and dispatched.2725*2726* `eventTypes` {object}2727* Optional, plugins that fire events must publish a mapping of registration2728* names that are used to register listeners. Values of this mapping must2729* be objects that contain `registrationName` or `phasedRegistrationNames`.2730*2731* `executeDispatch` {function(object, function, string)}2732* Optional, allows plugins to override how an event gets dispatched. By2733* default, the listener is simply invoked.2734*2735* Each plugin that is injected into `EventsPluginHub` is immediately operable.2736*2737* @public2738*/2739var EventPluginHub = {27402741/**2742* Methods for injecting dependencies.2743*/2744injection: {27452746/**2747* @param {object} InjectedMount2748* @public2749*/2750injectMount: EventPluginUtils.injection.injectMount,27512752/**2753* @param {object} InjectedInstanceHandle2754* @public2755*/2756injectInstanceHandle: function(InjectedInstanceHandle) {2757InstanceHandle = InjectedInstanceHandle;2758if ("production" !== "development") {2759validateInstanceHandle();2760}2761},27622763getInstanceHandle: function() {2764if ("production" !== "development") {2765validateInstanceHandle();2766}2767return InstanceHandle;2768},27692770/**2771* @param {array} InjectedEventPluginOrder2772* @public2773*/2774injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,27752776/**2777* @param {object} injectedNamesToPlugins Map from names to plugin modules.2778*/2779injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName27802781},27822783eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs,27842785registrationNameModules: EventPluginRegistry.registrationNameModules,27862787/**2788* Stores `listener` at `listenerBank[registrationName][id]`. Is idempotent.2789*2790* @param {string} id ID of the DOM element.2791* @param {string} registrationName Name of listener (e.g. `onClick`).2792* @param {?function} listener The callback to store.2793*/2794putListener: function(id, registrationName, listener) {2795("production" !== "development" ? invariant(2796!listener || typeof listener === 'function',2797'Expected %s listener to be a function, instead got type %s',2798registrationName, typeof listener2799) : invariant(!listener || typeof listener === 'function'));28002801var bankForRegistrationName =2802listenerBank[registrationName] || (listenerBank[registrationName] = {});2803bankForRegistrationName[id] = listener;2804},28052806/**2807* @param {string} id ID of the DOM element.2808* @param {string} registrationName Name of listener (e.g. `onClick`).2809* @return {?function} The stored callback.2810*/2811getListener: function(id, registrationName) {2812var bankForRegistrationName = listenerBank[registrationName];2813return bankForRegistrationName && bankForRegistrationName[id];2814},28152816/**2817* Deletes a listener from the registration bank.2818*2819* @param {string} id ID of the DOM element.2820* @param {string} registrationName Name of listener (e.g. `onClick`).2821*/2822deleteListener: function(id, registrationName) {2823var bankForRegistrationName = listenerBank[registrationName];2824if (bankForRegistrationName) {2825delete bankForRegistrationName[id];2826}2827},28282829/**2830* Deletes all listeners for the DOM element with the supplied ID.2831*2832* @param {string} id ID of the DOM element.2833*/2834deleteAllListeners: function(id) {2835for (var registrationName in listenerBank) {2836delete listenerBank[registrationName][id];2837}2838},28392840/**2841* Allows registered plugins an opportunity to extract events from top-level2842* native browser events.2843*2844* @param {string} topLevelType Record from `EventConstants`.2845* @param {DOMEventTarget} topLevelTarget The listening component root node.2846* @param {string} topLevelTargetID ID of `topLevelTarget`.2847* @param {object} nativeEvent Native browser event.2848* @return {*} An accumulation of synthetic events.2849* @internal2850*/2851extractEvents: function(2852topLevelType,2853topLevelTarget,2854topLevelTargetID,2855nativeEvent) {2856var events;2857var plugins = EventPluginRegistry.plugins;2858for (var i = 0, l = plugins.length; i < l; i++) {2859// Not every plugin in the ordering may be loaded at runtime.2860var possiblePlugin = plugins[i];2861if (possiblePlugin) {2862var extractedEvents = possiblePlugin.extractEvents(2863topLevelType,2864topLevelTarget,2865topLevelTargetID,2866nativeEvent2867);2868if (extractedEvents) {2869events = accumulateInto(events, extractedEvents);2870}2871}2872}2873return events;2874},28752876/**2877* Enqueues a synthetic event that should be dispatched when2878* `processEventQueue` is invoked.2879*2880* @param {*} events An accumulation of synthetic events.2881* @internal2882*/2883enqueueEvents: function(events) {2884if (events) {2885eventQueue = accumulateInto(eventQueue, events);2886}2887},28882889/**2890* Dispatches all synthetic events on the event queue.2891*2892* @internal2893*/2894processEventQueue: function() {2895// Set `eventQueue` to null before processing it so that we can tell if more2896// events get enqueued while processing.2897var processingEventQueue = eventQueue;2898eventQueue = null;2899forEachAccumulated(processingEventQueue, executeDispatchesAndRelease);2900("production" !== "development" ? invariant(2901!eventQueue,2902'processEventQueue(): Additional events were enqueued while processing ' +2903'an event queue. Support for this has not yet been implemented.'2904) : invariant(!eventQueue));2905},29062907/**2908* These are needed for tests only. Do not use!2909*/2910__purge: function() {2911listenerBank = {};2912},29132914__getListenerBank: function() {2915return listenerBank;2916}29172918};29192920module.exports = EventPluginHub;29212922},{"118":118,"135":135,"150":150,"19":19,"20":20}],19:[function(_dereq_,module,exports){2923/**2924* Copyright 2013-2015, Facebook, Inc.2925* All rights reserved.2926*2927* This source code is licensed under the BSD-style license found in the2928* LICENSE file in the root directory of this source tree. An additional grant2929* of patent rights can be found in the PATENTS file in the same directory.2930*2931* @providesModule EventPluginRegistry2932* @typechecks static-only2933*/29342935'use strict';29362937var invariant = _dereq_(150);29382939/**2940* Injectable ordering of event plugins.2941*/2942var EventPluginOrder = null;29432944/**2945* Injectable mapping from names to event plugin modules.2946*/2947var namesToPlugins = {};29482949/**2950* Recomputes the plugin list using the injected plugins and plugin ordering.2951*2952* @private2953*/2954function recomputePluginOrdering() {2955if (!EventPluginOrder) {2956// Wait until an `EventPluginOrder` is injected.2957return;2958}2959for (var pluginName in namesToPlugins) {2960var PluginModule = namesToPlugins[pluginName];2961var pluginIndex = EventPluginOrder.indexOf(pluginName);2962("production" !== "development" ? invariant(2963pluginIndex > -1,2964'EventPluginRegistry: Cannot inject event plugins that do not exist in ' +2965'the plugin ordering, `%s`.',2966pluginName2967) : invariant(pluginIndex > -1));2968if (EventPluginRegistry.plugins[pluginIndex]) {2969continue;2970}2971("production" !== "development" ? invariant(2972PluginModule.extractEvents,2973'EventPluginRegistry: Event plugins must implement an `extractEvents` ' +2974'method, but `%s` does not.',2975pluginName2976) : invariant(PluginModule.extractEvents));2977EventPluginRegistry.plugins[pluginIndex] = PluginModule;2978var publishedEvents = PluginModule.eventTypes;2979for (var eventName in publishedEvents) {2980("production" !== "development" ? invariant(2981publishEventForPlugin(2982publishedEvents[eventName],2983PluginModule,2984eventName2985),2986'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',2987eventName,2988pluginName2989) : invariant(publishEventForPlugin(2990publishedEvents[eventName],2991PluginModule,2992eventName2993)));2994}2995}2996}29972998/**2999* Publishes an event so that it can be dispatched by the supplied plugin.3000*3001* @param {object} dispatchConfig Dispatch configuration for the event.3002* @param {object} PluginModule Plugin publishing the event.3003* @return {boolean} True if the event was successfully published.3004* @private3005*/3006function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {3007("production" !== "development" ? invariant(3008!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName),3009'EventPluginHub: More than one plugin attempted to publish the same ' +3010'event name, `%s`.',3011eventName3012) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName)));3013EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;30143015var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;3016if (phasedRegistrationNames) {3017for (var phaseName in phasedRegistrationNames) {3018if (phasedRegistrationNames.hasOwnProperty(phaseName)) {3019var phasedRegistrationName = phasedRegistrationNames[phaseName];3020publishRegistrationName(3021phasedRegistrationName,3022PluginModule,3023eventName3024);3025}3026}3027return true;3028} else if (dispatchConfig.registrationName) {3029publishRegistrationName(3030dispatchConfig.registrationName,3031PluginModule,3032eventName3033);3034return true;3035}3036return false;3037}30383039/**3040* Publishes a registration name that is used to identify dispatched events and3041* can be used with `EventPluginHub.putListener` to register listeners.3042*3043* @param {string} registrationName Registration name to add.3044* @param {object} PluginModule Plugin publishing the event.3045* @private3046*/3047function publishRegistrationName(registrationName, PluginModule, eventName) {3048("production" !== "development" ? invariant(3049!EventPluginRegistry.registrationNameModules[registrationName],3050'EventPluginHub: More than one plugin attempted to publish the same ' +3051'registration name, `%s`.',3052registrationName3053) : invariant(!EventPluginRegistry.registrationNameModules[registrationName]));3054EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;3055EventPluginRegistry.registrationNameDependencies[registrationName] =3056PluginModule.eventTypes[eventName].dependencies;3057}30583059/**3060* Registers plugins so that they can extract and dispatch events.3061*3062* @see {EventPluginHub}3063*/3064var EventPluginRegistry = {30653066/**3067* Ordered list of injected plugins.3068*/3069plugins: [],30703071/**3072* Mapping from event name to dispatch config3073*/3074eventNameDispatchConfigs: {},30753076/**3077* Mapping from registration name to plugin module3078*/3079registrationNameModules: {},30803081/**3082* Mapping from registration name to event name3083*/3084registrationNameDependencies: {},30853086/**3087* Injects an ordering of plugins (by plugin name). This allows the ordering3088* to be decoupled from injection of the actual plugins so that ordering is3089* always deterministic regardless of packaging, on-the-fly injection, etc.3090*3091* @param {array} InjectedEventPluginOrder3092* @internal3093* @see {EventPluginHub.injection.injectEventPluginOrder}3094*/3095injectEventPluginOrder: function(InjectedEventPluginOrder) {3096("production" !== "development" ? invariant(3097!EventPluginOrder,3098'EventPluginRegistry: Cannot inject event plugin ordering more than ' +3099'once. You are likely trying to load more than one copy of React.'3100) : invariant(!EventPluginOrder));3101// Clone the ordering so it cannot be dynamically mutated.3102EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);3103recomputePluginOrdering();3104},31053106/**3107* Injects plugins to be used by `EventPluginHub`. The plugin names must be3108* in the ordering injected by `injectEventPluginOrder`.3109*3110* Plugins can be injected as part of page initialization or on-the-fly.3111*3112* @param {object} injectedNamesToPlugins Map from names to plugin modules.3113* @internal3114* @see {EventPluginHub.injection.injectEventPluginsByName}3115*/3116injectEventPluginsByName: function(injectedNamesToPlugins) {3117var isOrderingDirty = false;3118for (var pluginName in injectedNamesToPlugins) {3119if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {3120continue;3121}3122var PluginModule = injectedNamesToPlugins[pluginName];3123if (!namesToPlugins.hasOwnProperty(pluginName) ||3124namesToPlugins[pluginName] !== PluginModule) {3125("production" !== "development" ? invariant(3126!namesToPlugins[pluginName],3127'EventPluginRegistry: Cannot inject two different event plugins ' +3128'using the same name, `%s`.',3129pluginName3130) : invariant(!namesToPlugins[pluginName]));3131namesToPlugins[pluginName] = PluginModule;3132isOrderingDirty = true;3133}3134}3135if (isOrderingDirty) {3136recomputePluginOrdering();3137}3138},31393140/**3141* Looks up the plugin for the supplied event.3142*3143* @param {object} event A synthetic event.3144* @return {?object} The plugin that created the supplied event.3145* @internal3146*/3147getPluginModuleForEvent: function(event) {3148var dispatchConfig = event.dispatchConfig;3149if (dispatchConfig.registrationName) {3150return EventPluginRegistry.registrationNameModules[3151dispatchConfig.registrationName3152] || null;3153}3154for (var phase in dispatchConfig.phasedRegistrationNames) {3155if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) {3156continue;3157}3158var PluginModule = EventPluginRegistry.registrationNameModules[3159dispatchConfig.phasedRegistrationNames[phase]3160];3161if (PluginModule) {3162return PluginModule;3163}3164}3165return null;3166},31673168/**3169* Exposed for unit testing.3170* @private3171*/3172_resetEventPlugins: function() {3173EventPluginOrder = null;3174for (var pluginName in namesToPlugins) {3175if (namesToPlugins.hasOwnProperty(pluginName)) {3176delete namesToPlugins[pluginName];3177}3178}3179EventPluginRegistry.plugins.length = 0;31803181var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;3182for (var eventName in eventNameDispatchConfigs) {3183if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {3184delete eventNameDispatchConfigs[eventName];3185}3186}31873188var registrationNameModules = EventPluginRegistry.registrationNameModules;3189for (var registrationName in registrationNameModules) {3190if (registrationNameModules.hasOwnProperty(registrationName)) {3191delete registrationNameModules[registrationName];3192}3193}3194}31953196};31973198module.exports = EventPluginRegistry;31993200},{"150":150}],20:[function(_dereq_,module,exports){3201/**3202* Copyright 2013-2015, Facebook, Inc.3203* All rights reserved.3204*3205* This source code is licensed under the BSD-style license found in the3206* LICENSE file in the root directory of this source tree. An additional grant3207* of patent rights can be found in the PATENTS file in the same directory.3208*3209* @providesModule EventPluginUtils3210*/32113212'use strict';32133214var EventConstants = _dereq_(16);32153216var invariant = _dereq_(150);32173218/**3219* Injected dependencies:3220*/32213222/**3223* - `Mount`: [required] Module that can convert between React dom IDs and3224* actual node references.3225*/3226var injection = {3227Mount: null,3228injectMount: function(InjectedMount) {3229injection.Mount = InjectedMount;3230if ("production" !== "development") {3231("production" !== "development" ? invariant(3232InjectedMount && InjectedMount.getNode,3233'EventPluginUtils.injection.injectMount(...): Injected Mount module ' +3234'is missing getNode.'3235) : invariant(InjectedMount && InjectedMount.getNode));3236}3237}3238};32393240var topLevelTypes = EventConstants.topLevelTypes;32413242function isEndish(topLevelType) {3243return topLevelType === topLevelTypes.topMouseUp ||3244topLevelType === topLevelTypes.topTouchEnd ||3245topLevelType === topLevelTypes.topTouchCancel;3246}32473248function isMoveish(topLevelType) {3249return topLevelType === topLevelTypes.topMouseMove ||3250topLevelType === topLevelTypes.topTouchMove;3251}3252function isStartish(topLevelType) {3253return topLevelType === topLevelTypes.topMouseDown ||3254topLevelType === topLevelTypes.topTouchStart;3255}325632573258var validateEventDispatches;3259if ("production" !== "development") {3260validateEventDispatches = function(event) {3261var dispatchListeners = event._dispatchListeners;3262var dispatchIDs = event._dispatchIDs;32633264var listenersIsArr = Array.isArray(dispatchListeners);3265var idsIsArr = Array.isArray(dispatchIDs);3266var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0;3267var listenersLen = listenersIsArr ?3268dispatchListeners.length :3269dispatchListeners ? 1 : 0;32703271("production" !== "development" ? invariant(3272idsIsArr === listenersIsArr && IDsLen === listenersLen,3273'EventPluginUtils: Invalid `event`.'3274) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen));3275};3276}32773278/**3279* Invokes `cb(event, listener, id)`. Avoids using call if no scope is3280* provided. The `(listener,id)` pair effectively forms the "dispatch" but are3281* kept separate to conserve memory.3282*/3283function forEachEventDispatch(event, cb) {3284var dispatchListeners = event._dispatchListeners;3285var dispatchIDs = event._dispatchIDs;3286if ("production" !== "development") {3287validateEventDispatches(event);3288}3289if (Array.isArray(dispatchListeners)) {3290for (var i = 0; i < dispatchListeners.length; i++) {3291if (event.isPropagationStopped()) {3292break;3293}3294// Listeners and IDs are two parallel arrays that are always in sync.3295cb(event, dispatchListeners[i], dispatchIDs[i]);3296}3297} else if (dispatchListeners) {3298cb(event, dispatchListeners, dispatchIDs);3299}3300}33013302/**3303* Default implementation of PluginModule.executeDispatch().3304* @param {SyntheticEvent} SyntheticEvent to handle3305* @param {function} Application-level callback3306* @param {string} domID DOM id to pass to the callback.3307*/3308function executeDispatch(event, listener, domID) {3309event.currentTarget = injection.Mount.getNode(domID);3310var returnValue = listener(event, domID);3311event.currentTarget = null;3312return returnValue;3313}33143315/**3316* Standard/simple iteration through an event's collected dispatches.3317*/3318function executeDispatchesInOrder(event, cb) {3319forEachEventDispatch(event, cb);3320event._dispatchListeners = null;3321event._dispatchIDs = null;3322}33233324/**3325* Standard/simple iteration through an event's collected dispatches, but stops3326* at the first dispatch execution returning true, and returns that id.3327*3328* @return id of the first dispatch execution who's listener returns true, or3329* null if no listener returned true.3330*/3331function executeDispatchesInOrderStopAtTrueImpl(event) {3332var dispatchListeners = event._dispatchListeners;3333var dispatchIDs = event._dispatchIDs;3334if ("production" !== "development") {3335validateEventDispatches(event);3336}3337if (Array.isArray(dispatchListeners)) {3338for (var i = 0; i < dispatchListeners.length; i++) {3339if (event.isPropagationStopped()) {3340break;3341}3342// Listeners and IDs are two parallel arrays that are always in sync.3343if (dispatchListeners[i](event, dispatchIDs[i])) {3344return dispatchIDs[i];3345}3346}3347} else if (dispatchListeners) {3348if (dispatchListeners(event, dispatchIDs)) {3349return dispatchIDs;3350}3351}3352return null;3353}33543355/**3356* @see executeDispatchesInOrderStopAtTrueImpl3357*/3358function executeDispatchesInOrderStopAtTrue(event) {3359var ret = executeDispatchesInOrderStopAtTrueImpl(event);3360event._dispatchIDs = null;3361event._dispatchListeners = null;3362return ret;3363}33643365/**3366* Execution of a "direct" dispatch - there must be at most one dispatch3367* accumulated on the event or it is considered an error. It doesn't really make3368* sense for an event with multiple dispatches (bubbled) to keep track of the3369* return values at each dispatch execution, but it does tend to make sense when3370* dealing with "direct" dispatches.3371*3372* @return The return value of executing the single dispatch.3373*/3374function executeDirectDispatch(event) {3375if ("production" !== "development") {3376validateEventDispatches(event);3377}3378var dispatchListener = event._dispatchListeners;3379var dispatchID = event._dispatchIDs;3380("production" !== "development" ? invariant(3381!Array.isArray(dispatchListener),3382'executeDirectDispatch(...): Invalid `event`.'3383) : invariant(!Array.isArray(dispatchListener)));3384var res = dispatchListener ?3385dispatchListener(event, dispatchID) :3386null;3387event._dispatchListeners = null;3388event._dispatchIDs = null;3389return res;3390}33913392/**3393* @param {SyntheticEvent} event3394* @return {bool} True iff number of dispatches accumulated is greater than 0.3395*/3396function hasDispatches(event) {3397return !!event._dispatchListeners;3398}33993400/**3401* General utilities that are useful in creating custom Event Plugins.3402*/3403var EventPluginUtils = {3404isEndish: isEndish,3405isMoveish: isMoveish,3406isStartish: isStartish,34073408executeDirectDispatch: executeDirectDispatch,3409executeDispatch: executeDispatch,3410executeDispatchesInOrder: executeDispatchesInOrder,3411executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,3412hasDispatches: hasDispatches,3413injection: injection,3414useTouchEvents: false3415};34163417module.exports = EventPluginUtils;34183419},{"150":150,"16":16}],21:[function(_dereq_,module,exports){3420/**3421* Copyright 2013-2015, Facebook, Inc.3422* All rights reserved.3423*3424* This source code is licensed under the BSD-style license found in the3425* LICENSE file in the root directory of this source tree. An additional grant3426* of patent rights can be found in the PATENTS file in the same directory.3427*3428* @providesModule EventPropagators3429*/34303431'use strict';34323433var EventConstants = _dereq_(16);3434var EventPluginHub = _dereq_(18);34353436var accumulateInto = _dereq_(118);3437var forEachAccumulated = _dereq_(135);34383439var PropagationPhases = EventConstants.PropagationPhases;3440var getListener = EventPluginHub.getListener;34413442/**3443* Some event types have a notion of different registration names for different3444* "phases" of propagation. This finds listeners by a given phase.3445*/3446function listenerAtPhase(id, event, propagationPhase) {3447var registrationName =3448event.dispatchConfig.phasedRegistrationNames[propagationPhase];3449return getListener(id, registrationName);3450}34513452/**3453* Tags a `SyntheticEvent` with dispatched listeners. Creating this function3454* here, allows us to not have to bind or create functions for each event.3455* Mutating the event's members allows us to not have to create a wrapping3456* "dispatch" object that pairs the event with the listener.3457*/3458function accumulateDirectionalDispatches(domID, upwards, event) {3459if ("production" !== "development") {3460if (!domID) {3461throw new Error('Dispatching id must not be null');3462}3463}3464var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;3465var listener = listenerAtPhase(domID, event, phase);3466if (listener) {3467event._dispatchListeners =3468accumulateInto(event._dispatchListeners, listener);3469event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);3470}3471}34723473/**3474* Collect dispatches (must be entirely collected before dispatching - see unit3475* tests). Lazily allocate the array to conserve memory. We must loop through3476* each event and perform the traversal for each one. We can not perform a3477* single traversal for the entire collection of events because each event may3478* have a different target.3479*/3480function accumulateTwoPhaseDispatchesSingle(event) {3481if (event && event.dispatchConfig.phasedRegistrationNames) {3482EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(3483event.dispatchMarker,3484accumulateDirectionalDispatches,3485event3486);3487}3488}348934903491/**3492* Accumulates without regard to direction, does not look for phased3493* registration names. Same as `accumulateDirectDispatchesSingle` but without3494* requiring that the `dispatchMarker` be the same as the dispatched ID.3495*/3496function accumulateDispatches(id, ignoredDirection, event) {3497if (event && event.dispatchConfig.registrationName) {3498var registrationName = event.dispatchConfig.registrationName;3499var listener = getListener(id, registrationName);3500if (listener) {3501event._dispatchListeners =3502accumulateInto(event._dispatchListeners, listener);3503event._dispatchIDs = accumulateInto(event._dispatchIDs, id);3504}3505}3506}35073508/**3509* Accumulates dispatches on an `SyntheticEvent`, but only for the3510* `dispatchMarker`.3511* @param {SyntheticEvent} event3512*/3513function accumulateDirectDispatchesSingle(event) {3514if (event && event.dispatchConfig.registrationName) {3515accumulateDispatches(event.dispatchMarker, null, event);3516}3517}35183519function accumulateTwoPhaseDispatches(events) {3520forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);3521}35223523function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) {3524EventPluginHub.injection.getInstanceHandle().traverseEnterLeave(3525fromID,3526toID,3527accumulateDispatches,3528leave,3529enter3530);3531}353235333534function accumulateDirectDispatches(events) {3535forEachAccumulated(events, accumulateDirectDispatchesSingle);3536}3537353835393540/**3541* A small set of propagation patterns, each of which will accept a small amount3542* of information, and generate a set of "dispatch ready event objects" - which3543* are sets of events that have already been annotated with a set of dispatched3544* listener functions/ids. The API is designed this way to discourage these3545* propagation strategies from actually executing the dispatches, since we3546* always want to collect the entire set of dispatches before executing event a3547* single one.3548*3549* @constructor EventPropagators3550*/3551var EventPropagators = {3552accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,3553accumulateDirectDispatches: accumulateDirectDispatches,3554accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches3555};35563557module.exports = EventPropagators;35583559},{"118":118,"135":135,"16":16,"18":18}],22:[function(_dereq_,module,exports){3560/**3561* Copyright 2013-2015, Facebook, Inc.3562* All rights reserved.3563*3564* This source code is licensed under the BSD-style license found in the3565* LICENSE file in the root directory of this source tree. An additional grant3566* of patent rights can be found in the PATENTS file in the same directory.3567*3568* @providesModule ExecutionEnvironment3569*/35703571/*jslint evil: true */35723573"use strict";35743575var canUseDOM = !!(3576(typeof window !== 'undefined' &&3577window.document && window.document.createElement)3578);35793580/**3581* Simple, lightweight module assisting with the detection and context of3582* Worker. Helps avoid circular dependencies and allows code to reason about3583* whether or not they are in a Worker, even if they never include the main3584* `ReactWorker` dependency.3585*/3586var ExecutionEnvironment = {35873588canUseDOM: canUseDOM,35893590canUseWorkers: typeof Worker !== 'undefined',35913592canUseEventListeners:3593canUseDOM && !!(window.addEventListener || window.attachEvent),35943595canUseViewport: canUseDOM && !!window.screen,35963597isInWorker: !canUseDOM // For now, this is true - might change in the future.35983599};36003601module.exports = ExecutionEnvironment;36023603},{}],23:[function(_dereq_,module,exports){3604/**3605* Copyright 2013-2015, Facebook, Inc.3606* All rights reserved.3607*3608* This source code is licensed under the BSD-style license found in the3609* LICENSE file in the root directory of this source tree. An additional grant3610* of patent rights can be found in the PATENTS file in the same directory.3611*3612* @providesModule FallbackCompositionState3613* @typechecks static-only3614*/36153616'use strict';36173618var PooledClass = _dereq_(30);36193620var assign = _dereq_(29);3621var getTextContentAccessor = _dereq_(145);36223623/**3624* This helper class stores information about text content of a target node,3625* allowing comparison of content before and after a given event.3626*3627* Identify the node where selection currently begins, then observe3628* both its text content and its current position in the DOM. Since the3629* browser may natively replace the target node during composition, we can3630* use its position to find its replacement.3631*3632* @param {DOMEventTarget} root3633*/3634function FallbackCompositionState(root) {3635this._root = root;3636this._startText = this.getText();3637this._fallbackText = null;3638}36393640assign(FallbackCompositionState.prototype, {3641/**3642* Get current text of input.3643*3644* @return {string}3645*/3646getText: function() {3647if ('value' in this._root) {3648return this._root.value;3649}3650return this._root[getTextContentAccessor()];3651},36523653/**3654* Determine the differing substring between the initially stored3655* text content and the current content.3656*3657* @return {string}3658*/3659getData: function() {3660if (this._fallbackText) {3661return this._fallbackText;3662}36633664var start;3665var startValue = this._startText;3666var startLength = startValue.length;3667var end;3668var endValue = this.getText();3669var endLength = endValue.length;36703671for (start = 0; start < startLength; start++) {3672if (startValue[start] !== endValue[start]) {3673break;3674}3675}36763677var minEnd = startLength - start;3678for (end = 1; end <= minEnd; end++) {3679if (startValue[startLength - end] !== endValue[endLength - end]) {3680break;3681}3682}36833684var sliceTail = end > 1 ? 1 - end : undefined;3685this._fallbackText = endValue.slice(start, sliceTail);3686return this._fallbackText;3687}3688});36893690PooledClass.addPoolingTo(FallbackCompositionState);36913692module.exports = FallbackCompositionState;36933694},{"145":145,"29":29,"30":30}],24:[function(_dereq_,module,exports){3695/**3696* Copyright 2013-2015, Facebook, Inc.3697* All rights reserved.3698*3699* This source code is licensed under the BSD-style license found in the3700* LICENSE file in the root directory of this source tree. An additional grant3701* of patent rights can be found in the PATENTS file in the same directory.3702*3703* @providesModule HTMLDOMPropertyConfig3704*/37053706/*jslint bitwise: true*/37073708'use strict';37093710var DOMProperty = _dereq_(11);3711var ExecutionEnvironment = _dereq_(22);37123713var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;3714var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;3715var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;3716var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS;3717var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;3718var HAS_POSITIVE_NUMERIC_VALUE =3719DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;3720var HAS_OVERLOADED_BOOLEAN_VALUE =3721DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;37223723var hasSVG;3724if (ExecutionEnvironment.canUseDOM) {3725var implementation = document.implementation;3726hasSVG = (3727implementation &&3728implementation.hasFeature &&3729implementation.hasFeature(3730'http://www.w3.org/TR/SVG11/feature#BasicStructure',3731'1.1'3732)3733);3734}373537363737var HTMLDOMPropertyConfig = {3738isCustomAttribute: RegExp.prototype.test.bind(3739/^(data|aria)-[a-z_][a-z\d_.\-]*$/3740),3741Properties: {3742/**3743* Standard Properties3744*/3745accept: null,3746acceptCharset: null,3747accessKey: null,3748action: null,3749allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,3750allowTransparency: MUST_USE_ATTRIBUTE,3751alt: null,3752async: HAS_BOOLEAN_VALUE,3753autoComplete: null,3754// autoFocus is polyfilled/normalized by AutoFocusMixin3755// autoFocus: HAS_BOOLEAN_VALUE,3756autoPlay: HAS_BOOLEAN_VALUE,3757cellPadding: null,3758cellSpacing: null,3759charSet: MUST_USE_ATTRIBUTE,3760checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,3761classID: MUST_USE_ATTRIBUTE,3762// To set className on SVG elements, it's necessary to use .setAttribute;3763// this works on HTML elements too in all browsers except IE8. Conveniently,3764// IE8 doesn't support SVG and so we can simply use the attribute in3765// browsers that support SVG and the property in browsers that don't,3766// regardless of whether the element is HTML or SVG.3767className: hasSVG ? MUST_USE_ATTRIBUTE : MUST_USE_PROPERTY,3768cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,3769colSpan: null,3770content: null,3771contentEditable: null,3772contextMenu: MUST_USE_ATTRIBUTE,3773controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,3774coords: null,3775crossOrigin: null,3776data: null, // For `<object />` acts as `src`.3777dateTime: MUST_USE_ATTRIBUTE,3778defer: HAS_BOOLEAN_VALUE,3779dir: null,3780disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,3781download: HAS_OVERLOADED_BOOLEAN_VALUE,3782draggable: null,3783encType: null,3784form: MUST_USE_ATTRIBUTE,3785formAction: MUST_USE_ATTRIBUTE,3786formEncType: MUST_USE_ATTRIBUTE,3787formMethod: MUST_USE_ATTRIBUTE,3788formNoValidate: HAS_BOOLEAN_VALUE,3789formTarget: MUST_USE_ATTRIBUTE,3790frameBorder: MUST_USE_ATTRIBUTE,3791headers: null,3792height: MUST_USE_ATTRIBUTE,3793hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,3794high: null,3795href: null,3796hrefLang: null,3797htmlFor: null,3798httpEquiv: null,3799icon: null,3800id: MUST_USE_PROPERTY,3801label: null,3802lang: null,3803list: MUST_USE_ATTRIBUTE,3804loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,3805low: null,3806manifest: MUST_USE_ATTRIBUTE,3807marginHeight: null,3808marginWidth: null,3809max: null,3810maxLength: MUST_USE_ATTRIBUTE,3811media: MUST_USE_ATTRIBUTE,3812mediaGroup: null,3813method: null,3814min: null,3815multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,3816muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,3817name: null,3818noValidate: HAS_BOOLEAN_VALUE,3819open: HAS_BOOLEAN_VALUE,3820optimum: null,3821pattern: null,3822placeholder: null,3823poster: null,3824preload: null,3825radioGroup: null,3826readOnly: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,3827rel: null,3828required: HAS_BOOLEAN_VALUE,3829role: MUST_USE_ATTRIBUTE,3830rows: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,3831rowSpan: null,3832sandbox: null,3833scope: null,3834scoped: HAS_BOOLEAN_VALUE,3835scrolling: null,3836seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,3837selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,3838shape: null,3839size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,3840sizes: MUST_USE_ATTRIBUTE,3841span: HAS_POSITIVE_NUMERIC_VALUE,3842spellCheck: null,3843src: null,3844srcDoc: MUST_USE_PROPERTY,3845srcSet: MUST_USE_ATTRIBUTE,3846start: HAS_NUMERIC_VALUE,3847step: null,3848style: null,3849tabIndex: null,3850target: null,3851title: null,3852type: null,3853useMap: null,3854value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS,3855width: MUST_USE_ATTRIBUTE,3856wmode: MUST_USE_ATTRIBUTE,38573858/**3859* Non-standard Properties3860*/3861// autoCapitalize and autoCorrect are supported in Mobile Safari for3862// keyboard hints.3863autoCapitalize: null,3864autoCorrect: null,3865// itemProp, itemScope, itemType are for3866// Microdata support. See http://schema.org/docs/gs.html3867itemProp: MUST_USE_ATTRIBUTE,3868itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,3869itemType: MUST_USE_ATTRIBUTE,3870// itemID and itemRef are for Microdata support as well but3871// only specified in the the WHATWG spec document. See3872// https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api3873itemID: MUST_USE_ATTRIBUTE,3874itemRef: MUST_USE_ATTRIBUTE,3875// property is supported for OpenGraph in meta tags.3876property: null,3877// IE-only attribute that controls focus behavior3878unselectable: MUST_USE_ATTRIBUTE3879},3880DOMAttributeNames: {3881acceptCharset: 'accept-charset',3882className: 'class',3883htmlFor: 'for',3884httpEquiv: 'http-equiv'3885},3886DOMPropertyNames: {3887autoCapitalize: 'autocapitalize',3888autoComplete: 'autocomplete',3889autoCorrect: 'autocorrect',3890autoFocus: 'autofocus',3891autoPlay: 'autoplay',3892// `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.3893// http://www.w3.org/TR/html5/forms.html#dom-fs-encoding3894encType: 'encoding',3895hrefLang: 'hreflang',3896radioGroup: 'radiogroup',3897spellCheck: 'spellcheck',3898srcDoc: 'srcdoc',3899srcSet: 'srcset'3900}3901};39023903module.exports = HTMLDOMPropertyConfig;39043905},{"11":11,"22":22}],25:[function(_dereq_,module,exports){3906/**3907* Copyright 2013-2015, Facebook, Inc.3908* All rights reserved.3909*3910* This source code is licensed under the BSD-style license found in the3911* LICENSE file in the root directory of this source tree. An additional grant3912* of patent rights can be found in the PATENTS file in the same directory.3913*3914* @providesModule LinkedStateMixin3915* @typechecks static-only3916*/39173918'use strict';39193920var ReactLink = _dereq_(75);3921var ReactStateSetters = _dereq_(94);39223923/**3924* A simple mixin around ReactLink.forState().3925*/3926var LinkedStateMixin = {3927/**3928* Create a ReactLink that's linked to part of this component's state. The3929* ReactLink will have the current value of this.state[key] and will call3930* setState() when a change is requested.3931*3932* @param {string} key state key to update. Note: you may want to use keyOf()3933* if you're using Google Closure Compiler advanced mode.3934* @return {ReactLink} ReactLink instance linking to the state.3935*/3936linkState: function(key) {3937return new ReactLink(3938this.state[key],3939ReactStateSetters.createStateKeySetter(this, key)3940);3941}3942};39433944module.exports = LinkedStateMixin;39453946},{"75":75,"94":94}],26:[function(_dereq_,module,exports){3947/**3948* Copyright 2013-2015, Facebook, Inc.3949* All rights reserved.3950*3951* This source code is licensed under the BSD-style license found in the3952* LICENSE file in the root directory of this source tree. An additional grant3953* of patent rights can be found in the PATENTS file in the same directory.3954*3955* @providesModule LinkedValueUtils3956* @typechecks static-only3957*/39583959'use strict';39603961var ReactPropTypes = _dereq_(86);39623963var invariant = _dereq_(150);39643965var hasReadOnlyValue = {3966'button': true,3967'checkbox': true,3968'image': true,3969'hidden': true,3970'radio': true,3971'reset': true,3972'submit': true3973};39743975function _assertSingleLink(input) {3976("production" !== "development" ? invariant(3977input.props.checkedLink == null || input.props.valueLink == null,3978'Cannot provide a checkedLink and a valueLink. If you want to use ' +3979'checkedLink, you probably don\'t want to use valueLink and vice versa.'3980) : invariant(input.props.checkedLink == null || input.props.valueLink == null));3981}3982function _assertValueLink(input) {3983_assertSingleLink(input);3984("production" !== "development" ? invariant(3985input.props.value == null && input.props.onChange == null,3986'Cannot provide a valueLink and a value or onChange event. If you want ' +3987'to use value or onChange, you probably don\'t want to use valueLink.'3988) : invariant(input.props.value == null && input.props.onChange == null));3989}39903991function _assertCheckedLink(input) {3992_assertSingleLink(input);3993("production" !== "development" ? invariant(3994input.props.checked == null && input.props.onChange == null,3995'Cannot provide a checkedLink and a checked property or onChange event. ' +3996'If you want to use checked or onChange, you probably don\'t want to ' +3997'use checkedLink'3998) : invariant(input.props.checked == null && input.props.onChange == null));3999}40004001/**4002* @param {SyntheticEvent} e change event to handle4003*/4004function _handleLinkedValueChange(e) {4005/*jshint validthis:true */4006this.props.valueLink.requestChange(e.target.value);4007}40084009/**4010* @param {SyntheticEvent} e change event to handle4011*/4012function _handleLinkedCheckChange(e) {4013/*jshint validthis:true */4014this.props.checkedLink.requestChange(e.target.checked);4015}40164017/**4018* Provide a linked `value` attribute for controlled forms. You should not use4019* this outside of the ReactDOM controlled form components.4020*/4021var LinkedValueUtils = {4022Mixin: {4023propTypes: {4024value: function(props, propName, componentName) {4025if (!props[propName] ||4026hasReadOnlyValue[props.type] ||4027props.onChange ||4028props.readOnly ||4029props.disabled) {4030return null;4031}4032return new Error(4033'You provided a `value` prop to a form field without an ' +4034'`onChange` handler. This will render a read-only field. If ' +4035'the field should be mutable use `defaultValue`. Otherwise, ' +4036'set either `onChange` or `readOnly`.'4037);4038},4039checked: function(props, propName, componentName) {4040if (!props[propName] ||4041props.onChange ||4042props.readOnly ||4043props.disabled) {4044return null;4045}4046return new Error(4047'You provided a `checked` prop to a form field without an ' +4048'`onChange` handler. This will render a read-only field. If ' +4049'the field should be mutable use `defaultChecked`. Otherwise, ' +4050'set either `onChange` or `readOnly`.'4051);4052},4053onChange: ReactPropTypes.func4054}4055},40564057/**4058* @param {ReactComponent} input Form component4059* @return {*} current value of the input either from value prop or link.4060*/4061getValue: function(input) {4062if (input.props.valueLink) {4063_assertValueLink(input);4064return input.props.valueLink.value;4065}4066return input.props.value;4067},40684069/**4070* @param {ReactComponent} input Form component4071* @return {*} current checked status of the input either from checked prop4072* or link.4073*/4074getChecked: function(input) {4075if (input.props.checkedLink) {4076_assertCheckedLink(input);4077return input.props.checkedLink.value;4078}4079return input.props.checked;4080},40814082/**4083* @param {ReactComponent} input Form component4084* @return {function} change callback either from onChange prop or link.4085*/4086getOnChange: function(input) {4087if (input.props.valueLink) {4088_assertValueLink(input);4089return _handleLinkedValueChange;4090} else if (input.props.checkedLink) {4091_assertCheckedLink(input);4092return _handleLinkedCheckChange;4093}4094return input.props.onChange;4095}4096};40974098module.exports = LinkedValueUtils;40994100},{"150":150,"86":86}],27:[function(_dereq_,module,exports){4101/**4102* Copyright 2014-2015, Facebook, Inc.4103* All rights reserved.4104*4105* This source code is licensed under the BSD-style license found in the4106* LICENSE file in the root directory of this source tree. An additional grant4107* of patent rights can be found in the PATENTS file in the same directory.4108*4109* @providesModule LocalEventTrapMixin4110*/41114112'use strict';41134114var ReactBrowserEventEmitter = _dereq_(33);41154116var accumulateInto = _dereq_(118);4117var forEachAccumulated = _dereq_(135);4118var invariant = _dereq_(150);41194120function remove(event) {4121event.remove();4122}41234124var LocalEventTrapMixin = {4125trapBubbledEvent:function(topLevelType, handlerBaseName) {4126("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()));4127// If a component renders to null or if another component fatals and causes4128// the state of the tree to be corrupted, `node` here can be null.4129var node = this.getDOMNode();4130("production" !== "development" ? invariant(4131node,4132'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.'4133) : invariant(node));4134var listener = ReactBrowserEventEmitter.trapBubbledEvent(4135topLevelType,4136handlerBaseName,4137node4138);4139this._localEventListeners =4140accumulateInto(this._localEventListeners, listener);4141},41424143// trapCapturedEvent would look nearly identical. We don't implement that4144// method because it isn't currently needed.41454146componentWillUnmount:function() {4147if (this._localEventListeners) {4148forEachAccumulated(this._localEventListeners, remove);4149}4150}4151};41524153module.exports = LocalEventTrapMixin;41544155},{"118":118,"135":135,"150":150,"33":33}],28:[function(_dereq_,module,exports){4156/**4157* Copyright 2013-2015, Facebook, Inc.4158* All rights reserved.4159*4160* This source code is licensed under the BSD-style license found in the4161* LICENSE file in the root directory of this source tree. An additional grant4162* of patent rights can be found in the PATENTS file in the same directory.4163*4164* @providesModule MobileSafariClickEventPlugin4165* @typechecks static-only4166*/41674168'use strict';41694170var EventConstants = _dereq_(16);41714172var emptyFunction = _dereq_(129);41734174var topLevelTypes = EventConstants.topLevelTypes;41754176/**4177* Mobile Safari does not fire properly bubble click events on non-interactive4178* elements, which means delegated click listeners do not fire. The workaround4179* for this bug involves attaching an empty click listener on the target node.4180*4181* This particular plugin works around the bug by attaching an empty click4182* listener on `touchstart` (which does fire on every element).4183*/4184var MobileSafariClickEventPlugin = {41854186eventTypes: null,41874188/**4189* @param {string} topLevelType Record from `EventConstants`.4190* @param {DOMEventTarget} topLevelTarget The listening component root node.4191* @param {string} topLevelTargetID ID of `topLevelTarget`.4192* @param {object} nativeEvent Native browser event.4193* @return {*} An accumulation of synthetic events.4194* @see {EventPluginHub.extractEvents}4195*/4196extractEvents: function(4197topLevelType,4198topLevelTarget,4199topLevelTargetID,4200nativeEvent) {4201if (topLevelType === topLevelTypes.topTouchStart) {4202var target = nativeEvent.target;4203if (target && !target.onclick) {4204target.onclick = emptyFunction;4205}4206}4207}42084209};42104211module.exports = MobileSafariClickEventPlugin;42124213},{"129":129,"16":16}],29:[function(_dereq_,module,exports){4214/**4215* Copyright 2014-2015, Facebook, Inc.4216* All rights reserved.4217*4218* This source code is licensed under the BSD-style license found in the4219* LICENSE file in the root directory of this source tree. An additional grant4220* of patent rights can be found in the PATENTS file in the same directory.4221*4222* @providesModule Object.assign4223*/42244225// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign42264227'use strict';42284229function assign(target, sources) {4230if (target == null) {4231throw new TypeError('Object.assign target cannot be null or undefined');4232}42334234var to = Object(target);4235var hasOwnProperty = Object.prototype.hasOwnProperty;42364237for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {4238var nextSource = arguments[nextIndex];4239if (nextSource == null) {4240continue;4241}42424243var from = Object(nextSource);42444245// We don't currently support accessors nor proxies. Therefore this4246// copy cannot throw. If we ever supported this then we must handle4247// exceptions and side-effects. We don't support symbols so they won't4248// be transferred.42494250for (var key in from) {4251if (hasOwnProperty.call(from, key)) {4252to[key] = from[key];4253}4254}4255}42564257return to;4258}42594260module.exports = assign;42614262},{}],30:[function(_dereq_,module,exports){4263/**4264* Copyright 2013-2015, Facebook, Inc.4265* All rights reserved.4266*4267* This source code is licensed under the BSD-style license found in the4268* LICENSE file in the root directory of this source tree. An additional grant4269* of patent rights can be found in the PATENTS file in the same directory.4270*4271* @providesModule PooledClass4272*/42734274'use strict';42754276var invariant = _dereq_(150);42774278/**4279* Static poolers. Several custom versions for each potential number of4280* arguments. A completely generic pooler is easy to implement, but would4281* require accessing the `arguments` object. In each of these, `this` refers to4282* the Class itself, not an instance. If any others are needed, simply add them4283* here, or in their own files.4284*/4285var oneArgumentPooler = function(copyFieldsFrom) {4286var Klass = this;4287if (Klass.instancePool.length) {4288var instance = Klass.instancePool.pop();4289Klass.call(instance, copyFieldsFrom);4290return instance;4291} else {4292return new Klass(copyFieldsFrom);4293}4294};42954296var twoArgumentPooler = function(a1, a2) {4297var Klass = this;4298if (Klass.instancePool.length) {4299var instance = Klass.instancePool.pop();4300Klass.call(instance, a1, a2);4301return instance;4302} else {4303return new Klass(a1, a2);4304}4305};43064307var threeArgumentPooler = function(a1, a2, a3) {4308var Klass = this;4309if (Klass.instancePool.length) {4310var instance = Klass.instancePool.pop();4311Klass.call(instance, a1, a2, a3);4312return instance;4313} else {4314return new Klass(a1, a2, a3);4315}4316};43174318var fiveArgumentPooler = function(a1, a2, a3, a4, a5) {4319var Klass = this;4320if (Klass.instancePool.length) {4321var instance = Klass.instancePool.pop();4322Klass.call(instance, a1, a2, a3, a4, a5);4323return instance;4324} else {4325return new Klass(a1, a2, a3, a4, a5);4326}4327};43284329var standardReleaser = function(instance) {4330var Klass = this;4331("production" !== "development" ? invariant(4332instance instanceof Klass,4333'Trying to release an instance into a pool of a different type.'4334) : invariant(instance instanceof Klass));4335if (instance.destructor) {4336instance.destructor();4337}4338if (Klass.instancePool.length < Klass.poolSize) {4339Klass.instancePool.push(instance);4340}4341};43424343var DEFAULT_POOL_SIZE = 10;4344var DEFAULT_POOLER = oneArgumentPooler;43454346/**4347* Augments `CopyConstructor` to be a poolable class, augmenting only the class4348* itself (statically) not adding any prototypical fields. Any CopyConstructor4349* you give this may have a `poolSize` property, and will look for a4350* prototypical `destructor` on instances (optional).4351*4352* @param {Function} CopyConstructor Constructor that can be used to reset.4353* @param {Function} pooler Customizable pooler.4354*/4355var addPoolingTo = function(CopyConstructor, pooler) {4356var NewKlass = CopyConstructor;4357NewKlass.instancePool = [];4358NewKlass.getPooled = pooler || DEFAULT_POOLER;4359if (!NewKlass.poolSize) {4360NewKlass.poolSize = DEFAULT_POOL_SIZE;4361}4362NewKlass.release = standardReleaser;4363return NewKlass;4364};43654366var PooledClass = {4367addPoolingTo: addPoolingTo,4368oneArgumentPooler: oneArgumentPooler,4369twoArgumentPooler: twoArgumentPooler,4370threeArgumentPooler: threeArgumentPooler,4371fiveArgumentPooler: fiveArgumentPooler4372};43734374module.exports = PooledClass;43754376},{"150":150}],31:[function(_dereq_,module,exports){4377/**4378* Copyright 2013-2015, Facebook, Inc.4379* All rights reserved.4380*4381* This source code is licensed under the BSD-style license found in the4382* LICENSE file in the root directory of this source tree. An additional grant4383* of patent rights can be found in the PATENTS file in the same directory.4384*4385* @providesModule React4386*/43874388/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/43894390'use strict';43914392var EventPluginUtils = _dereq_(20);4393var ReactChildren = _dereq_(37);4394var ReactComponent = _dereq_(39);4395var ReactClass = _dereq_(38);4396var ReactContext = _dereq_(44);4397var ReactCurrentOwner = _dereq_(45);4398var ReactElement = _dereq_(63);4399var ReactElementValidator = _dereq_(64);4400var ReactDOM = _dereq_(46);4401var ReactDOMTextComponent = _dereq_(57);4402var ReactDefaultInjection = _dereq_(60);4403var ReactInstanceHandles = _dereq_(72);4404var ReactMount = _dereq_(77);4405var ReactPerf = _dereq_(82);4406var ReactPropTypes = _dereq_(86);4407var ReactReconciler = _dereq_(89);4408var ReactServerRendering = _dereq_(92);44094410var assign = _dereq_(29);4411var findDOMNode = _dereq_(132);4412var onlyChild = _dereq_(160);44134414ReactDefaultInjection.inject();44154416var createElement = ReactElement.createElement;4417var createFactory = ReactElement.createFactory;4418var cloneElement = ReactElement.cloneElement;44194420if ("production" !== "development") {4421createElement = ReactElementValidator.createElement;4422createFactory = ReactElementValidator.createFactory;4423cloneElement = ReactElementValidator.cloneElement;4424}44254426var render = ReactPerf.measure('React', 'render', ReactMount.render);44274428var React = {4429Children: {4430map: ReactChildren.map,4431forEach: ReactChildren.forEach,4432count: ReactChildren.count,4433only: onlyChild4434},4435Component: ReactComponent,4436DOM: ReactDOM,4437PropTypes: ReactPropTypes,4438initializeTouchEvents: function(shouldUseTouch) {4439EventPluginUtils.useTouchEvents = shouldUseTouch;4440},4441createClass: ReactClass.createClass,4442createElement: createElement,4443cloneElement: cloneElement,4444createFactory: createFactory,4445createMixin: function(mixin) {4446// Currently a noop. Will be used to validate and trace mixins.4447return mixin;4448},4449constructAndRenderComponent: ReactMount.constructAndRenderComponent,4450constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,4451findDOMNode: findDOMNode,4452render: render,4453renderToString: ReactServerRendering.renderToString,4454renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,4455unmountComponentAtNode: ReactMount.unmountComponentAtNode,4456isValidElement: ReactElement.isValidElement,4457withContext: ReactContext.withContext,44584459// Hook for JSX spread, don't use this for anything else.4460__spread: assign4461};44624463// Inject the runtime into a devtools global hook regardless of browser.4464// Allows for debugging when the hook is injected on the page.4465if (4466typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&4467typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {4468__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({4469CurrentOwner: ReactCurrentOwner,4470InstanceHandles: ReactInstanceHandles,4471Mount: ReactMount,4472Reconciler: ReactReconciler,4473TextComponent: ReactDOMTextComponent4474});4475}44764477if ("production" !== "development") {4478var ExecutionEnvironment = _dereq_(22);4479if (ExecutionEnvironment.canUseDOM && window.top === window.self) {44804481// If we're in Chrome, look for the devtools marker and provide a download4482// link if not installed.4483if (navigator.userAgent.indexOf('Chrome') > -1) {4484if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {4485console.debug(4486'Download the React DevTools for a better development experience: ' +4487'https://fb.me/react-devtools'4488);4489}4490}44914492var expectedFeatures = [4493// shims4494Array.isArray,4495Array.prototype.every,4496Array.prototype.forEach,4497Array.prototype.indexOf,4498Array.prototype.map,4499Date.now,4500Function.prototype.bind,4501Object.keys,4502String.prototype.split,4503String.prototype.trim,45044505// shams4506Object.create,4507Object.freeze4508];45094510for (var i = 0; i < expectedFeatures.length; i++) {4511if (!expectedFeatures[i]) {4512console.error(4513'One or more ES5 shim/shams expected by React are not available: ' +4514'https://fb.me/react-warning-polyfills'4515);4516break;4517}4518}4519}4520}45214522React.version = '0.13.3';45234524module.exports = React;45254526},{"132":132,"160":160,"20":20,"22":22,"29":29,"37":37,"38":38,"39":39,"44":44,"45":45,"46":46,"57":57,"60":60,"63":63,"64":64,"72":72,"77":77,"82":82,"86":86,"89":89,"92":92}],32:[function(_dereq_,module,exports){4527/**4528* Copyright 2013-2015, Facebook, Inc.4529* All rights reserved.4530*4531* This source code is licensed under the BSD-style license found in the4532* LICENSE file in the root directory of this source tree. An additional grant4533* of patent rights can be found in the PATENTS file in the same directory.4534*4535* @providesModule ReactBrowserComponentMixin4536*/45374538'use strict';45394540var findDOMNode = _dereq_(132);45414542var ReactBrowserComponentMixin = {4543/**4544* Returns the DOM node rendered by this component.4545*4546* @return {DOMElement} The root node of this component.4547* @final4548* @protected4549*/4550getDOMNode: function() {4551return findDOMNode(this);4552}4553};45544555module.exports = ReactBrowserComponentMixin;45564557},{"132":132}],33:[function(_dereq_,module,exports){4558/**4559* Copyright 2013-2015, Facebook, Inc.4560* All rights reserved.4561*4562* This source code is licensed under the BSD-style license found in the4563* LICENSE file in the root directory of this source tree. An additional grant4564* of patent rights can be found in the PATENTS file in the same directory.4565*4566* @providesModule ReactBrowserEventEmitter4567* @typechecks static-only4568*/45694570'use strict';45714572var EventConstants = _dereq_(16);4573var EventPluginHub = _dereq_(18);4574var EventPluginRegistry = _dereq_(19);4575var ReactEventEmitterMixin = _dereq_(67);4576var ViewportMetrics = _dereq_(117);45774578var assign = _dereq_(29);4579var isEventSupported = _dereq_(151);45804581/**4582* Summary of `ReactBrowserEventEmitter` event handling:4583*4584* - Top-level delegation is used to trap most native browser events. This4585* may only occur in the main thread and is the responsibility of4586* ReactEventListener, which is injected and can therefore support pluggable4587* event sources. This is the only work that occurs in the main thread.4588*4589* - We normalize and de-duplicate events to account for browser quirks. This4590* may be done in the worker thread.4591*4592* - Forward these native events (with the associated top-level type used to4593* trap it) to `EventPluginHub`, which in turn will ask plugins if they want4594* to extract any synthetic events.4595*4596* - The `EventPluginHub` will then process each event by annotating them with4597* "dispatches", a sequence of listeners and IDs that care about that event.4598*4599* - The `EventPluginHub` then dispatches the events.4600*4601* Overview of React and the event system:4602*4603* +------------+ .4604* | DOM | .4605* +------------+ .4606* | .4607* v .4608* +------------+ .4609* | ReactEvent | .4610* | Listener | .4611* +------------+ . +-----------+4612* | . +--------+|SimpleEvent|4613* | . | |Plugin |4614* +-----|------+ . v +-----------+4615* | | | . +--------------+ +------------+4616* | +-----------.--->|EventPluginHub| | Event |4617* | | . | | +-----------+ | Propagators|4618* | ReactEvent | . | | |TapEvent | |------------|4619* | Emitter | . | |<---+|Plugin | |other plugin|4620* | | . | | +-----------+ | utilities |4621* | +-----------.--->| | +------------+4622* | | | . +--------------+4623* +-----|------+ . ^ +-----------+4624* | . | |Enter/Leave|4625* + . +-------+|Plugin |4626* +-------------+ . +-----------+4627* | application | .4628* |-------------| .4629* | | .4630* | | .4631* +-------------+ .4632* .4633* React Core . General Purpose Event Plugin System4634*/46354636var alreadyListeningTo = {};4637var isMonitoringScrollValue = false;4638var reactTopListenersCounter = 0;46394640// For events like 'submit' which don't consistently bubble (which we trap at a4641// lower node than `document`), binding at `document` would cause duplicate4642// events so we don't include them here4643var topEventMapping = {4644topBlur: 'blur',4645topChange: 'change',4646topClick: 'click',4647topCompositionEnd: 'compositionend',4648topCompositionStart: 'compositionstart',4649topCompositionUpdate: 'compositionupdate',4650topContextMenu: 'contextmenu',4651topCopy: 'copy',4652topCut: 'cut',4653topDoubleClick: 'dblclick',4654topDrag: 'drag',4655topDragEnd: 'dragend',4656topDragEnter: 'dragenter',4657topDragExit: 'dragexit',4658topDragLeave: 'dragleave',4659topDragOver: 'dragover',4660topDragStart: 'dragstart',4661topDrop: 'drop',4662topFocus: 'focus',4663topInput: 'input',4664topKeyDown: 'keydown',4665topKeyPress: 'keypress',4666topKeyUp: 'keyup',4667topMouseDown: 'mousedown',4668topMouseMove: 'mousemove',4669topMouseOut: 'mouseout',4670topMouseOver: 'mouseover',4671topMouseUp: 'mouseup',4672topPaste: 'paste',4673topScroll: 'scroll',4674topSelectionChange: 'selectionchange',4675topTextInput: 'textInput',4676topTouchCancel: 'touchcancel',4677topTouchEnd: 'touchend',4678topTouchMove: 'touchmove',4679topTouchStart: 'touchstart',4680topWheel: 'wheel'4681};46824683/**4684* To ensure no conflicts with other potential React instances on the page4685*/4686var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);46874688function getListeningForDocument(mountAt) {4689// In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`4690// directly.4691if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {4692mountAt[topListenersIDKey] = reactTopListenersCounter++;4693alreadyListeningTo[mountAt[topListenersIDKey]] = {};4694}4695return alreadyListeningTo[mountAt[topListenersIDKey]];4696}46974698/**4699* `ReactBrowserEventEmitter` is used to attach top-level event listeners. For4700* example:4701*4702* ReactBrowserEventEmitter.putListener('myID', 'onClick', myFunction);4703*4704* This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.4705*4706* @internal4707*/4708var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {47094710/**4711* Injectable event backend4712*/4713ReactEventListener: null,47144715injection: {4716/**4717* @param {object} ReactEventListener4718*/4719injectReactEventListener: function(ReactEventListener) {4720ReactEventListener.setHandleTopLevel(4721ReactBrowserEventEmitter.handleTopLevel4722);4723ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;4724}4725},47264727/**4728* Sets whether or not any created callbacks should be enabled.4729*4730* @param {boolean} enabled True if callbacks should be enabled.4731*/4732setEnabled: function(enabled) {4733if (ReactBrowserEventEmitter.ReactEventListener) {4734ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);4735}4736},47374738/**4739* @return {boolean} True if callbacks are enabled.4740*/4741isEnabled: function() {4742return !!(4743(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled())4744);4745},47464747/**4748* We listen for bubbled touch events on the document object.4749*4750* Firefox v8.01 (and possibly others) exhibited strange behavior when4751* mounting `onmousemove` events at some node that was not the document4752* element. The symptoms were that if your mouse is not moving over something4753* contained within that mount point (for example on the background) the4754* top-level listeners for `onmousemove` won't be called. However, if you4755* register the `mousemove` on the document object, then it will of course4756* catch all `mousemove`s. This along with iOS quirks, justifies restricting4757* top-level listeners to the document object only, at least for these4758* movement types of events and possibly all events.4759*4760* @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html4761*4762* Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but4763* they bubble to document.4764*4765* @param {string} registrationName Name of listener (e.g. `onClick`).4766* @param {object} contentDocumentHandle Document which owns the container4767*/4768listenTo: function(registrationName, contentDocumentHandle) {4769var mountAt = contentDocumentHandle;4770var isListening = getListeningForDocument(mountAt);4771var dependencies = EventPluginRegistry.4772registrationNameDependencies[registrationName];47734774var topLevelTypes = EventConstants.topLevelTypes;4775for (var i = 0, l = dependencies.length; i < l; i++) {4776var dependency = dependencies[i];4777if (!(4778(isListening.hasOwnProperty(dependency) && isListening[dependency])4779)) {4780if (dependency === topLevelTypes.topWheel) {4781if (isEventSupported('wheel')) {4782ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(4783topLevelTypes.topWheel,4784'wheel',4785mountAt4786);4787} else if (isEventSupported('mousewheel')) {4788ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(4789topLevelTypes.topWheel,4790'mousewheel',4791mountAt4792);4793} else {4794// Firefox needs to capture a different mouse scroll event.4795// @see http://www.quirksmode.org/dom/events/tests/scroll.html4796ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(4797topLevelTypes.topWheel,4798'DOMMouseScroll',4799mountAt4800);4801}4802} else if (dependency === topLevelTypes.topScroll) {48034804if (isEventSupported('scroll', true)) {4805ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(4806topLevelTypes.topScroll,4807'scroll',4808mountAt4809);4810} else {4811ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(4812topLevelTypes.topScroll,4813'scroll',4814ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE4815);4816}4817} else if (dependency === topLevelTypes.topFocus ||4818dependency === topLevelTypes.topBlur) {48194820if (isEventSupported('focus', true)) {4821ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(4822topLevelTypes.topFocus,4823'focus',4824mountAt4825);4826ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(4827topLevelTypes.topBlur,4828'blur',4829mountAt4830);4831} else if (isEventSupported('focusin')) {4832// IE has `focusin` and `focusout` events which bubble.4833// @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html4834ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(4835topLevelTypes.topFocus,4836'focusin',4837mountAt4838);4839ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(4840topLevelTypes.topBlur,4841'focusout',4842mountAt4843);4844}48454846// to make sure blur and focus event listeners are only attached once4847isListening[topLevelTypes.topBlur] = true;4848isListening[topLevelTypes.topFocus] = true;4849} else if (topEventMapping.hasOwnProperty(dependency)) {4850ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(4851dependency,4852topEventMapping[dependency],4853mountAt4854);4855}48564857isListening[dependency] = true;4858}4859}4860},48614862trapBubbledEvent: function(topLevelType, handlerBaseName, handle) {4863return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(4864topLevelType,4865handlerBaseName,4866handle4867);4868},48694870trapCapturedEvent: function(topLevelType, handlerBaseName, handle) {4871return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(4872topLevelType,4873handlerBaseName,4874handle4875);4876},48774878/**4879* Listens to window scroll and resize events. We cache scroll values so that4880* application code can access them without triggering reflows.4881*4882* NOTE: Scroll events do not bubble.4883*4884* @see http://www.quirksmode.org/dom/events/scroll.html4885*/4886ensureScrollValueMonitoring: function() {4887if (!isMonitoringScrollValue) {4888var refresh = ViewportMetrics.refreshScrollValues;4889ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);4890isMonitoringScrollValue = true;4891}4892},48934894eventNameDispatchConfigs: EventPluginHub.eventNameDispatchConfigs,48954896registrationNameModules: EventPluginHub.registrationNameModules,48974898putListener: EventPluginHub.putListener,48994900getListener: EventPluginHub.getListener,49014902deleteListener: EventPluginHub.deleteListener,49034904deleteAllListeners: EventPluginHub.deleteAllListeners49054906});49074908module.exports = ReactBrowserEventEmitter;49094910},{"117":117,"151":151,"16":16,"18":18,"19":19,"29":29,"67":67}],34:[function(_dereq_,module,exports){4911/**4912* Copyright 2013-2015, Facebook, Inc.4913* All rights reserved.4914*4915* This source code is licensed under the BSD-style license found in the4916* LICENSE file in the root directory of this source tree. An additional grant4917* of patent rights can be found in the PATENTS file in the same directory.4918*4919* @typechecks4920* @providesModule ReactCSSTransitionGroup4921*/49224923'use strict';49244925var React = _dereq_(31);49264927var assign = _dereq_(29);49284929var ReactTransitionGroup = React.createFactory(4930_dereq_(98)4931);4932var ReactCSSTransitionGroupChild = React.createFactory(4933_dereq_(35)4934);49354936var ReactCSSTransitionGroup = React.createClass({4937displayName: 'ReactCSSTransitionGroup',49384939propTypes: {4940transitionName: React.PropTypes.string.isRequired,4941transitionAppear: React.PropTypes.bool,4942transitionEnter: React.PropTypes.bool,4943transitionLeave: React.PropTypes.bool4944},49454946getDefaultProps: function() {4947return {4948transitionAppear: false,4949transitionEnter: true,4950transitionLeave: true4951};4952},49534954_wrapChild: function(child) {4955// We need to provide this childFactory so that4956// ReactCSSTransitionGroupChild can receive updates to name, enter, and4957// leave while it is leaving.4958return ReactCSSTransitionGroupChild(4959{4960name: this.props.transitionName,4961appear: this.props.transitionAppear,4962enter: this.props.transitionEnter,4963leave: this.props.transitionLeave4964},4965child4966);4967},49684969render: function() {4970return (4971ReactTransitionGroup(4972assign({}, this.props, {childFactory: this._wrapChild})4973)4974);4975}4976});49774978module.exports = ReactCSSTransitionGroup;49794980},{"29":29,"31":31,"35":35,"98":98}],35:[function(_dereq_,module,exports){4981/**4982* Copyright 2013-2015, Facebook, Inc.4983* All rights reserved.4984*4985* This source code is licensed under the BSD-style license found in the4986* LICENSE file in the root directory of this source tree. An additional grant4987* of patent rights can be found in the PATENTS file in the same directory.4988*4989* @typechecks4990* @providesModule ReactCSSTransitionGroupChild4991*/49924993'use strict';49944995var React = _dereq_(31);49964997var CSSCore = _dereq_(4);4998var ReactTransitionEvents = _dereq_(97);49995000var onlyChild = _dereq_(160);5001var warning = _dereq_(171);50025003// We don't remove the element from the DOM until we receive an animationend or5004// transitionend event. If the user screws up and forgets to add an animation5005// their node will be stuck in the DOM forever, so we detect if an animation5006// does not start and if it doesn't, we just call the end listener immediately.5007var TICK = 17;5008var NO_EVENT_TIMEOUT = 5000;50095010var noEventListener = null;501150125013if ("production" !== "development") {5014noEventListener = function() {5015("production" !== "development" ? warning(5016false,5017'transition(): tried to perform an animation without ' +5018'an animationend or transitionend event after timeout (' +5019'%sms). You should either disable this ' +5020'transition in JS or add a CSS animation/transition.',5021NO_EVENT_TIMEOUT5022) : null);5023};5024}50255026var ReactCSSTransitionGroupChild = React.createClass({5027displayName: 'ReactCSSTransitionGroupChild',50285029transition: function(animationType, finishCallback) {5030var node = this.getDOMNode();5031var className = this.props.name + '-' + animationType;5032var activeClassName = className + '-active';5033var noEventTimeout = null;50345035var endListener = function(e) {5036if (e && e.target !== node) {5037return;5038}5039if ("production" !== "development") {5040clearTimeout(noEventTimeout);5041}50425043CSSCore.removeClass(node, className);5044CSSCore.removeClass(node, activeClassName);50455046ReactTransitionEvents.removeEndEventListener(node, endListener);50475048// Usually this optional callback is used for informing an owner of5049// a leave animation and telling it to remove the child.5050if (finishCallback) {5051finishCallback();5052}5053};50545055ReactTransitionEvents.addEndEventListener(node, endListener);50565057CSSCore.addClass(node, className);50585059// Need to do this to actually trigger a transition.5060this.queueClass(activeClassName);50615062if ("production" !== "development") {5063noEventTimeout = setTimeout(noEventListener, NO_EVENT_TIMEOUT);5064}5065},50665067queueClass: function(className) {5068this.classNameQueue.push(className);50695070if (!this.timeout) {5071this.timeout = setTimeout(this.flushClassNameQueue, TICK);5072}5073},50745075flushClassNameQueue: function() {5076if (this.isMounted()) {5077this.classNameQueue.forEach(5078CSSCore.addClass.bind(CSSCore, this.getDOMNode())5079);5080}5081this.classNameQueue.length = 0;5082this.timeout = null;5083},50845085componentWillMount: function() {5086this.classNameQueue = [];5087},50885089componentWillUnmount: function() {5090if (this.timeout) {5091clearTimeout(this.timeout);5092}5093},50945095componentWillAppear: function(done) {5096if (this.props.appear) {5097this.transition('appear', done);5098} else {5099done();5100}5101},51025103componentWillEnter: function(done) {5104if (this.props.enter) {5105this.transition('enter', done);5106} else {5107done();5108}5109},51105111componentWillLeave: function(done) {5112if (this.props.leave) {5113this.transition('leave', done);5114} else {5115done();5116}5117},51185119render: function() {5120return onlyChild(this.props.children);5121}5122});51235124module.exports = ReactCSSTransitionGroupChild;51255126},{"160":160,"171":171,"31":31,"4":4,"97":97}],36:[function(_dereq_,module,exports){5127/**5128* Copyright 2014-2015, Facebook, Inc.5129* All rights reserved.5130*5131* This source code is licensed under the BSD-style license found in the5132* LICENSE file in the root directory of this source tree. An additional grant5133* of patent rights can be found in the PATENTS file in the same directory.5134*5135* @providesModule ReactChildReconciler5136* @typechecks static-only5137*/51385139'use strict';51405141var ReactReconciler = _dereq_(89);51425143var flattenChildren = _dereq_(133);5144var instantiateReactComponent = _dereq_(149);5145var shouldUpdateReactComponent = _dereq_(167);51465147/**5148* ReactChildReconciler provides helpers for initializing or updating a set of5149* children. Its output is suitable for passing it onto ReactMultiChild which5150* does diffed reordering and insertion.5151*/5152var ReactChildReconciler = {51535154/**5155* Generates a "mount image" for each of the supplied children. In the case5156* of `ReactDOMComponent`, a mount image is a string of markup.5157*5158* @param {?object} nestedChildNodes Nested child maps.5159* @return {?object} A set of child instances.5160* @internal5161*/5162instantiateChildren: function(nestedChildNodes, transaction, context) {5163var children = flattenChildren(nestedChildNodes);5164for (var name in children) {5165if (children.hasOwnProperty(name)) {5166var child = children[name];5167// The rendered children must be turned into instances as they're5168// mounted.5169var childInstance = instantiateReactComponent(child, null);5170children[name] = childInstance;5171}5172}5173return children;5174},51755176/**5177* Updates the rendered children and returns a new set of children.5178*5179* @param {?object} prevChildren Previously initialized set of children.5180* @param {?object} nextNestedChildNodes Nested child maps.5181* @param {ReactReconcileTransaction} transaction5182* @param {object} context5183* @return {?object} A new set of child instances.5184* @internal5185*/5186updateChildren: function(5187prevChildren,5188nextNestedChildNodes,5189transaction,5190context) {5191// We currently don't have a way to track moves here but if we use iterators5192// instead of for..in we can zip the iterators and check if an item has5193// moved.5194// TODO: If nothing has changed, return the prevChildren object so that we5195// can quickly bailout if nothing has changed.5196var nextChildren = flattenChildren(nextNestedChildNodes);5197if (!nextChildren && !prevChildren) {5198return null;5199}5200var name;5201for (name in nextChildren) {5202if (!nextChildren.hasOwnProperty(name)) {5203continue;5204}5205var prevChild = prevChildren && prevChildren[name];5206var prevElement = prevChild && prevChild._currentElement;5207var nextElement = nextChildren[name];5208if (shouldUpdateReactComponent(prevElement, nextElement)) {5209ReactReconciler.receiveComponent(5210prevChild, nextElement, transaction, context5211);5212nextChildren[name] = prevChild;5213} else {5214if (prevChild) {5215ReactReconciler.unmountComponent(prevChild, name);5216}5217// The child must be instantiated before it's mounted.5218var nextChildInstance = instantiateReactComponent(5219nextElement,5220null5221);5222nextChildren[name] = nextChildInstance;5223}5224}5225// Unmount children that are no longer present.5226for (name in prevChildren) {5227if (prevChildren.hasOwnProperty(name) &&5228!(nextChildren && nextChildren.hasOwnProperty(name))) {5229ReactReconciler.unmountComponent(prevChildren[name]);5230}5231}5232return nextChildren;5233},52345235/**5236* Unmounts all rendered children. This should be used to clean up children5237* when this component is unmounted.5238*5239* @param {?object} renderedChildren Previously initialized set of children.5240* @internal5241*/5242unmountChildren: function(renderedChildren) {5243for (var name in renderedChildren) {5244var renderedChild = renderedChildren[name];5245ReactReconciler.unmountComponent(renderedChild);5246}5247}52485249};52505251module.exports = ReactChildReconciler;52525253},{"133":133,"149":149,"167":167,"89":89}],37:[function(_dereq_,module,exports){5254/**5255* Copyright 2013-2015, Facebook, Inc.5256* All rights reserved.5257*5258* This source code is licensed under the BSD-style license found in the5259* LICENSE file in the root directory of this source tree. An additional grant5260* of patent rights can be found in the PATENTS file in the same directory.5261*5262* @providesModule ReactChildren5263*/52645265'use strict';52665267var PooledClass = _dereq_(30);5268var ReactFragment = _dereq_(69);52695270var traverseAllChildren = _dereq_(169);5271var warning = _dereq_(171);52725273var twoArgumentPooler = PooledClass.twoArgumentPooler;5274var threeArgumentPooler = PooledClass.threeArgumentPooler;52755276/**5277* PooledClass representing the bookkeeping associated with performing a child5278* traversal. Allows avoiding binding callbacks.5279*5280* @constructor ForEachBookKeeping5281* @param {!function} forEachFunction Function to perform traversal with.5282* @param {?*} forEachContext Context to perform context with.5283*/5284function ForEachBookKeeping(forEachFunction, forEachContext) {5285this.forEachFunction = forEachFunction;5286this.forEachContext = forEachContext;5287}5288PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);52895290function forEachSingleChild(traverseContext, child, name, i) {5291var forEachBookKeeping = traverseContext;5292forEachBookKeeping.forEachFunction.call(5293forEachBookKeeping.forEachContext, child, i);5294}52955296/**5297* Iterates through children that are typically specified as `props.children`.5298*5299* The provided forEachFunc(child, index) will be called for each5300* leaf child.5301*5302* @param {?*} children Children tree container.5303* @param {function(*, int)} forEachFunc.5304* @param {*} forEachContext Context for forEachContext.5305*/5306function forEachChildren(children, forEachFunc, forEachContext) {5307if (children == null) {5308return children;5309}53105311var traverseContext =5312ForEachBookKeeping.getPooled(forEachFunc, forEachContext);5313traverseAllChildren(children, forEachSingleChild, traverseContext);5314ForEachBookKeeping.release(traverseContext);5315}53165317/**5318* PooledClass representing the bookkeeping associated with performing a child5319* mapping. Allows avoiding binding callbacks.5320*5321* @constructor MapBookKeeping5322* @param {!*} mapResult Object containing the ordered map of results.5323* @param {!function} mapFunction Function to perform mapping with.5324* @param {?*} mapContext Context to perform mapping with.5325*/5326function MapBookKeeping(mapResult, mapFunction, mapContext) {5327this.mapResult = mapResult;5328this.mapFunction = mapFunction;5329this.mapContext = mapContext;5330}5331PooledClass.addPoolingTo(MapBookKeeping, threeArgumentPooler);53325333function mapSingleChildIntoContext(traverseContext, child, name, i) {5334var mapBookKeeping = traverseContext;5335var mapResult = mapBookKeeping.mapResult;53365337var keyUnique = !mapResult.hasOwnProperty(name);5338if ("production" !== "development") {5339("production" !== "development" ? warning(5340keyUnique,5341'ReactChildren.map(...): Encountered two children with the same key, ' +5342'`%s`. Child keys must be unique; when two children share a key, only ' +5343'the first child will be used.',5344name5345) : null);5346}53475348if (keyUnique) {5349var mappedChild =5350mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i);5351mapResult[name] = mappedChild;5352}5353}53545355/**5356* Maps children that are typically specified as `props.children`.5357*5358* The provided mapFunction(child, key, index) will be called for each5359* leaf child.5360*5361* TODO: This may likely break any calls to `ReactChildren.map` that were5362* previously relying on the fact that we guarded against null children.5363*5364* @param {?*} children Children tree container.5365* @param {function(*, int)} mapFunction.5366* @param {*} mapContext Context for mapFunction.5367* @return {object} Object containing the ordered map of results.5368*/5369function mapChildren(children, func, context) {5370if (children == null) {5371return children;5372}53735374var mapResult = {};5375var traverseContext = MapBookKeeping.getPooled(mapResult, func, context);5376traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);5377MapBookKeeping.release(traverseContext);5378return ReactFragment.create(mapResult);5379}53805381function forEachSingleChildDummy(traverseContext, child, name, i) {5382return null;5383}53845385/**5386* Count the number of children that are typically specified as5387* `props.children`.5388*5389* @param {?*} children Children tree container.5390* @return {number} The number of children.5391*/5392function countChildren(children, context) {5393return traverseAllChildren(children, forEachSingleChildDummy, null);5394}53955396var ReactChildren = {5397forEach: forEachChildren,5398map: mapChildren,5399count: countChildren5400};54015402module.exports = ReactChildren;54035404},{"169":169,"171":171,"30":30,"69":69}],38:[function(_dereq_,module,exports){5405/**5406* Copyright 2013-2015, Facebook, Inc.5407* All rights reserved.5408*5409* This source code is licensed under the BSD-style license found in the5410* LICENSE file in the root directory of this source tree. An additional grant5411* of patent rights can be found in the PATENTS file in the same directory.5412*5413* @providesModule ReactClass5414*/54155416'use strict';54175418var ReactComponent = _dereq_(39);5419var ReactCurrentOwner = _dereq_(45);5420var ReactElement = _dereq_(63);5421var ReactErrorUtils = _dereq_(66);5422var ReactInstanceMap = _dereq_(73);5423var ReactLifeCycle = _dereq_(74);5424var ReactPropTypeLocations = _dereq_(85);5425var ReactPropTypeLocationNames = _dereq_(84);5426var ReactUpdateQueue = _dereq_(99);54275428var assign = _dereq_(29);5429var invariant = _dereq_(150);5430var keyMirror = _dereq_(156);5431var keyOf = _dereq_(157);5432var warning = _dereq_(171);54335434var MIXINS_KEY = keyOf({mixins: null});54355436/**5437* Policies that describe methods in `ReactClassInterface`.5438*/5439var SpecPolicy = keyMirror({5440/**5441* These methods may be defined only once by the class specification or mixin.5442*/5443DEFINE_ONCE: null,5444/**5445* These methods may be defined by both the class specification and mixins.5446* Subsequent definitions will be chained. These methods must return void.5447*/5448DEFINE_MANY: null,5449/**5450* These methods are overriding the base class.5451*/5452OVERRIDE_BASE: null,5453/**5454* These methods are similar to DEFINE_MANY, except we assume they return5455* objects. We try to merge the keys of the return values of all the mixed in5456* functions. If there is a key conflict we throw.5457*/5458DEFINE_MANY_MERGED: null5459});546054615462var injectedMixins = [];54635464/**5465* Composite components are higher-level components that compose other composite5466* or native components.5467*5468* To create a new type of `ReactClass`, pass a specification of5469* your new class to `React.createClass`. The only requirement of your class5470* specification is that you implement a `render` method.5471*5472* var MyComponent = React.createClass({5473* render: function() {5474* return <div>Hello World</div>;5475* }5476* });5477*5478* The class specification supports a specific protocol of methods that have5479* special meaning (e.g. `render`). See `ReactClassInterface` for5480* more the comprehensive protocol. Any other properties and methods in the5481* class specification will available on the prototype.5482*5483* @interface ReactClassInterface5484* @internal5485*/5486var ReactClassInterface = {54875488/**5489* An array of Mixin objects to include when defining your component.5490*5491* @type {array}5492* @optional5493*/5494mixins: SpecPolicy.DEFINE_MANY,54955496/**5497* An object containing properties and methods that should be defined on5498* the component's constructor instead of its prototype (static methods).5499*5500* @type {object}5501* @optional5502*/5503statics: SpecPolicy.DEFINE_MANY,55045505/**5506* Definition of prop types for this component.5507*5508* @type {object}5509* @optional5510*/5511propTypes: SpecPolicy.DEFINE_MANY,55125513/**5514* Definition of context types for this component.5515*5516* @type {object}5517* @optional5518*/5519contextTypes: SpecPolicy.DEFINE_MANY,55205521/**5522* Definition of context types this component sets for its children.5523*5524* @type {object}5525* @optional5526*/5527childContextTypes: SpecPolicy.DEFINE_MANY,55285529// ==== Definition methods ====55305531/**5532* Invoked when the component is mounted. Values in the mapping will be set on5533* `this.props` if that prop is not specified (i.e. using an `in` check).5534*5535* This method is invoked before `getInitialState` and therefore cannot rely5536* on `this.state` or use `this.setState`.5537*5538* @return {object}5539* @optional5540*/5541getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED,55425543/**5544* Invoked once before the component is mounted. The return value will be used5545* as the initial value of `this.state`.5546*5547* getInitialState: function() {5548* return {5549* isOn: false,5550* fooBaz: new BazFoo()5551* }5552* }5553*5554* @return {object}5555* @optional5556*/5557getInitialState: SpecPolicy.DEFINE_MANY_MERGED,55585559/**5560* @return {object}5561* @optional5562*/5563getChildContext: SpecPolicy.DEFINE_MANY_MERGED,55645565/**5566* Uses props from `this.props` and state from `this.state` to render the5567* structure of the component.5568*5569* No guarantees are made about when or how often this method is invoked, so5570* it must not have side effects.5571*5572* render: function() {5573* var name = this.props.name;5574* return <div>Hello, {name}!</div>;5575* }5576*5577* @return {ReactComponent}5578* @nosideeffects5579* @required5580*/5581render: SpecPolicy.DEFINE_ONCE,5582558355845585// ==== Delegate methods ====55865587/**5588* Invoked when the component is initially created and about to be mounted.5589* This may have side effects, but any external subscriptions or data created5590* by this method must be cleaned up in `componentWillUnmount`.5591*5592* @optional5593*/5594componentWillMount: SpecPolicy.DEFINE_MANY,55955596/**5597* Invoked when the component has been mounted and has a DOM representation.5598* However, there is no guarantee that the DOM node is in the document.5599*5600* Use this as an opportunity to operate on the DOM when the component has5601* been mounted (initialized and rendered) for the first time.5602*5603* @param {DOMElement} rootNode DOM element representing the component.5604* @optional5605*/5606componentDidMount: SpecPolicy.DEFINE_MANY,56075608/**5609* Invoked before the component receives new props.5610*5611* Use this as an opportunity to react to a prop transition by updating the5612* state using `this.setState`. Current props are accessed via `this.props`.5613*5614* componentWillReceiveProps: function(nextProps, nextContext) {5615* this.setState({5616* likesIncreasing: nextProps.likeCount > this.props.likeCount5617* });5618* }5619*5620* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop5621* transition may cause a state change, but the opposite is not true. If you5622* need it, you are probably looking for `componentWillUpdate`.5623*5624* @param {object} nextProps5625* @optional5626*/5627componentWillReceiveProps: SpecPolicy.DEFINE_MANY,56285629/**5630* Invoked while deciding if the component should be updated as a result of5631* receiving new props, state and/or context.5632*5633* Use this as an opportunity to `return false` when you're certain that the5634* transition to the new props/state/context will not require a component5635* update.5636*5637* shouldComponentUpdate: function(nextProps, nextState, nextContext) {5638* return !equal(nextProps, this.props) ||5639* !equal(nextState, this.state) ||5640* !equal(nextContext, this.context);5641* }5642*5643* @param {object} nextProps5644* @param {?object} nextState5645* @param {?object} nextContext5646* @return {boolean} True if the component should update.5647* @optional5648*/5649shouldComponentUpdate: SpecPolicy.DEFINE_ONCE,56505651/**5652* Invoked when the component is about to update due to a transition from5653* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`5654* and `nextContext`.5655*5656* Use this as an opportunity to perform preparation before an update occurs.5657*5658* NOTE: You **cannot** use `this.setState()` in this method.5659*5660* @param {object} nextProps5661* @param {?object} nextState5662* @param {?object} nextContext5663* @param {ReactReconcileTransaction} transaction5664* @optional5665*/5666componentWillUpdate: SpecPolicy.DEFINE_MANY,56675668/**5669* Invoked when the component's DOM representation has been updated.5670*5671* Use this as an opportunity to operate on the DOM when the component has5672* been updated.5673*5674* @param {object} prevProps5675* @param {?object} prevState5676* @param {?object} prevContext5677* @param {DOMElement} rootNode DOM element representing the component.5678* @optional5679*/5680componentDidUpdate: SpecPolicy.DEFINE_MANY,56815682/**5683* Invoked when the component is about to be removed from its parent and have5684* its DOM representation destroyed.5685*5686* Use this as an opportunity to deallocate any external resources.5687*5688* NOTE: There is no `componentDidUnmount` since your component will have been5689* destroyed by that point.5690*5691* @optional5692*/5693componentWillUnmount: SpecPolicy.DEFINE_MANY,5694569556965697// ==== Advanced methods ====56985699/**5700* Updates the component's currently mounted DOM representation.5701*5702* By default, this implements React's rendering and reconciliation algorithm.5703* Sophisticated clients may wish to override this.5704*5705* @param {ReactReconcileTransaction} transaction5706* @internal5707* @overridable5708*/5709updateComponent: SpecPolicy.OVERRIDE_BASE57105711};57125713/**5714* Mapping from class specification keys to special processing functions.5715*5716* Although these are declared like instance properties in the specification5717* when defining classes using `React.createClass`, they are actually static5718* and are accessible on the constructor instead of the prototype. Despite5719* being static, they must be defined outside of the "statics" key under5720* which all other static methods are defined.5721*/5722var RESERVED_SPEC_KEYS = {5723displayName: function(Constructor, displayName) {5724Constructor.displayName = displayName;5725},5726mixins: function(Constructor, mixins) {5727if (mixins) {5728for (var i = 0; i < mixins.length; i++) {5729mixSpecIntoComponent(Constructor, mixins[i]);5730}5731}5732},5733childContextTypes: function(Constructor, childContextTypes) {5734if ("production" !== "development") {5735validateTypeDef(5736Constructor,5737childContextTypes,5738ReactPropTypeLocations.childContext5739);5740}5741Constructor.childContextTypes = assign(5742{},5743Constructor.childContextTypes,5744childContextTypes5745);5746},5747contextTypes: function(Constructor, contextTypes) {5748if ("production" !== "development") {5749validateTypeDef(5750Constructor,5751contextTypes,5752ReactPropTypeLocations.context5753);5754}5755Constructor.contextTypes = assign(5756{},5757Constructor.contextTypes,5758contextTypes5759);5760},5761/**5762* Special case getDefaultProps which should move into statics but requires5763* automatic merging.5764*/5765getDefaultProps: function(Constructor, getDefaultProps) {5766if (Constructor.getDefaultProps) {5767Constructor.getDefaultProps = createMergedResultFunction(5768Constructor.getDefaultProps,5769getDefaultProps5770);5771} else {5772Constructor.getDefaultProps = getDefaultProps;5773}5774},5775propTypes: function(Constructor, propTypes) {5776if ("production" !== "development") {5777validateTypeDef(5778Constructor,5779propTypes,5780ReactPropTypeLocations.prop5781);5782}5783Constructor.propTypes = assign(5784{},5785Constructor.propTypes,5786propTypes5787);5788},5789statics: function(Constructor, statics) {5790mixStaticSpecIntoComponent(Constructor, statics);5791}5792};57935794function validateTypeDef(Constructor, typeDef, location) {5795for (var propName in typeDef) {5796if (typeDef.hasOwnProperty(propName)) {5797// use a warning instead of an invariant so components5798// don't show up in prod but not in __DEV__5799("production" !== "development" ? warning(5800typeof typeDef[propName] === 'function',5801'%s: %s type `%s` is invalid; it must be a function, usually from ' +5802'React.PropTypes.',5803Constructor.displayName || 'ReactClass',5804ReactPropTypeLocationNames[location],5805propName5806) : null);5807}5808}5809}58105811function validateMethodOverride(proto, name) {5812var specPolicy = ReactClassInterface.hasOwnProperty(name) ?5813ReactClassInterface[name] :5814null;58155816// Disallow overriding of base class methods unless explicitly allowed.5817if (ReactClassMixin.hasOwnProperty(name)) {5818("production" !== "development" ? invariant(5819specPolicy === SpecPolicy.OVERRIDE_BASE,5820'ReactClassInterface: You are attempting to override ' +5821'`%s` from your class specification. Ensure that your method names ' +5822'do not overlap with React methods.',5823name5824) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE));5825}58265827// Disallow defining methods more than once unless explicitly allowed.5828if (proto.hasOwnProperty(name)) {5829("production" !== "development" ? invariant(5830specPolicy === SpecPolicy.DEFINE_MANY ||5831specPolicy === SpecPolicy.DEFINE_MANY_MERGED,5832'ReactClassInterface: You are attempting to define ' +5833'`%s` on your component more than once. This conflict may be due ' +5834'to a mixin.',5835name5836) : invariant(specPolicy === SpecPolicy.DEFINE_MANY ||5837specPolicy === SpecPolicy.DEFINE_MANY_MERGED));5838}5839}58405841/**5842* Mixin helper which handles policy validation and reserved5843* specification keys when building React classses.5844*/5845function mixSpecIntoComponent(Constructor, spec) {5846if (!spec) {5847return;5848}58495850("production" !== "development" ? invariant(5851typeof spec !== 'function',5852'ReactClass: You\'re attempting to ' +5853'use a component class as a mixin. Instead, just use a regular object.'5854) : invariant(typeof spec !== 'function'));5855("production" !== "development" ? invariant(5856!ReactElement.isValidElement(spec),5857'ReactClass: You\'re attempting to ' +5858'use a component as a mixin. Instead, just use a regular object.'5859) : invariant(!ReactElement.isValidElement(spec)));58605861var proto = Constructor.prototype;58625863// By handling mixins before any other properties, we ensure the same5864// chaining order is applied to methods with DEFINE_MANY policy, whether5865// mixins are listed before or after these methods in the spec.5866if (spec.hasOwnProperty(MIXINS_KEY)) {5867RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);5868}58695870for (var name in spec) {5871if (!spec.hasOwnProperty(name)) {5872continue;5873}58745875if (name === MIXINS_KEY) {5876// We have already handled mixins in a special case above5877continue;5878}58795880var property = spec[name];5881validateMethodOverride(proto, name);58825883if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {5884RESERVED_SPEC_KEYS[name](Constructor, property);5885} else {5886// Setup methods on prototype:5887// The following member methods should not be automatically bound:5888// 1. Expected ReactClass methods (in the "interface").5889// 2. Overridden methods (that were mixed in).5890var isReactClassMethod =5891ReactClassInterface.hasOwnProperty(name);5892var isAlreadyDefined = proto.hasOwnProperty(name);5893var markedDontBind = property && property.__reactDontBind;5894var isFunction = typeof property === 'function';5895var shouldAutoBind =5896isFunction &&5897!isReactClassMethod &&5898!isAlreadyDefined &&5899!markedDontBind;59005901if (shouldAutoBind) {5902if (!proto.__reactAutoBindMap) {5903proto.__reactAutoBindMap = {};5904}5905proto.__reactAutoBindMap[name] = property;5906proto[name] = property;5907} else {5908if (isAlreadyDefined) {5909var specPolicy = ReactClassInterface[name];59105911// These cases should already be caught by validateMethodOverride5912("production" !== "development" ? invariant(5913isReactClassMethod && (5914(specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)5915),5916'ReactClass: Unexpected spec policy %s for key %s ' +5917'when mixing in component specs.',5918specPolicy,5919name5920) : invariant(isReactClassMethod && (5921(specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)5922)));59235924// For methods which are defined more than once, call the existing5925// methods before calling the new property, merging if appropriate.5926if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) {5927proto[name] = createMergedResultFunction(proto[name], property);5928} else if (specPolicy === SpecPolicy.DEFINE_MANY) {5929proto[name] = createChainedFunction(proto[name], property);5930}5931} else {5932proto[name] = property;5933if ("production" !== "development") {5934// Add verbose displayName to the function, which helps when looking5935// at profiling tools.5936if (typeof property === 'function' && spec.displayName) {5937proto[name].displayName = spec.displayName + '_' + name;5938}5939}5940}5941}5942}5943}5944}59455946function mixStaticSpecIntoComponent(Constructor, statics) {5947if (!statics) {5948return;5949}5950for (var name in statics) {5951var property = statics[name];5952if (!statics.hasOwnProperty(name)) {5953continue;5954}59555956var isReserved = name in RESERVED_SPEC_KEYS;5957("production" !== "development" ? invariant(5958!isReserved,5959'ReactClass: You are attempting to define a reserved ' +5960'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +5961'as an instance property instead; it will still be accessible on the ' +5962'constructor.',5963name5964) : invariant(!isReserved));59655966var isInherited = name in Constructor;5967("production" !== "development" ? invariant(5968!isInherited,5969'ReactClass: You are attempting to define ' +5970'`%s` on your component more than once. This conflict may be ' +5971'due to a mixin.',5972name5973) : invariant(!isInherited));5974Constructor[name] = property;5975}5976}59775978/**5979* Merge two objects, but throw if both contain the same key.5980*5981* @param {object} one The first object, which is mutated.5982* @param {object} two The second object5983* @return {object} one after it has been mutated to contain everything in two.5984*/5985function mergeIntoWithNoDuplicateKeys(one, two) {5986("production" !== "development" ? invariant(5987one && two && typeof one === 'object' && typeof two === 'object',5988'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'5989) : invariant(one && two && typeof one === 'object' && typeof two === 'object'));59905991for (var key in two) {5992if (two.hasOwnProperty(key)) {5993("production" !== "development" ? invariant(5994one[key] === undefined,5995'mergeIntoWithNoDuplicateKeys(): ' +5996'Tried to merge two objects with the same key: `%s`. This conflict ' +5997'may be due to a mixin; in particular, this may be caused by two ' +5998'getInitialState() or getDefaultProps() methods returning objects ' +5999'with clashing keys.',6000key6001) : invariant(one[key] === undefined));6002one[key] = two[key];6003}6004}6005return one;6006}60076008/**6009* Creates a function that invokes two functions and merges their return values.6010*6011* @param {function} one Function to invoke first.6012* @param {function} two Function to invoke second.6013* @return {function} Function that invokes the two argument functions.6014* @private6015*/6016function createMergedResultFunction(one, two) {6017return function mergedResult() {6018var a = one.apply(this, arguments);6019var b = two.apply(this, arguments);6020if (a == null) {6021return b;6022} else if (b == null) {6023return a;6024}6025var c = {};6026mergeIntoWithNoDuplicateKeys(c, a);6027mergeIntoWithNoDuplicateKeys(c, b);6028return c;6029};6030}60316032/**6033* Creates a function that invokes two functions and ignores their return vales.6034*6035* @param {function} one Function to invoke first.6036* @param {function} two Function to invoke second.6037* @return {function} Function that invokes the two argument functions.6038* @private6039*/6040function createChainedFunction(one, two) {6041return function chainedFunction() {6042one.apply(this, arguments);6043two.apply(this, arguments);6044};6045}60466047/**6048* Binds a method to the component.6049*6050* @param {object} component Component whose method is going to be bound.6051* @param {function} method Method to be bound.6052* @return {function} The bound method.6053*/6054function bindAutoBindMethod(component, method) {6055var boundMethod = method.bind(component);6056if ("production" !== "development") {6057boundMethod.__reactBoundContext = component;6058boundMethod.__reactBoundMethod = method;6059boundMethod.__reactBoundArguments = null;6060var componentName = component.constructor.displayName;6061var _bind = boundMethod.bind;6062/* eslint-disable block-scoped-var, no-undef */6063boundMethod.bind = function(newThis ) {for (var args=[],$__0=1,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]);6064// User is trying to bind() an autobound method; we effectively will6065// ignore the value of "this" that the user is trying to use, so6066// let's warn.6067if (newThis !== component && newThis !== null) {6068("production" !== "development" ? warning(6069false,6070'bind(): React component methods may only be bound to the ' +6071'component instance. See %s',6072componentName6073) : null);6074} else if (!args.length) {6075("production" !== "development" ? warning(6076false,6077'bind(): You are binding a component method to the component. ' +6078'React does this for you automatically in a high-performance ' +6079'way, so you can safely remove this call. See %s',6080componentName6081) : null);6082return boundMethod;6083}6084var reboundMethod = _bind.apply(boundMethod, arguments);6085reboundMethod.__reactBoundContext = component;6086reboundMethod.__reactBoundMethod = method;6087reboundMethod.__reactBoundArguments = args;6088return reboundMethod;6089/* eslint-enable */6090};6091}6092return boundMethod;6093}60946095/**6096* Binds all auto-bound methods in a component.6097*6098* @param {object} component Component whose method is going to be bound.6099*/6100function bindAutoBindMethods(component) {6101for (var autoBindKey in component.__reactAutoBindMap) {6102if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) {6103var method = component.__reactAutoBindMap[autoBindKey];6104component[autoBindKey] = bindAutoBindMethod(6105component,6106ReactErrorUtils.guard(6107method,6108component.constructor.displayName + '.' + autoBindKey6109)6110);6111}6112}6113}61146115var typeDeprecationDescriptor = {6116enumerable: false,6117get: function() {6118var displayName = this.displayName || this.name || 'Component';6119("production" !== "development" ? warning(6120false,6121'%s.type is deprecated. Use %s directly to access the class.',6122displayName,6123displayName6124) : null);6125Object.defineProperty(this, 'type', {6126value: this6127});6128return this;6129}6130};61316132/**6133* Add more to the ReactClass base class. These are all legacy features and6134* therefore not already part of the modern ReactComponent.6135*/6136var ReactClassMixin = {61376138/**6139* TODO: This will be deprecated because state should always keep a consistent6140* type signature and the only use case for this, is to avoid that.6141*/6142replaceState: function(newState, callback) {6143ReactUpdateQueue.enqueueReplaceState(this, newState);6144if (callback) {6145ReactUpdateQueue.enqueueCallback(this, callback);6146}6147},61486149/**6150* Checks whether or not this composite component is mounted.6151* @return {boolean} True if mounted, false otherwise.6152* @protected6153* @final6154*/6155isMounted: function() {6156if ("production" !== "development") {6157var owner = ReactCurrentOwner.current;6158if (owner !== null) {6159("production" !== "development" ? warning(6160owner._warnedAboutRefsInRender,6161'%s is accessing isMounted inside its render() function. ' +6162'render() should be a pure function of props and state. It should ' +6163'never access something that requires stale data from the previous ' +6164'render, such as refs. Move this logic to componentDidMount and ' +6165'componentDidUpdate instead.',6166owner.getName() || 'A component'6167) : null);6168owner._warnedAboutRefsInRender = true;6169}6170}6171var internalInstance = ReactInstanceMap.get(this);6172return (6173internalInstance &&6174internalInstance !== ReactLifeCycle.currentlyMountingInstance6175);6176},61776178/**6179* Sets a subset of the props.6180*6181* @param {object} partialProps Subset of the next props.6182* @param {?function} callback Called after props are updated.6183* @final6184* @public6185* @deprecated6186*/6187setProps: function(partialProps, callback) {6188ReactUpdateQueue.enqueueSetProps(this, partialProps);6189if (callback) {6190ReactUpdateQueue.enqueueCallback(this, callback);6191}6192},61936194/**6195* Replace all the props.6196*6197* @param {object} newProps Subset of the next props.6198* @param {?function} callback Called after props are updated.6199* @final6200* @public6201* @deprecated6202*/6203replaceProps: function(newProps, callback) {6204ReactUpdateQueue.enqueueReplaceProps(this, newProps);6205if (callback) {6206ReactUpdateQueue.enqueueCallback(this, callback);6207}6208}6209};62106211var ReactClassComponent = function() {};6212assign(6213ReactClassComponent.prototype,6214ReactComponent.prototype,6215ReactClassMixin6216);62176218/**6219* Module for creating composite components.6220*6221* @class ReactClass6222*/6223var ReactClass = {62246225/**6226* Creates a composite component class given a class specification.6227*6228* @param {object} spec Class specification (which must define `render`).6229* @return {function} Component constructor function.6230* @public6231*/6232createClass: function(spec) {6233var Constructor = function(props, context) {6234// This constructor is overridden by mocks. The argument is used6235// by mocks to assert on what gets mounted.62366237if ("production" !== "development") {6238("production" !== "development" ? warning(6239this instanceof Constructor,6240'Something is calling a React component directly. Use a factory or ' +6241'JSX instead. See: https://fb.me/react-legacyfactory'6242) : null);6243}62446245// Wire up auto-binding6246if (this.__reactAutoBindMap) {6247bindAutoBindMethods(this);6248}62496250this.props = props;6251this.context = context;6252this.state = null;62536254// ReactClasses doesn't have constructors. Instead, they use the6255// getInitialState and componentWillMount methods for initialization.62566257var initialState = this.getInitialState ? this.getInitialState() : null;6258if ("production" !== "development") {6259// We allow auto-mocks to proceed as if they're returning null.6260if (typeof initialState === 'undefined' &&6261this.getInitialState._isMockFunction) {6262// This is probably bad practice. Consider warning here and6263// deprecating this convenience.6264initialState = null;6265}6266}6267("production" !== "development" ? invariant(6268typeof initialState === 'object' && !Array.isArray(initialState),6269'%s.getInitialState(): must return an object or null',6270Constructor.displayName || 'ReactCompositeComponent'6271) : invariant(typeof initialState === 'object' && !Array.isArray(initialState)));62726273this.state = initialState;6274};6275Constructor.prototype = new ReactClassComponent();6276Constructor.prototype.constructor = Constructor;62776278injectedMixins.forEach(6279mixSpecIntoComponent.bind(null, Constructor)6280);62816282mixSpecIntoComponent(Constructor, spec);62836284// Initialize the defaultProps property after all mixins have been merged6285if (Constructor.getDefaultProps) {6286Constructor.defaultProps = Constructor.getDefaultProps();6287}62886289if ("production" !== "development") {6290// This is a tag to indicate that the use of these method names is ok,6291// since it's used with createClass. If it's not, then it's likely a6292// mistake so we'll warn you to use the static property, property6293// initializer or constructor respectively.6294if (Constructor.getDefaultProps) {6295Constructor.getDefaultProps.isReactClassApproved = {};6296}6297if (Constructor.prototype.getInitialState) {6298Constructor.prototype.getInitialState.isReactClassApproved = {};6299}6300}63016302("production" !== "development" ? invariant(6303Constructor.prototype.render,6304'createClass(...): Class specification must implement a `render` method.'6305) : invariant(Constructor.prototype.render));63066307if ("production" !== "development") {6308("production" !== "development" ? warning(6309!Constructor.prototype.componentShouldUpdate,6310'%s has a method called ' +6311'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +6312'The name is phrased as a question because the function is ' +6313'expected to return a value.',6314spec.displayName || 'A component'6315) : null);6316}63176318// Reduce time spent doing lookups by setting these on the prototype.6319for (var methodName in ReactClassInterface) {6320if (!Constructor.prototype[methodName]) {6321Constructor.prototype[methodName] = null;6322}6323}63246325// Legacy hook6326Constructor.type = Constructor;6327if ("production" !== "development") {6328try {6329Object.defineProperty(Constructor, 'type', typeDeprecationDescriptor);6330} catch (x) {6331// IE will fail on defineProperty (es5-shim/sham too)6332}6333}63346335return Constructor;6336},63376338injection: {6339injectMixin: function(mixin) {6340injectedMixins.push(mixin);6341}6342}63436344};63456346module.exports = ReactClass;63476348},{"150":150,"156":156,"157":157,"171":171,"29":29,"39":39,"45":45,"63":63,"66":66,"73":73,"74":74,"84":84,"85":85,"99":99}],39:[function(_dereq_,module,exports){6349/**6350* Copyright 2013-2015, Facebook, Inc.6351* All rights reserved.6352*6353* This source code is licensed under the BSD-style license found in the6354* LICENSE file in the root directory of this source tree. An additional grant6355* of patent rights can be found in the PATENTS file in the same directory.6356*6357* @providesModule ReactComponent6358*/63596360'use strict';63616362var ReactUpdateQueue = _dereq_(99);63636364var invariant = _dereq_(150);6365var warning = _dereq_(171);63666367/**6368* Base class helpers for the updating state of a component.6369*/6370function ReactComponent(props, context) {6371this.props = props;6372this.context = context;6373}63746375/**6376* Sets a subset of the state. Always use this to mutate6377* state. You should treat `this.state` as immutable.6378*6379* There is no guarantee that `this.state` will be immediately updated, so6380* accessing `this.state` after calling this method may return the old value.6381*6382* There is no guarantee that calls to `setState` will run synchronously,6383* as they may eventually be batched together. You can provide an optional6384* callback that will be executed when the call to setState is actually6385* completed.6386*6387* When a function is provided to setState, it will be called at some point in6388* the future (not synchronously). It will be called with the up to date6389* component arguments (state, props, context). These values can be different6390* from this.* because your function may be called after receiveProps but before6391* shouldComponentUpdate, and this new state, props, and context will not yet be6392* assigned to this.6393*6394* @param {object|function} partialState Next partial state or function to6395* produce next partial state to be merged with current state.6396* @param {?function} callback Called after state is updated.6397* @final6398* @protected6399*/6400ReactComponent.prototype.setState = function(partialState, callback) {6401("production" !== "development" ? invariant(6402typeof partialState === 'object' ||6403typeof partialState === 'function' ||6404partialState == null,6405'setState(...): takes an object of state variables to update or a ' +6406'function which returns an object of state variables.'6407) : invariant(typeof partialState === 'object' ||6408typeof partialState === 'function' ||6409partialState == null));6410if ("production" !== "development") {6411("production" !== "development" ? warning(6412partialState != null,6413'setState(...): You passed an undefined or null state object; ' +6414'instead, use forceUpdate().'6415) : null);6416}6417ReactUpdateQueue.enqueueSetState(this, partialState);6418if (callback) {6419ReactUpdateQueue.enqueueCallback(this, callback);6420}6421};64226423/**6424* Forces an update. This should only be invoked when it is known with6425* certainty that we are **not** in a DOM transaction.6426*6427* You may want to call this when you know that some deeper aspect of the6428* component's state has changed but `setState` was not called.6429*6430* This will not invoke `shouldComponentUpdate`, but it will invoke6431* `componentWillUpdate` and `componentDidUpdate`.6432*6433* @param {?function} callback Called after update is complete.6434* @final6435* @protected6436*/6437ReactComponent.prototype.forceUpdate = function(callback) {6438ReactUpdateQueue.enqueueForceUpdate(this);6439if (callback) {6440ReactUpdateQueue.enqueueCallback(this, callback);6441}6442};64436444/**6445* Deprecated APIs. These APIs used to exist on classic React classes but since6446* we would like to deprecate them, we're not going to move them over to this6447* modern base class. Instead, we define a getter that warns if it's accessed.6448*/6449if ("production" !== "development") {6450var deprecatedAPIs = {6451getDOMNode: [6452'getDOMNode',6453'Use React.findDOMNode(component) instead.'6454],6455isMounted: [6456'isMounted',6457'Instead, make sure to clean up subscriptions and pending requests in ' +6458'componentWillUnmount to prevent memory leaks.'6459],6460replaceProps: [6461'replaceProps',6462'Instead call React.render again at the top level.'6463],6464replaceState: [6465'replaceState',6466'Refactor your code to use setState instead (see ' +6467'https://github.com/facebook/react/issues/3236).'6468],6469setProps: [6470'setProps',6471'Instead call React.render again at the top level.'6472]6473};6474var defineDeprecationWarning = function(methodName, info) {6475try {6476Object.defineProperty(ReactComponent.prototype, methodName, {6477get: function() {6478("production" !== "development" ? warning(6479false,6480'%s(...) is deprecated in plain JavaScript React classes. %s',6481info[0],6482info[1]6483) : null);6484return undefined;6485}6486});6487} catch (x) {6488// IE will fail on defineProperty (es5-shim/sham too)6489}6490};6491for (var fnName in deprecatedAPIs) {6492if (deprecatedAPIs.hasOwnProperty(fnName)) {6493defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);6494}6495}6496}64976498module.exports = ReactComponent;64996500},{"150":150,"171":171,"99":99}],40:[function(_dereq_,module,exports){6501/**6502* Copyright 2013-2015, Facebook, Inc.6503* All rights reserved.6504*6505* This source code is licensed under the BSD-style license found in the6506* LICENSE file in the root directory of this source tree. An additional grant6507* of patent rights can be found in the PATENTS file in the same directory.6508*6509* @providesModule ReactComponentBrowserEnvironment6510*/65116512/*jslint evil: true */65136514'use strict';65156516var ReactDOMIDOperations = _dereq_(50);6517var ReactMount = _dereq_(77);65186519/**6520* Abstracts away all functionality of the reconciler that requires knowledge of6521* the browser context. TODO: These callers should be refactored to avoid the6522* need for this injection.6523*/6524var ReactComponentBrowserEnvironment = {65256526processChildrenUpdates:6527ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,65286529replaceNodeWithMarkupByID:6530ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID,65316532/**6533* If a particular environment requires that some resources be cleaned up,6534* specify this in the injected Mixin. In the DOM, we would likely want to6535* purge any cached node ID lookups.6536*6537* @private6538*/6539unmountIDFromEnvironment: function(rootNodeID) {6540ReactMount.purgeID(rootNodeID);6541}65426543};65446545module.exports = ReactComponentBrowserEnvironment;65466547},{"50":50,"77":77}],41:[function(_dereq_,module,exports){6548/**6549* Copyright 2014-2015, Facebook, Inc.6550* All rights reserved.6551*6552* This source code is licensed under the BSD-style license found in the6553* LICENSE file in the root directory of this source tree. An additional grant6554* of patent rights can be found in the PATENTS file in the same directory.6555*6556* @providesModule ReactComponentEnvironment6557*/65586559'use strict';65606561var invariant = _dereq_(150);65626563var injected = false;65646565var ReactComponentEnvironment = {65666567/**6568* Optionally injectable environment dependent cleanup hook. (server vs.6569* browser etc). Example: A browser system caches DOM nodes based on component6570* ID and must remove that cache entry when this instance is unmounted.6571*/6572unmountIDFromEnvironment: null,65736574/**6575* Optionally injectable hook for swapping out mount images in the middle of6576* the tree.6577*/6578replaceNodeWithMarkupByID: null,65796580/**6581* Optionally injectable hook for processing a queue of child updates. Will6582* later move into MultiChildComponents.6583*/6584processChildrenUpdates: null,65856586injection: {6587injectEnvironment: function(environment) {6588("production" !== "development" ? invariant(6589!injected,6590'ReactCompositeComponent: injectEnvironment() can only be called once.'6591) : invariant(!injected));6592ReactComponentEnvironment.unmountIDFromEnvironment =6593environment.unmountIDFromEnvironment;6594ReactComponentEnvironment.replaceNodeWithMarkupByID =6595environment.replaceNodeWithMarkupByID;6596ReactComponentEnvironment.processChildrenUpdates =6597environment.processChildrenUpdates;6598injected = true;6599}6600}66016602};66036604module.exports = ReactComponentEnvironment;66056606},{"150":150}],42:[function(_dereq_,module,exports){6607/**6608* Copyright 2013-2015, Facebook, Inc.6609* All rights reserved.6610*6611* This source code is licensed under the BSD-style license found in the6612* LICENSE file in the root directory of this source tree. An additional grant6613* of patent rights can be found in the PATENTS file in the same directory.6614*6615* @providesModule ReactComponentWithPureRenderMixin6616*/66176618'use strict';66196620var shallowEqual = _dereq_(166);66216622/**6623* If your React component's render function is "pure", e.g. it will render the6624* same result given the same props and state, provide this Mixin for a6625* considerable performance boost.6626*6627* Most React components have pure render functions.6628*6629* Example:6630*6631* var ReactComponentWithPureRenderMixin =6632* require('ReactComponentWithPureRenderMixin');6633* React.createClass({6634* mixins: [ReactComponentWithPureRenderMixin],6635*6636* render: function() {6637* return <div className={this.props.className}>foo</div>;6638* }6639* });6640*6641* Note: This only checks shallow equality for props and state. If these contain6642* complex data structures this mixin may have false-negatives for deeper6643* differences. Only mixin to components which have simple props and state, or6644* use `forceUpdate()` when you know deep data structures have changed.6645*/6646var ReactComponentWithPureRenderMixin = {6647shouldComponentUpdate: function(nextProps, nextState) {6648return !shallowEqual(this.props, nextProps) ||6649!shallowEqual(this.state, nextState);6650}6651};66526653module.exports = ReactComponentWithPureRenderMixin;66546655},{"166":166}],43:[function(_dereq_,module,exports){6656/**6657* Copyright 2013-2015, Facebook, Inc.6658* All rights reserved.6659*6660* This source code is licensed under the BSD-style license found in the6661* LICENSE file in the root directory of this source tree. An additional grant6662* of patent rights can be found in the PATENTS file in the same directory.6663*6664* @providesModule ReactCompositeComponent6665*/66666667'use strict';66686669var ReactComponentEnvironment = _dereq_(41);6670var ReactContext = _dereq_(44);6671var ReactCurrentOwner = _dereq_(45);6672var ReactElement = _dereq_(63);6673var ReactElementValidator = _dereq_(64);6674var ReactInstanceMap = _dereq_(73);6675var ReactLifeCycle = _dereq_(74);6676var ReactNativeComponent = _dereq_(80);6677var ReactPerf = _dereq_(82);6678var ReactPropTypeLocations = _dereq_(85);6679var ReactPropTypeLocationNames = _dereq_(84);6680var ReactReconciler = _dereq_(89);6681var ReactUpdates = _dereq_(100);66826683var assign = _dereq_(29);6684var emptyObject = _dereq_(130);6685var invariant = _dereq_(150);6686var shouldUpdateReactComponent = _dereq_(167);6687var warning = _dereq_(171);66886689function getDeclarationErrorAddendum(component) {6690var owner = component._currentElement._owner || null;6691if (owner) {6692var name = owner.getName();6693if (name) {6694return ' Check the render method of `' + name + '`.';6695}6696}6697return '';6698}66996700/**6701* ------------------ The Life-Cycle of a Composite Component ------------------6702*6703* - constructor: Initialization of state. The instance is now retained.6704* - componentWillMount6705* - render6706* - [children's constructors]6707* - [children's componentWillMount and render]6708* - [children's componentDidMount]6709* - componentDidMount6710*6711* Update Phases:6712* - componentWillReceiveProps (only called if parent updated)6713* - shouldComponentUpdate6714* - componentWillUpdate6715* - render6716* - [children's constructors or receive props phases]6717* - componentDidUpdate6718*6719* - componentWillUnmount6720* - [children's componentWillUnmount]6721* - [children destroyed]6722* - (destroyed): The instance is now blank, released by React and ready for GC.6723*6724* -----------------------------------------------------------------------------6725*/67266727/**6728* An incrementing ID assigned to each component when it is mounted. This is6729* used to enforce the order in which `ReactUpdates` updates dirty components.6730*6731* @private6732*/6733var nextMountID = 1;67346735/**6736* @lends {ReactCompositeComponent.prototype}6737*/6738var ReactCompositeComponentMixin = {67396740/**6741* Base constructor for all composite component.6742*6743* @param {ReactElement} element6744* @final6745* @internal6746*/6747construct: function(element) {6748this._currentElement = element;6749this._rootNodeID = null;6750this._instance = null;67516752// See ReactUpdateQueue6753this._pendingElement = null;6754this._pendingStateQueue = null;6755this._pendingReplaceState = false;6756this._pendingForceUpdate = false;67576758this._renderedComponent = null;67596760this._context = null;6761this._mountOrder = 0;6762this._isTopLevel = false;67636764// See ReactUpdates and ReactUpdateQueue.6765this._pendingCallbacks = null;6766},67676768/**6769* Initializes the component, renders markup, and registers event listeners.6770*6771* @param {string} rootID DOM ID of the root node.6772* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction6773* @return {?string} Rendered markup to be inserted into the DOM.6774* @final6775* @internal6776*/6777mountComponent: function(rootID, transaction, context) {6778this._context = context;6779this._mountOrder = nextMountID++;6780this._rootNodeID = rootID;67816782var publicProps = this._processProps(this._currentElement.props);6783var publicContext = this._processContext(this._currentElement._context);67846785var Component = ReactNativeComponent.getComponentClassForElement(6786this._currentElement6787);67886789// Initialize the public class6790var inst = new Component(publicProps, publicContext);67916792if ("production" !== "development") {6793// This will throw later in _renderValidatedComponent, but add an early6794// warning now to help debugging6795("production" !== "development" ? warning(6796inst.render != null,6797'%s(...): No `render` method found on the returned component ' +6798'instance: you may have forgotten to define `render` in your ' +6799'component or you may have accidentally tried to render an element ' +6800'whose type is a function that isn\'t a React component.',6801Component.displayName || Component.name || 'Component'6802) : null);6803}68046805// These should be set up in the constructor, but as a convenience for6806// simpler class abstractions, we set them up after the fact.6807inst.props = publicProps;6808inst.context = publicContext;6809inst.refs = emptyObject;68106811this._instance = inst;68126813// Store a reference from the instance back to the internal representation6814ReactInstanceMap.set(inst, this);68156816if ("production" !== "development") {6817this._warnIfContextsDiffer(this._currentElement._context, context);6818}68196820if ("production" !== "development") {6821// Since plain JS classes are defined without any special initialization6822// logic, we can not catch common errors early. Therefore, we have to6823// catch them here, at initialization time, instead.6824("production" !== "development" ? warning(6825!inst.getInitialState ||6826inst.getInitialState.isReactClassApproved,6827'getInitialState was defined on %s, a plain JavaScript class. ' +6828'This is only supported for classes created using React.createClass. ' +6829'Did you mean to define a state property instead?',6830this.getName() || 'a component'6831) : null);6832("production" !== "development" ? warning(6833!inst.getDefaultProps ||6834inst.getDefaultProps.isReactClassApproved,6835'getDefaultProps was defined on %s, a plain JavaScript class. ' +6836'This is only supported for classes created using React.createClass. ' +6837'Use a static property to define defaultProps instead.',6838this.getName() || 'a component'6839) : null);6840("production" !== "development" ? warning(6841!inst.propTypes,6842'propTypes was defined as an instance property on %s. Use a static ' +6843'property to define propTypes instead.',6844this.getName() || 'a component'6845) : null);6846("production" !== "development" ? warning(6847!inst.contextTypes,6848'contextTypes was defined as an instance property on %s. Use a ' +6849'static property to define contextTypes instead.',6850this.getName() || 'a component'6851) : null);6852("production" !== "development" ? warning(6853typeof inst.componentShouldUpdate !== 'function',6854'%s has a method called ' +6855'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +6856'The name is phrased as a question because the function is ' +6857'expected to return a value.',6858(this.getName() || 'A component')6859) : null);6860}68616862var initialState = inst.state;6863if (initialState === undefined) {6864inst.state = initialState = null;6865}6866("production" !== "development" ? invariant(6867typeof initialState === 'object' && !Array.isArray(initialState),6868'%s.state: must be set to an object or null',6869this.getName() || 'ReactCompositeComponent'6870) : invariant(typeof initialState === 'object' && !Array.isArray(initialState)));68716872this._pendingStateQueue = null;6873this._pendingReplaceState = false;6874this._pendingForceUpdate = false;68756876var childContext;6877var renderedElement;68786879var previouslyMounting = ReactLifeCycle.currentlyMountingInstance;6880ReactLifeCycle.currentlyMountingInstance = this;6881try {6882if (inst.componentWillMount) {6883inst.componentWillMount();6884// When mounting, calls to `setState` by `componentWillMount` will set6885// `this._pendingStateQueue` without triggering a re-render.6886if (this._pendingStateQueue) {6887inst.state = this._processPendingState(inst.props, inst.context);6888}6889}68906891childContext = this._getValidatedChildContext(context);6892renderedElement = this._renderValidatedComponent(childContext);6893} finally {6894ReactLifeCycle.currentlyMountingInstance = previouslyMounting;6895}68966897this._renderedComponent = this._instantiateReactComponent(6898renderedElement,6899this._currentElement.type // The wrapping type6900);69016902var markup = ReactReconciler.mountComponent(6903this._renderedComponent,6904rootID,6905transaction,6906this._mergeChildContext(context, childContext)6907);6908if (inst.componentDidMount) {6909transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);6910}69116912return markup;6913},69146915/**6916* Releases any resources allocated by `mountComponent`.6917*6918* @final6919* @internal6920*/6921unmountComponent: function() {6922var inst = this._instance;69236924if (inst.componentWillUnmount) {6925var previouslyUnmounting = ReactLifeCycle.currentlyUnmountingInstance;6926ReactLifeCycle.currentlyUnmountingInstance = this;6927try {6928inst.componentWillUnmount();6929} finally {6930ReactLifeCycle.currentlyUnmountingInstance = previouslyUnmounting;6931}6932}69336934ReactReconciler.unmountComponent(this._renderedComponent);6935this._renderedComponent = null;69366937// Reset pending fields6938this._pendingStateQueue = null;6939this._pendingReplaceState = false;6940this._pendingForceUpdate = false;6941this._pendingCallbacks = null;6942this._pendingElement = null;69436944// These fields do not really need to be reset since this object is no6945// longer accessible.6946this._context = null;6947this._rootNodeID = null;69486949// Delete the reference from the instance to this internal representation6950// which allow the internals to be properly cleaned up even if the user6951// leaks a reference to the public instance.6952ReactInstanceMap.remove(inst);69536954// Some existing components rely on inst.props even after they've been6955// destroyed (in event handlers).6956// TODO: inst.props = null;6957// TODO: inst.state = null;6958// TODO: inst.context = null;6959},69606961/**6962* Schedule a partial update to the props. Only used for internal testing.6963*6964* @param {object} partialProps Subset of the next props.6965* @param {?function} callback Called after props are updated.6966* @final6967* @internal6968*/6969_setPropsInternal: function(partialProps, callback) {6970// This is a deoptimized path. We optimize for always having an element.6971// This creates an extra internal element.6972var element = this._pendingElement || this._currentElement;6973this._pendingElement = ReactElement.cloneAndReplaceProps(6974element,6975assign({}, element.props, partialProps)6976);6977ReactUpdates.enqueueUpdate(this, callback);6978},69796980/**6981* Filters the context object to only contain keys specified in6982* `contextTypes`6983*6984* @param {object} context6985* @return {?object}6986* @private6987*/6988_maskContext: function(context) {6989var maskedContext = null;6990// This really should be getting the component class for the element,6991// but we know that we're not going to need it for built-ins.6992if (typeof this._currentElement.type === 'string') {6993return emptyObject;6994}6995var contextTypes = this._currentElement.type.contextTypes;6996if (!contextTypes) {6997return emptyObject;6998}6999maskedContext = {};7000for (var contextName in contextTypes) {7001maskedContext[contextName] = context[contextName];7002}7003return maskedContext;7004},70057006/**7007* Filters the context object to only contain keys specified in7008* `contextTypes`, and asserts that they are valid.7009*7010* @param {object} context7011* @return {?object}7012* @private7013*/7014_processContext: function(context) {7015var maskedContext = this._maskContext(context);7016if ("production" !== "development") {7017var Component = ReactNativeComponent.getComponentClassForElement(7018this._currentElement7019);7020if (Component.contextTypes) {7021this._checkPropTypes(7022Component.contextTypes,7023maskedContext,7024ReactPropTypeLocations.context7025);7026}7027}7028return maskedContext;7029},70307031/**7032* @param {object} currentContext7033* @return {object}7034* @private7035*/7036_getValidatedChildContext: function(currentContext) {7037var inst = this._instance;7038var childContext = inst.getChildContext && inst.getChildContext();7039if (childContext) {7040("production" !== "development" ? invariant(7041typeof inst.constructor.childContextTypes === 'object',7042'%s.getChildContext(): childContextTypes must be defined in order to ' +7043'use getChildContext().',7044this.getName() || 'ReactCompositeComponent'7045) : invariant(typeof inst.constructor.childContextTypes === 'object'));7046if ("production" !== "development") {7047this._checkPropTypes(7048inst.constructor.childContextTypes,7049childContext,7050ReactPropTypeLocations.childContext7051);7052}7053for (var name in childContext) {7054("production" !== "development" ? invariant(7055name in inst.constructor.childContextTypes,7056'%s.getChildContext(): key "%s" is not defined in childContextTypes.',7057this.getName() || 'ReactCompositeComponent',7058name7059) : invariant(name in inst.constructor.childContextTypes));7060}7061return childContext;7062}7063return null;7064},70657066_mergeChildContext: function(currentContext, childContext) {7067if (childContext) {7068return assign({}, currentContext, childContext);7069}7070return currentContext;7071},70727073/**7074* Processes props by setting default values for unspecified props and7075* asserting that the props are valid. Does not mutate its argument; returns7076* a new props object with defaults merged in.7077*7078* @param {object} newProps7079* @return {object}7080* @private7081*/7082_processProps: function(newProps) {7083if ("production" !== "development") {7084var Component = ReactNativeComponent.getComponentClassForElement(7085this._currentElement7086);7087if (Component.propTypes) {7088this._checkPropTypes(7089Component.propTypes,7090newProps,7091ReactPropTypeLocations.prop7092);7093}7094}7095return newProps;7096},70977098/**7099* Assert that the props are valid7100*7101* @param {object} propTypes Map of prop name to a ReactPropType7102* @param {object} props7103* @param {string} location e.g. "prop", "context", "child context"7104* @private7105*/7106_checkPropTypes: function(propTypes, props, location) {7107// TODO: Stop validating prop types here and only use the element7108// validation.7109var componentName = this.getName();7110for (var propName in propTypes) {7111if (propTypes.hasOwnProperty(propName)) {7112var error;7113try {7114// This is intentionally an invariant that gets caught. It's the same7115// behavior as without this statement except with a better message.7116("production" !== "development" ? invariant(7117typeof propTypes[propName] === 'function',7118'%s: %s type `%s` is invalid; it must be a function, usually ' +7119'from React.PropTypes.',7120componentName || 'React class',7121ReactPropTypeLocationNames[location],7122propName7123) : invariant(typeof propTypes[propName] === 'function'));7124error = propTypes[propName](props, propName, componentName, location);7125} catch (ex) {7126error = ex;7127}7128if (error instanceof Error) {7129// We may want to extend this logic for similar errors in7130// React.render calls, so I'm abstracting it away into7131// a function to minimize refactoring in the future7132var addendum = getDeclarationErrorAddendum(this);71337134if (location === ReactPropTypeLocations.prop) {7135// Preface gives us something to blacklist in warning module7136("production" !== "development" ? warning(7137false,7138'Failed Composite propType: %s%s',7139error.message,7140addendum7141) : null);7142} else {7143("production" !== "development" ? warning(7144false,7145'Failed Context Types: %s%s',7146error.message,7147addendum7148) : null);7149}7150}7151}7152}7153},71547155receiveComponent: function(nextElement, transaction, nextContext) {7156var prevElement = this._currentElement;7157var prevContext = this._context;71587159this._pendingElement = null;71607161this.updateComponent(7162transaction,7163prevElement,7164nextElement,7165prevContext,7166nextContext7167);7168},71697170/**7171* If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`7172* is set, update the component.7173*7174* @param {ReactReconcileTransaction} transaction7175* @internal7176*/7177performUpdateIfNecessary: function(transaction) {7178if (this._pendingElement != null) {7179ReactReconciler.receiveComponent(7180this,7181this._pendingElement || this._currentElement,7182transaction,7183this._context7184);7185}71867187if (this._pendingStateQueue !== null || this._pendingForceUpdate) {7188if ("production" !== "development") {7189ReactElementValidator.checkAndWarnForMutatedProps(7190this._currentElement7191);7192}71937194this.updateComponent(7195transaction,7196this._currentElement,7197this._currentElement,7198this._context,7199this._context7200);7201}7202},72037204/**7205* Compare two contexts, warning if they are different7206* TODO: Remove this check when owner-context is removed7207*/7208_warnIfContextsDiffer: function(ownerBasedContext, parentBasedContext) {7209ownerBasedContext = this._maskContext(ownerBasedContext);7210parentBasedContext = this._maskContext(parentBasedContext);7211var parentKeys = Object.keys(parentBasedContext).sort();7212var displayName = this.getName() || 'ReactCompositeComponent';7213for (var i = 0; i < parentKeys.length; i++) {7214var key = parentKeys[i];7215("production" !== "development" ? warning(7216ownerBasedContext[key] === parentBasedContext[key],7217'owner-based and parent-based contexts differ ' +7218'(values: `%s` vs `%s`) for key (%s) while mounting %s ' +7219'(see: http://fb.me/react-context-by-parent)',7220ownerBasedContext[key],7221parentBasedContext[key],7222key,7223displayName7224) : null);7225}7226},72277228/**7229* Perform an update to a mounted component. The componentWillReceiveProps and7230* shouldComponentUpdate methods are called, then (assuming the update isn't7231* skipped) the remaining update lifecycle methods are called and the DOM7232* representation is updated.7233*7234* By default, this implements React's rendering and reconciliation algorithm.7235* Sophisticated clients may wish to override this.7236*7237* @param {ReactReconcileTransaction} transaction7238* @param {ReactElement} prevParentElement7239* @param {ReactElement} nextParentElement7240* @internal7241* @overridable7242*/7243updateComponent: function(7244transaction,7245prevParentElement,7246nextParentElement,7247prevUnmaskedContext,7248nextUnmaskedContext7249) {7250var inst = this._instance;72517252var nextContext = inst.context;7253var nextProps = inst.props;72547255// Distinguish between a props update versus a simple state update7256if (prevParentElement !== nextParentElement) {7257nextContext = this._processContext(nextParentElement._context);7258nextProps = this._processProps(nextParentElement.props);72597260if ("production" !== "development") {7261if (nextUnmaskedContext != null) {7262this._warnIfContextsDiffer(7263nextParentElement._context,7264nextUnmaskedContext7265);7266}7267}72687269// An update here will schedule an update but immediately set7270// _pendingStateQueue which will ensure that any state updates gets7271// immediately reconciled instead of waiting for the next batch.72727273if (inst.componentWillReceiveProps) {7274inst.componentWillReceiveProps(nextProps, nextContext);7275}7276}72777278var nextState = this._processPendingState(nextProps, nextContext);72797280var shouldUpdate =7281this._pendingForceUpdate ||7282!inst.shouldComponentUpdate ||7283inst.shouldComponentUpdate(nextProps, nextState, nextContext);72847285if ("production" !== "development") {7286("production" !== "development" ? warning(7287typeof shouldUpdate !== 'undefined',7288'%s.shouldComponentUpdate(): Returned undefined instead of a ' +7289'boolean value. Make sure to return true or false.',7290this.getName() || 'ReactCompositeComponent'7291) : null);7292}72937294if (shouldUpdate) {7295this._pendingForceUpdate = false;7296// Will set `this.props`, `this.state` and `this.context`.7297this._performComponentUpdate(7298nextParentElement,7299nextProps,7300nextState,7301nextContext,7302transaction,7303nextUnmaskedContext7304);7305} else {7306// If it's determined that a component should not update, we still want7307// to set props and state but we shortcut the rest of the update.7308this._currentElement = nextParentElement;7309this._context = nextUnmaskedContext;7310inst.props = nextProps;7311inst.state = nextState;7312inst.context = nextContext;7313}7314},73157316_processPendingState: function(props, context) {7317var inst = this._instance;7318var queue = this._pendingStateQueue;7319var replace = this._pendingReplaceState;7320this._pendingReplaceState = false;7321this._pendingStateQueue = null;73227323if (!queue) {7324return inst.state;7325}73267327if (replace && queue.length === 1) {7328return queue[0];7329}73307331var nextState = assign({}, replace ? queue[0] : inst.state);7332for (var i = replace ? 1 : 0; i < queue.length; i++) {7333var partial = queue[i];7334assign(7335nextState,7336typeof partial === 'function' ?7337partial.call(inst, nextState, props, context) :7338partial7339);7340}73417342return nextState;7343},73447345/**7346* Merges new props and state, notifies delegate methods of update and7347* performs update.7348*7349* @param {ReactElement} nextElement Next element7350* @param {object} nextProps Next public object to set as properties.7351* @param {?object} nextState Next object to set as state.7352* @param {?object} nextContext Next public object to set as context.7353* @param {ReactReconcileTransaction} transaction7354* @param {?object} unmaskedContext7355* @private7356*/7357_performComponentUpdate: function(7358nextElement,7359nextProps,7360nextState,7361nextContext,7362transaction,7363unmaskedContext7364) {7365var inst = this._instance;73667367var prevProps = inst.props;7368var prevState = inst.state;7369var prevContext = inst.context;73707371if (inst.componentWillUpdate) {7372inst.componentWillUpdate(nextProps, nextState, nextContext);7373}73747375this._currentElement = nextElement;7376this._context = unmaskedContext;7377inst.props = nextProps;7378inst.state = nextState;7379inst.context = nextContext;73807381this._updateRenderedComponent(transaction, unmaskedContext);73827383if (inst.componentDidUpdate) {7384transaction.getReactMountReady().enqueue(7385inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext),7386inst7387);7388}7389},73907391/**7392* Call the component's `render` method and update the DOM accordingly.7393*7394* @param {ReactReconcileTransaction} transaction7395* @internal7396*/7397_updateRenderedComponent: function(transaction, context) {7398var prevComponentInstance = this._renderedComponent;7399var prevRenderedElement = prevComponentInstance._currentElement;7400var childContext = this._getValidatedChildContext();7401var nextRenderedElement = this._renderValidatedComponent(childContext);7402if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {7403ReactReconciler.receiveComponent(7404prevComponentInstance,7405nextRenderedElement,7406transaction,7407this._mergeChildContext(context, childContext)7408);7409} else {7410// These two IDs are actually the same! But nothing should rely on that.7411var thisID = this._rootNodeID;7412var prevComponentID = prevComponentInstance._rootNodeID;7413ReactReconciler.unmountComponent(prevComponentInstance);74147415this._renderedComponent = this._instantiateReactComponent(7416nextRenderedElement,7417this._currentElement.type7418);7419var nextMarkup = ReactReconciler.mountComponent(7420this._renderedComponent,7421thisID,7422transaction,7423this._mergeChildContext(context, childContext)7424);7425this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup);7426}7427},74287429/**7430* @protected7431*/7432_replaceNodeWithMarkupByID: function(prevComponentID, nextMarkup) {7433ReactComponentEnvironment.replaceNodeWithMarkupByID(7434prevComponentID,7435nextMarkup7436);7437},74387439/**7440* @protected7441*/7442_renderValidatedComponentWithoutOwnerOrContext: function() {7443var inst = this._instance;7444var renderedComponent = inst.render();7445if ("production" !== "development") {7446// We allow auto-mocks to proceed as if they're returning null.7447if (typeof renderedComponent === 'undefined' &&7448inst.render._isMockFunction) {7449// This is probably bad practice. Consider warning here and7450// deprecating this convenience.7451renderedComponent = null;7452}7453}74547455return renderedComponent;7456},74577458/**7459* @private7460*/7461_renderValidatedComponent: function(childContext) {7462var renderedComponent;7463var previousContext = ReactContext.current;7464ReactContext.current = this._mergeChildContext(7465this._currentElement._context,7466childContext7467);7468ReactCurrentOwner.current = this;7469try {7470renderedComponent =7471this._renderValidatedComponentWithoutOwnerOrContext();7472} finally {7473ReactContext.current = previousContext;7474ReactCurrentOwner.current = null;7475}7476("production" !== "development" ? invariant(7477// TODO: An `isValidNode` function would probably be more appropriate7478renderedComponent === null || renderedComponent === false ||7479ReactElement.isValidElement(renderedComponent),7480'%s.render(): A valid ReactComponent must be returned. You may have ' +7481'returned undefined, an array or some other invalid object.',7482this.getName() || 'ReactCompositeComponent'7483) : invariant(// TODO: An `isValidNode` function would probably be more appropriate7484renderedComponent === null || renderedComponent === false ||7485ReactElement.isValidElement(renderedComponent)));7486return renderedComponent;7487},74887489/**7490* Lazily allocates the refs object and stores `component` as `ref`.7491*7492* @param {string} ref Reference name.7493* @param {component} component Component to store as `ref`.7494* @final7495* @private7496*/7497attachRef: function(ref, component) {7498var inst = this.getPublicInstance();7499var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs;7500refs[ref] = component.getPublicInstance();7501},75027503/**7504* Detaches a reference name.7505*7506* @param {string} ref Name to dereference.7507* @final7508* @private7509*/7510detachRef: function(ref) {7511var refs = this.getPublicInstance().refs;7512delete refs[ref];7513},75147515/**7516* Get a text description of the component that can be used to identify it7517* in error messages.7518* @return {string} The name or null.7519* @internal7520*/7521getName: function() {7522var type = this._currentElement.type;7523var constructor = this._instance && this._instance.constructor;7524return (7525type.displayName || (constructor && constructor.displayName) ||7526type.name || (constructor && constructor.name) ||7527null7528);7529},75307531/**7532* Get the publicly accessible representation of this component - i.e. what7533* is exposed by refs and returned by React.render. Can be null for stateless7534* components.7535*7536* @return {ReactComponent} the public component instance.7537* @internal7538*/7539getPublicInstance: function() {7540return this._instance;7541},75427543// Stub7544_instantiateReactComponent: null75457546};75477548ReactPerf.measureMethods(7549ReactCompositeComponentMixin,7550'ReactCompositeComponent',7551{7552mountComponent: 'mountComponent',7553updateComponent: 'updateComponent',7554_renderValidatedComponent: '_renderValidatedComponent'7555}7556);75577558var ReactCompositeComponent = {75597560Mixin: ReactCompositeComponentMixin75617562};75637564module.exports = ReactCompositeComponent;75657566},{"100":100,"130":130,"150":150,"167":167,"171":171,"29":29,"41":41,"44":44,"45":45,"63":63,"64":64,"73":73,"74":74,"80":80,"82":82,"84":84,"85":85,"89":89}],44:[function(_dereq_,module,exports){7567/**7568* Copyright 2013-2015, Facebook, Inc.7569* All rights reserved.7570*7571* This source code is licensed under the BSD-style license found in the7572* LICENSE file in the root directory of this source tree. An additional grant7573* of patent rights can be found in the PATENTS file in the same directory.7574*7575* @providesModule ReactContext7576*/75777578'use strict';75797580var assign = _dereq_(29);7581var emptyObject = _dereq_(130);7582var warning = _dereq_(171);75837584var didWarn = false;75857586/**7587* Keeps track of the current context.7588*7589* The context is automatically passed down the component ownership hierarchy7590* and is accessible via `this.context` on ReactCompositeComponents.7591*/7592var ReactContext = {75937594/**7595* @internal7596* @type {object}7597*/7598current: emptyObject,75997600/**7601* Temporarily extends the current context while executing scopedCallback.7602*7603* A typical use case might look like7604*7605* render: function() {7606* var children = ReactContext.withContext({foo: 'foo'}, () => (7607*7608* ));7609* return <div>{children}</div>;7610* }7611*7612* @param {object} newContext New context to merge into the existing context7613* @param {function} scopedCallback Callback to run with the new context7614* @return {ReactComponent|array<ReactComponent>}7615*/7616withContext: function(newContext, scopedCallback) {7617if ("production" !== "development") {7618("production" !== "development" ? warning(7619didWarn,7620'withContext is deprecated and will be removed in a future version. ' +7621'Use a wrapper component with getChildContext instead.'7622) : null);76237624didWarn = true;7625}76267627var result;7628var previousContext = ReactContext.current;7629ReactContext.current = assign({}, previousContext, newContext);7630try {7631result = scopedCallback();7632} finally {7633ReactContext.current = previousContext;7634}7635return result;7636}76377638};76397640module.exports = ReactContext;76417642},{"130":130,"171":171,"29":29}],45:[function(_dereq_,module,exports){7643/**7644* Copyright 2013-2015, Facebook, Inc.7645* All rights reserved.7646*7647* This source code is licensed under the BSD-style license found in the7648* LICENSE file in the root directory of this source tree. An additional grant7649* of patent rights can be found in the PATENTS file in the same directory.7650*7651* @providesModule ReactCurrentOwner7652*/76537654'use strict';76557656/**7657* Keeps track of the current owner.7658*7659* The current owner is the component who should own any components that are7660* currently being constructed.7661*7662* The depth indicate how many composite components are above this render level.7663*/7664var ReactCurrentOwner = {76657666/**7667* @internal7668* @type {ReactComponent}7669*/7670current: null76717672};76737674module.exports = ReactCurrentOwner;76757676},{}],46:[function(_dereq_,module,exports){7677/**7678* Copyright 2013-2015, Facebook, Inc.7679* All rights reserved.7680*7681* This source code is licensed under the BSD-style license found in the7682* LICENSE file in the root directory of this source tree. An additional grant7683* of patent rights can be found in the PATENTS file in the same directory.7684*7685* @providesModule ReactDOM7686* @typechecks static-only7687*/76887689'use strict';76907691var ReactElement = _dereq_(63);7692var ReactElementValidator = _dereq_(64);76937694var mapObject = _dereq_(158);76957696/**7697* Create a factory that creates HTML tag elements.7698*7699* @param {string} tag Tag name (e.g. `div`).7700* @private7701*/7702function createDOMFactory(tag) {7703if ("production" !== "development") {7704return ReactElementValidator.createFactory(tag);7705}7706return ReactElement.createFactory(tag);7707}77087709/**7710* Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.7711* This is also accessible via `React.DOM`.7712*7713* @public7714*/7715var ReactDOM = mapObject({7716a: 'a',7717abbr: 'abbr',7718address: 'address',7719area: 'area',7720article: 'article',7721aside: 'aside',7722audio: 'audio',7723b: 'b',7724base: 'base',7725bdi: 'bdi',7726bdo: 'bdo',7727big: 'big',7728blockquote: 'blockquote',7729body: 'body',7730br: 'br',7731button: 'button',7732canvas: 'canvas',7733caption: 'caption',7734cite: 'cite',7735code: 'code',7736col: 'col',7737colgroup: 'colgroup',7738data: 'data',7739datalist: 'datalist',7740dd: 'dd',7741del: 'del',7742details: 'details',7743dfn: 'dfn',7744dialog: 'dialog',7745div: 'div',7746dl: 'dl',7747dt: 'dt',7748em: 'em',7749embed: 'embed',7750fieldset: 'fieldset',7751figcaption: 'figcaption',7752figure: 'figure',7753footer: 'footer',7754form: 'form',7755h1: 'h1',7756h2: 'h2',7757h3: 'h3',7758h4: 'h4',7759h5: 'h5',7760h6: 'h6',7761head: 'head',7762header: 'header',7763hr: 'hr',7764html: 'html',7765i: 'i',7766iframe: 'iframe',7767img: 'img',7768input: 'input',7769ins: 'ins',7770kbd: 'kbd',7771keygen: 'keygen',7772label: 'label',7773legend: 'legend',7774li: 'li',7775link: 'link',7776main: 'main',7777map: 'map',7778mark: 'mark',7779menu: 'menu',7780menuitem: 'menuitem',7781meta: 'meta',7782meter: 'meter',7783nav: 'nav',7784noscript: 'noscript',7785object: 'object',7786ol: 'ol',7787optgroup: 'optgroup',7788option: 'option',7789output: 'output',7790p: 'p',7791param: 'param',7792picture: 'picture',7793pre: 'pre',7794progress: 'progress',7795q: 'q',7796rp: 'rp',7797rt: 'rt',7798ruby: 'ruby',7799s: 's',7800samp: 'samp',7801script: 'script',7802section: 'section',7803select: 'select',7804small: 'small',7805source: 'source',7806span: 'span',7807strong: 'strong',7808style: 'style',7809sub: 'sub',7810summary: 'summary',7811sup: 'sup',7812table: 'table',7813tbody: 'tbody',7814td: 'td',7815textarea: 'textarea',7816tfoot: 'tfoot',7817th: 'th',7818thead: 'thead',7819time: 'time',7820title: 'title',7821tr: 'tr',7822track: 'track',7823u: 'u',7824ul: 'ul',7825'var': 'var',7826video: 'video',7827wbr: 'wbr',78287829// SVG7830circle: 'circle',7831clipPath: 'clipPath',7832defs: 'defs',7833ellipse: 'ellipse',7834g: 'g',7835line: 'line',7836linearGradient: 'linearGradient',7837mask: 'mask',7838path: 'path',7839pattern: 'pattern',7840polygon: 'polygon',7841polyline: 'polyline',7842radialGradient: 'radialGradient',7843rect: 'rect',7844stop: 'stop',7845svg: 'svg',7846text: 'text',7847tspan: 'tspan'78487849}, createDOMFactory);78507851module.exports = ReactDOM;78527853},{"158":158,"63":63,"64":64}],47:[function(_dereq_,module,exports){7854/**7855* Copyright 2013-2015, Facebook, Inc.7856* All rights reserved.7857*7858* This source code is licensed under the BSD-style license found in the7859* LICENSE file in the root directory of this source tree. An additional grant7860* of patent rights can be found in the PATENTS file in the same directory.7861*7862* @providesModule ReactDOMButton7863*/78647865'use strict';78667867var AutoFocusMixin = _dereq_(2);7868var ReactBrowserComponentMixin = _dereq_(32);7869var ReactClass = _dereq_(38);7870var ReactElement = _dereq_(63);78717872var keyMirror = _dereq_(156);78737874var button = ReactElement.createFactory('button');78757876var mouseListenerNames = keyMirror({7877onClick: true,7878onDoubleClick: true,7879onMouseDown: true,7880onMouseMove: true,7881onMouseUp: true,7882onClickCapture: true,7883onDoubleClickCapture: true,7884onMouseDownCapture: true,7885onMouseMoveCapture: true,7886onMouseUpCapture: true7887});78887889/**7890* Implements a <button> native component that does not receive mouse events7891* when `disabled` is set.7892*/7893var ReactDOMButton = ReactClass.createClass({7894displayName: 'ReactDOMButton',7895tagName: 'BUTTON',78967897mixins: [AutoFocusMixin, ReactBrowserComponentMixin],78987899render: function() {7900var props = {};79017902// Copy the props; except the mouse listeners if we're disabled7903for (var key in this.props) {7904if (this.props.hasOwnProperty(key) &&7905(!this.props.disabled || !mouseListenerNames[key])) {7906props[key] = this.props[key];7907}7908}79097910return button(props, this.props.children);7911}79127913});79147915module.exports = ReactDOMButton;79167917},{"156":156,"2":2,"32":32,"38":38,"63":63}],48:[function(_dereq_,module,exports){7918/**7919* Copyright 2013-2015, Facebook, Inc.7920* All rights reserved.7921*7922* This source code is licensed under the BSD-style license found in the7923* LICENSE file in the root directory of this source tree. An additional grant7924* of patent rights can be found in the PATENTS file in the same directory.7925*7926* @providesModule ReactDOMComponent7927* @typechecks static-only7928*/79297930/* global hasOwnProperty:true */79317932'use strict';79337934var CSSPropertyOperations = _dereq_(6);7935var DOMProperty = _dereq_(11);7936var DOMPropertyOperations = _dereq_(12);7937var ReactBrowserEventEmitter = _dereq_(33);7938var ReactComponentBrowserEnvironment =7939_dereq_(40);7940var ReactMount = _dereq_(77);7941var ReactMultiChild = _dereq_(78);7942var ReactPerf = _dereq_(82);79437944var assign = _dereq_(29);7945var escapeTextContentForBrowser = _dereq_(131);7946var invariant = _dereq_(150);7947var isEventSupported = _dereq_(151);7948var keyOf = _dereq_(157);7949var warning = _dereq_(171);79507951var deleteListener = ReactBrowserEventEmitter.deleteListener;7952var listenTo = ReactBrowserEventEmitter.listenTo;7953var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules;79547955// For quickly matching children type, to test if can be treated as content.7956var CONTENT_TYPES = {'string': true, 'number': true};79577958var STYLE = keyOf({style: null});79597960var ELEMENT_NODE_TYPE = 1;79617962/**7963* Optionally injectable operations for mutating the DOM7964*/7965var BackendIDOperations = null;79667967/**7968* @param {?object} props7969*/7970function assertValidProps(props) {7971if (!props) {7972return;7973}7974// Note the use of `==` which checks for null or undefined.7975if (props.dangerouslySetInnerHTML != null) {7976("production" !== "development" ? invariant(7977props.children == null,7978'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'7979) : invariant(props.children == null));7980("production" !== "development" ? invariant(7981typeof props.dangerouslySetInnerHTML === 'object' &&7982'__html' in props.dangerouslySetInnerHTML,7983'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +7984'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' +7985'for more information.'7986) : invariant(typeof props.dangerouslySetInnerHTML === 'object' &&7987'__html' in props.dangerouslySetInnerHTML));7988}7989if ("production" !== "development") {7990("production" !== "development" ? warning(7991props.innerHTML == null,7992'Directly setting property `innerHTML` is not permitted. ' +7993'For more information, lookup documentation on `dangerouslySetInnerHTML`.'7994) : null);7995("production" !== "development" ? warning(7996!props.contentEditable || props.children == null,7997'A component is `contentEditable` and contains `children` managed by ' +7998'React. It is now your responsibility to guarantee that none of ' +7999'those nodes are unexpectedly modified or duplicated. This is ' +8000'probably not intentional.'8001) : null);8002}8003("production" !== "development" ? invariant(8004props.style == null || typeof props.style === 'object',8005'The `style` prop expects a mapping from style properties to values, ' +8006'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' +8007'using JSX.'8008) : invariant(props.style == null || typeof props.style === 'object'));8009}80108011function putListener(id, registrationName, listener, transaction) {8012if ("production" !== "development") {8013// IE8 has no API for event capturing and the `onScroll` event doesn't8014// bubble.8015("production" !== "development" ? warning(8016registrationName !== 'onScroll' || isEventSupported('scroll', true),8017'This browser doesn\'t support the `onScroll` event'8018) : null);8019}8020var container = ReactMount.findReactContainerForID(id);8021if (container) {8022var doc = container.nodeType === ELEMENT_NODE_TYPE ?8023container.ownerDocument :8024container;8025listenTo(registrationName, doc);8026}8027transaction.getPutListenerQueue().enqueuePutListener(8028id,8029registrationName,8030listener8031);8032}80338034// For HTML, certain tags should omit their close tag. We keep a whitelist for8035// those special cased tags.80368037var omittedCloseTags = {8038'area': true,8039'base': true,8040'br': true,8041'col': true,8042'embed': true,8043'hr': true,8044'img': true,8045'input': true,8046'keygen': true,8047'link': true,8048'meta': true,8049'param': true,8050'source': true,8051'track': true,8052'wbr': true8053// NOTE: menuitem's close tag should be omitted, but that causes problems.8054};80558056// We accept any tag to be rendered but since this gets injected into abitrary8057// HTML, we want to make sure that it's a safe tag.8058// http://www.w3.org/TR/REC-xml/#NT-Name80598060var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset8061var validatedTagCache = {};8062var hasOwnProperty = {}.hasOwnProperty;80638064function validateDangerousTag(tag) {8065if (!hasOwnProperty.call(validatedTagCache, tag)) {8066("production" !== "development" ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag)));8067validatedTagCache[tag] = true;8068}8069}80708071/**8072* Creates a new React class that is idempotent and capable of containing other8073* React components. It accepts event listeners and DOM properties that are8074* valid according to `DOMProperty`.8075*8076* - Event listeners: `onClick`, `onMouseDown`, etc.8077* - DOM properties: `className`, `name`, `title`, etc.8078*8079* The `style` property functions differently from the DOM API. It accepts an8080* object mapping of style properties to values.8081*8082* @constructor ReactDOMComponent8083* @extends ReactMultiChild8084*/8085function ReactDOMComponent(tag) {8086validateDangerousTag(tag);8087this._tag = tag;8088this._renderedChildren = null;8089this._previousStyleCopy = null;8090this._rootNodeID = null;8091}80928093ReactDOMComponent.displayName = 'ReactDOMComponent';80948095ReactDOMComponent.Mixin = {80968097construct: function(element) {8098this._currentElement = element;8099},81008101/**8102* Generates root tag markup then recurses. This method has side effects and8103* is not idempotent.8104*8105* @internal8106* @param {string} rootID The root DOM ID for this node.8107* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction8108* @return {string} The computed markup.8109*/8110mountComponent: function(rootID, transaction, context) {8111this._rootNodeID = rootID;8112assertValidProps(this._currentElement.props);8113var closeTag = omittedCloseTags[this._tag] ? '' : '</' + this._tag + '>';8114return (8115this._createOpenTagMarkupAndPutListeners(transaction) +8116this._createContentMarkup(transaction, context) +8117closeTag8118);8119},81208121/**8122* Creates markup for the open tag and all attributes.8123*8124* This method has side effects because events get registered.8125*8126* Iterating over object properties is faster than iterating over arrays.8127* @see http://jsperf.com/obj-vs-arr-iteration8128*8129* @private8130* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction8131* @return {string} Markup of opening tag.8132*/8133_createOpenTagMarkupAndPutListeners: function(transaction) {8134var props = this._currentElement.props;8135var ret = '<' + this._tag;81368137for (var propKey in props) {8138if (!props.hasOwnProperty(propKey)) {8139continue;8140}8141var propValue = props[propKey];8142if (propValue == null) {8143continue;8144}8145if (registrationNameModules.hasOwnProperty(propKey)) {8146putListener(this._rootNodeID, propKey, propValue, transaction);8147} else {8148if (propKey === STYLE) {8149if (propValue) {8150propValue = this._previousStyleCopy = assign({}, props.style);8151}8152propValue = CSSPropertyOperations.createMarkupForStyles(propValue);8153}8154var markup =8155DOMPropertyOperations.createMarkupForProperty(propKey, propValue);8156if (markup) {8157ret += ' ' + markup;8158}8159}8160}81618162// For static pages, no need to put React ID and checksum. Saves lots of8163// bytes.8164if (transaction.renderToStaticMarkup) {8165return ret + '>';8166}81678168var markupForID = DOMPropertyOperations.createMarkupForID(this._rootNodeID);8169return ret + ' ' + markupForID + '>';8170},81718172/**8173* Creates markup for the content between the tags.8174*8175* @private8176* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction8177* @param {object} context8178* @return {string} Content markup.8179*/8180_createContentMarkup: function(transaction, context) {8181var prefix = '';8182if (this._tag === 'listing' ||8183this._tag === 'pre' ||8184this._tag === 'textarea') {8185// Add an initial newline because browsers ignore the first newline in8186// a <listing>, <pre>, or <textarea> as an "authoring convenience" -- see8187// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody.8188prefix = '\n';8189}81908191var props = this._currentElement.props;81928193// Intentional use of != to avoid catching zero/false.8194var innerHTML = props.dangerouslySetInnerHTML;8195if (innerHTML != null) {8196if (innerHTML.__html != null) {8197return prefix + innerHTML.__html;8198}8199} else {8200var contentToUse =8201CONTENT_TYPES[typeof props.children] ? props.children : null;8202var childrenToUse = contentToUse != null ? null : props.children;8203if (contentToUse != null) {8204return prefix + escapeTextContentForBrowser(contentToUse);8205} else if (childrenToUse != null) {8206var mountImages = this.mountChildren(8207childrenToUse,8208transaction,8209context8210);8211return prefix + mountImages.join('');8212}8213}8214return prefix;8215},82168217receiveComponent: function(nextElement, transaction, context) {8218var prevElement = this._currentElement;8219this._currentElement = nextElement;8220this.updateComponent(transaction, prevElement, nextElement, context);8221},82228223/**8224* Updates a native DOM component after it has already been allocated and8225* attached to the DOM. Reconciles the root DOM node, then recurses.8226*8227* @param {ReactReconcileTransaction} transaction8228* @param {ReactElement} prevElement8229* @param {ReactElement} nextElement8230* @internal8231* @overridable8232*/8233updateComponent: function(transaction, prevElement, nextElement, context) {8234assertValidProps(this._currentElement.props);8235this._updateDOMProperties(prevElement.props, transaction);8236this._updateDOMChildren(prevElement.props, transaction, context);8237},82388239/**8240* Reconciles the properties by detecting differences in property values and8241* updating the DOM as necessary. This function is probably the single most8242* critical path for performance optimization.8243*8244* TODO: Benchmark whether checking for changed values in memory actually8245* improves performance (especially statically positioned elements).8246* TODO: Benchmark the effects of putting this at the top since 99% of props8247* do not change for a given reconciliation.8248* TODO: Benchmark areas that can be improved with caching.8249*8250* @private8251* @param {object} lastProps8252* @param {ReactReconcileTransaction} transaction8253*/8254_updateDOMProperties: function(lastProps, transaction) {8255var nextProps = this._currentElement.props;8256var propKey;8257var styleName;8258var styleUpdates;8259for (propKey in lastProps) {8260if (nextProps.hasOwnProperty(propKey) ||8261!lastProps.hasOwnProperty(propKey)) {8262continue;8263}8264if (propKey === STYLE) {8265var lastStyle = this._previousStyleCopy;8266for (styleName in lastStyle) {8267if (lastStyle.hasOwnProperty(styleName)) {8268styleUpdates = styleUpdates || {};8269styleUpdates[styleName] = '';8270}8271}8272this._previousStyleCopy = null;8273} else if (registrationNameModules.hasOwnProperty(propKey)) {8274deleteListener(this._rootNodeID, propKey);8275} else if (8276DOMProperty.isStandardName[propKey] ||8277DOMProperty.isCustomAttribute(propKey)) {8278BackendIDOperations.deletePropertyByID(8279this._rootNodeID,8280propKey8281);8282}8283}8284for (propKey in nextProps) {8285var nextProp = nextProps[propKey];8286var lastProp = propKey === STYLE ?8287this._previousStyleCopy :8288lastProps[propKey];8289if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) {8290continue;8291}8292if (propKey === STYLE) {8293if (nextProp) {8294nextProp = this._previousStyleCopy = assign({}, nextProp);8295} else {8296this._previousStyleCopy = null;8297}8298if (lastProp) {8299// Unset styles on `lastProp` but not on `nextProp`.8300for (styleName in lastProp) {8301if (lastProp.hasOwnProperty(styleName) &&8302(!nextProp || !nextProp.hasOwnProperty(styleName))) {8303styleUpdates = styleUpdates || {};8304styleUpdates[styleName] = '';8305}8306}8307// Update styles that changed since `lastProp`.8308for (styleName in nextProp) {8309if (nextProp.hasOwnProperty(styleName) &&8310lastProp[styleName] !== nextProp[styleName]) {8311styleUpdates = styleUpdates || {};8312styleUpdates[styleName] = nextProp[styleName];8313}8314}8315} else {8316// Relies on `updateStylesByID` not mutating `styleUpdates`.8317styleUpdates = nextProp;8318}8319} else if (registrationNameModules.hasOwnProperty(propKey)) {8320putListener(this._rootNodeID, propKey, nextProp, transaction);8321} else if (8322DOMProperty.isStandardName[propKey] ||8323DOMProperty.isCustomAttribute(propKey)) {8324BackendIDOperations.updatePropertyByID(8325this._rootNodeID,8326propKey,8327nextProp8328);8329}8330}8331if (styleUpdates) {8332BackendIDOperations.updateStylesByID(8333this._rootNodeID,8334styleUpdates8335);8336}8337},83388339/**8340* Reconciles the children with the various properties that affect the8341* children content.8342*8343* @param {object} lastProps8344* @param {ReactReconcileTransaction} transaction8345*/8346_updateDOMChildren: function(lastProps, transaction, context) {8347var nextProps = this._currentElement.props;83488349var lastContent =8350CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;8351var nextContent =8352CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;83538354var lastHtml =8355lastProps.dangerouslySetInnerHTML &&8356lastProps.dangerouslySetInnerHTML.__html;8357var nextHtml =8358nextProps.dangerouslySetInnerHTML &&8359nextProps.dangerouslySetInnerHTML.__html;83608361// Note the use of `!=` which checks for null or undefined.8362var lastChildren = lastContent != null ? null : lastProps.children;8363var nextChildren = nextContent != null ? null : nextProps.children;83648365// If we're switching from children to content/html or vice versa, remove8366// the old content8367var lastHasContentOrHtml = lastContent != null || lastHtml != null;8368var nextHasContentOrHtml = nextContent != null || nextHtml != null;8369if (lastChildren != null && nextChildren == null) {8370this.updateChildren(null, transaction, context);8371} else if (lastHasContentOrHtml && !nextHasContentOrHtml) {8372this.updateTextContent('');8373}83748375if (nextContent != null) {8376if (lastContent !== nextContent) {8377this.updateTextContent('' + nextContent);8378}8379} else if (nextHtml != null) {8380if (lastHtml !== nextHtml) {8381BackendIDOperations.updateInnerHTMLByID(8382this._rootNodeID,8383nextHtml8384);8385}8386} else if (nextChildren != null) {8387this.updateChildren(nextChildren, transaction, context);8388}8389},83908391/**8392* Destroys all event registrations for this instance. Does not remove from8393* the DOM. That must be done by the parent.8394*8395* @internal8396*/8397unmountComponent: function() {8398this.unmountChildren();8399ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);8400ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);8401this._rootNodeID = null;8402}84038404};84058406ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', {8407mountComponent: 'mountComponent',8408updateComponent: 'updateComponent'8409});84108411assign(8412ReactDOMComponent.prototype,8413ReactDOMComponent.Mixin,8414ReactMultiChild.Mixin8415);84168417ReactDOMComponent.injection = {8418injectIDOperations: function(IDOperations) {8419ReactDOMComponent.BackendIDOperations = BackendIDOperations = IDOperations;8420}8421};84228423module.exports = ReactDOMComponent;84248425},{"11":11,"12":12,"131":131,"150":150,"151":151,"157":157,"171":171,"29":29,"33":33,"40":40,"6":6,"77":77,"78":78,"82":82}],49:[function(_dereq_,module,exports){8426/**8427* Copyright 2013-2015, Facebook, Inc.8428* All rights reserved.8429*8430* This source code is licensed under the BSD-style license found in the8431* LICENSE file in the root directory of this source tree. An additional grant8432* of patent rights can be found in the PATENTS file in the same directory.8433*8434* @providesModule ReactDOMForm8435*/84368437'use strict';84388439var EventConstants = _dereq_(16);8440var LocalEventTrapMixin = _dereq_(27);8441var ReactBrowserComponentMixin = _dereq_(32);8442var ReactClass = _dereq_(38);8443var ReactElement = _dereq_(63);84448445var form = ReactElement.createFactory('form');84468447/**8448* Since onSubmit doesn't bubble OR capture on the top level in IE8, we need8449* to capture it on the <form> element itself. There are lots of hacks we could8450* do to accomplish this, but the most reliable is to make <form> a8451* composite component and use `componentDidMount` to attach the event handlers.8452*/8453var ReactDOMForm = ReactClass.createClass({8454displayName: 'ReactDOMForm',8455tagName: 'FORM',84568457mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin],84588459render: function() {8460// TODO: Instead of using `ReactDOM` directly, we should use JSX. However,8461// `jshint` fails to parse JSX so in order for linting to work in the open8462// source repo, we need to just use `ReactDOM.form`.8463return form(this.props);8464},84658466componentDidMount: function() {8467this.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset');8468this.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit');8469}8470});84718472module.exports = ReactDOMForm;84738474},{"16":16,"27":27,"32":32,"38":38,"63":63}],50:[function(_dereq_,module,exports){8475/**8476* Copyright 2013-2015, Facebook, Inc.8477* All rights reserved.8478*8479* This source code is licensed under the BSD-style license found in the8480* LICENSE file in the root directory of this source tree. An additional grant8481* of patent rights can be found in the PATENTS file in the same directory.8482*8483* @providesModule ReactDOMIDOperations8484* @typechecks static-only8485*/84868487/*jslint evil: true */84888489'use strict';84908491var CSSPropertyOperations = _dereq_(6);8492var DOMChildrenOperations = _dereq_(10);8493var DOMPropertyOperations = _dereq_(12);8494var ReactMount = _dereq_(77);8495var ReactPerf = _dereq_(82);84968497var invariant = _dereq_(150);8498var setInnerHTML = _dereq_(164);84998500/**8501* Errors for properties that should not be updated with `updatePropertyById()`.8502*8503* @type {object}8504* @private8505*/8506var INVALID_PROPERTY_ERRORS = {8507dangerouslySetInnerHTML:8508'`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.',8509style: '`style` must be set using `updateStylesByID()`.'8510};85118512/**8513* Operations used to process updates to DOM nodes. This is made injectable via8514* `ReactDOMComponent.BackendIDOperations`.8515*/8516var ReactDOMIDOperations = {85178518/**8519* Updates a DOM node with new property values. This should only be used to8520* update DOM properties in `DOMProperty`.8521*8522* @param {string} id ID of the node to update.8523* @param {string} name A valid property name, see `DOMProperty`.8524* @param {*} value New value of the property.8525* @internal8526*/8527updatePropertyByID: function(id, name, value) {8528var node = ReactMount.getNode(id);8529("production" !== "development" ? invariant(8530!INVALID_PROPERTY_ERRORS.hasOwnProperty(name),8531'updatePropertyByID(...): %s',8532INVALID_PROPERTY_ERRORS[name]8533) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)));85348535// If we're updating to null or undefined, we should remove the property8536// from the DOM node instead of inadvertantly setting to a string. This8537// brings us in line with the same behavior we have on initial render.8538if (value != null) {8539DOMPropertyOperations.setValueForProperty(node, name, value);8540} else {8541DOMPropertyOperations.deleteValueForProperty(node, name);8542}8543},85448545/**8546* Updates a DOM node to remove a property. This should only be used to remove8547* DOM properties in `DOMProperty`.8548*8549* @param {string} id ID of the node to update.8550* @param {string} name A property name to remove, see `DOMProperty`.8551* @internal8552*/8553deletePropertyByID: function(id, name, value) {8554var node = ReactMount.getNode(id);8555("production" !== "development" ? invariant(8556!INVALID_PROPERTY_ERRORS.hasOwnProperty(name),8557'updatePropertyByID(...): %s',8558INVALID_PROPERTY_ERRORS[name]8559) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)));8560DOMPropertyOperations.deleteValueForProperty(node, name, value);8561},85628563/**8564* Updates a DOM node with new style values. If a value is specified as '',8565* the corresponding style property will be unset.8566*8567* @param {string} id ID of the node to update.8568* @param {object} styles Mapping from styles to values.8569* @internal8570*/8571updateStylesByID: function(id, styles) {8572var node = ReactMount.getNode(id);8573CSSPropertyOperations.setValueForStyles(node, styles);8574},85758576/**8577* Updates a DOM node's innerHTML.8578*8579* @param {string} id ID of the node to update.8580* @param {string} html An HTML string.8581* @internal8582*/8583updateInnerHTMLByID: function(id, html) {8584var node = ReactMount.getNode(id);8585setInnerHTML(node, html);8586},85878588/**8589* Updates a DOM node's text content set by `props.content`.8590*8591* @param {string} id ID of the node to update.8592* @param {string} content Text content.8593* @internal8594*/8595updateTextContentByID: function(id, content) {8596var node = ReactMount.getNode(id);8597DOMChildrenOperations.updateTextContent(node, content);8598},85998600/**8601* Replaces a DOM node that exists in the document with markup.8602*8603* @param {string} id ID of child to be replaced.8604* @param {string} markup Dangerous markup to inject in place of child.8605* @internal8606* @see {Danger.dangerouslyReplaceNodeWithMarkup}8607*/8608dangerouslyReplaceNodeWithMarkupByID: function(id, markup) {8609var node = ReactMount.getNode(id);8610DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);8611},86128613/**8614* Updates a component's children by processing a series of updates.8615*8616* @param {array<object>} updates List of update configurations.8617* @param {array<string>} markup List of markup strings.8618* @internal8619*/8620dangerouslyProcessChildrenUpdates: function(updates, markup) {8621for (var i = 0; i < updates.length; i++) {8622updates[i].parentNode = ReactMount.getNode(updates[i].parentID);8623}8624DOMChildrenOperations.processUpdates(updates, markup);8625}8626};86278628ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', {8629updatePropertyByID: 'updatePropertyByID',8630deletePropertyByID: 'deletePropertyByID',8631updateStylesByID: 'updateStylesByID',8632updateInnerHTMLByID: 'updateInnerHTMLByID',8633updateTextContentByID: 'updateTextContentByID',8634dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID',8635dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates'8636});86378638module.exports = ReactDOMIDOperations;86398640},{"10":10,"12":12,"150":150,"164":164,"6":6,"77":77,"82":82}],51:[function(_dereq_,module,exports){8641/**8642* Copyright 2013-2015, Facebook, Inc.8643* All rights reserved.8644*8645* This source code is licensed under the BSD-style license found in the8646* LICENSE file in the root directory of this source tree. An additional grant8647* of patent rights can be found in the PATENTS file in the same directory.8648*8649* @providesModule ReactDOMIframe8650*/86518652'use strict';86538654var EventConstants = _dereq_(16);8655var LocalEventTrapMixin = _dereq_(27);8656var ReactBrowserComponentMixin = _dereq_(32);8657var ReactClass = _dereq_(38);8658var ReactElement = _dereq_(63);86598660var iframe = ReactElement.createFactory('iframe');86618662/**8663* Since onLoad doesn't bubble OR capture on the top level in IE8, we need to8664* capture it on the <iframe> element itself. There are lots of hacks we could8665* do to accomplish this, but the most reliable is to make <iframe> a composite8666* component and use `componentDidMount` to attach the event handlers.8667*/8668var ReactDOMIframe = ReactClass.createClass({8669displayName: 'ReactDOMIframe',8670tagName: 'IFRAME',86718672mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin],86738674render: function() {8675return iframe(this.props);8676},86778678componentDidMount: function() {8679this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load');8680}8681});86828683module.exports = ReactDOMIframe;86848685},{"16":16,"27":27,"32":32,"38":38,"63":63}],52:[function(_dereq_,module,exports){8686/**8687* Copyright 2013-2015, Facebook, Inc.8688* All rights reserved.8689*8690* This source code is licensed under the BSD-style license found in the8691* LICENSE file in the root directory of this source tree. An additional grant8692* of patent rights can be found in the PATENTS file in the same directory.8693*8694* @providesModule ReactDOMImg8695*/86968697'use strict';86988699var EventConstants = _dereq_(16);8700var LocalEventTrapMixin = _dereq_(27);8701var ReactBrowserComponentMixin = _dereq_(32);8702var ReactClass = _dereq_(38);8703var ReactElement = _dereq_(63);87048705var img = ReactElement.createFactory('img');87068707/**8708* Since onLoad doesn't bubble OR capture on the top level in IE8, we need to8709* capture it on the <img> element itself. There are lots of hacks we could do8710* to accomplish this, but the most reliable is to make <img> a composite8711* component and use `componentDidMount` to attach the event handlers.8712*/8713var ReactDOMImg = ReactClass.createClass({8714displayName: 'ReactDOMImg',8715tagName: 'IMG',87168717mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin],87188719render: function() {8720return img(this.props);8721},87228723componentDidMount: function() {8724this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load');8725this.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error');8726}8727});87288729module.exports = ReactDOMImg;87308731},{"16":16,"27":27,"32":32,"38":38,"63":63}],53:[function(_dereq_,module,exports){8732/**8733* Copyright 2013-2015, Facebook, Inc.8734* All rights reserved.8735*8736* This source code is licensed under the BSD-style license found in the8737* LICENSE file in the root directory of this source tree. An additional grant8738* of patent rights can be found in the PATENTS file in the same directory.8739*8740* @providesModule ReactDOMInput8741*/87428743'use strict';87448745var AutoFocusMixin = _dereq_(2);8746var DOMPropertyOperations = _dereq_(12);8747var LinkedValueUtils = _dereq_(26);8748var ReactBrowserComponentMixin = _dereq_(32);8749var ReactClass = _dereq_(38);8750var ReactElement = _dereq_(63);8751var ReactMount = _dereq_(77);8752var ReactUpdates = _dereq_(100);87538754var assign = _dereq_(29);8755var invariant = _dereq_(150);87568757var input = ReactElement.createFactory('input');87588759var instancesByReactID = {};87608761function forceUpdateIfMounted() {8762/*jshint validthis:true */8763if (this.isMounted()) {8764this.forceUpdate();8765}8766}87678768/**8769* Implements an <input> native component that allows setting these optional8770* props: `checked`, `value`, `defaultChecked`, and `defaultValue`.8771*8772* If `checked` or `value` are not supplied (or null/undefined), user actions8773* that affect the checked state or value will trigger updates to the element.8774*8775* If they are supplied (and not null/undefined), the rendered element will not8776* trigger updates to the element. Instead, the props must change in order for8777* the rendered element to be updated.8778*8779* The rendered element will be initialized as unchecked (or `defaultChecked`)8780* with an empty value (or `defaultValue`).8781*8782* @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html8783*/8784var ReactDOMInput = ReactClass.createClass({8785displayName: 'ReactDOMInput',8786tagName: 'INPUT',87878788mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin],87898790getInitialState: function() {8791var defaultValue = this.props.defaultValue;8792return {8793initialChecked: this.props.defaultChecked || false,8794initialValue: defaultValue != null ? defaultValue : null8795};8796},87978798render: function() {8799// Clone `this.props` so we don't mutate the input.8800var props = assign({}, this.props);88018802props.defaultChecked = null;8803props.defaultValue = null;88048805var value = LinkedValueUtils.getValue(this);8806props.value = value != null ? value : this.state.initialValue;88078808var checked = LinkedValueUtils.getChecked(this);8809props.checked = checked != null ? checked : this.state.initialChecked;88108811props.onChange = this._handleChange;88128813return input(props, this.props.children);8814},88158816componentDidMount: function() {8817var id = ReactMount.getID(this.getDOMNode());8818instancesByReactID[id] = this;8819},88208821componentWillUnmount: function() {8822var rootNode = this.getDOMNode();8823var id = ReactMount.getID(rootNode);8824delete instancesByReactID[id];8825},88268827componentDidUpdate: function(prevProps, prevState, prevContext) {8828var rootNode = this.getDOMNode();8829if (this.props.checked != null) {8830DOMPropertyOperations.setValueForProperty(8831rootNode,8832'checked',8833this.props.checked || false8834);8835}88368837var value = LinkedValueUtils.getValue(this);8838if (value != null) {8839// Cast `value` to a string to ensure the value is set correctly. While8840// browsers typically do this as necessary, jsdom doesn't.8841DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value);8842}8843},88448845_handleChange: function(event) {8846var returnValue;8847var onChange = LinkedValueUtils.getOnChange(this);8848if (onChange) {8849returnValue = onChange.call(this, event);8850}8851// Here we use asap to wait until all updates have propagated, which8852// is important when using controlled components within layers:8853// https://github.com/facebook/react/issues/16988854ReactUpdates.asap(forceUpdateIfMounted, this);88558856var name = this.props.name;8857if (this.props.type === 'radio' && name != null) {8858var rootNode = this.getDOMNode();8859var queryRoot = rootNode;88608861while (queryRoot.parentNode) {8862queryRoot = queryRoot.parentNode;8863}88648865// If `rootNode.form` was non-null, then we could try `form.elements`,8866// but that sometimes behaves strangely in IE8. We could also try using8867// `form.getElementsByName`, but that will only return direct children8868// and won't include inputs that use the HTML5 `form=` attribute. Since8869// the input might not even be in a form, let's just use the global8870// `querySelectorAll` to ensure we don't miss anything.8871var group = queryRoot.querySelectorAll(8872'input[name=' + JSON.stringify('' + name) + '][type="radio"]');88738874for (var i = 0, groupLen = group.length; i < groupLen; i++) {8875var otherNode = group[i];8876if (otherNode === rootNode ||8877otherNode.form !== rootNode.form) {8878continue;8879}8880var otherID = ReactMount.getID(otherNode);8881("production" !== "development" ? invariant(8882otherID,8883'ReactDOMInput: Mixing React and non-React radio inputs with the ' +8884'same `name` is not supported.'8885) : invariant(otherID));8886var otherInstance = instancesByReactID[otherID];8887("production" !== "development" ? invariant(8888otherInstance,8889'ReactDOMInput: Unknown radio button ID %s.',8890otherID8891) : invariant(otherInstance));8892// If this is a controlled radio button group, forcing the input that8893// was previously checked to update will cause it to be come re-checked8894// as appropriate.8895ReactUpdates.asap(forceUpdateIfMounted, otherInstance);8896}8897}88988899return returnValue;8900}89018902});89038904module.exports = ReactDOMInput;89058906},{"100":100,"12":12,"150":150,"2":2,"26":26,"29":29,"32":32,"38":38,"63":63,"77":77}],54:[function(_dereq_,module,exports){8907/**8908* Copyright 2013-2015, Facebook, Inc.8909* All rights reserved.8910*8911* This source code is licensed under the BSD-style license found in the8912* LICENSE file in the root directory of this source tree. An additional grant8913* of patent rights can be found in the PATENTS file in the same directory.8914*8915* @providesModule ReactDOMOption8916*/89178918'use strict';89198920var ReactBrowserComponentMixin = _dereq_(32);8921var ReactClass = _dereq_(38);8922var ReactElement = _dereq_(63);89238924var warning = _dereq_(171);89258926var option = ReactElement.createFactory('option');89278928/**8929* Implements an <option> native component that warns when `selected` is set.8930*/8931var ReactDOMOption = ReactClass.createClass({8932displayName: 'ReactDOMOption',8933tagName: 'OPTION',89348935mixins: [ReactBrowserComponentMixin],89368937componentWillMount: function() {8938// TODO (yungsters): Remove support for `selected` in <option>.8939if ("production" !== "development") {8940("production" !== "development" ? warning(8941this.props.selected == null,8942'Use the `defaultValue` or `value` props on <select> instead of ' +8943'setting `selected` on <option>.'8944) : null);8945}8946},89478948render: function() {8949return option(this.props, this.props.children);8950}89518952});89538954module.exports = ReactDOMOption;89558956},{"171":171,"32":32,"38":38,"63":63}],55:[function(_dereq_,module,exports){8957/**8958* Copyright 2013-2015, Facebook, Inc.8959* All rights reserved.8960*8961* This source code is licensed under the BSD-style license found in the8962* LICENSE file in the root directory of this source tree. An additional grant8963* of patent rights can be found in the PATENTS file in the same directory.8964*8965* @providesModule ReactDOMSelect8966*/89678968'use strict';89698970var AutoFocusMixin = _dereq_(2);8971var LinkedValueUtils = _dereq_(26);8972var ReactBrowserComponentMixin = _dereq_(32);8973var ReactClass = _dereq_(38);8974var ReactElement = _dereq_(63);8975var ReactUpdates = _dereq_(100);89768977var assign = _dereq_(29);89788979var select = ReactElement.createFactory('select');89808981function updateOptionsIfPendingUpdateAndMounted() {8982/*jshint validthis:true */8983if (this._pendingUpdate) {8984this._pendingUpdate = false;8985var value = LinkedValueUtils.getValue(this);8986if (value != null && this.isMounted()) {8987updateOptions(this, value);8988}8989}8990}89918992/**8993* Validation function for `value` and `defaultValue`.8994* @private8995*/8996function selectValueType(props, propName, componentName) {8997if (props[propName] == null) {8998return null;8999}9000if (props.multiple) {9001if (!Array.isArray(props[propName])) {9002return new Error(9003("The `" + propName + "` prop supplied to <select> must be an array if ") +9004("`multiple` is true.")9005);9006}9007} else {9008if (Array.isArray(props[propName])) {9009return new Error(9010("The `" + propName + "` prop supplied to <select> must be a scalar ") +9011("value if `multiple` is false.")9012);9013}9014}9015}90169017/**9018* @param {ReactComponent} component Instance of ReactDOMSelect9019* @param {*} propValue A stringable (with `multiple`, a list of stringables).9020* @private9021*/9022function updateOptions(component, propValue) {9023var selectedValue, i, l;9024var options = component.getDOMNode().options;90259026if (component.props.multiple) {9027selectedValue = {};9028for (i = 0, l = propValue.length; i < l; i++) {9029selectedValue['' + propValue[i]] = true;9030}9031for (i = 0, l = options.length; i < l; i++) {9032var selected = selectedValue.hasOwnProperty(options[i].value);9033if (options[i].selected !== selected) {9034options[i].selected = selected;9035}9036}9037} else {9038// Do not set `select.value` as exact behavior isn't consistent across all9039// browsers for all cases.9040selectedValue = '' + propValue;9041for (i = 0, l = options.length; i < l; i++) {9042if (options[i].value === selectedValue) {9043options[i].selected = true;9044return;9045}9046}9047if (options.length) {9048options[0].selected = true;9049}9050}9051}90529053/**9054* Implements a <select> native component that allows optionally setting the9055* props `value` and `defaultValue`. If `multiple` is false, the prop must be a9056* stringable. If `multiple` is true, the prop must be an array of stringables.9057*9058* If `value` is not supplied (or null/undefined), user actions that change the9059* selected option will trigger updates to the rendered options.9060*9061* If it is supplied (and not null/undefined), the rendered options will not9062* update in response to user actions. Instead, the `value` prop must change in9063* order for the rendered options to update.9064*9065* If `defaultValue` is provided, any options with the supplied values will be9066* selected.9067*/9068var ReactDOMSelect = ReactClass.createClass({9069displayName: 'ReactDOMSelect',9070tagName: 'SELECT',90719072mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin],90739074propTypes: {9075defaultValue: selectValueType,9076value: selectValueType9077},90789079render: function() {9080// Clone `this.props` so we don't mutate the input.9081var props = assign({}, this.props);90829083props.onChange = this._handleChange;9084props.value = null;90859086return select(props, this.props.children);9087},90889089componentWillMount: function() {9090this._pendingUpdate = false;9091},90929093componentDidMount: function() {9094var value = LinkedValueUtils.getValue(this);9095if (value != null) {9096updateOptions(this, value);9097} else if (this.props.defaultValue != null) {9098updateOptions(this, this.props.defaultValue);9099}9100},91019102componentDidUpdate: function(prevProps) {9103var value = LinkedValueUtils.getValue(this);9104if (value != null) {9105this._pendingUpdate = false;9106updateOptions(this, value);9107} else if (!prevProps.multiple !== !this.props.multiple) {9108// For simplicity, reapply `defaultValue` if `multiple` is toggled.9109if (this.props.defaultValue != null) {9110updateOptions(this, this.props.defaultValue);9111} else {9112// Revert the select back to its default unselected state.9113updateOptions(this, this.props.multiple ? [] : '');9114}9115}9116},91179118_handleChange: function(event) {9119var returnValue;9120var onChange = LinkedValueUtils.getOnChange(this);9121if (onChange) {9122returnValue = onChange.call(this, event);9123}91249125this._pendingUpdate = true;9126ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);9127return returnValue;9128}91299130});91319132module.exports = ReactDOMSelect;91339134},{"100":100,"2":2,"26":26,"29":29,"32":32,"38":38,"63":63}],56:[function(_dereq_,module,exports){9135/**9136* Copyright 2013-2015, Facebook, Inc.9137* All rights reserved.9138*9139* This source code is licensed under the BSD-style license found in the9140* LICENSE file in the root directory of this source tree. An additional grant9141* of patent rights can be found in the PATENTS file in the same directory.9142*9143* @providesModule ReactDOMSelection9144*/91459146'use strict';91479148var ExecutionEnvironment = _dereq_(22);91499150var getNodeForCharacterOffset = _dereq_(143);9151var getTextContentAccessor = _dereq_(145);91529153/**9154* While `isCollapsed` is available on the Selection object and `collapsed`9155* is available on the Range object, IE11 sometimes gets them wrong.9156* If the anchor/focus nodes and offsets are the same, the range is collapsed.9157*/9158function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {9159return anchorNode === focusNode && anchorOffset === focusOffset;9160}91619162/**9163* Get the appropriate anchor and focus node/offset pairs for IE.9164*9165* The catch here is that IE's selection API doesn't provide information9166* about whether the selection is forward or backward, so we have to9167* behave as though it's always forward.9168*9169* IE text differs from modern selection in that it behaves as though9170* block elements end with a new line. This means character offsets will9171* differ between the two APIs.9172*9173* @param {DOMElement} node9174* @return {object}9175*/9176function getIEOffsets(node) {9177var selection = document.selection;9178var selectedRange = selection.createRange();9179var selectedLength = selectedRange.text.length;91809181// Duplicate selection so we can move range without breaking user selection.9182var fromStart = selectedRange.duplicate();9183fromStart.moveToElementText(node);9184fromStart.setEndPoint('EndToStart', selectedRange);91859186var startOffset = fromStart.text.length;9187var endOffset = startOffset + selectedLength;91889189return {9190start: startOffset,9191end: endOffset9192};9193}91949195/**9196* @param {DOMElement} node9197* @return {?object}9198*/9199function getModernOffsets(node) {9200var selection = window.getSelection && window.getSelection();92019202if (!selection || selection.rangeCount === 0) {9203return null;9204}92059206var anchorNode = selection.anchorNode;9207var anchorOffset = selection.anchorOffset;9208var focusNode = selection.focusNode;9209var focusOffset = selection.focusOffset;92109211var currentRange = selection.getRangeAt(0);92129213// If the node and offset values are the same, the selection is collapsed.9214// `Selection.isCollapsed` is available natively, but IE sometimes gets9215// this value wrong.9216var isSelectionCollapsed = isCollapsed(9217selection.anchorNode,9218selection.anchorOffset,9219selection.focusNode,9220selection.focusOffset9221);92229223var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;92249225var tempRange = currentRange.cloneRange();9226tempRange.selectNodeContents(node);9227tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);92289229var isTempRangeCollapsed = isCollapsed(9230tempRange.startContainer,9231tempRange.startOffset,9232tempRange.endContainer,9233tempRange.endOffset9234);92359236var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;9237var end = start + rangeLength;92389239// Detect whether the selection is backward.9240var detectionRange = document.createRange();9241detectionRange.setStart(anchorNode, anchorOffset);9242detectionRange.setEnd(focusNode, focusOffset);9243var isBackward = detectionRange.collapsed;92449245return {9246start: isBackward ? end : start,9247end: isBackward ? start : end9248};9249}92509251/**9252* @param {DOMElement|DOMTextNode} node9253* @param {object} offsets9254*/9255function setIEOffsets(node, offsets) {9256var range = document.selection.createRange().duplicate();9257var start, end;92589259if (typeof offsets.end === 'undefined') {9260start = offsets.start;9261end = start;9262} else if (offsets.start > offsets.end) {9263start = offsets.end;9264end = offsets.start;9265} else {9266start = offsets.start;9267end = offsets.end;9268}92699270range.moveToElementText(node);9271range.moveStart('character', start);9272range.setEndPoint('EndToStart', range);9273range.moveEnd('character', end - start);9274range.select();9275}92769277/**9278* In modern non-IE browsers, we can support both forward and backward9279* selections.9280*9281* Note: IE10+ supports the Selection object, but it does not support9282* the `extend` method, which means that even in modern IE, it's not possible9283* to programatically create a backward selection. Thus, for all IE9284* versions, we use the old IE API to create our selections.9285*9286* @param {DOMElement|DOMTextNode} node9287* @param {object} offsets9288*/9289function setModernOffsets(node, offsets) {9290if (!window.getSelection) {9291return;9292}92939294var selection = window.getSelection();9295var length = node[getTextContentAccessor()].length;9296var start = Math.min(offsets.start, length);9297var end = typeof offsets.end === 'undefined' ?9298start : Math.min(offsets.end, length);92999300// IE 11 uses modern selection, but doesn't support the extend method.9301// Flip backward selections, so we can set with a single range.9302if (!selection.extend && start > end) {9303var temp = end;9304end = start;9305start = temp;9306}93079308var startMarker = getNodeForCharacterOffset(node, start);9309var endMarker = getNodeForCharacterOffset(node, end);93109311if (startMarker && endMarker) {9312var range = document.createRange();9313range.setStart(startMarker.node, startMarker.offset);9314selection.removeAllRanges();93159316if (start > end) {9317selection.addRange(range);9318selection.extend(endMarker.node, endMarker.offset);9319} else {9320range.setEnd(endMarker.node, endMarker.offset);9321selection.addRange(range);9322}9323}9324}93259326var useIEOffsets = (9327ExecutionEnvironment.canUseDOM &&9328'selection' in document &&9329!('getSelection' in window)9330);93319332var ReactDOMSelection = {9333/**9334* @param {DOMElement} node9335*/9336getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,93379338/**9339* @param {DOMElement|DOMTextNode} node9340* @param {object} offsets9341*/9342setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets9343};93449345module.exports = ReactDOMSelection;93469347},{"143":143,"145":145,"22":22}],57:[function(_dereq_,module,exports){9348/**9349* Copyright 2013-2015, Facebook, Inc.9350* All rights reserved.9351*9352* This source code is licensed under the BSD-style license found in the9353* LICENSE file in the root directory of this source tree. An additional grant9354* of patent rights can be found in the PATENTS file in the same directory.9355*9356* @providesModule ReactDOMTextComponent9357* @typechecks static-only9358*/93599360'use strict';93619362var DOMPropertyOperations = _dereq_(12);9363var ReactComponentBrowserEnvironment =9364_dereq_(40);9365var ReactDOMComponent = _dereq_(48);93669367var assign = _dereq_(29);9368var escapeTextContentForBrowser = _dereq_(131);93699370/**9371* Text nodes violate a couple assumptions that React makes about components:9372*9373* - When mounting text into the DOM, adjacent text nodes are merged.9374* - Text nodes cannot be assigned a React root ID.9375*9376* This component is used to wrap strings in elements so that they can undergo9377* the same reconciliation that is applied to elements.9378*9379* TODO: Investigate representing React components in the DOM with text nodes.9380*9381* @class ReactDOMTextComponent9382* @extends ReactComponent9383* @internal9384*/9385var ReactDOMTextComponent = function(props) {9386// This constructor and its argument is currently used by mocks.9387};93889389assign(ReactDOMTextComponent.prototype, {93909391/**9392* @param {ReactText} text9393* @internal9394*/9395construct: function(text) {9396// TODO: This is really a ReactText (ReactNode), not a ReactElement9397this._currentElement = text;9398this._stringText = '' + text;93999400// Properties9401this._rootNodeID = null;9402this._mountIndex = 0;9403},94049405/**9406* Creates the markup for this text node. This node is not intended to have9407* any features besides containing text content.9408*9409* @param {string} rootID DOM ID of the root node.9410* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction9411* @return {string} Markup for this text node.9412* @internal9413*/9414mountComponent: function(rootID, transaction, context) {9415this._rootNodeID = rootID;9416var escapedText = escapeTextContentForBrowser(this._stringText);94179418if (transaction.renderToStaticMarkup) {9419// Normally we'd wrap this in a `span` for the reasons stated above, but9420// since this is a situation where React won't take over (static pages),9421// we can simply return the text as it is.9422return escapedText;9423}94249425return (9426'<span ' + DOMPropertyOperations.createMarkupForID(rootID) + '>' +9427escapedText +9428'</span>'9429);9430},94319432/**9433* Updates this component by updating the text content.9434*9435* @param {ReactText} nextText The next text content9436* @param {ReactReconcileTransaction} transaction9437* @internal9438*/9439receiveComponent: function(nextText, transaction) {9440if (nextText !== this._currentElement) {9441this._currentElement = nextText;9442var nextStringText = '' + nextText;9443if (nextStringText !== this._stringText) {9444// TODO: Save this as pending props and use performUpdateIfNecessary9445// and/or updateComponent to do the actual update for consistency with9446// other component types?9447this._stringText = nextStringText;9448ReactDOMComponent.BackendIDOperations.updateTextContentByID(9449this._rootNodeID,9450nextStringText9451);9452}9453}9454},94559456unmountComponent: function() {9457ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);9458}94599460});94619462module.exports = ReactDOMTextComponent;94639464},{"12":12,"131":131,"29":29,"40":40,"48":48}],58:[function(_dereq_,module,exports){9465/**9466* Copyright 2013-2015, Facebook, Inc.9467* All rights reserved.9468*9469* This source code is licensed under the BSD-style license found in the9470* LICENSE file in the root directory of this source tree. An additional grant9471* of patent rights can be found in the PATENTS file in the same directory.9472*9473* @providesModule ReactDOMTextarea9474*/94759476'use strict';94779478var AutoFocusMixin = _dereq_(2);9479var DOMPropertyOperations = _dereq_(12);9480var LinkedValueUtils = _dereq_(26);9481var ReactBrowserComponentMixin = _dereq_(32);9482var ReactClass = _dereq_(38);9483var ReactElement = _dereq_(63);9484var ReactUpdates = _dereq_(100);94859486var assign = _dereq_(29);9487var invariant = _dereq_(150);94889489var warning = _dereq_(171);94909491var textarea = ReactElement.createFactory('textarea');94929493function forceUpdateIfMounted() {9494/*jshint validthis:true */9495if (this.isMounted()) {9496this.forceUpdate();9497}9498}94999500/**9501* Implements a <textarea> native component that allows setting `value`, and9502* `defaultValue`. This differs from the traditional DOM API because value is9503* usually set as PCDATA children.9504*9505* If `value` is not supplied (or null/undefined), user actions that affect the9506* value will trigger updates to the element.9507*9508* If `value` is supplied (and not null/undefined), the rendered element will9509* not trigger updates to the element. Instead, the `value` prop must change in9510* order for the rendered element to be updated.9511*9512* The rendered element will be initialized with an empty value, the prop9513* `defaultValue` if specified, or the children content (deprecated).9514*/9515var ReactDOMTextarea = ReactClass.createClass({9516displayName: 'ReactDOMTextarea',9517tagName: 'TEXTAREA',95189519mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin],95209521getInitialState: function() {9522var defaultValue = this.props.defaultValue;9523// TODO (yungsters): Remove support for children content in <textarea>.9524var children = this.props.children;9525if (children != null) {9526if ("production" !== "development") {9527("production" !== "development" ? warning(9528false,9529'Use the `defaultValue` or `value` props instead of setting ' +9530'children on <textarea>.'9531) : null);9532}9533("production" !== "development" ? invariant(9534defaultValue == null,9535'If you supply `defaultValue` on a <textarea>, do not pass children.'9536) : invariant(defaultValue == null));9537if (Array.isArray(children)) {9538("production" !== "development" ? invariant(9539children.length <= 1,9540'<textarea> can only have at most one child.'9541) : invariant(children.length <= 1));9542children = children[0];9543}95449545defaultValue = '' + children;9546}9547if (defaultValue == null) {9548defaultValue = '';9549}9550var value = LinkedValueUtils.getValue(this);9551return {9552// We save the initial value so that `ReactDOMComponent` doesn't update9553// `textContent` (unnecessary since we update value).9554// The initial value can be a boolean or object so that's why it's9555// forced to be a string.9556initialValue: '' + (value != null ? value : defaultValue)9557};9558},95599560render: function() {9561// Clone `this.props` so we don't mutate the input.9562var props = assign({}, this.props);95639564("production" !== "development" ? invariant(9565props.dangerouslySetInnerHTML == null,9566'`dangerouslySetInnerHTML` does not make sense on <textarea>.'9567) : invariant(props.dangerouslySetInnerHTML == null));95689569props.defaultValue = null;9570props.value = null;9571props.onChange = this._handleChange;95729573// Always set children to the same thing. In IE9, the selection range will9574// get reset if `textContent` is mutated.9575return textarea(props, this.state.initialValue);9576},95779578componentDidUpdate: function(prevProps, prevState, prevContext) {9579var value = LinkedValueUtils.getValue(this);9580if (value != null) {9581var rootNode = this.getDOMNode();9582// Cast `value` to a string to ensure the value is set correctly. While9583// browsers typically do this as necessary, jsdom doesn't.9584DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value);9585}9586},95879588_handleChange: function(event) {9589var returnValue;9590var onChange = LinkedValueUtils.getOnChange(this);9591if (onChange) {9592returnValue = onChange.call(this, event);9593}9594ReactUpdates.asap(forceUpdateIfMounted, this);9595return returnValue;9596}95979598});95999600module.exports = ReactDOMTextarea;96019602},{"100":100,"12":12,"150":150,"171":171,"2":2,"26":26,"29":29,"32":32,"38":38,"63":63}],59:[function(_dereq_,module,exports){9603/**9604* Copyright 2013-2015, Facebook, Inc.9605* All rights reserved.9606*9607* This source code is licensed under the BSD-style license found in the9608* LICENSE file in the root directory of this source tree. An additional grant9609* of patent rights can be found in the PATENTS file in the same directory.9610*9611* @providesModule ReactDefaultBatchingStrategy9612*/96139614'use strict';96159616var ReactUpdates = _dereq_(100);9617var Transaction = _dereq_(116);96189619var assign = _dereq_(29);9620var emptyFunction = _dereq_(129);96219622var RESET_BATCHED_UPDATES = {9623initialize: emptyFunction,9624close: function() {9625ReactDefaultBatchingStrategy.isBatchingUpdates = false;9626}9627};96289629var FLUSH_BATCHED_UPDATES = {9630initialize: emptyFunction,9631close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)9632};96339634var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];96359636function ReactDefaultBatchingStrategyTransaction() {9637this.reinitializeTransaction();9638}96399640assign(9641ReactDefaultBatchingStrategyTransaction.prototype,9642Transaction.Mixin,9643{9644getTransactionWrappers: function() {9645return TRANSACTION_WRAPPERS;9646}9647}9648);96499650var transaction = new ReactDefaultBatchingStrategyTransaction();96519652var ReactDefaultBatchingStrategy = {9653isBatchingUpdates: false,96549655/**9656* Call the provided function in a context within which calls to `setState`9657* and friends are batched such that components aren't updated unnecessarily.9658*/9659batchedUpdates: function(callback, a, b, c, d) {9660var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;96619662ReactDefaultBatchingStrategy.isBatchingUpdates = true;96639664// The code is written this way to avoid extra allocations9665if (alreadyBatchingUpdates) {9666callback(a, b, c, d);9667} else {9668transaction.perform(callback, null, a, b, c, d);9669}9670}9671};96729673module.exports = ReactDefaultBatchingStrategy;96749675},{"100":100,"116":116,"129":129,"29":29}],60:[function(_dereq_,module,exports){9676/**9677* Copyright 2013-2015, Facebook, Inc.9678* All rights reserved.9679*9680* This source code is licensed under the BSD-style license found in the9681* LICENSE file in the root directory of this source tree. An additional grant9682* of patent rights can be found in the PATENTS file in the same directory.9683*9684* @providesModule ReactDefaultInjection9685*/96869687'use strict';96889689var BeforeInputEventPlugin = _dereq_(3);9690var ChangeEventPlugin = _dereq_(8);9691var ClientReactRootIndex = _dereq_(9);9692var DefaultEventPluginOrder = _dereq_(14);9693var EnterLeaveEventPlugin = _dereq_(15);9694var ExecutionEnvironment = _dereq_(22);9695var HTMLDOMPropertyConfig = _dereq_(24);9696var MobileSafariClickEventPlugin = _dereq_(28);9697var ReactBrowserComponentMixin = _dereq_(32);9698var ReactClass = _dereq_(38);9699var ReactComponentBrowserEnvironment =9700_dereq_(40);9701var ReactDefaultBatchingStrategy = _dereq_(59);9702var ReactDOMComponent = _dereq_(48);9703var ReactDOMButton = _dereq_(47);9704var ReactDOMForm = _dereq_(49);9705var ReactDOMImg = _dereq_(52);9706var ReactDOMIDOperations = _dereq_(50);9707var ReactDOMIframe = _dereq_(51);9708var ReactDOMInput = _dereq_(53);9709var ReactDOMOption = _dereq_(54);9710var ReactDOMSelect = _dereq_(55);9711var ReactDOMTextarea = _dereq_(58);9712var ReactDOMTextComponent = _dereq_(57);9713var ReactElement = _dereq_(63);9714var ReactEventListener = _dereq_(68);9715var ReactInjection = _dereq_(70);9716var ReactInstanceHandles = _dereq_(72);9717var ReactMount = _dereq_(77);9718var ReactReconcileTransaction = _dereq_(88);9719var SelectEventPlugin = _dereq_(102);9720var ServerReactRootIndex = _dereq_(103);9721var SimpleEventPlugin = _dereq_(104);9722var SVGDOMPropertyConfig = _dereq_(101);97239724var createFullPageComponent = _dereq_(125);97259726function autoGenerateWrapperClass(type) {9727return ReactClass.createClass({9728tagName: type.toUpperCase(),9729render: function() {9730return new ReactElement(9731type,9732null,9733null,9734null,9735null,9736this.props9737);9738}9739});9740}97419742function inject() {9743ReactInjection.EventEmitter.injectReactEventListener(9744ReactEventListener9745);97469747/**9748* Inject modules for resolving DOM hierarchy and plugin ordering.9749*/9750ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);9751ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);9752ReactInjection.EventPluginHub.injectMount(ReactMount);97539754/**9755* Some important event plugins included by default (without having to require9756* them).9757*/9758ReactInjection.EventPluginHub.injectEventPluginsByName({9759SimpleEventPlugin: SimpleEventPlugin,9760EnterLeaveEventPlugin: EnterLeaveEventPlugin,9761ChangeEventPlugin: ChangeEventPlugin,9762MobileSafariClickEventPlugin: MobileSafariClickEventPlugin,9763SelectEventPlugin: SelectEventPlugin,9764BeforeInputEventPlugin: BeforeInputEventPlugin9765});97669767ReactInjection.NativeComponent.injectGenericComponentClass(9768ReactDOMComponent9769);97709771ReactInjection.NativeComponent.injectTextComponentClass(9772ReactDOMTextComponent9773);97749775ReactInjection.NativeComponent.injectAutoWrapper(9776autoGenerateWrapperClass9777);97789779// This needs to happen before createFullPageComponent() otherwise the mixin9780// won't be included.9781ReactInjection.Class.injectMixin(ReactBrowserComponentMixin);97829783ReactInjection.NativeComponent.injectComponentClasses({9784'button': ReactDOMButton,9785'form': ReactDOMForm,9786'iframe': ReactDOMIframe,9787'img': ReactDOMImg,9788'input': ReactDOMInput,9789'option': ReactDOMOption,9790'select': ReactDOMSelect,9791'textarea': ReactDOMTextarea,97929793'html': createFullPageComponent('html'),9794'head': createFullPageComponent('head'),9795'body': createFullPageComponent('body')9796});97979798ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);9799ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);98009801ReactInjection.EmptyComponent.injectEmptyComponent('noscript');98029803ReactInjection.Updates.injectReconcileTransaction(9804ReactReconcileTransaction9805);9806ReactInjection.Updates.injectBatchingStrategy(9807ReactDefaultBatchingStrategy9808);98099810ReactInjection.RootIndex.injectCreateReactRootIndex(9811ExecutionEnvironment.canUseDOM ?9812ClientReactRootIndex.createReactRootIndex :9813ServerReactRootIndex.createReactRootIndex9814);98159816ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);9817ReactInjection.DOMComponent.injectIDOperations(ReactDOMIDOperations);98189819if ("production" !== "development") {9820var url = (ExecutionEnvironment.canUseDOM && window.location.href) || '';9821if ((/[?&]react_perf\b/).test(url)) {9822var ReactDefaultPerf = _dereq_(61);9823ReactDefaultPerf.start();9824}9825}9826}98279828module.exports = {9829inject: inject9830};98319832},{"101":101,"102":102,"103":103,"104":104,"125":125,"14":14,"15":15,"22":22,"24":24,"28":28,"3":3,"32":32,"38":38,"40":40,"47":47,"48":48,"49":49,"50":50,"51":51,"52":52,"53":53,"54":54,"55":55,"57":57,"58":58,"59":59,"61":61,"63":63,"68":68,"70":70,"72":72,"77":77,"8":8,"88":88,"9":9}],61:[function(_dereq_,module,exports){9833/**9834* Copyright 2013-2015, Facebook, Inc.9835* All rights reserved.9836*9837* This source code is licensed under the BSD-style license found in the9838* LICENSE file in the root directory of this source tree. An additional grant9839* of patent rights can be found in the PATENTS file in the same directory.9840*9841* @providesModule ReactDefaultPerf9842* @typechecks static-only9843*/98449845'use strict';98469847var DOMProperty = _dereq_(11);9848var ReactDefaultPerfAnalysis = _dereq_(62);9849var ReactMount = _dereq_(77);9850var ReactPerf = _dereq_(82);98519852var performanceNow = _dereq_(162);98539854function roundFloat(val) {9855return Math.floor(val * 100) / 100;9856}98579858function addValue(obj, key, val) {9859obj[key] = (obj[key] || 0) + val;9860}98619862var ReactDefaultPerf = {9863_allMeasurements: [], // last item in the list is the current one9864_mountStack: [0],9865_injected: false,98669867start: function() {9868if (!ReactDefaultPerf._injected) {9869ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure);9870}98719872ReactDefaultPerf._allMeasurements.length = 0;9873ReactPerf.enableMeasure = true;9874},98759876stop: function() {9877ReactPerf.enableMeasure = false;9878},98799880getLastMeasurements: function() {9881return ReactDefaultPerf._allMeasurements;9882},98839884printExclusive: function(measurements) {9885measurements = measurements || ReactDefaultPerf._allMeasurements;9886var summary = ReactDefaultPerfAnalysis.getExclusiveSummary(measurements);9887console.table(summary.map(function(item) {9888return {9889'Component class name': item.componentName,9890'Total inclusive time (ms)': roundFloat(item.inclusive),9891'Exclusive mount time (ms)': roundFloat(item.exclusive),9892'Exclusive render time (ms)': roundFloat(item.render),9893'Mount time per instance (ms)': roundFloat(item.exclusive / item.count),9894'Render time per instance (ms)': roundFloat(item.render / item.count),9895'Instances': item.count9896};9897}));9898// TODO: ReactDefaultPerfAnalysis.getTotalTime() does not return the correct9899// number.9900},99019902printInclusive: function(measurements) {9903measurements = measurements || ReactDefaultPerf._allMeasurements;9904var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements);9905console.table(summary.map(function(item) {9906return {9907'Owner > component': item.componentName,9908'Inclusive time (ms)': roundFloat(item.time),9909'Instances': item.count9910};9911}));9912console.log(9913'Total time:',9914ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms'9915);9916},99179918getMeasurementsSummaryMap: function(measurements) {9919var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(9920measurements,9921true9922);9923return summary.map(function(item) {9924return {9925'Owner > component': item.componentName,9926'Wasted time (ms)': item.time,9927'Instances': item.count9928};9929});9930},99319932printWasted: function(measurements) {9933measurements = measurements || ReactDefaultPerf._allMeasurements;9934console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements));9935console.log(9936'Total time:',9937ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms'9938);9939},99409941printDOM: function(measurements) {9942measurements = measurements || ReactDefaultPerf._allMeasurements;9943var summary = ReactDefaultPerfAnalysis.getDOMSummary(measurements);9944console.table(summary.map(function(item) {9945var result = {};9946result[DOMProperty.ID_ATTRIBUTE_NAME] = item.id;9947result['type'] = item.type;9948result['args'] = JSON.stringify(item.args);9949return result;9950}));9951console.log(9952'Total time:',9953ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms'9954);9955},99569957_recordWrite: function(id, fnName, totalTime, args) {9958// TODO: totalTime isn't that useful since it doesn't count paints/reflows9959var writes =9960ReactDefaultPerf9961._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1]9962.writes;9963writes[id] = writes[id] || [];9964writes[id].push({9965type: fnName,9966time: totalTime,9967args: args9968});9969},99709971measure: function(moduleName, fnName, func) {9972return function() {for (var args=[],$__0=0,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]);9973var totalTime;9974var rv;9975var start;99769977if (fnName === '_renderNewRootComponent' ||9978fnName === 'flushBatchedUpdates') {9979// A "measurement" is a set of metrics recorded for each flush. We want9980// to group the metrics for a given flush together so we can look at the9981// components that rendered and the DOM operations that actually9982// happened to determine the amount of "wasted work" performed.9983ReactDefaultPerf._allMeasurements.push({9984exclusive: {},9985inclusive: {},9986render: {},9987counts: {},9988writes: {},9989displayNames: {},9990totalTime: 09991});9992start = performanceNow();9993rv = func.apply(this, args);9994ReactDefaultPerf._allMeasurements[9995ReactDefaultPerf._allMeasurements.length - 19996].totalTime = performanceNow() - start;9997return rv;9998} else if (fnName === '_mountImageIntoNode' ||9999moduleName === 'ReactDOMIDOperations') {10000start = performanceNow();10001rv = func.apply(this, args);10002totalTime = performanceNow() - start;1000310004if (fnName === '_mountImageIntoNode') {10005var mountID = ReactMount.getID(args[1]);10006ReactDefaultPerf._recordWrite(mountID, fnName, totalTime, args[0]);10007} else if (fnName === 'dangerouslyProcessChildrenUpdates') {10008// special format10009args[0].forEach(function(update) {10010var writeArgs = {};10011if (update.fromIndex !== null) {10012writeArgs.fromIndex = update.fromIndex;10013}10014if (update.toIndex !== null) {10015writeArgs.toIndex = update.toIndex;10016}10017if (update.textContent !== null) {10018writeArgs.textContent = update.textContent;10019}10020if (update.markupIndex !== null) {10021writeArgs.markup = args[1][update.markupIndex];10022}10023ReactDefaultPerf._recordWrite(10024update.parentID,10025update.type,10026totalTime,10027writeArgs10028);10029});10030} else {10031// basic format10032ReactDefaultPerf._recordWrite(10033args[0],10034fnName,10035totalTime,10036Array.prototype.slice.call(args, 1)10037);10038}10039return rv;10040} else if (moduleName === 'ReactCompositeComponent' && (10041(// TODO: receiveComponent()?10042(fnName === 'mountComponent' ||10043fnName === 'updateComponent' || fnName === '_renderValidatedComponent')))) {1004410045if (typeof this._currentElement.type === 'string') {10046return func.apply(this, args);10047}1004810049var rootNodeID = fnName === 'mountComponent' ?10050args[0] :10051this._rootNodeID;10052var isRender = fnName === '_renderValidatedComponent';10053var isMount = fnName === 'mountComponent';1005410055var mountStack = ReactDefaultPerf._mountStack;10056var entry = ReactDefaultPerf._allMeasurements[10057ReactDefaultPerf._allMeasurements.length - 110058];1005910060if (isRender) {10061addValue(entry.counts, rootNodeID, 1);10062} else if (isMount) {10063mountStack.push(0);10064}1006510066start = performanceNow();10067rv = func.apply(this, args);10068totalTime = performanceNow() - start;1006910070if (isRender) {10071addValue(entry.render, rootNodeID, totalTime);10072} else if (isMount) {10073var subMountTime = mountStack.pop();10074mountStack[mountStack.length - 1] += totalTime;10075addValue(entry.exclusive, rootNodeID, totalTime - subMountTime);10076addValue(entry.inclusive, rootNodeID, totalTime);10077} else {10078addValue(entry.inclusive, rootNodeID, totalTime);10079}1008010081entry.displayNames[rootNodeID] = {10082current: this.getName(),10083owner: this._currentElement._owner ?10084this._currentElement._owner.getName() :10085'<root>'10086};1008710088return rv;10089} else {10090return func.apply(this, args);10091}10092};10093}10094};1009510096module.exports = ReactDefaultPerf;1009710098},{"11":11,"162":162,"62":62,"77":77,"82":82}],62:[function(_dereq_,module,exports){10099/**10100* Copyright 2013-2015, Facebook, Inc.10101* All rights reserved.10102*10103* This source code is licensed under the BSD-style license found in the10104* LICENSE file in the root directory of this source tree. An additional grant10105* of patent rights can be found in the PATENTS file in the same directory.10106*10107* @providesModule ReactDefaultPerfAnalysis10108*/1010910110var assign = _dereq_(29);1011110112// Don't try to save users less than 1.2ms (a number I made up)10113var DONT_CARE_THRESHOLD = 1.2;10114var DOM_OPERATION_TYPES = {10115'_mountImageIntoNode': 'set innerHTML',10116INSERT_MARKUP: 'set innerHTML',10117MOVE_EXISTING: 'move',10118REMOVE_NODE: 'remove',10119TEXT_CONTENT: 'set textContent',10120'updatePropertyByID': 'update attribute',10121'deletePropertyByID': 'delete attribute',10122'updateStylesByID': 'update styles',10123'updateInnerHTMLByID': 'set innerHTML',10124'dangerouslyReplaceNodeWithMarkupByID': 'replace'10125};1012610127function getTotalTime(measurements) {10128// TODO: return number of DOM ops? could be misleading.10129// TODO: measure dropped frames after reconcile?10130// TODO: log total time of each reconcile and the top-level component10131// class that triggered it.10132var totalTime = 0;10133for (var i = 0; i < measurements.length; i++) {10134var measurement = measurements[i];10135totalTime += measurement.totalTime;10136}10137return totalTime;10138}1013910140function getDOMSummary(measurements) {10141var items = [];10142for (var i = 0; i < measurements.length; i++) {10143var measurement = measurements[i];10144var id;1014510146for (id in measurement.writes) {10147measurement.writes[id].forEach(function(write) {10148items.push({10149id: id,10150type: DOM_OPERATION_TYPES[write.type] || write.type,10151args: write.args10152});10153});10154}10155}10156return items;10157}1015810159function getExclusiveSummary(measurements) {10160var candidates = {};10161var displayName;1016210163for (var i = 0; i < measurements.length; i++) {10164var measurement = measurements[i];10165var allIDs = assign(10166{},10167measurement.exclusive,10168measurement.inclusive10169);1017010171for (var id in allIDs) {10172displayName = measurement.displayNames[id].current;1017310174candidates[displayName] = candidates[displayName] || {10175componentName: displayName,10176inclusive: 0,10177exclusive: 0,10178render: 0,10179count: 010180};10181if (measurement.render[id]) {10182candidates[displayName].render += measurement.render[id];10183}10184if (measurement.exclusive[id]) {10185candidates[displayName].exclusive += measurement.exclusive[id];10186}10187if (measurement.inclusive[id]) {10188candidates[displayName].inclusive += measurement.inclusive[id];10189}10190if (measurement.counts[id]) {10191candidates[displayName].count += measurement.counts[id];10192}10193}10194}1019510196// Now make a sorted array with the results.10197var arr = [];10198for (displayName in candidates) {10199if (candidates[displayName].exclusive >= DONT_CARE_THRESHOLD) {10200arr.push(candidates[displayName]);10201}10202}1020310204arr.sort(function(a, b) {10205return b.exclusive - a.exclusive;10206});1020710208return arr;10209}1021010211function getInclusiveSummary(measurements, onlyClean) {10212var candidates = {};10213var inclusiveKey;1021410215for (var i = 0; i < measurements.length; i++) {10216var measurement = measurements[i];10217var allIDs = assign(10218{},10219measurement.exclusive,10220measurement.inclusive10221);10222var cleanComponents;1022310224if (onlyClean) {10225cleanComponents = getUnchangedComponents(measurement);10226}1022710228for (var id in allIDs) {10229if (onlyClean && !cleanComponents[id]) {10230continue;10231}1023210233var displayName = measurement.displayNames[id];1023410235// Inclusive time is not useful for many components without knowing where10236// they are instantiated. So we aggregate inclusive time with both the10237// owner and current displayName as the key.10238inclusiveKey = displayName.owner + ' > ' + displayName.current;1023910240candidates[inclusiveKey] = candidates[inclusiveKey] || {10241componentName: inclusiveKey,10242time: 0,10243count: 010244};1024510246if (measurement.inclusive[id]) {10247candidates[inclusiveKey].time += measurement.inclusive[id];10248}10249if (measurement.counts[id]) {10250candidates[inclusiveKey].count += measurement.counts[id];10251}10252}10253}1025410255// Now make a sorted array with the results.10256var arr = [];10257for (inclusiveKey in candidates) {10258if (candidates[inclusiveKey].time >= DONT_CARE_THRESHOLD) {10259arr.push(candidates[inclusiveKey]);10260}10261}1026210263arr.sort(function(a, b) {10264return b.time - a.time;10265});1026610267return arr;10268}1026910270function getUnchangedComponents(measurement) {10271// For a given reconcile, look at which components did not actually10272// render anything to the DOM and return a mapping of their ID to10273// the amount of time it took to render the entire subtree.10274var cleanComponents = {};10275var dirtyLeafIDs = Object.keys(measurement.writes);10276var allIDs = assign({}, measurement.exclusive, measurement.inclusive);1027710278for (var id in allIDs) {10279var isDirty = false;10280// For each component that rendered, see if a component that triggered10281// a DOM op is in its subtree.10282for (var i = 0; i < dirtyLeafIDs.length; i++) {10283if (dirtyLeafIDs[i].indexOf(id) === 0) {10284isDirty = true;10285break;10286}10287}10288if (!isDirty && measurement.counts[id] > 0) {10289cleanComponents[id] = true;10290}10291}10292return cleanComponents;10293}1029410295var ReactDefaultPerfAnalysis = {10296getExclusiveSummary: getExclusiveSummary,10297getInclusiveSummary: getInclusiveSummary,10298getDOMSummary: getDOMSummary,10299getTotalTime: getTotalTime10300};1030110302module.exports = ReactDefaultPerfAnalysis;1030310304},{"29":29}],63:[function(_dereq_,module,exports){10305/**10306* Copyright 2014-2015, Facebook, Inc.10307* All rights reserved.10308*10309* This source code is licensed under the BSD-style license found in the10310* LICENSE file in the root directory of this source tree. An additional grant10311* of patent rights can be found in the PATENTS file in the same directory.10312*10313* @providesModule ReactElement10314*/1031510316'use strict';1031710318var ReactContext = _dereq_(44);10319var ReactCurrentOwner = _dereq_(45);1032010321var assign = _dereq_(29);10322var warning = _dereq_(171);1032310324var RESERVED_PROPS = {10325key: true,10326ref: true10327};1032810329/**10330* Warn for mutations.10331*10332* @internal10333* @param {object} object10334* @param {string} key10335*/10336function defineWarningProperty(object, key) {10337Object.defineProperty(object, key, {1033810339configurable: false,10340enumerable: true,1034110342get: function() {10343if (!this._store) {10344return null;10345}10346return this._store[key];10347},1034810349set: function(value) {10350("production" !== "development" ? warning(10351false,10352'Don\'t set the %s property of the React element. Instead, ' +10353'specify the correct value when initially creating the element.',10354key10355) : null);10356this._store[key] = value;10357}1035810359});10360}1036110362/**10363* This is updated to true if the membrane is successfully created.10364*/10365var useMutationMembrane = false;1036610367/**10368* Warn for mutations.10369*10370* @internal10371* @param {object} element10372*/10373function defineMutationMembrane(prototype) {10374try {10375var pseudoFrozenProperties = {10376props: true10377};10378for (var key in pseudoFrozenProperties) {10379defineWarningProperty(prototype, key);10380}10381useMutationMembrane = true;10382} catch (x) {10383// IE will fail on defineProperty10384}10385}1038610387/**10388* Base constructor for all React elements. This is only used to make this10389* work with a dynamic instanceof check. Nothing should live on this prototype.10390*10391* @param {*} type10392* @param {string|object} ref10393* @param {*} key10394* @param {*} props10395* @internal10396*/10397var ReactElement = function(type, key, ref, owner, context, props) {10398// Built-in properties that belong on the element10399this.type = type;10400this.key = key;10401this.ref = ref;1040210403// Record the component responsible for creating this element.10404this._owner = owner;1040510406// TODO: Deprecate withContext, and then the context becomes accessible10407// through the owner.10408this._context = context;1040910410if ("production" !== "development") {10411// The validation flag and props are currently mutative. We put them on10412// an external backing store so that we can freeze the whole object.10413// This can be replaced with a WeakMap once they are implemented in10414// commonly used development environments.10415this._store = {props: props, originalProps: assign({}, props)};1041610417// To make comparing ReactElements easier for testing purposes, we make10418// the validation flag non-enumerable (where possible, which should10419// include every environment we run tests in), so the test framework10420// ignores it.10421try {10422Object.defineProperty(this._store, 'validated', {10423configurable: false,10424enumerable: false,10425writable: true10426});10427} catch (x) {10428}10429this._store.validated = false;1043010431// We're not allowed to set props directly on the object so we early10432// return and rely on the prototype membrane to forward to the backing10433// store.10434if (useMutationMembrane) {10435Object.freeze(this);10436return;10437}10438}1043910440this.props = props;10441};1044210443// We intentionally don't expose the function on the constructor property.10444// ReactElement should be indistinguishable from a plain object.10445ReactElement.prototype = {10446_isReactElement: true10447};1044810449if ("production" !== "development") {10450defineMutationMembrane(ReactElement.prototype);10451}1045210453ReactElement.createElement = function(type, config, children) {10454var propName;1045510456// Reserved names are extracted10457var props = {};1045810459var key = null;10460var ref = null;1046110462if (config != null) {10463ref = config.ref === undefined ? null : config.ref;10464key = config.key === undefined ? null : '' + config.key;10465// Remaining properties are added to a new props object10466for (propName in config) {10467if (config.hasOwnProperty(propName) &&10468!RESERVED_PROPS.hasOwnProperty(propName)) {10469props[propName] = config[propName];10470}10471}10472}1047310474// Children can be more than one argument, and those are transferred onto10475// the newly allocated props object.10476var childrenLength = arguments.length - 2;10477if (childrenLength === 1) {10478props.children = children;10479} else if (childrenLength > 1) {10480var childArray = Array(childrenLength);10481for (var i = 0; i < childrenLength; i++) {10482childArray[i] = arguments[i + 2];10483}10484props.children = childArray;10485}1048610487// Resolve default props10488if (type && type.defaultProps) {10489var defaultProps = type.defaultProps;10490for (propName in defaultProps) {10491if (typeof props[propName] === 'undefined') {10492props[propName] = defaultProps[propName];10493}10494}10495}1049610497return new ReactElement(10498type,10499key,10500ref,10501ReactCurrentOwner.current,10502ReactContext.current,10503props10504);10505};1050610507ReactElement.createFactory = function(type) {10508var factory = ReactElement.createElement.bind(null, type);10509// Expose the type on the factory and the prototype so that it can be10510// easily accessed on elements. E.g. <Foo />.type === Foo.type.10511// This should not be named `constructor` since this may not be the function10512// that created the element, and it may not even be a constructor.10513// Legacy hook TODO: Warn if this is accessed10514factory.type = type;10515return factory;10516};1051710518ReactElement.cloneAndReplaceProps = function(oldElement, newProps) {10519var newElement = new ReactElement(10520oldElement.type,10521oldElement.key,10522oldElement.ref,10523oldElement._owner,10524oldElement._context,10525newProps10526);1052710528if ("production" !== "development") {10529// If the key on the original is valid, then the clone is valid10530newElement._store.validated = oldElement._store.validated;10531}10532return newElement;10533};1053410535ReactElement.cloneElement = function(element, config, children) {10536var propName;1053710538// Original props are copied10539var props = assign({}, element.props);1054010541// Reserved names are extracted10542var key = element.key;10543var ref = element.ref;1054410545// Owner will be preserved, unless ref is overridden10546var owner = element._owner;1054710548if (config != null) {10549if (config.ref !== undefined) {10550// Silently steal the ref from the parent.10551ref = config.ref;10552owner = ReactCurrentOwner.current;10553}10554if (config.key !== undefined) {10555key = '' + config.key;10556}10557// Remaining properties override existing props10558for (propName in config) {10559if (config.hasOwnProperty(propName) &&10560!RESERVED_PROPS.hasOwnProperty(propName)) {10561props[propName] = config[propName];10562}10563}10564}1056510566// Children can be more than one argument, and those are transferred onto10567// the newly allocated props object.10568var childrenLength = arguments.length - 2;10569if (childrenLength === 1) {10570props.children = children;10571} else if (childrenLength > 1) {10572var childArray = Array(childrenLength);10573for (var i = 0; i < childrenLength; i++) {10574childArray[i] = arguments[i + 2];10575}10576props.children = childArray;10577}1057810579return new ReactElement(10580element.type,10581key,10582ref,10583owner,10584element._context,10585props10586);10587};1058810589/**10590* @param {?object} object10591* @return {boolean} True if `object` is a valid component.10592* @final10593*/10594ReactElement.isValidElement = function(object) {10595// ReactTestUtils is often used outside of beforeEach where as React is10596// within it. This leads to two different instances of React on the same10597// page. To identify a element from a different React instance we use10598// a flag instead of an instanceof check.10599var isElement = !!(object && object._isReactElement);10600// if (isElement && !(object instanceof ReactElement)) {10601// This is an indicator that you're using multiple versions of React at the10602// same time. This will screw with ownership and stuff. Fix it, please.10603// TODO: We could possibly warn here.10604// }10605return isElement;10606};1060710608module.exports = ReactElement;1060910610},{"171":171,"29":29,"44":44,"45":45}],64:[function(_dereq_,module,exports){10611/**10612* Copyright 2014-2015, Facebook, Inc.10613* All rights reserved.10614*10615* This source code is licensed under the BSD-style license found in the10616* LICENSE file in the root directory of this source tree. An additional grant10617* of patent rights can be found in the PATENTS file in the same directory.10618*10619* @providesModule ReactElementValidator10620*/1062110622/**10623* ReactElementValidator provides a wrapper around a element factory10624* which validates the props passed to the element. This is intended to be10625* used only in DEV and could be replaced by a static type checker for languages10626* that support it.10627*/1062810629'use strict';1063010631var ReactElement = _dereq_(63);10632var ReactFragment = _dereq_(69);10633var ReactPropTypeLocations = _dereq_(85);10634var ReactPropTypeLocationNames = _dereq_(84);10635var ReactCurrentOwner = _dereq_(45);10636var ReactNativeComponent = _dereq_(80);1063710638var getIteratorFn = _dereq_(141);10639var invariant = _dereq_(150);10640var warning = _dereq_(171);1064110642function getDeclarationErrorAddendum() {10643if (ReactCurrentOwner.current) {10644var name = ReactCurrentOwner.current.getName();10645if (name) {10646return ' Check the render method of `' + name + '`.';10647}10648}10649return '';10650}1065110652/**10653* Warn if there's no key explicitly set on dynamic arrays of children or10654* object keys are not valid. This allows us to keep track of children between10655* updates.10656*/10657var ownerHasKeyUseWarning = {};1065810659var loggedTypeFailures = {};1066010661var NUMERIC_PROPERTY_REGEX = /^\d+$/;1066210663/**10664* Gets the instance's name for use in warnings.10665*10666* @internal10667* @return {?string} Display name or undefined10668*/10669function getName(instance) {10670var publicInstance = instance && instance.getPublicInstance();10671if (!publicInstance) {10672return undefined;10673}10674var constructor = publicInstance.constructor;10675if (!constructor) {10676return undefined;10677}10678return constructor.displayName || constructor.name || undefined;10679}1068010681/**10682* Gets the current owner's displayName for use in warnings.10683*10684* @internal10685* @return {?string} Display name or undefined10686*/10687function getCurrentOwnerDisplayName() {10688var current = ReactCurrentOwner.current;10689return (10690current && getName(current) || undefined10691);10692}1069310694/**10695* Warn if the element doesn't have an explicit key assigned to it.10696* This element is in an array. The array could grow and shrink or be10697* reordered. All children that haven't already been validated are required to10698* have a "key" property assigned to it.10699*10700* @internal10701* @param {ReactElement} element Element that requires a key.10702* @param {*} parentType element's parent's type.10703*/10704function validateExplicitKey(element, parentType) {10705if (element._store.validated || element.key != null) {10706return;10707}10708element._store.validated = true;1070910710warnAndMonitorForKeyUse(10711'Each child in an array or iterator should have a unique "key" prop.',10712element,10713parentType10714);10715}1071610717/**10718* Warn if the key is being defined as an object property but has an incorrect10719* value.10720*10721* @internal10722* @param {string} name Property name of the key.10723* @param {ReactElement} element Component that requires a key.10724* @param {*} parentType element's parent's type.10725*/10726function validatePropertyKey(name, element, parentType) {10727if (!NUMERIC_PROPERTY_REGEX.test(name)) {10728return;10729}10730warnAndMonitorForKeyUse(10731'Child objects should have non-numeric keys so ordering is preserved.',10732element,10733parentType10734);10735}1073610737/**10738* Shared warning and monitoring code for the key warnings.10739*10740* @internal10741* @param {string} message The base warning that gets output.10742* @param {ReactElement} element Component that requires a key.10743* @param {*} parentType element's parent's type.10744*/10745function warnAndMonitorForKeyUse(message, element, parentType) {10746var ownerName = getCurrentOwnerDisplayName();10747var parentName = typeof parentType === 'string' ?10748parentType : parentType.displayName || parentType.name;1074910750var useName = ownerName || parentName;10751var memoizer = ownerHasKeyUseWarning[message] || (10752(ownerHasKeyUseWarning[message] = {})10753);10754if (memoizer.hasOwnProperty(useName)) {10755return;10756}10757memoizer[useName] = true;1075810759var parentOrOwnerAddendum =10760ownerName ? (" Check the render method of " + ownerName + ".") :10761parentName ? (" Check the React.render call using <" + parentName + ">.") :10762'';1076310764// Usually the current owner is the offender, but if it accepts children as a10765// property, it may be the creator of the child that's responsible for10766// assigning it a key.10767var childOwnerAddendum = '';10768if (element &&10769element._owner &&10770element._owner !== ReactCurrentOwner.current) {10771// Name of the component that originally created this child.10772var childOwnerName = getName(element._owner);1077310774childOwnerAddendum = (" It was passed a child from " + childOwnerName + ".");10775}1077610777("production" !== "development" ? warning(10778false,10779message + '%s%s See https://fb.me/react-warning-keys for more information.',10780parentOrOwnerAddendum,10781childOwnerAddendum10782) : null);10783}1078410785/**10786* Ensure that every element either is passed in a static location, in an10787* array with an explicit keys property defined, or in an object literal10788* with valid key property.10789*10790* @internal10791* @param {ReactNode} node Statically passed child of any type.10792* @param {*} parentType node's parent's type.10793*/10794function validateChildKeys(node, parentType) {10795if (Array.isArray(node)) {10796for (var i = 0; i < node.length; i++) {10797var child = node[i];10798if (ReactElement.isValidElement(child)) {10799validateExplicitKey(child, parentType);10800}10801}10802} else if (ReactElement.isValidElement(node)) {10803// This element was passed in a valid location.10804node._store.validated = true;10805} else if (node) {10806var iteratorFn = getIteratorFn(node);10807// Entry iterators provide implicit keys.10808if (iteratorFn) {10809if (iteratorFn !== node.entries) {10810var iterator = iteratorFn.call(node);10811var step;10812while (!(step = iterator.next()).done) {10813if (ReactElement.isValidElement(step.value)) {10814validateExplicitKey(step.value, parentType);10815}10816}10817}10818} else if (typeof node === 'object') {10819var fragment = ReactFragment.extractIfFragment(node);10820for (var key in fragment) {10821if (fragment.hasOwnProperty(key)) {10822validatePropertyKey(key, fragment[key], parentType);10823}10824}10825}10826}10827}1082810829/**10830* Assert that the props are valid10831*10832* @param {string} componentName Name of the component for error messages.10833* @param {object} propTypes Map of prop name to a ReactPropType10834* @param {object} props10835* @param {string} location e.g. "prop", "context", "child context"10836* @private10837*/10838function checkPropTypes(componentName, propTypes, props, location) {10839for (var propName in propTypes) {10840if (propTypes.hasOwnProperty(propName)) {10841var error;10842// Prop type validation may throw. In case they do, we don't want to10843// fail the render phase where it didn't fail before. So we log it.10844// After these have been cleaned up, we'll let them throw.10845try {10846// This is intentionally an invariant that gets caught. It's the same10847// behavior as without this statement except with a better message.10848("production" !== "development" ? invariant(10849typeof propTypes[propName] === 'function',10850'%s: %s type `%s` is invalid; it must be a function, usually from ' +10851'React.PropTypes.',10852componentName || 'React class',10853ReactPropTypeLocationNames[location],10854propName10855) : invariant(typeof propTypes[propName] === 'function'));10856error = propTypes[propName](props, propName, componentName, location);10857} catch (ex) {10858error = ex;10859}10860if (error instanceof Error && !(error.message in loggedTypeFailures)) {10861// Only monitor this failure once because there tends to be a lot of the10862// same error.10863loggedTypeFailures[error.message] = true;1086410865var addendum = getDeclarationErrorAddendum(this);10866("production" !== "development" ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null);10867}10868}10869}10870}1087110872var warnedPropsMutations = {};1087310874/**10875* Warn about mutating props when setting `propName` on `element`.10876*10877* @param {string} propName The string key within props that was set10878* @param {ReactElement} element10879*/10880function warnForPropsMutation(propName, element) {10881var type = element.type;10882var elementName = typeof type === 'string' ? type : type.displayName;10883var ownerName = element._owner ?10884element._owner.getPublicInstance().constructor.displayName : null;1088510886var warningKey = propName + '|' + elementName + '|' + ownerName;10887if (warnedPropsMutations.hasOwnProperty(warningKey)) {10888return;10889}10890warnedPropsMutations[warningKey] = true;1089110892var elementInfo = '';10893if (elementName) {10894elementInfo = ' <' + elementName + ' />';10895}10896var ownerInfo = '';10897if (ownerName) {10898ownerInfo = ' The element was created by ' + ownerName + '.';10899}1090010901("production" !== "development" ? warning(10902false,10903'Don\'t set .props.%s of the React component%s. Instead, specify the ' +10904'correct value when initially creating the element or use ' +10905'React.cloneElement to make a new element with updated props.%s',10906propName,10907elementInfo,10908ownerInfo10909) : null);10910}1091110912// Inline Object.is polyfill10913function is(a, b) {10914if (a !== a) {10915// NaN10916return b !== b;10917}10918if (a === 0 && b === 0) {10919// +-010920return 1 / a === 1 / b;10921}10922return a === b;10923}1092410925/**10926* Given an element, check if its props have been mutated since element10927* creation (or the last call to this function). In particular, check if any10928* new props have been added, which we can't directly catch by defining warning10929* properties on the props object.10930*10931* @param {ReactElement} element10932*/10933function checkAndWarnForMutatedProps(element) {10934if (!element._store) {10935// Element was created using `new ReactElement` directly or with10936// `ReactElement.createElement`; skip mutation checking10937return;10938}1093910940var originalProps = element._store.originalProps;10941var props = element.props;1094210943for (var propName in props) {10944if (props.hasOwnProperty(propName)) {10945if (!originalProps.hasOwnProperty(propName) ||10946!is(originalProps[propName], props[propName])) {10947warnForPropsMutation(propName, element);1094810949// Copy over the new value so that the two props objects match again10950originalProps[propName] = props[propName];10951}10952}10953}10954}1095510956/**10957* Given an element, validate that its props follow the propTypes definition,10958* provided by the type.10959*10960* @param {ReactElement} element10961*/10962function validatePropTypes(element) {10963if (element.type == null) {10964// This has already warned. Don't throw.10965return;10966}10967// Extract the component class from the element. Converts string types10968// to a composite class which may have propTypes.10969// TODO: Validating a string's propTypes is not decoupled from the10970// rendering target which is problematic.10971var componentClass = ReactNativeComponent.getComponentClassForElement(10972element10973);10974var name = componentClass.displayName || componentClass.name;10975if (componentClass.propTypes) {10976checkPropTypes(10977name,10978componentClass.propTypes,10979element.props,10980ReactPropTypeLocations.prop10981);10982}10983if (typeof componentClass.getDefaultProps === 'function') {10984("production" !== "development" ? warning(10985componentClass.getDefaultProps.isReactClassApproved,10986'getDefaultProps is only used on classic React.createClass ' +10987'definitions. Use a static property named `defaultProps` instead.'10988) : null);10989}10990}1099110992var ReactElementValidator = {1099310994checkAndWarnForMutatedProps: checkAndWarnForMutatedProps,1099510996createElement: function(type, props, children) {10997// We warn in this case but don't throw. We expect the element creation to10998// succeed and there will likely be errors in render.10999("production" !== "development" ? warning(11000type != null,11001'React.createElement: type should not be null or undefined. It should ' +11002'be a string (for DOM elements) or a ReactClass (for composite ' +11003'components).'11004) : null);1100511006var element = ReactElement.createElement.apply(this, arguments);1100711008// The result can be nullish if a mock or a custom function is used.11009// TODO: Drop this when these are no longer allowed as the type argument.11010if (element == null) {11011return element;11012}1101311014for (var i = 2; i < arguments.length; i++) {11015validateChildKeys(arguments[i], type);11016}1101711018validatePropTypes(element);1101911020return element;11021},1102211023createFactory: function(type) {11024var validatedFactory = ReactElementValidator.createElement.bind(11025null,11026type11027);11028// Legacy hook TODO: Warn if this is accessed11029validatedFactory.type = type;1103011031if ("production" !== "development") {11032try {11033Object.defineProperty(11034validatedFactory,11035'type',11036{11037enumerable: false,11038get: function() {11039("production" !== "development" ? warning(11040false,11041'Factory.type is deprecated. Access the class directly ' +11042'before passing it to createFactory.'11043) : null);11044Object.defineProperty(this, 'type', {11045value: type11046});11047return type;11048}11049}11050);11051} catch (x) {11052// IE will fail on defineProperty (es5-shim/sham too)11053}11054}110551105611057return validatedFactory;11058},1105911060cloneElement: function(element, props, children) {11061var newElement = ReactElement.cloneElement.apply(this, arguments);11062for (var i = 2; i < arguments.length; i++) {11063validateChildKeys(arguments[i], newElement.type);11064}11065validatePropTypes(newElement);11066return newElement;11067}1106811069};1107011071module.exports = ReactElementValidator;1107211073},{"141":141,"150":150,"171":171,"45":45,"63":63,"69":69,"80":80,"84":84,"85":85}],65:[function(_dereq_,module,exports){11074/**11075* Copyright 2014-2015, Facebook, Inc.11076* All rights reserved.11077*11078* This source code is licensed under the BSD-style license found in the11079* LICENSE file in the root directory of this source tree. An additional grant11080* of patent rights can be found in the PATENTS file in the same directory.11081*11082* @providesModule ReactEmptyComponent11083*/1108411085'use strict';1108611087var ReactElement = _dereq_(63);11088var ReactInstanceMap = _dereq_(73);1108911090var invariant = _dereq_(150);1109111092var component;11093// This registry keeps track of the React IDs of the components that rendered to11094// `null` (in reality a placeholder such as `noscript`)11095var nullComponentIDsRegistry = {};1109611097var ReactEmptyComponentInjection = {11098injectEmptyComponent: function(emptyComponent) {11099component = ReactElement.createFactory(emptyComponent);11100}11101};1110211103var ReactEmptyComponentType = function() {};11104ReactEmptyComponentType.prototype.componentDidMount = function() {11105var internalInstance = ReactInstanceMap.get(this);11106// TODO: Make sure we run these methods in the correct order, we shouldn't11107// need this check. We're going to assume if we're here it means we ran11108// componentWillUnmount already so there is no internal instance (it gets11109// removed as part of the unmounting process).11110if (!internalInstance) {11111return;11112}11113registerNullComponentID(internalInstance._rootNodeID);11114};11115ReactEmptyComponentType.prototype.componentWillUnmount = function() {11116var internalInstance = ReactInstanceMap.get(this);11117// TODO: Get rid of this check. See TODO in componentDidMount.11118if (!internalInstance) {11119return;11120}11121deregisterNullComponentID(internalInstance._rootNodeID);11122};11123ReactEmptyComponentType.prototype.render = function() {11124("production" !== "development" ? invariant(11125component,11126'Trying to return null from a render, but no null placeholder component ' +11127'was injected.'11128) : invariant(component));11129return component();11130};1113111132var emptyElement = ReactElement.createElement(ReactEmptyComponentType);1113311134/**11135* Mark the component as having rendered to null.11136* @param {string} id Component's `_rootNodeID`.11137*/11138function registerNullComponentID(id) {11139nullComponentIDsRegistry[id] = true;11140}1114111142/**11143* Unmark the component as having rendered to null: it renders to something now.11144* @param {string} id Component's `_rootNodeID`.11145*/11146function deregisterNullComponentID(id) {11147delete nullComponentIDsRegistry[id];11148}1114911150/**11151* @param {string} id Component's `_rootNodeID`.11152* @return {boolean} True if the component is rendered to null.11153*/11154function isNullComponentID(id) {11155return !!nullComponentIDsRegistry[id];11156}1115711158var ReactEmptyComponent = {11159emptyElement: emptyElement,11160injection: ReactEmptyComponentInjection,11161isNullComponentID: isNullComponentID11162};1116311164module.exports = ReactEmptyComponent;1116511166},{"150":150,"63":63,"73":73}],66:[function(_dereq_,module,exports){11167/**11168* Copyright 2013-2015, Facebook, Inc.11169* All rights reserved.11170*11171* This source code is licensed under the BSD-style license found in the11172* LICENSE file in the root directory of this source tree. An additional grant11173* of patent rights can be found in the PATENTS file in the same directory.11174*11175* @providesModule ReactErrorUtils11176* @typechecks11177*/1117811179"use strict";1118011181var ReactErrorUtils = {11182/**11183* Creates a guarded version of a function. This is supposed to make debugging11184* of event handlers easier. To aid debugging with the browser's debugger,11185* this currently simply returns the original function.11186*11187* @param {function} func Function to be executed11188* @param {string} name The name of the guard11189* @return {function}11190*/11191guard: function(func, name) {11192return func;11193}11194};1119511196module.exports = ReactErrorUtils;1119711198},{}],67:[function(_dereq_,module,exports){11199/**11200* Copyright 2013-2015, Facebook, Inc.11201* All rights reserved.11202*11203* This source code is licensed under the BSD-style license found in the11204* LICENSE file in the root directory of this source tree. An additional grant11205* of patent rights can be found in the PATENTS file in the same directory.11206*11207* @providesModule ReactEventEmitterMixin11208*/1120911210'use strict';1121111212var EventPluginHub = _dereq_(18);1121311214function runEventQueueInBatch(events) {11215EventPluginHub.enqueueEvents(events);11216EventPluginHub.processEventQueue();11217}1121811219var ReactEventEmitterMixin = {1122011221/**11222* Streams a fired top-level event to `EventPluginHub` where plugins have the11223* opportunity to create `ReactEvent`s to be dispatched.11224*11225* @param {string} topLevelType Record from `EventConstants`.11226* @param {object} topLevelTarget The listening component root node.11227* @param {string} topLevelTargetID ID of `topLevelTarget`.11228* @param {object} nativeEvent Native environment event.11229*/11230handleTopLevel: function(11231topLevelType,11232topLevelTarget,11233topLevelTargetID,11234nativeEvent) {11235var events = EventPluginHub.extractEvents(11236topLevelType,11237topLevelTarget,11238topLevelTargetID,11239nativeEvent11240);1124111242runEventQueueInBatch(events);11243}11244};1124511246module.exports = ReactEventEmitterMixin;1124711248},{"18":18}],68:[function(_dereq_,module,exports){11249/**11250* Copyright 2013-2015, Facebook, Inc.11251* All rights reserved.11252*11253* This source code is licensed under the BSD-style license found in the11254* LICENSE file in the root directory of this source tree. An additional grant11255* of patent rights can be found in the PATENTS file in the same directory.11256*11257* @providesModule ReactEventListener11258* @typechecks static-only11259*/1126011261'use strict';1126211263var EventListener = _dereq_(17);11264var ExecutionEnvironment = _dereq_(22);11265var PooledClass = _dereq_(30);11266var ReactInstanceHandles = _dereq_(72);11267var ReactMount = _dereq_(77);11268var ReactUpdates = _dereq_(100);1126911270var assign = _dereq_(29);11271var getEventTarget = _dereq_(140);11272var getUnboundedScrollPosition = _dereq_(146);1127311274/**11275* Finds the parent React component of `node`.11276*11277* @param {*} node11278* @return {?DOMEventTarget} Parent container, or `null` if the specified node11279* is not nested.11280*/11281function findParent(node) {11282// TODO: It may be a good idea to cache this to prevent unnecessary DOM11283// traversal, but caching is difficult to do correctly without using a11284// mutation observer to listen for all DOM changes.11285var nodeID = ReactMount.getID(node);11286var rootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);11287var container = ReactMount.findReactContainerForID(rootID);11288var parent = ReactMount.getFirstReactDOM(container);11289return parent;11290}1129111292// Used to store ancestor hierarchy in top level callback11293function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {11294this.topLevelType = topLevelType;11295this.nativeEvent = nativeEvent;11296this.ancestors = [];11297}11298assign(TopLevelCallbackBookKeeping.prototype, {11299destructor: function() {11300this.topLevelType = null;11301this.nativeEvent = null;11302this.ancestors.length = 0;11303}11304});11305PooledClass.addPoolingTo(11306TopLevelCallbackBookKeeping,11307PooledClass.twoArgumentPooler11308);1130911310function handleTopLevelImpl(bookKeeping) {11311var topLevelTarget = ReactMount.getFirstReactDOM(11312getEventTarget(bookKeeping.nativeEvent)11313) || window;1131411315// Loop through the hierarchy, in case there's any nested components.11316// It's important that we build the array of ancestors before calling any11317// event handlers, because event handlers can modify the DOM, leading to11318// inconsistencies with ReactMount's node cache. See #1105.11319var ancestor = topLevelTarget;11320while (ancestor) {11321bookKeeping.ancestors.push(ancestor);11322ancestor = findParent(ancestor);11323}1132411325for (var i = 0, l = bookKeeping.ancestors.length; i < l; i++) {11326topLevelTarget = bookKeeping.ancestors[i];11327var topLevelTargetID = ReactMount.getID(topLevelTarget) || '';11328ReactEventListener._handleTopLevel(11329bookKeeping.topLevelType,11330topLevelTarget,11331topLevelTargetID,11332bookKeeping.nativeEvent11333);11334}11335}1133611337function scrollValueMonitor(cb) {11338var scrollPosition = getUnboundedScrollPosition(window);11339cb(scrollPosition);11340}1134111342var ReactEventListener = {11343_enabled: true,11344_handleTopLevel: null,1134511346WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,1134711348setHandleTopLevel: function(handleTopLevel) {11349ReactEventListener._handleTopLevel = handleTopLevel;11350},1135111352setEnabled: function(enabled) {11353ReactEventListener._enabled = !!enabled;11354},1135511356isEnabled: function() {11357return ReactEventListener._enabled;11358},113591136011361/**11362* Traps top-level events by using event bubbling.11363*11364* @param {string} topLevelType Record from `EventConstants`.11365* @param {string} handlerBaseName Event name (e.g. "click").11366* @param {object} handle Element on which to attach listener.11367* @return {object} An object with a remove function which will forcefully11368* remove the listener.11369* @internal11370*/11371trapBubbledEvent: function(topLevelType, handlerBaseName, handle) {11372var element = handle;11373if (!element) {11374return null;11375}11376return EventListener.listen(11377element,11378handlerBaseName,11379ReactEventListener.dispatchEvent.bind(null, topLevelType)11380);11381},1138211383/**11384* Traps a top-level event by using event capturing.11385*11386* @param {string} topLevelType Record from `EventConstants`.11387* @param {string} handlerBaseName Event name (e.g. "click").11388* @param {object} handle Element on which to attach listener.11389* @return {object} An object with a remove function which will forcefully11390* remove the listener.11391* @internal11392*/11393trapCapturedEvent: function(topLevelType, handlerBaseName, handle) {11394var element = handle;11395if (!element) {11396return null;11397}11398return EventListener.capture(11399element,11400handlerBaseName,11401ReactEventListener.dispatchEvent.bind(null, topLevelType)11402);11403},1140411405monitorScrollValue: function(refresh) {11406var callback = scrollValueMonitor.bind(null, refresh);11407EventListener.listen(window, 'scroll', callback);11408},1140911410dispatchEvent: function(topLevelType, nativeEvent) {11411if (!ReactEventListener._enabled) {11412return;11413}1141411415var bookKeeping = TopLevelCallbackBookKeeping.getPooled(11416topLevelType,11417nativeEvent11418);11419try {11420// Event queue being processed in the same cycle allows11421// `preventDefault`.11422ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);11423} finally {11424TopLevelCallbackBookKeeping.release(bookKeeping);11425}11426}11427};1142811429module.exports = ReactEventListener;1143011431},{"100":100,"140":140,"146":146,"17":17,"22":22,"29":29,"30":30,"72":72,"77":77}],69:[function(_dereq_,module,exports){11432/**11433* Copyright 2015, Facebook, Inc.11434* All rights reserved.11435*11436* This source code is licensed under the BSD-style license found in the11437* LICENSE file in the root directory of this source tree. An additional grant11438* of patent rights can be found in the PATENTS file in the same directory.11439*11440* @providesModule ReactFragment11441*/1144211443'use strict';1144411445var ReactElement = _dereq_(63);1144611447var warning = _dereq_(171);1144811449/**11450* We used to allow keyed objects to serve as a collection of ReactElements,11451* or nested sets. This allowed us a way to explicitly key a set a fragment of11452* components. This is now being replaced with an opaque data structure.11453* The upgrade path is to call React.addons.createFragment({ key: value }) to11454* create a keyed fragment. The resulting data structure is opaque, for now.11455*/1145611457if ("production" !== "development") {11458var fragmentKey = '_reactFragment';11459var didWarnKey = '_reactDidWarn';11460var canWarnForReactFragment = false;1146111462try {11463// Feature test. Don't even try to issue this warning if we can't use11464// enumerable: false.1146511466var dummy = function() {11467return 1;11468};1146911470Object.defineProperty(11471{},11472fragmentKey,11473{enumerable: false, value: true}11474);1147511476Object.defineProperty(11477{},11478'key',11479{enumerable: true, get: dummy}11480);1148111482canWarnForReactFragment = true;11483} catch (x) { }1148411485var proxyPropertyAccessWithWarning = function(obj, key) {11486Object.defineProperty(obj, key, {11487enumerable: true,11488get: function() {11489("production" !== "development" ? warning(11490this[didWarnKey],11491'A ReactFragment is an opaque type. Accessing any of its ' +11492'properties is deprecated. Pass it to one of the React.Children ' +11493'helpers.'11494) : null);11495this[didWarnKey] = true;11496return this[fragmentKey][key];11497},11498set: function(value) {11499("production" !== "development" ? warning(11500this[didWarnKey],11501'A ReactFragment is an immutable opaque type. Mutating its ' +11502'properties is deprecated.'11503) : null);11504this[didWarnKey] = true;11505this[fragmentKey][key] = value;11506}11507});11508};1150911510var issuedWarnings = {};1151111512var didWarnForFragment = function(fragment) {11513// We use the keys and the type of the value as a heuristic to dedupe the11514// warning to avoid spamming too much.11515var fragmentCacheKey = '';11516for (var key in fragment) {11517fragmentCacheKey += key + ':' + (typeof fragment[key]) + ',';11518}11519var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey];11520issuedWarnings[fragmentCacheKey] = true;11521return alreadyWarnedOnce;11522};11523}1152411525var ReactFragment = {11526// Wrap a keyed object in an opaque proxy that warns you if you access any11527// of its properties.11528create: function(object) {11529if ("production" !== "development") {11530if (typeof object !== 'object' || !object || Array.isArray(object)) {11531("production" !== "development" ? warning(11532false,11533'React.addons.createFragment only accepts a single object.',11534object11535) : null);11536return object;11537}11538if (ReactElement.isValidElement(object)) {11539("production" !== "development" ? warning(11540false,11541'React.addons.createFragment does not accept a ReactElement ' +11542'without a wrapper object.'11543) : null);11544return object;11545}11546if (canWarnForReactFragment) {11547var proxy = {};11548Object.defineProperty(proxy, fragmentKey, {11549enumerable: false,11550value: object11551});11552Object.defineProperty(proxy, didWarnKey, {11553writable: true,11554enumerable: false,11555value: false11556});11557for (var key in object) {11558proxyPropertyAccessWithWarning(proxy, key);11559}11560Object.preventExtensions(proxy);11561return proxy;11562}11563}11564return object;11565},11566// Extract the original keyed object from the fragment opaque type. Warn if11567// a plain object is passed here.11568extract: function(fragment) {11569if ("production" !== "development") {11570if (canWarnForReactFragment) {11571if (!fragment[fragmentKey]) {11572("production" !== "development" ? warning(11573didWarnForFragment(fragment),11574'Any use of a keyed object should be wrapped in ' +11575'React.addons.createFragment(object) before being passed as a ' +11576'child.'11577) : null);11578return fragment;11579}11580return fragment[fragmentKey];11581}11582}11583return fragment;11584},11585// Check if this is a fragment and if so, extract the keyed object. If it11586// is a fragment-like object, warn that it should be wrapped. Ignore if we11587// can't determine what kind of object this is.11588extractIfFragment: function(fragment) {11589if ("production" !== "development") {11590if (canWarnForReactFragment) {11591// If it is the opaque type, return the keyed object.11592if (fragment[fragmentKey]) {11593return fragment[fragmentKey];11594}11595// Otherwise, check each property if it has an element, if it does11596// it is probably meant as a fragment, so we can warn early. Defer,11597// the warning to extract.11598for (var key in fragment) {11599if (fragment.hasOwnProperty(key) &&11600ReactElement.isValidElement(fragment[key])) {11601// This looks like a fragment object, we should provide an11602// early warning.11603return ReactFragment.extract(fragment);11604}11605}11606}11607}11608return fragment;11609}11610};1161111612module.exports = ReactFragment;1161311614},{"171":171,"63":63}],70:[function(_dereq_,module,exports){11615/**11616* Copyright 2013-2015, Facebook, Inc.11617* All rights reserved.11618*11619* This source code is licensed under the BSD-style license found in the11620* LICENSE file in the root directory of this source tree. An additional grant11621* of patent rights can be found in the PATENTS file in the same directory.11622*11623* @providesModule ReactInjection11624*/1162511626'use strict';1162711628var DOMProperty = _dereq_(11);11629var EventPluginHub = _dereq_(18);11630var ReactComponentEnvironment = _dereq_(41);11631var ReactClass = _dereq_(38);11632var ReactEmptyComponent = _dereq_(65);11633var ReactBrowserEventEmitter = _dereq_(33);11634var ReactNativeComponent = _dereq_(80);11635var ReactDOMComponent = _dereq_(48);11636var ReactPerf = _dereq_(82);11637var ReactRootIndex = _dereq_(91);11638var ReactUpdates = _dereq_(100);1163911640var ReactInjection = {11641Component: ReactComponentEnvironment.injection,11642Class: ReactClass.injection,11643DOMComponent: ReactDOMComponent.injection,11644DOMProperty: DOMProperty.injection,11645EmptyComponent: ReactEmptyComponent.injection,11646EventPluginHub: EventPluginHub.injection,11647EventEmitter: ReactBrowserEventEmitter.injection,11648NativeComponent: ReactNativeComponent.injection,11649Perf: ReactPerf.injection,11650RootIndex: ReactRootIndex.injection,11651Updates: ReactUpdates.injection11652};1165311654module.exports = ReactInjection;1165511656},{"100":100,"11":11,"18":18,"33":33,"38":38,"41":41,"48":48,"65":65,"80":80,"82":82,"91":91}],71:[function(_dereq_,module,exports){11657/**11658* Copyright 2013-2015, Facebook, Inc.11659* All rights reserved.11660*11661* This source code is licensed under the BSD-style license found in the11662* LICENSE file in the root directory of this source tree. An additional grant11663* of patent rights can be found in the PATENTS file in the same directory.11664*11665* @providesModule ReactInputSelection11666*/1166711668'use strict';1166911670var ReactDOMSelection = _dereq_(56);1167111672var containsNode = _dereq_(123);11673var focusNode = _dereq_(134);11674var getActiveElement = _dereq_(136);1167511676function isInDocument(node) {11677return containsNode(document.documentElement, node);11678}1167911680/**11681* @ReactInputSelection: React input selection module. Based on Selection.js,11682* but modified to be suitable for react and has a couple of bug fixes (doesn't11683* assume buttons have range selections allowed).11684* Input selection module for React.11685*/11686var ReactInputSelection = {1168711688hasSelectionCapabilities: function(elem) {11689return elem && (11690((elem.nodeName === 'INPUT' && elem.type === 'text') ||11691elem.nodeName === 'TEXTAREA' || elem.contentEditable === 'true')11692);11693},1169411695getSelectionInformation: function() {11696var focusedElem = getActiveElement();11697return {11698focusedElem: focusedElem,11699selectionRange:11700ReactInputSelection.hasSelectionCapabilities(focusedElem) ?11701ReactInputSelection.getSelection(focusedElem) :11702null11703};11704},1170511706/**11707* @restoreSelection: If any selection information was potentially lost,11708* restore it. This is useful when performing operations that could remove dom11709* nodes and place them back in, resulting in focus being lost.11710*/11711restoreSelection: function(priorSelectionInformation) {11712var curFocusedElem = getActiveElement();11713var priorFocusedElem = priorSelectionInformation.focusedElem;11714var priorSelectionRange = priorSelectionInformation.selectionRange;11715if (curFocusedElem !== priorFocusedElem &&11716isInDocument(priorFocusedElem)) {11717if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {11718ReactInputSelection.setSelection(11719priorFocusedElem,11720priorSelectionRange11721);11722}11723focusNode(priorFocusedElem);11724}11725},1172611727/**11728* @getSelection: Gets the selection bounds of a focused textarea, input or11729* contentEditable node.11730* -@input: Look up selection bounds of this input11731* -@return {start: selectionStart, end: selectionEnd}11732*/11733getSelection: function(input) {11734var selection;1173511736if ('selectionStart' in input) {11737// Modern browser with input or textarea.11738selection = {11739start: input.selectionStart,11740end: input.selectionEnd11741};11742} else if (document.selection && input.nodeName === 'INPUT') {11743// IE8 input.11744var range = document.selection.createRange();11745// There can only be one selection per document in IE, so it must11746// be in our element.11747if (range.parentElement() === input) {11748selection = {11749start: -range.moveStart('character', -input.value.length),11750end: -range.moveEnd('character', -input.value.length)11751};11752}11753} else {11754// Content editable or old IE textarea.11755selection = ReactDOMSelection.getOffsets(input);11756}1175711758return selection || {start: 0, end: 0};11759},1176011761/**11762* @setSelection: Sets the selection bounds of a textarea or input and focuses11763* the input.11764* -@input Set selection bounds of this input or textarea11765* -@offsets Object of same form that is returned from get*11766*/11767setSelection: function(input, offsets) {11768var start = offsets.start;11769var end = offsets.end;11770if (typeof end === 'undefined') {11771end = start;11772}1177311774if ('selectionStart' in input) {11775input.selectionStart = start;11776input.selectionEnd = Math.min(end, input.value.length);11777} else if (document.selection && input.nodeName === 'INPUT') {11778var range = input.createTextRange();11779range.collapse(true);11780range.moveStart('character', start);11781range.moveEnd('character', end - start);11782range.select();11783} else {11784ReactDOMSelection.setOffsets(input, offsets);11785}11786}11787};1178811789module.exports = ReactInputSelection;1179011791},{"123":123,"134":134,"136":136,"56":56}],72:[function(_dereq_,module,exports){11792/**11793* Copyright 2013-2015, Facebook, Inc.11794* All rights reserved.11795*11796* This source code is licensed under the BSD-style license found in the11797* LICENSE file in the root directory of this source tree. An additional grant11798* of patent rights can be found in the PATENTS file in the same directory.11799*11800* @providesModule ReactInstanceHandles11801* @typechecks static-only11802*/1180311804'use strict';1180511806var ReactRootIndex = _dereq_(91);1180711808var invariant = _dereq_(150);1180911810var SEPARATOR = '.';11811var SEPARATOR_LENGTH = SEPARATOR.length;1181211813/**11814* Maximum depth of traversals before we consider the possibility of a bad ID.11815*/11816var MAX_TREE_DEPTH = 100;1181711818/**11819* Creates a DOM ID prefix to use when mounting React components.11820*11821* @param {number} index A unique integer11822* @return {string} React root ID.11823* @internal11824*/11825function getReactRootIDString(index) {11826return SEPARATOR + index.toString(36);11827}1182811829/**11830* Checks if a character in the supplied ID is a separator or the end.11831*11832* @param {string} id A React DOM ID.11833* @param {number} index Index of the character to check.11834* @return {boolean} True if the character is a separator or end of the ID.11835* @private11836*/11837function isBoundary(id, index) {11838return id.charAt(index) === SEPARATOR || index === id.length;11839}1184011841/**11842* Checks if the supplied string is a valid React DOM ID.11843*11844* @param {string} id A React DOM ID, maybe.11845* @return {boolean} True if the string is a valid React DOM ID.11846* @private11847*/11848function isValidID(id) {11849return id === '' || (11850id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR11851);11852}1185311854/**11855* Checks if the first ID is an ancestor of or equal to the second ID.11856*11857* @param {string} ancestorID11858* @param {string} descendantID11859* @return {boolean} True if `ancestorID` is an ancestor of `descendantID`.11860* @internal11861*/11862function isAncestorIDOf(ancestorID, descendantID) {11863return (11864descendantID.indexOf(ancestorID) === 0 &&11865isBoundary(descendantID, ancestorID.length)11866);11867}1186811869/**11870* Gets the parent ID of the supplied React DOM ID, `id`.11871*11872* @param {string} id ID of a component.11873* @return {string} ID of the parent, or an empty string.11874* @private11875*/11876function getParentID(id) {11877return id ? id.substr(0, id.lastIndexOf(SEPARATOR)) : '';11878}1187911880/**11881* Gets the next DOM ID on the tree path from the supplied `ancestorID` to the11882* supplied `destinationID`. If they are equal, the ID is returned.11883*11884* @param {string} ancestorID ID of an ancestor node of `destinationID`.11885* @param {string} destinationID ID of the destination node.11886* @return {string} Next ID on the path from `ancestorID` to `destinationID`.11887* @private11888*/11889function getNextDescendantID(ancestorID, destinationID) {11890("production" !== "development" ? invariant(11891isValidID(ancestorID) && isValidID(destinationID),11892'getNextDescendantID(%s, %s): Received an invalid React DOM ID.',11893ancestorID,11894destinationID11895) : invariant(isValidID(ancestorID) && isValidID(destinationID)));11896("production" !== "development" ? invariant(11897isAncestorIDOf(ancestorID, destinationID),11898'getNextDescendantID(...): React has made an invalid assumption about ' +11899'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.',11900ancestorID,11901destinationID11902) : invariant(isAncestorIDOf(ancestorID, destinationID)));11903if (ancestorID === destinationID) {11904return ancestorID;11905}11906// Skip over the ancestor and the immediate separator. Traverse until we hit11907// another separator or we reach the end of `destinationID`.11908var start = ancestorID.length + SEPARATOR_LENGTH;11909var i;11910for (i = start; i < destinationID.length; i++) {11911if (isBoundary(destinationID, i)) {11912break;11913}11914}11915return destinationID.substr(0, i);11916}1191711918/**11919* Gets the nearest common ancestor ID of two IDs.11920*11921* Using this ID scheme, the nearest common ancestor ID is the longest common11922* prefix of the two IDs that immediately preceded a "marker" in both strings.11923*11924* @param {string} oneID11925* @param {string} twoID11926* @return {string} Nearest common ancestor ID, or the empty string if none.11927* @private11928*/11929function getFirstCommonAncestorID(oneID, twoID) {11930var minLength = Math.min(oneID.length, twoID.length);11931if (minLength === 0) {11932return '';11933}11934var lastCommonMarkerIndex = 0;11935// Use `<=` to traverse until the "EOL" of the shorter string.11936for (var i = 0; i <= minLength; i++) {11937if (isBoundary(oneID, i) && isBoundary(twoID, i)) {11938lastCommonMarkerIndex = i;11939} else if (oneID.charAt(i) !== twoID.charAt(i)) {11940break;11941}11942}11943var longestCommonID = oneID.substr(0, lastCommonMarkerIndex);11944("production" !== "development" ? invariant(11945isValidID(longestCommonID),11946'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s',11947oneID,11948twoID,11949longestCommonID11950) : invariant(isValidID(longestCommonID)));11951return longestCommonID;11952}1195311954/**11955* Traverses the parent path between two IDs (either up or down). The IDs must11956* not be the same, and there must exist a parent path between them. If the11957* callback returns `false`, traversal is stopped.11958*11959* @param {?string} start ID at which to start traversal.11960* @param {?string} stop ID at which to end traversal.11961* @param {function} cb Callback to invoke each ID with.11962* @param {?boolean} skipFirst Whether or not to skip the first node.11963* @param {?boolean} skipLast Whether or not to skip the last node.11964* @private11965*/11966function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {11967start = start || '';11968stop = stop || '';11969("production" !== "development" ? invariant(11970start !== stop,11971'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.',11972start11973) : invariant(start !== stop));11974var traverseUp = isAncestorIDOf(stop, start);11975("production" !== "development" ? invariant(11976traverseUp || isAncestorIDOf(start, stop),11977'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' +11978'not have a parent path.',11979start,11980stop11981) : invariant(traverseUp || isAncestorIDOf(start, stop)));11982// Traverse from `start` to `stop` one depth at a time.11983var depth = 0;11984var traverse = traverseUp ? getParentID : getNextDescendantID;11985for (var id = start; /* until break */; id = traverse(id, stop)) {11986var ret;11987if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) {11988ret = cb(id, traverseUp, arg);11989}11990if (ret === false || id === stop) {11991// Only break //after// visiting `stop`.11992break;11993}11994("production" !== "development" ? invariant(11995depth++ < MAX_TREE_DEPTH,11996'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' +11997'traversing the React DOM ID tree. This may be due to malformed IDs: %s',11998start, stop11999) : invariant(depth++ < MAX_TREE_DEPTH));12000}12001}1200212003/**12004* Manages the IDs assigned to DOM representations of React components. This12005* uses a specific scheme in order to traverse the DOM efficiently (e.g. in12006* order to simulate events).12007*12008* @internal12009*/12010var ReactInstanceHandles = {1201112012/**12013* Constructs a React root ID12014* @return {string} A React root ID.12015*/12016createReactRootID: function() {12017return getReactRootIDString(ReactRootIndex.createReactRootIndex());12018},1201912020/**12021* Constructs a React ID by joining a root ID with a name.12022*12023* @param {string} rootID Root ID of a parent component.12024* @param {string} name A component's name (as flattened children).12025* @return {string} A React ID.12026* @internal12027*/12028createReactID: function(rootID, name) {12029return rootID + name;12030},1203112032/**12033* Gets the DOM ID of the React component that is the root of the tree that12034* contains the React component with the supplied DOM ID.12035*12036* @param {string} id DOM ID of a React component.12037* @return {?string} DOM ID of the React component that is the root.12038* @internal12039*/12040getReactRootIDFromNodeID: function(id) {12041if (id && id.charAt(0) === SEPARATOR && id.length > 1) {12042var index = id.indexOf(SEPARATOR, 1);12043return index > -1 ? id.substr(0, index) : id;12044}12045return null;12046},1204712048/**12049* Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that12050* should would receive a `mouseEnter` or `mouseLeave` event.12051*12052* NOTE: Does not invoke the callback on the nearest common ancestor because12053* nothing "entered" or "left" that element.12054*12055* @param {string} leaveID ID being left.12056* @param {string} enterID ID being entered.12057* @param {function} cb Callback to invoke on each entered/left ID.12058* @param {*} upArg Argument to invoke the callback with on left IDs.12059* @param {*} downArg Argument to invoke the callback with on entered IDs.12060* @internal12061*/12062traverseEnterLeave: function(leaveID, enterID, cb, upArg, downArg) {12063var ancestorID = getFirstCommonAncestorID(leaveID, enterID);12064if (ancestorID !== leaveID) {12065traverseParentPath(leaveID, ancestorID, cb, upArg, false, true);12066}12067if (ancestorID !== enterID) {12068traverseParentPath(ancestorID, enterID, cb, downArg, true, false);12069}12070},1207112072/**12073* Simulates the traversal of a two-phase, capture/bubble event dispatch.12074*12075* NOTE: This traversal happens on IDs without touching the DOM.12076*12077* @param {string} targetID ID of the target node.12078* @param {function} cb Callback to invoke.12079* @param {*} arg Argument to invoke the callback with.12080* @internal12081*/12082traverseTwoPhase: function(targetID, cb, arg) {12083if (targetID) {12084traverseParentPath('', targetID, cb, arg, true, false);12085traverseParentPath(targetID, '', cb, arg, false, true);12086}12087},1208812089/**12090* Traverse a node ID, calling the supplied `cb` for each ancestor ID. For12091* example, passing `.0.$row-0.1` would result in `cb` getting called12092* with `.0`, `.0.$row-0`, and `.0.$row-0.1`.12093*12094* NOTE: This traversal happens on IDs without touching the DOM.12095*12096* @param {string} targetID ID of the target node.12097* @param {function} cb Callback to invoke.12098* @param {*} arg Argument to invoke the callback with.12099* @internal12100*/12101traverseAncestors: function(targetID, cb, arg) {12102traverseParentPath('', targetID, cb, arg, true, false);12103},1210412105/**12106* Exposed for unit testing.12107* @private12108*/12109_getFirstCommonAncestorID: getFirstCommonAncestorID,1211012111/**12112* Exposed for unit testing.12113* @private12114*/12115_getNextDescendantID: getNextDescendantID,1211612117isAncestorIDOf: isAncestorIDOf,1211812119SEPARATOR: SEPARATOR1212012121};1212212123module.exports = ReactInstanceHandles;1212412125},{"150":150,"91":91}],73:[function(_dereq_,module,exports){12126/**12127* Copyright 2013-2015, Facebook, Inc.12128* All rights reserved.12129*12130* This source code is licensed under the BSD-style license found in the12131* LICENSE file in the root directory of this source tree. An additional grant12132* of patent rights can be found in the PATENTS file in the same directory.12133*12134* @providesModule ReactInstanceMap12135*/1213612137'use strict';1213812139/**12140* `ReactInstanceMap` maintains a mapping from a public facing stateful12141* instance (key) and the internal representation (value). This allows public12142* methods to accept the user facing instance as an argument and map them back12143* to internal methods.12144*/1214512146// TODO: Replace this with ES6: var ReactInstanceMap = new Map();12147var ReactInstanceMap = {1214812149/**12150* This API should be called `delete` but we'd have to make sure to always12151* transform these to strings for IE support. When this transform is fully12152* supported we can rename it.12153*/12154remove: function(key) {12155key._reactInternalInstance = undefined;12156},1215712158get: function(key) {12159return key._reactInternalInstance;12160},1216112162has: function(key) {12163return key._reactInternalInstance !== undefined;12164},1216512166set: function(key, value) {12167key._reactInternalInstance = value;12168}1216912170};1217112172module.exports = ReactInstanceMap;1217312174},{}],74:[function(_dereq_,module,exports){12175/**12176* Copyright 2015, Facebook, Inc.12177* All rights reserved.12178*12179* This source code is licensed under the BSD-style license found in the12180* LICENSE file in the root directory of this source tree. An additional grant12181* of patent rights can be found in the PATENTS file in the same directory.12182*12183* @providesModule ReactLifeCycle12184*/1218512186'use strict';1218712188/**12189* This module manages the bookkeeping when a component is in the process12190* of being mounted or being unmounted. This is used as a way to enforce12191* invariants (or warnings) when it is not recommended to call12192* setState/forceUpdate.12193*12194* currentlyMountingInstance: During the construction phase, it is not possible12195* to trigger an update since the instance is not fully mounted yet. However, we12196* currently allow this as a convenience for mutating the initial state.12197*12198* currentlyUnmountingInstance: During the unmounting phase, the instance is12199* still mounted and can therefore schedule an update. However, this is not12200* recommended and probably an error since it's about to be unmounted.12201* Therefore we still want to trigger in an error for that case.12202*/1220312204var ReactLifeCycle = {12205currentlyMountingInstance: null,12206currentlyUnmountingInstance: null12207};1220812209module.exports = ReactLifeCycle;1221012211},{}],75:[function(_dereq_,module,exports){12212/**12213* Copyright 2013-2015, Facebook, Inc.12214* All rights reserved.12215*12216* This source code is licensed under the BSD-style license found in the12217* LICENSE file in the root directory of this source tree. An additional grant12218* of patent rights can be found in the PATENTS file in the same directory.12219*12220* @providesModule ReactLink12221* @typechecks static-only12222*/1222312224'use strict';1222512226/**12227* ReactLink encapsulates a common pattern in which a component wants to modify12228* a prop received from its parent. ReactLink allows the parent to pass down a12229* value coupled with a callback that, when invoked, expresses an intent to12230* modify that value. For example:12231*12232* React.createClass({12233* getInitialState: function() {12234* return {value: ''};12235* },12236* render: function() {12237* var valueLink = new ReactLink(this.state.value, this._handleValueChange);12238* return <input valueLink={valueLink} />;12239* },12240* this._handleValueChange: function(newValue) {12241* this.setState({value: newValue});12242* }12243* });12244*12245* We have provided some sugary mixins to make the creation and12246* consumption of ReactLink easier; see LinkedValueUtils and LinkedStateMixin.12247*/1224812249var React = _dereq_(31);1225012251/**12252* @param {*} value current value of the link12253* @param {function} requestChange callback to request a change12254*/12255function ReactLink(value, requestChange) {12256this.value = value;12257this.requestChange = requestChange;12258}1225912260/**12261* Creates a PropType that enforces the ReactLink API and optionally checks the12262* type of the value being passed inside the link. Example:12263*12264* MyComponent.propTypes = {12265* tabIndexLink: ReactLink.PropTypes.link(React.PropTypes.number)12266* }12267*/12268function createLinkTypeChecker(linkType) {12269var shapes = {12270value: typeof linkType === 'undefined' ?12271React.PropTypes.any.isRequired :12272linkType.isRequired,12273requestChange: React.PropTypes.func.isRequired12274};12275return React.PropTypes.shape(shapes);12276}1227712278ReactLink.PropTypes = {12279link: createLinkTypeChecker12280};1228112282module.exports = ReactLink;1228312284},{"31":31}],76:[function(_dereq_,module,exports){12285/**12286* Copyright 2013-2015, Facebook, Inc.12287* All rights reserved.12288*12289* This source code is licensed under the BSD-style license found in the12290* LICENSE file in the root directory of this source tree. An additional grant12291* of patent rights can be found in the PATENTS file in the same directory.12292*12293* @providesModule ReactMarkupChecksum12294*/1229512296'use strict';1229712298var adler32 = _dereq_(119);1229912300var ReactMarkupChecksum = {12301CHECKSUM_ATTR_NAME: 'data-react-checksum',1230212303/**12304* @param {string} markup Markup string12305* @return {string} Markup string with checksum attribute attached12306*/12307addChecksumToMarkup: function(markup) {12308var checksum = adler32(markup);12309return markup.replace(12310'>',12311' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '">'12312);12313},1231412315/**12316* @param {string} markup to use12317* @param {DOMElement} element root React element12318* @returns {boolean} whether or not the markup is the same12319*/12320canReuseMarkup: function(markup, element) {12321var existingChecksum = element.getAttribute(12322ReactMarkupChecksum.CHECKSUM_ATTR_NAME12323);12324existingChecksum = existingChecksum && parseInt(existingChecksum, 10);12325var markupChecksum = adler32(markup);12326return markupChecksum === existingChecksum;12327}12328};1232912330module.exports = ReactMarkupChecksum;1233112332},{"119":119}],77:[function(_dereq_,module,exports){12333/**12334* Copyright 2013-2015, Facebook, Inc.12335* All rights reserved.12336*12337* This source code is licensed under the BSD-style license found in the12338* LICENSE file in the root directory of this source tree. An additional grant12339* of patent rights can be found in the PATENTS file in the same directory.12340*12341* @providesModule ReactMount12342*/1234312344'use strict';1234512346var DOMProperty = _dereq_(11);12347var ReactBrowserEventEmitter = _dereq_(33);12348var ReactCurrentOwner = _dereq_(45);12349var ReactElement = _dereq_(63);12350var ReactElementValidator = _dereq_(64);12351var ReactEmptyComponent = _dereq_(65);12352var ReactInstanceHandles = _dereq_(72);12353var ReactInstanceMap = _dereq_(73);12354var ReactMarkupChecksum = _dereq_(76);12355var ReactPerf = _dereq_(82);12356var ReactReconciler = _dereq_(89);12357var ReactUpdateQueue = _dereq_(99);12358var ReactUpdates = _dereq_(100);1235912360var emptyObject = _dereq_(130);12361var containsNode = _dereq_(123);12362var getReactRootElementInContainer = _dereq_(144);12363var instantiateReactComponent = _dereq_(149);12364var invariant = _dereq_(150);12365var setInnerHTML = _dereq_(164);12366var shouldUpdateReactComponent = _dereq_(167);12367var warning = _dereq_(171);1236812369var SEPARATOR = ReactInstanceHandles.SEPARATOR;1237012371var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;12372var nodeCache = {};1237312374var ELEMENT_NODE_TYPE = 1;12375var DOC_NODE_TYPE = 9;1237612377/** Mapping from reactRootID to React component instance. */12378var instancesByReactRootID = {};1237912380/** Mapping from reactRootID to `container` nodes. */12381var containersByReactRootID = {};1238212383if ("production" !== "development") {12384/** __DEV__-only mapping from reactRootID to root elements. */12385var rootElementsByReactRootID = {};12386}1238712388// Used to store breadth-first search state in findComponentRoot.12389var findComponentRootReusableArray = [];1239012391/**12392* Finds the index of the first character12393* that's not common between the two given strings.12394*12395* @return {number} the index of the character where the strings diverge12396*/12397function firstDifferenceIndex(string1, string2) {12398var minLen = Math.min(string1.length, string2.length);12399for (var i = 0; i < minLen; i++) {12400if (string1.charAt(i) !== string2.charAt(i)) {12401return i;12402}12403}12404return string1.length === string2.length ? -1 : minLen;12405}1240612407/**12408* @param {DOMElement} container DOM element that may contain a React component.12409* @return {?string} A "reactRoot" ID, if a React component is rendered.12410*/12411function getReactRootID(container) {12412var rootElement = getReactRootElementInContainer(container);12413return rootElement && ReactMount.getID(rootElement);12414}1241512416/**12417* Accessing node[ATTR_NAME] or calling getAttribute(ATTR_NAME) on a form12418* element can return its control whose name or ID equals ATTR_NAME. All12419* DOM nodes support `getAttributeNode` but this can also get called on12420* other objects so just return '' if we're given something other than a12421* DOM node (such as window).12422*12423* @param {?DOMElement|DOMWindow|DOMDocument|DOMTextNode} node DOM node.12424* @return {string} ID of the supplied `domNode`.12425*/12426function getID(node) {12427var id = internalGetID(node);12428if (id) {12429if (nodeCache.hasOwnProperty(id)) {12430var cached = nodeCache[id];12431if (cached !== node) {12432("production" !== "development" ? invariant(12433!isValid(cached, id),12434'ReactMount: Two valid but unequal nodes with the same `%s`: %s',12435ATTR_NAME, id12436) : invariant(!isValid(cached, id)));1243712438nodeCache[id] = node;12439}12440} else {12441nodeCache[id] = node;12442}12443}1244412445return id;12446}1244712448function internalGetID(node) {12449// If node is something like a window, document, or text node, none of12450// which support attributes or a .getAttribute method, gracefully return12451// the empty string, as if the attribute were missing.12452return node && node.getAttribute && node.getAttribute(ATTR_NAME) || '';12453}1245412455/**12456* Sets the React-specific ID of the given node.12457*12458* @param {DOMElement} node The DOM node whose ID will be set.12459* @param {string} id The value of the ID attribute.12460*/12461function setID(node, id) {12462var oldID = internalGetID(node);12463if (oldID !== id) {12464delete nodeCache[oldID];12465}12466node.setAttribute(ATTR_NAME, id);12467nodeCache[id] = node;12468}1246912470/**12471* Finds the node with the supplied React-generated DOM ID.12472*12473* @param {string} id A React-generated DOM ID.12474* @return {DOMElement} DOM node with the suppled `id`.12475* @internal12476*/12477function getNode(id) {12478if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) {12479nodeCache[id] = ReactMount.findReactNodeByID(id);12480}12481return nodeCache[id];12482}1248312484/**12485* Finds the node with the supplied public React instance.12486*12487* @param {*} instance A public React instance.12488* @return {?DOMElement} DOM node with the suppled `id`.12489* @internal12490*/12491function getNodeFromInstance(instance) {12492var id = ReactInstanceMap.get(instance)._rootNodeID;12493if (ReactEmptyComponent.isNullComponentID(id)) {12494return null;12495}12496if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) {12497nodeCache[id] = ReactMount.findReactNodeByID(id);12498}12499return nodeCache[id];12500}1250112502/**12503* A node is "valid" if it is contained by a currently mounted container.12504*12505* This means that the node does not have to be contained by a document in12506* order to be considered valid.12507*12508* @param {?DOMElement} node The candidate DOM node.12509* @param {string} id The expected ID of the node.12510* @return {boolean} Whether the node is contained by a mounted container.12511*/12512function isValid(node, id) {12513if (node) {12514("production" !== "development" ? invariant(12515internalGetID(node) === id,12516'ReactMount: Unexpected modification of `%s`',12517ATTR_NAME12518) : invariant(internalGetID(node) === id));1251912520var container = ReactMount.findReactContainerForID(id);12521if (container && containsNode(container, node)) {12522return true;12523}12524}1252512526return false;12527}1252812529/**12530* Causes the cache to forget about one React-specific ID.12531*12532* @param {string} id The ID to forget.12533*/12534function purgeID(id) {12535delete nodeCache[id];12536}1253712538var deepestNodeSoFar = null;12539function findDeepestCachedAncestorImpl(ancestorID) {12540var ancestor = nodeCache[ancestorID];12541if (ancestor && isValid(ancestor, ancestorID)) {12542deepestNodeSoFar = ancestor;12543} else {12544// This node isn't populated in the cache, so presumably none of its12545// descendants are. Break out of the loop.12546return false;12547}12548}1254912550/**12551* Return the deepest cached node whose ID is a prefix of `targetID`.12552*/12553function findDeepestCachedAncestor(targetID) {12554deepestNodeSoFar = null;12555ReactInstanceHandles.traverseAncestors(12556targetID,12557findDeepestCachedAncestorImpl12558);1255912560var foundNode = deepestNodeSoFar;12561deepestNodeSoFar = null;12562return foundNode;12563}1256412565/**12566* Mounts this component and inserts it into the DOM.12567*12568* @param {ReactComponent} componentInstance The instance to mount.12569* @param {string} rootID DOM ID of the root node.12570* @param {DOMElement} container DOM element to mount into.12571* @param {ReactReconcileTransaction} transaction12572* @param {boolean} shouldReuseMarkup If true, do not insert markup12573*/12574function mountComponentIntoNode(12575componentInstance,12576rootID,12577container,12578transaction,12579shouldReuseMarkup) {12580var markup = ReactReconciler.mountComponent(12581componentInstance, rootID, transaction, emptyObject12582);12583componentInstance._isTopLevel = true;12584ReactMount._mountImageIntoNode(markup, container, shouldReuseMarkup);12585}1258612587/**12588* Batched mount.12589*12590* @param {ReactComponent} componentInstance The instance to mount.12591* @param {string} rootID DOM ID of the root node.12592* @param {DOMElement} container DOM element to mount into.12593* @param {boolean} shouldReuseMarkup If true, do not insert markup12594*/12595function batchedMountComponentIntoNode(12596componentInstance,12597rootID,12598container,12599shouldReuseMarkup) {12600var transaction = ReactUpdates.ReactReconcileTransaction.getPooled();12601transaction.perform(12602mountComponentIntoNode,12603null,12604componentInstance,12605rootID,12606container,12607transaction,12608shouldReuseMarkup12609);12610ReactUpdates.ReactReconcileTransaction.release(transaction);12611}1261212613/**12614* Mounting is the process of initializing a React component by creating its12615* representative DOM elements and inserting them into a supplied `container`.12616* Any prior content inside `container` is destroyed in the process.12617*12618* ReactMount.render(12619* component,12620* document.getElementById('container')12621* );12622*12623* <div id="container"> <-- Supplied `container`.12624* <div data-reactid=".3"> <-- Rendered reactRoot of React12625* // ... component.12626* </div>12627* </div>12628*12629* Inside of `container`, the first element rendered is the "reactRoot".12630*/12631var ReactMount = {12632/** Exposed for debugging purposes **/12633_instancesByReactRootID: instancesByReactRootID,1263412635/**12636* This is a hook provided to support rendering React components while12637* ensuring that the apparent scroll position of its `container` does not12638* change.12639*12640* @param {DOMElement} container The `container` being rendered into.12641* @param {function} renderCallback This must be called once to do the render.12642*/12643scrollMonitor: function(container, renderCallback) {12644renderCallback();12645},1264612647/**12648* Take a component that's already mounted into the DOM and replace its props12649* @param {ReactComponent} prevComponent component instance already in the DOM12650* @param {ReactElement} nextElement component instance to render12651* @param {DOMElement} container container to render into12652* @param {?function} callback function triggered on completion12653*/12654_updateRootComponent: function(12655prevComponent,12656nextElement,12657container,12658callback) {12659if ("production" !== "development") {12660ReactElementValidator.checkAndWarnForMutatedProps(nextElement);12661}1266212663ReactMount.scrollMonitor(container, function() {12664ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement);12665if (callback) {12666ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);12667}12668});1266912670if ("production" !== "development") {12671// Record the root element in case it later gets transplanted.12672rootElementsByReactRootID[getReactRootID(container)] =12673getReactRootElementInContainer(container);12674}1267512676return prevComponent;12677},1267812679/**12680* Register a component into the instance map and starts scroll value12681* monitoring12682* @param {ReactComponent} nextComponent component instance to render12683* @param {DOMElement} container container to render into12684* @return {string} reactRoot ID prefix12685*/12686_registerComponent: function(nextComponent, container) {12687("production" !== "development" ? invariant(12688container && (12689(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)12690),12691'_registerComponent(...): Target container is not a DOM element.'12692) : invariant(container && (12693(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)12694)));1269512696ReactBrowserEventEmitter.ensureScrollValueMonitoring();1269712698var reactRootID = ReactMount.registerContainer(container);12699instancesByReactRootID[reactRootID] = nextComponent;12700return reactRootID;12701},1270212703/**12704* Render a new component into the DOM.12705* @param {ReactElement} nextElement element to render12706* @param {DOMElement} container container to render into12707* @param {boolean} shouldReuseMarkup if we should skip the markup insertion12708* @return {ReactComponent} nextComponent12709*/12710_renderNewRootComponent: function(12711nextElement,12712container,12713shouldReuseMarkup12714) {12715// Various parts of our code (such as ReactCompositeComponent's12716// _renderValidatedComponent) assume that calls to render aren't nested;12717// verify that that's the case.12718("production" !== "development" ? warning(12719ReactCurrentOwner.current == null,12720'_renderNewRootComponent(): Render methods should be a pure function ' +12721'of props and state; triggering nested component updates from ' +12722'render is not allowed. If necessary, trigger nested updates in ' +12723'componentDidUpdate.'12724) : null);1272512726var componentInstance = instantiateReactComponent(nextElement, null);12727var reactRootID = ReactMount._registerComponent(12728componentInstance,12729container12730);1273112732// The initial render is synchronous but any updates that happen during12733// rendering, in componentWillMount or componentDidMount, will be batched12734// according to the current batching strategy.1273512736ReactUpdates.batchedUpdates(12737batchedMountComponentIntoNode,12738componentInstance,12739reactRootID,12740container,12741shouldReuseMarkup12742);1274312744if ("production" !== "development") {12745// Record the root element in case it later gets transplanted.12746rootElementsByReactRootID[reactRootID] =12747getReactRootElementInContainer(container);12748}1274912750return componentInstance;12751},1275212753/**12754* Renders a React component into the DOM in the supplied `container`.12755*12756* If the React component was previously rendered into `container`, this will12757* perform an update on it and only mutate the DOM as necessary to reflect the12758* latest React component.12759*12760* @param {ReactElement} nextElement Component element to render.12761* @param {DOMElement} container DOM element to render into.12762* @param {?function} callback function triggered on completion12763* @return {ReactComponent} Component instance rendered in `container`.12764*/12765render: function(nextElement, container, callback) {12766("production" !== "development" ? invariant(12767ReactElement.isValidElement(nextElement),12768'React.render(): Invalid component element.%s',12769(12770typeof nextElement === 'string' ?12771' Instead of passing an element string, make sure to instantiate ' +12772'it by passing it to React.createElement.' :12773typeof nextElement === 'function' ?12774' Instead of passing a component class, make sure to instantiate ' +12775'it by passing it to React.createElement.' :12776// Check if it quacks like an element12777nextElement != null && nextElement.props !== undefined ?12778' This may be caused by unintentionally loading two independent ' +12779'copies of React.' :12780''12781)12782) : invariant(ReactElement.isValidElement(nextElement)));1278312784var prevComponent = instancesByReactRootID[getReactRootID(container)];1278512786if (prevComponent) {12787var prevElement = prevComponent._currentElement;12788if (shouldUpdateReactComponent(prevElement, nextElement)) {12789return ReactMount._updateRootComponent(12790prevComponent,12791nextElement,12792container,12793callback12794).getPublicInstance();12795} else {12796ReactMount.unmountComponentAtNode(container);12797}12798}1279912800var reactRootElement = getReactRootElementInContainer(container);12801var containerHasReactMarkup =12802reactRootElement && ReactMount.isRenderedByReact(reactRootElement);1280312804if ("production" !== "development") {12805if (!containerHasReactMarkup || reactRootElement.nextSibling) {12806var rootElementSibling = reactRootElement;12807while (rootElementSibling) {12808if (ReactMount.isRenderedByReact(rootElementSibling)) {12809("production" !== "development" ? warning(12810false,12811'render(): Target node has markup rendered by React, but there ' +12812'are unrelated nodes as well. This is most commonly caused by ' +12813'white-space inserted around server-rendered markup.'12814) : null);12815break;12816}1281712818rootElementSibling = rootElementSibling.nextSibling;12819}12820}12821}1282212823var shouldReuseMarkup = containerHasReactMarkup && !prevComponent;1282412825var component = ReactMount._renderNewRootComponent(12826nextElement,12827container,12828shouldReuseMarkup12829).getPublicInstance();12830if (callback) {12831callback.call(component);12832}12833return component;12834},1283512836/**12837* Constructs a component instance of `constructor` with `initialProps` and12838* renders it into the supplied `container`.12839*12840* @param {function} constructor React component constructor.12841* @param {?object} props Initial props of the component instance.12842* @param {DOMElement} container DOM element to render into.12843* @return {ReactComponent} Component instance rendered in `container`.12844*/12845constructAndRenderComponent: function(constructor, props, container) {12846var element = ReactElement.createElement(constructor, props);12847return ReactMount.render(element, container);12848},1284912850/**12851* Constructs a component instance of `constructor` with `initialProps` and12852* renders it into a container node identified by supplied `id`.12853*12854* @param {function} componentConstructor React component constructor12855* @param {?object} props Initial props of the component instance.12856* @param {string} id ID of the DOM element to render into.12857* @return {ReactComponent} Component instance rendered in the container node.12858*/12859constructAndRenderComponentByID: function(constructor, props, id) {12860var domNode = document.getElementById(id);12861("production" !== "development" ? invariant(12862domNode,12863'Tried to get element with id of "%s" but it is not present on the page.',12864id12865) : invariant(domNode));12866return ReactMount.constructAndRenderComponent(constructor, props, domNode);12867},1286812869/**12870* Registers a container node into which React components will be rendered.12871* This also creates the "reactRoot" ID that will be assigned to the element12872* rendered within.12873*12874* @param {DOMElement} container DOM element to register as a container.12875* @return {string} The "reactRoot" ID of elements rendered within.12876*/12877registerContainer: function(container) {12878var reactRootID = getReactRootID(container);12879if (reactRootID) {12880// If one exists, make sure it is a valid "reactRoot" ID.12881reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID);12882}12883if (!reactRootID) {12884// No valid "reactRoot" ID found, create one.12885reactRootID = ReactInstanceHandles.createReactRootID();12886}12887containersByReactRootID[reactRootID] = container;12888return reactRootID;12889},1289012891/**12892* Unmounts and destroys the React component rendered in the `container`.12893*12894* @param {DOMElement} container DOM element containing a React component.12895* @return {boolean} True if a component was found in and unmounted from12896* `container`12897*/12898unmountComponentAtNode: function(container) {12899// Various parts of our code (such as ReactCompositeComponent's12900// _renderValidatedComponent) assume that calls to render aren't nested;12901// verify that that's the case. (Strictly speaking, unmounting won't cause a12902// render but we still don't expect to be in a render call here.)12903("production" !== "development" ? warning(12904ReactCurrentOwner.current == null,12905'unmountComponentAtNode(): Render methods should be a pure function of ' +12906'props and state; triggering nested component updates from render is ' +12907'not allowed. If necessary, trigger nested updates in ' +12908'componentDidUpdate.'12909) : null);1291012911("production" !== "development" ? invariant(12912container && (12913(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)12914),12915'unmountComponentAtNode(...): Target container is not a DOM element.'12916) : invariant(container && (12917(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)12918)));1291912920var reactRootID = getReactRootID(container);12921var component = instancesByReactRootID[reactRootID];12922if (!component) {12923return false;12924}12925ReactMount.unmountComponentFromNode(component, container);12926delete instancesByReactRootID[reactRootID];12927delete containersByReactRootID[reactRootID];12928if ("production" !== "development") {12929delete rootElementsByReactRootID[reactRootID];12930}12931return true;12932},1293312934/**12935* Unmounts a component and removes it from the DOM.12936*12937* @param {ReactComponent} instance React component instance.12938* @param {DOMElement} container DOM element to unmount from.12939* @final12940* @internal12941* @see {ReactMount.unmountComponentAtNode}12942*/12943unmountComponentFromNode: function(instance, container) {12944ReactReconciler.unmountComponent(instance);1294512946if (container.nodeType === DOC_NODE_TYPE) {12947container = container.documentElement;12948}1294912950// http://jsperf.com/emptying-a-node12951while (container.lastChild) {12952container.removeChild(container.lastChild);12953}12954},1295512956/**12957* Finds the container DOM element that contains React component to which the12958* supplied DOM `id` belongs.12959*12960* @param {string} id The ID of an element rendered by a React component.12961* @return {?DOMElement} DOM element that contains the `id`.12962*/12963findReactContainerForID: function(id) {12964var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id);12965var container = containersByReactRootID[reactRootID];1296612967if ("production" !== "development") {12968var rootElement = rootElementsByReactRootID[reactRootID];12969if (rootElement && rootElement.parentNode !== container) {12970("production" !== "development" ? invariant(12971// Call internalGetID here because getID calls isValid which calls12972// findReactContainerForID (this function).12973internalGetID(rootElement) === reactRootID,12974'ReactMount: Root element ID differed from reactRootID.'12975) : invariant(// Call internalGetID here because getID calls isValid which calls12976// findReactContainerForID (this function).12977internalGetID(rootElement) === reactRootID));1297812979var containerChild = container.firstChild;12980if (containerChild &&12981reactRootID === internalGetID(containerChild)) {12982// If the container has a new child with the same ID as the old12983// root element, then rootElementsByReactRootID[reactRootID] is12984// just stale and needs to be updated. The case that deserves a12985// warning is when the container is empty.12986rootElementsByReactRootID[reactRootID] = containerChild;12987} else {12988("production" !== "development" ? warning(12989false,12990'ReactMount: Root element has been removed from its original ' +12991'container. New container:', rootElement.parentNode12992) : null);12993}12994}12995}1299612997return container;12998},1299913000/**13001* Finds an element rendered by React with the supplied ID.13002*13003* @param {string} id ID of a DOM node in the React component.13004* @return {DOMElement} Root DOM node of the React component.13005*/13006findReactNodeByID: function(id) {13007var reactRoot = ReactMount.findReactContainerForID(id);13008return ReactMount.findComponentRoot(reactRoot, id);13009},1301013011/**13012* True if the supplied `node` is rendered by React.13013*13014* @param {*} node DOM Element to check.13015* @return {boolean} True if the DOM Element appears to be rendered by React.13016* @internal13017*/13018isRenderedByReact: function(node) {13019if (node.nodeType !== 1) {13020// Not a DOMElement, therefore not a React component13021return false;13022}13023var id = ReactMount.getID(node);13024return id ? id.charAt(0) === SEPARATOR : false;13025},1302613027/**13028* Traverses up the ancestors of the supplied node to find a node that is a13029* DOM representation of a React component.13030*13031* @param {*} node13032* @return {?DOMEventTarget}13033* @internal13034*/13035getFirstReactDOM: function(node) {13036var current = node;13037while (current && current.parentNode !== current) {13038if (ReactMount.isRenderedByReact(current)) {13039return current;13040}13041current = current.parentNode;13042}13043return null;13044},1304513046/**13047* Finds a node with the supplied `targetID` inside of the supplied13048* `ancestorNode`. Exploits the ID naming scheme to perform the search13049* quickly.13050*13051* @param {DOMEventTarget} ancestorNode Search from this root.13052* @pararm {string} targetID ID of the DOM representation of the component.13053* @return {DOMEventTarget} DOM node with the supplied `targetID`.13054* @internal13055*/13056findComponentRoot: function(ancestorNode, targetID) {13057var firstChildren = findComponentRootReusableArray;13058var childIndex = 0;1305913060var deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode;1306113062firstChildren[0] = deepestAncestor.firstChild;13063firstChildren.length = 1;1306413065while (childIndex < firstChildren.length) {13066var child = firstChildren[childIndex++];13067var targetChild;1306813069while (child) {13070var childID = ReactMount.getID(child);13071if (childID) {13072// Even if we find the node we're looking for, we finish looping13073// through its siblings to ensure they're cached so that we don't have13074// to revisit this node again. Otherwise, we make n^2 calls to getID13075// when visiting the many children of a single node in order.1307613077if (targetID === childID) {13078targetChild = child;13079} else if (ReactInstanceHandles.isAncestorIDOf(childID, targetID)) {13080// If we find a child whose ID is an ancestor of the given ID,13081// then we can be sure that we only want to search the subtree13082// rooted at this child, so we can throw out the rest of the13083// search state.13084firstChildren.length = childIndex = 0;13085firstChildren.push(child.firstChild);13086}1308713088} else {13089// If this child had no ID, then there's a chance that it was13090// injected automatically by the browser, as when a `<table>`13091// element sprouts an extra `<tbody>` child as a side effect of13092// `.innerHTML` parsing. Optimistically continue down this13093// branch, but not before examining the other siblings.13094firstChildren.push(child.firstChild);13095}1309613097child = child.nextSibling;13098}1309913100if (targetChild) {13101// Emptying firstChildren/findComponentRootReusableArray is13102// not necessary for correctness, but it helps the GC reclaim13103// any nodes that were left at the end of the search.13104firstChildren.length = 0;1310513106return targetChild;13107}13108}1310913110firstChildren.length = 0;1311113112("production" !== "development" ? invariant(13113false,13114'findComponentRoot(..., %s): Unable to find element. This probably ' +13115'means the DOM was unexpectedly mutated (e.g., by the browser), ' +13116'usually due to forgetting a <tbody> when using tables, nesting tags ' +13117'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' +13118'parent. ' +13119'Try inspecting the child nodes of the element with React ID `%s`.',13120targetID,13121ReactMount.getID(ancestorNode)13122) : invariant(false));13123},1312413125_mountImageIntoNode: function(markup, container, shouldReuseMarkup) {13126("production" !== "development" ? invariant(13127container && (13128(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)13129),13130'mountComponentIntoNode(...): Target container is not valid.'13131) : invariant(container && (13132(container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)13133)));1313413135if (shouldReuseMarkup) {13136var rootElement = getReactRootElementInContainer(container);13137if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {13138return;13139} else {13140var checksum = rootElement.getAttribute(13141ReactMarkupChecksum.CHECKSUM_ATTR_NAME13142);13143rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);1314413145var rootMarkup = rootElement.outerHTML;13146rootElement.setAttribute(13147ReactMarkupChecksum.CHECKSUM_ATTR_NAME,13148checksum13149);1315013151var diffIndex = firstDifferenceIndex(markup, rootMarkup);13152var difference = ' (client) ' +13153markup.substring(diffIndex - 20, diffIndex + 20) +13154'\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);1315513156("production" !== "development" ? invariant(13157container.nodeType !== DOC_NODE_TYPE,13158'You\'re trying to render a component to the document using ' +13159'server rendering but the checksum was invalid. This usually ' +13160'means you rendered a different component type or props on ' +13161'the client from the one on the server, or your render() ' +13162'methods are impure. React cannot handle this case due to ' +13163'cross-browser quirks by rendering at the document root. You ' +13164'should look for environment dependent code in your components ' +13165'and ensure the props are the same client and server side:\n%s',13166difference13167) : invariant(container.nodeType !== DOC_NODE_TYPE));1316813169if ("production" !== "development") {13170("production" !== "development" ? warning(13171false,13172'React attempted to reuse markup in a container but the ' +13173'checksum was invalid. This generally means that you are ' +13174'using server rendering and the markup generated on the ' +13175'server was not what the client was expecting. React injected ' +13176'new markup to compensate which works but you have lost many ' +13177'of the benefits of server rendering. Instead, figure out ' +13178'why the markup being generated is different on the client ' +13179'or server:\n%s',13180difference13181) : null);13182}13183}13184}1318513186("production" !== "development" ? invariant(13187container.nodeType !== DOC_NODE_TYPE,13188'You\'re trying to render a component to the document but ' +13189'you didn\'t use server rendering. We can\'t do this ' +13190'without using server rendering due to cross-browser quirks. ' +13191'See React.renderToString() for server rendering.'13192) : invariant(container.nodeType !== DOC_NODE_TYPE));1319313194setInnerHTML(container, markup);13195},1319613197/**13198* React ID utilities.13199*/1320013201getReactRootID: getReactRootID,1320213203getID: getID,1320413205setID: setID,1320613207getNode: getNode,1320813209getNodeFromInstance: getNodeFromInstance,1321013211purgeID: purgeID13212};1321313214ReactPerf.measureMethods(ReactMount, 'ReactMount', {13215_renderNewRootComponent: '_renderNewRootComponent',13216_mountImageIntoNode: '_mountImageIntoNode'13217});1321813219module.exports = ReactMount;1322013221},{"100":100,"11":11,"123":123,"130":130,"144":144,"149":149,"150":150,"164":164,"167":167,"171":171,"33":33,"45":45,"63":63,"64":64,"65":65,"72":72,"73":73,"76":76,"82":82,"89":89,"99":99}],78:[function(_dereq_,module,exports){13222/**13223* Copyright 2013-2015, Facebook, Inc.13224* All rights reserved.13225*13226* This source code is licensed under the BSD-style license found in the13227* LICENSE file in the root directory of this source tree. An additional grant13228* of patent rights can be found in the PATENTS file in the same directory.13229*13230* @providesModule ReactMultiChild13231* @typechecks static-only13232*/1323313234'use strict';1323513236var ReactComponentEnvironment = _dereq_(41);13237var ReactMultiChildUpdateTypes = _dereq_(79);1323813239var ReactReconciler = _dereq_(89);13240var ReactChildReconciler = _dereq_(36);1324113242/**13243* Updating children of a component may trigger recursive updates. The depth is13244* used to batch recursive updates to render markup more efficiently.13245*13246* @type {number}13247* @private13248*/13249var updateDepth = 0;1325013251/**13252* Queue of update configuration objects.13253*13254* Each object has a `type` property that is in `ReactMultiChildUpdateTypes`.13255*13256* @type {array<object>}13257* @private13258*/13259var updateQueue = [];1326013261/**13262* Queue of markup to be rendered.13263*13264* @type {array<string>}13265* @private13266*/13267var markupQueue = [];1326813269/**13270* Enqueues markup to be rendered and inserted at a supplied index.13271*13272* @param {string} parentID ID of the parent component.13273* @param {string} markup Markup that renders into an element.13274* @param {number} toIndex Destination index.13275* @private13276*/13277function enqueueMarkup(parentID, markup, toIndex) {13278// NOTE: Null values reduce hidden classes.13279updateQueue.push({13280parentID: parentID,13281parentNode: null,13282type: ReactMultiChildUpdateTypes.INSERT_MARKUP,13283markupIndex: markupQueue.push(markup) - 1,13284textContent: null,13285fromIndex: null,13286toIndex: toIndex13287});13288}1328913290/**13291* Enqueues moving an existing element to another index.13292*13293* @param {string} parentID ID of the parent component.13294* @param {number} fromIndex Source index of the existing element.13295* @param {number} toIndex Destination index of the element.13296* @private13297*/13298function enqueueMove(parentID, fromIndex, toIndex) {13299// NOTE: Null values reduce hidden classes.13300updateQueue.push({13301parentID: parentID,13302parentNode: null,13303type: ReactMultiChildUpdateTypes.MOVE_EXISTING,13304markupIndex: null,13305textContent: null,13306fromIndex: fromIndex,13307toIndex: toIndex13308});13309}1331013311/**13312* Enqueues removing an element at an index.13313*13314* @param {string} parentID ID of the parent component.13315* @param {number} fromIndex Index of the element to remove.13316* @private13317*/13318function enqueueRemove(parentID, fromIndex) {13319// NOTE: Null values reduce hidden classes.13320updateQueue.push({13321parentID: parentID,13322parentNode: null,13323type: ReactMultiChildUpdateTypes.REMOVE_NODE,13324markupIndex: null,13325textContent: null,13326fromIndex: fromIndex,13327toIndex: null13328});13329}1333013331/**13332* Enqueues setting the text content.13333*13334* @param {string} parentID ID of the parent component.13335* @param {string} textContent Text content to set.13336* @private13337*/13338function enqueueTextContent(parentID, textContent) {13339// NOTE: Null values reduce hidden classes.13340updateQueue.push({13341parentID: parentID,13342parentNode: null,13343type: ReactMultiChildUpdateTypes.TEXT_CONTENT,13344markupIndex: null,13345textContent: textContent,13346fromIndex: null,13347toIndex: null13348});13349}1335013351/**13352* Processes any enqueued updates.13353*13354* @private13355*/13356function processQueue() {13357if (updateQueue.length) {13358ReactComponentEnvironment.processChildrenUpdates(13359updateQueue,13360markupQueue13361);13362clearQueue();13363}13364}1336513366/**13367* Clears any enqueued updates.13368*13369* @private13370*/13371function clearQueue() {13372updateQueue.length = 0;13373markupQueue.length = 0;13374}1337513376/**13377* ReactMultiChild are capable of reconciling multiple children.13378*13379* @class ReactMultiChild13380* @internal13381*/13382var ReactMultiChild = {1338313384/**13385* Provides common functionality for components that must reconcile multiple13386* children. This is used by `ReactDOMComponent` to mount, update, and13387* unmount child components.13388*13389* @lends {ReactMultiChild.prototype}13390*/13391Mixin: {1339213393/**13394* Generates a "mount image" for each of the supplied children. In the case13395* of `ReactDOMComponent`, a mount image is a string of markup.13396*13397* @param {?object} nestedChildren Nested child maps.13398* @return {array} An array of mounted representations.13399* @internal13400*/13401mountChildren: function(nestedChildren, transaction, context) {13402var children = ReactChildReconciler.instantiateChildren(13403nestedChildren, transaction, context13404);13405this._renderedChildren = children;13406var mountImages = [];13407var index = 0;13408for (var name in children) {13409if (children.hasOwnProperty(name)) {13410var child = children[name];13411// Inlined for performance, see `ReactInstanceHandles.createReactID`.13412var rootID = this._rootNodeID + name;13413var mountImage = ReactReconciler.mountComponent(13414child,13415rootID,13416transaction,13417context13418);13419child._mountIndex = index;13420mountImages.push(mountImage);13421index++;13422}13423}13424return mountImages;13425},1342613427/**13428* Replaces any rendered children with a text content string.13429*13430* @param {string} nextContent String of content.13431* @internal13432*/13433updateTextContent: function(nextContent) {13434updateDepth++;13435var errorThrown = true;13436try {13437var prevChildren = this._renderedChildren;13438// Remove any rendered children.13439ReactChildReconciler.unmountChildren(prevChildren);13440// TODO: The setTextContent operation should be enough13441for (var name in prevChildren) {13442if (prevChildren.hasOwnProperty(name)) {13443this._unmountChildByName(prevChildren[name], name);13444}13445}13446// Set new text content.13447this.setTextContent(nextContent);13448errorThrown = false;13449} finally {13450updateDepth--;13451if (!updateDepth) {13452if (errorThrown) {13453clearQueue();13454} else {13455processQueue();13456}13457}13458}13459},1346013461/**13462* Updates the rendered children with new children.13463*13464* @param {?object} nextNestedChildren Nested child maps.13465* @param {ReactReconcileTransaction} transaction13466* @internal13467*/13468updateChildren: function(nextNestedChildren, transaction, context) {13469updateDepth++;13470var errorThrown = true;13471try {13472this._updateChildren(nextNestedChildren, transaction, context);13473errorThrown = false;13474} finally {13475updateDepth--;13476if (!updateDepth) {13477if (errorThrown) {13478clearQueue();13479} else {13480processQueue();13481}13482}1348313484}13485},1348613487/**13488* Improve performance by isolating this hot code path from the try/catch13489* block in `updateChildren`.13490*13491* @param {?object} nextNestedChildren Nested child maps.13492* @param {ReactReconcileTransaction} transaction13493* @final13494* @protected13495*/13496_updateChildren: function(nextNestedChildren, transaction, context) {13497var prevChildren = this._renderedChildren;13498var nextChildren = ReactChildReconciler.updateChildren(13499prevChildren, nextNestedChildren, transaction, context13500);13501this._renderedChildren = nextChildren;13502if (!nextChildren && !prevChildren) {13503return;13504}13505var name;13506// `nextIndex` will increment for each child in `nextChildren`, but13507// `lastIndex` will be the last index visited in `prevChildren`.13508var lastIndex = 0;13509var nextIndex = 0;13510for (name in nextChildren) {13511if (!nextChildren.hasOwnProperty(name)) {13512continue;13513}13514var prevChild = prevChildren && prevChildren[name];13515var nextChild = nextChildren[name];13516if (prevChild === nextChild) {13517this.moveChild(prevChild, nextIndex, lastIndex);13518lastIndex = Math.max(prevChild._mountIndex, lastIndex);13519prevChild._mountIndex = nextIndex;13520} else {13521if (prevChild) {13522// Update `lastIndex` before `_mountIndex` gets unset by unmounting.13523lastIndex = Math.max(prevChild._mountIndex, lastIndex);13524this._unmountChildByName(prevChild, name);13525}13526// The child must be instantiated before it's mounted.13527this._mountChildByNameAtIndex(13528nextChild, name, nextIndex, transaction, context13529);13530}13531nextIndex++;13532}13533// Remove children that are no longer present.13534for (name in prevChildren) {13535if (prevChildren.hasOwnProperty(name) &&13536!(nextChildren && nextChildren.hasOwnProperty(name))) {13537this._unmountChildByName(prevChildren[name], name);13538}13539}13540},1354113542/**13543* Unmounts all rendered children. This should be used to clean up children13544* when this component is unmounted.13545*13546* @internal13547*/13548unmountChildren: function() {13549var renderedChildren = this._renderedChildren;13550ReactChildReconciler.unmountChildren(renderedChildren);13551this._renderedChildren = null;13552},1355313554/**13555* Moves a child component to the supplied index.13556*13557* @param {ReactComponent} child Component to move.13558* @param {number} toIndex Destination index of the element.13559* @param {number} lastIndex Last index visited of the siblings of `child`.13560* @protected13561*/13562moveChild: function(child, toIndex, lastIndex) {13563// If the index of `child` is less than `lastIndex`, then it needs to13564// be moved. Otherwise, we do not need to move it because a child will be13565// inserted or moved before `child`.13566if (child._mountIndex < lastIndex) {13567enqueueMove(this._rootNodeID, child._mountIndex, toIndex);13568}13569},1357013571/**13572* Creates a child component.13573*13574* @param {ReactComponent} child Component to create.13575* @param {string} mountImage Markup to insert.13576* @protected13577*/13578createChild: function(child, mountImage) {13579enqueueMarkup(this._rootNodeID, mountImage, child._mountIndex);13580},1358113582/**13583* Removes a child component.13584*13585* @param {ReactComponent} child Child to remove.13586* @protected13587*/13588removeChild: function(child) {13589enqueueRemove(this._rootNodeID, child._mountIndex);13590},1359113592/**13593* Sets this text content string.13594*13595* @param {string} textContent Text content to set.13596* @protected13597*/13598setTextContent: function(textContent) {13599enqueueTextContent(this._rootNodeID, textContent);13600},1360113602/**13603* Mounts a child with the supplied name.13604*13605* NOTE: This is part of `updateChildren` and is here for readability.13606*13607* @param {ReactComponent} child Component to mount.13608* @param {string} name Name of the child.13609* @param {number} index Index at which to insert the child.13610* @param {ReactReconcileTransaction} transaction13611* @private13612*/13613_mountChildByNameAtIndex: function(13614child,13615name,13616index,13617transaction,13618context) {13619// Inlined for performance, see `ReactInstanceHandles.createReactID`.13620var rootID = this._rootNodeID + name;13621var mountImage = ReactReconciler.mountComponent(13622child,13623rootID,13624transaction,13625context13626);13627child._mountIndex = index;13628this.createChild(child, mountImage);13629},1363013631/**13632* Unmounts a rendered child by name.13633*13634* NOTE: This is part of `updateChildren` and is here for readability.13635*13636* @param {ReactComponent} child Component to unmount.13637* @param {string} name Name of the child in `this._renderedChildren`.13638* @private13639*/13640_unmountChildByName: function(child, name) {13641this.removeChild(child);13642child._mountIndex = null;13643}1364413645}1364613647};1364813649module.exports = ReactMultiChild;1365013651},{"36":36,"41":41,"79":79,"89":89}],79:[function(_dereq_,module,exports){13652/**13653* Copyright 2013-2015, Facebook, Inc.13654* All rights reserved.13655*13656* This source code is licensed under the BSD-style license found in the13657* LICENSE file in the root directory of this source tree. An additional grant13658* of patent rights can be found in the PATENTS file in the same directory.13659*13660* @providesModule ReactMultiChildUpdateTypes13661*/1366213663'use strict';1366413665var keyMirror = _dereq_(156);1366613667/**13668* When a component's children are updated, a series of update configuration13669* objects are created in order to batch and serialize the required changes.13670*13671* Enumerates all the possible types of update configurations.13672*13673* @internal13674*/13675var ReactMultiChildUpdateTypes = keyMirror({13676INSERT_MARKUP: null,13677MOVE_EXISTING: null,13678REMOVE_NODE: null,13679TEXT_CONTENT: null13680});1368113682module.exports = ReactMultiChildUpdateTypes;1368313684},{"156":156}],80:[function(_dereq_,module,exports){13685/**13686* Copyright 2014-2015, Facebook, Inc.13687* All rights reserved.13688*13689* This source code is licensed under the BSD-style license found in the13690* LICENSE file in the root directory of this source tree. An additional grant13691* of patent rights can be found in the PATENTS file in the same directory.13692*13693* @providesModule ReactNativeComponent13694*/1369513696'use strict';1369713698var assign = _dereq_(29);13699var invariant = _dereq_(150);1370013701var autoGenerateWrapperClass = null;13702var genericComponentClass = null;13703// This registry keeps track of wrapper classes around native tags13704var tagToComponentClass = {};13705var textComponentClass = null;1370613707var ReactNativeComponentInjection = {13708// This accepts a class that receives the tag string. This is a catch all13709// that can render any kind of tag.13710injectGenericComponentClass: function(componentClass) {13711genericComponentClass = componentClass;13712},13713// This accepts a text component class that takes the text string to be13714// rendered as props.13715injectTextComponentClass: function(componentClass) {13716textComponentClass = componentClass;13717},13718// This accepts a keyed object with classes as values. Each key represents a13719// tag. That particular tag will use this class instead of the generic one.13720injectComponentClasses: function(componentClasses) {13721assign(tagToComponentClass, componentClasses);13722},13723// Temporary hack since we expect DOM refs to behave like composites,13724// for this release.13725injectAutoWrapper: function(wrapperFactory) {13726autoGenerateWrapperClass = wrapperFactory;13727}13728};1372913730/**13731* Get a composite component wrapper class for a specific tag.13732*13733* @param {ReactElement} element The tag for which to get the class.13734* @return {function} The React class constructor function.13735*/13736function getComponentClassForElement(element) {13737if (typeof element.type === 'function') {13738return element.type;13739}13740var tag = element.type;13741var componentClass = tagToComponentClass[tag];13742if (componentClass == null) {13743tagToComponentClass[tag] = componentClass = autoGenerateWrapperClass(tag);13744}13745return componentClass;13746}1374713748/**13749* Get a native internal component class for a specific tag.13750*13751* @param {ReactElement} element The element to create.13752* @return {function} The internal class constructor function.13753*/13754function createInternalComponent(element) {13755("production" !== "development" ? invariant(13756genericComponentClass,13757'There is no registered component for the tag %s',13758element.type13759) : invariant(genericComponentClass));13760return new genericComponentClass(element.type, element.props);13761}1376213763/**13764* @param {ReactText} text13765* @return {ReactComponent}13766*/13767function createInstanceForText(text) {13768return new textComponentClass(text);13769}1377013771/**13772* @param {ReactComponent} component13773* @return {boolean}13774*/13775function isTextComponent(component) {13776return component instanceof textComponentClass;13777}1377813779var ReactNativeComponent = {13780getComponentClassForElement: getComponentClassForElement,13781createInternalComponent: createInternalComponent,13782createInstanceForText: createInstanceForText,13783isTextComponent: isTextComponent,13784injection: ReactNativeComponentInjection13785};1378613787module.exports = ReactNativeComponent;1378813789},{"150":150,"29":29}],81:[function(_dereq_,module,exports){13790/**13791* Copyright 2013-2015, Facebook, Inc.13792* All rights reserved.13793*13794* This source code is licensed under the BSD-style license found in the13795* LICENSE file in the root directory of this source tree. An additional grant13796* of patent rights can be found in the PATENTS file in the same directory.13797*13798* @providesModule ReactOwner13799*/1380013801'use strict';1380213803var invariant = _dereq_(150);1380413805/**13806* ReactOwners are capable of storing references to owned components.13807*13808* All components are capable of //being// referenced by owner components, but13809* only ReactOwner components are capable of //referencing// owned components.13810* The named reference is known as a "ref".13811*13812* Refs are available when mounted and updated during reconciliation.13813*13814* var MyComponent = React.createClass({13815* render: function() {13816* return (13817* <div onClick={this.handleClick}>13818* <CustomComponent ref="custom" />13819* </div>13820* );13821* },13822* handleClick: function() {13823* this.refs.custom.handleClick();13824* },13825* componentDidMount: function() {13826* this.refs.custom.initialize();13827* }13828* });13829*13830* Refs should rarely be used. When refs are used, they should only be done to13831* control data that is not handled by React's data flow.13832*13833* @class ReactOwner13834*/13835var ReactOwner = {1383613837/**13838* @param {?object} object13839* @return {boolean} True if `object` is a valid owner.13840* @final13841*/13842isValidOwner: function(object) {13843return !!(13844(object &&13845typeof object.attachRef === 'function' && typeof object.detachRef === 'function')13846);13847},1384813849/**13850* Adds a component by ref to an owner component.13851*13852* @param {ReactComponent} component Component to reference.13853* @param {string} ref Name by which to refer to the component.13854* @param {ReactOwner} owner Component on which to record the ref.13855* @final13856* @internal13857*/13858addComponentAsRefTo: function(component, ref, owner) {13859("production" !== "development" ? invariant(13860ReactOwner.isValidOwner(owner),13861'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' +13862'usually means that you\'re trying to add a ref to a component that ' +13863'doesn\'t have an owner (that is, was not created inside of another ' +13864'component\'s `render` method). Try rendering this component inside of ' +13865'a new top-level component which will hold the ref.'13866) : invariant(ReactOwner.isValidOwner(owner)));13867owner.attachRef(ref, component);13868},1386913870/**13871* Removes a component by ref from an owner component.13872*13873* @param {ReactComponent} component Component to dereference.13874* @param {string} ref Name of the ref to remove.13875* @param {ReactOwner} owner Component on which the ref is recorded.13876* @final13877* @internal13878*/13879removeComponentAsRefFrom: function(component, ref, owner) {13880("production" !== "development" ? invariant(13881ReactOwner.isValidOwner(owner),13882'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' +13883'usually means that you\'re trying to remove a ref to a component that ' +13884'doesn\'t have an owner (that is, was not created inside of another ' +13885'component\'s `render` method). Try rendering this component inside of ' +13886'a new top-level component which will hold the ref.'13887) : invariant(ReactOwner.isValidOwner(owner)));13888// Check that `component` is still the current ref because we do not want to13889// detach the ref if another component stole it.13890if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) {13891owner.detachRef(ref);13892}13893}1389413895};1389613897module.exports = ReactOwner;1389813899},{"150":150}],82:[function(_dereq_,module,exports){13900/**13901* Copyright 2013-2015, Facebook, Inc.13902* All rights reserved.13903*13904* This source code is licensed under the BSD-style license found in the13905* LICENSE file in the root directory of this source tree. An additional grant13906* of patent rights can be found in the PATENTS file in the same directory.13907*13908* @providesModule ReactPerf13909* @typechecks static-only13910*/1391113912'use strict';1391313914/**13915* ReactPerf is a general AOP system designed to measure performance. This13916* module only has the hooks: see ReactDefaultPerf for the analysis tool.13917*/13918var ReactPerf = {13919/**13920* Boolean to enable/disable measurement. Set to false by default to prevent13921* accidental logging and perf loss.13922*/13923enableMeasure: false,1392413925/**13926* Holds onto the measure function in use. By default, don't measure13927* anything, but we'll override this if we inject a measure function.13928*/13929storedMeasure: _noMeasure,1393013931/**13932* @param {object} object13933* @param {string} objectName13934* @param {object<string>} methodNames13935*/13936measureMethods: function(object, objectName, methodNames) {13937if ("production" !== "development") {13938for (var key in methodNames) {13939if (!methodNames.hasOwnProperty(key)) {13940continue;13941}13942object[key] = ReactPerf.measure(13943objectName,13944methodNames[key],13945object[key]13946);13947}13948}13949},1395013951/**13952* Use this to wrap methods you want to measure. Zero overhead in production.13953*13954* @param {string} objName13955* @param {string} fnName13956* @param {function} func13957* @return {function}13958*/13959measure: function(objName, fnName, func) {13960if ("production" !== "development") {13961var measuredFunc = null;13962var wrapper = function() {13963if (ReactPerf.enableMeasure) {13964if (!measuredFunc) {13965measuredFunc = ReactPerf.storedMeasure(objName, fnName, func);13966}13967return measuredFunc.apply(this, arguments);13968}13969return func.apply(this, arguments);13970};13971wrapper.displayName = objName + '_' + fnName;13972return wrapper;13973}13974return func;13975},1397613977injection: {13978/**13979* @param {function} measure13980*/13981injectMeasure: function(measure) {13982ReactPerf.storedMeasure = measure;13983}13984}13985};1398613987/**13988* Simply passes through the measured function, without measuring it.13989*13990* @param {string} objName13991* @param {string} fnName13992* @param {function} func13993* @return {function}13994*/13995function _noMeasure(objName, fnName, func) {13996return func;13997}1399813999module.exports = ReactPerf;1400014001},{}],83:[function(_dereq_,module,exports){14002/**14003* Copyright 2013-2015, Facebook, Inc.14004* All rights reserved.14005*14006* This source code is licensed under the BSD-style license found in the14007* LICENSE file in the root directory of this source tree. An additional grant14008* of patent rights can be found in the PATENTS file in the same directory.14009*14010* @providesModule ReactPropTransferer14011*/1401214013'use strict';1401414015var assign = _dereq_(29);14016var emptyFunction = _dereq_(129);14017var joinClasses = _dereq_(155);1401814019/**14020* Creates a transfer strategy that will merge prop values using the supplied14021* `mergeStrategy`. If a prop was previously unset, this just sets it.14022*14023* @param {function} mergeStrategy14024* @return {function}14025*/14026function createTransferStrategy(mergeStrategy) {14027return function(props, key, value) {14028if (!props.hasOwnProperty(key)) {14029props[key] = value;14030} else {14031props[key] = mergeStrategy(props[key], value);14032}14033};14034}1403514036var transferStrategyMerge = createTransferStrategy(function(a, b) {14037// `merge` overrides the first object's (`props[key]` above) keys using the14038// second object's (`value`) keys. An object's style's existing `propA` would14039// get overridden. Flip the order here.14040return assign({}, b, a);14041});1404214043/**14044* Transfer strategies dictate how props are transferred by `transferPropsTo`.14045* NOTE: if you add any more exceptions to this list you should be sure to14046* update `cloneWithProps()` accordingly.14047*/14048var TransferStrategies = {14049/**14050* Never transfer `children`.14051*/14052children: emptyFunction,14053/**14054* Transfer the `className` prop by merging them.14055*/14056className: createTransferStrategy(joinClasses),14057/**14058* Transfer the `style` prop (which is an object) by merging them.14059*/14060style: transferStrategyMerge14061};1406214063/**14064* Mutates the first argument by transferring the properties from the second14065* argument.14066*14067* @param {object} props14068* @param {object} newProps14069* @return {object}14070*/14071function transferInto(props, newProps) {14072for (var thisKey in newProps) {14073if (!newProps.hasOwnProperty(thisKey)) {14074continue;14075}1407614077var transferStrategy = TransferStrategies[thisKey];1407814079if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) {14080transferStrategy(props, thisKey, newProps[thisKey]);14081} else if (!props.hasOwnProperty(thisKey)) {14082props[thisKey] = newProps[thisKey];14083}14084}14085return props;14086}1408714088/**14089* ReactPropTransferer are capable of transferring props to another component14090* using a `transferPropsTo` method.14091*14092* @class ReactPropTransferer14093*/14094var ReactPropTransferer = {1409514096/**14097* Merge two props objects using TransferStrategies.14098*14099* @param {object} oldProps original props (they take precedence)14100* @param {object} newProps new props to merge in14101* @return {object} a new object containing both sets of props merged.14102*/14103mergeProps: function(oldProps, newProps) {14104return transferInto(assign({}, oldProps), newProps);14105}1410614107};1410814109module.exports = ReactPropTransferer;1411014111},{"129":129,"155":155,"29":29}],84:[function(_dereq_,module,exports){14112/**14113* Copyright 2013-2015, Facebook, Inc.14114* All rights reserved.14115*14116* This source code is licensed under the BSD-style license found in the14117* LICENSE file in the root directory of this source tree. An additional grant14118* of patent rights can be found in the PATENTS file in the same directory.14119*14120* @providesModule ReactPropTypeLocationNames14121*/1412214123'use strict';1412414125var ReactPropTypeLocationNames = {};1412614127if ("production" !== "development") {14128ReactPropTypeLocationNames = {14129prop: 'prop',14130context: 'context',14131childContext: 'child context'14132};14133}1413414135module.exports = ReactPropTypeLocationNames;1413614137},{}],85:[function(_dereq_,module,exports){14138/**14139* Copyright 2013-2015, Facebook, Inc.14140* All rights reserved.14141*14142* This source code is licensed under the BSD-style license found in the14143* LICENSE file in the root directory of this source tree. An additional grant14144* of patent rights can be found in the PATENTS file in the same directory.14145*14146* @providesModule ReactPropTypeLocations14147*/1414814149'use strict';1415014151var keyMirror = _dereq_(156);1415214153var ReactPropTypeLocations = keyMirror({14154prop: null,14155context: null,14156childContext: null14157});1415814159module.exports = ReactPropTypeLocations;1416014161},{"156":156}],86:[function(_dereq_,module,exports){14162/**14163* Copyright 2013-2015, Facebook, Inc.14164* All rights reserved.14165*14166* This source code is licensed under the BSD-style license found in the14167* LICENSE file in the root directory of this source tree. An additional grant14168* of patent rights can be found in the PATENTS file in the same directory.14169*14170* @providesModule ReactPropTypes14171*/1417214173'use strict';1417414175var ReactElement = _dereq_(63);14176var ReactFragment = _dereq_(69);14177var ReactPropTypeLocationNames = _dereq_(84);1417814179var emptyFunction = _dereq_(129);1418014181/**14182* Collection of methods that allow declaration and validation of props that are14183* supplied to React components. Example usage:14184*14185* var Props = require('ReactPropTypes');14186* var MyArticle = React.createClass({14187* propTypes: {14188* // An optional string prop named "description".14189* description: Props.string,14190*14191* // A required enum prop named "category".14192* category: Props.oneOf(['News','Photos']).isRequired,14193*14194* // A prop named "dialog" that requires an instance of Dialog.14195* dialog: Props.instanceOf(Dialog).isRequired14196* },14197* render: function() { ... }14198* });14199*14200* A more formal specification of how these methods are used:14201*14202* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)14203* decl := ReactPropTypes.{type}(.isRequired)?14204*14205* Each and every declaration produces a function with the same signature. This14206* allows the creation of custom validation functions. For example:14207*14208* var MyLink = React.createClass({14209* propTypes: {14210* // An optional string or URI prop named "href".14211* href: function(props, propName, componentName) {14212* var propValue = props[propName];14213* if (propValue != null && typeof propValue !== 'string' &&14214* !(propValue instanceof URI)) {14215* return new Error(14216* 'Expected a string or an URI for ' + propName + ' in ' +14217* componentName14218* );14219* }14220* }14221* },14222* render: function() {...}14223* });14224*14225* @internal14226*/1422714228var ANONYMOUS = '<<anonymous>>';1422914230var elementTypeChecker = createElementTypeChecker();14231var nodeTypeChecker = createNodeChecker();1423214233var ReactPropTypes = {14234array: createPrimitiveTypeChecker('array'),14235bool: createPrimitiveTypeChecker('boolean'),14236func: createPrimitiveTypeChecker('function'),14237number: createPrimitiveTypeChecker('number'),14238object: createPrimitiveTypeChecker('object'),14239string: createPrimitiveTypeChecker('string'),1424014241any: createAnyTypeChecker(),14242arrayOf: createArrayOfTypeChecker,14243element: elementTypeChecker,14244instanceOf: createInstanceTypeChecker,14245node: nodeTypeChecker,14246objectOf: createObjectOfTypeChecker,14247oneOf: createEnumTypeChecker,14248oneOfType: createUnionTypeChecker,14249shape: createShapeTypeChecker14250};1425114252function createChainableTypeChecker(validate) {14253function checkType(isRequired, props, propName, componentName, location) {14254componentName = componentName || ANONYMOUS;14255if (props[propName] == null) {14256var locationName = ReactPropTypeLocationNames[location];14257if (isRequired) {14258return new Error(14259("Required " + locationName + " `" + propName + "` was not specified in ") +14260("`" + componentName + "`.")14261);14262}14263return null;14264} else {14265return validate(props, propName, componentName, location);14266}14267}1426814269var chainedCheckType = checkType.bind(null, false);14270chainedCheckType.isRequired = checkType.bind(null, true);1427114272return chainedCheckType;14273}1427414275function createPrimitiveTypeChecker(expectedType) {14276function validate(props, propName, componentName, location) {14277var propValue = props[propName];14278var propType = getPropType(propValue);14279if (propType !== expectedType) {14280var locationName = ReactPropTypeLocationNames[location];14281// `propValue` being instance of, say, date/regexp, pass the 'object'14282// check, but we can offer a more precise error message here rather than14283// 'of type `object`'.14284var preciseType = getPreciseType(propValue);1428514286return new Error(14287("Invalid " + locationName + " `" + propName + "` of type `" + preciseType + "` ") +14288("supplied to `" + componentName + "`, expected `" + expectedType + "`.")14289);14290}14291return null;14292}14293return createChainableTypeChecker(validate);14294}1429514296function createAnyTypeChecker() {14297return createChainableTypeChecker(emptyFunction.thatReturns(null));14298}1429914300function createArrayOfTypeChecker(typeChecker) {14301function validate(props, propName, componentName, location) {14302var propValue = props[propName];14303if (!Array.isArray(propValue)) {14304var locationName = ReactPropTypeLocationNames[location];14305var propType = getPropType(propValue);14306return new Error(14307("Invalid " + locationName + " `" + propName + "` of type ") +14308("`" + propType + "` supplied to `" + componentName + "`, expected an array.")14309);14310}14311for (var i = 0; i < propValue.length; i++) {14312var error = typeChecker(propValue, i, componentName, location);14313if (error instanceof Error) {14314return error;14315}14316}14317return null;14318}14319return createChainableTypeChecker(validate);14320}1432114322function createElementTypeChecker() {14323function validate(props, propName, componentName, location) {14324if (!ReactElement.isValidElement(props[propName])) {14325var locationName = ReactPropTypeLocationNames[location];14326return new Error(14327("Invalid " + locationName + " `" + propName + "` supplied to ") +14328("`" + componentName + "`, expected a ReactElement.")14329);14330}14331return null;14332}14333return createChainableTypeChecker(validate);14334}1433514336function createInstanceTypeChecker(expectedClass) {14337function validate(props, propName, componentName, location) {14338if (!(props[propName] instanceof expectedClass)) {14339var locationName = ReactPropTypeLocationNames[location];14340var expectedClassName = expectedClass.name || ANONYMOUS;14341return new Error(14342("Invalid " + locationName + " `" + propName + "` supplied to ") +14343("`" + componentName + "`, expected instance of `" + expectedClassName + "`.")14344);14345}14346return null;14347}14348return createChainableTypeChecker(validate);14349}1435014351function createEnumTypeChecker(expectedValues) {14352function validate(props, propName, componentName, location) {14353var propValue = props[propName];14354for (var i = 0; i < expectedValues.length; i++) {14355if (propValue === expectedValues[i]) {14356return null;14357}14358}1435914360var locationName = ReactPropTypeLocationNames[location];14361var valuesString = JSON.stringify(expectedValues);14362return new Error(14363("Invalid " + locationName + " `" + propName + "` of value `" + propValue + "` ") +14364("supplied to `" + componentName + "`, expected one of " + valuesString + ".")14365);14366}14367return createChainableTypeChecker(validate);14368}1436914370function createObjectOfTypeChecker(typeChecker) {14371function validate(props, propName, componentName, location) {14372var propValue = props[propName];14373var propType = getPropType(propValue);14374if (propType !== 'object') {14375var locationName = ReactPropTypeLocationNames[location];14376return new Error(14377("Invalid " + locationName + " `" + propName + "` of type ") +14378("`" + propType + "` supplied to `" + componentName + "`, expected an object.")14379);14380}14381for (var key in propValue) {14382if (propValue.hasOwnProperty(key)) {14383var error = typeChecker(propValue, key, componentName, location);14384if (error instanceof Error) {14385return error;14386}14387}14388}14389return null;14390}14391return createChainableTypeChecker(validate);14392}1439314394function createUnionTypeChecker(arrayOfTypeCheckers) {14395function validate(props, propName, componentName, location) {14396for (var i = 0; i < arrayOfTypeCheckers.length; i++) {14397var checker = arrayOfTypeCheckers[i];14398if (checker(props, propName, componentName, location) == null) {14399return null;14400}14401}1440214403var locationName = ReactPropTypeLocationNames[location];14404return new Error(14405("Invalid " + locationName + " `" + propName + "` supplied to ") +14406("`" + componentName + "`.")14407);14408}14409return createChainableTypeChecker(validate);14410}1441114412function createNodeChecker() {14413function validate(props, propName, componentName, location) {14414if (!isNode(props[propName])) {14415var locationName = ReactPropTypeLocationNames[location];14416return new Error(14417("Invalid " + locationName + " `" + propName + "` supplied to ") +14418("`" + componentName + "`, expected a ReactNode.")14419);14420}14421return null;14422}14423return createChainableTypeChecker(validate);14424}1442514426function createShapeTypeChecker(shapeTypes) {14427function validate(props, propName, componentName, location) {14428var propValue = props[propName];14429var propType = getPropType(propValue);14430if (propType !== 'object') {14431var locationName = ReactPropTypeLocationNames[location];14432return new Error(14433("Invalid " + locationName + " `" + propName + "` of type `" + propType + "` ") +14434("supplied to `" + componentName + "`, expected `object`.")14435);14436}14437for (var key in shapeTypes) {14438var checker = shapeTypes[key];14439if (!checker) {14440continue;14441}14442var error = checker(propValue, key, componentName, location);14443if (error) {14444return error;14445}14446}14447return null;14448}14449return createChainableTypeChecker(validate);14450}1445114452function isNode(propValue) {14453switch (typeof propValue) {14454case 'number':14455case 'string':14456case 'undefined':14457return true;14458case 'boolean':14459return !propValue;14460case 'object':14461if (Array.isArray(propValue)) {14462return propValue.every(isNode);14463}14464if (propValue === null || ReactElement.isValidElement(propValue)) {14465return true;14466}14467propValue = ReactFragment.extractIfFragment(propValue);14468for (var k in propValue) {14469if (!isNode(propValue[k])) {14470return false;14471}14472}14473return true;14474default:14475return false;14476}14477}1447814479// Equivalent of `typeof` but with special handling for array and regexp.14480function getPropType(propValue) {14481var propType = typeof propValue;14482if (Array.isArray(propValue)) {14483return 'array';14484}14485if (propValue instanceof RegExp) {14486// Old webkits (at least until Android 4.0) return 'function' rather than14487// 'object' for typeof a RegExp. We'll normalize this here so that /bla/14488// passes PropTypes.object.14489return 'object';14490}14491return propType;14492}1449314494// This handles more types than `getPropType`. Only used for error messages.14495// See `createPrimitiveTypeChecker`.14496function getPreciseType(propValue) {14497var propType = getPropType(propValue);14498if (propType === 'object') {14499if (propValue instanceof Date) {14500return 'date';14501} else if (propValue instanceof RegExp) {14502return 'regexp';14503}14504}14505return propType;14506}1450714508module.exports = ReactPropTypes;1450914510},{"129":129,"63":63,"69":69,"84":84}],87:[function(_dereq_,module,exports){14511/**14512* Copyright 2013-2015, Facebook, Inc.14513* All rights reserved.14514*14515* This source code is licensed under the BSD-style license found in the14516* LICENSE file in the root directory of this source tree. An additional grant14517* of patent rights can be found in the PATENTS file in the same directory.14518*14519* @providesModule ReactPutListenerQueue14520*/1452114522'use strict';1452314524var PooledClass = _dereq_(30);14525var ReactBrowserEventEmitter = _dereq_(33);1452614527var assign = _dereq_(29);1452814529function ReactPutListenerQueue() {14530this.listenersToPut = [];14531}1453214533assign(ReactPutListenerQueue.prototype, {14534enqueuePutListener: function(rootNodeID, propKey, propValue) {14535this.listenersToPut.push({14536rootNodeID: rootNodeID,14537propKey: propKey,14538propValue: propValue14539});14540},1454114542putListeners: function() {14543for (var i = 0; i < this.listenersToPut.length; i++) {14544var listenerToPut = this.listenersToPut[i];14545ReactBrowserEventEmitter.putListener(14546listenerToPut.rootNodeID,14547listenerToPut.propKey,14548listenerToPut.propValue14549);14550}14551},1455214553reset: function() {14554this.listenersToPut.length = 0;14555},1455614557destructor: function() {14558this.reset();14559}14560});1456114562PooledClass.addPoolingTo(ReactPutListenerQueue);1456314564module.exports = ReactPutListenerQueue;1456514566},{"29":29,"30":30,"33":33}],88:[function(_dereq_,module,exports){14567/**14568* Copyright 2013-2015, Facebook, Inc.14569* All rights reserved.14570*14571* This source code is licensed under the BSD-style license found in the14572* LICENSE file in the root directory of this source tree. An additional grant14573* of patent rights can be found in the PATENTS file in the same directory.14574*14575* @providesModule ReactReconcileTransaction14576* @typechecks static-only14577*/1457814579'use strict';1458014581var CallbackQueue = _dereq_(7);14582var PooledClass = _dereq_(30);14583var ReactBrowserEventEmitter = _dereq_(33);14584var ReactInputSelection = _dereq_(71);14585var ReactPutListenerQueue = _dereq_(87);14586var Transaction = _dereq_(116);1458714588var assign = _dereq_(29);1458914590/**14591* Ensures that, when possible, the selection range (currently selected text14592* input) is not disturbed by performing the transaction.14593*/14594var SELECTION_RESTORATION = {14595/**14596* @return {Selection} Selection information.14597*/14598initialize: ReactInputSelection.getSelectionInformation,14599/**14600* @param {Selection} sel Selection information returned from `initialize`.14601*/14602close: ReactInputSelection.restoreSelection14603};1460414605/**14606* Suppresses events (blur/focus) that could be inadvertently dispatched due to14607* high level DOM manipulations (like temporarily removing a text input from the14608* DOM).14609*/14610var EVENT_SUPPRESSION = {14611/**14612* @return {boolean} The enabled status of `ReactBrowserEventEmitter` before14613* the reconciliation.14614*/14615initialize: function() {14616var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();14617ReactBrowserEventEmitter.setEnabled(false);14618return currentlyEnabled;14619},1462014621/**14622* @param {boolean} previouslyEnabled Enabled status of14623* `ReactBrowserEventEmitter` before the reconciliation occured. `close`14624* restores the previous value.14625*/14626close: function(previouslyEnabled) {14627ReactBrowserEventEmitter.setEnabled(previouslyEnabled);14628}14629};1463014631/**14632* Provides a queue for collecting `componentDidMount` and14633* `componentDidUpdate` callbacks during the the transaction.14634*/14635var ON_DOM_READY_QUEUEING = {14636/**14637* Initializes the internal `onDOMReady` queue.14638*/14639initialize: function() {14640this.reactMountReady.reset();14641},1464214643/**14644* After DOM is flushed, invoke all registered `onDOMReady` callbacks.14645*/14646close: function() {14647this.reactMountReady.notifyAll();14648}14649};1465014651var PUT_LISTENER_QUEUEING = {14652initialize: function() {14653this.putListenerQueue.reset();14654},1465514656close: function() {14657this.putListenerQueue.putListeners();14658}14659};1466014661/**14662* Executed within the scope of the `Transaction` instance. Consider these as14663* being member methods, but with an implied ordering while being isolated from14664* each other.14665*/14666var TRANSACTION_WRAPPERS = [14667PUT_LISTENER_QUEUEING,14668SELECTION_RESTORATION,14669EVENT_SUPPRESSION,14670ON_DOM_READY_QUEUEING14671];1467214673/**14674* Currently:14675* - The order that these are listed in the transaction is critical:14676* - Suppresses events.14677* - Restores selection range.14678*14679* Future:14680* - Restore document/overflow scroll positions that were unintentionally14681* modified via DOM insertions above the top viewport boundary.14682* - Implement/integrate with customized constraint based layout system and keep14683* track of which dimensions must be remeasured.14684*14685* @class ReactReconcileTransaction14686*/14687function ReactReconcileTransaction() {14688this.reinitializeTransaction();14689// Only server-side rendering really needs this option (see14690// `ReactServerRendering`), but server-side uses14691// `ReactServerRenderingTransaction` instead. This option is here so that it's14692// accessible and defaults to false when `ReactDOMComponent` and14693// `ReactTextComponent` checks it in `mountComponent`.`14694this.renderToStaticMarkup = false;14695this.reactMountReady = CallbackQueue.getPooled(null);14696this.putListenerQueue = ReactPutListenerQueue.getPooled();14697}1469814699var Mixin = {14700/**14701* @see Transaction14702* @abstract14703* @final14704* @return {array<object>} List of operation wrap proceedures.14705* TODO: convert to array<TransactionWrapper>14706*/14707getTransactionWrappers: function() {14708return TRANSACTION_WRAPPERS;14709},1471014711/**14712* @return {object} The queue to collect `onDOMReady` callbacks with.14713*/14714getReactMountReady: function() {14715return this.reactMountReady;14716},1471714718getPutListenerQueue: function() {14719return this.putListenerQueue;14720},1472114722/**14723* `PooledClass` looks for this, and will invoke this before allowing this14724* instance to be resused.14725*/14726destructor: function() {14727CallbackQueue.release(this.reactMountReady);14728this.reactMountReady = null;1472914730ReactPutListenerQueue.release(this.putListenerQueue);14731this.putListenerQueue = null;14732}14733};147341473514736assign(ReactReconcileTransaction.prototype, Transaction.Mixin, Mixin);1473714738PooledClass.addPoolingTo(ReactReconcileTransaction);1473914740module.exports = ReactReconcileTransaction;1474114742},{"116":116,"29":29,"30":30,"33":33,"7":7,"71":71,"87":87}],89:[function(_dereq_,module,exports){14743/**14744* Copyright 2013-2015, Facebook, Inc.14745* All rights reserved.14746*14747* This source code is licensed under the BSD-style license found in the14748* LICENSE file in the root directory of this source tree. An additional grant14749* of patent rights can be found in the PATENTS file in the same directory.14750*14751* @providesModule ReactReconciler14752*/1475314754'use strict';1475514756var ReactRef = _dereq_(90);14757var ReactElementValidator = _dereq_(64);1475814759/**14760* Helper to call ReactRef.attachRefs with this composite component, split out14761* to avoid allocations in the transaction mount-ready queue.14762*/14763function attachRefs() {14764ReactRef.attachRefs(this, this._currentElement);14765}1476614767var ReactReconciler = {1476814769/**14770* Initializes the component, renders markup, and registers event listeners.14771*14772* @param {ReactComponent} internalInstance14773* @param {string} rootID DOM ID of the root node.14774* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction14775* @return {?string} Rendered markup to be inserted into the DOM.14776* @final14777* @internal14778*/14779mountComponent: function(internalInstance, rootID, transaction, context) {14780var markup = internalInstance.mountComponent(rootID, transaction, context);14781if ("production" !== "development") {14782ReactElementValidator.checkAndWarnForMutatedProps(14783internalInstance._currentElement14784);14785}14786transaction.getReactMountReady().enqueue(attachRefs, internalInstance);14787return markup;14788},1478914790/**14791* Releases any resources allocated by `mountComponent`.14792*14793* @final14794* @internal14795*/14796unmountComponent: function(internalInstance) {14797ReactRef.detachRefs(internalInstance, internalInstance._currentElement);14798internalInstance.unmountComponent();14799},1480014801/**14802* Update a component using a new element.14803*14804* @param {ReactComponent} internalInstance14805* @param {ReactElement} nextElement14806* @param {ReactReconcileTransaction} transaction14807* @param {object} context14808* @internal14809*/14810receiveComponent: function(14811internalInstance, nextElement, transaction, context14812) {14813var prevElement = internalInstance._currentElement;1481414815if (nextElement === prevElement && nextElement._owner != null) {14816// Since elements are immutable after the owner is rendered,14817// we can do a cheap identity compare here to determine if this is a14818// superfluous reconcile. It's possible for state to be mutable but such14819// change should trigger an update of the owner which would recreate14820// the element. We explicitly check for the existence of an owner since14821// it's possible for an element created outside a composite to be14822// deeply mutated and reused.14823return;14824}1482514826if ("production" !== "development") {14827ReactElementValidator.checkAndWarnForMutatedProps(nextElement);14828}1482914830var refsChanged = ReactRef.shouldUpdateRefs(14831prevElement,14832nextElement14833);1483414835if (refsChanged) {14836ReactRef.detachRefs(internalInstance, prevElement);14837}1483814839internalInstance.receiveComponent(nextElement, transaction, context);1484014841if (refsChanged) {14842transaction.getReactMountReady().enqueue(attachRefs, internalInstance);14843}14844},1484514846/**14847* Flush any dirty changes in a component.14848*14849* @param {ReactComponent} internalInstance14850* @param {ReactReconcileTransaction} transaction14851* @internal14852*/14853performUpdateIfNecessary: function(14854internalInstance,14855transaction14856) {14857internalInstance.performUpdateIfNecessary(transaction);14858}1485914860};1486114862module.exports = ReactReconciler;1486314864},{"64":64,"90":90}],90:[function(_dereq_,module,exports){14865/**14866* Copyright 2013-2015, Facebook, Inc.14867* All rights reserved.14868*14869* This source code is licensed under the BSD-style license found in the14870* LICENSE file in the root directory of this source tree. An additional grant14871* of patent rights can be found in the PATENTS file in the same directory.14872*14873* @providesModule ReactRef14874*/1487514876'use strict';1487714878var ReactOwner = _dereq_(81);1487914880var ReactRef = {};1488114882function attachRef(ref, component, owner) {14883if (typeof ref === 'function') {14884ref(component.getPublicInstance());14885} else {14886// Legacy ref14887ReactOwner.addComponentAsRefTo(component, ref, owner);14888}14889}1489014891function detachRef(ref, component, owner) {14892if (typeof ref === 'function') {14893ref(null);14894} else {14895// Legacy ref14896ReactOwner.removeComponentAsRefFrom(component, ref, owner);14897}14898}1489914900ReactRef.attachRefs = function(instance, element) {14901var ref = element.ref;14902if (ref != null) {14903attachRef(ref, instance, element._owner);14904}14905};1490614907ReactRef.shouldUpdateRefs = function(prevElement, nextElement) {14908// If either the owner or a `ref` has changed, make sure the newest owner14909// has stored a reference to `this`, and the previous owner (if different)14910// has forgotten the reference to `this`. We use the element instead14911// of the public this.props because the post processing cannot determine14912// a ref. The ref conceptually lives on the element.1491314914// TODO: Should this even be possible? The owner cannot change because14915// it's forbidden by shouldUpdateReactComponent. The ref can change14916// if you swap the keys of but not the refs. Reconsider where this check14917// is made. It probably belongs where the key checking and14918// instantiateReactComponent is done.1491914920return (14921nextElement._owner !== prevElement._owner ||14922nextElement.ref !== prevElement.ref14923);14924};1492514926ReactRef.detachRefs = function(instance, element) {14927var ref = element.ref;14928if (ref != null) {14929detachRef(ref, instance, element._owner);14930}14931};1493214933module.exports = ReactRef;1493414935},{"81":81}],91:[function(_dereq_,module,exports){14936/**14937* Copyright 2013-2015, Facebook, Inc.14938* All rights reserved.14939*14940* This source code is licensed under the BSD-style license found in the14941* LICENSE file in the root directory of this source tree. An additional grant14942* of patent rights can be found in the PATENTS file in the same directory.14943*14944* @providesModule ReactRootIndex14945* @typechecks14946*/1494714948'use strict';1494914950var ReactRootIndexInjection = {14951/**14952* @param {function} _createReactRootIndex14953*/14954injectCreateReactRootIndex: function(_createReactRootIndex) {14955ReactRootIndex.createReactRootIndex = _createReactRootIndex;14956}14957};1495814959var ReactRootIndex = {14960createReactRootIndex: null,14961injection: ReactRootIndexInjection14962};1496314964module.exports = ReactRootIndex;1496514966},{}],92:[function(_dereq_,module,exports){14967/**14968* Copyright 2013-2015, Facebook, Inc.14969* All rights reserved.14970*14971* This source code is licensed under the BSD-style license found in the14972* LICENSE file in the root directory of this source tree. An additional grant14973* of patent rights can be found in the PATENTS file in the same directory.14974*14975* @typechecks static-only14976* @providesModule ReactServerRendering14977*/14978'use strict';1497914980var ReactElement = _dereq_(63);14981var ReactInstanceHandles = _dereq_(72);14982var ReactMarkupChecksum = _dereq_(76);14983var ReactServerRenderingTransaction =14984_dereq_(93);1498514986var emptyObject = _dereq_(130);14987var instantiateReactComponent = _dereq_(149);14988var invariant = _dereq_(150);1498914990/**14991* @param {ReactElement} element14992* @return {string} the HTML markup14993*/14994function renderToString(element) {14995("production" !== "development" ? invariant(14996ReactElement.isValidElement(element),14997'renderToString(): You must pass a valid ReactElement.'14998) : invariant(ReactElement.isValidElement(element)));1499915000var transaction;15001try {15002var id = ReactInstanceHandles.createReactRootID();15003transaction = ReactServerRenderingTransaction.getPooled(false);1500415005return transaction.perform(function() {15006var componentInstance = instantiateReactComponent(element, null);15007var markup =15008componentInstance.mountComponent(id, transaction, emptyObject);15009return ReactMarkupChecksum.addChecksumToMarkup(markup);15010}, null);15011} finally {15012ReactServerRenderingTransaction.release(transaction);15013}15014}1501515016/**15017* @param {ReactElement} element15018* @return {string} the HTML markup, without the extra React ID and checksum15019* (for generating static pages)15020*/15021function renderToStaticMarkup(element) {15022("production" !== "development" ? invariant(15023ReactElement.isValidElement(element),15024'renderToStaticMarkup(): You must pass a valid ReactElement.'15025) : invariant(ReactElement.isValidElement(element)));1502615027var transaction;15028try {15029var id = ReactInstanceHandles.createReactRootID();15030transaction = ReactServerRenderingTransaction.getPooled(true);1503115032return transaction.perform(function() {15033var componentInstance = instantiateReactComponent(element, null);15034return componentInstance.mountComponent(id, transaction, emptyObject);15035}, null);15036} finally {15037ReactServerRenderingTransaction.release(transaction);15038}15039}1504015041module.exports = {15042renderToString: renderToString,15043renderToStaticMarkup: renderToStaticMarkup15044};1504515046},{"130":130,"149":149,"150":150,"63":63,"72":72,"76":76,"93":93}],93:[function(_dereq_,module,exports){15047/**15048* Copyright 2014-2015, Facebook, Inc.15049* All rights reserved.15050*15051* This source code is licensed under the BSD-style license found in the15052* LICENSE file in the root directory of this source tree. An additional grant15053* of patent rights can be found in the PATENTS file in the same directory.15054*15055* @providesModule ReactServerRenderingTransaction15056* @typechecks15057*/1505815059'use strict';1506015061var PooledClass = _dereq_(30);15062var CallbackQueue = _dereq_(7);15063var ReactPutListenerQueue = _dereq_(87);15064var Transaction = _dereq_(116);1506515066var assign = _dereq_(29);15067var emptyFunction = _dereq_(129);1506815069/**15070* Provides a `CallbackQueue` queue for collecting `onDOMReady` callbacks15071* during the performing of the transaction.15072*/15073var ON_DOM_READY_QUEUEING = {15074/**15075* Initializes the internal `onDOMReady` queue.15076*/15077initialize: function() {15078this.reactMountReady.reset();15079},1508015081close: emptyFunction15082};1508315084var PUT_LISTENER_QUEUEING = {15085initialize: function() {15086this.putListenerQueue.reset();15087},1508815089close: emptyFunction15090};1509115092/**15093* Executed within the scope of the `Transaction` instance. Consider these as15094* being member methods, but with an implied ordering while being isolated from15095* each other.15096*/15097var TRANSACTION_WRAPPERS = [15098PUT_LISTENER_QUEUEING,15099ON_DOM_READY_QUEUEING15100];1510115102/**15103* @class ReactServerRenderingTransaction15104* @param {boolean} renderToStaticMarkup15105*/15106function ReactServerRenderingTransaction(renderToStaticMarkup) {15107this.reinitializeTransaction();15108this.renderToStaticMarkup = renderToStaticMarkup;15109this.reactMountReady = CallbackQueue.getPooled(null);15110this.putListenerQueue = ReactPutListenerQueue.getPooled();15111}1511215113var Mixin = {15114/**15115* @see Transaction15116* @abstract15117* @final15118* @return {array} Empty list of operation wrap proceedures.15119*/15120getTransactionWrappers: function() {15121return TRANSACTION_WRAPPERS;15122},1512315124/**15125* @return {object} The queue to collect `onDOMReady` callbacks with.15126*/15127getReactMountReady: function() {15128return this.reactMountReady;15129},1513015131getPutListenerQueue: function() {15132return this.putListenerQueue;15133},1513415135/**15136* `PooledClass` looks for this, and will invoke this before allowing this15137* instance to be resused.15138*/15139destructor: function() {15140CallbackQueue.release(this.reactMountReady);15141this.reactMountReady = null;1514215143ReactPutListenerQueue.release(this.putListenerQueue);15144this.putListenerQueue = null;15145}15146};151471514815149assign(15150ReactServerRenderingTransaction.prototype,15151Transaction.Mixin,15152Mixin15153);1515415155PooledClass.addPoolingTo(ReactServerRenderingTransaction);1515615157module.exports = ReactServerRenderingTransaction;1515815159},{"116":116,"129":129,"29":29,"30":30,"7":7,"87":87}],94:[function(_dereq_,module,exports){15160/**15161* Copyright 2013-2015, Facebook, Inc.15162* All rights reserved.15163*15164* This source code is licensed under the BSD-style license found in the15165* LICENSE file in the root directory of this source tree. An additional grant15166* of patent rights can be found in the PATENTS file in the same directory.15167*15168* @providesModule ReactStateSetters15169*/1517015171'use strict';1517215173var ReactStateSetters = {15174/**15175* Returns a function that calls the provided function, and uses the result15176* of that to set the component's state.15177*15178* @param {ReactCompositeComponent} component15179* @param {function} funcReturningState Returned callback uses this to15180* determine how to update state.15181* @return {function} callback that when invoked uses funcReturningState to15182* determined the object literal to setState.15183*/15184createStateSetter: function(component, funcReturningState) {15185return function(a, b, c, d, e, f) {15186var partialState = funcReturningState.call(component, a, b, c, d, e, f);15187if (partialState) {15188component.setState(partialState);15189}15190};15191},1519215193/**15194* Returns a single-argument callback that can be used to update a single15195* key in the component's state.15196*15197* Note: this is memoized function, which makes it inexpensive to call.15198*15199* @param {ReactCompositeComponent} component15200* @param {string} key The key in the state that you should update.15201* @return {function} callback of 1 argument which calls setState() with15202* the provided keyName and callback argument.15203*/15204createStateKeySetter: function(component, key) {15205// Memoize the setters.15206var cache = component.__keySetters || (component.__keySetters = {});15207return cache[key] || (cache[key] = createStateKeySetter(component, key));15208}15209};1521015211function createStateKeySetter(component, key) {15212// Partial state is allocated outside of the function closure so it can be15213// reused with every call, avoiding memory allocation when this function15214// is called.15215var partialState = {};15216return function stateKeySetter(value) {15217partialState[key] = value;15218component.setState(partialState);15219};15220}1522115222ReactStateSetters.Mixin = {15223/**15224* Returns a function that calls the provided function, and uses the result15225* of that to set the component's state.15226*15227* For example, these statements are equivalent:15228*15229* this.setState({x: 1});15230* this.createStateSetter(function(xValue) {15231* return {x: xValue};15232* })(1);15233*15234* @param {function} funcReturningState Returned callback uses this to15235* determine how to update state.15236* @return {function} callback that when invoked uses funcReturningState to15237* determined the object literal to setState.15238*/15239createStateSetter: function(funcReturningState) {15240return ReactStateSetters.createStateSetter(this, funcReturningState);15241},1524215243/**15244* Returns a single-argument callback that can be used to update a single15245* key in the component's state.15246*15247* For example, these statements are equivalent:15248*15249* this.setState({x: 1});15250* this.createStateKeySetter('x')(1);15251*15252* Note: this is memoized function, which makes it inexpensive to call.15253*15254* @param {string} key The key in the state that you should update.15255* @return {function} callback of 1 argument which calls setState() with15256* the provided keyName and callback argument.15257*/15258createStateKeySetter: function(key) {15259return ReactStateSetters.createStateKeySetter(this, key);15260}15261};1526215263module.exports = ReactStateSetters;1526415265},{}],95:[function(_dereq_,module,exports){15266/**15267* Copyright 2013-2015, Facebook, Inc.15268* All rights reserved.15269*15270* This source code is licensed under the BSD-style license found in the15271* LICENSE file in the root directory of this source tree. An additional grant15272* of patent rights can be found in the PATENTS file in the same directory.15273*15274* @providesModule ReactTestUtils15275*/1527615277'use strict';1527815279var EventConstants = _dereq_(16);15280var EventPluginHub = _dereq_(18);15281var EventPropagators = _dereq_(21);15282var React = _dereq_(31);15283var ReactElement = _dereq_(63);15284var ReactEmptyComponent = _dereq_(65);15285var ReactBrowserEventEmitter = _dereq_(33);15286var ReactCompositeComponent = _dereq_(43);15287var ReactInstanceHandles = _dereq_(72);15288var ReactInstanceMap = _dereq_(73);15289var ReactMount = _dereq_(77);15290var ReactUpdates = _dereq_(100);15291var SyntheticEvent = _dereq_(108);1529215293var assign = _dereq_(29);15294var emptyObject = _dereq_(130);1529515296var topLevelTypes = EventConstants.topLevelTypes;1529715298function Event(suffix) {}1529915300/**15301* @class ReactTestUtils15302*/1530315304/**15305* Todo: Support the entire DOM.scry query syntax. For now, these simple15306* utilities will suffice for testing purposes.15307* @lends ReactTestUtils15308*/15309var ReactTestUtils = {15310renderIntoDocument: function(instance) {15311var div = document.createElement('div');15312// None of our tests actually require attaching the container to the15313// DOM, and doing so creates a mess that we rely on test isolation to15314// clean up, so we're going to stop honoring the name of this method15315// (and probably rename it eventually) if no problems arise.15316// document.documentElement.appendChild(div);15317return React.render(instance, div);15318},1531915320isElement: function(element) {15321return ReactElement.isValidElement(element);15322},1532315324isElementOfType: function(inst, convenienceConstructor) {15325return (15326ReactElement.isValidElement(inst) &&15327inst.type === convenienceConstructor15328);15329},1533015331isDOMComponent: function(inst) {15332// TODO: Fix this heuristic. It's just here because composites can currently15333// pretend to be DOM components.15334return !!(inst && inst.tagName && inst.getDOMNode);15335},1533615337isDOMComponentElement: function(inst) {15338return !!(inst &&15339ReactElement.isValidElement(inst) &&15340!!inst.tagName);15341},1534215343isCompositeComponent: function(inst) {15344return typeof inst.render === 'function' &&15345typeof inst.setState === 'function';15346},1534715348isCompositeComponentWithType: function(inst, type) {15349return !!(ReactTestUtils.isCompositeComponent(inst) &&15350(inst.constructor === type));15351},1535215353isCompositeComponentElement: function(inst) {15354if (!ReactElement.isValidElement(inst)) {15355return false;15356}15357// We check the prototype of the type that will get mounted, not the15358// instance itself. This is a future proof way of duck typing.15359var prototype = inst.type.prototype;15360return (15361typeof prototype.render === 'function' &&15362typeof prototype.setState === 'function'15363);15364},1536515366isCompositeComponentElementWithType: function(inst, type) {15367return !!(ReactTestUtils.isCompositeComponentElement(inst) &&15368(inst.constructor === type));15369},1537015371getRenderedChildOfCompositeComponent: function(inst) {15372if (!ReactTestUtils.isCompositeComponent(inst)) {15373return null;15374}15375var internalInstance = ReactInstanceMap.get(inst);15376return internalInstance._renderedComponent.getPublicInstance();15377},1537815379findAllInRenderedTree: function(inst, test) {15380if (!inst) {15381return [];15382}15383var ret = test(inst) ? [inst] : [];15384if (ReactTestUtils.isDOMComponent(inst)) {15385var internalInstance = ReactInstanceMap.get(inst);15386var renderedChildren = internalInstance15387._renderedComponent15388._renderedChildren;15389var key;15390for (key in renderedChildren) {15391if (!renderedChildren.hasOwnProperty(key)) {15392continue;15393}15394if (!renderedChildren[key].getPublicInstance) {15395continue;15396}15397ret = ret.concat(15398ReactTestUtils.findAllInRenderedTree(15399renderedChildren[key].getPublicInstance(),15400test15401)15402);15403}15404} else if (ReactTestUtils.isCompositeComponent(inst)) {15405ret = ret.concat(15406ReactTestUtils.findAllInRenderedTree(15407ReactTestUtils.getRenderedChildOfCompositeComponent(inst),15408test15409)15410);15411}15412return ret;15413},1541415415/**15416* Finds all instance of components in the rendered tree that are DOM15417* components with the class name matching `className`.15418* @return an array of all the matches.15419*/15420scryRenderedDOMComponentsWithClass: function(root, className) {15421return ReactTestUtils.findAllInRenderedTree(root, function(inst) {15422var instClassName = inst.props.className;15423return ReactTestUtils.isDOMComponent(inst) && (15424(instClassName && (' ' + instClassName + ' ').indexOf(' ' + className + ' ') !== -1)15425);15426});15427},1542815429/**15430* Like scryRenderedDOMComponentsWithClass but expects there to be one result,15431* and returns that one result, or throws exception if there is any other15432* number of matches besides one.15433* @return {!ReactDOMComponent} The one match.15434*/15435findRenderedDOMComponentWithClass: function(root, className) {15436var all =15437ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className);15438if (all.length !== 1) {15439throw new Error('Did not find exactly one match ' +15440'(found: ' + all.length + ') for class:' + className15441);15442}15443return all[0];15444},154451544615447/**15448* Finds all instance of components in the rendered tree that are DOM15449* components with the tag name matching `tagName`.15450* @return an array of all the matches.15451*/15452scryRenderedDOMComponentsWithTag: function(root, tagName) {15453return ReactTestUtils.findAllInRenderedTree(root, function(inst) {15454return ReactTestUtils.isDOMComponent(inst) &&15455inst.tagName === tagName.toUpperCase();15456});15457},1545815459/**15460* Like scryRenderedDOMComponentsWithTag but expects there to be one result,15461* and returns that one result, or throws exception if there is any other15462* number of matches besides one.15463* @return {!ReactDOMComponent} The one match.15464*/15465findRenderedDOMComponentWithTag: function(root, tagName) {15466var all = ReactTestUtils.scryRenderedDOMComponentsWithTag(root, tagName);15467if (all.length !== 1) {15468throw new Error('Did not find exactly one match for tag:' + tagName);15469}15470return all[0];15471},154721547315474/**15475* Finds all instances of components with type equal to `componentType`.15476* @return an array of all the matches.15477*/15478scryRenderedComponentsWithType: function(root, componentType) {15479return ReactTestUtils.findAllInRenderedTree(root, function(inst) {15480return ReactTestUtils.isCompositeComponentWithType(15481inst,15482componentType15483);15484});15485},1548615487/**15488* Same as `scryRenderedComponentsWithType` but expects there to be one result15489* and returns that one result, or throws exception if there is any other15490* number of matches besides one.15491* @return {!ReactComponent} The one match.15492*/15493findRenderedComponentWithType: function(root, componentType) {15494var all = ReactTestUtils.scryRenderedComponentsWithType(15495root,15496componentType15497);15498if (all.length !== 1) {15499throw new Error(15500'Did not find exactly one match for componentType:' + componentType15501);15502}15503return all[0];15504},1550515506/**15507* Pass a mocked component module to this method to augment it with15508* useful methods that allow it to be used as a dummy React component.15509* Instead of rendering as usual, the component will become a simple15510* <div> containing any provided children.15511*15512* @param {object} module the mock function object exported from a15513* module that defines the component to be mocked15514* @param {?string} mockTagName optional dummy root tag name to return15515* from render method (overrides15516* module.mockTagName if provided)15517* @return {object} the ReactTestUtils object (for chaining)15518*/15519mockComponent: function(module, mockTagName) {15520mockTagName = mockTagName || module.mockTagName || "div";1552115522module.prototype.render.mockImplementation(function() {15523return React.createElement(15524mockTagName,15525null,15526this.props.children15527);15528});1552915530return this;15531},1553215533/**15534* Simulates a top level event being dispatched from a raw event that occured15535* on an `Element` node.15536* @param topLevelType {Object} A type from `EventConstants.topLevelTypes`15537* @param {!Element} node The dom to simulate an event occurring on.15538* @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.15539*/15540simulateNativeEventOnNode: function(topLevelType, node, fakeNativeEvent) {15541fakeNativeEvent.target = node;15542ReactBrowserEventEmitter.ReactEventListener.dispatchEvent(15543topLevelType,15544fakeNativeEvent15545);15546},1554715548/**15549* Simulates a top level event being dispatched from a raw event that occured15550* on the `ReactDOMComponent` `comp`.15551* @param topLevelType {Object} A type from `EventConstants.topLevelTypes`.15552* @param comp {!ReactDOMComponent}15553* @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.15554*/15555simulateNativeEventOnDOMComponent: function(15556topLevelType,15557comp,15558fakeNativeEvent) {15559ReactTestUtils.simulateNativeEventOnNode(15560topLevelType,15561comp.getDOMNode(),15562fakeNativeEvent15563);15564},1556515566nativeTouchData: function(x, y) {15567return {15568touches: [15569{pageX: x, pageY: y}15570]15571};15572},1557315574createRenderer: function() {15575return new ReactShallowRenderer();15576},1557715578Simulate: null,15579SimulateNative: {}15580};1558115582/**15583* @class ReactShallowRenderer15584*/15585var ReactShallowRenderer = function() {15586this._instance = null;15587};1558815589ReactShallowRenderer.prototype.getRenderOutput = function() {15590return (15591(this._instance && this._instance._renderedComponent &&15592this._instance._renderedComponent._renderedOutput)15593|| null15594);15595};1559615597var NoopInternalComponent = function(element) {15598this._renderedOutput = element;15599this._currentElement = element === null || element === false ?15600ReactEmptyComponent.emptyElement :15601element;15602};1560315604NoopInternalComponent.prototype = {1560515606mountComponent: function() {15607},1560815609receiveComponent: function(element) {15610this._renderedOutput = element;15611this._currentElement = element === null || element === false ?15612ReactEmptyComponent.emptyElement :15613element;15614},1561515616unmountComponent: function() {15617}1561815619};1562015621var ShallowComponentWrapper = function() { };15622assign(15623ShallowComponentWrapper.prototype,15624ReactCompositeComponent.Mixin, {15625_instantiateReactComponent: function(element) {15626return new NoopInternalComponent(element);15627},15628_replaceNodeWithMarkupByID: function() {},15629_renderValidatedComponent:15630ReactCompositeComponent.Mixin.15631_renderValidatedComponentWithoutOwnerOrContext15632}15633);1563415635ReactShallowRenderer.prototype.render = function(element, context) {15636if (!context) {15637context = emptyObject;15638}15639var transaction = ReactUpdates.ReactReconcileTransaction.getPooled();15640this._render(element, transaction, context);15641ReactUpdates.ReactReconcileTransaction.release(transaction);15642};1564315644ReactShallowRenderer.prototype.unmount = function() {15645if (this._instance) {15646this._instance.unmountComponent();15647}15648};1564915650ReactShallowRenderer.prototype._render = function(element, transaction, context) {15651if (!this._instance) {15652var rootID = ReactInstanceHandles.createReactRootID();15653var instance = new ShallowComponentWrapper(element.type);15654instance.construct(element);1565515656instance.mountComponent(rootID, transaction, context);1565715658this._instance = instance;15659} else {15660this._instance.receiveComponent(element, transaction, context);15661}15662};1566315664/**15665* Exports:15666*15667* - `ReactTestUtils.Simulate.click(Element/ReactDOMComponent)`15668* - `ReactTestUtils.Simulate.mouseMove(Element/ReactDOMComponent)`15669* - `ReactTestUtils.Simulate.change(Element/ReactDOMComponent)`15670* - ... (All keys from event plugin `eventTypes` objects)15671*/15672function makeSimulator(eventType) {15673return function(domComponentOrNode, eventData) {15674var node;15675if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {15676node = domComponentOrNode.getDOMNode();15677} else if (domComponentOrNode.tagName) {15678node = domComponentOrNode;15679}1568015681var fakeNativeEvent = new Event();15682fakeNativeEvent.target = node;15683// We don't use SyntheticEvent.getPooled in order to not have to worry about15684// properly destroying any properties assigned from `eventData` upon release15685var event = new SyntheticEvent(15686ReactBrowserEventEmitter.eventNameDispatchConfigs[eventType],15687ReactMount.getID(node),15688fakeNativeEvent15689);15690assign(event, eventData);15691EventPropagators.accumulateTwoPhaseDispatches(event);1569215693ReactUpdates.batchedUpdates(function() {15694EventPluginHub.enqueueEvents(event);15695EventPluginHub.processEventQueue();15696});15697};15698}1569915700function buildSimulators() {15701ReactTestUtils.Simulate = {};1570215703var eventType;15704for (eventType in ReactBrowserEventEmitter.eventNameDispatchConfigs) {15705/**15706* @param {!Element || ReactDOMComponent} domComponentOrNode15707* @param {?object} eventData Fake event data to use in SyntheticEvent.15708*/15709ReactTestUtils.Simulate[eventType] = makeSimulator(eventType);15710}15711}1571215713// Rebuild ReactTestUtils.Simulate whenever event plugins are injected15714var oldInjectEventPluginOrder = EventPluginHub.injection.injectEventPluginOrder;15715EventPluginHub.injection.injectEventPluginOrder = function() {15716oldInjectEventPluginOrder.apply(this, arguments);15717buildSimulators();15718};15719var oldInjectEventPlugins = EventPluginHub.injection.injectEventPluginsByName;15720EventPluginHub.injection.injectEventPluginsByName = function() {15721oldInjectEventPlugins.apply(this, arguments);15722buildSimulators();15723};1572415725buildSimulators();1572615727/**15728* Exports:15729*15730* - `ReactTestUtils.SimulateNative.click(Element/ReactDOMComponent)`15731* - `ReactTestUtils.SimulateNative.mouseMove(Element/ReactDOMComponent)`15732* - `ReactTestUtils.SimulateNative.mouseIn/ReactDOMComponent)`15733* - `ReactTestUtils.SimulateNative.mouseOut(Element/ReactDOMComponent)`15734* - ... (All keys from `EventConstants.topLevelTypes`)15735*15736* Note: Top level event types are a subset of the entire set of handler types15737* (which include a broader set of "synthetic" events). For example, onDragDone15738* is a synthetic event. Except when testing an event plugin or React's event15739* handling code specifically, you probably want to use ReactTestUtils.Simulate15740* to dispatch synthetic events.15741*/1574215743function makeNativeSimulator(eventType) {15744return function(domComponentOrNode, nativeEventData) {15745var fakeNativeEvent = new Event(eventType);15746assign(fakeNativeEvent, nativeEventData);15747if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {15748ReactTestUtils.simulateNativeEventOnDOMComponent(15749eventType,15750domComponentOrNode,15751fakeNativeEvent15752);15753} else if (!!domComponentOrNode.tagName) {15754// Will allow on actual dom nodes.15755ReactTestUtils.simulateNativeEventOnNode(15756eventType,15757domComponentOrNode,15758fakeNativeEvent15759);15760}15761};15762}1576315764var eventType;15765for (eventType in topLevelTypes) {15766// Event type is stored as 'topClick' - we transform that to 'click'15767var convenienceName = eventType.indexOf('top') === 0 ?15768eventType.charAt(3).toLowerCase() + eventType.substr(4) : eventType;15769/**15770* @param {!Element || ReactDOMComponent} domComponentOrNode15771* @param {?Event} nativeEventData Fake native event to use in SyntheticEvent.15772*/15773ReactTestUtils.SimulateNative[convenienceName] =15774makeNativeSimulator(eventType);15775}1577615777module.exports = ReactTestUtils;1577815779},{"100":100,"108":108,"130":130,"16":16,"18":18,"21":21,"29":29,"31":31,"33":33,"43":43,"63":63,"65":65,"72":72,"73":73,"77":77}],96:[function(_dereq_,module,exports){15780/**15781* Copyright 2013-2015, Facebook, Inc.15782* All rights reserved.15783*15784* This source code is licensed under the BSD-style license found in the15785* LICENSE file in the root directory of this source tree. An additional grant15786* of patent rights can be found in the PATENTS file in the same directory.15787*15788* @typechecks static-only15789* @providesModule ReactTransitionChildMapping15790*/1579115792'use strict';1579315794var ReactChildren = _dereq_(37);15795var ReactFragment = _dereq_(69);1579615797var ReactTransitionChildMapping = {15798/**15799* Given `this.props.children`, return an object mapping key to child. Just15800* simple syntactic sugar around ReactChildren.map().15801*15802* @param {*} children `this.props.children`15803* @return {object} Mapping of key to child15804*/15805getChildMapping: function(children) {15806if (!children) {15807return children;15808}15809return ReactFragment.extract(ReactChildren.map(children, function(child) {15810return child;15811}));15812},1581315814/**15815* When you're adding or removing children some may be added or removed in the15816* same render pass. We want to show *both* since we want to simultaneously15817* animate elements in and out. This function takes a previous set of keys15818* and a new set of keys and merges them with its best guess of the correct15819* ordering. In the future we may expose some of the utilities in15820* ReactMultiChild to make this easy, but for now React itself does not15821* directly have this concept of the union of prevChildren and nextChildren15822* so we implement it here.15823*15824* @param {object} prev prev children as returned from15825* `ReactTransitionChildMapping.getChildMapping()`.15826* @param {object} next next children as returned from15827* `ReactTransitionChildMapping.getChildMapping()`.15828* @return {object} a key set that contains all keys in `prev` and all keys15829* in `next` in a reasonable order.15830*/15831mergeChildMappings: function(prev, next) {15832prev = prev || {};15833next = next || {};1583415835function getValueForKey(key) {15836if (next.hasOwnProperty(key)) {15837return next[key];15838} else {15839return prev[key];15840}15841}1584215843// For each key of `next`, the list of keys to insert before that key in15844// the combined list15845var nextKeysPending = {};1584615847var pendingKeys = [];15848for (var prevKey in prev) {15849if (next.hasOwnProperty(prevKey)) {15850if (pendingKeys.length) {15851nextKeysPending[prevKey] = pendingKeys;15852pendingKeys = [];15853}15854} else {15855pendingKeys.push(prevKey);15856}15857}1585815859var i;15860var childMapping = {};15861for (var nextKey in next) {15862if (nextKeysPending.hasOwnProperty(nextKey)) {15863for (i = 0; i < nextKeysPending[nextKey].length; i++) {15864var pendingNextKey = nextKeysPending[nextKey][i];15865childMapping[nextKeysPending[nextKey][i]] = getValueForKey(15866pendingNextKey15867);15868}15869}15870childMapping[nextKey] = getValueForKey(nextKey);15871}1587215873// Finally, add the keys which didn't appear before any key in `next`15874for (i = 0; i < pendingKeys.length; i++) {15875childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);15876}1587715878return childMapping;15879}15880};1588115882module.exports = ReactTransitionChildMapping;1588315884},{"37":37,"69":69}],97:[function(_dereq_,module,exports){15885/**15886* Copyright 2013-2015, Facebook, Inc.15887* All rights reserved.15888*15889* This source code is licensed under the BSD-style license found in the15890* LICENSE file in the root directory of this source tree. An additional grant15891* of patent rights can be found in the PATENTS file in the same directory.15892*15893* @providesModule ReactTransitionEvents15894*/1589515896'use strict';1589715898var ExecutionEnvironment = _dereq_(22);1589915900/**15901* EVENT_NAME_MAP is used to determine which event fired when a15902* transition/animation ends, based on the style property used to15903* define that event.15904*/15905var EVENT_NAME_MAP = {15906transitionend: {15907'transition': 'transitionend',15908'WebkitTransition': 'webkitTransitionEnd',15909'MozTransition': 'mozTransitionEnd',15910'OTransition': 'oTransitionEnd',15911'msTransition': 'MSTransitionEnd'15912},1591315914animationend: {15915'animation': 'animationend',15916'WebkitAnimation': 'webkitAnimationEnd',15917'MozAnimation': 'mozAnimationEnd',15918'OAnimation': 'oAnimationEnd',15919'msAnimation': 'MSAnimationEnd'15920}15921};1592215923var endEvents = [];1592415925function detectEvents() {15926var testEl = document.createElement('div');15927var style = testEl.style;1592815929// On some platforms, in particular some releases of Android 4.x,15930// the un-prefixed "animation" and "transition" properties are defined on the15931// style object but the events that fire will still be prefixed, so we need15932// to check if the un-prefixed events are useable, and if not remove them15933// from the map15934if (!('AnimationEvent' in window)) {15935delete EVENT_NAME_MAP.animationend.animation;15936}1593715938if (!('TransitionEvent' in window)) {15939delete EVENT_NAME_MAP.transitionend.transition;15940}1594115942for (var baseEventName in EVENT_NAME_MAP) {15943var baseEvents = EVENT_NAME_MAP[baseEventName];15944for (var styleName in baseEvents) {15945if (styleName in style) {15946endEvents.push(baseEvents[styleName]);15947break;15948}15949}15950}15951}1595215953if (ExecutionEnvironment.canUseDOM) {15954detectEvents();15955}1595615957// We use the raw {add|remove}EventListener() call because EventListener15958// does not know how to remove event listeners and we really should15959// clean up. Also, these events are not triggered in older browsers15960// so we should be A-OK here.1596115962function addEventListener(node, eventName, eventListener) {15963node.addEventListener(eventName, eventListener, false);15964}1596515966function removeEventListener(node, eventName, eventListener) {15967node.removeEventListener(eventName, eventListener, false);15968}1596915970var ReactTransitionEvents = {15971addEndEventListener: function(node, eventListener) {15972if (endEvents.length === 0) {15973// If CSS transitions are not supported, trigger an "end animation"15974// event immediately.15975window.setTimeout(eventListener, 0);15976return;15977}15978endEvents.forEach(function(endEvent) {15979addEventListener(node, endEvent, eventListener);15980});15981},1598215983removeEndEventListener: function(node, eventListener) {15984if (endEvents.length === 0) {15985return;15986}15987endEvents.forEach(function(endEvent) {15988removeEventListener(node, endEvent, eventListener);15989});15990}15991};1599215993module.exports = ReactTransitionEvents;1599415995},{"22":22}],98:[function(_dereq_,module,exports){15996/**15997* Copyright 2013-2015, Facebook, Inc.15998* All rights reserved.15999*16000* This source code is licensed under the BSD-style license found in the16001* LICENSE file in the root directory of this source tree. An additional grant16002* of patent rights can be found in the PATENTS file in the same directory.16003*16004* @providesModule ReactTransitionGroup16005*/1600616007'use strict';1600816009var React = _dereq_(31);16010var ReactTransitionChildMapping = _dereq_(96);1601116012var assign = _dereq_(29);16013var cloneWithProps = _dereq_(122);16014var emptyFunction = _dereq_(129);1601516016var ReactTransitionGroup = React.createClass({16017displayName: 'ReactTransitionGroup',1601816019propTypes: {16020component: React.PropTypes.any,16021childFactory: React.PropTypes.func16022},1602316024getDefaultProps: function() {16025return {16026component: 'span',16027childFactory: emptyFunction.thatReturnsArgument16028};16029},1603016031getInitialState: function() {16032return {16033children: ReactTransitionChildMapping.getChildMapping(this.props.children)16034};16035},1603616037componentWillMount: function() {16038this.currentlyTransitioningKeys = {};16039this.keysToEnter = [];16040this.keysToLeave = [];16041},1604216043componentDidMount: function() {16044var initialChildMapping = this.state.children;16045for (var key in initialChildMapping) {16046if (initialChildMapping[key]) {16047this.performAppear(key);16048}16049}16050},1605116052componentWillReceiveProps: function(nextProps) {16053var nextChildMapping = ReactTransitionChildMapping.getChildMapping(16054nextProps.children16055);16056var prevChildMapping = this.state.children;1605716058this.setState({16059children: ReactTransitionChildMapping.mergeChildMappings(16060prevChildMapping,16061nextChildMapping16062)16063});1606416065var key;1606616067for (key in nextChildMapping) {16068var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key);16069if (nextChildMapping[key] && !hasPrev &&16070!this.currentlyTransitioningKeys[key]) {16071this.keysToEnter.push(key);16072}16073}1607416075for (key in prevChildMapping) {16076var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key);16077if (prevChildMapping[key] && !hasNext &&16078!this.currentlyTransitioningKeys[key]) {16079this.keysToLeave.push(key);16080}16081}1608216083// If we want to someday check for reordering, we could do it here.16084},1608516086componentDidUpdate: function() {16087var keysToEnter = this.keysToEnter;16088this.keysToEnter = [];16089keysToEnter.forEach(this.performEnter);1609016091var keysToLeave = this.keysToLeave;16092this.keysToLeave = [];16093keysToLeave.forEach(this.performLeave);16094},1609516096performAppear: function(key) {16097this.currentlyTransitioningKeys[key] = true;1609816099var component = this.refs[key];1610016101if (component.componentWillAppear) {16102component.componentWillAppear(16103this._handleDoneAppearing.bind(this, key)16104);16105} else {16106this._handleDoneAppearing(key);16107}16108},1610916110_handleDoneAppearing: function(key) {16111var component = this.refs[key];16112if (component.componentDidAppear) {16113component.componentDidAppear();16114}1611516116delete this.currentlyTransitioningKeys[key];1611716118var currentChildMapping = ReactTransitionChildMapping.getChildMapping(16119this.props.children16120);1612116122if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {16123// This was removed before it had fully appeared. Remove it.16124this.performLeave(key);16125}16126},1612716128performEnter: function(key) {16129this.currentlyTransitioningKeys[key] = true;1613016131var component = this.refs[key];1613216133if (component.componentWillEnter) {16134component.componentWillEnter(16135this._handleDoneEntering.bind(this, key)16136);16137} else {16138this._handleDoneEntering(key);16139}16140},1614116142_handleDoneEntering: function(key) {16143var component = this.refs[key];16144if (component.componentDidEnter) {16145component.componentDidEnter();16146}1614716148delete this.currentlyTransitioningKeys[key];1614916150var currentChildMapping = ReactTransitionChildMapping.getChildMapping(16151this.props.children16152);1615316154if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {16155// This was removed before it had fully entered. Remove it.16156this.performLeave(key);16157}16158},1615916160performLeave: function(key) {16161this.currentlyTransitioningKeys[key] = true;1616216163var component = this.refs[key];16164if (component.componentWillLeave) {16165component.componentWillLeave(this._handleDoneLeaving.bind(this, key));16166} else {16167// Note that this is somewhat dangerous b/c it calls setState()16168// again, effectively mutating the component before all the work16169// is done.16170this._handleDoneLeaving(key);16171}16172},1617316174_handleDoneLeaving: function(key) {16175var component = this.refs[key];1617616177if (component.componentDidLeave) {16178component.componentDidLeave();16179}1618016181delete this.currentlyTransitioningKeys[key];1618216183var currentChildMapping = ReactTransitionChildMapping.getChildMapping(16184this.props.children16185);1618616187if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {16188// This entered again before it fully left. Add it again.16189this.performEnter(key);16190} else {16191var newChildren = assign({}, this.state.children);16192delete newChildren[key];16193this.setState({children: newChildren});16194}16195},1619616197render: function() {16198// TODO: we could get rid of the need for the wrapper node16199// by cloning a single child16200var childrenToRender = [];16201for (var key in this.state.children) {16202var child = this.state.children[key];16203if (child) {16204// You may need to apply reactive updates to a child as it is leaving.16205// The normal React way to do it won't work since the child will have16206// already been removed. In case you need this behavior you can provide16207// a childFactory function to wrap every child, even the ones that are16208// leaving.16209childrenToRender.push(cloneWithProps(16210this.props.childFactory(child),16211{ref: key, key: key}16212));16213}16214}16215return React.createElement(16216this.props.component,16217this.props,16218childrenToRender16219);16220}16221});1622216223module.exports = ReactTransitionGroup;1622416225},{"122":122,"129":129,"29":29,"31":31,"96":96}],99:[function(_dereq_,module,exports){16226/**16227* Copyright 2015, Facebook, Inc.16228* All rights reserved.16229*16230* This source code is licensed under the BSD-style license found in the16231* LICENSE file in the root directory of this source tree. An additional grant16232* of patent rights can be found in the PATENTS file in the same directory.16233*16234* @providesModule ReactUpdateQueue16235*/1623616237'use strict';1623816239var ReactLifeCycle = _dereq_(74);16240var ReactCurrentOwner = _dereq_(45);16241var ReactElement = _dereq_(63);16242var ReactInstanceMap = _dereq_(73);16243var ReactUpdates = _dereq_(100);1624416245var assign = _dereq_(29);16246var invariant = _dereq_(150);16247var warning = _dereq_(171);1624816249function enqueueUpdate(internalInstance) {16250if (internalInstance !== ReactLifeCycle.currentlyMountingInstance) {16251// If we're in a componentWillMount handler, don't enqueue a rerender16252// because ReactUpdates assumes we're in a browser context (which is16253// wrong for server rendering) and we're about to do a render anyway.16254// See bug in #1740.16255ReactUpdates.enqueueUpdate(internalInstance);16256}16257}1625816259function getInternalInstanceReadyForUpdate(publicInstance, callerName) {16260("production" !== "development" ? invariant(16261ReactCurrentOwner.current == null,16262'%s(...): Cannot update during an existing state transition ' +16263'(such as within `render`). Render methods should be a pure function ' +16264'of props and state.',16265callerName16266) : invariant(ReactCurrentOwner.current == null));1626716268var internalInstance = ReactInstanceMap.get(publicInstance);16269if (!internalInstance) {16270if ("production" !== "development") {16271// Only warn when we have a callerName. Otherwise we should be silent.16272// We're probably calling from enqueueCallback. We don't want to warn16273// there because we already warned for the corresponding lifecycle method.16274("production" !== "development" ? warning(16275!callerName,16276'%s(...): Can only update a mounted or mounting component. ' +16277'This usually means you called %s() on an unmounted ' +16278'component. This is a no-op.',16279callerName,16280callerName16281) : null);16282}16283return null;16284}1628516286if (internalInstance === ReactLifeCycle.currentlyUnmountingInstance) {16287return null;16288}1628916290return internalInstance;16291}1629216293/**16294* ReactUpdateQueue allows for state updates to be scheduled into a later16295* reconciliation step.16296*/16297var ReactUpdateQueue = {1629816299/**16300* Enqueue a callback that will be executed after all the pending updates16301* have processed.16302*16303* @param {ReactClass} publicInstance The instance to use as `this` context.16304* @param {?function} callback Called after state is updated.16305* @internal16306*/16307enqueueCallback: function(publicInstance, callback) {16308("production" !== "development" ? invariant(16309typeof callback === 'function',16310'enqueueCallback(...): You called `setProps`, `replaceProps`, ' +16311'`setState`, `replaceState`, or `forceUpdate` with a callback that ' +16312'isn\'t callable.'16313) : invariant(typeof callback === 'function'));16314var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);1631516316// Previously we would throw an error if we didn't have an internal16317// instance. Since we want to make it a no-op instead, we mirror the same16318// behavior we have in other enqueue* methods.16319// We also need to ignore callbacks in componentWillMount. See16320// enqueueUpdates.16321if (!internalInstance ||16322internalInstance === ReactLifeCycle.currentlyMountingInstance) {16323return null;16324}1632516326if (internalInstance._pendingCallbacks) {16327internalInstance._pendingCallbacks.push(callback);16328} else {16329internalInstance._pendingCallbacks = [callback];16330}16331// TODO: The callback here is ignored when setState is called from16332// componentWillMount. Either fix it or disallow doing so completely in16333// favor of getInitialState. Alternatively, we can disallow16334// componentWillMount during server-side rendering.16335enqueueUpdate(internalInstance);16336},1633716338enqueueCallbackInternal: function(internalInstance, callback) {16339("production" !== "development" ? invariant(16340typeof callback === 'function',16341'enqueueCallback(...): You called `setProps`, `replaceProps`, ' +16342'`setState`, `replaceState`, or `forceUpdate` with a callback that ' +16343'isn\'t callable.'16344) : invariant(typeof callback === 'function'));16345if (internalInstance._pendingCallbacks) {16346internalInstance._pendingCallbacks.push(callback);16347} else {16348internalInstance._pendingCallbacks = [callback];16349}16350enqueueUpdate(internalInstance);16351},1635216353/**16354* Forces an update. This should only be invoked when it is known with16355* certainty that we are **not** in a DOM transaction.16356*16357* You may want to call this when you know that some deeper aspect of the16358* component's state has changed but `setState` was not called.16359*16360* This will not invoke `shouldUpdateComponent`, but it will invoke16361* `componentWillUpdate` and `componentDidUpdate`.16362*16363* @param {ReactClass} publicInstance The instance that should rerender.16364* @internal16365*/16366enqueueForceUpdate: function(publicInstance) {16367var internalInstance = getInternalInstanceReadyForUpdate(16368publicInstance,16369'forceUpdate'16370);1637116372if (!internalInstance) {16373return;16374}1637516376internalInstance._pendingForceUpdate = true;1637716378enqueueUpdate(internalInstance);16379},1638016381/**16382* Replaces all of the state. Always use this or `setState` to mutate state.16383* You should treat `this.state` as immutable.16384*16385* There is no guarantee that `this.state` will be immediately updated, so16386* accessing `this.state` after calling this method may return the old value.16387*16388* @param {ReactClass} publicInstance The instance that should rerender.16389* @param {object} completeState Next state.16390* @internal16391*/16392enqueueReplaceState: function(publicInstance, completeState) {16393var internalInstance = getInternalInstanceReadyForUpdate(16394publicInstance,16395'replaceState'16396);1639716398if (!internalInstance) {16399return;16400}1640116402internalInstance._pendingStateQueue = [completeState];16403internalInstance._pendingReplaceState = true;1640416405enqueueUpdate(internalInstance);16406},1640716408/**16409* Sets a subset of the state. This only exists because _pendingState is16410* internal. This provides a merging strategy that is not available to deep16411* properties which is confusing. TODO: Expose pendingState or don't use it16412* during the merge.16413*16414* @param {ReactClass} publicInstance The instance that should rerender.16415* @param {object} partialState Next partial state to be merged with state.16416* @internal16417*/16418enqueueSetState: function(publicInstance, partialState) {16419var internalInstance = getInternalInstanceReadyForUpdate(16420publicInstance,16421'setState'16422);1642316424if (!internalInstance) {16425return;16426}1642716428var queue =16429internalInstance._pendingStateQueue ||16430(internalInstance._pendingStateQueue = []);16431queue.push(partialState);1643216433enqueueUpdate(internalInstance);16434},1643516436/**16437* Sets a subset of the props.16438*16439* @param {ReactClass} publicInstance The instance that should rerender.16440* @param {object} partialProps Subset of the next props.16441* @internal16442*/16443enqueueSetProps: function(publicInstance, partialProps) {16444var internalInstance = getInternalInstanceReadyForUpdate(16445publicInstance,16446'setProps'16447);1644816449if (!internalInstance) {16450return;16451}1645216453("production" !== "development" ? invariant(16454internalInstance._isTopLevel,16455'setProps(...): You called `setProps` on a ' +16456'component with a parent. This is an anti-pattern since props will ' +16457'get reactively updated when rendered. Instead, change the owner\'s ' +16458'`render` method to pass the correct value as props to the component ' +16459'where it is created.'16460) : invariant(internalInstance._isTopLevel));1646116462// Merge with the pending element if it exists, otherwise with existing16463// element props.16464var element = internalInstance._pendingElement ||16465internalInstance._currentElement;16466var props = assign({}, element.props, partialProps);16467internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(16468element,16469props16470);1647116472enqueueUpdate(internalInstance);16473},1647416475/**16476* Replaces all of the props.16477*16478* @param {ReactClass} publicInstance The instance that should rerender.16479* @param {object} props New props.16480* @internal16481*/16482enqueueReplaceProps: function(publicInstance, props) {16483var internalInstance = getInternalInstanceReadyForUpdate(16484publicInstance,16485'replaceProps'16486);1648716488if (!internalInstance) {16489return;16490}1649116492("production" !== "development" ? invariant(16493internalInstance._isTopLevel,16494'replaceProps(...): You called `replaceProps` on a ' +16495'component with a parent. This is an anti-pattern since props will ' +16496'get reactively updated when rendered. Instead, change the owner\'s ' +16497'`render` method to pass the correct value as props to the component ' +16498'where it is created.'16499) : invariant(internalInstance._isTopLevel));1650016501// Merge with the pending element if it exists, otherwise with existing16502// element props.16503var element = internalInstance._pendingElement ||16504internalInstance._currentElement;16505internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(16506element,16507props16508);1650916510enqueueUpdate(internalInstance);16511},1651216513enqueueElementInternal: function(internalInstance, newElement) {16514internalInstance._pendingElement = newElement;16515enqueueUpdate(internalInstance);16516}1651716518};1651916520module.exports = ReactUpdateQueue;1652116522},{"100":100,"150":150,"171":171,"29":29,"45":45,"63":63,"73":73,"74":74}],100:[function(_dereq_,module,exports){16523/**16524* Copyright 2013-2015, Facebook, Inc.16525* All rights reserved.16526*16527* This source code is licensed under the BSD-style license found in the16528* LICENSE file in the root directory of this source tree. An additional grant16529* of patent rights can be found in the PATENTS file in the same directory.16530*16531* @providesModule ReactUpdates16532*/1653316534'use strict';1653516536var CallbackQueue = _dereq_(7);16537var PooledClass = _dereq_(30);16538var ReactCurrentOwner = _dereq_(45);16539var ReactPerf = _dereq_(82);16540var ReactReconciler = _dereq_(89);16541var Transaction = _dereq_(116);1654216543var assign = _dereq_(29);16544var invariant = _dereq_(150);16545var warning = _dereq_(171);1654616547var dirtyComponents = [];16548var asapCallbackQueue = CallbackQueue.getPooled();16549var asapEnqueued = false;1655016551var batchingStrategy = null;1655216553function ensureInjected() {16554("production" !== "development" ? invariant(16555ReactUpdates.ReactReconcileTransaction && batchingStrategy,16556'ReactUpdates: must inject a reconcile transaction class and batching ' +16557'strategy'16558) : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy));16559}1656016561var NESTED_UPDATES = {16562initialize: function() {16563this.dirtyComponentsLength = dirtyComponents.length;16564},16565close: function() {16566if (this.dirtyComponentsLength !== dirtyComponents.length) {16567// Additional updates were enqueued by componentDidUpdate handlers or16568// similar; before our own UPDATE_QUEUEING wrapper closes, we want to run16569// these new updates so that if A's componentDidUpdate calls setState on16570// B, B will update before the callback A's updater provided when calling16571// setState.16572dirtyComponents.splice(0, this.dirtyComponentsLength);16573flushBatchedUpdates();16574} else {16575dirtyComponents.length = 0;16576}16577}16578};1657916580var UPDATE_QUEUEING = {16581initialize: function() {16582this.callbackQueue.reset();16583},16584close: function() {16585this.callbackQueue.notifyAll();16586}16587};1658816589var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];1659016591function ReactUpdatesFlushTransaction() {16592this.reinitializeTransaction();16593this.dirtyComponentsLength = null;16594this.callbackQueue = CallbackQueue.getPooled();16595this.reconcileTransaction =16596ReactUpdates.ReactReconcileTransaction.getPooled();16597}1659816599assign(16600ReactUpdatesFlushTransaction.prototype,16601Transaction.Mixin, {16602getTransactionWrappers: function() {16603return TRANSACTION_WRAPPERS;16604},1660516606destructor: function() {16607this.dirtyComponentsLength = null;16608CallbackQueue.release(this.callbackQueue);16609this.callbackQueue = null;16610ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);16611this.reconcileTransaction = null;16612},1661316614perform: function(method, scope, a) {16615// Essentially calls `this.reconcileTransaction.perform(method, scope, a)`16616// with this transaction's wrappers around it.16617return Transaction.Mixin.perform.call(16618this,16619this.reconcileTransaction.perform,16620this.reconcileTransaction,16621method,16622scope,16623a16624);16625}16626});1662716628PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);1662916630function batchedUpdates(callback, a, b, c, d) {16631ensureInjected();16632batchingStrategy.batchedUpdates(callback, a, b, c, d);16633}1663416635/**16636* Array comparator for ReactComponents by mount ordering.16637*16638* @param {ReactComponent} c1 first component you're comparing16639* @param {ReactComponent} c2 second component you're comparing16640* @return {number} Return value usable by Array.prototype.sort().16641*/16642function mountOrderComparator(c1, c2) {16643return c1._mountOrder - c2._mountOrder;16644}1664516646function runBatchedUpdates(transaction) {16647var len = transaction.dirtyComponentsLength;16648("production" !== "development" ? invariant(16649len === dirtyComponents.length,16650'Expected flush transaction\'s stored dirty-components length (%s) to ' +16651'match dirty-components array length (%s).',16652len,16653dirtyComponents.length16654) : invariant(len === dirtyComponents.length));1665516656// Since reconciling a component higher in the owner hierarchy usually (not16657// always -- see shouldComponentUpdate()) will reconcile children, reconcile16658// them before their children by sorting the array.16659dirtyComponents.sort(mountOrderComparator);1666016661for (var i = 0; i < len; i++) {16662// If a component is unmounted before pending changes apply, it will still16663// be here, but we assume that it has cleared its _pendingCallbacks and16664// that performUpdateIfNecessary is a noop.16665var component = dirtyComponents[i];1666616667// If performUpdateIfNecessary happens to enqueue any new updates, we16668// shouldn't execute the callbacks until the next render happens, so16669// stash the callbacks first16670var callbacks = component._pendingCallbacks;16671component._pendingCallbacks = null;1667216673ReactReconciler.performUpdateIfNecessary(16674component,16675transaction.reconcileTransaction16676);1667716678if (callbacks) {16679for (var j = 0; j < callbacks.length; j++) {16680transaction.callbackQueue.enqueue(16681callbacks[j],16682component.getPublicInstance()16683);16684}16685}16686}16687}1668816689var flushBatchedUpdates = function() {16690// ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents16691// array and perform any updates enqueued by mount-ready handlers (i.e.,16692// componentDidUpdate) but we need to check here too in order to catch16693// updates enqueued by setState callbacks and asap calls.16694while (dirtyComponents.length || asapEnqueued) {16695if (dirtyComponents.length) {16696var transaction = ReactUpdatesFlushTransaction.getPooled();16697transaction.perform(runBatchedUpdates, null, transaction);16698ReactUpdatesFlushTransaction.release(transaction);16699}1670016701if (asapEnqueued) {16702asapEnqueued = false;16703var queue = asapCallbackQueue;16704asapCallbackQueue = CallbackQueue.getPooled();16705queue.notifyAll();16706CallbackQueue.release(queue);16707}16708}16709};16710flushBatchedUpdates = ReactPerf.measure(16711'ReactUpdates',16712'flushBatchedUpdates',16713flushBatchedUpdates16714);1671516716/**16717* Mark a component as needing a rerender, adding an optional callback to a16718* list of functions which will be executed once the rerender occurs.16719*/16720function enqueueUpdate(component) {16721ensureInjected();1672216723// Various parts of our code (such as ReactCompositeComponent's16724// _renderValidatedComponent) assume that calls to render aren't nested;16725// verify that that's the case. (This is called by each top-level update16726// function, like setProps, setState, forceUpdate, etc.; creation and16727// destruction of top-level components is guarded in ReactMount.)16728("production" !== "development" ? warning(16729ReactCurrentOwner.current == null,16730'enqueueUpdate(): Render methods should be a pure function of props ' +16731'and state; triggering nested component updates from render is not ' +16732'allowed. If necessary, trigger nested updates in ' +16733'componentDidUpdate.'16734) : null);1673516736if (!batchingStrategy.isBatchingUpdates) {16737batchingStrategy.batchedUpdates(enqueueUpdate, component);16738return;16739}1674016741dirtyComponents.push(component);16742}1674316744/**16745* Enqueue a callback to be run at the end of the current batching cycle. Throws16746* if no updates are currently being performed.16747*/16748function asap(callback, context) {16749("production" !== "development" ? invariant(16750batchingStrategy.isBatchingUpdates,16751'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' +16752'updates are not being batched.'16753) : invariant(batchingStrategy.isBatchingUpdates));16754asapCallbackQueue.enqueue(callback, context);16755asapEnqueued = true;16756}1675716758var ReactUpdatesInjection = {16759injectReconcileTransaction: function(ReconcileTransaction) {16760("production" !== "development" ? invariant(16761ReconcileTransaction,16762'ReactUpdates: must provide a reconcile transaction class'16763) : invariant(ReconcileTransaction));16764ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;16765},1676616767injectBatchingStrategy: function(_batchingStrategy) {16768("production" !== "development" ? invariant(16769_batchingStrategy,16770'ReactUpdates: must provide a batching strategy'16771) : invariant(_batchingStrategy));16772("production" !== "development" ? invariant(16773typeof _batchingStrategy.batchedUpdates === 'function',16774'ReactUpdates: must provide a batchedUpdates() function'16775) : invariant(typeof _batchingStrategy.batchedUpdates === 'function'));16776("production" !== "development" ? invariant(16777typeof _batchingStrategy.isBatchingUpdates === 'boolean',16778'ReactUpdates: must provide an isBatchingUpdates boolean attribute'16779) : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean'));16780batchingStrategy = _batchingStrategy;16781}16782};1678316784var ReactUpdates = {16785/**16786* React references `ReactReconcileTransaction` using this property in order16787* to allow dependency injection.16788*16789* @internal16790*/16791ReactReconcileTransaction: null,1679216793batchedUpdates: batchedUpdates,16794enqueueUpdate: enqueueUpdate,16795flushBatchedUpdates: flushBatchedUpdates,16796injection: ReactUpdatesInjection,16797asap: asap16798};1679916800module.exports = ReactUpdates;1680116802},{"116":116,"150":150,"171":171,"29":29,"30":30,"45":45,"7":7,"82":82,"89":89}],101:[function(_dereq_,module,exports){16803/**16804* Copyright 2013-2015, Facebook, Inc.16805* All rights reserved.16806*16807* This source code is licensed under the BSD-style license found in the16808* LICENSE file in the root directory of this source tree. An additional grant16809* of patent rights can be found in the PATENTS file in the same directory.16810*16811* @providesModule SVGDOMPropertyConfig16812*/1681316814/*jslint bitwise: true*/1681516816'use strict';1681716818var DOMProperty = _dereq_(11);1681916820var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;1682116822var SVGDOMPropertyConfig = {16823Properties: {16824clipPath: MUST_USE_ATTRIBUTE,16825cx: MUST_USE_ATTRIBUTE,16826cy: MUST_USE_ATTRIBUTE,16827d: MUST_USE_ATTRIBUTE,16828dx: MUST_USE_ATTRIBUTE,16829dy: MUST_USE_ATTRIBUTE,16830fill: MUST_USE_ATTRIBUTE,16831fillOpacity: MUST_USE_ATTRIBUTE,16832fontFamily: MUST_USE_ATTRIBUTE,16833fontSize: MUST_USE_ATTRIBUTE,16834fx: MUST_USE_ATTRIBUTE,16835fy: MUST_USE_ATTRIBUTE,16836gradientTransform: MUST_USE_ATTRIBUTE,16837gradientUnits: MUST_USE_ATTRIBUTE,16838markerEnd: MUST_USE_ATTRIBUTE,16839markerMid: MUST_USE_ATTRIBUTE,16840markerStart: MUST_USE_ATTRIBUTE,16841offset: MUST_USE_ATTRIBUTE,16842opacity: MUST_USE_ATTRIBUTE,16843patternContentUnits: MUST_USE_ATTRIBUTE,16844patternUnits: MUST_USE_ATTRIBUTE,16845points: MUST_USE_ATTRIBUTE,16846preserveAspectRatio: MUST_USE_ATTRIBUTE,16847r: MUST_USE_ATTRIBUTE,16848rx: MUST_USE_ATTRIBUTE,16849ry: MUST_USE_ATTRIBUTE,16850spreadMethod: MUST_USE_ATTRIBUTE,16851stopColor: MUST_USE_ATTRIBUTE,16852stopOpacity: MUST_USE_ATTRIBUTE,16853stroke: MUST_USE_ATTRIBUTE,16854strokeDasharray: MUST_USE_ATTRIBUTE,16855strokeLinecap: MUST_USE_ATTRIBUTE,16856strokeOpacity: MUST_USE_ATTRIBUTE,16857strokeWidth: MUST_USE_ATTRIBUTE,16858textAnchor: MUST_USE_ATTRIBUTE,16859transform: MUST_USE_ATTRIBUTE,16860version: MUST_USE_ATTRIBUTE,16861viewBox: MUST_USE_ATTRIBUTE,16862x1: MUST_USE_ATTRIBUTE,16863x2: MUST_USE_ATTRIBUTE,16864x: MUST_USE_ATTRIBUTE,16865y1: MUST_USE_ATTRIBUTE,16866y2: MUST_USE_ATTRIBUTE,16867y: MUST_USE_ATTRIBUTE16868},16869DOMAttributeNames: {16870clipPath: 'clip-path',16871fillOpacity: 'fill-opacity',16872fontFamily: 'font-family',16873fontSize: 'font-size',16874gradientTransform: 'gradientTransform',16875gradientUnits: 'gradientUnits',16876markerEnd: 'marker-end',16877markerMid: 'marker-mid',16878markerStart: 'marker-start',16879patternContentUnits: 'patternContentUnits',16880patternUnits: 'patternUnits',16881preserveAspectRatio: 'preserveAspectRatio',16882spreadMethod: 'spreadMethod',16883stopColor: 'stop-color',16884stopOpacity: 'stop-opacity',16885strokeDasharray: 'stroke-dasharray',16886strokeLinecap: 'stroke-linecap',16887strokeOpacity: 'stroke-opacity',16888strokeWidth: 'stroke-width',16889textAnchor: 'text-anchor',16890viewBox: 'viewBox'16891}16892};1689316894module.exports = SVGDOMPropertyConfig;1689516896},{"11":11}],102:[function(_dereq_,module,exports){16897/**16898* Copyright 2013-2015, Facebook, Inc.16899* All rights reserved.16900*16901* This source code is licensed under the BSD-style license found in the16902* LICENSE file in the root directory of this source tree. An additional grant16903* of patent rights can be found in the PATENTS file in the same directory.16904*16905* @providesModule SelectEventPlugin16906*/1690716908'use strict';1690916910var EventConstants = _dereq_(16);16911var EventPropagators = _dereq_(21);16912var ReactInputSelection = _dereq_(71);16913var SyntheticEvent = _dereq_(108);1691416915var getActiveElement = _dereq_(136);16916var isTextInputElement = _dereq_(153);16917var keyOf = _dereq_(157);16918var shallowEqual = _dereq_(166);1691916920var topLevelTypes = EventConstants.topLevelTypes;1692116922var eventTypes = {16923select: {16924phasedRegistrationNames: {16925bubbled: keyOf({onSelect: null}),16926captured: keyOf({onSelectCapture: null})16927},16928dependencies: [16929topLevelTypes.topBlur,16930topLevelTypes.topContextMenu,16931topLevelTypes.topFocus,16932topLevelTypes.topKeyDown,16933topLevelTypes.topMouseDown,16934topLevelTypes.topMouseUp,16935topLevelTypes.topSelectionChange16936]16937}16938};1693916940var activeElement = null;16941var activeElementID = null;16942var lastSelection = null;16943var mouseDown = false;1694416945/**16946* Get an object which is a unique representation of the current selection.16947*16948* The return value will not be consistent across nodes or browsers, but16949* two identical selections on the same node will return identical objects.16950*16951* @param {DOMElement} node16952* @param {object}16953*/16954function getSelection(node) {16955if ('selectionStart' in node &&16956ReactInputSelection.hasSelectionCapabilities(node)) {16957return {16958start: node.selectionStart,16959end: node.selectionEnd16960};16961} else if (window.getSelection) {16962var selection = window.getSelection();16963return {16964anchorNode: selection.anchorNode,16965anchorOffset: selection.anchorOffset,16966focusNode: selection.focusNode,16967focusOffset: selection.focusOffset16968};16969} else if (document.selection) {16970var range = document.selection.createRange();16971return {16972parentElement: range.parentElement(),16973text: range.text,16974top: range.boundingTop,16975left: range.boundingLeft16976};16977}16978}1697916980/**16981* Poll selection to see whether it's changed.16982*16983* @param {object} nativeEvent16984* @return {?SyntheticEvent}16985*/16986function constructSelectEvent(nativeEvent) {16987// Ensure we have the right element, and that the user is not dragging a16988// selection (this matches native `select` event behavior). In HTML5, select16989// fires only on input and textarea thus if there's no focused element we16990// won't dispatch.16991if (mouseDown ||16992activeElement == null ||16993activeElement !== getActiveElement()) {16994return null;16995}1699616997// Only fire when selection has actually changed.16998var currentSelection = getSelection(activeElement);16999if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {17000lastSelection = currentSelection;1700117002var syntheticEvent = SyntheticEvent.getPooled(17003eventTypes.select,17004activeElementID,17005nativeEvent17006);1700717008syntheticEvent.type = 'select';17009syntheticEvent.target = activeElement;1701017011EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);1701217013return syntheticEvent;17014}17015}1701617017/**17018* This plugin creates an `onSelect` event that normalizes select events17019* across form elements.17020*17021* Supported elements are:17022* - input (see `isTextInputElement`)17023* - textarea17024* - contentEditable17025*17026* This differs from native browser implementations in the following ways:17027* - Fires on contentEditable fields as well as inputs.17028* - Fires for collapsed selection.17029* - Fires after user input.17030*/17031var SelectEventPlugin = {1703217033eventTypes: eventTypes,1703417035/**17036* @param {string} topLevelType Record from `EventConstants`.17037* @param {DOMEventTarget} topLevelTarget The listening component root node.17038* @param {string} topLevelTargetID ID of `topLevelTarget`.17039* @param {object} nativeEvent Native browser event.17040* @return {*} An accumulation of synthetic events.17041* @see {EventPluginHub.extractEvents}17042*/17043extractEvents: function(17044topLevelType,17045topLevelTarget,17046topLevelTargetID,17047nativeEvent) {1704817049switch (topLevelType) {17050// Track the input node that has focus.17051case topLevelTypes.topFocus:17052if (isTextInputElement(topLevelTarget) ||17053topLevelTarget.contentEditable === 'true') {17054activeElement = topLevelTarget;17055activeElementID = topLevelTargetID;17056lastSelection = null;17057}17058break;17059case topLevelTypes.topBlur:17060activeElement = null;17061activeElementID = null;17062lastSelection = null;17063break;1706417065// Don't fire the event while the user is dragging. This matches the17066// semantics of the native select event.17067case topLevelTypes.topMouseDown:17068mouseDown = true;17069break;17070case topLevelTypes.topContextMenu:17071case topLevelTypes.topMouseUp:17072mouseDown = false;17073return constructSelectEvent(nativeEvent);1707417075// Chrome and IE fire non-standard event when selection is changed (and17076// sometimes when it hasn't).17077// Firefox doesn't support selectionchange, so check selection status17078// after each key entry. The selection changes after keydown and before17079// keyup, but we check on keydown as well in the case of holding down a17080// key, when multiple keydown events are fired but only one keyup is.17081case topLevelTypes.topSelectionChange:17082case topLevelTypes.topKeyDown:17083case topLevelTypes.topKeyUp:17084return constructSelectEvent(nativeEvent);17085}17086}17087};1708817089module.exports = SelectEventPlugin;1709017091},{"108":108,"136":136,"153":153,"157":157,"16":16,"166":166,"21":21,"71":71}],103:[function(_dereq_,module,exports){17092/**17093* Copyright 2013-2015, Facebook, Inc.17094* All rights reserved.17095*17096* This source code is licensed under the BSD-style license found in the17097* LICENSE file in the root directory of this source tree. An additional grant17098* of patent rights can be found in the PATENTS file in the same directory.17099*17100* @providesModule ServerReactRootIndex17101* @typechecks17102*/1710317104'use strict';1710517106/**17107* Size of the reactRoot ID space. We generate random numbers for React root17108* IDs and if there's a collision the events and DOM update system will17109* get confused. In the future we need a way to generate GUIDs but for17110* now this will work on a smaller scale.17111*/17112var GLOBAL_MOUNT_POINT_MAX = Math.pow(2, 53);1711317114var ServerReactRootIndex = {17115createReactRootIndex: function() {17116return Math.ceil(Math.random() * GLOBAL_MOUNT_POINT_MAX);17117}17118};1711917120module.exports = ServerReactRootIndex;1712117122},{}],104:[function(_dereq_,module,exports){17123/**17124* Copyright 2013-2015, Facebook, Inc.17125* All rights reserved.17126*17127* This source code is licensed under the BSD-style license found in the17128* LICENSE file in the root directory of this source tree. An additional grant17129* of patent rights can be found in the PATENTS file in the same directory.17130*17131* @providesModule SimpleEventPlugin17132*/1713317134'use strict';1713517136var EventConstants = _dereq_(16);17137var EventPluginUtils = _dereq_(20);17138var EventPropagators = _dereq_(21);17139var SyntheticClipboardEvent = _dereq_(105);17140var SyntheticEvent = _dereq_(108);17141var SyntheticFocusEvent = _dereq_(109);17142var SyntheticKeyboardEvent = _dereq_(111);17143var SyntheticMouseEvent = _dereq_(112);17144var SyntheticDragEvent = _dereq_(107);17145var SyntheticTouchEvent = _dereq_(113);17146var SyntheticUIEvent = _dereq_(114);17147var SyntheticWheelEvent = _dereq_(115);1714817149var getEventCharCode = _dereq_(137);1715017151var invariant = _dereq_(150);17152var keyOf = _dereq_(157);17153var warning = _dereq_(171);1715417155var topLevelTypes = EventConstants.topLevelTypes;1715617157var eventTypes = {17158blur: {17159phasedRegistrationNames: {17160bubbled: keyOf({onBlur: true}),17161captured: keyOf({onBlurCapture: true})17162}17163},17164click: {17165phasedRegistrationNames: {17166bubbled: keyOf({onClick: true}),17167captured: keyOf({onClickCapture: true})17168}17169},17170contextMenu: {17171phasedRegistrationNames: {17172bubbled: keyOf({onContextMenu: true}),17173captured: keyOf({onContextMenuCapture: true})17174}17175},17176copy: {17177phasedRegistrationNames: {17178bubbled: keyOf({onCopy: true}),17179captured: keyOf({onCopyCapture: true})17180}17181},17182cut: {17183phasedRegistrationNames: {17184bubbled: keyOf({onCut: true}),17185captured: keyOf({onCutCapture: true})17186}17187},17188doubleClick: {17189phasedRegistrationNames: {17190bubbled: keyOf({onDoubleClick: true}),17191captured: keyOf({onDoubleClickCapture: true})17192}17193},17194drag: {17195phasedRegistrationNames: {17196bubbled: keyOf({onDrag: true}),17197captured: keyOf({onDragCapture: true})17198}17199},17200dragEnd: {17201phasedRegistrationNames: {17202bubbled: keyOf({onDragEnd: true}),17203captured: keyOf({onDragEndCapture: true})17204}17205},17206dragEnter: {17207phasedRegistrationNames: {17208bubbled: keyOf({onDragEnter: true}),17209captured: keyOf({onDragEnterCapture: true})17210}17211},17212dragExit: {17213phasedRegistrationNames: {17214bubbled: keyOf({onDragExit: true}),17215captured: keyOf({onDragExitCapture: true})17216}17217},17218dragLeave: {17219phasedRegistrationNames: {17220bubbled: keyOf({onDragLeave: true}),17221captured: keyOf({onDragLeaveCapture: true})17222}17223},17224dragOver: {17225phasedRegistrationNames: {17226bubbled: keyOf({onDragOver: true}),17227captured: keyOf({onDragOverCapture: true})17228}17229},17230dragStart: {17231phasedRegistrationNames: {17232bubbled: keyOf({onDragStart: true}),17233captured: keyOf({onDragStartCapture: true})17234}17235},17236drop: {17237phasedRegistrationNames: {17238bubbled: keyOf({onDrop: true}),17239captured: keyOf({onDropCapture: true})17240}17241},17242focus: {17243phasedRegistrationNames: {17244bubbled: keyOf({onFocus: true}),17245captured: keyOf({onFocusCapture: true})17246}17247},17248input: {17249phasedRegistrationNames: {17250bubbled: keyOf({onInput: true}),17251captured: keyOf({onInputCapture: true})17252}17253},17254keyDown: {17255phasedRegistrationNames: {17256bubbled: keyOf({onKeyDown: true}),17257captured: keyOf({onKeyDownCapture: true})17258}17259},17260keyPress: {17261phasedRegistrationNames: {17262bubbled: keyOf({onKeyPress: true}),17263captured: keyOf({onKeyPressCapture: true})17264}17265},17266keyUp: {17267phasedRegistrationNames: {17268bubbled: keyOf({onKeyUp: true}),17269captured: keyOf({onKeyUpCapture: true})17270}17271},17272load: {17273phasedRegistrationNames: {17274bubbled: keyOf({onLoad: true}),17275captured: keyOf({onLoadCapture: true})17276}17277},17278error: {17279phasedRegistrationNames: {17280bubbled: keyOf({onError: true}),17281captured: keyOf({onErrorCapture: true})17282}17283},17284// Note: We do not allow listening to mouseOver events. Instead, use the17285// onMouseEnter/onMouseLeave created by `EnterLeaveEventPlugin`.17286mouseDown: {17287phasedRegistrationNames: {17288bubbled: keyOf({onMouseDown: true}),17289captured: keyOf({onMouseDownCapture: true})17290}17291},17292mouseMove: {17293phasedRegistrationNames: {17294bubbled: keyOf({onMouseMove: true}),17295captured: keyOf({onMouseMoveCapture: true})17296}17297},17298mouseOut: {17299phasedRegistrationNames: {17300bubbled: keyOf({onMouseOut: true}),17301captured: keyOf({onMouseOutCapture: true})17302}17303},17304mouseOver: {17305phasedRegistrationNames: {17306bubbled: keyOf({onMouseOver: true}),17307captured: keyOf({onMouseOverCapture: true})17308}17309},17310mouseUp: {17311phasedRegistrationNames: {17312bubbled: keyOf({onMouseUp: true}),17313captured: keyOf({onMouseUpCapture: true})17314}17315},17316paste: {17317phasedRegistrationNames: {17318bubbled: keyOf({onPaste: true}),17319captured: keyOf({onPasteCapture: true})17320}17321},17322reset: {17323phasedRegistrationNames: {17324bubbled: keyOf({onReset: true}),17325captured: keyOf({onResetCapture: true})17326}17327},17328scroll: {17329phasedRegistrationNames: {17330bubbled: keyOf({onScroll: true}),17331captured: keyOf({onScrollCapture: true})17332}17333},17334submit: {17335phasedRegistrationNames: {17336bubbled: keyOf({onSubmit: true}),17337captured: keyOf({onSubmitCapture: true})17338}17339},17340touchCancel: {17341phasedRegistrationNames: {17342bubbled: keyOf({onTouchCancel: true}),17343captured: keyOf({onTouchCancelCapture: true})17344}17345},17346touchEnd: {17347phasedRegistrationNames: {17348bubbled: keyOf({onTouchEnd: true}),17349captured: keyOf({onTouchEndCapture: true})17350}17351},17352touchMove: {17353phasedRegistrationNames: {17354bubbled: keyOf({onTouchMove: true}),17355captured: keyOf({onTouchMoveCapture: true})17356}17357},17358touchStart: {17359phasedRegistrationNames: {17360bubbled: keyOf({onTouchStart: true}),17361captured: keyOf({onTouchStartCapture: true})17362}17363},17364wheel: {17365phasedRegistrationNames: {17366bubbled: keyOf({onWheel: true}),17367captured: keyOf({onWheelCapture: true})17368}17369}17370};1737117372var topLevelEventsToDispatchConfig = {17373topBlur: eventTypes.blur,17374topClick: eventTypes.click,17375topContextMenu: eventTypes.contextMenu,17376topCopy: eventTypes.copy,17377topCut: eventTypes.cut,17378topDoubleClick: eventTypes.doubleClick,17379topDrag: eventTypes.drag,17380topDragEnd: eventTypes.dragEnd,17381topDragEnter: eventTypes.dragEnter,17382topDragExit: eventTypes.dragExit,17383topDragLeave: eventTypes.dragLeave,17384topDragOver: eventTypes.dragOver,17385topDragStart: eventTypes.dragStart,17386topDrop: eventTypes.drop,17387topError: eventTypes.error,17388topFocus: eventTypes.focus,17389topInput: eventTypes.input,17390topKeyDown: eventTypes.keyDown,17391topKeyPress: eventTypes.keyPress,17392topKeyUp: eventTypes.keyUp,17393topLoad: eventTypes.load,17394topMouseDown: eventTypes.mouseDown,17395topMouseMove: eventTypes.mouseMove,17396topMouseOut: eventTypes.mouseOut,17397topMouseOver: eventTypes.mouseOver,17398topMouseUp: eventTypes.mouseUp,17399topPaste: eventTypes.paste,17400topReset: eventTypes.reset,17401topScroll: eventTypes.scroll,17402topSubmit: eventTypes.submit,17403topTouchCancel: eventTypes.touchCancel,17404topTouchEnd: eventTypes.touchEnd,17405topTouchMove: eventTypes.touchMove,17406topTouchStart: eventTypes.touchStart,17407topWheel: eventTypes.wheel17408};1740917410for (var type in topLevelEventsToDispatchConfig) {17411topLevelEventsToDispatchConfig[type].dependencies = [type];17412}1741317414var SimpleEventPlugin = {1741517416eventTypes: eventTypes,1741717418/**17419* Same as the default implementation, except cancels the event when return17420* value is false. This behavior will be disabled in a future release.17421*17422* @param {object} Event to be dispatched.17423* @param {function} Application-level callback.17424* @param {string} domID DOM ID to pass to the callback.17425*/17426executeDispatch: function(event, listener, domID) {17427var returnValue = EventPluginUtils.executeDispatch(event, listener, domID);1742817429("production" !== "development" ? warning(17430typeof returnValue !== 'boolean',17431'Returning `false` from an event handler is deprecated and will be ' +17432'ignored in a future release. Instead, manually call ' +17433'e.stopPropagation() or e.preventDefault(), as appropriate.'17434) : null);1743517436if (returnValue === false) {17437event.stopPropagation();17438event.preventDefault();17439}17440},1744117442/**17443* @param {string} topLevelType Record from `EventConstants`.17444* @param {DOMEventTarget} topLevelTarget The listening component root node.17445* @param {string} topLevelTargetID ID of `topLevelTarget`.17446* @param {object} nativeEvent Native browser event.17447* @return {*} An accumulation of synthetic events.17448* @see {EventPluginHub.extractEvents}17449*/17450extractEvents: function(17451topLevelType,17452topLevelTarget,17453topLevelTargetID,17454nativeEvent) {17455var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];17456if (!dispatchConfig) {17457return null;17458}17459var EventConstructor;17460switch (topLevelType) {17461case topLevelTypes.topInput:17462case topLevelTypes.topLoad:17463case topLevelTypes.topError:17464case topLevelTypes.topReset:17465case topLevelTypes.topSubmit:17466// HTML Events17467// @see http://www.w3.org/TR/html5/index.html#events-017468EventConstructor = SyntheticEvent;17469break;17470case topLevelTypes.topKeyPress:17471// FireFox creates a keypress event for function keys too. This removes17472// the unwanted keypress events. Enter is however both printable and17473// non-printable. One would expect Tab to be as well (but it isn't).17474if (getEventCharCode(nativeEvent) === 0) {17475return null;17476}17477/* falls through */17478case topLevelTypes.topKeyDown:17479case topLevelTypes.topKeyUp:17480EventConstructor = SyntheticKeyboardEvent;17481break;17482case topLevelTypes.topBlur:17483case topLevelTypes.topFocus:17484EventConstructor = SyntheticFocusEvent;17485break;17486case topLevelTypes.topClick:17487// Firefox creates a click event on right mouse clicks. This removes the17488// unwanted click events.17489if (nativeEvent.button === 2) {17490return null;17491}17492/* falls through */17493case topLevelTypes.topContextMenu:17494case topLevelTypes.topDoubleClick:17495case topLevelTypes.topMouseDown:17496case topLevelTypes.topMouseMove:17497case topLevelTypes.topMouseOut:17498case topLevelTypes.topMouseOver:17499case topLevelTypes.topMouseUp:17500EventConstructor = SyntheticMouseEvent;17501break;17502case topLevelTypes.topDrag:17503case topLevelTypes.topDragEnd:17504case topLevelTypes.topDragEnter:17505case topLevelTypes.topDragExit:17506case topLevelTypes.topDragLeave:17507case topLevelTypes.topDragOver:17508case topLevelTypes.topDragStart:17509case topLevelTypes.topDrop:17510EventConstructor = SyntheticDragEvent;17511break;17512case topLevelTypes.topTouchCancel:17513case topLevelTypes.topTouchEnd:17514case topLevelTypes.topTouchMove:17515case topLevelTypes.topTouchStart:17516EventConstructor = SyntheticTouchEvent;17517break;17518case topLevelTypes.topScroll:17519EventConstructor = SyntheticUIEvent;17520break;17521case topLevelTypes.topWheel:17522EventConstructor = SyntheticWheelEvent;17523break;17524case topLevelTypes.topCopy:17525case topLevelTypes.topCut:17526case topLevelTypes.topPaste:17527EventConstructor = SyntheticClipboardEvent;17528break;17529}17530("production" !== "development" ? invariant(17531EventConstructor,17532'SimpleEventPlugin: Unhandled event type, `%s`.',17533topLevelType17534) : invariant(EventConstructor));17535var event = EventConstructor.getPooled(17536dispatchConfig,17537topLevelTargetID,17538nativeEvent17539);17540EventPropagators.accumulateTwoPhaseDispatches(event);17541return event;17542}1754317544};1754517546module.exports = SimpleEventPlugin;1754717548},{"105":105,"107":107,"108":108,"109":109,"111":111,"112":112,"113":113,"114":114,"115":115,"137":137,"150":150,"157":157,"16":16,"171":171,"20":20,"21":21}],105:[function(_dereq_,module,exports){17549/**17550* Copyright 2013-2015, Facebook, Inc.17551* All rights reserved.17552*17553* This source code is licensed under the BSD-style license found in the17554* LICENSE file in the root directory of this source tree. An additional grant17555* of patent rights can be found in the PATENTS file in the same directory.17556*17557* @providesModule SyntheticClipboardEvent17558* @typechecks static-only17559*/1756017561'use strict';1756217563var SyntheticEvent = _dereq_(108);1756417565/**17566* @interface Event17567* @see http://www.w3.org/TR/clipboard-apis/17568*/17569var ClipboardEventInterface = {17570clipboardData: function(event) {17571return (17572'clipboardData' in event ?17573event.clipboardData :17574window.clipboardData17575);17576}17577};1757817579/**17580* @param {object} dispatchConfig Configuration used to dispatch this event.17581* @param {string} dispatchMarker Marker identifying the event target.17582* @param {object} nativeEvent Native browser event.17583* @extends {SyntheticUIEvent}17584*/17585function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent) {17586SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);17587}1758817589SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);1759017591module.exports = SyntheticClipboardEvent;1759217593},{"108":108}],106:[function(_dereq_,module,exports){17594/**17595* Copyright 2013-2015, Facebook, Inc.17596* All rights reserved.17597*17598* This source code is licensed under the BSD-style license found in the17599* LICENSE file in the root directory of this source tree. An additional grant17600* of patent rights can be found in the PATENTS file in the same directory.17601*17602* @providesModule SyntheticCompositionEvent17603* @typechecks static-only17604*/1760517606'use strict';1760717608var SyntheticEvent = _dereq_(108);1760917610/**17611* @interface Event17612* @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents17613*/17614var CompositionEventInterface = {17615data: null17616};1761717618/**17619* @param {object} dispatchConfig Configuration used to dispatch this event.17620* @param {string} dispatchMarker Marker identifying the event target.17621* @param {object} nativeEvent Native browser event.17622* @extends {SyntheticUIEvent}17623*/17624function SyntheticCompositionEvent(17625dispatchConfig,17626dispatchMarker,17627nativeEvent) {17628SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);17629}1763017631SyntheticEvent.augmentClass(17632SyntheticCompositionEvent,17633CompositionEventInterface17634);1763517636module.exports = SyntheticCompositionEvent;1763717638},{"108":108}],107:[function(_dereq_,module,exports){17639/**17640* Copyright 2013-2015, Facebook, Inc.17641* All rights reserved.17642*17643* This source code is licensed under the BSD-style license found in the17644* LICENSE file in the root directory of this source tree. An additional grant17645* of patent rights can be found in the PATENTS file in the same directory.17646*17647* @providesModule SyntheticDragEvent17648* @typechecks static-only17649*/1765017651'use strict';1765217653var SyntheticMouseEvent = _dereq_(112);1765417655/**17656* @interface DragEvent17657* @see http://www.w3.org/TR/DOM-Level-3-Events/17658*/17659var DragEventInterface = {17660dataTransfer: null17661};1766217663/**17664* @param {object} dispatchConfig Configuration used to dispatch this event.17665* @param {string} dispatchMarker Marker identifying the event target.17666* @param {object} nativeEvent Native browser event.17667* @extends {SyntheticUIEvent}17668*/17669function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent) {17670SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);17671}1767217673SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);1767417675module.exports = SyntheticDragEvent;1767617677},{"112":112}],108:[function(_dereq_,module,exports){17678/**17679* Copyright 2013-2015, Facebook, Inc.17680* All rights reserved.17681*17682* This source code is licensed under the BSD-style license found in the17683* LICENSE file in the root directory of this source tree. An additional grant17684* of patent rights can be found in the PATENTS file in the same directory.17685*17686* @providesModule SyntheticEvent17687* @typechecks static-only17688*/1768917690'use strict';1769117692var PooledClass = _dereq_(30);1769317694var assign = _dereq_(29);17695var emptyFunction = _dereq_(129);17696var getEventTarget = _dereq_(140);1769717698/**17699* @interface Event17700* @see http://www.w3.org/TR/DOM-Level-3-Events/17701*/17702var EventInterface = {17703type: null,17704target: getEventTarget,17705// currentTarget is set when dispatching; no use in copying it here17706currentTarget: emptyFunction.thatReturnsNull,17707eventPhase: null,17708bubbles: null,17709cancelable: null,17710timeStamp: function(event) {17711return event.timeStamp || Date.now();17712},17713defaultPrevented: null,17714isTrusted: null17715};1771617717/**17718* Synthetic events are dispatched by event plugins, typically in response to a17719* top-level event delegation handler.17720*17721* These systems should generally use pooling to reduce the frequency of garbage17722* collection. The system should check `isPersistent` to determine whether the17723* event should be released into the pool after being dispatched. Users that17724* need a persisted event should invoke `persist`.17725*17726* Synthetic events (and subclasses) implement the DOM Level 3 Events API by17727* normalizing browser quirks. Subclasses do not necessarily have to implement a17728* DOM interface; custom application-specific events can also subclass this.17729*17730* @param {object} dispatchConfig Configuration used to dispatch this event.17731* @param {string} dispatchMarker Marker identifying the event target.17732* @param {object} nativeEvent Native browser event.17733*/17734function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) {17735this.dispatchConfig = dispatchConfig;17736this.dispatchMarker = dispatchMarker;17737this.nativeEvent = nativeEvent;1773817739var Interface = this.constructor.Interface;17740for (var propName in Interface) {17741if (!Interface.hasOwnProperty(propName)) {17742continue;17743}17744var normalize = Interface[propName];17745if (normalize) {17746this[propName] = normalize(nativeEvent);17747} else {17748this[propName] = nativeEvent[propName];17749}17750}1775117752var defaultPrevented = nativeEvent.defaultPrevented != null ?17753nativeEvent.defaultPrevented :17754nativeEvent.returnValue === false;17755if (defaultPrevented) {17756this.isDefaultPrevented = emptyFunction.thatReturnsTrue;17757} else {17758this.isDefaultPrevented = emptyFunction.thatReturnsFalse;17759}17760this.isPropagationStopped = emptyFunction.thatReturnsFalse;17761}1776217763assign(SyntheticEvent.prototype, {1776417765preventDefault: function() {17766this.defaultPrevented = true;17767var event = this.nativeEvent;17768if (event.preventDefault) {17769event.preventDefault();17770} else {17771event.returnValue = false;17772}17773this.isDefaultPrevented = emptyFunction.thatReturnsTrue;17774},1777517776stopPropagation: function() {17777var event = this.nativeEvent;17778if (event.stopPropagation) {17779event.stopPropagation();17780} else {17781event.cancelBubble = true;17782}17783this.isPropagationStopped = emptyFunction.thatReturnsTrue;17784},1778517786/**17787* We release all dispatched `SyntheticEvent`s after each event loop, adding17788* them back into the pool. This allows a way to hold onto a reference that17789* won't be added back into the pool.17790*/17791persist: function() {17792this.isPersistent = emptyFunction.thatReturnsTrue;17793},1779417795/**17796* Checks if this event should be released back into the pool.17797*17798* @return {boolean} True if this should not be released, false otherwise.17799*/17800isPersistent: emptyFunction.thatReturnsFalse,1780117802/**17803* `PooledClass` looks for `destructor` on each instance it releases.17804*/17805destructor: function() {17806var Interface = this.constructor.Interface;17807for (var propName in Interface) {17808this[propName] = null;17809}17810this.dispatchConfig = null;17811this.dispatchMarker = null;17812this.nativeEvent = null;17813}1781417815});1781617817SyntheticEvent.Interface = EventInterface;1781817819/**17820* Helper to reduce boilerplate when creating subclasses.17821*17822* @param {function} Class17823* @param {?object} Interface17824*/17825SyntheticEvent.augmentClass = function(Class, Interface) {17826var Super = this;1782717828var prototype = Object.create(Super.prototype);17829assign(prototype, Class.prototype);17830Class.prototype = prototype;17831Class.prototype.constructor = Class;1783217833Class.Interface = assign({}, Super.Interface, Interface);17834Class.augmentClass = Super.augmentClass;1783517836PooledClass.addPoolingTo(Class, PooledClass.threeArgumentPooler);17837};1783817839PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler);1784017841module.exports = SyntheticEvent;1784217843},{"129":129,"140":140,"29":29,"30":30}],109:[function(_dereq_,module,exports){17844/**17845* Copyright 2013-2015, Facebook, Inc.17846* All rights reserved.17847*17848* This source code is licensed under the BSD-style license found in the17849* LICENSE file in the root directory of this source tree. An additional grant17850* of patent rights can be found in the PATENTS file in the same directory.17851*17852* @providesModule SyntheticFocusEvent17853* @typechecks static-only17854*/1785517856'use strict';1785717858var SyntheticUIEvent = _dereq_(114);1785917860/**17861* @interface FocusEvent17862* @see http://www.w3.org/TR/DOM-Level-3-Events/17863*/17864var FocusEventInterface = {17865relatedTarget: null17866};1786717868/**17869* @param {object} dispatchConfig Configuration used to dispatch this event.17870* @param {string} dispatchMarker Marker identifying the event target.17871* @param {object} nativeEvent Native browser event.17872* @extends {SyntheticUIEvent}17873*/17874function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent) {17875SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);17876}1787717878SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);1787917880module.exports = SyntheticFocusEvent;1788117882},{"114":114}],110:[function(_dereq_,module,exports){17883/**17884* Copyright 2013-2015, Facebook, Inc.17885* All rights reserved.17886*17887* This source code is licensed under the BSD-style license found in the17888* LICENSE file in the root directory of this source tree. An additional grant17889* of patent rights can be found in the PATENTS file in the same directory.17890*17891* @providesModule SyntheticInputEvent17892* @typechecks static-only17893*/1789417895'use strict';1789617897var SyntheticEvent = _dereq_(108);1789817899/**17900* @interface Event17901* @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-2013110517902* /#events-inputevents17903*/17904var InputEventInterface = {17905data: null17906};1790717908/**17909* @param {object} dispatchConfig Configuration used to dispatch this event.17910* @param {string} dispatchMarker Marker identifying the event target.17911* @param {object} nativeEvent Native browser event.17912* @extends {SyntheticUIEvent}17913*/17914function SyntheticInputEvent(17915dispatchConfig,17916dispatchMarker,17917nativeEvent) {17918SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);17919}1792017921SyntheticEvent.augmentClass(17922SyntheticInputEvent,17923InputEventInterface17924);1792517926module.exports = SyntheticInputEvent;1792717928},{"108":108}],111:[function(_dereq_,module,exports){17929/**17930* Copyright 2013-2015, Facebook, Inc.17931* All rights reserved.17932*17933* This source code is licensed under the BSD-style license found in the17934* LICENSE file in the root directory of this source tree. An additional grant17935* of patent rights can be found in the PATENTS file in the same directory.17936*17937* @providesModule SyntheticKeyboardEvent17938* @typechecks static-only17939*/1794017941'use strict';1794217943var SyntheticUIEvent = _dereq_(114);1794417945var getEventCharCode = _dereq_(137);17946var getEventKey = _dereq_(138);17947var getEventModifierState = _dereq_(139);1794817949/**17950* @interface KeyboardEvent17951* @see http://www.w3.org/TR/DOM-Level-3-Events/17952*/17953var KeyboardEventInterface = {17954key: getEventKey,17955location: null,17956ctrlKey: null,17957shiftKey: null,17958altKey: null,17959metaKey: null,17960repeat: null,17961locale: null,17962getModifierState: getEventModifierState,17963// Legacy Interface17964charCode: function(event) {17965// `charCode` is the result of a KeyPress event and represents the value of17966// the actual printable character.1796717968// KeyPress is deprecated, but its replacement is not yet final and not17969// implemented in any major browser. Only KeyPress has charCode.17970if (event.type === 'keypress') {17971return getEventCharCode(event);17972}17973return 0;17974},17975keyCode: function(event) {17976// `keyCode` is the result of a KeyDown/Up event and represents the value of17977// physical keyboard key.1797817979// The actual meaning of the value depends on the users' keyboard layout17980// which cannot be detected. Assuming that it is a US keyboard layout17981// provides a surprisingly accurate mapping for US and European users.17982// Due to this, it is left to the user to implement at this time.17983if (event.type === 'keydown' || event.type === 'keyup') {17984return event.keyCode;17985}17986return 0;17987},17988which: function(event) {17989// `which` is an alias for either `keyCode` or `charCode` depending on the17990// type of the event.17991if (event.type === 'keypress') {17992return getEventCharCode(event);17993}17994if (event.type === 'keydown' || event.type === 'keyup') {17995return event.keyCode;17996}17997return 0;17998}17999};1800018001/**18002* @param {object} dispatchConfig Configuration used to dispatch this event.18003* @param {string} dispatchMarker Marker identifying the event target.18004* @param {object} nativeEvent Native browser event.18005* @extends {SyntheticUIEvent}18006*/18007function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent) {18008SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);18009}1801018011SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);1801218013module.exports = SyntheticKeyboardEvent;1801418015},{"114":114,"137":137,"138":138,"139":139}],112:[function(_dereq_,module,exports){18016/**18017* Copyright 2013-2015, Facebook, Inc.18018* All rights reserved.18019*18020* This source code is licensed under the BSD-style license found in the18021* LICENSE file in the root directory of this source tree. An additional grant18022* of patent rights can be found in the PATENTS file in the same directory.18023*18024* @providesModule SyntheticMouseEvent18025* @typechecks static-only18026*/1802718028'use strict';1802918030var SyntheticUIEvent = _dereq_(114);18031var ViewportMetrics = _dereq_(117);1803218033var getEventModifierState = _dereq_(139);1803418035/**18036* @interface MouseEvent18037* @see http://www.w3.org/TR/DOM-Level-3-Events/18038*/18039var MouseEventInterface = {18040screenX: null,18041screenY: null,18042clientX: null,18043clientY: null,18044ctrlKey: null,18045shiftKey: null,18046altKey: null,18047metaKey: null,18048getModifierState: getEventModifierState,18049button: function(event) {18050// Webkit, Firefox, IE9+18051// which: 1 2 318052// button: 0 1 2 (standard)18053var button = event.button;18054if ('which' in event) {18055return button;18056}18057// IE<918058// which: undefined18059// button: 0 0 018060// button: 1 4 2 (onmouseup)18061return button === 2 ? 2 : button === 4 ? 1 : 0;18062},18063buttons: null,18064relatedTarget: function(event) {18065return event.relatedTarget || (18066((event.fromElement === event.srcElement ? event.toElement : event.fromElement))18067);18068},18069// "Proprietary" Interface.18070pageX: function(event) {18071return 'pageX' in event ?18072event.pageX :18073event.clientX + ViewportMetrics.currentScrollLeft;18074},18075pageY: function(event) {18076return 'pageY' in event ?18077event.pageY :18078event.clientY + ViewportMetrics.currentScrollTop;18079}18080};1808118082/**18083* @param {object} dispatchConfig Configuration used to dispatch this event.18084* @param {string} dispatchMarker Marker identifying the event target.18085* @param {object} nativeEvent Native browser event.18086* @extends {SyntheticUIEvent}18087*/18088function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent) {18089SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);18090}1809118092SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);1809318094module.exports = SyntheticMouseEvent;1809518096},{"114":114,"117":117,"139":139}],113:[function(_dereq_,module,exports){18097/**18098* Copyright 2013-2015, Facebook, Inc.18099* All rights reserved.18100*18101* This source code is licensed under the BSD-style license found in the18102* LICENSE file in the root directory of this source tree. An additional grant18103* of patent rights can be found in the PATENTS file in the same directory.18104*18105* @providesModule SyntheticTouchEvent18106* @typechecks static-only18107*/1810818109'use strict';1811018111var SyntheticUIEvent = _dereq_(114);1811218113var getEventModifierState = _dereq_(139);1811418115/**18116* @interface TouchEvent18117* @see http://www.w3.org/TR/touch-events/18118*/18119var TouchEventInterface = {18120touches: null,18121targetTouches: null,18122changedTouches: null,18123altKey: null,18124metaKey: null,18125ctrlKey: null,18126shiftKey: null,18127getModifierState: getEventModifierState18128};1812918130/**18131* @param {object} dispatchConfig Configuration used to dispatch this event.18132* @param {string} dispatchMarker Marker identifying the event target.18133* @param {object} nativeEvent Native browser event.18134* @extends {SyntheticUIEvent}18135*/18136function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent) {18137SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);18138}1813918140SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);1814118142module.exports = SyntheticTouchEvent;1814318144},{"114":114,"139":139}],114:[function(_dereq_,module,exports){18145/**18146* Copyright 2013-2015, Facebook, Inc.18147* All rights reserved.18148*18149* This source code is licensed under the BSD-style license found in the18150* LICENSE file in the root directory of this source tree. An additional grant18151* of patent rights can be found in the PATENTS file in the same directory.18152*18153* @providesModule SyntheticUIEvent18154* @typechecks static-only18155*/1815618157'use strict';1815818159var SyntheticEvent = _dereq_(108);1816018161var getEventTarget = _dereq_(140);1816218163/**18164* @interface UIEvent18165* @see http://www.w3.org/TR/DOM-Level-3-Events/18166*/18167var UIEventInterface = {18168view: function(event) {18169if (event.view) {18170return event.view;18171}1817218173var target = getEventTarget(event);18174if (target != null && target.window === target) {18175// target is a window object18176return target;18177}1817818179var doc = target.ownerDocument;18180// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.18181if (doc) {18182return doc.defaultView || doc.parentWindow;18183} else {18184return window;18185}18186},18187detail: function(event) {18188return event.detail || 0;18189}18190};1819118192/**18193* @param {object} dispatchConfig Configuration used to dispatch this event.18194* @param {string} dispatchMarker Marker identifying the event target.18195* @param {object} nativeEvent Native browser event.18196* @extends {SyntheticEvent}18197*/18198function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent) {18199SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);18200}1820118202SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);1820318204module.exports = SyntheticUIEvent;1820518206},{"108":108,"140":140}],115:[function(_dereq_,module,exports){18207/**18208* Copyright 2013-2015, Facebook, Inc.18209* All rights reserved.18210*18211* This source code is licensed under the BSD-style license found in the18212* LICENSE file in the root directory of this source tree. An additional grant18213* of patent rights can be found in the PATENTS file in the same directory.18214*18215* @providesModule SyntheticWheelEvent18216* @typechecks static-only18217*/1821818219'use strict';1822018221var SyntheticMouseEvent = _dereq_(112);1822218223/**18224* @interface WheelEvent18225* @see http://www.w3.org/TR/DOM-Level-3-Events/18226*/18227var WheelEventInterface = {18228deltaX: function(event) {18229return (18230'deltaX' in event ? event.deltaX :18231// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).18232'wheelDeltaX' in event ? -event.wheelDeltaX : 018233);18234},18235deltaY: function(event) {18236return (18237'deltaY' in event ? event.deltaY :18238// Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).18239'wheelDeltaY' in event ? -event.wheelDeltaY :18240// Fallback to `wheelDelta` for IE<9 and normalize (down is positive).18241'wheelDelta' in event ? -event.wheelDelta : 018242);18243},18244deltaZ: null,1824518246// Browsers without "deltaMode" is reporting in raw wheel delta where one18247// notch on the scroll is always +/- 120, roughly equivalent to pixels.18248// A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or18249// ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.18250deltaMode: null18251};1825218253/**18254* @param {object} dispatchConfig Configuration used to dispatch this event.18255* @param {string} dispatchMarker Marker identifying the event target.18256* @param {object} nativeEvent Native browser event.18257* @extends {SyntheticMouseEvent}18258*/18259function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent) {18260SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);18261}1826218263SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);1826418265module.exports = SyntheticWheelEvent;1826618267},{"112":112}],116:[function(_dereq_,module,exports){18268/**18269* Copyright 2013-2015, Facebook, Inc.18270* All rights reserved.18271*18272* This source code is licensed under the BSD-style license found in the18273* LICENSE file in the root directory of this source tree. An additional grant18274* of patent rights can be found in the PATENTS file in the same directory.18275*18276* @providesModule Transaction18277*/1827818279'use strict';1828018281var invariant = _dereq_(150);1828218283/**18284* `Transaction` creates a black box that is able to wrap any method such that18285* certain invariants are maintained before and after the method is invoked18286* (Even if an exception is thrown while invoking the wrapped method). Whoever18287* instantiates a transaction can provide enforcers of the invariants at18288* creation time. The `Transaction` class itself will supply one additional18289* automatic invariant for you - the invariant that any transaction instance18290* should not be run while it is already being run. You would typically create a18291* single instance of a `Transaction` for reuse multiple times, that potentially18292* is used to wrap several different methods. Wrappers are extremely simple -18293* they only require implementing two methods.18294*18295* <pre>18296* wrappers (injected at creation time)18297* + +18298* | |18299* +-----------------|--------|--------------+18300* | v | |18301* | +---------------+ | |18302* | +--| wrapper1 |---|----+ |18303* | | +---------------+ v | |18304* | | +-------------+ | |18305* | | +----| wrapper2 |--------+ |18306* | | | +-------------+ | | |18307* | | | | | |18308* | v v v v | wrapper18309* | +---+ +---+ +---------+ +---+ +---+ | invariants18310* perform(anyMethod) | | | | | | | | | | | | maintained18311* +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->18312* | | | | | | | | | | | |18313* | | | | | | | | | | | |18314* | | | | | | | | | | | |18315* | +---+ +---+ +---------+ +---+ +---+ |18316* | initialize close |18317* +-----------------------------------------+18318* </pre>18319*18320* Use cases:18321* - Preserving the input selection ranges before/after reconciliation.18322* Restoring selection even in the event of an unexpected error.18323* - Deactivating events while rearranging the DOM, preventing blurs/focuses,18324* while guaranteeing that afterwards, the event system is reactivated.18325* - Flushing a queue of collected DOM mutations to the main UI thread after a18326* reconciliation takes place in a worker thread.18327* - Invoking any collected `componentDidUpdate` callbacks after rendering new18328* content.18329* - (Future use case): Wrapping particular flushes of the `ReactWorker` queue18330* to preserve the `scrollTop` (an automatic scroll aware DOM).18331* - (Future use case): Layout calculations before and after DOM updates.18332*18333* Transactional plugin API:18334* - A module that has an `initialize` method that returns any precomputation.18335* - and a `close` method that accepts the precomputation. `close` is invoked18336* when the wrapped process is completed, or has failed.18337*18338* @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules18339* that implement `initialize` and `close`.18340* @return {Transaction} Single transaction for reuse in thread.18341*18342* @class Transaction18343*/18344var Mixin = {18345/**18346* Sets up this instance so that it is prepared for collecting metrics. Does18347* so such that this setup method may be used on an instance that is already18348* initialized, in a way that does not consume additional memory upon reuse.18349* That can be useful if you decide to make your subclass of this mixin a18350* "PooledClass".18351*/18352reinitializeTransaction: function() {18353this.transactionWrappers = this.getTransactionWrappers();18354if (!this.wrapperInitData) {18355this.wrapperInitData = [];18356} else {18357this.wrapperInitData.length = 0;18358}18359this._isInTransaction = false;18360},1836118362_isInTransaction: false,1836318364/**18365* @abstract18366* @return {Array<TransactionWrapper>} Array of transaction wrappers.18367*/18368getTransactionWrappers: null,1836918370isInTransaction: function() {18371return !!this._isInTransaction;18372},1837318374/**18375* Executes the function within a safety window. Use this for the top level18376* methods that result in large amounts of computation/mutations that would18377* need to be safety checked.18378*18379* @param {function} method Member of scope to call.18380* @param {Object} scope Scope to invoke from.18381* @param {Object?=} args... Arguments to pass to the method (optional).18382* Helps prevent need to bind in many cases.18383* @return Return value from `method`.18384*/18385perform: function(method, scope, a, b, c, d, e, f) {18386("production" !== "development" ? invariant(18387!this.isInTransaction(),18388'Transaction.perform(...): Cannot initialize a transaction when there ' +18389'is already an outstanding transaction.'18390) : invariant(!this.isInTransaction()));18391var errorThrown;18392var ret;18393try {18394this._isInTransaction = true;18395// Catching errors makes debugging more difficult, so we start with18396// errorThrown set to true before setting it to false after calling18397// close -- if it's still set to true in the finally block, it means18398// one of these calls threw.18399errorThrown = true;18400this.initializeAll(0);18401ret = method.call(scope, a, b, c, d, e, f);18402errorThrown = false;18403} finally {18404try {18405if (errorThrown) {18406// If `method` throws, prefer to show that stack trace over any thrown18407// by invoking `closeAll`.18408try {18409this.closeAll(0);18410} catch (err) {18411}18412} else {18413// Since `method` didn't throw, we don't want to silence the exception18414// here.18415this.closeAll(0);18416}18417} finally {18418this._isInTransaction = false;18419}18420}18421return ret;18422},1842318424initializeAll: function(startIndex) {18425var transactionWrappers = this.transactionWrappers;18426for (var i = startIndex; i < transactionWrappers.length; i++) {18427var wrapper = transactionWrappers[i];18428try {18429// Catching errors makes debugging more difficult, so we start with the18430// OBSERVED_ERROR state before overwriting it with the real return value18431// of initialize -- if it's still set to OBSERVED_ERROR in the finally18432// block, it means wrapper.initialize threw.18433this.wrapperInitData[i] = Transaction.OBSERVED_ERROR;18434this.wrapperInitData[i] = wrapper.initialize ?18435wrapper.initialize.call(this) :18436null;18437} finally {18438if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) {18439// The initializer for wrapper i threw an error; initialize the18440// remaining wrappers but silence any exceptions from them to ensure18441// that the first error is the one to bubble up.18442try {18443this.initializeAll(i + 1);18444} catch (err) {18445}18446}18447}18448}18449},1845018451/**18452* Invokes each of `this.transactionWrappers.close[i]` functions, passing into18453* them the respective return values of `this.transactionWrappers.init[i]`18454* (`close`rs that correspond to initializers that failed will not be18455* invoked).18456*/18457closeAll: function(startIndex) {18458("production" !== "development" ? invariant(18459this.isInTransaction(),18460'Transaction.closeAll(): Cannot close transaction when none are open.'18461) : invariant(this.isInTransaction()));18462var transactionWrappers = this.transactionWrappers;18463for (var i = startIndex; i < transactionWrappers.length; i++) {18464var wrapper = transactionWrappers[i];18465var initData = this.wrapperInitData[i];18466var errorThrown;18467try {18468// Catching errors makes debugging more difficult, so we start with18469// errorThrown set to true before setting it to false after calling18470// close -- if it's still set to true in the finally block, it means18471// wrapper.close threw.18472errorThrown = true;18473if (initData !== Transaction.OBSERVED_ERROR && wrapper.close) {18474wrapper.close.call(this, initData);18475}18476errorThrown = false;18477} finally {18478if (errorThrown) {18479// The closer for wrapper i threw an error; close the remaining18480// wrappers but silence any exceptions from them to ensure that the18481// first error is the one to bubble up.18482try {18483this.closeAll(i + 1);18484} catch (e) {18485}18486}18487}18488}18489this.wrapperInitData.length = 0;18490}18491};1849218493var Transaction = {1849418495Mixin: Mixin,1849618497/**18498* Token to look for to determine if an error occured.18499*/18500OBSERVED_ERROR: {}1850118502};1850318504module.exports = Transaction;1850518506},{"150":150}],117:[function(_dereq_,module,exports){18507/**18508* Copyright 2013-2015, Facebook, Inc.18509* All rights reserved.18510*18511* This source code is licensed under the BSD-style license found in the18512* LICENSE file in the root directory of this source tree. An additional grant18513* of patent rights can be found in the PATENTS file in the same directory.18514*18515* @providesModule ViewportMetrics18516*/1851718518'use strict';1851918520var ViewportMetrics = {1852118522currentScrollLeft: 0,1852318524currentScrollTop: 0,1852518526refreshScrollValues: function(scrollPosition) {18527ViewportMetrics.currentScrollLeft = scrollPosition.x;18528ViewportMetrics.currentScrollTop = scrollPosition.y;18529}1853018531};1853218533module.exports = ViewportMetrics;1853418535},{}],118:[function(_dereq_,module,exports){18536/**18537* Copyright 2014-2015, Facebook, Inc.18538* All rights reserved.18539*18540* This source code is licensed under the BSD-style license found in the18541* LICENSE file in the root directory of this source tree. An additional grant18542* of patent rights can be found in the PATENTS file in the same directory.18543*18544* @providesModule accumulateInto18545*/1854618547'use strict';1854818549var invariant = _dereq_(150);1855018551/**18552*18553* Accumulates items that must not be null or undefined into the first one. This18554* is used to conserve memory by avoiding array allocations, and thus sacrifices18555* API cleanness. Since `current` can be null before being passed in and not18556* null after this function, make sure to assign it back to `current`:18557*18558* `a = accumulateInto(a, b);`18559*18560* This API should be sparingly used. Try `accumulate` for something cleaner.18561*18562* @return {*|array<*>} An accumulation of items.18563*/1856418565function accumulateInto(current, next) {18566("production" !== "development" ? invariant(18567next != null,18568'accumulateInto(...): Accumulated items must not be null or undefined.'18569) : invariant(next != null));18570if (current == null) {18571return next;18572}1857318574// Both are not empty. Warning: Never call x.concat(y) when you are not18575// certain that x is an Array (x could be a string with concat method).18576var currentIsArray = Array.isArray(current);18577var nextIsArray = Array.isArray(next);1857818579if (currentIsArray && nextIsArray) {18580current.push.apply(current, next);18581return current;18582}1858318584if (currentIsArray) {18585current.push(next);18586return current;18587}1858818589if (nextIsArray) {18590// A bit too dangerous to mutate `next`.18591return [current].concat(next);18592}1859318594return [current, next];18595}1859618597module.exports = accumulateInto;1859818599},{"150":150}],119:[function(_dereq_,module,exports){18600/**18601* Copyright 2013-2015, Facebook, Inc.18602* All rights reserved.18603*18604* This source code is licensed under the BSD-style license found in the18605* LICENSE file in the root directory of this source tree. An additional grant18606* of patent rights can be found in the PATENTS file in the same directory.18607*18608* @providesModule adler3218609*/1861018611/* jslint bitwise:true */1861218613'use strict';1861418615var MOD = 65521;1861618617// This is a clean-room implementation of adler32 designed for detecting18618// if markup is not what we expect it to be. It does not need to be18619// cryptographically strong, only reasonably good at detecting if markup18620// generated on the server is different than that on the client.18621function adler32(data) {18622var a = 1;18623var b = 0;18624for (var i = 0; i < data.length; i++) {18625a = (a + data.charCodeAt(i)) % MOD;18626b = (b + a) % MOD;18627}18628return a | (b << 16);18629}1863018631module.exports = adler32;1863218633},{}],120:[function(_dereq_,module,exports){18634/**18635* Copyright 2013-2015, Facebook, Inc.18636* All rights reserved.18637*18638* This source code is licensed under the BSD-style license found in the18639* LICENSE file in the root directory of this source tree. An additional grant18640* of patent rights can be found in the PATENTS file in the same directory.18641*18642* @providesModule camelize18643* @typechecks18644*/1864518646var _hyphenPattern = /-(.)/g;1864718648/**18649* Camelcases a hyphenated string, for example:18650*18651* > camelize('background-color')18652* < "backgroundColor"18653*18654* @param {string} string18655* @return {string}18656*/18657function camelize(string) {18658return string.replace(_hyphenPattern, function(_, character) {18659return character.toUpperCase();18660});18661}1866218663module.exports = camelize;1866418665},{}],121:[function(_dereq_,module,exports){18666/**18667* Copyright 2014-2015, Facebook, Inc.18668* All rights reserved.18669*18670* This source code is licensed under the BSD-style license found in the18671* LICENSE file in the root directory of this source tree. An additional grant18672* of patent rights can be found in the PATENTS file in the same directory.18673*18674* @providesModule camelizeStyleName18675* @typechecks18676*/1867718678"use strict";1867918680var camelize = _dereq_(120);1868118682var msPattern = /^-ms-/;1868318684/**18685* Camelcases a hyphenated CSS property name, for example:18686*18687* > camelizeStyleName('background-color')18688* < "backgroundColor"18689* > camelizeStyleName('-moz-transition')18690* < "MozTransition"18691* > camelizeStyleName('-ms-transition')18692* < "msTransition"18693*18694* As Andi Smith suggests18695* (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix18696* is converted to lowercase `ms`.18697*18698* @param {string} string18699* @return {string}18700*/18701function camelizeStyleName(string) {18702return camelize(string.replace(msPattern, 'ms-'));18703}1870418705module.exports = camelizeStyleName;1870618707},{"120":120}],122:[function(_dereq_,module,exports){18708/**18709* Copyright 2013-2015, Facebook, Inc.18710* All rights reserved.18711*18712* This source code is licensed under the BSD-style license found in the18713* LICENSE file in the root directory of this source tree. An additional grant18714* of patent rights can be found in the PATENTS file in the same directory.18715*18716* @typechecks static-only18717* @providesModule cloneWithProps18718*/1871918720'use strict';1872118722var ReactElement = _dereq_(63);18723var ReactPropTransferer = _dereq_(83);1872418725var keyOf = _dereq_(157);18726var warning = _dereq_(171);1872718728var CHILDREN_PROP = keyOf({children: null});1872918730/**18731* Sometimes you want to change the props of a child passed to you. Usually18732* this is to add a CSS class.18733*18734* @param {ReactElement} child child element you'd like to clone18735* @param {object} props props you'd like to modify. className and style will be18736* merged automatically.18737* @return {ReactElement} a clone of child with props merged in.18738*/18739function cloneWithProps(child, props) {18740if ("production" !== "development") {18741("production" !== "development" ? warning(18742!child.ref,18743'You are calling cloneWithProps() on a child with a ref. This is ' +18744'dangerous because you\'re creating a new child which will not be ' +18745'added as a ref to its parent.'18746) : null);18747}1874818749var newProps = ReactPropTransferer.mergeProps(props, child.props);1875018751// Use `child.props.children` if it is provided.18752if (!newProps.hasOwnProperty(CHILDREN_PROP) &&18753child.props.hasOwnProperty(CHILDREN_PROP)) {18754newProps.children = child.props.children;18755}1875618757// The current API doesn't retain _owner and _context, which is why this18758// doesn't use ReactElement.cloneAndReplaceProps.18759return ReactElement.createElement(child.type, newProps);18760}1876118762module.exports = cloneWithProps;1876318764},{"157":157,"171":171,"63":63,"83":83}],123:[function(_dereq_,module,exports){18765/**18766* Copyright 2013-2015, Facebook, Inc.18767* All rights reserved.18768*18769* This source code is licensed under the BSD-style license found in the18770* LICENSE file in the root directory of this source tree. An additional grant18771* of patent rights can be found in the PATENTS file in the same directory.18772*18773* @providesModule containsNode18774* @typechecks18775*/1877618777var isTextNode = _dereq_(154);1877818779/*jslint bitwise:true */1878018781/**18782* Checks if a given DOM node contains or is another DOM node.18783*18784* @param {?DOMNode} outerNode Outer DOM node.18785* @param {?DOMNode} innerNode Inner DOM node.18786* @return {boolean} True if `outerNode` contains or is `innerNode`.18787*/18788function containsNode(outerNode, innerNode) {18789if (!outerNode || !innerNode) {18790return false;18791} else if (outerNode === innerNode) {18792return true;18793} else if (isTextNode(outerNode)) {18794return false;18795} else if (isTextNode(innerNode)) {18796return containsNode(outerNode, innerNode.parentNode);18797} else if (outerNode.contains) {18798return outerNode.contains(innerNode);18799} else if (outerNode.compareDocumentPosition) {18800return !!(outerNode.compareDocumentPosition(innerNode) & 16);18801} else {18802return false;18803}18804}1880518806module.exports = containsNode;1880718808},{"154":154}],124:[function(_dereq_,module,exports){18809/**18810* Copyright 2013-2015, Facebook, Inc.18811* All rights reserved.18812*18813* This source code is licensed under the BSD-style license found in the18814* LICENSE file in the root directory of this source tree. An additional grant18815* of patent rights can be found in the PATENTS file in the same directory.18816*18817* @providesModule createArrayFromMixed18818* @typechecks18819*/1882018821var toArray = _dereq_(168);1882218823/**18824* Perform a heuristic test to determine if an object is "array-like".18825*18826* A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"18827* Joshu replied: "Mu."18828*18829* This function determines if its argument has "array nature": it returns18830* true if the argument is an actual array, an `arguments' object, or an18831* HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).18832*18833* It will return false for other array-like objects like Filelist.18834*18835* @param {*} obj18836* @return {boolean}18837*/18838function hasArrayNature(obj) {18839return (18840// not null/false18841!!obj &&18842// arrays are objects, NodeLists are functions in Safari18843(typeof obj == 'object' || typeof obj == 'function') &&18844// quacks like an array18845('length' in obj) &&18846// not window18847!('setInterval' in obj) &&18848// no DOM node should be considered an array-like18849// a 'select' element has 'length' and 'item' properties on IE818850(typeof obj.nodeType != 'number') &&18851(18852// a real array18853(// HTMLCollection/NodeList18854(Array.isArray(obj) ||18855// arguments18856('callee' in obj) || 'item' in obj))18857)18858);18859}1886018861/**18862* Ensure that the argument is an array by wrapping it in an array if it is not.18863* Creates a copy of the argument if it is already an array.18864*18865* This is mostly useful idiomatically:18866*18867* var createArrayFromMixed = require('createArrayFromMixed');18868*18869* function takesOneOrMoreThings(things) {18870* things = createArrayFromMixed(things);18871* ...18872* }18873*18874* This allows you to treat `things' as an array, but accept scalars in the API.18875*18876* If you need to convert an array-like object, like `arguments`, into an array18877* use toArray instead.18878*18879* @param {*} obj18880* @return {array}18881*/18882function createArrayFromMixed(obj) {18883if (!hasArrayNature(obj)) {18884return [obj];18885} else if (Array.isArray(obj)) {18886return obj.slice();18887} else {18888return toArray(obj);18889}18890}1889118892module.exports = createArrayFromMixed;1889318894},{"168":168}],125:[function(_dereq_,module,exports){18895/**18896* Copyright 2013-2015, Facebook, Inc.18897* All rights reserved.18898*18899* This source code is licensed under the BSD-style license found in the18900* LICENSE file in the root directory of this source tree. An additional grant18901* of patent rights can be found in the PATENTS file in the same directory.18902*18903* @providesModule createFullPageComponent18904* @typechecks18905*/1890618907'use strict';1890818909// Defeat circular references by requiring this directly.18910var ReactClass = _dereq_(38);18911var ReactElement = _dereq_(63);1891218913var invariant = _dereq_(150);1891418915/**18916* Create a component that will throw an exception when unmounted.18917*18918* Components like <html> <head> and <body> can't be removed or added18919* easily in a cross-browser way, however it's valuable to be able to18920* take advantage of React's reconciliation for styling and <title>18921* management. So we just document it and throw in dangerous cases.18922*18923* @param {string} tag The tag to wrap18924* @return {function} convenience constructor of new component18925*/18926function createFullPageComponent(tag) {18927var elementFactory = ReactElement.createFactory(tag);1892818929var FullPageComponent = ReactClass.createClass({18930tagName: tag.toUpperCase(),18931displayName: 'ReactFullPageComponent' + tag,1893218933componentWillUnmount: function() {18934("production" !== "development" ? invariant(18935false,18936'%s tried to unmount. Because of cross-browser quirks it is ' +18937'impossible to unmount some top-level components (eg <html>, <head>, ' +18938'and <body>) reliably and efficiently. To fix this, have a single ' +18939'top-level component that never unmounts render these elements.',18940this.constructor.displayName18941) : invariant(false));18942},1894318944render: function() {18945return elementFactory(this.props);18946}18947});1894818949return FullPageComponent;18950}1895118952module.exports = createFullPageComponent;1895318954},{"150":150,"38":38,"63":63}],126:[function(_dereq_,module,exports){18955/**18956* Copyright 2013-2015, Facebook, Inc.18957* All rights reserved.18958*18959* This source code is licensed under the BSD-style license found in the18960* LICENSE file in the root directory of this source tree. An additional grant18961* of patent rights can be found in the PATENTS file in the same directory.18962*18963* @providesModule createNodesFromMarkup18964* @typechecks18965*/1896618967/*jslint evil: true, sub: true */1896818969var ExecutionEnvironment = _dereq_(22);1897018971var createArrayFromMixed = _dereq_(124);18972var getMarkupWrap = _dereq_(142);18973var invariant = _dereq_(150);1897418975/**18976* Dummy container used to render all markup.18977*/18978var dummyNode =18979ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;1898018981/**18982* Pattern used by `getNodeName`.18983*/18984var nodeNamePattern = /^\s*<(\w+)/;1898518986/**18987* Extracts the `nodeName` of the first element in a string of markup.18988*18989* @param {string} markup String of markup.18990* @return {?string} Node name of the supplied markup.18991*/18992function getNodeName(markup) {18993var nodeNameMatch = markup.match(nodeNamePattern);18994return nodeNameMatch && nodeNameMatch[1].toLowerCase();18995}1899618997/**18998* Creates an array containing the nodes rendered from the supplied markup. The18999* optionally supplied `handleScript` function will be invoked once for each19000* <script> element that is rendered. If no `handleScript` function is supplied,19001* an exception is thrown if any <script> elements are rendered.19002*19003* @param {string} markup A string of valid HTML markup.19004* @param {?function} handleScript Invoked once for each rendered <script>.19005* @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.19006*/19007function createNodesFromMarkup(markup, handleScript) {19008var node = dummyNode;19009("production" !== "development" ? invariant(!!dummyNode, 'createNodesFromMarkup dummy not initialized') : invariant(!!dummyNode));19010var nodeName = getNodeName(markup);1901119012var wrap = nodeName && getMarkupWrap(nodeName);19013if (wrap) {19014node.innerHTML = wrap[1] + markup + wrap[2];1901519016var wrapDepth = wrap[0];19017while (wrapDepth--) {19018node = node.lastChild;19019}19020} else {19021node.innerHTML = markup;19022}1902319024var scripts = node.getElementsByTagName('script');19025if (scripts.length) {19026("production" !== "development" ? invariant(19027handleScript,19028'createNodesFromMarkup(...): Unexpected <script> element rendered.'19029) : invariant(handleScript));19030createArrayFromMixed(scripts).forEach(handleScript);19031}1903219033var nodes = createArrayFromMixed(node.childNodes);19034while (node.lastChild) {19035node.removeChild(node.lastChild);19036}19037return nodes;19038}1903919040module.exports = createNodesFromMarkup;1904119042},{"124":124,"142":142,"150":150,"22":22}],127:[function(_dereq_,module,exports){19043/**19044* Copyright 2013-2015, Facebook, Inc.19045* All rights reserved.19046*19047* This source code is licensed under the BSD-style license found in the19048* LICENSE file in the root directory of this source tree. An additional grant19049* of patent rights can be found in the PATENTS file in the same directory.19050*19051* @providesModule cx19052*/1905319054/**19055* This function is used to mark string literals representing CSS class names19056* so that they can be transformed statically. This allows for modularization19057* and minification of CSS class names.19058*19059* In static_upstream, this function is actually implemented, but it should19060* eventually be replaced with something more descriptive, and the transform19061* that is used in the main stack should be ported for use elsewhere.19062*19063* @param string|object className to modularize, or an object of key/values.19064* In the object case, the values are conditions that19065* determine if the className keys should be included.19066* @param [string ...] Variable list of classNames in the string case.19067* @return string Renderable space-separated CSS className.19068*/1906919070'use strict';19071var warning = _dereq_(171);1907219073var warned = false;1907419075function cx(classNames) {19076if ("production" !== "development") {19077("production" !== "development" ? warning(19078warned,19079'React.addons.classSet will be deprecated in a future version. See ' +19080'http://fb.me/react-addons-classset'19081) : null);19082warned = true;19083}1908419085if (typeof classNames == 'object') {19086return Object.keys(classNames).filter(function(className) {19087return classNames[className];19088}).join(' ');19089} else {19090return Array.prototype.join.call(arguments, ' ');19091}19092}1909319094module.exports = cx;1909519096},{"171":171}],128:[function(_dereq_,module,exports){19097/**19098* Copyright 2013-2015, Facebook, Inc.19099* All rights reserved.19100*19101* This source code is licensed under the BSD-style license found in the19102* LICENSE file in the root directory of this source tree. An additional grant19103* of patent rights can be found in the PATENTS file in the same directory.19104*19105* @providesModule dangerousStyleValue19106* @typechecks static-only19107*/1910819109'use strict';1911019111var CSSProperty = _dereq_(5);1911219113var isUnitlessNumber = CSSProperty.isUnitlessNumber;1911419115/**19116* Convert a value into the proper css writable value. The style name `name`19117* should be logical (no hyphens), as specified19118* in `CSSProperty.isUnitlessNumber`.19119*19120* @param {string} name CSS property name such as `topMargin`.19121* @param {*} value CSS property value such as `10px`.19122* @return {string} Normalized style value with dimensions applied.19123*/19124function dangerousStyleValue(name, value) {19125// Note that we've removed escapeTextForBrowser() calls here since the19126// whole string will be escaped when the attribute is injected into19127// the markup. If you provide unsafe user data here they can inject19128// arbitrary CSS which may be problematic (I couldn't repro this):19129// https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet19130// http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/19131// This is not an XSS hole but instead a potential CSS injection issue19132// which has lead to a greater discussion about how we're going to19133// trust URLs moving forward. See #21159011913419135var isEmpty = value == null || typeof value === 'boolean' || value === '';19136if (isEmpty) {19137return '';19138}1913919140var isNonNumeric = isNaN(value);19141if (isNonNumeric || value === 0 ||19142isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {19143return '' + value; // cast to string19144}1914519146if (typeof value === 'string') {19147value = value.trim();19148}19149return value + 'px';19150}1915119152module.exports = dangerousStyleValue;1915319154},{"5":5}],129:[function(_dereq_,module,exports){19155/**19156* Copyright 2013-2015, Facebook, Inc.19157* All rights reserved.19158*19159* This source code is licensed under the BSD-style license found in the19160* LICENSE file in the root directory of this source tree. An additional grant19161* of patent rights can be found in the PATENTS file in the same directory.19162*19163* @providesModule emptyFunction19164*/1916519166function makeEmptyFunction(arg) {19167return function() {19168return arg;19169};19170}1917119172/**19173* This function accepts and discards inputs; it has no side effects. This is19174* primarily useful idiomatically for overridable function endpoints which19175* always need to be callable, since JS lacks a null-call idiom ala Cocoa.19176*/19177function emptyFunction() {}1917819179emptyFunction.thatReturns = makeEmptyFunction;19180emptyFunction.thatReturnsFalse = makeEmptyFunction(false);19181emptyFunction.thatReturnsTrue = makeEmptyFunction(true);19182emptyFunction.thatReturnsNull = makeEmptyFunction(null);19183emptyFunction.thatReturnsThis = function() { return this; };19184emptyFunction.thatReturnsArgument = function(arg) { return arg; };1918519186module.exports = emptyFunction;1918719188},{}],130:[function(_dereq_,module,exports){19189/**19190* Copyright 2013-2015, Facebook, Inc.19191* All rights reserved.19192*19193* This source code is licensed under the BSD-style license found in the19194* LICENSE file in the root directory of this source tree. An additional grant19195* of patent rights can be found in the PATENTS file in the same directory.19196*19197* @providesModule emptyObject19198*/1919919200"use strict";1920119202var emptyObject = {};1920319204if ("production" !== "development") {19205Object.freeze(emptyObject);19206}1920719208module.exports = emptyObject;1920919210},{}],131:[function(_dereq_,module,exports){19211/**19212* Copyright 2013-2015, Facebook, Inc.19213* All rights reserved.19214*19215* This source code is licensed under the BSD-style license found in the19216* LICENSE file in the root directory of this source tree. An additional grant19217* of patent rights can be found in the PATENTS file in the same directory.19218*19219* @providesModule escapeTextContentForBrowser19220*/1922119222'use strict';1922319224var ESCAPE_LOOKUP = {19225'&': '&',19226'>': '>',19227'<': '<',19228'"': '"',19229'\'': '''19230};1923119232var ESCAPE_REGEX = /[&><"']/g;1923319234function escaper(match) {19235return ESCAPE_LOOKUP[match];19236}1923719238/**19239* Escapes text to prevent scripting attacks.19240*19241* @param {*} text Text value to escape.19242* @return {string} An escaped string.19243*/19244function escapeTextContentForBrowser(text) {19245return ('' + text).replace(ESCAPE_REGEX, escaper);19246}1924719248module.exports = escapeTextContentForBrowser;1924919250},{}],132:[function(_dereq_,module,exports){19251/**19252* Copyright 2013-2015, Facebook, Inc.19253* All rights reserved.19254*19255* This source code is licensed under the BSD-style license found in the19256* LICENSE file in the root directory of this source tree. An additional grant19257* of patent rights can be found in the PATENTS file in the same directory.19258*19259* @providesModule findDOMNode19260* @typechecks static-only19261*/1926219263'use strict';1926419265var ReactCurrentOwner = _dereq_(45);19266var ReactInstanceMap = _dereq_(73);19267var ReactMount = _dereq_(77);1926819269var invariant = _dereq_(150);19270var isNode = _dereq_(152);19271var warning = _dereq_(171);1927219273/**19274* Returns the DOM node rendered by this element.19275*19276* @param {ReactComponent|DOMElement} componentOrElement19277* @return {DOMElement} The root node of this element.19278*/19279function findDOMNode(componentOrElement) {19280if ("production" !== "development") {19281var owner = ReactCurrentOwner.current;19282if (owner !== null) {19283("production" !== "development" ? warning(19284owner._warnedAboutRefsInRender,19285'%s is accessing getDOMNode or findDOMNode inside its render(). ' +19286'render() should be a pure function of props and state. It should ' +19287'never access something that requires stale data from the previous ' +19288'render, such as refs. Move this logic to componentDidMount and ' +19289'componentDidUpdate instead.',19290owner.getName() || 'A component'19291) : null);19292owner._warnedAboutRefsInRender = true;19293}19294}19295if (componentOrElement == null) {19296return null;19297}19298if (isNode(componentOrElement)) {19299return componentOrElement;19300}19301if (ReactInstanceMap.has(componentOrElement)) {19302return ReactMount.getNodeFromInstance(componentOrElement);19303}19304("production" !== "development" ? invariant(19305componentOrElement.render == null ||19306typeof componentOrElement.render !== 'function',19307'Component (with keys: %s) contains `render` method ' +19308'but is not mounted in the DOM',19309Object.keys(componentOrElement)19310) : invariant(componentOrElement.render == null ||19311typeof componentOrElement.render !== 'function'));19312("production" !== "development" ? invariant(19313false,19314'Element appears to be neither ReactComponent nor DOMNode (keys: %s)',19315Object.keys(componentOrElement)19316) : invariant(false));19317}1931819319module.exports = findDOMNode;1932019321},{"150":150,"152":152,"171":171,"45":45,"73":73,"77":77}],133:[function(_dereq_,module,exports){19322/**19323* Copyright 2013-2015, Facebook, Inc.19324* All rights reserved.19325*19326* This source code is licensed under the BSD-style license found in the19327* LICENSE file in the root directory of this source tree. An additional grant19328* of patent rights can be found in the PATENTS file in the same directory.19329*19330* @providesModule flattenChildren19331*/1933219333'use strict';1933419335var traverseAllChildren = _dereq_(169);19336var warning = _dereq_(171);1933719338/**19339* @param {function} traverseContext Context passed through traversal.19340* @param {?ReactComponent} child React child component.19341* @param {!string} name String name of key path to child.19342*/19343function flattenSingleChildIntoContext(traverseContext, child, name) {19344// We found a component instance.19345var result = traverseContext;19346var keyUnique = !result.hasOwnProperty(name);19347if ("production" !== "development") {19348("production" !== "development" ? warning(19349keyUnique,19350'flattenChildren(...): Encountered two children with the same key, ' +19351'`%s`. Child keys must be unique; when two children share a key, only ' +19352'the first child will be used.',19353name19354) : null);19355}19356if (keyUnique && child != null) {19357result[name] = child;19358}19359}1936019361/**19362* Flattens children that are typically specified as `props.children`. Any null19363* children will not be included in the resulting object.19364* @return {!object} flattened children keyed by name.19365*/19366function flattenChildren(children) {19367if (children == null) {19368return children;19369}19370var result = {};19371traverseAllChildren(children, flattenSingleChildIntoContext, result);19372return result;19373}1937419375module.exports = flattenChildren;1937619377},{"169":169,"171":171}],134:[function(_dereq_,module,exports){19378/**19379* Copyright 2014-2015, Facebook, Inc.19380* All rights reserved.19381*19382* This source code is licensed under the BSD-style license found in the19383* LICENSE file in the root directory of this source tree. An additional grant19384* of patent rights can be found in the PATENTS file in the same directory.19385*19386* @providesModule focusNode19387*/1938819389"use strict";1939019391/**19392* @param {DOMElement} node input/textarea to focus19393*/19394function focusNode(node) {19395// IE8 can throw "Can't move focus to the control because it is invisible,19396// not enabled, or of a type that does not accept the focus." for all kinds of19397// reasons that are too expensive and fragile to test.19398try {19399node.focus();19400} catch(e) {19401}19402}1940319404module.exports = focusNode;1940519406},{}],135:[function(_dereq_,module,exports){19407/**19408* Copyright 2013-2015, Facebook, Inc.19409* All rights reserved.19410*19411* This source code is licensed under the BSD-style license found in the19412* LICENSE file in the root directory of this source tree. An additional grant19413* of patent rights can be found in the PATENTS file in the same directory.19414*19415* @providesModule forEachAccumulated19416*/1941719418'use strict';1941919420/**19421* @param {array} an "accumulation" of items which is either an Array or19422* a single item. Useful when paired with the `accumulate` module. This is a19423* simple utility that allows us to reason about a collection of items, but19424* handling the case when there is exactly one item (and we do not need to19425* allocate an array).19426*/19427var forEachAccumulated = function(arr, cb, scope) {19428if (Array.isArray(arr)) {19429arr.forEach(cb, scope);19430} else if (arr) {19431cb.call(scope, arr);19432}19433};1943419435module.exports = forEachAccumulated;1943619437},{}],136:[function(_dereq_,module,exports){19438/**19439* Copyright 2013-2015, Facebook, Inc.19440* All rights reserved.19441*19442* This source code is licensed under the BSD-style license found in the19443* LICENSE file in the root directory of this source tree. An additional grant19444* of patent rights can be found in the PATENTS file in the same directory.19445*19446* @providesModule getActiveElement19447* @typechecks19448*/1944919450/**19451* Same as document.activeElement but wraps in a try-catch block. In IE it is19452* not safe to call document.activeElement if there is nothing focused.19453*19454* The activeElement will be null only if the document body is not yet defined.19455*/19456function getActiveElement() /*?DOMElement*/ {19457try {19458return document.activeElement || document.body;19459} catch (e) {19460return document.body;19461}19462}1946319464module.exports = getActiveElement;1946519466},{}],137:[function(_dereq_,module,exports){19467/**19468* Copyright 2013-2015, Facebook, Inc.19469* All rights reserved.19470*19471* This source code is licensed under the BSD-style license found in the19472* LICENSE file in the root directory of this source tree. An additional grant19473* of patent rights can be found in the PATENTS file in the same directory.19474*19475* @providesModule getEventCharCode19476* @typechecks static-only19477*/1947819479'use strict';1948019481/**19482* `charCode` represents the actual "character code" and is safe to use with19483* `String.fromCharCode`. As such, only keys that correspond to printable19484* characters produce a valid `charCode`, the only exception to this is Enter.19485* The Tab-key is considered non-printable and does not have a `charCode`,19486* presumably because it does not produce a tab-character in browsers.19487*19488* @param {object} nativeEvent Native browser event.19489* @return {string} Normalized `charCode` property.19490*/19491function getEventCharCode(nativeEvent) {19492var charCode;19493var keyCode = nativeEvent.keyCode;1949419495if ('charCode' in nativeEvent) {19496charCode = nativeEvent.charCode;1949719498// FF does not set `charCode` for the Enter-key, check against `keyCode`.19499if (charCode === 0 && keyCode === 13) {19500charCode = 13;19501}19502} else {19503// IE8 does not implement `charCode`, but `keyCode` has the correct value.19504charCode = keyCode;19505}1950619507// Some non-printable keys are reported in `charCode`/`keyCode`, discard them.19508// Must not discard the (non-)printable Enter-key.19509if (charCode >= 32 || charCode === 13) {19510return charCode;19511}1951219513return 0;19514}1951519516module.exports = getEventCharCode;1951719518},{}],138:[function(_dereq_,module,exports){19519/**19520* Copyright 2013-2015, Facebook, Inc.19521* All rights reserved.19522*19523* This source code is licensed under the BSD-style license found in the19524* LICENSE file in the root directory of this source tree. An additional grant19525* of patent rights can be found in the PATENTS file in the same directory.19526*19527* @providesModule getEventKey19528* @typechecks static-only19529*/1953019531'use strict';1953219533var getEventCharCode = _dereq_(137);1953419535/**19536* Normalization of deprecated HTML5 `key` values19537* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names19538*/19539var normalizeKey = {19540'Esc': 'Escape',19541'Spacebar': ' ',19542'Left': 'ArrowLeft',19543'Up': 'ArrowUp',19544'Right': 'ArrowRight',19545'Down': 'ArrowDown',19546'Del': 'Delete',19547'Win': 'OS',19548'Menu': 'ContextMenu',19549'Apps': 'ContextMenu',19550'Scroll': 'ScrollLock',19551'MozPrintableKey': 'Unidentified'19552};1955319554/**19555* Translation from legacy `keyCode` to HTML5 `key`19556* Only special keys supported, all others depend on keyboard layout or browser19557* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names19558*/19559var translateToKey = {195608: 'Backspace',195619: 'Tab',1956212: 'Clear',1956313: 'Enter',1956416: 'Shift',1956517: 'Control',1956618: 'Alt',1956719: 'Pause',1956820: 'CapsLock',1956927: 'Escape',1957032: ' ',1957133: 'PageUp',1957234: 'PageDown',1957335: 'End',1957436: 'Home',1957537: 'ArrowLeft',1957638: 'ArrowUp',1957739: 'ArrowRight',1957840: 'ArrowDown',1957945: 'Insert',1958046: 'Delete',19581112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',19582118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',19583144: 'NumLock',19584145: 'ScrollLock',19585224: 'Meta'19586};1958719588/**19589* @param {object} nativeEvent Native browser event.19590* @return {string} Normalized `key` property.19591*/19592function getEventKey(nativeEvent) {19593if (nativeEvent.key) {19594// Normalize inconsistent values reported by browsers due to19595// implementations of a working draft specification.1959619597// FireFox implements `key` but returns `MozPrintableKey` for all19598// printable characters (normalized to `Unidentified`), ignore it.19599var key = normalizeKey[nativeEvent.key] || nativeEvent.key;19600if (key !== 'Unidentified') {19601return key;19602}19603}1960419605// Browser does not implement `key`, polyfill as much of it as we can.19606if (nativeEvent.type === 'keypress') {19607var charCode = getEventCharCode(nativeEvent);1960819609// The enter-key is technically both printable and non-printable and can19610// thus be captured by `keypress`, no other non-printable key should.19611return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);19612}19613if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {19614// While user keyboard layout determines the actual meaning of each19615// `keyCode` value, almost all function keys have a universal value.19616return translateToKey[nativeEvent.keyCode] || 'Unidentified';19617}19618return '';19619}1962019621module.exports = getEventKey;1962219623},{"137":137}],139:[function(_dereq_,module,exports){19624/**19625* Copyright 2013-2015, Facebook, Inc.19626* All rights reserved.19627*19628* This source code is licensed under the BSD-style license found in the19629* LICENSE file in the root directory of this source tree. An additional grant19630* of patent rights can be found in the PATENTS file in the same directory.19631*19632* @providesModule getEventModifierState19633* @typechecks static-only19634*/1963519636'use strict';1963719638/**19639* Translation from modifier key to the associated property in the event.19640* @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers19641*/1964219643var modifierKeyToProp = {19644'Alt': 'altKey',19645'Control': 'ctrlKey',19646'Meta': 'metaKey',19647'Shift': 'shiftKey'19648};1964919650// IE8 does not implement getModifierState so we simply map it to the only19651// modifier keys exposed by the event itself, does not support Lock-keys.19652// Currently, all major browsers except Chrome seems to support Lock-keys.19653function modifierStateGetter(keyArg) {19654/*jshint validthis:true */19655var syntheticEvent = this;19656var nativeEvent = syntheticEvent.nativeEvent;19657if (nativeEvent.getModifierState) {19658return nativeEvent.getModifierState(keyArg);19659}19660var keyProp = modifierKeyToProp[keyArg];19661return keyProp ? !!nativeEvent[keyProp] : false;19662}1966319664function getEventModifierState(nativeEvent) {19665return modifierStateGetter;19666}1966719668module.exports = getEventModifierState;1966919670},{}],140:[function(_dereq_,module,exports){19671/**19672* Copyright 2013-2015, Facebook, Inc.19673* All rights reserved.19674*19675* This source code is licensed under the BSD-style license found in the19676* LICENSE file in the root directory of this source tree. An additional grant19677* of patent rights can be found in the PATENTS file in the same directory.19678*19679* @providesModule getEventTarget19680* @typechecks static-only19681*/1968219683'use strict';1968419685/**19686* Gets the target node from a native browser event by accounting for19687* inconsistencies in browser DOM APIs.19688*19689* @param {object} nativeEvent Native browser event.19690* @return {DOMEventTarget} Target node.19691*/19692function getEventTarget(nativeEvent) {19693var target = nativeEvent.target || nativeEvent.srcElement || window;19694// Safari may fire events on text nodes (Node.TEXT_NODE is 3).19695// @see http://www.quirksmode.org/js/events_properties.html19696return target.nodeType === 3 ? target.parentNode : target;19697}1969819699module.exports = getEventTarget;1970019701},{}],141:[function(_dereq_,module,exports){19702/**19703* Copyright 2013-2015, Facebook, Inc.19704* All rights reserved.19705*19706* This source code is licensed under the BSD-style license found in the19707* LICENSE file in the root directory of this source tree. An additional grant19708* of patent rights can be found in the PATENTS file in the same directory.19709*19710* @providesModule getIteratorFn19711* @typechecks static-only19712*/1971319714'use strict';1971519716/* global Symbol */19717var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;19718var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.1971919720/**19721* Returns the iterator method function contained on the iterable object.19722*19723* Be sure to invoke the function with the iterable as context:19724*19725* var iteratorFn = getIteratorFn(myIterable);19726* if (iteratorFn) {19727* var iterator = iteratorFn.call(myIterable);19728* ...19729* }19730*19731* @param {?object} maybeIterable19732* @return {?function}19733*/19734function getIteratorFn(maybeIterable) {19735var iteratorFn = maybeIterable && (19736(ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL])19737);19738if (typeof iteratorFn === 'function') {19739return iteratorFn;19740}19741}1974219743module.exports = getIteratorFn;1974419745},{}],142:[function(_dereq_,module,exports){19746/**19747* Copyright 2013-2015, Facebook, Inc.19748* All rights reserved.19749*19750* This source code is licensed under the BSD-style license found in the19751* LICENSE file in the root directory of this source tree. An additional grant19752* of patent rights can be found in the PATENTS file in the same directory.19753*19754* @providesModule getMarkupWrap19755*/1975619757var ExecutionEnvironment = _dereq_(22);1975819759var invariant = _dereq_(150);1976019761/**19762* Dummy container used to detect which wraps are necessary.19763*/19764var dummyNode =19765ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;1976619767/**19768* Some browsers cannot use `innerHTML` to render certain elements standalone,19769* so we wrap them, render the wrapped nodes, then extract the desired node.19770*19771* In IE8, certain elements cannot render alone, so wrap all elements ('*').19772*/19773var shouldWrap = {19774// Force wrapping for SVG elements because if they get created inside a <div>,19775// they will be initialized in the wrong namespace (and will not display).19776'circle': true,19777'clipPath': true,19778'defs': true,19779'ellipse': true,19780'g': true,19781'line': true,19782'linearGradient': true,19783'path': true,19784'polygon': true,19785'polyline': true,19786'radialGradient': true,19787'rect': true,19788'stop': true,19789'text': true19790};1979119792var selectWrap = [1, '<select multiple="true">', '</select>'];19793var tableWrap = [1, '<table>', '</table>'];19794var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];1979519796var svgWrap = [1, '<svg>', '</svg>'];1979719798var markupWrap = {19799'*': [1, '?<div>', '</div>'],1980019801'area': [1, '<map>', '</map>'],19802'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],19803'legend': [1, '<fieldset>', '</fieldset>'],19804'param': [1, '<object>', '</object>'],19805'tr': [2, '<table><tbody>', '</tbody></table>'],1980619807'optgroup': selectWrap,19808'option': selectWrap,1980919810'caption': tableWrap,19811'colgroup': tableWrap,19812'tbody': tableWrap,19813'tfoot': tableWrap,19814'thead': tableWrap,1981519816'td': trWrap,19817'th': trWrap,1981819819'circle': svgWrap,19820'clipPath': svgWrap,19821'defs': svgWrap,19822'ellipse': svgWrap,19823'g': svgWrap,19824'line': svgWrap,19825'linearGradient': svgWrap,19826'path': svgWrap,19827'polygon': svgWrap,19828'polyline': svgWrap,19829'radialGradient': svgWrap,19830'rect': svgWrap,19831'stop': svgWrap,19832'text': svgWrap19833};1983419835/**19836* Gets the markup wrap configuration for the supplied `nodeName`.19837*19838* NOTE: This lazily detects which wraps are necessary for the current browser.19839*19840* @param {string} nodeName Lowercase `nodeName`.19841* @return {?array} Markup wrap configuration, if applicable.19842*/19843function getMarkupWrap(nodeName) {19844("production" !== "development" ? invariant(!!dummyNode, 'Markup wrapping node not initialized') : invariant(!!dummyNode));19845if (!markupWrap.hasOwnProperty(nodeName)) {19846nodeName = '*';19847}19848if (!shouldWrap.hasOwnProperty(nodeName)) {19849if (nodeName === '*') {19850dummyNode.innerHTML = '<link />';19851} else {19852dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';19853}19854shouldWrap[nodeName] = !dummyNode.firstChild;19855}19856return shouldWrap[nodeName] ? markupWrap[nodeName] : null;19857}198581985919860module.exports = getMarkupWrap;1986119862},{"150":150,"22":22}],143:[function(_dereq_,module,exports){19863/**19864* Copyright 2013-2015, Facebook, Inc.19865* All rights reserved.19866*19867* This source code is licensed under the BSD-style license found in the19868* LICENSE file in the root directory of this source tree. An additional grant19869* of patent rights can be found in the PATENTS file in the same directory.19870*19871* @providesModule getNodeForCharacterOffset19872*/1987319874'use strict';1987519876/**19877* Given any node return the first leaf node without children.19878*19879* @param {DOMElement|DOMTextNode} node19880* @return {DOMElement|DOMTextNode}19881*/19882function getLeafNode(node) {19883while (node && node.firstChild) {19884node = node.firstChild;19885}19886return node;19887}1988819889/**19890* Get the next sibling within a container. This will walk up the19891* DOM if a node's siblings have been exhausted.19892*19893* @param {DOMElement|DOMTextNode} node19894* @return {?DOMElement|DOMTextNode}19895*/19896function getSiblingNode(node) {19897while (node) {19898if (node.nextSibling) {19899return node.nextSibling;19900}19901node = node.parentNode;19902}19903}1990419905/**19906* Get object describing the nodes which contain characters at offset.19907*19908* @param {DOMElement|DOMTextNode} root19909* @param {number} offset19910* @return {?object}19911*/19912function getNodeForCharacterOffset(root, offset) {19913var node = getLeafNode(root);19914var nodeStart = 0;19915var nodeEnd = 0;1991619917while (node) {19918if (node.nodeType === 3) {19919nodeEnd = nodeStart + node.textContent.length;1992019921if (nodeStart <= offset && nodeEnd >= offset) {19922return {19923node: node,19924offset: offset - nodeStart19925};19926}1992719928nodeStart = nodeEnd;19929}1993019931node = getLeafNode(getSiblingNode(node));19932}19933}1993419935module.exports = getNodeForCharacterOffset;1993619937},{}],144:[function(_dereq_,module,exports){19938/**19939* Copyright 2013-2015, Facebook, Inc.19940* All rights reserved.19941*19942* This source code is licensed under the BSD-style license found in the19943* LICENSE file in the root directory of this source tree. An additional grant19944* of patent rights can be found in the PATENTS file in the same directory.19945*19946* @providesModule getReactRootElementInContainer19947*/1994819949'use strict';1995019951var DOC_NODE_TYPE = 9;1995219953/**19954* @param {DOMElement|DOMDocument} container DOM element that may contain19955* a React component19956* @return {?*} DOM element that may have the reactRoot ID, or null.19957*/19958function getReactRootElementInContainer(container) {19959if (!container) {19960return null;19961}1996219963if (container.nodeType === DOC_NODE_TYPE) {19964return container.documentElement;19965} else {19966return container.firstChild;19967}19968}1996919970module.exports = getReactRootElementInContainer;1997119972},{}],145:[function(_dereq_,module,exports){19973/**19974* Copyright 2013-2015, Facebook, Inc.19975* All rights reserved.19976*19977* This source code is licensed under the BSD-style license found in the19978* LICENSE file in the root directory of this source tree. An additional grant19979* of patent rights can be found in the PATENTS file in the same directory.19980*19981* @providesModule getTextContentAccessor19982*/1998319984'use strict';1998519986var ExecutionEnvironment = _dereq_(22);1998719988var contentKey = null;1998919990/**19991* Gets the key used to access text content on a DOM node.19992*19993* @return {?string} Key used to access text content.19994* @internal19995*/19996function getTextContentAccessor() {19997if (!contentKey && ExecutionEnvironment.canUseDOM) {19998// Prefer textContent to innerText because many browsers support both but19999// SVG <text> elements don't support innerText even when <div> does.20000contentKey = 'textContent' in document.documentElement ?20001'textContent' :20002'innerText';20003}20004return contentKey;20005}2000620007module.exports = getTextContentAccessor;2000820009},{"22":22}],146:[function(_dereq_,module,exports){20010/**20011* Copyright 2013-2015, Facebook, Inc.20012* All rights reserved.20013*20014* This source code is licensed under the BSD-style license found in the20015* LICENSE file in the root directory of this source tree. An additional grant20016* of patent rights can be found in the PATENTS file in the same directory.20017*20018* @providesModule getUnboundedScrollPosition20019* @typechecks20020*/2002120022"use strict";2002320024/**20025* Gets the scroll position of the supplied element or window.20026*20027* The return values are unbounded, unlike `getScrollPosition`. This means they20028* may be negative or exceed the element boundaries (which is possible using20029* inertial scrolling).20030*20031* @param {DOMWindow|DOMElement} scrollable20032* @return {object} Map with `x` and `y` keys.20033*/20034function getUnboundedScrollPosition(scrollable) {20035if (scrollable === window) {20036return {20037x: window.pageXOffset || document.documentElement.scrollLeft,20038y: window.pageYOffset || document.documentElement.scrollTop20039};20040}20041return {20042x: scrollable.scrollLeft,20043y: scrollable.scrollTop20044};20045}2004620047module.exports = getUnboundedScrollPosition;2004820049},{}],147:[function(_dereq_,module,exports){20050/**20051* Copyright 2013-2015, Facebook, Inc.20052* All rights reserved.20053*20054* This source code is licensed under the BSD-style license found in the20055* LICENSE file in the root directory of this source tree. An additional grant20056* of patent rights can be found in the PATENTS file in the same directory.20057*20058* @providesModule hyphenate20059* @typechecks20060*/2006120062var _uppercasePattern = /([A-Z])/g;2006320064/**20065* Hyphenates a camelcased string, for example:20066*20067* > hyphenate('backgroundColor')20068* < "background-color"20069*20070* For CSS style names, use `hyphenateStyleName` instead which works properly20071* with all vendor prefixes, including `ms`.20072*20073* @param {string} string20074* @return {string}20075*/20076function hyphenate(string) {20077return string.replace(_uppercasePattern, '-$1').toLowerCase();20078}2007920080module.exports = hyphenate;2008120082},{}],148:[function(_dereq_,module,exports){20083/**20084* Copyright 2013-2015, Facebook, Inc.20085* All rights reserved.20086*20087* This source code is licensed under the BSD-style license found in the20088* LICENSE file in the root directory of this source tree. An additional grant20089* of patent rights can be found in the PATENTS file in the same directory.20090*20091* @providesModule hyphenateStyleName20092* @typechecks20093*/2009420095"use strict";2009620097var hyphenate = _dereq_(147);2009820099var msPattern = /^ms-/;2010020101/**20102* Hyphenates a camelcased CSS property name, for example:20103*20104* > hyphenateStyleName('backgroundColor')20105* < "background-color"20106* > hyphenateStyleName('MozTransition')20107* < "-moz-transition"20108* > hyphenateStyleName('msTransition')20109* < "-ms-transition"20110*20111* As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix20112* is converted to `-ms-`.20113*20114* @param {string} string20115* @return {string}20116*/20117function hyphenateStyleName(string) {20118return hyphenate(string).replace(msPattern, '-ms-');20119}2012020121module.exports = hyphenateStyleName;2012220123},{"147":147}],149:[function(_dereq_,module,exports){20124/**20125* Copyright 2013-2015, Facebook, Inc.20126* All rights reserved.20127*20128* This source code is licensed under the BSD-style license found in the20129* LICENSE file in the root directory of this source tree. An additional grant20130* of patent rights can be found in the PATENTS file in the same directory.20131*20132* @providesModule instantiateReactComponent20133* @typechecks static-only20134*/2013520136'use strict';2013720138var ReactCompositeComponent = _dereq_(43);20139var ReactEmptyComponent = _dereq_(65);20140var ReactNativeComponent = _dereq_(80);2014120142var assign = _dereq_(29);20143var invariant = _dereq_(150);20144var warning = _dereq_(171);2014520146// To avoid a cyclic dependency, we create the final class in this module20147var ReactCompositeComponentWrapper = function() { };20148assign(20149ReactCompositeComponentWrapper.prototype,20150ReactCompositeComponent.Mixin,20151{20152_instantiateReactComponent: instantiateReactComponent20153}20154);2015520156/**20157* Check if the type reference is a known internal type. I.e. not a user20158* provided composite type.20159*20160* @param {function} type20161* @return {boolean} Returns true if this is a valid internal type.20162*/20163function isInternalComponentType(type) {20164return (20165typeof type === 'function' &&20166typeof type.prototype !== 'undefined' &&20167typeof type.prototype.mountComponent === 'function' &&20168typeof type.prototype.receiveComponent === 'function'20169);20170}2017120172/**20173* Given a ReactNode, create an instance that will actually be mounted.20174*20175* @param {ReactNode} node20176* @param {*} parentCompositeType The composite type that resolved this.20177* @return {object} A new instance of the element's constructor.20178* @protected20179*/20180function instantiateReactComponent(node, parentCompositeType) {20181var instance;2018220183if (node === null || node === false) {20184node = ReactEmptyComponent.emptyElement;20185}2018620187if (typeof node === 'object') {20188var element = node;20189if ("production" !== "development") {20190("production" !== "development" ? warning(20191element && (typeof element.type === 'function' ||20192typeof element.type === 'string'),20193'Only functions or strings can be mounted as React components.'20194) : null);20195}2019620197// Special case string values20198if (parentCompositeType === element.type &&20199typeof element.type === 'string') {20200// Avoid recursion if the wrapper renders itself.20201instance = ReactNativeComponent.createInternalComponent(element);20202// All native components are currently wrapped in a composite so we're20203// safe to assume that this is what we should instantiate.20204} else if (isInternalComponentType(element.type)) {20205// This is temporarily available for custom components that are not string20206// represenations. I.e. ART. Once those are updated to use the string20207// representation, we can drop this code path.20208instance = new element.type(element);20209} else {20210instance = new ReactCompositeComponentWrapper();20211}20212} else if (typeof node === 'string' || typeof node === 'number') {20213instance = ReactNativeComponent.createInstanceForText(node);20214} else {20215("production" !== "development" ? invariant(20216false,20217'Encountered invalid React node of type %s',20218typeof node20219) : invariant(false));20220}2022120222if ("production" !== "development") {20223("production" !== "development" ? warning(20224typeof instance.construct === 'function' &&20225typeof instance.mountComponent === 'function' &&20226typeof instance.receiveComponent === 'function' &&20227typeof instance.unmountComponent === 'function',20228'Only React Components can be mounted.'20229) : null);20230}2023120232// Sets up the instance. This can probably just move into the constructor now.20233instance.construct(node);2023420235// These two fields are used by the DOM and ART diffing algorithms20236// respectively. Instead of using expandos on components, we should be20237// storing the state needed by the diffing algorithms elsewhere.20238instance._mountIndex = 0;20239instance._mountImage = null;2024020241if ("production" !== "development") {20242instance._isOwnerNecessary = false;20243instance._warnedAboutRefsInRender = false;20244}2024520246// Internal instances should fully constructed at this point, so they should20247// not get any new fields added to them at this point.20248if ("production" !== "development") {20249if (Object.preventExtensions) {20250Object.preventExtensions(instance);20251}20252}2025320254return instance;20255}2025620257module.exports = instantiateReactComponent;2025820259},{"150":150,"171":171,"29":29,"43":43,"65":65,"80":80}],150:[function(_dereq_,module,exports){20260/**20261* Copyright 2013-2015, Facebook, Inc.20262* All rights reserved.20263*20264* This source code is licensed under the BSD-style license found in the20265* LICENSE file in the root directory of this source tree. An additional grant20266* of patent rights can be found in the PATENTS file in the same directory.20267*20268* @providesModule invariant20269*/2027020271"use strict";2027220273/**20274* Use invariant() to assert state which your program assumes to be true.20275*20276* Provide sprintf-style format (only %s is supported) and arguments20277* to provide information about what broke and what you were20278* expecting.20279*20280* The invariant message will be stripped in production, but the invariant20281* will remain to ensure logic does not differ in production.20282*/2028320284var invariant = function(condition, format, a, b, c, d, e, f) {20285if ("production" !== "development") {20286if (format === undefined) {20287throw new Error('invariant requires an error message argument');20288}20289}2029020291if (!condition) {20292var error;20293if (format === undefined) {20294error = new Error(20295'Minified exception occurred; use the non-minified dev environment ' +20296'for the full error message and additional helpful warnings.'20297);20298} else {20299var args = [a, b, c, d, e, f];20300var argIndex = 0;20301error = new Error(20302'Invariant Violation: ' +20303format.replace(/%s/g, function() { return args[argIndex++]; })20304);20305}2030620307error.framesToPop = 1; // we don't care about invariant's own frame20308throw error;20309}20310};2031120312module.exports = invariant;2031320314},{}],151:[function(_dereq_,module,exports){20315/**20316* Copyright 2013-2015, Facebook, Inc.20317* All rights reserved.20318*20319* This source code is licensed under the BSD-style license found in the20320* LICENSE file in the root directory of this source tree. An additional grant20321* of patent rights can be found in the PATENTS file in the same directory.20322*20323* @providesModule isEventSupported20324*/2032520326'use strict';2032720328var ExecutionEnvironment = _dereq_(22);2032920330var useHasFeature;20331if (ExecutionEnvironment.canUseDOM) {20332useHasFeature =20333document.implementation &&20334document.implementation.hasFeature &&20335// always returns true in newer browsers as per the standard.20336// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature20337document.implementation.hasFeature('', '') !== true;20338}2033920340/**20341* Checks if an event is supported in the current execution environment.20342*20343* NOTE: This will not work correctly for non-generic events such as `change`,20344* `reset`, `load`, `error`, and `select`.20345*20346* Borrows from Modernizr.20347*20348* @param {string} eventNameSuffix Event name, e.g. "click".20349* @param {?boolean} capture Check if the capture phase is supported.20350* @return {boolean} True if the event is supported.20351* @internal20352* @license Modernizr 3.0.0pre (Custom Build) | MIT20353*/20354function isEventSupported(eventNameSuffix, capture) {20355if (!ExecutionEnvironment.canUseDOM ||20356capture && !('addEventListener' in document)) {20357return false;20358}2035920360var eventName = 'on' + eventNameSuffix;20361var isSupported = eventName in document;2036220363if (!isSupported) {20364var element = document.createElement('div');20365element.setAttribute(eventName, 'return;');20366isSupported = typeof element[eventName] === 'function';20367}2036820369if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {20370// This is the only way to test support for the `wheel` event in IE9+.20371isSupported = document.implementation.hasFeature('Events.wheel', '3.0');20372}2037320374return isSupported;20375}2037620377module.exports = isEventSupported;2037820379},{"22":22}],152:[function(_dereq_,module,exports){20380/**20381* Copyright 2013-2015, Facebook, Inc.20382* All rights reserved.20383*20384* This source code is licensed under the BSD-style license found in the20385* LICENSE file in the root directory of this source tree. An additional grant20386* of patent rights can be found in the PATENTS file in the same directory.20387*20388* @providesModule isNode20389* @typechecks20390*/2039120392/**20393* @param {*} object The object to check.20394* @return {boolean} Whether or not the object is a DOM node.20395*/20396function isNode(object) {20397return !!(object && (20398((typeof Node === 'function' ? object instanceof Node : typeof object === 'object' &&20399typeof object.nodeType === 'number' &&20400typeof object.nodeName === 'string'))20401));20402}2040320404module.exports = isNode;2040520406},{}],153:[function(_dereq_,module,exports){20407/**20408* Copyright 2013-2015, Facebook, Inc.20409* All rights reserved.20410*20411* This source code is licensed under the BSD-style license found in the20412* LICENSE file in the root directory of this source tree. An additional grant20413* of patent rights can be found in the PATENTS file in the same directory.20414*20415* @providesModule isTextInputElement20416*/2041720418'use strict';2041920420/**20421* @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary20422*/20423var supportedInputTypes = {20424'color': true,20425'date': true,20426'datetime': true,20427'datetime-local': true,20428'email': true,20429'month': true,20430'number': true,20431'password': true,20432'range': true,20433'search': true,20434'tel': true,20435'text': true,20436'time': true,20437'url': true,20438'week': true20439};2044020441function isTextInputElement(elem) {20442return elem && (20443(elem.nodeName === 'INPUT' && supportedInputTypes[elem.type] || elem.nodeName === 'TEXTAREA')20444);20445}2044620447module.exports = isTextInputElement;2044820449},{}],154:[function(_dereq_,module,exports){20450/**20451* Copyright 2013-2015, Facebook, Inc.20452* All rights reserved.20453*20454* This source code is licensed under the BSD-style license found in the20455* LICENSE file in the root directory of this source tree. An additional grant20456* of patent rights can be found in the PATENTS file in the same directory.20457*20458* @providesModule isTextNode20459* @typechecks20460*/2046120462var isNode = _dereq_(152);2046320464/**20465* @param {*} object The object to check.20466* @return {boolean} Whether or not the object is a DOM text node.20467*/20468function isTextNode(object) {20469return isNode(object) && object.nodeType == 3;20470}2047120472module.exports = isTextNode;2047320474},{"152":152}],155:[function(_dereq_,module,exports){20475/**20476* Copyright 2013-2015, Facebook, Inc.20477* All rights reserved.20478*20479* This source code is licensed under the BSD-style license found in the20480* LICENSE file in the root directory of this source tree. An additional grant20481* of patent rights can be found in the PATENTS file in the same directory.20482*20483* @providesModule joinClasses20484* @typechecks static-only20485*/2048620487'use strict';2048820489/**20490* Combines multiple className strings into one.20491* http://jsperf.com/joinclasses-args-vs-array20492*20493* @param {...?string} classes20494* @return {string}20495*/20496function joinClasses(className/*, ... */) {20497if (!className) {20498className = '';20499}20500var nextClass;20501var argLength = arguments.length;20502if (argLength > 1) {20503for (var ii = 1; ii < argLength; ii++) {20504nextClass = arguments[ii];20505if (nextClass) {20506className = (className ? className + ' ' : '') + nextClass;20507}20508}20509}20510return className;20511}2051220513module.exports = joinClasses;2051420515},{}],156:[function(_dereq_,module,exports){20516/**20517* Copyright 2013-2015, Facebook, Inc.20518* All rights reserved.20519*20520* This source code is licensed under the BSD-style license found in the20521* LICENSE file in the root directory of this source tree. An additional grant20522* of patent rights can be found in the PATENTS file in the same directory.20523*20524* @providesModule keyMirror20525* @typechecks static-only20526*/2052720528'use strict';2052920530var invariant = _dereq_(150);2053120532/**20533* Constructs an enumeration with keys equal to their value.20534*20535* For example:20536*20537* var COLORS = keyMirror({blue: null, red: null});20538* var myColor = COLORS.blue;20539* var isColorValid = !!COLORS[myColor];20540*20541* The last line could not be performed if the values of the generated enum were20542* not equal to their keys.20543*20544* Input: {key1: val1, key2: val2}20545* Output: {key1: key1, key2: key2}20546*20547* @param {object} obj20548* @return {object}20549*/20550var keyMirror = function(obj) {20551var ret = {};20552var key;20553("production" !== "development" ? invariant(20554obj instanceof Object && !Array.isArray(obj),20555'keyMirror(...): Argument must be an object.'20556) : invariant(obj instanceof Object && !Array.isArray(obj)));20557for (key in obj) {20558if (!obj.hasOwnProperty(key)) {20559continue;20560}20561ret[key] = key;20562}20563return ret;20564};2056520566module.exports = keyMirror;2056720568},{"150":150}],157:[function(_dereq_,module,exports){20569/**20570* Copyright 2013-2015, Facebook, Inc.20571* All rights reserved.20572*20573* This source code is licensed under the BSD-style license found in the20574* LICENSE file in the root directory of this source tree. An additional grant20575* of patent rights can be found in the PATENTS file in the same directory.20576*20577* @providesModule keyOf20578*/2057920580/**20581* Allows extraction of a minified key. Let's the build system minify keys20582* without loosing the ability to dynamically use key strings as values20583* themselves. Pass in an object with a single key/val pair and it will return20584* you the string key of that single record. Suppose you want to grab the20585* value for a key 'className' inside of an object. Key/val minification may20586* have aliased that key to be 'xa12'. keyOf({className: null}) will return20587* 'xa12' in that case. Resolve keys you want to use once at startup time, then20588* reuse those resolutions.20589*/20590var keyOf = function(oneKeyObj) {20591var key;20592for (key in oneKeyObj) {20593if (!oneKeyObj.hasOwnProperty(key)) {20594continue;20595}20596return key;20597}20598return null;20599};206002060120602module.exports = keyOf;2060320604},{}],158:[function(_dereq_,module,exports){20605/**20606* Copyright 2013-2015, Facebook, Inc.20607* All rights reserved.20608*20609* This source code is licensed under the BSD-style license found in the20610* LICENSE file in the root directory of this source tree. An additional grant20611* of patent rights can be found in the PATENTS file in the same directory.20612*20613* @providesModule mapObject20614*/2061520616'use strict';2061720618var hasOwnProperty = Object.prototype.hasOwnProperty;2061920620/**20621* Executes the provided `callback` once for each enumerable own property in the20622* object and constructs a new object from the results. The `callback` is20623* invoked with three arguments:20624*20625* - the property value20626* - the property name20627* - the object being traversed20628*20629* Properties that are added after the call to `mapObject` will not be visited20630* by `callback`. If the values of existing properties are changed, the value20631* passed to `callback` will be the value at the time `mapObject` visits them.20632* Properties that are deleted before being visited are not visited.20633*20634* @grep function objectMap()20635* @grep function objMap()20636*20637* @param {?object} object20638* @param {function} callback20639* @param {*} context20640* @return {?object}20641*/20642function mapObject(object, callback, context) {20643if (!object) {20644return null;20645}20646var result = {};20647for (var name in object) {20648if (hasOwnProperty.call(object, name)) {20649result[name] = callback.call(context, object[name], name, object);20650}20651}20652return result;20653}2065420655module.exports = mapObject;2065620657},{}],159:[function(_dereq_,module,exports){20658/**20659* Copyright 2013-2015, Facebook, Inc.20660* All rights reserved.20661*20662* This source code is licensed under the BSD-style license found in the20663* LICENSE file in the root directory of this source tree. An additional grant20664* of patent rights can be found in the PATENTS file in the same directory.20665*20666* @providesModule memoizeStringOnly20667* @typechecks static-only20668*/2066920670'use strict';2067120672/**20673* Memoizes the return value of a function that accepts one string argument.20674*20675* @param {function} callback20676* @return {function}20677*/20678function memoizeStringOnly(callback) {20679var cache = {};20680return function(string) {20681if (!cache.hasOwnProperty(string)) {20682cache[string] = callback.call(this, string);20683}20684return cache[string];20685};20686}2068720688module.exports = memoizeStringOnly;2068920690},{}],160:[function(_dereq_,module,exports){20691/**20692* Copyright 2013-2015, Facebook, Inc.20693* All rights reserved.20694*20695* This source code is licensed under the BSD-style license found in the20696* LICENSE file in the root directory of this source tree. An additional grant20697* of patent rights can be found in the PATENTS file in the same directory.20698*20699* @providesModule onlyChild20700*/20701'use strict';2070220703var ReactElement = _dereq_(63);2070420705var invariant = _dereq_(150);2070620707/**20708* Returns the first child in a collection of children and verifies that there20709* is only one child in the collection. The current implementation of this20710* function assumes that a single child gets passed without a wrapper, but the20711* purpose of this helper function is to abstract away the particular structure20712* of children.20713*20714* @param {?object} children Child collection structure.20715* @return {ReactComponent} The first and only `ReactComponent` contained in the20716* structure.20717*/20718function onlyChild(children) {20719("production" !== "development" ? invariant(20720ReactElement.isValidElement(children),20721'onlyChild must be passed a children with exactly one child.'20722) : invariant(ReactElement.isValidElement(children)));20723return children;20724}2072520726module.exports = onlyChild;2072720728},{"150":150,"63":63}],161:[function(_dereq_,module,exports){20729/**20730* Copyright 2013-2015, Facebook, Inc.20731* All rights reserved.20732*20733* This source code is licensed under the BSD-style license found in the20734* LICENSE file in the root directory of this source tree. An additional grant20735* of patent rights can be found in the PATENTS file in the same directory.20736*20737* @providesModule performance20738* @typechecks20739*/2074020741"use strict";2074220743var ExecutionEnvironment = _dereq_(22);2074420745var performance;2074620747if (ExecutionEnvironment.canUseDOM) {20748performance =20749window.performance ||20750window.msPerformance ||20751window.webkitPerformance;20752}2075320754module.exports = performance || {};2075520756},{"22":22}],162:[function(_dereq_,module,exports){20757/**20758* Copyright 2013-2015, Facebook, Inc.20759* All rights reserved.20760*20761* This source code is licensed under the BSD-style license found in the20762* LICENSE file in the root directory of this source tree. An additional grant20763* of patent rights can be found in the PATENTS file in the same directory.20764*20765* @providesModule performanceNow20766* @typechecks20767*/2076820769var performance = _dereq_(161);2077020771/**20772* Detect if we can use `window.performance.now()` and gracefully fallback to20773* `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now20774* because of Facebook's testing infrastructure.20775*/20776if (!performance || !performance.now) {20777performance = Date;20778}2077920780var performanceNow = performance.now.bind(performance);2078120782module.exports = performanceNow;2078320784},{"161":161}],163:[function(_dereq_,module,exports){20785/**20786* Copyright 2013-2015, Facebook, Inc.20787* All rights reserved.20788*20789* This source code is licensed under the BSD-style license found in the20790* LICENSE file in the root directory of this source tree. An additional grant20791* of patent rights can be found in the PATENTS file in the same directory.20792*20793* @providesModule quoteAttributeValueForBrowser20794*/2079520796'use strict';2079720798var escapeTextContentForBrowser = _dereq_(131);2079920800/**20801* Escapes attribute value to prevent scripting attacks.20802*20803* @param {*} value Value to escape.20804* @return {string} An escaped string.20805*/20806function quoteAttributeValueForBrowser(value) {20807return '"' + escapeTextContentForBrowser(value) + '"';20808}2080920810module.exports = quoteAttributeValueForBrowser;2081120812},{"131":131}],164:[function(_dereq_,module,exports){20813/**20814* Copyright 2013-2015, Facebook, Inc.20815* All rights reserved.20816*20817* This source code is licensed under the BSD-style license found in the20818* LICENSE file in the root directory of this source tree. An additional grant20819* of patent rights can be found in the PATENTS file in the same directory.20820*20821* @providesModule setInnerHTML20822*/2082320824/* globals MSApp */2082520826'use strict';2082720828var ExecutionEnvironment = _dereq_(22);2082920830var WHITESPACE_TEST = /^[ \r\n\t\f]/;20831var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;2083220833/**20834* Set the innerHTML property of a node, ensuring that whitespace is preserved20835* even in IE8.20836*20837* @param {DOMElement} node20838* @param {string} html20839* @internal20840*/20841var setInnerHTML = function(node, html) {20842node.innerHTML = html;20843};2084420845// Win8 apps: Allow all html to be inserted20846if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {20847setInnerHTML = function(node, html) {20848MSApp.execUnsafeLocalFunction(function() {20849node.innerHTML = html;20850});20851};20852}2085320854if (ExecutionEnvironment.canUseDOM) {20855// IE8: When updating a just created node with innerHTML only leading20856// whitespace is removed. When updating an existing node with innerHTML20857// whitespace in root TextNodes is also collapsed.20858// @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html2085920860// Feature detection; only IE8 is known to behave improperly like this.20861var testElement = document.createElement('div');20862testElement.innerHTML = ' ';20863if (testElement.innerHTML === '') {20864setInnerHTML = function(node, html) {20865// Magic theory: IE8 supposedly differentiates between added and updated20866// nodes when processing innerHTML, innerHTML on updated nodes suffers20867// from worse whitespace behavior. Re-adding a node like this triggers20868// the initial and more favorable whitespace behavior.20869// TODO: What to do on a detached node?20870if (node.parentNode) {20871node.parentNode.replaceChild(node, node);20872}2087320874// We also implement a workaround for non-visible tags disappearing into20875// thin air on IE8, this only happens if there is no visible text20876// in-front of the non-visible tags. Piggyback on the whitespace fix20877// and simply check if any non-visible tags appear in the source.20878if (WHITESPACE_TEST.test(html) ||20879html[0] === '<' && NONVISIBLE_TEST.test(html)) {20880// Recover leading whitespace by temporarily prepending any character.20881// \uFEFF has the potential advantage of being zero-width/invisible.20882node.innerHTML = '\uFEFF' + html;2088320884// deleteData leaves an empty `TextNode` which offsets the index of all20885// children. Definitely want to avoid this.20886var textNode = node.firstChild;20887if (textNode.data.length === 1) {20888node.removeChild(textNode);20889} else {20890textNode.deleteData(0, 1);20891}20892} else {20893node.innerHTML = html;20894}20895};20896}20897}2089820899module.exports = setInnerHTML;2090020901},{"22":22}],165:[function(_dereq_,module,exports){20902/**20903* Copyright 2013-2015, Facebook, Inc.20904* All rights reserved.20905*20906* This source code is licensed under the BSD-style license found in the20907* LICENSE file in the root directory of this source tree. An additional grant20908* of patent rights can be found in the PATENTS file in the same directory.20909*20910* @providesModule setTextContent20911*/2091220913'use strict';2091420915var ExecutionEnvironment = _dereq_(22);20916var escapeTextContentForBrowser = _dereq_(131);20917var setInnerHTML = _dereq_(164);2091820919/**20920* Set the textContent property of a node, ensuring that whitespace is preserved20921* even in IE8. innerText is a poor substitute for textContent and, among many20922* issues, inserts <br> instead of the literal newline chars. innerHTML behaves20923* as it should.20924*20925* @param {DOMElement} node20926* @param {string} text20927* @internal20928*/20929var setTextContent = function(node, text) {20930node.textContent = text;20931};2093220933if (ExecutionEnvironment.canUseDOM) {20934if (!('textContent' in document.documentElement)) {20935setTextContent = function(node, text) {20936setInnerHTML(node, escapeTextContentForBrowser(text));20937};20938}20939}2094020941module.exports = setTextContent;2094220943},{"131":131,"164":164,"22":22}],166:[function(_dereq_,module,exports){20944/**20945* Copyright 2013-2015, Facebook, Inc.20946* All rights reserved.20947*20948* This source code is licensed under the BSD-style license found in the20949* LICENSE file in the root directory of this source tree. An additional grant20950* of patent rights can be found in the PATENTS file in the same directory.20951*20952* @providesModule shallowEqual20953*/2095420955'use strict';2095620957/**20958* Performs equality by iterating through keys on an object and returning20959* false when any key has values which are not strictly equal between20960* objA and objB. Returns true when the values of all keys are strictly equal.20961*20962* @return {boolean}20963*/20964function shallowEqual(objA, objB) {20965if (objA === objB) {20966return true;20967}20968var key;20969// Test for A's keys different from B.20970for (key in objA) {20971if (objA.hasOwnProperty(key) &&20972(!objB.hasOwnProperty(key) || objA[key] !== objB[key])) {20973return false;20974}20975}20976// Test for B's keys missing from A.20977for (key in objB) {20978if (objB.hasOwnProperty(key) && !objA.hasOwnProperty(key)) {20979return false;20980}20981}20982return true;20983}2098420985module.exports = shallowEqual;2098620987},{}],167:[function(_dereq_,module,exports){20988/**20989* Copyright 2013-2015, Facebook, Inc.20990* All rights reserved.20991*20992* This source code is licensed under the BSD-style license found in the20993* LICENSE file in the root directory of this source tree. An additional grant20994* of patent rights can be found in the PATENTS file in the same directory.20995*20996* @providesModule shouldUpdateReactComponent20997* @typechecks static-only20998*/2099921000'use strict';2100121002var warning = _dereq_(171);2100321004/**21005* Given a `prevElement` and `nextElement`, determines if the existing21006* instance should be updated as opposed to being destroyed or replaced by a new21007* instance. Both arguments are elements. This ensures that this logic can21008* operate on stateless trees without any backing instance.21009*21010* @param {?object} prevElement21011* @param {?object} nextElement21012* @return {boolean} True if the existing instance should be updated.21013* @protected21014*/21015function shouldUpdateReactComponent(prevElement, nextElement) {21016if (prevElement != null && nextElement != null) {21017var prevType = typeof prevElement;21018var nextType = typeof nextElement;21019if (prevType === 'string' || prevType === 'number') {21020return (nextType === 'string' || nextType === 'number');21021} else {21022if (nextType === 'object' &&21023prevElement.type === nextElement.type &&21024prevElement.key === nextElement.key) {21025var ownersMatch = prevElement._owner === nextElement._owner;21026var prevName = null;21027var nextName = null;21028var nextDisplayName = null;21029if ("production" !== "development") {21030if (!ownersMatch) {21031if (prevElement._owner != null &&21032prevElement._owner.getPublicInstance() != null &&21033prevElement._owner.getPublicInstance().constructor != null) {21034prevName =21035prevElement._owner.getPublicInstance().constructor.displayName;21036}21037if (nextElement._owner != null &&21038nextElement._owner.getPublicInstance() != null &&21039nextElement._owner.getPublicInstance().constructor != null) {21040nextName =21041nextElement._owner.getPublicInstance().constructor.displayName;21042}21043if (nextElement.type != null &&21044nextElement.type.displayName != null) {21045nextDisplayName = nextElement.type.displayName;21046}21047if (nextElement.type != null && typeof nextElement.type === 'string') {21048nextDisplayName = nextElement.type;21049}21050if (typeof nextElement.type !== 'string' ||21051nextElement.type === 'input' ||21052nextElement.type === 'textarea') {21053if ((prevElement._owner != null &&21054prevElement._owner._isOwnerNecessary === false) ||21055(nextElement._owner != null &&21056nextElement._owner._isOwnerNecessary === false)) {21057if (prevElement._owner != null) {21058prevElement._owner._isOwnerNecessary = true;21059}21060if (nextElement._owner != null) {21061nextElement._owner._isOwnerNecessary = true;21062}21063("production" !== "development" ? warning(21064false,21065'<%s /> is being rendered by both %s and %s using the same ' +21066'key (%s) in the same place. Currently, this means that ' +21067'they don\'t preserve state. This behavior should be very ' +21068'rare so we\'re considering deprecating it. Please contact ' +21069'the React team and explain your use case so that we can ' +21070'take that into consideration.',21071nextDisplayName || 'Unknown Component',21072prevName || '[Unknown]',21073nextName || '[Unknown]',21074prevElement.key21075) : null);21076}21077}21078}21079}21080return ownersMatch;21081}21082}21083}21084return false;21085}2108621087module.exports = shouldUpdateReactComponent;2108821089},{"171":171}],168:[function(_dereq_,module,exports){21090/**21091* Copyright 2014-2015, Facebook, Inc.21092* All rights reserved.21093*21094* This source code is licensed under the BSD-style license found in the21095* LICENSE file in the root directory of this source tree. An additional grant21096* of patent rights can be found in the PATENTS file in the same directory.21097*21098* @providesModule toArray21099* @typechecks21100*/2110121102var invariant = _dereq_(150);2110321104/**21105* Convert array-like objects to arrays.21106*21107* This API assumes the caller knows the contents of the data type. For less21108* well defined inputs use createArrayFromMixed.21109*21110* @param {object|function|filelist} obj21111* @return {array}21112*/21113function toArray(obj) {21114var length = obj.length;2111521116// Some browse builtin objects can report typeof 'function' (e.g. NodeList in21117// old versions of Safari).21118("production" !== "development" ? invariant(21119!Array.isArray(obj) &&21120(typeof obj === 'object' || typeof obj === 'function'),21121'toArray: Array-like object expected'21122) : invariant(!Array.isArray(obj) &&21123(typeof obj === 'object' || typeof obj === 'function')));2112421125("production" !== "development" ? invariant(21126typeof length === 'number',21127'toArray: Object needs a length property'21128) : invariant(typeof length === 'number'));2112921130("production" !== "development" ? invariant(21131length === 0 ||21132(length - 1) in obj,21133'toArray: Object should have keys for indices'21134) : invariant(length === 0 ||21135(length - 1) in obj));2113621137// Old IE doesn't give collections access to hasOwnProperty. Assume inputs21138// without method will throw during the slice call and skip straight to the21139// fallback.21140if (obj.hasOwnProperty) {21141try {21142return Array.prototype.slice.call(obj);21143} catch (e) {21144// IE < 9 does not support Array#slice on collections objects21145}21146}2114721148// Fall back to copying key by key. This assumes all keys have a value,21149// so will not preserve sparsely populated inputs.21150var ret = Array(length);21151for (var ii = 0; ii < length; ii++) {21152ret[ii] = obj[ii];21153}21154return ret;21155}2115621157module.exports = toArray;2115821159},{"150":150}],169:[function(_dereq_,module,exports){21160/**21161* Copyright 2013-2015, Facebook, Inc.21162* All rights reserved.21163*21164* This source code is licensed under the BSD-style license found in the21165* LICENSE file in the root directory of this source tree. An additional grant21166* of patent rights can be found in the PATENTS file in the same directory.21167*21168* @providesModule traverseAllChildren21169*/2117021171'use strict';2117221173var ReactElement = _dereq_(63);21174var ReactFragment = _dereq_(69);21175var ReactInstanceHandles = _dereq_(72);2117621177var getIteratorFn = _dereq_(141);21178var invariant = _dereq_(150);21179var warning = _dereq_(171);2118021181var SEPARATOR = ReactInstanceHandles.SEPARATOR;21182var SUBSEPARATOR = ':';2118321184/**21185* TODO: Test that a single child and an array with one item have the same key21186* pattern.21187*/2118821189var userProvidedKeyEscaperLookup = {21190'=': '=0',21191'.': '=1',21192':': '=2'21193};2119421195var userProvidedKeyEscapeRegex = /[=.:]/g;2119621197var didWarnAboutMaps = false;2119821199function userProvidedKeyEscaper(match) {21200return userProvidedKeyEscaperLookup[match];21201}2120221203/**21204* Generate a key string that identifies a component within a set.21205*21206* @param {*} component A component that could contain a manual key.21207* @param {number} index Index that is used if a manual key is not provided.21208* @return {string}21209*/21210function getComponentKey(component, index) {21211if (component && component.key != null) {21212// Explicit key21213return wrapUserProvidedKey(component.key);21214}21215// Implicit key determined by the index in the set21216return index.toString(36);21217}2121821219/**21220* Escape a component key so that it is safe to use in a reactid.21221*21222* @param {*} key Component key to be escaped.21223* @return {string} An escaped string.21224*/21225function escapeUserProvidedKey(text) {21226return ('' + text).replace(21227userProvidedKeyEscapeRegex,21228userProvidedKeyEscaper21229);21230}2123121232/**21233* Wrap a `key` value explicitly provided by the user to distinguish it from21234* implicitly-generated keys generated by a component's index in its parent.21235*21236* @param {string} key Value of a user-provided `key` attribute21237* @return {string}21238*/21239function wrapUserProvidedKey(key) {21240return '$' + escapeUserProvidedKey(key);21241}2124221243/**21244* @param {?*} children Children tree container.21245* @param {!string} nameSoFar Name of the key path so far.21246* @param {!number} indexSoFar Number of children encountered until this point.21247* @param {!function} callback Callback to invoke with each child found.21248* @param {?*} traverseContext Used to pass information throughout the traversal21249* process.21250* @return {!number} The number of children in this subtree.21251*/21252function traverseAllChildrenImpl(21253children,21254nameSoFar,21255indexSoFar,21256callback,21257traverseContext21258) {21259var type = typeof children;2126021261if (type === 'undefined' || type === 'boolean') {21262// All of the above are perceived as null.21263children = null;21264}2126521266if (children === null ||21267type === 'string' ||21268type === 'number' ||21269ReactElement.isValidElement(children)) {21270callback(21271traverseContext,21272children,21273// If it's the only child, treat the name as if it was wrapped in an array21274// so that it's consistent if the number of children grows.21275nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar,21276indexSoFar21277);21278return 1;21279}2128021281var child, nextName, nextIndex;21282var subtreeCount = 0; // Count of children found in the current subtree.2128321284if (Array.isArray(children)) {21285for (var i = 0; i < children.length; i++) {21286child = children[i];21287nextName = (21288(nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +21289getComponentKey(child, i)21290);21291nextIndex = indexSoFar + subtreeCount;21292subtreeCount += traverseAllChildrenImpl(21293child,21294nextName,21295nextIndex,21296callback,21297traverseContext21298);21299}21300} else {21301var iteratorFn = getIteratorFn(children);21302if (iteratorFn) {21303var iterator = iteratorFn.call(children);21304var step;21305if (iteratorFn !== children.entries) {21306var ii = 0;21307while (!(step = iterator.next()).done) {21308child = step.value;21309nextName = (21310(nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +21311getComponentKey(child, ii++)21312);21313nextIndex = indexSoFar + subtreeCount;21314subtreeCount += traverseAllChildrenImpl(21315child,21316nextName,21317nextIndex,21318callback,21319traverseContext21320);21321}21322} else {21323if ("production" !== "development") {21324("production" !== "development" ? warning(21325didWarnAboutMaps,21326'Using Maps as children is not yet fully supported. It is an ' +21327'experimental feature that might be removed. Convert it to a ' +21328'sequence / iterable of keyed ReactElements instead.'21329) : null);21330didWarnAboutMaps = true;21331}21332// Iterator will provide entry [k,v] tuples rather than values.21333while (!(step = iterator.next()).done) {21334var entry = step.value;21335if (entry) {21336child = entry[1];21337nextName = (21338(nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +21339wrapUserProvidedKey(entry[0]) + SUBSEPARATOR +21340getComponentKey(child, 0)21341);21342nextIndex = indexSoFar + subtreeCount;21343subtreeCount += traverseAllChildrenImpl(21344child,21345nextName,21346nextIndex,21347callback,21348traverseContext21349);21350}21351}21352}21353} else if (type === 'object') {21354("production" !== "development" ? invariant(21355children.nodeType !== 1,21356'traverseAllChildren(...): Encountered an invalid child; DOM ' +21357'elements are not valid children of React components.'21358) : invariant(children.nodeType !== 1));21359var fragment = ReactFragment.extract(children);21360for (var key in fragment) {21361if (fragment.hasOwnProperty(key)) {21362child = fragment[key];21363nextName = (21364(nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +21365wrapUserProvidedKey(key) + SUBSEPARATOR +21366getComponentKey(child, 0)21367);21368nextIndex = indexSoFar + subtreeCount;21369subtreeCount += traverseAllChildrenImpl(21370child,21371nextName,21372nextIndex,21373callback,21374traverseContext21375);21376}21377}21378}21379}2138021381return subtreeCount;21382}2138321384/**21385* Traverses children that are typically specified as `props.children`, but21386* might also be specified through attributes:21387*21388* - `traverseAllChildren(this.props.children, ...)`21389* - `traverseAllChildren(this.props.leftPanelChildren, ...)`21390*21391* The `traverseContext` is an optional argument that is passed through the21392* entire traversal. It can be used to store accumulations or anything else that21393* the callback might find relevant.21394*21395* @param {?*} children Children tree object.21396* @param {!function} callback To invoke upon traversing each child.21397* @param {?*} traverseContext Context for traversal.21398* @return {!number} The number of children in this subtree.21399*/21400function traverseAllChildren(children, callback, traverseContext) {21401if (children == null) {21402return 0;21403}2140421405return traverseAllChildrenImpl(children, '', 0, callback, traverseContext);21406}2140721408module.exports = traverseAllChildren;2140921410},{"141":141,"150":150,"171":171,"63":63,"69":69,"72":72}],170:[function(_dereq_,module,exports){21411/**21412* Copyright 2013-2015, Facebook, Inc.21413* All rights reserved.21414*21415* This source code is licensed under the BSD-style license found in the21416* LICENSE file in the root directory of this source tree. An additional grant21417* of patent rights can be found in the PATENTS file in the same directory.21418*21419* @providesModule update21420*/2142121422/* global hasOwnProperty:true */2142321424'use strict';2142521426var assign = _dereq_(29);21427var keyOf = _dereq_(157);21428var invariant = _dereq_(150);21429var hasOwnProperty = {}.hasOwnProperty;2143021431function shallowCopy(x) {21432if (Array.isArray(x)) {21433return x.concat();21434} else if (x && typeof x === 'object') {21435return assign(new x.constructor(), x);21436} else {21437return x;21438}21439}2144021441var COMMAND_PUSH = keyOf({$push: null});21442var COMMAND_UNSHIFT = keyOf({$unshift: null});21443var COMMAND_SPLICE = keyOf({$splice: null});21444var COMMAND_SET = keyOf({$set: null});21445var COMMAND_MERGE = keyOf({$merge: null});21446var COMMAND_APPLY = keyOf({$apply: null});2144721448var ALL_COMMANDS_LIST = [21449COMMAND_PUSH,21450COMMAND_UNSHIFT,21451COMMAND_SPLICE,21452COMMAND_SET,21453COMMAND_MERGE,21454COMMAND_APPLY21455];2145621457var ALL_COMMANDS_SET = {};2145821459ALL_COMMANDS_LIST.forEach(function(command) {21460ALL_COMMANDS_SET[command] = true;21461});2146221463function invariantArrayCase(value, spec, command) {21464("production" !== "development" ? invariant(21465Array.isArray(value),21466'update(): expected target of %s to be an array; got %s.',21467command,21468value21469) : invariant(Array.isArray(value)));21470var specValue = spec[command];21471("production" !== "development" ? invariant(21472Array.isArray(specValue),21473'update(): expected spec of %s to be an array; got %s. ' +21474'Did you forget to wrap your parameter in an array?',21475command,21476specValue21477) : invariant(Array.isArray(specValue)));21478}2147921480function update(value, spec) {21481("production" !== "development" ? invariant(21482typeof spec === 'object',21483'update(): You provided a key path to update() that did not contain one ' +21484'of %s. Did you forget to include {%s: ...}?',21485ALL_COMMANDS_LIST.join(', '),21486COMMAND_SET21487) : invariant(typeof spec === 'object'));2148821489if (hasOwnProperty.call(spec, COMMAND_SET)) {21490("production" !== "development" ? invariant(21491Object.keys(spec).length === 1,21492'Cannot have more than one key in an object with %s',21493COMMAND_SET21494) : invariant(Object.keys(spec).length === 1));2149521496return spec[COMMAND_SET];21497}2149821499var nextValue = shallowCopy(value);2150021501if (hasOwnProperty.call(spec, COMMAND_MERGE)) {21502var mergeObj = spec[COMMAND_MERGE];21503("production" !== "development" ? invariant(21504mergeObj && typeof mergeObj === 'object',21505'update(): %s expects a spec of type \'object\'; got %s',21506COMMAND_MERGE,21507mergeObj21508) : invariant(mergeObj && typeof mergeObj === 'object'));21509("production" !== "development" ? invariant(21510nextValue && typeof nextValue === 'object',21511'update(): %s expects a target of type \'object\'; got %s',21512COMMAND_MERGE,21513nextValue21514) : invariant(nextValue && typeof nextValue === 'object'));21515assign(nextValue, spec[COMMAND_MERGE]);21516}2151721518if (hasOwnProperty.call(spec, COMMAND_PUSH)) {21519invariantArrayCase(value, spec, COMMAND_PUSH);21520spec[COMMAND_PUSH].forEach(function(item) {21521nextValue.push(item);21522});21523}2152421525if (hasOwnProperty.call(spec, COMMAND_UNSHIFT)) {21526invariantArrayCase(value, spec, COMMAND_UNSHIFT);21527spec[COMMAND_UNSHIFT].forEach(function(item) {21528nextValue.unshift(item);21529});21530}2153121532if (hasOwnProperty.call(spec, COMMAND_SPLICE)) {21533("production" !== "development" ? invariant(21534Array.isArray(value),21535'Expected %s target to be an array; got %s',21536COMMAND_SPLICE,21537value21538) : invariant(Array.isArray(value)));21539("production" !== "development" ? invariant(21540Array.isArray(spec[COMMAND_SPLICE]),21541'update(): expected spec of %s to be an array of arrays; got %s. ' +21542'Did you forget to wrap your parameters in an array?',21543COMMAND_SPLICE,21544spec[COMMAND_SPLICE]21545) : invariant(Array.isArray(spec[COMMAND_SPLICE])));21546spec[COMMAND_SPLICE].forEach(function(args) {21547("production" !== "development" ? invariant(21548Array.isArray(args),21549'update(): expected spec of %s to be an array of arrays; got %s. ' +21550'Did you forget to wrap your parameters in an array?',21551COMMAND_SPLICE,21552spec[COMMAND_SPLICE]21553) : invariant(Array.isArray(args)));21554nextValue.splice.apply(nextValue, args);21555});21556}2155721558if (hasOwnProperty.call(spec, COMMAND_APPLY)) {21559("production" !== "development" ? invariant(21560typeof spec[COMMAND_APPLY] === 'function',21561'update(): expected spec of %s to be a function; got %s.',21562COMMAND_APPLY,21563spec[COMMAND_APPLY]21564) : invariant(typeof spec[COMMAND_APPLY] === 'function'));21565nextValue = spec[COMMAND_APPLY](nextValue);21566}2156721568for (var k in spec) {21569if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) {21570nextValue[k] = update(value[k], spec[k]);21571}21572}2157321574return nextValue;21575}2157621577module.exports = update;2157821579},{"150":150,"157":157,"29":29}],171:[function(_dereq_,module,exports){21580/**21581* Copyright 2014-2015, Facebook, Inc.21582* All rights reserved.21583*21584* This source code is licensed under the BSD-style license found in the21585* LICENSE file in the root directory of this source tree. An additional grant21586* of patent rights can be found in the PATENTS file in the same directory.21587*21588* @providesModule warning21589*/2159021591"use strict";2159221593var emptyFunction = _dereq_(129);2159421595/**21596* Similar to invariant but only logs a warning if the condition is not met.21597* This can be used to log issues in development environments in critical21598* paths. Removing the logging code for production environments will keep the21599* same logic and follow the same code paths.21600*/2160121602var warning = emptyFunction;2160321604if ("production" !== "development") {21605warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]);21606if (format === undefined) {21607throw new Error(21608'`warning(condition, format, ...args)` requires a warning ' +21609'message argument'21610);21611}2161221613if (format.length < 10 || /^[s\W]*$/.test(format)) {21614throw new Error(21615'The warning format should be able to uniquely identify this ' +21616'warning. Please, use a more descriptive format than: ' + format21617);21618}2161921620if (format.indexOf('Failed Composite propType: ') === 0) {21621return; // Ignore CompositeComponent proptype check.21622}2162321624if (!condition) {21625var argIndex = 0;21626var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];});21627console.warn(message);21628try {21629// --- Welcome to debugging React ---21630// This error was thrown as a convenience so that you can use this stack21631// to find the callsite that caused this warning to fire.21632throw new Error(message);21633} catch(x) {}21634}21635};21636}2163721638module.exports = warning;2163921640},{"129":129}]},{},[1])(1)21641});2164221643