@samitouri / QOS-React / commits / d1a003ee72

Update website for 15.4.0

(cherry picked from commit 5ce8853ccb2e4677eb6a9d183e8086fd0d6367d4)

tomocchino committed Nov 16, 2016 at 14:29 UTC d1a003ee72f2cd91574cc2a76fb72190850eacbc
4 files changed +20848 -19510
docs/_config.yml
+12 -12
@@ -2,9 +2,9 @@
2 name: React
3 description: A JavaScript library for building user interfaces
4 url: https://facebook.github.io
5 -baseurl: "/react"
6 -permalink: "/blog/:year/:month/:day/:title.html"
7 -paginate_path: "/blog/page:num/"
5 +baseurl: /react
6 +permalink: /blog/:year/:month/:day/:title.html
7 +paginate_path: /blog/page:num/
8 paginate: 5
9 timezone: America/Los_Angeles
10 highlighter: pygments
@@ -60,13 +60,13 @@ sass:
60 gems:
61 - jekyll-redirect-from
62 - jekyll-paginate
63 -react_version: 15.3.2
63 +react_version: 15.4.0
64 react_hashes:
65 - dev: bQIyvl+8Ufi5KiKZPG9VItNWmhcAXA1pa5nHIEoBGob+rdbjJnpNV3s288Mz2yZu
66 - prod: drG4TSBgFQ0Hb/A3ynRyFDT22irpJDL+duuxvYD5mkC9adCYDqEwnX13371waqiH
67 - addons_dev: gCLxBq3yes/qREmjcw3Tdk5dUh3iB54huWqgxq1lAJZTYzLahJqEik5ZiVnq9Zt4
68 - addons_prod: pmUKSclxJREtkrfcUJvBYTEoJCvO6Vj5ob8IgPSiIX0G3c4w2dKBJMoGEhlv9Gev
69 - dom_dev: ZzFfcTbsRst34N23lWs6TtlfonXwDgpeALh+ObwYXav5BSo0j7KsaAtcdn+xrnS1
70 - dom_prod: MTxlP+/p3lyvc2+LZc2B5xy5reGwrA80whnflxNc6zPgLUmMvbwUoKy7qorBH+P4
71 - dom_server_dev: jHjmbawtj2AhVuJlmE/O1HXAIbQMzHvoXRZEVdhTSrfJXACRVpZm/BpuAi4K89xn
72 - dom_server_prod: LCYUMPll/9t/UsNa/Q1zfti2awxxiiczBUZcQBdeGACH0sU6BEAllZuGxo5b6/kf
65 + dev: buVLzxzBI8Ps3svVMSUurNdb5dozNidH5Ow4H0YgZeia3t6Oeui2VLpvtAq1fwtK
66 + prod: nCjsa0kjNQPQdxWm12/ReVJzfBJaVubEwwDswyQDGMKYJmeWv3qShMuETfU5fisu
67 + addons_dev: /u97pKzBwasbC1yj8gSIq1z30o4ZTUX9j1Mv/hyAjmG41ydTNHw9JFOhwFbDgxmR
68 + addons_prod: /p86n4b5VTlWoA/INEHQZ+zjx9g1pJduoFmTEJ6fSzFTq1mBaXaBcWVGtZJXD68L
69 + dom_dev: lUxkeWjg3I3lXmxcM1gvgo0yvm2w9alc1osa4L8yWZFO6l/vg9h5hSlHPFioltrm
70 + dom_prod: u8x1yIGN9IjGNYbBaDMsp1D4MK3sCmMU13mcBX+bm+aMo5+gaT8HIwIj39GlXaRS
71 + dom_server_dev: Okj1hVX1VF+oZSkPcJQ/YcnW6bsIpeni222ylwUaMnSmdCe0zWKmMwpFMVqzy4Ws
72 + dom_server_prod: wiA4u+G5fEfF4xzhhVnNWeSifVyttoEIpgc3APaMKQgw5A4wHbEMihf63tk1qoyt
docs/downloads/react-15.4.0.zip
Binary files /dev/null and b/docs/downloads/react-15.4.0.zip differ
docs/js/react-dom.js
+18202 -17
@@ -1,23 +1,15 @@
1 -/**
2 - * ReactDOM v15.3.2
3 - *
4 - * Copyright 2013-present, Facebook, Inc.
5 - * All rights reserved.
6 - *
7 - * This source code is licensed under the BSD-style license found in the
8 - * LICENSE file in the root directory of this source tree. An additional grant
9 - * of patent rights can be found in the PATENTS file in the same directory.
10 - *
11 - */
12 -// Based off https://github.com/ForbesLindesay/umd/blob/master/template.js
1 + /**
2 + * ReactDOM v15.4.0
3 + */
4 +
5 ;(function(f) {
6 // CommonJS
7 if (typeof exports === "object" && typeof module !== "undefined") {
16 - module.exports = f(require('react'));
8 + f(require('react'));
9
10 // RequireJS
11 } else if (typeof define === "function" && define.amd) {
20 - define(['react'], f);
12 + require(['react'], f);
13
14 // <script>
15 } else {
@@ -34,9 +26,18202 @@
26 // see https://github.com/facebook/react/issues/3037
27 g = this;
28 }
37 - g.ReactDOM = f(g.React);
29 + f(g.React)
30 }
39 -
31 })(function(React) {
41 - return React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
32 + (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.ReactDOM = 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){
33 +/**
34 + * Copyright 2013-present, Facebook, Inc.
35 + * All rights reserved.
36 + *
37 + * This source code is licensed under the BSD-style license found in the
38 + * LICENSE file in the root directory of this source tree. An additional grant
39 + * of patent rights can be found in the PATENTS file in the same directory.
40 + *
41 + */
42 +
43 +'use strict';
44 +
45 +var ARIADOMPropertyConfig = {
46 + Properties: {
47 + // Global States and Properties
48 + 'aria-current': 0, // state
49 + 'aria-details': 0,
50 + 'aria-disabled': 0, // state
51 + 'aria-hidden': 0, // state
52 + 'aria-invalid': 0, // state
53 + 'aria-keyshortcuts': 0,
54 + 'aria-label': 0,
55 + 'aria-roledescription': 0,
56 + // Widget Attributes
57 + 'aria-autocomplete': 0,
58 + 'aria-checked': 0,
59 + 'aria-expanded': 0,
60 + 'aria-haspopup': 0,
61 + 'aria-level': 0,
62 + 'aria-modal': 0,
63 + 'aria-multiline': 0,
64 + 'aria-multiselectable': 0,
65 + 'aria-orientation': 0,
66 + 'aria-placeholder': 0,
67 + 'aria-pressed': 0,
68 + 'aria-readonly': 0,
69 + 'aria-required': 0,
70 + 'aria-selected': 0,
71 + 'aria-sort': 0,
72 + 'aria-valuemax': 0,
73 + 'aria-valuemin': 0,
74 + 'aria-valuenow': 0,
75 + 'aria-valuetext': 0,
76 + // Live Region Attributes
77 + 'aria-atomic': 0,
78 + 'aria-busy': 0,
79 + 'aria-live': 0,
80 + 'aria-relevant': 0,
81 + // Drag-and-Drop Attributes
82 + 'aria-dropeffect': 0,
83 + 'aria-grabbed': 0,
84 + // Relationship Attributes
85 + 'aria-activedescendant': 0,
86 + 'aria-colcount': 0,
87 + 'aria-colindex': 0,
88 + 'aria-colspan': 0,
89 + 'aria-controls': 0,
90 + 'aria-describedby': 0,
91 + 'aria-errormessage': 0,
92 + 'aria-flowto': 0,
93 + 'aria-labelledby': 0,
94 + 'aria-owns': 0,
95 + 'aria-posinset': 0,
96 + 'aria-rowcount': 0,
97 + 'aria-rowindex': 0,
98 + 'aria-rowspan': 0,
99 + 'aria-setsize': 0
100 + },
101 + DOMAttributeNames: {},
102 + DOMPropertyNames: {}
103 +};
104 +
105 +module.exports = ARIADOMPropertyConfig;
106 +},{}],2:[function(_dereq_,module,exports){
107 +/**
108 + * Copyright 2013-present, Facebook, Inc.
109 + * All rights reserved.
110 + *
111 + * This source code is licensed under the BSD-style license found in the
112 + * LICENSE file in the root directory of this source tree. An additional grant
113 + * of patent rights can be found in the PATENTS file in the same directory.
114 + *
115 + */
116 +
117 +'use strict';
118 +
119 +var ReactDOMComponentTree = _dereq_(34);
120 +
121 +var focusNode = _dereq_(144);
122 +
123 +var AutoFocusUtils = {
124 + focusDOMComponent: function () {
125 + focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
126 + }
127 +};
128 +
129 +module.exports = AutoFocusUtils;
130 +},{"144":144,"34":34}],3:[function(_dereq_,module,exports){
131 +/**
132 + * Copyright 2013-present Facebook, Inc.
133 + * All rights reserved.
134 + *
135 + * This source code is licensed under the BSD-style license found in the
136 + * LICENSE file in the root directory of this source tree. An additional grant
137 + * of patent rights can be found in the PATENTS file in the same directory.
138 + *
139 + */
140 +
141 +'use strict';
142 +
143 +var EventPropagators = _dereq_(20);
144 +var ExecutionEnvironment = _dereq_(136);
145 +var FallbackCompositionState = _dereq_(21);
146 +var SyntheticCompositionEvent = _dereq_(89);
147 +var SyntheticInputEvent = _dereq_(93);
148 +
149 +var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
150 +var START_KEYCODE = 229;
151 +
152 +var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
153 +
154 +var documentMode = null;
155 +if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
156 + documentMode = document.documentMode;
157 +}
158 +
159 +// Webkit offers a very useful `textInput` event that can be used to
160 +// directly represent `beforeInput`. The IE `textinput` event is not as
161 +// useful, so we don't use it.
162 +var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
163 +
164 +// In IE9+, we have access to composition events, but the data supplied
165 +// by the native compositionend event may be incorrect. Japanese ideographic
166 +// spaces, for instance (\u3000) are not recorded correctly.
167 +var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
168 +
169 +/**
170 + * Opera <= 12 includes TextEvent in window, but does not fire
171 + * text input events. Rely on keypress instead.
172 + */
173 +function isPresto() {
174 + var opera = window.opera;
175 + return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
176 +}
177 +
178 +var SPACEBAR_CODE = 32;
179 +var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
180 +
181 +// Events and their corresponding property names.
182 +var eventTypes = {
183 + beforeInput: {
184 + phasedRegistrationNames: {
185 + bubbled: 'onBeforeInput',
186 + captured: 'onBeforeInputCapture'
187 + },
188 + dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
189 + },
190 + compositionEnd: {
191 + phasedRegistrationNames: {
192 + bubbled: 'onCompositionEnd',
193 + captured: 'onCompositionEndCapture'
194 + },
195 + dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
196 + },
197 + compositionStart: {
198 + phasedRegistrationNames: {
199 + bubbled: 'onCompositionStart',
200 + captured: 'onCompositionStartCapture'
201 + },
202 + dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
203 + },
204 + compositionUpdate: {
205 + phasedRegistrationNames: {
206 + bubbled: 'onCompositionUpdate',
207 + captured: 'onCompositionUpdateCapture'
208 + },
209 + dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
210 + }
211 +};
212 +
213 +// Track whether we've ever handled a keypress on the space key.
214 +var hasSpaceKeypress = false;
215 +
216 +/**
217 + * Return whether a native keypress event is assumed to be a command.
218 + * This is required because Firefox fires `keypress` events for key commands
219 + * (cut, copy, select-all, etc.) even though no character is inserted.
220 + */
221 +function isKeypressCommand(nativeEvent) {
222 + return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
223 + // ctrlKey && altKey is equivalent to AltGr, and is not a command.
224 + !(nativeEvent.ctrlKey && nativeEvent.altKey);
225 +}
226 +
227 +/**
228 + * Translate native top level events into event types.
229 + *
230 + * @param {string} topLevelType
231 + * @return {object}
232 + */
233 +function getCompositionEventType(topLevelType) {
234 + switch (topLevelType) {
235 + case 'topCompositionStart':
236 + return eventTypes.compositionStart;
237 + case 'topCompositionEnd':
238 + return eventTypes.compositionEnd;
239 + case 'topCompositionUpdate':
240 + return eventTypes.compositionUpdate;
241 + }
242 +}
243 +
244 +/**
245 + * Does our fallback best-guess model think this event signifies that
246 + * composition has begun?
247 + *
248 + * @param {string} topLevelType
249 + * @param {object} nativeEvent
250 + * @return {boolean}
251 + */
252 +function isFallbackCompositionStart(topLevelType, nativeEvent) {
253 + return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
254 +}
255 +
256 +/**
257 + * Does our fallback mode think that this event is the end of composition?
258 + *
259 + * @param {string} topLevelType
260 + * @param {object} nativeEvent
261 + * @return {boolean}
262 + */
263 +function isFallbackCompositionEnd(topLevelType, nativeEvent) {
264 + switch (topLevelType) {
265 + case 'topKeyUp':
266 + // Command keys insert or clear IME input.
267 + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
268 + case 'topKeyDown':
269 + // Expect IME keyCode on each keydown. If we get any other
270 + // code we must have exited earlier.
271 + return nativeEvent.keyCode !== START_KEYCODE;
272 + case 'topKeyPress':
273 + case 'topMouseDown':
274 + case 'topBlur':
275 + // Events are not possible without cancelling IME.
276 + return true;
277 + default:
278 + return false;
279 + }
280 +}
281 +
282 +/**
283 + * Google Input Tools provides composition data via a CustomEvent,
284 + * with the `data` property populated in the `detail` object. If this
285 + * is available on the event object, use it. If not, this is a plain
286 + * composition event and we have nothing special to extract.
287 + *
288 + * @param {object} nativeEvent
289 + * @return {?string}
290 + */
291 +function getDataFromCustomEvent(nativeEvent) {
292 + var detail = nativeEvent.detail;
293 + if (typeof detail === 'object' && 'data' in detail) {
294 + return detail.data;
295 + }
296 + return null;
297 +}
298 +
299 +// Track the current IME composition fallback object, if any.
300 +var currentComposition = null;
301 +
302 +/**
303 + * @return {?object} A SyntheticCompositionEvent.
304 + */
305 +function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
306 + var eventType;
307 + var fallbackData;
308 +
309 + if (canUseCompositionEvent) {
310 + eventType = getCompositionEventType(topLevelType);
311 + } else if (!currentComposition) {
312 + if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
313 + eventType = eventTypes.compositionStart;
314 + }
315 + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
316 + eventType = eventTypes.compositionEnd;
317 + }
318 +
319 + if (!eventType) {
320 + return null;
321 + }
322 +
323 + if (useFallbackCompositionData) {
324 + // The current composition is stored statically and must not be
325 + // overwritten while composition continues.
326 + if (!currentComposition && eventType === eventTypes.compositionStart) {
327 + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
328 + } else if (eventType === eventTypes.compositionEnd) {
329 + if (currentComposition) {
330 + fallbackData = currentComposition.getData();
331 + }
332 + }
333 + }
334 +
335 + var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
336 +
337 + if (fallbackData) {
338 + // Inject data generated from fallback path into the synthetic event.
339 + // This matches the property of native CompositionEventInterface.
340 + event.data = fallbackData;
341 + } else {
342 + var customData = getDataFromCustomEvent(nativeEvent);
343 + if (customData !== null) {
344 + event.data = customData;
345 + }
346 + }
347 +
348 + EventPropagators.accumulateTwoPhaseDispatches(event);
349 + return event;
350 +}
351 +
352 +/**
353 + * @param {string} topLevelType Record from `EventConstants`.
354 + * @param {object} nativeEvent Native browser event.
355 + * @return {?string} The string corresponding to this `beforeInput` event.
356 + */
357 +function getNativeBeforeInputChars(topLevelType, nativeEvent) {
358 + switch (topLevelType) {
359 + case 'topCompositionEnd':
360 + return getDataFromCustomEvent(nativeEvent);
361 + case 'topKeyPress':
362 + /**
363 + * If native `textInput` events are available, our goal is to make
364 + * use of them. However, there is a special case: the spacebar key.
365 + * In Webkit, preventing default on a spacebar `textInput` event
366 + * cancels character insertion, but it *also* causes the browser
367 + * to fall back to its default spacebar behavior of scrolling the
368 + * page.
369 + *
370 + * Tracking at:
371 + * https://code.google.com/p/chromium/issues/detail?id=355103
372 + *
373 + * To avoid this issue, use the keypress event as if no `textInput`
374 + * event is available.
375 + */
376 + var which = nativeEvent.which;
377 + if (which !== SPACEBAR_CODE) {
378 + return null;
379 + }
380 +
381 + hasSpaceKeypress = true;
382 + return SPACEBAR_CHAR;
383 +
384 + case 'topTextInput':
385 + // Record the characters to be added to the DOM.
386 + var chars = nativeEvent.data;
387 +
388 + // If it's a spacebar character, assume that we have already handled
389 + // it at the keypress level and bail immediately. Android Chrome
390 + // doesn't give us keycodes, so we need to blacklist it.
391 + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
392 + return null;
393 + }
394 +
395 + return chars;
396 +
397 + default:
398 + // For other native event types, do nothing.
399 + return null;
400 + }
401 +}
402 +
403 +/**
404 + * For browsers that do not provide the `textInput` event, extract the
405 + * appropriate string to use for SyntheticInputEvent.
406 + *
407 + * @param {string} topLevelType Record from `EventConstants`.
408 + * @param {object} nativeEvent Native browser event.
409 + * @return {?string} The fallback string for this `beforeInput` event.
410 + */
411 +function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
412 + // If we are currently composing (IME) and using a fallback to do so,
413 + // try to extract the composed characters from the fallback object.
414 + // If composition event is available, we extract a string only at
415 + // compositionevent, otherwise extract it at fallback events.
416 + if (currentComposition) {
417 + if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
418 + var chars = currentComposition.getData();
419 + FallbackCompositionState.release(currentComposition);
420 + currentComposition = null;
421 + return chars;
422 + }
423 + return null;
424 + }
425 +
426 + switch (topLevelType) {
427 + case 'topPaste':
428 + // If a paste event occurs after a keypress, throw out the input
429 + // chars. Paste events should not lead to BeforeInput events.
430 + return null;
431 + case 'topKeyPress':
432 + /**
433 + * As of v27, Firefox may fire keypress events even when no character
434 + * will be inserted. A few possibilities:
435 + *
436 + * - `which` is `0`. Arrow keys, Esc key, etc.
437 + *
438 + * - `which` is the pressed key code, but no char is available.
439 + * Ex: 'AltGr + d` in Polish. There is no modified character for
440 + * this key combination and no character is inserted into the
441 + * document, but FF fires the keypress for char code `100` anyway.
442 + * No `input` event will occur.
443 + *
444 + * - `which` is the pressed key code, but a command combination is
445 + * being used. Ex: `Cmd+C`. No character is inserted, and no
446 + * `input` event will occur.
447 + */
448 + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
449 + return String.fromCharCode(nativeEvent.which);
450 + }
451 + return null;
452 + case 'topCompositionEnd':
453 + return useFallbackCompositionData ? null : nativeEvent.data;
454 + default:
455 + return null;
456 + }
457 +}
458 +
459 +/**
460 + * Extract a SyntheticInputEvent for `beforeInput`, based on either native
461 + * `textInput` or fallback behavior.
462 + *
463 + * @return {?object} A SyntheticInputEvent.
464 + */
465 +function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
466 + var chars;
467 +
468 + if (canUseTextInputEvent) {
469 + chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
470 + } else {
471 + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
472 + }
473 +
474 + // If no characters are being inserted, no BeforeInput event should
475 + // be fired.
476 + if (!chars) {
477 + return null;
478 + }
479 +
480 + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
481 +
482 + event.data = chars;
483 + EventPropagators.accumulateTwoPhaseDispatches(event);
484 + return event;
485 +}
486 +
487 +/**
488 + * Create an `onBeforeInput` event to match
489 + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
490 + *
491 + * This event plugin is based on the native `textInput` event
492 + * available in Chrome, Safari, Opera, and IE. This event fires after
493 + * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
494 + *
495 + * `beforeInput` is spec'd but not implemented in any browsers, and
496 + * the `input` event does not provide any useful information about what has
497 + * actually been added, contrary to the spec. Thus, `textInput` is the best
498 + * available event to identify the characters that have actually been inserted
499 + * into the target node.
500 + *
501 + * This plugin is also responsible for emitting `composition` events, thus
502 + * allowing us to share composition fallback code for both `beforeInput` and
503 + * `composition` event types.
504 + */
505 +var BeforeInputEventPlugin = {
506 +
507 + eventTypes: eventTypes,
508 +
509 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
510 + return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
511 + }
512 +};
513 +
514 +module.exports = BeforeInputEventPlugin;
515 +},{"136":136,"20":20,"21":21,"89":89,"93":93}],4:[function(_dereq_,module,exports){
516 +/**
517 + * Copyright 2013-present, Facebook, Inc.
518 + * All rights reserved.
519 + *
520 + * This source code is licensed under the BSD-style license found in the
521 + * LICENSE file in the root directory of this source tree. An additional grant
522 + * of patent rights can be found in the PATENTS file in the same directory.
523 + *
524 + */
525 +
526 +'use strict';
527 +
528 +/**
529 + * CSS properties which accept numbers but are not in units of "px".
530 + */
531 +
532 +var isUnitlessNumber = {
533 + animationIterationCount: true,
534 + borderImageOutset: true,
535 + borderImageSlice: true,
536 + borderImageWidth: true,
537 + boxFlex: true,
538 + boxFlexGroup: true,
539 + boxOrdinalGroup: true,
540 + columnCount: true,
541 + flex: true,
542 + flexGrow: true,
543 + flexPositive: true,
544 + flexShrink: true,
545 + flexNegative: true,
546 + flexOrder: true,
547 + gridRow: true,
548 + gridColumn: true,
549 + fontWeight: true,
550 + lineClamp: true,
551 + lineHeight: true,
552 + opacity: true,
553 + order: true,
554 + orphans: true,
555 + tabSize: true,
556 + widows: true,
557 + zIndex: true,
558 + zoom: true,
559 +
560 + // SVG-related properties
561 + fillOpacity: true,
562 + floodOpacity: true,
563 + stopOpacity: true,
564 + strokeDasharray: true,
565 + strokeDashoffset: true,
566 + strokeMiterlimit: true,
567 + strokeOpacity: true,
568 + strokeWidth: true
569 +};
570 +
571 +/**
572 + * @param {string} prefix vendor-specific prefix, eg: Webkit
573 + * @param {string} key style name, eg: transitionDuration
574 + * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
575 + * WebkitTransitionDuration
576 + */
577 +function prefixKey(prefix, key) {
578 + return prefix + key.charAt(0).toUpperCase() + key.substring(1);
579 +}
580 +
581 +/**
582 + * Support style names that may come passed in prefixed by adding permutations
583 + * of vendor prefixes.
584 + */
585 +var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
586 +
587 +// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
588 +// infinite loop, because it iterates over the newly added props too.
589 +Object.keys(isUnitlessNumber).forEach(function (prop) {
590 + prefixes.forEach(function (prefix) {
591 + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
592 + });
593 +});
594 +
595 +/**
596 + * Most style properties can be unset by doing .style[prop] = '' but IE8
597 + * doesn't like doing that with shorthand properties so for the properties that
598 + * IE8 breaks on, which are listed here, we instead unset each of the
599 + * individual properties. See http://bugs.jquery.com/ticket/12385.
600 + * The 4-value 'clock' properties like margin, padding, border-width seem to
601 + * behave without any problems. Curiously, list-style works too without any
602 + * special prodding.
603 + */
604 +var shorthandPropertyExpansions = {
605 + background: {
606 + backgroundAttachment: true,
607 + backgroundColor: true,
608 + backgroundImage: true,
609 + backgroundPositionX: true,
610 + backgroundPositionY: true,
611 + backgroundRepeat: true
612 + },
613 + backgroundPosition: {
614 + backgroundPositionX: true,
615 + backgroundPositionY: true
616 + },
617 + border: {
618 + borderWidth: true,
619 + borderStyle: true,
620 + borderColor: true
621 + },
622 + borderBottom: {
623 + borderBottomWidth: true,
624 + borderBottomStyle: true,
625 + borderBottomColor: true
626 + },
627 + borderLeft: {
628 + borderLeftWidth: true,
629 + borderLeftStyle: true,
630 + borderLeftColor: true
631 + },
632 + borderRight: {
633 + borderRightWidth: true,
634 + borderRightStyle: true,
635 + borderRightColor: true
636 + },
637 + borderTop: {
638 + borderTopWidth: true,
639 + borderTopStyle: true,
640 + borderTopColor: true
641 + },
642 + font: {
643 + fontStyle: true,
644 + fontVariant: true,
645 + fontWeight: true,
646 + fontSize: true,
647 + lineHeight: true,
648 + fontFamily: true
649 + },
650 + outline: {
651 + outlineWidth: true,
652 + outlineStyle: true,
653 + outlineColor: true
654 + }
655 +};
656 +
657 +var CSSProperty = {
658 + isUnitlessNumber: isUnitlessNumber,
659 + shorthandPropertyExpansions: shorthandPropertyExpansions
660 +};
661 +
662 +module.exports = CSSProperty;
663 +},{}],5:[function(_dereq_,module,exports){
664 +/**
665 + * Copyright 2013-present, Facebook, Inc.
666 + * All rights reserved.
667 + *
668 + * This source code is licensed under the BSD-style license found in the
669 + * LICENSE file in the root directory of this source tree. An additional grant
670 + * of patent rights can be found in the PATENTS file in the same directory.
671 + *
672 + */
673 +
674 +'use strict';
675 +
676 +var CSSProperty = _dereq_(4);
677 +var ExecutionEnvironment = _dereq_(136);
678 +var ReactInstrumentation = _dereq_(64);
679 +
680 +var camelizeStyleName = _dereq_(138);
681 +var dangerousStyleValue = _dereq_(106);
682 +var hyphenateStyleName = _dereq_(149);
683 +var memoizeStringOnly = _dereq_(153);
684 +var warning = _dereq_(157);
685 +
686 +var processStyleName = memoizeStringOnly(function (styleName) {
687 + return hyphenateStyleName(styleName);
688 +});
689 +
690 +var hasShorthandPropertyBug = false;
691 +var styleFloatAccessor = 'cssFloat';
692 +if (ExecutionEnvironment.canUseDOM) {
693 + var tempStyle = document.createElement('div').style;
694 + try {
695 + // IE8 throws "Invalid argument." if resetting shorthand style properties.
696 + tempStyle.font = '';
697 + } catch (e) {
698 + hasShorthandPropertyBug = true;
699 + }
700 + // IE8 only supports accessing cssFloat (standard) as styleFloat
701 + if (document.documentElement.style.cssFloat === undefined) {
702 + styleFloatAccessor = 'styleFloat';
703 + }
704 +}
705 +
706 +if ("development" !== 'production') {
707 + // 'msTransform' is correct, but the other prefixes should be capitalized
708 + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
709 +
710 + // style values shouldn't contain a semicolon
711 + var badStyleValueWithSemicolonPattern = /;\s*$/;
712 +
713 + var warnedStyleNames = {};
714 + var warnedStyleValues = {};
715 + var warnedForNaNValue = false;
716 +
717 + var warnHyphenatedStyleName = function (name, owner) {
718 + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
719 + return;
720 + }
721 +
722 + warnedStyleNames[name] = true;
723 + "development" !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
724 + };
725 +
726 + var warnBadVendoredStyleName = function (name, owner) {
727 + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
728 + return;
729 + }
730 +
731 + warnedStyleNames[name] = true;
732 + "development" !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
733 + };
734 +
735 + var warnStyleValueWithSemicolon = function (name, value, owner) {
736 + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
737 + return;
738 + }
739 +
740 + warnedStyleValues[value] = true;
741 + "development" !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
742 + };
743 +
744 + var warnStyleValueIsNaN = function (name, value, owner) {
745 + if (warnedForNaNValue) {
746 + return;
747 + }
748 +
749 + warnedForNaNValue = true;
750 + "development" !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
751 + };
752 +
753 + var checkRenderMessage = function (owner) {
754 + if (owner) {
755 + var name = owner.getName();
756 + if (name) {
757 + return ' Check the render method of `' + name + '`.';
758 + }
759 + }
760 + return '';
761 + };
762 +
763 + /**
764 + * @param {string} name
765 + * @param {*} value
766 + * @param {ReactDOMComponent} component
767 + */
768 + var warnValidStyle = function (name, value, component) {
769 + var owner;
770 + if (component) {
771 + owner = component._currentElement._owner;
772 + }
773 + if (name.indexOf('-') > -1) {
774 + warnHyphenatedStyleName(name, owner);
775 + } else if (badVendoredStyleNamePattern.test(name)) {
776 + warnBadVendoredStyleName(name, owner);
777 + } else if (badStyleValueWithSemicolonPattern.test(value)) {
778 + warnStyleValueWithSemicolon(name, value, owner);
779 + }
780 +
781 + if (typeof value === 'number' && isNaN(value)) {
782 + warnStyleValueIsNaN(name, value, owner);
783 + }
784 + };
785 +}
786 +
787 +/**
788 + * Operations for dealing with CSS properties.
789 + */
790 +var CSSPropertyOperations = {
791 +
792 + /**
793 + * Serializes a mapping of style properties for use as inline styles:
794 + *
795 + * > createMarkupForStyles({width: '200px', height: 0})
796 + * "width:200px;height:0;"
797 + *
798 + * Undefined values are ignored so that declarative programming is easier.
799 + * The result should be HTML-escaped before insertion into the DOM.
800 + *
801 + * @param {object} styles
802 + * @param {ReactDOMComponent} component
803 + * @return {?string}
804 + */
805 + createMarkupForStyles: function (styles, component) {
806 + var serialized = '';
807 + for (var styleName in styles) {
808 + if (!styles.hasOwnProperty(styleName)) {
809 + continue;
810 + }
811 + var styleValue = styles[styleName];
812 + if ("development" !== 'production') {
813 + warnValidStyle(styleName, styleValue, component);
814 + }
815 + if (styleValue != null) {
816 + serialized += processStyleName(styleName) + ':';
817 + serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
818 + }
819 + }
820 + return serialized || null;
821 + },
822 +
823 + /**
824 + * Sets the value for multiple styles on a node. If a value is specified as
825 + * '' (empty string), the corresponding style property will be unset.
826 + *
827 + * @param {DOMElement} node
828 + * @param {object} styles
829 + * @param {ReactDOMComponent} component
830 + */
831 + setValueForStyles: function (node, styles, component) {
832 + if ("development" !== 'production') {
833 + ReactInstrumentation.debugTool.onHostOperation({
834 + instanceID: component._debugID,
835 + type: 'update styles',
836 + payload: styles
837 + });
838 + }
839 +
840 + var style = node.style;
841 + for (var styleName in styles) {
842 + if (!styles.hasOwnProperty(styleName)) {
843 + continue;
844 + }
845 + if ("development" !== 'production') {
846 + warnValidStyle(styleName, styles[styleName], component);
847 + }
848 + var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
849 + if (styleName === 'float' || styleName === 'cssFloat') {
850 + styleName = styleFloatAccessor;
851 + }
852 + if (styleValue) {
853 + style[styleName] = styleValue;
854 + } else {
855 + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
856 + if (expansion) {
857 + // Shorthand property that IE8 won't like unsetting, so unset each
858 + // component to placate it
859 + for (var individualStyleName in expansion) {
860 + style[individualStyleName] = '';
861 + }
862 + } else {
863 + style[styleName] = '';
864 + }
865 + }
866 + }
867 + }
868 +
869 +};
870 +
871 +module.exports = CSSPropertyOperations;
872 +},{"106":106,"136":136,"138":138,"149":149,"153":153,"157":157,"4":4,"64":64}],6:[function(_dereq_,module,exports){
873 +/**
874 + * Copyright 2013-present, Facebook, Inc.
875 + * All rights reserved.
876 + *
877 + * This source code is licensed under the BSD-style license found in the
878 + * LICENSE file in the root directory of this source tree. An additional grant
879 + * of patent rights can be found in the PATENTS file in the same directory.
880 + *
881 + *
882 + */
883 +
884 +'use strict';
885 +
886 +var _prodInvariant = _dereq_(125);
887 +
888 +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
889 +
890 +var PooledClass = _dereq_(25);
891 +
892 +var invariant = _dereq_(150);
893 +
894 +/**
895 + * A specialized pseudo-event module to help keep track of components waiting to
896 + * be notified when their DOM representations are available for use.
897 + *
898 + * This implements `PooledClass`, so you should never need to instantiate this.
899 + * Instead, use `CallbackQueue.getPooled()`.
900 + *
901 + * @class ReactMountReady
902 + * @implements PooledClass
903 + * @internal
904 + */
905 +
906 +var CallbackQueue = function () {
907 + function CallbackQueue(arg) {
908 + _classCallCheck(this, CallbackQueue);
909 +
910 + this._callbacks = null;
911 + this._contexts = null;
912 + this._arg = arg;
913 + }
914 +
915 + /**
916 + * Enqueues a callback to be invoked when `notifyAll` is invoked.
917 + *
918 + * @param {function} callback Invoked when `notifyAll` is invoked.
919 + * @param {?object} context Context to call `callback` with.
920 + * @internal
921 + */
922 +
923 +
924 + CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
925 + this._callbacks = this._callbacks || [];
926 + this._callbacks.push(callback);
927 + this._contexts = this._contexts || [];
928 + this._contexts.push(context);
929 + };
930 +
931 + /**
932 + * Invokes all enqueued callbacks and clears the queue. This is invoked after
933 + * the DOM representation of a component has been created or updated.
934 + *
935 + * @internal
936 + */
937 +
938 +
939 + CallbackQueue.prototype.notifyAll = function notifyAll() {
940 + var callbacks = this._callbacks;
941 + var contexts = this._contexts;
942 + var arg = this._arg;
943 + if (callbacks && contexts) {
944 + !(callbacks.length === contexts.length) ? "development" !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
945 + this._callbacks = null;
946 + this._contexts = null;
947 + for (var i = 0; i < callbacks.length; i++) {
948 + callbacks[i].call(contexts[i], arg);
949 + }
950 + callbacks.length = 0;
951 + contexts.length = 0;
952 + }
953 + };
954 +
955 + CallbackQueue.prototype.checkpoint = function checkpoint() {
956 + return this._callbacks ? this._callbacks.length : 0;
957 + };
958 +
959 + CallbackQueue.prototype.rollback = function rollback(len) {
960 + if (this._callbacks && this._contexts) {
961 + this._callbacks.length = len;
962 + this._contexts.length = len;
963 + }
964 + };
965 +
966 + /**
967 + * Resets the internal queue.
968 + *
969 + * @internal
970 + */
971 +
972 +
973 + CallbackQueue.prototype.reset = function reset() {
974 + this._callbacks = null;
975 + this._contexts = null;
976 + };
977 +
978 + /**
979 + * `PooledClass` looks for this.
980 + */
981 +
982 +
983 + CallbackQueue.prototype.destructor = function destructor() {
984 + this.reset();
985 + };
986 +
987 + return CallbackQueue;
988 +}();
989 +
990 +module.exports = PooledClass.addPoolingTo(CallbackQueue);
991 +},{"125":125,"150":150,"25":25}],7:[function(_dereq_,module,exports){
992 +/**
993 + * Copyright 2013-present, Facebook, Inc.
994 + * All rights reserved.
995 + *
996 + * This source code is licensed under the BSD-style license found in the
997 + * LICENSE file in the root directory of this source tree. An additional grant
998 + * of patent rights can be found in the PATENTS file in the same directory.
999 + *
1000 + */
1001 +
1002 +'use strict';
1003 +
1004 +var EventPluginHub = _dereq_(17);
1005 +var EventPropagators = _dereq_(20);
1006 +var ExecutionEnvironment = _dereq_(136);
1007 +var ReactDOMComponentTree = _dereq_(34);
1008 +var ReactUpdates = _dereq_(82);
1009 +var SyntheticEvent = _dereq_(91);
1010 +
1011 +var getEventTarget = _dereq_(114);
1012 +var isEventSupported = _dereq_(122);
1013 +var isTextInputElement = _dereq_(123);
1014 +
1015 +var eventTypes = {
1016 + change: {
1017 + phasedRegistrationNames: {
1018 + bubbled: 'onChange',
1019 + captured: 'onChangeCapture'
1020 + },
1021 + dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
1022 + }
1023 +};
1024 +
1025 +/**
1026 + * For IE shims
1027 + */
1028 +var activeElement = null;
1029 +var activeElementInst = null;
1030 +var activeElementValue = null;
1031 +var activeElementValueProp = null;
1032 +
1033 +/**
1034 + * SECTION: handle `change` event
1035 + */
1036 +function shouldUseChangeEvent(elem) {
1037 + var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
1038 + return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
1039 +}
1040 +
1041 +var doesChangeEventBubble = false;
1042 +if (ExecutionEnvironment.canUseDOM) {
1043 + // See `handleChange` comment below
1044 + doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
1045 +}
1046 +
1047 +function manualDispatchChangeEvent(nativeEvent) {
1048 + var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
1049 + EventPropagators.accumulateTwoPhaseDispatches(event);
1050 +
1051 + // If change and propertychange bubbled, we'd just bind to it like all the
1052 + // other events and have it go through ReactBrowserEventEmitter. Since it
1053 + // doesn't, we manually listen for the events and so we have to enqueue and
1054 + // process the abstract event manually.
1055 + //
1056 + // Batching is necessary here in order to ensure that all event handlers run
1057 + // before the next rerender (including event handlers attached to ancestor
1058 + // elements instead of directly on the input). Without this, controlled
1059 + // components don't work properly in conjunction with event bubbling because
1060 + // the component is rerendered and the value reverted before all the event
1061 + // handlers can run. See https://github.com/facebook/react/issues/708.
1062 + ReactUpdates.batchedUpdates(runEventInBatch, event);
1063 +}
1064 +
1065 +function runEventInBatch(event) {
1066 + EventPluginHub.enqueueEvents(event);
1067 + EventPluginHub.processEventQueue(false);
1068 +}
1069 +
1070 +function startWatchingForChangeEventIE8(target, targetInst) {
1071 + activeElement = target;
1072 + activeElementInst = targetInst;
1073 + activeElement.attachEvent('onchange', manualDispatchChangeEvent);
1074 +}
1075 +
1076 +function stopWatchingForChangeEventIE8() {
1077 + if (!activeElement) {
1078 + return;
1079 + }
1080 + activeElement.detachEvent('onchange', manualDispatchChangeEvent);
1081 + activeElement = null;
1082 + activeElementInst = null;
1083 +}
1084 +
1085 +function getTargetInstForChangeEvent(topLevelType, targetInst) {
1086 + if (topLevelType === 'topChange') {
1087 + return targetInst;
1088 + }
1089 +}
1090 +function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
1091 + if (topLevelType === 'topFocus') {
1092 + // stopWatching() should be a noop here but we call it just in case we
1093 + // missed a blur event somehow.
1094 + stopWatchingForChangeEventIE8();
1095 + startWatchingForChangeEventIE8(target, targetInst);
1096 + } else if (topLevelType === 'topBlur') {
1097 + stopWatchingForChangeEventIE8();
1098 + }
1099 +}
1100 +
1101 +/**
1102 + * SECTION: handle `input` event
1103 + */
1104 +var isInputEventSupported = false;
1105 +if (ExecutionEnvironment.canUseDOM) {
1106 + // IE9 claims to support the input event but fails to trigger it when
1107 + // deleting text, so we ignore its input events.
1108 + // IE10+ fire input events to often, such when a placeholder
1109 + // changes or when an input with a placeholder is focused.
1110 + isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
1111 +}
1112 +
1113 +/**
1114 + * (For IE <=11) Replacement getter/setter for the `value` property that gets
1115 + * set on the active element.
1116 + */
1117 +var newValueProp = {
1118 + get: function () {
1119 + return activeElementValueProp.get.call(this);
1120 + },
1121 + set: function (val) {
1122 + // Cast to a string so we can do equality checks.
1123 + activeElementValue = '' + val;
1124 + activeElementValueProp.set.call(this, val);
1125 + }
1126 +};
1127 +
1128 +/**
1129 + * (For IE <=11) Starts tracking propertychange events on the passed-in element
1130 + * and override the value property so that we can distinguish user events from
1131 + * value changes in JS.
1132 + */
1133 +function startWatchingForValueChange(target, targetInst) {
1134 + activeElement = target;
1135 + activeElementInst = targetInst;
1136 + activeElementValue = target.value;
1137 + activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
1138 +
1139 + // Not guarded in a canDefineProperty check: IE8 supports defineProperty only
1140 + // on DOM elements
1141 + Object.defineProperty(activeElement, 'value', newValueProp);
1142 + if (activeElement.attachEvent) {
1143 + activeElement.attachEvent('onpropertychange', handlePropertyChange);
1144 + } else {
1145 + activeElement.addEventListener('propertychange', handlePropertyChange, false);
1146 + }
1147 +}
1148 +
1149 +/**
1150 + * (For IE <=11) Removes the event listeners from the currently-tracked element,
1151 + * if any exists.
1152 + */
1153 +function stopWatchingForValueChange() {
1154 + if (!activeElement) {
1155 + return;
1156 + }
1157 +
1158 + // delete restores the original property definition
1159 + delete activeElement.value;
1160 +
1161 + if (activeElement.detachEvent) {
1162 + activeElement.detachEvent('onpropertychange', handlePropertyChange);
1163 + } else {
1164 + activeElement.removeEventListener('propertychange', handlePropertyChange, false);
1165 + }
1166 +
1167 + activeElement = null;
1168 + activeElementInst = null;
1169 + activeElementValue = null;
1170 + activeElementValueProp = null;
1171 +}
1172 +
1173 +/**
1174 + * (For IE <=11) Handles a propertychange event, sending a `change` event if
1175 + * the value of the active element has changed.
1176 + */
1177 +function handlePropertyChange(nativeEvent) {
1178 + if (nativeEvent.propertyName !== 'value') {
1179 + return;
1180 + }
1181 + var value = nativeEvent.srcElement.value;
1182 + if (value === activeElementValue) {
1183 + return;
1184 + }
1185 + activeElementValue = value;
1186 +
1187 + manualDispatchChangeEvent(nativeEvent);
1188 +}
1189 +
1190 +/**
1191 + * If a `change` event should be fired, returns the target's ID.
1192 + */
1193 +function getTargetInstForInputEvent(topLevelType, targetInst) {
1194 + if (topLevelType === 'topInput') {
1195 + // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
1196 + // what we want so fall through here and trigger an abstract event
1197 + return targetInst;
1198 + }
1199 +}
1200 +
1201 +function handleEventsForInputEventIE(topLevelType, target, targetInst) {
1202 + if (topLevelType === 'topFocus') {
1203 + // In IE8, we can capture almost all .value changes by adding a
1204 + // propertychange handler and looking for events with propertyName
1205 + // equal to 'value'
1206 + // In IE9-11, propertychange fires for most input events but is buggy and
1207 + // doesn't fire when text is deleted, but conveniently, selectionchange
1208 + // appears to fire in all of the remaining cases so we catch those and
1209 + // forward the event if the value has changed
1210 + // In either case, we don't want to call the event handler if the value
1211 + // is changed from JS so we redefine a setter for `.value` that updates
1212 + // our activeElementValue variable, allowing us to ignore those changes
1213 + //
1214 + // stopWatching() should be a noop here but we call it just in case we
1215 + // missed a blur event somehow.
1216 + stopWatchingForValueChange();
1217 + startWatchingForValueChange(target, targetInst);
1218 + } else if (topLevelType === 'topBlur') {
1219 + stopWatchingForValueChange();
1220 + }
1221 +}
1222 +
1223 +// For IE8 and IE9.
1224 +function getTargetInstForInputEventIE(topLevelType, targetInst) {
1225 + if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
1226 + // On the selectionchange event, the target is just document which isn't
1227 + // helpful for us so just check activeElement instead.
1228 + //
1229 + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
1230 + // propertychange on the first input event after setting `value` from a
1231 + // script and fires only keydown, keypress, keyup. Catching keyup usually
1232 + // gets it and catching keydown lets us fire an event for the first
1233 + // keystroke if user does a key repeat (it'll be a little delayed: right
1234 + // before the second keystroke). Other input methods (e.g., paste) seem to
1235 + // fire selectionchange normally.
1236 + if (activeElement && activeElement.value !== activeElementValue) {
1237 + activeElementValue = activeElement.value;
1238 + return activeElementInst;
1239 + }
1240 + }
1241 +}
1242 +
1243 +/**
1244 + * SECTION: handle `click` event
1245 + */
1246 +function shouldUseClickEvent(elem) {
1247 + // Use the `click` event to detect changes to checkbox and radio inputs.
1248 + // This approach works across all browsers, whereas `change` does not fire
1249 + // until `blur` in IE8.
1250 + return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
1251 +}
1252 +
1253 +function getTargetInstForClickEvent(topLevelType, targetInst) {
1254 + if (topLevelType === 'topClick') {
1255 + return targetInst;
1256 + }
1257 +}
1258 +
1259 +/**
1260 + * This plugin creates an `onChange` event that normalizes change events
1261 + * across form elements. This event fires at a time when it's possible to
1262 + * change the element's value without seeing a flicker.
1263 + *
1264 + * Supported elements are:
1265 + * - input (see `isTextInputElement`)
1266 + * - textarea
1267 + * - select
1268 + */
1269 +var ChangeEventPlugin = {
1270 +
1271 + eventTypes: eventTypes,
1272 +
1273 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
1274 + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
1275 +
1276 + var getTargetInstFunc, handleEventFunc;
1277 + if (shouldUseChangeEvent(targetNode)) {
1278 + if (doesChangeEventBubble) {
1279 + getTargetInstFunc = getTargetInstForChangeEvent;
1280 + } else {
1281 + handleEventFunc = handleEventsForChangeEventIE8;
1282 + }
1283 + } else if (isTextInputElement(targetNode)) {
1284 + if (isInputEventSupported) {
1285 + getTargetInstFunc = getTargetInstForInputEvent;
1286 + } else {
1287 + getTargetInstFunc = getTargetInstForInputEventIE;
1288 + handleEventFunc = handleEventsForInputEventIE;
1289 + }
1290 + } else if (shouldUseClickEvent(targetNode)) {
1291 + getTargetInstFunc = getTargetInstForClickEvent;
1292 + }
1293 +
1294 + if (getTargetInstFunc) {
1295 + var inst = getTargetInstFunc(topLevelType, targetInst);
1296 + if (inst) {
1297 + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);
1298 + event.type = 'change';
1299 + EventPropagators.accumulateTwoPhaseDispatches(event);
1300 + return event;
1301 + }
1302 + }
1303 +
1304 + if (handleEventFunc) {
1305 + handleEventFunc(topLevelType, targetNode, targetInst);
1306 + }
1307 + }
1308 +
1309 +};
1310 +
1311 +module.exports = ChangeEventPlugin;
1312 +},{"114":114,"122":122,"123":123,"136":136,"17":17,"20":20,"34":34,"82":82,"91":91}],8:[function(_dereq_,module,exports){
1313 +/**
1314 + * Copyright 2013-present, Facebook, Inc.
1315 + * All rights reserved.
1316 + *
1317 + * This source code is licensed under the BSD-style license found in the
1318 + * LICENSE file in the root directory of this source tree. An additional grant
1319 + * of patent rights can be found in the PATENTS file in the same directory.
1320 + *
1321 + */
1322 +
1323 +'use strict';
1324 +
1325 +var DOMLazyTree = _dereq_(9);
1326 +var Danger = _dereq_(13);
1327 +var ReactDOMComponentTree = _dereq_(34);
1328 +var ReactInstrumentation = _dereq_(64);
1329 +
1330 +var createMicrosoftUnsafeLocalFunction = _dereq_(105);
1331 +var setInnerHTML = _dereq_(127);
1332 +var setTextContent = _dereq_(128);
1333 +
1334 +function getNodeAfter(parentNode, node) {
1335 + // Special case for text components, which return [open, close] comments
1336 + // from getHostNode.
1337 + if (Array.isArray(node)) {
1338 + node = node[1];
1339 + }
1340 + return node ? node.nextSibling : parentNode.firstChild;
1341 +}
1342 +
1343 +/**
1344 + * Inserts `childNode` as a child of `parentNode` at the `index`.
1345 + *
1346 + * @param {DOMElement} parentNode Parent node in which to insert.
1347 + * @param {DOMElement} childNode Child node to insert.
1348 + * @param {number} index Index at which to insert the child.
1349 + * @internal
1350 + */
1351 +var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
1352 + // We rely exclusively on `insertBefore(node, null)` instead of also using
1353 + // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
1354 + // we are careful to use `null`.)
1355 + parentNode.insertBefore(childNode, referenceNode);
1356 +});
1357 +
1358 +function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
1359 + DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
1360 +}
1361 +
1362 +function moveChild(parentNode, childNode, referenceNode) {
1363 + if (Array.isArray(childNode)) {
1364 + moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
1365 + } else {
1366 + insertChildAt(parentNode, childNode, referenceNode);
1367 + }
1368 +}
1369 +
1370 +function removeChild(parentNode, childNode) {
1371 + if (Array.isArray(childNode)) {
1372 + var closingComment = childNode[1];
1373 + childNode = childNode[0];
1374 + removeDelimitedText(parentNode, childNode, closingComment);
1375 + parentNode.removeChild(closingComment);
1376 + }
1377 + parentNode.removeChild(childNode);
1378 +}
1379 +
1380 +function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
1381 + var node = openingComment;
1382 + while (true) {
1383 + var nextNode = node.nextSibling;
1384 + insertChildAt(parentNode, node, referenceNode);
1385 + if (node === closingComment) {
1386 + break;
1387 + }
1388 + node = nextNode;
1389 + }
1390 +}
1391 +
1392 +function removeDelimitedText(parentNode, startNode, closingComment) {
1393 + while (true) {
1394 + var node = startNode.nextSibling;
1395 + if (node === closingComment) {
1396 + // The closing comment is removed by ReactMultiChild.
1397 + break;
1398 + } else {
1399 + parentNode.removeChild(node);
1400 + }
1401 + }
1402 +}
1403 +
1404 +function replaceDelimitedText(openingComment, closingComment, stringText) {
1405 + var parentNode = openingComment.parentNode;
1406 + var nodeAfterComment = openingComment.nextSibling;
1407 + if (nodeAfterComment === closingComment) {
1408 + // There are no text nodes between the opening and closing comments; insert
1409 + // a new one if stringText isn't empty.
1410 + if (stringText) {
1411 + insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
1412 + }
1413 + } else {
1414 + if (stringText) {
1415 + // Set the text content of the first node after the opening comment, and
1416 + // remove all following nodes up until the closing comment.
1417 + setTextContent(nodeAfterComment, stringText);
1418 + removeDelimitedText(parentNode, nodeAfterComment, closingComment);
1419 + } else {
1420 + removeDelimitedText(parentNode, openingComment, closingComment);
1421 + }
1422 + }
1423 +
1424 + if ("development" !== 'production') {
1425 + ReactInstrumentation.debugTool.onHostOperation({
1426 + instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
1427 + type: 'replace text',
1428 + payload: stringText
1429 + });
1430 + }
1431 +}
1432 +
1433 +var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
1434 +if ("development" !== 'production') {
1435 + dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
1436 + Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
1437 + if (prevInstance._debugID !== 0) {
1438 + ReactInstrumentation.debugTool.onHostOperation({
1439 + instanceID: prevInstance._debugID,
1440 + type: 'replace with',
1441 + payload: markup.toString()
1442 + });
1443 + } else {
1444 + var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
1445 + if (nextInstance._debugID !== 0) {
1446 + ReactInstrumentation.debugTool.onHostOperation({
1447 + instanceID: nextInstance._debugID,
1448 + type: 'mount',
1449 + payload: markup.toString()
1450 + });
1451 + }
1452 + }
1453 + };
1454 +}
1455 +
1456 +/**
1457 + * Operations for updating with DOM children.
1458 + */
1459 +var DOMChildrenOperations = {
1460 +
1461 + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
1462 +
1463 + replaceDelimitedText: replaceDelimitedText,
1464 +
1465 + /**
1466 + * Updates a component's children by processing a series of updates. The
1467 + * update configurations are each expected to have a `parentNode` property.
1468 + *
1469 + * @param {array<object>} updates List of update configurations.
1470 + * @internal
1471 + */
1472 + processUpdates: function (parentNode, updates) {
1473 + if ("development" !== 'production') {
1474 + var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
1475 + }
1476 +
1477 + for (var k = 0; k < updates.length; k++) {
1478 + var update = updates[k];
1479 + switch (update.type) {
1480 + case 'INSERT_MARKUP':
1481 + insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
1482 + if ("development" !== 'production') {
1483 + ReactInstrumentation.debugTool.onHostOperation({
1484 + instanceID: parentNodeDebugID,
1485 + type: 'insert child',
1486 + payload: { toIndex: update.toIndex, content: update.content.toString() }
1487 + });
1488 + }
1489 + break;
1490 + case 'MOVE_EXISTING':
1491 + moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
1492 + if ("development" !== 'production') {
1493 + ReactInstrumentation.debugTool.onHostOperation({
1494 + instanceID: parentNodeDebugID,
1495 + type: 'move child',
1496 + payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
1497 + });
1498 + }
1499 + break;
1500 + case 'SET_MARKUP':
1501 + setInnerHTML(parentNode, update.content);
1502 + if ("development" !== 'production') {
1503 + ReactInstrumentation.debugTool.onHostOperation({
1504 + instanceID: parentNodeDebugID,
1505 + type: 'replace children',
1506 + payload: update.content.toString()
1507 + });
1508 + }
1509 + break;
1510 + case 'TEXT_CONTENT':
1511 + setTextContent(parentNode, update.content);
1512 + if ("development" !== 'production') {
1513 + ReactInstrumentation.debugTool.onHostOperation({
1514 + instanceID: parentNodeDebugID,
1515 + type: 'replace text',
1516 + payload: update.content.toString()
1517 + });
1518 + }
1519 + break;
1520 + case 'REMOVE_NODE':
1521 + removeChild(parentNode, update.fromNode);
1522 + if ("development" !== 'production') {
1523 + ReactInstrumentation.debugTool.onHostOperation({
1524 + instanceID: parentNodeDebugID,
1525 + type: 'remove child',
1526 + payload: { fromIndex: update.fromIndex }
1527 + });
1528 + }
1529 + break;
1530 + }
1531 + }
1532 + }
1533 +
1534 +};
1535 +
1536 +module.exports = DOMChildrenOperations;
1537 +},{"105":105,"127":127,"128":128,"13":13,"34":34,"64":64,"9":9}],9:[function(_dereq_,module,exports){
1538 +/**
1539 + * Copyright 2015-present, Facebook, Inc.
1540 + * All rights reserved.
1541 + *
1542 + * This source code is licensed under the BSD-style license found in the
1543 + * LICENSE file in the root directory of this source tree. An additional grant
1544 + * of patent rights can be found in the PATENTS file in the same directory.
1545 + *
1546 + */
1547 +
1548 +'use strict';
1549 +
1550 +var DOMNamespaces = _dereq_(10);
1551 +var setInnerHTML = _dereq_(127);
1552 +
1553 +var createMicrosoftUnsafeLocalFunction = _dereq_(105);
1554 +var setTextContent = _dereq_(128);
1555 +
1556 +var ELEMENT_NODE_TYPE = 1;
1557 +var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
1558 +
1559 +/**
1560 + * In IE (8-11) and Edge, appending nodes with no children is dramatically
1561 + * faster than appending a full subtree, so we essentially queue up the
1562 + * .appendChild calls here and apply them so each node is added to its parent
1563 + * before any children are added.
1564 + *
1565 + * In other browsers, doing so is slower or neutral compared to the other order
1566 + * (in Firefox, twice as slow) so we only do this inversion in IE.
1567 + *
1568 + * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
1569 + */
1570 +var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
1571 +
1572 +function insertTreeChildren(tree) {
1573 + if (!enableLazy) {
1574 + return;
1575 + }
1576 + var node = tree.node;
1577 + var children = tree.children;
1578 + if (children.length) {
1579 + for (var i = 0; i < children.length; i++) {
1580 + insertTreeBefore(node, children[i], null);
1581 + }
1582 + } else if (tree.html != null) {
1583 + setInnerHTML(node, tree.html);
1584 + } else if (tree.text != null) {
1585 + setTextContent(node, tree.text);
1586 + }
1587 +}
1588 +
1589 +var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
1590 + // DocumentFragments aren't actually part of the DOM after insertion so
1591 + // appending children won't update the DOM. We need to ensure the fragment
1592 + // is properly populated first, breaking out of our lazy approach for just
1593 + // this level. Also, some <object> plugins (like Flash Player) will read
1594 + // <param> nodes immediately upon insertion into the DOM, so <object>
1595 + // must also be populated prior to insertion into the DOM.
1596 + if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {
1597 + insertTreeChildren(tree);
1598 + parentNode.insertBefore(tree.node, referenceNode);
1599 + } else {
1600 + parentNode.insertBefore(tree.node, referenceNode);
1601 + insertTreeChildren(tree);
1602 + }
1603 +});
1604 +
1605 +function replaceChildWithTree(oldNode, newTree) {
1606 + oldNode.parentNode.replaceChild(newTree.node, oldNode);
1607 + insertTreeChildren(newTree);
1608 +}
1609 +
1610 +function queueChild(parentTree, childTree) {
1611 + if (enableLazy) {
1612 + parentTree.children.push(childTree);
1613 + } else {
1614 + parentTree.node.appendChild(childTree.node);
1615 + }
1616 +}
1617 +
1618 +function queueHTML(tree, html) {
1619 + if (enableLazy) {
1620 + tree.html = html;
1621 + } else {
1622 + setInnerHTML(tree.node, html);
1623 + }
1624 +}
1625 +
1626 +function queueText(tree, text) {
1627 + if (enableLazy) {
1628 + tree.text = text;
1629 + } else {
1630 + setTextContent(tree.node, text);
1631 + }
1632 +}
1633 +
1634 +function toString() {
1635 + return this.node.nodeName;
1636 +}
1637 +
1638 +function DOMLazyTree(node) {
1639 + return {
1640 + node: node,
1641 + children: [],
1642 + html: null,
1643 + text: null,
1644 + toString: toString
1645 + };
1646 +}
1647 +
1648 +DOMLazyTree.insertTreeBefore = insertTreeBefore;
1649 +DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
1650 +DOMLazyTree.queueChild = queueChild;
1651 +DOMLazyTree.queueHTML = queueHTML;
1652 +DOMLazyTree.queueText = queueText;
1653 +
1654 +module.exports = DOMLazyTree;
1655 +},{"10":10,"105":105,"127":127,"128":128}],10:[function(_dereq_,module,exports){
1656 +/**
1657 + * Copyright 2013-present, Facebook, Inc.
1658 + * All rights reserved.
1659 + *
1660 + * This source code is licensed under the BSD-style license found in the
1661 + * LICENSE file in the root directory of this source tree. An additional grant
1662 + * of patent rights can be found in the PATENTS file in the same directory.
1663 + *
1664 + */
1665 +
1666 +'use strict';
1667 +
1668 +var DOMNamespaces = {
1669 + html: 'http://www.w3.org/1999/xhtml',
1670 + mathml: 'http://www.w3.org/1998/Math/MathML',
1671 + svg: 'http://www.w3.org/2000/svg'
1672 +};
1673 +
1674 +module.exports = DOMNamespaces;
1675 +},{}],11:[function(_dereq_,module,exports){
1676 +/**
1677 + * Copyright 2013-present, Facebook, Inc.
1678 + * All rights reserved.
1679 + *
1680 + * This source code is licensed under the BSD-style license found in the
1681 + * LICENSE file in the root directory of this source tree. An additional grant
1682 + * of patent rights can be found in the PATENTS file in the same directory.
1683 + *
1684 + */
1685 +
1686 +'use strict';
1687 +
1688 +var _prodInvariant = _dereq_(125);
1689 +
1690 +var invariant = _dereq_(150);
1691 +
1692 +function checkMask(value, bitmask) {
1693 + return (value & bitmask) === bitmask;
1694 +}
1695 +
1696 +var DOMPropertyInjection = {
1697 + /**
1698 + * Mapping from normalized, camelcased property names to a configuration that
1699 + * specifies how the associated DOM property should be accessed or rendered.
1700 + */
1701 + MUST_USE_PROPERTY: 0x1,
1702 + HAS_BOOLEAN_VALUE: 0x4,
1703 + HAS_NUMERIC_VALUE: 0x8,
1704 + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
1705 + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
1706 +
1707 + /**
1708 + * Inject some specialized knowledge about the DOM. This takes a config object
1709 + * with the following properties:
1710 + *
1711 + * isCustomAttribute: function that given an attribute name will return true
1712 + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
1713 + * attributes where it's impossible to enumerate all of the possible
1714 + * attribute names,
1715 + *
1716 + * Properties: object mapping DOM property name to one of the
1717 + * DOMPropertyInjection constants or null. If your attribute isn't in here,
1718 + * it won't get written to the DOM.
1719 + *
1720 + * DOMAttributeNames: object mapping React attribute name to the DOM
1721 + * attribute name. Attribute names not specified use the **lowercase**
1722 + * normalized name.
1723 + *
1724 + * DOMAttributeNamespaces: object mapping React attribute name to the DOM
1725 + * attribute namespace URL. (Attribute names not specified use no namespace.)
1726 + *
1727 + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
1728 + * Property names not specified use the normalized name.
1729 + *
1730 + * DOMMutationMethods: Properties that require special mutation methods. If
1731 + * `value` is undefined, the mutation method should unset the property.
1732 + *
1733 + * @param {object} domPropertyConfig the config as described above.
1734 + */
1735 + injectDOMPropertyConfig: function (domPropertyConfig) {
1736 + var Injection = DOMPropertyInjection;
1737 + var Properties = domPropertyConfig.Properties || {};
1738 + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
1739 + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
1740 + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
1741 + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
1742 +
1743 + if (domPropertyConfig.isCustomAttribute) {
1744 + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
1745 + }
1746 +
1747 + for (var propName in Properties) {
1748 + !!DOMProperty.properties.hasOwnProperty(propName) ? "development" !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
1749 +
1750 + var lowerCased = propName.toLowerCase();
1751 + var propConfig = Properties[propName];
1752 +
1753 + var propertyInfo = {
1754 + attributeName: lowerCased,
1755 + attributeNamespace: null,
1756 + propertyName: propName,
1757 + mutationMethod: null,
1758 +
1759 + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
1760 + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
1761 + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
1762 + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
1763 + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
1764 + };
1765 + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
1766 +
1767 + if ("development" !== 'production') {
1768 + DOMProperty.getPossibleStandardName[lowerCased] = propName;
1769 + }
1770 +
1771 + if (DOMAttributeNames.hasOwnProperty(propName)) {
1772 + var attributeName = DOMAttributeNames[propName];
1773 + propertyInfo.attributeName = attributeName;
1774 + if ("development" !== 'production') {
1775 + DOMProperty.getPossibleStandardName[attributeName] = propName;
1776 + }
1777 + }
1778 +
1779 + if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
1780 + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
1781 + }
1782 +
1783 + if (DOMPropertyNames.hasOwnProperty(propName)) {
1784 + propertyInfo.propertyName = DOMPropertyNames[propName];
1785 + }
1786 +
1787 + if (DOMMutationMethods.hasOwnProperty(propName)) {
1788 + propertyInfo.mutationMethod = DOMMutationMethods[propName];
1789 + }
1790 +
1791 + DOMProperty.properties[propName] = propertyInfo;
1792 + }
1793 + }
1794 +};
1795 +
1796 +/* eslint-disable max-len */
1797 +var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
1798 +/* eslint-enable max-len */
1799 +
1800 +/**
1801 + * DOMProperty exports lookup objects that can be used like functions:
1802 + *
1803 + * > DOMProperty.isValid['id']
1804 + * true
1805 + * > DOMProperty.isValid['foobar']
1806 + * undefined
1807 + *
1808 + * Although this may be confusing, it performs better in general.
1809 + *
1810 + * @see http://jsperf.com/key-exists
1811 + * @see http://jsperf.com/key-missing
1812 + */
1813 +var DOMProperty = {
1814 +
1815 + ID_ATTRIBUTE_NAME: 'data-reactid',
1816 + ROOT_ATTRIBUTE_NAME: 'data-reactroot',
1817 +
1818 + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
1819 + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
1820 +
1821 + /**
1822 + * Map from property "standard name" to an object with info about how to set
1823 + * the property in the DOM. Each object contains:
1824 + *
1825 + * attributeName:
1826 + * Used when rendering markup or with `*Attribute()`.
1827 + * attributeNamespace
1828 + * propertyName:
1829 + * Used on DOM node instances. (This includes properties that mutate due to
1830 + * external factors.)
1831 + * mutationMethod:
1832 + * If non-null, used instead of the property or `setAttribute()` after
1833 + * initial render.
1834 + * mustUseProperty:
1835 + * Whether the property must be accessed and mutated as an object property.
1836 + * hasBooleanValue:
1837 + * Whether the property should be removed when set to a falsey value.
1838 + * hasNumericValue:
1839 + * Whether the property must be numeric or parse as a numeric and should be
1840 + * removed when set to a falsey value.
1841 + * hasPositiveNumericValue:
1842 + * Whether the property must be positive numeric or parse as a positive
1843 + * numeric and should be removed when set to a falsey value.
1844 + * hasOverloadedBooleanValue:
1845 + * Whether the property can be used as a flag as well as with a value.
1846 + * Removed when strictly equal to false; present without a value when
1847 + * strictly equal to true; present with a value otherwise.
1848 + */
1849 + properties: {},
1850 +
1851 + /**
1852 + * Mapping from lowercase property names to the properly cased version, used
1853 + * to warn in the case of missing properties. Available only in __DEV__.
1854 + *
1855 + * autofocus is predefined, because adding it to the property whitelist
1856 + * causes unintended side effects.
1857 + *
1858 + * @type {Object}
1859 + */
1860 + getPossibleStandardName: "development" !== 'production' ? { autofocus: 'autoFocus' } : null,
1861 +
1862 + /**
1863 + * All of the isCustomAttribute() functions that have been injected.
1864 + */
1865 + _isCustomAttributeFunctions: [],
1866 +
1867 + /**
1868 + * Checks whether a property name is a custom attribute.
1869 + * @method
1870 + */
1871 + isCustomAttribute: function (attributeName) {
1872 + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
1873 + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
1874 + if (isCustomAttributeFn(attributeName)) {
1875 + return true;
1876 + }
1877 + }
1878 + return false;
1879 + },
1880 +
1881 + injection: DOMPropertyInjection
1882 +};
1883 +
1884 +module.exports = DOMProperty;
1885 +},{"125":125,"150":150}],12:[function(_dereq_,module,exports){
1886 +/**
1887 + * Copyright 2013-present, Facebook, Inc.
1888 + * All rights reserved.
1889 + *
1890 + * This source code is licensed under the BSD-style license found in the
1891 + * LICENSE file in the root directory of this source tree. An additional grant
1892 + * of patent rights can be found in the PATENTS file in the same directory.
1893 + *
1894 + */
1895 +
1896 +'use strict';
1897 +
1898 +var DOMProperty = _dereq_(11);
1899 +var ReactDOMComponentTree = _dereq_(34);
1900 +var ReactInstrumentation = _dereq_(64);
1901 +
1902 +var quoteAttributeValueForBrowser = _dereq_(124);
1903 +var warning = _dereq_(157);
1904 +
1905 +var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
1906 +var illegalAttributeNameCache = {};
1907 +var validatedAttributeNameCache = {};
1908 +
1909 +function isAttributeNameSafe(attributeName) {
1910 + if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
1911 + return true;
1912 + }
1913 + if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
1914 + return false;
1915 + }
1916 + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
1917 + validatedAttributeNameCache[attributeName] = true;
1918 + return true;
1919 + }
1920 + illegalAttributeNameCache[attributeName] = true;
1921 + "development" !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
1922 + return false;
1923 +}
1924 +
1925 +function shouldIgnoreValue(propertyInfo, value) {
1926 + return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
1927 +}
1928 +
1929 +/**
1930 + * Operations for dealing with DOM properties.
1931 + */
1932 +var DOMPropertyOperations = {
1933 +
1934 + /**
1935 + * Creates markup for the ID property.
1936 + *
1937 + * @param {string} id Unescaped ID.
1938 + * @return {string} Markup string.
1939 + */
1940 + createMarkupForID: function (id) {
1941 + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
1942 + },
1943 +
1944 + setAttributeForID: function (node, id) {
1945 + node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
1946 + },
1947 +
1948 + createMarkupForRoot: function () {
1949 + return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
1950 + },
1951 +
1952 + setAttributeForRoot: function (node) {
1953 + node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
1954 + },
1955 +
1956 + /**
1957 + * Creates markup for a property.
1958 + *
1959 + * @param {string} name
1960 + * @param {*} value
1961 + * @return {?string} Markup string, or null if the property was invalid.
1962 + */
1963 + createMarkupForProperty: function (name, value) {
1964 + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
1965 + if (propertyInfo) {
1966 + if (shouldIgnoreValue(propertyInfo, value)) {
1967 + return '';
1968 + }
1969 + var attributeName = propertyInfo.attributeName;
1970 + if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
1971 + return attributeName + '=""';
1972 + }
1973 + return attributeName + '=' + quoteAttributeValueForBrowser(value);
1974 + } else if (DOMProperty.isCustomAttribute(name)) {
1975 + if (value == null) {
1976 + return '';
1977 + }
1978 + return name + '=' + quoteAttributeValueForBrowser(value);
1979 + }
1980 + return null;
1981 + },
1982 +
1983 + /**
1984 + * Creates markup for a custom property.
1985 + *
1986 + * @param {string} name
1987 + * @param {*} value
1988 + * @return {string} Markup string, or empty string if the property was invalid.
1989 + */
1990 + createMarkupForCustomAttribute: function (name, value) {
1991 + if (!isAttributeNameSafe(name) || value == null) {
1992 + return '';
1993 + }
1994 + return name + '=' + quoteAttributeValueForBrowser(value);
1995 + },
1996 +
1997 + /**
1998 + * Sets the value for a property on a node.
1999 + *
2000 + * @param {DOMElement} node
2001 + * @param {string} name
2002 + * @param {*} value
2003 + */
2004 + setValueForProperty: function (node, name, value) {
2005 + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
2006 + if (propertyInfo) {
2007 + var mutationMethod = propertyInfo.mutationMethod;
2008 + if (mutationMethod) {
2009 + mutationMethod(node, value);
2010 + } else if (shouldIgnoreValue(propertyInfo, value)) {
2011 + this.deleteValueForProperty(node, name);
2012 + return;
2013 + } else if (propertyInfo.mustUseProperty) {
2014 + // Contrary to `setAttribute`, object properties are properly
2015 + // `toString`ed by IE8/9.
2016 + node[propertyInfo.propertyName] = value;
2017 + } else {
2018 + var attributeName = propertyInfo.attributeName;
2019 + var namespace = propertyInfo.attributeNamespace;
2020 + // `setAttribute` with objects becomes only `[object]` in IE8/9,
2021 + // ('' + value) makes it output the correct toString()-value.
2022 + if (namespace) {
2023 + node.setAttributeNS(namespace, attributeName, '' + value);
2024 + } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
2025 + node.setAttribute(attributeName, '');
2026 + } else {
2027 + node.setAttribute(attributeName, '' + value);
2028 + }
2029 + }
2030 + } else if (DOMProperty.isCustomAttribute(name)) {
2031 + DOMPropertyOperations.setValueForAttribute(node, name, value);
2032 + return;
2033 + }
2034 +
2035 + if ("development" !== 'production') {
2036 + var payload = {};
2037 + payload[name] = value;
2038 + ReactInstrumentation.debugTool.onHostOperation({
2039 + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
2040 + type: 'update attribute',
2041 + payload: payload
2042 + });
2043 + }
2044 + },
2045 +
2046 + setValueForAttribute: function (node, name, value) {
2047 + if (!isAttributeNameSafe(name)) {
2048 + return;
2049 + }
2050 + if (value == null) {
2051 + node.removeAttribute(name);
2052 + } else {
2053 + node.setAttribute(name, '' + value);
2054 + }
2055 +
2056 + if ("development" !== 'production') {
2057 + var payload = {};
2058 + payload[name] = value;
2059 + ReactInstrumentation.debugTool.onHostOperation({
2060 + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
2061 + type: 'update attribute',
2062 + payload: payload
2063 + });
2064 + }
2065 + },
2066 +
2067 + /**
2068 + * Deletes an attributes from a node.
2069 + *
2070 + * @param {DOMElement} node
2071 + * @param {string} name
2072 + */
2073 + deleteValueForAttribute: function (node, name) {
2074 + node.removeAttribute(name);
2075 + if ("development" !== 'production') {
2076 + ReactInstrumentation.debugTool.onHostOperation({
2077 + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
2078 + type: 'remove attribute',
2079 + payload: name
2080 + });
2081 + }
2082 + },
2083 +
2084 + /**
2085 + * Deletes the value for a property on a node.
2086 + *
2087 + * @param {DOMElement} node
2088 + * @param {string} name
2089 + */
2090 + deleteValueForProperty: function (node, name) {
2091 + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
2092 + if (propertyInfo) {
2093 + var mutationMethod = propertyInfo.mutationMethod;
2094 + if (mutationMethod) {
2095 + mutationMethod(node, undefined);
2096 + } else if (propertyInfo.mustUseProperty) {
2097 + var propName = propertyInfo.propertyName;
2098 + if (propertyInfo.hasBooleanValue) {
2099 + node[propName] = false;
2100 + } else {
2101 + node[propName] = '';
2102 + }
2103 + } else {
2104 + node.removeAttribute(propertyInfo.attributeName);
2105 + }
2106 + } else if (DOMProperty.isCustomAttribute(name)) {
2107 + node.removeAttribute(name);
2108 + }
2109 +
2110 + if ("development" !== 'production') {
2111 + ReactInstrumentation.debugTool.onHostOperation({
2112 + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
2113 + type: 'remove attribute',
2114 + payload: name
2115 + });
2116 + }
2117 + }
2118 +
2119 +};
2120 +
2121 +module.exports = DOMPropertyOperations;
2122 +},{"11":11,"124":124,"157":157,"34":34,"64":64}],13:[function(_dereq_,module,exports){
2123 +/**
2124 + * Copyright 2013-present, Facebook, Inc.
2125 + * All rights reserved.
2126 + *
2127 + * This source code is licensed under the BSD-style license found in the
2128 + * LICENSE file in the root directory of this source tree. An additional grant
2129 + * of patent rights can be found in the PATENTS file in the same directory.
2130 + *
2131 + */
2132 +
2133 +'use strict';
2134 +
2135 +var _prodInvariant = _dereq_(125);
2136 +
2137 +var DOMLazyTree = _dereq_(9);
2138 +var ExecutionEnvironment = _dereq_(136);
2139 +
2140 +var createNodesFromMarkup = _dereq_(141);
2141 +var emptyFunction = _dereq_(142);
2142 +var invariant = _dereq_(150);
2143 +
2144 +var Danger = {
2145 +
2146 + /**
2147 + * Replaces a node with a string of markup at its current position within its
2148 + * parent. The markup must render into a single root node.
2149 + *
2150 + * @param {DOMElement} oldChild Child node to replace.
2151 + * @param {string} markup Markup to render in place of the child node.
2152 + * @internal
2153 + */
2154 + dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
2155 + !ExecutionEnvironment.canUseDOM ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;
2156 + !markup ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
2157 + !(oldChild.nodeName !== 'HTML') ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;
2158 +
2159 + if (typeof markup === 'string') {
2160 + var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
2161 + oldChild.parentNode.replaceChild(newChild, oldChild);
2162 + } else {
2163 + DOMLazyTree.replaceChildWithTree(oldChild, markup);
2164 + }
2165 + }
2166 +
2167 +};
2168 +
2169 +module.exports = Danger;
2170 +},{"125":125,"136":136,"141":141,"142":142,"150":150,"9":9}],14:[function(_dereq_,module,exports){
2171 +/**
2172 + * Copyright 2013-present, Facebook, Inc.
2173 + * All rights reserved.
2174 + *
2175 + * This source code is licensed under the BSD-style license found in the
2176 + * LICENSE file in the root directory of this source tree. An additional grant
2177 + * of patent rights can be found in the PATENTS file in the same directory.
2178 + *
2179 + */
2180 +
2181 +'use strict';
2182 +
2183 +/**
2184 + * Module that is injectable into `EventPluginHub`, that specifies a
2185 + * deterministic ordering of `EventPlugin`s. A convenient way to reason about
2186 + * plugins, without having to package every one of them. This is better than
2187 + * having plugins be ordered in the same order that they are injected because
2188 + * that ordering would be influenced by the packaging order.
2189 + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
2190 + * preventing default on events is convenient in `SimpleEventPlugin` handlers.
2191 + */
2192 +
2193 +var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
2194 +
2195 +module.exports = DefaultEventPluginOrder;
2196 +},{}],15:[function(_dereq_,module,exports){
2197 +/**
2198 + * Copyright 2013-present, Facebook, Inc.
2199 + * All rights reserved.
2200 + *
2201 + * This source code is licensed under the BSD-style license found in the
2202 + * LICENSE file in the root directory of this source tree. An additional grant
2203 + * of patent rights can be found in the PATENTS file in the same directory.
2204 + *
2205 + */
2206 +
2207 +'use strict';
2208 +
2209 +var EventPropagators = _dereq_(20);
2210 +var ReactDOMComponentTree = _dereq_(34);
2211 +var SyntheticMouseEvent = _dereq_(95);
2212 +
2213 +var eventTypes = {
2214 + mouseEnter: {
2215 + registrationName: 'onMouseEnter',
2216 + dependencies: ['topMouseOut', 'topMouseOver']
2217 + },
2218 + mouseLeave: {
2219 + registrationName: 'onMouseLeave',
2220 + dependencies: ['topMouseOut', 'topMouseOver']
2221 + }
2222 +};
2223 +
2224 +var EnterLeaveEventPlugin = {
2225 +
2226 + eventTypes: eventTypes,
2227 +
2228 + /**
2229 + * For almost every interaction we care about, there will be both a top-level
2230 + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
2231 + * we do not extract duplicate events. However, moving the mouse into the
2232 + * browser from outside will not fire a `mouseout` event. In this case, we use
2233 + * the `mouseover` top-level event.
2234 + */
2235 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2236 + if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
2237 + return null;
2238 + }
2239 + if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
2240 + // Must not be a mouse in or mouse out - ignoring.
2241 + return null;
2242 + }
2243 +
2244 + var win;
2245 + if (nativeEventTarget.window === nativeEventTarget) {
2246 + // `nativeEventTarget` is probably a window object.
2247 + win = nativeEventTarget;
2248 + } else {
2249 + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
2250 + var doc = nativeEventTarget.ownerDocument;
2251 + if (doc) {
2252 + win = doc.defaultView || doc.parentWindow;
2253 + } else {
2254 + win = window;
2255 + }
2256 + }
2257 +
2258 + var from;
2259 + var to;
2260 + if (topLevelType === 'topMouseOut') {
2261 + from = targetInst;
2262 + var related = nativeEvent.relatedTarget || nativeEvent.toElement;
2263 + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
2264 + } else {
2265 + // Moving to a node from outside the window.
2266 + from = null;
2267 + to = targetInst;
2268 + }
2269 +
2270 + if (from === to) {
2271 + // Nothing pertains to our managed components.
2272 + return null;
2273 + }
2274 +
2275 + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
2276 + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
2277 +
2278 + var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
2279 + leave.type = 'mouseleave';
2280 + leave.target = fromNode;
2281 + leave.relatedTarget = toNode;
2282 +
2283 + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
2284 + enter.type = 'mouseenter';
2285 + enter.target = toNode;
2286 + enter.relatedTarget = fromNode;
2287 +
2288 + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
2289 +
2290 + return [leave, enter];
2291 + }
2292 +
2293 +};
2294 +
2295 +module.exports = EnterLeaveEventPlugin;
2296 +},{"20":20,"34":34,"95":95}],16:[function(_dereq_,module,exports){
2297 +/**
2298 + * Copyright 2013-present, Facebook, Inc.
2299 + * All rights reserved.
2300 + *
2301 + * This source code is licensed under the BSD-style license found in the
2302 + * LICENSE file in the root directory of this source tree. An additional grant
2303 + * of patent rights can be found in the PATENTS file in the same directory.
2304 + *
2305 + */
2306 +
2307 +'use strict';
2308 +
2309 +/**
2310 + * Types of raw signals from the browser caught at the top level.
2311 + */
2312 +var topLevelTypes = {
2313 + topAbort: null,
2314 + topAnimationEnd: null,
2315 + topAnimationIteration: null,
2316 + topAnimationStart: null,
2317 + topBlur: null,
2318 + topCanPlay: null,
2319 + topCanPlayThrough: null,
2320 + topChange: null,
2321 + topClick: null,
2322 + topCompositionEnd: null,
2323 + topCompositionStart: null,
2324 + topCompositionUpdate: null,
2325 + topContextMenu: null,
2326 + topCopy: null,
2327 + topCut: null,
2328 + topDoubleClick: null,
2329 + topDrag: null,
2330 + topDragEnd: null,
2331 + topDragEnter: null,
2332 + topDragExit: null,
2333 + topDragLeave: null,
2334 + topDragOver: null,
2335 + topDragStart: null,
2336 + topDrop: null,
2337 + topDurationChange: null,
2338 + topEmptied: null,
2339 + topEncrypted: null,
2340 + topEnded: null,
2341 + topError: null,
2342 + topFocus: null,
2343 + topInput: null,
2344 + topInvalid: null,
2345 + topKeyDown: null,
2346 + topKeyPress: null,
2347 + topKeyUp: null,
2348 + topLoad: null,
2349 + topLoadedData: null,
2350 + topLoadedMetadata: null,
2351 + topLoadStart: null,
2352 + topMouseDown: null,
2353 + topMouseMove: null,
2354 + topMouseOut: null,
2355 + topMouseOver: null,
2356 + topMouseUp: null,
2357 + topPaste: null,
2358 + topPause: null,
2359 + topPlay: null,
2360 + topPlaying: null,
2361 + topProgress: null,
2362 + topRateChange: null,
2363 + topReset: null,
2364 + topScroll: null,
2365 + topSeeked: null,
2366 + topSeeking: null,
2367 + topSelectionChange: null,
2368 + topStalled: null,
2369 + topSubmit: null,
2370 + topSuspend: null,
2371 + topTextInput: null,
2372 + topTimeUpdate: null,
2373 + topTouchCancel: null,
2374 + topTouchEnd: null,
2375 + topTouchMove: null,
2376 + topTouchStart: null,
2377 + topTransitionEnd: null,
2378 + topVolumeChange: null,
2379 + topWaiting: null,
2380 + topWheel: null
2381 +};
2382 +
2383 +var EventConstants = {
2384 + topLevelTypes: topLevelTypes
2385 +};
2386 +
2387 +module.exports = EventConstants;
2388 +},{}],17:[function(_dereq_,module,exports){
2389 +/**
2390 + * Copyright 2013-present, Facebook, Inc.
2391 + * All rights reserved.
2392 + *
2393 + * This source code is licensed under the BSD-style license found in the
2394 + * LICENSE file in the root directory of this source tree. An additional grant
2395 + * of patent rights can be found in the PATENTS file in the same directory.
2396 + *
2397 + */
2398 +
2399 +'use strict';
2400 +
2401 +var _prodInvariant = _dereq_(125);
2402 +
2403 +var EventPluginRegistry = _dereq_(18);
2404 +var EventPluginUtils = _dereq_(19);
2405 +var ReactErrorUtils = _dereq_(55);
2406 +
2407 +var accumulateInto = _dereq_(102);
2408 +var forEachAccumulated = _dereq_(110);
2409 +var invariant = _dereq_(150);
2410 +
2411 +/**
2412 + * Internal store for event listeners
2413 + */
2414 +var listenerBank = {};
2415 +
2416 +/**
2417 + * Internal queue of events that have accumulated their dispatches and are
2418 + * waiting to have their dispatches executed.
2419 + */
2420 +var eventQueue = null;
2421 +
2422 +/**
2423 + * Dispatches an event and releases it back into the pool, unless persistent.
2424 + *
2425 + * @param {?object} event Synthetic event to be dispatched.
2426 + * @param {boolean} simulated If the event is simulated (changes exn behavior)
2427 + * @private
2428 + */
2429 +var executeDispatchesAndRelease = function (event, simulated) {
2430 + if (event) {
2431 + EventPluginUtils.executeDispatchesInOrder(event, simulated);
2432 +
2433 + if (!event.isPersistent()) {
2434 + event.constructor.release(event);
2435 + }
2436 + }
2437 +};
2438 +var executeDispatchesAndReleaseSimulated = function (e) {
2439 + return executeDispatchesAndRelease(e, true);
2440 +};
2441 +var executeDispatchesAndReleaseTopLevel = function (e) {
2442 + return executeDispatchesAndRelease(e, false);
2443 +};
2444 +
2445 +var getDictionaryKey = function (inst) {
2446 + // Prevents V8 performance issue:
2447 + // https://github.com/facebook/react/pull/7232
2448 + return '.' + inst._rootNodeID;
2449 +};
2450 +
2451 +/**
2452 + * This is a unified interface for event plugins to be installed and configured.
2453 + *
2454 + * Event plugins can implement the following properties:
2455 + *
2456 + * `extractEvents` {function(string, DOMEventTarget, string, object): *}
2457 + * Required. When a top-level event is fired, this method is expected to
2458 + * extract synthetic events that will in turn be queued and dispatched.
2459 + *
2460 + * `eventTypes` {object}
2461 + * Optional, plugins that fire events must publish a mapping of registration
2462 + * names that are used to register listeners. Values of this mapping must
2463 + * be objects that contain `registrationName` or `phasedRegistrationNames`.
2464 + *
2465 + * `executeDispatch` {function(object, function, string)}
2466 + * Optional, allows plugins to override how an event gets dispatched. By
2467 + * default, the listener is simply invoked.
2468 + *
2469 + * Each plugin that is injected into `EventsPluginHub` is immediately operable.
2470 + *
2471 + * @public
2472 + */
2473 +var EventPluginHub = {
2474 +
2475 + /**
2476 + * Methods for injecting dependencies.
2477 + */
2478 + injection: {
2479 +
2480 + /**
2481 + * @param {array} InjectedEventPluginOrder
2482 + * @public
2483 + */
2484 + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
2485 +
2486 + /**
2487 + * @param {object} injectedNamesToPlugins Map from names to plugin modules.
2488 + */
2489 + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
2490 +
2491 + },
2492 +
2493 + /**
2494 + * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.
2495 + *
2496 + * @param {object} inst The instance, which is the source of events.
2497 + * @param {string} registrationName Name of listener (e.g. `onClick`).
2498 + * @param {function} listener The callback to store.
2499 + */
2500 + putListener: function (inst, registrationName, listener) {
2501 + !(typeof listener === 'function') ? "development" !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
2502 +
2503 + var key = getDictionaryKey(inst);
2504 + var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
2505 + bankForRegistrationName[key] = listener;
2506 +
2507 + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2508 + if (PluginModule && PluginModule.didPutListener) {
2509 + PluginModule.didPutListener(inst, registrationName, listener);
2510 + }
2511 + },
2512 +
2513 + /**
2514 + * @param {object} inst The instance, which is the source of events.
2515 + * @param {string} registrationName Name of listener (e.g. `onClick`).
2516 + * @return {?function} The stored callback.
2517 + */
2518 + getListener: function (inst, registrationName) {
2519 + var bankForRegistrationName = listenerBank[registrationName];
2520 + var key = getDictionaryKey(inst);
2521 + return bankForRegistrationName && bankForRegistrationName[key];
2522 + },
2523 +
2524 + /**
2525 + * Deletes a listener from the registration bank.
2526 + *
2527 + * @param {object} inst The instance, which is the source of events.
2528 + * @param {string} registrationName Name of listener (e.g. `onClick`).
2529 + */
2530 + deleteListener: function (inst, registrationName) {
2531 + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2532 + if (PluginModule && PluginModule.willDeleteListener) {
2533 + PluginModule.willDeleteListener(inst, registrationName);
2534 + }
2535 +
2536 + var bankForRegistrationName = listenerBank[registrationName];
2537 + // TODO: This should never be null -- when is it?
2538 + if (bankForRegistrationName) {
2539 + var key = getDictionaryKey(inst);
2540 + delete bankForRegistrationName[key];
2541 + }
2542 + },
2543 +
2544 + /**
2545 + * Deletes all listeners for the DOM element with the supplied ID.
2546 + *
2547 + * @param {object} inst The instance, which is the source of events.
2548 + */
2549 + deleteAllListeners: function (inst) {
2550 + var key = getDictionaryKey(inst);
2551 + for (var registrationName in listenerBank) {
2552 + if (!listenerBank.hasOwnProperty(registrationName)) {
2553 + continue;
2554 + }
2555 +
2556 + if (!listenerBank[registrationName][key]) {
2557 + continue;
2558 + }
2559 +
2560 + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2561 + if (PluginModule && PluginModule.willDeleteListener) {
2562 + PluginModule.willDeleteListener(inst, registrationName);
2563 + }
2564 +
2565 + delete listenerBank[registrationName][key];
2566 + }
2567 + },
2568 +
2569 + /**
2570 + * Allows registered plugins an opportunity to extract events from top-level
2571 + * native browser events.
2572 + *
2573 + * @return {*} An accumulation of synthetic events.
2574 + * @internal
2575 + */
2576 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2577 + var events;
2578 + var plugins = EventPluginRegistry.plugins;
2579 + for (var i = 0; i < plugins.length; i++) {
2580 + // Not every plugin in the ordering may be loaded at runtime.
2581 + var possiblePlugin = plugins[i];
2582 + if (possiblePlugin) {
2583 + var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
2584 + if (extractedEvents) {
2585 + events = accumulateInto(events, extractedEvents);
2586 + }
2587 + }
2588 + }
2589 + return events;
2590 + },
2591 +
2592 + /**
2593 + * Enqueues a synthetic event that should be dispatched when
2594 + * `processEventQueue` is invoked.
2595 + *
2596 + * @param {*} events An accumulation of synthetic events.
2597 + * @internal
2598 + */
2599 + enqueueEvents: function (events) {
2600 + if (events) {
2601 + eventQueue = accumulateInto(eventQueue, events);
2602 + }
2603 + },
2604 +
2605 + /**
2606 + * Dispatches all synthetic events on the event queue.
2607 + *
2608 + * @internal
2609 + */
2610 + processEventQueue: function (simulated) {
2611 + // Set `eventQueue` to null before processing it so that we can tell if more
2612 + // events get enqueued while processing.
2613 + var processingEventQueue = eventQueue;
2614 + eventQueue = null;
2615 + if (simulated) {
2616 + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
2617 + } else {
2618 + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
2619 + }
2620 + !!eventQueue ? "development" !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
2621 + // This would be a good time to rethrow if any of the event handlers threw.
2622 + ReactErrorUtils.rethrowCaughtError();
2623 + },
2624 +
2625 + /**
2626 + * These are needed for tests only. Do not use!
2627 + */
2628 + __purge: function () {
2629 + listenerBank = {};
2630 + },
2631 +
2632 + __getListenerBank: function () {
2633 + return listenerBank;
2634 + }
2635 +
2636 +};
2637 +
2638 +module.exports = EventPluginHub;
2639 +},{"102":102,"110":110,"125":125,"150":150,"18":18,"19":19,"55":55}],18:[function(_dereq_,module,exports){
2640 +/**
2641 + * Copyright 2013-present, Facebook, Inc.
2642 + * All rights reserved.
2643 + *
2644 + * This source code is licensed under the BSD-style license found in the
2645 + * LICENSE file in the root directory of this source tree. An additional grant
2646 + * of patent rights can be found in the PATENTS file in the same directory.
2647 + *
2648 + *
2649 + */
2650 +
2651 +'use strict';
2652 +
2653 +var _prodInvariant = _dereq_(125);
2654 +
2655 +var invariant = _dereq_(150);
2656 +
2657 +/**
2658 + * Injectable ordering of event plugins.
2659 + */
2660 +var eventPluginOrder = null;
2661 +
2662 +/**
2663 + * Injectable mapping from names to event plugin modules.
2664 + */
2665 +var namesToPlugins = {};
2666 +
2667 +/**
2668 + * Recomputes the plugin list using the injected plugins and plugin ordering.
2669 + *
2670 + * @private
2671 + */
2672 +function recomputePluginOrdering() {
2673 + if (!eventPluginOrder) {
2674 + // Wait until an `eventPluginOrder` is injected.
2675 + return;
2676 + }
2677 + for (var pluginName in namesToPlugins) {
2678 + var pluginModule = namesToPlugins[pluginName];
2679 + var pluginIndex = eventPluginOrder.indexOf(pluginName);
2680 + !(pluginIndex > -1) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
2681 + if (EventPluginRegistry.plugins[pluginIndex]) {
2682 + continue;
2683 + }
2684 + !pluginModule.extractEvents ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
2685 + EventPluginRegistry.plugins[pluginIndex] = pluginModule;
2686 + var publishedEvents = pluginModule.eventTypes;
2687 + for (var eventName in publishedEvents) {
2688 + !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
2689 + }
2690 + }
2691 +}
2692 +
2693 +/**
2694 + * Publishes an event so that it can be dispatched by the supplied plugin.
2695 + *
2696 + * @param {object} dispatchConfig Dispatch configuration for the event.
2697 + * @param {object} PluginModule Plugin publishing the event.
2698 + * @return {boolean} True if the event was successfully published.
2699 + * @private
2700 + */
2701 +function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
2702 + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
2703 + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
2704 +
2705 + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
2706 + if (phasedRegistrationNames) {
2707 + for (var phaseName in phasedRegistrationNames) {
2708 + if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
2709 + var phasedRegistrationName = phasedRegistrationNames[phaseName];
2710 + publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
2711 + }
2712 + }
2713 + return true;
2714 + } else if (dispatchConfig.registrationName) {
2715 + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
2716 + return true;
2717 + }
2718 + return false;
2719 +}
2720 +
2721 +/**
2722 + * Publishes a registration name that is used to identify dispatched events and
2723 + * can be used with `EventPluginHub.putListener` to register listeners.
2724 + *
2725 + * @param {string} registrationName Registration name to add.
2726 + * @param {object} PluginModule Plugin publishing the event.
2727 + * @private
2728 + */
2729 +function publishRegistrationName(registrationName, pluginModule, eventName) {
2730 + !!EventPluginRegistry.registrationNameModules[registrationName] ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
2731 + EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
2732 + EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
2733 +
2734 + if ("development" !== 'production') {
2735 + var lowerCasedName = registrationName.toLowerCase();
2736 + EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
2737 +
2738 + if (registrationName === 'onDoubleClick') {
2739 + EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
2740 + }
2741 + }
2742 +}
2743 +
2744 +/**
2745 + * Registers plugins so that they can extract and dispatch events.
2746 + *
2747 + * @see {EventPluginHub}
2748 + */
2749 +var EventPluginRegistry = {
2750 +
2751 + /**
2752 + * Ordered list of injected plugins.
2753 + */
2754 + plugins: [],
2755 +
2756 + /**
2757 + * Mapping from event name to dispatch config
2758 + */
2759 + eventNameDispatchConfigs: {},
2760 +
2761 + /**
2762 + * Mapping from registration name to plugin module
2763 + */
2764 + registrationNameModules: {},
2765 +
2766 + /**
2767 + * Mapping from registration name to event name
2768 + */
2769 + registrationNameDependencies: {},
2770 +
2771 + /**
2772 + * Mapping from lowercase registration names to the properly cased version,
2773 + * used to warn in the case of missing event handlers. Available
2774 + * only in __DEV__.
2775 + * @type {Object}
2776 + */
2777 + possibleRegistrationNames: "development" !== 'production' ? {} : null,
2778 + // Trust the developer to only use possibleRegistrationNames in __DEV__
2779 +
2780 + /**
2781 + * Injects an ordering of plugins (by plugin name). This allows the ordering
2782 + * to be decoupled from injection of the actual plugins so that ordering is
2783 + * always deterministic regardless of packaging, on-the-fly injection, etc.
2784 + *
2785 + * @param {array} InjectedEventPluginOrder
2786 + * @internal
2787 + * @see {EventPluginHub.injection.injectEventPluginOrder}
2788 + */
2789 + injectEventPluginOrder: function (injectedEventPluginOrder) {
2790 + !!eventPluginOrder ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;
2791 + // Clone the ordering so it cannot be dynamically mutated.
2792 + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
2793 + recomputePluginOrdering();
2794 + },
2795 +
2796 + /**
2797 + * Injects plugins to be used by `EventPluginHub`. The plugin names must be
2798 + * in the ordering injected by `injectEventPluginOrder`.
2799 + *
2800 + * Plugins can be injected as part of page initialization or on-the-fly.
2801 + *
2802 + * @param {object} injectedNamesToPlugins Map from names to plugin modules.
2803 + * @internal
2804 + * @see {EventPluginHub.injection.injectEventPluginsByName}
2805 + */
2806 + injectEventPluginsByName: function (injectedNamesToPlugins) {
2807 + var isOrderingDirty = false;
2808 + for (var pluginName in injectedNamesToPlugins) {
2809 + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
2810 + continue;
2811 + }
2812 + var pluginModule = injectedNamesToPlugins[pluginName];
2813 + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
2814 + !!namesToPlugins[pluginName] ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
2815 + namesToPlugins[pluginName] = pluginModule;
2816 + isOrderingDirty = true;
2817 + }
2818 + }
2819 + if (isOrderingDirty) {
2820 + recomputePluginOrdering();
2821 + }
2822 + },
2823 +
2824 + /**
2825 + * Looks up the plugin for the supplied event.
2826 + *
2827 + * @param {object} event A synthetic event.
2828 + * @return {?object} The plugin that created the supplied event.
2829 + * @internal
2830 + */
2831 + getPluginModuleForEvent: function (event) {
2832 + var dispatchConfig = event.dispatchConfig;
2833 + if (dispatchConfig.registrationName) {
2834 + return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
2835 + }
2836 + if (dispatchConfig.phasedRegistrationNames !== undefined) {
2837 + // pulling phasedRegistrationNames out of dispatchConfig helps Flow see
2838 + // that it is not undefined.
2839 + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
2840 +
2841 + for (var phase in phasedRegistrationNames) {
2842 + if (!phasedRegistrationNames.hasOwnProperty(phase)) {
2843 + continue;
2844 + }
2845 + var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
2846 + if (pluginModule) {
2847 + return pluginModule;
2848 + }
2849 + }
2850 + }
2851 + return null;
2852 + },
2853 +
2854 + /**
2855 + * Exposed for unit testing.
2856 + * @private
2857 + */
2858 + _resetEventPlugins: function () {
2859 + eventPluginOrder = null;
2860 + for (var pluginName in namesToPlugins) {
2861 + if (namesToPlugins.hasOwnProperty(pluginName)) {
2862 + delete namesToPlugins[pluginName];
2863 + }
2864 + }
2865 + EventPluginRegistry.plugins.length = 0;
2866 +
2867 + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
2868 + for (var eventName in eventNameDispatchConfigs) {
2869 + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
2870 + delete eventNameDispatchConfigs[eventName];
2871 + }
2872 + }
2873 +
2874 + var registrationNameModules = EventPluginRegistry.registrationNameModules;
2875 + for (var registrationName in registrationNameModules) {
2876 + if (registrationNameModules.hasOwnProperty(registrationName)) {
2877 + delete registrationNameModules[registrationName];
2878 + }
2879 + }
2880 +
2881 + if ("development" !== 'production') {
2882 + var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
2883 + for (var lowerCasedName in possibleRegistrationNames) {
2884 + if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
2885 + delete possibleRegistrationNames[lowerCasedName];
2886 + }
2887 + }
2888 + }
2889 + }
2890 +
2891 +};
2892 +
2893 +module.exports = EventPluginRegistry;
2894 +},{"125":125,"150":150}],19:[function(_dereq_,module,exports){
2895 +/**
2896 + * Copyright 2013-present, Facebook, Inc.
2897 + * All rights reserved.
2898 + *
2899 + * This source code is licensed under the BSD-style license found in the
2900 + * LICENSE file in the root directory of this source tree. An additional grant
2901 + * of patent rights can be found in the PATENTS file in the same directory.
2902 + *
2903 + */
2904 +
2905 +'use strict';
2906 +
2907 +var _prodInvariant = _dereq_(125);
2908 +
2909 +var ReactErrorUtils = _dereq_(55);
2910 +
2911 +var invariant = _dereq_(150);
2912 +var warning = _dereq_(157);
2913 +
2914 +/**
2915 + * Injected dependencies:
2916 + */
2917 +
2918 +/**
2919 + * - `ComponentTree`: [required] Module that can convert between React instances
2920 + * and actual node references.
2921 + */
2922 +var ComponentTree;
2923 +var TreeTraversal;
2924 +var injection = {
2925 + injectComponentTree: function (Injected) {
2926 + ComponentTree = Injected;
2927 + if ("development" !== 'production') {
2928 + "development" !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
2929 + }
2930 + },
2931 + injectTreeTraversal: function (Injected) {
2932 + TreeTraversal = Injected;
2933 + if ("development" !== 'production') {
2934 + "development" !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
2935 + }
2936 + }
2937 +};
2938 +
2939 +function isEndish(topLevelType) {
2940 + return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
2941 +}
2942 +
2943 +function isMoveish(topLevelType) {
2944 + return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
2945 +}
2946 +function isStartish(topLevelType) {
2947 + return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
2948 +}
2949 +
2950 +var validateEventDispatches;
2951 +if ("development" !== 'production') {
2952 + validateEventDispatches = function (event) {
2953 + var dispatchListeners = event._dispatchListeners;
2954 + var dispatchInstances = event._dispatchInstances;
2955 +
2956 + var listenersIsArr = Array.isArray(dispatchListeners);
2957 + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
2958 +
2959 + var instancesIsArr = Array.isArray(dispatchInstances);
2960 + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
2961 +
2962 + "development" !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
2963 + };
2964 +}
2965 +
2966 +/**
2967 + * Dispatch the event to the listener.
2968 + * @param {SyntheticEvent} event SyntheticEvent to handle
2969 + * @param {boolean} simulated If the event is simulated (changes exn behavior)
2970 + * @param {function} listener Application-level callback
2971 + * @param {*} inst Internal component instance
2972 + */
2973 +function executeDispatch(event, simulated, listener, inst) {
2974 + var type = event.type || 'unknown-event';
2975 + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
2976 + if (simulated) {
2977 + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
2978 + } else {
2979 + ReactErrorUtils.invokeGuardedCallback(type, listener, event);
2980 + }
2981 + event.currentTarget = null;
2982 +}
2983 +
2984 +/**
2985 + * Standard/simple iteration through an event's collected dispatches.
2986 + */
2987 +function executeDispatchesInOrder(event, simulated) {
2988 + var dispatchListeners = event._dispatchListeners;
2989 + var dispatchInstances = event._dispatchInstances;
2990 + if ("development" !== 'production') {
2991 + validateEventDispatches(event);
2992 + }
2993 + if (Array.isArray(dispatchListeners)) {
2994 + for (var i = 0; i < dispatchListeners.length; i++) {
2995 + if (event.isPropagationStopped()) {
2996 + break;
2997 + }
2998 + // Listeners and Instances are two parallel arrays that are always in sync.
2999 + executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
3000 + }
3001 + } else if (dispatchListeners) {
3002 + executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
3003 + }
3004 + event._dispatchListeners = null;
3005 + event._dispatchInstances = null;
3006 +}
3007 +
3008 +/**
3009 + * Standard/simple iteration through an event's collected dispatches, but stops
3010 + * at the first dispatch execution returning true, and returns that id.
3011 + *
3012 + * @return {?string} id of the first dispatch execution who's listener returns
3013 + * true, or null if no listener returned true.
3014 + */
3015 +function executeDispatchesInOrderStopAtTrueImpl(event) {
3016 + var dispatchListeners = event._dispatchListeners;
3017 + var dispatchInstances = event._dispatchInstances;
3018 + if ("development" !== 'production') {
3019 + validateEventDispatches(event);
3020 + }
3021 + if (Array.isArray(dispatchListeners)) {
3022 + for (var i = 0; i < dispatchListeners.length; i++) {
3023 + if (event.isPropagationStopped()) {
3024 + break;
3025 + }
3026 + // Listeners and Instances are two parallel arrays that are always in sync.
3027 + if (dispatchListeners[i](event, dispatchInstances[i])) {
3028 + return dispatchInstances[i];
3029 + }
3030 + }
3031 + } else if (dispatchListeners) {
3032 + if (dispatchListeners(event, dispatchInstances)) {
3033 + return dispatchInstances;
3034 + }
3035 + }
3036 + return null;
3037 +}
3038 +
3039 +/**
3040 + * @see executeDispatchesInOrderStopAtTrueImpl
3041 + */
3042 +function executeDispatchesInOrderStopAtTrue(event) {
3043 + var ret = executeDispatchesInOrderStopAtTrueImpl(event);
3044 + event._dispatchInstances = null;
3045 + event._dispatchListeners = null;
3046 + return ret;
3047 +}
3048 +
3049 +/**
3050 + * Execution of a "direct" dispatch - there must be at most one dispatch
3051 + * accumulated on the event or it is considered an error. It doesn't really make
3052 + * sense for an event with multiple dispatches (bubbled) to keep track of the
3053 + * return values at each dispatch execution, but it does tend to make sense when
3054 + * dealing with "direct" dispatches.
3055 + *
3056 + * @return {*} The return value of executing the single dispatch.
3057 + */
3058 +function executeDirectDispatch(event) {
3059 + if ("development" !== 'production') {
3060 + validateEventDispatches(event);
3061 + }
3062 + var dispatchListener = event._dispatchListeners;
3063 + var dispatchInstance = event._dispatchInstances;
3064 + !!Array.isArray(dispatchListener) ? "development" !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
3065 + event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
3066 + var res = dispatchListener ? dispatchListener(event) : null;
3067 + event.currentTarget = null;
3068 + event._dispatchListeners = null;
3069 + event._dispatchInstances = null;
3070 + return res;
3071 +}
3072 +
3073 +/**
3074 + * @param {SyntheticEvent} event
3075 + * @return {boolean} True iff number of dispatches accumulated is greater than 0.
3076 + */
3077 +function hasDispatches(event) {
3078 + return !!event._dispatchListeners;
3079 +}
3080 +
3081 +/**
3082 + * General utilities that are useful in creating custom Event Plugins.
3083 + */
3084 +var EventPluginUtils = {
3085 + isEndish: isEndish,
3086 + isMoveish: isMoveish,
3087 + isStartish: isStartish,
3088 +
3089 + executeDirectDispatch: executeDirectDispatch,
3090 + executeDispatchesInOrder: executeDispatchesInOrder,
3091 + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
3092 + hasDispatches: hasDispatches,
3093 +
3094 + getInstanceFromNode: function (node) {
3095 + return ComponentTree.getInstanceFromNode(node);
3096 + },
3097 + getNodeFromInstance: function (node) {
3098 + return ComponentTree.getNodeFromInstance(node);
3099 + },
3100 + isAncestor: function (a, b) {
3101 + return TreeTraversal.isAncestor(a, b);
3102 + },
3103 + getLowestCommonAncestor: function (a, b) {
3104 + return TreeTraversal.getLowestCommonAncestor(a, b);
3105 + },
3106 + getParentInstance: function (inst) {
3107 + return TreeTraversal.getParentInstance(inst);
3108 + },
3109 + traverseTwoPhase: function (target, fn, arg) {
3110 + return TreeTraversal.traverseTwoPhase(target, fn, arg);
3111 + },
3112 + traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
3113 + return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
3114 + },
3115 +
3116 + injection: injection
3117 +};
3118 +
3119 +module.exports = EventPluginUtils;
3120 +},{"125":125,"150":150,"157":157,"55":55}],20:[function(_dereq_,module,exports){
3121 +/**
3122 + * Copyright 2013-present, Facebook, Inc.
3123 + * All rights reserved.
3124 + *
3125 + * This source code is licensed under the BSD-style license found in the
3126 + * LICENSE file in the root directory of this source tree. An additional grant
3127 + * of patent rights can be found in the PATENTS file in the same directory.
3128 + *
3129 + */
3130 +
3131 +'use strict';
3132 +
3133 +var EventPluginHub = _dereq_(17);
3134 +var EventPluginUtils = _dereq_(19);
3135 +
3136 +var accumulateInto = _dereq_(102);
3137 +var forEachAccumulated = _dereq_(110);
3138 +var warning = _dereq_(157);
3139 +
3140 +var getListener = EventPluginHub.getListener;
3141 +
3142 +/**
3143 + * Some event types have a notion of different registration names for different
3144 + * "phases" of propagation. This finds listeners by a given phase.
3145 + */
3146 +function listenerAtPhase(inst, event, propagationPhase) {
3147 + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
3148 + return getListener(inst, registrationName);
3149 +}
3150 +
3151 +/**
3152 + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
3153 + * here, allows us to not have to bind or create functions for each event.
3154 + * Mutating the event's members allows us to not have to create a wrapping
3155 + * "dispatch" object that pairs the event with the listener.
3156 + */
3157 +function accumulateDirectionalDispatches(inst, phase, event) {
3158 + if ("development" !== 'production') {
3159 + "development" !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
3160 + }
3161 + var listener = listenerAtPhase(inst, event, phase);
3162 + if (listener) {
3163 + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
3164 + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
3165 + }
3166 +}
3167 +
3168 +/**
3169 + * Collect dispatches (must be entirely collected before dispatching - see unit
3170 + * tests). Lazily allocate the array to conserve memory. We must loop through
3171 + * each event and perform the traversal for each one. We cannot perform a
3172 + * single traversal for the entire collection of events because each event may
3173 + * have a different target.
3174 + */
3175 +function accumulateTwoPhaseDispatchesSingle(event) {
3176 + if (event && event.dispatchConfig.phasedRegistrationNames) {
3177 + EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
3178 + }
3179 +}
3180 +
3181 +/**
3182 + * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
3183 + */
3184 +function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
3185 + if (event && event.dispatchConfig.phasedRegistrationNames) {
3186 + var targetInst = event._targetInst;
3187 + var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
3188 + EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
3189 + }
3190 +}
3191 +
3192 +/**
3193 + * Accumulates without regard to direction, does not look for phased
3194 + * registration names. Same as `accumulateDirectDispatchesSingle` but without
3195 + * requiring that the `dispatchMarker` be the same as the dispatched ID.
3196 + */
3197 +function accumulateDispatches(inst, ignoredDirection, event) {
3198 + if (event && event.dispatchConfig.registrationName) {
3199 + var registrationName = event.dispatchConfig.registrationName;
3200 + var listener = getListener(inst, registrationName);
3201 + if (listener) {
3202 + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
3203 + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
3204 + }
3205 + }
3206 +}
3207 +
3208 +/**
3209 + * Accumulates dispatches on an `SyntheticEvent`, but only for the
3210 + * `dispatchMarker`.
3211 + * @param {SyntheticEvent} event
3212 + */
3213 +function accumulateDirectDispatchesSingle(event) {
3214 + if (event && event.dispatchConfig.registrationName) {
3215 + accumulateDispatches(event._targetInst, null, event);
3216 + }
3217 +}
3218 +
3219 +function accumulateTwoPhaseDispatches(events) {
3220 + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
3221 +}
3222 +
3223 +function accumulateTwoPhaseDispatchesSkipTarget(events) {
3224 + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
3225 +}
3226 +
3227 +function accumulateEnterLeaveDispatches(leave, enter, from, to) {
3228 + EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
3229 +}
3230 +
3231 +function accumulateDirectDispatches(events) {
3232 + forEachAccumulated(events, accumulateDirectDispatchesSingle);
3233 +}
3234 +
3235 +/**
3236 + * A small set of propagation patterns, each of which will accept a small amount
3237 + * of information, and generate a set of "dispatch ready event objects" - which
3238 + * are sets of events that have already been annotated with a set of dispatched
3239 + * listener functions/ids. The API is designed this way to discourage these
3240 + * propagation strategies from actually executing the dispatches, since we
3241 + * always want to collect the entire set of dispatches before executing event a
3242 + * single one.
3243 + *
3244 + * @constructor EventPropagators
3245 + */
3246 +var EventPropagators = {
3247 + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
3248 + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
3249 + accumulateDirectDispatches: accumulateDirectDispatches,
3250 + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
3251 +};
3252 +
3253 +module.exports = EventPropagators;
3254 +},{"102":102,"110":110,"157":157,"17":17,"19":19}],21:[function(_dereq_,module,exports){
3255 +/**
3256 + * Copyright 2013-present, Facebook, Inc.
3257 + * All rights reserved.
3258 + *
3259 + * This source code is licensed under the BSD-style license found in the
3260 + * LICENSE file in the root directory of this source tree. An additional grant
3261 + * of patent rights can be found in the PATENTS file in the same directory.
3262 + *
3263 + */
3264 +
3265 +'use strict';
3266 +
3267 +var _assign = _dereq_(158);
3268 +
3269 +var PooledClass = _dereq_(25);
3270 +
3271 +var getTextContentAccessor = _dereq_(119);
3272 +
3273 +/**
3274 + * This helper class stores information about text content of a target node,
3275 + * allowing comparison of content before and after a given event.
3276 + *
3277 + * Identify the node where selection currently begins, then observe
3278 + * both its text content and its current position in the DOM. Since the
3279 + * browser may natively replace the target node during composition, we can
3280 + * use its position to find its replacement.
3281 + *
3282 + * @param {DOMEventTarget} root
3283 + */
3284 +function FallbackCompositionState(root) {
3285 + this._root = root;
3286 + this._startText = this.getText();
3287 + this._fallbackText = null;
3288 +}
3289 +
3290 +_assign(FallbackCompositionState.prototype, {
3291 + destructor: function () {
3292 + this._root = null;
3293 + this._startText = null;
3294 + this._fallbackText = null;
3295 + },
3296 +
3297 + /**
3298 + * Get current text of input.
3299 + *
3300 + * @return {string}
3301 + */
3302 + getText: function () {
3303 + if ('value' in this._root) {
3304 + return this._root.value;
3305 + }
3306 + return this._root[getTextContentAccessor()];
3307 + },
3308 +
3309 + /**
3310 + * Determine the differing substring between the initially stored
3311 + * text content and the current content.
3312 + *
3313 + * @return {string}
3314 + */
3315 + getData: function () {
3316 + if (this._fallbackText) {
3317 + return this._fallbackText;
3318 + }
3319 +
3320 + var start;
3321 + var startValue = this._startText;
3322 + var startLength = startValue.length;
3323 + var end;
3324 + var endValue = this.getText();
3325 + var endLength = endValue.length;
3326 +
3327 + for (start = 0; start < startLength; start++) {
3328 + if (startValue[start] !== endValue[start]) {
3329 + break;
3330 + }
3331 + }
3332 +
3333 + var minEnd = startLength - start;
3334 + for (end = 1; end <= minEnd; end++) {
3335 + if (startValue[startLength - end] !== endValue[endLength - end]) {
3336 + break;
3337 + }
3338 + }
3339 +
3340 + var sliceTail = end > 1 ? 1 - end : undefined;
3341 + this._fallbackText = endValue.slice(start, sliceTail);
3342 + return this._fallbackText;
3343 + }
3344 +});
3345 +
3346 +PooledClass.addPoolingTo(FallbackCompositionState);
3347 +
3348 +module.exports = FallbackCompositionState;
3349 +},{"119":119,"158":158,"25":25}],22:[function(_dereq_,module,exports){
3350 +/**
3351 + * Copyright 2013-present, Facebook, Inc.
3352 + * All rights reserved.
3353 + *
3354 + * This source code is licensed under the BSD-style license found in the
3355 + * LICENSE file in the root directory of this source tree. An additional grant
3356 + * of patent rights can be found in the PATENTS file in the same directory.
3357 + *
3358 + */
3359 +
3360 +'use strict';
3361 +
3362 +var DOMProperty = _dereq_(11);
3363 +
3364 +var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
3365 +var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
3366 +var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
3367 +var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
3368 +var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
3369 +
3370 +var HTMLDOMPropertyConfig = {
3371 + isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
3372 + Properties: {
3373 + /**
3374 + * Standard Properties
3375 + */
3376 + accept: 0,
3377 + acceptCharset: 0,
3378 + accessKey: 0,
3379 + action: 0,
3380 + allowFullScreen: HAS_BOOLEAN_VALUE,
3381 + allowTransparency: 0,
3382 + alt: 0,
3383 + // specifies target context for links with `preload` type
3384 + as: 0,
3385 + async: HAS_BOOLEAN_VALUE,
3386 + autoComplete: 0,
3387 + // autoFocus is polyfilled/normalized by AutoFocusUtils
3388 + // autoFocus: HAS_BOOLEAN_VALUE,
3389 + autoPlay: HAS_BOOLEAN_VALUE,
3390 + capture: HAS_BOOLEAN_VALUE,
3391 + cellPadding: 0,
3392 + cellSpacing: 0,
3393 + charSet: 0,
3394 + challenge: 0,
3395 + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3396 + cite: 0,
3397 + classID: 0,
3398 + className: 0,
3399 + cols: HAS_POSITIVE_NUMERIC_VALUE,
3400 + colSpan: 0,
3401 + content: 0,
3402 + contentEditable: 0,
3403 + contextMenu: 0,
3404 + controls: HAS_BOOLEAN_VALUE,
3405 + coords: 0,
3406 + crossOrigin: 0,
3407 + data: 0, // For `<object />` acts as `src`.
3408 + dateTime: 0,
3409 + 'default': HAS_BOOLEAN_VALUE,
3410 + defer: HAS_BOOLEAN_VALUE,
3411 + dir: 0,
3412 + disabled: HAS_BOOLEAN_VALUE,
3413 + download: HAS_OVERLOADED_BOOLEAN_VALUE,
3414 + draggable: 0,
3415 + encType: 0,
3416 + form: 0,
3417 + formAction: 0,
3418 + formEncType: 0,
3419 + formMethod: 0,
3420 + formNoValidate: HAS_BOOLEAN_VALUE,
3421 + formTarget: 0,
3422 + frameBorder: 0,
3423 + headers: 0,
3424 + height: 0,
3425 + hidden: HAS_BOOLEAN_VALUE,
3426 + high: 0,
3427 + href: 0,
3428 + hrefLang: 0,
3429 + htmlFor: 0,
3430 + httpEquiv: 0,
3431 + icon: 0,
3432 + id: 0,
3433 + inputMode: 0,
3434 + integrity: 0,
3435 + is: 0,
3436 + keyParams: 0,
3437 + keyType: 0,
3438 + kind: 0,
3439 + label: 0,
3440 + lang: 0,
3441 + list: 0,
3442 + loop: HAS_BOOLEAN_VALUE,
3443 + low: 0,
3444 + manifest: 0,
3445 + marginHeight: 0,
3446 + marginWidth: 0,
3447 + max: 0,
3448 + maxLength: 0,
3449 + media: 0,
3450 + mediaGroup: 0,
3451 + method: 0,
3452 + min: 0,
3453 + minLength: 0,
3454 + // Caution; `option.selected` is not updated if `select.multiple` is
3455 + // disabled with `removeAttribute`.
3456 + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3457 + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3458 + name: 0,
3459 + nonce: 0,
3460 + noValidate: HAS_BOOLEAN_VALUE,
3461 + open: HAS_BOOLEAN_VALUE,
3462 + optimum: 0,
3463 + pattern: 0,
3464 + placeholder: 0,
3465 + playsInline: HAS_BOOLEAN_VALUE,
3466 + poster: 0,
3467 + preload: 0,
3468 + profile: 0,
3469 + radioGroup: 0,
3470 + readOnly: HAS_BOOLEAN_VALUE,
3471 + referrerPolicy: 0,
3472 + rel: 0,
3473 + required: HAS_BOOLEAN_VALUE,
3474 + reversed: HAS_BOOLEAN_VALUE,
3475 + role: 0,
3476 + rows: HAS_POSITIVE_NUMERIC_VALUE,
3477 + rowSpan: HAS_NUMERIC_VALUE,
3478 + sandbox: 0,
3479 + scope: 0,
3480 + scoped: HAS_BOOLEAN_VALUE,
3481 + scrolling: 0,
3482 + seamless: HAS_BOOLEAN_VALUE,
3483 + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3484 + shape: 0,
3485 + size: HAS_POSITIVE_NUMERIC_VALUE,
3486 + sizes: 0,
3487 + span: HAS_POSITIVE_NUMERIC_VALUE,
3488 + spellCheck: 0,
3489 + src: 0,
3490 + srcDoc: 0,
3491 + srcLang: 0,
3492 + srcSet: 0,
3493 + start: HAS_NUMERIC_VALUE,
3494 + step: 0,
3495 + style: 0,
3496 + summary: 0,
3497 + tabIndex: 0,
3498 + target: 0,
3499 + title: 0,
3500 + // Setting .type throws on non-<input> tags
3501 + type: 0,
3502 + useMap: 0,
3503 + value: 0,
3504 + width: 0,
3505 + wmode: 0,
3506 + wrap: 0,
3507 +
3508 + /**
3509 + * RDFa Properties
3510 + */
3511 + about: 0,
3512 + datatype: 0,
3513 + inlist: 0,
3514 + prefix: 0,
3515 + // property is also supported for OpenGraph in meta tags.
3516 + property: 0,
3517 + resource: 0,
3518 + 'typeof': 0,
3519 + vocab: 0,
3520 +
3521 + /**
3522 + * Non-standard Properties
3523 + */
3524 + // autoCapitalize and autoCorrect are supported in Mobile Safari for
3525 + // keyboard hints.
3526 + autoCapitalize: 0,
3527 + autoCorrect: 0,
3528 + // autoSave allows WebKit/Blink to persist values of input fields on page reloads
3529 + autoSave: 0,
3530 + // color is for Safari mask-icon link
3531 + color: 0,
3532 + // itemProp, itemScope, itemType are for
3533 + // Microdata support. See http://schema.org/docs/gs.html
3534 + itemProp: 0,
3535 + itemScope: HAS_BOOLEAN_VALUE,
3536 + itemType: 0,
3537 + // itemID and itemRef are for Microdata support as well but
3538 + // only specified in the WHATWG spec document. See
3539 + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
3540 + itemID: 0,
3541 + itemRef: 0,
3542 + // results show looking glass icon and recent searches on input
3543 + // search fields in WebKit/Blink
3544 + results: 0,
3545 + // IE-only attribute that specifies security restrictions on an iframe
3546 + // as an alternative to the sandbox attribute on IE<10
3547 + security: 0,
3548 + // IE-only attribute that controls focus behavior
3549 + unselectable: 0
3550 + },
3551 + DOMAttributeNames: {
3552 + acceptCharset: 'accept-charset',
3553 + className: 'class',
3554 + htmlFor: 'for',
3555 + httpEquiv: 'http-equiv'
3556 + },
3557 + DOMPropertyNames: {}
3558 +};
3559 +
3560 +module.exports = HTMLDOMPropertyConfig;
3561 +},{"11":11}],23:[function(_dereq_,module,exports){
3562 +/**
3563 + * Copyright 2013-present, Facebook, Inc.
3564 + * All rights reserved.
3565 + *
3566 + * This source code is licensed under the BSD-style license found in the
3567 + * LICENSE file in the root directory of this source tree. An additional grant
3568 + * of patent rights can be found in the PATENTS file in the same directory.
3569 + *
3570 + *
3571 + */
3572 +
3573 +'use strict';
3574 +
3575 +/**
3576 + * Escape and wrap key so it is safe to use as a reactid
3577 + *
3578 + * @param {string} key to be escaped.
3579 + * @return {string} the escaped key.
3580 + */
3581 +
3582 +function escape(key) {
3583 + var escapeRegex = /[=:]/g;
3584 + var escaperLookup = {
3585 + '=': '=0',
3586 + ':': '=2'
3587 + };
3588 + var escapedString = ('' + key).replace(escapeRegex, function (match) {
3589 + return escaperLookup[match];
3590 + });
3591 +
3592 + return '$' + escapedString;
3593 +}
3594 +
3595 +/**
3596 + * Unescape and unwrap key for human-readable display
3597 + *
3598 + * @param {string} key to unescape.
3599 + * @return {string} the unescaped key.
3600 + */
3601 +function unescape(key) {
3602 + var unescapeRegex = /(=0|=2)/g;
3603 + var unescaperLookup = {
3604 + '=0': '=',
3605 + '=2': ':'
3606 + };
3607 + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
3608 +
3609 + return ('' + keySubstring).replace(unescapeRegex, function (match) {
3610 + return unescaperLookup[match];
3611 + });
3612 +}
3613 +
3614 +var KeyEscapeUtils = {
3615 + escape: escape,
3616 + unescape: unescape
3617 +};
3618 +
3619 +module.exports = KeyEscapeUtils;
3620 +},{}],24:[function(_dereq_,module,exports){
3621 +/**
3622 + * Copyright 2013-present, Facebook, Inc.
3623 + * All rights reserved.
3624 + *
3625 + * This source code is licensed under the BSD-style license found in the
3626 + * LICENSE file in the root directory of this source tree. An additional grant
3627 + * of patent rights can be found in the PATENTS file in the same directory.
3628 + *
3629 + */
3630 +
3631 +'use strict';
3632 +
3633 +var _prodInvariant = _dereq_(125);
3634 +
3635 +var React = _dereq_(134);
3636 +var ReactPropTypesSecret = _dereq_(73);
3637 +
3638 +var invariant = _dereq_(150);
3639 +var warning = _dereq_(157);
3640 +
3641 +var hasReadOnlyValue = {
3642 + 'button': true,
3643 + 'checkbox': true,
3644 + 'image': true,
3645 + 'hidden': true,
3646 + 'radio': true,
3647 + 'reset': true,
3648 + 'submit': true
3649 +};
3650 +
3651 +function _assertSingleLink(inputProps) {
3652 + !(inputProps.checkedLink == null || inputProps.valueLink == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;
3653 +}
3654 +function _assertValueLink(inputProps) {
3655 + _assertSingleLink(inputProps);
3656 + !(inputProps.value == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0;
3657 +}
3658 +
3659 +function _assertCheckedLink(inputProps) {
3660 + _assertSingleLink(inputProps);
3661 + !(inputProps.checked == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0;
3662 +}
3663 +
3664 +var propTypes = {
3665 + value: function (props, propName, componentName) {
3666 + if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
3667 + return null;
3668 + }
3669 + return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
3670 + },
3671 + checked: function (props, propName, componentName) {
3672 + if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
3673 + return null;
3674 + }
3675 + return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
3676 + },
3677 + onChange: React.PropTypes.func
3678 +};
3679 +
3680 +var loggedTypeFailures = {};
3681 +function getDeclarationErrorAddendum(owner) {
3682 + if (owner) {
3683 + var name = owner.getName();
3684 + if (name) {
3685 + return ' Check the render method of `' + name + '`.';
3686 + }
3687 + }
3688 + return '';
3689 +}
3690 +
3691 +/**
3692 + * Provide a linked `value` attribute for controlled forms. You should not use
3693 + * this outside of the ReactDOM controlled form components.
3694 + */
3695 +var LinkedValueUtils = {
3696 + checkPropTypes: function (tagName, props, owner) {
3697 + for (var propName in propTypes) {
3698 + if (propTypes.hasOwnProperty(propName)) {
3699 + var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
3700 + }
3701 + if (error instanceof Error && !(error.message in loggedTypeFailures)) {
3702 + // Only monitor this failure once because there tends to be a lot of the
3703 + // same error.
3704 + loggedTypeFailures[error.message] = true;
3705 +
3706 + var addendum = getDeclarationErrorAddendum(owner);
3707 + "development" !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
3708 + }
3709 + }
3710 + },
3711 +
3712 + /**
3713 + * @param {object} inputProps Props for form component
3714 + * @return {*} current value of the input either from value prop or link.
3715 + */
3716 + getValue: function (inputProps) {
3717 + if (inputProps.valueLink) {
3718 + _assertValueLink(inputProps);
3719 + return inputProps.valueLink.value;
3720 + }
3721 + return inputProps.value;
3722 + },
3723 +
3724 + /**
3725 + * @param {object} inputProps Props for form component
3726 + * @return {*} current checked status of the input either from checked prop
3727 + * or link.
3728 + */
3729 + getChecked: function (inputProps) {
3730 + if (inputProps.checkedLink) {
3731 + _assertCheckedLink(inputProps);
3732 + return inputProps.checkedLink.value;
3733 + }
3734 + return inputProps.checked;
3735 + },
3736 +
3737 + /**
3738 + * @param {object} inputProps Props for form component
3739 + * @param {SyntheticEvent} event change event to handle
3740 + */
3741 + executeOnChange: function (inputProps, event) {
3742 + if (inputProps.valueLink) {
3743 + _assertValueLink(inputProps);
3744 + return inputProps.valueLink.requestChange(event.target.value);
3745 + } else if (inputProps.checkedLink) {
3746 + _assertCheckedLink(inputProps);
3747 + return inputProps.checkedLink.requestChange(event.target.checked);
3748 + } else if (inputProps.onChange) {
3749 + return inputProps.onChange.call(undefined, event);
3750 + }
3751 + }
3752 +};
3753 +
3754 +module.exports = LinkedValueUtils;
3755 +},{"125":125,"134":134,"150":150,"157":157,"73":73}],25:[function(_dereq_,module,exports){
3756 +/**
3757 + * Copyright 2013-present, Facebook, Inc.
3758 + * All rights reserved.
3759 + *
3760 + * This source code is licensed under the BSD-style license found in the
3761 + * LICENSE file in the root directory of this source tree. An additional grant
3762 + * of patent rights can be found in the PATENTS file in the same directory.
3763 + *
3764 + *
3765 + */
3766 +
3767 +'use strict';
3768 +
3769 +var _prodInvariant = _dereq_(125);
3770 +
3771 +var invariant = _dereq_(150);
3772 +
3773 +/**
3774 + * Static poolers. Several custom versions for each potential number of
3775 + * arguments. A completely generic pooler is easy to implement, but would
3776 + * require accessing the `arguments` object. In each of these, `this` refers to
3777 + * the Class itself, not an instance. If any others are needed, simply add them
3778 + * here, or in their own files.
3779 + */
3780 +var oneArgumentPooler = function (copyFieldsFrom) {
3781 + var Klass = this;
3782 + if (Klass.instancePool.length) {
3783 + var instance = Klass.instancePool.pop();
3784 + Klass.call(instance, copyFieldsFrom);
3785 + return instance;
3786 + } else {
3787 + return new Klass(copyFieldsFrom);
3788 + }
3789 +};
3790 +
3791 +var twoArgumentPooler = function (a1, a2) {
3792 + var Klass = this;
3793 + if (Klass.instancePool.length) {
3794 + var instance = Klass.instancePool.pop();
3795 + Klass.call(instance, a1, a2);
3796 + return instance;
3797 + } else {
3798 + return new Klass(a1, a2);
3799 + }
3800 +};
3801 +
3802 +var threeArgumentPooler = function (a1, a2, a3) {
3803 + var Klass = this;
3804 + if (Klass.instancePool.length) {
3805 + var instance = Klass.instancePool.pop();
3806 + Klass.call(instance, a1, a2, a3);
3807 + return instance;
3808 + } else {
3809 + return new Klass(a1, a2, a3);
3810 + }
3811 +};
3812 +
3813 +var fourArgumentPooler = function (a1, a2, a3, a4) {
3814 + var Klass = this;
3815 + if (Klass.instancePool.length) {
3816 + var instance = Klass.instancePool.pop();
3817 + Klass.call(instance, a1, a2, a3, a4);
3818 + return instance;
3819 + } else {
3820 + return new Klass(a1, a2, a3, a4);
3821 + }
3822 +};
3823 +
3824 +var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
3825 + var Klass = this;
3826 + if (Klass.instancePool.length) {
3827 + var instance = Klass.instancePool.pop();
3828 + Klass.call(instance, a1, a2, a3, a4, a5);
3829 + return instance;
3830 + } else {
3831 + return new Klass(a1, a2, a3, a4, a5);
3832 + }
3833 +};
3834 +
3835 +var standardReleaser = function (instance) {
3836 + var Klass = this;
3837 + !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
3838 + instance.destructor();
3839 + if (Klass.instancePool.length < Klass.poolSize) {
3840 + Klass.instancePool.push(instance);
3841 + }
3842 +};
3843 +
3844 +var DEFAULT_POOL_SIZE = 10;
3845 +var DEFAULT_POOLER = oneArgumentPooler;
3846 +
3847 +/**
3848 + * Augments `CopyConstructor` to be a poolable class, augmenting only the class
3849 + * itself (statically) not adding any prototypical fields. Any CopyConstructor
3850 + * you give this may have a `poolSize` property, and will look for a
3851 + * prototypical `destructor` on instances.
3852 + *
3853 + * @param {Function} CopyConstructor Constructor that can be used to reset.
3854 + * @param {Function} pooler Customizable pooler.
3855 + */
3856 +var addPoolingTo = function (CopyConstructor, pooler) {
3857 + // Casting as any so that flow ignores the actual implementation and trusts
3858 + // it to match the type we declared
3859 + var NewKlass = CopyConstructor;
3860 + NewKlass.instancePool = [];
3861 + NewKlass.getPooled = pooler || DEFAULT_POOLER;
3862 + if (!NewKlass.poolSize) {
3863 + NewKlass.poolSize = DEFAULT_POOL_SIZE;
3864 + }
3865 + NewKlass.release = standardReleaser;
3866 + return NewKlass;
3867 +};
3868 +
3869 +var PooledClass = {
3870 + addPoolingTo: addPoolingTo,
3871 + oneArgumentPooler: oneArgumentPooler,
3872 + twoArgumentPooler: twoArgumentPooler,
3873 + threeArgumentPooler: threeArgumentPooler,
3874 + fourArgumentPooler: fourArgumentPooler,
3875 + fiveArgumentPooler: fiveArgumentPooler
3876 +};
3877 +
3878 +module.exports = PooledClass;
3879 +},{"125":125,"150":150}],26:[function(_dereq_,module,exports){
3880 +/**
3881 + * Copyright 2013-present, Facebook, Inc.
3882 + * All rights reserved.
3883 + *
3884 + * This source code is licensed under the BSD-style license found in the
3885 + * LICENSE file in the root directory of this source tree. An additional grant
3886 + * of patent rights can be found in the PATENTS file in the same directory.
3887 + *
3888 + */
3889 +
3890 +'use strict';
3891 +
3892 +var _assign = _dereq_(158);
3893 +
3894 +var EventPluginRegistry = _dereq_(18);
3895 +var ReactEventEmitterMixin = _dereq_(56);
3896 +var ViewportMetrics = _dereq_(101);
3897 +
3898 +var getVendorPrefixedEventName = _dereq_(120);
3899 +var isEventSupported = _dereq_(122);
3900 +
3901 +/**
3902 + * Summary of `ReactBrowserEventEmitter` event handling:
3903 + *
3904 + * - Top-level delegation is used to trap most native browser events. This
3905 + * may only occur in the main thread and is the responsibility of
3906 + * ReactEventListener, which is injected and can therefore support pluggable
3907 + * event sources. This is the only work that occurs in the main thread.
3908 + *
3909 + * - We normalize and de-duplicate events to account for browser quirks. This
3910 + * may be done in the worker thread.
3911 + *
3912 + * - Forward these native events (with the associated top-level type used to
3913 + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
3914 + * to extract any synthetic events.
3915 + *
3916 + * - The `EventPluginHub` will then process each event by annotating them with
3917 + * "dispatches", a sequence of listeners and IDs that care about that event.
3918 + *
3919 + * - The `EventPluginHub` then dispatches the events.
3920 + *
3921 + * Overview of React and the event system:
3922 + *
3923 + * +------------+ .
3924 + * | DOM | .
3925 + * +------------+ .
3926 + * | .
3927 + * v .
3928 + * +------------+ .
3929 + * | ReactEvent | .
3930 + * | Listener | .
3931 + * +------------+ . +-----------+
3932 + * | . +--------+|SimpleEvent|
3933 + * | . | |Plugin |
3934 + * +-----|------+ . v +-----------+
3935 + * | | | . +--------------+ +------------+
3936 + * | +-----------.--->|EventPluginHub| | Event |
3937 + * | | . | | +-----------+ | Propagators|
3938 + * | ReactEvent | . | | |TapEvent | |------------|
3939 + * | Emitter | . | |<---+|Plugin | |other plugin|
3940 + * | | . | | +-----------+ | utilities |
3941 + * | +-----------.--->| | +------------+
3942 + * | | | . +--------------+
3943 + * +-----|------+ . ^ +-----------+
3944 + * | . | |Enter/Leave|
3945 + * + . +-------+|Plugin |
3946 + * +-------------+ . +-----------+
3947 + * | application | .
3948 + * |-------------| .
3949 + * | | .
3950 + * | | .
3951 + * +-------------+ .
3952 + * .
3953 + * React Core . General Purpose Event Plugin System
3954 + */
3955 +
3956 +var hasEventPageXY;
3957 +var alreadyListeningTo = {};
3958 +var isMonitoringScrollValue = false;
3959 +var reactTopListenersCounter = 0;
3960 +
3961 +// For events like 'submit' which don't consistently bubble (which we trap at a
3962 +// lower node than `document`), binding at `document` would cause duplicate
3963 +// events so we don't include them here
3964 +var topEventMapping = {
3965 + topAbort: 'abort',
3966 + topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
3967 + topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
3968 + topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
3969 + topBlur: 'blur',
3970 + topCanPlay: 'canplay',
3971 + topCanPlayThrough: 'canplaythrough',
3972 + topChange: 'change',
3973 + topClick: 'click',
3974 + topCompositionEnd: 'compositionend',
3975 + topCompositionStart: 'compositionstart',
3976 + topCompositionUpdate: 'compositionupdate',
3977 + topContextMenu: 'contextmenu',
3978 + topCopy: 'copy',
3979 + topCut: 'cut',
3980 + topDoubleClick: 'dblclick',
3981 + topDrag: 'drag',
3982 + topDragEnd: 'dragend',
3983 + topDragEnter: 'dragenter',
3984 + topDragExit: 'dragexit',
3985 + topDragLeave: 'dragleave',
3986 + topDragOver: 'dragover',
3987 + topDragStart: 'dragstart',
3988 + topDrop: 'drop',
3989 + topDurationChange: 'durationchange',
3990 + topEmptied: 'emptied',
3991 + topEncrypted: 'encrypted',
3992 + topEnded: 'ended',
3993 + topError: 'error',
3994 + topFocus: 'focus',
3995 + topInput: 'input',
3996 + topKeyDown: 'keydown',
3997 + topKeyPress: 'keypress',
3998 + topKeyUp: 'keyup',
3999 + topLoadedData: 'loadeddata',
4000 + topLoadedMetadata: 'loadedmetadata',
4001 + topLoadStart: 'loadstart',
4002 + topMouseDown: 'mousedown',
4003 + topMouseMove: 'mousemove',
4004 + topMouseOut: 'mouseout',
4005 + topMouseOver: 'mouseover',
4006 + topMouseUp: 'mouseup',
4007 + topPaste: 'paste',
4008 + topPause: 'pause',
4009 + topPlay: 'play',
4010 + topPlaying: 'playing',
4011 + topProgress: 'progress',
4012 + topRateChange: 'ratechange',
4013 + topScroll: 'scroll',
4014 + topSeeked: 'seeked',
4015 + topSeeking: 'seeking',
4016 + topSelectionChange: 'selectionchange',
4017 + topStalled: 'stalled',
4018 + topSuspend: 'suspend',
4019 + topTextInput: 'textInput',
4020 + topTimeUpdate: 'timeupdate',
4021 + topTouchCancel: 'touchcancel',
4022 + topTouchEnd: 'touchend',
4023 + topTouchMove: 'touchmove',
4024 + topTouchStart: 'touchstart',
4025 + topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
4026 + topVolumeChange: 'volumechange',
4027 + topWaiting: 'waiting',
4028 + topWheel: 'wheel'
4029 +};
4030 +
4031 +/**
4032 + * To ensure no conflicts with other potential React instances on the page
4033 + */
4034 +var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
4035 +
4036 +function getListeningForDocument(mountAt) {
4037 + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
4038 + // directly.
4039 + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
4040 + mountAt[topListenersIDKey] = reactTopListenersCounter++;
4041 + alreadyListeningTo[mountAt[topListenersIDKey]] = {};
4042 + }
4043 + return alreadyListeningTo[mountAt[topListenersIDKey]];
4044 +}
4045 +
4046 +/**
4047 + * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
4048 + * example:
4049 + *
4050 + * EventPluginHub.putListener('myID', 'onClick', myFunction);
4051 + *
4052 + * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
4053 + *
4054 + * @internal
4055 + */
4056 +var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
4057 +
4058 + /**
4059 + * Injectable event backend
4060 + */
4061 + ReactEventListener: null,
4062 +
4063 + injection: {
4064 + /**
4065 + * @param {object} ReactEventListener
4066 + */
4067 + injectReactEventListener: function (ReactEventListener) {
4068 + ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
4069 + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
4070 + }
4071 + },
4072 +
4073 + /**
4074 + * Sets whether or not any created callbacks should be enabled.
4075 + *
4076 + * @param {boolean} enabled True if callbacks should be enabled.
4077 + */
4078 + setEnabled: function (enabled) {
4079 + if (ReactBrowserEventEmitter.ReactEventListener) {
4080 + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
4081 + }
4082 + },
4083 +
4084 + /**
4085 + * @return {boolean} True if callbacks are enabled.
4086 + */
4087 + isEnabled: function () {
4088 + return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
4089 + },
4090 +
4091 + /**
4092 + * We listen for bubbled touch events on the document object.
4093 + *
4094 + * Firefox v8.01 (and possibly others) exhibited strange behavior when
4095 + * mounting `onmousemove` events at some node that was not the document
4096 + * element. The symptoms were that if your mouse is not moving over something
4097 + * contained within that mount point (for example on the background) the
4098 + * top-level listeners for `onmousemove` won't be called. However, if you
4099 + * register the `mousemove` on the document object, then it will of course
4100 + * catch all `mousemove`s. This along with iOS quirks, justifies restricting
4101 + * top-level listeners to the document object only, at least for these
4102 + * movement types of events and possibly all events.
4103 + *
4104 + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
4105 + *
4106 + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
4107 + * they bubble to document.
4108 + *
4109 + * @param {string} registrationName Name of listener (e.g. `onClick`).
4110 + * @param {object} contentDocumentHandle Document which owns the container
4111 + */
4112 + listenTo: function (registrationName, contentDocumentHandle) {
4113 + var mountAt = contentDocumentHandle;
4114 + var isListening = getListeningForDocument(mountAt);
4115 + var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
4116 +
4117 + for (var i = 0; i < dependencies.length; i++) {
4118 + var dependency = dependencies[i];
4119 + if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
4120 + if (dependency === 'topWheel') {
4121 + if (isEventSupported('wheel')) {
4122 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
4123 + } else if (isEventSupported('mousewheel')) {
4124 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
4125 + } else {
4126 + // Firefox needs to capture a different mouse scroll event.
4127 + // @see http://www.quirksmode.org/dom/events/tests/scroll.html
4128 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
4129 + }
4130 + } else if (dependency === 'topScroll') {
4131 +
4132 + if (isEventSupported('scroll', true)) {
4133 + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
4134 + } else {
4135 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
4136 + }
4137 + } else if (dependency === 'topFocus' || dependency === 'topBlur') {
4138 +
4139 + if (isEventSupported('focus', true)) {
4140 + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
4141 + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
4142 + } else if (isEventSupported('focusin')) {
4143 + // IE has `focusin` and `focusout` events which bubble.
4144 + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
4145 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
4146 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
4147 + }
4148 +
4149 + // to make sure blur and focus event listeners are only attached once
4150 + isListening.topBlur = true;
4151 + isListening.topFocus = true;
4152 + } else if (topEventMapping.hasOwnProperty(dependency)) {
4153 + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
4154 + }
4155 +
4156 + isListening[dependency] = true;
4157 + }
4158 + }
4159 + },
4160 +
4161 + trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
4162 + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
4163 + },
4164 +
4165 + trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
4166 + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
4167 + },
4168 +
4169 + /**
4170 + * Protect against document.createEvent() returning null
4171 + * Some popup blocker extensions appear to do this:
4172 + * https://github.com/facebook/react/issues/6887
4173 + */
4174 + supportsEventPageXY: function () {
4175 + if (!document.createEvent) {
4176 + return false;
4177 + }
4178 + var ev = document.createEvent('MouseEvent');
4179 + return ev != null && 'pageX' in ev;
4180 + },
4181 +
4182 + /**
4183 + * Listens to window scroll and resize events. We cache scroll values so that
4184 + * application code can access them without triggering reflows.
4185 + *
4186 + * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
4187 + * pageX/pageY isn't supported (legacy browsers).
4188 + *
4189 + * NOTE: Scroll events do not bubble.
4190 + *
4191 + * @see http://www.quirksmode.org/dom/events/scroll.html
4192 + */
4193 + ensureScrollValueMonitoring: function () {
4194 + if (hasEventPageXY === undefined) {
4195 + hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
4196 + }
4197 + if (!hasEventPageXY && !isMonitoringScrollValue) {
4198 + var refresh = ViewportMetrics.refreshScrollValues;
4199 + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
4200 + isMonitoringScrollValue = true;
4201 + }
4202 + }
4203 +
4204 +});
4205 +
4206 +module.exports = ReactBrowserEventEmitter;
4207 +},{"101":101,"120":120,"122":122,"158":158,"18":18,"56":56}],27:[function(_dereq_,module,exports){
4208 +(function (process){
4209 +/**
4210 + * Copyright 2014-present, Facebook, Inc.
4211 + * All rights reserved.
4212 + *
4213 + * This source code is licensed under the BSD-style license found in the
4214 + * LICENSE file in the root directory of this source tree. An additional grant
4215 + * of patent rights can be found in the PATENTS file in the same directory.
4216 + *
4217 + */
4218 +
4219 +'use strict';
4220 +
4221 +var ReactReconciler = _dereq_(75);
4222 +
4223 +var instantiateReactComponent = _dereq_(121);
4224 +var KeyEscapeUtils = _dereq_(23);
4225 +var shouldUpdateReactComponent = _dereq_(129);
4226 +var traverseAllChildren = _dereq_(130);
4227 +var warning = _dereq_(157);
4228 +
4229 +var ReactComponentTreeHook;
4230 +
4231 +if (typeof process !== 'undefined' && process.env && "development" === 'test') {
4232 + // Temporary hack.
4233 + // Inline requires don't work well with Jest:
4234 + // https://github.com/facebook/react/issues/7240
4235 + // Remove the inline requires when we don't need them anymore:
4236 + // https://github.com/facebook/react/pull/7178
4237 + ReactComponentTreeHook = _dereq_(132);
4238 +}
4239 +
4240 +function instantiateChild(childInstances, child, name, selfDebugID) {
4241 + // We found a component instance.
4242 + var keyUnique = childInstances[name] === undefined;
4243 + if ("development" !== 'production') {
4244 + if (!ReactComponentTreeHook) {
4245 + ReactComponentTreeHook = _dereq_(132);
4246 + }
4247 + if (!keyUnique) {
4248 + "development" !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
4249 + }
4250 + }
4251 + if (child != null && keyUnique) {
4252 + childInstances[name] = instantiateReactComponent(child, true);
4253 + }
4254 +}
4255 +
4256 +/**
4257 + * ReactChildReconciler provides helpers for initializing or updating a set of
4258 + * children. Its output is suitable for passing it onto ReactMultiChild which
4259 + * does diffed reordering and insertion.
4260 + */
4261 +var ReactChildReconciler = {
4262 + /**
4263 + * Generates a "mount image" for each of the supplied children. In the case
4264 + * of `ReactDOMComponent`, a mount image is a string of markup.
4265 + *
4266 + * @param {?object} nestedChildNodes Nested child maps.
4267 + * @return {?object} A set of child instances.
4268 + * @internal
4269 + */
4270 + instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
4271 + ) {
4272 + if (nestedChildNodes == null) {
4273 + return null;
4274 + }
4275 + var childInstances = {};
4276 +
4277 + if ("development" !== 'production') {
4278 + traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
4279 + return instantiateChild(childInsts, child, name, selfDebugID);
4280 + }, childInstances);
4281 + } else {
4282 + traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
4283 + }
4284 + return childInstances;
4285 + },
4286 +
4287 + /**
4288 + * Updates the rendered children and returns a new set of children.
4289 + *
4290 + * @param {?object} prevChildren Previously initialized set of children.
4291 + * @param {?object} nextChildren Flat child element maps.
4292 + * @param {ReactReconcileTransaction} transaction
4293 + * @param {object} context
4294 + * @return {?object} A new set of child instances.
4295 + * @internal
4296 + */
4297 + updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
4298 + ) {
4299 + // We currently don't have a way to track moves here but if we use iterators
4300 + // instead of for..in we can zip the iterators and check if an item has
4301 + // moved.
4302 + // TODO: If nothing has changed, return the prevChildren object so that we
4303 + // can quickly bailout if nothing has changed.
4304 + if (!nextChildren && !prevChildren) {
4305 + return;
4306 + }
4307 + var name;
4308 + var prevChild;
4309 + for (name in nextChildren) {
4310 + if (!nextChildren.hasOwnProperty(name)) {
4311 + continue;
4312 + }
4313 + prevChild = prevChildren && prevChildren[name];
4314 + var prevElement = prevChild && prevChild._currentElement;
4315 + var nextElement = nextChildren[name];
4316 + if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
4317 + ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
4318 + nextChildren[name] = prevChild;
4319 + } else {
4320 + if (prevChild) {
4321 + removedNodes[name] = ReactReconciler.getHostNode(prevChild);
4322 + ReactReconciler.unmountComponent(prevChild, false);
4323 + }
4324 + // The child must be instantiated before it's mounted.
4325 + var nextChildInstance = instantiateReactComponent(nextElement, true);
4326 + nextChildren[name] = nextChildInstance;
4327 + // Creating mount image now ensures refs are resolved in right order
4328 + // (see https://github.com/facebook/react/pull/7101 for explanation).
4329 + var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
4330 + mountImages.push(nextChildMountImage);
4331 + }
4332 + }
4333 + // Unmount children that are no longer present.
4334 + for (name in prevChildren) {
4335 + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
4336 + prevChild = prevChildren[name];
4337 + removedNodes[name] = ReactReconciler.getHostNode(prevChild);
4338 + ReactReconciler.unmountComponent(prevChild, false);
4339 + }
4340 + }
4341 + },
4342 +
4343 + /**
4344 + * Unmounts all rendered children. This should be used to clean up children
4345 + * when this component is unmounted.
4346 + *
4347 + * @param {?object} renderedChildren Previously initialized set of children.
4348 + * @internal
4349 + */
4350 + unmountChildren: function (renderedChildren, safely) {
4351 + for (var name in renderedChildren) {
4352 + if (renderedChildren.hasOwnProperty(name)) {
4353 + var renderedChild = renderedChildren[name];
4354 + ReactReconciler.unmountComponent(renderedChild, safely);
4355 + }
4356 + }
4357 + }
4358 +
4359 +};
4360 +
4361 +module.exports = ReactChildReconciler;
4362 +}).call(this,undefined)
4363 +},{"121":121,"129":129,"130":130,"132":132,"157":157,"23":23,"75":75}],28:[function(_dereq_,module,exports){
4364 +/**
4365 + * Copyright 2013-present, Facebook, Inc.
4366 + * All rights reserved.
4367 + *
4368 + * This source code is licensed under the BSD-style license found in the
4369 + * LICENSE file in the root directory of this source tree. An additional grant
4370 + * of patent rights can be found in the PATENTS file in the same directory.
4371 + *
4372 + */
4373 +
4374 +'use strict';
4375 +
4376 +var DOMChildrenOperations = _dereq_(8);
4377 +var ReactDOMIDOperations = _dereq_(38);
4378 +
4379 +/**
4380 + * Abstracts away all functionality of the reconciler that requires knowledge of
4381 + * the browser context. TODO: These callers should be refactored to avoid the
4382 + * need for this injection.
4383 + */
4384 +var ReactComponentBrowserEnvironment = {
4385 +
4386 + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
4387 +
4388 + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
4389 +
4390 +};
4391 +
4392 +module.exports = ReactComponentBrowserEnvironment;
4393 +},{"38":38,"8":8}],29:[function(_dereq_,module,exports){
4394 +/**
4395 + * Copyright 2014-present, Facebook, Inc.
4396 + * All rights reserved.
4397 + *
4398 + * This source code is licensed under the BSD-style license found in the
4399 + * LICENSE file in the root directory of this source tree. An additional grant
4400 + * of patent rights can be found in the PATENTS file in the same directory.
4401 + *
4402 + *
4403 + */
4404 +
4405 +'use strict';
4406 +
4407 +var _prodInvariant = _dereq_(125);
4408 +
4409 +var invariant = _dereq_(150);
4410 +
4411 +var injected = false;
4412 +
4413 +var ReactComponentEnvironment = {
4414 +
4415 + /**
4416 + * Optionally injectable hook for swapping out mount images in the middle of
4417 + * the tree.
4418 + */
4419 + replaceNodeWithMarkup: null,
4420 +
4421 + /**
4422 + * Optionally injectable hook for processing a queue of child updates. Will
4423 + * later move into MultiChildComponents.
4424 + */
4425 + processChildrenUpdates: null,
4426 +
4427 + injection: {
4428 + injectEnvironment: function (environment) {
4429 + !!injected ? "development" !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
4430 + ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
4431 + ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
4432 + injected = true;
4433 + }
4434 + }
4435 +
4436 +};
4437 +
4438 +module.exports = ReactComponentEnvironment;
4439 +},{"125":125,"150":150}],30:[function(_dereq_,module,exports){
4440 +/**
4441 + * Copyright 2013-present, Facebook, Inc.
4442 + * All rights reserved.
4443 + *
4444 + * This source code is licensed under the BSD-style license found in the
4445 + * LICENSE file in the root directory of this source tree. An additional grant
4446 + * of patent rights can be found in the PATENTS file in the same directory.
4447 + *
4448 + */
4449 +
4450 +'use strict';
4451 +
4452 +var _prodInvariant = _dereq_(125),
4453 + _assign = _dereq_(158);
4454 +
4455 +var React = _dereq_(134);
4456 +var ReactComponentEnvironment = _dereq_(29);
4457 +var ReactCurrentOwner = _dereq_(133);
4458 +var ReactErrorUtils = _dereq_(55);
4459 +var ReactInstanceMap = _dereq_(63);
4460 +var ReactInstrumentation = _dereq_(64);
4461 +var ReactNodeTypes = _dereq_(69);
4462 +var ReactReconciler = _dereq_(75);
4463 +
4464 +if ("development" !== 'production') {
4465 + var checkReactTypeSpec = _dereq_(104);
4466 +}
4467 +
4468 +var emptyObject = _dereq_(143);
4469 +var invariant = _dereq_(150);
4470 +var shallowEqual = _dereq_(156);
4471 +var shouldUpdateReactComponent = _dereq_(129);
4472 +var warning = _dereq_(157);
4473 +
4474 +var CompositeTypes = {
4475 + ImpureClass: 0,
4476 + PureClass: 1,
4477 + StatelessFunctional: 2
4478 +};
4479 +
4480 +function StatelessComponent(Component) {}
4481 +StatelessComponent.prototype.render = function () {
4482 + var Component = ReactInstanceMap.get(this)._currentElement.type;
4483 + var element = Component(this.props, this.context, this.updater);
4484 + warnIfInvalidElement(Component, element);
4485 + return element;
4486 +};
4487 +
4488 +function warnIfInvalidElement(Component, element) {
4489 + if ("development" !== 'production') {
4490 + "development" !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;
4491 + "development" !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
4492 + }
4493 +}
4494 +
4495 +function shouldConstruct(Component) {
4496 + return !!(Component.prototype && Component.prototype.isReactComponent);
4497 +}
4498 +
4499 +function isPureComponent(Component) {
4500 + return !!(Component.prototype && Component.prototype.isPureReactComponent);
4501 +}
4502 +
4503 +// Separated into a function to contain deoptimizations caused by try/finally.
4504 +function measureLifeCyclePerf(fn, debugID, timerType) {
4505 + if (debugID === 0) {
4506 + // Top-level wrappers (see ReactMount) and empty components (see
4507 + // ReactDOMEmptyComponent) are invisible to hooks and devtools.
4508 + // Both are implementation details that should go away in the future.
4509 + return fn();
4510 + }
4511 +
4512 + ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
4513 + try {
4514 + return fn();
4515 + } finally {
4516 + ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
4517 + }
4518 +}
4519 +
4520 +/**
4521 + * ------------------ The Life-Cycle of a Composite Component ------------------
4522 + *
4523 + * - constructor: Initialization of state. The instance is now retained.
4524 + * - componentWillMount
4525 + * - render
4526 + * - [children's constructors]
4527 + * - [children's componentWillMount and render]
4528 + * - [children's componentDidMount]
4529 + * - componentDidMount
4530 + *
4531 + * Update Phases:
4532 + * - componentWillReceiveProps (only called if parent updated)
4533 + * - shouldComponentUpdate
4534 + * - componentWillUpdate
4535 + * - render
4536 + * - [children's constructors or receive props phases]
4537 + * - componentDidUpdate
4538 + *
4539 + * - componentWillUnmount
4540 + * - [children's componentWillUnmount]
4541 + * - [children destroyed]
4542 + * - (destroyed): The instance is now blank, released by React and ready for GC.
4543 + *
4544 + * -----------------------------------------------------------------------------
4545 + */
4546 +
4547 +/**
4548 + * An incrementing ID assigned to each component when it is mounted. This is
4549 + * used to enforce the order in which `ReactUpdates` updates dirty components.
4550 + *
4551 + * @private
4552 + */
4553 +var nextMountID = 1;
4554 +
4555 +/**
4556 + * @lends {ReactCompositeComponent.prototype}
4557 + */
4558 +var ReactCompositeComponent = {
4559 +
4560 + /**
4561 + * Base constructor for all composite component.
4562 + *
4563 + * @param {ReactElement} element
4564 + * @final
4565 + * @internal
4566 + */
4567 + construct: function (element) {
4568 + this._currentElement = element;
4569 + this._rootNodeID = 0;
4570 + this._compositeType = null;
4571 + this._instance = null;
4572 + this._hostParent = null;
4573 + this._hostContainerInfo = null;
4574 +
4575 + // See ReactUpdateQueue
4576 + this._updateBatchNumber = null;
4577 + this._pendingElement = null;
4578 + this._pendingStateQueue = null;
4579 + this._pendingReplaceState = false;
4580 + this._pendingForceUpdate = false;
4581 +
4582 + this._renderedNodeType = null;
4583 + this._renderedComponent = null;
4584 + this._context = null;
4585 + this._mountOrder = 0;
4586 + this._topLevelWrapper = null;
4587 +
4588 + // See ReactUpdates and ReactUpdateQueue.
4589 + this._pendingCallbacks = null;
4590 +
4591 + // ComponentWillUnmount shall only be called once
4592 + this._calledComponentWillUnmount = false;
4593 +
4594 + if ("development" !== 'production') {
4595 + this._warnedAboutRefsInRender = false;
4596 + }
4597 + },
4598 +
4599 + /**
4600 + * Initializes the component, renders markup, and registers event listeners.
4601 + *
4602 + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
4603 + * @param {?object} hostParent
4604 + * @param {?object} hostContainerInfo
4605 + * @param {?object} context
4606 + * @return {?string} Rendered markup to be inserted into the DOM.
4607 + * @final
4608 + * @internal
4609 + */
4610 + mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
4611 + var _this = this;
4612 +
4613 + this._context = context;
4614 + this._mountOrder = nextMountID++;
4615 + this._hostParent = hostParent;
4616 + this._hostContainerInfo = hostContainerInfo;
4617 +
4618 + var publicProps = this._currentElement.props;
4619 + var publicContext = this._processContext(context);
4620 +
4621 + var Component = this._currentElement.type;
4622 +
4623 + var updateQueue = transaction.getUpdateQueue();
4624 +
4625 + // Initialize the public class
4626 + var doConstruct = shouldConstruct(Component);
4627 + var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
4628 + var renderedElement;
4629 +
4630 + // Support functional components
4631 + if (!doConstruct && (inst == null || inst.render == null)) {
4632 + renderedElement = inst;
4633 + warnIfInvalidElement(Component, renderedElement);
4634 + !(inst === null || inst === false || React.isValidElement(inst)) ? "development" !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;
4635 + inst = new StatelessComponent(Component);
4636 + this._compositeType = CompositeTypes.StatelessFunctional;
4637 + } else {
4638 + if (isPureComponent(Component)) {
4639 + this._compositeType = CompositeTypes.PureClass;
4640 + } else {
4641 + this._compositeType = CompositeTypes.ImpureClass;
4642 + }
4643 + }
4644 +
4645 + if ("development" !== 'production') {
4646 + // This will throw later in _renderValidatedComponent, but add an early
4647 + // warning now to help debugging
4648 + if (inst.render == null) {
4649 + "development" !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;
4650 + }
4651 +
4652 + var propsMutated = inst.props !== publicProps;
4653 + var componentName = Component.displayName || Component.name || 'Component';
4654 +
4655 + "development" !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0;
4656 + }
4657 +
4658 + // These should be set up in the constructor, but as a convenience for
4659 + // simpler class abstractions, we set them up after the fact.
4660 + inst.props = publicProps;
4661 + inst.context = publicContext;
4662 + inst.refs = emptyObject;
4663 + inst.updater = updateQueue;
4664 +
4665 + this._instance = inst;
4666 +
4667 + // Store a reference from the instance back to the internal representation
4668 + ReactInstanceMap.set(inst, this);
4669 +
4670 + if ("development" !== 'production') {
4671 + // Since plain JS classes are defined without any special initialization
4672 + // logic, we can not catch common errors early. Therefore, we have to
4673 + // catch them here, at initialization time, instead.
4674 + "development" !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
4675 + "development" !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
4676 + "development" !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
4677 + "development" !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
4678 + "development" !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;
4679 + "development" !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;
4680 + "development" !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
4681 + }
4682 +
4683 + var initialState = inst.state;
4684 + if (initialState === undefined) {
4685 + inst.state = initialState = null;
4686 + }
4687 + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
4688 +
4689 + this._pendingStateQueue = null;
4690 + this._pendingReplaceState = false;
4691 + this._pendingForceUpdate = false;
4692 +
4693 + var markup;
4694 + if (inst.unstable_handleError) {
4695 + markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
4696 + } else {
4697 + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
4698 + }
4699 +
4700 + if (inst.componentDidMount) {
4701 + if ("development" !== 'production') {
4702 + transaction.getReactMountReady().enqueue(function () {
4703 + measureLifeCyclePerf(function () {
4704 + return inst.componentDidMount();
4705 + }, _this._debugID, 'componentDidMount');
4706 + });
4707 + } else {
4708 + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
4709 + }
4710 + }
4711 +
4712 + return markup;
4713 + },
4714 +
4715 + _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
4716 + if ("development" !== 'production') {
4717 + ReactCurrentOwner.current = this;
4718 + try {
4719 + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
4720 + } finally {
4721 + ReactCurrentOwner.current = null;
4722 + }
4723 + } else {
4724 + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
4725 + }
4726 + },
4727 +
4728 + _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
4729 + var Component = this._currentElement.type;
4730 +
4731 + if (doConstruct) {
4732 + if ("development" !== 'production') {
4733 + return measureLifeCyclePerf(function () {
4734 + return new Component(publicProps, publicContext, updateQueue);
4735 + }, this._debugID, 'ctor');
4736 + } else {
4737 + return new Component(publicProps, publicContext, updateQueue);
4738 + }
4739 + }
4740 +
4741 + // This can still be an instance in case of factory components
4742 + // but we'll count this as time spent rendering as the more common case.
4743 + if ("development" !== 'production') {
4744 + return measureLifeCyclePerf(function () {
4745 + return Component(publicProps, publicContext, updateQueue);
4746 + }, this._debugID, 'render');
4747 + } else {
4748 + return Component(publicProps, publicContext, updateQueue);
4749 + }
4750 + },
4751 +
4752 + performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
4753 + var markup;
4754 + var checkpoint = transaction.checkpoint();
4755 + try {
4756 + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
4757 + } catch (e) {
4758 + // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
4759 + transaction.rollback(checkpoint);
4760 + this._instance.unstable_handleError(e);
4761 + if (this._pendingStateQueue) {
4762 + this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
4763 + }
4764 + checkpoint = transaction.checkpoint();
4765 +
4766 + this._renderedComponent.unmountComponent(true);
4767 + transaction.rollback(checkpoint);
4768 +
4769 + // Try again - we've informed the component about the error, so they can render an error message this time.
4770 + // If this throws again, the error will bubble up (and can be caught by a higher error boundary).
4771 + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
4772 + }
4773 + return markup;
4774 + },
4775 +
4776 + performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
4777 + var inst = this._instance;
4778 +
4779 + var debugID = 0;
4780 + if ("development" !== 'production') {
4781 + debugID = this._debugID;
4782 + }
4783 +
4784 + if (inst.componentWillMount) {
4785 + if ("development" !== 'production') {
4786 + measureLifeCyclePerf(function () {
4787 + return inst.componentWillMount();
4788 + }, debugID, 'componentWillMount');
4789 + } else {
4790 + inst.componentWillMount();
4791 + }
4792 + // When mounting, calls to `setState` by `componentWillMount` will set
4793 + // `this._pendingStateQueue` without triggering a re-render.
4794 + if (this._pendingStateQueue) {
4795 + inst.state = this._processPendingState(inst.props, inst.context);
4796 + }
4797 + }
4798 +
4799 + // If not a stateless component, we now render
4800 + if (renderedElement === undefined) {
4801 + renderedElement = this._renderValidatedComponent();
4802 + }
4803 +
4804 + var nodeType = ReactNodeTypes.getType(renderedElement);
4805 + this._renderedNodeType = nodeType;
4806 + var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
4807 + );
4808 + this._renderedComponent = child;
4809 +
4810 + var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
4811 +
4812 + if ("development" !== 'production') {
4813 + if (debugID !== 0) {
4814 + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
4815 + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
4816 + }
4817 + }
4818 +
4819 + return markup;
4820 + },
4821 +
4822 + getHostNode: function () {
4823 + return ReactReconciler.getHostNode(this._renderedComponent);
4824 + },
4825 +
4826 + /**
4827 + * Releases any resources allocated by `mountComponent`.
4828 + *
4829 + * @final
4830 + * @internal
4831 + */
4832 + unmountComponent: function (safely) {
4833 + if (!this._renderedComponent) {
4834 + return;
4835 + }
4836 +
4837 + var inst = this._instance;
4838 +
4839 + if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
4840 + inst._calledComponentWillUnmount = true;
4841 +
4842 + if (safely) {
4843 + var name = this.getName() + '.componentWillUnmount()';
4844 + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
4845 + } else {
4846 + if ("development" !== 'production') {
4847 + measureLifeCyclePerf(function () {
4848 + return inst.componentWillUnmount();
4849 + }, this._debugID, 'componentWillUnmount');
4850 + } else {
4851 + inst.componentWillUnmount();
4852 + }
4853 + }
4854 + }
4855 +
4856 + if (this._renderedComponent) {
4857 + ReactReconciler.unmountComponent(this._renderedComponent, safely);
4858 + this._renderedNodeType = null;
4859 + this._renderedComponent = null;
4860 + this._instance = null;
4861 + }
4862 +
4863 + // Reset pending fields
4864 + // Even if this component is scheduled for another update in ReactUpdates,
4865 + // it would still be ignored because these fields are reset.
4866 + this._pendingStateQueue = null;
4867 + this._pendingReplaceState = false;
4868 + this._pendingForceUpdate = false;
4869 + this._pendingCallbacks = null;
4870 + this._pendingElement = null;
4871 +
4872 + // These fields do not really need to be reset since this object is no
4873 + // longer accessible.
4874 + this._context = null;
4875 + this._rootNodeID = 0;
4876 + this._topLevelWrapper = null;
4877 +
4878 + // Delete the reference from the instance to this internal representation
4879 + // which allow the internals to be properly cleaned up even if the user
4880 + // leaks a reference to the public instance.
4881 + ReactInstanceMap.remove(inst);
4882 +
4883 + // Some existing components rely on inst.props even after they've been
4884 + // destroyed (in event handlers).
4885 + // TODO: inst.props = null;
4886 + // TODO: inst.state = null;
4887 + // TODO: inst.context = null;
4888 + },
4889 +
4890 + /**
4891 + * Filters the context object to only contain keys specified in
4892 + * `contextTypes`
4893 + *
4894 + * @param {object} context
4895 + * @return {?object}
4896 + * @private
4897 + */
4898 + _maskContext: function (context) {
4899 + var Component = this._currentElement.type;
4900 + var contextTypes = Component.contextTypes;
4901 + if (!contextTypes) {
4902 + return emptyObject;
4903 + }
4904 + var maskedContext = {};
4905 + for (var contextName in contextTypes) {
4906 + maskedContext[contextName] = context[contextName];
4907 + }
4908 + return maskedContext;
4909 + },
4910 +
4911 + /**
4912 + * Filters the context object to only contain keys specified in
4913 + * `contextTypes`, and asserts that they are valid.
4914 + *
4915 + * @param {object} context
4916 + * @return {?object}
4917 + * @private
4918 + */
4919 + _processContext: function (context) {
4920 + var maskedContext = this._maskContext(context);
4921 + if ("development" !== 'production') {
4922 + var Component = this._currentElement.type;
4923 + if (Component.contextTypes) {
4924 + this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
4925 + }
4926 + }
4927 + return maskedContext;
4928 + },
4929 +
4930 + /**
4931 + * @param {object} currentContext
4932 + * @return {object}
4933 + * @private
4934 + */
4935 + _processChildContext: function (currentContext) {
4936 + var Component = this._currentElement.type;
4937 + var inst = this._instance;
4938 + var childContext;
4939 +
4940 + if (inst.getChildContext) {
4941 + if ("development" !== 'production') {
4942 + ReactInstrumentation.debugTool.onBeginProcessingChildContext();
4943 + try {
4944 + childContext = inst.getChildContext();
4945 + } finally {
4946 + ReactInstrumentation.debugTool.onEndProcessingChildContext();
4947 + }
4948 + } else {
4949 + childContext = inst.getChildContext();
4950 + }
4951 + }
4952 +
4953 + if (childContext) {
4954 + !(typeof Component.childContextTypes === 'object') ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
4955 + if ("development" !== 'production') {
4956 + this._checkContextTypes(Component.childContextTypes, childContext, 'childContext');
4957 + }
4958 + for (var name in childContext) {
4959 + !(name in Component.childContextTypes) ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
4960 + }
4961 + return _assign({}, currentContext, childContext);
4962 + }
4963 + return currentContext;
4964 + },
4965 +
4966 + /**
4967 + * Assert that the context types are valid
4968 + *
4969 + * @param {object} typeSpecs Map of context field to a ReactPropType
4970 + * @param {object} values Runtime values that need to be type-checked
4971 + * @param {string} location e.g. "prop", "context", "child context"
4972 + * @private
4973 + */
4974 + _checkContextTypes: function (typeSpecs, values, location) {
4975 + if ("development" !== 'production') {
4976 + checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
4977 + }
4978 + },
4979 +
4980 + receiveComponent: function (nextElement, transaction, nextContext) {
4981 + var prevElement = this._currentElement;
4982 + var prevContext = this._context;
4983 +
4984 + this._pendingElement = null;
4985 +
4986 + this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
4987 + },
4988 +
4989 + /**
4990 + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
4991 + * is set, update the component.

This file is too large to show in full.

docs/js/react.js
+2634 -19481
@@ -1,5 +1,5 @@
1 /**
2 - * React v15.3.2
2 + * React v15.4.0
3 */
4 (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){
5 /**
@@ -10,414 +10,181 @@
10 * LICENSE file in the root directory of this source tree. An additional grant
11 * of patent rights can be found in the PATENTS file in the same directory.
12 *
13 - * @providesModule AutoFocusUtils
13 + *
14 */
15
16 'use strict';
17
18 -var ReactDOMComponentTree = _dereq_(42);
19 -
20 -var focusNode = _dereq_(156);
21 -
22 -var AutoFocusUtils = {
23 - focusDOMComponent: function () {
24 - focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
25 - }
26 -};
27 -
28 -module.exports = AutoFocusUtils;
29 -},{"156":156,"42":42}],2:[function(_dereq_,module,exports){
18 /**
31 - * Copyright 2013-present Facebook, Inc.
32 - * All rights reserved.
33 - *
34 - * This source code is licensed under the BSD-style license found in the
35 - * LICENSE file in the root directory of this source tree. An additional grant
36 - * of patent rights can be found in the PATENTS file in the same directory.
19 + * Escape and wrap key so it is safe to use as a reactid
20 *
38 - * @providesModule BeforeInputEventPlugin
21 + * @param {string} key to be escaped.
22 + * @return {string} the escaped key.
23 */
24
41 -'use strict';
42 -
43 -var EventConstants = _dereq_(16);
44 -var EventPropagators = _dereq_(20);
45 -var ExecutionEnvironment = _dereq_(148);
46 -var FallbackCompositionState = _dereq_(21);
47 -var SyntheticCompositionEvent = _dereq_(103);
48 -var SyntheticInputEvent = _dereq_(107);
49 -
50 -var keyOf = _dereq_(166);
51 -
52 -var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
53 -var START_KEYCODE = 229;
54 -
55 -var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
25 +function escape(key) {
26 + var escapeRegex = /[=:]/g;
27 + var escaperLookup = {
28 + '=': '=0',
29 + ':': '=2'
30 + };
31 + var escapedString = ('' + key).replace(escapeRegex, function (match) {
32 + return escaperLookup[match];
33 + });
34
57 -var documentMode = null;
58 -if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
59 - documentMode = document.documentMode;
35 + return '$' + escapedString;
36 }
37
62 -// Webkit offers a very useful `textInput` event that can be used to
63 -// directly represent `beforeInput`. The IE `textinput` event is not as
64 -// useful, so we don't use it.
65 -var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
66 -
67 -// In IE9+, we have access to composition events, but the data supplied
68 -// by the native compositionend event may be incorrect. Japanese ideographic
69 -// spaces, for instance (\u3000) are not recorded correctly.
70 -var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
71 -
38 /**
73 - * Opera <= 12 includes TextEvent in window, but does not fire
74 - * text input events. Rely on keypress instead.
39 + * Unescape and unwrap key for human-readable display
40 + *
41 + * @param {string} key to unescape.
42 + * @return {string} the unescaped key.
43 */
76 -function isPresto() {
77 - var opera = window.opera;
78 - return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
79 -}
80 -
81 -var SPACEBAR_CODE = 32;
82 -var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
44 +function unescape(key) {
45 + var unescapeRegex = /(=0|=2)/g;
46 + var unescaperLookup = {
47 + '=0': '=',
48 + '=2': ':'
49 + };
50 + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
51
84 -var topLevelTypes = EventConstants.topLevelTypes;
52 + return ('' + keySubstring).replace(unescapeRegex, function (match) {
53 + return unescaperLookup[match];
54 + });
55 +}
56
86 -// Events and their corresponding property names.
87 -var eventTypes = {
88 - beforeInput: {
89 - phasedRegistrationNames: {
90 - bubbled: keyOf({ onBeforeInput: null }),
91 - captured: keyOf({ onBeforeInputCapture: null })
92 - },
93 - dependencies: [topLevelTypes.topCompositionEnd, topLevelTypes.topKeyPress, topLevelTypes.topTextInput, topLevelTypes.topPaste]
94 - },
95 - compositionEnd: {
96 - phasedRegistrationNames: {
97 - bubbled: keyOf({ onCompositionEnd: null }),
98 - captured: keyOf({ onCompositionEndCapture: null })
99 - },
100 - dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionEnd, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
101 - },
102 - compositionStart: {
103 - phasedRegistrationNames: {
104 - bubbled: keyOf({ onCompositionStart: null }),
105 - captured: keyOf({ onCompositionStartCapture: null })
106 - },
107 - dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionStart, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
108 - },
109 - compositionUpdate: {
110 - phasedRegistrationNames: {
111 - bubbled: keyOf({ onCompositionUpdate: null }),
112 - captured: keyOf({ onCompositionUpdateCapture: null })
113 - },
114 - dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionUpdate, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
115 - }
57 +var KeyEscapeUtils = {
58 + escape: escape,
59 + unescape: unescape
60 };
61
118 -// Track whether we've ever handled a keypress on the space key.
119 -var hasSpaceKeypress = false;
120 -
121 -/**
122 - * Return whether a native keypress event is assumed to be a command.
123 - * This is required because Firefox fires `keypress` events for key commands
124 - * (cut, copy, select-all, etc.) even though no character is inserted.
125 - */
126 -function isKeypressCommand(nativeEvent) {
127 - return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
128 - // ctrlKey && altKey is equivalent to AltGr, and is not a command.
129 - !(nativeEvent.ctrlKey && nativeEvent.altKey);
130 -}
131 -
62 +module.exports = KeyEscapeUtils;
63 +},{}],2:[function(_dereq_,module,exports){
64 /**
133 - * Translate native top level events into event types.
65 + * Copyright 2013-present, Facebook, Inc.
66 + * All rights reserved.
67 *
135 - * @param {string} topLevelType
136 - * @return {object}
137 - */
138 -function getCompositionEventType(topLevelType) {
139 - switch (topLevelType) {
140 - case topLevelTypes.topCompositionStart:
141 - return eventTypes.compositionStart;
142 - case topLevelTypes.topCompositionEnd:
143 - return eventTypes.compositionEnd;
144 - case topLevelTypes.topCompositionUpdate:
145 - return eventTypes.compositionUpdate;
146 - }
147 -}
148 -
149 -/**
150 - * Does our fallback best-guess model think this event signifies that
151 - * composition has begun?
68 + * This source code is licensed under the BSD-style license found in the
69 + * LICENSE file in the root directory of this source tree. An additional grant
70 + * of patent rights can be found in the PATENTS file in the same directory.
71 *
153 - * @param {string} topLevelType
154 - * @param {object} nativeEvent
155 - * @return {boolean}
72 + *
73 */
157 -function isFallbackCompositionStart(topLevelType, nativeEvent) {
158 - return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE;
159 -}
74
161 -/**
162 - * Does our fallback mode think that this event is the end of composition?
163 - *
164 - * @param {string} topLevelType
165 - * @param {object} nativeEvent
166 - * @return {boolean}
167 - */
168 -function isFallbackCompositionEnd(topLevelType, nativeEvent) {
169 - switch (topLevelType) {
170 - case topLevelTypes.topKeyUp:
171 - // Command keys insert or clear IME input.
172 - return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
173 - case topLevelTypes.topKeyDown:
174 - // Expect IME keyCode on each keydown. If we get any other
175 - // code we must have exited earlier.
176 - return nativeEvent.keyCode !== START_KEYCODE;
177 - case topLevelTypes.topKeyPress:
178 - case topLevelTypes.topMouseDown:
179 - case topLevelTypes.topBlur:
180 - // Events are not possible without cancelling IME.
181 - return true;
182 - default:
183 - return false;
184 - }
185 -}
75 +'use strict';
76
187 -/**
188 - * Google Input Tools provides composition data via a CustomEvent,
189 - * with the `data` property populated in the `detail` object. If this
190 - * is available on the event object, use it. If not, this is a plain
191 - * composition event and we have nothing special to extract.
192 - *
193 - * @param {object} nativeEvent
194 - * @return {?string}
195 - */
196 -function getDataFromCustomEvent(nativeEvent) {
197 - var detail = nativeEvent.detail;
198 - if (typeof detail === 'object' && 'data' in detail) {
199 - return detail.data;
200 - }
201 - return null;
202 -}
77 +var _prodInvariant = _dereq_(24);
78
204 -// Track the current IME composition fallback object, if any.
205 -var currentComposition = null;
79 +var invariant = _dereq_(28);
80
81 /**
208 - * @return {?object} A SyntheticCompositionEvent.
82 + * Static poolers. Several custom versions for each potential number of
83 + * arguments. A completely generic pooler is easy to implement, but would
84 + * require accessing the `arguments` object. In each of these, `this` refers to
85 + * the Class itself, not an instance. If any others are needed, simply add them
86 + * here, or in their own files.
87 */
210 -function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
211 - var eventType;
212 - var fallbackData;
213 -
214 - if (canUseCompositionEvent) {
215 - eventType = getCompositionEventType(topLevelType);
216 - } else if (!currentComposition) {
217 - if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
218 - eventType = eventTypes.compositionStart;
219 - }
220 - } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
221 - eventType = eventTypes.compositionEnd;
222 - }
223 -
224 - if (!eventType) {
225 - return null;
226 - }
227 -
228 - if (useFallbackCompositionData) {
229 - // The current composition is stored statically and must not be
230 - // overwritten while composition continues.
231 - if (!currentComposition && eventType === eventTypes.compositionStart) {
232 - currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
233 - } else if (eventType === eventTypes.compositionEnd) {
234 - if (currentComposition) {
235 - fallbackData = currentComposition.getData();
236 - }
237 - }
238 - }
239 -
240 - var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
241 -
242 - if (fallbackData) {
243 - // Inject data generated from fallback path into the synthetic event.
244 - // This matches the property of native CompositionEventInterface.
245 - event.data = fallbackData;
88 +var oneArgumentPooler = function (copyFieldsFrom) {
89 + var Klass = this;
90 + if (Klass.instancePool.length) {
91 + var instance = Klass.instancePool.pop();
92 + Klass.call(instance, copyFieldsFrom);
93 + return instance;
94 } else {
247 - var customData = getDataFromCustomEvent(nativeEvent);
248 - if (customData !== null) {
249 - event.data = customData;
250 - }
95 + return new Klass(copyFieldsFrom);
96 }
97 +};
98
253 - EventPropagators.accumulateTwoPhaseDispatches(event);
254 - return event;
255 -}
256 -
257 -/**
258 - * @param {string} topLevelType Record from `EventConstants`.
259 - * @param {object} nativeEvent Native browser event.
260 - * @return {?string} The string corresponding to this `beforeInput` event.
261 - */
262 -function getNativeBeforeInputChars(topLevelType, nativeEvent) {
263 - switch (topLevelType) {
264 - case topLevelTypes.topCompositionEnd:
265 - return getDataFromCustomEvent(nativeEvent);
266 - case topLevelTypes.topKeyPress:
267 - /**
268 - * If native `textInput` events are available, our goal is to make
269 - * use of them. However, there is a special case: the spacebar key.
270 - * In Webkit, preventing default on a spacebar `textInput` event
271 - * cancels character insertion, but it *also* causes the browser
272 - * to fall back to its default spacebar behavior of scrolling the
273 - * page.
274 - *
275 - * Tracking at:
276 - * https://code.google.com/p/chromium/issues/detail?id=355103
277 - *
278 - * To avoid this issue, use the keypress event as if no `textInput`
279 - * event is available.
280 - */
281 - var which = nativeEvent.which;
282 - if (which !== SPACEBAR_CODE) {
283 - return null;
284 - }
285 -
286 - hasSpaceKeypress = true;
287 - return SPACEBAR_CHAR;
288 -
289 - case topLevelTypes.topTextInput:
290 - // Record the characters to be added to the DOM.
291 - var chars = nativeEvent.data;
292 -
293 - // If it's a spacebar character, assume that we have already handled
294 - // it at the keypress level and bail immediately. Android Chrome
295 - // doesn't give us keycodes, so we need to blacklist it.
296 - if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
297 - return null;
298 - }
299 -
300 - return chars;
301 -
302 - default:
303 - // For other native event types, do nothing.
304 - return null;
99 +var twoArgumentPooler = function (a1, a2) {
100 + var Klass = this;
101 + if (Klass.instancePool.length) {
102 + var instance = Klass.instancePool.pop();
103 + Klass.call(instance, a1, a2);
104 + return instance;
105 + } else {
106 + return new Klass(a1, a2);
107 }
306 -}
108 +};
109
308 -/**
309 - * For browsers that do not provide the `textInput` event, extract the
310 - * appropriate string to use for SyntheticInputEvent.
311 - *
312 - * @param {string} topLevelType Record from `EventConstants`.
313 - * @param {object} nativeEvent Native browser event.
314 - * @return {?string} The fallback string for this `beforeInput` event.
315 - */
316 -function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
317 - // If we are currently composing (IME) and using a fallback to do so,
318 - // try to extract the composed characters from the fallback object.
319 - // If composition event is available, we extract a string only at
320 - // compositionevent, otherwise extract it at fallback events.
321 - if (currentComposition) {
322 - if (topLevelType === topLevelTypes.topCompositionEnd || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
323 - var chars = currentComposition.getData();
324 - FallbackCompositionState.release(currentComposition);
325 - currentComposition = null;
326 - return chars;
327 - }
328 - return null;
110 +var threeArgumentPooler = function (a1, a2, a3) {
111 + var Klass = this;
112 + if (Klass.instancePool.length) {
113 + var instance = Klass.instancePool.pop();
114 + Klass.call(instance, a1, a2, a3);
115 + return instance;
116 + } else {
117 + return new Klass(a1, a2, a3);
118 }
119 +};
120
331 - switch (topLevelType) {
332 - case topLevelTypes.topPaste:
333 - // If a paste event occurs after a keypress, throw out the input
334 - // chars. Paste events should not lead to BeforeInput events.
335 - return null;
336 - case topLevelTypes.topKeyPress:
337 - /**
338 - * As of v27, Firefox may fire keypress events even when no character
339 - * will be inserted. A few possibilities:
340 - *
341 - * - `which` is `0`. Arrow keys, Esc key, etc.
342 - *
343 - * - `which` is the pressed key code, but no char is available.
344 - * Ex: 'AltGr + d` in Polish. There is no modified character for
345 - * this key combination and no character is inserted into the
346 - * document, but FF fires the keypress for char code `100` anyway.
347 - * No `input` event will occur.
348 - *
349 - * - `which` is the pressed key code, but a command combination is
350 - * being used. Ex: `Cmd+C`. No character is inserted, and no
351 - * `input` event will occur.
352 - */
353 - if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
354 - return String.fromCharCode(nativeEvent.which);
355 - }
356 - return null;
357 - case topLevelTypes.topCompositionEnd:
358 - return useFallbackCompositionData ? null : nativeEvent.data;
359 - default:
360 - return null;
121 +var fourArgumentPooler = function (a1, a2, a3, a4) {
122 + var Klass = this;
123 + if (Klass.instancePool.length) {
124 + var instance = Klass.instancePool.pop();
125 + Klass.call(instance, a1, a2, a3, a4);
126 + return instance;
127 + } else {
128 + return new Klass(a1, a2, a3, a4);
129 }
362 -}
363 -
364 -/**
365 - * Extract a SyntheticInputEvent for `beforeInput`, based on either native
366 - * `textInput` or fallback behavior.
367 - *
368 - * @return {?object} A SyntheticInputEvent.
369 - */
370 -function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
371 - var chars;
130 +};
131
373 - if (canUseTextInputEvent) {
374 - chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
132 +var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
133 + var Klass = this;
134 + if (Klass.instancePool.length) {
135 + var instance = Klass.instancePool.pop();
136 + Klass.call(instance, a1, a2, a3, a4, a5);
137 + return instance;
138 } else {
376 - chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
139 + return new Klass(a1, a2, a3, a4, a5);
140 }
141 +};
142
379 - // If no characters are being inserted, no BeforeInput event should
380 - // be fired.
381 - if (!chars) {
382 - return null;
143 +var standardReleaser = function (instance) {
144 + var Klass = this;
145 + !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
146 + instance.destructor();
147 + if (Klass.instancePool.length < Klass.poolSize) {
148 + Klass.instancePool.push(instance);
149 }
150 +};
151
385 - var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
386 -
387 - event.data = chars;
388 - EventPropagators.accumulateTwoPhaseDispatches(event);
389 - return event;
390 -}
152 +var DEFAULT_POOL_SIZE = 10;
153 +var DEFAULT_POOLER = oneArgumentPooler;
154
155 /**
393 - * Create an `onBeforeInput` event to match
394 - * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
395 - *
396 - * This event plugin is based on the native `textInput` event
397 - * available in Chrome, Safari, Opera, and IE. This event fires after
398 - * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
399 - *
400 - * `beforeInput` is spec'd but not implemented in any browsers, and
401 - * the `input` event does not provide any useful information about what has
402 - * actually been added, contrary to the spec. Thus, `textInput` is the best
403 - * available event to identify the characters that have actually been inserted
404 - * into the target node.
156 + * Augments `CopyConstructor` to be a poolable class, augmenting only the class
157 + * itself (statically) not adding any prototypical fields. Any CopyConstructor
158 + * you give this may have a `poolSize` property, and will look for a
159 + * prototypical `destructor` on instances.
160 *
406 - * This plugin is also responsible for emitting `composition` events, thus
407 - * allowing us to share composition fallback code for both `beforeInput` and
408 - * `composition` event types.
161 + * @param {Function} CopyConstructor Constructor that can be used to reset.
162 + * @param {Function} pooler Customizable pooler.
163 */
410 -var BeforeInputEventPlugin = {
411 -
412 - eventTypes: eventTypes,
413 -
414 - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
415 - return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
164 +var addPoolingTo = function (CopyConstructor, pooler) {
165 + // Casting as any so that flow ignores the actual implementation and trusts
166 + // it to match the type we declared
167 + var NewKlass = CopyConstructor;
168 + NewKlass.instancePool = [];
169 + NewKlass.getPooled = pooler || DEFAULT_POOLER;
170 + if (!NewKlass.poolSize) {
171 + NewKlass.poolSize = DEFAULT_POOL_SIZE;
172 }
173 + NewKlass.release = standardReleaser;
174 + return NewKlass;
175 +};
176 +
177 +var PooledClass = {
178 + addPoolingTo: addPoolingTo,
179 + oneArgumentPooler: oneArgumentPooler,
180 + twoArgumentPooler: twoArgumentPooler,
181 + threeArgumentPooler: threeArgumentPooler,
182 + fourArgumentPooler: fourArgumentPooler,
183 + fiveArgumentPooler: fiveArgumentPooler
184 };
185
419 -module.exports = BeforeInputEventPlugin;
420 -},{"103":103,"107":107,"148":148,"16":16,"166":166,"20":20,"21":21}],3:[function(_dereq_,module,exports){
186 +module.exports = PooledClass;
187 +},{"24":24,"28":28}],3:[function(_dereq_,module,exports){
188 /**
189 * Copyright 2013-present, Facebook, Inc.
190 * All rights reserved.
@@ -426,353 +193,87 @@ module.exports = BeforeInputEventPlugin;
193 * LICENSE file in the root directory of this source tree. An additional grant
194 * of patent rights can be found in the PATENTS file in the same directory.
195 *
429 - * @providesModule CSSProperty
196 */
197
198 'use strict';
199
434 -/**
435 - * CSS properties which accept numbers but are not in units of "px".
436 - */
437 -
438 -var isUnitlessNumber = {
439 - animationIterationCount: true,
440 - borderImageOutset: true,
441 - borderImageSlice: true,
442 - borderImageWidth: true,
443 - boxFlex: true,
444 - boxFlexGroup: true,
445 - boxOrdinalGroup: true,
446 - columnCount: true,
447 - flex: true,
448 - flexGrow: true,
449 - flexPositive: true,
450 - flexShrink: true,
451 - flexNegative: true,
452 - flexOrder: true,
453 - gridRow: true,
454 - gridColumn: true,
455 - fontWeight: true,
456 - lineClamp: true,
457 - lineHeight: true,
458 - opacity: true,
459 - order: true,
460 - orphans: true,
461 - tabSize: true,
462 - widows: true,
463 - zIndex: true,
464 - zoom: true,
465 -
466 - // SVG-related properties
467 - fillOpacity: true,
468 - floodOpacity: true,
469 - stopOpacity: true,
470 - strokeDasharray: true,
471 - strokeDashoffset: true,
472 - strokeMiterlimit: true,
473 - strokeOpacity: true,
474 - strokeWidth: true
475 -};
200 +var _assign = _dereq_(30);
201
477 -/**
478 - * @param {string} prefix vendor-specific prefix, eg: Webkit
479 - * @param {string} key style name, eg: transitionDuration
480 - * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
481 - * WebkitTransitionDuration
482 - */
483 -function prefixKey(prefix, key) {
484 - return prefix + key.charAt(0).toUpperCase() + key.substring(1);
485 -}
202 +var ReactChildren = _dereq_(4);
203 +var ReactComponent = _dereq_(6);
204 +var ReactPureComponent = _dereq_(17);
205 +var ReactClass = _dereq_(5);
206 +var ReactDOMFactories = _dereq_(9);
207 +var ReactElement = _dereq_(10);
208 +var ReactPropTypes = _dereq_(15);
209 +var ReactVersion = _dereq_(19);
210
487 -/**
488 - * Support style names that may come passed in prefixed by adding permutations
489 - * of vendor prefixes.
490 - */
491 -var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
211 +var onlyChild = _dereq_(23);
212 +var warning = _dereq_(29);
213
493 -// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
494 -// infinite loop, because it iterates over the newly added props too.
495 -Object.keys(isUnitlessNumber).forEach(function (prop) {
496 - prefixes.forEach(function (prefix) {
497 - isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
498 - });
499 -});
214 +var createElement = ReactElement.createElement;
215 +var createFactory = ReactElement.createFactory;
216 +var cloneElement = ReactElement.cloneElement;
217
501 -/**
502 - * Most style properties can be unset by doing .style[prop] = '' but IE8
503 - * doesn't like doing that with shorthand properties so for the properties that
504 - * IE8 breaks on, which are listed here, we instead unset each of the
505 - * individual properties. See http://bugs.jquery.com/ticket/12385.
506 - * The 4-value 'clock' properties like margin, padding, border-width seem to
507 - * behave without any problems. Curiously, list-style works too without any
508 - * special prodding.
509 - */
510 -var shorthandPropertyExpansions = {
511 - background: {
512 - backgroundAttachment: true,
513 - backgroundColor: true,
514 - backgroundImage: true,
515 - backgroundPositionX: true,
516 - backgroundPositionY: true,
517 - backgroundRepeat: true
518 - },
519 - backgroundPosition: {
520 - backgroundPositionX: true,
521 - backgroundPositionY: true
522 - },
523 - border: {
524 - borderWidth: true,
525 - borderStyle: true,
526 - borderColor: true
527 - },
528 - borderBottom: {
529 - borderBottomWidth: true,
530 - borderBottomStyle: true,
531 - borderBottomColor: true
532 - },
533 - borderLeft: {
534 - borderLeftWidth: true,
535 - borderLeftStyle: true,
536 - borderLeftColor: true
537 - },
538 - borderRight: {
539 - borderRightWidth: true,
540 - borderRightStyle: true,
541 - borderRightColor: true
542 - },
543 - borderTop: {
544 - borderTopWidth: true,
545 - borderTopStyle: true,
546 - borderTopColor: true
547 - },
548 - font: {
549 - fontStyle: true,
550 - fontVariant: true,
551 - fontWeight: true,
552 - fontSize: true,
553 - lineHeight: true,
554 - fontFamily: true
555 - },
556 - outline: {
557 - outlineWidth: true,
558 - outlineStyle: true,
559 - outlineColor: true
560 - }
561 -};
218 +if ("development" !== 'production') {
219 + var ReactElementValidator = _dereq_(12);
220 + createElement = ReactElementValidator.createElement;
221 + createFactory = ReactElementValidator.createFactory;
222 + cloneElement = ReactElementValidator.cloneElement;
223 +}
224
563 -var CSSProperty = {
564 - isUnitlessNumber: isUnitlessNumber,
565 - shorthandPropertyExpansions: shorthandPropertyExpansions
566 -};
567 -
568 -module.exports = CSSProperty;
569 -},{}],4:[function(_dereq_,module,exports){
570 -/**
571 - * Copyright 2013-present, Facebook, Inc.
572 - * All rights reserved.
573 - *
574 - * This source code is licensed under the BSD-style license found in the
575 - * LICENSE file in the root directory of this source tree. An additional grant
576 - * of patent rights can be found in the PATENTS file in the same directory.
577 - *
578 - * @providesModule CSSPropertyOperations
579 - */
580 -
581 -'use strict';
582 -
583 -var CSSProperty = _dereq_(3);
584 -var ExecutionEnvironment = _dereq_(148);
585 -var ReactInstrumentation = _dereq_(73);
586 -
587 -var camelizeStyleName = _dereq_(150);
588 -var dangerousStyleValue = _dereq_(121);
589 -var hyphenateStyleName = _dereq_(161);
590 -var memoizeStringOnly = _dereq_(167);
591 -var warning = _dereq_(171);
592 -
593 -var processStyleName = memoizeStringOnly(function (styleName) {
594 - return hyphenateStyleName(styleName);
595 -});
596 -
597 -var hasShorthandPropertyBug = false;
598 -var styleFloatAccessor = 'cssFloat';
599 -if (ExecutionEnvironment.canUseDOM) {
600 - var tempStyle = document.createElement('div').style;
601 - try {
602 - // IE8 throws "Invalid argument." if resetting shorthand style properties.
603 - tempStyle.font = '';
604 - } catch (e) {
605 - hasShorthandPropertyBug = true;
606 - }
607 - // IE8 only supports accessing cssFloat (standard) as styleFloat
608 - if (document.documentElement.style.cssFloat === undefined) {
609 - styleFloatAccessor = 'styleFloat';
610 - }
611 -}
225 +var __spread = _assign;
226
227 if ("development" !== 'production') {
614 - // 'msTransform' is correct, but the other prefixes should be capitalized
615 - var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
616 -
617 - // style values shouldn't contain a semicolon
618 - var badStyleValueWithSemicolonPattern = /;\s*$/;
619 -
620 - var warnedStyleNames = {};
621 - var warnedStyleValues = {};
622 - var warnedForNaNValue = false;
623 -
624 - var warnHyphenatedStyleName = function (name, owner) {
625 - if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
626 - return;
627 - }
628 -
629 - warnedStyleNames[name] = true;
630 - "development" !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
631 - };
632 -
633 - var warnBadVendoredStyleName = function (name, owner) {
634 - if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
635 - return;
636 - }
637 -
638 - warnedStyleNames[name] = true;
639 - "development" !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
640 - };
641 -
642 - var warnStyleValueWithSemicolon = function (name, value, owner) {
643 - if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
644 - return;
645 - }
646 -
647 - warnedStyleValues[value] = true;
648 - "development" !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
228 + var warned = false;
229 + __spread = function () {
230 + "development" !== 'production' ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0;
231 + warned = true;
232 + return _assign.apply(null, arguments);
233 };
234 +}
235
651 - var warnStyleValueIsNaN = function (name, value, owner) {
652 - if (warnedForNaNValue) {
653 - return;
654 - }
236 +var React = {
237
656 - warnedForNaNValue = true;
657 - "development" !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
658 - };
238 + // Modern
239
660 - var checkRenderMessage = function (owner) {
661 - if (owner) {
662 - var name = owner.getName();
663 - if (name) {
664 - return ' Check the render method of `' + name + '`.';
665 - }
666 - }
667 - return '';
668 - };
240 + Children: {
241 + map: ReactChildren.map,
242 + forEach: ReactChildren.forEach,
243 + count: ReactChildren.count,
244 + toArray: ReactChildren.toArray,
245 + only: onlyChild
246 + },
247
670 - /**
671 - * @param {string} name
672 - * @param {*} value
673 - * @param {ReactDOMComponent} component
674 - */
675 - var warnValidStyle = function (name, value, component) {
676 - var owner;
677 - if (component) {
678 - owner = component._currentElement._owner;
679 - }
680 - if (name.indexOf('-') > -1) {
681 - warnHyphenatedStyleName(name, owner);
682 - } else if (badVendoredStyleNamePattern.test(name)) {
683 - warnBadVendoredStyleName(name, owner);
684 - } else if (badStyleValueWithSemicolonPattern.test(value)) {
685 - warnStyleValueWithSemicolon(name, value, owner);
686 - }
248 + Component: ReactComponent,
249 + PureComponent: ReactPureComponent,
250
688 - if (typeof value === 'number' && isNaN(value)) {
689 - warnStyleValueIsNaN(name, value, owner);
690 - }
691 - };
692 -}
251 + createElement: createElement,
252 + cloneElement: cloneElement,
253 + isValidElement: ReactElement.isValidElement,
254
694 -/**
695 - * Operations for dealing with CSS properties.
696 - */
697 -var CSSPropertyOperations = {
255 + // Classic
256
699 - /**
700 - * Serializes a mapping of style properties for use as inline styles:
701 - *
702 - * > createMarkupForStyles({width: '200px', height: 0})
703 - * "width:200px;height:0;"
704 - *
705 - * Undefined values are ignored so that declarative programming is easier.
706 - * The result should be HTML-escaped before insertion into the DOM.
707 - *
708 - * @param {object} styles
709 - * @param {ReactDOMComponent} component
710 - * @return {?string}
711 - */
712 - createMarkupForStyles: function (styles, component) {
713 - var serialized = '';
714 - for (var styleName in styles) {
715 - if (!styles.hasOwnProperty(styleName)) {
716 - continue;
717 - }
718 - var styleValue = styles[styleName];
719 - if ("development" !== 'production') {
720 - warnValidStyle(styleName, styleValue, component);
721 - }
722 - if (styleValue != null) {
723 - serialized += processStyleName(styleName) + ':';
724 - serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
725 - }
726 - }
727 - return serialized || null;
257 + PropTypes: ReactPropTypes,
258 + createClass: ReactClass.createClass,
259 + createFactory: createFactory,
260 + createMixin: function (mixin) {
261 + // Currently a noop. Will be used to validate and trace mixins.
262 + return mixin;
263 },
264
730 - /**
731 - * Sets the value for multiple styles on a node. If a value is specified as
732 - * '' (empty string), the corresponding style property will be unset.
733 - *
734 - * @param {DOMElement} node
735 - * @param {object} styles
736 - * @param {ReactDOMComponent} component
737 - */
738 - setValueForStyles: function (node, styles, component) {
739 - if ("development" !== 'production') {
740 - ReactInstrumentation.debugTool.onHostOperation(component._debugID, 'update styles', styles);
741 - }
265 + // This looks DOM specific but these are actually isomorphic helpers
266 + // since they are just generating DOM strings.
267 + DOM: ReactDOMFactories,
268
743 - var style = node.style;
744 - for (var styleName in styles) {
745 - if (!styles.hasOwnProperty(styleName)) {
746 - continue;
747 - }
748 - if ("development" !== 'production') {
749 - warnValidStyle(styleName, styles[styleName], component);
750 - }
751 - var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
752 - if (styleName === 'float' || styleName === 'cssFloat') {
753 - styleName = styleFloatAccessor;
754 - }
755 - if (styleValue) {
756 - style[styleName] = styleValue;
757 - } else {
758 - var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
759 - if (expansion) {
760 - // Shorthand property that IE8 won't like unsetting, so unset each
761 - // component to placate it
762 - for (var individualStyleName in expansion) {
763 - style[individualStyleName] = '';
764 - }
765 - } else {
766 - style[styleName] = '';
767 - }
768 - }
769 - }
770 - }
269 + version: ReactVersion,
270
271 + // Deprecated hook for JSX spread, don't use this for anything.
272 + __spread: __spread
273 };
274
774 -module.exports = CSSPropertyOperations;
775 -},{"121":121,"148":148,"150":150,"161":161,"167":167,"171":171,"3":3,"73":73}],5:[function(_dereq_,module,exports){
275 +module.exports = React;
276 +},{"10":10,"12":12,"15":15,"17":17,"19":19,"23":23,"29":29,"30":30,"4":4,"5":5,"6":6,"9":9}],4:[function(_dereq_,module,exports){
277 /**
278 * Copyright 2013-present, Facebook, Inc.
279 * All rights reserved.
@@ -781,431 +282,189 @@ module.exports = CSSPropertyOperations;
282 * LICENSE file in the root directory of this source tree. An additional grant
283 * of patent rights can be found in the PATENTS file in the same directory.
284 *
784 - * @providesModule CallbackQueue
285 */
286
287 'use strict';
288
789 -var _prodInvariant = _dereq_(140),
790 - _assign = _dereq_(172);
289 +var PooledClass = _dereq_(2);
290 +var ReactElement = _dereq_(10);
291
792 -var PooledClass = _dereq_(25);
292 +var emptyFunction = _dereq_(26);
293 +var traverseAllChildren = _dereq_(25);
294
794 -var invariant = _dereq_(162);
295 +var twoArgumentPooler = PooledClass.twoArgumentPooler;
296 +var fourArgumentPooler = PooledClass.fourArgumentPooler;
297 +
298 +var userProvidedKeyEscapeRegex = /\/+/g;
299 +function escapeUserProvidedKey(text) {
300 + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
301 +}
302
303 /**
797 - * A specialized pseudo-event module to help keep track of components waiting to
798 - * be notified when their DOM representations are available for use.
799 - *
800 - * This implements `PooledClass`, so you should never need to instantiate this.
801 - * Instead, use `CallbackQueue.getPooled()`.
304 + * PooledClass representing the bookkeeping associated with performing a child
305 + * traversal. Allows avoiding binding callbacks.
306 *
803 - * @class ReactMountReady
804 - * @implements PooledClass
805 - * @internal
307 + * @constructor ForEachBookKeeping
308 + * @param {!function} forEachFunction Function to perform traversal with.
309 + * @param {?*} forEachContext Context to perform context with.
310 */
807 -function CallbackQueue() {
808 - this._callbacks = null;
809 - this._contexts = null;
311 +function ForEachBookKeeping(forEachFunction, forEachContext) {
312 + this.func = forEachFunction;
313 + this.context = forEachContext;
314 + this.count = 0;
315 }
316 +ForEachBookKeeping.prototype.destructor = function () {
317 + this.func = null;
318 + this.context = null;
319 + this.count = 0;
320 +};
321 +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
322
812 -_assign(CallbackQueue.prototype, {
813 -
814 - /**
815 - * Enqueues a callback to be invoked when `notifyAll` is invoked.
816 - *
817 - * @param {function} callback Invoked when `notifyAll` is invoked.
818 - * @param {?object} context Context to call `callback` with.
819 - * @internal
820 - */
821 - enqueue: function (callback, context) {
822 - this._callbacks = this._callbacks || [];
823 - this._contexts = this._contexts || [];
824 - this._callbacks.push(callback);
825 - this._contexts.push(context);
826 - },
827 -
828 - /**
829 - * Invokes all enqueued callbacks and clears the queue. This is invoked after
830 - * the DOM representation of a component has been created or updated.
831 - *
832 - * @internal
833 - */
834 - notifyAll: function () {
835 - var callbacks = this._callbacks;
836 - var contexts = this._contexts;
837 - if (callbacks) {
838 - !(callbacks.length === contexts.length) ? "development" !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
839 - this._callbacks = null;
840 - this._contexts = null;
841 - for (var i = 0; i < callbacks.length; i++) {
842 - callbacks[i].call(contexts[i]);
843 - }
844 - callbacks.length = 0;
845 - contexts.length = 0;
846 - }
847 - },
848 -
849 - checkpoint: function () {
850 - return this._callbacks ? this._callbacks.length : 0;
851 - },
852 -
853 - rollback: function (len) {
854 - if (this._callbacks) {
855 - this._callbacks.length = len;
856 - this._contexts.length = len;
857 - }
858 - },
859 -
860 - /**
861 - * Resets the internal queue.
862 - *
863 - * @internal
864 - */
865 - reset: function () {
866 - this._callbacks = null;
867 - this._contexts = null;
868 - },
869 -
870 - /**
871 - * `PooledClass` looks for this.
872 - */
873 - destructor: function () {
874 - this.reset();
875 - }
876 -
877 -});
323 +function forEachSingleChild(bookKeeping, child, name) {
324 + var func = bookKeeping.func,
325 + context = bookKeeping.context;
326
879 -PooledClass.addPoolingTo(CallbackQueue);
327 + func.call(context, child, bookKeeping.count++);
328 +}
329
881 -module.exports = CallbackQueue;
882 -},{"140":140,"162":162,"172":172,"25":25}],6:[function(_dereq_,module,exports){
330 /**
884 - * Copyright 2013-present, Facebook, Inc.
885 - * All rights reserved.
331 + * Iterates through children that are typically specified as `props.children`.
332 *
887 - * This source code is licensed under the BSD-style license found in the
888 - * LICENSE file in the root directory of this source tree. An additional grant
889 - * of patent rights can be found in the PATENTS file in the same directory.
333 + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
334 *
891 - * @providesModule ChangeEventPlugin
335 + * The provided forEachFunc(child, index) will be called for each
336 + * leaf child.
337 + *
338 + * @param {?*} children Children tree container.
339 + * @param {function(*, int)} forEachFunc
340 + * @param {*} forEachContext Context for forEachContext.
341 */
893 -
894 -'use strict';
895 -
896 -var EventConstants = _dereq_(16);
897 -var EventPluginHub = _dereq_(17);
898 -var EventPropagators = _dereq_(20);
899 -var ExecutionEnvironment = _dereq_(148);
900 -var ReactDOMComponentTree = _dereq_(42);
901 -var ReactUpdates = _dereq_(96);
902 -var SyntheticEvent = _dereq_(105);
903 -
904 -var getEventTarget = _dereq_(129);
905 -var isEventSupported = _dereq_(136);
906 -var isTextInputElement = _dereq_(137);
907 -var keyOf = _dereq_(166);
908 -
909 -var topLevelTypes = EventConstants.topLevelTypes;
910 -
911 -var eventTypes = {
912 - change: {
913 - phasedRegistrationNames: {
914 - bubbled: keyOf({ onChange: null }),
915 - captured: keyOf({ onChangeCapture: null })
916 - },
917 - dependencies: [topLevelTypes.topBlur, topLevelTypes.topChange, topLevelTypes.topClick, topLevelTypes.topFocus, topLevelTypes.topInput, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topSelectionChange]
342 +function forEachChildren(children, forEachFunc, forEachContext) {
343 + if (children == null) {
344 + return children;
345 }
919 -};
920 -
921 -/**
922 - * For IE shims
923 - */
924 -var activeElement = null;
925 -var activeElementInst = null;
926 -var activeElementValue = null;
927 -var activeElementValueProp = null;
346 + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
347 + traverseAllChildren(children, forEachSingleChild, traverseContext);
348 + ForEachBookKeeping.release(traverseContext);
349 +}
350
351 /**
930 - * SECTION: handle `change` event
352 + * PooledClass representing the bookkeeping associated with performing a child
353 + * mapping. Allows avoiding binding callbacks.
354 + *
355 + * @constructor MapBookKeeping
356 + * @param {!*} mapResult Object containing the ordered map of results.
357 + * @param {!function} mapFunction Function to perform mapping with.
358 + * @param {?*} mapContext Context to perform mapping with.
359 */
932 -function shouldUseChangeEvent(elem) {
933 - var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
934 - return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
935 -}
936 -
937 -var doesChangeEventBubble = false;
938 -if (ExecutionEnvironment.canUseDOM) {
939 - // See `handleChange` comment below
940 - doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
941 -}
942 -
943 -function manualDispatchChangeEvent(nativeEvent) {
944 - var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
945 - EventPropagators.accumulateTwoPhaseDispatches(event);
946 -
947 - // If change and propertychange bubbled, we'd just bind to it like all the
948 - // other events and have it go through ReactBrowserEventEmitter. Since it
949 - // doesn't, we manually listen for the events and so we have to enqueue and
950 - // process the abstract event manually.
951 - //
952 - // Batching is necessary here in order to ensure that all event handlers run
953 - // before the next rerender (including event handlers attached to ancestor
954 - // elements instead of directly on the input). Without this, controlled
955 - // components don't work properly in conjunction with event bubbling because
956 - // the component is rerendered and the value reverted before all the event
957 - // handlers can run. See https://github.com/facebook/react/issues/708.
958 - ReactUpdates.batchedUpdates(runEventInBatch, event);
360 +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
361 + this.result = mapResult;
362 + this.keyPrefix = keyPrefix;
363 + this.func = mapFunction;
364 + this.context = mapContext;
365 + this.count = 0;
366 }
367 +MapBookKeeping.prototype.destructor = function () {
368 + this.result = null;
369 + this.keyPrefix = null;
370 + this.func = null;
371 + this.context = null;
372 + this.count = 0;
373 +};
374 +PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
375
961 -function runEventInBatch(event) {
962 - EventPluginHub.enqueueEvents(event);
963 - EventPluginHub.processEventQueue(false);
964 -}
376 +function mapSingleChildIntoContext(bookKeeping, child, childKey) {
377 + var result = bookKeeping.result,
378 + keyPrefix = bookKeeping.keyPrefix,
379 + func = bookKeeping.func,
380 + context = bookKeeping.context;
381
966 -function startWatchingForChangeEventIE8(target, targetInst) {
967 - activeElement = target;
968 - activeElementInst = targetInst;
969 - activeElement.attachEvent('onchange', manualDispatchChangeEvent);
970 -}
382
972 -function stopWatchingForChangeEventIE8() {
973 - if (!activeElement) {
974 - return;
383 + var mappedChild = func.call(context, child, bookKeeping.count++);
384 + if (Array.isArray(mappedChild)) {
385 + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
386 + } else if (mappedChild != null) {
387 + if (ReactElement.isValidElement(mappedChild)) {
388 + mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
389 + // Keep both the (mapped) and old keys if they differ, just as
390 + // traverseAllChildren used to do for objects as children
391 + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
392 + }
393 + result.push(mappedChild);
394 }
976 - activeElement.detachEvent('onchange', manualDispatchChangeEvent);
977 - activeElement = null;
978 - activeElementInst = null;
395 }
396
981 -function getTargetInstForChangeEvent(topLevelType, targetInst) {
982 - if (topLevelType === topLevelTypes.topChange) {
983 - return targetInst;
984 - }
985 -}
986 -function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
987 - if (topLevelType === topLevelTypes.topFocus) {
988 - // stopWatching() should be a noop here but we call it just in case we
989 - // missed a blur event somehow.
990 - stopWatchingForChangeEventIE8();
991 - startWatchingForChangeEventIE8(target, targetInst);
992 - } else if (topLevelType === topLevelTypes.topBlur) {
993 - stopWatchingForChangeEventIE8();
397 +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
398 + var escapedPrefix = '';
399 + if (prefix != null) {
400 + escapedPrefix = escapeUserProvidedKey(prefix) + '/';
401 }
402 + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
403 + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
404 + MapBookKeeping.release(traverseContext);
405 }
406
407 /**
998 - * SECTION: handle `input` event
999 - */
1000 -var isInputEventSupported = false;
1001 -if (ExecutionEnvironment.canUseDOM) {
1002 - // IE9 claims to support the input event but fails to trigger it when
1003 - // deleting text, so we ignore its input events.
1004 - // IE10+ fire input events to often, such when a placeholder
1005 - // changes or when an input with a placeholder is focused.
1006 - isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
1007 -}
1008 -
1009 -/**
1010 - * (For IE <=11) Replacement getter/setter for the `value` property that gets
1011 - * set on the active element.
408 + * Maps children that are typically specified as `props.children`.
409 + *
410 + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
411 + *
412 + * The provided mapFunction(child, key, index) will be called for each
413 + * leaf child.
414 + *
415 + * @param {?*} children Children tree container.
416 + * @param {function(*, int)} func The map function.
417 + * @param {*} context Context for mapFunction.
418 + * @return {object} Object containing the ordered map of results.
419 */
1013 -var newValueProp = {
1014 - get: function () {
1015 - return activeElementValueProp.get.call(this);
1016 - },
1017 - set: function (val) {
1018 - // Cast to a string so we can do equality checks.
1019 - activeElementValue = '' + val;
1020 - activeElementValueProp.set.call(this, val);
1021 - }
1022 -};
1023 -
1024 -/**
1025 - * (For IE <=11) Starts tracking propertychange events on the passed-in element
1026 - * and override the value property so that we can distinguish user events from
1027 - * value changes in JS.
1028 - */
1029 -function startWatchingForValueChange(target, targetInst) {
1030 - activeElement = target;
1031 - activeElementInst = targetInst;
1032 - activeElementValue = target.value;
1033 - activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
1034 -
1035 - // Not guarded in a canDefineProperty check: IE8 supports defineProperty only
1036 - // on DOM elements
1037 - Object.defineProperty(activeElement, 'value', newValueProp);
1038 - if (activeElement.attachEvent) {
1039 - activeElement.attachEvent('onpropertychange', handlePropertyChange);
1040 - } else {
1041 - activeElement.addEventListener('propertychange', handlePropertyChange, false);
1042 - }
1043 -}
1044 -
1045 -/**
1046 - * (For IE <=11) Removes the event listeners from the currently-tracked element,
1047 - * if any exists.
1048 - */
1049 -function stopWatchingForValueChange() {
1050 - if (!activeElement) {
1051 - return;
1052 - }
1053 -
1054 - // delete restores the original property definition
1055 - delete activeElement.value;
1056 -
1057 - if (activeElement.detachEvent) {
1058 - activeElement.detachEvent('onpropertychange', handlePropertyChange);
1059 - } else {
1060 - activeElement.removeEventListener('propertychange', handlePropertyChange, false);
1061 - }
1062 -
1063 - activeElement = null;
1064 - activeElementInst = null;
1065 - activeElementValue = null;
1066 - activeElementValueProp = null;
1067 -}
1068 -
1069 -/**
1070 - * (For IE <=11) Handles a propertychange event, sending a `change` event if
1071 - * the value of the active element has changed.
1072 - */
1073 -function handlePropertyChange(nativeEvent) {
1074 - if (nativeEvent.propertyName !== 'value') {
1075 - return;
1076 - }
1077 - var value = nativeEvent.srcElement.value;
1078 - if (value === activeElementValue) {
1079 - return;
1080 - }
1081 - activeElementValue = value;
1082 -
1083 - manualDispatchChangeEvent(nativeEvent);
1084 -}
1085 -
1086 -/**
1087 - * If a `change` event should be fired, returns the target's ID.
1088 - */
1089 -function getTargetInstForInputEvent(topLevelType, targetInst) {
1090 - if (topLevelType === topLevelTypes.topInput) {
1091 - // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
1092 - // what we want so fall through here and trigger an abstract event
1093 - return targetInst;
1094 - }
1095 -}
1096 -
1097 -function handleEventsForInputEventIE(topLevelType, target, targetInst) {
1098 - if (topLevelType === topLevelTypes.topFocus) {
1099 - // In IE8, we can capture almost all .value changes by adding a
1100 - // propertychange handler and looking for events with propertyName
1101 - // equal to 'value'
1102 - // In IE9-11, propertychange fires for most input events but is buggy and
1103 - // doesn't fire when text is deleted, but conveniently, selectionchange
1104 - // appears to fire in all of the remaining cases so we catch those and
1105 - // forward the event if the value has changed
1106 - // In either case, we don't want to call the event handler if the value
1107 - // is changed from JS so we redefine a setter for `.value` that updates
1108 - // our activeElementValue variable, allowing us to ignore those changes
1109 - //
1110 - // stopWatching() should be a noop here but we call it just in case we
1111 - // missed a blur event somehow.
1112 - stopWatchingForValueChange();
1113 - startWatchingForValueChange(target, targetInst);
1114 - } else if (topLevelType === topLevelTypes.topBlur) {
1115 - stopWatchingForValueChange();
420 +function mapChildren(children, func, context) {
421 + if (children == null) {
422 + return children;
423 }
424 + var result = [];
425 + mapIntoWithKeyPrefixInternal(children, result, null, func, context);
426 + return result;
427 }
428
1119 -// For IE8 and IE9.
1120 -function getTargetInstForInputEventIE(topLevelType, targetInst) {
1121 - if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) {
1122 - // On the selectionchange event, the target is just document which isn't
1123 - // helpful for us so just check activeElement instead.
1124 - //
1125 - // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
1126 - // propertychange on the first input event after setting `value` from a
1127 - // script and fires only keydown, keypress, keyup. Catching keyup usually
1128 - // gets it and catching keydown lets us fire an event for the first
1129 - // keystroke if user does a key repeat (it'll be a little delayed: right
1130 - // before the second keystroke). Other input methods (e.g., paste) seem to
1131 - // fire selectionchange normally.
1132 - if (activeElement && activeElement.value !== activeElementValue) {
1133 - activeElementValue = activeElement.value;
1134 - return activeElementInst;
1135 - }
1136 - }
429 +function forEachSingleChildDummy(traverseContext, child, name) {
430 + return null;
431 }
432
433 /**
1140 - * SECTION: handle `click` event
434 + * Count the number of children that are typically specified as
435 + * `props.children`.
436 + *
437 + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
438 + *
439 + * @param {?*} children Children tree container.
440 + * @return {number} The number of children.
441 */
1142 -function shouldUseClickEvent(elem) {
1143 - // Use the `click` event to detect changes to checkbox and radio inputs.
1144 - // This approach works across all browsers, whereas `change` does not fire
1145 - // until `blur` in IE8.
1146 - return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
1147 -}
1148 -
1149 -function getTargetInstForClickEvent(topLevelType, targetInst) {
1150 - if (topLevelType === topLevelTypes.topClick) {
1151 - return targetInst;
1152 - }
442 +function countChildren(children, context) {
443 + return traverseAllChildren(children, forEachSingleChildDummy, null);
444 }
445
446 /**
1156 - * This plugin creates an `onChange` event that normalizes change events
1157 - * across form elements. This event fires at a time when it's possible to
1158 - * change the element's value without seeing a flicker.
447 + * Flatten a children object (typically specified as `props.children`) and
448 + * return an array with appropriately re-keyed children.
449 *
1160 - * Supported elements are:
1161 - * - input (see `isTextInputElement`)
1162 - * - textarea
1163 - * - select
450 + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
451 */
1165 -var ChangeEventPlugin = {
1166 -
1167 - eventTypes: eventTypes,
1168 -
1169 - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
1170 - var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
1171 -
1172 - var getTargetInstFunc, handleEventFunc;
1173 - if (shouldUseChangeEvent(targetNode)) {
1174 - if (doesChangeEventBubble) {
1175 - getTargetInstFunc = getTargetInstForChangeEvent;
1176 - } else {
1177 - handleEventFunc = handleEventsForChangeEventIE8;
1178 - }
1179 - } else if (isTextInputElement(targetNode)) {
1180 - if (isInputEventSupported) {
1181 - getTargetInstFunc = getTargetInstForInputEvent;
1182 - } else {
1183 - getTargetInstFunc = getTargetInstForInputEventIE;
1184 - handleEventFunc = handleEventsForInputEventIE;
1185 - }
1186 - } else if (shouldUseClickEvent(targetNode)) {
1187 - getTargetInstFunc = getTargetInstForClickEvent;
1188 - }
1189 -
1190 - if (getTargetInstFunc) {
1191 - var inst = getTargetInstFunc(topLevelType, targetInst);
1192 - if (inst) {
1193 - var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);
1194 - event.type = 'change';
1195 - EventPropagators.accumulateTwoPhaseDispatches(event);
1196 - return event;
1197 - }
1198 - }
1199 -
1200 - if (handleEventFunc) {
1201 - handleEventFunc(topLevelType, targetNode, targetInst);
1202 - }
1203 - }
452 +function toArray(children) {
453 + var result = [];
454 + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
455 + return result;
456 +}
457
458 +var ReactChildren = {
459 + forEach: forEachChildren,
460 + map: mapChildren,
461 + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
462 + count: countChildren,
463 + toArray: toArray
464 };
465
1207 -module.exports = ChangeEventPlugin;
1208 -},{"105":105,"129":129,"136":136,"137":137,"148":148,"16":16,"166":166,"17":17,"20":20,"42":42,"96":96}],7:[function(_dereq_,module,exports){
466 +module.exports = ReactChildren;
467 +},{"10":10,"2":2,"25":25,"26":26}],5:[function(_dereq_,module,exports){
468 /**
469 * Copyright 2013-present, Facebook, Inc.
470 * All rights reserved.
@@ -1214,1346 +473,715 @@ module.exports = ChangeEventPlugin;
473 * LICENSE file in the root directory of this source tree. An additional grant
474 * of patent rights can be found in the PATENTS file in the same directory.
475 *
1217 - * @providesModule DOMChildrenOperations
476 */
477
478 'use strict';
479
1222 -var DOMLazyTree = _dereq_(8);
1223 -var Danger = _dereq_(12);
1224 -var ReactMultiChildUpdateTypes = _dereq_(78);
1225 -var ReactDOMComponentTree = _dereq_(42);
1226 -var ReactInstrumentation = _dereq_(73);
1227 -
1228 -var createMicrosoftUnsafeLocalFunction = _dereq_(120);
1229 -var setInnerHTML = _dereq_(142);
1230 -var setTextContent = _dereq_(143);
1231 -
1232 -function getNodeAfter(parentNode, node) {
1233 - // Special case for text components, which return [open, close] comments
1234 - // from getHostNode.
1235 - if (Array.isArray(node)) {
1236 - node = node[1];
1237 - }
1238 - return node ? node.nextSibling : parentNode.firstChild;
1239 -}
1240 -
1241 -/**
1242 - * Inserts `childNode` as a child of `parentNode` at the `index`.
1243 - *
1244 - * @param {DOMElement} parentNode Parent node in which to insert.
1245 - * @param {DOMElement} childNode Child node to insert.
1246 - * @param {number} index Index at which to insert the child.
1247 - * @internal
1248 - */
1249 -var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
1250 - // We rely exclusively on `insertBefore(node, null)` instead of also using
1251 - // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
1252 - // we are careful to use `null`.)
1253 - parentNode.insertBefore(childNode, referenceNode);
1254 -});
1255 -
1256 -function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
1257 - DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
1258 -}
480 +var _prodInvariant = _dereq_(24),
481 + _assign = _dereq_(30);
482
1260 -function moveChild(parentNode, childNode, referenceNode) {
1261 - if (Array.isArray(childNode)) {
1262 - moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
1263 - } else {
1264 - insertChildAt(parentNode, childNode, referenceNode);
1265 - }
1266 -}
483 +var ReactComponent = _dereq_(6);
484 +var ReactElement = _dereq_(10);
485 +var ReactPropTypeLocationNames = _dereq_(14);
486 +var ReactNoopUpdateQueue = _dereq_(13);
487
1268 -function removeChild(parentNode, childNode) {
1269 - if (Array.isArray(childNode)) {
1270 - var closingComment = childNode[1];
1271 - childNode = childNode[0];
1272 - removeDelimitedText(parentNode, childNode, closingComment);
1273 - parentNode.removeChild(closingComment);
1274 - }
1275 - parentNode.removeChild(childNode);
1276 -}
488 +var emptyObject = _dereq_(27);
489 +var invariant = _dereq_(28);
490 +var warning = _dereq_(29);
491
1278 -function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
1279 - var node = openingComment;
1280 - while (true) {
1281 - var nextNode = node.nextSibling;
1282 - insertChildAt(parentNode, node, referenceNode);
1283 - if (node === closingComment) {
1284 - break;
1285 - }
1286 - node = nextNode;
1287 - }
1288 -}
492 +var MIXINS_KEY = 'mixins';
493
1290 -function removeDelimitedText(parentNode, startNode, closingComment) {
1291 - while (true) {
1292 - var node = startNode.nextSibling;
1293 - if (node === closingComment) {
1294 - // The closing comment is removed by ReactMultiChild.
1295 - break;
1296 - } else {
1297 - parentNode.removeChild(node);
1298 - }
1299 - }
494 +// Helper function to allow the creation of anonymous functions which do not
495 +// have .name set to the name of the variable being assigned to.
496 +function identity(fn) {
497 + return fn;
498 }
499
1302 -function replaceDelimitedText(openingComment, closingComment, stringText) {
1303 - var parentNode = openingComment.parentNode;
1304 - var nodeAfterComment = openingComment.nextSibling;
1305 - if (nodeAfterComment === closingComment) {
1306 - // There are no text nodes between the opening and closing comments; insert
1307 - // a new one if stringText isn't empty.
1308 - if (stringText) {
1309 - insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
1310 - }
1311 - } else {
1312 - if (stringText) {
1313 - // Set the text content of the first node after the opening comment, and
1314 - // remove all following nodes up until the closing comment.
1315 - setTextContent(nodeAfterComment, stringText);
1316 - removeDelimitedText(parentNode, nodeAfterComment, closingComment);
1317 - } else {
1318 - removeDelimitedText(parentNode, openingComment, closingComment);
1319 - }
1320 - }
500 +/**
501 + * Policies that describe methods in `ReactClassInterface`.
502 + */
503
1322 - if ("development" !== 'production') {
1323 - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, 'replace text', stringText);
1324 - }
1325 -}
504
1327 -var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
1328 -if ("development" !== 'production') {
1329 - dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
1330 - Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
1331 - if (prevInstance._debugID !== 0) {
1332 - ReactInstrumentation.debugTool.onHostOperation(prevInstance._debugID, 'replace with', markup.toString());
1333 - } else {
1334 - var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
1335 - if (nextInstance._debugID !== 0) {
1336 - ReactInstrumentation.debugTool.onHostOperation(nextInstance._debugID, 'mount', markup.toString());
1337 - }
1338 - }
1339 - };
1340 -}
505 +var injectedMixins = [];
506
507 /**
1343 - * Operations for updating with DOM children.
508 + * Composite components are higher-level components that compose other composite
509 + * or host components.
510 + *
511 + * To create a new type of `ReactClass`, pass a specification of
512 + * your new class to `React.createClass`. The only requirement of your class
513 + * specification is that you implement a `render` method.
514 + *
515 + * var MyComponent = React.createClass({
516 + * render: function() {
517 + * return <div>Hello World</div>;
518 + * }
519 + * });
520 + *
521 + * The class specification supports a specific protocol of methods that have
522 + * special meaning (e.g. `render`). See `ReactClassInterface` for
523 + * more the comprehensive protocol. Any other properties and methods in the
524 + * class specification will be available on the prototype.
525 + *
526 + * @interface ReactClassInterface
527 + * @internal
528 */
1345 -var DOMChildrenOperations = {
529 +var ReactClassInterface = {
530
1347 - dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
531 + /**
532 + * An array of Mixin objects to include when defining your component.
533 + *
534 + * @type {array}
535 + * @optional
536 + */
537 + mixins: 'DEFINE_MANY',
538
1349 - replaceDelimitedText: replaceDelimitedText,
539 + /**
540 + * An object containing properties and methods that should be defined on
541 + * the component's constructor instead of its prototype (static methods).
542 + *
543 + * @type {object}
544 + * @optional
545 + */
546 + statics: 'DEFINE_MANY',
547
548 /**
1352 - * Updates a component's children by processing a series of updates. The
1353 - * update configurations are each expected to have a `parentNode` property.
549 + * Definition of prop types for this component.
550 *
1355 - * @param {array<object>} updates List of update configurations.
1356 - * @internal
551 + * @type {object}
552 + * @optional
553 */
1358 - processUpdates: function (parentNode, updates) {
1359 - if ("development" !== 'production') {
1360 - var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
1361 - }
554 + propTypes: 'DEFINE_MANY',
555
1363 - for (var k = 0; k < updates.length; k++) {
1364 - var update = updates[k];
1365 - switch (update.type) {
1366 - case ReactMultiChildUpdateTypes.INSERT_MARKUP:
1367 - insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
1368 - if ("development" !== 'production') {
1369 - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'insert child', { toIndex: update.toIndex, content: update.content.toString() });
1370 - }
1371 - break;
1372 - case ReactMultiChildUpdateTypes.MOVE_EXISTING:
1373 - moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
1374 - if ("development" !== 'production') {
1375 - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'move child', { fromIndex: update.fromIndex, toIndex: update.toIndex });
1376 - }
1377 - break;
1378 - case ReactMultiChildUpdateTypes.SET_MARKUP:
1379 - setInnerHTML(parentNode, update.content);
1380 - if ("development" !== 'production') {
1381 - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'replace children', update.content.toString());
1382 - }
1383 - break;
1384 - case ReactMultiChildUpdateTypes.TEXT_CONTENT:
1385 - setTextContent(parentNode, update.content);
1386 - if ("development" !== 'production') {
1387 - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'replace text', update.content.toString());
1388 - }
1389 - break;
1390 - case ReactMultiChildUpdateTypes.REMOVE_NODE:
1391 - removeChild(parentNode, update.fromNode);
1392 - if ("development" !== 'production') {
1393 - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'remove child', { fromIndex: update.fromIndex });
1394 - }
1395 - break;
1396 - }
1397 - }
1398 - }
556 + /**
557 + * Definition of context types for this component.
558 + *
559 + * @type {object}
560 + * @optional
561 + */
562 + contextTypes: 'DEFINE_MANY',
563
1400 -};
564 + /**
565 + * Definition of context types this component sets for its children.
566 + *
567 + * @type {object}
568 + * @optional
569 + */
570 + childContextTypes: 'DEFINE_MANY',
571
1402 -module.exports = DOMChildrenOperations;
1403 -},{"12":12,"120":120,"142":142,"143":143,"42":42,"73":73,"78":78,"8":8}],8:[function(_dereq_,module,exports){
1404 -/**
1405 - * Copyright 2015-present, Facebook, Inc.
1406 - * All rights reserved.
1407 - *
1408 - * This source code is licensed under the BSD-style license found in the
1409 - * LICENSE file in the root directory of this source tree. An additional grant
1410 - * of patent rights can be found in the PATENTS file in the same directory.
1411 - *
1412 - * @providesModule DOMLazyTree
1413 - */
572 + // ==== Definition methods ====
573
1415 -'use strict';
574 + /**
575 + * Invoked when the component is mounted. Values in the mapping will be set on
576 + * `this.props` if that prop is not specified (i.e. using an `in` check).
577 + *
578 + * This method is invoked before `getInitialState` and therefore cannot rely
579 + * on `this.state` or use `this.setState`.
580 + *
581 + * @return {object}
582 + * @optional
583 + */
584 + getDefaultProps: 'DEFINE_MANY_MERGED',
585
1417 -var DOMNamespaces = _dereq_(9);
1418 -var setInnerHTML = _dereq_(142);
586 + /**
587 + * Invoked once before the component is mounted. The return value will be used
588 + * as the initial value of `this.state`.
589 + *
590 + * getInitialState: function() {
591 + * return {
592 + * isOn: false,
593 + * fooBaz: new BazFoo()
594 + * }
595 + * }
596 + *
597 + * @return {object}
598 + * @optional
599 + */
600 + getInitialState: 'DEFINE_MANY_MERGED',
601
1420 -var createMicrosoftUnsafeLocalFunction = _dereq_(120);
1421 -var setTextContent = _dereq_(143);
602 + /**
603 + * @return {object}
604 + * @optional
605 + */
606 + getChildContext: 'DEFINE_MANY_MERGED',
607
1423 -var ELEMENT_NODE_TYPE = 1;
1424 -var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
608 + /**
609 + * Uses props from `this.props` and state from `this.state` to render the
610 + * structure of the component.
611 + *
612 + * No guarantees are made about when or how often this method is invoked, so
613 + * it must not have side effects.
614 + *
615 + * render: function() {
616 + * var name = this.props.name;
617 + * return <div>Hello, {name}!</div>;
618 + * }
619 + *
620 + * @return {ReactComponent}
621 + * @nosideeffects
622 + * @required
623 + */
624 + render: 'DEFINE_ONCE',
625
1426 -/**
1427 - * In IE (8-11) and Edge, appending nodes with no children is dramatically
1428 - * faster than appending a full subtree, so we essentially queue up the
1429 - * .appendChild calls here and apply them so each node is added to its parent
1430 - * before any children are added.
1431 - *
1432 - * In other browsers, doing so is slower or neutral compared to the other order
1433 - * (in Firefox, twice as slow) so we only do this inversion in IE.
1434 - *
1435 - * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
1436 - */
1437 -var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
626 + // ==== Delegate methods ====
627
1439 -function insertTreeChildren(tree) {
1440 - if (!enableLazy) {
1441 - return;
1442 - }
1443 - var node = tree.node;
1444 - var children = tree.children;
1445 - if (children.length) {
1446 - for (var i = 0; i < children.length; i++) {
1447 - insertTreeBefore(node, children[i], null);
1448 - }
1449 - } else if (tree.html != null) {
1450 - setInnerHTML(node, tree.html);
1451 - } else if (tree.text != null) {
1452 - setTextContent(node, tree.text);
1453 - }
1454 -}
1455 -
1456 -var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
1457 - // DocumentFragments aren't actually part of the DOM after insertion so
1458 - // appending children won't update the DOM. We need to ensure the fragment
1459 - // is properly populated first, breaking out of our lazy approach for just
1460 - // this level. Also, some <object> plugins (like Flash Player) will read
1461 - // <param> nodes immediately upon insertion into the DOM, so <object>
1462 - // must also be populated prior to insertion into the DOM.
1463 - if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {
1464 - insertTreeChildren(tree);
1465 - parentNode.insertBefore(tree.node, referenceNode);
1466 - } else {
1467 - parentNode.insertBefore(tree.node, referenceNode);
1468 - insertTreeChildren(tree);
1469 - }
1470 -});
1471 -
1472 -function replaceChildWithTree(oldNode, newTree) {
1473 - oldNode.parentNode.replaceChild(newTree.node, oldNode);
1474 - insertTreeChildren(newTree);
1475 -}
1476 -
1477 -function queueChild(parentTree, childTree) {
1478 - if (enableLazy) {
1479 - parentTree.children.push(childTree);
1480 - } else {
1481 - parentTree.node.appendChild(childTree.node);
1482 - }
1483 -}
1484 -
1485 -function queueHTML(tree, html) {
1486 - if (enableLazy) {
1487 - tree.html = html;
1488 - } else {
1489 - setInnerHTML(tree.node, html);
1490 - }
1491 -}
1492 -
1493 -function queueText(tree, text) {
1494 - if (enableLazy) {
1495 - tree.text = text;
1496 - } else {
1497 - setTextContent(tree.node, text);
1498 - }
1499 -}
1500 -
1501 -function toString() {
1502 - return this.node.nodeName;
1503 -}
1504 -
1505 -function DOMLazyTree(node) {
1506 - return {
1507 - node: node,
1508 - children: [],
1509 - html: null,
1510 - text: null,
1511 - toString: toString
1512 - };
1513 -}
1514 -
1515 -DOMLazyTree.insertTreeBefore = insertTreeBefore;
1516 -DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
1517 -DOMLazyTree.queueChild = queueChild;
1518 -DOMLazyTree.queueHTML = queueHTML;
1519 -DOMLazyTree.queueText = queueText;
1520 -
1521 -module.exports = DOMLazyTree;
1522 -},{"120":120,"142":142,"143":143,"9":9}],9:[function(_dereq_,module,exports){
1523 -/**
1524 - * Copyright 2013-present, Facebook, Inc.
1525 - * All rights reserved.
1526 - *
1527 - * This source code is licensed under the BSD-style license found in the
1528 - * LICENSE file in the root directory of this source tree. An additional grant
1529 - * of patent rights can be found in the PATENTS file in the same directory.
1530 - *
1531 - * @providesModule DOMNamespaces
1532 - */
1533 -
1534 -'use strict';
1535 -
1536 -var DOMNamespaces = {
1537 - html: 'http://www.w3.org/1999/xhtml',
1538 - mathml: 'http://www.w3.org/1998/Math/MathML',
1539 - svg: 'http://www.w3.org/2000/svg'
1540 -};
1541 -
1542 -module.exports = DOMNamespaces;
1543 -},{}],10:[function(_dereq_,module,exports){
1544 -/**
1545 - * Copyright 2013-present, Facebook, Inc.
1546 - * All rights reserved.
1547 - *
1548 - * This source code is licensed under the BSD-style license found in the
1549 - * LICENSE file in the root directory of this source tree. An additional grant
1550 - * of patent rights can be found in the PATENTS file in the same directory.
1551 - *
1552 - * @providesModule DOMProperty
1553 - */
1554 -
1555 -'use strict';
1556 -
1557 -var _prodInvariant = _dereq_(140);
1558 -
1559 -var invariant = _dereq_(162);
1560 -
1561 -function checkMask(value, bitmask) {
1562 - return (value & bitmask) === bitmask;
1563 -}
628 + /**
629 + * Invoked when the component is initially created and about to be mounted.
630 + * This may have side effects, but any external subscriptions or data created
631 + * by this method must be cleaned up in `componentWillUnmount`.
632 + *
633 + * @optional
634 + */
635 + componentWillMount: 'DEFINE_MANY',
636
1565 -var DOMPropertyInjection = {
637 /**
1567 - * Mapping from normalized, camelcased property names to a configuration that
1568 - * specifies how the associated DOM property should be accessed or rendered.
638 + * Invoked when the component has been mounted and has a DOM representation.
639 + * However, there is no guarantee that the DOM node is in the document.
640 + *
641 + * Use this as an opportunity to operate on the DOM when the component has
642 + * been mounted (initialized and rendered) for the first time.
643 + *
644 + * @param {DOMElement} rootNode DOM element representing the component.
645 + * @optional
646 */
1570 - MUST_USE_PROPERTY: 0x1,
1571 - HAS_BOOLEAN_VALUE: 0x4,
1572 - HAS_NUMERIC_VALUE: 0x8,
1573 - HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
1574 - HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
647 + componentDidMount: 'DEFINE_MANY',
648
649 /**
1577 - * Inject some specialized knowledge about the DOM. This takes a config object
1578 - * with the following properties:
650 + * Invoked before the component receives new props.
651 *
1580 - * isCustomAttribute: function that given an attribute name will return true
1581 - * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
1582 - * attributes where it's impossible to enumerate all of the possible
1583 - * attribute names,
652 + * Use this as an opportunity to react to a prop transition by updating the
653 + * state using `this.setState`. Current props are accessed via `this.props`.
654 *
1585 - * Properties: object mapping DOM property name to one of the
1586 - * DOMPropertyInjection constants or null. If your attribute isn't in here,
1587 - * it won't get written to the DOM.
655 + * componentWillReceiveProps: function(nextProps, nextContext) {
656 + * this.setState({
657 + * likesIncreasing: nextProps.likeCount > this.props.likeCount
658 + * });
659 + * }
660 *
1589 - * DOMAttributeNames: object mapping React attribute name to the DOM
1590 - * attribute name. Attribute names not specified use the **lowercase**
1591 - * normalized name.
661 + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
662 + * transition may cause a state change, but the opposite is not true. If you
663 + * need it, you are probably looking for `componentWillUpdate`.
664 *
1593 - * DOMAttributeNamespaces: object mapping React attribute name to the DOM
1594 - * attribute namespace URL. (Attribute names not specified use no namespace.)
665 + * @param {object} nextProps
666 + * @optional
667 + */
668 + componentWillReceiveProps: 'DEFINE_MANY',
669 +
670 + /**
671 + * Invoked while deciding if the component should be updated as a result of
672 + * receiving new props, state and/or context.
673 *
1596 - * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
1597 - * Property names not specified use the normalized name.
674 + * Use this as an opportunity to `return false` when you're certain that the
675 + * transition to the new props/state/context will not require a component
676 + * update.
677 *
1599 - * DOMMutationMethods: Properties that require special mutation methods. If
1600 - * `value` is undefined, the mutation method should unset the property.
678 + * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
679 + * return !equal(nextProps, this.props) ||
680 + * !equal(nextState, this.state) ||
681 + * !equal(nextContext, this.context);
682 + * }
683 *
1602 - * @param {object} domPropertyConfig the config as described above.
684 + * @param {object} nextProps
685 + * @param {?object} nextState
686 + * @param {?object} nextContext
687 + * @return {boolean} True if the component should update.
688 + * @optional
689 */
1604 - injectDOMPropertyConfig: function (domPropertyConfig) {
1605 - var Injection = DOMPropertyInjection;
1606 - var Properties = domPropertyConfig.Properties || {};
1607 - var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
1608 - var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
1609 - var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
1610 - var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
1611 -
1612 - if (domPropertyConfig.isCustomAttribute) {
1613 - DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
1614 - }
1615 -
1616 - for (var propName in Properties) {
1617 - !!DOMProperty.properties.hasOwnProperty(propName) ? "development" !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
1618 -
1619 - var lowerCased = propName.toLowerCase();
1620 - var propConfig = Properties[propName];
1621 -
1622 - var propertyInfo = {
1623 - attributeName: lowerCased,
1624 - attributeNamespace: null,
1625 - propertyName: propName,
1626 - mutationMethod: null,
1627 -
1628 - mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
1629 - hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
1630 - hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
1631 - hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
1632 - hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
1633 - };
1634 - !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
1635 -
1636 - if ("development" !== 'production') {
1637 - DOMProperty.getPossibleStandardName[lowerCased] = propName;
1638 - }
1639 -
1640 - if (DOMAttributeNames.hasOwnProperty(propName)) {
1641 - var attributeName = DOMAttributeNames[propName];
1642 - propertyInfo.attributeName = attributeName;
1643 - if ("development" !== 'production') {
1644 - DOMProperty.getPossibleStandardName[attributeName] = propName;
1645 - }
1646 - }
1647 -
1648 - if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
1649 - propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
1650 - }
1651 -
1652 - if (DOMPropertyNames.hasOwnProperty(propName)) {
1653 - propertyInfo.propertyName = DOMPropertyNames[propName];
1654 - }
1655 -
1656 - if (DOMMutationMethods.hasOwnProperty(propName)) {
1657 - propertyInfo.mutationMethod = DOMMutationMethods[propName];
1658 - }
1659 -
1660 - DOMProperty.properties[propName] = propertyInfo;
1661 - }
1662 - }
1663 -};
1664 -
1665 -/* eslint-disable max-len */
1666 -var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
1667 -/* eslint-enable max-len */
1668 -
1669 -/**
1670 - * DOMProperty exports lookup objects that can be used like functions:
1671 - *
1672 - * > DOMProperty.isValid['id']
1673 - * true
1674 - * > DOMProperty.isValid['foobar']
1675 - * undefined
1676 - *
1677 - * Although this may be confusing, it performs better in general.
1678 - *
1679 - * @see http://jsperf.com/key-exists
1680 - * @see http://jsperf.com/key-missing
1681 - */
1682 -var DOMProperty = {
1683 -
1684 - ID_ATTRIBUTE_NAME: 'data-reactid',
1685 - ROOT_ATTRIBUTE_NAME: 'data-reactroot',
1686 -
1687 - ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
1688 - ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
690 + shouldComponentUpdate: 'DEFINE_ONCE',
691
692 /**
1691 - * Map from property "standard name" to an object with info about how to set
1692 - * the property in the DOM. Each object contains:
693 + * Invoked when the component is about to update due to a transition from
694 + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
695 + * and `nextContext`.
696 + *
697 + * Use this as an opportunity to perform preparation before an update occurs.
698 + *
699 + * NOTE: You **cannot** use `this.setState()` in this method.
700 *
1694 - * attributeName:
1695 - * Used when rendering markup or with `*Attribute()`.
1696 - * attributeNamespace
1697 - * propertyName:
1698 - * Used on DOM node instances. (This includes properties that mutate due to
1699 - * external factors.)
1700 - * mutationMethod:
1701 - * If non-null, used instead of the property or `setAttribute()` after
1702 - * initial render.
1703 - * mustUseProperty:
1704 - * Whether the property must be accessed and mutated as an object property.
1705 - * hasBooleanValue:
1706 - * Whether the property should be removed when set to a falsey value.
1707 - * hasNumericValue:
1708 - * Whether the property must be numeric or parse as a numeric and should be
1709 - * removed when set to a falsey value.
1710 - * hasPositiveNumericValue:
1711 - * Whether the property must be positive numeric or parse as a positive
1712 - * numeric and should be removed when set to a falsey value.
1713 - * hasOverloadedBooleanValue:
1714 - * Whether the property can be used as a flag as well as with a value.
1715 - * Removed when strictly equal to false; present without a value when
1716 - * strictly equal to true; present with a value otherwise.
701 + * @param {object} nextProps
702 + * @param {?object} nextState
703 + * @param {?object} nextContext
704 + * @param {ReactReconcileTransaction} transaction
705 + * @optional
706 */
1718 - properties: {},
707 + componentWillUpdate: 'DEFINE_MANY',
708
709 /**
1721 - * Mapping from lowercase property names to the properly cased version, used
1722 - * to warn in the case of missing properties. Available only in __DEV__.
1723 - * @type {Object}
710 + * Invoked when the component's DOM representation has been updated.
711 + *
712 + * Use this as an opportunity to operate on the DOM when the component has
713 + * been updated.
714 + *
715 + * @param {object} prevProps
716 + * @param {?object} prevState
717 + * @param {?object} prevContext
718 + * @param {DOMElement} rootNode DOM element representing the component.
719 + * @optional
720 */
1725 - getPossibleStandardName: "development" !== 'production' ? {} : null,
721 + componentDidUpdate: 'DEFINE_MANY',
722
723 /**
1728 - * All of the isCustomAttribute() functions that have been injected.
724 + * Invoked when the component is about to be removed from its parent and have
725 + * its DOM representation destroyed.
726 + *
727 + * Use this as an opportunity to deallocate any external resources.
728 + *
729 + * NOTE: There is no `componentDidUnmount` since your component will have been
730 + * destroyed by that point.
731 + *
732 + * @optional
733 */
1730 - _isCustomAttributeFunctions: [],
734 + componentWillUnmount: 'DEFINE_MANY',
735 +
736 + // ==== Advanced methods ====
737
738 /**
1733 - * Checks whether a property name is a custom attribute.
1734 - * @method
739 + * Updates the component's currently mounted DOM representation.
740 + *
741 + * By default, this implements React's rendering and reconciliation algorithm.
742 + * Sophisticated clients may wish to override this.
743 + *
744 + * @param {ReactReconcileTransaction} transaction
745 + * @internal
746 + * @overridable
747 */
1736 - isCustomAttribute: function (attributeName) {
1737 - for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
1738 - var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
1739 - if (isCustomAttributeFn(attributeName)) {
1740 - return true;
1741 - }
1742 - }
1743 - return false;
1744 - },
748 + updateComponent: 'OVERRIDE_BASE'
749
1746 - injection: DOMPropertyInjection
750 };
751
1749 -module.exports = DOMProperty;
1750 -},{"140":140,"162":162}],11:[function(_dereq_,module,exports){
752 /**
1752 - * Copyright 2013-present, Facebook, Inc.
1753 - * All rights reserved.
1754 - *
1755 - * This source code is licensed under the BSD-style license found in the
1756 - * LICENSE file in the root directory of this source tree. An additional grant
1757 - * of patent rights can be found in the PATENTS file in the same directory.
753 + * Mapping from class specification keys to special processing functions.
754 *
1759 - * @providesModule DOMPropertyOperations
1760 - */
1761 -
1762 -'use strict';
1763 -
1764 -var DOMProperty = _dereq_(10);
1765 -var ReactDOMComponentTree = _dereq_(42);
1766 -var ReactInstrumentation = _dereq_(73);
1767 -
1768 -var quoteAttributeValueForBrowser = _dereq_(139);
1769 -var warning = _dereq_(171);
1770 -
1771 -var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
1772 -var illegalAttributeNameCache = {};
1773 -var validatedAttributeNameCache = {};
1774 -
1775 -function isAttributeNameSafe(attributeName) {
1776 - if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
1777 - return true;
1778 - }
1779 - if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
1780 - return false;
1781 - }
1782 - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
1783 - validatedAttributeNameCache[attributeName] = true;
1784 - return true;
1785 - }
1786 - illegalAttributeNameCache[attributeName] = true;
1787 - "development" !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
1788 - return false;
1789 -}
1790 -
1791 -function shouldIgnoreValue(propertyInfo, value) {
1792 - return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
1793 -}
1794 -
1795 -/**
1796 - * Operations for dealing with DOM properties.
755 + * Although these are declared like instance properties in the specification
756 + * when defining classes using `React.createClass`, they are actually static
757 + * and are accessible on the constructor instead of the prototype. Despite
758 + * being static, they must be defined outside of the "statics" key under
759 + * which all other static methods are defined.
760 */
1798 -var DOMPropertyOperations = {
1799 -
1800 - /**
1801 - * Creates markup for the ID property.
1802 - *
1803 - * @param {string} id Unescaped ID.
1804 - * @return {string} Markup string.
1805 - */
1806 - createMarkupForID: function (id) {
1807 - return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
761 +var RESERVED_SPEC_KEYS = {
762 + displayName: function (Constructor, displayName) {
763 + Constructor.displayName = displayName;
764 },
1809 -
1810 - setAttributeForID: function (node, id) {
1811 - node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
765 + mixins: function (Constructor, mixins) {
766 + if (mixins) {
767 + for (var i = 0; i < mixins.length; i++) {
768 + mixSpecIntoComponent(Constructor, mixins[i]);
769 + }
770 + }
771 },
1813 -
1814 - createMarkupForRoot: function () {
1815 - return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
772 + childContextTypes: function (Constructor, childContextTypes) {
773 + if ("development" !== 'production') {
774 + validateTypeDef(Constructor, childContextTypes, 'childContext');
775 + }
776 + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
777 },
1817 -
1818 - setAttributeForRoot: function (node) {
1819 - node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
778 + contextTypes: function (Constructor, contextTypes) {
779 + if ("development" !== 'production') {
780 + validateTypeDef(Constructor, contextTypes, 'context');
781 + }
782 + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
783 },
1821 -
784 /**
1823 - * Creates markup for a property.
1824 - *
1825 - * @param {string} name
1826 - * @param {*} value
1827 - * @return {?string} Markup string, or null if the property was invalid.
785 + * Special case getDefaultProps which should move into statics but requires
786 + * automatic merging.
787 */
1829 - createMarkupForProperty: function (name, value) {
1830 - var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
1831 - if (propertyInfo) {
1832 - if (shouldIgnoreValue(propertyInfo, value)) {
1833 - return '';
1834 - }
1835 - var attributeName = propertyInfo.attributeName;
1836 - if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
1837 - return attributeName + '=""';
1838 - }
1839 - return attributeName + '=' + quoteAttributeValueForBrowser(value);
1840 - } else if (DOMProperty.isCustomAttribute(name)) {
1841 - if (value == null) {
1842 - return '';
1843 - }
1844 - return name + '=' + quoteAttributeValueForBrowser(value);
788 + getDefaultProps: function (Constructor, getDefaultProps) {
789 + if (Constructor.getDefaultProps) {
790 + Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
791 + } else {
792 + Constructor.getDefaultProps = getDefaultProps;
793 }
1846 - return null;
794 },
1848 -
1849 - /**
1850 - * Creates markup for a custom property.
1851 - *
1852 - * @param {string} name
1853 - * @param {*} value
1854 - * @return {string} Markup string, or empty string if the property was invalid.
1855 - */
1856 - createMarkupForCustomAttribute: function (name, value) {
1857 - if (!isAttributeNameSafe(name) || value == null) {
1858 - return '';
795 + propTypes: function (Constructor, propTypes) {
796 + if ("development" !== 'production') {
797 + validateTypeDef(Constructor, propTypes, 'prop');
798 }
1860 - return name + '=' + quoteAttributeValueForBrowser(value);
799 + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
800 },
1862 -
1863 - /**
1864 - * Sets the value for a property on a node.
1865 - *
1866 - * @param {DOMElement} node
1867 - * @param {string} name
1868 - * @param {*} value
1869 - */
1870 - setValueForProperty: function (node, name, value) {
1871 - var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
1872 - if (propertyInfo) {
1873 - var mutationMethod = propertyInfo.mutationMethod;
1874 - if (mutationMethod) {
1875 - mutationMethod(node, value);
1876 - } else if (shouldIgnoreValue(propertyInfo, value)) {
1877 - this.deleteValueForProperty(node, name);
1878 - return;
1879 - } else if (propertyInfo.mustUseProperty) {
1880 - // Contrary to `setAttribute`, object properties are properly
1881 - // `toString`ed by IE8/9.
1882 - node[propertyInfo.propertyName] = value;
1883 - } else {
1884 - var attributeName = propertyInfo.attributeName;
1885 - var namespace = propertyInfo.attributeNamespace;
1886 - // `setAttribute` with objects becomes only `[object]` in IE8/9,
1887 - // ('' + value) makes it output the correct toString()-value.
1888 - if (namespace) {
1889 - node.setAttributeNS(namespace, attributeName, '' + value);
1890 - } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
1891 - node.setAttribute(attributeName, '');
1892 - } else {
1893 - node.setAttribute(attributeName, '' + value);
1894 - }
1895 - }
1896 - } else if (DOMProperty.isCustomAttribute(name)) {
1897 - DOMPropertyOperations.setValueForAttribute(node, name, value);
1898 - return;
1899 - }
1900 -
1901 - if ("development" !== 'production') {
1902 - var payload = {};
1903 - payload[name] = value;
1904 - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload);
1905 - }
801 + statics: function (Constructor, statics) {
802 + mixStaticSpecIntoComponent(Constructor, statics);
803 },
804 + autobind: function () {} };
805
1908 - setValueForAttribute: function (node, name, value) {
1909 - if (!isAttributeNameSafe(name)) {
1910 - return;
1911 - }
1912 - if (value == null) {
1913 - node.removeAttribute(name);
1914 - } else {
1915 - node.setAttribute(name, '' + value);
806 +function validateTypeDef(Constructor, typeDef, location) {
807 + for (var propName in typeDef) {
808 + if (typeDef.hasOwnProperty(propName)) {
809 + // use a warning instead of an invariant so components
810 + // don't show up in prod but only in __DEV__
811 + "development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
812 }
813 + }
814 +}
815
1918 - if ("development" !== 'production') {
1919 - var payload = {};
1920 - payload[name] = value;
1921 - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload);
1922 - }
1923 - },
816 +function validateMethodOverride(isAlreadyDefined, name) {
817 + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
818
1925 - /**
1926 - * Deletes an attributes from a node.
1927 - *
1928 - * @param {DOMElement} node
1929 - * @param {string} name
1930 - */
1931 - deleteValueForAttribute: function (node, name) {
1932 - node.removeAttribute(name);
1933 - if ("development" !== 'production') {
1934 - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name);
1935 - }
1936 - },
819 + // Disallow overriding of base class methods unless explicitly allowed.
820 + if (ReactClassMixin.hasOwnProperty(name)) {
821 + !(specPolicy === 'OVERRIDE_BASE') ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0;
822 + }
823
1938 - /**
1939 - * Deletes the value for a property on a node.
1940 - *
1941 - * @param {DOMElement} node
1942 - * @param {string} name
1943 - */
1944 - deleteValueForProperty: function (node, name) {
1945 - var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
1946 - if (propertyInfo) {
1947 - var mutationMethod = propertyInfo.mutationMethod;
1948 - if (mutationMethod) {
1949 - mutationMethod(node, undefined);
1950 - } else if (propertyInfo.mustUseProperty) {
1951 - var propName = propertyInfo.propertyName;
1952 - if (propertyInfo.hasBooleanValue) {
1953 - node[propName] = false;
1954 - } else {
1955 - node[propName] = '';
1956 - }
1957 - } else {
1958 - node.removeAttribute(propertyInfo.attributeName);
1959 - }
1960 - } else if (DOMProperty.isCustomAttribute(name)) {
1961 - node.removeAttribute(name);
1962 - }
824 + // Disallow defining methods more than once unless explicitly allowed.
825 + if (isAlreadyDefined) {
826 + !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;
827 + }
828 +}
829
830 +/**
831 + * Mixin helper which handles policy validation and reserved
832 + * specification keys when building React classes.
833 + */
834 +function mixSpecIntoComponent(Constructor, spec) {
835 + if (!spec) {
836 if ("development" !== 'production') {
1965 - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name);
837 + var typeofSpec = typeof spec;
838 + var isMixinValid = typeofSpec === 'object' && spec !== null;
839 +
840 + "development" !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
841 }
1967 - }
842
1969 -};
843 + return;
844 + }
845
1971 -module.exports = DOMPropertyOperations;
1972 -},{"10":10,"139":139,"171":171,"42":42,"73":73}],12:[function(_dereq_,module,exports){
1973 -/**
1974 - * Copyright 2013-present, Facebook, Inc.
1975 - * All rights reserved.
1976 - *
1977 - * This source code is licensed under the BSD-style license found in the
1978 - * LICENSE file in the root directory of this source tree. An additional grant
1979 - * of patent rights can be found in the PATENTS file in the same directory.
1980 - *
1981 - * @providesModule Danger
1982 - */
846 + !(typeof spec !== 'function') ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0;
847 + !!ReactElement.isValidElement(spec) ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0;
848
1984 -'use strict';
849 + var proto = Constructor.prototype;
850 + var autoBindPairs = proto.__reactAutoBindPairs;
851
1986 -var _prodInvariant = _dereq_(140);
852 + // By handling mixins before any other properties, we ensure the same
853 + // chaining order is applied to methods with DEFINE_MANY policy, whether
854 + // mixins are listed before or after these methods in the spec.
855 + if (spec.hasOwnProperty(MIXINS_KEY)) {
856 + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
857 + }
858
1988 -var DOMLazyTree = _dereq_(8);
1989 -var ExecutionEnvironment = _dereq_(148);
859 + for (var name in spec) {
860 + if (!spec.hasOwnProperty(name)) {
861 + continue;
862 + }
863
1991 -var createNodesFromMarkup = _dereq_(153);
1992 -var emptyFunction = _dereq_(154);
1993 -var invariant = _dereq_(162);
864 + if (name === MIXINS_KEY) {
865 + // We have already handled mixins in a special case above.
866 + continue;
867 + }
868
1995 -var Danger = {
869 + var property = spec[name];
870 + var isAlreadyDefined = proto.hasOwnProperty(name);
871 + validateMethodOverride(isAlreadyDefined, name);
872
1997 - /**
1998 - * Replaces a node with a string of markup at its current position within its
1999 - * parent. The markup must render into a single root node.
2000 - *
2001 - * @param {DOMElement} oldChild Child node to replace.
2002 - * @param {string} markup Markup to render in place of the child node.
2003 - * @internal
2004 - */
2005 - dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
2006 - !ExecutionEnvironment.canUseDOM ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;
2007 - !markup ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
2008 - !(oldChild.nodeName !== 'HTML') ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;
2009 -
2010 - if (typeof markup === 'string') {
2011 - var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
2012 - oldChild.parentNode.replaceChild(newChild, oldChild);
873 + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
874 + RESERVED_SPEC_KEYS[name](Constructor, property);
875 } else {
2014 - DOMLazyTree.replaceChildWithTree(oldChild, markup);
876 + // Setup methods on prototype:
877 + // The following member methods should not be automatically bound:
878 + // 1. Expected ReactClass methods (in the "interface").
879 + // 2. Overridden methods (that were mixed in).
880 + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
881 + var isFunction = typeof property === 'function';
882 + var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
883 +
884 + if (shouldAutoBind) {
885 + autoBindPairs.push(name, property);
886 + proto[name] = property;
887 + } else {
888 + if (isAlreadyDefined) {
889 + var specPolicy = ReactClassInterface[name];
890 +
891 + // These cases should already be caught by validateMethodOverride.
892 + !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? "development" !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;
893 +
894 + // For methods which are defined more than once, call the existing
895 + // methods before calling the new property, merging if appropriate.
896 + if (specPolicy === 'DEFINE_MANY_MERGED') {
897 + proto[name] = createMergedResultFunction(proto[name], property);
898 + } else if (specPolicy === 'DEFINE_MANY') {
899 + proto[name] = createChainedFunction(proto[name], property);
900 + }
901 + } else {
902 + proto[name] = property;
903 + if ("development" !== 'production') {
904 + // Add verbose displayName to the function, which helps when looking
905 + // at profiling tools.
906 + if (typeof property === 'function' && spec.displayName) {
907 + proto[name].displayName = spec.displayName + '_' + name;
908 + }
909 + }
910 + }
911 + }
912 }
913 }
914 +}
915
2018 -};
916 +function mixStaticSpecIntoComponent(Constructor, statics) {
917 + if (!statics) {
918 + return;
919 + }
920 + for (var name in statics) {
921 + var property = statics[name];
922 + if (!statics.hasOwnProperty(name)) {
923 + continue;
924 + }
925 +
926 + var isReserved = name in RESERVED_SPEC_KEYS;
927 + !!isReserved ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0;
928 +
929 + var isInherited = name in Constructor;
930 + !!isInherited ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0;
931 + Constructor[name] = property;
932 + }
933 +}
934
2020 -module.exports = Danger;
2021 -},{"140":140,"148":148,"153":153,"154":154,"162":162,"8":8}],13:[function(_dereq_,module,exports){
935 /**
2023 - * Copyright 2013-present, Facebook, Inc.
2024 - * All rights reserved.
2025 - *
2026 - * This source code is licensed under the BSD-style license found in the
2027 - * LICENSE file in the root directory of this source tree. An additional grant
2028 - * of patent rights can be found in the PATENTS file in the same directory.
936 + * Merge two objects, but throw if both contain the same key.
937 *
2030 - * @providesModule DefaultEventPluginOrder
938 + * @param {object} one The first object, which is mutated.
939 + * @param {object} two The second object
940 + * @return {object} one after it has been mutated to contain everything in two.
941 */
942 +function mergeIntoWithNoDuplicateKeys(one, two) {
943 + !(one && two && typeof one === 'object' && typeof two === 'object') ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;
944
2033 -'use strict';
2034 -
2035 -var keyOf = _dereq_(166);
945 + for (var key in two) {
946 + if (two.hasOwnProperty(key)) {
947 + !(one[key] === undefined) ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0;
948 + one[key] = two[key];
949 + }
950 + }
951 + return one;
952 +}
953
954 /**
2038 - * Module that is injectable into `EventPluginHub`, that specifies a
2039 - * deterministic ordering of `EventPlugin`s. A convenient way to reason about
2040 - * plugins, without having to package every one of them. This is better than
2041 - * having plugins be ordered in the same order that they are injected because
2042 - * that ordering would be influenced by the packaging order.
2043 - * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
2044 - * preventing default on events is convenient in `SimpleEventPlugin` handlers.
955 + * Creates a function that invokes two functions and merges their return values.
956 + *
957 + * @param {function} one Function to invoke first.
958 + * @param {function} two Function to invoke second.
959 + * @return {function} Function that invokes the two argument functions.
960 + * @private
961 */
2046 -var DefaultEventPluginOrder = [keyOf({ ResponderEventPlugin: null }), keyOf({ SimpleEventPlugin: null }), keyOf({ TapEventPlugin: null }), keyOf({ EnterLeaveEventPlugin: null }), keyOf({ ChangeEventPlugin: null }), keyOf({ SelectEventPlugin: null }), keyOf({ BeforeInputEventPlugin: null })];
962 +function createMergedResultFunction(one, two) {
963 + return function mergedResult() {
964 + var a = one.apply(this, arguments);
965 + var b = two.apply(this, arguments);
966 + if (a == null) {
967 + return b;
968 + } else if (b == null) {
969 + return a;
970 + }
971 + var c = {};
972 + mergeIntoWithNoDuplicateKeys(c, a);
973 + mergeIntoWithNoDuplicateKeys(c, b);
974 + return c;
975 + };
976 +}
977
2048 -module.exports = DefaultEventPluginOrder;
2049 -},{"166":166}],14:[function(_dereq_,module,exports){
978 /**
2051 - * Copyright 2013-present, Facebook, Inc.
2052 - * All rights reserved.
2053 - *
2054 - * This source code is licensed under the BSD-style license found in the
2055 - * LICENSE file in the root directory of this source tree. An additional grant
2056 - * of patent rights can be found in the PATENTS file in the same directory.
979 + * Creates a function that invokes two functions and ignores their return vales.
980 *
2058 - * @providesModule DisabledInputUtils
981 + * @param {function} one Function to invoke first.
982 + * @param {function} two Function to invoke second.
983 + * @return {function} Function that invokes the two argument functions.
984 + * @private
985 */
2060 -
2061 -'use strict';
2062 -
2063 -var disableableMouseListenerNames = {
2064 - onClick: true,
2065 - onDoubleClick: true,
2066 - onMouseDown: true,
2067 - onMouseMove: true,
2068 - onMouseUp: true,
2069 -
2070 - onClickCapture: true,
2071 - onDoubleClickCapture: true,
2072 - onMouseDownCapture: true,
2073 - onMouseMoveCapture: true,
2074 - onMouseUpCapture: true
2075 -};
986 +function createChainedFunction(one, two) {
987 + return function chainedFunction() {
988 + one.apply(this, arguments);
989 + two.apply(this, arguments);
990 + };
991 +}
992
993 /**
2078 - * Implements a host component that does not receive mouse events
2079 - * when `disabled` is set.
994 + * Binds a method to the component.
995 + *
996 + * @param {object} component Component whose method is going to be bound.
997 + * @param {function} method Method to be bound.
998 + * @return {function} The bound method.
999 */
2081 -var DisabledInputUtils = {
2082 - getHostProps: function (inst, props) {
2083 - if (!props.disabled) {
2084 - return props;
2085 - }
2086 -
2087 - // Copy the props, except the mouse listeners
2088 - var hostProps = {};
2089 - for (var key in props) {
2090 - if (!disableableMouseListenerNames[key] && props.hasOwnProperty(key)) {
2091 - hostProps[key] = props[key];
1000 +function bindAutoBindMethod(component, method) {
1001 + var boundMethod = method.bind(component);
1002 + if ("development" !== 'production') {
1003 + boundMethod.__reactBoundContext = component;
1004 + boundMethod.__reactBoundMethod = method;
1005 + boundMethod.__reactBoundArguments = null;
1006 + var componentName = component.constructor.displayName;
1007 + var _bind = boundMethod.bind;
1008 + boundMethod.bind = function (newThis) {
1009 + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1010 + args[_key - 1] = arguments[_key];
1011 }
2093 - }
1012
2095 - return hostProps;
1013 + // User is trying to bind() an autobound method; we effectively will
1014 + // ignore the value of "this" that the user is trying to use, so
1015 + // let's warn.
1016 + if (newThis !== component && newThis !== null) {
1017 + "development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
1018 + } else if (!args.length) {
1019 + "development" !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
1020 + return boundMethod;
1021 + }
1022 + var reboundMethod = _bind.apply(boundMethod, arguments);
1023 + reboundMethod.__reactBoundContext = component;
1024 + reboundMethod.__reactBoundMethod = method;
1025 + reboundMethod.__reactBoundArguments = args;
1026 + return reboundMethod;
1027 + };
1028 }
2097 -};
1029 + return boundMethod;
1030 +}
1031
2099 -module.exports = DisabledInputUtils;
2100 -},{}],15:[function(_dereq_,module,exports){
1032 /**
2102 - * Copyright 2013-present, Facebook, Inc.
2103 - * All rights reserved.
2104 - *
2105 - * This source code is licensed under the BSD-style license found in the
2106 - * LICENSE file in the root directory of this source tree. An additional grant
2107 - * of patent rights can be found in the PATENTS file in the same directory.
1033 + * Binds all auto-bound methods in a component.
1034 *
2109 - * @providesModule EnterLeaveEventPlugin
1035 + * @param {object} component Component whose method is going to be bound.
1036 */
2111 -
2112 -'use strict';
2113 -
2114 -var EventConstants = _dereq_(16);
2115 -var EventPropagators = _dereq_(20);
2116 -var ReactDOMComponentTree = _dereq_(42);
2117 -var SyntheticMouseEvent = _dereq_(109);
2118 -
2119 -var keyOf = _dereq_(166);
2120 -
2121 -var topLevelTypes = EventConstants.topLevelTypes;
2122 -
2123 -var eventTypes = {
2124 - mouseEnter: {
2125 - registrationName: keyOf({ onMouseEnter: null }),
2126 - dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver]
2127 - },
2128 - mouseLeave: {
2129 - registrationName: keyOf({ onMouseLeave: null }),
2130 - dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver]
1037 +function bindAutoBindMethods(component) {
1038 + var pairs = component.__reactAutoBindPairs;
1039 + for (var i = 0; i < pairs.length; i += 2) {
1040 + var autoBindKey = pairs[i];
1041 + var method = pairs[i + 1];
1042 + component[autoBindKey] = bindAutoBindMethod(component, method);
1043 }
2132 -};
2133 -
2134 -var EnterLeaveEventPlugin = {
1044 +}
1045
2136 - eventTypes: eventTypes,
1046 +/**
1047 + * Add more to the ReactClass base class. These are all legacy features and
1048 + * therefore not already part of the modern ReactComponent.
1049 + */
1050 +var ReactClassMixin = {
1051
1052 /**
2139 - * For almost every interaction we care about, there will be both a top-level
2140 - * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
2141 - * we do not extract duplicate events. However, moving the mouse into the
2142 - * browser from outside will not fire a `mouseout` event. In this case, we use
2143 - * the `mouseover` top-level event.
1053 + * TODO: This will be deprecated because state should always keep a consistent
1054 + * type signature and the only use case for this, is to avoid that.
1055 */
2145 - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2146 - if (topLevelType === topLevelTypes.topMouseOver && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
2147 - return null;
2148 - }
2149 - if (topLevelType !== topLevelTypes.topMouseOut && topLevelType !== topLevelTypes.topMouseOver) {
2150 - // Must not be a mouse in or mouse out - ignoring.
2151 - return null;
2152 - }
2153 -
2154 - var win;
2155 - if (nativeEventTarget.window === nativeEventTarget) {
2156 - // `nativeEventTarget` is probably a window object.
2157 - win = nativeEventTarget;
2158 - } else {
2159 - // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
2160 - var doc = nativeEventTarget.ownerDocument;
2161 - if (doc) {
2162 - win = doc.defaultView || doc.parentWindow;
2163 - } else {
2164 - win = window;
2165 - }
2166 - }
2167 -
2168 - var from;
2169 - var to;
2170 - if (topLevelType === topLevelTypes.topMouseOut) {
2171 - from = targetInst;
2172 - var related = nativeEvent.relatedTarget || nativeEvent.toElement;
2173 - to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
2174 - } else {
2175 - // Moving to a node from outside the window.
2176 - from = null;
2177 - to = targetInst;
2178 - }
2179 -
2180 - if (from === to) {
2181 - // Nothing pertains to our managed components.
2182 - return null;
1056 + replaceState: function (newState, callback) {
1057 + this.updater.enqueueReplaceState(this, newState);
1058 + if (callback) {
1059 + this.updater.enqueueCallback(this, callback, 'replaceState');
1060 }
1061 + },
1062
2185 - var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
2186 - var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
2187 -
2188 - var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
2189 - leave.type = 'mouseleave';
2190 - leave.target = fromNode;
2191 - leave.relatedTarget = toNode;
2192 -
2193 - var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
2194 - enter.type = 'mouseenter';
2195 - enter.target = toNode;
2196 - enter.relatedTarget = fromNode;
2197 -
2198 - EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
2199 -
2200 - return [leave, enter];
2201 - }
2202 -
2203 -};
2204 -
2205 -module.exports = EnterLeaveEventPlugin;
2206 -},{"109":109,"16":16,"166":166,"20":20,"42":42}],16:[function(_dereq_,module,exports){
2207 -/**
2208 - * Copyright 2013-present, Facebook, Inc.
2209 - * All rights reserved.
2210 - *
2211 - * This source code is licensed under the BSD-style license found in the
2212 - * LICENSE file in the root directory of this source tree. An additional grant
2213 - * of patent rights can be found in the PATENTS file in the same directory.
2214 - *
2215 - * @providesModule EventConstants
2216 - */
2217 -
2218 -'use strict';
2219 -
2220 -var keyMirror = _dereq_(165);
2221 -
2222 -var PropagationPhases = keyMirror({ bubbled: null, captured: null });
2223 -
2224 -/**
2225 - * Types of raw signals from the browser caught at the top level.
2226 - */
2227 -var topLevelTypes = keyMirror({
2228 - topAbort: null,
2229 - topAnimationEnd: null,
2230 - topAnimationIteration: null,
2231 - topAnimationStart: null,
2232 - topBlur: null,
2233 - topCanPlay: null,
2234 - topCanPlayThrough: null,
2235 - topChange: null,
2236 - topClick: null,
2237 - topCompositionEnd: null,
2238 - topCompositionStart: null,
2239 - topCompositionUpdate: null,
2240 - topContextMenu: null,
2241 - topCopy: null,
2242 - topCut: null,
2243 - topDoubleClick: null,
2244 - topDrag: null,
2245 - topDragEnd: null,
2246 - topDragEnter: null,
2247 - topDragExit: null,
2248 - topDragLeave: null,
2249 - topDragOver: null,
2250 - topDragStart: null,
2251 - topDrop: null,
2252 - topDurationChange: null,
2253 - topEmptied: null,
2254 - topEncrypted: null,
2255 - topEnded: null,
2256 - topError: null,
2257 - topFocus: null,
2258 - topInput: null,
2259 - topInvalid: null,
2260 - topKeyDown: null,
2261 - topKeyPress: null,
2262 - topKeyUp: null,
2263 - topLoad: null,
2264 - topLoadedData: null,
2265 - topLoadedMetadata: null,
2266 - topLoadStart: null,
2267 - topMouseDown: null,
2268 - topMouseMove: null,
2269 - topMouseOut: null,
2270 - topMouseOver: null,
2271 - topMouseUp: null,
2272 - topPaste: null,
2273 - topPause: null,
2274 - topPlay: null,
2275 - topPlaying: null,
2276 - topProgress: null,
2277 - topRateChange: null,
2278 - topReset: null,
2279 - topScroll: null,
2280 - topSeeked: null,
2281 - topSeeking: null,
2282 - topSelectionChange: null,
2283 - topStalled: null,
2284 - topSubmit: null,
2285 - topSuspend: null,
2286 - topTextInput: null,
2287 - topTimeUpdate: null,
2288 - topTouchCancel: null,
2289 - topTouchEnd: null,
2290 - topTouchMove: null,
2291 - topTouchStart: null,
2292 - topTransitionEnd: null,
2293 - topVolumeChange: null,
2294 - topWaiting: null,
2295 - topWheel: null
2296 -});
2297 -
2298 -var EventConstants = {
2299 - topLevelTypes: topLevelTypes,
2300 - PropagationPhases: PropagationPhases
2301 -};
2302 -
2303 -module.exports = EventConstants;
2304 -},{"165":165}],17:[function(_dereq_,module,exports){
2305 -/**
2306 - * Copyright 2013-present, Facebook, Inc.
2307 - * All rights reserved.
2308 - *
2309 - * This source code is licensed under the BSD-style license found in the
2310 - * LICENSE file in the root directory of this source tree. An additional grant
2311 - * of patent rights can be found in the PATENTS file in the same directory.
2312 - *
2313 - * @providesModule EventPluginHub
2314 - */
2315 -
2316 -'use strict';
2317 -
2318 -var _prodInvariant = _dereq_(140);
2319 -
2320 -var EventPluginRegistry = _dereq_(18);
2321 -var EventPluginUtils = _dereq_(19);
2322 -var ReactErrorUtils = _dereq_(64);
2323 -
2324 -var accumulateInto = _dereq_(116);
2325 -var forEachAccumulated = _dereq_(125);
2326 -var invariant = _dereq_(162);
2327 -
2328 -/**
2329 - * Internal store for event listeners
2330 - */
2331 -var listenerBank = {};
2332 -
2333 -/**
2334 - * Internal queue of events that have accumulated their dispatches and are
2335 - * waiting to have their dispatches executed.
2336 - */
2337 -var eventQueue = null;
2338 -
2339 -/**
2340 - * Dispatches an event and releases it back into the pool, unless persistent.
2341 - *
2342 - * @param {?object} event Synthetic event to be dispatched.
2343 - * @param {boolean} simulated If the event is simulated (changes exn behavior)
2344 - * @private
2345 - */
2346 -var executeDispatchesAndRelease = function (event, simulated) {
2347 - if (event) {
2348 - EventPluginUtils.executeDispatchesInOrder(event, simulated);
2349 -
2350 - if (!event.isPersistent()) {
2351 - event.constructor.release(event);
2352 - }
1063 + /**
1064 + * Checks whether or not this composite component is mounted.
1065 + * @return {boolean} True if mounted, false otherwise.
1066 + * @protected
1067 + * @final
1068 + */
1069 + isMounted: function () {
1070 + return this.updater.isMounted(this);
1071 }
1072 };
2355 -var executeDispatchesAndReleaseSimulated = function (e) {
2356 - return executeDispatchesAndRelease(e, true);
2357 -};
2358 -var executeDispatchesAndReleaseTopLevel = function (e) {
2359 - return executeDispatchesAndRelease(e, false);
2360 -};
1073
2362 -var getDictionaryKey = function (inst) {
2363 - // Prevents V8 performance issue:
2364 - // https://github.com/facebook/react/pull/7232
2365 - return '.' + inst._rootNodeID;
2366 -};
1074 +var ReactClassComponent = function () {};
1075 +_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
1076
1077 /**
2369 - * This is a unified interface for event plugins to be installed and configured.
2370 - *
2371 - * Event plugins can implement the following properties:
2372 - *
2373 - * `extractEvents` {function(string, DOMEventTarget, string, object): *}
2374 - * Required. When a top-level event is fired, this method is expected to
2375 - * extract synthetic events that will in turn be queued and dispatched.
2376 - *
2377 - * `eventTypes` {object}
2378 - * Optional, plugins that fire events must publish a mapping of registration
2379 - * names that are used to register listeners. Values of this mapping must
2380 - * be objects that contain `registrationName` or `phasedRegistrationNames`.
2381 - *
2382 - * `executeDispatch` {function(object, function, string)}
2383 - * Optional, allows plugins to override how an event gets dispatched. By
2384 - * default, the listener is simply invoked.
2385 - *
2386 - * Each plugin that is injected into `EventsPluginHub` is immediately operable.
1078 + * Module for creating composite components.
1079 *
2388 - * @public
1080 + * @class ReactClass
1081 */
2390 -var EventPluginHub = {
1082 +var ReactClass = {
1083
1084 /**
2393 - * Methods for injecting dependencies.
1085 + * Creates a composite component class given a class specification.
1086 + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
1087 + *
1088 + * @param {object} spec Class specification (which must define `render`).
1089 + * @return {function} Component constructor function.
1090 + * @public
1091 */
2395 - injection: {
1092 + createClass: function (spec) {
1093 + // To keep our warnings more understandable, we'll use a little hack here to
1094 + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
1095 + // unnecessarily identify a class without displayName as 'Constructor'.
1096 + var Constructor = identity(function (props, context, updater) {
1097 + // This constructor gets overridden by mocks. The argument is used
1098 + // by mocks to assert on what gets mounted.
1099
2397 - /**
2398 - * @param {array} InjectedEventPluginOrder
2399 - * @public
2400 - */
2401 - injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
1100 + if ("development" !== 'production') {
1101 + "development" !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
1102 + }
1103
2403 - /**
2404 - * @param {object} injectedNamesToPlugins Map from names to plugin modules.
2405 - */
2406 - injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
1104 + // Wire up auto-binding
1105 + if (this.__reactAutoBindPairs.length) {
1106 + bindAutoBindMethods(this);
1107 + }
1108
2408 - },
1109 + this.props = props;
1110 + this.context = context;
1111 + this.refs = emptyObject;
1112 + this.updater = updater || ReactNoopUpdateQueue;
1113
2410 - /**
2411 - * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.
2412 - *
2413 - * @param {object} inst The instance, which is the source of events.
2414 - * @param {string} registrationName Name of listener (e.g. `onClick`).
2415 - * @param {function} listener The callback to store.
2416 - */
2417 - putListener: function (inst, registrationName, listener) {
2418 - !(typeof listener === 'function') ? "development" !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
1114 + this.state = null;
1115
2420 - var key = getDictionaryKey(inst);
2421 - var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
2422 - bankForRegistrationName[key] = listener;
1116 + // ReactClasses doesn't have constructors. Instead, they use the
1117 + // getInitialState and componentWillMount methods for initialization.
1118
2424 - var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2425 - if (PluginModule && PluginModule.didPutListener) {
2426 - PluginModule.didPutListener(inst, registrationName, listener);
2427 - }
2428 - },
1119 + var initialState = this.getInitialState ? this.getInitialState() : null;
1120 + if ("development" !== 'production') {
1121 + // We allow auto-mocks to proceed as if they're returning null.
1122 + if (initialState === undefined && this.getInitialState._isMockFunction) {
1123 + // This is probably bad practice. Consider warning here and
1124 + // deprecating this convenience.
1125 + initialState = null;
1126 + }
1127 + }
1128 + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0;
1129
2430 - /**
2431 - * @param {object} inst The instance, which is the source of events.
2432 - * @param {string} registrationName Name of listener (e.g. `onClick`).
2433 - * @return {?function} The stored callback.
2434 - */
2435 - getListener: function (inst, registrationName) {
2436 - var bankForRegistrationName = listenerBank[registrationName];
2437 - var key = getDictionaryKey(inst);
2438 - return bankForRegistrationName && bankForRegistrationName[key];
2439 - },
1130 + this.state = initialState;
1131 + });
1132 + Constructor.prototype = new ReactClassComponent();
1133 + Constructor.prototype.constructor = Constructor;
1134 + Constructor.prototype.__reactAutoBindPairs = [];
1135
2441 - /**
2442 - * Deletes a listener from the registration bank.
2443 - *
2444 - * @param {object} inst The instance, which is the source of events.
2445 - * @param {string} registrationName Name of listener (e.g. `onClick`).
2446 - */
2447 - deleteListener: function (inst, registrationName) {
2448 - var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2449 - if (PluginModule && PluginModule.willDeleteListener) {
2450 - PluginModule.willDeleteListener(inst, registrationName);
2451 - }
1136 + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
1137 +
1138 + mixSpecIntoComponent(Constructor, spec);
1139
2453 - var bankForRegistrationName = listenerBank[registrationName];
2454 - // TODO: This should never be null -- when is it?
2455 - if (bankForRegistrationName) {
2456 - var key = getDictionaryKey(inst);
2457 - delete bankForRegistrationName[key];
1140 + // Initialize the defaultProps property after all mixins have been merged.
1141 + if (Constructor.getDefaultProps) {
1142 + Constructor.defaultProps = Constructor.getDefaultProps();
1143 }
2459 - },
1144
2461 - /**
2462 - * Deletes all listeners for the DOM element with the supplied ID.
2463 - *
2464 - * @param {object} inst The instance, which is the source of events.
2465 - */
2466 - deleteAllListeners: function (inst) {
2467 - var key = getDictionaryKey(inst);
2468 - for (var registrationName in listenerBank) {
2469 - if (!listenerBank.hasOwnProperty(registrationName)) {
2470 - continue;
1145 + if ("development" !== 'production') {
1146 + // This is a tag to indicate that the use of these method names is ok,
1147 + // since it's used with createClass. If it's not, then it's likely a
1148 + // mistake so we'll warn you to use the static property, property
1149 + // initializer or constructor respectively.
1150 + if (Constructor.getDefaultProps) {
1151 + Constructor.getDefaultProps.isReactClassApproved = {};
1152 }
2472 -
2473 - if (!listenerBank[registrationName][key]) {
2474 - continue;
1153 + if (Constructor.prototype.getInitialState) {
1154 + Constructor.prototype.getInitialState.isReactClassApproved = {};
1155 }
1156 + }
1157
2477 - var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2478 - if (PluginModule && PluginModule.willDeleteListener) {
2479 - PluginModule.willDeleteListener(inst, registrationName);
2480 - }
1158 + !Constructor.prototype.render ? "development" !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;
1159
2482 - delete listenerBank[registrationName][key];
1160 + if ("development" !== 'production') {
1161 + "development" !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;
1162 + "development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
1163 }
2484 - },
1164
2486 - /**
2487 - * Allows registered plugins an opportunity to extract events from top-level
2488 - * native browser events.
2489 - *
2490 - * @return {*} An accumulation of synthetic events.
2491 - * @internal
2492 - */
2493 - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2494 - var events;
2495 - var plugins = EventPluginRegistry.plugins;
2496 - for (var i = 0; i < plugins.length; i++) {
2497 - // Not every plugin in the ordering may be loaded at runtime.
2498 - var possiblePlugin = plugins[i];
2499 - if (possiblePlugin) {
2500 - var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
2501 - if (extractedEvents) {
2502 - events = accumulateInto(events, extractedEvents);
2503 - }
1165 + // Reduce time spent doing lookups by setting these on the prototype.
1166 + for (var methodName in ReactClassInterface) {
1167 + if (!Constructor.prototype[methodName]) {
1168 + Constructor.prototype[methodName] = null;
1169 }
1170 }
2506 - return events;
2507 - },
1171
2509 - /**
2510 - * Enqueues a synthetic event that should be dispatched when
2511 - * `processEventQueue` is invoked.
2512 - *
2513 - * @param {*} events An accumulation of synthetic events.
2514 - * @internal
2515 - */
2516 - enqueueEvents: function (events) {
2517 - if (events) {
2518 - eventQueue = accumulateInto(eventQueue, events);
2519 - }
1172 + return Constructor;
1173 },
1174
2522 - /**
2523 - * Dispatches all synthetic events on the event queue.
2524 - *
2525 - * @internal
2526 - */
2527 - processEventQueue: function (simulated) {
2528 - // Set `eventQueue` to null before processing it so that we can tell if more
2529 - // events get enqueued while processing.
2530 - var processingEventQueue = eventQueue;
2531 - eventQueue = null;
2532 - if (simulated) {
2533 - forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
2534 - } else {
2535 - forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
1175 + injection: {
1176 + injectMixin: function (mixin) {
1177 + injectedMixins.push(mixin);
1178 }
2537 - !!eventQueue ? "development" !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
2538 - // This would be a good time to rethrow if any of the event handlers threw.
2539 - ReactErrorUtils.rethrowCaughtError();
2540 - },
2541 -
2542 - /**
2543 - * These are needed for tests only. Do not use!
2544 - */
2545 - __purge: function () {
2546 - listenerBank = {};
2547 - },
2548 -
2549 - __getListenerBank: function () {
2550 - return listenerBank;
1179 }
1180
1181 };
1182
2555 -module.exports = EventPluginHub;
2556 -},{"116":116,"125":125,"140":140,"162":162,"18":18,"19":19,"64":64}],18:[function(_dereq_,module,exports){
1183 +module.exports = ReactClass;
1184 +},{"10":10,"13":13,"14":14,"24":24,"27":27,"28":28,"29":29,"30":30,"6":6}],6:[function(_dereq_,module,exports){
1185 /**
1186 * Copyright 2013-present, Facebook, Inc.
1187 * All rights reserved.
@@ -2562,614 +1190,442 @@ module.exports = EventPluginHub;
1190 * LICENSE file in the root directory of this source tree. An additional grant
1191 * of patent rights can be found in the PATENTS file in the same directory.
1192 *
2565 - * @providesModule EventPluginRegistry
1193 */
1194
1195 'use strict';
1196
2570 -var _prodInvariant = _dereq_(140);
1197 +var _prodInvariant = _dereq_(24);
1198
2572 -var invariant = _dereq_(162);
1199 +var ReactNoopUpdateQueue = _dereq_(13);
1200
2574 -/**
2575 - * Injectable ordering of event plugins.
2576 - */
2577 -var EventPluginOrder = null;
1201 +var canDefineProperty = _dereq_(20);
1202 +var emptyObject = _dereq_(27);
1203 +var invariant = _dereq_(28);
1204 +var warning = _dereq_(29);
1205
1206 /**
2580 - * Injectable mapping from names to event plugin modules.
1207 + * Base class helpers for the updating state of a component.
1208 */
2582 -var namesToPlugins = {};
1209 +function ReactComponent(props, context, updater) {
1210 + this.props = props;
1211 + this.context = context;
1212 + this.refs = emptyObject;
1213 + // We initialize the default updater but the real one gets injected by the
1214 + // renderer.
1215 + this.updater = updater || ReactNoopUpdateQueue;
1216 +}
1217 +
1218 +ReactComponent.prototype.isReactComponent = {};
1219
1220 /**
2585 - * Recomputes the plugin list using the injected plugins and plugin ordering.
1221 + * Sets a subset of the state. Always use this to mutate
1222 + * state. You should treat `this.state` as immutable.
1223 *
2587 - * @private
2588 - */
2589 -function recomputePluginOrdering() {
2590 - if (!EventPluginOrder) {
2591 - // Wait until an `EventPluginOrder` is injected.
2592 - return;
2593 - }
2594 - for (var pluginName in namesToPlugins) {
2595 - var PluginModule = namesToPlugins[pluginName];
2596 - var pluginIndex = EventPluginOrder.indexOf(pluginName);
2597 - !(pluginIndex > -1) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
2598 - if (EventPluginRegistry.plugins[pluginIndex]) {
2599 - continue;
2600 - }
2601 - !PluginModule.extractEvents ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
2602 - EventPluginRegistry.plugins[pluginIndex] = PluginModule;
2603 - var publishedEvents = PluginModule.eventTypes;
2604 - for (var eventName in publishedEvents) {
2605 - !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
2606 - }
2607 - }
2608 -}
2609 -
2610 -/**
2611 - * Publishes an event so that it can be dispatched by the supplied plugin.
1224 + * There is no guarantee that `this.state` will be immediately updated, so
1225 + * accessing `this.state` after calling this method may return the old value.
1226 *
2613 - * @param {object} dispatchConfig Dispatch configuration for the event.
2614 - * @param {object} PluginModule Plugin publishing the event.
2615 - * @return {boolean} True if the event was successfully published.
2616 - * @private
1227 + * There is no guarantee that calls to `setState` will run synchronously,
1228 + * as they may eventually be batched together. You can provide an optional
1229 + * callback that will be executed when the call to setState is actually
1230 + * completed.
1231 + *
1232 + * When a function is provided to setState, it will be called at some point in
1233 + * the future (not synchronously). It will be called with the up to date
1234 + * component arguments (state, props, context). These values can be different
1235 + * from this.* because your function may be called after receiveProps but before
1236 + * shouldComponentUpdate, and this new state, props, and context will not yet be
1237 + * assigned to this.
1238 + *
1239 + * @param {object|function} partialState Next partial state or function to
1240 + * produce next partial state to be merged with current state.
1241 + * @param {?function} callback Called after state is updated.
1242 + * @final
1243 + * @protected
1244 */
2618 -function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
2619 - !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
2620 - EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
2621 -
2622 - var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
2623 - if (phasedRegistrationNames) {
2624 - for (var phaseName in phasedRegistrationNames) {
2625 - if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
2626 - var phasedRegistrationName = phasedRegistrationNames[phaseName];
2627 - publishRegistrationName(phasedRegistrationName, PluginModule, eventName);
2628 - }
2629 - }
2630 - return true;
2631 - } else if (dispatchConfig.registrationName) {
2632 - publishRegistrationName(dispatchConfig.registrationName, PluginModule, eventName);
2633 - return true;
1245 +ReactComponent.prototype.setState = function (partialState, callback) {
1246 + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? "development" !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
1247 + this.updater.enqueueSetState(this, partialState);
1248 + if (callback) {
1249 + this.updater.enqueueCallback(this, callback, 'setState');
1250 }
2635 - return false;
2636 -}
1251 +};
1252
1253 /**
2639 - * Publishes a registration name that is used to identify dispatched events and
2640 - * can be used with `EventPluginHub.putListener` to register listeners.
1254 + * Forces an update. This should only be invoked when it is known with
1255 + * certainty that we are **not** in a DOM transaction.
1256 *
2642 - * @param {string} registrationName Registration name to add.
2643 - * @param {object} PluginModule Plugin publishing the event.
2644 - * @private
1257 + * You may want to call this when you know that some deeper aspect of the
1258 + * component's state has changed but `setState` was not called.
1259 + *
1260 + * This will not invoke `shouldComponentUpdate`, but it will invoke
1261 + * `componentWillUpdate` and `componentDidUpdate`.
1262 + *
1263 + * @param {?function} callback Called after update is complete.
1264 + * @final
1265 + * @protected
1266 */
2646 -function publishRegistrationName(registrationName, PluginModule, eventName) {
2647 - !!EventPluginRegistry.registrationNameModules[registrationName] ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
2648 - EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;
2649 - EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies;
2650 -
2651 - if ("development" !== 'production') {
2652 - var lowerCasedName = registrationName.toLowerCase();
2653 - EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
2654 -
2655 - if (registrationName === 'onDoubleClick') {
2656 - EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
2657 - }
1267 +ReactComponent.prototype.forceUpdate = function (callback) {
1268 + this.updater.enqueueForceUpdate(this);
1269 + if (callback) {
1270 + this.updater.enqueueCallback(this, callback, 'forceUpdate');
1271 }
2659 -}
1272 +};
1273
1274 /**
2662 - * Registers plugins so that they can extract and dispatch events.
2663 - *
2664 - * @see {EventPluginHub}
1275 + * Deprecated APIs. These APIs used to exist on classic React classes but since
1276 + * we would like to deprecate them, we're not going to move them over to this
1277 + * modern base class. Instead, we define a getter that warns if it's accessed.
1278 */
2666 -var EventPluginRegistry = {
2667 -
2668 - /**
2669 - * Ordered list of injected plugins.
2670 - */
2671 - plugins: [],
2672 -
2673 - /**
2674 - * Mapping from event name to dispatch config
2675 - */
2676 - eventNameDispatchConfigs: {},
2677 -
2678 - /**
2679 - * Mapping from registration name to plugin module
2680 - */
2681 - registrationNameModules: {},
2682 -
2683 - /**
2684 - * Mapping from registration name to event name
2685 - */
2686 - registrationNameDependencies: {},
2687 -
2688 - /**
2689 - * Mapping from lowercase registration names to the properly cased version,
2690 - * used to warn in the case of missing event handlers. Available
2691 - * only in __DEV__.
2692 - * @type {Object}
2693 - */
2694 - possibleRegistrationNames: "development" !== 'production' ? {} : null,
2695 -
2696 - /**
2697 - * Injects an ordering of plugins (by plugin name). This allows the ordering
2698 - * to be decoupled from injection of the actual plugins so that ordering is
2699 - * always deterministic regardless of packaging, on-the-fly injection, etc.
2700 - *
2701 - * @param {array} InjectedEventPluginOrder
2702 - * @internal
2703 - * @see {EventPluginHub.injection.injectEventPluginOrder}
2704 - */
2705 - injectEventPluginOrder: function (InjectedEventPluginOrder) {
2706 - !!EventPluginOrder ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;
2707 - // Clone the ordering so it cannot be dynamically mutated.
2708 - EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
2709 - recomputePluginOrdering();
2710 - },
2711 -
2712 - /**
2713 - * Injects plugins to be used by `EventPluginHub`. The plugin names must be
2714 - * in the ordering injected by `injectEventPluginOrder`.
2715 - *
2716 - * Plugins can be injected as part of page initialization or on-the-fly.
2717 - *
2718 - * @param {object} injectedNamesToPlugins Map from names to plugin modules.
2719 - * @internal
2720 - * @see {EventPluginHub.injection.injectEventPluginsByName}
2721 - */
2722 - injectEventPluginsByName: function (injectedNamesToPlugins) {
2723 - var isOrderingDirty = false;
2724 - for (var pluginName in injectedNamesToPlugins) {
2725 - if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
2726 - continue;
2727 - }
2728 - var PluginModule = injectedNamesToPlugins[pluginName];
2729 - if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) {
2730 - !!namesToPlugins[pluginName] ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
2731 - namesToPlugins[pluginName] = PluginModule;
2732 - isOrderingDirty = true;
2733 - }
2734 - }
2735 - if (isOrderingDirty) {
2736 - recomputePluginOrdering();
2737 - }
2738 - },
2739 -
2740 - /**
2741 - * Looks up the plugin for the supplied event.
2742 - *
2743 - * @param {object} event A synthetic event.
2744 - * @return {?object} The plugin that created the supplied event.
2745 - * @internal
2746 - */
2747 - getPluginModuleForEvent: function (event) {
2748 - var dispatchConfig = event.dispatchConfig;
2749 - if (dispatchConfig.registrationName) {
2750 - return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
2751 - }
2752 - for (var phase in dispatchConfig.phasedRegistrationNames) {
2753 - if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) {
2754 - continue;
2755 - }
2756 - var PluginModule = EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]];
2757 - if (PluginModule) {
2758 - return PluginModule;
2759 - }
2760 - }
2761 - return null;
2762 - },
2763 -
2764 - /**
2765 - * Exposed for unit testing.
2766 - * @private
2767 - */
2768 - _resetEventPlugins: function () {
2769 - EventPluginOrder = null;
2770 - for (var pluginName in namesToPlugins) {
2771 - if (namesToPlugins.hasOwnProperty(pluginName)) {
2772 - delete namesToPlugins[pluginName];
2773 - }
2774 - }
2775 - EventPluginRegistry.plugins.length = 0;
2776 -
2777 - var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
2778 - for (var eventName in eventNameDispatchConfigs) {
2779 - if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
2780 - delete eventNameDispatchConfigs[eventName];
2781 - }
2782 - }
2783 -
2784 - var registrationNameModules = EventPluginRegistry.registrationNameModules;
2785 - for (var registrationName in registrationNameModules) {
2786 - if (registrationNameModules.hasOwnProperty(registrationName)) {
2787 - delete registrationNameModules[registrationName];
2788 - }
2789 - }
2790 -
2791 - if ("development" !== 'production') {
2792 - var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
2793 - for (var lowerCasedName in possibleRegistrationNames) {
2794 - if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
2795 - delete possibleRegistrationNames[lowerCasedName];
1279 +if ("development" !== 'production') {
1280 + var deprecatedAPIs = {
1281 + isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
1282 + replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
1283 + };
1284 + var defineDeprecationWarning = function (methodName, info) {
1285 + if (canDefineProperty) {
1286 + Object.defineProperty(ReactComponent.prototype, methodName, {
1287 + get: function () {
1288 + "development" !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
1289 + return undefined;
1290 }
2797 - }
1291 + });
1292 + }
1293 + };
1294 + for (var fnName in deprecatedAPIs) {
1295 + if (deprecatedAPIs.hasOwnProperty(fnName)) {
1296 + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1297 }
1298 }
1299 +}
1300
2801 -};
2802 -
2803 -module.exports = EventPluginRegistry;
2804 -},{"140":140,"162":162}],19:[function(_dereq_,module,exports){
1301 +module.exports = ReactComponent;
1302 +},{"13":13,"20":20,"24":24,"27":27,"28":28,"29":29}],7:[function(_dereq_,module,exports){
1303 /**
2806 - * Copyright 2013-present, Facebook, Inc.
1304 + * Copyright 2016-present, Facebook, Inc.
1305 * All rights reserved.
1306 *
1307 * This source code is licensed under the BSD-style license found in the
1308 * LICENSE file in the root directory of this source tree. An additional grant
1309 * of patent rights can be found in the PATENTS file in the same directory.
1310 *
2813 - * @providesModule EventPluginUtils
1311 + *
1312 */
1313
1314 'use strict';
1315
2818 -var _prodInvariant = _dereq_(140);
2819 -
2820 -var EventConstants = _dereq_(16);
2821 -var ReactErrorUtils = _dereq_(64);
1316 +var _prodInvariant = _dereq_(24);
1317
2823 -var invariant = _dereq_(162);
2824 -var warning = _dereq_(171);
1318 +var ReactCurrentOwner = _dereq_(8);
1319
2826 -/**
2827 - * Injected dependencies:
2828 - */
1320 +var invariant = _dereq_(28);
1321 +var warning = _dereq_(29);
1322
2830 -/**
2831 - * - `ComponentTree`: [required] Module that can convert between React instances
2832 - * and actual node references.
2833 - */
2834 -var ComponentTree;
2835 -var TreeTraversal;
2836 -var injection = {
2837 - injectComponentTree: function (Injected) {
2838 - ComponentTree = Injected;
2839 - if ("development" !== 'production') {
2840 - "development" !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
2841 - }
2842 - },
2843 - injectTreeTraversal: function (Injected) {
2844 - TreeTraversal = Injected;
2845 - if ("development" !== 'production') {
2846 - "development" !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
2847 - }
1323 +function isNative(fn) {
1324 + // Based on isNative() from Lodash
1325 + var funcToString = Function.prototype.toString;
1326 + var hasOwnProperty = Object.prototype.hasOwnProperty;
1327 + var reIsNative = RegExp('^' + funcToString
1328 + // Take an example native function source for comparison
1329 + .call(hasOwnProperty)
1330 + // Strip regex characters so we can use it for regex
1331 + .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
1332 + // Remove hasOwnProperty from the template to make it generic
1333 + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
1334 + try {
1335 + var source = funcToString.call(fn);
1336 + return reIsNative.test(source);
1337 + } catch (err) {
1338 + return false;
1339 }
2849 -};
1340 +}
1341
2851 -var topLevelTypes = EventConstants.topLevelTypes;
1342 +var canUseCollections =
1343 +// Array.from
1344 +typeof Array.from === 'function' &&
1345 +// Map
1346 +typeof Map === 'function' && isNative(Map) &&
1347 +// Map.prototype.keys
1348 +Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
1349 +// Set
1350 +typeof Set === 'function' && isNative(Set) &&
1351 +// Set.prototype.keys
1352 +Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
1353
2853 -function isEndish(topLevelType) {
2854 - return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel;
2855 -}
1354 +if (canUseCollections) {
1355 + var itemMap = new Map();
1356 + var rootIDSet = new Set();
1357
2857 -function isMoveish(topLevelType) {
2858 - return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove;
2859 -}
2860 -function isStartish(topLevelType) {
2861 - return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart;
2862 -}
1358 + var setItem = function (id, item) {
1359 + itemMap.set(id, item);
1360 + };
1361 + var getItem = function (id) {
1362 + return itemMap.get(id);
1363 + };
1364 + var removeItem = function (id) {
1365 + itemMap['delete'](id);
1366 + };
1367 + var getItemIDs = function () {
1368 + return Array.from(itemMap.keys());
1369 + };
1370
2864 -var validateEventDispatches;
2865 -if ("development" !== 'production') {
2866 - validateEventDispatches = function (event) {
2867 - var dispatchListeners = event._dispatchListeners;
2868 - var dispatchInstances = event._dispatchInstances;
1371 + var addRoot = function (id) {
1372 + rootIDSet.add(id);
1373 + };
1374 + var removeRoot = function (id) {
1375 + rootIDSet['delete'](id);
1376 + };
1377 + var getRootIDs = function () {
1378 + return Array.from(rootIDSet.keys());
1379 + };
1380 +} else {
1381 + var itemByKey = {};
1382 + var rootByKey = {};
1383
2870 - var listenersIsArr = Array.isArray(dispatchListeners);
2871 - var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
1384 + // Use non-numeric keys to prevent V8 performance issues:
1385 + // https://github.com/facebook/react/pull/7232
1386 + var getKeyFromID = function (id) {
1387 + return '.' + id;
1388 + };
1389 + var getIDFromKey = function (key) {
1390 + return parseInt(key.substr(1), 10);
1391 + };
1392
2873 - var instancesIsArr = Array.isArray(dispatchInstances);
2874 - var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
1393 + var setItem = function (id, item) {
1394 + var key = getKeyFromID(id);
1395 + itemByKey[key] = item;
1396 + };
1397 + var getItem = function (id) {
1398 + var key = getKeyFromID(id);
1399 + return itemByKey[key];
1400 + };
1401 + var removeItem = function (id) {
1402 + var key = getKeyFromID(id);
1403 + delete itemByKey[key];
1404 + };
1405 + var getItemIDs = function () {
1406 + return Object.keys(itemByKey).map(getIDFromKey);
1407 + };
1408
2876 - "development" !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
1409 + var addRoot = function (id) {
1410 + var key = getKeyFromID(id);
1411 + rootByKey[key] = true;
1412 + };
1413 + var removeRoot = function (id) {
1414 + var key = getKeyFromID(id);
1415 + delete rootByKey[key];
1416 + };
1417 + var getRootIDs = function () {
1418 + return Object.keys(rootByKey).map(getIDFromKey);
1419 };
1420 }
1421
2880 -/**
2881 - * Dispatch the event to the listener.
2882 - * @param {SyntheticEvent} event SyntheticEvent to handle
2883 - * @param {boolean} simulated If the event is simulated (changes exn behavior)
2884 - * @param {function} listener Application-level callback
2885 - * @param {*} inst Internal component instance
2886 - */
2887 -function executeDispatch(event, simulated, listener, inst) {
2888 - var type = event.type || 'unknown-event';
2889 - event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
2890 - if (simulated) {
2891 - ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
2892 - } else {
2893 - ReactErrorUtils.invokeGuardedCallback(type, listener, event);
1422 +var unmountedIDs = [];
1423 +
1424 +function purgeDeep(id) {
1425 + var item = getItem(id);
1426 + if (item) {
1427 + var childIDs = item.childIDs;
1428 +
1429 + removeItem(id);
1430 + childIDs.forEach(purgeDeep);
1431 }
2895 - event.currentTarget = null;
1432 }
1433
2898 -/**
2899 - * Standard/simple iteration through an event's collected dispatches.
2900 - */
2901 -function executeDispatchesInOrder(event, simulated) {
2902 - var dispatchListeners = event._dispatchListeners;
2903 - var dispatchInstances = event._dispatchInstances;
2904 - if ("development" !== 'production') {
2905 - validateEventDispatches(event);
2906 - }
2907 - if (Array.isArray(dispatchListeners)) {
2908 - for (var i = 0; i < dispatchListeners.length; i++) {
2909 - if (event.isPropagationStopped()) {
2910 - break;
2911 - }
2912 - // Listeners and Instances are two parallel arrays that are always in sync.
2913 - executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
2914 - }
2915 - } else if (dispatchListeners) {
2916 - executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
2917 - }
2918 - event._dispatchListeners = null;
2919 - event._dispatchInstances = null;
1434 +function describeComponentFrame(name, source, ownerName) {
1435 + return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
1436 }
1437
2922 -/**
2923 - * Standard/simple iteration through an event's collected dispatches, but stops
2924 - * at the first dispatch execution returning true, and returns that id.
2925 - *
2926 - * @return {?string} id of the first dispatch execution who's listener returns
2927 - * true, or null if no listener returned true.
2928 - */
2929 -function executeDispatchesInOrderStopAtTrueImpl(event) {
2930 - var dispatchListeners = event._dispatchListeners;
2931 - var dispatchInstances = event._dispatchInstances;
2932 - if ("development" !== 'production') {
2933 - validateEventDispatches(event);
2934 - }
2935 - if (Array.isArray(dispatchListeners)) {
2936 - for (var i = 0; i < dispatchListeners.length; i++) {
2937 - if (event.isPropagationStopped()) {
2938 - break;
2939 - }
2940 - // Listeners and Instances are two parallel arrays that are always in sync.
2941 - if (dispatchListeners[i](event, dispatchInstances[i])) {
2942 - return dispatchInstances[i];
2943 - }
2944 - }
2945 - } else if (dispatchListeners) {
2946 - if (dispatchListeners(event, dispatchInstances)) {
2947 - return dispatchInstances;
2948 - }
1438 +function getDisplayName(element) {
1439 + if (element == null) {
1440 + return '#empty';
1441 + } else if (typeof element === 'string' || typeof element === 'number') {
1442 + return '#text';
1443 + } else if (typeof element.type === 'string') {
1444 + return element.type;
1445 + } else {
1446 + return element.type.displayName || element.type.name || 'Unknown';
1447 }
2950 - return null;
2951 -}
2952 -
2953 -/**
2954 - * @see executeDispatchesInOrderStopAtTrueImpl
2955 - */
2956 -function executeDispatchesInOrderStopAtTrue(event) {
2957 - var ret = executeDispatchesInOrderStopAtTrueImpl(event);
2958 - event._dispatchInstances = null;
2959 - event._dispatchListeners = null;
2960 - return ret;
1448 }
1449
2963 -/**
2964 - * Execution of a "direct" dispatch - there must be at most one dispatch
2965 - * accumulated on the event or it is considered an error. It doesn't really make
2966 - * sense for an event with multiple dispatches (bubbled) to keep track of the
2967 - * return values at each dispatch execution, but it does tend to make sense when
2968 - * dealing with "direct" dispatches.
2969 - *
2970 - * @return {*} The return value of executing the single dispatch.
2971 - */
2972 -function executeDirectDispatch(event) {
2973 - if ("development" !== 'production') {
2974 - validateEventDispatches(event);
1450 +function describeID(id) {
1451 + var name = ReactComponentTreeHook.getDisplayName(id);
1452 + var element = ReactComponentTreeHook.getElement(id);
1453 + var ownerID = ReactComponentTreeHook.getOwnerID(id);
1454 + var ownerName;
1455 + if (ownerID) {
1456 + ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
1457 }
2976 - var dispatchListener = event._dispatchListeners;
2977 - var dispatchInstance = event._dispatchInstances;
2978 - !!Array.isArray(dispatchListener) ? "development" !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
2979 - event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
2980 - var res = dispatchListener ? dispatchListener(event) : null;
2981 - event.currentTarget = null;
2982 - event._dispatchListeners = null;
2983 - event._dispatchInstances = null;
2984 - return res;
1458 + "development" !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
1459 + return describeComponentFrame(name, element && element._source, ownerName);
1460 }
1461
2987 -/**
2988 - * @param {SyntheticEvent} event
2989 - * @return {boolean} True iff number of dispatches accumulated is greater than 0.
2990 - */
2991 -function hasDispatches(event) {
2992 - return !!event._dispatchListeners;
2993 -}
1462 +var ReactComponentTreeHook = {
1463 + onSetChildren: function (id, nextChildIDs) {
1464 + var item = getItem(id);
1465 + !item ? "development" !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
1466 + item.childIDs = nextChildIDs;
1467
2995 -/**
2996 - * General utilities that are useful in creating custom Event Plugins.
2997 - */
2998 -var EventPluginUtils = {
2999 - isEndish: isEndish,
3000 - isMoveish: isMoveish,
3001 - isStartish: isStartish,
3002 -
3003 - executeDirectDispatch: executeDirectDispatch,
3004 - executeDispatchesInOrder: executeDispatchesInOrder,
3005 - executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
3006 - hasDispatches: hasDispatches,
3007 -
3008 - getInstanceFromNode: function (node) {
3009 - return ComponentTree.getInstanceFromNode(node);
3010 - },
3011 - getNodeFromInstance: function (node) {
3012 - return ComponentTree.getNodeFromInstance(node);
1468 + for (var i = 0; i < nextChildIDs.length; i++) {
1469 + var nextChildID = nextChildIDs[i];
1470 + var nextChild = getItem(nextChildID);
1471 + !nextChild ? "development" !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
1472 + !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? "development" !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
1473 + !nextChild.isMounted ? "development" !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
1474 + if (nextChild.parentID == null) {
1475 + nextChild.parentID = id;
1476 + // TODO: This shouldn't be necessary but mounting a new root during in
1477 + // componentWillMount currently causes not-yet-mounted components to
1478 + // be purged from our tree data so their parent id is missing.
1479 + }
1480 + !(nextChild.parentID === id) ? "development" !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
1481 + }
1482 },
3014 - isAncestor: function (a, b) {
3015 - return TreeTraversal.isAncestor(a, b);
1483 + onBeforeMountComponent: function (id, element, parentID) {
1484 + var item = {
1485 + element: element,
1486 + parentID: parentID,
1487 + text: null,
1488 + childIDs: [],
1489 + isMounted: false,
1490 + updateCount: 0
1491 + };
1492 + setItem(id, item);
1493 },
3017 - getLowestCommonAncestor: function (a, b) {
3018 - return TreeTraversal.getLowestCommonAncestor(a, b);
1494 + onBeforeUpdateComponent: function (id, element) {
1495 + var item = getItem(id);
1496 + if (!item || !item.isMounted) {
1497 + // We may end up here as a result of setState() in componentWillUnmount().
1498 + // In this case, ignore the element.
1499 + return;
1500 + }
1501 + item.element = element;
1502 },
3020 - getParentInstance: function (inst) {
3021 - return TreeTraversal.getParentInstance(inst);
1503 + onMountComponent: function (id) {
1504 + var item = getItem(id);
1505 + !item ? "development" !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
1506 + item.isMounted = true;
1507 + var isRoot = item.parentID === 0;
1508 + if (isRoot) {
1509 + addRoot(id);
1510 + }
1511 },
3023 - traverseTwoPhase: function (target, fn, arg) {
3024 - return TreeTraversal.traverseTwoPhase(target, fn, arg);
1512 + onUpdateComponent: function (id) {
1513 + var item = getItem(id);
1514 + if (!item || !item.isMounted) {
1515 + // We may end up here as a result of setState() in componentWillUnmount().
1516 + // In this case, ignore the element.
1517 + return;
1518 + }
1519 + item.updateCount++;
1520 },
3026 - traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
3027 - return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
1521 + onUnmountComponent: function (id) {
1522 + var item = getItem(id);
1523 + if (item) {
1524 + // We need to check if it exists.
1525 + // `item` might not exist if it is inside an error boundary, and a sibling
1526 + // error boundary child threw while mounting. Then this instance never
1527 + // got a chance to mount, but it still gets an unmounting event during
1528 + // the error boundary cleanup.
1529 + item.isMounted = false;
1530 + var isRoot = item.parentID === 0;
1531 + if (isRoot) {
1532 + removeRoot(id);
1533 + }
1534 + }
1535 + unmountedIDs.push(id);
1536 },
3029 -
3030 - injection: injection
3031 -};
3032 -
3033 -module.exports = EventPluginUtils;
3034 -},{"140":140,"16":16,"162":162,"171":171,"64":64}],20:[function(_dereq_,module,exports){
3035 -/**
3036 - * Copyright 2013-present, Facebook, Inc.
3037 - * All rights reserved.
3038 - *
3039 - * This source code is licensed under the BSD-style license found in the
3040 - * LICENSE file in the root directory of this source tree. An additional grant
3041 - * of patent rights can be found in the PATENTS file in the same directory.
3042 - *
3043 - * @providesModule EventPropagators
3044 - */
3045 -
3046 -'use strict';
3047 -
3048 -var EventConstants = _dereq_(16);
3049 -var EventPluginHub = _dereq_(17);
3050 -var EventPluginUtils = _dereq_(19);
3051 -
3052 -var accumulateInto = _dereq_(116);
3053 -var forEachAccumulated = _dereq_(125);
3054 -var warning = _dereq_(171);
3055 -
3056 -var PropagationPhases = EventConstants.PropagationPhases;
3057 -var getListener = EventPluginHub.getListener;
3058 -
3059 -/**
3060 - * Some event types have a notion of different registration names for different
3061 - * "phases" of propagation. This finds listeners by a given phase.
3062 - */
3063 -function listenerAtPhase(inst, event, propagationPhase) {
3064 - var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
3065 - return getListener(inst, registrationName);
3066 -}
3067 -
3068 -/**
3069 - * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
3070 - * here, allows us to not have to bind or create functions for each event.
3071 - * Mutating the event's members allows us to not have to create a wrapping
3072 - * "dispatch" object that pairs the event with the listener.
3073 - */
3074 -function accumulateDirectionalDispatches(inst, upwards, event) {
3075 - if ("development" !== 'production') {
3076 - "development" !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
3077 - }
3078 - var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
3079 - var listener = listenerAtPhase(inst, event, phase);
3080 - if (listener) {
3081 - event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
3082 - event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
3083 - }
3084 -}
3085 -
3086 -/**
3087 - * Collect dispatches (must be entirely collected before dispatching - see unit
3088 - * tests). Lazily allocate the array to conserve memory. We must loop through
3089 - * each event and perform the traversal for each one. We cannot perform a
3090 - * single traversal for the entire collection of events because each event may
3091 - * have a different target.
3092 - */
3093 -function accumulateTwoPhaseDispatchesSingle(event) {
3094 - if (event && event.dispatchConfig.phasedRegistrationNames) {
3095 - EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
3096 - }
3097 -}
3098 -
3099 -/**
3100 - * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
3101 - */
3102 -function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
3103 - if (event && event.dispatchConfig.phasedRegistrationNames) {
3104 - var targetInst = event._targetInst;
3105 - var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
3106 - EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
3107 - }
3108 -}
3109 -
3110 -/**
3111 - * Accumulates without regard to direction, does not look for phased
3112 - * registration names. Same as `accumulateDirectDispatchesSingle` but without
3113 - * requiring that the `dispatchMarker` be the same as the dispatched ID.
3114 - */
3115 -function accumulateDispatches(inst, ignoredDirection, event) {
3116 - if (event && event.dispatchConfig.registrationName) {
3117 - var registrationName = event.dispatchConfig.registrationName;
3118 - var listener = getListener(inst, registrationName);
3119 - if (listener) {
3120 - event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
3121 - event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
1537 + purgeUnmountedComponents: function () {
1538 + if (ReactComponentTreeHook._preventPurging) {
1539 + // Should only be used for testing.
1540 + return;
1541 }
3123 - }
3124 -}
3125 -
3126 -/**
3127 - * Accumulates dispatches on an `SyntheticEvent`, but only for the
3128 - * `dispatchMarker`.
3129 - * @param {SyntheticEvent} event
3130 - */
3131 -function accumulateDirectDispatchesSingle(event) {
3132 - if (event && event.dispatchConfig.registrationName) {
3133 - accumulateDispatches(event._targetInst, null, event);
3134 - }
3135 -}
1542
3137 -function accumulateTwoPhaseDispatches(events) {
3138 - forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
3139 -}
1543 + for (var i = 0; i < unmountedIDs.length; i++) {
1544 + var id = unmountedIDs[i];
1545 + purgeDeep(id);
1546 + }
1547 + unmountedIDs.length = 0;
1548 + },
1549 + isMounted: function (id) {
1550 + var item = getItem(id);
1551 + return item ? item.isMounted : false;
1552 + },
1553 + getCurrentStackAddendum: function (topElement) {
1554 + var info = '';
1555 + if (topElement) {
1556 + var name = getDisplayName(topElement);
1557 + var owner = topElement._owner;
1558 + info += describeComponentFrame(name, topElement._source, owner && owner.getName());
1559 + }
1560
3141 -function accumulateTwoPhaseDispatchesSkipTarget(events) {
3142 - forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
3143 -}
1561 + var currentOwner = ReactCurrentOwner.current;
1562 + var id = currentOwner && currentOwner._debugID;
1563
3145 -function accumulateEnterLeaveDispatches(leave, enter, from, to) {
3146 - EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
3147 -}
1564 + info += ReactComponentTreeHook.getStackAddendumByID(id);
1565 + return info;
1566 + },
1567 + getStackAddendumByID: function (id) {
1568 + var info = '';
1569 + while (id) {
1570 + info += describeID(id);
1571 + id = ReactComponentTreeHook.getParentID(id);
1572 + }
1573 + return info;
1574 + },
1575 + getChildIDs: function (id) {
1576 + var item = getItem(id);
1577 + return item ? item.childIDs : [];
1578 + },
1579 + getDisplayName: function (id) {
1580 + var element = ReactComponentTreeHook.getElement(id);
1581 + if (!element) {
1582 + return null;
1583 + }
1584 + return getDisplayName(element);
1585 + },
1586 + getElement: function (id) {
1587 + var item = getItem(id);
1588 + return item ? item.element : null;
1589 + },
1590 + getOwnerID: function (id) {
1591 + var element = ReactComponentTreeHook.getElement(id);
1592 + if (!element || !element._owner) {
1593 + return null;
1594 + }
1595 + return element._owner._debugID;
1596 + },
1597 + getParentID: function (id) {
1598 + var item = getItem(id);
1599 + return item ? item.parentID : null;
1600 + },
1601 + getSource: function (id) {
1602 + var item = getItem(id);
1603 + var element = item ? item.element : null;
1604 + var source = element != null ? element._source : null;
1605 + return source;
1606 + },
1607 + getText: function (id) {
1608 + var element = ReactComponentTreeHook.getElement(id);
1609 + if (typeof element === 'string') {
1610 + return element;
1611 + } else if (typeof element === 'number') {
1612 + return '' + element;
1613 + } else {
1614 + return null;
1615 + }
1616 + },
1617 + getUpdateCount: function (id) {
1618 + var item = getItem(id);
1619 + return item ? item.updateCount : 0;
1620 + },
1621
3149 -function accumulateDirectDispatches(events) {
3150 - forEachAccumulated(events, accumulateDirectDispatchesSingle);
3151 -}
1622
3153 -/**
3154 - * A small set of propagation patterns, each of which will accept a small amount
3155 - * of information, and generate a set of "dispatch ready event objects" - which
3156 - * are sets of events that have already been annotated with a set of dispatched
3157 - * listener functions/ids. The API is designed this way to discourage these
3158 - * propagation strategies from actually executing the dispatches, since we
3159 - * always want to collect the entire set of dispatches before executing event a
3160 - * single one.
3161 - *
3162 - * @constructor EventPropagators
3163 - */
3164 -var EventPropagators = {
3165 - accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
3166 - accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
3167 - accumulateDirectDispatches: accumulateDirectDispatches,
3168 - accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
1623 + getRootIDs: getRootIDs,
1624 + getRegisteredIDs: getItemIDs
1625 };
1626
3171 -module.exports = EventPropagators;
3172 -},{"116":116,"125":125,"16":16,"17":17,"171":171,"19":19}],21:[function(_dereq_,module,exports){
1627 +module.exports = ReactComponentTreeHook;
1628 +},{"24":24,"28":28,"29":29,"8":8}],8:[function(_dereq_,module,exports){
1629 /**
1630 * Copyright 2013-present, Facebook, Inc.
1631 * All rights reserved.
@@ -3178,94 +1634,29 @@ module.exports = EventPropagators;
1634 * LICENSE file in the root directory of this source tree. An additional grant
1635 * of patent rights can be found in the PATENTS file in the same directory.
1636 *
3181 - * @providesModule FallbackCompositionState
1637 + *
1638 */
1639
1640 'use strict';
1641
3186 -var _assign = _dereq_(172);
3187 -
3188 -var PooledClass = _dereq_(25);
3189 -
3190 -var getTextContentAccessor = _dereq_(133);
3191 -
1642 /**
3193 - * This helper class stores information about text content of a target node,
3194 - * allowing comparison of content before and after a given event.
3195 - *
3196 - * Identify the node where selection currently begins, then observe
3197 - * both its text content and its current position in the DOM. Since the
3198 - * browser may natively replace the target node during composition, we can
3199 - * use its position to find its replacement.
1643 + * Keeps track of the current owner.
1644 *
3201 - * @param {DOMEventTarget} root
1645 + * The current owner is the component who should own any components that are
1646 + * currently being constructed.
1647 */
3203 -function FallbackCompositionState(root) {
3204 - this._root = root;
3205 - this._startText = this.getText();
3206 - this._fallbackText = null;
3207 -}
3208 -
3209 -_assign(FallbackCompositionState.prototype, {
3210 - destructor: function () {
3211 - this._root = null;
3212 - this._startText = null;
3213 - this._fallbackText = null;
3214 - },
3215 -
3216 - /**
3217 - * Get current text of input.
3218 - *
3219 - * @return {string}
3220 - */
3221 - getText: function () {
3222 - if ('value' in this._root) {
3223 - return this._root.value;
3224 - }
3225 - return this._root[getTextContentAccessor()];
3226 - },
1648 +var ReactCurrentOwner = {
1649
1650 /**
3229 - * Determine the differing substring between the initially stored
3230 - * text content and the current content.
3231 - *
3232 - * @return {string}
1651 + * @internal
1652 + * @type {ReactComponent}
1653 */
3234 - getData: function () {
3235 - if (this._fallbackText) {
3236 - return this._fallbackText;
3237 - }
3238 -
3239 - var start;
3240 - var startValue = this._startText;
3241 - var startLength = startValue.length;
3242 - var end;
3243 - var endValue = this.getText();
3244 - var endLength = endValue.length;
3245 -
3246 - for (start = 0; start < startLength; start++) {
3247 - if (startValue[start] !== endValue[start]) {
3248 - break;
3249 - }
3250 - }
3251 -
3252 - var minEnd = startLength - start;
3253 - for (end = 1; end <= minEnd; end++) {
3254 - if (startValue[startLength - end] !== endValue[endLength - end]) {
3255 - break;
3256 - }
3257 - }
3258 -
3259 - var sliceTail = end > 1 ? 1 - end : undefined;
3260 - this._fallbackText = endValue.slice(start, sliceTail);
3261 - return this._fallbackText;
3262 - }
3263 -});
1654 + current: null
1655
3265 -PooledClass.addPoolingTo(FallbackCompositionState);
1656 +};
1657
3267 -module.exports = FallbackCompositionState;
3268 -},{"133":133,"172":172,"25":25}],22:[function(_dereq_,module,exports){
1658 +module.exports = ReactCurrentOwner;
1659 +},{}],9:[function(_dereq_,module,exports){
1660 /**
1661 * Copyright 2013-present, Facebook, Inc.
1662 * All rights reserved.
@@ -3274,15003 +1665,561 @@ module.exports = FallbackCompositionState;
1665 * LICENSE file in the root directory of this source tree. An additional grant
1666 * of patent rights can be found in the PATENTS file in the same directory.
1667 *
3277 - * @providesModule HTMLDOMPropertyConfig
1668 */
1669
1670 'use strict';
1671
3282 -var DOMProperty = _dereq_(10);
3283 -
3284 -var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
3285 -var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
3286 -var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
3287 -var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
3288 -var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
3289 -
3290 -var HTMLDOMPropertyConfig = {
3291 - isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
3292 - Properties: {
3293 - /**
3294 - * Standard Properties
3295 - */
3296 - accept: 0,
3297 - acceptCharset: 0,
3298 - accessKey: 0,
3299 - action: 0,
3300 - allowFullScreen: HAS_BOOLEAN_VALUE,
3301 - allowTransparency: 0,
3302 - alt: 0,
3303 - // specifies target context for links with `preload` type
3304 - as: 0,
3305 - async: HAS_BOOLEAN_VALUE,
3306 - autoComplete: 0,
3307 - // autoFocus is polyfilled/normalized by AutoFocusUtils
3308 - // autoFocus: HAS_BOOLEAN_VALUE,
3309 - autoPlay: HAS_BOOLEAN_VALUE,
3310 - capture: HAS_BOOLEAN_VALUE,
3311 - cellPadding: 0,
3312 - cellSpacing: 0,
3313 - charSet: 0,
3314 - challenge: 0,
3315 - checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3316 - cite: 0,
3317 - classID: 0,
3318 - className: 0,
3319 - cols: HAS_POSITIVE_NUMERIC_VALUE,
3320 - colSpan: 0,
3321 - content: 0,
3322 - contentEditable: 0,
3323 - contextMenu: 0,
3324 - controls: HAS_BOOLEAN_VALUE,
3325 - coords: 0,
3326 - crossOrigin: 0,
3327 - data: 0, // For `<object />` acts as `src`.
3328 - dateTime: 0,
3329 - 'default': HAS_BOOLEAN_VALUE,
3330 - defer: HAS_BOOLEAN_VALUE,
3331 - dir: 0,
3332 - disabled: HAS_BOOLEAN_VALUE,
3333 - download: HAS_OVERLOADED_BOOLEAN_VALUE,
3334 - draggable: 0,
3335 - encType: 0,
3336 - form: 0,
3337 - formAction: 0,
3338 - formEncType: 0,
3339 - formMethod: 0,
3340 - formNoValidate: HAS_BOOLEAN_VALUE,
3341 - formTarget: 0,
3342 - frameBorder: 0,
3343 - headers: 0,
3344 - height: 0,
3345 - hidden: HAS_BOOLEAN_VALUE,
3346 - high: 0,
3347 - href: 0,
3348 - hrefLang: 0,
3349 - htmlFor: 0,
3350 - httpEquiv: 0,
3351 - icon: 0,
3352 - id: 0,
3353 - inputMode: 0,
3354 - integrity: 0,
3355 - is: 0,
3356 - keyParams: 0,
3357 - keyType: 0,
3358 - kind: 0,
3359 - label: 0,
3360 - lang: 0,
3361 - list: 0,
3362 - loop: HAS_BOOLEAN_VALUE,
3363 - low: 0,
3364 - manifest: 0,
3365 - marginHeight: 0,
3366 - marginWidth: 0,
3367 - max: 0,
3368 - maxLength: 0,
3369 - media: 0,
3370 - mediaGroup: 0,
3371 - method: 0,
3372 - min: 0,
3373 - minLength: 0,
3374 - // Caution; `option.selected` is not updated if `select.multiple` is
3375 - // disabled with `removeAttribute`.
3376 - multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3377 - muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3378 - name: 0,
3379 - nonce: 0,
3380 - noValidate: HAS_BOOLEAN_VALUE,
3381 - open: HAS_BOOLEAN_VALUE,
3382 - optimum: 0,
3383 - pattern: 0,
3384 - placeholder: 0,
3385 - playsInline: HAS_BOOLEAN_VALUE,
3386 - poster: 0,
3387 - preload: 0,
3388 - profile: 0,
3389 - radioGroup: 0,
3390 - readOnly: HAS_BOOLEAN_VALUE,
3391 - referrerPolicy: 0,
3392 - rel: 0,
3393 - required: HAS_BOOLEAN_VALUE,
3394 - reversed: HAS_BOOLEAN_VALUE,
3395 - role: 0,
3396 - rows: HAS_POSITIVE_NUMERIC_VALUE,
3397 - rowSpan: HAS_NUMERIC_VALUE,
3398 - sandbox: 0,
3399 - scope: 0,
3400 - scoped: HAS_BOOLEAN_VALUE,
3401 - scrolling: 0,
3402 - seamless: HAS_BOOLEAN_VALUE,
3403 - selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3404 - shape: 0,
3405 - size: HAS_POSITIVE_NUMERIC_VALUE,
3406 - sizes: 0,
3407 - span: HAS_POSITIVE_NUMERIC_VALUE,
3408 - spellCheck: 0,
3409 - src: 0,
3410 - srcDoc: 0,
3411 - srcLang: 0,
3412 - srcSet: 0,
3413 - start: HAS_NUMERIC_VALUE,
3414 - step: 0,
3415 - style: 0,
3416 - summary: 0,
3417 - tabIndex: 0,
3418 - target: 0,
3419 - title: 0,
3420 - // Setting .type throws on non-<input> tags
3421 - type: 0,
3422 - useMap: 0,
3423 - value: 0,
3424 - width: 0,
3425 - wmode: 0,
3426 - wrap: 0,
3427 -
3428 - /**
3429 - * RDFa Properties
3430 - */
3431 - about: 0,
3432 - datatype: 0,
3433 - inlist: 0,
3434 - prefix: 0,
3435 - // property is also supported for OpenGraph in meta tags.
3436 - property: 0,
3437 - resource: 0,
3438 - 'typeof': 0,
3439 - vocab: 0,
3440 -
3441 - /**
3442 - * Non-standard Properties
3443 - */
3444 - // autoCapitalize and autoCorrect are supported in Mobile Safari for
3445 - // keyboard hints.
3446 - autoCapitalize: 0,
3447 - autoCorrect: 0,
3448 - // autoSave allows WebKit/Blink to persist values of input fields on page reloads
3449 - autoSave: 0,
3450 - // color is for Safari mask-icon link
3451 - color: 0,
3452 - // itemProp, itemScope, itemType are for
3453 - // Microdata support. See http://schema.org/docs/gs.html
3454 - itemProp: 0,
3455 - itemScope: HAS_BOOLEAN_VALUE,
3456 - itemType: 0,
3457 - // itemID and itemRef are for Microdata support as well but
3458 - // only specified in the WHATWG spec document. See
3459 - // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
3460 - itemID: 0,
3461 - itemRef: 0,
3462 - // results show looking glass icon and recent searches on input
3463 - // search fields in WebKit/Blink
3464 - results: 0,
3465 - // IE-only attribute that specifies security restrictions on an iframe
3466 - // as an alternative to the sandbox attribute on IE<10
3467 - security: 0,
3468 - // IE-only attribute that controls focus behavior
3469 - unselectable: 0
3470 - },
3471 - DOMAttributeNames: {
3472 - acceptCharset: 'accept-charset',
3473 - className: 'class',
3474 - htmlFor: 'for',
3475 - httpEquiv: 'http-equiv'
3476 - },
3477 - DOMPropertyNames: {}
3478 -};
1672 +var ReactElement = _dereq_(10);
1673
3480 -module.exports = HTMLDOMPropertyConfig;
3481 -},{"10":10}],23:[function(_dereq_,module,exports){
1674 /**
3483 - * Copyright 2013-present, Facebook, Inc.
3484 - * All rights reserved.
3485 - *
3486 - * This source code is licensed under the BSD-style license found in the
3487 - * LICENSE file in the root directory of this source tree. An additional grant
3488 - * of patent rights can be found in the PATENTS file in the same directory.
1675 + * Create a factory that creates HTML tag elements.
1676 *
3490 - * @providesModule KeyEscapeUtils
3491 - *
3492 - */
3493 -
3494 -'use strict';
3495 -
3496 -/**
3497 - * Escape and wrap key so it is safe to use as a reactid
3498 - *
3499 - * @param {string} key to be escaped.
3500 - * @return {string} the escaped key.
1677 + * @private
1678 */
3502 -
3503 -function escape(key) {
3504 - var escapeRegex = /[=:]/g;
3505 - var escaperLookup = {
3506 - '=': '=0',
3507 - ':': '=2'
3508 - };
3509 - var escapedString = ('' + key).replace(escapeRegex, function (match) {
3510 - return escaperLookup[match];
3511 - });
3512 -
3513 - return '$' + escapedString;
1679 +var createDOMFactory = ReactElement.createFactory;
1680 +if ("development" !== 'production') {
1681 + var ReactElementValidator = _dereq_(12);
1682 + createDOMFactory = ReactElementValidator.createFactory;
1683 }
1684
1685 /**
3517 - * Unescape and unwrap key for human-readable display
1686 + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
1687 + * This is also accessible via `React.DOM`.
1688 *
3519 - * @param {string} key to unescape.
3520 - * @return {string} the unescaped key.
1689 + * @public
1690 */
3522 -function unescape(key) {
3523 - var unescapeRegex = /(=0|=2)/g;
3524 - var unescaperLookup = {
3525 - '=0': '=',
3526 - '=2': ':'
3527 - };
3528 - var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
3529 -
3530 - return ('' + keySubstring).replace(unescapeRegex, function (match) {
3531 - return unescaperLookup[match];
3532 - });
3533 -}
1691 +var ReactDOMFactories = {
1692 + a: createDOMFactory('a'),
1693 + abbr: createDOMFactory('abbr'),
1694 + address: createDOMFactory('address'),
1695 + area: createDOMFactory('area'),
1696 + article: createDOMFactory('article'),
1697 + aside: createDOMFactory('aside'),
1698 + audio: createDOMFactory('audio'),
1699 + b: createDOMFactory('b'),
1700 + base: createDOMFactory('base'),
1701 + bdi: createDOMFactory('bdi'),
1702 + bdo: createDOMFactory('bdo'),
1703 + big: createDOMFactory('big'),
1704 + blockquote: createDOMFactory('blockquote'),
1705 + body: createDOMFactory('body'),
1706 + br: createDOMFactory('br'),
1707 + button: createDOMFactory('button'),
1708 + canvas: createDOMFactory('canvas'),
1709 + caption: createDOMFactory('caption'),
1710 + cite: createDOMFactory('cite'),
1711 + code: createDOMFactory('code'),
1712 + col: createDOMFactory('col'),
1713 + colgroup: createDOMFactory('colgroup'),
1714 + data: createDOMFactory('data'),
1715 + datalist: createDOMFactory('datalist'),
1716 + dd: createDOMFactory('dd'),
1717 + del: createDOMFactory('del'),
1718 + details: createDOMFactory('details'),
1719 + dfn: createDOMFactory('dfn'),
1720 + dialog: createDOMFactory('dialog'),
1721 + div: createDOMFactory('div'),
1722 + dl: createDOMFactory('dl'),
1723 + dt: createDOMFactory('dt'),
1724 + em: createDOMFactory('em'),
1725 + embed: createDOMFactory('embed'),
1726 + fieldset: createDOMFactory('fieldset'),
1727 + figcaption: createDOMFactory('figcaption'),
1728 + figure: createDOMFactory('figure'),
1729 + footer: createDOMFactory('footer'),
1730 + form: createDOMFactory('form'),
1731 + h1: createDOMFactory('h1'),
1732 + h2: createDOMFactory('h2'),
1733 + h3: createDOMFactory('h3'),
1734 + h4: createDOMFactory('h4'),
1735 + h5: createDOMFactory('h5'),
1736 + h6: createDOMFactory('h6'),
1737 + head: createDOMFactory('head'),
1738 + header: createDOMFactory('header'),
1739 + hgroup: createDOMFactory('hgroup'),
1740 + hr: createDOMFactory('hr'),
1741 + html: createDOMFactory('html'),
1742 + i: createDOMFactory('i'),
1743 + iframe: createDOMFactory('iframe'),
1744 + img: createDOMFactory('img'),
1745 + input: createDOMFactory('input'),
1746 + ins: createDOMFactory('ins'),
1747 + kbd: createDOMFactory('kbd'),
1748 + keygen: createDOMFactory('keygen'),
1749 + label: createDOMFactory('label'),
1750 + legend: createDOMFactory('legend'),
1751 + li: createDOMFactory('li'),
1752 + link: createDOMFactory('link'),
1753 + main: createDOMFactory('main'),
1754 + map: createDOMFactory('map'),
1755 + mark: createDOMFactory('mark'),
1756 + menu: createDOMFactory('menu'),
1757 + menuitem: createDOMFactory('menuitem'),
1758 + meta: createDOMFactory('meta'),
1759 + meter: createDOMFactory('meter'),
1760 + nav: createDOMFactory('nav'),
1761 + noscript: createDOMFactory('noscript'),
1762 + object: createDOMFactory('object'),
1763 + ol: createDOMFactory('ol'),
1764 + optgroup: createDOMFactory('optgroup'),
1765 + option: createDOMFactory('option'),
1766 + output: createDOMFactory('output'),
1767 + p: createDOMFactory('p'),
1768 + param: createDOMFactory('param'),
1769 + picture: createDOMFactory('picture'),
1770 + pre: createDOMFactory('pre'),
1771 + progress: createDOMFactory('progress'),
1772 + q: createDOMFactory('q'),
1773 + rp: createDOMFactory('rp'),
1774 + rt: createDOMFactory('rt'),
1775 + ruby: createDOMFactory('ruby'),
1776 + s: createDOMFactory('s'),
1777 + samp: createDOMFactory('samp'),
1778 + script: createDOMFactory('script'),
1779 + section: createDOMFactory('section'),
1780 + select: createDOMFactory('select'),
1781 + small: createDOMFactory('small'),
1782 + source: createDOMFactory('source'),
1783 + span: createDOMFactory('span'),
1784 + strong: createDOMFactory('strong'),
1785 + style: createDOMFactory('style'),
1786 + sub: createDOMFactory('sub'),
1787 + summary: createDOMFactory('summary'),
1788 + sup: createDOMFactory('sup'),
1789 + table: createDOMFactory('table'),
1790 + tbody: createDOMFactory('tbody'),
1791 + td: createDOMFactory('td'),
1792 + textarea: createDOMFactory('textarea'),
1793 + tfoot: createDOMFactory('tfoot'),
1794 + th: createDOMFactory('th'),
1795 + thead: createDOMFactory('thead'),
1796 + time: createDOMFactory('time'),
1797 + title: createDOMFactory('title'),
1798 + tr: createDOMFactory('tr'),
1799 + track: createDOMFactory('track'),
1800 + u: createDOMFactory('u'),
1801 + ul: createDOMFactory('ul'),
1802 + 'var': createDOMFactory('var'),
1803 + video: createDOMFactory('video'),
1804 + wbr: createDOMFactory('wbr'),
1805
3535 -var KeyEscapeUtils = {
3536 - escape: escape,
3537 - unescape: unescape
1806 + // SVG
1807 + circle: createDOMFactory('circle'),
1808 + clipPath: createDOMFactory('clipPath'),
1809 + defs: createDOMFactory('defs'),
1810 + ellipse: createDOMFactory('ellipse'),
1811 + g: createDOMFactory('g'),
1812 + image: createDOMFactory('image'),
1813 + line: createDOMFactory('line'),
1814 + linearGradient: createDOMFactory('linearGradient'),
1815 + mask: createDOMFactory('mask'),
1816 + path: createDOMFactory('path'),
1817 + pattern: createDOMFactory('pattern'),
1818 + polygon: createDOMFactory('polygon'),
1819 + polyline: createDOMFactory('polyline'),
1820 + radialGradient: createDOMFactory('radialGradient'),
1821 + rect: createDOMFactory('rect'),
1822 + stop: createDOMFactory('stop'),
1823 + svg: createDOMFactory('svg'),
1824 + text: createDOMFactory('text'),
1825 + tspan: createDOMFactory('tspan')
1826 };
1827
3540 -module.exports = KeyEscapeUtils;
3541 -},{}],24:[function(_dereq_,module,exports){
1828 +module.exports = ReactDOMFactories;
1829 +},{"10":10,"12":12}],10:[function(_dereq_,module,exports){
1830 /**
3543 - * Copyright 2013-present, Facebook, Inc.
1831 + * Copyright 2014-present, Facebook, Inc.
1832 * All rights reserved.
1833 *
1834 * This source code is licensed under the BSD-style license found in the
1835 * LICENSE file in the root directory of this source tree. An additional grant
1836 * of patent rights can be found in the PATENTS file in the same directory.
1837 *
3550 - * @providesModule LinkedValueUtils
1838 */
1839
1840 'use strict';
1841
3555 -var _prodInvariant = _dereq_(140);
3556 -
3557 -var ReactPropTypes = _dereq_(84);
3558 -var ReactPropTypeLocations = _dereq_(83);
3559 -var ReactPropTypesSecret = _dereq_(85);
1842 +var _assign = _dereq_(30);
1843
3561 -var invariant = _dereq_(162);
3562 -var warning = _dereq_(171);
3563 -
3564 -var hasReadOnlyValue = {
3565 - 'button': true,
3566 - 'checkbox': true,
3567 - 'image': true,
3568 - 'hidden': true,
3569 - 'radio': true,
3570 - 'reset': true,
3571 - 'submit': true
3572 -};
1844 +var ReactCurrentOwner = _dereq_(8);
1845
3574 -function _assertSingleLink(inputProps) {
3575 - !(inputProps.checkedLink == null || inputProps.valueLink == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;
3576 -}
3577 -function _assertValueLink(inputProps) {
3578 - _assertSingleLink(inputProps);
3579 - !(inputProps.value == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0;
3580 -}
1846 +var warning = _dereq_(29);
1847 +var canDefineProperty = _dereq_(20);
1848 +var hasOwnProperty = Object.prototype.hasOwnProperty;
1849
3582 -function _assertCheckedLink(inputProps) {
3583 - _assertSingleLink(inputProps);
3584 - !(inputProps.checked == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0;
3585 -}
1850 +var REACT_ELEMENT_TYPE = _dereq_(11);
1851
3587 -var propTypes = {
3588 - value: function (props, propName, componentName) {
3589 - if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
3590 - return null;
3591 - }
3592 - return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
3593 - },
3594 - checked: function (props, propName, componentName) {
3595 - if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
3596 - return null;
3597 - }
3598 - return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
3599 - },
3600 - onChange: ReactPropTypes.func
1852 +var RESERVED_PROPS = {
1853 + key: true,
1854 + ref: true,
1855 + __self: true,
1856 + __source: true
1857 };
1858
3603 -var loggedTypeFailures = {};
3604 -function getDeclarationErrorAddendum(owner) {
3605 - if (owner) {
3606 - var name = owner.getName();
3607 - if (name) {
3608 - return ' Check the render method of `' + name + '`.';
1859 +var specialPropKeyWarningShown, specialPropRefWarningShown;
1860 +
1861 +function hasValidRef(config) {
1862 + if ("development" !== 'production') {
1863 + if (hasOwnProperty.call(config, 'ref')) {

This file is too large to show in full.