does.
+ contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
+ }
+ return contentKey;
+ }
+
+ module.exports = getTextContentAccessor;
+
+/***/ }),
+/* 61 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+ 'use strict';
+
+ var SyntheticEvent = __webpack_require__(62);
+
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
+ */
+ var CompositionEventInterface = {
+ data: null
+ };
+
+ /**
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
+ * @param {string} dispatchMarker Marker identifying the event target.
+ * @param {object} nativeEvent Native browser event.
+ * @extends {SyntheticUIEvent}
+ */
+ function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
+ return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
+ }
+
+ SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
+
+ module.exports = SyntheticCompositionEvent;
+
+/***/ }),
+/* 62 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+ 'use strict';
+
+ var _assign = __webpack_require__(5);
+
+ var PooledClass = __webpack_require__(59);
+
+ var emptyFunction = __webpack_require__(10);
+ var warning = __webpack_require__(9);
+
+ var didWarnForAddedNewProperty = false;
+ var isProxySupported = typeof Proxy === 'function';
+
+ var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
+
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+ var EventInterface = {
+ type: null,
+ target: null,
+ // currentTarget is set when dispatching; no use in copying it here
+ currentTarget: emptyFunction.thatReturnsNull,
+ eventPhase: null,
+ bubbles: null,
+ cancelable: null,
+ timeStamp: function (event) {
+ return event.timeStamp || Date.now();
+ },
+ defaultPrevented: null,
+ isTrusted: null
+ };
+
+ /**
+ * Synthetic events are dispatched by event plugins, typically in response to a
+ * top-level event delegation handler.
+ *
+ * These systems should generally use pooling to reduce the frequency of garbage
+ * collection. The system should check `isPersistent` to determine whether the
+ * event should be released into the pool after being dispatched. Users that
+ * need a persisted event should invoke `persist`.
+ *
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
+ * DOM interface; custom application-specific events can also subclass this.
+ *
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
+ * @param {*} targetInst Marker identifying the event target.
+ * @param {object} nativeEvent Native browser event.
+ * @param {DOMEventTarget} nativeEventTarget Target node.
+ */
+ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
+ if (process.env.NODE_ENV !== 'production') {
+ // these have a getter/setter for warnings
+ delete this.nativeEvent;
+ delete this.preventDefault;
+ delete this.stopPropagation;
+ }
+
+ this.dispatchConfig = dispatchConfig;
+ this._targetInst = targetInst;
+ this.nativeEvent = nativeEvent;
+
+ var Interface = this.constructor.Interface;
+ for (var propName in Interface) {
+ if (!Interface.hasOwnProperty(propName)) {
+ continue;
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ delete this[propName]; // this has a getter/setter for warnings
+ }
+ var normalize = Interface[propName];
+ if (normalize) {
+ this[propName] = normalize(nativeEvent);
+ } else {
+ if (propName === 'target') {
+ this.target = nativeEventTarget;
+ } else {
+ this[propName] = nativeEvent[propName];
+ }
+ }
+ }
+
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
+ if (defaultPrevented) {
+ this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
+ } else {
+ this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
+ }
+ this.isPropagationStopped = emptyFunction.thatReturnsFalse;
+ return this;
+ }
+
+ _assign(SyntheticEvent.prototype, {
+ preventDefault: function () {
+ this.defaultPrevented = true;
+ var event = this.nativeEvent;
+ if (!event) {
+ return;
+ }
+
+ if (event.preventDefault) {
+ event.preventDefault();
+ // eslint-disable-next-line valid-typeof
+ } else if (typeof event.returnValue !== 'unknown') {
+ event.returnValue = false;
+ }
+ this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
+ },
+
+ stopPropagation: function () {
+ var event = this.nativeEvent;
+ if (!event) {
+ return;
+ }
+
+ if (event.stopPropagation) {
+ event.stopPropagation();
+ // eslint-disable-next-line valid-typeof
+ } else if (typeof event.cancelBubble !== 'unknown') {
+ // The ChangeEventPlugin registers a "propertychange" event for
+ // IE. This event does not support bubbling or cancelling, and
+ // any references to cancelBubble throw "Member not found". A
+ // typeof check of "unknown" circumvents this issue (and is also
+ // IE specific).
+ event.cancelBubble = true;
+ }
+
+ this.isPropagationStopped = emptyFunction.thatReturnsTrue;
+ },
+
+ /**
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
+ * them back into the pool. This allows a way to hold onto a reference that
+ * won't be added back into the pool.
+ */
+ persist: function () {
+ this.isPersistent = emptyFunction.thatReturnsTrue;
+ },
+
+ /**
+ * Checks if this event should be released back into the pool.
+ *
+ * @return {boolean} True if this should not be released, false otherwise.
+ */
+ isPersistent: emptyFunction.thatReturnsFalse,
+
+ /**
+ * `PooledClass` looks for `destructor` on each instance it releases.
+ */
+ destructor: function () {
+ var Interface = this.constructor.Interface;
+ for (var propName in Interface) {
+ if (process.env.NODE_ENV !== 'production') {
+ Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
+ } else {
+ this[propName] = null;
+ }
+ }
+ for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
+ this[shouldBeReleasedProperties[i]] = null;
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
+ Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
+ Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
+ }
+ }
+ });
+
+ SyntheticEvent.Interface = EventInterface;
+
+ /**
+ * Helper to reduce boilerplate when creating subclasses.
+ *
+ * @param {function} Class
+ * @param {?object} Interface
+ */
+ SyntheticEvent.augmentClass = function (Class, Interface) {
+ var Super = this;
+
+ var E = function () {};
+ E.prototype = Super.prototype;
+ var prototype = new E();
+
+ _assign(prototype, Class.prototype);
+ Class.prototype = prototype;
+ Class.prototype.constructor = Class;
+
+ Class.Interface = _assign({}, Super.Interface, Interface);
+ Class.augmentClass = Super.augmentClass;
+
+ PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
+ };
+
+ /** Proxying after everything set on SyntheticEvent
+ * to resolve Proxy issue on some WebKit browsers
+ * in which some Event properties are set to undefined (GH#10010)
+ */
+ if (process.env.NODE_ENV !== 'production') {
+ if (isProxySupported) {
+ /*eslint-disable no-func-assign */
+ SyntheticEvent = new Proxy(SyntheticEvent, {
+ construct: function (target, args) {
+ return this.apply(target, Object.create(target.prototype), args);
+ },
+ apply: function (constructor, that, args) {
+ return new Proxy(constructor.apply(that, args), {
+ set: function (target, prop, value) {
+ if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
+ process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
+ didWarnForAddedNewProperty = true;
+ }
+ target[prop] = value;
+ return true;
+ }
+ });
+ }
+ });
+ /*eslint-enable no-func-assign */
+ }
+ }
+
+ PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
+
+ module.exports = SyntheticEvent;
+
+ /**
+ * Helper to nullify syntheticEvent instance properties when destructing
+ *
+ * @param {object} SyntheticEvent
+ * @param {String} propName
+ * @return {object} defineProperty object
+ */
+ function getPooledWarningPropertyDefinition(propName, getVal) {
+ var isFunction = typeof getVal === 'function';
+ return {
+ configurable: true,
+ set: set,
+ get: get
+ };
+
+ function set(val) {
+ var action = isFunction ? 'setting the method' : 'setting the property';
+ warn(action, 'This is effectively a no-op');
+ return val;
+ }
+
+ function get() {
+ var action = isFunction ? 'accessing the method' : 'accessing the property';
+ var result = isFunction ? 'This is a no-op function' : 'This is set to null';
+ warn(action, result);
+ return getVal;
+ }
+
+ function warn(action, result) {
+ var warningCondition = false;
+ process.env.NODE_ENV !== 'production' ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
+ }
+ }
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
+
+/***/ }),
+/* 63 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+ 'use strict';
+
+ var SyntheticEvent = __webpack_require__(62);
+
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
+ * /#events-inputevents
+ */
+ var InputEventInterface = {
+ data: null
+ };
+
+ /**
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
+ * @param {string} dispatchMarker Marker identifying the event target.
+ * @param {object} nativeEvent Native browser event.
+ * @extends {SyntheticUIEvent}
+ */
+ function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
+ return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
+ }
+
+ SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
+
+ module.exports = SyntheticInputEvent;
+
+/***/ }),
+/* 64 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+ 'use strict';
+
+ var EventPluginHub = __webpack_require__(51);
+ var EventPropagators = __webpack_require__(50);
+ var ExecutionEnvironment = __webpack_require__(57);
+ var ReactDOMComponentTree = __webpack_require__(43);
+ var ReactUpdates = __webpack_require__(65);
+ var SyntheticEvent = __webpack_require__(62);
+
+ var inputValueTracking = __webpack_require__(78);
+ var getEventTarget = __webpack_require__(79);
+ var isEventSupported = __webpack_require__(80);
+ var isTextInputElement = __webpack_require__(81);
+
+ var eventTypes = {
+ change: {
+ phasedRegistrationNames: {
+ bubbled: 'onChange',
+ captured: 'onChangeCapture'
+ },
+ dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
+ }
+ };
+
+ function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
+ var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
+ event.type = 'change';
+ EventPropagators.accumulateTwoPhaseDispatches(event);
+ return event;
+ }
+ /**
+ * For IE shims
+ */
+ var activeElement = null;
+ var activeElementInst = null;
+
+ /**
+ * SECTION: handle `change` event
+ */
+ function shouldUseChangeEvent(elem) {
+ var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
+ return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
+ }
+
+ var doesChangeEventBubble = false;
+ if (ExecutionEnvironment.canUseDOM) {
+ // See `handleChange` comment below
+ doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
+ }
+
+ function manualDispatchChangeEvent(nativeEvent) {
+ var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
+
+ // If change and propertychange bubbled, we'd just bind to it like all the
+ // other events and have it go through ReactBrowserEventEmitter. Since it
+ // doesn't, we manually listen for the events and so we have to enqueue and
+ // process the abstract event manually.
+ //
+ // Batching is necessary here in order to ensure that all event handlers run
+ // before the next rerender (including event handlers attached to ancestor
+ // elements instead of directly on the input). Without this, controlled
+ // components don't work properly in conjunction with event bubbling because
+ // the component is rerendered and the value reverted before all the event
+ // handlers can run. See https://github.com/facebook/react/issues/708.
+ ReactUpdates.batchedUpdates(runEventInBatch, event);
+ }
+
+ function runEventInBatch(event) {
+ EventPluginHub.enqueueEvents(event);
+ EventPluginHub.processEventQueue(false);
+ }
+
+ function startWatchingForChangeEventIE8(target, targetInst) {
+ activeElement = target;
+ activeElementInst = targetInst;
+ activeElement.attachEvent('onchange', manualDispatchChangeEvent);
+ }
+
+ function stopWatchingForChangeEventIE8() {
+ if (!activeElement) {
+ return;
+ }
+ activeElement.detachEvent('onchange', manualDispatchChangeEvent);
+ activeElement = null;
+ activeElementInst = null;
+ }
+
+ function getInstIfValueChanged(targetInst, nativeEvent) {
+ var updated = inputValueTracking.updateValueIfChanged(targetInst);
+ var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
+
+ if (updated || simulated) {
+ return targetInst;
+ }
+ }
+
+ function getTargetInstForChangeEvent(topLevelType, targetInst) {
+ if (topLevelType === 'topChange') {
+ return targetInst;
+ }
+ }
+
+ function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
+ if (topLevelType === 'topFocus') {
+ // stopWatching() should be a noop here but we call it just in case we
+ // missed a blur event somehow.
+ stopWatchingForChangeEventIE8();
+ startWatchingForChangeEventIE8(target, targetInst);
+ } else if (topLevelType === 'topBlur') {
+ stopWatchingForChangeEventIE8();
+ }
+ }
+
+ /**
+ * SECTION: handle `input` event
+ */
+ var isInputEventSupported = false;
+ if (ExecutionEnvironment.canUseDOM) {
+ // IE9 claims to support the input event but fails to trigger it when
+ // deleting text, so we ignore its input events.
+
+ isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
+ }
+
+ /**
+ * (For IE <=9) Starts tracking propertychange events on the passed-in element
+ * and override the value property so that we can distinguish user events from
+ * value changes in JS.
+ */
+ function startWatchingForValueChange(target, targetInst) {
+ activeElement = target;
+ activeElementInst = targetInst;
+ activeElement.attachEvent('onpropertychange', handlePropertyChange);
+ }
+
+ /**
+ * (For IE <=9) Removes the event listeners from the currently-tracked element,
+ * if any exists.
+ */
+ function stopWatchingForValueChange() {
+ if (!activeElement) {
+ return;
+ }
+ activeElement.detachEvent('onpropertychange', handlePropertyChange);
+
+ activeElement = null;
+ activeElementInst = null;
+ }
+
+ /**
+ * (For IE <=9) Handles a propertychange event, sending a `change` event if
+ * the value of the active element has changed.
+ */
+ function handlePropertyChange(nativeEvent) {
+ if (nativeEvent.propertyName !== 'value') {
+ return;
+ }
+ if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
+ manualDispatchChangeEvent(nativeEvent);
+ }
+ }
+
+ function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
+ if (topLevelType === 'topFocus') {
+ // In IE8, we can capture almost all .value changes by adding a
+ // propertychange handler and looking for events with propertyName
+ // equal to 'value'
+ // In IE9, propertychange fires for most input events but is buggy and
+ // doesn't fire when text is deleted, but conveniently, selectionchange
+ // appears to fire in all of the remaining cases so we catch those and
+ // forward the event if the value has changed
+ // In either case, we don't want to call the event handler if the value
+ // is changed from JS so we redefine a setter for `.value` that updates
+ // our activeElementValue variable, allowing us to ignore those changes
+ //
+ // stopWatching() should be a noop here but we call it just in case we
+ // missed a blur event somehow.
+ stopWatchingForValueChange();
+ startWatchingForValueChange(target, targetInst);
+ } else if (topLevelType === 'topBlur') {
+ stopWatchingForValueChange();
+ }
+ }
+
+ // For IE8 and IE9.
+ function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
+ if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
+ // On the selectionchange event, the target is just document which isn't
+ // helpful for us so just check activeElement instead.
+ //
+ // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
+ // propertychange on the first input event after setting `value` from a
+ // script and fires only keydown, keypress, keyup. Catching keyup usually
+ // gets it and catching keydown lets us fire an event for the first
+ // keystroke if user does a key repeat (it'll be a little delayed: right
+ // before the second keystroke). Other input methods (e.g., paste) seem to
+ // fire selectionchange normally.
+ return getInstIfValueChanged(activeElementInst, nativeEvent);
+ }
+ }
+
+ /**
+ * SECTION: handle `click` event
+ */
+ function shouldUseClickEvent(elem) {
+ // Use the `click` event to detect changes to checkbox and radio inputs.
+ // This approach works across all browsers, whereas `change` does not fire
+ // until `blur` in IE8.
+ var nodeName = elem.nodeName;
+ return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
+ }
+
+ function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
+ if (topLevelType === 'topClick') {
+ return getInstIfValueChanged(targetInst, nativeEvent);
+ }
+ }
+
+ function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
+ if (topLevelType === 'topInput' || topLevelType === 'topChange') {
+ return getInstIfValueChanged(targetInst, nativeEvent);
+ }
+ }
+
+ function handleControlledInputBlur(inst, node) {
+ // TODO: In IE, inst is occasionally null. Why?
+ if (inst == null) {
+ return;
+ }
+
+ // Fiber and ReactDOM keep wrapper state in separate places
+ var state = inst._wrapperState || node._wrapperState;
+
+ if (!state || !state.controlled || node.type !== 'number') {
+ return;
+ }
+
+ // If controlled, assign the value attribute to the current value on blur
+ var value = '' + node.value;
+ if (node.getAttribute('value') !== value) {
+ node.setAttribute('value', value);
+ }
+ }
+
+ /**
+ * This plugin creates an `onChange` event that normalizes change events
+ * across form elements. This event fires at a time when it's possible to
+ * change the element's value without seeing a flicker.
+ *
+ * Supported elements are:
+ * - input (see `isTextInputElement`)
+ * - textarea
+ * - select
+ */
+ var ChangeEventPlugin = {
+ eventTypes: eventTypes,
+
+ _allowSimulatedPassThrough: true,
+ _isInputEventSupported: isInputEventSupported,
+
+ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
+ var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
+
+ var getTargetInstFunc, handleEventFunc;
+ if (shouldUseChangeEvent(targetNode)) {
+ if (doesChangeEventBubble) {
+ getTargetInstFunc = getTargetInstForChangeEvent;
+ } else {
+ handleEventFunc = handleEventsForChangeEventIE8;
+ }
+ } else if (isTextInputElement(targetNode)) {
+ if (isInputEventSupported) {
+ getTargetInstFunc = getTargetInstForInputOrChangeEvent;
+ } else {
+ getTargetInstFunc = getTargetInstForInputEventPolyfill;
+ handleEventFunc = handleEventsForInputEventPolyfill;
+ }
+ } else if (shouldUseClickEvent(targetNode)) {
+ getTargetInstFunc = getTargetInstForClickEvent;
+ }
+
+ if (getTargetInstFunc) {
+ var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
+ if (inst) {
+ var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
+ return event;
+ }
+ }
+
+ if (handleEventFunc) {
+ handleEventFunc(topLevelType, targetNode, targetInst);
+ }
+
+ // When blurring, set the value attribute for number inputs
+ if (topLevelType === 'topBlur') {
+ handleControlledInputBlur(targetInst, targetNode);
+ }
+ }
+ };
+
+ module.exports = ChangeEventPlugin;
+
+/***/ }),
+/* 65 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+ 'use strict';
+
+ var _prodInvariant = __webpack_require__(44),
+ _assign = __webpack_require__(5);
+
+ var CallbackQueue = __webpack_require__(66);
+ var PooledClass = __webpack_require__(59);
+ var ReactFeatureFlags = __webpack_require__(67);
+ var ReactReconciler = __webpack_require__(68);
+ var Transaction = __webpack_require__(77);
+
+ var invariant = __webpack_require__(13);
+
+ var dirtyComponents = [];
+ var updateBatchNumber = 0;
+ var asapCallbackQueue = CallbackQueue.getPooled();
+ var asapEnqueued = false;
+
+ var batchingStrategy = null;
+
+ function ensureInjected() {
+ !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
+ }
+
+ var NESTED_UPDATES = {
+ initialize: function () {
+ this.dirtyComponentsLength = dirtyComponents.length;
+ },
+ close: function () {
+ if (this.dirtyComponentsLength !== dirtyComponents.length) {
+ // Additional updates were enqueued by componentDidUpdate handlers or
+ // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
+ // these new updates so that if A's componentDidUpdate calls setState on
+ // B, B will update before the callback A's updater provided when calling
+ // setState.
+ dirtyComponents.splice(0, this.dirtyComponentsLength);
+ flushBatchedUpdates();
+ } else {
+ dirtyComponents.length = 0;
+ }
+ }
+ };
+
+ var UPDATE_QUEUEING = {
+ initialize: function () {
+ this.callbackQueue.reset();
+ },
+ close: function () {
+ this.callbackQueue.notifyAll();
+ }
+ };
+
+ var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
+
+ function ReactUpdatesFlushTransaction() {
+ this.reinitializeTransaction();
+ this.dirtyComponentsLength = null;
+ this.callbackQueue = CallbackQueue.getPooled();
+ this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
+ /* useCreateElement */true);
+ }
+
+ _assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
+ getTransactionWrappers: function () {
+ return TRANSACTION_WRAPPERS;
+ },
+
+ destructor: function () {
+ this.dirtyComponentsLength = null;
+ CallbackQueue.release(this.callbackQueue);
+ this.callbackQueue = null;
+ ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
+ this.reconcileTransaction = null;
+ },
+
+ perform: function (method, scope, a) {
+ // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
+ // with this transaction's wrappers around it.
+ return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
+ }
+ });
+
+ PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
+
+ function batchedUpdates(callback, a, b, c, d, e) {
+ ensureInjected();
+ return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
+ }
+
+ /**
+ * Array comparator for ReactComponents by mount ordering.
+ *
+ * @param {ReactComponent} c1 first component you're comparing
+ * @param {ReactComponent} c2 second component you're comparing
+ * @return {number} Return value usable by Array.prototype.sort().
+ */
+ function mountOrderComparator(c1, c2) {
+ return c1._mountOrder - c2._mountOrder;
+ }
+
+ function runBatchedUpdates(transaction) {
+ var len = transaction.dirtyComponentsLength;
+ !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
+
+ // Since reconciling a component higher in the owner hierarchy usually (not
+ // always -- see shouldComponentUpdate()) will reconcile children, reconcile
+ // them before their children by sorting the array.
+ dirtyComponents.sort(mountOrderComparator);
+
+ // Any updates enqueued while reconciling must be performed after this entire
+ // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
+ // C, B could update twice in a single batch if C's render enqueues an update
+ // to B (since B would have already updated, we should skip it, and the only
+ // way we can know to do so is by checking the batch counter).
+ updateBatchNumber++;
+
+ for (var i = 0; i < len; i++) {
+ // If a component is unmounted before pending changes apply, it will still
+ // be here, but we assume that it has cleared its _pendingCallbacks and
+ // that performUpdateIfNecessary is a noop.
+ var component = dirtyComponents[i];
+
+ // If performUpdateIfNecessary happens to enqueue any new updates, we
+ // shouldn't execute the callbacks until the next render happens, so
+ // stash the callbacks first
+ var callbacks = component._pendingCallbacks;
+ component._pendingCallbacks = null;
+
+ var markerName;
+ if (ReactFeatureFlags.logTopLevelRenders) {
+ var namedComponent = component;
+ // Duck type TopLevelWrapper. This is probably always true.
+ if (component._currentElement.type.isReactTopLevelWrapper) {
+ namedComponent = component._renderedComponent;
+ }
+ markerName = 'React update: ' + namedComponent.getName();
+ console.time(markerName);
+ }
+
+ ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
+
+ if (markerName) {
+ console.timeEnd(markerName);
+ }
+
+ if (callbacks) {
+ for (var j = 0; j < callbacks.length; j++) {
+ transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
+ }
+ }
+ }
+ }
+
+ var flushBatchedUpdates = function () {
+ // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
+ // array and perform any updates enqueued by mount-ready handlers (i.e.,
+ // componentDidUpdate) but we need to check here too in order to catch
+ // updates enqueued by setState callbacks and asap calls.
+ while (dirtyComponents.length || asapEnqueued) {
+ if (dirtyComponents.length) {
+ var transaction = ReactUpdatesFlushTransaction.getPooled();
+ transaction.perform(runBatchedUpdates, null, transaction);
+ ReactUpdatesFlushTransaction.release(transaction);
+ }
+
+ if (asapEnqueued) {
+ asapEnqueued = false;
+ var queue = asapCallbackQueue;
+ asapCallbackQueue = CallbackQueue.getPooled();
+ queue.notifyAll();
+ CallbackQueue.release(queue);
+ }
+ }
+ };
+
+ /**
+ * Mark a component as needing a rerender, adding an optional callback to a
+ * list of functions which will be executed once the rerender occurs.
+ */
+ function enqueueUpdate(component) {
+ ensureInjected();
+
+ // Various parts of our code (such as ReactCompositeComponent's
+ // _renderValidatedComponent) assume that calls to render aren't nested;
+ // verify that that's the case. (This is called by each top-level update
+ // function, like setState, forceUpdate, etc.; creation and
+ // destruction of top-level components is guarded in ReactMount.)
+
+ if (!batchingStrategy.isBatchingUpdates) {
+ batchingStrategy.batchedUpdates(enqueueUpdate, component);
+ return;
+ }
+
+ dirtyComponents.push(component);
+ if (component._updateBatchNumber == null) {
+ component._updateBatchNumber = updateBatchNumber + 1;
+ }
+ }
+
+ /**
+ * Enqueue a callback to be run at the end of the current batching cycle. Throws
+ * if no updates are currently being performed.
+ */
+ function asap(callback, context) {
+ invariant(batchingStrategy.isBatchingUpdates, "ReactUpdates.asap: Can't enqueue an asap callback in a context where" + 'updates are not being batched.');
+ asapCallbackQueue.enqueue(callback, context);
+ asapEnqueued = true;
+ }
+
+ var ReactUpdatesInjection = {
+ injectReconcileTransaction: function (ReconcileTransaction) {
+ !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
+ ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
+ },
+
+ injectBatchingStrategy: function (_batchingStrategy) {
+ !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
+ !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
+ !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
+ batchingStrategy = _batchingStrategy;
+ }
+ };
+
+ var ReactUpdates = {
+ /**
+ * React references `ReactReconcileTransaction` using this property in order
+ * to allow dependency injection.
+ *
+ * @internal
+ */
+ ReactReconcileTransaction: null,
+
+ batchedUpdates: batchedUpdates,
+ enqueueUpdate: enqueueUpdate,
+ flushBatchedUpdates: flushBatchedUpdates,
+ injection: ReactUpdatesInjection,
+ asap: asap
+ };
+
+ module.exports = ReactUpdates;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
+
+/***/ }),
+/* 66 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+ 'use strict';
+
+ var _prodInvariant = __webpack_require__(44);
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var PooledClass = __webpack_require__(59);
+
+ var invariant = __webpack_require__(13);
+
+ /**
+ * A specialized pseudo-event module to help keep track of components waiting to
+ * be notified when their DOM representations are available for use.
+ *
+ * This implements `PooledClass`, so you should never need to instantiate this.
+ * Instead, use `CallbackQueue.getPooled()`.
+ *
+ * @class ReactMountReady
+ * @implements PooledClass
+ * @internal
+ */
+
+ var CallbackQueue = function () {
+ function CallbackQueue(arg) {
+ _classCallCheck(this, CallbackQueue);
+
+ this._callbacks = null;
+ this._contexts = null;
+ this._arg = arg;
+ }
+
+ /**
+ * Enqueues a callback to be invoked when `notifyAll` is invoked.
+ *
+ * @param {function} callback Invoked when `notifyAll` is invoked.
+ * @param {?object} context Context to call `callback` with.
+ * @internal
+ */
+
+
+ CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
+ this._callbacks = this._callbacks || [];
+ this._callbacks.push(callback);
+ this._contexts = this._contexts || [];
+ this._contexts.push(context);
+ };
+
+ /**
+ * Invokes all enqueued callbacks and clears the queue. This is invoked after
+ * the DOM representation of a component has been created or updated.
+ *
+ * @internal
+ */
+
+
+ CallbackQueue.prototype.notifyAll = function notifyAll() {
+ var callbacks = this._callbacks;
+ var contexts = this._contexts;
+ var arg = this._arg;
+ if (callbacks && contexts) {
+ !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
+ this._callbacks = null;
+ this._contexts = null;
+ for (var i = 0; i < callbacks.length; i++) {
+ callbacks[i].call(contexts[i], arg);
+ }
+ callbacks.length = 0;
+ contexts.length = 0;
+ }
+ };
+
+ CallbackQueue.prototype.checkpoint = function checkpoint() {
+ return this._callbacks ? this._callbacks.length : 0;
+ };
+
+ CallbackQueue.prototype.rollback = function rollback(len) {
+ if (this._callbacks && this._contexts) {
+ this._callbacks.length = len;
+ this._contexts.length = len;
+ }
+ };
+
+ /**
+ * Resets the internal queue.
+ *
+ * @internal
+ */
+
+
+ CallbackQueue.prototype.reset = function reset() {
+ this._callbacks = null;
+ this._contexts = null;
+ };
+
+ /**
+ * `PooledClass` looks for this.
+ */
+
+
+ CallbackQueue.prototype.destructor = function destructor() {
+ this.reset();
+ };
+
+ return CallbackQueue;
+ }();
+
+ module.exports = PooledClass.addPoolingTo(CallbackQueue);
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
+
+/***/ }),
+/* 67 */
+/***/ (function(module, exports) {
+
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+ 'use strict';
+
+ var ReactFeatureFlags = {
+ // When true, call console.time() before and .timeEnd() after each top-level
+ // render (both initial renders and updates). Useful when looking at prod-mode
+ // timeline profiles in Chrome, for example.
+ logTopLevelRenders: false
+ };
+
+ module.exports = ReactFeatureFlags;
+
+/***/ }),
+/* 68 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+ 'use strict';
+
+ var ReactRef = __webpack_require__(69);
+ var ReactInstrumentation = __webpack_require__(71);
+
+ var warning = __webpack_require__(9);
+
+ /**
+ * Helper to call ReactRef.attachRefs with this composite component, split out
+ * to avoid allocations in the transaction mount-ready queue.
+ */
+ function attachRefs() {
+ ReactRef.attachRefs(this, this._currentElement);
+ }
+
+ var ReactReconciler = {
+ /**
+ * Initializes the component, renders markup, and registers event listeners.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
+ * @param {?object} the containing host component instance
+ * @param {?object} info about the host container
+ * @return {?string} Rendered markup to be inserted into the DOM.
+ * @final
+ * @internal
+ */
+ mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
+ {
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
+ }
+ }
+ var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
+ if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
+ }
+ }
+ return markup;
+ },
+
+ /**
+ * Returns a value that can be passed to
+ * ReactComponentEnvironment.replaceNodeWithMarkup.
+ */
+ getHostNode: function (internalInstance) {
+ return internalInstance.getHostNode();
+ },
+
+ /**
+ * Releases any resources allocated by `mountComponent`.
+ *
+ * @final
+ * @internal
+ */
+ unmountComponent: function (internalInstance, safely) {
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
+ }
+ }
+ ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
+ internalInstance.unmountComponent(safely);
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
+ }
+ }
+ },
+
+ /**
+ * Update a component using a new element.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactElement} nextElement
+ * @param {ReactReconcileTransaction} transaction
+ * @param {object} context
+ * @internal
+ */
+ receiveComponent: function (internalInstance, nextElement, transaction, context) {
+ var prevElement = internalInstance._currentElement;
+
+ if (nextElement === prevElement && context === internalInstance._context) {
+ // Since elements are immutable after the owner is rendered,
+ // we can do a cheap identity compare here to determine if this is a
+ // superfluous reconcile. It's possible for state to be mutable but such
+ // change should trigger an update of the owner which would recreate
+ // the element. We explicitly check for the existence of an owner since
+ // it's possible for an element created outside a composite to be
+ // deeply mutated and reused.
+
+ // TODO: Bailing out early is just a perf optimization right?
+ // TODO: Removing the return statement should affect correctness?
+ return;
+ }
+
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
+ }
+ }
+
+ var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
+
+ if (refsChanged) {
+ ReactRef.detachRefs(internalInstance, prevElement);
+ }
+
+ internalInstance.receiveComponent(nextElement, transaction, context);
+
+ if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
+ }
+
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
+ }
+ }
+ },
+
+ /**
+ * Flush any dirty changes in a component.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactReconcileTransaction} transaction
+ * @internal
+ */
+ performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
+ if (internalInstance._updateBatchNumber !== updateBatchNumber) {
+ // The component's enqueued batch number should always be the current
+ // batch or the following one.
+ process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
+ return;
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
+ }
+ }
+ internalInstance.performUpdateIfNecessary(transaction);
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
+ }
+ }
+ }
+ };
+
+ module.exports = ReactReconciler;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
+
+/***/ }),
+/* 69 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+ 'use strict';
+
+ var ReactOwner = __webpack_require__(70);
+
+ var ReactRef = {};
+
+ function attachRef(ref, component, owner) {
+ if (typeof ref === 'function') {
+ ref(component.getPublicInstance());
+ } else {
+ // Legacy ref
+ ReactOwner.addComponentAsRefTo(component, ref, owner);
+ }
+ }
+
+ function detachRef(ref, component, owner) {
+ if (typeof ref === 'function') {
+ ref(null);
+ } else {
+ // Legacy ref
+ ReactOwner.removeComponentAsRefFrom(component, ref, owner);
+ }
+ }
+
+ ReactRef.attachRefs = function (instance, element) {
+ if (element === null || typeof element !== 'object') {
+ return;
+ }
+ var ref = element.ref;
+ if (ref != null) {
+ attachRef(ref, instance, element._owner);
+ }
+ };
+
+ ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
+ // If either the owner or a `ref` has changed, make sure the newest owner
+ // has stored a reference to `this`, and the previous owner (if different)
+ // has forgotten the reference to `this`. We use the element instead
+ // of the public this.props because the post processing cannot determine
+ // a ref. The ref conceptually lives on the element.
+
+ // TODO: Should this even be possible? The owner cannot change because
+ // it's forbidden by shouldUpdateReactComponent. The ref can change
+ // if you swap the keys of but not the refs. Reconsider where this check
+ // is made. It probably belongs where the key checking and
+ // instantiateReactComponent is done.
+
+ var prevRef = null;
+ var prevOwner = null;
+ if (prevElement !== null && typeof prevElement === 'object') {
+ prevRef = prevElement.ref;
+ prevOwner = prevElement._owner;
+ }
+
+ var nextRef = null;
+ var nextOwner = null;
+ if (nextElement !== null && typeof nextElement === 'object') {
+ nextRef = nextElement.ref;
+ nextOwner = nextElement._owner;
+ }
+
+ return prevRef !== nextRef ||
+ // If owner changes but we have an unchanged function ref, don't update refs
+ typeof nextRef === 'string' && nextOwner !== prevOwner;
+ };
+
+ ReactRef.detachRefs = function (instance, element) {
+ if (element === null || typeof element !== 'object') {
+ return;
+ }
+ var ref = element.ref;
+ if (ref != null) {
+ detachRef(ref, instance, element._owner);
+ }
+ };
+
+ module.exports = ReactRef;
+
+/***/ }),
+/* 70 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+ 'use strict';
+
+ var _prodInvariant = __webpack_require__(44);
+
+ var invariant = __webpack_require__(13);
+
+ /**
+ * @param {?object} object
+ * @return {boolean} True if `object` is a valid owner.
+ * @final
+ */
+ function isValidOwner(object) {
+ return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
+ }
+
+ /**
+ * ReactOwners are capable of storing references to owned components.
+ *
+ * All components are capable of //being// referenced by owner components, but
+ * only ReactOwner components are capable of //referencing// owned components.
+ * The named reference is known as a "ref".
+ *
+ * Refs are available when mounted and updated during reconciliation.
+ *
+ * var MyComponent = React.createClass({
+ * render: function() {
+ * return (
+ *
+ *
+ *
+ * );
+ * },
+ * handleClick: function() {
+ * this.refs.custom.handleClick();
+ * },
+ * componentDidMount: function() {
+ * this.refs.custom.initialize();
+ * }
+ * });
+ *
+ * Refs should rarely be used. When refs are used, they should only be done to
+ * control data that is not handled by React's data flow.
+ *
+ * @class ReactOwner
+ */
+ var ReactOwner = {
+ /**
+ * Adds a component by ref to an owner component.
+ *
+ * @param {ReactComponent} component Component to reference.
+ * @param {string} ref Name by which to refer to the component.
+ * @param {ReactOwner} owner Component on which to record the ref.
+ * @final
+ * @internal
+ */
+ addComponentAsRefTo: function (component, ref, owner) {
+ !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;
+ owner.attachRef(ref, component);
+ },
+
+ /**
+ * Removes a component by ref from an owner component.
+ *
+ * @param {ReactComponent} component Component to dereference.
+ * @param {string} ref Name of the ref to remove.
+ * @param {ReactOwner} owner Component on which the ref is recorded.
+ * @final
+ * @internal
+ */
+ removeComponentAsRefFrom: function (component, ref, owner) {
+ !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;
+ var ownerPublicInstance = owner.getPublicInstance();
+ // Check that `component`'s owner is still alive and that `component` is still the current ref
+ // because we do not want to detach the ref if another component stole it.
+ if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
+ owner.detachRef(ref);
+ }
+ }
+ };
+
+ module.exports = ReactOwner;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
+
+/***/ }),
+/* 71 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2016-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+ 'use strict';
+
+ // Trust the developer to only use ReactInstrumentation with a __DEV__ check
+
+ var debugTool = null;
+
+ if (process.env.NODE_ENV !== 'production') {
+ var ReactDebugTool = __webpack_require__(72);
+ debugTool = ReactDebugTool;
+ }
+
+ module.exports = { debugTool: debugTool };
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
+
+/***/ }),
+/* 72 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2016-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+ 'use strict';
+
+ var ReactInvalidSetStateWarningHook = __webpack_require__(73);
+ var ReactHostOperationHistoryHook = __webpack_require__(74);
+ var ReactComponentTreeHook = __webpack_require__(25);
+ var ExecutionEnvironment = __webpack_require__(57);
+
+ var performanceNow = __webpack_require__(75);
+ var warning = __webpack_require__(9);
+
+ var hooks = [];
+ var didHookThrowForEvent = {};
+
+ function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
+ try {
+ fn.call(context, arg1, arg2, arg3, arg4, arg5);
+ } catch (e) {
+ process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
+ didHookThrowForEvent[event] = true;
+ }
+ }
+
+ function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
+ for (var i = 0; i < hooks.length; i++) {
+ var hook = hooks[i];
+ var fn = hook[event];
+ if (fn) {
+ callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
+ }
+ }
+ }
+
+ var isProfiling = false;
+ var flushHistory = [];
+ var lifeCycleTimerStack = [];
+ var currentFlushNesting = 0;
+ var currentFlushMeasurements = [];
+ var currentFlushStartTime = 0;
+ var currentTimerDebugID = null;
+ var currentTimerStartTime = 0;
+ var currentTimerNestedFlushDuration = 0;
+ var currentTimerType = null;
+
+ var lifeCycleTimerHasWarned = false;
+
+ function clearHistory() {
+ ReactComponentTreeHook.purgeUnmountedComponents();
+ ReactHostOperationHistoryHook.clearHistory();
+ }
+
+ function getTreeSnapshot(registeredIDs) {
+ return registeredIDs.reduce(function (tree, id) {
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
+ var parentID = ReactComponentTreeHook.getParentID(id);
+ tree[id] = {
+ displayName: ReactComponentTreeHook.getDisplayName(id),
+ text: ReactComponentTreeHook.getText(id),
+ updateCount: ReactComponentTreeHook.getUpdateCount(id),
+ childIDs: ReactComponentTreeHook.getChildIDs(id),
+ // Text nodes don't have owners but this is close enough.
+ ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
+ parentID: parentID
+ };
+ return tree;
+ }, {});
+ }
+
+ function resetMeasurements() {
+ var previousStartTime = currentFlushStartTime;
+ var previousMeasurements = currentFlushMeasurements;
+ var previousOperations = ReactHostOperationHistoryHook.getHistory();
+
+ if (currentFlushNesting === 0) {
+ currentFlushStartTime = 0;
+ currentFlushMeasurements = [];
+ clearHistory();
+ return;
+ }
+
+ if (previousMeasurements.length || previousOperations.length) {
+ var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
+ flushHistory.push({
+ duration: performanceNow() - previousStartTime,
+ measurements: previousMeasurements || [],
+ operations: previousOperations || [],
+ treeSnapshot: getTreeSnapshot(registeredIDs)
+ });
+ }
+
+ clearHistory();
+ currentFlushStartTime = performanceNow();
+ currentFlushMeasurements = [];
+ }
+
+ function checkDebugID(debugID) {
+ var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+ if (allowRoot && debugID === 0) {
+ return;
+ }
+ if (!debugID) {
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
+ }
+ }
+
+ function beginLifeCycleTimer(debugID, timerType) {
+ if (currentFlushNesting === 0) {
+ return;
+ }
+ if (currentTimerType && !lifeCycleTimerHasWarned) {
+ process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
+ lifeCycleTimerHasWarned = true;
+ }
+ currentTimerStartTime = performanceNow();
+ currentTimerNestedFlushDuration = 0;
+ currentTimerDebugID = debugID;
+ currentTimerType = timerType;
+ }
+
+ function endLifeCycleTimer(debugID, timerType) {
+ if (currentFlushNesting === 0) {
+ return;
+ }
+ if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
+ process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
+ lifeCycleTimerHasWarned = true;
+ }
+ if (isProfiling) {
+ currentFlushMeasurements.push({
+ timerType: timerType,
+ instanceID: debugID,
+ duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
+ });
+ }
+ currentTimerStartTime = 0;
+ currentTimerNestedFlushDuration = 0;
+ currentTimerDebugID = null;
+ currentTimerType = null;
+ }
+
+ function pauseCurrentLifeCycleTimer() {
+ var currentTimer = {
+ startTime: currentTimerStartTime,
+ nestedFlushStartTime: performanceNow(),
+ debugID: currentTimerDebugID,
+ timerType: currentTimerType
+ };
+ lifeCycleTimerStack.push(currentTimer);
+ currentTimerStartTime = 0;
+ currentTimerNestedFlushDuration = 0;
+ currentTimerDebugID = null;
+ currentTimerType = null;
+ }
+
+ function resumeCurrentLifeCycleTimer() {
+ var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
+ startTime = _lifeCycleTimerStack$.startTime,
+ nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
+ debugID = _lifeCycleTimerStack$.debugID,
+ timerType = _lifeCycleTimerStack$.timerType;
+
+ var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
+ currentTimerStartTime = startTime;
+ currentTimerNestedFlushDuration += nestedFlushDuration;
+ currentTimerDebugID = debugID;
+ currentTimerType = timerType;
+ }
+
+ var lastMarkTimeStamp = 0;
+ var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
+
+ function shouldMark(debugID) {
+ if (!isProfiling || !canUsePerformanceMeasure) {
+ return false;
+ }
+ var element = ReactComponentTreeHook.getElement(debugID);
+ if (element == null || typeof element !== 'object') {
+ return false;
+ }
+ var isHostElement = typeof element.type === 'string';
+ if (isHostElement) {
+ return false;
+ }
+ return true;
+ }
+
+ function markBegin(debugID, markType) {
+ if (!shouldMark(debugID)) {
+ return;
+ }
+
+ var markName = debugID + '::' + markType;
+ lastMarkTimeStamp = performanceNow();
+ performance.mark(markName);
+ }
+
+ function markEnd(debugID, markType) {
+ if (!shouldMark(debugID)) {
+ return;
+ }
+
+ var markName = debugID + '::' + markType;
+ var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
+
+ // Chrome has an issue of dropping markers recorded too fast:
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=640652
+ // To work around this, we will not report very small measurements.
+ // I determined the magic number by tweaking it back and forth.
+ // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe.
+ // When the bug is fixed, we can `measure()` unconditionally if we want to.
+ var timeStamp = performanceNow();
+ if (timeStamp - lastMarkTimeStamp > 0.1) {
+ var measurementName = displayName + ' [' + markType + ']';
+ performance.measure(measurementName, markName);
+ }
+
+ performance.clearMarks(markName);
+ if (measurementName) {
+ performance.clearMeasures(measurementName);
+ }
+ }
+
+ var ReactDebugTool = {
+ addHook: function (hook) {
+ hooks.push(hook);
+ },
+ removeHook: function (hook) {
+ for (var i = 0; i < hooks.length; i++) {
+ if (hooks[i] === hook) {
+ hooks.splice(i, 1);
+ i--;
+ }
+ }
+ },
+ isProfiling: function () {
+ return isProfiling;
+ },
+ beginProfiling: function () {
+ if (isProfiling) {
+ return;
+ }
+
+ isProfiling = true;
+ flushHistory.length = 0;
+ resetMeasurements();
+ ReactDebugTool.addHook(ReactHostOperationHistoryHook);
+ },
+ endProfiling: function () {
+ if (!isProfiling) {
+ return;
+ }
+
+ isProfiling = false;
+ resetMeasurements();
+ ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
+ },
+ getFlushHistory: function () {
+ return flushHistory;
+ },
+ onBeginFlush: function () {
+ currentFlushNesting++;
+ resetMeasurements();
+ pauseCurrentLifeCycleTimer();
+ emitEvent('onBeginFlush');
+ },
+ onEndFlush: function () {
+ resetMeasurements();
+ currentFlushNesting--;
+ resumeCurrentLifeCycleTimer();
+ emitEvent('onEndFlush');
+ },
+ onBeginLifeCycleTimer: function (debugID, timerType) {
+ checkDebugID(debugID);
+ emitEvent('onBeginLifeCycleTimer', debugID, timerType);
+ markBegin(debugID, timerType);
+ beginLifeCycleTimer(debugID, timerType);
+ },
+ onEndLifeCycleTimer: function (debugID, timerType) {
+ checkDebugID(debugID);
+ endLifeCycleTimer(debugID, timerType);
+ markEnd(debugID, timerType);
+ emitEvent('onEndLifeCycleTimer', debugID, timerType);
+ },
+ onBeginProcessingChildContext: function () {
+ emitEvent('onBeginProcessingChildContext');
+ },
+ onEndProcessingChildContext: function () {
+ emitEvent('onEndProcessingChildContext');
+ },
+ onHostOperation: function (operation) {
+ checkDebugID(operation.instanceID);
+ emitEvent('onHostOperation', operation);
+ },
+ onSetState: function () {
+ emitEvent('onSetState');
+ },
+ onSetChildren: function (debugID, childDebugIDs) {
+ checkDebugID(debugID);
+ childDebugIDs.forEach(checkDebugID);
+ emitEvent('onSetChildren', debugID, childDebugIDs);
+ },
+ onBeforeMountComponent: function (debugID, element, parentDebugID) {
+ checkDebugID(debugID);
+ checkDebugID(parentDebugID, true);
+ emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
+ markBegin(debugID, 'mount');
+ },
+ onMountComponent: function (debugID) {
+ checkDebugID(debugID);
+ markEnd(debugID, 'mount');
+ emitEvent('onMountComponent', debugID);
+ },
+ onBeforeUpdateComponent: function (debugID, element) {
+ checkDebugID(debugID);
+ emitEvent('onBeforeUpdateComponent', debugID, element);
+ markBegin(debugID, 'update');
+ },
+ onUpdateComponent: function (debugID) {
+ checkDebugID(debugID);
+ markEnd(debugID, 'update');
+ emitEvent('onUpdateComponent', debugID);
+ },
+ onBeforeUnmountComponent: function (debugID) {
+ checkDebugID(debugID);
+ emitEvent('onBeforeUnmountComponent', debugID);
+ markBegin(debugID, 'unmount');
+ },
+ onUnmountComponent: function (debugID) {
+ checkDebugID(debugID);
+ markEnd(debugID, 'unmount');
+ emitEvent('onUnmountComponent', debugID);
+ },
+ onTestEvent: function () {
+ emitEvent('onTestEvent');
+ }
+ };
+
+ // TODO remove these when RN/www gets updated
+ ReactDebugTool.addDevtool = ReactDebugTool.addHook;
+ ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
+
+ ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
+ ReactDebugTool.addHook(ReactComponentTreeHook);
+ var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
+ if (/[?&]react_perf\b/.test(url)) {
+ ReactDebugTool.beginProfiling();
+ }
+
+ module.exports = ReactDebugTool;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
+
+/***/ }),
+/* 73 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2016-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+ 'use strict';
+
+ var warning = __webpack_require__(9);
+
+ if (process.env.NODE_ENV !== 'production') {
+ var processingChildContext = false;
+
+ var warnInvalidSetState = function () {
+ process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
+ };
+ }
+
+ var ReactInvalidSetStateWarningHook = {
+ onBeginProcessingChildContext: function () {
+ processingChildContext = true;
+ },
+ onEndProcessingChildContext: function () {
+ processingChildContext = false;
+ },
+ onSetState: function () {
+ warnInvalidSetState();
+ }
+ };
+
+ module.exports = ReactInvalidSetStateWarningHook;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
+
+/***/ }),
+/* 74 */
+/***/ (function(module, exports) {
+
+ /**
+ * Copyright (c) 2016-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+ 'use strict';
+
+ var history = [];
+
+ var ReactHostOperationHistoryHook = {
+ onHostOperation: function (operation) {
+ history.push(operation);
+ },
+ clearHistory: function () {
+ if (ReactHostOperationHistoryHook._preventClearing) {
+ // Should only be used for tests.
+ return;
+ }
+
+ history = [];
+ },
+ getHistory: function () {
+ return history;
+ }
+ };
+
+ module.exports = ReactHostOperationHistoryHook;
+
+/***/ }),
+/* 75 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @typechecks
+ */
+
+ var performance = __webpack_require__(76);
+
+ var performanceNow;
+
+ /**
+ * Detect if we can use `window.performance.now()` and gracefully fallback to
+ * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
+ * because of Facebook's testing infrastructure.
+ */
+ if (performance.now) {
+ performanceNow = function performanceNow() {
+ return performance.now();
+ };
+ } else {
+ performanceNow = function performanceNow() {
+ return Date.now();
+ };
+ }
+
+ module.exports = performanceNow;
+
+/***/ }),
+/* 76 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @typechecks
+ */
+
+ 'use strict';
+
+ var ExecutionEnvironment = __webpack_require__(57);
+
+ var performance;
+
+ if (ExecutionEnvironment.canUseDOM) {
+ performance = window.performance || window.msPerformance || window.webkitPerformance;
+ }
+
+ module.exports = performance || {};
+
+/***/ }),
+/* 77 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+ 'use strict';
+
+ var _prodInvariant = __webpack_require__(44);
+
+ var invariant = __webpack_require__(13);
+
+ var OBSERVED_ERROR = {};
+
+ /**
+ * `Transaction` creates a black box that is able to wrap any method such that
+ * certain invariants are maintained before and after the method is invoked
+ * (Even if an exception is thrown while invoking the wrapped method). Whoever
+ * instantiates a transaction can provide enforcers of the invariants at
+ * creation time. The `Transaction` class itself will supply one additional
+ * automatic invariant for you - the invariant that any transaction instance
+ * should not be run while it is already being run. You would typically create a
+ * single instance of a `Transaction` for reuse multiple times, that potentially
+ * is used to wrap several different methods. Wrappers are extremely simple -
+ * they only require implementing two methods.
+ *
+ *
+ * wrappers (injected at creation time)
+ * + +
+ * | |
+ * +-----------------|--------|--------------+
+ * | v | |
+ * | +---------------+ | |
+ * | +--| wrapper1 |---|----+ |
+ * | | +---------------+ v | |
+ * | | +-------------+ | |
+ * | | +----| wrapper2 |--------+ |
+ * | | | +-------------+ | | |
+ * | | | | | |
+ * | v v v v | wrapper
+ * | +---+ +---+ +---------+ +---+ +---+ | invariants
+ * perform(anyMethod) | | | | | | | | | | | | maintained
+ * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
+ * | | | | | | | | | | | |
+ * | | | | | | | | | | | |
+ * | | | | | | | | | | | |
+ * | +---+ +---+ +---------+ +---+ +---+ |
+ * | initialize close |
+ * +-----------------------------------------+
+ *
+ *
+ * Use cases:
+ * - Preserving the input selection ranges before/after reconciliation.
+ * Restoring selection even in the event of an unexpected error.
+ * - Deactivating events while rearranging the DOM, preventing blurs/focuses,
+ * while guaranteeing that afterwards, the event system is reactivated.
+ * - Flushing a queue of collected DOM mutations to the main UI thread after a
+ * reconciliation takes place in a worker thread.
+ * - Invoking any collected `componentDidUpdate` callbacks after rendering new
+ * content.
+ * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue
+ * to preserve the `scrollTop` (an automatic scroll aware DOM).
+ * - (Future use case): Layout calculations before and after DOM updates.
+ *
+ * Transactional plugin API:
+ * - A module that has an `initialize` method that returns any precomputation.
+ * - and a `close` method that accepts the precomputation. `close` is invoked
+ * when the wrapped process is completed, or has failed.
+ *
+ * @param {Array
} transactionWrapper Wrapper modules
+ * that implement `initialize` and `close`.
+ * @return {Transaction} Single transaction for reuse in thread.
+ *
+ * @class Transaction
+ */
+ var TransactionImpl = {
+ /**
+ * Sets up this instance so that it is prepared for collecting metrics. Does
+ * so such that this setup method may be used on an instance that is already
+ * initialized, in a way that does not consume additional memory upon reuse.
+ * That can be useful if you decide to make your subclass of this mixin a
+ * "PooledClass".
+ */
+ reinitializeTransaction: function () {
+ this.transactionWrappers = this.getTransactionWrappers();
+ if (this.wrapperInitData) {
+ this.wrapperInitData.length = 0;
+ } else {
+ this.wrapperInitData = [];
+ }
+ this._isInTransaction = false;
+ },
+
+ _isInTransaction: false,
+
+ /**
+ * @abstract
+ * @return {Array} Array of transaction wrappers.
+ */
+ getTransactionWrappers: null,
+
+ isInTransaction: function () {
+ return !!this._isInTransaction;
+ },
+
+ /* eslint-disable space-before-function-paren */
+
+ /**
+ * Executes the function within a safety window. Use this for the top level
+ * methods that result in large amounts of computation/mutations that would
+ * need to be safety checked. The optional arguments helps prevent the need
+ * to bind in many cases.
+ *
+ * @param {function} method Member of scope to call.
+ * @param {Object} scope Scope to invoke from.
+ * @param {Object?=} a Argument to pass to the method.
+ * @param {Object?=} b Argument to pass to the method.
+ * @param {Object?=} c Argument to pass to the method.
+ * @param {Object?=} d Argument to pass to the method.
+ * @param {Object?=} e Argument to pass to the method.
+ * @param {Object?=} f Argument to pass to the method.
+ *
+ * @return {*} Return value from `method`.
+ */
+ perform: function (method, scope, a, b, c, d, e, f) {
+ /* eslint-enable space-before-function-paren */
+ !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
+ var errorThrown;
+ var ret;
+ try {
+ this._isInTransaction = true;
+ // Catching errors makes debugging more difficult, so we start with
+ // errorThrown set to true before setting it to false after calling
+ // close -- if it's still set to true in the finally block, it means
+ // one of these calls threw.
+ errorThrown = true;
+ this.initializeAll(0);
+ ret = method.call(scope, a, b, c, d, e, f);
+ errorThrown = false;
+ } finally {
+ try {
+ if (errorThrown) {
+ // If `method` throws, prefer to show that stack trace over any thrown
+ // by invoking `closeAll`.
+ try {
+ this.closeAll(0);
+ } catch (err) {}
+ } else {
+ // Since `method` didn't throw, we don't want to silence the exception
+ // here.
+ this.closeAll(0);
+ }
+ } finally {
+ this._isInTransaction = false;
+ }
+ }
+ return ret;
+ },
+
+ initializeAll: function (startIndex) {
+ var transactionWrappers = this.transactionWrappers;
+ for (var i = startIndex; i < transactionWrappers.length; i++) {
+ var wrapper = transactionWrappers[i];
+ try {
+ // Catching errors makes debugging more difficult, so we start with the
+ // OBSERVED_ERROR state before overwriting it with the real return value
+ // of initialize -- if it's still set to OBSERVED_ERROR in the finally
+ // block, it means wrapper.initialize threw.
+ this.wrapperInitData[i] = OBSERVED_ERROR;
+ this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
+ } finally {
+ if (this.wrapperInitData[i] === OBSERVED_ERROR) {
+ // The initializer for wrapper i threw an error; initialize the
+ // remaining wrappers but silence any exceptions from them to ensure
+ // that the first error is the one to bubble up.
+ try {
+ this.initializeAll(i + 1);
+ } catch (err) {}
+ }
+ }
+ }
+ },
+
+ /**
+ * Invokes each of `this.transactionWrappers.close[i]` functions, passing into
+ * them the respective return values of `this.transactionWrappers.init[i]`
+ * (`close`rs that correspond to initializers that failed will not be
+ * invoked).
+ */
+ closeAll: function (startIndex) {
+ !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
+ var transactionWrappers = this.transactionWrappers;
+ for (var i = startIndex; i < transactionWrappers.length; i++) {
+ var wrapper = transactionWrappers[i];
+ var initData = this.wrapperInitData[i];
+ var errorThrown;
+ try {
+ // Catching errors makes debugging more difficult, so we start with
+ // errorThrown set to true before setting it to false after calling
+ // close -- if it's still set to true in the finally block, it means
+ // wrapper.close threw.
+ errorThrown = true;
+ if (initData !== OBSERVED_ERROR && wrapper.close) {
+ wrapper.close.call(this, initData);
+ }
+ errorThrown = false;
+ } finally {
+ if (errorThrown) {
+ // The closer for wrapper i threw an error; close the remaining
+ // wrappers but silence any exceptions from them to ensure that the
+ // first error is the one to bubble up.
+ try {
+ this.closeAll(i + 1);
+ } catch (e) {}
+ }
+ }
+ }
+ this.wrapperInitData.length = 0;
+ }
+ };
+
+ module.exports = TransactionImpl;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
+
+/***/ }),
+/* 78 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+ 'use strict';
+
+ var ReactDOMComponentTree = __webpack_require__(43);
+
+ function isCheckable(elem) {
+ var type = elem.type;
+ var nodeName = elem.nodeName;
+ return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
+ }
+
+ function getTracker(inst) {
+ return inst._wrapperState.valueTracker;
+ }
+
+ function attachTracker(inst, tracker) {
+ inst._wrapperState.valueTracker = tracker;
+ }
+
+ function detachTracker(inst) {
+ inst._wrapperState.valueTracker = null;
+ }
+
+ function getValueFromNode(node) {
+ var value;
+ if (node) {
+ value = isCheckable(node) ? '' + node.checked : node.value;
+ }
+ return value;
+ }
+
+ var inputValueTracking = {
+ // exposed for testing
+ _getTrackerFromNode: function (node) {
+ return getTracker(ReactDOMComponentTree.getInstanceFromNode(node));
+ },
+
+
+ track: function (inst) {
+ if (getTracker(inst)) {
+ return;
+ }
+
+ var node = ReactDOMComponentTree.getNodeFromInstance(inst);
+ var valueField = isCheckable(node) ? 'checked' : 'value';
+ var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
+
+ var currentValue = '' + node[valueField];
+
+ // if someone has already defined a value or Safari, then bail
+ // and don't track value will cause over reporting of changes,
+ // but it's better then a hard failure
+ // (needed for certain tests that spyOn input values and Safari)
+ if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
+ return;
+ }
+
+ Object.defineProperty(node, valueField, {
+ enumerable: descriptor.enumerable,
+ configurable: true,
+ get: function () {
+ return descriptor.get.call(this);
+ },
+ set: function (value) {
+ currentValue = '' + value;
+ descriptor.set.call(this, value);
+ }
+ });
+
+ attachTracker(inst, {
+ getValue: function () {
+ return currentValue;
+ },
+ setValue: function (value) {
+ currentValue = '' + value;
+ },
+ stopTracking: function () {
+ detachTracker(inst);
+ delete node[valueField];
+ }
+ });
+ },
+
+ updateValueIfChanged: function (inst) {
+ if (!inst) {
+ return false;
+ }
+ var tracker = getTracker(inst);
+
+ if (!tracker) {
+ inputValueTracking.track(inst);
+ return true;
+ }
+
+ var lastValue = tracker.getValue();
+ var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst));
+
+ if (nextValue !== lastValue) {
+ tracker.setValue(nextValue);
+ return true;
+ }
+
+ return false;
+ },
+ stopTracking: function (inst) {
+ var tracker = getTracker(inst);
+ if (tracker) {
+ tracker.stopTracking();
+ }
+ }
+ };
+
+ module.exports = inputValueTracking;
+
+/***/ }),
+/* 79 */
+/***/ (function(module, exports) {
+
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+ 'use strict';
+
+ /**
+ * Gets the target node from a native browser event by accounting for
+ * inconsistencies in browser DOM APIs.
+ *
+ * @param {object} nativeEvent Native browser event.
+ * @return {DOMEventTarget} Target node.
+ */
+
+ function getEventTarget(nativeEvent) {
+ var target = nativeEvent.target || nativeEvent.srcElement || window;
+
+ // Normalize SVG