1 | |
2 |
|
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 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
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){
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
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];
|
53 | var START_KEYCODE = 229;
|
54 |
|
55 | var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
|
56 |
|
57 | var documentMode = null;
|
58 | if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
|
59 | documentMode = document.documentMode;
|
60 | }
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
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);
|
83 |
|
84 | var topLevelTypes = EventConstants.topLevelTypes;
|
85 |
|
86 |
|
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 | }
|
116 | };
|
117 |
|
118 |
|
119 | var hasSpaceKeypress = false;
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 | function isKeypressCommand(nativeEvent) {
|
127 | return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
|
128 |
|
129 | !(nativeEvent.ctrlKey && nativeEvent.altKey);
|
130 | }
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
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 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 | function isFallbackCompositionStart(topLevelType, nativeEvent) {
|
158 | return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE;
|
159 | }
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 | function isFallbackCompositionEnd(topLevelType, nativeEvent) {
|
169 | switch (topLevelType) {
|
170 | case topLevelTypes.topKeyUp:
|
171 |
|
172 | return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
|
173 | case topLevelTypes.topKeyDown:
|
174 |
|
175 |
|
176 | return nativeEvent.keyCode !== START_KEYCODE;
|
177 | case topLevelTypes.topKeyPress:
|
178 | case topLevelTypes.topMouseDown:
|
179 | case topLevelTypes.topBlur:
|
180 |
|
181 | return true;
|
182 | default:
|
183 | return false;
|
184 | }
|
185 | }
|
186 |
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
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 | }
|
203 |
|
204 |
|
205 | var currentComposition = null;
|
206 |
|
207 |
|
208 |
|
209 |
|
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 |
|
230 |
|
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 |
|
244 |
|
245 | event.data = fallbackData;
|
246 | } else {
|
247 | var customData = getDataFromCustomEvent(nativeEvent);
|
248 | if (customData !== null) {
|
249 | event.data = customData;
|
250 | }
|
251 | }
|
252 |
|
253 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
254 | return event;
|
255 | }
|
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 | function getNativeBeforeInputChars(topLevelType, nativeEvent) {
|
263 | switch (topLevelType) {
|
264 | case topLevelTypes.topCompositionEnd:
|
265 | return getDataFromCustomEvent(nativeEvent);
|
266 | case topLevelTypes.topKeyPress:
|
267 | |
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
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 |
|
291 | var chars = nativeEvent.data;
|
292 |
|
293 |
|
294 |
|
295 |
|
296 | if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
|
297 | return null;
|
298 | }
|
299 |
|
300 | return chars;
|
301 |
|
302 | default:
|
303 |
|
304 | return null;
|
305 | }
|
306 | }
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 | function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
|
317 |
|
318 |
|
319 |
|
320 |
|
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;
|
329 | }
|
330 |
|
331 | switch (topLevelType) {
|
332 | case topLevelTypes.topPaste:
|
333 |
|
334 |
|
335 | return null;
|
336 | case topLevelTypes.topKeyPress:
|
337 | |
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
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;
|
361 | }
|
362 | }
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 | function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
371 | var chars;
|
372 |
|
373 | if (canUseTextInputEvent) {
|
374 | chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
|
375 | } else {
|
376 | chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
|
377 | }
|
378 |
|
379 |
|
380 |
|
381 | if (!chars) {
|
382 | return null;
|
383 | }
|
384 |
|
385 | var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
|
386 |
|
387 | event.data = chars;
|
388 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
389 | return event;
|
390 | }
|
391 |
|
392 |
|
393 |
|
394 |
|
395 |
|
396 |
|
397 |
|
398 |
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 |
|
409 |
|
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)];
|
416 | }
|
417 | };
|
418 |
|
419 | module.exports = BeforeInputEventPlugin;
|
420 | },{"103":103,"107":107,"148":148,"16":16,"166":166,"20":20,"21":21}],3:[function(_dereq_,module,exports){
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 | 'use strict';
|
433 |
|
434 |
|
435 |
|
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 |
|
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 | };
|
476 |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 |
|
482 |
|
483 | function prefixKey(prefix, key) {
|
484 | return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
485 | }
|
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 | var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
|
492 |
|
493 |
|
494 |
|
495 | Object.keys(isUnitlessNumber).forEach(function (prop) {
|
496 | prefixes.forEach(function (prefix) {
|
497 | isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
|
498 | });
|
499 | });
|
500 |
|
501 |
|
502 |
|
503 |
|
504 |
|
505 |
|
506 |
|
507 |
|
508 |
|
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 | };
|
562 |
|
563 | var CSSProperty = {
|
564 | isUnitlessNumber: isUnitlessNumber,
|
565 | shorthandPropertyExpansions: shorthandPropertyExpansions
|
566 | };
|
567 |
|
568 | module.exports = CSSProperty;
|
569 | },{}],4:[function(_dereq_,module,exports){
|
570 |
|
571 |
|
572 |
|
573 |
|
574 |
|
575 |
|
576 |
|
577 |
|
578 |
|
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 |
|
603 | tempStyle.font = '';
|
604 | } catch (e) {
|
605 | hasShorthandPropertyBug = true;
|
606 | }
|
607 |
|
608 | if (document.documentElement.style.cssFloat === undefined) {
|
609 | styleFloatAccessor = 'styleFloat';
|
610 | }
|
611 | }
|
612 |
|
613 | if ("development" !== 'production') {
|
614 |
|
615 | var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
|
616 |
|
617 |
|
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;
|
649 | };
|
650 |
|
651 | var warnStyleValueIsNaN = function (name, value, owner) {
|
652 | if (warnedForNaNValue) {
|
653 | return;
|
654 | }
|
655 |
|
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 | };
|
659 |
|
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 | };
|
669 |
|
670 | |
671 |
|
672 |
|
673 |
|
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 | }
|
687 |
|
688 | if (typeof value === 'number' && isNaN(value)) {
|
689 | warnStyleValueIsNaN(name, value, owner);
|
690 | }
|
691 | };
|
692 | }
|
693 |
|
694 |
|
695 |
|
696 |
|
697 | var CSSPropertyOperations = {
|
698 |
|
699 | |
700 |
|
701 |
|
702 |
|
703 |
|
704 |
|
705 |
|
706 |
|
707 |
|
708 |
|
709 |
|
710 |
|
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;
|
728 | },
|
729 |
|
730 | |
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 |
|
738 | setValueForStyles: function (node, styles, component) {
|
739 | if ("development" !== 'production') {
|
740 | ReactInstrumentation.debugTool.onHostOperation(component._debugID, 'update styles', styles);
|
741 | }
|
742 |
|
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 |
|
761 |
|
762 | for (var individualStyleName in expansion) {
|
763 | style[individualStyleName] = '';
|
764 | }
|
765 | } else {
|
766 | style[styleName] = '';
|
767 | }
|
768 | }
|
769 | }
|
770 | }
|
771 |
|
772 | };
|
773 |
|
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){
|
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 |
|
785 |
|
786 |
|
787 | 'use strict';
|
788 |
|
789 | var _prodInvariant = _dereq_(140),
|
790 | _assign = _dereq_(172);
|
791 |
|
792 | var PooledClass = _dereq_(25);
|
793 |
|
794 | var invariant = _dereq_(162);
|
795 |
|
796 |
|
797 |
|
798 |
|
799 |
|
800 |
|
801 |
|
802 |
|
803 |
|
804 |
|
805 |
|
806 |
|
807 | function CallbackQueue() {
|
808 | this._callbacks = null;
|
809 | this._contexts = null;
|
810 | }
|
811 |
|
812 | _assign(CallbackQueue.prototype, {
|
813 |
|
814 | |
815 |
|
816 |
|
817 |
|
818 |
|
819 |
|
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 |
|
830 |
|
831 |
|
832 |
|
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 |
|
862 |
|
863 |
|
864 |
|
865 | reset: function () {
|
866 | this._callbacks = null;
|
867 | this._contexts = null;
|
868 | },
|
869 |
|
870 | |
871 |
|
872 |
|
873 | destructor: function () {
|
874 | this.reset();
|
875 | }
|
876 |
|
877 | });
|
878 |
|
879 | PooledClass.addPoolingTo(CallbackQueue);
|
880 |
|
881 | module.exports = CallbackQueue;
|
882 | },{"140":140,"162":162,"172":172,"25":25}],6:[function(_dereq_,module,exports){
|
883 |
|
884 |
|
885 |
|
886 |
|
887 |
|
888 |
|
889 |
|
890 |
|
891 |
|
892 |
|
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]
|
918 | }
|
919 | };
|
920 |
|
921 |
|
922 |
|
923 |
|
924 | var activeElement = null;
|
925 | var activeElementInst = null;
|
926 | var activeElementValue = null;
|
927 | var activeElementValueProp = null;
|
928 |
|
929 |
|
930 |
|
931 |
|
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 |
|
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 |
|
948 |
|
949 |
|
950 |
|
951 |
|
952 |
|
953 |
|
954 |
|
955 |
|
956 |
|
957 |
|
958 | ReactUpdates.batchedUpdates(runEventInBatch, event);
|
959 | }
|
960 |
|
961 | function runEventInBatch(event) {
|
962 | EventPluginHub.enqueueEvents(event);
|
963 | EventPluginHub.processEventQueue(false);
|
964 | }
|
965 |
|
966 | function startWatchingForChangeEventIE8(target, targetInst) {
|
967 | activeElement = target;
|
968 | activeElementInst = targetInst;
|
969 | activeElement.attachEvent('onchange', manualDispatchChangeEvent);
|
970 | }
|
971 |
|
972 | function stopWatchingForChangeEventIE8() {
|
973 | if (!activeElement) {
|
974 | return;
|
975 | }
|
976 | activeElement.detachEvent('onchange', manualDispatchChangeEvent);
|
977 | activeElement = null;
|
978 | activeElementInst = null;
|
979 | }
|
980 |
|
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 |
|
989 |
|
990 | stopWatchingForChangeEventIE8();
|
991 | startWatchingForChangeEventIE8(target, targetInst);
|
992 | } else if (topLevelType === topLevelTypes.topBlur) {
|
993 | stopWatchingForChangeEventIE8();
|
994 | }
|
995 | }
|
996 |
|
997 |
|
998 |
|
999 |
|
1000 | var isInputEventSupported = false;
|
1001 | if (ExecutionEnvironment.canUseDOM) {
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 | isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
|
1007 | }
|
1008 |
|
1009 |
|
1010 |
|
1011 |
|
1012 |
|
1013 | var newValueProp = {
|
1014 | get: function () {
|
1015 | return activeElementValueProp.get.call(this);
|
1016 | },
|
1017 | set: function (val) {
|
1018 |
|
1019 | activeElementValue = '' + val;
|
1020 | activeElementValueProp.set.call(this, val);
|
1021 | }
|
1022 | };
|
1023 |
|
1024 |
|
1025 |
|
1026 |
|
1027 |
|
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 |
|
1036 |
|
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 |
|
1047 |
|
1048 |
|
1049 | function stopWatchingForValueChange() {
|
1050 | if (!activeElement) {
|
1051 | return;
|
1052 | }
|
1053 |
|
1054 |
|
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 |
|
1071 |
|
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 |
|
1088 |
|
1089 | function getTargetInstForInputEvent(topLevelType, targetInst) {
|
1090 | if (topLevelType === topLevelTypes.topInput) {
|
1091 |
|
1092 |
|
1093 | return targetInst;
|
1094 | }
|
1095 | }
|
1096 |
|
1097 | function handleEventsForInputEventIE(topLevelType, target, targetInst) {
|
1098 | if (topLevelType === topLevelTypes.topFocus) {
|
1099 |
|
1100 |
|
1101 |
|
1102 |
|
1103 |
|
1104 |
|
1105 |
|
1106 |
|
1107 |
|
1108 |
|
1109 |
|
1110 |
|
1111 |
|
1112 | stopWatchingForValueChange();
|
1113 | startWatchingForValueChange(target, targetInst);
|
1114 | } else if (topLevelType === topLevelTypes.topBlur) {
|
1115 | stopWatchingForValueChange();
|
1116 | }
|
1117 | }
|
1118 |
|
1119 |
|
1120 | function getTargetInstForInputEventIE(topLevelType, targetInst) {
|
1121 | if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) {
|
1122 |
|
1123 |
|
1124 |
|
1125 |
|
1126 |
|
1127 |
|
1128 |
|
1129 |
|
1130 |
|
1131 |
|
1132 | if (activeElement && activeElement.value !== activeElementValue) {
|
1133 | activeElementValue = activeElement.value;
|
1134 | return activeElementInst;
|
1135 | }
|
1136 | }
|
1137 | }
|
1138 |
|
1139 |
|
1140 |
|
1141 |
|
1142 | function shouldUseClickEvent(elem) {
|
1143 |
|
1144 |
|
1145 |
|
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 | }
|
1153 | }
|
1154 |
|
1155 |
|
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 |
|
1161 |
|
1162 |
|
1163 |
|
1164 |
|
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 | }
|
1204 |
|
1205 | };
|
1206 |
|
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){
|
1209 |
|
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 |
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 | 'use strict';
|
1221 |
|
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 |
|
1234 |
|
1235 | if (Array.isArray(node)) {
|
1236 | node = node[1];
|
1237 | }
|
1238 | return node ? node.nextSibling : parentNode.firstChild;
|
1239 | }
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 | var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
|
1250 |
|
1251 |
|
1252 |
|
1253 | parentNode.insertBefore(childNode, referenceNode);
|
1254 | });
|
1255 |
|
1256 | function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
|
1257 | DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
|
1258 | }
|
1259 |
|
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 | }
|
1267 |
|
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 | }
|
1277 |
|
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 | }
|
1289 |
|
1290 | function removeDelimitedText(parentNode, startNode, closingComment) {
|
1291 | while (true) {
|
1292 | var node = startNode.nextSibling;
|
1293 | if (node === closingComment) {
|
1294 |
|
1295 | break;
|
1296 | } else {
|
1297 | parentNode.removeChild(node);
|
1298 | }
|
1299 | }
|
1300 | }
|
1301 |
|
1302 | function replaceDelimitedText(openingComment, closingComment, stringText) {
|
1303 | var parentNode = openingComment.parentNode;
|
1304 | var nodeAfterComment = openingComment.nextSibling;
|
1305 | if (nodeAfterComment === closingComment) {
|
1306 |
|
1307 |
|
1308 | if (stringText) {
|
1309 | insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
|
1310 | }
|
1311 | } else {
|
1312 | if (stringText) {
|
1313 |
|
1314 |
|
1315 | setTextContent(nodeAfterComment, stringText);
|
1316 | removeDelimitedText(parentNode, nodeAfterComment, closingComment);
|
1317 | } else {
|
1318 | removeDelimitedText(parentNode, openingComment, closingComment);
|
1319 | }
|
1320 | }
|
1321 |
|
1322 | if ("development" !== 'production') {
|
1323 | ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, 'replace text', stringText);
|
1324 | }
|
1325 | }
|
1326 |
|
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 | }
|
1341 |
|
1342 |
|
1343 |
|
1344 |
|
1345 | var DOMChildrenOperations = {
|
1346 |
|
1347 | dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
|
1348 |
|
1349 | replaceDelimitedText: replaceDelimitedText,
|
1350 |
|
1351 | |
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 | processUpdates: function (parentNode, updates) {
|
1359 | if ("development" !== 'production') {
|
1360 | var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
|
1361 | }
|
1362 |
|
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 | }
|
1399 |
|
1400 | };
|
1401 |
|
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 |
|
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 | 'use strict';
|
1416 |
|
1417 | var DOMNamespaces = _dereq_(9);
|
1418 | var setInnerHTML = _dereq_(142);
|
1419 |
|
1420 | var createMicrosoftUnsafeLocalFunction = _dereq_(120);
|
1421 | var setTextContent = _dereq_(143);
|
1422 |
|
1423 | var ELEMENT_NODE_TYPE = 1;
|
1424 | var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
|
1425 |
|
1426 |
|
1427 |
|
1428 |
|
1429 |
|
1430 |
|
1431 |
|
1432 |
|
1433 |
|
1434 |
|
1435 |
|
1436 |
|
1437 | var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
|
1438 |
|
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 |
|
1458 |
|
1459 |
|
1460 |
|
1461 |
|
1462 |
|
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 |
|
1525 |
|
1526 |
|
1527 |
|
1528 |
|
1529 |
|
1530 |
|
1531 |
|
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 |
|
1546 |
|
1547 |
|
1548 |
|
1549 |
|
1550 |
|
1551 |
|
1552 |
|
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 | }
|
1564 |
|
1565 | var DOMPropertyInjection = {
|
1566 | |
1567 |
|
1568 |
|
1569 |
|
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,
|
1575 |
|
1576 | |
1577 |
|
1578 |
|
1579 |
|
1580 |
|
1581 |
|
1582 |
|
1583 |
|
1584 |
|
1585 |
|
1586 |
|
1587 |
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 |
|
1593 |
|
1594 |
|
1595 |
|
1596 |
|
1597 |
|
1598 |
|
1599 |
|
1600 |
|
1601 |
|
1602 |
|
1603 |
|
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 |
|
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 |
|
1668 |
|
1669 |
|
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 |
|
1677 |
|
1678 |
|
1679 |
|
1680 |
|
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',
|
1689 |
|
1690 | |
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
|
1697 |
|
1698 |
|
1699 |
|
1700 |
|
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 |
|
1718 | properties: {},
|
1719 |
|
1720 | |
1721 |
|
1722 |
|
1723 |
|
1724 |
|
1725 | getPossibleStandardName: "development" !== 'production' ? {} : null,
|
1726 |
|
1727 | |
1728 |
|
1729 |
|
1730 | _isCustomAttributeFunctions: [],
|
1731 |
|
1732 | |
1733 |
|
1734 |
|
1735 |
|
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 | },
|
1745 |
|
1746 | injection: DOMPropertyInjection
|
1747 | };
|
1748 |
|
1749 | module.exports = DOMProperty;
|
1750 | },{"140":140,"162":162}],11:[function(_dereq_,module,exports){
|
1751 |
|
1752 |
|
1753 |
|
1754 |
|
1755 |
|
1756 |
|
1757 |
|
1758 |
|
1759 |
|
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 |
|
1797 |
|
1798 | var DOMPropertyOperations = {
|
1799 |
|
1800 | |
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 |
|
1806 | createMarkupForID: function (id) {
|
1807 | return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
|
1808 | },
|
1809 |
|
1810 | setAttributeForID: function (node, id) {
|
1811 | node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
|
1812 | },
|
1813 |
|
1814 | createMarkupForRoot: function () {
|
1815 | return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
|
1816 | },
|
1817 |
|
1818 | setAttributeForRoot: function (node) {
|
1819 | node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
|
1820 | },
|
1821 |
|
1822 | |
1823 |
|
1824 |
|
1825 |
|
1826 |
|
1827 |
|
1828 |
|
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);
|
1845 | }
|
1846 | return null;
|
1847 | },
|
1848 |
|
1849 | |
1850 |
|
1851 |
|
1852 |
|
1853 |
|
1854 |
|
1855 |
|
1856 | createMarkupForCustomAttribute: function (name, value) {
|
1857 | if (!isAttributeNameSafe(name) || value == null) {
|
1858 | return '';
|
1859 | }
|
1860 | return name + '=' + quoteAttributeValueForBrowser(value);
|
1861 | },
|
1862 |
|
1863 | |
1864 |
|
1865 |
|
1866 |
|
1867 |
|
1868 |
|
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 |
|
1881 |
|
1882 | node[propertyInfo.propertyName] = value;
|
1883 | } else {
|
1884 | var attributeName = propertyInfo.attributeName;
|
1885 | var namespace = propertyInfo.attributeNamespace;
|
1886 |
|
1887 |
|
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 | }
|
1906 | },
|
1907 |
|
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);
|
1916 | }
|
1917 |
|
1918 | if ("development" !== 'production') {
|
1919 | var payload = {};
|
1920 | payload[name] = value;
|
1921 | ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload);
|
1922 | }
|
1923 | },
|
1924 |
|
1925 | |
1926 |
|
1927 |
|
1928 |
|
1929 |
|
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 | },
|
1937 |
|
1938 | |
1939 |
|
1940 |
|
1941 |
|
1942 |
|
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 | }
|
1963 |
|
1964 | if ("development" !== 'production') {
|
1965 | ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name);
|
1966 | }
|
1967 | }
|
1968 |
|
1969 | };
|
1970 |
|
1971 | module.exports = DOMPropertyOperations;
|
1972 | },{"10":10,"139":139,"171":171,"42":42,"73":73}],12:[function(_dereq_,module,exports){
|
1973 |
|
1974 |
|
1975 |
|
1976 |
|
1977 |
|
1978 |
|
1979 |
|
1980 |
|
1981 |
|
1982 |
|
1983 |
|
1984 | 'use strict';
|
1985 |
|
1986 | var _prodInvariant = _dereq_(140);
|
1987 |
|
1988 | var DOMLazyTree = _dereq_(8);
|
1989 | var ExecutionEnvironment = _dereq_(148);
|
1990 |
|
1991 | var createNodesFromMarkup = _dereq_(153);
|
1992 | var emptyFunction = _dereq_(154);
|
1993 | var invariant = _dereq_(162);
|
1994 |
|
1995 | var Danger = {
|
1996 |
|
1997 | |
1998 |
|
1999 |
|
2000 |
|
2001 |
|
2002 |
|
2003 |
|
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);
|
2013 | } else {
|
2014 | DOMLazyTree.replaceChildWithTree(oldChild, markup);
|
2015 | }
|
2016 | }
|
2017 |
|
2018 | };
|
2019 |
|
2020 | module.exports = Danger;
|
2021 | },{"140":140,"148":148,"153":153,"154":154,"162":162,"8":8}],13:[function(_dereq_,module,exports){
|
2022 |
|
2023 |
|
2024 |
|
2025 |
|
2026 |
|
2027 |
|
2028 |
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 | 'use strict';
|
2034 |
|
2035 | var keyOf = _dereq_(166);
|
2036 |
|
2037 |
|
2038 |
|
2039 |
|
2040 |
|
2041 |
|
2042 |
|
2043 |
|
2044 |
|
2045 |
|
2046 | var DefaultEventPluginOrder = [keyOf({ ResponderEventPlugin: null }), keyOf({ SimpleEventPlugin: null }), keyOf({ TapEventPlugin: null }), keyOf({ EnterLeaveEventPlugin: null }), keyOf({ ChangeEventPlugin: null }), keyOf({ SelectEventPlugin: null }), keyOf({ BeforeInputEventPlugin: null })];
|
2047 |
|
2048 | module.exports = DefaultEventPluginOrder;
|
2049 | },{"166":166}],14:[function(_dereq_,module,exports){
|
2050 |
|
2051 |
|
2052 |
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 |
|
2058 |
|
2059 |
|
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 | };
|
2076 |
|
2077 |
|
2078 |
|
2079 |
|
2080 |
|
2081 | var DisabledInputUtils = {
|
2082 | getHostProps: function (inst, props) {
|
2083 | if (!props.disabled) {
|
2084 | return props;
|
2085 | }
|
2086 |
|
2087 |
|
2088 | var hostProps = {};
|
2089 | for (var key in props) {
|
2090 | if (!disableableMouseListenerNames[key] && props.hasOwnProperty(key)) {
|
2091 | hostProps[key] = props[key];
|
2092 | }
|
2093 | }
|
2094 |
|
2095 | return hostProps;
|
2096 | }
|
2097 | };
|
2098 |
|
2099 | module.exports = DisabledInputUtils;
|
2100 | },{}],15:[function(_dereq_,module,exports){
|
2101 |
|
2102 |
|
2103 |
|
2104 |
|
2105 |
|
2106 |
|
2107 |
|
2108 |
|
2109 |
|
2110 |
|
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]
|
2131 | }
|
2132 | };
|
2133 |
|
2134 | var EnterLeaveEventPlugin = {
|
2135 |
|
2136 | eventTypes: eventTypes,
|
2137 |
|
2138 | |
2139 |
|
2140 |
|
2141 |
|
2142 |
|
2143 |
|
2144 |
|
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 |
|
2151 | return null;
|
2152 | }
|
2153 |
|
2154 | var win;
|
2155 | if (nativeEventTarget.window === nativeEventTarget) {
|
2156 |
|
2157 | win = nativeEventTarget;
|
2158 | } else {
|
2159 |
|
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 |
|
2176 | from = null;
|
2177 | to = targetInst;
|
2178 | }
|
2179 |
|
2180 | if (from === to) {
|
2181 |
|
2182 | return null;
|
2183 | }
|
2184 |
|
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 |
|
2209 |
|
2210 |
|
2211 |
|
2212 |
|
2213 |
|
2214 |
|
2215 |
|
2216 |
|
2217 |
|
2218 | 'use strict';
|
2219 |
|
2220 | var keyMirror = _dereq_(165);
|
2221 |
|
2222 | var PropagationPhases = keyMirror({ bubbled: null, captured: null });
|
2223 |
|
2224 |
|
2225 |
|
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 |
|
2307 |
|
2308 |
|
2309 |
|
2310 |
|
2311 |
|
2312 |
|
2313 |
|
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 |
|
2330 |
|
2331 | var listenerBank = {};
|
2332 |
|
2333 |
|
2334 |
|
2335 |
|
2336 |
|
2337 | var eventQueue = null;
|
2338 |
|
2339 |
|
2340 |
|
2341 |
|
2342 |
|
2343 |
|
2344 |
|
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 | }
|
2353 | }
|
2354 | };
|
2355 | var executeDispatchesAndReleaseSimulated = function (e) {
|
2356 | return executeDispatchesAndRelease(e, true);
|
2357 | };
|
2358 | var executeDispatchesAndReleaseTopLevel = function (e) {
|
2359 | return executeDispatchesAndRelease(e, false);
|
2360 | };
|
2361 |
|
2362 | var getDictionaryKey = function (inst) {
|
2363 |
|
2364 |
|
2365 | return '.' + inst._rootNodeID;
|
2366 | };
|
2367 |
|
2368 |
|
2369 |
|
2370 |
|
2371 |
|
2372 |
|
2373 |
|
2374 |
|
2375 |
|
2376 |
|
2377 |
|
2378 |
|
2379 |
|
2380 |
|
2381 |
|
2382 |
|
2383 |
|
2384 |
|
2385 |
|
2386 |
|
2387 |
|
2388 |
|
2389 |
|
2390 | var EventPluginHub = {
|
2391 |
|
2392 | |
2393 |
|
2394 |
|
2395 | injection: {
|
2396 |
|
2397 | |
2398 |
|
2399 |
|
2400 |
|
2401 | injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
|
2402 |
|
2403 | |
2404 |
|
2405 |
|
2406 | injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
|
2407 |
|
2408 | },
|
2409 |
|
2410 | |
2411 |
|
2412 |
|
2413 |
|
2414 |
|
2415 |
|
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;
|
2419 |
|
2420 | var key = getDictionaryKey(inst);
|
2421 | var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
|
2422 | bankForRegistrationName[key] = listener;
|
2423 |
|
2424 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
2425 | if (PluginModule && PluginModule.didPutListener) {
|
2426 | PluginModule.didPutListener(inst, registrationName, listener);
|
2427 | }
|
2428 | },
|
2429 |
|
2430 | |
2431 |
|
2432 |
|
2433 |
|
2434 |
|
2435 | getListener: function (inst, registrationName) {
|
2436 | var bankForRegistrationName = listenerBank[registrationName];
|
2437 | var key = getDictionaryKey(inst);
|
2438 | return bankForRegistrationName && bankForRegistrationName[key];
|
2439 | },
|
2440 |
|
2441 | |
2442 |
|
2443 |
|
2444 |
|
2445 |
|
2446 |
|
2447 | deleteListener: function (inst, registrationName) {
|
2448 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
2449 | if (PluginModule && PluginModule.willDeleteListener) {
|
2450 | PluginModule.willDeleteListener(inst, registrationName);
|
2451 | }
|
2452 |
|
2453 | var bankForRegistrationName = listenerBank[registrationName];
|
2454 |
|
2455 | if (bankForRegistrationName) {
|
2456 | var key = getDictionaryKey(inst);
|
2457 | delete bankForRegistrationName[key];
|
2458 | }
|
2459 | },
|
2460 |
|
2461 | |
2462 |
|
2463 |
|
2464 |
|
2465 |
|
2466 | deleteAllListeners: function (inst) {
|
2467 | var key = getDictionaryKey(inst);
|
2468 | for (var registrationName in listenerBank) {
|
2469 | if (!listenerBank.hasOwnProperty(registrationName)) {
|
2470 | continue;
|
2471 | }
|
2472 |
|
2473 | if (!listenerBank[registrationName][key]) {
|
2474 | continue;
|
2475 | }
|
2476 |
|
2477 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
2478 | if (PluginModule && PluginModule.willDeleteListener) {
|
2479 | PluginModule.willDeleteListener(inst, registrationName);
|
2480 | }
|
2481 |
|
2482 | delete listenerBank[registrationName][key];
|
2483 | }
|
2484 | },
|
2485 |
|
2486 | |
2487 |
|
2488 |
|
2489 |
|
2490 |
|
2491 |
|
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 |
|
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 | }
|
2504 | }
|
2505 | }
|
2506 | return events;
|
2507 | },
|
2508 |
|
2509 | |
2510 |
|
2511 |
|
2512 |
|
2513 |
|
2514 |
|
2515 |
|
2516 | enqueueEvents: function (events) {
|
2517 | if (events) {
|
2518 | eventQueue = accumulateInto(eventQueue, events);
|
2519 | }
|
2520 | },
|
2521 |
|
2522 | |
2523 |
|
2524 |
|
2525 |
|
2526 |
|
2527 | processEventQueue: function (simulated) {
|
2528 |
|
2529 |
|
2530 | var processingEventQueue = eventQueue;
|
2531 | eventQueue = null;
|
2532 | if (simulated) {
|
2533 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
|
2534 | } else {
|
2535 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
|
2536 | }
|
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 |
|
2539 | ReactErrorUtils.rethrowCaughtError();
|
2540 | },
|
2541 |
|
2542 | |
2543 |
|
2544 |
|
2545 | __purge: function () {
|
2546 | listenerBank = {};
|
2547 | },
|
2548 |
|
2549 | __getListenerBank: function () {
|
2550 | return listenerBank;
|
2551 | }
|
2552 |
|
2553 | };
|
2554 |
|
2555 | module.exports = EventPluginHub;
|
2556 | },{"116":116,"125":125,"140":140,"162":162,"18":18,"19":19,"64":64}],18:[function(_dereq_,module,exports){
|
2557 |
|
2558 |
|
2559 |
|
2560 |
|
2561 |
|
2562 |
|
2563 |
|
2564 |
|
2565 |
|
2566 |
|
2567 |
|
2568 | 'use strict';
|
2569 |
|
2570 | var _prodInvariant = _dereq_(140);
|
2571 |
|
2572 | var invariant = _dereq_(162);
|
2573 |
|
2574 |
|
2575 |
|
2576 |
|
2577 | var EventPluginOrder = null;
|
2578 |
|
2579 |
|
2580 |
|
2581 |
|
2582 | var namesToPlugins = {};
|
2583 |
|
2584 |
|
2585 |
|
2586 |
|
2587 |
|
2588 |
|
2589 | function recomputePluginOrdering() {
|
2590 | if (!EventPluginOrder) {
|
2591 |
|
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 |
|
2612 |
|
2613 |
|
2614 |
|
2615 |
|
2616 |
|
2617 |
|
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;
|
2634 | }
|
2635 | return false;
|
2636 | }
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 |
|
2642 |
|
2643 |
|
2644 |
|
2645 |
|
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 | }
|
2658 | }
|
2659 | }
|
2660 |
|
2661 |
|
2662 |
|
2663 |
|
2664 |
|
2665 |
|
2666 | var EventPluginRegistry = {
|
2667 |
|
2668 | |
2669 |
|
2670 |
|
2671 | plugins: [],
|
2672 |
|
2673 | |
2674 |
|
2675 |
|
2676 | eventNameDispatchConfigs: {},
|
2677 |
|
2678 | |
2679 |
|
2680 |
|
2681 | registrationNameModules: {},
|
2682 |
|
2683 | |
2684 |
|
2685 |
|
2686 | registrationNameDependencies: {},
|
2687 |
|
2688 | |
2689 |
|
2690 |
|
2691 |
|
2692 |
|
2693 |
|
2694 | possibleRegistrationNames: "development" !== 'production' ? {} : null,
|
2695 |
|
2696 | |
2697 |
|
2698 |
|
2699 |
|
2700 |
|
2701 |
|
2702 |
|
2703 |
|
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 |
|
2708 | EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
|
2709 | recomputePluginOrdering();
|
2710 | },
|
2711 |
|
2712 | |
2713 |
|
2714 |
|
2715 |
|
2716 |
|
2717 |
|
2718 |
|
2719 |
|
2720 |
|
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 |
|
2742 |
|
2743 |
|
2744 |
|
2745 |
|
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 |
|
2766 |
|
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];
|
2796 | }
|
2797 | }
|
2798 | }
|
2799 | }
|
2800 |
|
2801 | };
|
2802 |
|
2803 | module.exports = EventPluginRegistry;
|
2804 | },{"140":140,"162":162}],19:[function(_dereq_,module,exports){
|
2805 |
|
2806 |
|
2807 |
|
2808 |
|
2809 |
|
2810 |
|
2811 |
|
2812 |
|
2813 |
|
2814 |
|
2815 |
|
2816 | 'use strict';
|
2817 |
|
2818 | var _prodInvariant = _dereq_(140);
|
2819 |
|
2820 | var EventConstants = _dereq_(16);
|
2821 | var ReactErrorUtils = _dereq_(64);
|
2822 |
|
2823 | var invariant = _dereq_(162);
|
2824 | var warning = _dereq_(171);
|
2825 |
|
2826 |
|
2827 |
|
2828 |
|
2829 |
|
2830 |
|
2831 |
|
2832 |
|
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 | }
|
2848 | }
|
2849 | };
|
2850 |
|
2851 | var topLevelTypes = EventConstants.topLevelTypes;
|
2852 |
|
2853 | function isEndish(topLevelType) {
|
2854 | return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel;
|
2855 | }
|
2856 |
|
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 | }
|
2863 |
|
2864 | var validateEventDispatches;
|
2865 | if ("development" !== 'production') {
|
2866 | validateEventDispatches = function (event) {
|
2867 | var dispatchListeners = event._dispatchListeners;
|
2868 | var dispatchInstances = event._dispatchInstances;
|
2869 |
|
2870 | var listenersIsArr = Array.isArray(dispatchListeners);
|
2871 | var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
|
2872 |
|
2873 | var instancesIsArr = Array.isArray(dispatchInstances);
|
2874 | var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
|
2875 |
|
2876 | "development" !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
|
2877 | };
|
2878 | }
|
2879 |
|
2880 |
|
2881 |
|
2882 |
|
2883 |
|
2884 |
|
2885 |
|
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);
|
2894 | }
|
2895 | event.currentTarget = null;
|
2896 | }
|
2897 |
|
2898 |
|
2899 |
|
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 |
|
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;
|
2920 | }
|
2921 |
|
2922 |
|
2923 |
|
2924 |
|
2925 |
|
2926 |
|
2927 |
|
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 |
|
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 | }
|
2949 | }
|
2950 | return null;
|
2951 | }
|
2952 |
|
2953 |
|
2954 |
|
2955 |
|
2956 | function executeDispatchesInOrderStopAtTrue(event) {
|
2957 | var ret = executeDispatchesInOrderStopAtTrueImpl(event);
|
2958 | event._dispatchInstances = null;
|
2959 | event._dispatchListeners = null;
|
2960 | return ret;
|
2961 | }
|
2962 |
|
2963 |
|
2964 |
|
2965 |
|
2966 |
|
2967 |
|
2968 |
|
2969 |
|
2970 |
|
2971 |
|
2972 | function executeDirectDispatch(event) {
|
2973 | if ("development" !== 'production') {
|
2974 | validateEventDispatches(event);
|
2975 | }
|
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;
|
2985 | }
|
2986 |
|
2987 |
|
2988 |
|
2989 |
|
2990 |
|
2991 | function hasDispatches(event) {
|
2992 | return !!event._dispatchListeners;
|
2993 | }
|
2994 |
|
2995 |
|
2996 |
|
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);
|
3013 | },
|
3014 | isAncestor: function (a, b) {
|
3015 | return TreeTraversal.isAncestor(a, b);
|
3016 | },
|
3017 | getLowestCommonAncestor: function (a, b) {
|
3018 | return TreeTraversal.getLowestCommonAncestor(a, b);
|
3019 | },
|
3020 | getParentInstance: function (inst) {
|
3021 | return TreeTraversal.getParentInstance(inst);
|
3022 | },
|
3023 | traverseTwoPhase: function (target, fn, arg) {
|
3024 | return TreeTraversal.traverseTwoPhase(target, fn, arg);
|
3025 | },
|
3026 | traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
|
3027 | return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
|
3028 | },
|
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 |
|
3037 |
|
3038 |
|
3039 |
|
3040 |
|
3041 |
|
3042 |
|
3043 |
|
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 |
|
3061 |
|
3062 |
|
3063 | function listenerAtPhase(inst, event, propagationPhase) {
|
3064 | var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
|
3065 | return getListener(inst, registrationName);
|
3066 | }
|
3067 |
|
3068 |
|
3069 |
|
3070 |
|
3071 |
|
3072 |
|
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 |
|
3088 |
|
3089 |
|
3090 |
|
3091 |
|
3092 |
|
3093 | function accumulateTwoPhaseDispatchesSingle(event) {
|
3094 | if (event && event.dispatchConfig.phasedRegistrationNames) {
|
3095 | EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
|
3096 | }
|
3097 | }
|
3098 |
|
3099 |
|
3100 |
|
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 |
|
3112 |
|
3113 |
|
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);
|
3122 | }
|
3123 | }
|
3124 | }
|
3125 |
|
3126 |
|
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 | function accumulateDirectDispatchesSingle(event) {
|
3132 | if (event && event.dispatchConfig.registrationName) {
|
3133 | accumulateDispatches(event._targetInst, null, event);
|
3134 | }
|
3135 | }
|
3136 |
|
3137 | function accumulateTwoPhaseDispatches(events) {
|
3138 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
|
3139 | }
|
3140 |
|
3141 | function accumulateTwoPhaseDispatchesSkipTarget(events) {
|
3142 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
|
3143 | }
|
3144 |
|
3145 | function accumulateEnterLeaveDispatches(leave, enter, from, to) {
|
3146 | EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
|
3147 | }
|
3148 |
|
3149 | function accumulateDirectDispatches(events) {
|
3150 | forEachAccumulated(events, accumulateDirectDispatchesSingle);
|
3151 | }
|
3152 |
|
3153 |
|
3154 |
|
3155 |
|
3156 |
|
3157 |
|
3158 |
|
3159 |
|
3160 |
|
3161 |
|
3162 |
|
3163 |
|
3164 | var EventPropagators = {
|
3165 | accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
|
3166 | accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
|
3167 | accumulateDirectDispatches: accumulateDirectDispatches,
|
3168 | accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
|
3169 | };
|
3170 |
|
3171 | module.exports = EventPropagators;
|
3172 | },{"116":116,"125":125,"16":16,"17":17,"171":171,"19":19}],21:[function(_dereq_,module,exports){
|
3173 |
|
3174 |
|
3175 |
|
3176 |
|
3177 |
|
3178 |
|
3179 |
|
3180 |
|
3181 |
|
3182 |
|
3183 |
|
3184 | 'use strict';
|
3185 |
|
3186 | var _assign = _dereq_(172);
|
3187 |
|
3188 | var PooledClass = _dereq_(25);
|
3189 |
|
3190 | var getTextContentAccessor = _dereq_(133);
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 |
|
3196 |
|
3197 |
|
3198 |
|
3199 |
|
3200 |
|
3201 |
|
3202 |
|
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 |
|
3218 |
|
3219 |
|
3220 |
|
3221 | getText: function () {
|
3222 | if ('value' in this._root) {
|
3223 | return this._root.value;
|
3224 | }
|
3225 | return this._root[getTextContentAccessor()];
|
3226 | },
|
3227 |
|
3228 | |
3229 |
|
3230 |
|
3231 |
|
3232 |
|
3233 |
|
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 | });
|
3264 |
|
3265 | PooledClass.addPoolingTo(FallbackCompositionState);
|
3266 |
|
3267 | module.exports = FallbackCompositionState;
|
3268 | },{"133":133,"172":172,"25":25}],22:[function(_dereq_,module,exports){
|
3269 |
|
3270 |
|
3271 |
|
3272 |
|
3273 |
|
3274 |
|
3275 |
|
3276 |
|
3277 |
|
3278 |
|
3279 |
|
3280 | 'use strict';
|
3281 |
|
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 |
|
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 |
|
3304 | as: 0,
|
3305 | async: HAS_BOOLEAN_VALUE,
|
3306 | autoComplete: 0,
|
3307 |
|
3308 |
|
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,
|
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 |
|
3375 |
|
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 |
|
3421 | type: 0,
|
3422 | useMap: 0,
|
3423 | value: 0,
|
3424 | width: 0,
|
3425 | wmode: 0,
|
3426 | wrap: 0,
|
3427 |
|
3428 | |
3429 |
|
3430 |
|
3431 | about: 0,
|
3432 | datatype: 0,
|
3433 | inlist: 0,
|
3434 | prefix: 0,
|
3435 |
|
3436 | property: 0,
|
3437 | resource: 0,
|
3438 | 'typeof': 0,
|
3439 | vocab: 0,
|
3440 |
|
3441 | |
3442 |
|
3443 |
|
3444 |
|
3445 |
|
3446 | autoCapitalize: 0,
|
3447 | autoCorrect: 0,
|
3448 |
|
3449 | autoSave: 0,
|
3450 |
|
3451 | color: 0,
|
3452 |
|
3453 |
|
3454 | itemProp: 0,
|
3455 | itemScope: HAS_BOOLEAN_VALUE,
|
3456 | itemType: 0,
|
3457 |
|
3458 |
|
3459 |
|
3460 | itemID: 0,
|
3461 | itemRef: 0,
|
3462 |
|
3463 |
|
3464 | results: 0,
|
3465 |
|
3466 |
|
3467 | security: 0,
|
3468 |
|
3469 | unselectable: 0
|
3470 | },
|
3471 | DOMAttributeNames: {
|
3472 | acceptCharset: 'accept-charset',
|
3473 | className: 'class',
|
3474 | htmlFor: 'for',
|
3475 | httpEquiv: 'http-equiv'
|
3476 | },
|
3477 | DOMPropertyNames: {}
|
3478 | };
|
3479 |
|
3480 | module.exports = HTMLDOMPropertyConfig;
|
3481 | },{"10":10}],23:[function(_dereq_,module,exports){
|
3482 |
|
3483 |
|
3484 |
|
3485 |
|
3486 |
|
3487 |
|
3488 |
|
3489 |
|
3490 |
|
3491 |
|
3492 |
|
3493 |
|
3494 | 'use strict';
|
3495 |
|
3496 |
|
3497 |
|
3498 |
|
3499 |
|
3500 |
|
3501 |
|
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;
|
3514 | }
|
3515 |
|
3516 |
|
3517 |
|
3518 |
|
3519 |
|
3520 |
|
3521 |
|
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 | }
|
3534 |
|
3535 | var KeyEscapeUtils = {
|
3536 | escape: escape,
|
3537 | unescape: unescape
|
3538 | };
|
3539 |
|
3540 | module.exports = KeyEscapeUtils;
|
3541 | },{}],24:[function(_dereq_,module,exports){
|
3542 |
|
3543 |
|
3544 |
|
3545 |
|
3546 |
|
3547 |
|
3548 |
|
3549 |
|
3550 |
|
3551 |
|
3552 |
|
3553 | 'use strict';
|
3554 |
|
3555 | var _prodInvariant = _dereq_(140);
|
3556 |
|
3557 | var ReactPropTypes = _dereq_(84);
|
3558 | var ReactPropTypeLocations = _dereq_(83);
|
3559 | var ReactPropTypesSecret = _dereq_(85);
|
3560 |
|
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 | };
|
3573 |
|
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 | }
|
3581 |
|
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 | }
|
3586 |
|
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
|
3601 | };
|
3602 |
|
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 + '`.';
|
3609 | }
|
3610 | }
|
3611 | return '';
|
3612 | }
|
3613 |
|
3614 |
|
3615 |
|
3616 |
|
3617 |
|
3618 | var LinkedValueUtils = {
|
3619 | checkPropTypes: function (tagName, props, owner) {
|
3620 | for (var propName in propTypes) {
|
3621 | if (propTypes.hasOwnProperty(propName)) {
|
3622 | var error = propTypes[propName](props, propName, tagName, ReactPropTypeLocations.prop, null, ReactPropTypesSecret);
|
3623 | }
|
3624 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
3625 |
|
3626 |
|
3627 | loggedTypeFailures[error.message] = true;
|
3628 |
|
3629 | var addendum = getDeclarationErrorAddendum(owner);
|
3630 | "development" !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
|
3631 | }
|
3632 | }
|
3633 | },
|
3634 |
|
3635 | |
3636 |
|
3637 |
|
3638 |
|
3639 | getValue: function (inputProps) {
|
3640 | if (inputProps.valueLink) {
|
3641 | _assertValueLink(inputProps);
|
3642 | return inputProps.valueLink.value;
|
3643 | }
|
3644 | return inputProps.value;
|
3645 | },
|
3646 |
|
3647 | |
3648 |
|
3649 |
|
3650 |
|
3651 |
|
3652 | getChecked: function (inputProps) {
|
3653 | if (inputProps.checkedLink) {
|
3654 | _assertCheckedLink(inputProps);
|
3655 | return inputProps.checkedLink.value;
|
3656 | }
|
3657 | return inputProps.checked;
|
3658 | },
|
3659 |
|
3660 | |
3661 |
|
3662 |
|
3663 |
|
3664 | executeOnChange: function (inputProps, event) {
|
3665 | if (inputProps.valueLink) {
|
3666 | _assertValueLink(inputProps);
|
3667 | return inputProps.valueLink.requestChange(event.target.value);
|
3668 | } else if (inputProps.checkedLink) {
|
3669 | _assertCheckedLink(inputProps);
|
3670 | return inputProps.checkedLink.requestChange(event.target.checked);
|
3671 | } else if (inputProps.onChange) {
|
3672 | return inputProps.onChange.call(undefined, event);
|
3673 | }
|
3674 | }
|
3675 | };
|
3676 |
|
3677 | module.exports = LinkedValueUtils;
|
3678 | },{"140":140,"162":162,"171":171,"83":83,"84":84,"85":85}],25:[function(_dereq_,module,exports){
|
3679 |
|
3680 |
|
3681 |
|
3682 |
|
3683 |
|
3684 |
|
3685 |
|
3686 |
|
3687 |
|
3688 |
|
3689 |
|
3690 | 'use strict';
|
3691 |
|
3692 | var _prodInvariant = _dereq_(140);
|
3693 |
|
3694 | var invariant = _dereq_(162);
|
3695 |
|
3696 |
|
3697 |
|
3698 |
|
3699 |
|
3700 |
|
3701 |
|
3702 |
|
3703 | var oneArgumentPooler = function (copyFieldsFrom) {
|
3704 | var Klass = this;
|
3705 | if (Klass.instancePool.length) {
|
3706 | var instance = Klass.instancePool.pop();
|
3707 | Klass.call(instance, copyFieldsFrom);
|
3708 | return instance;
|
3709 | } else {
|
3710 | return new Klass(copyFieldsFrom);
|
3711 | }
|
3712 | };
|
3713 |
|
3714 | var twoArgumentPooler = function (a1, a2) {
|
3715 | var Klass = this;
|
3716 | if (Klass.instancePool.length) {
|
3717 | var instance = Klass.instancePool.pop();
|
3718 | Klass.call(instance, a1, a2);
|
3719 | return instance;
|
3720 | } else {
|
3721 | return new Klass(a1, a2);
|
3722 | }
|
3723 | };
|
3724 |
|
3725 | var threeArgumentPooler = function (a1, a2, a3) {
|
3726 | var Klass = this;
|
3727 | if (Klass.instancePool.length) {
|
3728 | var instance = Klass.instancePool.pop();
|
3729 | Klass.call(instance, a1, a2, a3);
|
3730 | return instance;
|
3731 | } else {
|
3732 | return new Klass(a1, a2, a3);
|
3733 | }
|
3734 | };
|
3735 |
|
3736 | var fourArgumentPooler = function (a1, a2, a3, a4) {
|
3737 | var Klass = this;
|
3738 | if (Klass.instancePool.length) {
|
3739 | var instance = Klass.instancePool.pop();
|
3740 | Klass.call(instance, a1, a2, a3, a4);
|
3741 | return instance;
|
3742 | } else {
|
3743 | return new Klass(a1, a2, a3, a4);
|
3744 | }
|
3745 | };
|
3746 |
|
3747 | var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
|
3748 | var Klass = this;
|
3749 | if (Klass.instancePool.length) {
|
3750 | var instance = Klass.instancePool.pop();
|
3751 | Klass.call(instance, a1, a2, a3, a4, a5);
|
3752 | return instance;
|
3753 | } else {
|
3754 | return new Klass(a1, a2, a3, a4, a5);
|
3755 | }
|
3756 | };
|
3757 |
|
3758 | var standardReleaser = function (instance) {
|
3759 | var Klass = this;
|
3760 | !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
|
3761 | instance.destructor();
|
3762 | if (Klass.instancePool.length < Klass.poolSize) {
|
3763 | Klass.instancePool.push(instance);
|
3764 | }
|
3765 | };
|
3766 |
|
3767 | var DEFAULT_POOL_SIZE = 10;
|
3768 | var DEFAULT_POOLER = oneArgumentPooler;
|
3769 |
|
3770 |
|
3771 |
|
3772 |
|
3773 |
|
3774 |
|
3775 |
|
3776 |
|
3777 |
|
3778 |
|
3779 | var addPoolingTo = function (CopyConstructor, pooler) {
|
3780 | var NewKlass = CopyConstructor;
|
3781 | NewKlass.instancePool = [];
|
3782 | NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
3783 | if (!NewKlass.poolSize) {
|
3784 | NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
3785 | }
|
3786 | NewKlass.release = standardReleaser;
|
3787 | return NewKlass;
|
3788 | };
|
3789 |
|
3790 | var PooledClass = {
|
3791 | addPoolingTo: addPoolingTo,
|
3792 | oneArgumentPooler: oneArgumentPooler,
|
3793 | twoArgumentPooler: twoArgumentPooler,
|
3794 | threeArgumentPooler: threeArgumentPooler,
|
3795 | fourArgumentPooler: fourArgumentPooler,
|
3796 | fiveArgumentPooler: fiveArgumentPooler
|
3797 | };
|
3798 |
|
3799 | module.exports = PooledClass;
|
3800 | },{"140":140,"162":162}],26:[function(_dereq_,module,exports){
|
3801 |
|
3802 |
|
3803 |
|
3804 |
|
3805 |
|
3806 |
|
3807 |
|
3808 |
|
3809 |
|
3810 |
|
3811 |
|
3812 | 'use strict';
|
3813 |
|
3814 | var _assign = _dereq_(172);
|
3815 |
|
3816 | var ReactChildren = _dereq_(29);
|
3817 | var ReactComponent = _dereq_(32);
|
3818 | var ReactPureComponent = _dereq_(86);
|
3819 | var ReactClass = _dereq_(31);
|
3820 | var ReactDOMFactories = _dereq_(45);
|
3821 | var ReactElement = _dereq_(61);
|
3822 | var ReactPropTypes = _dereq_(84);
|
3823 | var ReactVersion = _dereq_(97);
|
3824 |
|
3825 | var onlyChild = _dereq_(138);
|
3826 | var warning = _dereq_(171);
|
3827 |
|
3828 | var createElement = ReactElement.createElement;
|
3829 | var createFactory = ReactElement.createFactory;
|
3830 | var cloneElement = ReactElement.cloneElement;
|
3831 |
|
3832 | if ("development" !== 'production') {
|
3833 | var ReactElementValidator = _dereq_(62);
|
3834 | createElement = ReactElementValidator.createElement;
|
3835 | createFactory = ReactElementValidator.createFactory;
|
3836 | cloneElement = ReactElementValidator.cloneElement;
|
3837 | }
|
3838 |
|
3839 | var __spread = _assign;
|
3840 |
|
3841 | if ("development" !== 'production') {
|
3842 | var warned = false;
|
3843 | __spread = function () {
|
3844 | "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;
|
3845 | warned = true;
|
3846 | return _assign.apply(null, arguments);
|
3847 | };
|
3848 | }
|
3849 |
|
3850 | var React = {
|
3851 |
|
3852 |
|
3853 |
|
3854 | Children: {
|
3855 | map: ReactChildren.map,
|
3856 | forEach: ReactChildren.forEach,
|
3857 | count: ReactChildren.count,
|
3858 | toArray: ReactChildren.toArray,
|
3859 | only: onlyChild
|
3860 | },
|
3861 |
|
3862 | Component: ReactComponent,
|
3863 | PureComponent: ReactPureComponent,
|
3864 |
|
3865 | createElement: createElement,
|
3866 | cloneElement: cloneElement,
|
3867 | isValidElement: ReactElement.isValidElement,
|
3868 |
|
3869 |
|
3870 |
|
3871 | PropTypes: ReactPropTypes,
|
3872 | createClass: ReactClass.createClass,
|
3873 | createFactory: createFactory,
|
3874 | createMixin: function (mixin) {
|
3875 |
|
3876 | return mixin;
|
3877 | },
|
3878 |
|
3879 |
|
3880 |
|
3881 | DOM: ReactDOMFactories,
|
3882 |
|
3883 | version: ReactVersion,
|
3884 |
|
3885 |
|
3886 | __spread: __spread
|
3887 | };
|
3888 |
|
3889 | module.exports = React;
|
3890 | },{"138":138,"171":171,"172":172,"29":29,"31":31,"32":32,"45":45,"61":61,"62":62,"84":84,"86":86,"97":97}],27:[function(_dereq_,module,exports){
|
3891 |
|
3892 |
|
3893 |
|
3894 |
|
3895 |
|
3896 |
|
3897 |
|
3898 |
|
3899 |
|
3900 |
|
3901 |
|
3902 | 'use strict';
|
3903 |
|
3904 | var _assign = _dereq_(172);
|
3905 |
|
3906 | var EventConstants = _dereq_(16);
|
3907 | var EventPluginRegistry = _dereq_(18);
|
3908 | var ReactEventEmitterMixin = _dereq_(65);
|
3909 | var ViewportMetrics = _dereq_(115);
|
3910 |
|
3911 | var getVendorPrefixedEventName = _dereq_(134);
|
3912 | var isEventSupported = _dereq_(136);
|
3913 |
|
3914 |
|
3915 |
|
3916 |
|
3917 |
|
3918 |
|
3919 |
|
3920 |
|
3921 |
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 |
|
3927 |
|
3928 |
|
3929 |
|
3930 |
|
3931 |
|
3932 |
|
3933 |
|
3934 |
|
3935 |
|
3936 |
|
3937 |
|
3938 |
|
3939 |
|
3940 |
|
3941 |
|
3942 |
|
3943 |
|
3944 |
|
3945 |
|
3946 |
|
3947 |
|
3948 |
|
3949 |
|
3950 |
|
3951 |
|
3952 |
|
3953 |
|
3954 |
|
3955 |
|
3956 |
|
3957 |
|
3958 |
|
3959 |
|
3960 |
|
3961 |
|
3962 |
|
3963 |
|
3964 |
|
3965 |
|
3966 |
|
3967 |
|
3968 |
|
3969 | var hasEventPageXY;
|
3970 | var alreadyListeningTo = {};
|
3971 | var isMonitoringScrollValue = false;
|
3972 | var reactTopListenersCounter = 0;
|
3973 |
|
3974 |
|
3975 |
|
3976 |
|
3977 | var topEventMapping = {
|
3978 | topAbort: 'abort',
|
3979 | topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
|
3980 | topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
|
3981 | topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
|
3982 | topBlur: 'blur',
|
3983 | topCanPlay: 'canplay',
|
3984 | topCanPlayThrough: 'canplaythrough',
|
3985 | topChange: 'change',
|
3986 | topClick: 'click',
|
3987 | topCompositionEnd: 'compositionend',
|
3988 | topCompositionStart: 'compositionstart',
|
3989 | topCompositionUpdate: 'compositionupdate',
|
3990 | topContextMenu: 'contextmenu',
|
3991 | topCopy: 'copy',
|
3992 | topCut: 'cut',
|
3993 | topDoubleClick: 'dblclick',
|
3994 | topDrag: 'drag',
|
3995 | topDragEnd: 'dragend',
|
3996 | topDragEnter: 'dragenter',
|
3997 | topDragExit: 'dragexit',
|
3998 | topDragLeave: 'dragleave',
|
3999 | topDragOver: 'dragover',
|
4000 | topDragStart: 'dragstart',
|
4001 | topDrop: 'drop',
|
4002 | topDurationChange: 'durationchange',
|
4003 | topEmptied: 'emptied',
|
4004 | topEncrypted: 'encrypted',
|
4005 | topEnded: 'ended',
|
4006 | topError: 'error',
|
4007 | topFocus: 'focus',
|
4008 | topInput: 'input',
|
4009 | topKeyDown: 'keydown',
|
4010 | topKeyPress: 'keypress',
|
4011 | topKeyUp: 'keyup',
|
4012 | topLoadedData: 'loadeddata',
|
4013 | topLoadedMetadata: 'loadedmetadata',
|
4014 | topLoadStart: 'loadstart',
|
4015 | topMouseDown: 'mousedown',
|
4016 | topMouseMove: 'mousemove',
|
4017 | topMouseOut: 'mouseout',
|
4018 | topMouseOver: 'mouseover',
|
4019 | topMouseUp: 'mouseup',
|
4020 | topPaste: 'paste',
|
4021 | topPause: 'pause',
|
4022 | topPlay: 'play',
|
4023 | topPlaying: 'playing',
|
4024 | topProgress: 'progress',
|
4025 | topRateChange: 'ratechange',
|
4026 | topScroll: 'scroll',
|
4027 | topSeeked: 'seeked',
|
4028 | topSeeking: 'seeking',
|
4029 | topSelectionChange: 'selectionchange',
|
4030 | topStalled: 'stalled',
|
4031 | topSuspend: 'suspend',
|
4032 | topTextInput: 'textInput',
|
4033 | topTimeUpdate: 'timeupdate',
|
4034 | topTouchCancel: 'touchcancel',
|
4035 | topTouchEnd: 'touchend',
|
4036 | topTouchMove: 'touchmove',
|
4037 | topTouchStart: 'touchstart',
|
4038 | topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
|
4039 | topVolumeChange: 'volumechange',
|
4040 | topWaiting: 'waiting',
|
4041 | topWheel: 'wheel'
|
4042 | };
|
4043 |
|
4044 |
|
4045 |
|
4046 |
|
4047 | var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
|
4048 |
|
4049 | function getListeningForDocument(mountAt) {
|
4050 |
|
4051 |
|
4052 | if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
|
4053 | mountAt[topListenersIDKey] = reactTopListenersCounter++;
|
4054 | alreadyListeningTo[mountAt[topListenersIDKey]] = {};
|
4055 | }
|
4056 | return alreadyListeningTo[mountAt[topListenersIDKey]];
|
4057 | }
|
4058 |
|
4059 |
|
4060 |
|
4061 |
|
4062 |
|
4063 |
|
4064 |
|
4065 |
|
4066 |
|
4067 |
|
4068 |
|
4069 | var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
|
4070 |
|
4071 | |
4072 |
|
4073 |
|
4074 | ReactEventListener: null,
|
4075 |
|
4076 | injection: {
|
4077 | |
4078 |
|
4079 |
|
4080 | injectReactEventListener: function (ReactEventListener) {
|
4081 | ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
|
4082 | ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
|
4083 | }
|
4084 | },
|
4085 |
|
4086 | |
4087 |
|
4088 |
|
4089 |
|
4090 |
|
4091 | setEnabled: function (enabled) {
|
4092 | if (ReactBrowserEventEmitter.ReactEventListener) {
|
4093 | ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
|
4094 | }
|
4095 | },
|
4096 |
|
4097 | |
4098 |
|
4099 |
|
4100 | isEnabled: function () {
|
4101 | return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
|
4102 | },
|
4103 |
|
4104 | |
4105 |
|
4106 |
|
4107 |
|
4108 |
|
4109 |
|
4110 |
|
4111 |
|
4112 |
|
4113 |
|
4114 |
|
4115 |
|
4116 |
|
4117 |
|
4118 |
|
4119 |
|
4120 |
|
4121 |
|
4122 |
|
4123 |
|
4124 |
|
4125 | listenTo: function (registrationName, contentDocumentHandle) {
|
4126 | var mountAt = contentDocumentHandle;
|
4127 | var isListening = getListeningForDocument(mountAt);
|
4128 | var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
|
4129 |
|
4130 | var topLevelTypes = EventConstants.topLevelTypes;
|
4131 | for (var i = 0; i < dependencies.length; i++) {
|
4132 | var dependency = dependencies[i];
|
4133 | if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
|
4134 | if (dependency === topLevelTypes.topWheel) {
|
4135 | if (isEventSupported('wheel')) {
|
4136 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'wheel', mountAt);
|
4137 | } else if (isEventSupported('mousewheel')) {
|
4138 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'mousewheel', mountAt);
|
4139 | } else {
|
4140 |
|
4141 |
|
4142 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'DOMMouseScroll', mountAt);
|
4143 | }
|
4144 | } else if (dependency === topLevelTypes.topScroll) {
|
4145 |
|
4146 | if (isEventSupported('scroll', true)) {
|
4147 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, 'scroll', mountAt);
|
4148 | } else {
|
4149 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
|
4150 | }
|
4151 | } else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) {
|
4152 |
|
4153 | if (isEventSupported('focus', true)) {
|
4154 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, 'focus', mountAt);
|
4155 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, 'blur', mountAt);
|
4156 | } else if (isEventSupported('focusin')) {
|
4157 |
|
4158 |
|
4159 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, 'focusin', mountAt);
|
4160 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, 'focusout', mountAt);
|
4161 | }
|
4162 |
|
4163 |
|
4164 | isListening[topLevelTypes.topBlur] = true;
|
4165 | isListening[topLevelTypes.topFocus] = true;
|
4166 | } else if (topEventMapping.hasOwnProperty(dependency)) {
|
4167 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
|
4168 | }
|
4169 |
|
4170 | isListening[dependency] = true;
|
4171 | }
|
4172 | }
|
4173 | },
|
4174 |
|
4175 | trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
|
4176 | return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
|
4177 | },
|
4178 |
|
4179 | trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
|
4180 | return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
|
4181 | },
|
4182 |
|
4183 | |
4184 |
|
4185 |
|
4186 |
|
4187 |
|
4188 | supportsEventPageXY: function () {
|
4189 | if (!document.createEvent) {
|
4190 | return false;
|
4191 | }
|
4192 | var ev = document.createEvent('MouseEvent');
|
4193 | return ev != null && 'pageX' in ev;
|
4194 | },
|
4195 |
|
4196 | |
4197 |
|
4198 |
|
4199 |
|
4200 |
|
4201 |
|
4202 |
|
4203 |
|
4204 |
|
4205 |
|
4206 |
|
4207 | ensureScrollValueMonitoring: function () {
|
4208 | if (hasEventPageXY === undefined) {
|
4209 | hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
|
4210 | }
|
4211 | if (!hasEventPageXY && !isMonitoringScrollValue) {
|
4212 | var refresh = ViewportMetrics.refreshScrollValues;
|
4213 | ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
|
4214 | isMonitoringScrollValue = true;
|
4215 | }
|
4216 | }
|
4217 |
|
4218 | });
|
4219 |
|
4220 | module.exports = ReactBrowserEventEmitter;
|
4221 | },{"115":115,"134":134,"136":136,"16":16,"172":172,"18":18,"65":65}],28:[function(_dereq_,module,exports){
|
4222 | (function (process){
|
4223 |
|
4224 |
|
4225 |
|
4226 |
|
4227 |
|
4228 |
|
4229 |
|
4230 |
|
4231 |
|
4232 |
|
4233 |
|
4234 | 'use strict';
|
4235 |
|
4236 | var ReactReconciler = _dereq_(88);
|
4237 |
|
4238 | var instantiateReactComponent = _dereq_(135);
|
4239 | var KeyEscapeUtils = _dereq_(23);
|
4240 | var shouldUpdateReactComponent = _dereq_(144);
|
4241 | var traverseAllChildren = _dereq_(145);
|
4242 | var warning = _dereq_(171);
|
4243 |
|
4244 | var ReactComponentTreeHook;
|
4245 |
|
4246 | if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
4247 |
|
4248 |
|
4249 |
|
4250 |
|
4251 |
|
4252 | ReactComponentTreeHook = _dereq_(35);
|
4253 | }
|
4254 |
|
4255 | function instantiateChild(childInstances, child, name, selfDebugID) {
|
4256 |
|
4257 | var keyUnique = childInstances[name] === undefined;
|
4258 | if ("development" !== 'production') {
|
4259 | if (!ReactComponentTreeHook) {
|
4260 | ReactComponentTreeHook = _dereq_(35);
|
4261 | }
|
4262 | if (!keyUnique) {
|
4263 | "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;
|
4264 | }
|
4265 | }
|
4266 | if (child != null && keyUnique) {
|
4267 | childInstances[name] = instantiateReactComponent(child, true);
|
4268 | }
|
4269 | }
|
4270 |
|
4271 |
|
4272 |
|
4273 |
|
4274 |
|
4275 |
|
4276 | var ReactChildReconciler = {
|
4277 | |
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 |
|
4285 | instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
|
4286 | ) {
|
4287 | if (nestedChildNodes == null) {
|
4288 | return null;
|
4289 | }
|
4290 | var childInstances = {};
|
4291 |
|
4292 | if ("development" !== 'production') {
|
4293 | traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
|
4294 | return instantiateChild(childInsts, child, name, selfDebugID);
|
4295 | }, childInstances);
|
4296 | } else {
|
4297 | traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
|
4298 | }
|
4299 | return childInstances;
|
4300 | },
|
4301 |
|
4302 | |
4303 |
|
4304 |
|
4305 |
|
4306 |
|
4307 |
|
4308 |
|
4309 |
|
4310 |
|
4311 |
|
4312 | updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
|
4313 | ) {
|
4314 |
|
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 | if (!nextChildren && !prevChildren) {
|
4320 | return;
|
4321 | }
|
4322 | var name;
|
4323 | var prevChild;
|
4324 | for (name in nextChildren) {
|
4325 | if (!nextChildren.hasOwnProperty(name)) {
|
4326 | continue;
|
4327 | }
|
4328 | prevChild = prevChildren && prevChildren[name];
|
4329 | var prevElement = prevChild && prevChild._currentElement;
|
4330 | var nextElement = nextChildren[name];
|
4331 | if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
|
4332 | ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
|
4333 | nextChildren[name] = prevChild;
|
4334 | } else {
|
4335 | if (prevChild) {
|
4336 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
4337 | ReactReconciler.unmountComponent(prevChild, false);
|
4338 | }
|
4339 |
|
4340 | var nextChildInstance = instantiateReactComponent(nextElement, true);
|
4341 | nextChildren[name] = nextChildInstance;
|
4342 |
|
4343 |
|
4344 | var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
|
4345 | mountImages.push(nextChildMountImage);
|
4346 | }
|
4347 | }
|
4348 |
|
4349 | for (name in prevChildren) {
|
4350 | if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
|
4351 | prevChild = prevChildren[name];
|
4352 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
4353 | ReactReconciler.unmountComponent(prevChild, false);
|
4354 | }
|
4355 | }
|
4356 | },
|
4357 |
|
4358 | |
4359 |
|
4360 |
|
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 | unmountChildren: function (renderedChildren, safely) {
|
4366 | for (var name in renderedChildren) {
|
4367 | if (renderedChildren.hasOwnProperty(name)) {
|
4368 | var renderedChild = renderedChildren[name];
|
4369 | ReactReconciler.unmountComponent(renderedChild, safely);
|
4370 | }
|
4371 | }
|
4372 | }
|
4373 |
|
4374 | };
|
4375 |
|
4376 | module.exports = ReactChildReconciler;
|
4377 | }).call(this,undefined)
|
4378 | },{"135":135,"144":144,"145":145,"171":171,"23":23,"35":35,"88":88}],29:[function(_dereq_,module,exports){
|
4379 |
|
4380 |
|
4381 |
|
4382 |
|
4383 |
|
4384 |
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 |
|
4390 | 'use strict';
|
4391 |
|
4392 | var PooledClass = _dereq_(25);
|
4393 | var ReactElement = _dereq_(61);
|
4394 |
|
4395 | var emptyFunction = _dereq_(154);
|
4396 | var traverseAllChildren = _dereq_(145);
|
4397 |
|
4398 | var twoArgumentPooler = PooledClass.twoArgumentPooler;
|
4399 | var fourArgumentPooler = PooledClass.fourArgumentPooler;
|
4400 |
|
4401 | var userProvidedKeyEscapeRegex = /\/+/g;
|
4402 | function escapeUserProvidedKey(text) {
|
4403 | return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
|
4404 | }
|
4405 |
|
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 |
|
4414 | function ForEachBookKeeping(forEachFunction, forEachContext) {
|
4415 | this.func = forEachFunction;
|
4416 | this.context = forEachContext;
|
4417 | this.count = 0;
|
4418 | }
|
4419 | ForEachBookKeeping.prototype.destructor = function () {
|
4420 | this.func = null;
|
4421 | this.context = null;
|
4422 | this.count = 0;
|
4423 | };
|
4424 | PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
|
4425 |
|
4426 | function forEachSingleChild(bookKeeping, child, name) {
|
4427 | var func = bookKeeping.func;
|
4428 | var context = bookKeeping.context;
|
4429 |
|
4430 | func.call(context, child, bookKeeping.count++);
|
4431 | }
|
4432 |
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 |
|
4441 |
|
4442 |
|
4443 |
|
4444 |
|
4445 | function forEachChildren(children, forEachFunc, forEachContext) {
|
4446 | if (children == null) {
|
4447 | return children;
|
4448 | }
|
4449 | var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
|
4450 | traverseAllChildren(children, forEachSingleChild, traverseContext);
|
4451 | ForEachBookKeeping.release(traverseContext);
|
4452 | }
|
4453 |
|
4454 |
|
4455 |
|
4456 |
|
4457 |
|
4458 |
|
4459 |
|
4460 |
|
4461 |
|
4462 |
|
4463 | function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
|
4464 | this.result = mapResult;
|
4465 | this.keyPrefix = keyPrefix;
|
4466 | this.func = mapFunction;
|
4467 | this.context = mapContext;
|
4468 | this.count = 0;
|
4469 | }
|
4470 | MapBookKeeping.prototype.destructor = function () {
|
4471 | this.result = null;
|
4472 | this.keyPrefix = null;
|
4473 | this.func = null;
|
4474 | this.context = null;
|
4475 | this.count = 0;
|
4476 | };
|
4477 | PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
|
4478 |
|
4479 | function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
4480 | var result = bookKeeping.result;
|
4481 | var keyPrefix = bookKeeping.keyPrefix;
|
4482 | var func = bookKeeping.func;
|
4483 | var context = bookKeeping.context;
|
4484 |
|
4485 |
|
4486 | var mappedChild = func.call(context, child, bookKeeping.count++);
|
4487 | if (Array.isArray(mappedChild)) {
|
4488 | mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
|
4489 | } else if (mappedChild != null) {
|
4490 | if (ReactElement.isValidElement(mappedChild)) {
|
4491 | mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
|
4492 |
|
4493 |
|
4494 | keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
|
4495 | }
|
4496 | result.push(mappedChild);
|
4497 | }
|
4498 | }
|
4499 |
|
4500 | function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
4501 | var escapedPrefix = '';
|
4502 | if (prefix != null) {
|
4503 | escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
4504 | }
|
4505 | var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
|
4506 | traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
4507 | MapBookKeeping.release(traverseContext);
|
4508 | }
|
4509 |
|
4510 |
|
4511 |
|
4512 |
|
4513 |
|
4514 |
|
4515 |
|
4516 |
|
4517 |
|
4518 |
|
4519 |
|
4520 |
|
4521 |
|
4522 |
|
4523 | function mapChildren(children, func, context) {
|
4524 | if (children == null) {
|
4525 | return children;
|
4526 | }
|
4527 | var result = [];
|
4528 | mapIntoWithKeyPrefixInternal(children, result, null, func, context);
|
4529 | return result;
|
4530 | }
|
4531 |
|
4532 | function forEachSingleChildDummy(traverseContext, child, name) {
|
4533 | return null;
|
4534 | }
|
4535 |
|
4536 |
|
4537 |
|
4538 |
|
4539 |
|
4540 |
|
4541 |
|
4542 |
|
4543 |
|
4544 |
|
4545 | function countChildren(children, context) {
|
4546 | return traverseAllChildren(children, forEachSingleChildDummy, null);
|
4547 | }
|
4548 |
|
4549 |
|
4550 |
|
4551 |
|
4552 |
|
4553 |
|
4554 |
|
4555 | function toArray(children) {
|
4556 | var result = [];
|
4557 | mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
|
4558 | return result;
|
4559 | }
|
4560 |
|
4561 | var ReactChildren = {
|
4562 | forEach: forEachChildren,
|
4563 | map: mapChildren,
|
4564 | mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
|
4565 | count: countChildren,
|
4566 | toArray: toArray
|
4567 | };
|
4568 |
|
4569 | module.exports = ReactChildren;
|
4570 | },{"145":145,"154":154,"25":25,"61":61}],30:[function(_dereq_,module,exports){
|
4571 |
|
4572 |
|
4573 |
|
4574 |
|
4575 |
|
4576 |
|
4577 |
|
4578 |
|
4579 |
|
4580 |
|
4581 |
|
4582 | 'use strict';
|
4583 |
|
4584 | var ReactComponentTreeHook = _dereq_(35);
|
4585 |
|
4586 | var warning = _dereq_(171);
|
4587 |
|
4588 | function handleElement(debugID, element) {
|
4589 | if (element == null) {
|
4590 | return;
|
4591 | }
|
4592 | if (element._shadowChildren === undefined) {
|
4593 | return;
|
4594 | }
|
4595 | if (element._shadowChildren === element.props.children) {
|
4596 | return;
|
4597 | }
|
4598 | var isMutated = false;
|
4599 | if (Array.isArray(element._shadowChildren)) {
|
4600 | if (element._shadowChildren.length === element.props.children.length) {
|
4601 | for (var i = 0; i < element._shadowChildren.length; i++) {
|
4602 | if (element._shadowChildren[i] !== element.props.children[i]) {
|
4603 | isMutated = true;
|
4604 | }
|
4605 | }
|
4606 | } else {
|
4607 | isMutated = true;
|
4608 | }
|
4609 | }
|
4610 | if (!Array.isArray(element._shadowChildren) || isMutated) {
|
4611 | "development" !== 'production' ? warning(false, 'Component\'s children should not be mutated.%s', ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
4612 | }
|
4613 | }
|
4614 |
|
4615 | var ReactChildrenMutationWarningHook = {
|
4616 | onMountComponent: function (debugID) {
|
4617 | handleElement(debugID, ReactComponentTreeHook.getElement(debugID));
|
4618 | },
|
4619 | onUpdateComponent: function (debugID) {
|
4620 | handleElement(debugID, ReactComponentTreeHook.getElement(debugID));
|
4621 | }
|
4622 | };
|
4623 |
|
4624 | module.exports = ReactChildrenMutationWarningHook;
|
4625 | },{"171":171,"35":35}],31:[function(_dereq_,module,exports){
|
4626 |
|
4627 |
|
4628 |
|
4629 |
|
4630 |
|
4631 |
|
4632 |
|
4633 |
|
4634 |
|
4635 |
|
4636 |
|
4637 | 'use strict';
|
4638 |
|
4639 | var _prodInvariant = _dereq_(140),
|
4640 | _assign = _dereq_(172);
|
4641 |
|
4642 | var ReactComponent = _dereq_(32);
|
4643 | var ReactElement = _dereq_(61);
|
4644 | var ReactPropTypeLocations = _dereq_(83);
|
4645 | var ReactPropTypeLocationNames = _dereq_(82);
|
4646 | var ReactNoopUpdateQueue = _dereq_(80);
|
4647 |
|
4648 | var emptyObject = _dereq_(155);
|
4649 | var invariant = _dereq_(162);
|
4650 | var keyMirror = _dereq_(165);
|
4651 | var keyOf = _dereq_(166);
|
4652 | var warning = _dereq_(171);
|
4653 |
|
4654 | var MIXINS_KEY = keyOf({ mixins: null });
|
4655 |
|
4656 |
|
4657 |
|
4658 |
|
4659 | var SpecPolicy = keyMirror({
|
4660 | |
4661 |
|
4662 |
|
4663 | DEFINE_ONCE: null,
|
4664 | |
4665 |
|
4666 |
|
4667 |
|
4668 | DEFINE_MANY: null,
|
4669 | |
4670 |
|
4671 |
|
4672 | OVERRIDE_BASE: null,
|
4673 | |
4674 |
|
4675 |
|
4676 |
|
4677 |
|
4678 | DEFINE_MANY_MERGED: null
|
4679 | });
|
4680 |
|
4681 | var injectedMixins = [];
|
4682 |
|
4683 |
|
4684 |
|
4685 |
|
4686 |
|
4687 |
|
4688 |
|
4689 |
|
4690 |
|
4691 |
|
4692 |
|
4693 |
|
4694 |
|
4695 |
|
4696 |
|
4697 |
|
4698 |
|
4699 |
|
4700 |
|
4701 |
|
4702 |
|
4703 |
|
4704 |
|
4705 | var ReactClassInterface = {
|
4706 |
|
4707 | |
4708 |
|
4709 |
|
4710 |
|
4711 |
|
4712 |
|
4713 | mixins: SpecPolicy.DEFINE_MANY,
|
4714 |
|
4715 | |
4716 |
|
4717 |
|
4718 |
|
4719 |
|
4720 |
|
4721 |
|
4722 | statics: SpecPolicy.DEFINE_MANY,
|
4723 |
|
4724 | |
4725 |
|
4726 |
|
4727 |
|
4728 |
|
4729 |
|
4730 | propTypes: SpecPolicy.DEFINE_MANY,
|
4731 |
|
4732 | |
4733 |
|
4734 |
|
4735 |
|
4736 |
|
4737 |
|
4738 | contextTypes: SpecPolicy.DEFINE_MANY,
|
4739 |
|
4740 | |
4741 |
|
4742 |
|
4743 |
|
4744 |
|
4745 |
|
4746 | childContextTypes: SpecPolicy.DEFINE_MANY,
|
4747 |
|
4748 |
|
4749 |
|
4750 | |
4751 |
|
4752 |
|
4753 |
|
4754 |
|
4755 |
|
4756 |
|
4757 |
|
4758 |
|
4759 |
|
4760 | getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED,
|
4761 |
|
4762 | |
4763 |
|
4764 |
|
4765 |
|
4766 |
|
4767 |
|
4768 |
|
4769 |
|
4770 |
|
4771 |
|
4772 |
|
4773 |
|
4774 |
|
4775 |
|
4776 | getInitialState: SpecPolicy.DEFINE_MANY_MERGED,
|
4777 |
|
4778 | |
4779 |
|
4780 |
|
4781 |
|
4782 | getChildContext: SpecPolicy.DEFINE_MANY_MERGED,
|
4783 |
|
4784 | |
4785 |
|
4786 |
|
4787 |
|
4788 |
|
4789 |
|
4790 |
|
4791 |
|
4792 |
|
4793 |
|
4794 |
|
4795 |
|
4796 |
|
4797 |
|
4798 |
|
4799 |
|
4800 | render: SpecPolicy.DEFINE_ONCE,
|
4801 |
|
4802 |
|
4803 |
|
4804 | |
4805 |
|
4806 |
|
4807 |
|
4808 |
|
4809 |
|
4810 |
|
4811 | componentWillMount: SpecPolicy.DEFINE_MANY,
|
4812 |
|
4813 | |
4814 |
|
4815 |
|
4816 |
|
4817 |
|
4818 |
|
4819 |
|
4820 |
|
4821 |
|
4822 |
|
4823 | componentDidMount: SpecPolicy.DEFINE_MANY,
|
4824 |
|
4825 | |
4826 |
|
4827 |
|
4828 |
|
4829 |
|
4830 |
|
4831 |
|
4832 |
|
4833 |
|
4834 |
|
4835 |
|
4836 |
|
4837 |
|
4838 |
|
4839 |
|
4840 |
|
4841 |
|
4842 |
|
4843 |
|
4844 | componentWillReceiveProps: SpecPolicy.DEFINE_MANY,
|
4845 |
|
4846 | |
4847 |
|
4848 |
|
4849 |
|
4850 |
|
4851 |
|
4852 |
|
4853 |
|
4854 |
|
4855 |
|
4856 |
|
4857 |
|
4858 |
|
4859 |
|
4860 |
|
4861 |
|
4862 |
|
4863 |
|
4864 |
|
4865 |
|
4866 | shouldComponentUpdate: SpecPolicy.DEFINE_ONCE,
|
4867 |
|
4868 | |
4869 |
|
4870 |
|
4871 |
|
4872 |
|
4873 |
|
4874 |
|
4875 |
|
4876 |
|
4877 |
|
4878 |
|
4879 |
|
4880 |
|
4881 |
|
4882 |
|
4883 | componentWillUpdate: SpecPolicy.DEFINE_MANY,
|
4884 |
|
4885 | |
4886 |
|
4887 |
|
4888 |
|
4889 |
|
4890 |
|
4891 |
|
4892 |
|
4893 |
|
4894 |
|
4895 |
|
4896 |
|
4897 | componentDidUpdate: SpecPolicy.DEFINE_MANY,
|
4898 |
|
4899 | |
4900 |
|
4901 |
|
4902 |
|
4903 |
|
4904 |
|
4905 |
|
4906 |
|
4907 |
|
4908 |
|
4909 |
|
4910 | componentWillUnmount: SpecPolicy.DEFINE_MANY,
|
4911 |
|
4912 |
|
4913 |
|
4914 | |
4915 |
|
4916 |
|
4917 |
|
4918 |
|
4919 |
|
4920 |
|
4921 |
|
4922 |
|
4923 |
|
4924 | updateComponent: SpecPolicy.OVERRIDE_BASE
|
4925 |
|
4926 | };
|
4927 |
|
4928 |
|
4929 |
|
4930 |
|
4931 |
|
4932 |
|
4933 |
|
4934 |
|
4935 |
|
4936 |
|
4937 | var RESERVED_SPEC_KEYS = {
|
4938 | displayName: function (Constructor, displayName) {
|
4939 | Constructor.displayName = displayName;
|
4940 | },
|
4941 | mixins: function (Constructor, mixins) {
|
4942 | if (mixins) {
|
4943 | for (var i = 0; i < mixins.length; i++) {
|
4944 | mixSpecIntoComponent(Constructor, mixins[i]);
|
4945 | }
|
4946 | }
|
4947 | },
|
4948 | childContextTypes: function (Constructor, childContextTypes) {
|
4949 | if ("development" !== 'production') {
|
4950 | validateTypeDef(Constructor, childContextTypes, ReactPropTypeLocations.childContext);
|
4951 | }
|
4952 | Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
|
4953 | },
|
4954 | contextTypes: function (Constructor, contextTypes) {
|
4955 | if ("development" !== 'production') {
|
4956 | validateTypeDef(Constructor, contextTypes, ReactPropTypeLocations.context);
|
4957 | }
|
4958 | Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
|
4959 | },
|
4960 | |
4961 |
|
4962 |
|
4963 |
|
4964 | getDefaultProps: function (Constructor, getDefaultProps) {
|
4965 | if (Constructor.getDefaultProps) {
|
4966 | Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
|
4967 | } else {
|
4968 | Constructor.getDefaultProps = getDefaultProps;
|
4969 | }
|
4970 | },
|
4971 | propTypes: function (Constructor, propTypes) {
|
4972 | if ("development" !== 'production') {
|
4973 | validateTypeDef(Constructor, propTypes, ReactPropTypeLocations.prop);
|
4974 | }
|
4975 | Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
4976 | },
|
4977 | statics: function (Constructor, statics) {
|
4978 | mixStaticSpecIntoComponent(Constructor, statics);
|
4979 | },
|
4980 | autobind: function () {} };
|
4981 |
|
4982 |
|
4983 | function validateTypeDef(Constructor, typeDef, location) {
|
4984 | for (var propName in typeDef) {
|
4985 | if (typeDef.hasOwnProperty(propName)) {
|
4986 |
|
4987 |
|
4988 | "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;
|
4989 | }
|
4990 | }
|
4991 | }
|
4992 |
|
4993 | function validateMethodOverride(isAlreadyDefined, name) {
|
4994 | var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
|
4995 |
|
4996 |
|
4997 | if (ReactClassMixin.hasOwnProperty(name)) {
|
4998 | !(specPolicy === 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;
|
4999 | }
|
5000 |
|
5001 |
|
5002 | if (isAlreadyDefined) {
|
5003 | !(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === 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;
|
5004 | }
|
5005 | }
|
5006 |
|
5007 |
|
5008 |
|
5009 |
|
5010 |
|
5011 | function mixSpecIntoComponent(Constructor, spec) {
|
5012 | if (!spec) {
|
5013 | if ("development" !== 'production') {
|
5014 | var typeofSpec = typeof spec;
|
5015 | var isMixinValid = typeofSpec === 'object' && spec !== null;
|
5016 |
|
5017 | "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;
|
5018 | }
|
5019 |
|
5020 | return;
|
5021 | }
|
5022 |
|
5023 | !(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;
|
5024 | !!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;
|
5025 |
|
5026 | var proto = Constructor.prototype;
|
5027 | var autoBindPairs = proto.__reactAutoBindPairs;
|
5028 |
|
5029 |
|
5030 |
|
5031 |
|
5032 | if (spec.hasOwnProperty(MIXINS_KEY)) {
|
5033 | RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
5034 | }
|
5035 |
|
5036 | for (var name in spec) {
|
5037 | if (!spec.hasOwnProperty(name)) {
|
5038 | continue;
|
5039 | }
|
5040 |
|
5041 | if (name === MIXINS_KEY) {
|
5042 |
|
5043 | continue;
|
5044 | }
|
5045 |
|
5046 | var property = spec[name];
|
5047 | var isAlreadyDefined = proto.hasOwnProperty(name);
|
5048 | validateMethodOverride(isAlreadyDefined, name);
|
5049 |
|
5050 | if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
5051 | RESERVED_SPEC_KEYS[name](Constructor, property);
|
5052 | } else {
|
5053 |
|
5054 |
|
5055 |
|
5056 |
|
5057 | var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
5058 | var isFunction = typeof property === 'function';
|
5059 | var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
|
5060 |
|
5061 | if (shouldAutoBind) {
|
5062 | autoBindPairs.push(name, property);
|
5063 | proto[name] = property;
|
5064 | } else {
|
5065 | if (isAlreadyDefined) {
|
5066 | var specPolicy = ReactClassInterface[name];
|
5067 |
|
5068 |
|
5069 | !(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === 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;
|
5070 |
|
5071 |
|
5072 |
|
5073 | if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) {
|
5074 | proto[name] = createMergedResultFunction(proto[name], property);
|
5075 | } else if (specPolicy === SpecPolicy.DEFINE_MANY) {
|
5076 | proto[name] = createChainedFunction(proto[name], property);
|
5077 | }
|
5078 | } else {
|
5079 | proto[name] = property;
|
5080 | if ("development" !== 'production') {
|
5081 |
|
5082 |
|
5083 | if (typeof property === 'function' && spec.displayName) {
|
5084 | proto[name].displayName = spec.displayName + '_' + name;
|
5085 | }
|
5086 | }
|
5087 | }
|
5088 | }
|
5089 | }
|
5090 | }
|
5091 | }
|
5092 |
|
5093 | function mixStaticSpecIntoComponent(Constructor, statics) {
|
5094 | if (!statics) {
|
5095 | return;
|
5096 | }
|
5097 | for (var name in statics) {
|
5098 | var property = statics[name];
|
5099 | if (!statics.hasOwnProperty(name)) {
|
5100 | continue;
|
5101 | }
|
5102 |
|
5103 | var isReserved = name in RESERVED_SPEC_KEYS;
|
5104 | !!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;
|
5105 |
|
5106 | var isInherited = name in Constructor;
|
5107 | !!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;
|
5108 | Constructor[name] = property;
|
5109 | }
|
5110 | }
|
5111 |
|
5112 |
|
5113 |
|
5114 |
|
5115 |
|
5116 |
|
5117 |
|
5118 |
|
5119 | function mergeIntoWithNoDuplicateKeys(one, two) {
|
5120 | !(one && two && typeof one === 'object' && typeof two === 'object') ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;
|
5121 |
|
5122 | for (var key in two) {
|
5123 | if (two.hasOwnProperty(key)) {
|
5124 | !(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;
|
5125 | one[key] = two[key];
|
5126 | }
|
5127 | }
|
5128 | return one;
|
5129 | }
|
5130 |
|
5131 |
|
5132 |
|
5133 |
|
5134 |
|
5135 |
|
5136 |
|
5137 |
|
5138 |
|
5139 | function createMergedResultFunction(one, two) {
|
5140 | return function mergedResult() {
|
5141 | var a = one.apply(this, arguments);
|
5142 | var b = two.apply(this, arguments);
|
5143 | if (a == null) {
|
5144 | return b;
|
5145 | } else if (b == null) {
|
5146 | return a;
|
5147 | }
|
5148 | var c = {};
|
5149 | mergeIntoWithNoDuplicateKeys(c, a);
|
5150 | mergeIntoWithNoDuplicateKeys(c, b);
|
5151 | return c;
|
5152 | };
|
5153 | }
|
5154 |
|
5155 |
|
5156 |
|
5157 |
|
5158 |
|
5159 |
|
5160 |
|
5161 |
|
5162 |
|
5163 | function createChainedFunction(one, two) {
|
5164 | return function chainedFunction() {
|
5165 | one.apply(this, arguments);
|
5166 | two.apply(this, arguments);
|
5167 | };
|
5168 | }
|
5169 |
|
5170 |
|
5171 |
|
5172 |
|
5173 |
|
5174 |
|
5175 |
|
5176 |
|
5177 | function bindAutoBindMethod(component, method) {
|
5178 | var boundMethod = method.bind(component);
|
5179 | if ("development" !== 'production') {
|
5180 | boundMethod.__reactBoundContext = component;
|
5181 | boundMethod.__reactBoundMethod = method;
|
5182 | boundMethod.__reactBoundArguments = null;
|
5183 | var componentName = component.constructor.displayName;
|
5184 | var _bind = boundMethod.bind;
|
5185 | boundMethod.bind = function (newThis) {
|
5186 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
5187 | args[_key - 1] = arguments[_key];
|
5188 | }
|
5189 |
|
5190 |
|
5191 |
|
5192 |
|
5193 | if (newThis !== component && newThis !== null) {
|
5194 | "development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
|
5195 | } else if (!args.length) {
|
5196 | "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;
|
5197 | return boundMethod;
|
5198 | }
|
5199 | var reboundMethod = _bind.apply(boundMethod, arguments);
|
5200 | reboundMethod.__reactBoundContext = component;
|
5201 | reboundMethod.__reactBoundMethod = method;
|
5202 | reboundMethod.__reactBoundArguments = args;
|
5203 | return reboundMethod;
|
5204 | };
|
5205 | }
|
5206 | return boundMethod;
|
5207 | }
|
5208 |
|
5209 |
|
5210 |
|
5211 |
|
5212 |
|
5213 |
|
5214 | function bindAutoBindMethods(component) {
|
5215 | var pairs = component.__reactAutoBindPairs;
|
5216 | for (var i = 0; i < pairs.length; i += 2) {
|
5217 | var autoBindKey = pairs[i];
|
5218 | var method = pairs[i + 1];
|
5219 | component[autoBindKey] = bindAutoBindMethod(component, method);
|
5220 | }
|
5221 | }
|
5222 |
|
5223 |
|
5224 |
|
5225 |
|
5226 |
|
5227 | var ReactClassMixin = {
|
5228 |
|
5229 | |
5230 |
|
5231 |
|
5232 |
|
5233 | replaceState: function (newState, callback) {
|
5234 | this.updater.enqueueReplaceState(this, newState);
|
5235 | if (callback) {
|
5236 | this.updater.enqueueCallback(this, callback, 'replaceState');
|
5237 | }
|
5238 | },
|
5239 |
|
5240 | |
5241 |
|
5242 |
|
5243 |
|
5244 |
|
5245 |
|
5246 | isMounted: function () {
|
5247 | return this.updater.isMounted(this);
|
5248 | }
|
5249 | };
|
5250 |
|
5251 | var ReactClassComponent = function () {};
|
5252 | _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
|
5253 |
|
5254 |
|
5255 |
|
5256 |
|
5257 |
|
5258 |
|
5259 | var ReactClass = {
|
5260 |
|
5261 | |
5262 |
|
5263 |
|
5264 |
|
5265 |
|
5266 |
|
5267 |
|
5268 |
|
5269 | createClass: function (spec) {
|
5270 | var Constructor = function (props, context, updater) {
|
5271 |
|
5272 |
|
5273 |
|
5274 | if ("development" !== 'production') {
|
5275 | "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;
|
5276 | }
|
5277 |
|
5278 |
|
5279 | if (this.__reactAutoBindPairs.length) {
|
5280 | bindAutoBindMethods(this);
|
5281 | }
|
5282 |
|
5283 | this.props = props;
|
5284 | this.context = context;
|
5285 | this.refs = emptyObject;
|
5286 | this.updater = updater || ReactNoopUpdateQueue;
|
5287 |
|
5288 | this.state = null;
|
5289 |
|
5290 |
|
5291 |
|
5292 |
|
5293 | var initialState = this.getInitialState ? this.getInitialState() : null;
|
5294 | if ("development" !== 'production') {
|
5295 |
|
5296 | if (initialState === undefined && this.getInitialState._isMockFunction) {
|
5297 |
|
5298 |
|
5299 | initialState = null;
|
5300 | }
|
5301 | }
|
5302 | !(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;
|
5303 |
|
5304 | this.state = initialState;
|
5305 | };
|
5306 | Constructor.prototype = new ReactClassComponent();
|
5307 | Constructor.prototype.constructor = Constructor;
|
5308 | Constructor.prototype.__reactAutoBindPairs = [];
|
5309 |
|
5310 | injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
5311 |
|
5312 | mixSpecIntoComponent(Constructor, spec);
|
5313 |
|
5314 |
|
5315 | if (Constructor.getDefaultProps) {
|
5316 | Constructor.defaultProps = Constructor.getDefaultProps();
|
5317 | }
|
5318 |
|
5319 | if ("development" !== 'production') {
|
5320 |
|
5321 |
|
5322 |
|
5323 |
|
5324 | if (Constructor.getDefaultProps) {
|
5325 | Constructor.getDefaultProps.isReactClassApproved = {};
|
5326 | }
|
5327 | if (Constructor.prototype.getInitialState) {
|
5328 | Constructor.prototype.getInitialState.isReactClassApproved = {};
|
5329 | }
|
5330 | }
|
5331 |
|
5332 | !Constructor.prototype.render ? "development" !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;
|
5333 |
|
5334 | if ("development" !== 'production') {
|
5335 | "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;
|
5336 | "development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
|
5337 | }
|
5338 |
|
5339 |
|
5340 | for (var methodName in ReactClassInterface) {
|
5341 | if (!Constructor.prototype[methodName]) {
|
5342 | Constructor.prototype[methodName] = null;
|
5343 | }
|
5344 | }
|
5345 |
|
5346 | return Constructor;
|
5347 | },
|
5348 |
|
5349 | injection: {
|
5350 | injectMixin: function (mixin) {
|
5351 | injectedMixins.push(mixin);
|
5352 | }
|
5353 | }
|
5354 |
|
5355 | };
|
5356 |
|
5357 | module.exports = ReactClass;
|
5358 | },{"140":140,"155":155,"162":162,"165":165,"166":166,"171":171,"172":172,"32":32,"61":61,"80":80,"82":82,"83":83}],32:[function(_dereq_,module,exports){
|
5359 |
|
5360 |
|
5361 |
|
5362 |
|
5363 |
|
5364 |
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 |
|
5370 | 'use strict';
|
5371 |
|
5372 | var _prodInvariant = _dereq_(140);
|
5373 |
|
5374 | var ReactNoopUpdateQueue = _dereq_(80);
|
5375 |
|
5376 | var canDefineProperty = _dereq_(118);
|
5377 | var emptyObject = _dereq_(155);
|
5378 | var invariant = _dereq_(162);
|
5379 | var warning = _dereq_(171);
|
5380 |
|
5381 |
|
5382 |
|
5383 |
|
5384 | function ReactComponent(props, context, updater) {
|
5385 | this.props = props;
|
5386 | this.context = context;
|
5387 | this.refs = emptyObject;
|
5388 |
|
5389 |
|
5390 | this.updater = updater || ReactNoopUpdateQueue;
|
5391 | }
|
5392 |
|
5393 | ReactComponent.prototype.isReactComponent = {};
|
5394 |
|
5395 |
|
5396 |
|
5397 |
|
5398 |
|
5399 |
|
5400 |
|
5401 |
|
5402 |
|
5403 |
|
5404 |
|
5405 |
|
5406 |
|
5407 |
|
5408 |
|
5409 |
|
5410 |
|
5411 |
|
5412 |
|
5413 |
|
5414 |
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 |
|
5420 | ReactComponent.prototype.setState = function (partialState, callback) {
|
5421 | !(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;
|
5422 | this.updater.enqueueSetState(this, partialState);
|
5423 | if (callback) {
|
5424 | this.updater.enqueueCallback(this, callback, 'setState');
|
5425 | }
|
5426 | };
|
5427 |
|
5428 |
|
5429 |
|
5430 |
|
5431 |
|
5432 |
|
5433 |
|
5434 |
|
5435 |
|
5436 |
|
5437 |
|
5438 |
|
5439 |
|
5440 |
|
5441 |
|
5442 | ReactComponent.prototype.forceUpdate = function (callback) {
|
5443 | this.updater.enqueueForceUpdate(this);
|
5444 | if (callback) {
|
5445 | this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
5446 | }
|
5447 | };
|
5448 |
|
5449 |
|
5450 |
|
5451 |
|
5452 |
|
5453 |
|
5454 | if ("development" !== 'production') {
|
5455 | var deprecatedAPIs = {
|
5456 | isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
5457 | replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
5458 | };
|
5459 | var defineDeprecationWarning = function (methodName, info) {
|
5460 | if (canDefineProperty) {
|
5461 | Object.defineProperty(ReactComponent.prototype, methodName, {
|
5462 | get: function () {
|
5463 | "development" !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
|
5464 | return undefined;
|
5465 | }
|
5466 | });
|
5467 | }
|
5468 | };
|
5469 | for (var fnName in deprecatedAPIs) {
|
5470 | if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
5471 | defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
5472 | }
|
5473 | }
|
5474 | }
|
5475 |
|
5476 | module.exports = ReactComponent;
|
5477 | },{"118":118,"140":140,"155":155,"162":162,"171":171,"80":80}],33:[function(_dereq_,module,exports){
|
5478 |
|
5479 |
|
5480 |
|
5481 |
|
5482 |
|
5483 |
|
5484 |
|
5485 |
|
5486 |
|
5487 |
|
5488 |
|
5489 | 'use strict';
|
5490 |
|
5491 | var DOMChildrenOperations = _dereq_(7);
|
5492 | var ReactDOMIDOperations = _dereq_(47);
|
5493 |
|
5494 |
|
5495 |
|
5496 |
|
5497 |
|
5498 |
|
5499 | var ReactComponentBrowserEnvironment = {
|
5500 |
|
5501 | processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
|
5502 |
|
5503 | replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
|
5504 |
|
5505 | };
|
5506 |
|
5507 | module.exports = ReactComponentBrowserEnvironment;
|
5508 | },{"47":47,"7":7}],34:[function(_dereq_,module,exports){
|
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 |
|
5514 |
|
5515 |
|
5516 |
|
5517 |
|
5518 |
|
5519 |
|
5520 | 'use strict';
|
5521 |
|
5522 | var _prodInvariant = _dereq_(140);
|
5523 |
|
5524 | var invariant = _dereq_(162);
|
5525 |
|
5526 | var injected = false;
|
5527 |
|
5528 | var ReactComponentEnvironment = {
|
5529 |
|
5530 | |
5531 |
|
5532 |
|
5533 |
|
5534 | replaceNodeWithMarkup: null,
|
5535 |
|
5536 | |
5537 |
|
5538 |
|
5539 |
|
5540 | processChildrenUpdates: null,
|
5541 |
|
5542 | injection: {
|
5543 | injectEnvironment: function (environment) {
|
5544 | !!injected ? "development" !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
|
5545 | ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
|
5546 | ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
|
5547 | injected = true;
|
5548 | }
|
5549 | }
|
5550 |
|
5551 | };
|
5552 |
|
5553 | module.exports = ReactComponentEnvironment;
|
5554 | },{"140":140,"162":162}],35:[function(_dereq_,module,exports){
|
5555 |
|
5556 |
|
5557 |
|
5558 |
|
5559 |
|
5560 |
|
5561 |
|
5562 |
|
5563 |
|
5564 |
|
5565 |
|
5566 | 'use strict';
|
5567 |
|
5568 | var _prodInvariant = _dereq_(140);
|
5569 |
|
5570 | var ReactCurrentOwner = _dereq_(37);
|
5571 |
|
5572 | var invariant = _dereq_(162);
|
5573 | var warning = _dereq_(171);
|
5574 |
|
5575 | function isNative(fn) {
|
5576 |
|
5577 | var funcToString = Function.prototype.toString;
|
5578 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
5579 | var reIsNative = RegExp('^' + funcToString
|
5580 |
|
5581 | .call(hasOwnProperty)
|
5582 |
|
5583 | .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
|
5584 |
|
5585 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
5586 | try {
|
5587 | var source = funcToString.call(fn);
|
5588 | return reIsNative.test(source);
|
5589 | } catch (err) {
|
5590 | return false;
|
5591 | }
|
5592 | }
|
5593 |
|
5594 | var canUseCollections =
|
5595 |
|
5596 | typeof Array.from === 'function' &&
|
5597 |
|
5598 | typeof Map === 'function' && isNative(Map) &&
|
5599 |
|
5600 | Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
5601 |
|
5602 | typeof Set === 'function' && isNative(Set) &&
|
5603 |
|
5604 | Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
5605 |
|
5606 | var itemMap;
|
5607 | var rootIDSet;
|
5608 |
|
5609 | var itemByKey;
|
5610 | var rootByKey;
|
5611 |
|
5612 | if (canUseCollections) {
|
5613 | itemMap = new Map();
|
5614 | rootIDSet = new Set();
|
5615 | } else {
|
5616 | itemByKey = {};
|
5617 | rootByKey = {};
|
5618 | }
|
5619 |
|
5620 | var unmountedIDs = [];
|
5621 |
|
5622 |
|
5623 |
|
5624 | function getKeyFromID(id) {
|
5625 | return '.' + id;
|
5626 | }
|
5627 | function getIDFromKey(key) {
|
5628 | return parseInt(key.substr(1), 10);
|
5629 | }
|
5630 |
|
5631 | function get(id) {
|
5632 | if (canUseCollections) {
|
5633 | return itemMap.get(id);
|
5634 | } else {
|
5635 | var key = getKeyFromID(id);
|
5636 | return itemByKey[key];
|
5637 | }
|
5638 | }
|
5639 |
|
5640 | function remove(id) {
|
5641 | if (canUseCollections) {
|
5642 | itemMap['delete'](id);
|
5643 | } else {
|
5644 | var key = getKeyFromID(id);
|
5645 | delete itemByKey[key];
|
5646 | }
|
5647 | }
|
5648 |
|
5649 | function create(id, element, parentID) {
|
5650 | var item = {
|
5651 | element: element,
|
5652 | parentID: parentID,
|
5653 | text: null,
|
5654 | childIDs: [],
|
5655 | isMounted: false,
|
5656 | updateCount: 0
|
5657 | };
|
5658 |
|
5659 | if (canUseCollections) {
|
5660 | itemMap.set(id, item);
|
5661 | } else {
|
5662 | var key = getKeyFromID(id);
|
5663 | itemByKey[key] = item;
|
5664 | }
|
5665 | }
|
5666 |
|
5667 | function addRoot(id) {
|
5668 | if (canUseCollections) {
|
5669 | rootIDSet.add(id);
|
5670 | } else {
|
5671 | var key = getKeyFromID(id);
|
5672 | rootByKey[key] = true;
|
5673 | }
|
5674 | }
|
5675 |
|
5676 | function removeRoot(id) {
|
5677 | if (canUseCollections) {
|
5678 | rootIDSet['delete'](id);
|
5679 | } else {
|
5680 | var key = getKeyFromID(id);
|
5681 | delete rootByKey[key];
|
5682 | }
|
5683 | }
|
5684 |
|
5685 | function getRegisteredIDs() {
|
5686 | if (canUseCollections) {
|
5687 | return Array.from(itemMap.keys());
|
5688 | } else {
|
5689 | return Object.keys(itemByKey).map(getIDFromKey);
|
5690 | }
|
5691 | }
|
5692 |
|
5693 | function getRootIDs() {
|
5694 | if (canUseCollections) {
|
5695 | return Array.from(rootIDSet.keys());
|
5696 | } else {
|
5697 | return Object.keys(rootByKey).map(getIDFromKey);
|
5698 | }
|
5699 | }
|
5700 |
|
5701 | function purgeDeep(id) {
|
5702 | var item = get(id);
|
5703 | if (item) {
|
5704 | var childIDs = item.childIDs;
|
5705 |
|
5706 | remove(id);
|
5707 | childIDs.forEach(purgeDeep);
|
5708 | }
|
5709 | }
|
5710 |
|
5711 | function describeComponentFrame(name, source, ownerName) {
|
5712 | return '\n in ' + name + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
5713 | }
|
5714 |
|
5715 | function getDisplayName(element) {
|
5716 | if (element == null) {
|
5717 | return '#empty';
|
5718 | } else if (typeof element === 'string' || typeof element === 'number') {
|
5719 | return '#text';
|
5720 | } else if (typeof element.type === 'string') {
|
5721 | return element.type;
|
5722 | } else {
|
5723 | return element.type.displayName || element.type.name || 'Unknown';
|
5724 | }
|
5725 | }
|
5726 |
|
5727 | function describeID(id) {
|
5728 | var name = ReactComponentTreeHook.getDisplayName(id);
|
5729 | var element = ReactComponentTreeHook.getElement(id);
|
5730 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
5731 | var ownerName;
|
5732 | if (ownerID) {
|
5733 | ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
|
5734 | }
|
5735 | "development" !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
|
5736 | return describeComponentFrame(name, element && element._source, ownerName);
|
5737 | }
|
5738 |
|
5739 | var ReactComponentTreeHook = {
|
5740 | onSetChildren: function (id, nextChildIDs) {
|
5741 | var item = get(id);
|
5742 | item.childIDs = nextChildIDs;
|
5743 |
|
5744 | for (var i = 0; i < nextChildIDs.length; i++) {
|
5745 | var nextChildID = nextChildIDs[i];
|
5746 | var nextChild = get(nextChildID);
|
5747 | !nextChild ? "development" !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
|
5748 | !(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;
|
5749 | !nextChild.isMounted ? "development" !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
|
5750 | if (nextChild.parentID == null) {
|
5751 | nextChild.parentID = id;
|
5752 |
|
5753 |
|
5754 |
|
5755 | }
|
5756 | !(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;
|
5757 | }
|
5758 | },
|
5759 | onBeforeMountComponent: function (id, element, parentID) {
|
5760 | create(id, element, parentID);
|
5761 | },
|
5762 | onBeforeUpdateComponent: function (id, element) {
|
5763 | var item = get(id);
|
5764 | if (!item || !item.isMounted) {
|
5765 |
|
5766 |
|
5767 | return;
|
5768 | }
|
5769 | item.element = element;
|
5770 | },
|
5771 | onMountComponent: function (id) {
|
5772 | var item = get(id);
|
5773 | item.isMounted = true;
|
5774 | var isRoot = item.parentID === 0;
|
5775 | if (isRoot) {
|
5776 | addRoot(id);
|
5777 | }
|
5778 | },
|
5779 | onUpdateComponent: function (id) {
|
5780 | var item = get(id);
|
5781 | if (!item || !item.isMounted) {
|
5782 |
|
5783 |
|
5784 | return;
|
5785 | }
|
5786 | item.updateCount++;
|
5787 | },
|
5788 | onUnmountComponent: function (id) {
|
5789 | var item = get(id);
|
5790 | if (item) {
|
5791 |
|
5792 |
|
5793 |
|
5794 |
|
5795 |
|
5796 | item.isMounted = false;
|
5797 | var isRoot = item.parentID === 0;
|
5798 | if (isRoot) {
|
5799 | removeRoot(id);
|
5800 | }
|
5801 | }
|
5802 | unmountedIDs.push(id);
|
5803 | },
|
5804 | purgeUnmountedComponents: function () {
|
5805 | if (ReactComponentTreeHook._preventPurging) {
|
5806 |
|
5807 | return;
|
5808 | }
|
5809 |
|
5810 | for (var i = 0; i < unmountedIDs.length; i++) {
|
5811 | var id = unmountedIDs[i];
|
5812 | purgeDeep(id);
|
5813 | }
|
5814 | unmountedIDs.length = 0;
|
5815 | },
|
5816 | isMounted: function (id) {
|
5817 | var item = get(id);
|
5818 | return item ? item.isMounted : false;
|
5819 | },
|
5820 | getCurrentStackAddendum: function (topElement) {
|
5821 | var info = '';
|
5822 | if (topElement) {
|
5823 | var type = topElement.type;
|
5824 | var name = typeof type === 'function' ? type.displayName || type.name : type;
|
5825 | var owner = topElement._owner;
|
5826 | info += describeComponentFrame(name || 'Unknown', topElement._source, owner && owner.getName());
|
5827 | }
|
5828 |
|
5829 | var currentOwner = ReactCurrentOwner.current;
|
5830 | var id = currentOwner && currentOwner._debugID;
|
5831 |
|
5832 | info += ReactComponentTreeHook.getStackAddendumByID(id);
|
5833 | return info;
|
5834 | },
|
5835 | getStackAddendumByID: function (id) {
|
5836 | var info = '';
|
5837 | while (id) {
|
5838 | info += describeID(id);
|
5839 | id = ReactComponentTreeHook.getParentID(id);
|
5840 | }
|
5841 | return info;
|
5842 | },
|
5843 | getChildIDs: function (id) {
|
5844 | var item = get(id);
|
5845 | return item ? item.childIDs : [];
|
5846 | },
|
5847 | getDisplayName: function (id) {
|
5848 | var element = ReactComponentTreeHook.getElement(id);
|
5849 | if (!element) {
|
5850 | return null;
|
5851 | }
|
5852 | return getDisplayName(element);
|
5853 | },
|
5854 | getElement: function (id) {
|
5855 | var item = get(id);
|
5856 | return item ? item.element : null;
|
5857 | },
|
5858 | getOwnerID: function (id) {
|
5859 | var element = ReactComponentTreeHook.getElement(id);
|
5860 | if (!element || !element._owner) {
|
5861 | return null;
|
5862 | }
|
5863 | return element._owner._debugID;
|
5864 | },
|
5865 | getParentID: function (id) {
|
5866 | var item = get(id);
|
5867 | return item ? item.parentID : null;
|
5868 | },
|
5869 | getSource: function (id) {
|
5870 | var item = get(id);
|
5871 | var element = item ? item.element : null;
|
5872 | var source = element != null ? element._source : null;
|
5873 | return source;
|
5874 | },
|
5875 | getText: function (id) {
|
5876 | var element = ReactComponentTreeHook.getElement(id);
|
5877 | if (typeof element === 'string') {
|
5878 | return element;
|
5879 | } else if (typeof element === 'number') {
|
5880 | return '' + element;
|
5881 | } else {
|
5882 | return null;
|
5883 | }
|
5884 | },
|
5885 | getUpdateCount: function (id) {
|
5886 | var item = get(id);
|
5887 | return item ? item.updateCount : 0;
|
5888 | },
|
5889 |
|
5890 |
|
5891 | getRegisteredIDs: getRegisteredIDs,
|
5892 |
|
5893 | getRootIDs: getRootIDs
|
5894 | };
|
5895 |
|
5896 | module.exports = ReactComponentTreeHook;
|
5897 | },{"140":140,"162":162,"171":171,"37":37}],36:[function(_dereq_,module,exports){
|
5898 |
|
5899 |
|
5900 |
|
5901 |
|
5902 |
|
5903 |
|
5904 |
|
5905 |
|
5906 |
|
5907 |
|
5908 |
|
5909 | 'use strict';
|
5910 |
|
5911 | var _prodInvariant = _dereq_(140),
|
5912 | _assign = _dereq_(172);
|
5913 |
|
5914 | var ReactComponentEnvironment = _dereq_(34);
|
5915 | var ReactCurrentOwner = _dereq_(37);
|
5916 | var ReactElement = _dereq_(61);
|
5917 | var ReactErrorUtils = _dereq_(64);
|
5918 | var ReactInstanceMap = _dereq_(72);
|
5919 | var ReactInstrumentation = _dereq_(73);
|
5920 | var ReactNodeTypes = _dereq_(79);
|
5921 | var ReactPropTypeLocations = _dereq_(83);
|
5922 | var ReactReconciler = _dereq_(88);
|
5923 |
|
5924 | var checkReactTypeSpec = _dereq_(119);
|
5925 | var emptyObject = _dereq_(155);
|
5926 | var invariant = _dereq_(162);
|
5927 | var shallowEqual = _dereq_(170);
|
5928 | var shouldUpdateReactComponent = _dereq_(144);
|
5929 | var warning = _dereq_(171);
|
5930 |
|
5931 | var CompositeTypes = {
|
5932 | ImpureClass: 0,
|
5933 | PureClass: 1,
|
5934 | StatelessFunctional: 2
|
5935 | };
|
5936 |
|
5937 | function StatelessComponent(Component) {}
|
5938 | StatelessComponent.prototype.render = function () {
|
5939 | var Component = ReactInstanceMap.get(this)._currentElement.type;
|
5940 | var element = Component(this.props, this.context, this.updater);
|
5941 | warnIfInvalidElement(Component, element);
|
5942 | return element;
|
5943 | };
|
5944 |
|
5945 | function warnIfInvalidElement(Component, element) {
|
5946 | if ("development" !== 'production') {
|
5947 | "development" !== 'production' ? warning(element === null || element === false || ReactElement.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;
|
5948 | "development" !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
|
5949 | }
|
5950 | }
|
5951 |
|
5952 | function shouldConstruct(Component) {
|
5953 | return !!(Component.prototype && Component.prototype.isReactComponent);
|
5954 | }
|
5955 |
|
5956 | function isPureComponent(Component) {
|
5957 | return !!(Component.prototype && Component.prototype.isPureReactComponent);
|
5958 | }
|
5959 |
|
5960 |
|
5961 | function measureLifeCyclePerf(fn, debugID, timerType) {
|
5962 | if (debugID === 0) {
|
5963 |
|
5964 |
|
5965 |
|
5966 | return fn();
|
5967 | }
|
5968 |
|
5969 | ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
|
5970 | try {
|
5971 | return fn();
|
5972 | } finally {
|
5973 | ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
|
5974 | }
|
5975 | }
|
5976 |
|
5977 |
|
5978 |
|
5979 |
|
5980 |
|
5981 |
|
5982 |
|
5983 |
|
5984 |
|
5985 |
|
5986 |
|
5987 |
|
5988 |
|
5989 |
|
5990 |
|
5991 |
|
5992 |
|
5993 |
|
5994 |
|
5995 |
|
5996 |
|
5997 |
|
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 |
|
6003 |
|
6004 |
|
6005 |
|
6006 |
|
6007 |
|
6008 |
|
6009 |
|
6010 | var nextMountID = 1;
|
6011 |
|
6012 |
|
6013 |
|
6014 |
|
6015 | var ReactCompositeComponentMixin = {
|
6016 |
|
6017 | |
6018 |
|
6019 |
|
6020 |
|
6021 |
|
6022 |
|
6023 |
|
6024 | construct: function (element) {
|
6025 | this._currentElement = element;
|
6026 | this._rootNodeID = 0;
|
6027 | this._compositeType = null;
|
6028 | this._instance = null;
|
6029 | this._hostParent = null;
|
6030 | this._hostContainerInfo = null;
|
6031 |
|
6032 |
|
6033 | this._updateBatchNumber = null;
|
6034 | this._pendingElement = null;
|
6035 | this._pendingStateQueue = null;
|
6036 | this._pendingReplaceState = false;
|
6037 | this._pendingForceUpdate = false;
|
6038 |
|
6039 | this._renderedNodeType = null;
|
6040 | this._renderedComponent = null;
|
6041 | this._context = null;
|
6042 | this._mountOrder = 0;
|
6043 | this._topLevelWrapper = null;
|
6044 |
|
6045 |
|
6046 | this._pendingCallbacks = null;
|
6047 |
|
6048 |
|
6049 | this._calledComponentWillUnmount = false;
|
6050 |
|
6051 | if ("development" !== 'production') {
|
6052 | this._warnedAboutRefsInRender = false;
|
6053 | }
|
6054 | },
|
6055 |
|
6056 | |
6057 |
|
6058 |
|
6059 |
|
6060 |
|
6061 |
|
6062 |
|
6063 |
|
6064 |
|
6065 |
|
6066 |
|
6067 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
6068 | var _this = this;
|
6069 |
|
6070 | this._context = context;
|
6071 | this._mountOrder = nextMountID++;
|
6072 | this._hostParent = hostParent;
|
6073 | this._hostContainerInfo = hostContainerInfo;
|
6074 |
|
6075 | var publicProps = this._currentElement.props;
|
6076 | var publicContext = this._processContext(context);
|
6077 |
|
6078 | var Component = this._currentElement.type;
|
6079 |
|
6080 | var updateQueue = transaction.getUpdateQueue();
|
6081 |
|
6082 |
|
6083 | var doConstruct = shouldConstruct(Component);
|
6084 | var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
|
6085 | var renderedElement;
|
6086 |
|
6087 |
|
6088 | if (!doConstruct && (inst == null || inst.render == null)) {
|
6089 | renderedElement = inst;
|
6090 | warnIfInvalidElement(Component, renderedElement);
|
6091 | !(inst === null || inst === false || ReactElement.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;
|
6092 | inst = new StatelessComponent(Component);
|
6093 | this._compositeType = CompositeTypes.StatelessFunctional;
|
6094 | } else {
|
6095 | if (isPureComponent(Component)) {
|
6096 | this._compositeType = CompositeTypes.PureClass;
|
6097 | } else {
|
6098 | this._compositeType = CompositeTypes.ImpureClass;
|
6099 | }
|
6100 | }
|
6101 |
|
6102 | if ("development" !== 'production') {
|
6103 |
|
6104 |
|
6105 | if (inst.render == null) {
|
6106 | "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;
|
6107 | }
|
6108 |
|
6109 | var propsMutated = inst.props !== publicProps;
|
6110 | var componentName = Component.displayName || Component.name || 'Component';
|
6111 |
|
6112 | "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;
|
6113 | }
|
6114 |
|
6115 |
|
6116 |
|
6117 | inst.props = publicProps;
|
6118 | inst.context = publicContext;
|
6119 | inst.refs = emptyObject;
|
6120 | inst.updater = updateQueue;
|
6121 |
|
6122 | this._instance = inst;
|
6123 |
|
6124 |
|
6125 | ReactInstanceMap.set(inst, this);
|
6126 |
|
6127 | if ("development" !== 'production') {
|
6128 |
|
6129 |
|
6130 |
|
6131 | "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;
|
6132 | "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;
|
6133 | "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;
|
6134 | "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;
|
6135 | "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;
|
6136 | "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;
|
6137 | "development" !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
|
6138 | }
|
6139 |
|
6140 | var initialState = inst.state;
|
6141 | if (initialState === undefined) {
|
6142 | inst.state = initialState = null;
|
6143 | }
|
6144 | !(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;
|
6145 |
|
6146 | this._pendingStateQueue = null;
|
6147 | this._pendingReplaceState = false;
|
6148 | this._pendingForceUpdate = false;
|
6149 |
|
6150 | var markup;
|
6151 | if (inst.unstable_handleError) {
|
6152 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
6153 | } else {
|
6154 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
6155 | }
|
6156 |
|
6157 | if (inst.componentDidMount) {
|
6158 | if ("development" !== 'production') {
|
6159 | transaction.getReactMountReady().enqueue(function () {
|
6160 | measureLifeCyclePerf(function () {
|
6161 | return inst.componentDidMount();
|
6162 | }, _this._debugID, 'componentDidMount');
|
6163 | });
|
6164 | } else {
|
6165 | transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
|
6166 | }
|
6167 | }
|
6168 |
|
6169 | return markup;
|
6170 | },
|
6171 |
|
6172 | _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
|
6173 | if ("development" !== 'production') {
|
6174 | ReactCurrentOwner.current = this;
|
6175 | try {
|
6176 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
6177 | } finally {
|
6178 | ReactCurrentOwner.current = null;
|
6179 | }
|
6180 | } else {
|
6181 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
6182 | }
|
6183 | },
|
6184 |
|
6185 | _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
|
6186 | var Component = this._currentElement.type;
|
6187 |
|
6188 | if (doConstruct) {
|
6189 | if ("development" !== 'production') {
|
6190 | return measureLifeCyclePerf(function () {
|
6191 | return new Component(publicProps, publicContext, updateQueue);
|
6192 | }, this._debugID, 'ctor');
|
6193 | } else {
|
6194 | return new Component(publicProps, publicContext, updateQueue);
|
6195 | }
|
6196 | }
|
6197 |
|
6198 |
|
6199 |
|
6200 | if ("development" !== 'production') {
|
6201 | return measureLifeCyclePerf(function () {
|
6202 | return Component(publicProps, publicContext, updateQueue);
|
6203 | }, this._debugID, 'render');
|
6204 | } else {
|
6205 | return Component(publicProps, publicContext, updateQueue);
|
6206 | }
|
6207 | },
|
6208 |
|
6209 | performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
6210 | var markup;
|
6211 | var checkpoint = transaction.checkpoint();
|
6212 | try {
|
6213 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
6214 | } catch (e) {
|
6215 |
|
6216 | transaction.rollback(checkpoint);
|
6217 | this._instance.unstable_handleError(e);
|
6218 | if (this._pendingStateQueue) {
|
6219 | this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
|
6220 | }
|
6221 | checkpoint = transaction.checkpoint();
|
6222 |
|
6223 | this._renderedComponent.unmountComponent(true);
|
6224 | transaction.rollback(checkpoint);
|
6225 |
|
6226 |
|
6227 |
|
6228 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
6229 | }
|
6230 | return markup;
|
6231 | },
|
6232 |
|
6233 | performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
6234 | var inst = this._instance;
|
6235 |
|
6236 | var debugID = 0;
|
6237 | if ("development" !== 'production') {
|
6238 | debugID = this._debugID;
|
6239 | }
|
6240 |
|
6241 | if (inst.componentWillMount) {
|
6242 | if ("development" !== 'production') {
|
6243 | measureLifeCyclePerf(function () {
|
6244 | return inst.componentWillMount();
|
6245 | }, debugID, 'componentWillMount');
|
6246 | } else {
|
6247 | inst.componentWillMount();
|
6248 | }
|
6249 |
|
6250 |
|
6251 | if (this._pendingStateQueue) {
|
6252 | inst.state = this._processPendingState(inst.props, inst.context);
|
6253 | }
|
6254 | }
|
6255 |
|
6256 |
|
6257 | if (renderedElement === undefined) {
|
6258 | renderedElement = this._renderValidatedComponent();
|
6259 | }
|
6260 |
|
6261 | var nodeType = ReactNodeTypes.getType(renderedElement);
|
6262 | this._renderedNodeType = nodeType;
|
6263 | var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY
|
6264 | );
|
6265 | this._renderedComponent = child;
|
6266 |
|
6267 | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
|
6268 |
|
6269 | if ("development" !== 'production') {
|
6270 | if (debugID !== 0) {
|
6271 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
6272 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
6273 | }
|
6274 | }
|
6275 |
|
6276 | return markup;
|
6277 | },
|
6278 |
|
6279 | getHostNode: function () {
|
6280 | return ReactReconciler.getHostNode(this._renderedComponent);
|
6281 | },
|
6282 |
|
6283 | |
6284 |
|
6285 |
|
6286 |
|
6287 |
|
6288 |
|
6289 | unmountComponent: function (safely) {
|
6290 | if (!this._renderedComponent) {
|
6291 | return;
|
6292 | }
|
6293 |
|
6294 | var inst = this._instance;
|
6295 |
|
6296 | if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
|
6297 | inst._calledComponentWillUnmount = true;
|
6298 |
|
6299 | if (safely) {
|
6300 | var name = this.getName() + '.componentWillUnmount()';
|
6301 | ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
|
6302 | } else {
|
6303 | if ("development" !== 'production') {
|
6304 | measureLifeCyclePerf(function () {
|
6305 | return inst.componentWillUnmount();
|
6306 | }, this._debugID, 'componentWillUnmount');
|
6307 | } else {
|
6308 | inst.componentWillUnmount();
|
6309 | }
|
6310 | }
|
6311 | }
|
6312 |
|
6313 | if (this._renderedComponent) {
|
6314 | ReactReconciler.unmountComponent(this._renderedComponent, safely);
|
6315 | this._renderedNodeType = null;
|
6316 | this._renderedComponent = null;
|
6317 | this._instance = null;
|
6318 | }
|
6319 |
|
6320 |
|
6321 |
|
6322 |
|
6323 | this._pendingStateQueue = null;
|
6324 | this._pendingReplaceState = false;
|
6325 | this._pendingForceUpdate = false;
|
6326 | this._pendingCallbacks = null;
|
6327 | this._pendingElement = null;
|
6328 |
|
6329 |
|
6330 |
|
6331 | this._context = null;
|
6332 | this._rootNodeID = 0;
|
6333 | this._topLevelWrapper = null;
|
6334 |
|
6335 |
|
6336 |
|
6337 |
|
6338 | ReactInstanceMap.remove(inst);
|
6339 |
|
6340 |
|
6341 |
|
6342 |
|
6343 |
|
6344 |
|
6345 | },
|
6346 |
|
6347 | |
6348 |
|
6349 |
|
6350 |
|
6351 |
|
6352 |
|
6353 |
|
6354 |
|
6355 | _maskContext: function (context) {
|
6356 | var Component = this._currentElement.type;
|
6357 | var contextTypes = Component.contextTypes;
|
6358 | if (!contextTypes) {
|
6359 | return emptyObject;
|
6360 | }
|
6361 | var maskedContext = {};
|
6362 | for (var contextName in contextTypes) {
|
6363 | maskedContext[contextName] = context[contextName];
|
6364 | }
|
6365 | return maskedContext;
|
6366 | },
|
6367 |
|
6368 | |
6369 |
|
6370 |
|
6371 |
|
6372 |
|
6373 |
|
6374 |
|
6375 |
|
6376 | _processContext: function (context) {
|
6377 | var maskedContext = this._maskContext(context);
|
6378 | if ("development" !== 'production') {
|
6379 | var Component = this._currentElement.type;
|
6380 | if (Component.contextTypes) {
|
6381 | this._checkContextTypes(Component.contextTypes, maskedContext, ReactPropTypeLocations.context);
|
6382 | }
|
6383 | }
|
6384 | return maskedContext;
|
6385 | },
|
6386 |
|
6387 | |
6388 |
|
6389 |
|
6390 |
|
6391 |
|
6392 | _processChildContext: function (currentContext) {
|
6393 | var Component = this._currentElement.type;
|
6394 | var inst = this._instance;
|
6395 | var childContext;
|
6396 |
|
6397 | if (inst.getChildContext) {
|
6398 | if ("development" !== 'production') {
|
6399 | ReactInstrumentation.debugTool.onBeginProcessingChildContext();
|
6400 | try {
|
6401 | childContext = inst.getChildContext();
|
6402 | } finally {
|
6403 | ReactInstrumentation.debugTool.onEndProcessingChildContext();
|
6404 | }
|
6405 | } else {
|
6406 | childContext = inst.getChildContext();
|
6407 | }
|
6408 | }
|
6409 |
|
6410 | if (childContext) {
|
6411 | !(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;
|
6412 | if ("development" !== 'production') {
|
6413 | this._checkContextTypes(Component.childContextTypes, childContext, ReactPropTypeLocations.childContext);
|
6414 | }
|
6415 | for (var name in childContext) {
|
6416 | !(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;
|
6417 | }
|
6418 | return _assign({}, currentContext, childContext);
|
6419 | }
|
6420 | return currentContext;
|
6421 | },
|
6422 |
|
6423 | |
6424 |
|
6425 |
|
6426 |
|
6427 |
|
6428 |
|
6429 |
|
6430 |
|
6431 | _checkContextTypes: function (typeSpecs, values, location) {
|
6432 | checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
|
6433 | },
|
6434 |
|
6435 | receiveComponent: function (nextElement, transaction, nextContext) {
|
6436 | var prevElement = this._currentElement;
|
6437 | var prevContext = this._context;
|
6438 |
|
6439 | this._pendingElement = null;
|
6440 |
|
6441 | this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
|
6442 | },
|
6443 |
|
6444 | |
6445 |
|
6446 |
|
6447 |
|
6448 |
|
6449 |
|
6450 |
|
6451 | performUpdateIfNecessary: function (transaction) {
|
6452 | if (this._pendingElement != null) {
|
6453 | ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
|
6454 | } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
|
6455 | this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
|
6456 | } else {
|
6457 | this._updateBatchNumber = null;
|
6458 | }
|
6459 | },
|
6460 |
|
6461 | |
6462 |
|
6463 |
|
6464 |
|
6465 |
|
6466 |
|
6467 |
|
6468 |
|
6469 |
|
6470 |
|
6471 |
|
6472 |
|
6473 |
|
6474 |
|
6475 |
|
6476 | updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
|
6477 | var inst = this._instance;
|
6478 | !(inst != null) ? "development" !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;
|
6479 |
|
6480 | var willReceive = false;
|
6481 | var nextContext;
|
6482 |
|
6483 |
|
6484 | if (this._context === nextUnmaskedContext) {
|
6485 | nextContext = inst.context;
|
6486 | } else {
|
6487 | nextContext = this._processContext(nextUnmaskedContext);
|
6488 | willReceive = true;
|
6489 | }
|
6490 |
|
6491 | var prevProps = prevParentElement.props;
|
6492 | var nextProps = nextParentElement.props;
|
6493 |
|
6494 |
|
6495 | if (prevParentElement !== nextParentElement) {
|
6496 | willReceive = true;
|
6497 | }
|
6498 |
|
6499 |
|
6500 |
|
6501 |
|
6502 | if (willReceive && inst.componentWillReceiveProps) {
|
6503 | if ("development" !== 'production') {
|
6504 | measureLifeCyclePerf(function () {
|
6505 | return inst.componentWillReceiveProps(nextProps, nextContext);
|
6506 | }, this._debugID, 'componentWillReceiveProps');
|
6507 | } else {
|
6508 | inst.componentWillReceiveProps(nextProps, nextContext);
|
6509 | }
|
6510 | }
|
6511 |
|
6512 | var nextState = this._processPendingState(nextProps, nextContext);
|
6513 | var shouldUpdate = true;
|
6514 |
|
6515 | if (!this._pendingForceUpdate) {
|
6516 | if (inst.shouldComponentUpdate) {
|
6517 | if ("development" !== 'production') {
|
6518 | shouldUpdate = measureLifeCyclePerf(function () {
|
6519 | return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
6520 | }, this._debugID, 'shouldComponentUpdate');
|
6521 | } else {
|
6522 | shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
6523 | }
|
6524 | } else {
|
6525 | if (this._compositeType === CompositeTypes.PureClass) {
|
6526 | shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
|
6527 | }
|
6528 | }
|
6529 | }
|
6530 |
|
6531 | if ("development" !== 'production') {
|
6532 | "development" !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;
|
6533 | }
|
6534 |
|
6535 | this._updateBatchNumber = null;
|
6536 | if (shouldUpdate) {
|
6537 | this._pendingForceUpdate = false;
|
6538 |
|
6539 | this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
|
6540 | } else {
|
6541 |
|
6542 |
|
6543 | this._currentElement = nextParentElement;
|
6544 | this._context = nextUnmaskedContext;
|
6545 | inst.props = nextProps;
|
6546 | inst.state = nextState;
|
6547 | inst.context = nextContext;
|
6548 | }
|
6549 | },
|
6550 |
|
6551 | _processPendingState: function (props, context) {
|
6552 | var inst = this._instance;
|
6553 | var queue = this._pendingStateQueue;
|
6554 | var replace = this._pendingReplaceState;
|
6555 | this._pendingReplaceState = false;
|
6556 | this._pendingStateQueue = null;
|
6557 |
|
6558 | if (!queue) {
|
6559 | return inst.state;
|
6560 | }
|
6561 |
|
6562 | if (replace && queue.length === 1) {
|
6563 | return queue[0];
|
6564 | }
|
6565 |
|
6566 | var nextState = _assign({}, replace ? queue[0] : inst.state);
|
6567 | for (var i = replace ? 1 : 0; i < queue.length; i++) {
|
6568 | var partial = queue[i];
|
6569 | _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
|
6570 | }
|
6571 |
|
6572 | return nextState;
|
6573 | },
|
6574 |
|
6575 | |
6576 |
|
6577 |
|
6578 |
|
6579 |
|
6580 |
|
6581 |
|
6582 |
|
6583 |
|
6584 |
|
6585 |
|
6586 |
|
6587 | _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
|
6588 | var _this2 = this;
|
6589 |
|
6590 | var inst = this._instance;
|
6591 |
|
6592 | var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
|
6593 | var prevProps;
|
6594 | var prevState;
|
6595 | var prevContext;
|
6596 | if (hasComponentDidUpdate) {
|
6597 | prevProps = inst.props;
|
6598 | prevState = inst.state;
|
6599 | prevContext = inst.context;
|
6600 | }
|
6601 |
|
6602 | if (inst.componentWillUpdate) {
|
6603 | if ("development" !== 'production') {
|
6604 | measureLifeCyclePerf(function () {
|
6605 | return inst.componentWillUpdate(nextProps, nextState, nextContext);
|
6606 | }, this._debugID, 'componentWillUpdate');
|
6607 | } else {
|
6608 | inst.componentWillUpdate(nextProps, nextState, nextContext);
|
6609 | }
|
6610 | }
|
6611 |
|
6612 | this._currentElement = nextElement;
|
6613 | this._context = unmaskedContext;
|
6614 | inst.props = nextProps;
|
6615 | inst.state = nextState;
|
6616 | inst.context = nextContext;
|
6617 |
|
6618 | this._updateRenderedComponent(transaction, unmaskedContext);
|
6619 |
|
6620 | if (hasComponentDidUpdate) {
|
6621 | if ("development" !== 'production') {
|
6622 | transaction.getReactMountReady().enqueue(function () {
|
6623 | measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
|
6624 | });
|
6625 | } else {
|
6626 | transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
|
6627 | }
|
6628 | }
|
6629 | },
|
6630 |
|
6631 | |
6632 |
|
6633 |
|
6634 |
|
6635 |
|
6636 |
|
6637 | _updateRenderedComponent: function (transaction, context) {
|
6638 | var prevComponentInstance = this._renderedComponent;
|
6639 | var prevRenderedElement = prevComponentInstance._currentElement;
|
6640 | var nextRenderedElement = this._renderValidatedComponent();
|
6641 |
|
6642 | var debugID = 0;
|
6643 | if ("development" !== 'production') {
|
6644 | debugID = this._debugID;
|
6645 | }
|
6646 |
|
6647 | if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
|
6648 | ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
|
6649 | } else {
|
6650 | var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
|
6651 | ReactReconciler.unmountComponent(prevComponentInstance, false);
|
6652 |
|
6653 | var nodeType = ReactNodeTypes.getType(nextRenderedElement);
|
6654 | this._renderedNodeType = nodeType;
|
6655 | var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY
|
6656 | );
|
6657 | this._renderedComponent = child;
|
6658 |
|
6659 | var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
|
6660 |
|
6661 | if ("development" !== 'production') {
|
6662 | if (debugID !== 0) {
|
6663 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
6664 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
6665 | }
|
6666 | }
|
6667 |
|
6668 | this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
|
6669 | }
|
6670 | },
|
6671 |
|
6672 | |
6673 |
|
6674 |
|
6675 |
|
6676 |
|
6677 | _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
|
6678 | ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
|
6679 | },
|
6680 |
|
6681 | |
6682 |
|
6683 |
|
6684 | _renderValidatedComponentWithoutOwnerOrContext: function () {
|
6685 | var inst = this._instance;
|
6686 | var renderedComponent;
|
6687 |
|
6688 | if ("development" !== 'production') {
|
6689 | renderedComponent = measureLifeCyclePerf(function () {
|
6690 | return inst.render();
|
6691 | }, this._debugID, 'render');
|
6692 | } else {
|
6693 | renderedComponent = inst.render();
|
6694 | }
|
6695 |
|
6696 | if ("development" !== 'production') {
|
6697 |
|
6698 | if (renderedComponent === undefined && inst.render._isMockFunction) {
|
6699 |
|
6700 |
|
6701 | renderedComponent = null;
|
6702 | }
|
6703 | }
|
6704 |
|
6705 | return renderedComponent;
|
6706 | },
|
6707 |
|
6708 | |
6709 |
|
6710 |
|
6711 | _renderValidatedComponent: function () {
|
6712 | var renderedComponent;
|
6713 | if ("development" !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {
|
6714 | ReactCurrentOwner.current = this;
|
6715 | try {
|
6716 | renderedComponent = this._renderValidatedComponentWithoutOwnerOrContext();
|
6717 | } finally {
|
6718 | ReactCurrentOwner.current = null;
|
6719 | }
|
6720 | } else {
|
6721 | renderedComponent = this._renderValidatedComponentWithoutOwnerOrContext();
|
6722 | }
|
6723 | !(
|
6724 |
|
6725 | renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent)) ? "development" !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;
|
6726 |
|
6727 | return renderedComponent;
|
6728 | },
|
6729 |
|
6730 | |
6731 |
|
6732 |
|
6733 |
|
6734 |
|
6735 |
|
6736 |
|
6737 |
|
6738 | attachRef: function (ref, component) {
|
6739 | var inst = this.getPublicInstance();
|
6740 | !(inst != null) ? "development" !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
|
6741 | var publicComponentInstance = component.getPublicInstance();
|
6742 | if ("development" !== 'production') {
|
6743 | var componentName = component && component.getName ? component.getName() : 'a component';
|
6744 | "development" !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
|
6745 | }
|
6746 | var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
|
6747 | refs[ref] = publicComponentInstance;
|
6748 | },
|
6749 |
|
6750 | |
6751 |
|
6752 |
|
6753 |
|
6754 |
|
6755 |
|
6756 |
|
6757 | detachRef: function (ref) {
|
6758 | var refs = this.getPublicInstance().refs;
|
6759 | delete refs[ref];
|
6760 | },
|
6761 |
|
6762 | |
6763 |
|
6764 |
|
6765 |
|
6766 |
|
6767 |
|
6768 | getName: function () {
|
6769 | var type = this._currentElement.type;
|
6770 | var constructor = this._instance && this._instance.constructor;
|
6771 | return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
|
6772 | },
|
6773 |
|
6774 | /**
|
6775 | * Get the publicly accessible representation of this component - i.e. what
|
6776 | * is exposed by refs and returned by render. Can be null for stateless
|
6777 | * components.
|
6778 | *
|
6779 | * @return {ReactComponent} the public component instance.
|
6780 | * @internal
|
6781 | */
|
6782 | getPublicInstance: function () {
|
6783 | var inst = this._instance;
|
6784 | if (this._compositeType === CompositeTypes.StatelessFunctional) {
|
6785 | return null;
|
6786 | }
|
6787 | return inst;
|
6788 | },
|
6789 |
|
6790 |
|
6791 | _instantiateReactComponent: null
|
6792 |
|
6793 | };
|
6794 |
|
6795 | var ReactCompositeComponent = {
|
6796 |
|
6797 | Mixin: ReactCompositeComponentMixin
|
6798 |
|
6799 | };
|
6800 |
|
6801 | module.exports = ReactCompositeComponent;
|
6802 | },{"119":119,"140":140,"144":144,"155":155,"162":162,"170":170,"171":171,"172":172,"34":34,"37":37,"61":61,"64":64,"72":72,"73":73,"79":79,"83":83,"88":88}],37:[function(_dereq_,module,exports){
|
6803 |
|
6804 |
|
6805 |
|
6806 |
|
6807 |
|
6808 |
|
6809 |
|
6810 |
|
6811 |
|
6812 |
|
6813 |
|
6814 | 'use strict';
|
6815 |
|
6816 |
|
6817 |
|
6818 |
|
6819 |
|
6820 |
|
6821 |
|
6822 |
|
6823 | var ReactCurrentOwner = {
|
6824 |
|
6825 | |
6826 |
|
6827 |
|
6828 |
|
6829 | current: null
|
6830 |
|
6831 | };
|
6832 |
|
6833 | module.exports = ReactCurrentOwner;
|
6834 | },{}],38:[function(_dereq_,module,exports){
|
6835 |
|
6836 |
|
6837 |
|
6838 |
|
6839 |
|
6840 |
|
6841 |
|
6842 |
|
6843 |
|
6844 |
|
6845 |
|
6846 |
|
6847 |
|
6848 | 'use strict';
|
6849 |
|
6850 | var ReactDOMComponentTree = _dereq_(42);
|
6851 | var ReactDefaultInjection = _dereq_(60);
|
6852 | var ReactMount = _dereq_(76);
|
6853 | var ReactReconciler = _dereq_(88);
|
6854 | var ReactUpdates = _dereq_(96);
|
6855 | var ReactVersion = _dereq_(97);
|
6856 |
|
6857 | var findDOMNode = _dereq_(123);
|
6858 | var getHostComponentFromComposite = _dereq_(130);
|
6859 | var renderSubtreeIntoContainer = _dereq_(141);
|
6860 | var warning = _dereq_(171);
|
6861 |
|
6862 | ReactDefaultInjection.inject();
|
6863 |
|
6864 | var ReactDOM = {
|
6865 | findDOMNode: findDOMNode,
|
6866 | render: ReactMount.render,
|
6867 | unmountComponentAtNode: ReactMount.unmountComponentAtNode,
|
6868 | version: ReactVersion,
|
6869 |
|
6870 |
|
6871 | unstable_batchedUpdates: ReactUpdates.batchedUpdates,
|
6872 | unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
|
6873 | };
|
6874 |
|
6875 |
|
6876 |
|
6877 |
|
6878 | if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
|
6879 | __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
|
6880 | ComponentTree: {
|
6881 | getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,
|
6882 | getNodeFromInstance: function (inst) {
|
6883 |
|
6884 | if (inst._renderedComponent) {
|
6885 | inst = getHostComponentFromComposite(inst);
|
6886 | }
|
6887 | if (inst) {
|
6888 | return ReactDOMComponentTree.getNodeFromInstance(inst);
|
6889 | } else {
|
6890 | return null;
|
6891 | }
|
6892 | }
|
6893 | },
|
6894 | Mount: ReactMount,
|
6895 | Reconciler: ReactReconciler
|
6896 | });
|
6897 | }
|
6898 |
|
6899 | if ("development" !== 'production') {
|
6900 | var ExecutionEnvironment = _dereq_(148);
|
6901 | if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
|
6902 |
|
6903 |
|
6904 | if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
|
6905 |
|
6906 | if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
|
6907 |
|
6908 | var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;
|
6909 | console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools');
|
6910 | }
|
6911 | }
|
6912 |
|
6913 | var testFunc = function testFn() {};
|
6914 | "development" !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
|
6915 |
|
6916 |
|
6917 |
|
6918 | var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
|
6919 |
|
6920 | "development" !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0;
|
6921 |
|
6922 | var expectedFeatures = [
|
6923 |
|
6924 | Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim];
|
6925 |
|
6926 | for (var i = 0; i < expectedFeatures.length; i++) {
|
6927 | if (!expectedFeatures[i]) {
|
6928 | "development" !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;
|
6929 | break;
|
6930 | }
|
6931 | }
|
6932 | }
|
6933 | }
|
6934 |
|
6935 | if ("development" !== 'production') {
|
6936 | var ReactInstrumentation = _dereq_(73);
|
6937 | var ReactDOMUnknownPropertyHook = _dereq_(57);
|
6938 | var ReactDOMNullInputValuePropHook = _dereq_(49);
|
6939 |
|
6940 | ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);
|
6941 | ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);
|
6942 | }
|
6943 |
|
6944 | module.exports = ReactDOM;
|
6945 | },{"123":123,"130":130,"141":141,"148":148,"171":171,"42":42,"49":49,"57":57,"60":60,"73":73,"76":76,"88":88,"96":96,"97":97}],39:[function(_dereq_,module,exports){
|
6946 |
|
6947 |
|
6948 |
|
6949 |
|
6950 |
|
6951 |
|
6952 |
|
6953 |
|
6954 |
|
6955 |
|
6956 |
|
6957 | 'use strict';
|
6958 |
|
6959 | var DisabledInputUtils = _dereq_(14);
|
6960 |
|
6961 |
|
6962 |
|
6963 |
|
6964 |
|
6965 | var ReactDOMButton = {
|
6966 | getHostProps: DisabledInputUtils.getHostProps
|
6967 | };
|
6968 |
|
6969 | module.exports = ReactDOMButton;
|
6970 | },{"14":14}],40:[function(_dereq_,module,exports){
|
6971 |
|
6972 |
|
6973 |
|
6974 |
|
6975 |
|
6976 |
|
6977 |
|
6978 |
|
6979 |
|
6980 |
|
6981 |
|
6982 |
|
6983 |
|
6984 | 'use strict';
|
6985 |
|
6986 | var _prodInvariant = _dereq_(140),
|
6987 | _assign = _dereq_(172);
|
6988 |
|
6989 | var AutoFocusUtils = _dereq_(1);
|
6990 | var CSSPropertyOperations = _dereq_(4);
|
6991 | var DOMLazyTree = _dereq_(8);
|
6992 | var DOMNamespaces = _dereq_(9);
|
6993 | var DOMProperty = _dereq_(10);
|
6994 | var DOMPropertyOperations = _dereq_(11);
|
6995 | var EventConstants = _dereq_(16);
|
6996 | var EventPluginHub = _dereq_(17);
|
6997 | var EventPluginRegistry = _dereq_(18);
|
6998 | var ReactBrowserEventEmitter = _dereq_(27);
|
6999 | var ReactDOMButton = _dereq_(39);
|
7000 | var ReactDOMComponentFlags = _dereq_(41);
|
7001 | var ReactDOMComponentTree = _dereq_(42);
|
7002 | var ReactDOMInput = _dereq_(48);
|
7003 | var ReactDOMOption = _dereq_(50);
|
7004 | var ReactDOMSelect = _dereq_(51);
|
7005 | var ReactDOMTextarea = _dereq_(55);
|
7006 | var ReactInstrumentation = _dereq_(73);
|
7007 | var ReactMultiChild = _dereq_(77);
|
7008 | var ReactServerRenderingTransaction = _dereq_(92);
|
7009 |
|
7010 | var emptyFunction = _dereq_(154);
|
7011 | var escapeTextContentForBrowser = _dereq_(122);
|
7012 | var invariant = _dereq_(162);
|
7013 | var isEventSupported = _dereq_(136);
|
7014 | var keyOf = _dereq_(166);
|
7015 | var shallowEqual = _dereq_(170);
|
7016 | var validateDOMNesting = _dereq_(146);
|
7017 | var warning = _dereq_(171);
|
7018 |
|
7019 | var Flags = ReactDOMComponentFlags;
|
7020 | var deleteListener = EventPluginHub.deleteListener;
|
7021 | var getNode = ReactDOMComponentTree.getNodeFromInstance;
|
7022 | var listenTo = ReactBrowserEventEmitter.listenTo;
|
7023 | var registrationNameModules = EventPluginRegistry.registrationNameModules;
|
7024 |
|
7025 |
|
7026 | var CONTENT_TYPES = { 'string': true, 'number': true };
|
7027 |
|
7028 | var STYLE = keyOf({ style: null });
|
7029 | var HTML = keyOf({ __html: null });
|
7030 | var RESERVED_PROPS = {
|
7031 | children: null,
|
7032 | dangerouslySetInnerHTML: null,
|
7033 | suppressContentEditableWarning: null
|
7034 | };
|
7035 |
|
7036 |
|
7037 | var DOC_FRAGMENT_TYPE = 11;
|
7038 |
|
7039 | function getDeclarationErrorAddendum(internalInstance) {
|
7040 | if (internalInstance) {
|
7041 | var owner = internalInstance._currentElement._owner || null;
|
7042 | if (owner) {
|
7043 | var name = owner.getName();
|
7044 | if (name) {
|
7045 | return ' This DOM node was rendered by `' + name + '`.';
|
7046 | }
|
7047 | }
|
7048 | }
|
7049 | return '';
|
7050 | }
|
7051 |
|
7052 | function friendlyStringify(obj) {
|
7053 | if (typeof obj === 'object') {
|
7054 | if (Array.isArray(obj)) {
|
7055 | return '[' + obj.map(friendlyStringify).join(', ') + ']';
|
7056 | } else {
|
7057 | var pairs = [];
|
7058 | for (var key in obj) {
|
7059 | if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
7060 | var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
|
7061 | pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
|
7062 | }
|
7063 | }
|
7064 | return '{' + pairs.join(', ') + '}';
|
7065 | }
|
7066 | } else if (typeof obj === 'string') {
|
7067 | return JSON.stringify(obj);
|
7068 | } else if (typeof obj === 'function') {
|
7069 | return '[function object]';
|
7070 | }
|
7071 |
|
7072 |
|
7073 | return String(obj);
|
7074 | }
|
7075 |
|
7076 | var styleMutationWarning = {};
|
7077 |
|
7078 | function checkAndWarnForMutatedStyle(style1, style2, component) {
|
7079 | if (style1 == null || style2 == null) {
|
7080 | return;
|
7081 | }
|
7082 | if (shallowEqual(style1, style2)) {
|
7083 | return;
|
7084 | }
|
7085 |
|
7086 | var componentName = component._tag;
|
7087 | var owner = component._currentElement._owner;
|
7088 | var ownerName;
|
7089 | if (owner) {
|
7090 | ownerName = owner.getName();
|
7091 | }
|
7092 |
|
7093 | var hash = ownerName + '|' + componentName;
|
7094 |
|
7095 | if (styleMutationWarning.hasOwnProperty(hash)) {
|
7096 | return;
|
7097 | }
|
7098 |
|
7099 | styleMutationWarning[hash] = true;
|
7100 |
|
7101 | "development" !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;
|
7102 | }
|
7103 |
|
7104 |
|
7105 |
|
7106 |
|
7107 |
|
7108 | function assertValidProps(component, props) {
|
7109 | if (!props) {
|
7110 | return;
|
7111 | }
|
7112 |
|
7113 | if (voidElementTags[component._tag]) {
|
7114 | !(props.children == null && props.dangerouslySetInnerHTML == null) ? "development" !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;
|
7115 | }
|
7116 | if (props.dangerouslySetInnerHTML != null) {
|
7117 | !(props.children == null) ? "development" !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
|
7118 | !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? "development" !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;
|
7119 | }
|
7120 | if ("development" !== 'production') {
|
7121 | "development" !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
|
7122 | "development" !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
|
7123 | "development" !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;
|
7124 | }
|
7125 | !(props.style == null || typeof props.style === 'object') ? "development" !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;
|
7126 | }
|
7127 |
|
7128 | function enqueuePutListener(inst, registrationName, listener, transaction) {
|
7129 | if (transaction instanceof ReactServerRenderingTransaction) {
|
7130 | return;
|
7131 | }
|
7132 | if ("development" !== 'production') {
|
7133 |
|
7134 |
|
7135 | "development" !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0;
|
7136 | }
|
7137 | var containerInfo = inst._hostContainerInfo;
|
7138 | var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
|
7139 | var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
|
7140 | listenTo(registrationName, doc);
|
7141 | transaction.getReactMountReady().enqueue(putListener, {
|
7142 | inst: inst,
|
7143 | registrationName: registrationName,
|
7144 | listener: listener
|
7145 | });
|
7146 | }
|
7147 |
|
7148 | function putListener() {
|
7149 | var listenerToPut = this;
|
7150 | EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
|
7151 | }
|
7152 |
|
7153 | function inputPostMount() {
|
7154 | var inst = this;
|
7155 | ReactDOMInput.postMountWrapper(inst);
|
7156 | }
|
7157 |
|
7158 | function textareaPostMount() {
|
7159 | var inst = this;
|
7160 | ReactDOMTextarea.postMountWrapper(inst);
|
7161 | }
|
7162 |
|
7163 | function optionPostMount() {
|
7164 | var inst = this;
|
7165 | ReactDOMOption.postMountWrapper(inst);
|
7166 | }
|
7167 |
|
7168 | var setAndValidateContentChildDev = emptyFunction;
|
7169 | if ("development" !== 'production') {
|
7170 | setAndValidateContentChildDev = function (content) {
|
7171 | var hasExistingContent = this._contentDebugID != null;
|
7172 | var debugID = this._debugID;
|
7173 |
|
7174 | var contentDebugID = -debugID;
|
7175 |
|
7176 | if (content == null) {
|
7177 | if (hasExistingContent) {
|
7178 | ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
|
7179 | }
|
7180 | this._contentDebugID = null;
|
7181 | return;
|
7182 | }
|
7183 |
|
7184 | validateDOMNesting(null, String(content), this, this._ancestorInfo);
|
7185 | this._contentDebugID = contentDebugID;
|
7186 | if (hasExistingContent) {
|
7187 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
|
7188 | ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
|
7189 | } else {
|
7190 | ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
|
7191 | ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
|
7192 | ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
|
7193 | }
|
7194 | };
|
7195 | }
|
7196 |
|
7197 |
|
7198 |
|
7199 | var mediaEvents = {
|
7200 | topAbort: 'abort',
|
7201 | topCanPlay: 'canplay',
|
7202 | topCanPlayThrough: 'canplaythrough',
|
7203 | topDurationChange: 'durationchange',
|
7204 | topEmptied: 'emptied',
|
7205 | topEncrypted: 'encrypted',
|
7206 | topEnded: 'ended',
|
7207 | topError: 'error',
|
7208 | topLoadedData: 'loadeddata',
|
7209 | topLoadedMetadata: 'loadedmetadata',
|
7210 | topLoadStart: 'loadstart',
|
7211 | topPause: 'pause',
|
7212 | topPlay: 'play',
|
7213 | topPlaying: 'playing',
|
7214 | topProgress: 'progress',
|
7215 | topRateChange: 'ratechange',
|
7216 | topSeeked: 'seeked',
|
7217 | topSeeking: 'seeking',
|
7218 | topStalled: 'stalled',
|
7219 | topSuspend: 'suspend',
|
7220 | topTimeUpdate: 'timeupdate',
|
7221 | topVolumeChange: 'volumechange',
|
7222 | topWaiting: 'waiting'
|
7223 | };
|
7224 |
|
7225 | function trapBubbledEventsLocal() {
|
7226 | var inst = this;
|
7227 |
|
7228 |
|
7229 | !inst._rootNodeID ? "development" !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
|
7230 | var node = getNode(inst);
|
7231 | !node ? "development" !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
|
7232 |
|
7233 | switch (inst._tag) {
|
7234 | case 'iframe':
|
7235 | case 'object':
|
7236 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
|
7237 | break;
|
7238 | case 'video':
|
7239 | case 'audio':
|
7240 |
|
7241 | inst._wrapperState.listeners = [];
|
7242 |
|
7243 | for (var event in mediaEvents) {
|
7244 | if (mediaEvents.hasOwnProperty(event)) {
|
7245 | inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event], mediaEvents[event], node));
|
7246 | }
|
7247 | }
|
7248 | break;
|
7249 | case 'source':
|
7250 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node)];
|
7251 | break;
|
7252 | case 'img':
|
7253 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
|
7254 | break;
|
7255 | case 'form':
|
7256 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit', node)];
|
7257 | break;
|
7258 | case 'input':
|
7259 | case 'select':
|
7260 | case 'textarea':
|
7261 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topInvalid, 'invalid', node)];
|
7262 | break;
|
7263 | }
|
7264 | }
|
7265 |
|
7266 | function postUpdateSelectWrapper() {
|
7267 | ReactDOMSelect.postUpdateWrapper(this);
|
7268 | }
|
7269 |
|
7270 |
|
7271 |
|
7272 |
|
7273 | var omittedCloseTags = {
|
7274 | 'area': true,
|
7275 | 'base': true,
|
7276 | 'br': true,
|
7277 | 'col': true,
|
7278 | 'embed': true,
|
7279 | 'hr': true,
|
7280 | 'img': true,
|
7281 | 'input': true,
|
7282 | 'keygen': true,
|
7283 | 'link': true,
|
7284 | 'meta': true,
|
7285 | 'param': true,
|
7286 | 'source': true,
|
7287 | 'track': true,
|
7288 | 'wbr': true
|
7289 | };
|
7290 |
|
7291 |
|
7292 | var newlineEatingTags = {
|
7293 | 'listing': true,
|
7294 | 'pre': true,
|
7295 | 'textarea': true
|
7296 | };
|
7297 |
|
7298 |
|
7299 |
|
7300 |
|
7301 | var voidElementTags = _assign({
|
7302 | 'menuitem': true
|
7303 | }, omittedCloseTags);
|
7304 |
|
7305 |
|
7306 |
|
7307 |
|
7308 |
|
7309 | var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/;
|
7310 | var validatedTagCache = {};
|
7311 | var hasOwnProperty = {}.hasOwnProperty;
|
7312 |
|
7313 | function validateDangerousTag(tag) {
|
7314 | if (!hasOwnProperty.call(validatedTagCache, tag)) {
|
7315 | !VALID_TAG_REGEX.test(tag) ? "development" !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
|
7316 | validatedTagCache[tag] = true;
|
7317 | }
|
7318 | }
|
7319 |
|
7320 | function isCustomComponent(tagName, props) {
|
7321 | return tagName.indexOf('-') >= 0 || props.is != null;
|
7322 | }
|
7323 |
|
7324 | var globalIdCounter = 1;
|
7325 |
|
7326 |
|
7327 |
|
7328 |
|
7329 |
|
7330 |
|
7331 |
|
7332 |
|
7333 |
|
7334 |
|
7335 |
|
7336 |
|
7337 |
|
7338 |
|
7339 |
|
7340 | function ReactDOMComponent(element) {
|
7341 | var tag = element.type;
|
7342 | validateDangerousTag(tag);
|
7343 | this._currentElement = element;
|
7344 | this._tag = tag.toLowerCase();
|
7345 | this._namespaceURI = null;
|
7346 | this._renderedChildren = null;
|
7347 | this._previousStyle = null;
|
7348 | this._previousStyleCopy = null;
|
7349 | this._hostNode = null;
|
7350 | this._hostParent = null;
|
7351 | this._rootNodeID = 0;
|
7352 | this._domID = 0;
|
7353 | this._hostContainerInfo = null;
|
7354 | this._wrapperState = null;
|
7355 | this._topLevelWrapper = null;
|
7356 | this._flags = 0;
|
7357 | if ("development" !== 'production') {
|
7358 | this._ancestorInfo = null;
|
7359 | setAndValidateContentChildDev.call(this, null);
|
7360 | }
|
7361 | }
|
7362 |
|
7363 | ReactDOMComponent.displayName = 'ReactDOMComponent';
|
7364 |
|
7365 | ReactDOMComponent.Mixin = {
|
7366 |
|
7367 | |
7368 |
|
7369 |
|
7370 |
|
7371 |
|
7372 |
|
7373 |
|
7374 |
|
7375 |
|
7376 |
|
7377 |
|
7378 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
7379 | this._rootNodeID = globalIdCounter++;
|
7380 | this._domID = hostContainerInfo._idCounter++;
|
7381 | this._hostParent = hostParent;
|
7382 | this._hostContainerInfo = hostContainerInfo;
|
7383 |
|
7384 | var props = this._currentElement.props;
|
7385 |
|
7386 | switch (this._tag) {
|
7387 | case 'audio':
|
7388 | case 'form':
|
7389 | case 'iframe':
|
7390 | case 'img':
|
7391 | case 'link':
|
7392 | case 'object':
|
7393 | case 'source':
|
7394 | case 'video':
|
7395 | this._wrapperState = {
|
7396 | listeners: null
|
7397 | };
|
7398 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
7399 | break;
|
7400 | case 'button':
|
7401 | props = ReactDOMButton.getHostProps(this, props, hostParent);
|
7402 | break;
|
7403 | case 'input':
|
7404 | ReactDOMInput.mountWrapper(this, props, hostParent);
|
7405 | props = ReactDOMInput.getHostProps(this, props);
|
7406 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
7407 | break;
|
7408 | case 'option':
|
7409 | ReactDOMOption.mountWrapper(this, props, hostParent);
|
7410 | props = ReactDOMOption.getHostProps(this, props);
|
7411 | break;
|
7412 | case 'select':
|
7413 | ReactDOMSelect.mountWrapper(this, props, hostParent);
|
7414 | props = ReactDOMSelect.getHostProps(this, props);
|
7415 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
7416 | break;
|
7417 | case 'textarea':
|
7418 | ReactDOMTextarea.mountWrapper(this, props, hostParent);
|
7419 | props = ReactDOMTextarea.getHostProps(this, props);
|
7420 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
7421 | break;
|
7422 | }
|
7423 |
|
7424 | assertValidProps(this, props);
|
7425 |
|
7426 |
|
7427 |
|
7428 | var namespaceURI;
|
7429 | var parentTag;
|
7430 | if (hostParent != null) {
|
7431 | namespaceURI = hostParent._namespaceURI;
|
7432 | parentTag = hostParent._tag;
|
7433 | } else if (hostContainerInfo._tag) {
|
7434 | namespaceURI = hostContainerInfo._namespaceURI;
|
7435 | parentTag = hostContainerInfo._tag;
|
7436 | }
|
7437 | if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
|
7438 | namespaceURI = DOMNamespaces.html;
|
7439 | }
|
7440 | if (namespaceURI === DOMNamespaces.html) {
|
7441 | if (this._tag === 'svg') {
|
7442 | namespaceURI = DOMNamespaces.svg;
|
7443 | } else if (this._tag === 'math') {
|
7444 | namespaceURI = DOMNamespaces.mathml;
|
7445 | }
|
7446 | }
|
7447 | this._namespaceURI = namespaceURI;
|
7448 |
|
7449 | if ("development" !== 'production') {
|
7450 | var parentInfo;
|
7451 | if (hostParent != null) {
|
7452 | parentInfo = hostParent._ancestorInfo;
|
7453 | } else if (hostContainerInfo._tag) {
|
7454 | parentInfo = hostContainerInfo._ancestorInfo;
|
7455 | }
|
7456 | if (parentInfo) {
|
7457 |
|
7458 |
|
7459 | validateDOMNesting(this._tag, null, this, parentInfo);
|
7460 | }
|
7461 | this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
|
7462 | }
|
7463 |
|
7464 | var mountImage;
|
7465 | if (transaction.useCreateElement) {
|
7466 | var ownerDocument = hostContainerInfo._ownerDocument;
|
7467 | var el;
|
7468 | if (namespaceURI === DOMNamespaces.html) {
|
7469 | if (this._tag === 'script') {
|
7470 |
|
7471 |
|
7472 | var div = ownerDocument.createElement('div');
|
7473 | var type = this._currentElement.type;
|
7474 | div.innerHTML = '<' + type + '></' + type + '>';
|
7475 | el = div.removeChild(div.firstChild);
|
7476 | } else if (props.is) {
|
7477 | el = ownerDocument.createElement(this._currentElement.type, props.is);
|
7478 | } else {
|
7479 |
|
7480 |
|
7481 |
|
7482 | el = ownerDocument.createElement(this._currentElement.type);
|
7483 | }
|
7484 | } else {
|
7485 | el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
|
7486 | }
|
7487 | ReactDOMComponentTree.precacheNode(this, el);
|
7488 | this._flags |= Flags.hasCachedChildNodes;
|
7489 | if (!this._hostParent) {
|
7490 | DOMPropertyOperations.setAttributeForRoot(el);
|
7491 | }
|
7492 | this._updateDOMProperties(null, props, transaction);
|
7493 | var lazyTree = DOMLazyTree(el);
|
7494 | this._createInitialChildren(transaction, props, context, lazyTree);
|
7495 | mountImage = lazyTree;
|
7496 | } else {
|
7497 | var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
|
7498 | var tagContent = this._createContentMarkup(transaction, props, context);
|
7499 | if (!tagContent && omittedCloseTags[this._tag]) {
|
7500 | mountImage = tagOpen + '/>';
|
7501 | } else {
|
7502 | mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
|
7503 | }
|
7504 | }
|
7505 |
|
7506 | switch (this._tag) {
|
7507 | case 'input':
|
7508 | transaction.getReactMountReady().enqueue(inputPostMount, this);
|
7509 | if (props.autoFocus) {
|
7510 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
7511 | }
|
7512 | break;
|
7513 | case 'textarea':
|
7514 | transaction.getReactMountReady().enqueue(textareaPostMount, this);
|
7515 | if (props.autoFocus) {
|
7516 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
7517 | }
|
7518 | break;
|
7519 | case 'select':
|
7520 | if (props.autoFocus) {
|
7521 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
7522 | }
|
7523 | break;
|
7524 | case 'button':
|
7525 | if (props.autoFocus) {
|
7526 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
7527 | }
|
7528 | break;
|
7529 | case 'option':
|
7530 | transaction.getReactMountReady().enqueue(optionPostMount, this);
|
7531 | break;
|
7532 | }
|
7533 |
|
7534 | return mountImage;
|
7535 | },
|
7536 |
|
7537 | |
7538 |
|
7539 |
|
7540 |
|
7541 |
|
7542 |
|
7543 |
|
7544 |
|
7545 |
|
7546 |
|
7547 |
|
7548 |
|
7549 |
|
7550 | _createOpenTagMarkupAndPutListeners: function (transaction, props) {
|
7551 | var ret = '<' + this._currentElement.type;
|
7552 |
|
7553 | for (var propKey in props) {
|
7554 | if (!props.hasOwnProperty(propKey)) {
|
7555 | continue;
|
7556 | }
|
7557 | var propValue = props[propKey];
|
7558 | if (propValue == null) {
|
7559 | continue;
|
7560 | }
|
7561 | if (registrationNameModules.hasOwnProperty(propKey)) {
|
7562 | if (propValue) {
|
7563 | enqueuePutListener(this, propKey, propValue, transaction);
|
7564 | }
|
7565 | } else {
|
7566 | if (propKey === STYLE) {
|
7567 | if (propValue) {
|
7568 | if ("development" !== 'production') {
|
7569 |
|
7570 | this._previousStyle = propValue;
|
7571 | }
|
7572 | propValue = this._previousStyleCopy = _assign({}, props.style);
|
7573 | }
|
7574 | propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
|
7575 | }
|
7576 | var markup = null;
|
7577 | if (this._tag != null && isCustomComponent(this._tag, props)) {
|
7578 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
7579 | markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
|
7580 | }
|
7581 | } else {
|
7582 | markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
|
7583 | }
|
7584 | if (markup) {
|
7585 | ret += ' ' + markup;
|
7586 | }
|
7587 | }
|
7588 | }
|
7589 |
|
7590 |
|
7591 |
|
7592 | if (transaction.renderToStaticMarkup) {
|
7593 | return ret;
|
7594 | }
|
7595 |
|
7596 | if (!this._hostParent) {
|
7597 | ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
|
7598 | }
|
7599 | ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
|
7600 | return ret;
|
7601 | },
|
7602 |
|
7603 | |
7604 |
|
7605 |
|
7606 |
|
7607 |
|
7608 |
|
7609 |
|
7610 |
|
7611 |
|
7612 | _createContentMarkup: function (transaction, props, context) {
|
7613 | var ret = '';
|
7614 |
|
7615 |
|
7616 | var innerHTML = props.dangerouslySetInnerHTML;
|
7617 | if (innerHTML != null) {
|
7618 | if (innerHTML.__html != null) {
|
7619 | ret = innerHTML.__html;
|
7620 | }
|
7621 | } else {
|
7622 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
7623 | var childrenToUse = contentToUse != null ? null : props.children;
|
7624 | if (contentToUse != null) {
|
7625 |
|
7626 | ret = escapeTextContentForBrowser(contentToUse);
|
7627 | if ("development" !== 'production') {
|
7628 | setAndValidateContentChildDev.call(this, contentToUse);
|
7629 | }
|
7630 | } else if (childrenToUse != null) {
|
7631 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
7632 | ret = mountImages.join('');
|
7633 | }
|
7634 | }
|
7635 | if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
|
7636 |
|
7637 |
|
7638 |
|
7639 |
|
7640 |
|
7641 |
|
7642 |
|
7643 |
|
7644 |
|
7645 |
|
7646 | return '\n' + ret;
|
7647 | } else {
|
7648 | return ret;
|
7649 | }
|
7650 | },
|
7651 |
|
7652 | _createInitialChildren: function (transaction, props, context, lazyTree) {
|
7653 |
|
7654 | var innerHTML = props.dangerouslySetInnerHTML;
|
7655 | if (innerHTML != null) {
|
7656 | if (innerHTML.__html != null) {
|
7657 | DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
|
7658 | }
|
7659 | } else {
|
7660 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
7661 | var childrenToUse = contentToUse != null ? null : props.children;
|
7662 | if (contentToUse != null) {
|
7663 |
|
7664 | if ("development" !== 'production') {
|
7665 | setAndValidateContentChildDev.call(this, contentToUse);
|
7666 | }
|
7667 | DOMLazyTree.queueText(lazyTree, contentToUse);
|
7668 | } else if (childrenToUse != null) {
|
7669 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
7670 | for (var i = 0; i < mountImages.length; i++) {
|
7671 | DOMLazyTree.queueChild(lazyTree, mountImages[i]);
|
7672 | }
|
7673 | }
|
7674 | }
|
7675 | },
|
7676 |
|
7677 | |
7678 |
|
7679 |
|
7680 |
|
7681 |
|
7682 |
|
7683 |
|
7684 |
|
7685 | receiveComponent: function (nextElement, transaction, context) {
|
7686 | var prevElement = this._currentElement;
|
7687 | this._currentElement = nextElement;
|
7688 | this.updateComponent(transaction, prevElement, nextElement, context);
|
7689 | },
|
7690 |
|
7691 | |
7692 |
|
7693 |
|
7694 |
|
7695 |
|
7696 |
|
7697 |
|
7698 |
|
7699 |
|
7700 |
|
7701 | updateComponent: function (transaction, prevElement, nextElement, context) {
|
7702 | var lastProps = prevElement.props;
|
7703 | var nextProps = this._currentElement.props;
|
7704 |
|
7705 | switch (this._tag) {
|
7706 | case 'button':
|
7707 | lastProps = ReactDOMButton.getHostProps(this, lastProps);
|
7708 | nextProps = ReactDOMButton.getHostProps(this, nextProps);
|
7709 | break;
|
7710 | case 'input':
|
7711 | lastProps = ReactDOMInput.getHostProps(this, lastProps);
|
7712 | nextProps = ReactDOMInput.getHostProps(this, nextProps);
|
7713 | break;
|
7714 | case 'option':
|
7715 | lastProps = ReactDOMOption.getHostProps(this, lastProps);
|
7716 | nextProps = ReactDOMOption.getHostProps(this, nextProps);
|
7717 | break;
|
7718 | case 'select':
|
7719 | lastProps = ReactDOMSelect.getHostProps(this, lastProps);
|
7720 | nextProps = ReactDOMSelect.getHostProps(this, nextProps);
|
7721 | break;
|
7722 | case 'textarea':
|
7723 | lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
|
7724 | nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
|
7725 | break;
|
7726 | }
|
7727 |
|
7728 | assertValidProps(this, nextProps);
|
7729 | this._updateDOMProperties(lastProps, nextProps, transaction);
|
7730 | this._updateDOMChildren(lastProps, nextProps, transaction, context);
|
7731 |
|
7732 | switch (this._tag) {
|
7733 | case 'input':
|
7734 |
|
7735 |
|
7736 |
|
7737 | ReactDOMInput.updateWrapper(this);
|
7738 | break;
|
7739 | case 'textarea':
|
7740 | ReactDOMTextarea.updateWrapper(this);
|
7741 | break;
|
7742 | case 'select':
|
7743 |
|
7744 |
|
7745 | transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
|
7746 | break;
|
7747 | }
|
7748 | },
|
7749 |
|
7750 | |
7751 |
|
7752 |
|
7753 |
|
7754 |
|
7755 |
|
7756 |
|
7757 |
|
7758 |
|
7759 |
|
7760 |
|
7761 |
|
7762 |
|
7763 |
|
7764 |
|
7765 |
|
7766 | _updateDOMProperties: function (lastProps, nextProps, transaction) {
|
7767 | var propKey;
|
7768 | var styleName;
|
7769 | var styleUpdates;
|
7770 | for (propKey in lastProps) {
|
7771 | if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
|
7772 | continue;
|
7773 | }
|
7774 | if (propKey === STYLE) {
|
7775 | var lastStyle = this._previousStyleCopy;
|
7776 | for (styleName in lastStyle) {
|
7777 | if (lastStyle.hasOwnProperty(styleName)) {
|
7778 | styleUpdates = styleUpdates || {};
|
7779 | styleUpdates[styleName] = '';
|
7780 | }
|
7781 | }
|
7782 | this._previousStyleCopy = null;
|
7783 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
7784 | if (lastProps[propKey]) {
|
7785 |
|
7786 |
|
7787 |
|
7788 | deleteListener(this, propKey);
|
7789 | }
|
7790 | } else if (isCustomComponent(this._tag, lastProps)) {
|
7791 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
7792 | DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
|
7793 | }
|
7794 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
7795 | DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
|
7796 | }
|
7797 | }
|
7798 | for (propKey in nextProps) {
|
7799 | var nextProp = nextProps[propKey];
|
7800 | var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
|
7801 | if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
|
7802 | continue;
|
7803 | }
|
7804 | if (propKey === STYLE) {
|
7805 | if (nextProp) {
|
7806 | if ("development" !== 'production') {
|
7807 | checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
|
7808 | this._previousStyle = nextProp;
|
7809 | }
|
7810 | nextProp = this._previousStyleCopy = _assign({}, nextProp);
|
7811 | } else {
|
7812 | this._previousStyleCopy = null;
|
7813 | }
|
7814 | if (lastProp) {
|
7815 |
|
7816 | for (styleName in lastProp) {
|
7817 | if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
|
7818 | styleUpdates = styleUpdates || {};
|
7819 | styleUpdates[styleName] = '';
|
7820 | }
|
7821 | }
|
7822 |
|
7823 | for (styleName in nextProp) {
|
7824 | if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
|
7825 | styleUpdates = styleUpdates || {};
|
7826 | styleUpdates[styleName] = nextProp[styleName];
|
7827 | }
|
7828 | }
|
7829 | } else {
|
7830 |
|
7831 | styleUpdates = nextProp;
|
7832 | }
|
7833 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
7834 | if (nextProp) {
|
7835 | enqueuePutListener(this, propKey, nextProp, transaction);
|
7836 | } else if (lastProp) {
|
7837 | deleteListener(this, propKey);
|
7838 | }
|
7839 | } else if (isCustomComponent(this._tag, nextProps)) {
|
7840 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
7841 | DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
|
7842 | }
|
7843 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
7844 | var node = getNode(this);
|
7845 |
|
7846 |
|
7847 |
|
7848 | if (nextProp != null) {
|
7849 | DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
|
7850 | } else {
|
7851 | DOMPropertyOperations.deleteValueForProperty(node, propKey);
|
7852 | }
|
7853 | }
|
7854 | }
|
7855 | if (styleUpdates) {
|
7856 | CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
|
7857 | }
|
7858 | },
|
7859 |
|
7860 | |
7861 |
|
7862 |
|
7863 |
|
7864 |
|
7865 |
|
7866 |
|
7867 |
|
7868 |
|
7869 | _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
|
7870 | var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
|
7871 | var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
|
7872 |
|
7873 | var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
|
7874 | var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
|
7875 |
|
7876 |
|
7877 | var lastChildren = lastContent != null ? null : lastProps.children;
|
7878 | var nextChildren = nextContent != null ? null : nextProps.children;
|
7879 |
|
7880 |
|
7881 |
|
7882 | var lastHasContentOrHtml = lastContent != null || lastHtml != null;
|
7883 | var nextHasContentOrHtml = nextContent != null || nextHtml != null;
|
7884 | if (lastChildren != null && nextChildren == null) {
|
7885 | this.updateChildren(null, transaction, context);
|
7886 | } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
|
7887 | this.updateTextContent('');
|
7888 | if ("development" !== 'production') {
|
7889 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
7890 | }
|
7891 | }
|
7892 |
|
7893 | if (nextContent != null) {
|
7894 | if (lastContent !== nextContent) {
|
7895 | this.updateTextContent('' + nextContent);
|
7896 | if ("development" !== 'production') {
|
7897 | setAndValidateContentChildDev.call(this, nextContent);
|
7898 | }
|
7899 | }
|
7900 | } else if (nextHtml != null) {
|
7901 | if (lastHtml !== nextHtml) {
|
7902 | this.updateMarkup('' + nextHtml);
|
7903 | }
|
7904 | if ("development" !== 'production') {
|
7905 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
7906 | }
|
7907 | } else if (nextChildren != null) {
|
7908 | if ("development" !== 'production') {
|
7909 | setAndValidateContentChildDev.call(this, null);
|
7910 | }
|
7911 |
|
7912 | this.updateChildren(nextChildren, transaction, context);
|
7913 | }
|
7914 | },
|
7915 |
|
7916 | getHostNode: function () {
|
7917 | return getNode(this);
|
7918 | },
|
7919 |
|
7920 | |
7921 |
|
7922 |
|
7923 |
|
7924 |
|
7925 |
|
7926 | unmountComponent: function (safely) {
|
7927 | switch (this._tag) {
|
7928 | case 'audio':
|
7929 | case 'form':
|
7930 | case 'iframe':
|
7931 | case 'img':
|
7932 | case 'link':
|
7933 | case 'object':
|
7934 | case 'source':
|
7935 | case 'video':
|
7936 | var listeners = this._wrapperState.listeners;
|
7937 | if (listeners) {
|
7938 | for (var i = 0; i < listeners.length; i++) {
|
7939 | listeners[i].remove();
|
7940 | }
|
7941 | }
|
7942 | break;
|
7943 | case 'html':
|
7944 | case 'head':
|
7945 | case 'body':
|
7946 | |
7947 |
|
7948 |
|
7949 |
|
7950 |
|
7951 |
|
7952 | !false ? "development" !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;
|
7953 | break;
|
7954 | }
|
7955 |
|
7956 | this.unmountChildren(safely);
|
7957 | ReactDOMComponentTree.uncacheNode(this);
|
7958 | EventPluginHub.deleteAllListeners(this);
|
7959 | this._rootNodeID = 0;
|
7960 | this._domID = 0;
|
7961 | this._wrapperState = null;
|
7962 |
|
7963 | if ("development" !== 'production') {
|
7964 | setAndValidateContentChildDev.call(this, null);
|
7965 | }
|
7966 | },
|
7967 |
|
7968 | getPublicInstance: function () {
|
7969 | return getNode(this);
|
7970 | }
|
7971 |
|
7972 | };
|
7973 |
|
7974 | _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
|
7975 |
|
7976 | module.exports = ReactDOMComponent;
|
7977 | },{"1":1,"10":10,"11":11,"122":122,"136":136,"140":140,"146":146,"154":154,"16":16,"162":162,"166":166,"17":17,"170":170,"171":171,"172":172,"18":18,"27":27,"39":39,"4":4,"41":41,"42":42,"48":48,"50":50,"51":51,"55":55,"73":73,"77":77,"8":8,"9":9,"92":92}],41:[function(_dereq_,module,exports){
|
7978 |
|
7979 |
|
7980 |
|
7981 |
|
7982 |
|
7983 |
|
7984 |
|
7985 |
|
7986 |
|
7987 |
|
7988 |
|
7989 | 'use strict';
|
7990 |
|
7991 | var ReactDOMComponentFlags = {
|
7992 | hasCachedChildNodes: 1 << 0
|
7993 | };
|
7994 |
|
7995 | module.exports = ReactDOMComponentFlags;
|
7996 | },{}],42:[function(_dereq_,module,exports){
|
7997 |
|
7998 |
|
7999 |
|
8000 |
|
8001 |
|
8002 |
|
8003 |
|
8004 |
|
8005 |
|
8006 |
|
8007 |
|
8008 | 'use strict';
|
8009 |
|
8010 | var _prodInvariant = _dereq_(140);
|
8011 |
|
8012 | var DOMProperty = _dereq_(10);
|
8013 | var ReactDOMComponentFlags = _dereq_(41);
|
8014 |
|
8015 | var invariant = _dereq_(162);
|
8016 |
|
8017 | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
|
8018 | var Flags = ReactDOMComponentFlags;
|
8019 |
|
8020 | var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
|
8021 |
|
8022 |
|
8023 |
|
8024 |
|
8025 |
|
8026 |
|
8027 |
|
8028 |
|
8029 | function getRenderedHostOrTextFromComponent(component) {
|
8030 | var rendered;
|
8031 | while (rendered = component._renderedComponent) {
|
8032 | component = rendered;
|
8033 | }
|
8034 | return component;
|
8035 | }
|
8036 |
|
8037 |
|
8038 |
|
8039 |
|
8040 |
|
8041 | function precacheNode(inst, node) {
|
8042 | var hostInst = getRenderedHostOrTextFromComponent(inst);
|
8043 | hostInst._hostNode = node;
|
8044 | node[internalInstanceKey] = hostInst;
|
8045 | }
|
8046 |
|
8047 | function uncacheNode(inst) {
|
8048 | var node = inst._hostNode;
|
8049 | if (node) {
|
8050 | delete node[internalInstanceKey];
|
8051 | inst._hostNode = null;
|
8052 | }
|
8053 | }
|
8054 |
|
8055 |
|
8056 |
|
8057 |
|
8058 |
|
8059 |
|
8060 |
|
8061 |
|
8062 |
|
8063 |
|
8064 |
|
8065 |
|
8066 |
|
8067 |
|
8068 |
|
8069 | function precacheChildNodes(inst, node) {
|
8070 | if (inst._flags & Flags.hasCachedChildNodes) {
|
8071 | return;
|
8072 | }
|
8073 | var children = inst._renderedChildren;
|
8074 | var childNode = node.firstChild;
|
8075 | outer: for (var name in children) {
|
8076 | if (!children.hasOwnProperty(name)) {
|
8077 | continue;
|
8078 | }
|
8079 | var childInst = children[name];
|
8080 | var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
|
8081 | if (childID === 0) {
|
8082 |
|
8083 | continue;
|
8084 | }
|
8085 |
|
8086 | for (; childNode !== null; childNode = childNode.nextSibling) {
|
8087 | if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') {
|
8088 | precacheNode(childInst, childNode);
|
8089 | continue outer;
|
8090 | }
|
8091 | }
|
8092 |
|
8093 | !false ? "development" !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
|
8094 | }
|
8095 | inst._flags |= Flags.hasCachedChildNodes;
|
8096 | }
|
8097 |
|
8098 |
|
8099 |
|
8100 |
|
8101 |
|
8102 | function getClosestInstanceFromNode(node) {
|
8103 | if (node[internalInstanceKey]) {
|
8104 | return node[internalInstanceKey];
|
8105 | }
|
8106 |
|
8107 |
|
8108 | var parents = [];
|
8109 | while (!node[internalInstanceKey]) {
|
8110 | parents.push(node);
|
8111 | if (node.parentNode) {
|
8112 | node = node.parentNode;
|
8113 | } else {
|
8114 |
|
8115 |
|
8116 | return null;
|
8117 | }
|
8118 | }
|
8119 |
|
8120 | var closest;
|
8121 | var inst;
|
8122 | for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
|
8123 | closest = inst;
|
8124 | if (parents.length) {
|
8125 | precacheChildNodes(inst, node);
|
8126 | }
|
8127 | }
|
8128 |
|
8129 | return closest;
|
8130 | }
|
8131 |
|
8132 |
|
8133 |
|
8134 |
|
8135 |
|
8136 | function getInstanceFromNode(node) {
|
8137 | var inst = getClosestInstanceFromNode(node);
|
8138 | if (inst != null && inst._hostNode === node) {
|
8139 | return inst;
|
8140 | } else {
|
8141 | return null;
|
8142 | }
|
8143 | }
|
8144 |
|
8145 |
|
8146 |
|
8147 |
|
8148 |
|
8149 | function getNodeFromInstance(inst) {
|
8150 |
|
8151 |
|
8152 | !(inst._hostNode !== undefined) ? "development" !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
8153 |
|
8154 | if (inst._hostNode) {
|
8155 | return inst._hostNode;
|
8156 | }
|
8157 |
|
8158 |
|
8159 | var parents = [];
|
8160 | while (!inst._hostNode) {
|
8161 | parents.push(inst);
|
8162 | !inst._hostParent ? "development" !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
|
8163 | inst = inst._hostParent;
|
8164 | }
|
8165 |
|
8166 |
|
8167 |
|
8168 | for (; parents.length; inst = parents.pop()) {
|
8169 | precacheChildNodes(inst, inst._hostNode);
|
8170 | }
|
8171 |
|
8172 | return inst._hostNode;
|
8173 | }
|
8174 |
|
8175 | var ReactDOMComponentTree = {
|
8176 | getClosestInstanceFromNode: getClosestInstanceFromNode,
|
8177 | getInstanceFromNode: getInstanceFromNode,
|
8178 | getNodeFromInstance: getNodeFromInstance,
|
8179 | precacheChildNodes: precacheChildNodes,
|
8180 | precacheNode: precacheNode,
|
8181 | uncacheNode: uncacheNode
|
8182 | };
|
8183 |
|
8184 | module.exports = ReactDOMComponentTree;
|
8185 | },{"10":10,"140":140,"162":162,"41":41}],43:[function(_dereq_,module,exports){
|
8186 |
|
8187 |
|
8188 |
|
8189 |
|
8190 |
|
8191 |
|
8192 |
|
8193 |
|
8194 |
|
8195 |
|
8196 |
|
8197 | 'use strict';
|
8198 |
|
8199 | var validateDOMNesting = _dereq_(146);
|
8200 |
|
8201 | var DOC_NODE_TYPE = 9;
|
8202 |
|
8203 | function ReactDOMContainerInfo(topLevelWrapper, node) {
|
8204 | var info = {
|
8205 | _topLevelWrapper: topLevelWrapper,
|
8206 | _idCounter: 1,
|
8207 | _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
|
8208 | _node: node,
|
8209 | _tag: node ? node.nodeName.toLowerCase() : null,
|
8210 | _namespaceURI: node ? node.namespaceURI : null
|
8211 | };
|
8212 | if ("development" !== 'production') {
|
8213 | info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
|
8214 | }
|
8215 | return info;
|
8216 | }
|
8217 |
|
8218 | module.exports = ReactDOMContainerInfo;
|
8219 | },{"146":146}],44:[function(_dereq_,module,exports){
|
8220 |
|
8221 |
|
8222 |
|
8223 |
|
8224 |
|
8225 |
|
8226 |
|
8227 |
|
8228 |
|
8229 |
|
8230 |
|
8231 | 'use strict';
|
8232 |
|
8233 | var _assign = _dereq_(172);
|
8234 |
|
8235 | var DOMLazyTree = _dereq_(8);
|
8236 | var ReactDOMComponentTree = _dereq_(42);
|
8237 |
|
8238 | var ReactDOMEmptyComponent = function (instantiate) {
|
8239 |
|
8240 | this._currentElement = null;
|
8241 |
|
8242 | this._hostNode = null;
|
8243 | this._hostParent = null;
|
8244 | this._hostContainerInfo = null;
|
8245 | this._domID = 0;
|
8246 | };
|
8247 | _assign(ReactDOMEmptyComponent.prototype, {
|
8248 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
8249 | var domID = hostContainerInfo._idCounter++;
|
8250 | this._domID = domID;
|
8251 | this._hostParent = hostParent;
|
8252 | this._hostContainerInfo = hostContainerInfo;
|
8253 |
|
8254 | var nodeValue = ' react-empty: ' + this._domID + ' ';
|
8255 | if (transaction.useCreateElement) {
|
8256 | var ownerDocument = hostContainerInfo._ownerDocument;
|
8257 | var node = ownerDocument.createComment(nodeValue);
|
8258 | ReactDOMComponentTree.precacheNode(this, node);
|
8259 | return DOMLazyTree(node);
|
8260 | } else {
|
8261 | if (transaction.renderToStaticMarkup) {
|
8262 |
|
8263 |
|
8264 |
|
8265 | return '';
|
8266 | }
|
8267 | return '<!--' + nodeValue + '-->';
|
8268 | }
|
8269 | },
|
8270 | receiveComponent: function () {},
|
8271 | getHostNode: function () {
|
8272 | return ReactDOMComponentTree.getNodeFromInstance(this);
|
8273 | },
|
8274 | unmountComponent: function () {
|
8275 | ReactDOMComponentTree.uncacheNode(this);
|
8276 | }
|
8277 | });
|
8278 |
|
8279 | module.exports = ReactDOMEmptyComponent;
|
8280 | },{"172":172,"42":42,"8":8}],45:[function(_dereq_,module,exports){
|
8281 |
|
8282 |
|
8283 |
|
8284 |
|
8285 |
|
8286 |
|
8287 |
|
8288 |
|
8289 |
|
8290 |
|
8291 |
|
8292 | 'use strict';
|
8293 |
|
8294 | var ReactElement = _dereq_(61);
|
8295 |
|
8296 |
|
8297 |
|
8298 |
|
8299 |
|
8300 |
|
8301 | var createDOMFactory = ReactElement.createFactory;
|
8302 | if ("development" !== 'production') {
|
8303 | var ReactElementValidator = _dereq_(62);
|
8304 | createDOMFactory = ReactElementValidator.createFactory;
|
8305 | }
|
8306 |
|
8307 |
|
8308 |
|
8309 |
|
8310 |
|
8311 |
|
8312 |
|
8313 | var ReactDOMFactories = {
|
8314 | a: createDOMFactory('a'),
|
8315 | abbr: createDOMFactory('abbr'),
|
8316 | address: createDOMFactory('address'),
|
8317 | area: createDOMFactory('area'),
|
8318 | article: createDOMFactory('article'),
|
8319 | aside: createDOMFactory('aside'),
|
8320 | audio: createDOMFactory('audio'),
|
8321 | b: createDOMFactory('b'),
|
8322 | base: createDOMFactory('base'),
|
8323 | bdi: createDOMFactory('bdi'),
|
8324 | bdo: createDOMFactory('bdo'),
|
8325 | big: createDOMFactory('big'),
|
8326 | blockquote: createDOMFactory('blockquote'),
|
8327 | body: createDOMFactory('body'),
|
8328 | br: createDOMFactory('br'),
|
8329 | button: createDOMFactory('button'),
|
8330 | canvas: createDOMFactory('canvas'),
|
8331 | caption: createDOMFactory('caption'),
|
8332 | cite: createDOMFactory('cite'),
|
8333 | code: createDOMFactory('code'),
|
8334 | col: createDOMFactory('col'),
|
8335 | colgroup: createDOMFactory('colgroup'),
|
8336 | data: createDOMFactory('data'),
|
8337 | datalist: createDOMFactory('datalist'),
|
8338 | dd: createDOMFactory('dd'),
|
8339 | del: createDOMFactory('del'),
|
8340 | details: createDOMFactory('details'),
|
8341 | dfn: createDOMFactory('dfn'),
|
8342 | dialog: createDOMFactory('dialog'),
|
8343 | div: createDOMFactory('div'),
|
8344 | dl: createDOMFactory('dl'),
|
8345 | dt: createDOMFactory('dt'),
|
8346 | em: createDOMFactory('em'),
|
8347 | embed: createDOMFactory('embed'),
|
8348 | fieldset: createDOMFactory('fieldset'),
|
8349 | figcaption: createDOMFactory('figcaption'),
|
8350 | figure: createDOMFactory('figure'),
|
8351 | footer: createDOMFactory('footer'),
|
8352 | form: createDOMFactory('form'),
|
8353 | h1: createDOMFactory('h1'),
|
8354 | h2: createDOMFactory('h2'),
|
8355 | h3: createDOMFactory('h3'),
|
8356 | h4: createDOMFactory('h4'),
|
8357 | h5: createDOMFactory('h5'),
|
8358 | h6: createDOMFactory('h6'),
|
8359 | head: createDOMFactory('head'),
|
8360 | header: createDOMFactory('header'),
|
8361 | hgroup: createDOMFactory('hgroup'),
|
8362 | hr: createDOMFactory('hr'),
|
8363 | html: createDOMFactory('html'),
|
8364 | i: createDOMFactory('i'),
|
8365 | iframe: createDOMFactory('iframe'),
|
8366 | img: createDOMFactory('img'),
|
8367 | input: createDOMFactory('input'),
|
8368 | ins: createDOMFactory('ins'),
|
8369 | kbd: createDOMFactory('kbd'),
|
8370 | keygen: createDOMFactory('keygen'),
|
8371 | label: createDOMFactory('label'),
|
8372 | legend: createDOMFactory('legend'),
|
8373 | li: createDOMFactory('li'),
|
8374 | link: createDOMFactory('link'),
|
8375 | main: createDOMFactory('main'),
|
8376 | map: createDOMFactory('map'),
|
8377 | mark: createDOMFactory('mark'),
|
8378 | menu: createDOMFactory('menu'),
|
8379 | menuitem: createDOMFactory('menuitem'),
|
8380 | meta: createDOMFactory('meta'),
|
8381 | meter: createDOMFactory('meter'),
|
8382 | nav: createDOMFactory('nav'),
|
8383 | noscript: createDOMFactory('noscript'),
|
8384 | object: createDOMFactory('object'),
|
8385 | ol: createDOMFactory('ol'),
|
8386 | optgroup: createDOMFactory('optgroup'),
|
8387 | option: createDOMFactory('option'),
|
8388 | output: createDOMFactory('output'),
|
8389 | p: createDOMFactory('p'),
|
8390 | param: createDOMFactory('param'),
|
8391 | picture: createDOMFactory('picture'),
|
8392 | pre: createDOMFactory('pre'),
|
8393 | progress: createDOMFactory('progress'),
|
8394 | q: createDOMFactory('q'),
|
8395 | rp: createDOMFactory('rp'),
|
8396 | rt: createDOMFactory('rt'),
|
8397 | ruby: createDOMFactory('ruby'),
|
8398 | s: createDOMFactory('s'),
|
8399 | samp: createDOMFactory('samp'),
|
8400 | script: createDOMFactory('script'),
|
8401 | section: createDOMFactory('section'),
|
8402 | select: createDOMFactory('select'),
|
8403 | small: createDOMFactory('small'),
|
8404 | source: createDOMFactory('source'),
|
8405 | span: createDOMFactory('span'),
|
8406 | strong: createDOMFactory('strong'),
|
8407 | style: createDOMFactory('style'),
|
8408 | sub: createDOMFactory('sub'),
|
8409 | summary: createDOMFactory('summary'),
|
8410 | sup: createDOMFactory('sup'),
|
8411 | table: createDOMFactory('table'),
|
8412 | tbody: createDOMFactory('tbody'),
|
8413 | td: createDOMFactory('td'),
|
8414 | textarea: createDOMFactory('textarea'),
|
8415 | tfoot: createDOMFactory('tfoot'),
|
8416 | th: createDOMFactory('th'),
|
8417 | thead: createDOMFactory('thead'),
|
8418 | time: createDOMFactory('time'),
|
8419 | title: createDOMFactory('title'),
|
8420 | tr: createDOMFactory('tr'),
|
8421 | track: createDOMFactory('track'),
|
8422 | u: createDOMFactory('u'),
|
8423 | ul: createDOMFactory('ul'),
|
8424 | 'var': createDOMFactory('var'),
|
8425 | video: createDOMFactory('video'),
|
8426 | wbr: createDOMFactory('wbr'),
|
8427 |
|
8428 |
|
8429 | circle: createDOMFactory('circle'),
|
8430 | clipPath: createDOMFactory('clipPath'),
|
8431 | defs: createDOMFactory('defs'),
|
8432 | ellipse: createDOMFactory('ellipse'),
|
8433 | g: createDOMFactory('g'),
|
8434 | image: createDOMFactory('image'),
|
8435 | line: createDOMFactory('line'),
|
8436 | linearGradient: createDOMFactory('linearGradient'),
|
8437 | mask: createDOMFactory('mask'),
|
8438 | path: createDOMFactory('path'),
|
8439 | pattern: createDOMFactory('pattern'),
|
8440 | polygon: createDOMFactory('polygon'),
|
8441 | polyline: createDOMFactory('polyline'),
|
8442 | radialGradient: createDOMFactory('radialGradient'),
|
8443 | rect: createDOMFactory('rect'),
|
8444 | stop: createDOMFactory('stop'),
|
8445 | svg: createDOMFactory('svg'),
|
8446 | text: createDOMFactory('text'),
|
8447 | tspan: createDOMFactory('tspan')
|
8448 | };
|
8449 |
|
8450 | module.exports = ReactDOMFactories;
|
8451 | },{"61":61,"62":62}],46:[function(_dereq_,module,exports){
|
8452 |
|
8453 |
|
8454 |
|
8455 |
|
8456 |
|
8457 |
|
8458 |
|
8459 |
|
8460 |
|
8461 |
|
8462 |
|
8463 | 'use strict';
|
8464 |
|
8465 | var ReactDOMFeatureFlags = {
|
8466 | useCreateElement: true
|
8467 | };
|
8468 |
|
8469 | module.exports = ReactDOMFeatureFlags;
|
8470 | },{}],47:[function(_dereq_,module,exports){
|
8471 |
|
8472 |
|
8473 |
|
8474 |
|
8475 |
|
8476 |
|
8477 |
|
8478 |
|
8479 |
|
8480 |
|
8481 |
|
8482 | 'use strict';
|
8483 |
|
8484 | var DOMChildrenOperations = _dereq_(7);
|
8485 | var ReactDOMComponentTree = _dereq_(42);
|
8486 |
|
8487 |
|
8488 |
|
8489 |
|
8490 | var ReactDOMIDOperations = {
|
8491 |
|
8492 | |
8493 |
|
8494 |
|
8495 |
|
8496 |
|
8497 |
|
8498 | dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
|
8499 | var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
|
8500 | DOMChildrenOperations.processUpdates(node, updates);
|
8501 | }
|
8502 | };
|
8503 |
|
8504 | module.exports = ReactDOMIDOperations;
|
8505 | },{"42":42,"7":7}],48:[function(_dereq_,module,exports){
|
8506 |
|
8507 |
|
8508 |
|
8509 |
|
8510 |
|
8511 |
|
8512 |
|
8513 |
|
8514 |
|
8515 |
|
8516 |
|
8517 | 'use strict';
|
8518 |
|
8519 | var _prodInvariant = _dereq_(140),
|
8520 | _assign = _dereq_(172);
|
8521 |
|
8522 | var DisabledInputUtils = _dereq_(14);
|
8523 | var DOMPropertyOperations = _dereq_(11);
|
8524 | var LinkedValueUtils = _dereq_(24);
|
8525 | var ReactDOMComponentTree = _dereq_(42);
|
8526 | var ReactUpdates = _dereq_(96);
|
8527 |
|
8528 | var invariant = _dereq_(162);
|
8529 | var warning = _dereq_(171);
|
8530 |
|
8531 | var didWarnValueLink = false;
|
8532 | var didWarnCheckedLink = false;
|
8533 | var didWarnValueDefaultValue = false;
|
8534 | var didWarnCheckedDefaultChecked = false;
|
8535 | var didWarnControlledToUncontrolled = false;
|
8536 | var didWarnUncontrolledToControlled = false;
|
8537 |
|
8538 | function forceUpdateIfMounted() {
|
8539 | if (this._rootNodeID) {
|
8540 |
|
8541 | ReactDOMInput.updateWrapper(this);
|
8542 | }
|
8543 | }
|
8544 |
|
8545 | function isControlled(props) {
|
8546 | var usesChecked = props.type === 'checkbox' || props.type === 'radio';
|
8547 | return usesChecked ? props.checked != null : props.value != null;
|
8548 | }
|
8549 |
|
8550 |
|
8551 |
|
8552 |
|
8553 |
|
8554 |
|
8555 |
|
8556 |
|
8557 |
|
8558 |
|
8559 |
|
8560 |
|
8561 |
|
8562 |
|
8563 |
|
8564 |
|
8565 |
|
8566 | var ReactDOMInput = {
|
8567 | getHostProps: function (inst, props) {
|
8568 | var value = LinkedValueUtils.getValue(props);
|
8569 | var checked = LinkedValueUtils.getChecked(props);
|
8570 |
|
8571 | var hostProps = _assign({
|
8572 |
|
8573 |
|
8574 | type: undefined,
|
8575 |
|
8576 |
|
8577 | step: undefined,
|
8578 |
|
8579 |
|
8580 | min: undefined,
|
8581 | max: undefined
|
8582 | }, DisabledInputUtils.getHostProps(inst, props), {
|
8583 | defaultChecked: undefined,
|
8584 | defaultValue: undefined,
|
8585 | value: value != null ? value : inst._wrapperState.initialValue,
|
8586 | checked: checked != null ? checked : inst._wrapperState.initialChecked,
|
8587 | onChange: inst._wrapperState.onChange
|
8588 | });
|
8589 |
|
8590 | return hostProps;
|
8591 | },
|
8592 |
|
8593 | mountWrapper: function (inst, props) {
|
8594 | if ("development" !== 'production') {
|
8595 | LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
|
8596 |
|
8597 | var owner = inst._currentElement._owner;
|
8598 |
|
8599 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
8600 | "development" !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
8601 | didWarnValueLink = true;
|
8602 | }
|
8603 | if (props.checkedLink !== undefined && !didWarnCheckedLink) {
|
8604 | "development" !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
8605 | didWarnCheckedLink = true;
|
8606 | }
|
8607 | if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
|
8608 | "development" !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
8609 | didWarnCheckedDefaultChecked = true;
|
8610 | }
|
8611 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
8612 | "development" !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
8613 | didWarnValueDefaultValue = true;
|
8614 | }
|
8615 | }
|
8616 |
|
8617 | var defaultValue = props.defaultValue;
|
8618 | inst._wrapperState = {
|
8619 | initialChecked: props.checked != null ? props.checked : props.defaultChecked,
|
8620 | initialValue: props.value != null ? props.value : defaultValue,
|
8621 | listeners: null,
|
8622 | onChange: _handleChange.bind(inst)
|
8623 | };
|
8624 |
|
8625 | if ("development" !== 'production') {
|
8626 | inst._wrapperState.controlled = isControlled(props);
|
8627 | }
|
8628 | },
|
8629 |
|
8630 | updateWrapper: function (inst) {
|
8631 | var props = inst._currentElement.props;
|
8632 |
|
8633 | if ("development" !== 'production') {
|
8634 | var controlled = isControlled(props);
|
8635 | var owner = inst._currentElement._owner;
|
8636 |
|
8637 | if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
|
8638 | "development" !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
8639 | didWarnUncontrolledToControlled = true;
|
8640 | }
|
8641 | if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
|
8642 | "development" !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
8643 | didWarnControlledToUncontrolled = true;
|
8644 | }
|
8645 | }
|
8646 |
|
8647 |
|
8648 | var checked = props.checked;
|
8649 | if (checked != null) {
|
8650 | DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
|
8651 | }
|
8652 |
|
8653 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
8654 | var value = LinkedValueUtils.getValue(props);
|
8655 | if (value != null) {
|
8656 |
|
8657 |
|
8658 |
|
8659 | var newValue = '' + value;
|
8660 |
|
8661 |
|
8662 | if (newValue !== node.value) {
|
8663 | node.value = newValue;
|
8664 | }
|
8665 | } else {
|
8666 | if (props.value == null && props.defaultValue != null) {
|
8667 | node.defaultValue = '' + props.defaultValue;
|
8668 | }
|
8669 | if (props.checked == null && props.defaultChecked != null) {
|
8670 | node.defaultChecked = !!props.defaultChecked;
|
8671 | }
|
8672 | }
|
8673 | },
|
8674 |
|
8675 | postMountWrapper: function (inst) {
|
8676 | var props = inst._currentElement.props;
|
8677 |
|
8678 |
|
8679 |
|
8680 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
8681 |
|
8682 |
|
8683 |
|
8684 |
|
8685 |
|
8686 |
|
8687 |
|
8688 | switch (props.type) {
|
8689 | case 'submit':
|
8690 | case 'reset':
|
8691 | break;
|
8692 | case 'color':
|
8693 | case 'date':
|
8694 | case 'datetime':
|
8695 | case 'datetime-local':
|
8696 | case 'month':
|
8697 | case 'time':
|
8698 | case 'week':
|
8699 |
|
8700 |
|
8701 | node.value = '';
|
8702 | node.value = node.defaultValue;
|
8703 | break;
|
8704 | default:
|
8705 | node.value = node.value;
|
8706 | break;
|
8707 | }
|
8708 |
|
8709 |
|
8710 |
|
8711 |
|
8712 |
|
8713 |
|
8714 | var name = node.name;
|
8715 | if (name !== '') {
|
8716 | node.name = '';
|
8717 | }
|
8718 | node.defaultChecked = !node.defaultChecked;
|
8719 | node.defaultChecked = !node.defaultChecked;
|
8720 | if (name !== '') {
|
8721 | node.name = name;
|
8722 | }
|
8723 | }
|
8724 | };
|
8725 |
|
8726 | function _handleChange(event) {
|
8727 | var props = this._currentElement.props;
|
8728 |
|
8729 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
8730 |
|
8731 |
|
8732 |
|
8733 |
|
8734 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
8735 |
|
8736 | var name = props.name;
|
8737 | if (props.type === 'radio' && name != null) {
|
8738 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
|
8739 | var queryRoot = rootNode;
|
8740 |
|
8741 | while (queryRoot.parentNode) {
|
8742 | queryRoot = queryRoot.parentNode;
|
8743 | }
|
8744 |
|
8745 |
|
8746 |
|
8747 |
|
8748 |
|
8749 |
|
8750 |
|
8751 | var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
|
8752 |
|
8753 | for (var i = 0; i < group.length; i++) {
|
8754 | var otherNode = group[i];
|
8755 | if (otherNode === rootNode || otherNode.form !== rootNode.form) {
|
8756 | continue;
|
8757 | }
|
8758 |
|
8759 |
|
8760 |
|
8761 |
|
8762 | var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
|
8763 | !otherInstance ? "development" !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;
|
8764 |
|
8765 |
|
8766 |
|
8767 | ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
|
8768 | }
|
8769 | }
|
8770 |
|
8771 | return returnValue;
|
8772 | }
|
8773 |
|
8774 | module.exports = ReactDOMInput;
|
8775 | },{"11":11,"14":14,"140":140,"162":162,"171":171,"172":172,"24":24,"42":42,"96":96}],49:[function(_dereq_,module,exports){
|
8776 |
|
8777 |
|
8778 |
|
8779 |
|
8780 |
|
8781 |
|
8782 |
|
8783 |
|
8784 |
|
8785 |
|
8786 |
|
8787 | 'use strict';
|
8788 |
|
8789 | var ReactComponentTreeHook = _dereq_(35);
|
8790 |
|
8791 | var warning = _dereq_(171);
|
8792 |
|
8793 | var didWarnValueNull = false;
|
8794 |
|
8795 | function handleElement(debugID, element) {
|
8796 | if (element == null) {
|
8797 | return;
|
8798 | }
|
8799 | if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') {
|
8800 | return;
|
8801 | }
|
8802 | if (element.props != null && element.props.value === null && !didWarnValueNull) {
|
8803 | "development" !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
8804 |
|
8805 | didWarnValueNull = true;
|
8806 | }
|
8807 | }
|
8808 |
|
8809 | var ReactDOMNullInputValuePropHook = {
|
8810 | onBeforeMountComponent: function (debugID, element) {
|
8811 | handleElement(debugID, element);
|
8812 | },
|
8813 | onBeforeUpdateComponent: function (debugID, element) {
|
8814 | handleElement(debugID, element);
|
8815 | }
|
8816 | };
|
8817 |
|
8818 | module.exports = ReactDOMNullInputValuePropHook;
|
8819 | },{"171":171,"35":35}],50:[function(_dereq_,module,exports){
|
8820 |
|
8821 |
|
8822 |
|
8823 |
|
8824 |
|
8825 |
|
8826 |
|
8827 |
|
8828 |
|
8829 |
|
8830 |
|
8831 | 'use strict';
|
8832 |
|
8833 | var _assign = _dereq_(172);
|
8834 |
|
8835 | var ReactChildren = _dereq_(29);
|
8836 | var ReactDOMComponentTree = _dereq_(42);
|
8837 | var ReactDOMSelect = _dereq_(51);
|
8838 |
|
8839 | var warning = _dereq_(171);
|
8840 | var didWarnInvalidOptionChildren = false;
|
8841 |
|
8842 | function flattenChildren(children) {
|
8843 | var content = '';
|
8844 |
|
8845 |
|
8846 |
|
8847 | ReactChildren.forEach(children, function (child) {
|
8848 | if (child == null) {
|
8849 | return;
|
8850 | }
|
8851 | if (typeof child === 'string' || typeof child === 'number') {
|
8852 | content += child;
|
8853 | } else if (!didWarnInvalidOptionChildren) {
|
8854 | didWarnInvalidOptionChildren = true;
|
8855 | "development" !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
|
8856 | }
|
8857 | });
|
8858 |
|
8859 | return content;
|
8860 | }
|
8861 |
|
8862 |
|
8863 |
|
8864 |
|
8865 | var ReactDOMOption = {
|
8866 | mountWrapper: function (inst, props, hostParent) {
|
8867 |
|
8868 | if ("development" !== 'production') {
|
8869 | "development" !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;
|
8870 | }
|
8871 |
|
8872 |
|
8873 | var selectValue = null;
|
8874 | if (hostParent != null) {
|
8875 | var selectParent = hostParent;
|
8876 |
|
8877 | if (selectParent._tag === 'optgroup') {
|
8878 | selectParent = selectParent._hostParent;
|
8879 | }
|
8880 |
|
8881 | if (selectParent != null && selectParent._tag === 'select') {
|
8882 | selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
|
8883 | }
|
8884 | }
|
8885 |
|
8886 |
|
8887 |
|
8888 | var selected = null;
|
8889 | if (selectValue != null) {
|
8890 | var value;
|
8891 | if (props.value != null) {
|
8892 | value = props.value + '';
|
8893 | } else {
|
8894 | value = flattenChildren(props.children);
|
8895 | }
|
8896 | selected = false;
|
8897 | if (Array.isArray(selectValue)) {
|
8898 |
|
8899 | for (var i = 0; i < selectValue.length; i++) {
|
8900 | if ('' + selectValue[i] === value) {
|
8901 | selected = true;
|
8902 | break;
|
8903 | }
|
8904 | }
|
8905 | } else {
|
8906 | selected = '' + selectValue === value;
|
8907 | }
|
8908 | }
|
8909 |
|
8910 | inst._wrapperState = { selected: selected };
|
8911 | },
|
8912 |
|
8913 | postMountWrapper: function (inst) {
|
8914 |
|
8915 | var props = inst._currentElement.props;
|
8916 | if (props.value != null) {
|
8917 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
8918 | node.setAttribute('value', props.value);
|
8919 | }
|
8920 | },
|
8921 |
|
8922 | getHostProps: function (inst, props) {
|
8923 | var hostProps = _assign({ selected: undefined, children: undefined }, props);
|
8924 |
|
8925 |
|
8926 |
|
8927 | if (inst._wrapperState.selected != null) {
|
8928 | hostProps.selected = inst._wrapperState.selected;
|
8929 | }
|
8930 |
|
8931 | var content = flattenChildren(props.children);
|
8932 |
|
8933 | if (content) {
|
8934 | hostProps.children = content;
|
8935 | }
|
8936 |
|
8937 | return hostProps;
|
8938 | }
|
8939 |
|
8940 | };
|
8941 |
|
8942 | module.exports = ReactDOMOption;
|
8943 | },{"171":171,"172":172,"29":29,"42":42,"51":51}],51:[function(_dereq_,module,exports){
|
8944 |
|
8945 |
|
8946 |
|
8947 |
|
8948 |
|
8949 |
|
8950 |
|
8951 |
|
8952 |
|
8953 |
|
8954 |
|
8955 | 'use strict';
|
8956 |
|
8957 | var _assign = _dereq_(172);
|
8958 |
|
8959 | var DisabledInputUtils = _dereq_(14);
|
8960 | var LinkedValueUtils = _dereq_(24);
|
8961 | var ReactDOMComponentTree = _dereq_(42);
|
8962 | var ReactUpdates = _dereq_(96);
|
8963 |
|
8964 | var warning = _dereq_(171);
|
8965 |
|
8966 | var didWarnValueLink = false;
|
8967 | var didWarnValueDefaultValue = false;
|
8968 |
|
8969 | function updateOptionsIfPendingUpdateAndMounted() {
|
8970 | if (this._rootNodeID && this._wrapperState.pendingUpdate) {
|
8971 | this._wrapperState.pendingUpdate = false;
|
8972 |
|
8973 | var props = this._currentElement.props;
|
8974 | var value = LinkedValueUtils.getValue(props);
|
8975 |
|
8976 | if (value != null) {
|
8977 | updateOptions(this, Boolean(props.multiple), value);
|
8978 | }
|
8979 | }
|
8980 | }
|
8981 |
|
8982 | function getDeclarationErrorAddendum(owner) {
|
8983 | if (owner) {
|
8984 | var name = owner.getName();
|
8985 | if (name) {
|
8986 | return ' Check the render method of `' + name + '`.';
|
8987 | }
|
8988 | }
|
8989 | return '';
|
8990 | }
|
8991 |
|
8992 | var valuePropNames = ['value', 'defaultValue'];
|
8993 |
|
8994 |
|
8995 |
|
8996 |
|
8997 |
|
8998 | function checkSelectPropTypes(inst, props) {
|
8999 | var owner = inst._currentElement._owner;
|
9000 | LinkedValueUtils.checkPropTypes('select', props, owner);
|
9001 |
|
9002 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
9003 | "development" !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
|
9004 | didWarnValueLink = true;
|
9005 | }
|
9006 |
|
9007 | for (var i = 0; i < valuePropNames.length; i++) {
|
9008 | var propName = valuePropNames[i];
|
9009 | if (props[propName] == null) {
|
9010 | continue;
|
9011 | }
|
9012 | var isArray = Array.isArray(props[propName]);
|
9013 | if (props.multiple && !isArray) {
|
9014 | "development" !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
9015 | } else if (!props.multiple && isArray) {
|
9016 | "development" !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
9017 | }
|
9018 | }
|
9019 | }
|
9020 |
|
9021 |
|
9022 |
|
9023 |
|
9024 |
|
9025 |
|
9026 |
|
9027 | function updateOptions(inst, multiple, propValue) {
|
9028 | var selectedValue, i;
|
9029 | var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
|
9030 |
|
9031 | if (multiple) {
|
9032 | selectedValue = {};
|
9033 | for (i = 0; i < propValue.length; i++) {
|
9034 | selectedValue['' + propValue[i]] = true;
|
9035 | }
|
9036 | for (i = 0; i < options.length; i++) {
|
9037 | var selected = selectedValue.hasOwnProperty(options[i].value);
|
9038 | if (options[i].selected !== selected) {
|
9039 | options[i].selected = selected;
|
9040 | }
|
9041 | }
|
9042 | } else {
|
9043 |
|
9044 |
|
9045 | selectedValue = '' + propValue;
|
9046 | for (i = 0; i < options.length; i++) {
|
9047 | if (options[i].value === selectedValue) {
|
9048 | options[i].selected = true;
|
9049 | return;
|
9050 | }
|
9051 | }
|
9052 | if (options.length) {
|
9053 | options[0].selected = true;
|
9054 | }
|
9055 | }
|
9056 | }
|
9057 |
|
9058 |
|
9059 |
|
9060 |
|
9061 |
|
9062 |
|
9063 |
|
9064 |
|
9065 |
|
9066 |
|
9067 |
|
9068 |
|
9069 |
|
9070 |
|
9071 |
|
9072 |
|
9073 | var ReactDOMSelect = {
|
9074 | getHostProps: function (inst, props) {
|
9075 | return _assign({}, DisabledInputUtils.getHostProps(inst, props), {
|
9076 | onChange: inst._wrapperState.onChange,
|
9077 | value: undefined
|
9078 | });
|
9079 | },
|
9080 |
|
9081 | mountWrapper: function (inst, props) {
|
9082 | if ("development" !== 'production') {
|
9083 | checkSelectPropTypes(inst, props);
|
9084 | }
|
9085 |
|
9086 | var value = LinkedValueUtils.getValue(props);
|
9087 | inst._wrapperState = {
|
9088 | pendingUpdate: false,
|
9089 | initialValue: value != null ? value : props.defaultValue,
|
9090 | listeners: null,
|
9091 | onChange: _handleChange.bind(inst),
|
9092 | wasMultiple: Boolean(props.multiple)
|
9093 | };
|
9094 |
|
9095 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
9096 | "development" !== 'production' ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
|
9097 | didWarnValueDefaultValue = true;
|
9098 | }
|
9099 | },
|
9100 |
|
9101 | getSelectValueContext: function (inst) {
|
9102 |
|
9103 |
|
9104 | return inst._wrapperState.initialValue;
|
9105 | },
|
9106 |
|
9107 | postUpdateWrapper: function (inst) {
|
9108 | var props = inst._currentElement.props;
|
9109 |
|
9110 |
|
9111 |
|
9112 | inst._wrapperState.initialValue = undefined;
|
9113 |
|
9114 | var wasMultiple = inst._wrapperState.wasMultiple;
|
9115 | inst._wrapperState.wasMultiple = Boolean(props.multiple);
|
9116 |
|
9117 | var value = LinkedValueUtils.getValue(props);
|
9118 | if (value != null) {
|
9119 | inst._wrapperState.pendingUpdate = false;
|
9120 | updateOptions(inst, Boolean(props.multiple), value);
|
9121 | } else if (wasMultiple !== Boolean(props.multiple)) {
|
9122 |
|
9123 | if (props.defaultValue != null) {
|
9124 | updateOptions(inst, Boolean(props.multiple), props.defaultValue);
|
9125 | } else {
|
9126 |
|
9127 | updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
|
9128 | }
|
9129 | }
|
9130 | }
|
9131 | };
|
9132 |
|
9133 | function _handleChange(event) {
|
9134 | var props = this._currentElement.props;
|
9135 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
9136 |
|
9137 | if (this._rootNodeID) {
|
9138 | this._wrapperState.pendingUpdate = true;
|
9139 | }
|
9140 | ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
|
9141 | return returnValue;
|
9142 | }
|
9143 |
|
9144 | module.exports = ReactDOMSelect;
|
9145 | },{"14":14,"171":171,"172":172,"24":24,"42":42,"96":96}],52:[function(_dereq_,module,exports){
|
9146 |
|
9147 |
|
9148 |
|
9149 |
|
9150 |
|
9151 |
|
9152 |
|
9153 |
|
9154 |
|
9155 |
|
9156 |
|
9157 | 'use strict';
|
9158 |
|
9159 | var ExecutionEnvironment = _dereq_(148);
|
9160 |
|
9161 | var getNodeForCharacterOffset = _dereq_(132);
|
9162 | var getTextContentAccessor = _dereq_(133);
|
9163 |
|
9164 |
|
9165 |
|
9166 |
|
9167 |
|
9168 |
|
9169 | function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
|
9170 | return anchorNode === focusNode && anchorOffset === focusOffset;
|
9171 | }
|
9172 |
|
9173 |
|
9174 |
|
9175 |
|
9176 |
|
9177 |
|
9178 |
|
9179 |
|
9180 |
|
9181 |
|
9182 |
|
9183 |
|
9184 |
|
9185 |
|
9186 |
|
9187 | function getIEOffsets(node) {
|
9188 | var selection = document.selection;
|
9189 | var selectedRange = selection.createRange();
|
9190 | var selectedLength = selectedRange.text.length;
|
9191 |
|
9192 |
|
9193 | var fromStart = selectedRange.duplicate();
|
9194 | fromStart.moveToElementText(node);
|
9195 | fromStart.setEndPoint('EndToStart', selectedRange);
|
9196 |
|
9197 | var startOffset = fromStart.text.length;
|
9198 | var endOffset = startOffset + selectedLength;
|
9199 |
|
9200 | return {
|
9201 | start: startOffset,
|
9202 | end: endOffset
|
9203 | };
|
9204 | }
|
9205 |
|
9206 |
|
9207 |
|
9208 |
|
9209 |
|
9210 | function getModernOffsets(node) {
|
9211 | var selection = window.getSelection && window.getSelection();
|
9212 |
|
9213 | if (!selection || selection.rangeCount === 0) {
|
9214 | return null;
|
9215 | }
|
9216 |
|
9217 | var anchorNode = selection.anchorNode;
|
9218 | var anchorOffset = selection.anchorOffset;
|
9219 | var focusNode = selection.focusNode;
|
9220 | var focusOffset = selection.focusOffset;
|
9221 |
|
9222 | var currentRange = selection.getRangeAt(0);
|
9223 |
|
9224 |
|
9225 |
|
9226 |
|
9227 |
|
9228 |
|
9229 |
|
9230 |
|
9231 | try {
|
9232 |
|
9233 | currentRange.startContainer.nodeType;
|
9234 | currentRange.endContainer.nodeType;
|
9235 |
|
9236 | } catch (e) {
|
9237 | return null;
|
9238 | }
|
9239 |
|
9240 |
|
9241 |
|
9242 |
|
9243 | var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
|
9244 |
|
9245 | var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
|
9246 |
|
9247 | var tempRange = currentRange.cloneRange();
|
9248 | tempRange.selectNodeContents(node);
|
9249 | tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
|
9250 |
|
9251 | var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
|
9252 |
|
9253 | var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
|
9254 | var end = start + rangeLength;
|
9255 |
|
9256 |
|
9257 | var detectionRange = document.createRange();
|
9258 | detectionRange.setStart(anchorNode, anchorOffset);
|
9259 | detectionRange.setEnd(focusNode, focusOffset);
|
9260 | var isBackward = detectionRange.collapsed;
|
9261 |
|
9262 | return {
|
9263 | start: isBackward ? end : start,
|
9264 | end: isBackward ? start : end
|
9265 | };
|
9266 | }
|
9267 |
|
9268 |
|
9269 |
|
9270 |
|
9271 |
|
9272 | function setIEOffsets(node, offsets) {
|
9273 | var range = document.selection.createRange().duplicate();
|
9274 | var start, end;
|
9275 |
|
9276 | if (offsets.end === undefined) {
|
9277 | start = offsets.start;
|
9278 | end = start;
|
9279 | } else if (offsets.start > offsets.end) {
|
9280 | start = offsets.end;
|
9281 | end = offsets.start;
|
9282 | } else {
|
9283 | start = offsets.start;
|
9284 | end = offsets.end;
|
9285 | }
|
9286 |
|
9287 | range.moveToElementText(node);
|
9288 | range.moveStart('character', start);
|
9289 | range.setEndPoint('EndToStart', range);
|
9290 | range.moveEnd('character', end - start);
|
9291 | range.select();
|
9292 | }
|
9293 |
|
9294 |
|
9295 |
|
9296 |
|
9297 |
|
9298 |
|
9299 |
|
9300 |
|
9301 |
|
9302 |
|
9303 |
|
9304 |
|
9305 |
|
9306 | function setModernOffsets(node, offsets) {
|
9307 | if (!window.getSelection) {
|
9308 | return;
|
9309 | }
|
9310 |
|
9311 | var selection = window.getSelection();
|
9312 | var length = node[getTextContentAccessor()].length;
|
9313 | var start = Math.min(offsets.start, length);
|
9314 | var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
|
9315 |
|
9316 |
|
9317 |
|
9318 | if (!selection.extend && start > end) {
|
9319 | var temp = end;
|
9320 | end = start;
|
9321 | start = temp;
|
9322 | }
|
9323 |
|
9324 | var startMarker = getNodeForCharacterOffset(node, start);
|
9325 | var endMarker = getNodeForCharacterOffset(node, end);
|
9326 |
|
9327 | if (startMarker && endMarker) {
|
9328 | var range = document.createRange();
|
9329 | range.setStart(startMarker.node, startMarker.offset);
|
9330 | selection.removeAllRanges();
|
9331 |
|
9332 | if (start > end) {
|
9333 | selection.addRange(range);
|
9334 | selection.extend(endMarker.node, endMarker.offset);
|
9335 | } else {
|
9336 | range.setEnd(endMarker.node, endMarker.offset);
|
9337 | selection.addRange(range);
|
9338 | }
|
9339 | }
|
9340 | }
|
9341 |
|
9342 | var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
|
9343 |
|
9344 | var ReactDOMSelection = {
|
9345 | |
9346 |
|
9347 |
|
9348 | getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
|
9349 |
|
9350 | |
9351 |
|
9352 |
|
9353 |
|
9354 | setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
|
9355 | };
|
9356 |
|
9357 | module.exports = ReactDOMSelection;
|
9358 | },{"132":132,"133":133,"148":148}],53:[function(_dereq_,module,exports){
|
9359 |
|
9360 |
|
9361 |
|
9362 |
|
9363 |
|
9364 |
|
9365 |
|
9366 |
|
9367 |
|
9368 |
|
9369 |
|
9370 | 'use strict';
|
9371 |
|
9372 | var ReactDefaultInjection = _dereq_(60);
|
9373 | var ReactServerRendering = _dereq_(91);
|
9374 | var ReactVersion = _dereq_(97);
|
9375 |
|
9376 | ReactDefaultInjection.inject();
|
9377 |
|
9378 | var ReactDOMServer = {
|
9379 | renderToString: ReactServerRendering.renderToString,
|
9380 | renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
|
9381 | version: ReactVersion
|
9382 | };
|
9383 |
|
9384 | module.exports = ReactDOMServer;
|
9385 | },{"60":60,"91":91,"97":97}],54:[function(_dereq_,module,exports){
|
9386 |
|
9387 |
|
9388 |
|
9389 |
|
9390 |
|
9391 |
|
9392 |
|
9393 |
|
9394 |
|
9395 |
|
9396 |
|
9397 | 'use strict';
|
9398 |
|
9399 | var _prodInvariant = _dereq_(140),
|
9400 | _assign = _dereq_(172);
|
9401 |
|
9402 | var DOMChildrenOperations = _dereq_(7);
|
9403 | var DOMLazyTree = _dereq_(8);
|
9404 | var ReactDOMComponentTree = _dereq_(42);
|
9405 |
|
9406 | var escapeTextContentForBrowser = _dereq_(122);
|
9407 | var invariant = _dereq_(162);
|
9408 | var validateDOMNesting = _dereq_(146);
|
9409 |
|
9410 |
|
9411 |
|
9412 |
|
9413 |
|
9414 |
|
9415 |
|
9416 |
|
9417 |
|
9418 |
|
9419 |
|
9420 |
|
9421 |
|
9422 |
|
9423 |
|
9424 |
|
9425 | var ReactDOMTextComponent = function (text) {
|
9426 |
|
9427 | this._currentElement = text;
|
9428 | this._stringText = '' + text;
|
9429 |
|
9430 | this._hostNode = null;
|
9431 | this._hostParent = null;
|
9432 |
|
9433 |
|
9434 | this._domID = 0;
|
9435 | this._mountIndex = 0;
|
9436 | this._closingComment = null;
|
9437 | this._commentNodes = null;
|
9438 | };
|
9439 |
|
9440 | _assign(ReactDOMTextComponent.prototype, {
|
9441 |
|
9442 | |
9443 |
|
9444 |
|
9445 |
|
9446 |
|
9447 |
|
9448 |
|
9449 |
|
9450 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
9451 | if ("development" !== 'production') {
|
9452 | var parentInfo;
|
9453 | if (hostParent != null) {
|
9454 | parentInfo = hostParent._ancestorInfo;
|
9455 | } else if (hostContainerInfo != null) {
|
9456 | parentInfo = hostContainerInfo._ancestorInfo;
|
9457 | }
|
9458 | if (parentInfo) {
|
9459 |
|
9460 |
|
9461 | validateDOMNesting(null, this._stringText, this, parentInfo);
|
9462 | }
|
9463 | }
|
9464 |
|
9465 | var domID = hostContainerInfo._idCounter++;
|
9466 | var openingValue = ' react-text: ' + domID + ' ';
|
9467 | var closingValue = ' /react-text ';
|
9468 | this._domID = domID;
|
9469 | this._hostParent = hostParent;
|
9470 | if (transaction.useCreateElement) {
|
9471 | var ownerDocument = hostContainerInfo._ownerDocument;
|
9472 | var openingComment = ownerDocument.createComment(openingValue);
|
9473 | var closingComment = ownerDocument.createComment(closingValue);
|
9474 | var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
|
9475 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
|
9476 | if (this._stringText) {
|
9477 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
|
9478 | }
|
9479 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
|
9480 | ReactDOMComponentTree.precacheNode(this, openingComment);
|
9481 | this._closingComment = closingComment;
|
9482 | return lazyTree;
|
9483 | } else {
|
9484 | var escapedText = escapeTextContentForBrowser(this._stringText);
|
9485 |
|
9486 | if (transaction.renderToStaticMarkup) {
|
9487 |
|
9488 |
|
9489 |
|
9490 | return escapedText;
|
9491 | }
|
9492 |
|
9493 | return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
|
9494 | }
|
9495 | },
|
9496 |
|
9497 | |
9498 |
|
9499 |
|
9500 |
|
9501 |
|
9502 |
|
9503 |
|
9504 | receiveComponent: function (nextText, transaction) {
|
9505 | if (nextText !== this._currentElement) {
|
9506 | this._currentElement = nextText;
|
9507 | var nextStringText = '' + nextText;
|
9508 | if (nextStringText !== this._stringText) {
|
9509 |
|
9510 |
|
9511 |
|
9512 | this._stringText = nextStringText;
|
9513 | var commentNodes = this.getHostNode();
|
9514 | DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
|
9515 | }
|
9516 | }
|
9517 | },
|
9518 |
|
9519 | getHostNode: function () {
|
9520 | var hostNode = this._commentNodes;
|
9521 | if (hostNode) {
|
9522 | return hostNode;
|
9523 | }
|
9524 | if (!this._closingComment) {
|
9525 | var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
|
9526 | var node = openingComment.nextSibling;
|
9527 | while (true) {
|
9528 | !(node != null) ? "development" !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
|
9529 | if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
|
9530 | this._closingComment = node;
|
9531 | break;
|
9532 | }
|
9533 | node = node.nextSibling;
|
9534 | }
|
9535 | }
|
9536 | hostNode = [this._hostNode, this._closingComment];
|
9537 | this._commentNodes = hostNode;
|
9538 | return hostNode;
|
9539 | },
|
9540 |
|
9541 | unmountComponent: function () {
|
9542 | this._closingComment = null;
|
9543 | this._commentNodes = null;
|
9544 | ReactDOMComponentTree.uncacheNode(this);
|
9545 | }
|
9546 |
|
9547 | });
|
9548 |
|
9549 | module.exports = ReactDOMTextComponent;
|
9550 | },{"122":122,"140":140,"146":146,"162":162,"172":172,"42":42,"7":7,"8":8}],55:[function(_dereq_,module,exports){
|
9551 |
|
9552 |
|
9553 |
|
9554 |
|
9555 |
|
9556 |
|
9557 |
|
9558 |
|
9559 |
|
9560 |
|
9561 |
|
9562 | 'use strict';
|
9563 |
|
9564 | var _prodInvariant = _dereq_(140),
|
9565 | _assign = _dereq_(172);
|
9566 |
|
9567 | var DisabledInputUtils = _dereq_(14);
|
9568 | var LinkedValueUtils = _dereq_(24);
|
9569 | var ReactDOMComponentTree = _dereq_(42);
|
9570 | var ReactUpdates = _dereq_(96);
|
9571 |
|
9572 | var invariant = _dereq_(162);
|
9573 | var warning = _dereq_(171);
|
9574 |
|
9575 | var didWarnValueLink = false;
|
9576 | var didWarnValDefaultVal = false;
|
9577 |
|
9578 | function forceUpdateIfMounted() {
|
9579 | if (this._rootNodeID) {
|
9580 |
|
9581 | ReactDOMTextarea.updateWrapper(this);
|
9582 | }
|
9583 | }
|
9584 |
|
9585 |
|
9586 |
|
9587 |
|
9588 |
|
9589 |
|
9590 |
|
9591 |
|
9592 |
|
9593 |
|
9594 |
|
9595 |
|
9596 |
|
9597 |
|
9598 |
|
9599 |
|
9600 | var ReactDOMTextarea = {
|
9601 | getHostProps: function (inst, props) {
|
9602 | !(props.dangerouslySetInnerHTML == null) ? "development" !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
|
9603 |
|
9604 |
|
9605 |
|
9606 |
|
9607 |
|
9608 |
|
9609 | var hostProps = _assign({}, DisabledInputUtils.getHostProps(inst, props), {
|
9610 | value: undefined,
|
9611 | defaultValue: undefined,
|
9612 | children: '' + inst._wrapperState.initialValue,
|
9613 | onChange: inst._wrapperState.onChange
|
9614 | });
|
9615 |
|
9616 | return hostProps;
|
9617 | },
|
9618 |
|
9619 | mountWrapper: function (inst, props) {
|
9620 | if ("development" !== 'production') {
|
9621 | LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
|
9622 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
9623 | "development" !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
|
9624 | didWarnValueLink = true;
|
9625 | }
|
9626 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
|
9627 | "development" !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
|
9628 | didWarnValDefaultVal = true;
|
9629 | }
|
9630 | }
|
9631 |
|
9632 | var value = LinkedValueUtils.getValue(props);
|
9633 | var initialValue = value;
|
9634 |
|
9635 |
|
9636 | if (value == null) {
|
9637 | var defaultValue = props.defaultValue;
|
9638 |
|
9639 | var children = props.children;
|
9640 | if (children != null) {
|
9641 | if ("development" !== 'production') {
|
9642 | "development" !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
|
9643 | }
|
9644 | !(defaultValue == null) ? "development" !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
|
9645 | if (Array.isArray(children)) {
|
9646 | !(children.length <= 1) ? "development" !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
|
9647 | children = children[0];
|
9648 | }
|
9649 |
|
9650 | defaultValue = '' + children;
|
9651 | }
|
9652 | if (defaultValue == null) {
|
9653 | defaultValue = '';
|
9654 | }
|
9655 | initialValue = defaultValue;
|
9656 | }
|
9657 |
|
9658 | inst._wrapperState = {
|
9659 | initialValue: '' + initialValue,
|
9660 | listeners: null,
|
9661 | onChange: _handleChange.bind(inst)
|
9662 | };
|
9663 | },
|
9664 |
|
9665 | updateWrapper: function (inst) {
|
9666 | var props = inst._currentElement.props;
|
9667 |
|
9668 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
9669 | var value = LinkedValueUtils.getValue(props);
|
9670 | if (value != null) {
|
9671 |
|
9672 |
|
9673 | var newValue = '' + value;
|
9674 |
|
9675 |
|
9676 | if (newValue !== node.value) {
|
9677 | node.value = newValue;
|
9678 | }
|
9679 | if (props.defaultValue == null) {
|
9680 | node.defaultValue = newValue;
|
9681 | }
|
9682 | }
|
9683 | if (props.defaultValue != null) {
|
9684 | node.defaultValue = props.defaultValue;
|
9685 | }
|
9686 | },
|
9687 |
|
9688 | postMountWrapper: function (inst) {
|
9689 |
|
9690 |
|
9691 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
9692 |
|
9693 |
|
9694 | node.value = node.textContent;
|
9695 | }
|
9696 | };
|
9697 |
|
9698 | function _handleChange(event) {
|
9699 | var props = this._currentElement.props;
|
9700 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
9701 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
9702 | return returnValue;
|
9703 | }
|
9704 |
|
9705 | module.exports = ReactDOMTextarea;
|
9706 | },{"14":14,"140":140,"162":162,"171":171,"172":172,"24":24,"42":42,"96":96}],56:[function(_dereq_,module,exports){
|
9707 |
|
9708 |
|
9709 |
|
9710 |
|
9711 |
|
9712 |
|
9713 |
|
9714 |
|
9715 |
|
9716 |
|
9717 |
|
9718 | 'use strict';
|
9719 |
|
9720 | var _prodInvariant = _dereq_(140);
|
9721 |
|
9722 | var invariant = _dereq_(162);
|
9723 |
|
9724 |
|
9725 |
|
9726 |
|
9727 |
|
9728 | function getLowestCommonAncestor(instA, instB) {
|
9729 | !('_hostNode' in instA) ? "development" !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
9730 | !('_hostNode' in instB) ? "development" !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
9731 |
|
9732 | var depthA = 0;
|
9733 | for (var tempA = instA; tempA; tempA = tempA._hostParent) {
|
9734 | depthA++;
|
9735 | }
|
9736 | var depthB = 0;
|
9737 | for (var tempB = instB; tempB; tempB = tempB._hostParent) {
|
9738 | depthB++;
|
9739 | }
|
9740 |
|
9741 |
|
9742 | while (depthA - depthB > 0) {
|
9743 | instA = instA._hostParent;
|
9744 | depthA--;
|
9745 | }
|
9746 |
|
9747 |
|
9748 | while (depthB - depthA > 0) {
|
9749 | instB = instB._hostParent;
|
9750 | depthB--;
|
9751 | }
|
9752 |
|
9753 |
|
9754 | var depth = depthA;
|
9755 | while (depth--) {
|
9756 | if (instA === instB) {
|
9757 | return instA;
|
9758 | }
|
9759 | instA = instA._hostParent;
|
9760 | instB = instB._hostParent;
|
9761 | }
|
9762 | return null;
|
9763 | }
|
9764 |
|
9765 |
|
9766 |
|
9767 |
|
9768 | function isAncestor(instA, instB) {
|
9769 | !('_hostNode' in instA) ? "development" !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
9770 | !('_hostNode' in instB) ? "development" !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
9771 |
|
9772 | while (instB) {
|
9773 | if (instB === instA) {
|
9774 | return true;
|
9775 | }
|
9776 | instB = instB._hostParent;
|
9777 | }
|
9778 | return false;
|
9779 | }
|
9780 |
|
9781 |
|
9782 |
|
9783 |
|
9784 | function getParentInstance(inst) {
|
9785 | !('_hostNode' in inst) ? "development" !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
|
9786 |
|
9787 | return inst._hostParent;
|
9788 | }
|
9789 |
|
9790 |
|
9791 |
|
9792 |
|
9793 | function traverseTwoPhase(inst, fn, arg) {
|
9794 | var path = [];
|
9795 | while (inst) {
|
9796 | path.push(inst);
|
9797 | inst = inst._hostParent;
|
9798 | }
|
9799 | var i;
|
9800 | for (i = path.length; i-- > 0;) {
|
9801 | fn(path[i], false, arg);
|
9802 | }
|
9803 | for (i = 0; i < path.length; i++) {
|
9804 | fn(path[i], true, arg);
|
9805 | }
|
9806 | }
|
9807 |
|
9808 |
|
9809 |
|
9810 |
|
9811 |
|
9812 |
|
9813 |
|
9814 |
|
9815 | function traverseEnterLeave(from, to, fn, argFrom, argTo) {
|
9816 | var common = from && to ? getLowestCommonAncestor(from, to) : null;
|
9817 | var pathFrom = [];
|
9818 | while (from && from !== common) {
|
9819 | pathFrom.push(from);
|
9820 | from = from._hostParent;
|
9821 | }
|
9822 | var pathTo = [];
|
9823 | while (to && to !== common) {
|
9824 | pathTo.push(to);
|
9825 | to = to._hostParent;
|
9826 | }
|
9827 | var i;
|
9828 | for (i = 0; i < pathFrom.length; i++) {
|
9829 | fn(pathFrom[i], true, argFrom);
|
9830 | }
|
9831 | for (i = pathTo.length; i-- > 0;) {
|
9832 | fn(pathTo[i], false, argTo);
|
9833 | }
|
9834 | }
|
9835 |
|
9836 | module.exports = {
|
9837 | isAncestor: isAncestor,
|
9838 | getLowestCommonAncestor: getLowestCommonAncestor,
|
9839 | getParentInstance: getParentInstance,
|
9840 | traverseTwoPhase: traverseTwoPhase,
|
9841 | traverseEnterLeave: traverseEnterLeave
|
9842 | };
|
9843 | },{"140":140,"162":162}],57:[function(_dereq_,module,exports){
|
9844 |
|
9845 |
|
9846 |
|
9847 |
|
9848 |
|
9849 |
|
9850 |
|
9851 |
|
9852 |
|
9853 |
|
9854 |
|
9855 | 'use strict';
|
9856 |
|
9857 | var DOMProperty = _dereq_(10);
|
9858 | var EventPluginRegistry = _dereq_(18);
|
9859 | var ReactComponentTreeHook = _dereq_(35);
|
9860 |
|
9861 | var warning = _dereq_(171);
|
9862 |
|
9863 | if ("development" !== 'production') {
|
9864 | var reactProps = {
|
9865 | children: true,
|
9866 | dangerouslySetInnerHTML: true,
|
9867 | key: true,
|
9868 | ref: true,
|
9869 |
|
9870 | autoFocus: true,
|
9871 | defaultValue: true,
|
9872 | valueLink: true,
|
9873 | defaultChecked: true,
|
9874 | checkedLink: true,
|
9875 | innerHTML: true,
|
9876 | suppressContentEditableWarning: true,
|
9877 | onFocusIn: true,
|
9878 | onFocusOut: true
|
9879 | };
|
9880 | var warnedProperties = {};
|
9881 |
|
9882 | var validateProperty = function (tagName, name, debugID) {
|
9883 | if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) {
|
9884 | return true;
|
9885 | }
|
9886 | if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
|
9887 | return true;
|
9888 | }
|
9889 | if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) {
|
9890 | return true;
|
9891 | }
|
9892 | warnedProperties[name] = true;
|
9893 | var lowerCasedName = name.toLowerCase();
|
9894 |
|
9895 |
|
9896 | var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
|
9897 |
|
9898 | var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null;
|
9899 |
|
9900 | if (standardName != null) {
|
9901 | "development" !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
9902 | return true;
|
9903 | } else if (registrationName != null) {
|
9904 | "development" !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
9905 | return true;
|
9906 | } else {
|
9907 |
|
9908 |
|
9909 |
|
9910 |
|
9911 | return false;
|
9912 | }
|
9913 | };
|
9914 | }
|
9915 |
|
9916 | var warnUnknownProperties = function (debugID, element) {
|
9917 | var unknownProps = [];
|
9918 | for (var key in element.props) {
|
9919 | var isValid = validateProperty(element.type, key, debugID);
|
9920 | if (!isValid) {
|
9921 | unknownProps.push(key);
|
9922 | }
|
9923 | }
|
9924 |
|
9925 | var unknownPropString = unknownProps.map(function (prop) {
|
9926 | return '`' + prop + '`';
|
9927 | }).join(', ');
|
9928 |
|
9929 | if (unknownProps.length === 1) {
|
9930 | "development" !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
9931 | } else if (unknownProps.length > 1) {
|
9932 | "development" !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
9933 | }
|
9934 | };
|
9935 |
|
9936 | function handleElement(debugID, element) {
|
9937 | if (element == null || typeof element.type !== 'string') {
|
9938 | return;
|
9939 | }
|
9940 | if (element.type.indexOf('-') >= 0 || element.props.is) {
|
9941 | return;
|
9942 | }
|
9943 | warnUnknownProperties(debugID, element);
|
9944 | }
|
9945 |
|
9946 | var ReactDOMUnknownPropertyHook = {
|
9947 | onBeforeMountComponent: function (debugID, element) {
|
9948 | handleElement(debugID, element);
|
9949 | },
|
9950 | onBeforeUpdateComponent: function (debugID, element) {
|
9951 | handleElement(debugID, element);
|
9952 | }
|
9953 | };
|
9954 |
|
9955 | module.exports = ReactDOMUnknownPropertyHook;
|
9956 | },{"10":10,"171":171,"18":18,"35":35}],58:[function(_dereq_,module,exports){
|
9957 |
|
9958 |
|
9959 |
|
9960 |
|
9961 |
|
9962 |
|
9963 |
|
9964 |
|
9965 |
|
9966 |
|
9967 |
|
9968 | 'use strict';
|
9969 |
|
9970 | var ReactInvalidSetStateWarningHook = _dereq_(74);
|
9971 | var ReactHostOperationHistoryHook = _dereq_(69);
|
9972 | var ReactComponentTreeHook = _dereq_(35);
|
9973 | var ReactChildrenMutationWarningHook = _dereq_(30);
|
9974 | var ExecutionEnvironment = _dereq_(148);
|
9975 |
|
9976 | var performanceNow = _dereq_(169);
|
9977 | var warning = _dereq_(171);
|
9978 |
|
9979 | var hooks = [];
|
9980 | var didHookThrowForEvent = {};
|
9981 |
|
9982 | function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
|
9983 | try {
|
9984 | fn.call(context, arg1, arg2, arg3, arg4, arg5);
|
9985 | } catch (e) {
|
9986 | "development" !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
|
9987 | didHookThrowForEvent[event] = true;
|
9988 | }
|
9989 | }
|
9990 |
|
9991 | function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
|
9992 | for (var i = 0; i < hooks.length; i++) {
|
9993 | var hook = hooks[i];
|
9994 | var fn = hook[event];
|
9995 | if (fn) {
|
9996 | callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
|
9997 | }
|
9998 | }
|
9999 | }
|
10000 |
|
10001 | var isProfiling = false;
|
10002 | var flushHistory = [];
|
10003 | var lifeCycleTimerStack = [];
|
10004 | var currentFlushNesting = 0;
|
10005 | var currentFlushMeasurements = null;
|
10006 | var currentFlushStartTime = null;
|
10007 | var currentTimerDebugID = null;
|
10008 | var currentTimerStartTime = null;
|
10009 | var currentTimerNestedFlushDuration = null;
|
10010 | var currentTimerType = null;
|
10011 |
|
10012 | var lifeCycleTimerHasWarned = false;
|
10013 |
|
10014 | function clearHistory() {
|
10015 | ReactComponentTreeHook.purgeUnmountedComponents();
|
10016 | ReactHostOperationHistoryHook.clearHistory();
|
10017 | }
|
10018 |
|
10019 | function getTreeSnapshot(registeredIDs) {
|
10020 | return registeredIDs.reduce(function (tree, id) {
|
10021 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
10022 | var parentID = ReactComponentTreeHook.getParentID(id);
|
10023 | tree[id] = {
|
10024 | displayName: ReactComponentTreeHook.getDisplayName(id),
|
10025 | text: ReactComponentTreeHook.getText(id),
|
10026 | updateCount: ReactComponentTreeHook.getUpdateCount(id),
|
10027 | childIDs: ReactComponentTreeHook.getChildIDs(id),
|
10028 |
|
10029 | ownerID: ownerID || ReactComponentTreeHook.getOwnerID(parentID),
|
10030 | parentID: parentID
|
10031 | };
|
10032 | return tree;
|
10033 | }, {});
|
10034 | }
|
10035 |
|
10036 | function resetMeasurements() {
|
10037 | var previousStartTime = currentFlushStartTime;
|
10038 | var previousMeasurements = currentFlushMeasurements || [];
|
10039 | var previousOperations = ReactHostOperationHistoryHook.getHistory();
|
10040 |
|
10041 | if (currentFlushNesting === 0) {
|
10042 | currentFlushStartTime = null;
|
10043 | currentFlushMeasurements = null;
|
10044 | clearHistory();
|
10045 | return;
|
10046 | }
|
10047 |
|
10048 | if (previousMeasurements.length || previousOperations.length) {
|
10049 | var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
|
10050 | flushHistory.push({
|
10051 | duration: performanceNow() - previousStartTime,
|
10052 | measurements: previousMeasurements || [],
|
10053 | operations: previousOperations || [],
|
10054 | treeSnapshot: getTreeSnapshot(registeredIDs)
|
10055 | });
|
10056 | }
|
10057 |
|
10058 | clearHistory();
|
10059 | currentFlushStartTime = performanceNow();
|
10060 | currentFlushMeasurements = [];
|
10061 | }
|
10062 |
|
10063 | function checkDebugID(debugID) {
|
10064 | var allowRoot = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
|
10065 |
|
10066 | if (allowRoot && debugID === 0) {
|
10067 | return;
|
10068 | }
|
10069 | if (!debugID) {
|
10070 | "development" !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
|
10071 | }
|
10072 | }
|
10073 |
|
10074 | function beginLifeCycleTimer(debugID, timerType) {
|
10075 | if (currentFlushNesting === 0) {
|
10076 | return;
|
10077 | }
|
10078 | if (currentTimerType && !lifeCycleTimerHasWarned) {
|
10079 | "development" !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
|
10080 | lifeCycleTimerHasWarned = true;
|
10081 | }
|
10082 | currentTimerStartTime = performanceNow();
|
10083 | currentTimerNestedFlushDuration = 0;
|
10084 | currentTimerDebugID = debugID;
|
10085 | currentTimerType = timerType;
|
10086 | }
|
10087 |
|
10088 | function endLifeCycleTimer(debugID, timerType) {
|
10089 | if (currentFlushNesting === 0) {
|
10090 | return;
|
10091 | }
|
10092 | if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
|
10093 | "development" !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
|
10094 | lifeCycleTimerHasWarned = true;
|
10095 | }
|
10096 | if (isProfiling) {
|
10097 | currentFlushMeasurements.push({
|
10098 | timerType: timerType,
|
10099 | instanceID: debugID,
|
10100 | duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
|
10101 | });
|
10102 | }
|
10103 | currentTimerStartTime = null;
|
10104 | currentTimerNestedFlushDuration = null;
|
10105 | currentTimerDebugID = null;
|
10106 | currentTimerType = null;
|
10107 | }
|
10108 |
|
10109 | function pauseCurrentLifeCycleTimer() {
|
10110 | var currentTimer = {
|
10111 | startTime: currentTimerStartTime,
|
10112 | nestedFlushStartTime: performanceNow(),
|
10113 | debugID: currentTimerDebugID,
|
10114 | timerType: currentTimerType
|
10115 | };
|
10116 | lifeCycleTimerStack.push(currentTimer);
|
10117 | currentTimerStartTime = null;
|
10118 | currentTimerNestedFlushDuration = null;
|
10119 | currentTimerDebugID = null;
|
10120 | currentTimerType = null;
|
10121 | }
|
10122 |
|
10123 | function resumeCurrentLifeCycleTimer() {
|
10124 | var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop();
|
10125 |
|
10126 | var startTime = _lifeCycleTimerStack$.startTime;
|
10127 | var nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime;
|
10128 | var debugID = _lifeCycleTimerStack$.debugID;
|
10129 | var timerType = _lifeCycleTimerStack$.timerType;
|
10130 |
|
10131 | var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
|
10132 | currentTimerStartTime = startTime;
|
10133 | currentTimerNestedFlushDuration += nestedFlushDuration;
|
10134 | currentTimerDebugID = debugID;
|
10135 | currentTimerType = timerType;
|
10136 | }
|
10137 |
|
10138 | var ReactDebugTool = {
|
10139 | addHook: function (hook) {
|
10140 | hooks.push(hook);
|
10141 | },
|
10142 | removeHook: function (hook) {
|
10143 | for (var i = 0; i < hooks.length; i++) {
|
10144 | if (hooks[i] === hook) {
|
10145 | hooks.splice(i, 1);
|
10146 | i--;
|
10147 | }
|
10148 | }
|
10149 | },
|
10150 | isProfiling: function () {
|
10151 | return isProfiling;
|
10152 | },
|
10153 | beginProfiling: function () {
|
10154 | if (isProfiling) {
|
10155 | return;
|
10156 | }
|
10157 |
|
10158 | isProfiling = true;
|
10159 | flushHistory.length = 0;
|
10160 | resetMeasurements();
|
10161 | ReactDebugTool.addHook(ReactHostOperationHistoryHook);
|
10162 | },
|
10163 | endProfiling: function () {
|
10164 | if (!isProfiling) {
|
10165 | return;
|
10166 | }
|
10167 |
|
10168 | isProfiling = false;
|
10169 | resetMeasurements();
|
10170 | ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
|
10171 | },
|
10172 | getFlushHistory: function () {
|
10173 | return flushHistory;
|
10174 | },
|
10175 | onBeginFlush: function () {
|
10176 | currentFlushNesting++;
|
10177 | resetMeasurements();
|
10178 | pauseCurrentLifeCycleTimer();
|
10179 | emitEvent('onBeginFlush');
|
10180 | },
|
10181 | onEndFlush: function () {
|
10182 | resetMeasurements();
|
10183 | currentFlushNesting--;
|
10184 | resumeCurrentLifeCycleTimer();
|
10185 | emitEvent('onEndFlush');
|
10186 | },
|
10187 | onBeginLifeCycleTimer: function (debugID, timerType) {
|
10188 | checkDebugID(debugID);
|
10189 | emitEvent('onBeginLifeCycleTimer', debugID, timerType);
|
10190 | beginLifeCycleTimer(debugID, timerType);
|
10191 | },
|
10192 | onEndLifeCycleTimer: function (debugID, timerType) {
|
10193 | checkDebugID(debugID);
|
10194 | endLifeCycleTimer(debugID, timerType);
|
10195 | emitEvent('onEndLifeCycleTimer', debugID, timerType);
|
10196 | },
|
10197 | onBeginProcessingChildContext: function () {
|
10198 | emitEvent('onBeginProcessingChildContext');
|
10199 | },
|
10200 | onEndProcessingChildContext: function () {
|
10201 | emitEvent('onEndProcessingChildContext');
|
10202 | },
|
10203 | onHostOperation: function (debugID, type, payload) {
|
10204 | checkDebugID(debugID);
|
10205 | emitEvent('onHostOperation', debugID, type, payload);
|
10206 | },
|
10207 | onSetState: function () {
|
10208 | emitEvent('onSetState');
|
10209 | },
|
10210 | onSetChildren: function (debugID, childDebugIDs) {
|
10211 | checkDebugID(debugID);
|
10212 | childDebugIDs.forEach(checkDebugID);
|
10213 | emitEvent('onSetChildren', debugID, childDebugIDs);
|
10214 | },
|
10215 | onBeforeMountComponent: function (debugID, element, parentDebugID) {
|
10216 | checkDebugID(debugID);
|
10217 | checkDebugID(parentDebugID, true);
|
10218 | emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
|
10219 | },
|
10220 | onMountComponent: function (debugID) {
|
10221 | checkDebugID(debugID);
|
10222 | emitEvent('onMountComponent', debugID);
|
10223 | },
|
10224 | onBeforeUpdateComponent: function (debugID, element) {
|
10225 | checkDebugID(debugID);
|
10226 | emitEvent('onBeforeUpdateComponent', debugID, element);
|
10227 | },
|
10228 | onUpdateComponent: function (debugID) {
|
10229 | checkDebugID(debugID);
|
10230 | emitEvent('onUpdateComponent', debugID);
|
10231 | },
|
10232 | onBeforeUnmountComponent: function (debugID) {
|
10233 | checkDebugID(debugID);
|
10234 | emitEvent('onBeforeUnmountComponent', debugID);
|
10235 | },
|
10236 | onUnmountComponent: function (debugID) {
|
10237 | checkDebugID(debugID);
|
10238 | emitEvent('onUnmountComponent', debugID);
|
10239 | },
|
10240 | onTestEvent: function () {
|
10241 | emitEvent('onTestEvent');
|
10242 | }
|
10243 | };
|
10244 |
|
10245 |
|
10246 | ReactDebugTool.addDevtool = ReactDebugTool.addHook;
|
10247 | ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
|
10248 |
|
10249 | ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
|
10250 | ReactDebugTool.addHook(ReactComponentTreeHook);
|
10251 | ReactDebugTool.addHook(ReactChildrenMutationWarningHook);
|
10252 | var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
|
10253 | if (/[?&]react_perf\b/.test(url)) {
|
10254 | ReactDebugTool.beginProfiling();
|
10255 | }
|
10256 |
|
10257 | module.exports = ReactDebugTool;
|
10258 | },{"148":148,"169":169,"171":171,"30":30,"35":35,"69":69,"74":74}],59:[function(_dereq_,module,exports){
|
10259 |
|
10260 |
|
10261 |
|
10262 |
|
10263 |
|
10264 |
|
10265 |
|
10266 |
|
10267 |
|
10268 |
|
10269 |
|
10270 | 'use strict';
|
10271 |
|
10272 | var _assign = _dereq_(172);
|
10273 |
|
10274 | var ReactUpdates = _dereq_(96);
|
10275 | var Transaction = _dereq_(114);
|
10276 |
|
10277 | var emptyFunction = _dereq_(154);
|
10278 |
|
10279 | var RESET_BATCHED_UPDATES = {
|
10280 | initialize: emptyFunction,
|
10281 | close: function () {
|
10282 | ReactDefaultBatchingStrategy.isBatchingUpdates = false;
|
10283 | }
|
10284 | };
|
10285 |
|
10286 | var FLUSH_BATCHED_UPDATES = {
|
10287 | initialize: emptyFunction,
|
10288 | close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
|
10289 | };
|
10290 |
|
10291 | var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
|
10292 |
|
10293 | function ReactDefaultBatchingStrategyTransaction() {
|
10294 | this.reinitializeTransaction();
|
10295 | }
|
10296 |
|
10297 | _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction.Mixin, {
|
10298 | getTransactionWrappers: function () {
|
10299 | return TRANSACTION_WRAPPERS;
|
10300 | }
|
10301 | });
|
10302 |
|
10303 | var transaction = new ReactDefaultBatchingStrategyTransaction();
|
10304 |
|
10305 | var ReactDefaultBatchingStrategy = {
|
10306 | isBatchingUpdates: false,
|
10307 |
|
10308 | |
10309 |
|
10310 |
|
10311 |
|
10312 | batchedUpdates: function (callback, a, b, c, d, e) {
|
10313 | var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
|
10314 |
|
10315 | ReactDefaultBatchingStrategy.isBatchingUpdates = true;
|
10316 |
|
10317 |
|
10318 | if (alreadyBatchingUpdates) {
|
10319 | callback(a, b, c, d, e);
|
10320 | } else {
|
10321 | transaction.perform(callback, null, a, b, c, d, e);
|
10322 | }
|
10323 | }
|
10324 | };
|
10325 |
|
10326 | module.exports = ReactDefaultBatchingStrategy;
|
10327 | },{"114":114,"154":154,"172":172,"96":96}],60:[function(_dereq_,module,exports){
|
10328 |
|
10329 |
|
10330 |
|
10331 |
|
10332 |
|
10333 |
|
10334 |
|
10335 |
|
10336 |
|
10337 |
|
10338 |
|
10339 | 'use strict';
|
10340 |
|
10341 | var BeforeInputEventPlugin = _dereq_(2);
|
10342 | var ChangeEventPlugin = _dereq_(6);
|
10343 | var DefaultEventPluginOrder = _dereq_(13);
|
10344 | var EnterLeaveEventPlugin = _dereq_(15);
|
10345 | var HTMLDOMPropertyConfig = _dereq_(22);
|
10346 | var ReactComponentBrowserEnvironment = _dereq_(33);
|
10347 | var ReactDOMComponent = _dereq_(40);
|
10348 | var ReactDOMComponentTree = _dereq_(42);
|
10349 | var ReactDOMEmptyComponent = _dereq_(44);
|
10350 | var ReactDOMTreeTraversal = _dereq_(56);
|
10351 | var ReactDOMTextComponent = _dereq_(54);
|
10352 | var ReactDefaultBatchingStrategy = _dereq_(59);
|
10353 | var ReactEventListener = _dereq_(66);
|
10354 | var ReactInjection = _dereq_(70);
|
10355 | var ReactReconcileTransaction = _dereq_(87);
|
10356 | var SVGDOMPropertyConfig = _dereq_(98);
|
10357 | var SelectEventPlugin = _dereq_(99);
|
10358 | var SimpleEventPlugin = _dereq_(100);
|
10359 |
|
10360 | var alreadyInjected = false;
|
10361 |
|
10362 | function inject() {
|
10363 | if (alreadyInjected) {
|
10364 |
|
10365 |
|
10366 |
|
10367 | return;
|
10368 | }
|
10369 | alreadyInjected = true;
|
10370 |
|
10371 | ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
|
10372 |
|
10373 | |
10374 |
|
10375 |
|
10376 | ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
|
10377 | ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
|
10378 | ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
|
10379 |
|
10380 | |
10381 |
|
10382 |
|
10383 |
|
10384 | ReactInjection.EventPluginHub.injectEventPluginsByName({
|
10385 | SimpleEventPlugin: SimpleEventPlugin,
|
10386 | EnterLeaveEventPlugin: EnterLeaveEventPlugin,
|
10387 | ChangeEventPlugin: ChangeEventPlugin,
|
10388 | SelectEventPlugin: SelectEventPlugin,
|
10389 | BeforeInputEventPlugin: BeforeInputEventPlugin
|
10390 | });
|
10391 |
|
10392 | ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
|
10393 |
|
10394 | ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
|
10395 |
|
10396 | ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
|
10397 | ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
|
10398 |
|
10399 | ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
|
10400 | return new ReactDOMEmptyComponent(instantiate);
|
10401 | });
|
10402 |
|
10403 | ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
|
10404 | ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
|
10405 |
|
10406 | ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
|
10407 | }
|
10408 |
|
10409 | module.exports = {
|
10410 | inject: inject
|
10411 | };
|
10412 | },{"100":100,"13":13,"15":15,"2":2,"22":22,"33":33,"40":40,"42":42,"44":44,"54":54,"56":56,"59":59,"6":6,"66":66,"70":70,"87":87,"98":98,"99":99}],61:[function(_dereq_,module,exports){
|
10413 |
|
10414 |
|
10415 |
|
10416 |
|
10417 |
|
10418 |
|
10419 |
|
10420 |
|
10421 |
|
10422 |
|
10423 |
|
10424 | 'use strict';
|
10425 |
|
10426 | var _assign = _dereq_(172);
|
10427 |
|
10428 | var ReactCurrentOwner = _dereq_(37);
|
10429 |
|
10430 | var warning = _dereq_(171);
|
10431 | var canDefineProperty = _dereq_(118);
|
10432 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
10433 |
|
10434 |
|
10435 |
|
10436 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
10437 |
|
10438 | var RESERVED_PROPS = {
|
10439 | key: true,
|
10440 | ref: true,
|
10441 | __self: true,
|
10442 | __source: true
|
10443 | };
|
10444 |
|
10445 | var specialPropKeyWarningShown, specialPropRefWarningShown;
|
10446 |
|
10447 | function hasValidRef(config) {
|
10448 | if ("development" !== 'production') {
|
10449 | if (hasOwnProperty.call(config, 'ref')) {
|
10450 | var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
10451 | if (getter && getter.isReactWarning) {
|
10452 | return false;
|
10453 | }
|
10454 | }
|
10455 | }
|
10456 | return config.ref !== undefined;
|
10457 | }
|
10458 |
|
10459 | function hasValidKey(config) {
|
10460 | if ("development" !== 'production') {
|
10461 | if (hasOwnProperty.call(config, 'key')) {
|
10462 | var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
10463 | if (getter && getter.isReactWarning) {
|
10464 | return false;
|
10465 | }
|
10466 | }
|
10467 | }
|
10468 | return config.key !== undefined;
|
10469 | }
|
10470 |
|
10471 | function defineKeyPropWarningGetter(props, displayName) {
|
10472 | var warnAboutAccessingKey = function () {
|
10473 | if (!specialPropKeyWarningShown) {
|
10474 | specialPropKeyWarningShown = true;
|
10475 | "development" !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
|
10476 | }
|
10477 | };
|
10478 | warnAboutAccessingKey.isReactWarning = true;
|
10479 | Object.defineProperty(props, 'key', {
|
10480 | get: warnAboutAccessingKey,
|
10481 | configurable: true
|
10482 | });
|
10483 | }
|
10484 |
|
10485 | function defineRefPropWarningGetter(props, displayName) {
|
10486 | var warnAboutAccessingRef = function () {
|
10487 | if (!specialPropRefWarningShown) {
|
10488 | specialPropRefWarningShown = true;
|
10489 | "development" !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
|
10490 | }
|
10491 | };
|
10492 | warnAboutAccessingRef.isReactWarning = true;
|
10493 | Object.defineProperty(props, 'ref', {
|
10494 | get: warnAboutAccessingRef,
|
10495 | configurable: true
|
10496 | });
|
10497 | }
|
10498 |
|
10499 | /**
|
10500 | * Factory method to create a new React element. This no longer adheres to
|
10501 | * the class pattern, so do not use new to call it. Also, no instanceof check
|
10502 | * will work. Instead test $$typeof field against Symbol.for('react.element') to check
|
10503 | * if something is a React Element.
|
10504 | *
|
10505 | * @param {*} type
|
10506 | * @param {*} key
|
10507 | * @param {string|object} ref
|
10508 | * @param {*} self A *temporary* helper to detect places where `this` is
|
10509 | * different from the `owner` when React.createElement is called, so that we
|
10510 | * can warn. We want to get rid of owner and replace string `ref`s with arrow
|
10511 | * functions, and as long as `this` and owner are the same, there will be no
|
10512 | * change in behavior.
|
10513 | * @param {*} source An annotation object (added by a transpiler or otherwise)
|
10514 | * indicating filename, line number, and/or other information.
|
10515 | * @param {*} owner
|
10516 | * @param {*} props
|
10517 | * @internal
|
10518 | */
|
10519 | var ReactElement = function (type, key, ref, self, source, owner, props) {
|
10520 | var element = {
|
10521 |
|
10522 | $$typeof: REACT_ELEMENT_TYPE,
|
10523 |
|
10524 |
|
10525 | type: type,
|
10526 | key: key,
|
10527 | ref: ref,
|
10528 | props: props,
|
10529 |
|
10530 |
|
10531 | _owner: owner
|
10532 | };
|
10533 |
|
10534 | if ("development" !== 'production') {
|
10535 |
|
10536 |
|
10537 |
|
10538 |
|
10539 | element._store = {};
|
10540 | var shadowChildren = Array.isArray(props.children) ? props.children.slice(0) : props.children;
|
10541 |
|
10542 |
|
10543 |
|
10544 |
|
10545 |
|
10546 | if (canDefineProperty) {
|
10547 | Object.defineProperty(element._store, 'validated', {
|
10548 | configurable: false,
|
10549 | enumerable: false,
|
10550 | writable: true,
|
10551 | value: false
|
10552 | });
|
10553 |
|
10554 | Object.defineProperty(element, '_self', {
|
10555 | configurable: false,
|
10556 | enumerable: false,
|
10557 | writable: false,
|
10558 | value: self
|
10559 | });
|
10560 | Object.defineProperty(element, '_shadowChildren', {
|
10561 | configurable: false,
|
10562 | enumerable: false,
|
10563 | writable: false,
|
10564 | value: shadowChildren
|
10565 | });
|
10566 |
|
10567 |
|
10568 | Object.defineProperty(element, '_source', {
|
10569 | configurable: false,
|
10570 | enumerable: false,
|
10571 | writable: false,
|
10572 | value: source
|
10573 | });
|
10574 | } else {
|
10575 | element._store.validated = false;
|
10576 | element._self = self;
|
10577 | element._shadowChildren = shadowChildren;
|
10578 | element._source = source;
|
10579 | }
|
10580 | if (Object.freeze) {
|
10581 | Object.freeze(element.props);
|
10582 | Object.freeze(element);
|
10583 | }
|
10584 | }
|
10585 |
|
10586 | return element;
|
10587 | };
|
10588 |
|
10589 |
|
10590 |
|
10591 |
|
10592 |
|
10593 | ReactElement.createElement = function (type, config, children) {
|
10594 | var propName;
|
10595 |
|
10596 |
|
10597 | var props = {};
|
10598 |
|
10599 | var key = null;
|
10600 | var ref = null;
|
10601 | var self = null;
|
10602 | var source = null;
|
10603 |
|
10604 | if (config != null) {
|
10605 | if (hasValidRef(config)) {
|
10606 | ref = config.ref;
|
10607 | }
|
10608 | if (hasValidKey(config)) {
|
10609 | key = '' + config.key;
|
10610 | }
|
10611 |
|
10612 | self = config.__self === undefined ? null : config.__self;
|
10613 | source = config.__source === undefined ? null : config.__source;
|
10614 |
|
10615 | for (propName in config) {
|
10616 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
10617 | props[propName] = config[propName];
|
10618 | }
|
10619 | }
|
10620 | }
|
10621 |
|
10622 |
|
10623 |
|
10624 | var childrenLength = arguments.length - 2;
|
10625 | if (childrenLength === 1) {
|
10626 | props.children = children;
|
10627 | } else if (childrenLength > 1) {
|
10628 | var childArray = Array(childrenLength);
|
10629 | for (var i = 0; i < childrenLength; i++) {
|
10630 | childArray[i] = arguments[i + 2];
|
10631 | }
|
10632 | props.children = childArray;
|
10633 | }
|
10634 |
|
10635 |
|
10636 | if (type && type.defaultProps) {
|
10637 | var defaultProps = type.defaultProps;
|
10638 | for (propName in defaultProps) {
|
10639 | if (props[propName] === undefined) {
|
10640 | props[propName] = defaultProps[propName];
|
10641 | }
|
10642 | }
|
10643 | }
|
10644 | if ("development" !== 'production') {
|
10645 | if (key || ref) {
|
10646 | if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
|
10647 | var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
10648 | if (key) {
|
10649 | defineKeyPropWarningGetter(props, displayName);
|
10650 | }
|
10651 | if (ref) {
|
10652 | defineRefPropWarningGetter(props, displayName);
|
10653 | }
|
10654 | }
|
10655 | }
|
10656 | }
|
10657 | return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
10658 | };
|
10659 |
|
10660 |
|
10661 |
|
10662 |
|
10663 |
|
10664 | ReactElement.createFactory = function (type) {
|
10665 | var factory = ReactElement.createElement.bind(null, type);
|
10666 |
|
10667 |
|
10668 |
|
10669 |
|
10670 |
|
10671 | factory.type = type;
|
10672 | return factory;
|
10673 | };
|
10674 |
|
10675 | ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
|
10676 | var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
10677 |
|
10678 | return newElement;
|
10679 | };
|
10680 |
|
10681 |
|
10682 |
|
10683 |
|
10684 |
|
10685 | ReactElement.cloneElement = function (element, config, children) {
|
10686 | var propName;
|
10687 |
|
10688 |
|
10689 | var props = _assign({}, element.props);
|
10690 |
|
10691 |
|
10692 | var key = element.key;
|
10693 | var ref = element.ref;
|
10694 |
|
10695 | var self = element._self;
|
10696 |
|
10697 |
|
10698 |
|
10699 | var source = element._source;
|
10700 |
|
10701 |
|
10702 | var owner = element._owner;
|
10703 |
|
10704 | if (config != null) {
|
10705 | if (hasValidRef(config)) {
|
10706 |
|
10707 | ref = config.ref;
|
10708 | owner = ReactCurrentOwner.current;
|
10709 | }
|
10710 | if (hasValidKey(config)) {
|
10711 | key = '' + config.key;
|
10712 | }
|
10713 |
|
10714 |
|
10715 | var defaultProps;
|
10716 | if (element.type && element.type.defaultProps) {
|
10717 | defaultProps = element.type.defaultProps;
|
10718 | }
|
10719 | for (propName in config) {
|
10720 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
10721 | if (config[propName] === undefined && defaultProps !== undefined) {
|
10722 |
|
10723 | props[propName] = defaultProps[propName];
|
10724 | } else {
|
10725 | props[propName] = config[propName];
|
10726 | }
|
10727 | }
|
10728 | }
|
10729 | }
|
10730 |
|
10731 |
|
10732 |
|
10733 | var childrenLength = arguments.length - 2;
|
10734 | if (childrenLength === 1) {
|
10735 | props.children = children;
|
10736 | } else if (childrenLength > 1) {
|
10737 | var childArray = Array(childrenLength);
|
10738 | for (var i = 0; i < childrenLength; i++) {
|
10739 | childArray[i] = arguments[i + 2];
|
10740 | }
|
10741 | props.children = childArray;
|
10742 | }
|
10743 |
|
10744 | return ReactElement(element.type, key, ref, self, source, owner, props);
|
10745 | };
|
10746 |
|
10747 |
|
10748 |
|
10749 |
|
10750 |
|
10751 |
|
10752 |
|
10753 |
|
10754 | ReactElement.isValidElement = function (object) {
|
10755 | return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
10756 | };
|
10757 |
|
10758 | ReactElement.REACT_ELEMENT_TYPE = REACT_ELEMENT_TYPE;
|
10759 |
|
10760 | module.exports = ReactElement;
|
10761 | },{"118":118,"171":171,"172":172,"37":37}],62:[function(_dereq_,module,exports){
|
10762 |
|
10763 |
|
10764 |
|
10765 |
|
10766 |
|
10767 |
|
10768 |
|
10769 |
|
10770 |
|
10771 |
|
10772 |
|
10773 |
|
10774 |
|
10775 |
|
10776 |
|
10777 |
|
10778 |
|
10779 |
|
10780 | 'use strict';
|
10781 |
|
10782 | var ReactCurrentOwner = _dereq_(37);
|
10783 | var ReactComponentTreeHook = _dereq_(35);
|
10784 | var ReactElement = _dereq_(61);
|
10785 | var ReactPropTypeLocations = _dereq_(83);
|
10786 |
|
10787 | var checkReactTypeSpec = _dereq_(119);
|
10788 |
|
10789 | var canDefineProperty = _dereq_(118);
|
10790 | var getIteratorFn = _dereq_(131);
|
10791 | var warning = _dereq_(171);
|
10792 |
|
10793 | function getDeclarationErrorAddendum() {
|
10794 | if (ReactCurrentOwner.current) {
|
10795 | var name = ReactCurrentOwner.current.getName();
|
10796 | if (name) {
|
10797 | return ' Check the render method of `' + name + '`.';
|
10798 | }
|
10799 | }
|
10800 | return '';
|
10801 | }
|
10802 |
|
10803 |
|
10804 |
|
10805 |
|
10806 |
|
10807 |
|
10808 | var ownerHasKeyUseWarning = {};
|
10809 |
|
10810 | function getCurrentComponentErrorInfo(parentType) {
|
10811 | var info = getDeclarationErrorAddendum();
|
10812 |
|
10813 | if (!info) {
|
10814 | var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
10815 | if (parentName) {
|
10816 | info = ' Check the top-level render call using <' + parentName + '>.';
|
10817 | }
|
10818 | }
|
10819 | return info;
|
10820 | }
|
10821 |
|
10822 |
|
10823 |
|
10824 |
|
10825 |
|
10826 |
|
10827 |
|
10828 |
|
10829 |
|
10830 |
|
10831 |
|
10832 |
|
10833 | function validateExplicitKey(element, parentType) {
|
10834 | if (!element._store || element._store.validated || element.key != null) {
|
10835 | return;
|
10836 | }
|
10837 | element._store.validated = true;
|
10838 |
|
10839 | var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
|
10840 |
|
10841 | var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
10842 | if (memoizer[currentComponentErrorInfo]) {
|
10843 | return;
|
10844 | }
|
10845 | memoizer[currentComponentErrorInfo] = true;
|
10846 |
|
10847 |
|
10848 |
|
10849 |
|
10850 | var childOwner = '';
|
10851 | if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
10852 |
|
10853 | childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
|
10854 | }
|
10855 |
|
10856 | "development" !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
|
10857 | }
|
10858 |
|
10859 |
|
10860 |
|
10861 |
|
10862 |
|
10863 |
|
10864 |
|
10865 |
|
10866 |
|
10867 |
|
10868 | function validateChildKeys(node, parentType) {
|
10869 | if (typeof node !== 'object') {
|
10870 | return;
|
10871 | }
|
10872 | if (Array.isArray(node)) {
|
10873 | for (var i = 0; i < node.length; i++) {
|
10874 | var child = node[i];
|
10875 | if (ReactElement.isValidElement(child)) {
|
10876 | validateExplicitKey(child, parentType);
|
10877 | }
|
10878 | }
|
10879 | } else if (ReactElement.isValidElement(node)) {
|
10880 |
|
10881 | if (node._store) {
|
10882 | node._store.validated = true;
|
10883 | }
|
10884 | } else if (node) {
|
10885 | var iteratorFn = getIteratorFn(node);
|
10886 |
|
10887 | if (iteratorFn) {
|
10888 | if (iteratorFn !== node.entries) {
|
10889 | var iterator = iteratorFn.call(node);
|
10890 | var step;
|
10891 | while (!(step = iterator.next()).done) {
|
10892 | if (ReactElement.isValidElement(step.value)) {
|
10893 | validateExplicitKey(step.value, parentType);
|
10894 | }
|
10895 | }
|
10896 | }
|
10897 | }
|
10898 | }
|
10899 | }
|
10900 |
|
10901 |
|
10902 |
|
10903 |
|
10904 |
|
10905 |
|
10906 |
|
10907 | function validatePropTypes(element) {
|
10908 | var componentClass = element.type;
|
10909 | if (typeof componentClass !== 'function') {
|
10910 | return;
|
10911 | }
|
10912 | var name = componentClass.displayName || componentClass.name;
|
10913 | if (componentClass.propTypes) {
|
10914 | checkReactTypeSpec(componentClass.propTypes, element.props, ReactPropTypeLocations.prop, name, element, null);
|
10915 | }
|
10916 | if (typeof componentClass.getDefaultProps === 'function') {
|
10917 | "development" !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
|
10918 | }
|
10919 | }
|
10920 |
|
10921 | var ReactElementValidator = {
|
10922 |
|
10923 | createElement: function (type, props, children) {
|
10924 | var validType = typeof type === 'string' || typeof type === 'function';
|
10925 |
|
10926 |
|
10927 | if (!validType) {
|
10928 | "development" !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
|
10929 | }
|
10930 |
|
10931 | var element = ReactElement.createElement.apply(this, arguments);
|
10932 |
|
10933 |
|
10934 |
|
10935 | if (element == null) {
|
10936 | return element;
|
10937 | }
|
10938 |
|
10939 |
|
10940 |
|
10941 |
|
10942 |
|
10943 |
|
10944 | if (validType) {
|
10945 | for (var i = 2; i < arguments.length; i++) {
|
10946 | validateChildKeys(arguments[i], type);
|
10947 | }
|
10948 | }
|
10949 |
|
10950 | validatePropTypes(element);
|
10951 |
|
10952 | return element;
|
10953 | },
|
10954 |
|
10955 | createFactory: function (type) {
|
10956 | var validatedFactory = ReactElementValidator.createElement.bind(null, type);
|
10957 |
|
10958 | validatedFactory.type = type;
|
10959 |
|
10960 | if ("development" !== 'production') {
|
10961 | if (canDefineProperty) {
|
10962 | Object.defineProperty(validatedFactory, 'type', {
|
10963 | enumerable: false,
|
10964 | get: function () {
|
10965 | "development" !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0;
|
10966 | Object.defineProperty(this, 'type', {
|
10967 | value: type
|
10968 | });
|
10969 | return type;
|
10970 | }
|
10971 | });
|
10972 | }
|
10973 | }
|
10974 |
|
10975 | return validatedFactory;
|
10976 | },
|
10977 |
|
10978 | cloneElement: function (element, props, children) {
|
10979 | var newElement = ReactElement.cloneElement.apply(this, arguments);
|
10980 | for (var i = 2; i < arguments.length; i++) {
|
10981 | validateChildKeys(arguments[i], newElement.type);
|
10982 | }
|
10983 | validatePropTypes(newElement);
|
10984 | return newElement;
|
10985 | }
|
10986 |
|
10987 | };
|
10988 |
|
10989 | module.exports = ReactElementValidator;
|
10990 | },{"118":118,"119":119,"131":131,"171":171,"35":35,"37":37,"61":61,"83":83}],63:[function(_dereq_,module,exports){
|
10991 |
|
10992 |
|
10993 |
|
10994 |
|
10995 |
|
10996 |
|
10997 |
|
10998 |
|
10999 |
|
11000 |
|
11001 |
|
11002 | 'use strict';
|
11003 |
|
11004 | var emptyComponentFactory;
|
11005 |
|
11006 | var ReactEmptyComponentInjection = {
|
11007 | injectEmptyComponentFactory: function (factory) {
|
11008 | emptyComponentFactory = factory;
|
11009 | }
|
11010 | };
|
11011 |
|
11012 | var ReactEmptyComponent = {
|
11013 | create: function (instantiate) {
|
11014 | return emptyComponentFactory(instantiate);
|
11015 | }
|
11016 | };
|
11017 |
|
11018 | ReactEmptyComponent.injection = ReactEmptyComponentInjection;
|
11019 |
|
11020 | module.exports = ReactEmptyComponent;
|
11021 | },{}],64:[function(_dereq_,module,exports){
|
11022 |
|
11023 |
|
11024 |
|
11025 |
|
11026 |
|
11027 |
|
11028 |
|
11029 |
|
11030 |
|
11031 |
|
11032 |
|
11033 | 'use strict';
|
11034 |
|
11035 | var caughtError = null;
|
11036 |
|
11037 |
|
11038 |
|
11039 |
|
11040 |
|
11041 |
|
11042 |
|
11043 |
|
11044 |
|
11045 | function invokeGuardedCallback(name, func, a, b) {
|
11046 | try {
|
11047 | return func(a, b);
|
11048 | } catch (x) {
|
11049 | if (caughtError === null) {
|
11050 | caughtError = x;
|
11051 | }
|
11052 | return undefined;
|
11053 | }
|
11054 | }
|
11055 |
|
11056 | var ReactErrorUtils = {
|
11057 | invokeGuardedCallback: invokeGuardedCallback,
|
11058 |
|
11059 | |
11060 |
|
11061 |
|
11062 |
|
11063 | invokeGuardedCallbackWithCatch: invokeGuardedCallback,
|
11064 |
|
11065 | |
11066 |
|
11067 |
|
11068 |
|
11069 | rethrowCaughtError: function () {
|
11070 | if (caughtError) {
|
11071 | var error = caughtError;
|
11072 | caughtError = null;
|
11073 | throw error;
|
11074 | }
|
11075 | }
|
11076 | };
|
11077 |
|
11078 | if ("development" !== 'production') {
|
11079 | |
11080 |
|
11081 |
|
11082 |
|
11083 | if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
|
11084 | var fakeNode = document.createElement('react');
|
11085 | ReactErrorUtils.invokeGuardedCallback = function (name, func, a, b) {
|
11086 | var boundFunc = func.bind(null, a, b);
|
11087 | var evtType = 'react-' + name;
|
11088 | fakeNode.addEventListener(evtType, boundFunc, false);
|
11089 | var evt = document.createEvent('Event');
|
11090 | evt.initEvent(evtType, false, false);
|
11091 | fakeNode.dispatchEvent(evt);
|
11092 | fakeNode.removeEventListener(evtType, boundFunc, false);
|
11093 | };
|
11094 | }
|
11095 | }
|
11096 |
|
11097 | module.exports = ReactErrorUtils;
|
11098 | },{}],65:[function(_dereq_,module,exports){
|
11099 |
|
11100 |
|
11101 |
|
11102 |
|
11103 |
|
11104 |
|
11105 |
|
11106 |
|
11107 |
|
11108 |
|
11109 |
|
11110 | 'use strict';
|
11111 |
|
11112 | var EventPluginHub = _dereq_(17);
|
11113 |
|
11114 | function runEventQueueInBatch(events) {
|
11115 | EventPluginHub.enqueueEvents(events);
|
11116 | EventPluginHub.processEventQueue(false);
|
11117 | }
|
11118 |
|
11119 | var ReactEventEmitterMixin = {
|
11120 |
|
11121 | |
11122 |
|
11123 |
|
11124 |
|
11125 | handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
11126 | var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
11127 | runEventQueueInBatch(events);
|
11128 | }
|
11129 | };
|
11130 |
|
11131 | module.exports = ReactEventEmitterMixin;
|
11132 | },{"17":17}],66:[function(_dereq_,module,exports){
|
11133 |
|
11134 |
|
11135 |
|
11136 |
|
11137 |
|
11138 |
|
11139 |
|
11140 |
|
11141 |
|
11142 |
|
11143 |
|
11144 | 'use strict';
|
11145 |
|
11146 | var _assign = _dereq_(172);
|
11147 |
|
11148 | var EventListener = _dereq_(147);
|
11149 | var ExecutionEnvironment = _dereq_(148);
|
11150 | var PooledClass = _dereq_(25);
|
11151 | var ReactDOMComponentTree = _dereq_(42);
|
11152 | var ReactUpdates = _dereq_(96);
|
11153 |
|
11154 | var getEventTarget = _dereq_(129);
|
11155 | var getUnboundedScrollPosition = _dereq_(159);
|
11156 |
|
11157 |
|
11158 |
|
11159 |
|
11160 |
|
11161 |
|
11162 | function findParent(inst) {
|
11163 |
|
11164 |
|
11165 |
|
11166 | while (inst._hostParent) {
|
11167 | inst = inst._hostParent;
|
11168 | }
|
11169 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
|
11170 | var container = rootNode.parentNode;
|
11171 | return ReactDOMComponentTree.getClosestInstanceFromNode(container);
|
11172 | }
|
11173 |
|
11174 |
|
11175 | function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
|
11176 | this.topLevelType = topLevelType;
|
11177 | this.nativeEvent = nativeEvent;
|
11178 | this.ancestors = [];
|
11179 | }
|
11180 | _assign(TopLevelCallbackBookKeeping.prototype, {
|
11181 | destructor: function () {
|
11182 | this.topLevelType = null;
|
11183 | this.nativeEvent = null;
|
11184 | this.ancestors.length = 0;
|
11185 | }
|
11186 | });
|
11187 | PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
|
11188 |
|
11189 | function handleTopLevelImpl(bookKeeping) {
|
11190 | var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
|
11191 | var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
|
11192 |
|
11193 |
|
11194 |
|
11195 |
|
11196 |
|
11197 | var ancestor = targetInst;
|
11198 | do {
|
11199 | bookKeeping.ancestors.push(ancestor);
|
11200 | ancestor = ancestor && findParent(ancestor);
|
11201 | } while (ancestor);
|
11202 |
|
11203 | for (var i = 0; i < bookKeeping.ancestors.length; i++) {
|
11204 | targetInst = bookKeeping.ancestors[i];
|
11205 | ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
|
11206 | }
|
11207 | }
|
11208 |
|
11209 | function scrollValueMonitor(cb) {
|
11210 | var scrollPosition = getUnboundedScrollPosition(window);
|
11211 | cb(scrollPosition);
|
11212 | }
|
11213 |
|
11214 | var ReactEventListener = {
|
11215 | _enabled: true,
|
11216 | _handleTopLevel: null,
|
11217 |
|
11218 | WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
|
11219 |
|
11220 | setHandleTopLevel: function (handleTopLevel) {
|
11221 | ReactEventListener._handleTopLevel = handleTopLevel;
|
11222 | },
|
11223 |
|
11224 | setEnabled: function (enabled) {
|
11225 | ReactEventListener._enabled = !!enabled;
|
11226 | },
|
11227 |
|
11228 | isEnabled: function () {
|
11229 | return ReactEventListener._enabled;
|
11230 | },
|
11231 |
|
11232 | |
11233 |
|
11234 |
|
11235 |
|
11236 |
|
11237 |
|
11238 |
|
11239 |
|
11240 |
|
11241 |
|
11242 | trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
|
11243 | var element = handle;
|
11244 | if (!element) {
|
11245 | return null;
|
11246 | }
|
11247 | return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
11248 | },
|
11249 |
|
11250 | |
11251 |
|
11252 |
|
11253 |
|
11254 |
|
11255 |
|
11256 |
|
11257 |
|
11258 |
|
11259 |
|
11260 | trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
|
11261 | var element = handle;
|
11262 | if (!element) {
|
11263 | return null;
|
11264 | }
|
11265 | return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
11266 | },
|
11267 |
|
11268 | monitorScrollValue: function (refresh) {
|
11269 | var callback = scrollValueMonitor.bind(null, refresh);
|
11270 | EventListener.listen(window, 'scroll', callback);
|
11271 | },
|
11272 |
|
11273 | dispatchEvent: function (topLevelType, nativeEvent) {
|
11274 | if (!ReactEventListener._enabled) {
|
11275 | return;
|
11276 | }
|
11277 |
|
11278 | var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
|
11279 | try {
|
11280 |
|
11281 |
|
11282 | ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
|
11283 | } finally {
|
11284 | TopLevelCallbackBookKeeping.release(bookKeeping);
|
11285 | }
|
11286 | }
|
11287 | };
|
11288 |
|
11289 | module.exports = ReactEventListener;
|
11290 | },{"129":129,"147":147,"148":148,"159":159,"172":172,"25":25,"42":42,"96":96}],67:[function(_dereq_,module,exports){
|
11291 |
|
11292 |
|
11293 |
|
11294 |
|
11295 |
|
11296 |
|
11297 |
|
11298 |
|
11299 |
|
11300 |
|
11301 |
|
11302 |
|
11303 | 'use strict';
|
11304 |
|
11305 | var ReactFeatureFlags = {
|
11306 |
|
11307 |
|
11308 |
|
11309 | logTopLevelRenders: false
|
11310 | };
|
11311 |
|
11312 | module.exports = ReactFeatureFlags;
|
11313 | },{}],68:[function(_dereq_,module,exports){
|
11314 |
|
11315 |
|
11316 |
|
11317 |
|
11318 |
|
11319 |
|
11320 |
|
11321 |
|
11322 |
|
11323 |
|
11324 |
|
11325 | 'use strict';
|
11326 |
|
11327 | var _prodInvariant = _dereq_(140),
|
11328 | _assign = _dereq_(172);
|
11329 |
|
11330 | var invariant = _dereq_(162);
|
11331 |
|
11332 | var genericComponentClass = null;
|
11333 |
|
11334 | var tagToComponentClass = {};
|
11335 | var textComponentClass = null;
|
11336 |
|
11337 | var ReactHostComponentInjection = {
|
11338 |
|
11339 |
|
11340 | injectGenericComponentClass: function (componentClass) {
|
11341 | genericComponentClass = componentClass;
|
11342 | },
|
11343 |
|
11344 |
|
11345 | injectTextComponentClass: function (componentClass) {
|
11346 | textComponentClass = componentClass;
|
11347 | },
|
11348 |
|
11349 |
|
11350 | injectComponentClasses: function (componentClasses) {
|
11351 | _assign(tagToComponentClass, componentClasses);
|
11352 | }
|
11353 | };
|
11354 |
|
11355 |
|
11356 |
|
11357 |
|
11358 |
|
11359 |
|
11360 |
|
11361 | function createInternalComponent(element) {
|
11362 | !genericComponentClass ? "development" !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
|
11363 | return new genericComponentClass(element);
|
11364 | }
|
11365 |
|
11366 |
|
11367 |
|
11368 |
|
11369 |
|
11370 | function createInstanceForText(text) {
|
11371 | return new textComponentClass(text);
|
11372 | }
|
11373 |
|
11374 |
|
11375 |
|
11376 |
|
11377 |
|
11378 | function isTextComponent(component) {
|
11379 | return component instanceof textComponentClass;
|
11380 | }
|
11381 |
|
11382 | var ReactHostComponent = {
|
11383 | createInternalComponent: createInternalComponent,
|
11384 | createInstanceForText: createInstanceForText,
|
11385 | isTextComponent: isTextComponent,
|
11386 | injection: ReactHostComponentInjection
|
11387 | };
|
11388 |
|
11389 | module.exports = ReactHostComponent;
|
11390 | },{"140":140,"162":162,"172":172}],69:[function(_dereq_,module,exports){
|
11391 |
|
11392 |
|
11393 |
|
11394 |
|
11395 |
|
11396 |
|
11397 |
|
11398 |
|
11399 |
|
11400 |
|
11401 |
|
11402 | 'use strict';
|
11403 |
|
11404 | var history = [];
|
11405 |
|
11406 | var ReactHostOperationHistoryHook = {
|
11407 | onHostOperation: function (debugID, type, payload) {
|
11408 | history.push({
|
11409 | instanceID: debugID,
|
11410 | type: type,
|
11411 | payload: payload
|
11412 | });
|
11413 | },
|
11414 | clearHistory: function () {
|
11415 | if (ReactHostOperationHistoryHook._preventClearing) {
|
11416 |
|
11417 | return;
|
11418 | }
|
11419 |
|
11420 | history = [];
|
11421 | },
|
11422 | getHistory: function () {
|
11423 | return history;
|
11424 | }
|
11425 | };
|
11426 |
|
11427 | module.exports = ReactHostOperationHistoryHook;
|
11428 | },{}],70:[function(_dereq_,module,exports){
|
11429 |
|
11430 |
|
11431 |
|
11432 |
|
11433 |
|
11434 |
|
11435 |
|
11436 |
|
11437 |
|
11438 |
|
11439 |
|
11440 | 'use strict';
|
11441 |
|
11442 | var DOMProperty = _dereq_(10);
|
11443 | var EventPluginHub = _dereq_(17);
|
11444 | var EventPluginUtils = _dereq_(19);
|
11445 | var ReactComponentEnvironment = _dereq_(34);
|
11446 | var ReactClass = _dereq_(31);
|
11447 | var ReactEmptyComponent = _dereq_(63);
|
11448 | var ReactBrowserEventEmitter = _dereq_(27);
|
11449 | var ReactHostComponent = _dereq_(68);
|
11450 | var ReactUpdates = _dereq_(96);
|
11451 |
|
11452 | var ReactInjection = {
|
11453 | Component: ReactComponentEnvironment.injection,
|
11454 | Class: ReactClass.injection,
|
11455 | DOMProperty: DOMProperty.injection,
|
11456 | EmptyComponent: ReactEmptyComponent.injection,
|
11457 | EventPluginHub: EventPluginHub.injection,
|
11458 | EventPluginUtils: EventPluginUtils.injection,
|
11459 | EventEmitter: ReactBrowserEventEmitter.injection,
|
11460 | HostComponent: ReactHostComponent.injection,
|
11461 | Updates: ReactUpdates.injection
|
11462 | };
|
11463 |
|
11464 | module.exports = ReactInjection;
|
11465 | },{"10":10,"17":17,"19":19,"27":27,"31":31,"34":34,"63":63,"68":68,"96":96}],71:[function(_dereq_,module,exports){
|
11466 |
|
11467 |
|
11468 |
|
11469 |
|
11470 |
|
11471 |
|
11472 |
|
11473 |
|
11474 |
|
11475 |
|
11476 |
|
11477 | 'use strict';
|
11478 |
|
11479 | var ReactDOMSelection = _dereq_(52);
|
11480 |
|
11481 | var containsNode = _dereq_(151);
|
11482 | var focusNode = _dereq_(156);
|
11483 | var getActiveElement = _dereq_(157);
|
11484 |
|
11485 | function isInDocument(node) {
|
11486 | return containsNode(document.documentElement, node);
|
11487 | }
|
11488 |
|
11489 |
|
11490 |
|
11491 |
|
11492 |
|
11493 |
|
11494 |
|
11495 | var ReactInputSelection = {
|
11496 |
|
11497 | hasSelectionCapabilities: function (elem) {
|
11498 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
11499 | return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
|
11500 | },
|
11501 |
|
11502 | getSelectionInformation: function () {
|
11503 | var focusedElem = getActiveElement();
|
11504 | return {
|
11505 | focusedElem: focusedElem,
|
11506 | selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
|
11507 | };
|
11508 | },
|
11509 |
|
11510 | |
11511 |
|
11512 |
|
11513 |
|
11514 |
|
11515 | restoreSelection: function (priorSelectionInformation) {
|
11516 | var curFocusedElem = getActiveElement();
|
11517 | var priorFocusedElem = priorSelectionInformation.focusedElem;
|
11518 | var priorSelectionRange = priorSelectionInformation.selectionRange;
|
11519 | if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
|
11520 | if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
|
11521 | ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
|
11522 | }
|
11523 | focusNode(priorFocusedElem);
|
11524 | }
|
11525 | },
|
11526 |
|
11527 | |
11528 |
|
11529 |
|
11530 |
|
11531 |
|
11532 |
|
11533 | getSelection: function (input) {
|
11534 | var selection;
|
11535 |
|
11536 | if ('selectionStart' in input) {
|
11537 |
|
11538 | selection = {
|
11539 | start: input.selectionStart,
|
11540 | end: input.selectionEnd
|
11541 | };
|
11542 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
11543 |
|
11544 | var range = document.selection.createRange();
|
11545 |
|
11546 |
|
11547 | if (range.parentElement() === input) {
|
11548 | selection = {
|
11549 | start: -range.moveStart('character', -input.value.length),
|
11550 | end: -range.moveEnd('character', -input.value.length)
|
11551 | };
|
11552 | }
|
11553 | } else {
|
11554 |
|
11555 | selection = ReactDOMSelection.getOffsets(input);
|
11556 | }
|
11557 |
|
11558 | return selection || { start: 0, end: 0 };
|
11559 | },
|
11560 |
|
11561 | |
11562 |
|
11563 |
|
11564 |
|
11565 |
|
11566 |
|
11567 | setSelection: function (input, offsets) {
|
11568 | var start = offsets.start;
|
11569 | var end = offsets.end;
|
11570 | if (end === undefined) {
|
11571 | end = start;
|
11572 | }
|
11573 |
|
11574 | if ('selectionStart' in input) {
|
11575 | input.selectionStart = start;
|
11576 | input.selectionEnd = Math.min(end, input.value.length);
|
11577 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
11578 | var range = input.createTextRange();
|
11579 | range.collapse(true);
|
11580 | range.moveStart('character', start);
|
11581 | range.moveEnd('character', end - start);
|
11582 | range.select();
|
11583 | } else {
|
11584 | ReactDOMSelection.setOffsets(input, offsets);
|
11585 | }
|
11586 | }
|
11587 | };
|
11588 |
|
11589 | module.exports = ReactInputSelection;
|
11590 | },{"151":151,"156":156,"157":157,"52":52}],72:[function(_dereq_,module,exports){
|
11591 |
|
11592 |
|
11593 |
|
11594 |
|
11595 |
|
11596 |
|
11597 |
|
11598 |
|
11599 |
|
11600 |
|
11601 |
|
11602 | 'use strict';
|
11603 |
|
11604 |
|
11605 |
|
11606 |
|
11607 |
|
11608 |
|
11609 |
|
11610 |
|
11611 |
|
11612 |
|
11613 | var ReactInstanceMap = {
|
11614 |
|
11615 | |
11616 |
|
11617 |
|
11618 |
|
11619 |
|
11620 | remove: function (key) {
|
11621 | key._reactInternalInstance = undefined;
|
11622 | },
|
11623 |
|
11624 | get: function (key) {
|
11625 | return key._reactInternalInstance;
|
11626 | },
|
11627 |
|
11628 | has: function (key) {
|
11629 | return key._reactInternalInstance !== undefined;
|
11630 | },
|
11631 |
|
11632 | set: function (key, value) {
|
11633 | key._reactInternalInstance = value;
|
11634 | }
|
11635 |
|
11636 | };
|
11637 |
|
11638 | module.exports = ReactInstanceMap;
|
11639 | },{}],73:[function(_dereq_,module,exports){
|
11640 |
|
11641 |
|
11642 |
|
11643 |
|
11644 |
|
11645 |
|
11646 |
|
11647 |
|
11648 |
|
11649 |
|
11650 |
|
11651 | 'use strict';
|
11652 |
|
11653 | var debugTool = null;
|
11654 |
|
11655 | if ("development" !== 'production') {
|
11656 | var ReactDebugTool = _dereq_(58);
|
11657 | debugTool = ReactDebugTool;
|
11658 | }
|
11659 |
|
11660 | module.exports = { debugTool: debugTool };
|
11661 | },{"58":58}],74:[function(_dereq_,module,exports){
|
11662 |
|
11663 |
|
11664 |
|
11665 |
|
11666 |
|
11667 |
|
11668 |
|
11669 |
|
11670 |
|
11671 |
|
11672 |
|
11673 | 'use strict';
|
11674 |
|
11675 | var warning = _dereq_(171);
|
11676 |
|
11677 | if ("development" !== 'production') {
|
11678 | var processingChildContext = false;
|
11679 |
|
11680 | var warnInvalidSetState = function () {
|
11681 | "development" !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
|
11682 | };
|
11683 | }
|
11684 |
|
11685 | var ReactInvalidSetStateWarningHook = {
|
11686 | onBeginProcessingChildContext: function () {
|
11687 | processingChildContext = true;
|
11688 | },
|
11689 | onEndProcessingChildContext: function () {
|
11690 | processingChildContext = false;
|
11691 | },
|
11692 | onSetState: function () {
|
11693 | warnInvalidSetState();
|
11694 | }
|
11695 | };
|
11696 |
|
11697 | module.exports = ReactInvalidSetStateWarningHook;
|
11698 | },{"171":171}],75:[function(_dereq_,module,exports){
|
11699 |
|
11700 |
|
11701 |
|
11702 |
|
11703 |
|
11704 |
|
11705 |
|
11706 |
|
11707 |
|
11708 |
|
11709 |
|
11710 | 'use strict';
|
11711 |
|
11712 | var adler32 = _dereq_(117);
|
11713 |
|
11714 | var TAG_END = /\/?>/;
|
11715 | var COMMENT_START = /^<\!\-\-/;
|
11716 |
|
11717 | var ReactMarkupChecksum = {
|
11718 | CHECKSUM_ATTR_NAME: 'data-react-checksum',
|
11719 |
|
11720 | |
11721 |
|
11722 |
|
11723 |
|
11724 | addChecksumToMarkup: function (markup) {
|
11725 | var checksum = adler32(markup);
|
11726 |
|
11727 |
|
11728 | if (COMMENT_START.test(markup)) {
|
11729 | return markup;
|
11730 | } else {
|
11731 | return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
|
11732 | }
|
11733 | },
|
11734 |
|
11735 | |
11736 |
|
11737 |
|
11738 |
|
11739 |
|
11740 | canReuseMarkup: function (markup, element) {
|
11741 | var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
11742 | existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
|
11743 | var markupChecksum = adler32(markup);
|
11744 | return markupChecksum === existingChecksum;
|
11745 | }
|
11746 | };
|
11747 |
|
11748 | module.exports = ReactMarkupChecksum;
|
11749 | },{"117":117}],76:[function(_dereq_,module,exports){
|
11750 |
|
11751 |
|
11752 |
|
11753 |
|
11754 |
|
11755 |
|
11756 |
|
11757 |
|
11758 |
|
11759 |
|
11760 |
|
11761 | 'use strict';
|
11762 |
|
11763 | var _prodInvariant = _dereq_(140);
|
11764 |
|
11765 | var DOMLazyTree = _dereq_(8);
|
11766 | var DOMProperty = _dereq_(10);
|
11767 | var ReactBrowserEventEmitter = _dereq_(27);
|
11768 | var ReactCurrentOwner = _dereq_(37);
|
11769 | var ReactDOMComponentTree = _dereq_(42);
|
11770 | var ReactDOMContainerInfo = _dereq_(43);
|
11771 | var ReactDOMFeatureFlags = _dereq_(46);
|
11772 | var ReactElement = _dereq_(61);
|
11773 | var ReactFeatureFlags = _dereq_(67);
|
11774 | var ReactInstanceMap = _dereq_(72);
|
11775 | var ReactInstrumentation = _dereq_(73);
|
11776 | var ReactMarkupChecksum = _dereq_(75);
|
11777 | var ReactReconciler = _dereq_(88);
|
11778 | var ReactUpdateQueue = _dereq_(95);
|
11779 | var ReactUpdates = _dereq_(96);
|
11780 |
|
11781 | var emptyObject = _dereq_(155);
|
11782 | var instantiateReactComponent = _dereq_(135);
|
11783 | var invariant = _dereq_(162);
|
11784 | var setInnerHTML = _dereq_(142);
|
11785 | var shouldUpdateReactComponent = _dereq_(144);
|
11786 | var warning = _dereq_(171);
|
11787 |
|
11788 | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
|
11789 | var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;
|
11790 |
|
11791 | var ELEMENT_NODE_TYPE = 1;
|
11792 | var DOC_NODE_TYPE = 9;
|
11793 | var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
|
11794 |
|
11795 | var instancesByReactRootID = {};
|
11796 |
|
11797 |
|
11798 |
|
11799 |
|
11800 |
|
11801 |
|
11802 |
|
11803 | function firstDifferenceIndex(string1, string2) {
|
11804 | var minLen = Math.min(string1.length, string2.length);
|
11805 | for (var i = 0; i < minLen; i++) {
|
11806 | if (string1.charAt(i) !== string2.charAt(i)) {
|
11807 | return i;
|
11808 | }
|
11809 | }
|
11810 | return string1.length === string2.length ? -1 : minLen;
|
11811 | }
|
11812 |
|
11813 |
|
11814 |
|
11815 |
|
11816 |
|
11817 |
|
11818 | function getReactRootElementInContainer(container) {
|
11819 | if (!container) {
|
11820 | return null;
|
11821 | }
|
11822 |
|
11823 | if (container.nodeType === DOC_NODE_TYPE) {
|
11824 | return container.documentElement;
|
11825 | } else {
|
11826 | return container.firstChild;
|
11827 | }
|
11828 | }
|
11829 |
|
11830 | function internalGetID(node) {
|
11831 |
|
11832 |
|
11833 |
|
11834 | return node.getAttribute && node.getAttribute(ATTR_NAME) || '';
|
11835 | }
|
11836 |
|
11837 |
|
11838 |
|
11839 |
|
11840 |
|
11841 |
|
11842 |
|
11843 |
|
11844 |
|
11845 | function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {
|
11846 | var markerName;
|
11847 | if (ReactFeatureFlags.logTopLevelRenders) {
|
11848 | var wrappedElement = wrapperInstance._currentElement.props;
|
11849 | var type = wrappedElement.type;
|
11850 | markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);
|
11851 | console.time(markerName);
|
11852 | }
|
11853 |
|
11854 | var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0
|
11855 | );
|
11856 |
|
11857 | if (markerName) {
|
11858 | console.timeEnd(markerName);
|
11859 | }
|
11860 |
|
11861 | wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;
|
11862 | ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);
|
11863 | }
|
11864 |
|
11865 |
|
11866 |
|
11867 |
|
11868 |
|
11869 |
|
11870 |
|
11871 |
|
11872 | function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {
|
11873 | var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(
|
11874 |
|
11875 | !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);
|
11876 | transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);
|
11877 | ReactUpdates.ReactReconcileTransaction.release(transaction);
|
11878 | }
|
11879 |
|
11880 |
|
11881 |
|
11882 |
|
11883 |
|
11884 |
|
11885 |
|
11886 |
|
11887 |
|
11888 |
|
11889 | function unmountComponentFromNode(instance, container, safely) {
|
11890 | if ("development" !== 'production') {
|
11891 | ReactInstrumentation.debugTool.onBeginFlush();
|
11892 | }
|
11893 | ReactReconciler.unmountComponent(instance, safely);
|
11894 | if ("development" !== 'production') {
|
11895 | ReactInstrumentation.debugTool.onEndFlush();
|
11896 | }
|
11897 |
|
11898 | if (container.nodeType === DOC_NODE_TYPE) {
|
11899 | container = container.documentElement;
|
11900 | }
|
11901 |
|
11902 |
|
11903 | while (container.lastChild) {
|
11904 | container.removeChild(container.lastChild);
|
11905 | }
|
11906 | }
|
11907 |
|
11908 |
|
11909 |
|
11910 |
|
11911 |
|
11912 |
|
11913 |
|
11914 |
|
11915 |
|
11916 |
|
11917 |
|
11918 | function hasNonRootReactChild(container) {
|
11919 | var rootEl = getReactRootElementInContainer(container);
|
11920 | if (rootEl) {
|
11921 | var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);
|
11922 | return !!(inst && inst._hostParent);
|
11923 | }
|
11924 | }
|
11925 |
|
11926 |
|
11927 |
|
11928 |
|
11929 |
|
11930 |
|
11931 |
|
11932 |
|
11933 |
|
11934 | function nodeIsRenderedByOtherInstance(container) {
|
11935 | var rootEl = getReactRootElementInContainer(container);
|
11936 | return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));
|
11937 | }
|
11938 |
|
11939 |
|
11940 |
|
11941 |
|
11942 |
|
11943 |
|
11944 |
|
11945 |
|
11946 | function isValidContainer(node) {
|
11947 | return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));
|
11948 | }
|
11949 |
|
11950 |
|
11951 |
|
11952 |
|
11953 |
|
11954 |
|
11955 |
|
11956 |
|
11957 | function isReactNode(node) {
|
11958 | return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));
|
11959 | }
|
11960 |
|
11961 | function getHostRootInstanceInContainer(container) {
|
11962 | var rootEl = getReactRootElementInContainer(container);
|
11963 | var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);
|
11964 | return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;
|
11965 | }
|
11966 |
|
11967 | function getTopLevelWrapperInContainer(container) {
|
11968 | var root = getHostRootInstanceInContainer(container);
|
11969 | return root ? root._hostContainerInfo._topLevelWrapper : null;
|
11970 | }
|
11971 |
|
11972 |
|
11973 |
|
11974 |
|
11975 |
|
11976 |
|
11977 | var topLevelRootCounter = 1;
|
11978 | var TopLevelWrapper = function () {
|
11979 | this.rootID = topLevelRootCounter++;
|
11980 | };
|
11981 | TopLevelWrapper.prototype.isReactComponent = {};
|
11982 | if ("development" !== 'production') {
|
11983 | TopLevelWrapper.displayName = 'TopLevelWrapper';
|
11984 | }
|
11985 | TopLevelWrapper.prototype.render = function () {
|
11986 |
|
11987 | return this.props;
|
11988 | };
|
11989 |
|
11990 |
|
11991 |
|
11992 |
|
11993 |
|
11994 |
|
11995 |
|
11996 |
|
11997 |
|
11998 |
|
11999 |
|
12000 |
|
12001 |
|
12002 |
|
12003 |
|
12004 |
|
12005 |
|
12006 |
|
12007 |
|
12008 | var ReactMount = {
|
12009 |
|
12010 | TopLevelWrapper: TopLevelWrapper,
|
12011 |
|
12012 | |
12013 |
|
12014 |
|
12015 | _instancesByReactRootID: instancesByReactRootID,
|
12016 |
|
12017 | |
12018 |
|
12019 |
|
12020 |
|
12021 |
|
12022 |
|
12023 |
|
12024 |
|
12025 | scrollMonitor: function (container, renderCallback) {
|
12026 | renderCallback();
|
12027 | },
|
12028 |
|
12029 | |
12030 |
|
12031 |
|
12032 |
|
12033 |
|
12034 |
|
12035 |
|
12036 | _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) {
|
12037 | ReactMount.scrollMonitor(container, function () {
|
12038 | ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext);
|
12039 | if (callback) {
|
12040 | ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
|
12041 | }
|
12042 | });
|
12043 |
|
12044 | return prevComponent;
|
12045 | },
|
12046 |
|
12047 | |
12048 |
|
12049 |
|
12050 |
|
12051 |
|
12052 |
|
12053 |
|
12054 |
|
12055 | _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {
|
12056 |
|
12057 |
|
12058 |
|
12059 | "development" !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
|
12060 |
|
12061 | !isValidContainer(container) ? "development" !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;
|
12062 |
|
12063 | ReactBrowserEventEmitter.ensureScrollValueMonitoring();
|
12064 | var componentInstance = instantiateReactComponent(nextElement, false);
|
12065 |
|
12066 |
|
12067 |
|
12068 |
|
12069 |
|
12070 | ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);
|
12071 |
|
12072 | var wrapperID = componentInstance._instance.rootID;
|
12073 | instancesByReactRootID[wrapperID] = componentInstance;
|
12074 |
|
12075 | return componentInstance;
|
12076 | },
|
12077 |
|
12078 | |
12079 |
|
12080 |
|
12081 |
|
12082 |
|
12083 |
|
12084 |
|
12085 |
|
12086 |
|
12087 |
|
12088 |
|
12089 |
|
12090 |
|
12091 | renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
|
12092 | !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? "development" !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0;
|
12093 | return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);
|
12094 | },
|
12095 |
|
12096 | _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
|
12097 | ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');
|
12098 | !ReactElement.isValidElement(nextElement) ? "development" !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' :
|
12099 |
|
12100 | nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;
|
12101 |
|
12102 | "development" !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
|
12103 |
|
12104 | var nextWrappedElement = ReactElement(TopLevelWrapper, null, null, null, null, null, nextElement);
|
12105 |
|
12106 | var nextContext;
|
12107 | if (parentComponent) {
|
12108 | var parentInst = ReactInstanceMap.get(parentComponent);
|
12109 | nextContext = parentInst._processChildContext(parentInst._context);
|
12110 | } else {
|
12111 | nextContext = emptyObject;
|
12112 | }
|
12113 |
|
12114 | var prevComponent = getTopLevelWrapperInContainer(container);
|
12115 |
|
12116 | if (prevComponent) {
|
12117 | var prevWrappedElement = prevComponent._currentElement;
|
12118 | var prevElement = prevWrappedElement.props;
|
12119 | if (shouldUpdateReactComponent(prevElement, nextElement)) {
|
12120 | var publicInst = prevComponent._renderedComponent.getPublicInstance();
|
12121 | var updatedCallback = callback && function () {
|
12122 | callback.call(publicInst);
|
12123 | };
|
12124 | ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback);
|
12125 | return publicInst;
|
12126 | } else {
|
12127 | ReactMount.unmountComponentAtNode(container);
|
12128 | }
|
12129 | }
|
12130 |
|
12131 | var reactRootElement = getReactRootElementInContainer(container);
|
12132 | var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);
|
12133 | var containerHasNonRootReactChild = hasNonRootReactChild(container);
|
12134 |
|
12135 | if ("development" !== 'production') {
|
12136 | "development" !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
|
12137 |
|
12138 | if (!containerHasReactMarkup || reactRootElement.nextSibling) {
|
12139 | var rootElementSibling = reactRootElement;
|
12140 | while (rootElementSibling) {
|
12141 | if (internalGetID(rootElementSibling)) {
|
12142 | "development" !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0;
|
12143 | break;
|
12144 | }
|
12145 | rootElementSibling = rootElementSibling.nextSibling;
|
12146 | }
|
12147 | }
|
12148 | }
|
12149 |
|
12150 | var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;
|
12151 | var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();
|
12152 | if (callback) {
|
12153 | callback.call(component);
|
12154 | }
|
12155 | return component;
|
12156 | },
|
12157 |
|
12158 | |
12159 |
|
12160 |
|
12161 |
|
12162 |
|
12163 |
|
12164 |
|
12165 |
|
12166 |
|
12167 |
|
12168 |
|
12169 |
|
12170 |
|
12171 | render: function (nextElement, container, callback) {
|
12172 | return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
|
12173 | },
|
12174 |
|
12175 | |
12176 |
|
12177 |
|
12178 |
|
12179 |
|
12180 |
|
12181 |
|
12182 |
|
12183 | unmountComponentAtNode: function (container) {
|
12184 |
|
12185 |
|
12186 |
|
12187 |
|
12188 | "development" !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
|
12189 |
|
12190 | !isValidContainer(container) ? "development" !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;
|
12191 |
|
12192 | if ("development" !== 'production') {
|
12193 | "development" !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0;
|
12194 | }
|
12195 |
|
12196 | var prevComponent = getTopLevelWrapperInContainer(container);
|
12197 | if (!prevComponent) {
|
12198 |
|
12199 |
|
12200 | var containerHasNonRootReactChild = hasNonRootReactChild(container);
|
12201 |
|
12202 |
|
12203 | var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);
|
12204 |
|
12205 | if ("development" !== 'production') {
|
12206 | "development" !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
|
12207 | }
|
12208 |
|
12209 | return false;
|
12210 | }
|
12211 | delete instancesByReactRootID[prevComponent._instance.rootID];
|
12212 | ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false);
|
12213 | return true;
|
12214 | },
|
12215 |
|
12216 | _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) {
|
12217 | !isValidContainer(container) ? "development" !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;
|
12218 |
|
12219 | if (shouldReuseMarkup) {
|
12220 | var rootElement = getReactRootElementInContainer(container);
|
12221 | if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {
|
12222 | ReactDOMComponentTree.precacheNode(instance, rootElement);
|
12223 | return;
|
12224 | } else {
|
12225 | var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
12226 | rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
12227 |
|
12228 | var rootMarkup = rootElement.outerHTML;
|
12229 | rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);
|
12230 |
|
12231 | var normalizedMarkup = markup;
|
12232 | if ("development" !== 'production') {
|
12233 |
|
12234 |
|
12235 |
|
12236 |
|
12237 | var normalizer;
|
12238 | if (container.nodeType === ELEMENT_NODE_TYPE) {
|
12239 | normalizer = document.createElement('div');
|
12240 | normalizer.innerHTML = markup;
|
12241 | normalizedMarkup = normalizer.innerHTML;
|
12242 | } else {
|
12243 | normalizer = document.createElement('iframe');
|
12244 | document.body.appendChild(normalizer);
|
12245 | normalizer.contentDocument.write(markup);
|
12246 | normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
|
12247 | document.body.removeChild(normalizer);
|
12248 | }
|
12249 | }
|
12250 |
|
12251 | var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
|
12252 | var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
|
12253 |
|
12254 | !(container.nodeType !== DOC_NODE_TYPE) ? "development" !== 'production' ? invariant(false, 'You\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s', difference) : _prodInvariant('42', difference) : void 0;
|
12255 |
|
12256 | if ("development" !== 'production') {
|
12257 | "development" !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : void 0;
|
12258 | }
|
12259 | }
|
12260 | }
|
12261 |
|
12262 | !(container.nodeType !== DOC_NODE_TYPE) ? "development" !== 'production' ? invariant(false, 'You\'re trying to render a component to the document but you didn\'t use server rendering. We can\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0;
|
12263 |
|
12264 | if (transaction.useCreateElement) {
|
12265 | while (container.lastChild) {
|
12266 | container.removeChild(container.lastChild);
|
12267 | }
|
12268 | DOMLazyTree.insertTreeBefore(container, markup, null);
|
12269 | } else {
|
12270 | setInnerHTML(container, markup);
|
12271 | ReactDOMComponentTree.precacheNode(instance, container.firstChild);
|
12272 | }
|
12273 |
|
12274 | if ("development" !== 'production') {
|
12275 | var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);
|
12276 | if (hostNode._debugID !== 0) {
|
12277 | ReactInstrumentation.debugTool.onHostOperation(hostNode._debugID, 'mount', markup.toString());
|
12278 | }
|
12279 | }
|
12280 | }
|
12281 | };
|
12282 |
|
12283 | module.exports = ReactMount;
|
12284 | },{"10":10,"135":135,"140":140,"142":142,"144":144,"155":155,"162":162,"171":171,"27":27,"37":37,"42":42,"43":43,"46":46,"61":61,"67":67,"72":72,"73":73,"75":75,"8":8,"88":88,"95":95,"96":96}],77:[function(_dereq_,module,exports){
|
12285 |
|
12286 |
|
12287 |
|
12288 |
|
12289 |
|
12290 |
|
12291 |
|
12292 |
|
12293 |
|
12294 |
|
12295 |
|
12296 | 'use strict';
|
12297 |
|
12298 | var _prodInvariant = _dereq_(140);
|
12299 |
|
12300 | var ReactComponentEnvironment = _dereq_(34);
|
12301 | var ReactInstanceMap = _dereq_(72);
|
12302 | var ReactInstrumentation = _dereq_(73);
|
12303 | var ReactMultiChildUpdateTypes = _dereq_(78);
|
12304 |
|
12305 | var ReactCurrentOwner = _dereq_(37);
|
12306 | var ReactReconciler = _dereq_(88);
|
12307 | var ReactChildReconciler = _dereq_(28);
|
12308 |
|
12309 | var emptyFunction = _dereq_(154);
|
12310 | var flattenChildren = _dereq_(124);
|
12311 | var invariant = _dereq_(162);
|
12312 |
|
12313 |
|
12314 |
|
12315 |
|
12316 |
|
12317 |
|
12318 |
|
12319 |
|
12320 | function makeInsertMarkup(markup, afterNode, toIndex) {
|
12321 |
|
12322 | return {
|
12323 | type: ReactMultiChildUpdateTypes.INSERT_MARKUP,
|
12324 | content: markup,
|
12325 | fromIndex: null,
|
12326 | fromNode: null,
|
12327 | toIndex: toIndex,
|
12328 | afterNode: afterNode
|
12329 | };
|
12330 | }
|
12331 |
|
12332 |
|
12333 |
|
12334 |
|
12335 |
|
12336 |
|
12337 |
|
12338 |
|
12339 | function makeMove(child, afterNode, toIndex) {
|
12340 |
|
12341 | return {
|
12342 | type: ReactMultiChildUpdateTypes.MOVE_EXISTING,
|
12343 | content: null,
|
12344 | fromIndex: child._mountIndex,
|
12345 | fromNode: ReactReconciler.getHostNode(child),
|
12346 | toIndex: toIndex,
|
12347 | afterNode: afterNode
|
12348 | };
|
12349 | }
|
12350 |
|
12351 |
|
12352 |
|
12353 |
|
12354 |
|
12355 |
|
12356 |
|
12357 | function makeRemove(child, node) {
|
12358 |
|
12359 | return {
|
12360 | type: ReactMultiChildUpdateTypes.REMOVE_NODE,
|
12361 | content: null,
|
12362 | fromIndex: child._mountIndex,
|
12363 | fromNode: node,
|
12364 | toIndex: null,
|
12365 | afterNode: null
|
12366 | };
|
12367 | }
|
12368 |
|
12369 |
|
12370 |
|
12371 |
|
12372 |
|
12373 |
|
12374 |
|
12375 | function makeSetMarkup(markup) {
|
12376 |
|
12377 | return {
|
12378 | type: ReactMultiChildUpdateTypes.SET_MARKUP,
|
12379 | content: markup,
|
12380 | fromIndex: null,
|
12381 | fromNode: null,
|
12382 | toIndex: null,
|
12383 | afterNode: null
|
12384 | };
|
12385 | }
|
12386 |
|
12387 |
|
12388 |
|
12389 |
|
12390 |
|
12391 |
|
12392 |
|
12393 | function makeTextContent(textContent) {
|
12394 |
|
12395 | return {
|
12396 | type: ReactMultiChildUpdateTypes.TEXT_CONTENT,
|
12397 | content: textContent,
|
12398 | fromIndex: null,
|
12399 | fromNode: null,
|
12400 | toIndex: null,
|
12401 | afterNode: null
|
12402 | };
|
12403 | }
|
12404 |
|
12405 |
|
12406 |
|
12407 |
|
12408 |
|
12409 | function enqueue(queue, update) {
|
12410 | if (update) {
|
12411 | queue = queue || [];
|
12412 | queue.push(update);
|
12413 | }
|
12414 | return queue;
|
12415 | }
|
12416 |
|
12417 |
|
12418 |
|
12419 |
|
12420 |
|
12421 |
|
12422 | function processQueue(inst, updateQueue) {
|
12423 | ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
|
12424 | }
|
12425 |
|
12426 | var setChildrenForInstrumentation = emptyFunction;
|
12427 | if ("development" !== 'production') {
|
12428 | var getDebugID = function (inst) {
|
12429 | if (!inst._debugID) {
|
12430 |
|
12431 | var internal;
|
12432 | if (internal = ReactInstanceMap.get(inst)) {
|
12433 | inst = internal;
|
12434 | }
|
12435 | }
|
12436 | return inst._debugID;
|
12437 | };
|
12438 | setChildrenForInstrumentation = function (children) {
|
12439 | var debugID = getDebugID(this);
|
12440 |
|
12441 |
|
12442 | if (debugID !== 0) {
|
12443 | ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
|
12444 | return children[key]._debugID;
|
12445 | }) : []);
|
12446 | }
|
12447 | };
|
12448 | }
|
12449 |
|
12450 |
|
12451 |
|
12452 |
|
12453 |
|
12454 |
|
12455 |
|
12456 | var ReactMultiChild = {
|
12457 |
|
12458 | |
12459 |
|
12460 |
|
12461 |
|
12462 |
|
12463 |
|
12464 |
|
12465 | Mixin: {
|
12466 |
|
12467 | _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
|
12468 | if ("development" !== 'production') {
|
12469 | var selfDebugID = getDebugID(this);
|
12470 | if (this._currentElement) {
|
12471 | try {
|
12472 | ReactCurrentOwner.current = this._currentElement._owner;
|
12473 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
|
12474 | } finally {
|
12475 | ReactCurrentOwner.current = null;
|
12476 | }
|
12477 | }
|
12478 | }
|
12479 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
|
12480 | },
|
12481 |
|
12482 | _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
|
12483 | var nextChildren;
|
12484 | var selfDebugID = 0;
|
12485 | if ("development" !== 'production') {
|
12486 | selfDebugID = getDebugID(this);
|
12487 | if (this._currentElement) {
|
12488 | try {
|
12489 | ReactCurrentOwner.current = this._currentElement._owner;
|
12490 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
12491 | } finally {
|
12492 | ReactCurrentOwner.current = null;
|
12493 | }
|
12494 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
12495 | return nextChildren;
|
12496 | }
|
12497 | }
|
12498 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
12499 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
12500 | return nextChildren;
|
12501 | },
|
12502 |
|
12503 | |
12504 |
|
12505 |
|
12506 |
|
12507 |
|
12508 |
|
12509 |
|
12510 |
|
12511 | mountChildren: function (nestedChildren, transaction, context) {
|
12512 | var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
|
12513 | this._renderedChildren = children;
|
12514 |
|
12515 | var mountImages = [];
|
12516 | var index = 0;
|
12517 | for (var name in children) {
|
12518 | if (children.hasOwnProperty(name)) {
|
12519 | var child = children[name];
|
12520 | var selfDebugID = 0;
|
12521 | if ("development" !== 'production') {
|
12522 | selfDebugID = getDebugID(this);
|
12523 | }
|
12524 | var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
12525 | child._mountIndex = index++;
|
12526 | mountImages.push(mountImage);
|
12527 | }
|
12528 | }
|
12529 |
|
12530 | if ("development" !== 'production') {
|
12531 | setChildrenForInstrumentation.call(this, children);
|
12532 | }
|
12533 |
|
12534 | return mountImages;
|
12535 | },
|
12536 |
|
12537 | |
12538 |
|
12539 |
|
12540 |
|
12541 |
|
12542 |
|
12543 | updateTextContent: function (nextContent) {
|
12544 | var prevChildren = this._renderedChildren;
|
12545 |
|
12546 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
12547 | for (var name in prevChildren) {
|
12548 | if (prevChildren.hasOwnProperty(name)) {
|
12549 | !false ? "development" !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
12550 | }
|
12551 | }
|
12552 |
|
12553 | var updates = [makeTextContent(nextContent)];
|
12554 | processQueue(this, updates);
|
12555 | },
|
12556 |
|
12557 | |
12558 |
|
12559 |
|
12560 |
|
12561 |
|
12562 |
|
12563 | updateMarkup: function (nextMarkup) {
|
12564 | var prevChildren = this._renderedChildren;
|
12565 |
|
12566 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
12567 | for (var name in prevChildren) {
|
12568 | if (prevChildren.hasOwnProperty(name)) {
|
12569 | !false ? "development" !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
12570 | }
|
12571 | }
|
12572 | var updates = [makeSetMarkup(nextMarkup)];
|
12573 | processQueue(this, updates);
|
12574 | },
|
12575 |
|
12576 | |
12577 |
|
12578 |
|
12579 |
|
12580 |
|
12581 |
|
12582 |
|
12583 | updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
12584 |
|
12585 | this._updateChildren(nextNestedChildrenElements, transaction, context);
|
12586 | },
|
12587 |
|
12588 | |
12589 |
|
12590 |
|
12591 |
|
12592 |
|
12593 |
|
12594 | _updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
12595 | var prevChildren = this._renderedChildren;
|
12596 | var removedNodes = {};
|
12597 | var mountImages = [];
|
12598 | var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
|
12599 | if (!nextChildren && !prevChildren) {
|
12600 | return;
|
12601 | }
|
12602 | var updates = null;
|
12603 | var name;
|
12604 |
|
12605 |
|
12606 | var nextIndex = 0;
|
12607 | var lastIndex = 0;
|
12608 |
|
12609 | var nextMountIndex = 0;
|
12610 | var lastPlacedNode = null;
|
12611 | for (name in nextChildren) {
|
12612 | if (!nextChildren.hasOwnProperty(name)) {
|
12613 | continue;
|
12614 | }
|
12615 | var prevChild = prevChildren && prevChildren[name];
|
12616 | var nextChild = nextChildren[name];
|
12617 | if (prevChild === nextChild) {
|
12618 | updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
|
12619 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
12620 | prevChild._mountIndex = nextIndex;
|
12621 | } else {
|
12622 | if (prevChild) {
|
12623 |
|
12624 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
12625 |
|
12626 | }
|
12627 |
|
12628 | updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
|
12629 | nextMountIndex++;
|
12630 | }
|
12631 | nextIndex++;
|
12632 | lastPlacedNode = ReactReconciler.getHostNode(nextChild);
|
12633 | }
|
12634 |
|
12635 | for (name in removedNodes) {
|
12636 | if (removedNodes.hasOwnProperty(name)) {
|
12637 | updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
|
12638 | }
|
12639 | }
|
12640 | if (updates) {
|
12641 | processQueue(this, updates);
|
12642 | }
|
12643 | this._renderedChildren = nextChildren;
|
12644 |
|
12645 | if ("development" !== 'production') {
|
12646 | setChildrenForInstrumentation.call(this, nextChildren);
|
12647 | }
|
12648 | },
|
12649 |
|
12650 | |
12651 |
|
12652 |
|
12653 |
|
12654 |
|
12655 |
|
12656 |
|
12657 | unmountChildren: function (safely) {
|
12658 | var renderedChildren = this._renderedChildren;
|
12659 | ReactChildReconciler.unmountChildren(renderedChildren, safely);
|
12660 | this._renderedChildren = null;
|
12661 | },
|
12662 |
|
12663 | |
12664 |
|
12665 |
|
12666 |
|
12667 |
|
12668 |
|
12669 |
|
12670 |
|
12671 | moveChild: function (child, afterNode, toIndex, lastIndex) {
|
12672 |
|
12673 |
|
12674 |
|
12675 | if (child._mountIndex < lastIndex) {
|
12676 | return makeMove(child, afterNode, toIndex);
|
12677 | }
|
12678 | },
|
12679 |
|
12680 | |
12681 |
|
12682 |
|
12683 |
|
12684 |
|
12685 |
|
12686 |
|
12687 | createChild: function (child, afterNode, mountImage) {
|
12688 | return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
|
12689 | },
|
12690 |
|
12691 | |
12692 |
|
12693 |
|
12694 |
|
12695 |
|
12696 |
|
12697 | removeChild: function (child, node) {
|
12698 | return makeRemove(child, node);
|
12699 | },
|
12700 |
|
12701 | |
12702 |
|
12703 |
|
12704 |
|
12705 |
|
12706 |
|
12707 |
|
12708 |
|
12709 |
|
12710 |
|
12711 |
|
12712 | _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
|
12713 | child._mountIndex = index;
|
12714 | return this.createChild(child, afterNode, mountImage);
|
12715 | },
|
12716 |
|
12717 | |
12718 |
|
12719 |
|
12720 |
|
12721 |
|
12722 |
|
12723 |
|
12724 |
|
12725 | _unmountChild: function (child, node) {
|
12726 | var update = this.removeChild(child, node);
|
12727 | child._mountIndex = null;
|
12728 | return update;
|
12729 | }
|
12730 |
|
12731 | }
|
12732 |
|
12733 | };
|
12734 |
|
12735 | module.exports = ReactMultiChild;
|
12736 | },{"124":124,"140":140,"154":154,"162":162,"28":28,"34":34,"37":37,"72":72,"73":73,"78":78,"88":88}],78:[function(_dereq_,module,exports){
|
12737 |
|
12738 |
|
12739 |
|
12740 |
|
12741 |
|
12742 |
|
12743 |
|
12744 |
|
12745 |
|
12746 |
|
12747 |
|
12748 | 'use strict';
|
12749 |
|
12750 | var keyMirror = _dereq_(165);
|
12751 |
|
12752 |
|
12753 |
|
12754 |
|
12755 |
|
12756 |
|
12757 |
|
12758 |
|
12759 |
|
12760 | var ReactMultiChildUpdateTypes = keyMirror({
|
12761 | INSERT_MARKUP: null,
|
12762 | MOVE_EXISTING: null,
|
12763 | REMOVE_NODE: null,
|
12764 | SET_MARKUP: null,
|
12765 | TEXT_CONTENT: null
|
12766 | });
|
12767 |
|
12768 | module.exports = ReactMultiChildUpdateTypes;
|
12769 | },{"165":165}],79:[function(_dereq_,module,exports){
|
12770 |
|
12771 |
|
12772 |
|
12773 |
|
12774 |
|
12775 |
|
12776 |
|
12777 |
|
12778 |
|
12779 |
|
12780 |
|
12781 |
|
12782 | 'use strict';
|
12783 |
|
12784 | var _prodInvariant = _dereq_(140);
|
12785 |
|
12786 | var ReactElement = _dereq_(61);
|
12787 |
|
12788 | var invariant = _dereq_(162);
|
12789 |
|
12790 | var ReactNodeTypes = {
|
12791 | HOST: 0,
|
12792 | COMPOSITE: 1,
|
12793 | EMPTY: 2,
|
12794 |
|
12795 | getType: function (node) {
|
12796 | if (node === null || node === false) {
|
12797 | return ReactNodeTypes.EMPTY;
|
12798 | } else if (ReactElement.isValidElement(node)) {
|
12799 | if (typeof node.type === 'function') {
|
12800 | return ReactNodeTypes.COMPOSITE;
|
12801 | } else {
|
12802 | return ReactNodeTypes.HOST;
|
12803 | }
|
12804 | }
|
12805 | !false ? "development" !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
|
12806 | }
|
12807 | };
|
12808 |
|
12809 | module.exports = ReactNodeTypes;
|
12810 | },{"140":140,"162":162,"61":61}],80:[function(_dereq_,module,exports){
|
12811 |
|
12812 |
|
12813 |
|
12814 |
|
12815 |
|
12816 |
|
12817 |
|
12818 |
|
12819 |
|
12820 |
|
12821 |
|
12822 | 'use strict';
|
12823 |
|
12824 | var warning = _dereq_(171);
|
12825 |
|
12826 | function warnNoop(publicInstance, callerName) {
|
12827 | if ("development" !== 'production') {
|
12828 | var constructor = publicInstance.constructor;
|
12829 | "development" !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
|
12830 | }
|
12831 | }
|
12832 |
|
12833 | /**
|
12834 | * This is the abstract API for an update queue.
|
12835 | */
|
12836 | var ReactNoopUpdateQueue = {
|
12837 |
|
12838 | |
12839 |
|
12840 |
|
12841 |
|
12842 |
|
12843 |
|
12844 |
|
12845 | isMounted: function (publicInstance) {
|
12846 | return false;
|
12847 | },
|
12848 |
|
12849 | |
12850 |
|
12851 |
|
12852 |
|
12853 |
|
12854 |
|
12855 |
|
12856 |
|
12857 | enqueueCallback: function (publicInstance, callback) {},
|
12858 |
|
12859 | |
12860 |
|
12861 |
|
12862 |
|
12863 |
|
12864 |
|
12865 |
|
12866 |
|
12867 |
|
12868 |
|
12869 |
|
12870 |
|
12871 |
|
12872 | enqueueForceUpdate: function (publicInstance) {
|
12873 | warnNoop(publicInstance, 'forceUpdate');
|
12874 | },
|
12875 |
|
12876 | |
12877 |
|
12878 |
|
12879 |
|
12880 |
|
12881 |
|
12882 |
|
12883 |
|
12884 |
|
12885 |
|
12886 |
|
12887 | enqueueReplaceState: function (publicInstance, completeState) {
|
12888 | warnNoop(publicInstance, 'replaceState');
|
12889 | },
|
12890 |
|
12891 | |
12892 |
|
12893 |
|
12894 |
|
12895 |
|
12896 |
|
12897 |
|
12898 |
|
12899 |
|
12900 |
|
12901 | enqueueSetState: function (publicInstance, partialState) {
|
12902 | warnNoop(publicInstance, 'setState');
|
12903 | }
|
12904 | };
|
12905 |
|
12906 | module.exports = ReactNoopUpdateQueue;
|
12907 | },{"171":171}],81:[function(_dereq_,module,exports){
|
12908 |
|
12909 |
|
12910 |
|
12911 |
|
12912 |
|
12913 |
|
12914 |
|
12915 |
|
12916 |
|
12917 |
|
12918 |
|
12919 | 'use strict';
|
12920 |
|
12921 | var _prodInvariant = _dereq_(140);
|
12922 |
|
12923 | var invariant = _dereq_(162);
|
12924 |
|
12925 |
|
12926 |
|
12927 |
|
12928 |
|
12929 |
|
12930 |
|
12931 |
|
12932 |
|
12933 |
|
12934 |
|
12935 |
|
12936 |
|
12937 |
|
12938 |
|
12939 |
|
12940 |
|
12941 |
|
12942 |
|
12943 |
|
12944 |
|
12945 |
|
12946 |
|
12947 |
|
12948 |
|
12949 |
|
12950 |
|
12951 |
|
12952 |
|
12953 |
|
12954 |
|
12955 | var ReactOwner = {
|
12956 |
|
12957 | |
12958 |
|
12959 |
|
12960 |
|
12961 |
|
12962 | isValidOwner: function (object) {
|
12963 | return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
|
12964 | },
|
12965 |
|
12966 | |
12967 |
|
12968 |
|
12969 |
|
12970 |
|
12971 |
|
12972 |
|
12973 |
|
12974 |
|
12975 | addComponentAsRefTo: function (component, ref, owner) {
|
12976 | !ReactOwner.isValidOwner(owner) ? "development" !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;
|
12977 | owner.attachRef(ref, component);
|
12978 | },
|
12979 |
|
12980 | |
12981 |
|
12982 |
|
12983 |
|
12984 |
|
12985 |
|
12986 |
|
12987 |
|
12988 |
|
12989 | removeComponentAsRefFrom: function (component, ref, owner) {
|
12990 | !ReactOwner.isValidOwner(owner) ? "development" !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;
|
12991 | var ownerPublicInstance = owner.getPublicInstance();
|
12992 |
|
12993 |
|
12994 | if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
|
12995 | owner.detachRef(ref);
|
12996 | }
|
12997 | }
|
12998 |
|
12999 | };
|
13000 |
|
13001 | module.exports = ReactOwner;
|
13002 | },{"140":140,"162":162}],82:[function(_dereq_,module,exports){
|
13003 |
|
13004 |
|
13005 |
|
13006 |
|
13007 |
|
13008 |
|
13009 |
|
13010 |
|
13011 |
|
13012 |
|
13013 |
|
13014 | 'use strict';
|
13015 |
|
13016 | var ReactPropTypeLocationNames = {};
|
13017 |
|
13018 | if ("development" !== 'production') {
|
13019 | ReactPropTypeLocationNames = {
|
13020 | prop: 'prop',
|
13021 | context: 'context',
|
13022 | childContext: 'child context'
|
13023 | };
|
13024 | }
|
13025 |
|
13026 | module.exports = ReactPropTypeLocationNames;
|
13027 | },{}],83:[function(_dereq_,module,exports){
|
13028 |
|
13029 |
|
13030 |
|
13031 |
|
13032 |
|
13033 |
|
13034 |
|
13035 |
|
13036 |
|
13037 |
|
13038 |
|
13039 | 'use strict';
|
13040 |
|
13041 | var keyMirror = _dereq_(165);
|
13042 |
|
13043 | var ReactPropTypeLocations = keyMirror({
|
13044 | prop: null,
|
13045 | context: null,
|
13046 | childContext: null
|
13047 | });
|
13048 |
|
13049 | module.exports = ReactPropTypeLocations;
|
13050 | },{"165":165}],84:[function(_dereq_,module,exports){
|
13051 |
|
13052 |
|
13053 |
|
13054 |
|
13055 |
|
13056 |
|
13057 |
|
13058 |
|
13059 |
|
13060 |
|
13061 |
|
13062 | 'use strict';
|
13063 |
|
13064 | var ReactElement = _dereq_(61);
|
13065 | var ReactPropTypeLocationNames = _dereq_(82);
|
13066 | var ReactPropTypesSecret = _dereq_(85);
|
13067 |
|
13068 | var emptyFunction = _dereq_(154);
|
13069 | var getIteratorFn = _dereq_(131);
|
13070 | var warning = _dereq_(171);
|
13071 |
|
13072 |
|
13073 |
|
13074 |
|
13075 |
|
13076 |
|
13077 |
|
13078 |
|
13079 |
|
13080 |
|
13081 |
|
13082 |
|
13083 |
|
13084 |
|
13085 |
|
13086 |
|
13087 |
|
13088 |
|
13089 |
|
13090 |
|
13091 |
|
13092 |
|
13093 |
|
13094 |
|
13095 |
|
13096 |
|
13097 |
|
13098 |
|
13099 |
|
13100 |
|
13101 |
|
13102 |
|
13103 |
|
13104 |
|
13105 |
|
13106 |
|
13107 |
|
13108 |
|
13109 |
|
13110 |
|
13111 |
|
13112 |
|
13113 |
|
13114 |
|
13115 |
|
13116 |
|
13117 |
|
13118 |
|
13119 | var ANONYMOUS = '<<anonymous>>';
|
13120 |
|
13121 | var ReactPropTypes = {
|
13122 | array: createPrimitiveTypeChecker('array'),
|
13123 | bool: createPrimitiveTypeChecker('boolean'),
|
13124 | func: createPrimitiveTypeChecker('function'),
|
13125 | number: createPrimitiveTypeChecker('number'),
|
13126 | object: createPrimitiveTypeChecker('object'),
|
13127 | string: createPrimitiveTypeChecker('string'),
|
13128 | symbol: createPrimitiveTypeChecker('symbol'),
|
13129 |
|
13130 | any: createAnyTypeChecker(),
|
13131 | arrayOf: createArrayOfTypeChecker,
|
13132 | element: createElementTypeChecker(),
|
13133 | instanceOf: createInstanceTypeChecker,
|
13134 | node: createNodeChecker(),
|
13135 | objectOf: createObjectOfTypeChecker,
|
13136 | oneOf: createEnumTypeChecker,
|
13137 | oneOfType: createUnionTypeChecker,
|
13138 | shape: createShapeTypeChecker
|
13139 | };
|
13140 |
|
13141 |
|
13142 |
|
13143 |
|
13144 |
|
13145 |
|
13146 | function is(x, y) {
|
13147 |
|
13148 | if (x === y) {
|
13149 |
|
13150 |
|
13151 | return x !== 0 || 1 / x === 1 / y;
|
13152 | } else {
|
13153 |
|
13154 | return x !== x && y !== y;
|
13155 | }
|
13156 | }
|
13157 |
|
13158 |
|
13159 |
|
13160 |
|
13161 |
|
13162 |
|
13163 |
|
13164 |
|
13165 |
|
13166 | function PropTypeError(message) {
|
13167 | this.message = message;
|
13168 | this.stack = '';
|
13169 | }
|
13170 |
|
13171 | PropTypeError.prototype = Error.prototype;
|
13172 |
|
13173 | function createChainableTypeChecker(validate) {
|
13174 | if ("development" !== 'production') {
|
13175 | var manualPropTypeCallCache = {};
|
13176 | }
|
13177 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
13178 | componentName = componentName || ANONYMOUS;
|
13179 | propFullName = propFullName || propName;
|
13180 | if ("development" !== 'production') {
|
13181 | if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {
|
13182 | var cacheKey = componentName + ':' + propName;
|
13183 | if (!manualPropTypeCallCache[cacheKey]) {
|
13184 | "development" !== 'production' ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in the next major version. You may be ' + 'seeing this warning due to a third-party PropTypes library. ' + 'See https://fb.me/react-warning-dont-call-proptypes for details.', propFullName, componentName) : void 0;
|
13185 | manualPropTypeCallCache[cacheKey] = true;
|
13186 | }
|
13187 | }
|
13188 | }
|
13189 | if (props[propName] == null) {
|
13190 | var locationName = ReactPropTypeLocationNames[location];
|
13191 | if (isRequired) {
|
13192 | return new PropTypeError('Required ' + locationName + ' `' + propFullName + '` was not specified in ' + ('`' + componentName + '`.'));
|
13193 | }
|
13194 | return null;
|
13195 | } else {
|
13196 | return validate(props, propName, componentName, location, propFullName);
|
13197 | }
|
13198 | }
|
13199 |
|
13200 | var chainedCheckType = checkType.bind(null, false);
|
13201 | chainedCheckType.isRequired = checkType.bind(null, true);
|
13202 |
|
13203 | return chainedCheckType;
|
13204 | }
|
13205 |
|
13206 | function createPrimitiveTypeChecker(expectedType) {
|
13207 | function validate(props, propName, componentName, location, propFullName, secret) {
|
13208 | var propValue = props[propName];
|
13209 | var propType = getPropType(propValue);
|
13210 | if (propType !== expectedType) {
|
13211 | var locationName = ReactPropTypeLocationNames[location];
|
13212 |
|
13213 |
|
13214 |
|
13215 | var preciseType = getPreciseType(propValue);
|
13216 |
|
13217 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
13218 | }
|
13219 | return null;
|
13220 | }
|
13221 | return createChainableTypeChecker(validate);
|
13222 | }
|
13223 |
|
13224 | function createAnyTypeChecker() {
|
13225 | return createChainableTypeChecker(emptyFunction.thatReturns(null));
|
13226 | }
|
13227 |
|
13228 | function createArrayOfTypeChecker(typeChecker) {
|
13229 | function validate(props, propName, componentName, location, propFullName) {
|
13230 | if (typeof typeChecker !== 'function') {
|
13231 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
13232 | }
|
13233 | var propValue = props[propName];
|
13234 | if (!Array.isArray(propValue)) {
|
13235 | var locationName = ReactPropTypeLocationNames[location];
|
13236 | var propType = getPropType(propValue);
|
13237 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
13238 | }
|
13239 | for (var i = 0; i < propValue.length; i++) {
|
13240 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
13241 | if (error instanceof Error) {
|
13242 | return error;
|
13243 | }
|
13244 | }
|
13245 | return null;
|
13246 | }
|
13247 | return createChainableTypeChecker(validate);
|
13248 | }
|
13249 |
|
13250 | function createElementTypeChecker() {
|
13251 | function validate(props, propName, componentName, location, propFullName) {
|
13252 | var propValue = props[propName];
|
13253 | if (!ReactElement.isValidElement(propValue)) {
|
13254 | var locationName = ReactPropTypeLocationNames[location];
|
13255 | var propType = getPropType(propValue);
|
13256 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
13257 | }
|
13258 | return null;
|
13259 | }
|
13260 | return createChainableTypeChecker(validate);
|
13261 | }
|
13262 |
|
13263 | function createInstanceTypeChecker(expectedClass) {
|
13264 | function validate(props, propName, componentName, location, propFullName) {
|
13265 | if (!(props[propName] instanceof expectedClass)) {
|
13266 | var locationName = ReactPropTypeLocationNames[location];
|
13267 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
13268 | var actualClassName = getClassName(props[propName]);
|
13269 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
13270 | }
|
13271 | return null;
|
13272 | }
|
13273 | return createChainableTypeChecker(validate);
|
13274 | }
|
13275 |
|
13276 | function createEnumTypeChecker(expectedValues) {
|
13277 | if (!Array.isArray(expectedValues)) {
|
13278 | "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
13279 | return emptyFunction.thatReturnsNull;
|
13280 | }
|
13281 |
|
13282 | function validate(props, propName, componentName, location, propFullName) {
|
13283 | var propValue = props[propName];
|
13284 | for (var i = 0; i < expectedValues.length; i++) {
|
13285 | if (is(propValue, expectedValues[i])) {
|
13286 | return null;
|
13287 | }
|
13288 | }
|
13289 |
|
13290 | var locationName = ReactPropTypeLocationNames[location];
|
13291 | var valuesString = JSON.stringify(expectedValues);
|
13292 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
13293 | }
|
13294 | return createChainableTypeChecker(validate);
|
13295 | }
|
13296 |
|
13297 | function createObjectOfTypeChecker(typeChecker) {
|
13298 | function validate(props, propName, componentName, location, propFullName) {
|
13299 | if (typeof typeChecker !== 'function') {
|
13300 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
13301 | }
|
13302 | var propValue = props[propName];
|
13303 | var propType = getPropType(propValue);
|
13304 | if (propType !== 'object') {
|
13305 | var locationName = ReactPropTypeLocationNames[location];
|
13306 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
13307 | }
|
13308 | for (var key in propValue) {
|
13309 | if (propValue.hasOwnProperty(key)) {
|
13310 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
13311 | if (error instanceof Error) {
|
13312 | return error;
|
13313 | }
|
13314 | }
|
13315 | }
|
13316 | return null;
|
13317 | }
|
13318 | return createChainableTypeChecker(validate);
|
13319 | }
|
13320 |
|
13321 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
13322 | if (!Array.isArray(arrayOfTypeCheckers)) {
|
13323 | "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
13324 | return emptyFunction.thatReturnsNull;
|
13325 | }
|
13326 |
|
13327 | function validate(props, propName, componentName, location, propFullName) {
|
13328 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
13329 | var checker = arrayOfTypeCheckers[i];
|
13330 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
13331 | return null;
|
13332 | }
|
13333 | }
|
13334 |
|
13335 | var locationName = ReactPropTypeLocationNames[location];
|
13336 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
13337 | }
|
13338 | return createChainableTypeChecker(validate);
|
13339 | }
|
13340 |
|
13341 | function createNodeChecker() {
|
13342 | function validate(props, propName, componentName, location, propFullName) {
|
13343 | if (!isNode(props[propName])) {
|
13344 | var locationName = ReactPropTypeLocationNames[location];
|
13345 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
13346 | }
|
13347 | return null;
|
13348 | }
|
13349 | return createChainableTypeChecker(validate);
|
13350 | }
|
13351 |
|
13352 | function createShapeTypeChecker(shapeTypes) {
|
13353 | function validate(props, propName, componentName, location, propFullName) {
|
13354 | var propValue = props[propName];
|
13355 | var propType = getPropType(propValue);
|
13356 | if (propType !== 'object') {
|
13357 | var locationName = ReactPropTypeLocationNames[location];
|
13358 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
13359 | }
|
13360 | for (var key in shapeTypes) {
|
13361 | var checker = shapeTypes[key];
|
13362 | if (!checker) {
|
13363 | continue;
|
13364 | }
|
13365 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
13366 | if (error) {
|
13367 | return error;
|
13368 | }
|
13369 | }
|
13370 | return null;
|
13371 | }
|
13372 | return createChainableTypeChecker(validate);
|
13373 | }
|
13374 |
|
13375 | function isNode(propValue) {
|
13376 | switch (typeof propValue) {
|
13377 | case 'number':
|
13378 | case 'string':
|
13379 | case 'undefined':
|
13380 | return true;
|
13381 | case 'boolean':
|
13382 | return !propValue;
|
13383 | case 'object':
|
13384 | if (Array.isArray(propValue)) {
|
13385 | return propValue.every(isNode);
|
13386 | }
|
13387 | if (propValue === null || ReactElement.isValidElement(propValue)) {
|
13388 | return true;
|
13389 | }
|
13390 |
|
13391 | var iteratorFn = getIteratorFn(propValue);
|
13392 | if (iteratorFn) {
|
13393 | var iterator = iteratorFn.call(propValue);
|
13394 | var step;
|
13395 | if (iteratorFn !== propValue.entries) {
|
13396 | while (!(step = iterator.next()).done) {
|
13397 | if (!isNode(step.value)) {
|
13398 | return false;
|
13399 | }
|
13400 | }
|
13401 | } else {
|
13402 |
|
13403 | while (!(step = iterator.next()).done) {
|
13404 | var entry = step.value;
|
13405 | if (entry) {
|
13406 | if (!isNode(entry[1])) {
|
13407 | return false;
|
13408 | }
|
13409 | }
|
13410 | }
|
13411 | }
|
13412 | } else {
|
13413 | return false;
|
13414 | }
|
13415 |
|
13416 | return true;
|
13417 | default:
|
13418 | return false;
|
13419 | }
|
13420 | }
|
13421 |
|
13422 | function isSymbol(propType, propValue) {
|
13423 |
|
13424 | if (propType === 'symbol') {
|
13425 | return true;
|
13426 | }
|
13427 |
|
13428 |
|
13429 | if (propValue['@@toStringTag'] === 'Symbol') {
|
13430 | return true;
|
13431 | }
|
13432 |
|
13433 |
|
13434 | if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
13435 | return true;
|
13436 | }
|
13437 |
|
13438 | return false;
|
13439 | }
|
13440 |
|
13441 |
|
13442 | function getPropType(propValue) {
|
13443 | var propType = typeof propValue;
|
13444 | if (Array.isArray(propValue)) {
|
13445 | return 'array';
|
13446 | }
|
13447 | if (propValue instanceof RegExp) {
|
13448 |
|
13449 |
|
13450 |
|
13451 | return 'object';
|
13452 | }
|
13453 | if (isSymbol(propType, propValue)) {
|
13454 | return 'symbol';
|
13455 | }
|
13456 | return propType;
|
13457 | }
|
13458 |
|
13459 |
|
13460 |
|
13461 | function getPreciseType(propValue) {
|
13462 | var propType = getPropType(propValue);
|
13463 | if (propType === 'object') {
|
13464 | if (propValue instanceof Date) {
|
13465 | return 'date';
|
13466 | } else if (propValue instanceof RegExp) {
|
13467 | return 'regexp';
|
13468 | }
|
13469 | }
|
13470 | return propType;
|
13471 | }
|
13472 |
|
13473 |
|
13474 | function getClassName(propValue) {
|
13475 | if (!propValue.constructor || !propValue.constructor.name) {
|
13476 | return ANONYMOUS;
|
13477 | }
|
13478 | return propValue.constructor.name;
|
13479 | }
|
13480 |
|
13481 | module.exports = ReactPropTypes;
|
13482 | },{"131":131,"154":154,"171":171,"61":61,"82":82,"85":85}],85:[function(_dereq_,module,exports){
|
13483 |
|
13484 |
|
13485 |
|
13486 |
|
13487 |
|
13488 |
|
13489 |
|
13490 |
|
13491 |
|
13492 |
|
13493 |
|
13494 | 'use strict';
|
13495 |
|
13496 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
13497 |
|
13498 | module.exports = ReactPropTypesSecret;
|
13499 | },{}],86:[function(_dereq_,module,exports){
|
13500 |
|
13501 |
|
13502 |
|
13503 |
|
13504 |
|
13505 |
|
13506 |
|
13507 |
|
13508 |
|
13509 |
|
13510 |
|
13511 | 'use strict';
|
13512 |
|
13513 | var _assign = _dereq_(172);
|
13514 |
|
13515 | var ReactComponent = _dereq_(32);
|
13516 | var ReactNoopUpdateQueue = _dereq_(80);
|
13517 |
|
13518 | var emptyObject = _dereq_(155);
|
13519 |
|
13520 |
|
13521 |
|
13522 |
|
13523 | function ReactPureComponent(props, context, updater) {
|
13524 |
|
13525 | this.props = props;
|
13526 | this.context = context;
|
13527 | this.refs = emptyObject;
|
13528 |
|
13529 |
|
13530 | this.updater = updater || ReactNoopUpdateQueue;
|
13531 | }
|
13532 |
|
13533 | function ComponentDummy() {}
|
13534 | ComponentDummy.prototype = ReactComponent.prototype;
|
13535 | ReactPureComponent.prototype = new ComponentDummy();
|
13536 | ReactPureComponent.prototype.constructor = ReactPureComponent;
|
13537 |
|
13538 | _assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
13539 | ReactPureComponent.prototype.isPureReactComponent = true;
|
13540 |
|
13541 | module.exports = ReactPureComponent;
|
13542 | },{"155":155,"172":172,"32":32,"80":80}],87:[function(_dereq_,module,exports){
|
13543 |
|
13544 |
|
13545 |
|
13546 |
|
13547 |
|
13548 |
|
13549 |
|
13550 |
|
13551 |
|
13552 |
|
13553 |
|
13554 | 'use strict';
|
13555 |
|
13556 | var _assign = _dereq_(172);
|
13557 |
|
13558 | var CallbackQueue = _dereq_(5);
|
13559 | var PooledClass = _dereq_(25);
|
13560 | var ReactBrowserEventEmitter = _dereq_(27);
|
13561 | var ReactInputSelection = _dereq_(71);
|
13562 | var ReactInstrumentation = _dereq_(73);
|
13563 | var Transaction = _dereq_(114);
|
13564 | var ReactUpdateQueue = _dereq_(95);
|
13565 |
|
13566 |
|
13567 |
|
13568 |
|
13569 |
|
13570 | var SELECTION_RESTORATION = {
|
13571 | |
13572 |
|
13573 |
|
13574 | initialize: ReactInputSelection.getSelectionInformation,
|
13575 | |
13576 |
|
13577 |
|
13578 | close: ReactInputSelection.restoreSelection
|
13579 | };
|
13580 |
|
13581 |
|
13582 |
|
13583 |
|
13584 |
|
13585 |
|
13586 | var EVENT_SUPPRESSION = {
|
13587 | |
13588 |
|
13589 |
|
13590 |
|
13591 | initialize: function () {
|
13592 | var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
|
13593 | ReactBrowserEventEmitter.setEnabled(false);
|
13594 | return currentlyEnabled;
|
13595 | },
|
13596 |
|
13597 | |
13598 |
|
13599 |
|
13600 |
|
13601 |
|
13602 | close: function (previouslyEnabled) {
|
13603 | ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
|
13604 | }
|
13605 | };
|
13606 |
|
13607 |
|
13608 |
|
13609 |
|
13610 |
|
13611 | var ON_DOM_READY_QUEUEING = {
|
13612 | |
13613 |
|
13614 |
|
13615 | initialize: function () {
|
13616 | this.reactMountReady.reset();
|
13617 | },
|
13618 |
|
13619 | |
13620 |
|
13621 |
|
13622 | close: function () {
|
13623 | this.reactMountReady.notifyAll();
|
13624 | }
|
13625 | };
|
13626 |
|
13627 |
|
13628 |
|
13629 |
|
13630 |
|
13631 |
|
13632 | var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
|
13633 |
|
13634 | if ("development" !== 'production') {
|
13635 | TRANSACTION_WRAPPERS.push({
|
13636 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
13637 | close: ReactInstrumentation.debugTool.onEndFlush
|
13638 | });
|
13639 | }
|
13640 |
|
13641 |
|
13642 |
|
13643 |
|
13644 |
|
13645 |
|
13646 |
|
13647 |
|
13648 |
|
13649 |
|
13650 |
|
13651 |
|
13652 |
|
13653 |
|
13654 |
|
13655 | function ReactReconcileTransaction(useCreateElement) {
|
13656 | this.reinitializeTransaction();
|
13657 |
|
13658 |
|
13659 |
|
13660 |
|
13661 |
|
13662 | this.renderToStaticMarkup = false;
|
13663 | this.reactMountReady = CallbackQueue.getPooled(null);
|
13664 | this.useCreateElement = useCreateElement;
|
13665 | }
|
13666 |
|
13667 | var Mixin = {
|
13668 | |
13669 |
|
13670 |
|
13671 |
|
13672 |
|
13673 |
|
13674 |
|
13675 | getTransactionWrappers: function () {
|
13676 | return TRANSACTION_WRAPPERS;
|
13677 | },
|
13678 |
|
13679 | |
13680 |
|
13681 |
|
13682 | getReactMountReady: function () {
|
13683 | return this.reactMountReady;
|
13684 | },
|
13685 |
|
13686 | |
13687 |
|
13688 |
|
13689 | getUpdateQueue: function () {
|
13690 | return ReactUpdateQueue;
|
13691 | },
|
13692 |
|
13693 | |
13694 |
|
13695 |
|
13696 |
|
13697 | checkpoint: function () {
|
13698 |
|
13699 | return this.reactMountReady.checkpoint();
|
13700 | },
|
13701 |
|
13702 | rollback: function (checkpoint) {
|
13703 | this.reactMountReady.rollback(checkpoint);
|
13704 | },
|
13705 |
|
13706 | |
13707 |
|
13708 |
|
13709 |
|
13710 | destructor: function () {
|
13711 | CallbackQueue.release(this.reactMountReady);
|
13712 | this.reactMountReady = null;
|
13713 | }
|
13714 | };
|
13715 |
|
13716 | _assign(ReactReconcileTransaction.prototype, Transaction.Mixin, Mixin);
|
13717 |
|
13718 | PooledClass.addPoolingTo(ReactReconcileTransaction);
|
13719 |
|
13720 | module.exports = ReactReconcileTransaction;
|
13721 | },{"114":114,"172":172,"25":25,"27":27,"5":5,"71":71,"73":73,"95":95}],88:[function(_dereq_,module,exports){
|
13722 |
|
13723 |
|
13724 |
|
13725 |
|
13726 |
|
13727 |
|
13728 |
|
13729 |
|
13730 |
|
13731 |
|
13732 |
|
13733 | 'use strict';
|
13734 |
|
13735 | var ReactRef = _dereq_(89);
|
13736 | var ReactInstrumentation = _dereq_(73);
|
13737 |
|
13738 | var warning = _dereq_(171);
|
13739 |
|
13740 |
|
13741 |
|
13742 |
|
13743 |
|
13744 | function attachRefs() {
|
13745 | ReactRef.attachRefs(this, this._currentElement);
|
13746 | }
|
13747 |
|
13748 | var ReactReconciler = {
|
13749 |
|
13750 | |
13751 |
|
13752 |
|
13753 |
|
13754 |
|
13755 |
|
13756 |
|
13757 |
|
13758 |
|
13759 |
|
13760 |
|
13761 | mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots
|
13762 | ) {
|
13763 | if ("development" !== 'production') {
|
13764 | if (internalInstance._debugID !== 0) {
|
13765 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
|
13766 | }
|
13767 | }
|
13768 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
|
13769 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
13770 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
13771 | }
|
13772 | if ("development" !== 'production') {
|
13773 | if (internalInstance._debugID !== 0) {
|
13774 | ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
|
13775 | }
|
13776 | }
|
13777 | return markup;
|
13778 | },
|
13779 |
|
13780 | |
13781 |
|
13782 |
|
13783 |
|
13784 | getHostNode: function (internalInstance) {
|
13785 | return internalInstance.getHostNode();
|
13786 | },
|
13787 |
|
13788 | |
13789 |
|
13790 |
|
13791 |
|
13792 |
|
13793 |
|
13794 | unmountComponent: function (internalInstance, safely) {
|
13795 | if ("development" !== 'production') {
|
13796 | if (internalInstance._debugID !== 0) {
|
13797 | ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
|
13798 | }
|
13799 | }
|
13800 | ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
|
13801 | internalInstance.unmountComponent(safely);
|
13802 | if ("development" !== 'production') {
|
13803 | if (internalInstance._debugID !== 0) {
|
13804 | ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
|
13805 | }
|
13806 | }
|
13807 | },
|
13808 |
|
13809 | |
13810 |
|
13811 |
|
13812 |
|
13813 |
|
13814 |
|
13815 |
|
13816 |
|
13817 |
|
13818 | receiveComponent: function (internalInstance, nextElement, transaction, context) {
|
13819 | var prevElement = internalInstance._currentElement;
|
13820 |
|
13821 | if (nextElement === prevElement && context === internalInstance._context) {
|
13822 |
|
13823 |
|
13824 |
|
13825 |
|
13826 |
|
13827 |
|
13828 |
|
13829 |
|
13830 |
|
13831 |
|
13832 | return;
|
13833 | }
|
13834 |
|
13835 | if ("development" !== 'production') {
|
13836 | if (internalInstance._debugID !== 0) {
|
13837 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
|
13838 | }
|
13839 | }
|
13840 |
|
13841 | var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
|
13842 |
|
13843 | if (refsChanged) {
|
13844 | ReactRef.detachRefs(internalInstance, prevElement);
|
13845 | }
|
13846 |
|
13847 | internalInstance.receiveComponent(nextElement, transaction, context);
|
13848 |
|
13849 | if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
13850 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
13851 | }
|
13852 |
|
13853 | if ("development" !== 'production') {
|
13854 | if (internalInstance._debugID !== 0) {
|
13855 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
13856 | }
|
13857 | }
|
13858 | },
|
13859 |
|
13860 | |
13861 |
|
13862 |
|
13863 |
|
13864 |
|
13865 |
|
13866 |
|
13867 | performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
|
13868 | if (internalInstance._updateBatchNumber !== updateBatchNumber) {
|
13869 |
|
13870 |
|
13871 | "development" !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
|
13872 | return;
|
13873 | }
|
13874 | if ("development" !== 'production') {
|
13875 | if (internalInstance._debugID !== 0) {
|
13876 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
|
13877 | }
|
13878 | }
|
13879 | internalInstance.performUpdateIfNecessary(transaction);
|
13880 | if ("development" !== 'production') {
|
13881 | if (internalInstance._debugID !== 0) {
|
13882 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
13883 | }
|
13884 | }
|
13885 | }
|
13886 |
|
13887 | };
|
13888 |
|
13889 | module.exports = ReactReconciler;
|
13890 | },{"171":171,"73":73,"89":89}],89:[function(_dereq_,module,exports){
|
13891 |
|
13892 |
|
13893 |
|
13894 |
|
13895 |
|
13896 |
|
13897 |
|
13898 |
|
13899 |
|
13900 |
|
13901 |
|
13902 | 'use strict';
|
13903 |
|
13904 | var ReactOwner = _dereq_(81);
|
13905 |
|
13906 | var ReactRef = {};
|
13907 |
|
13908 | function attachRef(ref, component, owner) {
|
13909 | if (typeof ref === 'function') {
|
13910 | ref(component.getPublicInstance());
|
13911 | } else {
|
13912 |
|
13913 | ReactOwner.addComponentAsRefTo(component, ref, owner);
|
13914 | }
|
13915 | }
|
13916 |
|
13917 | function detachRef(ref, component, owner) {
|
13918 | if (typeof ref === 'function') {
|
13919 | ref(null);
|
13920 | } else {
|
13921 |
|
13922 | ReactOwner.removeComponentAsRefFrom(component, ref, owner);
|
13923 | }
|
13924 | }
|
13925 |
|
13926 | ReactRef.attachRefs = function (instance, element) {
|
13927 | if (element === null || element === false) {
|
13928 | return;
|
13929 | }
|
13930 | var ref = element.ref;
|
13931 | if (ref != null) {
|
13932 | attachRef(ref, instance, element._owner);
|
13933 | }
|
13934 | };
|
13935 |
|
13936 | ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
|
13937 |
|
13938 |
|
13939 |
|
13940 |
|
13941 |
|
13942 |
|
13943 |
|
13944 |
|
13945 |
|
13946 |
|
13947 |
|
13948 |
|
13949 | var prevEmpty = prevElement === null || prevElement === false;
|
13950 | var nextEmpty = nextElement === null || nextElement === false;
|
13951 |
|
13952 | return (
|
13953 |
|
13954 | prevEmpty || nextEmpty || nextElement.ref !== prevElement.ref ||
|
13955 |
|
13956 | typeof nextElement.ref === 'string' && nextElement._owner !== prevElement._owner
|
13957 | );
|
13958 | };
|
13959 |
|
13960 | ReactRef.detachRefs = function (instance, element) {
|
13961 | if (element === null || element === false) {
|
13962 | return;
|
13963 | }
|
13964 | var ref = element.ref;
|
13965 | if (ref != null) {
|
13966 | detachRef(ref, instance, element._owner);
|
13967 | }
|
13968 | };
|
13969 |
|
13970 | module.exports = ReactRef;
|
13971 | },{"81":81}],90:[function(_dereq_,module,exports){
|
13972 |
|
13973 |
|
13974 |
|
13975 |
|
13976 |
|
13977 |
|
13978 |
|
13979 |
|
13980 |
|
13981 |
|
13982 |
|
13983 | 'use strict';
|
13984 |
|
13985 | var ReactServerBatchingStrategy = {
|
13986 | isBatchingUpdates: false,
|
13987 | batchedUpdates: function (callback) {
|
13988 |
|
13989 |
|
13990 | }
|
13991 | };
|
13992 |
|
13993 | module.exports = ReactServerBatchingStrategy;
|
13994 | },{}],91:[function(_dereq_,module,exports){
|
13995 |
|
13996 |
|
13997 |
|
13998 |
|
13999 |
|
14000 |
|
14001 |
|
14002 |
|
14003 |
|
14004 |
|
14005 | 'use strict';
|
14006 |
|
14007 | var _prodInvariant = _dereq_(140);
|
14008 |
|
14009 | var ReactDOMContainerInfo = _dereq_(43);
|
14010 | var ReactDefaultBatchingStrategy = _dereq_(59);
|
14011 | var ReactElement = _dereq_(61);
|
14012 | var ReactInstrumentation = _dereq_(73);
|
14013 | var ReactMarkupChecksum = _dereq_(75);
|
14014 | var ReactReconciler = _dereq_(88);
|
14015 | var ReactServerBatchingStrategy = _dereq_(90);
|
14016 | var ReactServerRenderingTransaction = _dereq_(92);
|
14017 | var ReactUpdates = _dereq_(96);
|
14018 |
|
14019 | var emptyObject = _dereq_(155);
|
14020 | var instantiateReactComponent = _dereq_(135);
|
14021 | var invariant = _dereq_(162);
|
14022 |
|
14023 | var pendingTransactions = 0;
|
14024 |
|
14025 |
|
14026 |
|
14027 |
|
14028 |
|
14029 | function renderToStringImpl(element, makeStaticMarkup) {
|
14030 | var transaction;
|
14031 | try {
|
14032 | ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);
|
14033 |
|
14034 | transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup);
|
14035 |
|
14036 | pendingTransactions++;
|
14037 |
|
14038 | return transaction.perform(function () {
|
14039 | var componentInstance = instantiateReactComponent(element, true);
|
14040 | var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactDOMContainerInfo(), emptyObject, 0
|
14041 | );
|
14042 | if ("development" !== 'production') {
|
14043 | ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID);
|
14044 | }
|
14045 | if (!makeStaticMarkup) {
|
14046 | markup = ReactMarkupChecksum.addChecksumToMarkup(markup);
|
14047 | }
|
14048 | return markup;
|
14049 | }, null);
|
14050 | } finally {
|
14051 | pendingTransactions--;
|
14052 | ReactServerRenderingTransaction.release(transaction);
|
14053 |
|
14054 |
|
14055 | if (!pendingTransactions) {
|
14056 | ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);
|
14057 | }
|
14058 | }
|
14059 | }
|
14060 |
|
14061 |
|
14062 |
|
14063 |
|
14064 |
|
14065 |
|
14066 | function renderToString(element) {
|
14067 | !ReactElement.isValidElement(element) ? "development" !== 'production' ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') : _prodInvariant('46') : void 0;
|
14068 | return renderToStringImpl(element, false);
|
14069 | }
|
14070 |
|
14071 |
|
14072 |
|
14073 |
|
14074 |
|
14075 |
|
14076 | function renderToStaticMarkup(element) {
|
14077 | !ReactElement.isValidElement(element) ? "development" !== 'production' ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') : _prodInvariant('47') : void 0;
|
14078 | return renderToStringImpl(element, true);
|
14079 | }
|
14080 |
|
14081 | module.exports = {
|
14082 | renderToString: renderToString,
|
14083 | renderToStaticMarkup: renderToStaticMarkup
|
14084 | };
|
14085 | },{"135":135,"140":140,"155":155,"162":162,"43":43,"59":59,"61":61,"73":73,"75":75,"88":88,"90":90,"92":92,"96":96}],92:[function(_dereq_,module,exports){
|
14086 |
|
14087 |
|
14088 |
|
14089 |
|
14090 |
|
14091 |
|
14092 |
|
14093 |
|
14094 |
|
14095 |
|
14096 |
|
14097 | 'use strict';
|
14098 |
|
14099 | var _assign = _dereq_(172);
|
14100 |
|
14101 | var PooledClass = _dereq_(25);
|
14102 | var Transaction = _dereq_(114);
|
14103 | var ReactInstrumentation = _dereq_(73);
|
14104 | var ReactServerUpdateQueue = _dereq_(93);
|
14105 |
|
14106 |
|
14107 |
|
14108 |
|
14109 |
|
14110 |
|
14111 | var TRANSACTION_WRAPPERS = [];
|
14112 |
|
14113 | if ("development" !== 'production') {
|
14114 | TRANSACTION_WRAPPERS.push({
|
14115 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
14116 | close: ReactInstrumentation.debugTool.onEndFlush
|
14117 | });
|
14118 | }
|
14119 |
|
14120 | var noopCallbackQueue = {
|
14121 | enqueue: function () {}
|
14122 | };
|
14123 |
|
14124 |
|
14125 |
|
14126 |
|
14127 |
|
14128 | function ReactServerRenderingTransaction(renderToStaticMarkup) {
|
14129 | this.reinitializeTransaction();
|
14130 | this.renderToStaticMarkup = renderToStaticMarkup;
|
14131 | this.useCreateElement = false;
|
14132 | this.updateQueue = new ReactServerUpdateQueue(this);
|
14133 | }
|
14134 |
|
14135 | var Mixin = {
|
14136 | |
14137 |
|
14138 |
|
14139 |
|
14140 |
|
14141 |
|
14142 | getTransactionWrappers: function () {
|
14143 | return TRANSACTION_WRAPPERS;
|
14144 | },
|
14145 |
|
14146 | |
14147 |
|
14148 |
|
14149 | getReactMountReady: function () {
|
14150 | return noopCallbackQueue;
|
14151 | },
|
14152 |
|
14153 | |
14154 |
|
14155 |
|
14156 | getUpdateQueue: function () {
|
14157 | return this.updateQueue;
|
14158 | },
|
14159 |
|
14160 | |
14161 |
|
14162 |
|
14163 |
|
14164 | destructor: function () {},
|
14165 |
|
14166 | checkpoint: function () {},
|
14167 |
|
14168 | rollback: function () {}
|
14169 | };
|
14170 |
|
14171 | _assign(ReactServerRenderingTransaction.prototype, Transaction.Mixin, Mixin);
|
14172 |
|
14173 | PooledClass.addPoolingTo(ReactServerRenderingTransaction);
|
14174 |
|
14175 | module.exports = ReactServerRenderingTransaction;
|
14176 | },{"114":114,"172":172,"25":25,"73":73,"93":93}],93:[function(_dereq_,module,exports){
|
14177 |
|
14178 |
|
14179 |
|
14180 |
|
14181 |
|
14182 |
|
14183 |
|
14184 |
|
14185 |
|
14186 |
|
14187 |
|
14188 |
|
14189 | 'use strict';
|
14190 |
|
14191 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
14192 |
|
14193 | var ReactUpdateQueue = _dereq_(95);
|
14194 | var Transaction = _dereq_(114);
|
14195 | var warning = _dereq_(171);
|
14196 |
|
14197 | function warnNoop(publicInstance, callerName) {
|
14198 | if ("development" !== 'production') {
|
14199 | var constructor = publicInstance.constructor;
|
14200 | "development" !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
|
14201 | }
|
14202 | }
|
14203 |
|
14204 | /**
|
14205 | * This is the update queue used for server rendering.
|
14206 | * It delegates to ReactUpdateQueue while server rendering is in progress and
|
14207 | * switches to ReactNoopUpdateQueue after the transaction has completed.
|
14208 | * @class ReactServerUpdateQueue
|
14209 | * @param {Transaction} transaction
|
14210 | */
|
14211 |
|
14212 | var ReactServerUpdateQueue = function () {
|
14213 |
|
14214 |
|
14215 | function ReactServerUpdateQueue(transaction) {
|
14216 | _classCallCheck(this, ReactServerUpdateQueue);
|
14217 |
|
14218 | this.transaction = transaction;
|
14219 | }
|
14220 |
|
14221 | |
14222 |
|
14223 |
|
14224 |
|
14225 |
|
14226 |
|
14227 |
|
14228 |
|
14229 |
|
14230 | ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
|
14231 | return false;
|
14232 | };
|
14233 |
|
14234 | |
14235 |
|
14236 |
|
14237 |
|
14238 |
|
14239 |
|
14240 |
|
14241 |
|
14242 |
|
14243 |
|
14244 | ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
|
14245 | if (this.transaction.isInTransaction()) {
|
14246 | ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
|
14247 | }
|
14248 | };
|
14249 |
|
14250 | |
14251 |
|
14252 |
|
14253 |
|
14254 |
|
14255 |
|
14256 |
|
14257 |
|
14258 |
|
14259 |
|
14260 |
|
14261 |
|
14262 |
|
14263 |
|
14264 |
|
14265 | ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
|
14266 | if (this.transaction.isInTransaction()) {
|
14267 | ReactUpdateQueue.enqueueForceUpdate(publicInstance);
|
14268 | } else {
|
14269 | warnNoop(publicInstance, 'forceUpdate');
|
14270 | }
|
14271 | };
|
14272 |
|
14273 | |
14274 |
|
14275 |
|
14276 |
|
14277 |
|
14278 |
|
14279 |
|
14280 |
|
14281 |
|
14282 |
|
14283 |
|
14284 |
|
14285 |
|
14286 | ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
|
14287 | if (this.transaction.isInTransaction()) {
|
14288 | ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
|
14289 | } else {
|
14290 | warnNoop(publicInstance, 'replaceState');
|
14291 | }
|
14292 | };
|
14293 |
|
14294 | |
14295 |
|
14296 |
|
14297 |
|
14298 |
|
14299 |
|
14300 |
|
14301 |
|
14302 |
|
14303 |
|
14304 |
|
14305 |
|
14306 | ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
|
14307 | if (this.transaction.isInTransaction()) {
|
14308 | ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
|
14309 | } else {
|
14310 | warnNoop(publicInstance, 'setState');
|
14311 | }
|
14312 | };
|
14313 |
|
14314 | return ReactServerUpdateQueue;
|
14315 | }();
|
14316 |
|
14317 | module.exports = ReactServerUpdateQueue;
|
14318 | },{"114":114,"171":171,"95":95}],94:[function(_dereq_,module,exports){
|
14319 |
|
14320 |
|
14321 |
|
14322 |
|
14323 |
|
14324 |
|
14325 |
|
14326 |
|
14327 |
|
14328 |
|
14329 |
|
14330 | 'use strict';
|
14331 |
|
14332 | var _assign = _dereq_(172);
|
14333 |
|
14334 | var ReactDOM = _dereq_(38);
|
14335 | var ReactDOMServer = _dereq_(53);
|
14336 | var React = _dereq_(26);
|
14337 |
|
14338 |
|
14339 | var ReactUMDEntry = _assign({
|
14340 | __SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOM,
|
14341 | __SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOMServer
|
14342 | }, React);
|
14343 |
|
14344 | module.exports = ReactUMDEntry;
|
14345 | },{"172":172,"26":26,"38":38,"53":53}],95:[function(_dereq_,module,exports){
|
14346 |
|
14347 |
|
14348 |
|
14349 |
|
14350 |
|
14351 |
|
14352 |
|
14353 |
|
14354 |
|
14355 |
|
14356 |
|
14357 | 'use strict';
|
14358 |
|
14359 | var _prodInvariant = _dereq_(140);
|
14360 |
|
14361 | var ReactCurrentOwner = _dereq_(37);
|
14362 | var ReactInstanceMap = _dereq_(72);
|
14363 | var ReactInstrumentation = _dereq_(73);
|
14364 | var ReactUpdates = _dereq_(96);
|
14365 |
|
14366 | var invariant = _dereq_(162);
|
14367 | var warning = _dereq_(171);
|
14368 |
|
14369 | function enqueueUpdate(internalInstance) {
|
14370 | ReactUpdates.enqueueUpdate(internalInstance);
|
14371 | }
|
14372 |
|
14373 | function formatUnexpectedArgument(arg) {
|
14374 | var type = typeof arg;
|
14375 | if (type !== 'object') {
|
14376 | return type;
|
14377 | }
|
14378 | var displayName = arg.constructor && arg.constructor.name || type;
|
14379 | var keys = Object.keys(arg);
|
14380 | if (keys.length > 0 && keys.length < 20) {
|
14381 | return displayName + ' (keys: ' + keys.join(', ') + ')';
|
14382 | }
|
14383 | return displayName;
|
14384 | }
|
14385 |
|
14386 | function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
|
14387 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
14388 | if (!internalInstance) {
|
14389 | if ("development" !== 'production') {
|
14390 | var ctor = publicInstance.constructor;
|
14391 |
|
14392 |
|
14393 |
|
14394 | "development" !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;
|
14395 | }
|
14396 | return null;
|
14397 | }
|
14398 |
|
14399 | if ("development" !== 'production') {
|
14400 | "development" !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
|
14401 | }
|
14402 |
|
14403 | return internalInstance;
|
14404 | }
|
14405 |
|
14406 |
|
14407 |
|
14408 |
|
14409 |
|
14410 | var ReactUpdateQueue = {
|
14411 |
|
14412 | |
14413 |
|
14414 |
|
14415 |
|
14416 |
|
14417 |
|
14418 |
|
14419 | isMounted: function (publicInstance) {
|
14420 | if ("development" !== 'production') {
|
14421 | var owner = ReactCurrentOwner.current;
|
14422 | if (owner !== null) {
|
14423 | "development" !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
|
14424 | owner._warnedAboutRefsInRender = true;
|
14425 | }
|
14426 | }
|
14427 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
14428 | if (internalInstance) {
|
14429 |
|
14430 |
|
14431 |
|
14432 | return !!internalInstance._renderedComponent;
|
14433 | } else {
|
14434 | return false;
|
14435 | }
|
14436 | },
|
14437 |
|
14438 | |
14439 |
|
14440 |
|
14441 |
|
14442 |
|
14443 |
|
14444 |
|
14445 |
|
14446 |
|
14447 | enqueueCallback: function (publicInstance, callback, callerName) {
|
14448 | ReactUpdateQueue.validateCallback(callback, callerName);
|
14449 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
|
14450 |
|
14451 |
|
14452 |
|
14453 |
|
14454 |
|
14455 |
|
14456 | if (!internalInstance) {
|
14457 | return null;
|
14458 | }
|
14459 |
|
14460 | if (internalInstance._pendingCallbacks) {
|
14461 | internalInstance._pendingCallbacks.push(callback);
|
14462 | } else {
|
14463 | internalInstance._pendingCallbacks = [callback];
|
14464 | }
|
14465 |
|
14466 |
|
14467 |
|
14468 |
|
14469 | enqueueUpdate(internalInstance);
|
14470 | },
|
14471 |
|
14472 | enqueueCallbackInternal: function (internalInstance, callback) {
|
14473 | if (internalInstance._pendingCallbacks) {
|
14474 | internalInstance._pendingCallbacks.push(callback);
|
14475 | } else {
|
14476 | internalInstance._pendingCallbacks = [callback];
|
14477 | }
|
14478 | enqueueUpdate(internalInstance);
|
14479 | },
|
14480 |
|
14481 | |
14482 |
|
14483 |
|
14484 |
|
14485 |
|
14486 |
|
14487 |
|
14488 |
|
14489 |
|
14490 |
|
14491 |
|
14492 |
|
14493 |
|
14494 | enqueueForceUpdate: function (publicInstance) {
|
14495 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
|
14496 |
|
14497 | if (!internalInstance) {
|
14498 | return;
|
14499 | }
|
14500 |
|
14501 | internalInstance._pendingForceUpdate = true;
|
14502 |
|
14503 | enqueueUpdate(internalInstance);
|
14504 | },
|
14505 |
|
14506 | |
14507 |
|
14508 |
|
14509 |
|
14510 |
|
14511 |
|
14512 |
|
14513 |
|
14514 |
|
14515 |
|
14516 |
|
14517 | enqueueReplaceState: function (publicInstance, completeState) {
|
14518 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
|
14519 |
|
14520 | if (!internalInstance) {
|
14521 | return;
|
14522 | }
|
14523 |
|
14524 | internalInstance._pendingStateQueue = [completeState];
|
14525 | internalInstance._pendingReplaceState = true;
|
14526 |
|
14527 | enqueueUpdate(internalInstance);
|
14528 | },
|
14529 |
|
14530 | |
14531 |
|
14532 |
|
14533 |
|
14534 |
|
14535 |
|
14536 |
|
14537 |
|
14538 |
|
14539 |
|
14540 | enqueueSetState: function (publicInstance, partialState) {
|
14541 | if ("development" !== 'production') {
|
14542 | ReactInstrumentation.debugTool.onSetState();
|
14543 | "development" !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
|
14544 | }
|
14545 |
|
14546 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
|
14547 |
|
14548 | if (!internalInstance) {
|
14549 | return;
|
14550 | }
|
14551 |
|
14552 | var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
|
14553 | queue.push(partialState);
|
14554 |
|
14555 | enqueueUpdate(internalInstance);
|
14556 | },
|
14557 |
|
14558 | enqueueElementInternal: function (internalInstance, nextElement, nextContext) {
|
14559 | internalInstance._pendingElement = nextElement;
|
14560 |
|
14561 | internalInstance._context = nextContext;
|
14562 | enqueueUpdate(internalInstance);
|
14563 | },
|
14564 |
|
14565 | validateCallback: function (callback, callerName) {
|
14566 | !(!callback || typeof callback === 'function') ? "development" !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;
|
14567 | }
|
14568 |
|
14569 | };
|
14570 |
|
14571 | module.exports = ReactUpdateQueue;
|
14572 | },{"140":140,"162":162,"171":171,"37":37,"72":72,"73":73,"96":96}],96:[function(_dereq_,module,exports){
|
14573 |
|
14574 |
|
14575 |
|
14576 |
|
14577 |
|
14578 |
|
14579 |
|
14580 |
|
14581 |
|
14582 |
|
14583 |
|
14584 | 'use strict';
|
14585 |
|
14586 | var _prodInvariant = _dereq_(140),
|
14587 | _assign = _dereq_(172);
|
14588 |
|
14589 | var CallbackQueue = _dereq_(5);
|
14590 | var PooledClass = _dereq_(25);
|
14591 | var ReactFeatureFlags = _dereq_(67);
|
14592 | var ReactReconciler = _dereq_(88);
|
14593 | var Transaction = _dereq_(114);
|
14594 |
|
14595 | var invariant = _dereq_(162);
|
14596 |
|
14597 | var dirtyComponents = [];
|
14598 | var updateBatchNumber = 0;
|
14599 | var asapCallbackQueue = CallbackQueue.getPooled();
|
14600 | var asapEnqueued = false;
|
14601 |
|
14602 | var batchingStrategy = null;
|
14603 |
|
14604 | function ensureInjected() {
|
14605 | !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
|
14606 | }
|
14607 |
|
14608 | var NESTED_UPDATES = {
|
14609 | initialize: function () {
|
14610 | this.dirtyComponentsLength = dirtyComponents.length;
|
14611 | },
|
14612 | close: function () {
|
14613 | if (this.dirtyComponentsLength !== dirtyComponents.length) {
|
14614 |
|
14615 |
|
14616 |
|
14617 |
|
14618 |
|
14619 | dirtyComponents.splice(0, this.dirtyComponentsLength);
|
14620 | flushBatchedUpdates();
|
14621 | } else {
|
14622 | dirtyComponents.length = 0;
|
14623 | }
|
14624 | }
|
14625 | };
|
14626 |
|
14627 | var UPDATE_QUEUEING = {
|
14628 | initialize: function () {
|
14629 | this.callbackQueue.reset();
|
14630 | },
|
14631 | close: function () {
|
14632 | this.callbackQueue.notifyAll();
|
14633 | }
|
14634 | };
|
14635 |
|
14636 | var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
|
14637 |
|
14638 | function ReactUpdatesFlushTransaction() {
|
14639 | this.reinitializeTransaction();
|
14640 | this.dirtyComponentsLength = null;
|
14641 | this.callbackQueue = CallbackQueue.getPooled();
|
14642 | this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
|
14643 | true);
|
14644 | }
|
14645 |
|
14646 | _assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, {
|
14647 | getTransactionWrappers: function () {
|
14648 | return TRANSACTION_WRAPPERS;
|
14649 | },
|
14650 |
|
14651 | destructor: function () {
|
14652 | this.dirtyComponentsLength = null;
|
14653 | CallbackQueue.release(this.callbackQueue);
|
14654 | this.callbackQueue = null;
|
14655 | ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
|
14656 | this.reconcileTransaction = null;
|
14657 | },
|
14658 |
|
14659 | perform: function (method, scope, a) {
|
14660 |
|
14661 |
|
14662 | return Transaction.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
|
14663 | }
|
14664 | });
|
14665 |
|
14666 | PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
|
14667 |
|
14668 | function batchedUpdates(callback, a, b, c, d, e) {
|
14669 | ensureInjected();
|
14670 | batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
|
14671 | }
|
14672 |
|
14673 |
|
14674 |
|
14675 |
|
14676 |
|
14677 |
|
14678 |
|
14679 |
|
14680 | function mountOrderComparator(c1, c2) {
|
14681 | return c1._mountOrder - c2._mountOrder;
|
14682 | }
|
14683 |
|
14684 | function runBatchedUpdates(transaction) {
|
14685 | var len = transaction.dirtyComponentsLength;
|
14686 | !(len === dirtyComponents.length) ? "development" !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
|
14687 |
|
14688 |
|
14689 |
|
14690 |
|
14691 | dirtyComponents.sort(mountOrderComparator);
|
14692 |
|
14693 |
|
14694 |
|
14695 |
|
14696 |
|
14697 |
|
14698 | updateBatchNumber++;
|
14699 |
|
14700 | for (var i = 0; i < len; i++) {
|
14701 |
|
14702 |
|
14703 |
|
14704 | var component = dirtyComponents[i];
|
14705 |
|
14706 |
|
14707 |
|
14708 |
|
14709 | var callbacks = component._pendingCallbacks;
|
14710 | component._pendingCallbacks = null;
|
14711 |
|
14712 | var markerName;
|
14713 | if (ReactFeatureFlags.logTopLevelRenders) {
|
14714 | var namedComponent = component;
|
14715 |
|
14716 | if (component._currentElement.props === component._renderedComponent._currentElement) {
|
14717 | namedComponent = component._renderedComponent;
|
14718 | }
|
14719 | markerName = 'React update: ' + namedComponent.getName();
|
14720 | console.time(markerName);
|
14721 | }
|
14722 |
|
14723 | ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
|
14724 |
|
14725 | if (markerName) {
|
14726 | console.timeEnd(markerName);
|
14727 | }
|
14728 |
|
14729 | if (callbacks) {
|
14730 | for (var j = 0; j < callbacks.length; j++) {
|
14731 | transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
|
14732 | }
|
14733 | }
|
14734 | }
|
14735 | }
|
14736 |
|
14737 | var flushBatchedUpdates = function () {
|
14738 |
|
14739 |
|
14740 |
|
14741 |
|
14742 | while (dirtyComponents.length || asapEnqueued) {
|
14743 | if (dirtyComponents.length) {
|
14744 | var transaction = ReactUpdatesFlushTransaction.getPooled();
|
14745 | transaction.perform(runBatchedUpdates, null, transaction);
|
14746 | ReactUpdatesFlushTransaction.release(transaction);
|
14747 | }
|
14748 |
|
14749 | if (asapEnqueued) {
|
14750 | asapEnqueued = false;
|
14751 | var queue = asapCallbackQueue;
|
14752 | asapCallbackQueue = CallbackQueue.getPooled();
|
14753 | queue.notifyAll();
|
14754 | CallbackQueue.release(queue);
|
14755 | }
|
14756 | }
|
14757 | };
|
14758 |
|
14759 |
|
14760 |
|
14761 |
|
14762 |
|
14763 | function enqueueUpdate(component) {
|
14764 | ensureInjected();
|
14765 |
|
14766 |
|
14767 |
|
14768 |
|
14769 |
|
14770 |
|
14771 |
|
14772 | if (!batchingStrategy.isBatchingUpdates) {
|
14773 | batchingStrategy.batchedUpdates(enqueueUpdate, component);
|
14774 | return;
|
14775 | }
|
14776 |
|
14777 | dirtyComponents.push(component);
|
14778 | if (component._updateBatchNumber == null) {
|
14779 | component._updateBatchNumber = updateBatchNumber + 1;
|
14780 | }
|
14781 | }
|
14782 |
|
14783 |
|
14784 |
|
14785 |
|
14786 |
|
14787 | function asap(callback, context) {
|
14788 | !batchingStrategy.isBatchingUpdates ? "development" !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
|
14789 | asapCallbackQueue.enqueue(callback, context);
|
14790 | asapEnqueued = true;
|
14791 | }
|
14792 |
|
14793 | var ReactUpdatesInjection = {
|
14794 | injectReconcileTransaction: function (ReconcileTransaction) {
|
14795 | !ReconcileTransaction ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
|
14796 | ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
|
14797 | },
|
14798 |
|
14799 | injectBatchingStrategy: function (_batchingStrategy) {
|
14800 | !_batchingStrategy ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
|
14801 | !(typeof _batchingStrategy.batchedUpdates === 'function') ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
|
14802 | !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
|
14803 | batchingStrategy = _batchingStrategy;
|
14804 | }
|
14805 | };
|
14806 |
|
14807 | var ReactUpdates = {
|
14808 | |
14809 |
|
14810 |
|
14811 |
|
14812 |
|
14813 |
|
14814 | ReactReconcileTransaction: null,
|
14815 |
|
14816 | batchedUpdates: batchedUpdates,
|
14817 | enqueueUpdate: enqueueUpdate,
|
14818 | flushBatchedUpdates: flushBatchedUpdates,
|
14819 | injection: ReactUpdatesInjection,
|
14820 | asap: asap
|
14821 | };
|
14822 |
|
14823 | module.exports = ReactUpdates;
|
14824 | },{"114":114,"140":140,"162":162,"172":172,"25":25,"5":5,"67":67,"88":88}],97:[function(_dereq_,module,exports){
|
14825 |
|
14826 |
|
14827 |
|
14828 |
|
14829 |
|
14830 |
|
14831 |
|
14832 |
|
14833 |
|
14834 |
|
14835 |
|
14836 | 'use strict';
|
14837 |
|
14838 | module.exports = '15.3.2';
|
14839 | },{}],98:[function(_dereq_,module,exports){
|
14840 |
|
14841 |
|
14842 |
|
14843 |
|
14844 |
|
14845 |
|
14846 |
|
14847 |
|
14848 |
|
14849 |
|
14850 |
|
14851 | 'use strict';
|
14852 |
|
14853 | var NS = {
|
14854 | xlink: 'http://www.w3.org/1999/xlink',
|
14855 | xml: 'http://www.w3.org/XML/1998/namespace'
|
14856 | };
|
14857 |
|
14858 |
|
14859 |
|
14860 |
|
14861 |
|
14862 |
|
14863 |
|
14864 |
|
14865 |
|
14866 |
|
14867 |
|
14868 |
|
14869 |
|
14870 |
|
14871 |
|
14872 |
|
14873 |
|
14874 |
|
14875 | var ATTRS = {
|
14876 | accentHeight: 'accent-height',
|
14877 | accumulate: 0,
|
14878 | additive: 0,
|
14879 | alignmentBaseline: 'alignment-baseline',
|
14880 | allowReorder: 'allowReorder',
|
14881 | alphabetic: 0,
|
14882 | amplitude: 0,
|
14883 | arabicForm: 'arabic-form',
|
14884 | ascent: 0,
|
14885 | attributeName: 'attributeName',
|
14886 | attributeType: 'attributeType',
|
14887 | autoReverse: 'autoReverse',
|
14888 | azimuth: 0,
|
14889 | baseFrequency: 'baseFrequency',
|
14890 | baseProfile: 'baseProfile',
|
14891 | baselineShift: 'baseline-shift',
|
14892 | bbox: 0,
|
14893 | begin: 0,
|
14894 | bias: 0,
|
14895 | by: 0,
|
14896 | calcMode: 'calcMode',
|
14897 | capHeight: 'cap-height',
|
14898 | clip: 0,
|
14899 | clipPath: 'clip-path',
|
14900 | clipRule: 'clip-rule',
|
14901 | clipPathUnits: 'clipPathUnits',
|
14902 | colorInterpolation: 'color-interpolation',
|
14903 | colorInterpolationFilters: 'color-interpolation-filters',
|
14904 | colorProfile: 'color-profile',
|
14905 | colorRendering: 'color-rendering',
|
14906 | contentScriptType: 'contentScriptType',
|
14907 | contentStyleType: 'contentStyleType',
|
14908 | cursor: 0,
|
14909 | cx: 0,
|
14910 | cy: 0,
|
14911 | d: 0,
|
14912 | decelerate: 0,
|
14913 | descent: 0,
|
14914 | diffuseConstant: 'diffuseConstant',
|
14915 | direction: 0,
|
14916 | display: 0,
|
14917 | divisor: 0,
|
14918 | dominantBaseline: 'dominant-baseline',
|
14919 | dur: 0,
|
14920 | dx: 0,
|
14921 | dy: 0,
|
14922 | edgeMode: 'edgeMode',
|
14923 | elevation: 0,
|
14924 | enableBackground: 'enable-background',
|
14925 | end: 0,
|
14926 | exponent: 0,
|
14927 | externalResourcesRequired: 'externalResourcesRequired',
|
14928 | fill: 0,
|
14929 | fillOpacity: 'fill-opacity',
|
14930 | fillRule: 'fill-rule',
|
14931 | filter: 0,
|
14932 | filterRes: 'filterRes',
|
14933 | filterUnits: 'filterUnits',
|
14934 | floodColor: 'flood-color',
|
14935 | floodOpacity: 'flood-opacity',
|
14936 | focusable: 0,
|
14937 | fontFamily: 'font-family',
|
14938 | fontSize: 'font-size',
|
14939 | fontSizeAdjust: 'font-size-adjust',
|
14940 | fontStretch: 'font-stretch',
|
14941 | fontStyle: 'font-style',
|
14942 | fontVariant: 'font-variant',
|
14943 | fontWeight: 'font-weight',
|
14944 | format: 0,
|
14945 | from: 0,
|
14946 | fx: 0,
|
14947 | fy: 0,
|
14948 | g1: 0,
|
14949 | g2: 0,
|
14950 | glyphName: 'glyph-name',
|
14951 | glyphOrientationHorizontal: 'glyph-orientation-horizontal',
|
14952 | glyphOrientationVertical: 'glyph-orientation-vertical',
|
14953 | glyphRef: 'glyphRef',
|
14954 | gradientTransform: 'gradientTransform',
|
14955 | gradientUnits: 'gradientUnits',
|
14956 | hanging: 0,
|
14957 | horizAdvX: 'horiz-adv-x',
|
14958 | horizOriginX: 'horiz-origin-x',
|
14959 | ideographic: 0,
|
14960 | imageRendering: 'image-rendering',
|
14961 | 'in': 0,
|
14962 | in2: 0,
|
14963 | intercept: 0,
|
14964 | k: 0,
|
14965 | k1: 0,
|
14966 | k2: 0,
|
14967 | k3: 0,
|
14968 | k4: 0,
|
14969 | kernelMatrix: 'kernelMatrix',
|
14970 | kernelUnitLength: 'kernelUnitLength',
|
14971 | kerning: 0,
|
14972 | keyPoints: 'keyPoints',
|
14973 | keySplines: 'keySplines',
|
14974 | keyTimes: 'keyTimes',
|
14975 | lengthAdjust: 'lengthAdjust',
|
14976 | letterSpacing: 'letter-spacing',
|
14977 | lightingColor: 'lighting-color',
|
14978 | limitingConeAngle: 'limitingConeAngle',
|
14979 | local: 0,
|
14980 | markerEnd: 'marker-end',
|
14981 | markerMid: 'marker-mid',
|
14982 | markerStart: 'marker-start',
|
14983 | markerHeight: 'markerHeight',
|
14984 | markerUnits: 'markerUnits',
|
14985 | markerWidth: 'markerWidth',
|
14986 | mask: 0,
|
14987 | maskContentUnits: 'maskContentUnits',
|
14988 | maskUnits: 'maskUnits',
|
14989 | mathematical: 0,
|
14990 | mode: 0,
|
14991 | numOctaves: 'numOctaves',
|
14992 | offset: 0,
|
14993 | opacity: 0,
|
14994 | operator: 0,
|
14995 | order: 0,
|
14996 | orient: 0,
|
14997 | orientation: 0,
|
14998 | origin: 0,
|
14999 | overflow: 0,
|
15000 | overlinePosition: 'overline-position',
|
15001 | overlineThickness: 'overline-thickness',
|
15002 | paintOrder: 'paint-order',
|
15003 | panose1: 'panose-1',
|
15004 | pathLength: 'pathLength',
|
15005 | patternContentUnits: 'patternContentUnits',
|
15006 | patternTransform: 'patternTransform',
|
15007 | patternUnits: 'patternUnits',
|
15008 | pointerEvents: 'pointer-events',
|
15009 | points: 0,
|
15010 | pointsAtX: 'pointsAtX',
|
15011 | pointsAtY: 'pointsAtY',
|
15012 | pointsAtZ: 'pointsAtZ',
|
15013 | preserveAlpha: 'preserveAlpha',
|
15014 | preserveAspectRatio: 'preserveAspectRatio',
|
15015 | primitiveUnits: 'primitiveUnits',
|
15016 | r: 0,
|
15017 | radius: 0,
|
15018 | refX: 'refX',
|
15019 | refY: 'refY',
|
15020 | renderingIntent: 'rendering-intent',
|
15021 | repeatCount: 'repeatCount',
|
15022 | repeatDur: 'repeatDur',
|
15023 | requiredExtensions: 'requiredExtensions',
|
15024 | requiredFeatures: 'requiredFeatures',
|
15025 | restart: 0,
|
15026 | result: 0,
|
15027 | rotate: 0,
|
15028 | rx: 0,
|
15029 | ry: 0,
|
15030 | scale: 0,
|
15031 | seed: 0,
|
15032 | shapeRendering: 'shape-rendering',
|
15033 | slope: 0,
|
15034 | spacing: 0,
|
15035 | specularConstant: 'specularConstant',
|
15036 | specularExponent: 'specularExponent',
|
15037 | speed: 0,
|
15038 | spreadMethod: 'spreadMethod',
|
15039 | startOffset: 'startOffset',
|
15040 | stdDeviation: 'stdDeviation',
|
15041 | stemh: 0,
|
15042 | stemv: 0,
|
15043 | stitchTiles: 'stitchTiles',
|
15044 | stopColor: 'stop-color',
|
15045 | stopOpacity: 'stop-opacity',
|
15046 | strikethroughPosition: 'strikethrough-position',
|
15047 | strikethroughThickness: 'strikethrough-thickness',
|
15048 | string: 0,
|
15049 | stroke: 0,
|
15050 | strokeDasharray: 'stroke-dasharray',
|
15051 | strokeDashoffset: 'stroke-dashoffset',
|
15052 | strokeLinecap: 'stroke-linecap',
|
15053 | strokeLinejoin: 'stroke-linejoin',
|
15054 | strokeMiterlimit: 'stroke-miterlimit',
|
15055 | strokeOpacity: 'stroke-opacity',
|
15056 | strokeWidth: 'stroke-width',
|
15057 | surfaceScale: 'surfaceScale',
|
15058 | systemLanguage: 'systemLanguage',
|
15059 | tableValues: 'tableValues',
|
15060 | targetX: 'targetX',
|
15061 | targetY: 'targetY',
|
15062 | textAnchor: 'text-anchor',
|
15063 | textDecoration: 'text-decoration',
|
15064 | textRendering: 'text-rendering',
|
15065 | textLength: 'textLength',
|
15066 | to: 0,
|
15067 | transform: 0,
|
15068 | u1: 0,
|
15069 | u2: 0,
|
15070 | underlinePosition: 'underline-position',
|
15071 | underlineThickness: 'underline-thickness',
|
15072 | unicode: 0,
|
15073 | unicodeBidi: 'unicode-bidi',
|
15074 | unicodeRange: 'unicode-range',
|
15075 | unitsPerEm: 'units-per-em',
|
15076 | vAlphabetic: 'v-alphabetic',
|
15077 | vHanging: 'v-hanging',
|
15078 | vIdeographic: 'v-ideographic',
|
15079 | vMathematical: 'v-mathematical',
|
15080 | values: 0,
|
15081 | vectorEffect: 'vector-effect',
|
15082 | version: 0,
|
15083 | vertAdvY: 'vert-adv-y',
|
15084 | vertOriginX: 'vert-origin-x',
|
15085 | vertOriginY: 'vert-origin-y',
|
15086 | viewBox: 'viewBox',
|
15087 | viewTarget: 'viewTarget',
|
15088 | visibility: 0,
|
15089 | widths: 0,
|
15090 | wordSpacing: 'word-spacing',
|
15091 | writingMode: 'writing-mode',
|
15092 | x: 0,
|
15093 | xHeight: 'x-height',
|
15094 | x1: 0,
|
15095 | x2: 0,
|
15096 | xChannelSelector: 'xChannelSelector',
|
15097 | xlinkActuate: 'xlink:actuate',
|
15098 | xlinkArcrole: 'xlink:arcrole',
|
15099 | xlinkHref: 'xlink:href',
|
15100 | xlinkRole: 'xlink:role',
|
15101 | xlinkShow: 'xlink:show',
|
15102 | xlinkTitle: 'xlink:title',
|
15103 | xlinkType: 'xlink:type',
|
15104 | xmlBase: 'xml:base',
|
15105 | xmlns: 0,
|
15106 | xmlnsXlink: 'xmlns:xlink',
|
15107 | xmlLang: 'xml:lang',
|
15108 | xmlSpace: 'xml:space',
|
15109 | y: 0,
|
15110 | y1: 0,
|
15111 | y2: 0,
|
15112 | yChannelSelector: 'yChannelSelector',
|
15113 | z: 0,
|
15114 | zoomAndPan: 'zoomAndPan'
|
15115 | };
|
15116 |
|
15117 | var SVGDOMPropertyConfig = {
|
15118 | Properties: {},
|
15119 | DOMAttributeNamespaces: {
|
15120 | xlinkActuate: NS.xlink,
|
15121 | xlinkArcrole: NS.xlink,
|
15122 | xlinkHref: NS.xlink,
|
15123 | xlinkRole: NS.xlink,
|
15124 | xlinkShow: NS.xlink,
|
15125 | xlinkTitle: NS.xlink,
|
15126 | xlinkType: NS.xlink,
|
15127 | xmlBase: NS.xml,
|
15128 | xmlLang: NS.xml,
|
15129 | xmlSpace: NS.xml
|
15130 | },
|
15131 | DOMAttributeNames: {}
|
15132 | };
|
15133 |
|
15134 | Object.keys(ATTRS).forEach(function (key) {
|
15135 | SVGDOMPropertyConfig.Properties[key] = 0;
|
15136 | if (ATTRS[key]) {
|
15137 | SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
|
15138 | }
|
15139 | });
|
15140 |
|
15141 | module.exports = SVGDOMPropertyConfig;
|
15142 | },{}],99:[function(_dereq_,module,exports){
|
15143 |
|
15144 |
|
15145 |
|
15146 |
|
15147 |
|
15148 |
|
15149 |
|
15150 |
|
15151 |
|
15152 |
|
15153 |
|
15154 | 'use strict';
|
15155 |
|
15156 | var EventConstants = _dereq_(16);
|
15157 | var EventPropagators = _dereq_(20);
|
15158 | var ExecutionEnvironment = _dereq_(148);
|
15159 | var ReactDOMComponentTree = _dereq_(42);
|
15160 | var ReactInputSelection = _dereq_(71);
|
15161 | var SyntheticEvent = _dereq_(105);
|
15162 |
|
15163 | var getActiveElement = _dereq_(157);
|
15164 | var isTextInputElement = _dereq_(137);
|
15165 | var keyOf = _dereq_(166);
|
15166 | var shallowEqual = _dereq_(170);
|
15167 |
|
15168 | var topLevelTypes = EventConstants.topLevelTypes;
|
15169 |
|
15170 | var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
|
15171 |
|
15172 | var eventTypes = {
|
15173 | select: {
|
15174 | phasedRegistrationNames: {
|
15175 | bubbled: keyOf({ onSelect: null }),
|
15176 | captured: keyOf({ onSelectCapture: null })
|
15177 | },
|
15178 | dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange]
|
15179 | }
|
15180 | };
|
15181 |
|
15182 | var activeElement = null;
|
15183 | var activeElementInst = null;
|
15184 | var lastSelection = null;
|
15185 | var mouseDown = false;
|
15186 |
|
15187 |
|
15188 |
|
15189 | var hasListener = false;
|
15190 | var ON_SELECT_KEY = keyOf({ onSelect: null });
|
15191 |
|
15192 |
|
15193 |
|
15194 |
|
15195 |
|
15196 |
|
15197 |
|
15198 |
|
15199 |
|
15200 |
|
15201 | function getSelection(node) {
|
15202 | if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
|
15203 | return {
|
15204 | start: node.selectionStart,
|
15205 | end: node.selectionEnd
|
15206 | };
|
15207 | } else if (window.getSelection) {
|
15208 | var selection = window.getSelection();
|
15209 | return {
|
15210 | anchorNode: selection.anchorNode,
|
15211 | anchorOffset: selection.anchorOffset,
|
15212 | focusNode: selection.focusNode,
|
15213 | focusOffset: selection.focusOffset
|
15214 | };
|
15215 | } else if (document.selection) {
|
15216 | var range = document.selection.createRange();
|
15217 | return {
|
15218 | parentElement: range.parentElement(),
|
15219 | text: range.text,
|
15220 | top: range.boundingTop,
|
15221 | left: range.boundingLeft
|
15222 | };
|
15223 | }
|
15224 | }
|
15225 |
|
15226 |
|
15227 |
|
15228 |
|
15229 |
|
15230 |
|
15231 |
|
15232 | function constructSelectEvent(nativeEvent, nativeEventTarget) {
|
15233 |
|
15234 |
|
15235 |
|
15236 |
|
15237 | if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
|
15238 | return null;
|
15239 | }
|
15240 |
|
15241 |
|
15242 | var currentSelection = getSelection(activeElement);
|
15243 | if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
|
15244 | lastSelection = currentSelection;
|
15245 |
|
15246 | var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
|
15247 |
|
15248 | syntheticEvent.type = 'select';
|
15249 | syntheticEvent.target = activeElement;
|
15250 |
|
15251 | EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
|
15252 |
|
15253 | return syntheticEvent;
|
15254 | }
|
15255 |
|
15256 | return null;
|
15257 | }
|
15258 |
|
15259 |
|
15260 |
|
15261 |
|
15262 |
|
15263 |
|
15264 |
|
15265 |
|
15266 |
|
15267 |
|
15268 |
|
15269 |
|
15270 |
|
15271 |
|
15272 |
|
15273 | var SelectEventPlugin = {
|
15274 |
|
15275 | eventTypes: eventTypes,
|
15276 |
|
15277 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
15278 | if (!hasListener) {
|
15279 | return null;
|
15280 | }
|
15281 |
|
15282 | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
|
15283 |
|
15284 | switch (topLevelType) {
|
15285 |
|
15286 | case topLevelTypes.topFocus:
|
15287 | if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
|
15288 | activeElement = targetNode;
|
15289 | activeElementInst = targetInst;
|
15290 | lastSelection = null;
|
15291 | }
|
15292 | break;
|
15293 | case topLevelTypes.topBlur:
|
15294 | activeElement = null;
|
15295 | activeElementInst = null;
|
15296 | lastSelection = null;
|
15297 | break;
|
15298 |
|
15299 |
|
15300 |
|
15301 | case topLevelTypes.topMouseDown:
|
15302 | mouseDown = true;
|
15303 | break;
|
15304 | case topLevelTypes.topContextMenu:
|
15305 | case topLevelTypes.topMouseUp:
|
15306 | mouseDown = false;
|
15307 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
15308 |
|
15309 |
|
15310 |
|
15311 |
|
15312 |
|
15313 |
|
15314 |
|
15315 |
|
15316 |
|
15317 |
|
15318 | case topLevelTypes.topSelectionChange:
|
15319 | if (skipSelectionChangeEvent) {
|
15320 | break;
|
15321 | }
|
15322 |
|
15323 | case topLevelTypes.topKeyDown:
|
15324 | case topLevelTypes.topKeyUp:
|
15325 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
15326 | }
|
15327 |
|
15328 | return null;
|
15329 | },
|
15330 |
|
15331 | didPutListener: function (inst, registrationName, listener) {
|
15332 | if (registrationName === ON_SELECT_KEY) {
|
15333 | hasListener = true;
|
15334 | }
|
15335 | }
|
15336 | };
|
15337 |
|
15338 | module.exports = SelectEventPlugin;
|
15339 | },{"105":105,"137":137,"148":148,"157":157,"16":16,"166":166,"170":170,"20":20,"42":42,"71":71}],100:[function(_dereq_,module,exports){
|
15340 |
|
15341 |
|
15342 |
|
15343 |
|
15344 |
|
15345 |
|
15346 |
|
15347 |
|
15348 |
|
15349 |
|
15350 |
|
15351 | 'use strict';
|
15352 |
|
15353 | var _prodInvariant = _dereq_(140);
|
15354 |
|
15355 | var EventConstants = _dereq_(16);
|
15356 | var EventListener = _dereq_(147);
|
15357 | var EventPropagators = _dereq_(20);
|
15358 | var ReactDOMComponentTree = _dereq_(42);
|
15359 | var SyntheticAnimationEvent = _dereq_(101);
|
15360 | var SyntheticClipboardEvent = _dereq_(102);
|
15361 | var SyntheticEvent = _dereq_(105);
|
15362 | var SyntheticFocusEvent = _dereq_(106);
|
15363 | var SyntheticKeyboardEvent = _dereq_(108);
|
15364 | var SyntheticMouseEvent = _dereq_(109);
|
15365 | var SyntheticDragEvent = _dereq_(104);
|
15366 | var SyntheticTouchEvent = _dereq_(110);
|
15367 | var SyntheticTransitionEvent = _dereq_(111);
|
15368 | var SyntheticUIEvent = _dereq_(112);
|
15369 | var SyntheticWheelEvent = _dereq_(113);
|
15370 |
|
15371 | var emptyFunction = _dereq_(154);
|
15372 | var getEventCharCode = _dereq_(126);
|
15373 | var invariant = _dereq_(162);
|
15374 | var keyOf = _dereq_(166);
|
15375 |
|
15376 | var topLevelTypes = EventConstants.topLevelTypes;
|
15377 |
|
15378 | var eventTypes = {
|
15379 | abort: {
|
15380 | phasedRegistrationNames: {
|
15381 | bubbled: keyOf({ onAbort: true }),
|
15382 | captured: keyOf({ onAbortCapture: true })
|
15383 | }
|
15384 | },
|
15385 | animationEnd: {
|
15386 | phasedRegistrationNames: {
|
15387 | bubbled: keyOf({ onAnimationEnd: true }),
|
15388 | captured: keyOf({ onAnimationEndCapture: true })
|
15389 | }
|
15390 | },
|
15391 | animationIteration: {
|
15392 | phasedRegistrationNames: {
|
15393 | bubbled: keyOf({ onAnimationIteration: true }),
|
15394 | captured: keyOf({ onAnimationIterationCapture: true })
|
15395 | }
|
15396 | },
|
15397 | animationStart: {
|
15398 | phasedRegistrationNames: {
|
15399 | bubbled: keyOf({ onAnimationStart: true }),
|
15400 | captured: keyOf({ onAnimationStartCapture: true })
|
15401 | }
|
15402 | },
|
15403 | blur: {
|
15404 | phasedRegistrationNames: {
|
15405 | bubbled: keyOf({ onBlur: true }),
|
15406 | captured: keyOf({ onBlurCapture: true })
|
15407 | }
|
15408 | },
|
15409 | canPlay: {
|
15410 | phasedRegistrationNames: {
|
15411 | bubbled: keyOf({ onCanPlay: true }),
|
15412 | captured: keyOf({ onCanPlayCapture: true })
|
15413 | }
|
15414 | },
|
15415 | canPlayThrough: {
|
15416 | phasedRegistrationNames: {
|
15417 | bubbled: keyOf({ onCanPlayThrough: true }),
|
15418 | captured: keyOf({ onCanPlayThroughCapture: true })
|
15419 | }
|
15420 | },
|
15421 | click: {
|
15422 | phasedRegistrationNames: {
|
15423 | bubbled: keyOf({ onClick: true }),
|
15424 | captured: keyOf({ onClickCapture: true })
|
15425 | }
|
15426 | },
|
15427 | contextMenu: {
|
15428 | phasedRegistrationNames: {
|
15429 | bubbled: keyOf({ onContextMenu: true }),
|
15430 | captured: keyOf({ onContextMenuCapture: true })
|
15431 | }
|
15432 | },
|
15433 | copy: {
|
15434 | phasedRegistrationNames: {
|
15435 | bubbled: keyOf({ onCopy: true }),
|
15436 | captured: keyOf({ onCopyCapture: true })
|
15437 | }
|
15438 | },
|
15439 | cut: {
|
15440 | phasedRegistrationNames: {
|
15441 | bubbled: keyOf({ onCut: true }),
|
15442 | captured: keyOf({ onCutCapture: true })
|
15443 | }
|
15444 | },
|
15445 | doubleClick: {
|
15446 | phasedRegistrationNames: {
|
15447 | bubbled: keyOf({ onDoubleClick: true }),
|
15448 | captured: keyOf({ onDoubleClickCapture: true })
|
15449 | }
|
15450 | },
|
15451 | drag: {
|
15452 | phasedRegistrationNames: {
|
15453 | bubbled: keyOf({ onDrag: true }),
|
15454 | captured: keyOf({ onDragCapture: true })
|
15455 | }
|
15456 | },
|
15457 | dragEnd: {
|
15458 | phasedRegistrationNames: {
|
15459 | bubbled: keyOf({ onDragEnd: true }),
|
15460 | captured: keyOf({ onDragEndCapture: true })
|
15461 | }
|
15462 | },
|
15463 | dragEnter: {
|
15464 | phasedRegistrationNames: {
|
15465 | bubbled: keyOf({ onDragEnter: true }),
|
15466 | captured: keyOf({ onDragEnterCapture: true })
|
15467 | }
|
15468 | },
|
15469 | dragExit: {
|
15470 | phasedRegistrationNames: {
|
15471 | bubbled: keyOf({ onDragExit: true }),
|
15472 | captured: keyOf({ onDragExitCapture: true })
|
15473 | }
|
15474 | },
|
15475 | dragLeave: {
|
15476 | phasedRegistrationNames: {
|
15477 | bubbled: keyOf({ onDragLeave: true }),
|
15478 | captured: keyOf({ onDragLeaveCapture: true })
|
15479 | }
|
15480 | },
|
15481 | dragOver: {
|
15482 | phasedRegistrationNames: {
|
15483 | bubbled: keyOf({ onDragOver: true }),
|
15484 | captured: keyOf({ onDragOverCapture: true })
|
15485 | }
|
15486 | },
|
15487 | dragStart: {
|
15488 | phasedRegistrationNames: {
|
15489 | bubbled: keyOf({ onDragStart: true }),
|
15490 | captured: keyOf({ onDragStartCapture: true })
|
15491 | }
|
15492 | },
|
15493 | drop: {
|
15494 | phasedRegistrationNames: {
|
15495 | bubbled: keyOf({ onDrop: true }),
|
15496 | captured: keyOf({ onDropCapture: true })
|
15497 | }
|
15498 | },
|
15499 | durationChange: {
|
15500 | phasedRegistrationNames: {
|
15501 | bubbled: keyOf({ onDurationChange: true }),
|
15502 | captured: keyOf({ onDurationChangeCapture: true })
|
15503 | }
|
15504 | },
|
15505 | emptied: {
|
15506 | phasedRegistrationNames: {
|
15507 | bubbled: keyOf({ onEmptied: true }),
|
15508 | captured: keyOf({ onEmptiedCapture: true })
|
15509 | }
|
15510 | },
|
15511 | encrypted: {
|
15512 | phasedRegistrationNames: {
|
15513 | bubbled: keyOf({ onEncrypted: true }),
|
15514 | captured: keyOf({ onEncryptedCapture: true })
|
15515 | }
|
15516 | },
|
15517 | ended: {
|
15518 | phasedRegistrationNames: {
|
15519 | bubbled: keyOf({ onEnded: true }),
|
15520 | captured: keyOf({ onEndedCapture: true })
|
15521 | }
|
15522 | },
|
15523 | error: {
|
15524 | phasedRegistrationNames: {
|
15525 | bubbled: keyOf({ onError: true }),
|
15526 | captured: keyOf({ onErrorCapture: true })
|
15527 | }
|
15528 | },
|
15529 | focus: {
|
15530 | phasedRegistrationNames: {
|
15531 | bubbled: keyOf({ onFocus: true }),
|
15532 | captured: keyOf({ onFocusCapture: true })
|
15533 | }
|
15534 | },
|
15535 | input: {
|
15536 | phasedRegistrationNames: {
|
15537 | bubbled: keyOf({ onInput: true }),
|
15538 | captured: keyOf({ onInputCapture: true })
|
15539 | }
|
15540 | },
|
15541 | invalid: {
|
15542 | phasedRegistrationNames: {
|
15543 | bubbled: keyOf({ onInvalid: true }),
|
15544 | captured: keyOf({ onInvalidCapture: true })
|
15545 | }
|
15546 | },
|
15547 | keyDown: {
|
15548 | phasedRegistrationNames: {
|
15549 | bubbled: keyOf({ onKeyDown: true }),
|
15550 | captured: keyOf({ onKeyDownCapture: true })
|
15551 | }
|
15552 | },
|
15553 | keyPress: {
|
15554 | phasedRegistrationNames: {
|
15555 | bubbled: keyOf({ onKeyPress: true }),
|
15556 | captured: keyOf({ onKeyPressCapture: true })
|
15557 | }
|
15558 | },
|
15559 | keyUp: {
|
15560 | phasedRegistrationNames: {
|
15561 | bubbled: keyOf({ onKeyUp: true }),
|
15562 | captured: keyOf({ onKeyUpCapture: true })
|
15563 | }
|
15564 | },
|
15565 | load: {
|
15566 | phasedRegistrationNames: {
|
15567 | bubbled: keyOf({ onLoad: true }),
|
15568 | captured: keyOf({ onLoadCapture: true })
|
15569 | }
|
15570 | },
|
15571 | loadedData: {
|
15572 | phasedRegistrationNames: {
|
15573 | bubbled: keyOf({ onLoadedData: true }),
|
15574 | captured: keyOf({ onLoadedDataCapture: true })
|
15575 | }
|
15576 | },
|
15577 | loadedMetadata: {
|
15578 | phasedRegistrationNames: {
|
15579 | bubbled: keyOf({ onLoadedMetadata: true }),
|
15580 | captured: keyOf({ onLoadedMetadataCapture: true })
|
15581 | }
|
15582 | },
|
15583 | loadStart: {
|
15584 | phasedRegistrationNames: {
|
15585 | bubbled: keyOf({ onLoadStart: true }),
|
15586 | captured: keyOf({ onLoadStartCapture: true })
|
15587 | }
|
15588 | },
|
15589 |
|
15590 |
|
15591 | mouseDown: {
|
15592 | phasedRegistrationNames: {
|
15593 | bubbled: keyOf({ onMouseDown: true }),
|
15594 | captured: keyOf({ onMouseDownCapture: true })
|
15595 | }
|
15596 | },
|
15597 | mouseMove: {
|
15598 | phasedRegistrationNames: {
|
15599 | bubbled: keyOf({ onMouseMove: true }),
|
15600 | captured: keyOf({ onMouseMoveCapture: true })
|
15601 | }
|
15602 | },
|
15603 | mouseOut: {
|
15604 | phasedRegistrationNames: {
|
15605 | bubbled: keyOf({ onMouseOut: true }),
|
15606 | captured: keyOf({ onMouseOutCapture: true })
|
15607 | }
|
15608 | },
|
15609 | mouseOver: {
|
15610 | phasedRegistrationNames: {
|
15611 | bubbled: keyOf({ onMouseOver: true }),
|
15612 | captured: keyOf({ onMouseOverCapture: true })
|
15613 | }
|
15614 | },
|
15615 | mouseUp: {
|
15616 | phasedRegistrationNames: {
|
15617 | bubbled: keyOf({ onMouseUp: true }),
|
15618 | captured: keyOf({ onMouseUpCapture: true })
|
15619 | }
|
15620 | },
|
15621 | paste: {
|
15622 | phasedRegistrationNames: {
|
15623 | bubbled: keyOf({ onPaste: true }),
|
15624 | captured: keyOf({ onPasteCapture: true })
|
15625 | }
|
15626 | },
|
15627 | pause: {
|
15628 | phasedRegistrationNames: {
|
15629 | bubbled: keyOf({ onPause: true }),
|
15630 | captured: keyOf({ onPauseCapture: true })
|
15631 | }
|
15632 | },
|
15633 | play: {
|
15634 | phasedRegistrationNames: {
|
15635 | bubbled: keyOf({ onPlay: true }),
|
15636 | captured: keyOf({ onPlayCapture: true })
|
15637 | }
|
15638 | },
|
15639 | playing: {
|
15640 | phasedRegistrationNames: {
|
15641 | bubbled: keyOf({ onPlaying: true }),
|
15642 | captured: keyOf({ onPlayingCapture: true })
|
15643 | }
|
15644 | },
|
15645 | progress: {
|
15646 | phasedRegistrationNames: {
|
15647 | bubbled: keyOf({ onProgress: true }),
|
15648 | captured: keyOf({ onProgressCapture: true })
|
15649 | }
|
15650 | },
|
15651 | rateChange: {
|
15652 | phasedRegistrationNames: {
|
15653 | bubbled: keyOf({ onRateChange: true }),
|
15654 | captured: keyOf({ onRateChangeCapture: true })
|
15655 | }
|
15656 | },
|
15657 | reset: {
|
15658 | phasedRegistrationNames: {
|
15659 | bubbled: keyOf({ onReset: true }),
|
15660 | captured: keyOf({ onResetCapture: true })
|
15661 | }
|
15662 | },
|
15663 | scroll: {
|
15664 | phasedRegistrationNames: {
|
15665 | bubbled: keyOf({ onScroll: true }),
|
15666 | captured: keyOf({ onScrollCapture: true })
|
15667 | }
|
15668 | },
|
15669 | seeked: {
|
15670 | phasedRegistrationNames: {
|
15671 | bubbled: keyOf({ onSeeked: true }),
|
15672 | captured: keyOf({ onSeekedCapture: true })
|
15673 | }
|
15674 | },
|
15675 | seeking: {
|
15676 | phasedRegistrationNames: {
|
15677 | bubbled: keyOf({ onSeeking: true }),
|
15678 | captured: keyOf({ onSeekingCapture: true })
|
15679 | }
|
15680 | },
|
15681 | stalled: {
|
15682 | phasedRegistrationNames: {
|
15683 | bubbled: keyOf({ onStalled: true }),
|
15684 | captured: keyOf({ onStalledCapture: true })
|
15685 | }
|
15686 | },
|
15687 | submit: {
|
15688 | phasedRegistrationNames: {
|
15689 | bubbled: keyOf({ onSubmit: true }),
|
15690 | captured: keyOf({ onSubmitCapture: true })
|
15691 | }
|
15692 | },
|
15693 | suspend: {
|
15694 | phasedRegistrationNames: {
|
15695 | bubbled: keyOf({ onSuspend: true }),
|
15696 | captured: keyOf({ onSuspendCapture: true })
|
15697 | }
|
15698 | },
|
15699 | timeUpdate: {
|
15700 | phasedRegistrationNames: {
|
15701 | bubbled: keyOf({ onTimeUpdate: true }),
|
15702 | captured: keyOf({ onTimeUpdateCapture: true })
|
15703 | }
|
15704 | },
|
15705 | touchCancel: {
|
15706 | phasedRegistrationNames: {
|
15707 | bubbled: keyOf({ onTouchCancel: true }),
|
15708 | captured: keyOf({ onTouchCancelCapture: true })
|
15709 | }
|
15710 | },
|
15711 | touchEnd: {
|
15712 | phasedRegistrationNames: {
|
15713 | bubbled: keyOf({ onTouchEnd: true }),
|
15714 | captured: keyOf({ onTouchEndCapture: true })
|
15715 | }
|
15716 | },
|
15717 | touchMove: {
|
15718 | phasedRegistrationNames: {
|
15719 | bubbled: keyOf({ onTouchMove: true }),
|
15720 | captured: keyOf({ onTouchMoveCapture: true })
|
15721 | }
|
15722 | },
|
15723 | touchStart: {
|
15724 | phasedRegistrationNames: {
|
15725 | bubbled: keyOf({ onTouchStart: true }),
|
15726 | captured: keyOf({ onTouchStartCapture: true })
|
15727 | }
|
15728 | },
|
15729 | transitionEnd: {
|
15730 | phasedRegistrationNames: {
|
15731 | bubbled: keyOf({ onTransitionEnd: true }),
|
15732 | captured: keyOf({ onTransitionEndCapture: true })
|
15733 | }
|
15734 | },
|
15735 | volumeChange: {
|
15736 | phasedRegistrationNames: {
|
15737 | bubbled: keyOf({ onVolumeChange: true }),
|
15738 | captured: keyOf({ onVolumeChangeCapture: true })
|
15739 | }
|
15740 | },
|
15741 | waiting: {
|
15742 | phasedRegistrationNames: {
|
15743 | bubbled: keyOf({ onWaiting: true }),
|
15744 | captured: keyOf({ onWaitingCapture: true })
|
15745 | }
|
15746 | },
|
15747 | wheel: {
|
15748 | phasedRegistrationNames: {
|
15749 | bubbled: keyOf({ onWheel: true }),
|
15750 | captured: keyOf({ onWheelCapture: true })
|
15751 | }
|
15752 | }
|
15753 | };
|
15754 |
|
15755 | var topLevelEventsToDispatchConfig = {
|
15756 | topAbort: eventTypes.abort,
|
15757 | topAnimationEnd: eventTypes.animationEnd,
|
15758 | topAnimationIteration: eventTypes.animationIteration,
|
15759 | topAnimationStart: eventTypes.animationStart,
|
15760 | topBlur: eventTypes.blur,
|
15761 | topCanPlay: eventTypes.canPlay,
|
15762 | topCanPlayThrough: eventTypes.canPlayThrough,
|
15763 | topClick: eventTypes.click,
|
15764 | topContextMenu: eventTypes.contextMenu,
|
15765 | topCopy: eventTypes.copy,
|
15766 | topCut: eventTypes.cut,
|
15767 | topDoubleClick: eventTypes.doubleClick,
|
15768 | topDrag: eventTypes.drag,
|
15769 | topDragEnd: eventTypes.dragEnd,
|
15770 | topDragEnter: eventTypes.dragEnter,
|
15771 | topDragExit: eventTypes.dragExit,
|
15772 | topDragLeave: eventTypes.dragLeave,
|
15773 | topDragOver: eventTypes.dragOver,
|
15774 | topDragStart: eventTypes.dragStart,
|
15775 | topDrop: eventTypes.drop,
|
15776 | topDurationChange: eventTypes.durationChange,
|
15777 | topEmptied: eventTypes.emptied,
|
15778 | topEncrypted: eventTypes.encrypted,
|
15779 | topEnded: eventTypes.ended,
|
15780 | topError: eventTypes.error,
|
15781 | topFocus: eventTypes.focus,
|
15782 | topInput: eventTypes.input,
|
15783 | topInvalid: eventTypes.invalid,
|
15784 | topKeyDown: eventTypes.keyDown,
|
15785 | topKeyPress: eventTypes.keyPress,
|
15786 | topKeyUp: eventTypes.keyUp,
|
15787 | topLoad: eventTypes.load,
|
15788 | topLoadedData: eventTypes.loadedData,
|
15789 | topLoadedMetadata: eventTypes.loadedMetadata,
|
15790 | topLoadStart: eventTypes.loadStart,
|
15791 | topMouseDown: eventTypes.mouseDown,
|
15792 | topMouseMove: eventTypes.mouseMove,
|
15793 | topMouseOut: eventTypes.mouseOut,
|
15794 | topMouseOver: eventTypes.mouseOver,
|
15795 | topMouseUp: eventTypes.mouseUp,
|
15796 | topPaste: eventTypes.paste,
|
15797 | topPause: eventTypes.pause,
|
15798 | topPlay: eventTypes.play,
|
15799 | topPlaying: eventTypes.playing,
|
15800 | topProgress: eventTypes.progress,
|
15801 | topRateChange: eventTypes.rateChange,
|
15802 | topReset: eventTypes.reset,
|
15803 | topScroll: eventTypes.scroll,
|
15804 | topSeeked: eventTypes.seeked,
|
15805 | topSeeking: eventTypes.seeking,
|
15806 | topStalled: eventTypes.stalled,
|
15807 | topSubmit: eventTypes.submit,
|
15808 | topSuspend: eventTypes.suspend,
|
15809 | topTimeUpdate: eventTypes.timeUpdate,
|
15810 | topTouchCancel: eventTypes.touchCancel,
|
15811 | topTouchEnd: eventTypes.touchEnd,
|
15812 | topTouchMove: eventTypes.touchMove,
|
15813 | topTouchStart: eventTypes.touchStart,
|
15814 | topTransitionEnd: eventTypes.transitionEnd,
|
15815 | topVolumeChange: eventTypes.volumeChange,
|
15816 | topWaiting: eventTypes.waiting,
|
15817 | topWheel: eventTypes.wheel
|
15818 | };
|
15819 |
|
15820 | for (var type in topLevelEventsToDispatchConfig) {
|
15821 | topLevelEventsToDispatchConfig[type].dependencies = [type];
|
15822 | }
|
15823 |
|
15824 | var ON_CLICK_KEY = keyOf({ onClick: null });
|
15825 | var onClickListeners = {};
|
15826 |
|
15827 | function getDictionaryKey(inst) {
|
15828 |
|
15829 |
|
15830 | return '.' + inst._rootNodeID;
|
15831 | }
|
15832 |
|
15833 | var SimpleEventPlugin = {
|
15834 |
|
15835 | eventTypes: eventTypes,
|
15836 |
|
15837 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
15838 | var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
|
15839 | if (!dispatchConfig) {
|
15840 | return null;
|
15841 | }
|
15842 | var EventConstructor;
|
15843 | switch (topLevelType) {
|
15844 | case topLevelTypes.topAbort:
|
15845 | case topLevelTypes.topCanPlay:
|
15846 | case topLevelTypes.topCanPlayThrough:
|
15847 | case topLevelTypes.topDurationChange:
|
15848 | case topLevelTypes.topEmptied:
|
15849 | case topLevelTypes.topEncrypted:
|
15850 | case topLevelTypes.topEnded:
|
15851 | case topLevelTypes.topError:
|
15852 | case topLevelTypes.topInput:
|
15853 | case topLevelTypes.topInvalid:
|
15854 | case topLevelTypes.topLoad:
|
15855 | case topLevelTypes.topLoadedData:
|
15856 | case topLevelTypes.topLoadedMetadata:
|
15857 | case topLevelTypes.topLoadStart:
|
15858 | case topLevelTypes.topPause:
|
15859 | case topLevelTypes.topPlay:
|
15860 | case topLevelTypes.topPlaying:
|
15861 | case topLevelTypes.topProgress:
|
15862 | case topLevelTypes.topRateChange:
|
15863 | case topLevelTypes.topReset:
|
15864 | case topLevelTypes.topSeeked:
|
15865 | case topLevelTypes.topSeeking:
|
15866 | case topLevelTypes.topStalled:
|
15867 | case topLevelTypes.topSubmit:
|
15868 | case topLevelTypes.topSuspend:
|
15869 | case topLevelTypes.topTimeUpdate:
|
15870 | case topLevelTypes.topVolumeChange:
|
15871 | case topLevelTypes.topWaiting:
|
15872 |
|
15873 |
|
15874 | EventConstructor = SyntheticEvent;
|
15875 | break;
|
15876 | case topLevelTypes.topKeyPress:
|
15877 |
|
15878 |
|
15879 |
|
15880 | if (getEventCharCode(nativeEvent) === 0) {
|
15881 | return null;
|
15882 | }
|
15883 |
|
15884 | case topLevelTypes.topKeyDown:
|
15885 | case topLevelTypes.topKeyUp:
|
15886 | EventConstructor = SyntheticKeyboardEvent;
|
15887 | break;
|
15888 | case topLevelTypes.topBlur:
|
15889 | case topLevelTypes.topFocus:
|
15890 | EventConstructor = SyntheticFocusEvent;
|
15891 | break;
|
15892 | case topLevelTypes.topClick:
|
15893 |
|
15894 |
|
15895 | if (nativeEvent.button === 2) {
|
15896 | return null;
|
15897 | }
|
15898 |
|
15899 | case topLevelTypes.topContextMenu:
|
15900 | case topLevelTypes.topDoubleClick:
|
15901 | case topLevelTypes.topMouseDown:
|
15902 | case topLevelTypes.topMouseMove:
|
15903 | case topLevelTypes.topMouseOut:
|
15904 | case topLevelTypes.topMouseOver:
|
15905 | case topLevelTypes.topMouseUp:
|
15906 | EventConstructor = SyntheticMouseEvent;
|
15907 | break;
|
15908 | case topLevelTypes.topDrag:
|
15909 | case topLevelTypes.topDragEnd:
|
15910 | case topLevelTypes.topDragEnter:
|
15911 | case topLevelTypes.topDragExit:
|
15912 | case topLevelTypes.topDragLeave:
|
15913 | case topLevelTypes.topDragOver:
|
15914 | case topLevelTypes.topDragStart:
|
15915 | case topLevelTypes.topDrop:
|
15916 | EventConstructor = SyntheticDragEvent;
|
15917 | break;
|
15918 | case topLevelTypes.topTouchCancel:
|
15919 | case topLevelTypes.topTouchEnd:
|
15920 | case topLevelTypes.topTouchMove:
|
15921 | case topLevelTypes.topTouchStart:
|
15922 | EventConstructor = SyntheticTouchEvent;
|
15923 | break;
|
15924 | case topLevelTypes.topAnimationEnd:
|
15925 | case topLevelTypes.topAnimationIteration:
|
15926 | case topLevelTypes.topAnimationStart:
|
15927 | EventConstructor = SyntheticAnimationEvent;
|
15928 | break;
|
15929 | case topLevelTypes.topTransitionEnd:
|
15930 | EventConstructor = SyntheticTransitionEvent;
|
15931 | break;
|
15932 | case topLevelTypes.topScroll:
|
15933 | EventConstructor = SyntheticUIEvent;
|
15934 | break;
|
15935 | case topLevelTypes.topWheel:
|
15936 | EventConstructor = SyntheticWheelEvent;
|
15937 | break;
|
15938 | case topLevelTypes.topCopy:
|
15939 | case topLevelTypes.topCut:
|
15940 | case topLevelTypes.topPaste:
|
15941 | EventConstructor = SyntheticClipboardEvent;
|
15942 | break;
|
15943 | }
|
15944 | !EventConstructor ? "development" !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
|
15945 | var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
|
15946 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
15947 | return event;
|
15948 | },
|
15949 |
|
15950 | didPutListener: function (inst, registrationName, listener) {
|
15951 |
|
15952 |
|
15953 |
|
15954 |
|
15955 | if (registrationName === ON_CLICK_KEY) {
|
15956 | var key = getDictionaryKey(inst);
|
15957 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
15958 | if (!onClickListeners[key]) {
|
15959 | onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
|
15960 | }
|
15961 | }
|
15962 | },
|
15963 |
|
15964 | willDeleteListener: function (inst, registrationName) {
|
15965 | if (registrationName === ON_CLICK_KEY) {
|
15966 | var key = getDictionaryKey(inst);
|
15967 | onClickListeners[key].remove();
|
15968 | delete onClickListeners[key];
|
15969 | }
|
15970 | }
|
15971 |
|
15972 | };
|
15973 |
|
15974 | module.exports = SimpleEventPlugin;
|
15975 | },{"101":101,"102":102,"104":104,"105":105,"106":106,"108":108,"109":109,"110":110,"111":111,"112":112,"113":113,"126":126,"140":140,"147":147,"154":154,"16":16,"162":162,"166":166,"20":20,"42":42}],101:[function(_dereq_,module,exports){
|
15976 |
|
15977 |
|
15978 |
|
15979 |
|
15980 |
|
15981 |
|
15982 |
|
15983 |
|
15984 |
|
15985 |
|
15986 |
|
15987 | 'use strict';
|
15988 |
|
15989 | var SyntheticEvent = _dereq_(105);
|
15990 |
|
15991 |
|
15992 |
|
15993 |
|
15994 |
|
15995 |
|
15996 | var AnimationEventInterface = {
|
15997 | animationName: null,
|
15998 | elapsedTime: null,
|
15999 | pseudoElement: null
|
16000 | };
|
16001 |
|
16002 |
|
16003 |
|
16004 |
|
16005 |
|
16006 |
|
16007 |
|
16008 | function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16009 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16010 | }
|
16011 |
|
16012 | SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
|
16013 |
|
16014 | module.exports = SyntheticAnimationEvent;
|
16015 | },{"105":105}],102:[function(_dereq_,module,exports){
|
16016 |
|
16017 |
|
16018 |
|
16019 |
|
16020 |
|
16021 |
|
16022 |
|
16023 |
|
16024 |
|
16025 |
|
16026 |
|
16027 | 'use strict';
|
16028 |
|
16029 | var SyntheticEvent = _dereq_(105);
|
16030 |
|
16031 |
|
16032 |
|
16033 |
|
16034 |
|
16035 | var ClipboardEventInterface = {
|
16036 | clipboardData: function (event) {
|
16037 | return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
|
16038 | }
|
16039 | };
|
16040 |
|
16041 |
|
16042 |
|
16043 |
|
16044 |
|
16045 |
|
16046 |
|
16047 | function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16048 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16049 | }
|
16050 |
|
16051 | SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
|
16052 |
|
16053 | module.exports = SyntheticClipboardEvent;
|
16054 | },{"105":105}],103:[function(_dereq_,module,exports){
|
16055 |
|
16056 |
|
16057 |
|
16058 |
|
16059 |
|
16060 |
|
16061 |
|
16062 |
|
16063 |
|
16064 |
|
16065 |
|
16066 | 'use strict';
|
16067 |
|
16068 | var SyntheticEvent = _dereq_(105);
|
16069 |
|
16070 |
|
16071 |
|
16072 |
|
16073 |
|
16074 | var CompositionEventInterface = {
|
16075 | data: null
|
16076 | };
|
16077 |
|
16078 |
|
16079 |
|
16080 |
|
16081 |
|
16082 |
|
16083 |
|
16084 | function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16085 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16086 | }
|
16087 |
|
16088 | SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
|
16089 |
|
16090 | module.exports = SyntheticCompositionEvent;
|
16091 | },{"105":105}],104:[function(_dereq_,module,exports){
|
16092 |
|
16093 |
|
16094 |
|
16095 |
|
16096 |
|
16097 |
|
16098 |
|
16099 |
|
16100 |
|
16101 |
|
16102 |
|
16103 | 'use strict';
|
16104 |
|
16105 | var SyntheticMouseEvent = _dereq_(109);
|
16106 |
|
16107 |
|
16108 |
|
16109 |
|
16110 |
|
16111 | var DragEventInterface = {
|
16112 | dataTransfer: null
|
16113 | };
|
16114 |
|
16115 |
|
16116 |
|
16117 |
|
16118 |
|
16119 |
|
16120 |
|
16121 | function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16122 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16123 | }
|
16124 |
|
16125 | SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
|
16126 |
|
16127 | module.exports = SyntheticDragEvent;
|
16128 | },{"109":109}],105:[function(_dereq_,module,exports){
|
16129 |
|
16130 |
|
16131 |
|
16132 |
|
16133 |
|
16134 |
|
16135 |
|
16136 |
|
16137 |
|
16138 |
|
16139 |
|
16140 | 'use strict';
|
16141 |
|
16142 | var _assign = _dereq_(172);
|
16143 |
|
16144 | var PooledClass = _dereq_(25);
|
16145 |
|
16146 | var emptyFunction = _dereq_(154);
|
16147 | var warning = _dereq_(171);
|
16148 |
|
16149 | var didWarnForAddedNewProperty = false;
|
16150 | var isProxySupported = typeof Proxy === 'function';
|
16151 |
|
16152 | var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
|
16153 |
|
16154 |
|
16155 |
|
16156 |
|
16157 |
|
16158 | var EventInterface = {
|
16159 | type: null,
|
16160 | target: null,
|
16161 |
|
16162 | currentTarget: emptyFunction.thatReturnsNull,
|
16163 | eventPhase: null,
|
16164 | bubbles: null,
|
16165 | cancelable: null,
|
16166 | timeStamp: function (event) {
|
16167 | return event.timeStamp || Date.now();
|
16168 | },
|
16169 | defaultPrevented: null,
|
16170 | isTrusted: null
|
16171 | };
|
16172 |
|
16173 |
|
16174 |
|
16175 |
|
16176 |
|
16177 |
|
16178 |
|
16179 |
|
16180 |
|
16181 |
|
16182 |
|
16183 |
|
16184 |
|
16185 |
|
16186 |
|
16187 |
|
16188 |
|
16189 |
|
16190 |
|
16191 | function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
|
16192 | if ("development" !== 'production') {
|
16193 |
|
16194 | delete this.nativeEvent;
|
16195 | delete this.preventDefault;
|
16196 | delete this.stopPropagation;
|
16197 | }
|
16198 |
|
16199 | this.dispatchConfig = dispatchConfig;
|
16200 | this._targetInst = targetInst;
|
16201 | this.nativeEvent = nativeEvent;
|
16202 |
|
16203 | var Interface = this.constructor.Interface;
|
16204 | for (var propName in Interface) {
|
16205 | if (!Interface.hasOwnProperty(propName)) {
|
16206 | continue;
|
16207 | }
|
16208 | if ("development" !== 'production') {
|
16209 | delete this[propName];
|
16210 | }
|
16211 | var normalize = Interface[propName];
|
16212 | if (normalize) {
|
16213 | this[propName] = normalize(nativeEvent);
|
16214 | } else {
|
16215 | if (propName === 'target') {
|
16216 | this.target = nativeEventTarget;
|
16217 | } else {
|
16218 | this[propName] = nativeEvent[propName];
|
16219 | }
|
16220 | }
|
16221 | }
|
16222 |
|
16223 | var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
|
16224 | if (defaultPrevented) {
|
16225 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
16226 | } else {
|
16227 | this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
|
16228 | }
|
16229 | this.isPropagationStopped = emptyFunction.thatReturnsFalse;
|
16230 | return this;
|
16231 | }
|
16232 |
|
16233 | _assign(SyntheticEvent.prototype, {
|
16234 |
|
16235 | preventDefault: function () {
|
16236 | this.defaultPrevented = true;
|
16237 | var event = this.nativeEvent;
|
16238 | if (!event) {
|
16239 | return;
|
16240 | }
|
16241 |
|
16242 | if (event.preventDefault) {
|
16243 | event.preventDefault();
|
16244 | } else if (typeof event.returnValue !== 'unknown') {
|
16245 |
|
16246 | event.returnValue = false;
|
16247 | }
|
16248 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
16249 | },
|
16250 |
|
16251 | stopPropagation: function () {
|
16252 | var event = this.nativeEvent;
|
16253 | if (!event) {
|
16254 | return;
|
16255 | }
|
16256 |
|
16257 | if (event.stopPropagation) {
|
16258 | event.stopPropagation();
|
16259 | } else if (typeof event.cancelBubble !== 'unknown') {
|
16260 |
|
16261 |
|
16262 |
|
16263 |
|
16264 |
|
16265 |
|
16266 | event.cancelBubble = true;
|
16267 | }
|
16268 |
|
16269 | this.isPropagationStopped = emptyFunction.thatReturnsTrue;
|
16270 | },
|
16271 |
|
16272 | |
16273 |
|
16274 |
|
16275 |
|
16276 |
|
16277 | persist: function () {
|
16278 | this.isPersistent = emptyFunction.thatReturnsTrue;
|
16279 | },
|
16280 |
|
16281 | |
16282 |
|
16283 |
|
16284 |
|
16285 |
|
16286 | isPersistent: emptyFunction.thatReturnsFalse,
|
16287 |
|
16288 | |
16289 |
|
16290 |
|
16291 | destructor: function () {
|
16292 | var Interface = this.constructor.Interface;
|
16293 | for (var propName in Interface) {
|
16294 | if ("development" !== 'production') {
|
16295 | Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
|
16296 | } else {
|
16297 | this[propName] = null;
|
16298 | }
|
16299 | }
|
16300 | for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
|
16301 | this[shouldBeReleasedProperties[i]] = null;
|
16302 | }
|
16303 | if ("development" !== 'production') {
|
16304 | Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
|
16305 | Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
|
16306 | Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
|
16307 | }
|
16308 | }
|
16309 |
|
16310 | });
|
16311 |
|
16312 | SyntheticEvent.Interface = EventInterface;
|
16313 |
|
16314 | if ("development" !== 'production') {
|
16315 | if (isProxySupported) {
|
16316 |
|
16317 | SyntheticEvent = new Proxy(SyntheticEvent, {
|
16318 | construct: function (target, args) {
|
16319 | return this.apply(target, Object.create(target.prototype), args);
|
16320 | },
|
16321 | apply: function (constructor, that, args) {
|
16322 | return new Proxy(constructor.apply(that, args), {
|
16323 | set: function (target, prop, value) {
|
16324 | if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
|
16325 | "development" !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
|
16326 | didWarnForAddedNewProperty = true;
|
16327 | }
|
16328 | target[prop] = value;
|
16329 | return true;
|
16330 | }
|
16331 | });
|
16332 | }
|
16333 | });
|
16334 |
|
16335 | }
|
16336 | }
|
16337 |
|
16338 |
|
16339 |
|
16340 |
|
16341 |
|
16342 |
|
16343 | SyntheticEvent.augmentClass = function (Class, Interface) {
|
16344 | var Super = this;
|
16345 |
|
16346 | var E = function () {};
|
16347 | E.prototype = Super.prototype;
|
16348 | var prototype = new E();
|
16349 |
|
16350 | _assign(prototype, Class.prototype);
|
16351 | Class.prototype = prototype;
|
16352 | Class.prototype.constructor = Class;
|
16353 |
|
16354 | Class.Interface = _assign({}, Super.Interface, Interface);
|
16355 | Class.augmentClass = Super.augmentClass;
|
16356 |
|
16357 | PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
|
16358 | };
|
16359 |
|
16360 | PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
|
16361 |
|
16362 | module.exports = SyntheticEvent;
|
16363 |
|
16364 |
|
16365 |
|
16366 |
|
16367 |
|
16368 |
|
16369 |
|
16370 |
|
16371 | function getPooledWarningPropertyDefinition(propName, getVal) {
|
16372 | var isFunction = typeof getVal === 'function';
|
16373 | return {
|
16374 | configurable: true,
|
16375 | set: set,
|
16376 | get: get
|
16377 | };
|
16378 |
|
16379 | function set(val) {
|
16380 | var action = isFunction ? 'setting the method' : 'setting the property';
|
16381 | warn(action, 'This is effectively a no-op');
|
16382 | return val;
|
16383 | }
|
16384 |
|
16385 | function get() {
|
16386 | var action = isFunction ? 'accessing the method' : 'accessing the property';
|
16387 | var result = isFunction ? 'This is a no-op function' : 'This is set to null';
|
16388 | warn(action, result);
|
16389 | return getVal;
|
16390 | }
|
16391 |
|
16392 | function warn(action, result) {
|
16393 | var warningCondition = false;
|
16394 | "development" !== 'production' ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
|
16395 | }
|
16396 | }
|
16397 | },{"154":154,"171":171,"172":172,"25":25}],106:[function(_dereq_,module,exports){
|
16398 |
|
16399 |
|
16400 |
|
16401 |
|
16402 |
|
16403 |
|
16404 |
|
16405 |
|
16406 |
|
16407 |
|
16408 |
|
16409 | 'use strict';
|
16410 |
|
16411 | var SyntheticUIEvent = _dereq_(112);
|
16412 |
|
16413 |
|
16414 |
|
16415 |
|
16416 |
|
16417 | var FocusEventInterface = {
|
16418 | relatedTarget: null
|
16419 | };
|
16420 |
|
16421 |
|
16422 |
|
16423 |
|
16424 |
|
16425 |
|
16426 |
|
16427 | function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16428 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16429 | }
|
16430 |
|
16431 | SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
|
16432 |
|
16433 | module.exports = SyntheticFocusEvent;
|
16434 | },{"112":112}],107:[function(_dereq_,module,exports){
|
16435 |
|
16436 |
|
16437 |
|
16438 |
|
16439 |
|
16440 |
|
16441 |
|
16442 |
|
16443 |
|
16444 |
|
16445 |
|
16446 | 'use strict';
|
16447 |
|
16448 | var SyntheticEvent = _dereq_(105);
|
16449 |
|
16450 |
|
16451 |
|
16452 |
|
16453 |
|
16454 |
|
16455 | var InputEventInterface = {
|
16456 | data: null
|
16457 | };
|
16458 |
|
16459 |
|
16460 |
|
16461 |
|
16462 |
|
16463 |
|
16464 |
|
16465 | function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16466 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16467 | }
|
16468 |
|
16469 | SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
|
16470 |
|
16471 | module.exports = SyntheticInputEvent;
|
16472 | },{"105":105}],108:[function(_dereq_,module,exports){
|
16473 |
|
16474 |
|
16475 |
|
16476 |
|
16477 |
|
16478 |
|
16479 |
|
16480 |
|
16481 |
|
16482 |
|
16483 |
|
16484 | 'use strict';
|
16485 |
|
16486 | var SyntheticUIEvent = _dereq_(112);
|
16487 |
|
16488 | var getEventCharCode = _dereq_(126);
|
16489 | var getEventKey = _dereq_(127);
|
16490 | var getEventModifierState = _dereq_(128);
|
16491 |
|
16492 |
|
16493 |
|
16494 |
|
16495 |
|
16496 | var KeyboardEventInterface = {
|
16497 | key: getEventKey,
|
16498 | location: null,
|
16499 | ctrlKey: null,
|
16500 | shiftKey: null,
|
16501 | altKey: null,
|
16502 | metaKey: null,
|
16503 | repeat: null,
|
16504 | locale: null,
|
16505 | getModifierState: getEventModifierState,
|
16506 |
|
16507 | charCode: function (event) {
|
16508 |
|
16509 |
|
16510 |
|
16511 |
|
16512 |
|
16513 | if (event.type === 'keypress') {
|
16514 | return getEventCharCode(event);
|
16515 | }
|
16516 | return 0;
|
16517 | },
|
16518 | keyCode: function (event) {
|
16519 |
|
16520 |
|
16521 |
|
16522 |
|
16523 |
|
16524 |
|
16525 |
|
16526 | if (event.type === 'keydown' || event.type === 'keyup') {
|
16527 | return event.keyCode;
|
16528 | }
|
16529 | return 0;
|
16530 | },
|
16531 | which: function (event) {
|
16532 |
|
16533 |
|
16534 | if (event.type === 'keypress') {
|
16535 | return getEventCharCode(event);
|
16536 | }
|
16537 | if (event.type === 'keydown' || event.type === 'keyup') {
|
16538 | return event.keyCode;
|
16539 | }
|
16540 | return 0;
|
16541 | }
|
16542 | };
|
16543 |
|
16544 |
|
16545 |
|
16546 |
|
16547 |
|
16548 |
|
16549 |
|
16550 | function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16551 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16552 | }
|
16553 |
|
16554 | SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
|
16555 |
|
16556 | module.exports = SyntheticKeyboardEvent;
|
16557 | },{"112":112,"126":126,"127":127,"128":128}],109:[function(_dereq_,module,exports){
|
16558 |
|
16559 |
|
16560 |
|
16561 |
|
16562 |
|
16563 |
|
16564 |
|
16565 |
|
16566 |
|
16567 |
|
16568 |
|
16569 | 'use strict';
|
16570 |
|
16571 | var SyntheticUIEvent = _dereq_(112);
|
16572 | var ViewportMetrics = _dereq_(115);
|
16573 |
|
16574 | var getEventModifierState = _dereq_(128);
|
16575 |
|
16576 |
|
16577 |
|
16578 |
|
16579 |
|
16580 | var MouseEventInterface = {
|
16581 | screenX: null,
|
16582 | screenY: null,
|
16583 | clientX: null,
|
16584 | clientY: null,
|
16585 | ctrlKey: null,
|
16586 | shiftKey: null,
|
16587 | altKey: null,
|
16588 | metaKey: null,
|
16589 | getModifierState: getEventModifierState,
|
16590 | button: function (event) {
|
16591 |
|
16592 |
|
16593 |
|
16594 | var button = event.button;
|
16595 | if ('which' in event) {
|
16596 | return button;
|
16597 | }
|
16598 |
|
16599 |
|
16600 |
|
16601 |
|
16602 | return button === 2 ? 2 : button === 4 ? 1 : 0;
|
16603 | },
|
16604 | buttons: null,
|
16605 | relatedTarget: function (event) {
|
16606 | return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
|
16607 | },
|
16608 |
|
16609 | pageX: function (event) {
|
16610 | return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
|
16611 | },
|
16612 | pageY: function (event) {
|
16613 | return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
|
16614 | }
|
16615 | };
|
16616 |
|
16617 |
|
16618 |
|
16619 |
|
16620 |
|
16621 |
|
16622 |
|
16623 | function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16624 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16625 | }
|
16626 |
|
16627 | SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
|
16628 |
|
16629 | module.exports = SyntheticMouseEvent;
|
16630 | },{"112":112,"115":115,"128":128}],110:[function(_dereq_,module,exports){
|
16631 |
|
16632 |
|
16633 |
|
16634 |
|
16635 |
|
16636 |
|
16637 |
|
16638 |
|
16639 |
|
16640 |
|
16641 |
|
16642 | 'use strict';
|
16643 |
|
16644 | var SyntheticUIEvent = _dereq_(112);
|
16645 |
|
16646 | var getEventModifierState = _dereq_(128);
|
16647 |
|
16648 |
|
16649 |
|
16650 |
|
16651 |
|
16652 | var TouchEventInterface = {
|
16653 | touches: null,
|
16654 | targetTouches: null,
|
16655 | changedTouches: null,
|
16656 | altKey: null,
|
16657 | metaKey: null,
|
16658 | ctrlKey: null,
|
16659 | shiftKey: null,
|
16660 | getModifierState: getEventModifierState
|
16661 | };
|
16662 |
|
16663 |
|
16664 |
|
16665 |
|
16666 |
|
16667 |
|
16668 |
|
16669 | function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16670 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16671 | }
|
16672 |
|
16673 | SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
|
16674 |
|
16675 | module.exports = SyntheticTouchEvent;
|
16676 | },{"112":112,"128":128}],111:[function(_dereq_,module,exports){
|
16677 |
|
16678 |
|
16679 |
|
16680 |
|
16681 |
|
16682 |
|
16683 |
|
16684 |
|
16685 |
|
16686 |
|
16687 |
|
16688 | 'use strict';
|
16689 |
|
16690 | var SyntheticEvent = _dereq_(105);
|
16691 |
|
16692 |
|
16693 |
|
16694 |
|
16695 |
|
16696 |
|
16697 | var TransitionEventInterface = {
|
16698 | propertyName: null,
|
16699 | elapsedTime: null,
|
16700 | pseudoElement: null
|
16701 | };
|
16702 |
|
16703 |
|
16704 |
|
16705 |
|
16706 |
|
16707 |
|
16708 |
|
16709 | function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16710 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16711 | }
|
16712 |
|
16713 | SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
|
16714 |
|
16715 | module.exports = SyntheticTransitionEvent;
|
16716 | },{"105":105}],112:[function(_dereq_,module,exports){
|
16717 |
|
16718 |
|
16719 |
|
16720 |
|
16721 |
|
16722 |
|
16723 |
|
16724 |
|
16725 |
|
16726 |
|
16727 |
|
16728 | 'use strict';
|
16729 |
|
16730 | var SyntheticEvent = _dereq_(105);
|
16731 |
|
16732 | var getEventTarget = _dereq_(129);
|
16733 |
|
16734 |
|
16735 |
|
16736 |
|
16737 |
|
16738 | var UIEventInterface = {
|
16739 | view: function (event) {
|
16740 | if (event.view) {
|
16741 | return event.view;
|
16742 | }
|
16743 |
|
16744 | var target = getEventTarget(event);
|
16745 | if (target.window === target) {
|
16746 |
|
16747 | return target;
|
16748 | }
|
16749 |
|
16750 | var doc = target.ownerDocument;
|
16751 |
|
16752 | if (doc) {
|
16753 | return doc.defaultView || doc.parentWindow;
|
16754 | } else {
|
16755 | return window;
|
16756 | }
|
16757 | },
|
16758 | detail: function (event) {
|
16759 | return event.detail || 0;
|
16760 | }
|
16761 | };
|
16762 |
|
16763 |
|
16764 |
|
16765 |
|
16766 |
|
16767 |
|
16768 |
|
16769 | function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16770 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16771 | }
|
16772 |
|
16773 | SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
|
16774 |
|
16775 | module.exports = SyntheticUIEvent;
|
16776 | },{"105":105,"129":129}],113:[function(_dereq_,module,exports){
|
16777 |
|
16778 |
|
16779 |
|
16780 |
|
16781 |
|
16782 |
|
16783 |
|
16784 |
|
16785 |
|
16786 |
|
16787 |
|
16788 | 'use strict';
|
16789 |
|
16790 | var SyntheticMouseEvent = _dereq_(109);
|
16791 |
|
16792 |
|
16793 |
|
16794 |
|
16795 |
|
16796 | var WheelEventInterface = {
|
16797 | deltaX: function (event) {
|
16798 | return 'deltaX' in event ? event.deltaX :
|
16799 |
|
16800 | 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
|
16801 | },
|
16802 | deltaY: function (event) {
|
16803 | return 'deltaY' in event ? event.deltaY :
|
16804 |
|
16805 | 'wheelDeltaY' in event ? -event.wheelDeltaY :
|
16806 |
|
16807 | 'wheelDelta' in event ? -event.wheelDelta : 0;
|
16808 | },
|
16809 | deltaZ: null,
|
16810 |
|
16811 |
|
16812 |
|
16813 |
|
16814 |
|
16815 | deltaMode: null
|
16816 | };
|
16817 |
|
16818 |
|
16819 |
|
16820 |
|
16821 |
|
16822 |
|
16823 |
|
16824 | function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
16825 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
16826 | }
|
16827 |
|
16828 | SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
|
16829 |
|
16830 | module.exports = SyntheticWheelEvent;
|
16831 | },{"109":109}],114:[function(_dereq_,module,exports){
|
16832 |
|
16833 |
|
16834 |
|
16835 |
|
16836 |
|
16837 |
|
16838 |
|
16839 |
|
16840 |
|
16841 |
|
16842 |
|
16843 | 'use strict';
|
16844 |
|
16845 | var _prodInvariant = _dereq_(140);
|
16846 |
|
16847 | var invariant = _dereq_(162);
|
16848 |
|
16849 |
|
16850 |
|
16851 |
|
16852 |
|
16853 |
|
16854 |
|
16855 |
|
16856 |
|
16857 |
|
16858 |
|
16859 |
|
16860 |
|
16861 |
|
16862 |
|
16863 |
|
16864 |
|
16865 |
|
16866 |
|
16867 |
|
16868 |
|
16869 |
|
16870 |
|
16871 |
|
16872 |
|
16873 |
|
16874 |
|
16875 |
|
16876 |
|
16877 |
|
16878 |
|
16879 |
|
16880 |
|
16881 |
|
16882 |
|
16883 |
|
16884 |
|
16885 |
|
16886 |
|
16887 |
|
16888 |
|
16889 |
|
16890 |
|
16891 |
|
16892 |
|
16893 |
|
16894 |
|
16895 |
|
16896 |
|
16897 |
|
16898 |
|
16899 |
|
16900 |
|
16901 |
|
16902 |
|
16903 |
|
16904 |
|
16905 |
|
16906 |
|
16907 |
|
16908 |
|
16909 |
|
16910 | var Mixin = {
|
16911 | |
16912 |
|
16913 |
|
16914 |
|
16915 |
|
16916 |
|
16917 |
|
16918 | reinitializeTransaction: function () {
|
16919 | this.transactionWrappers = this.getTransactionWrappers();
|
16920 | if (this.wrapperInitData) {
|
16921 | this.wrapperInitData.length = 0;
|
16922 | } else {
|
16923 | this.wrapperInitData = [];
|
16924 | }
|
16925 | this._isInTransaction = false;
|
16926 | },
|
16927 |
|
16928 | _isInTransaction: false,
|
16929 |
|
16930 | |
16931 |
|
16932 |
|
16933 |
|
16934 | getTransactionWrappers: null,
|
16935 |
|
16936 | isInTransaction: function () {
|
16937 | return !!this._isInTransaction;
|
16938 | },
|
16939 |
|
16940 | |
16941 |
|
16942 |
|
16943 |
|
16944 |
|
16945 |
|
16946 |
|
16947 |
|
16948 |
|
16949 |
|
16950 |
|
16951 |
|
16952 |
|
16953 |
|
16954 |
|
16955 |
|
16956 |
|
16957 | perform: function (method, scope, a, b, c, d, e, f) {
|
16958 | !!this.isInTransaction() ? "development" !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
|
16959 | var errorThrown;
|
16960 | var ret;
|
16961 | try {
|
16962 | this._isInTransaction = true;
|
16963 |
|
16964 |
|
16965 |
|
16966 |
|
16967 | errorThrown = true;
|
16968 | this.initializeAll(0);
|
16969 | ret = method.call(scope, a, b, c, d, e, f);
|
16970 | errorThrown = false;
|
16971 | } finally {
|
16972 | try {
|
16973 | if (errorThrown) {
|
16974 |
|
16975 |
|
16976 | try {
|
16977 | this.closeAll(0);
|
16978 | } catch (err) {}
|
16979 | } else {
|
16980 |
|
16981 |
|
16982 | this.closeAll(0);
|
16983 | }
|
16984 | } finally {
|
16985 | this._isInTransaction = false;
|
16986 | }
|
16987 | }
|
16988 | return ret;
|
16989 | },
|
16990 |
|
16991 | initializeAll: function (startIndex) {
|
16992 | var transactionWrappers = this.transactionWrappers;
|
16993 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
16994 | var wrapper = transactionWrappers[i];
|
16995 | try {
|
16996 |
|
16997 |
|
16998 |
|
16999 |
|
17000 | this.wrapperInitData[i] = Transaction.OBSERVED_ERROR;
|
17001 | this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
|
17002 | } finally {
|
17003 | if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) {
|
17004 |
|
17005 |
|
17006 |
|
17007 | try {
|
17008 | this.initializeAll(i + 1);
|
17009 | } catch (err) {}
|
17010 | }
|
17011 | }
|
17012 | }
|
17013 | },
|
17014 |
|
17015 | |
17016 |
|
17017 |
|
17018 |
|
17019 |
|
17020 |
|
17021 | closeAll: function (startIndex) {
|
17022 | !this.isInTransaction() ? "development" !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
|
17023 | var transactionWrappers = this.transactionWrappers;
|
17024 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
17025 | var wrapper = transactionWrappers[i];
|
17026 | var initData = this.wrapperInitData[i];
|
17027 | var errorThrown;
|
17028 | try {
|
17029 |
|
17030 |
|
17031 |
|
17032 |
|
17033 | errorThrown = true;
|
17034 | if (initData !== Transaction.OBSERVED_ERROR && wrapper.close) {
|
17035 | wrapper.close.call(this, initData);
|
17036 | }
|
17037 | errorThrown = false;
|
17038 | } finally {
|
17039 | if (errorThrown) {
|
17040 |
|
17041 |
|
17042 |
|
17043 | try {
|
17044 | this.closeAll(i + 1);
|
17045 | } catch (e) {}
|
17046 | }
|
17047 | }
|
17048 | }
|
17049 | this.wrapperInitData.length = 0;
|
17050 | }
|
17051 | };
|
17052 |
|
17053 | var Transaction = {
|
17054 |
|
17055 | Mixin: Mixin,
|
17056 |
|
17057 | |
17058 |
|
17059 |
|
17060 | OBSERVED_ERROR: {}
|
17061 |
|
17062 | };
|
17063 |
|
17064 | module.exports = Transaction;
|
17065 | },{"140":140,"162":162}],115:[function(_dereq_,module,exports){
|
17066 |
|
17067 |
|
17068 |
|
17069 |
|
17070 |
|
17071 |
|
17072 |
|
17073 |
|
17074 |
|
17075 |
|
17076 |
|
17077 | 'use strict';
|
17078 |
|
17079 | var ViewportMetrics = {
|
17080 |
|
17081 | currentScrollLeft: 0,
|
17082 |
|
17083 | currentScrollTop: 0,
|
17084 |
|
17085 | refreshScrollValues: function (scrollPosition) {
|
17086 | ViewportMetrics.currentScrollLeft = scrollPosition.x;
|
17087 | ViewportMetrics.currentScrollTop = scrollPosition.y;
|
17088 | }
|
17089 |
|
17090 | };
|
17091 |
|
17092 | module.exports = ViewportMetrics;
|
17093 | },{}],116:[function(_dereq_,module,exports){
|
17094 |
|
17095 |
|
17096 |
|
17097 |
|
17098 |
|
17099 |
|
17100 |
|
17101 |
|
17102 |
|
17103 |
|
17104 |
|
17105 |
|
17106 | 'use strict';
|
17107 |
|
17108 | var _prodInvariant = _dereq_(140);
|
17109 |
|
17110 | var invariant = _dereq_(162);
|
17111 |
|
17112 |
|
17113 |
|
17114 |
|
17115 |
|
17116 |
|
17117 |
|
17118 |
|
17119 |
|
17120 |
|
17121 |
|
17122 |
|
17123 |
|
17124 |
|
17125 | function accumulateInto(current, next) {
|
17126 | !(next != null) ? "development" !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
|
17127 |
|
17128 | if (current == null) {
|
17129 | return next;
|
17130 | }
|
17131 |
|
17132 |
|
17133 |
|
17134 | if (Array.isArray(current)) {
|
17135 | if (Array.isArray(next)) {
|
17136 | current.push.apply(current, next);
|
17137 | return current;
|
17138 | }
|
17139 | current.push(next);
|
17140 | return current;
|
17141 | }
|
17142 |
|
17143 | if (Array.isArray(next)) {
|
17144 |
|
17145 | return [current].concat(next);
|
17146 | }
|
17147 |
|
17148 | return [current, next];
|
17149 | }
|
17150 |
|
17151 | module.exports = accumulateInto;
|
17152 | },{"140":140,"162":162}],117:[function(_dereq_,module,exports){
|
17153 |
|
17154 |
|
17155 |
|
17156 |
|
17157 |
|
17158 |
|
17159 |
|
17160 |
|
17161 |
|
17162 |
|
17163 |
|
17164 |
|
17165 | 'use strict';
|
17166 |
|
17167 | var MOD = 65521;
|
17168 |
|
17169 |
|
17170 |
|
17171 |
|
17172 |
|
17173 |
|
17174 | function adler32(data) {
|
17175 | var a = 1;
|
17176 | var b = 0;
|
17177 | var i = 0;
|
17178 | var l = data.length;
|
17179 | var m = l & ~0x3;
|
17180 | while (i < m) {
|
17181 | var n = Math.min(i + 4096, m);
|
17182 | for (; i < n; i += 4) {
|
17183 | b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
|
17184 | }
|
17185 | a %= MOD;
|
17186 | b %= MOD;
|
17187 | }
|
17188 | for (; i < l; i++) {
|
17189 | b += a += data.charCodeAt(i);
|
17190 | }
|
17191 | a %= MOD;
|
17192 | b %= MOD;
|
17193 | return a | b << 16;
|
17194 | }
|
17195 |
|
17196 | module.exports = adler32;
|
17197 | },{}],118:[function(_dereq_,module,exports){
|
17198 |
|
17199 |
|
17200 |
|
17201 |
|
17202 |
|
17203 |
|
17204 |
|
17205 |
|
17206 |
|
17207 |
|
17208 |
|
17209 | 'use strict';
|
17210 |
|
17211 | var canDefineProperty = false;
|
17212 | if ("development" !== 'production') {
|
17213 | try {
|
17214 | Object.defineProperty({}, 'x', { get: function () {} });
|
17215 | canDefineProperty = true;
|
17216 | } catch (x) {
|
17217 |
|
17218 | }
|
17219 | }
|
17220 |
|
17221 | module.exports = canDefineProperty;
|
17222 | },{}],119:[function(_dereq_,module,exports){
|
17223 | (function (process){
|
17224 |
|
17225 |
|
17226 |
|
17227 |
|
17228 |
|
17229 |
|
17230 |
|
17231 |
|
17232 |
|
17233 |
|
17234 |
|
17235 | 'use strict';
|
17236 |
|
17237 | var _prodInvariant = _dereq_(140);
|
17238 |
|
17239 | var ReactPropTypeLocationNames = _dereq_(82);
|
17240 | var ReactPropTypesSecret = _dereq_(85);
|
17241 |
|
17242 | var invariant = _dereq_(162);
|
17243 | var warning = _dereq_(171);
|
17244 |
|
17245 | var ReactComponentTreeHook;
|
17246 |
|
17247 | if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
17248 |
|
17249 |
|
17250 |
|
17251 |
|
17252 |
|
17253 | ReactComponentTreeHook = _dereq_(35);
|
17254 | }
|
17255 |
|
17256 | var loggedTypeFailures = {};
|
17257 |
|
17258 |
|
17259 |
|
17260 |
|
17261 |
|
17262 |
|
17263 |
|
17264 |
|
17265 |
|
17266 |
|
17267 |
|
17268 |
|
17269 |
|
17270 | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
|
17271 | for (var typeSpecName in typeSpecs) {
|
17272 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
17273 | var error;
|
17274 |
|
17275 |
|
17276 |
|
17277 | try {
|
17278 |
|
17279 |
|
17280 | !(typeof typeSpecs[typeSpecName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
|
17281 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
17282 | } catch (ex) {
|
17283 | error = ex;
|
17284 | }
|
17285 | "development" !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
|
17286 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
17287 |
|
17288 |
|
17289 | loggedTypeFailures[error.message] = true;
|
17290 |
|
17291 | var componentStackInfo = '';
|
17292 |
|
17293 | if ("development" !== 'production') {
|
17294 | if (!ReactComponentTreeHook) {
|
17295 | ReactComponentTreeHook = _dereq_(35);
|
17296 | }
|
17297 | if (debugID !== null) {
|
17298 | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
17299 | } else if (element !== null) {
|
17300 | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
|
17301 | }
|
17302 | }
|
17303 |
|
17304 | "development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
17305 | }
|
17306 | }
|
17307 | }
|
17308 | }
|
17309 |
|
17310 | module.exports = checkReactTypeSpec;
|
17311 | }).call(this,undefined)
|
17312 | },{"140":140,"162":162,"171":171,"35":35,"82":82,"85":85}],120:[function(_dereq_,module,exports){
|
17313 |
|
17314 |
|
17315 |
|
17316 |
|
17317 |
|
17318 |
|
17319 |
|
17320 |
|
17321 |
|
17322 |
|
17323 |
|
17324 |
|
17325 |
|
17326 | 'use strict';
|
17327 |
|
17328 |
|
17329 |
|
17330 |
|
17331 |
|
17332 | var createMicrosoftUnsafeLocalFunction = function (func) {
|
17333 | if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
|
17334 | return function (arg0, arg1, arg2, arg3) {
|
17335 | MSApp.execUnsafeLocalFunction(function () {
|
17336 | return func(arg0, arg1, arg2, arg3);
|
17337 | });
|
17338 | };
|
17339 | } else {
|
17340 | return func;
|
17341 | }
|
17342 | };
|
17343 |
|
17344 | module.exports = createMicrosoftUnsafeLocalFunction;
|
17345 | },{}],121:[function(_dereq_,module,exports){
|
17346 |
|
17347 |
|
17348 |
|
17349 |
|
17350 |
|
17351 |
|
17352 |
|
17353 |
|
17354 |
|
17355 |
|
17356 |
|
17357 | 'use strict';
|
17358 |
|
17359 | var CSSProperty = _dereq_(3);
|
17360 | var warning = _dereq_(171);
|
17361 |
|
17362 | var isUnitlessNumber = CSSProperty.isUnitlessNumber;
|
17363 | var styleWarnings = {};
|
17364 |
|
17365 |
|
17366 |
|
17367 |
|
17368 |
|
17369 |
|
17370 |
|
17371 |
|
17372 |
|
17373 |
|
17374 |
|
17375 | function dangerousStyleValue(name, value, component) {
|
17376 |
|
17377 |
|
17378 |
|
17379 |
|
17380 |
|
17381 |
|
17382 |
|
17383 |
|
17384 |
|
17385 |
|
17386 | var isEmpty = value == null || typeof value === 'boolean' || value === '';
|
17387 | if (isEmpty) {
|
17388 | return '';
|
17389 | }
|
17390 |
|
17391 | var isNonNumeric = isNaN(value);
|
17392 | if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
|
17393 | return '' + value;
|
17394 | }
|
17395 |
|
17396 | if (typeof value === 'string') {
|
17397 | if ("development" !== 'production') {
|
17398 |
|
17399 |
|
17400 | if (component && value !== '0') {
|
17401 | var owner = component._currentElement._owner;
|
17402 | var ownerName = owner ? owner.getName() : null;
|
17403 | if (ownerName && !styleWarnings[ownerName]) {
|
17404 | styleWarnings[ownerName] = {};
|
17405 | }
|
17406 | var warned = false;
|
17407 | if (ownerName) {
|
17408 | var warnings = styleWarnings[ownerName];
|
17409 | warned = warnings[name];
|
17410 | if (!warned) {
|
17411 | warnings[name] = true;
|
17412 | }
|
17413 | }
|
17414 | if (!warned) {
|
17415 | "development" !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;
|
17416 | }
|
17417 | }
|
17418 | }
|
17419 | value = value.trim();
|
17420 | }
|
17421 | return value + 'px';
|
17422 | }
|
17423 |
|
17424 | module.exports = dangerousStyleValue;
|
17425 | },{"171":171,"3":3}],122:[function(_dereq_,module,exports){
|
17426 |
|
17427 |
|
17428 |
|
17429 |
|
17430 |
|
17431 |
|
17432 |
|
17433 |
|
17434 |
|
17435 |
|
17436 |
|
17437 |
|
17438 |
|
17439 |
|
17440 |
|
17441 |
|
17442 |
|
17443 |
|
17444 |
|
17445 |
|
17446 |
|
17447 |
|
17448 |
|
17449 |
|
17450 |
|
17451 |
|
17452 |
|
17453 |
|
17454 |
|
17455 |
|
17456 |
|
17457 |
|
17458 |
|
17459 |
|
17460 |
|
17461 |
|
17462 | 'use strict';
|
17463 |
|
17464 |
|
17465 |
|
17466 |
|
17467 |
|
17468 |
|
17469 |
|
17470 | var matchHtmlRegExp = /["'&<>]/;
|
17471 |
|
17472 |
|
17473 |
|
17474 |
|
17475 |
|
17476 |
|
17477 |
|
17478 |
|
17479 |
|
17480 | function escapeHtml(string) {
|
17481 | var str = '' + string;
|
17482 | var match = matchHtmlRegExp.exec(str);
|
17483 |
|
17484 | if (!match) {
|
17485 | return str;
|
17486 | }
|
17487 |
|
17488 | var escape;
|
17489 | var html = '';
|
17490 | var index = 0;
|
17491 | var lastIndex = 0;
|
17492 |
|
17493 | for (index = match.index; index < str.length; index++) {
|
17494 | switch (str.charCodeAt(index)) {
|
17495 | case 34:
|
17496 |
|
17497 | escape = '"';
|
17498 | break;
|
17499 | case 38:
|
17500 |
|
17501 | escape = '&';
|
17502 | break;
|
17503 | case 39:
|
17504 |
|
17505 | escape = ''';
|
17506 | break;
|
17507 | case 60:
|
17508 |
|
17509 | escape = '<';
|
17510 | break;
|
17511 | case 62:
|
17512 |
|
17513 | escape = '>';
|
17514 | break;
|
17515 | default:
|
17516 | continue;
|
17517 | }
|
17518 |
|
17519 | if (lastIndex !== index) {
|
17520 | html += str.substring(lastIndex, index);
|
17521 | }
|
17522 |
|
17523 | lastIndex = index + 1;
|
17524 | html += escape;
|
17525 | }
|
17526 |
|
17527 | return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
17528 | }
|
17529 |
|
17530 |
|
17531 |
|
17532 |
|
17533 |
|
17534 |
|
17535 |
|
17536 |
|
17537 |
|
17538 | function escapeTextContentForBrowser(text) {
|
17539 | if (typeof text === 'boolean' || typeof text === 'number') {
|
17540 |
|
17541 |
|
17542 |
|
17543 | return '' + text;
|
17544 | }
|
17545 | return escapeHtml(text);
|
17546 | }
|
17547 |
|
17548 | module.exports = escapeTextContentForBrowser;
|
17549 | },{}],123:[function(_dereq_,module,exports){
|
17550 |
|
17551 |
|
17552 |
|
17553 |
|
17554 |
|
17555 |
|
17556 |
|
17557 |
|
17558 |
|
17559 |
|
17560 |
|
17561 | 'use strict';
|
17562 |
|
17563 | var _prodInvariant = _dereq_(140);
|
17564 |
|
17565 | var ReactCurrentOwner = _dereq_(37);
|
17566 | var ReactDOMComponentTree = _dereq_(42);
|
17567 | var ReactInstanceMap = _dereq_(72);
|
17568 |
|
17569 | var getHostComponentFromComposite = _dereq_(130);
|
17570 | var invariant = _dereq_(162);
|
17571 | var warning = _dereq_(171);
|
17572 |
|
17573 |
|
17574 |
|
17575 |
|
17576 |
|
17577 |
|
17578 |
|
17579 |
|
17580 |
|
17581 | function findDOMNode(componentOrElement) {
|
17582 | if ("development" !== 'production') {
|
17583 | var owner = ReactCurrentOwner.current;
|
17584 | if (owner !== null) {
|
17585 | "development" !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
|
17586 | owner._warnedAboutRefsInRender = true;
|
17587 | }
|
17588 | }
|
17589 | if (componentOrElement == null) {
|
17590 | return null;
|
17591 | }
|
17592 | if (componentOrElement.nodeType === 1) {
|
17593 | return componentOrElement;
|
17594 | }
|
17595 |
|
17596 | var inst = ReactInstanceMap.get(componentOrElement);
|
17597 | if (inst) {
|
17598 | inst = getHostComponentFromComposite(inst);
|
17599 | return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;
|
17600 | }
|
17601 |
|
17602 | if (typeof componentOrElement.render === 'function') {
|
17603 | !false ? "development" !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0;
|
17604 | } else {
|
17605 | !false ? "development" !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0;
|
17606 | }
|
17607 | }
|
17608 |
|
17609 | module.exports = findDOMNode;
|
17610 | },{"130":130,"140":140,"162":162,"171":171,"37":37,"42":42,"72":72}],124:[function(_dereq_,module,exports){
|
17611 | (function (process){
|
17612 |
|
17613 |
|
17614 |
|
17615 |
|
17616 |
|
17617 |
|
17618 |
|
17619 |
|
17620 |
|
17621 |
|
17622 |
|
17623 |
|
17624 | 'use strict';
|
17625 |
|
17626 | var KeyEscapeUtils = _dereq_(23);
|
17627 | var traverseAllChildren = _dereq_(145);
|
17628 | var warning = _dereq_(171);
|
17629 |
|
17630 | var ReactComponentTreeHook;
|
17631 |
|
17632 | if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
17633 |
|
17634 |
|
17635 |
|
17636 |
|
17637 |
|
17638 | ReactComponentTreeHook = _dereq_(35);
|
17639 | }
|
17640 |
|
17641 |
|
17642 |
|
17643 |
|
17644 |
|
17645 |
|
17646 |
|
17647 | function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
|
17648 |
|
17649 | if (traverseContext && typeof traverseContext === 'object') {
|
17650 | var result = traverseContext;
|
17651 | var keyUnique = result[name] === undefined;
|
17652 | if ("development" !== 'production') {
|
17653 | if (!ReactComponentTreeHook) {
|
17654 | ReactComponentTreeHook = _dereq_(35);
|
17655 | }
|
17656 | if (!keyUnique) {
|
17657 | "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;
|
17658 | }
|
17659 | }
|
17660 | if (keyUnique && child != null) {
|
17661 | result[name] = child;
|
17662 | }
|
17663 | }
|
17664 | }
|
17665 |
|
17666 |
|
17667 |
|
17668 |
|
17669 |
|
17670 |
|
17671 | function flattenChildren(children, selfDebugID) {
|
17672 | if (children == null) {
|
17673 | return children;
|
17674 | }
|
17675 | var result = {};
|
17676 |
|
17677 | if ("development" !== 'production') {
|
17678 | traverseAllChildren(children, function (traverseContext, child, name) {
|
17679 | return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
|
17680 | }, result);
|
17681 | } else {
|
17682 | traverseAllChildren(children, flattenSingleChildIntoContext, result);
|
17683 | }
|
17684 | return result;
|
17685 | }
|
17686 |
|
17687 | module.exports = flattenChildren;
|
17688 | }).call(this,undefined)
|
17689 | },{"145":145,"171":171,"23":23,"35":35}],125:[function(_dereq_,module,exports){
|
17690 |
|
17691 |
|
17692 |
|
17693 |
|
17694 |
|
17695 |
|
17696 |
|
17697 |
|
17698 |
|
17699 |
|
17700 |
|
17701 |
|
17702 | 'use strict';
|
17703 |
|
17704 |
|
17705 |
|
17706 |
|
17707 |
|
17708 |
|
17709 |
|
17710 |
|
17711 |
|
17712 | function forEachAccumulated(arr, cb, scope) {
|
17713 | if (Array.isArray(arr)) {
|
17714 | arr.forEach(cb, scope);
|
17715 | } else if (arr) {
|
17716 | cb.call(scope, arr);
|
17717 | }
|
17718 | }
|
17719 |
|
17720 | module.exports = forEachAccumulated;
|
17721 | },{}],126:[function(_dereq_,module,exports){
|
17722 |
|
17723 |
|
17724 |
|
17725 |
|
17726 |
|
17727 |
|
17728 |
|
17729 |
|
17730 |
|
17731 |
|
17732 |
|
17733 | 'use strict';
|
17734 |
|
17735 |
|
17736 |
|
17737 |
|
17738 |
|
17739 |
|
17740 |
|
17741 |
|
17742 |
|
17743 |
|
17744 |
|
17745 |
|
17746 | function getEventCharCode(nativeEvent) {
|
17747 | var charCode;
|
17748 | var keyCode = nativeEvent.keyCode;
|
17749 |
|
17750 | if ('charCode' in nativeEvent) {
|
17751 | charCode = nativeEvent.charCode;
|
17752 |
|
17753 |
|
17754 | if (charCode === 0 && keyCode === 13) {
|
17755 | charCode = 13;
|
17756 | }
|
17757 | } else {
|
17758 |
|
17759 | charCode = keyCode;
|
17760 | }
|
17761 |
|
17762 |
|
17763 |
|
17764 | if (charCode >= 32 || charCode === 13) {
|
17765 | return charCode;
|
17766 | }
|
17767 |
|
17768 | return 0;
|
17769 | }
|
17770 |
|
17771 | module.exports = getEventCharCode;
|
17772 | },{}],127:[function(_dereq_,module,exports){
|
17773 |
|
17774 |
|
17775 |
|
17776 |
|
17777 |
|
17778 |
|
17779 |
|
17780 |
|
17781 |
|
17782 |
|
17783 |
|
17784 | 'use strict';
|
17785 |
|
17786 | var getEventCharCode = _dereq_(126);
|
17787 |
|
17788 |
|
17789 |
|
17790 |
|
17791 |
|
17792 | var normalizeKey = {
|
17793 | 'Esc': 'Escape',
|
17794 | 'Spacebar': ' ',
|
17795 | 'Left': 'ArrowLeft',
|
17796 | 'Up': 'ArrowUp',
|
17797 | 'Right': 'ArrowRight',
|
17798 | 'Down': 'ArrowDown',
|
17799 | 'Del': 'Delete',
|
17800 | 'Win': 'OS',
|
17801 | 'Menu': 'ContextMenu',
|
17802 | 'Apps': 'ContextMenu',
|
17803 | 'Scroll': 'ScrollLock',
|
17804 | 'MozPrintableKey': 'Unidentified'
|
17805 | };
|
17806 |
|
17807 |
|
17808 |
|
17809 |
|
17810 |
|
17811 |
|
17812 | var translateToKey = {
|
17813 | 8: 'Backspace',
|
17814 | 9: 'Tab',
|
17815 | 12: 'Clear',
|
17816 | 13: 'Enter',
|
17817 | 16: 'Shift',
|
17818 | 17: 'Control',
|
17819 | 18: 'Alt',
|
17820 | 19: 'Pause',
|
17821 | 20: 'CapsLock',
|
17822 | 27: 'Escape',
|
17823 | 32: ' ',
|
17824 | 33: 'PageUp',
|
17825 | 34: 'PageDown',
|
17826 | 35: 'End',
|
17827 | 36: 'Home',
|
17828 | 37: 'ArrowLeft',
|
17829 | 38: 'ArrowUp',
|
17830 | 39: 'ArrowRight',
|
17831 | 40: 'ArrowDown',
|
17832 | 45: 'Insert',
|
17833 | 46: 'Delete',
|
17834 | 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',
|
17835 | 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',
|
17836 | 144: 'NumLock',
|
17837 | 145: 'ScrollLock',
|
17838 | 224: 'Meta'
|
17839 | };
|
17840 |
|
17841 |
|
17842 |
|
17843 |
|
17844 |
|
17845 | function getEventKey(nativeEvent) {
|
17846 | if (nativeEvent.key) {
|
17847 |
|
17848 |
|
17849 |
|
17850 |
|
17851 |
|
17852 | var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
|
17853 | if (key !== 'Unidentified') {
|
17854 | return key;
|
17855 | }
|
17856 | }
|
17857 |
|
17858 |
|
17859 | if (nativeEvent.type === 'keypress') {
|
17860 | var charCode = getEventCharCode(nativeEvent);
|
17861 |
|
17862 |
|
17863 |
|
17864 | return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
|
17865 | }
|
17866 | if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
|
17867 |
|
17868 |
|
17869 | return translateToKey[nativeEvent.keyCode] || 'Unidentified';
|
17870 | }
|
17871 | return '';
|
17872 | }
|
17873 |
|
17874 | module.exports = getEventKey;
|
17875 | },{"126":126}],128:[function(_dereq_,module,exports){
|
17876 |
|
17877 |
|
17878 |
|
17879 |
|
17880 |
|
17881 |
|
17882 |
|
17883 |
|
17884 |
|
17885 |
|
17886 |
|
17887 | 'use strict';
|
17888 |
|
17889 |
|
17890 |
|
17891 |
|
17892 |
|
17893 |
|
17894 | var modifierKeyToProp = {
|
17895 | 'Alt': 'altKey',
|
17896 | 'Control': 'ctrlKey',
|
17897 | 'Meta': 'metaKey',
|
17898 | 'Shift': 'shiftKey'
|
17899 | };
|
17900 |
|
17901 |
|
17902 |
|
17903 |
|
17904 | function modifierStateGetter(keyArg) {
|
17905 | var syntheticEvent = this;
|
17906 | var nativeEvent = syntheticEvent.nativeEvent;
|
17907 | if (nativeEvent.getModifierState) {
|
17908 | return nativeEvent.getModifierState(keyArg);
|
17909 | }
|
17910 | var keyProp = modifierKeyToProp[keyArg];
|
17911 | return keyProp ? !!nativeEvent[keyProp] : false;
|
17912 | }
|
17913 |
|
17914 | function getEventModifierState(nativeEvent) {
|
17915 | return modifierStateGetter;
|
17916 | }
|
17917 |
|
17918 | module.exports = getEventModifierState;
|
17919 | },{}],129:[function(_dereq_,module,exports){
|
17920 |
|
17921 |
|
17922 |
|
17923 |
|
17924 |
|
17925 |
|
17926 |
|
17927 |
|
17928 |
|
17929 |
|
17930 |
|
17931 | 'use strict';
|
17932 |
|
17933 |
|
17934 |
|
17935 |
|
17936 |
|
17937 |
|
17938 |
|
17939 |
|
17940 |
|
17941 | function getEventTarget(nativeEvent) {
|
17942 | var target = nativeEvent.target || nativeEvent.srcElement || window;
|
17943 |
|
17944 |
|
17945 | if (target.correspondingUseElement) {
|
17946 | target = target.correspondingUseElement;
|
17947 | }
|
17948 |
|
17949 |
|
17950 |
|
17951 | return target.nodeType === 3 ? target.parentNode : target;
|
17952 | }
|
17953 |
|
17954 | module.exports = getEventTarget;
|
17955 | },{}],130:[function(_dereq_,module,exports){
|
17956 |
|
17957 |
|
17958 |
|
17959 |
|
17960 |
|
17961 |
|
17962 |
|
17963 |
|
17964 |
|
17965 |
|
17966 |
|
17967 | 'use strict';
|
17968 |
|
17969 | var ReactNodeTypes = _dereq_(79);
|
17970 |
|
17971 | function getHostComponentFromComposite(inst) {
|
17972 | var type;
|
17973 |
|
17974 | while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) {
|
17975 | inst = inst._renderedComponent;
|
17976 | }
|
17977 |
|
17978 | if (type === ReactNodeTypes.HOST) {
|
17979 | return inst._renderedComponent;
|
17980 | } else if (type === ReactNodeTypes.EMPTY) {
|
17981 | return null;
|
17982 | }
|
17983 | }
|
17984 |
|
17985 | module.exports = getHostComponentFromComposite;
|
17986 | },{"79":79}],131:[function(_dereq_,module,exports){
|
17987 |
|
17988 |
|
17989 |
|
17990 |
|
17991 |
|
17992 |
|
17993 |
|
17994 |
|
17995 |
|
17996 |
|
17997 |
|
17998 |
|
17999 | 'use strict';
|
18000 |
|
18001 |
|
18002 |
|
18003 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
18004 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
18005 |
|
18006 |
|
18007 |
|
18008 |
|
18009 |
|
18010 |
|
18011 |
|
18012 |
|
18013 |
|
18014 |
|
18015 |
|
18016 |
|
18017 |
|
18018 |
|
18019 |
|
18020 | function getIteratorFn(maybeIterable) {
|
18021 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
18022 | if (typeof iteratorFn === 'function') {
|
18023 | return iteratorFn;
|
18024 | }
|
18025 | }
|
18026 |
|
18027 | module.exports = getIteratorFn;
|
18028 | },{}],132:[function(_dereq_,module,exports){
|
18029 |
|
18030 |
|
18031 |
|
18032 |
|
18033 |
|
18034 |
|
18035 |
|
18036 |
|
18037 |
|
18038 |
|
18039 |
|
18040 | 'use strict';
|
18041 |
|
18042 |
|
18043 |
|
18044 |
|
18045 |
|
18046 |
|
18047 |
|
18048 |
|
18049 | function getLeafNode(node) {
|
18050 | while (node && node.firstChild) {
|
18051 | node = node.firstChild;
|
18052 | }
|
18053 | return node;
|
18054 | }
|
18055 |
|
18056 |
|
18057 |
|
18058 |
|
18059 |
|
18060 |
|
18061 |
|
18062 |
|
18063 | function getSiblingNode(node) {
|
18064 | while (node) {
|
18065 | if (node.nextSibling) {
|
18066 | return node.nextSibling;
|
18067 | }
|
18068 | node = node.parentNode;
|
18069 | }
|
18070 | }
|
18071 |
|
18072 |
|
18073 |
|
18074 |
|
18075 |
|
18076 |
|
18077 |
|
18078 |
|
18079 | function getNodeForCharacterOffset(root, offset) {
|
18080 | var node = getLeafNode(root);
|
18081 | var nodeStart = 0;
|
18082 | var nodeEnd = 0;
|
18083 |
|
18084 | while (node) {
|
18085 | if (node.nodeType === 3) {
|
18086 | nodeEnd = nodeStart + node.textContent.length;
|
18087 |
|
18088 | if (nodeStart <= offset && nodeEnd >= offset) {
|
18089 | return {
|
18090 | node: node,
|
18091 | offset: offset - nodeStart
|
18092 | };
|
18093 | }
|
18094 |
|
18095 | nodeStart = nodeEnd;
|
18096 | }
|
18097 |
|
18098 | node = getLeafNode(getSiblingNode(node));
|
18099 | }
|
18100 | }
|
18101 |
|
18102 | module.exports = getNodeForCharacterOffset;
|
18103 | },{}],133:[function(_dereq_,module,exports){
|
18104 |
|
18105 |
|
18106 |
|
18107 |
|
18108 |
|
18109 |
|
18110 |
|
18111 |
|
18112 |
|
18113 |
|
18114 |
|
18115 | 'use strict';
|
18116 |
|
18117 | var ExecutionEnvironment = _dereq_(148);
|
18118 |
|
18119 | var contentKey = null;
|
18120 |
|
18121 |
|
18122 |
|
18123 |
|
18124 |
|
18125 |
|
18126 |
|
18127 | function getTextContentAccessor() {
|
18128 | if (!contentKey && ExecutionEnvironment.canUseDOM) {
|
18129 |
|
18130 |
|
18131 | contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
|
18132 | }
|
18133 | return contentKey;
|
18134 | }
|
18135 |
|
18136 | module.exports = getTextContentAccessor;
|
18137 | },{"148":148}],134:[function(_dereq_,module,exports){
|
18138 |
|
18139 |
|
18140 |
|
18141 |
|
18142 |
|
18143 |
|
18144 |
|
18145 |
|
18146 |
|
18147 |
|
18148 |
|
18149 | 'use strict';
|
18150 |
|
18151 | var ExecutionEnvironment = _dereq_(148);
|
18152 |
|
18153 |
|
18154 |
|
18155 |
|
18156 |
|
18157 |
|
18158 |
|
18159 |
|
18160 | function makePrefixMap(styleProp, eventName) {
|
18161 | var prefixes = {};
|
18162 |
|
18163 | prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
|
18164 | prefixes['Webkit' + styleProp] = 'webkit' + eventName;
|
18165 | prefixes['Moz' + styleProp] = 'moz' + eventName;
|
18166 | prefixes['ms' + styleProp] = 'MS' + eventName;
|
18167 | prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
|
18168 |
|
18169 | return prefixes;
|
18170 | }
|
18171 |
|
18172 |
|
18173 |
|
18174 |
|
18175 | var vendorPrefixes = {
|
18176 | animationend: makePrefixMap('Animation', 'AnimationEnd'),
|
18177 | animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
|
18178 | animationstart: makePrefixMap('Animation', 'AnimationStart'),
|
18179 | transitionend: makePrefixMap('Transition', 'TransitionEnd')
|
18180 | };
|
18181 |
|
18182 |
|
18183 |
|
18184 |
|
18185 | var prefixedEventNames = {};
|
18186 |
|
18187 |
|
18188 |
|
18189 |
|
18190 | var style = {};
|
18191 |
|
18192 |
|
18193 |
|
18194 |
|
18195 | if (ExecutionEnvironment.canUseDOM) {
|
18196 | style = document.createElement('div').style;
|
18197 |
|
18198 |
|
18199 |
|
18200 |
|
18201 |
|
18202 | if (!('AnimationEvent' in window)) {
|
18203 | delete vendorPrefixes.animationend.animation;
|
18204 | delete vendorPrefixes.animationiteration.animation;
|
18205 | delete vendorPrefixes.animationstart.animation;
|
18206 | }
|
18207 |
|
18208 |
|
18209 | if (!('TransitionEvent' in window)) {
|
18210 | delete vendorPrefixes.transitionend.transition;
|
18211 | }
|
18212 | }
|
18213 |
|
18214 |
|
18215 |
|
18216 |
|
18217 |
|
18218 |
|
18219 |
|
18220 | function getVendorPrefixedEventName(eventName) {
|
18221 | if (prefixedEventNames[eventName]) {
|
18222 | return prefixedEventNames[eventName];
|
18223 | } else if (!vendorPrefixes[eventName]) {
|
18224 | return eventName;
|
18225 | }
|
18226 |
|
18227 | var prefixMap = vendorPrefixes[eventName];
|
18228 |
|
18229 | for (var styleProp in prefixMap) {
|
18230 | if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
|
18231 | return prefixedEventNames[eventName] = prefixMap[styleProp];
|
18232 | }
|
18233 | }
|
18234 |
|
18235 | return '';
|
18236 | }
|
18237 |
|
18238 | module.exports = getVendorPrefixedEventName;
|
18239 | },{"148":148}],135:[function(_dereq_,module,exports){
|
18240 |
|
18241 |
|
18242 |
|
18243 |
|
18244 |
|
18245 |
|
18246 |
|
18247 |
|
18248 |
|
18249 |
|
18250 |
|
18251 | 'use strict';
|
18252 |
|
18253 | var _prodInvariant = _dereq_(140),
|
18254 | _assign = _dereq_(172);
|
18255 |
|
18256 | var ReactCompositeComponent = _dereq_(36);
|
18257 | var ReactEmptyComponent = _dereq_(63);
|
18258 | var ReactHostComponent = _dereq_(68);
|
18259 |
|
18260 | var invariant = _dereq_(162);
|
18261 | var warning = _dereq_(171);
|
18262 |
|
18263 |
|
18264 | var ReactCompositeComponentWrapper = function (element) {
|
18265 | this.construct(element);
|
18266 | };
|
18267 | _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent.Mixin, {
|
18268 | _instantiateReactComponent: instantiateReactComponent
|
18269 | });
|
18270 |
|
18271 | function getDeclarationErrorAddendum(owner) {
|
18272 | if (owner) {
|
18273 | var name = owner.getName();
|
18274 | if (name) {
|
18275 | return ' Check the render method of `' + name + '`.';
|
18276 | }
|
18277 | }
|
18278 | return '';
|
18279 | }
|
18280 |
|
18281 |
|
18282 |
|
18283 |
|
18284 |
|
18285 |
|
18286 |
|
18287 |
|
18288 | function isInternalComponentType(type) {
|
18289 | return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
|
18290 | }
|
18291 |
|
18292 | var nextDebugID = 1;
|
18293 |
|
18294 |
|
18295 |
|
18296 |
|
18297 |
|
18298 |
|
18299 |
|
18300 |
|
18301 |
|
18302 | function instantiateReactComponent(node, shouldHaveDebugID) {
|
18303 | var instance;
|
18304 |
|
18305 | if (node === null || node === false) {
|
18306 | instance = ReactEmptyComponent.create(instantiateReactComponent);
|
18307 | } else if (typeof node === 'object') {
|
18308 | var element = node;
|
18309 | !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? "development" !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0;
|
18310 |
|
18311 |
|
18312 | if (typeof element.type === 'string') {
|
18313 | instance = ReactHostComponent.createInternalComponent(element);
|
18314 | } else if (isInternalComponentType(element.type)) {
|
18315 |
|
18316 |
|
18317 |
|
18318 | instance = new element.type(element);
|
18319 |
|
18320 |
|
18321 | if (!instance.getHostNode) {
|
18322 | instance.getHostNode = instance.getNativeNode;
|
18323 | }
|
18324 | } else {
|
18325 | instance = new ReactCompositeComponentWrapper(element);
|
18326 | }
|
18327 | } else if (typeof node === 'string' || typeof node === 'number') {
|
18328 | instance = ReactHostComponent.createInstanceForText(node);
|
18329 | } else {
|
18330 | !false ? "development" !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
|
18331 | }
|
18332 |
|
18333 | if ("development" !== 'production') {
|
18334 | "development" !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;
|
18335 | }
|
18336 |
|
18337 |
|
18338 |
|
18339 |
|
18340 | instance._mountIndex = 0;
|
18341 | instance._mountImage = null;
|
18342 |
|
18343 | if ("development" !== 'production') {
|
18344 | instance._debugID = shouldHaveDebugID ? nextDebugID++ : 0;
|
18345 | }
|
18346 |
|
18347 |
|
18348 |
|
18349 | if ("development" !== 'production') {
|
18350 | if (Object.preventExtensions) {
|
18351 | Object.preventExtensions(instance);
|
18352 | }
|
18353 | }
|
18354 |
|
18355 | return instance;
|
18356 | }
|
18357 |
|
18358 | module.exports = instantiateReactComponent;
|
18359 | },{"140":140,"162":162,"171":171,"172":172,"36":36,"63":63,"68":68}],136:[function(_dereq_,module,exports){
|
18360 |
|
18361 |
|
18362 |
|
18363 |
|
18364 |
|
18365 |
|
18366 |
|
18367 |
|
18368 |
|
18369 |
|
18370 |
|
18371 | 'use strict';
|
18372 |
|
18373 | var ExecutionEnvironment = _dereq_(148);
|
18374 |
|
18375 | var useHasFeature;
|
18376 | if (ExecutionEnvironment.canUseDOM) {
|
18377 | useHasFeature = document.implementation && document.implementation.hasFeature &&
|
18378 |
|
18379 |
|
18380 | document.implementation.hasFeature('', '') !== true;
|
18381 | }
|
18382 |
|
18383 |
|
18384 |
|
18385 |
|
18386 |
|
18387 |
|
18388 |
|
18389 |
|
18390 |
|
18391 |
|
18392 |
|
18393 |
|
18394 |
|
18395 |
|
18396 |
|
18397 | function isEventSupported(eventNameSuffix, capture) {
|
18398 | if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
|
18399 | return false;
|
18400 | }
|
18401 |
|
18402 | var eventName = 'on' + eventNameSuffix;
|
18403 | var isSupported = eventName in document;
|
18404 |
|
18405 | if (!isSupported) {
|
18406 | var element = document.createElement('div');
|
18407 | element.setAttribute(eventName, 'return;');
|
18408 | isSupported = typeof element[eventName] === 'function';
|
18409 | }
|
18410 |
|
18411 | if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
18412 |
|
18413 | isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
18414 | }
|
18415 |
|
18416 | return isSupported;
|
18417 | }
|
18418 |
|
18419 | module.exports = isEventSupported;
|
18420 | },{"148":148}],137:[function(_dereq_,module,exports){
|
18421 |
|
18422 |
|
18423 |
|
18424 |
|
18425 |
|
18426 |
|
18427 |
|
18428 |
|
18429 |
|
18430 |
|
18431 |
|
18432 |
|
18433 | 'use strict';
|
18434 |
|
18435 |
|
18436 |
|
18437 |
|
18438 |
|
18439 | var supportedInputTypes = {
|
18440 | 'color': true,
|
18441 | 'date': true,
|
18442 | 'datetime': true,
|
18443 | 'datetime-local': true,
|
18444 | 'email': true,
|
18445 | 'month': true,
|
18446 | 'number': true,
|
18447 | 'password': true,
|
18448 | 'range': true,
|
18449 | 'search': true,
|
18450 | 'tel': true,
|
18451 | 'text': true,
|
18452 | 'time': true,
|
18453 | 'url': true,
|
18454 | 'week': true
|
18455 | };
|
18456 |
|
18457 | function isTextInputElement(elem) {
|
18458 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
18459 |
|
18460 | if (nodeName === 'input') {
|
18461 | return !!supportedInputTypes[elem.type];
|
18462 | }
|
18463 |
|
18464 | if (nodeName === 'textarea') {
|
18465 | return true;
|
18466 | }
|
18467 |
|
18468 | return false;
|
18469 | }
|
18470 |
|
18471 | module.exports = isTextInputElement;
|
18472 | },{}],138:[function(_dereq_,module,exports){
|
18473 |
|
18474 |
|
18475 |
|
18476 |
|
18477 |
|
18478 |
|
18479 |
|
18480 |
|
18481 |
|
18482 |
|
18483 | 'use strict';
|
18484 |
|
18485 | var _prodInvariant = _dereq_(140);
|
18486 |
|
18487 | var ReactElement = _dereq_(61);
|
18488 |
|
18489 | var invariant = _dereq_(162);
|
18490 |
|
18491 |
|
18492 |
|
18493 |
|
18494 |
|
18495 |
|
18496 |
|
18497 |
|
18498 |
|
18499 |
|
18500 |
|
18501 |
|
18502 |
|
18503 |
|
18504 |
|
18505 | function onlyChild(children) {
|
18506 | !ReactElement.isValidElement(children) ? "development" !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
|
18507 | return children;
|
18508 | }
|
18509 |
|
18510 | module.exports = onlyChild;
|
18511 | },{"140":140,"162":162,"61":61}],139:[function(_dereq_,module,exports){
|
18512 |
|
18513 |
|
18514 |
|
18515 |
|
18516 |
|
18517 |
|
18518 |
|
18519 |
|
18520 |
|
18521 |
|
18522 |
|
18523 | 'use strict';
|
18524 |
|
18525 | var escapeTextContentForBrowser = _dereq_(122);
|
18526 |
|
18527 |
|
18528 |
|
18529 |
|
18530 |
|
18531 |
|
18532 |
|
18533 | function quoteAttributeValueForBrowser(value) {
|
18534 | return '"' + escapeTextContentForBrowser(value) + '"';
|
18535 | }
|
18536 |
|
18537 | module.exports = quoteAttributeValueForBrowser;
|
18538 | },{"122":122}],140:[function(_dereq_,module,exports){
|
18539 |
|
18540 |
|
18541 |
|
18542 |
|
18543 |
|
18544 |
|
18545 |
|
18546 |
|
18547 |
|
18548 |
|
18549 |
|
18550 | 'use strict';
|
18551 |
|
18552 |
|
18553 |
|
18554 |
|
18555 |
|
18556 |
|
18557 |
|
18558 |
|
18559 | function reactProdInvariant(code) {
|
18560 | var argCount = arguments.length - 1;
|
18561 |
|
18562 | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
18563 |
|
18564 | for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
18565 | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
18566 | }
|
18567 |
|
18568 | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
18569 |
|
18570 | var error = new Error(message);
|
18571 | error.name = 'Invariant Violation';
|
18572 | error.framesToPop = 1;
|
18573 |
|
18574 | throw error;
|
18575 | }
|
18576 |
|
18577 | module.exports = reactProdInvariant;
|
18578 | },{}],141:[function(_dereq_,module,exports){
|
18579 |
|
18580 |
|
18581 |
|
18582 |
|
18583 |
|
18584 |
|
18585 |
|
18586 |
|
18587 |
|
18588 |
|
18589 |
|
18590 | 'use strict';
|
18591 |
|
18592 | var ReactMount = _dereq_(76);
|
18593 |
|
18594 | module.exports = ReactMount.renderSubtreeIntoContainer;
|
18595 | },{"76":76}],142:[function(_dereq_,module,exports){
|
18596 |
|
18597 |
|
18598 |
|
18599 |
|
18600 |
|
18601 |
|
18602 |
|
18603 |
|
18604 |
|
18605 |
|
18606 |
|
18607 | 'use strict';
|
18608 |
|
18609 | var ExecutionEnvironment = _dereq_(148);
|
18610 | var DOMNamespaces = _dereq_(9);
|
18611 |
|
18612 | var WHITESPACE_TEST = /^[ \r\n\t\f]/;
|
18613 | var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
|
18614 |
|
18615 | var createMicrosoftUnsafeLocalFunction = _dereq_(120);
|
18616 |
|
18617 |
|
18618 | var reusableSVGContainer;
|
18619 |
|
18620 |
|
18621 |
|
18622 |
|
18623 |
|
18624 |
|
18625 |
|
18626 |
|
18627 |
|
18628 | var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
|
18629 |
|
18630 |
|
18631 |
|
18632 | if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
|
18633 | reusableSVGContainer = reusableSVGContainer || document.createElement('div');
|
18634 | reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
|
18635 | var svgNode = reusableSVGContainer.firstChild;
|
18636 | while (svgNode.firstChild) {
|
18637 | node.appendChild(svgNode.firstChild);
|
18638 | }
|
18639 | } else {
|
18640 | node.innerHTML = html;
|
18641 | }
|
18642 | });
|
18643 |
|
18644 | if (ExecutionEnvironment.canUseDOM) {
|
18645 |
|
18646 |
|
18647 |
|
18648 |
|
18649 |
|
18650 |
|
18651 | var testElement = document.createElement('div');
|
18652 | testElement.innerHTML = ' ';
|
18653 | if (testElement.innerHTML === '') {
|
18654 | setInnerHTML = function (node, html) {
|
18655 |
|
18656 |
|
18657 |
|
18658 |
|
18659 |
|
18660 | if (node.parentNode) {
|
18661 | node.parentNode.replaceChild(node, node);
|
18662 | }
|
18663 |
|
18664 |
|
18665 |
|
18666 |
|
18667 |
|
18668 | if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
|
18669 |
|
18670 |
|
18671 |
|
18672 |
|
18673 |
|
18674 |
|
18675 | node.innerHTML = String.fromCharCode(0xFEFF) + html;
|
18676 |
|
18677 |
|
18678 |
|
18679 | var textNode = node.firstChild;
|
18680 | if (textNode.data.length === 1) {
|
18681 | node.removeChild(textNode);
|
18682 | } else {
|
18683 | textNode.deleteData(0, 1);
|
18684 | }
|
18685 | } else {
|
18686 | node.innerHTML = html;
|
18687 | }
|
18688 | };
|
18689 | }
|
18690 | testElement = null;
|
18691 | }
|
18692 |
|
18693 | module.exports = setInnerHTML;
|
18694 | },{"120":120,"148":148,"9":9}],143:[function(_dereq_,module,exports){
|
18695 |
|
18696 |
|
18697 |
|
18698 |
|
18699 |
|
18700 |
|
18701 |
|
18702 |
|
18703 |
|
18704 |
|
18705 |
|
18706 | 'use strict';
|
18707 |
|
18708 | var ExecutionEnvironment = _dereq_(148);
|
18709 | var escapeTextContentForBrowser = _dereq_(122);
|
18710 | var setInnerHTML = _dereq_(142);
|
18711 |
|
18712 |
|
18713 |
|
18714 |
|
18715 |
|
18716 |
|
18717 |
|
18718 |
|
18719 |
|
18720 |
|
18721 |
|
18722 | var setTextContent = function (node, text) {
|
18723 | if (text) {
|
18724 | var firstChild = node.firstChild;
|
18725 |
|
18726 | if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
|
18727 | firstChild.nodeValue = text;
|
18728 | return;
|
18729 | }
|
18730 | }
|
18731 | node.textContent = text;
|
18732 | };
|
18733 |
|
18734 | if (ExecutionEnvironment.canUseDOM) {
|
18735 | if (!('textContent' in document.documentElement)) {
|
18736 | setTextContent = function (node, text) {
|
18737 | setInnerHTML(node, escapeTextContentForBrowser(text));
|
18738 | };
|
18739 | }
|
18740 | }
|
18741 |
|
18742 | module.exports = setTextContent;
|
18743 | },{"122":122,"142":142,"148":148}],144:[function(_dereq_,module,exports){
|
18744 |
|
18745 |
|
18746 |
|
18747 |
|
18748 |
|
18749 |
|
18750 |
|
18751 |
|
18752 |
|
18753 |
|
18754 |
|
18755 | 'use strict';
|
18756 |
|
18757 |
|
18758 |
|
18759 |
|
18760 |
|
18761 |
|
18762 |
|
18763 |
|
18764 |
|
18765 |
|
18766 |
|
18767 |
|
18768 |
|
18769 | function shouldUpdateReactComponent(prevElement, nextElement) {
|
18770 | var prevEmpty = prevElement === null || prevElement === false;
|
18771 | var nextEmpty = nextElement === null || nextElement === false;
|
18772 | if (prevEmpty || nextEmpty) {
|
18773 | return prevEmpty === nextEmpty;
|
18774 | }
|
18775 |
|
18776 | var prevType = typeof prevElement;
|
18777 | var nextType = typeof nextElement;
|
18778 | if (prevType === 'string' || prevType === 'number') {
|
18779 | return nextType === 'string' || nextType === 'number';
|
18780 | } else {
|
18781 | return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
|
18782 | }
|
18783 | }
|
18784 |
|
18785 | module.exports = shouldUpdateReactComponent;
|
18786 | },{}],145:[function(_dereq_,module,exports){
|
18787 |
|
18788 |
|
18789 |
|
18790 |
|
18791 |
|
18792 |
|
18793 |
|
18794 |
|
18795 |
|
18796 |
|
18797 |
|
18798 | 'use strict';
|
18799 |
|
18800 | var _prodInvariant = _dereq_(140);
|
18801 |
|
18802 | var ReactCurrentOwner = _dereq_(37);
|
18803 | var ReactElement = _dereq_(61);
|
18804 |
|
18805 | var getIteratorFn = _dereq_(131);
|
18806 | var invariant = _dereq_(162);
|
18807 | var KeyEscapeUtils = _dereq_(23);
|
18808 | var warning = _dereq_(171);
|
18809 |
|
18810 | var SEPARATOR = '.';
|
18811 | var SUBSEPARATOR = ':';
|
18812 |
|
18813 |
|
18814 |
|
18815 |
|
18816 |
|
18817 |
|
18818 | var didWarnAboutMaps = false;
|
18819 |
|
18820 |
|
18821 |
|
18822 |
|
18823 |
|
18824 |
|
18825 |
|
18826 |
|
18827 | function getComponentKey(component, index) {
|
18828 |
|
18829 |
|
18830 | if (component && typeof component === 'object' && component.key != null) {
|
18831 |
|
18832 | return KeyEscapeUtils.escape(component.key);
|
18833 | }
|
18834 |
|
18835 | return index.toString(36);
|
18836 | }
|
18837 |
|
18838 |
|
18839 |
|
18840 |
|
18841 |
|
18842 |
|
18843 |
|
18844 |
|
18845 |
|
18846 | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
18847 | var type = typeof children;
|
18848 |
|
18849 | if (type === 'undefined' || type === 'boolean') {
|
18850 |
|
18851 | children = null;
|
18852 | }
|
18853 |
|
18854 | if (children === null || type === 'string' || type === 'number' || ReactElement.isValidElement(children)) {
|
18855 | callback(traverseContext, children,
|
18856 |
|
18857 |
|
18858 | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
18859 | return 1;
|
18860 | }
|
18861 |
|
18862 | var child;
|
18863 | var nextName;
|
18864 | var subtreeCount = 0;
|
18865 | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
18866 |
|
18867 | if (Array.isArray(children)) {
|
18868 | for (var i = 0; i < children.length; i++) {
|
18869 | child = children[i];
|
18870 | nextName = nextNamePrefix + getComponentKey(child, i);
|
18871 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
18872 | }
|
18873 | } else {
|
18874 | var iteratorFn = getIteratorFn(children);
|
18875 | if (iteratorFn) {
|
18876 | var iterator = iteratorFn.call(children);
|
18877 | var step;
|
18878 | if (iteratorFn !== children.entries) {
|
18879 | var ii = 0;
|
18880 | while (!(step = iterator.next()).done) {
|
18881 | child = step.value;
|
18882 | nextName = nextNamePrefix + getComponentKey(child, ii++);
|
18883 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
18884 | }
|
18885 | } else {
|
18886 | if ("development" !== 'production') {
|
18887 | var mapsAsChildrenAddendum = '';
|
18888 | if (ReactCurrentOwner.current) {
|
18889 | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
18890 | if (mapsAsChildrenOwnerName) {
|
18891 | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
18892 | }
|
18893 | }
|
18894 | "development" !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
|
18895 | didWarnAboutMaps = true;
|
18896 | }
|
18897 |
|
18898 | while (!(step = iterator.next()).done) {
|
18899 | var entry = step.value;
|
18900 | if (entry) {
|
18901 | child = entry[1];
|
18902 | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
18903 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
18904 | }
|
18905 | }
|
18906 | }
|
18907 | } else if (type === 'object') {
|
18908 | var addendum = '';
|
18909 | if ("development" !== 'production') {
|
18910 | addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
18911 | if (children._isReactElement) {
|
18912 | addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
|
18913 | }
|
18914 | if (ReactCurrentOwner.current) {
|
18915 | var name = ReactCurrentOwner.current.getName();
|
18916 | if (name) {
|
18917 | addendum += ' Check the render method of `' + name + '`.';
|
18918 | }
|
18919 | }
|
18920 | }
|
18921 | var childrenString = String(children);
|
18922 | !false ? "development" !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
18923 | }
|
18924 | }
|
18925 |
|
18926 | return subtreeCount;
|
18927 | }
|
18928 |
|
18929 |
|
18930 |
|
18931 |
|
18932 |
|
18933 |
|
18934 |
|
18935 |
|
18936 |
|
18937 |
|
18938 |
|
18939 |
|
18940 |
|
18941 |
|
18942 |
|
18943 |
|
18944 |
|
18945 | function traverseAllChildren(children, callback, traverseContext) {
|
18946 | if (children == null) {
|
18947 | return 0;
|
18948 | }
|
18949 |
|
18950 | return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
18951 | }
|
18952 |
|
18953 | module.exports = traverseAllChildren;
|
18954 | },{"131":131,"140":140,"162":162,"171":171,"23":23,"37":37,"61":61}],146:[function(_dereq_,module,exports){
|
18955 |
|
18956 |
|
18957 |
|
18958 |
|
18959 |
|
18960 |
|
18961 |
|
18962 |
|
18963 |
|
18964 |
|
18965 |
|
18966 | 'use strict';
|
18967 |
|
18968 | var _assign = _dereq_(172);
|
18969 |
|
18970 | var emptyFunction = _dereq_(154);
|
18971 | var warning = _dereq_(171);
|
18972 |
|
18973 | var validateDOMNesting = emptyFunction;
|
18974 |
|
18975 | if ("development" !== 'production') {
|
18976 |
|
18977 |
|
18978 |
|
18979 |
|
18980 |
|
18981 |
|
18982 |
|
18983 |
|
18984 |
|
18985 |
|
18986 |
|
18987 |
|
18988 | var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];
|
18989 |
|
18990 |
|
18991 | var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
|
18992 |
|
18993 |
|
18994 |
|
18995 |
|
18996 | 'foreignObject', 'desc', 'title'];
|
18997 |
|
18998 |
|
18999 | var buttonScopeTags = inScopeTags.concat(['button']);
|
19000 |
|
19001 |
|
19002 | var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
|
19003 |
|
19004 | var emptyAncestorInfo = {
|
19005 | current: null,
|
19006 |
|
19007 | formTag: null,
|
19008 | aTagInScope: null,
|
19009 | buttonTagInScope: null,
|
19010 | nobrTagInScope: null,
|
19011 | pTagInButtonScope: null,
|
19012 |
|
19013 | listItemTagAutoclosing: null,
|
19014 | dlItemTagAutoclosing: null
|
19015 | };
|
19016 |
|
19017 | var updatedAncestorInfo = function (oldInfo, tag, instance) {
|
19018 | var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
|
19019 | var info = { tag: tag, instance: instance };
|
19020 |
|
19021 | if (inScopeTags.indexOf(tag) !== -1) {
|
19022 | ancestorInfo.aTagInScope = null;
|
19023 | ancestorInfo.buttonTagInScope = null;
|
19024 | ancestorInfo.nobrTagInScope = null;
|
19025 | }
|
19026 | if (buttonScopeTags.indexOf(tag) !== -1) {
|
19027 | ancestorInfo.pTagInButtonScope = null;
|
19028 | }
|
19029 |
|
19030 |
|
19031 |
|
19032 | if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
|
19033 | ancestorInfo.listItemTagAutoclosing = null;
|
19034 | ancestorInfo.dlItemTagAutoclosing = null;
|
19035 | }
|
19036 |
|
19037 | ancestorInfo.current = info;
|
19038 |
|
19039 | if (tag === 'form') {
|
19040 | ancestorInfo.formTag = info;
|
19041 | }
|
19042 | if (tag === 'a') {
|
19043 | ancestorInfo.aTagInScope = info;
|
19044 | }
|
19045 | if (tag === 'button') {
|
19046 | ancestorInfo.buttonTagInScope = info;
|
19047 | }
|
19048 | if (tag === 'nobr') {
|
19049 | ancestorInfo.nobrTagInScope = info;
|
19050 | }
|
19051 | if (tag === 'p') {
|
19052 | ancestorInfo.pTagInButtonScope = info;
|
19053 | }
|
19054 | if (tag === 'li') {
|
19055 | ancestorInfo.listItemTagAutoclosing = info;
|
19056 | }
|
19057 | if (tag === 'dd' || tag === 'dt') {
|
19058 | ancestorInfo.dlItemTagAutoclosing = info;
|
19059 | }
|
19060 |
|
19061 | return ancestorInfo;
|
19062 | };
|
19063 |
|
19064 | |
19065 |
|
19066 |
|
19067 | var isTagValidWithParent = function (tag, parentTag) {
|
19068 |
|
19069 | switch (parentTag) {
|
19070 |
|
19071 | case 'select':
|
19072 | return tag === 'option' || tag === 'optgroup' || tag === '#text';
|
19073 | case 'optgroup':
|
19074 | return tag === 'option' || tag === '#text';
|
19075 |
|
19076 |
|
19077 | case 'option':
|
19078 | return tag === '#text';
|
19079 |
|
19080 |
|
19081 |
|
19082 |
|
19083 |
|
19084 |
|
19085 |
|
19086 | case 'tr':
|
19087 | return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
|
19088 |
|
19089 |
|
19090 | case 'tbody':
|
19091 | case 'thead':
|
19092 | case 'tfoot':
|
19093 | return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
|
19094 |
|
19095 |
|
19096 | case 'colgroup':
|
19097 | return tag === 'col' || tag === 'template';
|
19098 |
|
19099 |
|
19100 | case 'table':
|
19101 | return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
|
19102 |
|
19103 |
|
19104 | case 'head':
|
19105 | return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
|
19106 |
|
19107 |
|
19108 | case 'html':
|
19109 | return tag === 'head' || tag === 'body';
|
19110 | case '#document':
|
19111 | return tag === 'html';
|
19112 | }
|
19113 |
|
19114 |
|
19115 |
|
19116 |
|
19117 | switch (tag) {
|
19118 | case 'h1':
|
19119 | case 'h2':
|
19120 | case 'h3':
|
19121 | case 'h4':
|
19122 | case 'h5':
|
19123 | case 'h6':
|
19124 | return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
|
19125 |
|
19126 | case 'rp':
|
19127 | case 'rt':
|
19128 | return impliedEndTags.indexOf(parentTag) === -1;
|
19129 |
|
19130 | case 'body':
|
19131 | case 'caption':
|
19132 | case 'col':
|
19133 | case 'colgroup':
|
19134 | case 'frame':
|
19135 | case 'head':
|
19136 | case 'html':
|
19137 | case 'tbody':
|
19138 | case 'td':
|
19139 | case 'tfoot':
|
19140 | case 'th':
|
19141 | case 'thead':
|
19142 | case 'tr':
|
19143 |
|
19144 |
|
19145 |
|
19146 |
|
19147 | return parentTag == null;
|
19148 | }
|
19149 |
|
19150 | return true;
|
19151 | };
|
19152 |
|
19153 | |
19154 |
|
19155 |
|
19156 | var findInvalidAncestorForTag = function (tag, ancestorInfo) {
|
19157 | switch (tag) {
|
19158 | case 'address':
|
19159 | case 'article':
|
19160 | case 'aside':
|
19161 | case 'blockquote':
|
19162 | case 'center':
|
19163 | case 'details':
|
19164 | case 'dialog':
|
19165 | case 'dir':
|
19166 | case 'div':
|
19167 | case 'dl':
|
19168 | case 'fieldset':
|
19169 | case 'figcaption':
|
19170 | case 'figure':
|
19171 | case 'footer':
|
19172 | case 'header':
|
19173 | case 'hgroup':
|
19174 | case 'main':
|
19175 | case 'menu':
|
19176 | case 'nav':
|
19177 | case 'ol':
|
19178 | case 'p':
|
19179 | case 'section':
|
19180 | case 'summary':
|
19181 | case 'ul':
|
19182 |
|
19183 | case 'pre':
|
19184 | case 'listing':
|
19185 |
|
19186 | case 'table':
|
19187 |
|
19188 | case 'hr':
|
19189 |
|
19190 | case 'xmp':
|
19191 |
|
19192 | case 'h1':
|
19193 | case 'h2':
|
19194 | case 'h3':
|
19195 | case 'h4':
|
19196 | case 'h5':
|
19197 | case 'h6':
|
19198 | return ancestorInfo.pTagInButtonScope;
|
19199 |
|
19200 | case 'form':
|
19201 | return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
|
19202 |
|
19203 | case 'li':
|
19204 | return ancestorInfo.listItemTagAutoclosing;
|
19205 |
|
19206 | case 'dd':
|
19207 | case 'dt':
|
19208 | return ancestorInfo.dlItemTagAutoclosing;
|
19209 |
|
19210 | case 'button':
|
19211 | return ancestorInfo.buttonTagInScope;
|
19212 |
|
19213 | case 'a':
|
19214 |
|
19215 |
|
19216 | return ancestorInfo.aTagInScope;
|
19217 |
|
19218 | case 'nobr':
|
19219 | return ancestorInfo.nobrTagInScope;
|
19220 | }
|
19221 |
|
19222 | return null;
|
19223 | };
|
19224 |
|
19225 | |
19226 |
|
19227 |
|
19228 |
|
19229 | var findOwnerStack = function (instance) {
|
19230 | if (!instance) {
|
19231 | return [];
|
19232 | }
|
19233 |
|
19234 | var stack = [];
|
19235 | do {
|
19236 | stack.push(instance);
|
19237 | } while (instance = instance._currentElement._owner);
|
19238 | stack.reverse();
|
19239 | return stack;
|
19240 | };
|
19241 |
|
19242 | var didWarn = {};
|
19243 |
|
19244 | validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
|
19245 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
19246 | var parentInfo = ancestorInfo.current;
|
19247 | var parentTag = parentInfo && parentInfo.tag;
|
19248 |
|
19249 | if (childText != null) {
|
19250 | "development" !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
|
19251 | childTag = '#text';
|
19252 | }
|
19253 |
|
19254 | var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
|
19255 | var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
|
19256 | var problematic = invalidParent || invalidAncestor;
|
19257 |
|
19258 | if (problematic) {
|
19259 | var ancestorTag = problematic.tag;
|
19260 | var ancestorInstance = problematic.instance;
|
19261 |
|
19262 | var childOwner = childInstance && childInstance._currentElement._owner;
|
19263 | var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
|
19264 |
|
19265 | var childOwners = findOwnerStack(childOwner);
|
19266 | var ancestorOwners = findOwnerStack(ancestorOwner);
|
19267 |
|
19268 | var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
|
19269 | var i;
|
19270 |
|
19271 | var deepestCommon = -1;
|
19272 | for (i = 0; i < minStackLen; i++) {
|
19273 | if (childOwners[i] === ancestorOwners[i]) {
|
19274 | deepestCommon = i;
|
19275 | } else {
|
19276 | break;
|
19277 | }
|
19278 | }
|
19279 |
|
19280 | var UNKNOWN = '(unknown)';
|
19281 | var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
|
19282 | return inst.getName() || UNKNOWN;
|
19283 | });
|
19284 | var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
|
19285 | return inst.getName() || UNKNOWN;
|
19286 | });
|
19287 | var ownerInfo = [].concat(
|
19288 |
|
19289 |
|
19290 | deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
|
19291 |
|
19292 | invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
|
19293 |
|
19294 | var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
|
19295 | if (didWarn[warnKey]) {
|
19296 | return;
|
19297 | }
|
19298 | didWarn[warnKey] = true;
|
19299 |
|
19300 | var tagDisplayName = childTag;
|
19301 | var whitespaceInfo = '';
|
19302 | if (childTag === '#text') {
|
19303 | if (/\S/.test(childText)) {
|
19304 | tagDisplayName = 'Text nodes';
|
19305 | } else {
|
19306 | tagDisplayName = 'Whitespace text nodes';
|
19307 | whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.';
|
19308 | }
|
19309 | } else {
|
19310 | tagDisplayName = '<' + childTag + '>';
|
19311 | }
|
19312 |
|
19313 | if (invalidParent) {
|
19314 | var info = '';
|
19315 | if (ancestorTag === 'table' && childTag === 'tr') {
|
19316 | info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
|
19317 | }
|
19318 | "development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
|
19319 | } else {
|
19320 | "development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
|
19321 | }
|
19322 | }
|
19323 | };
|
19324 |
|
19325 | validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
|
19326 |
|
19327 |
|
19328 | validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
|
19329 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
19330 | var parentInfo = ancestorInfo.current;
|
19331 | var parentTag = parentInfo && parentInfo.tag;
|
19332 | return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
|
19333 | };
|
19334 | }
|
19335 |
|
19336 | module.exports = validateDOMNesting;
|
19337 | },{"154":154,"171":171,"172":172}],147:[function(_dereq_,module,exports){
|
19338 | 'use strict';
|
19339 |
|
19340 |
|
19341 |
|
19342 |
|
19343 |
|
19344 |
|
19345 |
|
19346 |
|
19347 |
|
19348 |
|
19349 |
|
19350 |
|
19351 |
|
19352 |
|
19353 |
|
19354 |
|
19355 |
|
19356 |
|
19357 |
|
19358 | var emptyFunction = _dereq_(154);
|
19359 |
|
19360 |
|
19361 |
|
19362 |
|
19363 |
|
19364 | var EventListener = {
|
19365 | |
19366 |
|
19367 |
|
19368 |
|
19369 |
|
19370 |
|
19371 |
|
19372 |
|
19373 | listen: function listen(target, eventType, callback) {
|
19374 | if (target.addEventListener) {
|
19375 | target.addEventListener(eventType, callback, false);
|
19376 | return {
|
19377 | remove: function remove() {
|
19378 | target.removeEventListener(eventType, callback, false);
|
19379 | }
|
19380 | };
|
19381 | } else if (target.attachEvent) {
|
19382 | target.attachEvent('on' + eventType, callback);
|
19383 | return {
|
19384 | remove: function remove() {
|
19385 | target.detachEvent('on' + eventType, callback);
|
19386 | }
|
19387 | };
|
19388 | }
|
19389 | },
|
19390 |
|
19391 | |
19392 |
|
19393 |
|
19394 |
|
19395 |
|
19396 |
|
19397 |
|
19398 |
|
19399 | capture: function capture(target, eventType, callback) {
|
19400 | if (target.addEventListener) {
|
19401 | target.addEventListener(eventType, callback, true);
|
19402 | return {
|
19403 | remove: function remove() {
|
19404 | target.removeEventListener(eventType, callback, true);
|
19405 | }
|
19406 | };
|
19407 | } else {
|
19408 | if ("development" !== 'production') {
|
19409 | console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
|
19410 | }
|
19411 | return {
|
19412 | remove: emptyFunction
|
19413 | };
|
19414 | }
|
19415 | },
|
19416 |
|
19417 | registerDefault: function registerDefault() {}
|
19418 | };
|
19419 |
|
19420 | module.exports = EventListener;
|
19421 | },{"154":154}],148:[function(_dereq_,module,exports){
|
19422 |
|
19423 |
|
19424 |
|
19425 |
|
19426 |
|
19427 |
|
19428 |
|
19429 |
|
19430 |
|
19431 |
|
19432 | 'use strict';
|
19433 |
|
19434 | var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
19435 |
|
19436 |
|
19437 |
|
19438 |
|
19439 |
|
19440 |
|
19441 |
|
19442 | var ExecutionEnvironment = {
|
19443 |
|
19444 | canUseDOM: canUseDOM,
|
19445 |
|
19446 | canUseWorkers: typeof Worker !== 'undefined',
|
19447 |
|
19448 | canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
|
19449 |
|
19450 | canUseViewport: canUseDOM && !!window.screen,
|
19451 |
|
19452 | isInWorker: !canUseDOM
|
19453 |
|
19454 | };
|
19455 |
|
19456 | module.exports = ExecutionEnvironment;
|
19457 | },{}],149:[function(_dereq_,module,exports){
|
19458 | "use strict";
|
19459 |
|
19460 |
|
19461 |
|
19462 |
|
19463 |
|
19464 |
|
19465 |
|
19466 |
|
19467 |
|
19468 |
|
19469 |
|
19470 |
|
19471 | var _hyphenPattern = /-(.)/g;
|
19472 |
|
19473 |
|
19474 |
|
19475 |
|
19476 |
|
19477 |
|
19478 |
|
19479 |
|
19480 |
|
19481 |
|
19482 | function camelize(string) {
|
19483 | return string.replace(_hyphenPattern, function (_, character) {
|
19484 | return character.toUpperCase();
|
19485 | });
|
19486 | }
|
19487 |
|
19488 | module.exports = camelize;
|
19489 | },{}],150:[function(_dereq_,module,exports){
|
19490 |
|
19491 |
|
19492 |
|
19493 |
|
19494 |
|
19495 |
|
19496 |
|
19497 |
|
19498 |
|
19499 |
|
19500 |
|
19501 | 'use strict';
|
19502 |
|
19503 | var camelize = _dereq_(149);
|
19504 |
|
19505 | var msPattern = /^-ms-/;
|
19506 |
|
19507 |
|
19508 |
|
19509 |
|
19510 |
|
19511 |
|
19512 |
|
19513 |
|
19514 |
|
19515 |
|
19516 |
|
19517 |
|
19518 |
|
19519 |
|
19520 |
|
19521 |
|
19522 |
|
19523 |
|
19524 | function camelizeStyleName(string) {
|
19525 | return camelize(string.replace(msPattern, 'ms-'));
|
19526 | }
|
19527 |
|
19528 | module.exports = camelizeStyleName;
|
19529 | },{"149":149}],151:[function(_dereq_,module,exports){
|
19530 | 'use strict';
|
19531 |
|
19532 |
|
19533 |
|
19534 |
|
19535 |
|
19536 |
|
19537 |
|
19538 |
|
19539 |
|
19540 |
|
19541 |
|
19542 |
|
19543 | var isTextNode = _dereq_(164);
|
19544 |
|
19545 |
|
19546 |
|
19547 |
|
19548 |
|
19549 |
|
19550 | function containsNode(outerNode, innerNode) {
|
19551 | if (!outerNode || !innerNode) {
|
19552 | return false;
|
19553 | } else if (outerNode === innerNode) {
|
19554 | return true;
|
19555 | } else if (isTextNode(outerNode)) {
|
19556 | return false;
|
19557 | } else if (isTextNode(innerNode)) {
|
19558 | return containsNode(outerNode, innerNode.parentNode);
|
19559 | } else if ('contains' in outerNode) {
|
19560 | return outerNode.contains(innerNode);
|
19561 | } else if (outerNode.compareDocumentPosition) {
|
19562 | return !!(outerNode.compareDocumentPosition(innerNode) & 16);
|
19563 | } else {
|
19564 | return false;
|
19565 | }
|
19566 | }
|
19567 |
|
19568 | module.exports = containsNode;
|
19569 | },{"164":164}],152:[function(_dereq_,module,exports){
|
19570 | 'use strict';
|
19571 |
|
19572 |
|
19573 |
|
19574 |
|
19575 |
|
19576 |
|
19577 |
|
19578 |
|
19579 |
|
19580 |
|
19581 |
|
19582 |
|
19583 | var invariant = _dereq_(162);
|
19584 |
|
19585 |
|
19586 |
|
19587 |
|
19588 |
|
19589 |
|
19590 |
|
19591 |
|
19592 |
|
19593 |
|
19594 | function toArray(obj) {
|
19595 | var length = obj.length;
|
19596 |
|
19597 |
|
19598 |
|
19599 | !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? "development" !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
|
19600 |
|
19601 | !(typeof length === 'number') ? "development" !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
|
19602 |
|
19603 | !(length === 0 || length - 1 in obj) ? "development" !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
|
19604 |
|
19605 | !(typeof obj.callee !== 'function') ? "development" !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
|
19606 |
|
19607 |
|
19608 |
|
19609 |
|
19610 | if (obj.hasOwnProperty) {
|
19611 | try {
|
19612 | return Array.prototype.slice.call(obj);
|
19613 | } catch (e) {
|
19614 |
|
19615 | }
|
19616 | }
|
19617 |
|
19618 |
|
19619 |
|
19620 | var ret = Array(length);
|
19621 | for (var ii = 0; ii < length; ii++) {
|
19622 | ret[ii] = obj[ii];
|
19623 | }
|
19624 | return ret;
|
19625 | }
|
19626 |
|
19627 |
|
19628 |
|
19629 |
|
19630 |
|
19631 |
|
19632 |
|
19633 |
|
19634 |
|
19635 |
|
19636 |
|
19637 |
|
19638 |
|
19639 |
|
19640 |
|
19641 |
|
19642 | function hasArrayNature(obj) {
|
19643 | return (
|
19644 |
|
19645 | !!obj && (
|
19646 |
|
19647 | typeof obj == 'object' || typeof obj == 'function') &&
|
19648 |
|
19649 | 'length' in obj &&
|
19650 |
|
19651 | !('setInterval' in obj) &&
|
19652 |
|
19653 |
|
19654 | typeof obj.nodeType != 'number' && (
|
19655 |
|
19656 | Array.isArray(obj) ||
|
19657 |
|
19658 | 'callee' in obj ||
|
19659 |
|
19660 | 'item' in obj)
|
19661 | );
|
19662 | }
|
19663 |
|
19664 |
|
19665 |
|
19666 |
|
19667 |
|
19668 |
|
19669 |
|
19670 |
|
19671 |
|
19672 |
|
19673 |
|
19674 |
|
19675 |
|
19676 |
|
19677 |
|
19678 |
|
19679 |
|
19680 |
|
19681 |
|
19682 |
|
19683 |
|
19684 |
|
19685 | function createArrayFromMixed(obj) {
|
19686 | if (!hasArrayNature(obj)) {
|
19687 | return [obj];
|
19688 | } else if (Array.isArray(obj)) {
|
19689 | return obj.slice();
|
19690 | } else {
|
19691 | return toArray(obj);
|
19692 | }
|
19693 | }
|
19694 |
|
19695 | module.exports = createArrayFromMixed;
|
19696 | },{"162":162}],153:[function(_dereq_,module,exports){
|
19697 | 'use strict';
|
19698 |
|
19699 |
|
19700 |
|
19701 |
|
19702 |
|
19703 |
|
19704 |
|
19705 |
|
19706 |
|
19707 |
|
19708 |
|
19709 |
|
19710 |
|
19711 |
|
19712 | var ExecutionEnvironment = _dereq_(148);
|
19713 |
|
19714 | var createArrayFromMixed = _dereq_(152);
|
19715 | var getMarkupWrap = _dereq_(158);
|
19716 | var invariant = _dereq_(162);
|
19717 |
|
19718 |
|
19719 |
|
19720 |
|
19721 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
19722 |
|
19723 |
|
19724 |
|
19725 |
|
19726 | var nodeNamePattern = /^\s*<(\w+)/;
|
19727 |
|
19728 |
|
19729 |
|
19730 |
|
19731 |
|
19732 |
|
19733 |
|
19734 | function getNodeName(markup) {
|
19735 | var nodeNameMatch = markup.match(nodeNamePattern);
|
19736 | return nodeNameMatch && nodeNameMatch[1].toLowerCase();
|
19737 | }
|
19738 |
|
19739 |
|
19740 |
|
19741 |
|
19742 |
|
19743 |
|
19744 |
|
19745 |
|
19746 |
|
19747 |
|
19748 |
|
19749 | function createNodesFromMarkup(markup, handleScript) {
|
19750 | var node = dummyNode;
|
19751 | !!!dummyNode ? "development" !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
|
19752 | var nodeName = getNodeName(markup);
|
19753 |
|
19754 | var wrap = nodeName && getMarkupWrap(nodeName);
|
19755 | if (wrap) {
|
19756 | node.innerHTML = wrap[1] + markup + wrap[2];
|
19757 |
|
19758 | var wrapDepth = wrap[0];
|
19759 | while (wrapDepth--) {
|
19760 | node = node.lastChild;
|
19761 | }
|
19762 | } else {
|
19763 | node.innerHTML = markup;
|
19764 | }
|
19765 |
|
19766 | var scripts = node.getElementsByTagName('script');
|
19767 | if (scripts.length) {
|
19768 | !handleScript ? "development" !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
|
19769 | createArrayFromMixed(scripts).forEach(handleScript);
|
19770 | }
|
19771 |
|
19772 | var nodes = Array.from(node.childNodes);
|
19773 | while (node.lastChild) {
|
19774 | node.removeChild(node.lastChild);
|
19775 | }
|
19776 | return nodes;
|
19777 | }
|
19778 |
|
19779 | module.exports = createNodesFromMarkup;
|
19780 | },{"148":148,"152":152,"158":158,"162":162}],154:[function(_dereq_,module,exports){
|
19781 | "use strict";
|
19782 |
|
19783 |
|
19784 |
|
19785 |
|
19786 |
|
19787 |
|
19788 |
|
19789 |
|
19790 |
|
19791 |
|
19792 |
|
19793 |
|
19794 | function makeEmptyFunction(arg) {
|
19795 | return function () {
|
19796 | return arg;
|
19797 | };
|
19798 | }
|
19799 |
|
19800 |
|
19801 |
|
19802 |
|
19803 |
|
19804 |
|
19805 | var emptyFunction = function emptyFunction() {};
|
19806 |
|
19807 | emptyFunction.thatReturns = makeEmptyFunction;
|
19808 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
19809 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
19810 | emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
19811 | emptyFunction.thatReturnsThis = function () {
|
19812 | return this;
|
19813 | };
|
19814 | emptyFunction.thatReturnsArgument = function (arg) {
|
19815 | return arg;
|
19816 | };
|
19817 |
|
19818 | module.exports = emptyFunction;
|
19819 | },{}],155:[function(_dereq_,module,exports){
|
19820 |
|
19821 |
|
19822 |
|
19823 |
|
19824 |
|
19825 |
|
19826 |
|
19827 |
|
19828 |
|
19829 |
|
19830 | 'use strict';
|
19831 |
|
19832 | var emptyObject = {};
|
19833 |
|
19834 | if ("development" !== 'production') {
|
19835 | Object.freeze(emptyObject);
|
19836 | }
|
19837 |
|
19838 | module.exports = emptyObject;
|
19839 | },{}],156:[function(_dereq_,module,exports){
|
19840 |
|
19841 |
|
19842 |
|
19843 |
|
19844 |
|
19845 |
|
19846 |
|
19847 |
|
19848 |
|
19849 |
|
19850 | 'use strict';
|
19851 |
|
19852 |
|
19853 |
|
19854 |
|
19855 |
|
19856 | function focusNode(node) {
|
19857 |
|
19858 |
|
19859 |
|
19860 | try {
|
19861 | node.focus();
|
19862 | } catch (e) {}
|
19863 | }
|
19864 |
|
19865 | module.exports = focusNode;
|
19866 | },{}],157:[function(_dereq_,module,exports){
|
19867 | 'use strict';
|
19868 |
|
19869 |
|
19870 |
|
19871 |
|
19872 |
|
19873 |
|
19874 |
|
19875 |
|
19876 |
|
19877 |
|
19878 |
|
19879 |
|
19880 |
|
19881 |
|
19882 |
|
19883 |
|
19884 |
|
19885 |
|
19886 |
|
19887 |
|
19888 |
|
19889 | function getActiveElement() /*?DOMElement*/{
|
19890 | if (typeof document === 'undefined') {
|
19891 | return null;
|
19892 | }
|
19893 | try {
|
19894 | return document.activeElement || document.body;
|
19895 | } catch (e) {
|
19896 | return document.body;
|
19897 | }
|
19898 | }
|
19899 |
|
19900 | module.exports = getActiveElement;
|
19901 | },{}],158:[function(_dereq_,module,exports){
|
19902 | 'use strict';
|
19903 |
|
19904 |
|
19905 |
|
19906 |
|
19907 |
|
19908 |
|
19909 |
|
19910 |
|
19911 |
|
19912 |
|
19913 |
|
19914 |
|
19915 |
|
19916 | var ExecutionEnvironment = _dereq_(148);
|
19917 |
|
19918 | var invariant = _dereq_(162);
|
19919 |
|
19920 |
|
19921 |
|
19922 |
|
19923 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
19924 |
|
19925 |
|
19926 |
|
19927 |
|
19928 |
|
19929 |
|
19930 |
|
19931 |
|
19932 | var shouldWrap = {};
|
19933 |
|
19934 | var selectWrap = [1, '<select multiple="true">', '</select>'];
|
19935 | var tableWrap = [1, '<table>', '</table>'];
|
19936 | var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
19937 |
|
19938 | var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
|
19939 |
|
19940 | var markupWrap = {
|
19941 | '*': [1, '?<div>', '</div>'],
|
19942 |
|
19943 | 'area': [1, '<map>', '</map>'],
|
19944 | 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
19945 | 'legend': [1, '<fieldset>', '</fieldset>'],
|
19946 | 'param': [1, '<object>', '</object>'],
|
19947 | 'tr': [2, '<table><tbody>', '</tbody></table>'],
|
19948 |
|
19949 | 'optgroup': selectWrap,
|
19950 | 'option': selectWrap,
|
19951 |
|
19952 | 'caption': tableWrap,
|
19953 | 'colgroup': tableWrap,
|
19954 | 'tbody': tableWrap,
|
19955 | 'tfoot': tableWrap,
|
19956 | 'thead': tableWrap,
|
19957 |
|
19958 | 'td': trWrap,
|
19959 | 'th': trWrap
|
19960 | };
|
19961 |
|
19962 |
|
19963 |
|
19964 |
|
19965 | var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
|
19966 | svgElements.forEach(function (nodeName) {
|
19967 | markupWrap[nodeName] = svgWrap;
|
19968 | shouldWrap[nodeName] = true;
|
19969 | });
|
19970 |
|
19971 |
|
19972 |
|
19973 |
|
19974 |
|
19975 |
|
19976 |
|
19977 |
|
19978 |
|
19979 | function getMarkupWrap(nodeName) {
|
19980 | !!!dummyNode ? "development" !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
|
19981 | if (!markupWrap.hasOwnProperty(nodeName)) {
|
19982 | nodeName = '*';
|
19983 | }
|
19984 | if (!shouldWrap.hasOwnProperty(nodeName)) {
|
19985 | if (nodeName === '*') {
|
19986 | dummyNode.innerHTML = '<link />';
|
19987 | } else {
|
19988 | dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
|
19989 | }
|
19990 | shouldWrap[nodeName] = !dummyNode.firstChild;
|
19991 | }
|
19992 | return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
|
19993 | }
|
19994 |
|
19995 | module.exports = getMarkupWrap;
|
19996 | },{"148":148,"162":162}],159:[function(_dereq_,module,exports){
|
19997 |
|
19998 |
|
19999 |
|
20000 |
|
20001 |
|
20002 |
|
20003 |
|
20004 |
|
20005 |
|
20006 |
|
20007 |
|
20008 | 'use strict';
|
20009 |
|
20010 |
|
20011 |
|
20012 |
|
20013 |
|
20014 |
|
20015 |
|
20016 |
|
20017 |
|
20018 |
|
20019 |
|
20020 |
|
20021 | function getUnboundedScrollPosition(scrollable) {
|
20022 | if (scrollable === window) {
|
20023 | return {
|
20024 | x: window.pageXOffset || document.documentElement.scrollLeft,
|
20025 | y: window.pageYOffset || document.documentElement.scrollTop
|
20026 | };
|
20027 | }
|
20028 | return {
|
20029 | x: scrollable.scrollLeft,
|
20030 | y: scrollable.scrollTop
|
20031 | };
|
20032 | }
|
20033 |
|
20034 | module.exports = getUnboundedScrollPosition;
|
20035 | },{}],160:[function(_dereq_,module,exports){
|
20036 | 'use strict';
|
20037 |
|
20038 |
|
20039 |
|
20040 |
|
20041 |
|
20042 |
|
20043 |
|
20044 |
|
20045 |
|
20046 |
|
20047 |
|
20048 |
|
20049 | var _uppercasePattern = /([A-Z])/g;
|
20050 |
|
20051 |
|
20052 |
|
20053 |
|
20054 |
|
20055 |
|
20056 |
|
20057 |
|
20058 |
|
20059 |
|
20060 |
|
20061 |
|
20062 |
|
20063 | function hyphenate(string) {
|
20064 | return string.replace(_uppercasePattern, '-$1').toLowerCase();
|
20065 | }
|
20066 |
|
20067 | module.exports = hyphenate;
|
20068 | },{}],161:[function(_dereq_,module,exports){
|
20069 |
|
20070 |
|
20071 |
|
20072 |
|
20073 |
|
20074 |
|
20075 |
|
20076 |
|
20077 |
|
20078 |
|
20079 |
|
20080 | 'use strict';
|
20081 |
|
20082 | var hyphenate = _dereq_(160);
|
20083 |
|
20084 | var msPattern = /^ms-/;
|
20085 |
|
20086 |
|
20087 |
|
20088 |
|
20089 |
|
20090 |
|
20091 |
|
20092 |
|
20093 |
|
20094 |
|
20095 |
|
20096 |
|
20097 |
|
20098 |
|
20099 |
|
20100 |
|
20101 |
|
20102 | function hyphenateStyleName(string) {
|
20103 | return hyphenate(string).replace(msPattern, '-ms-');
|
20104 | }
|
20105 |
|
20106 | module.exports = hyphenateStyleName;
|
20107 | },{"160":160}],162:[function(_dereq_,module,exports){
|
20108 |
|
20109 |
|
20110 |
|
20111 |
|
20112 |
|
20113 |
|
20114 |
|
20115 |
|
20116 |
|
20117 |
|
20118 | 'use strict';
|
20119 |
|
20120 |
|
20121 |
|
20122 |
|
20123 |
|
20124 |
|
20125 |
|
20126 |
|
20127 |
|
20128 |
|
20129 |
|
20130 |
|
20131 | function invariant(condition, format, a, b, c, d, e, f) {
|
20132 | if ("development" !== 'production') {
|
20133 | if (format === undefined) {
|
20134 | throw new Error('invariant requires an error message argument');
|
20135 | }
|
20136 | }
|
20137 |
|
20138 | if (!condition) {
|
20139 | var error;
|
20140 | if (format === undefined) {
|
20141 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
20142 | } else {
|
20143 | var args = [a, b, c, d, e, f];
|
20144 | var argIndex = 0;
|
20145 | error = new Error(format.replace(/%s/g, function () {
|
20146 | return args[argIndex++];
|
20147 | }));
|
20148 | error.name = 'Invariant Violation';
|
20149 | }
|
20150 |
|
20151 | error.framesToPop = 1;
|
20152 | throw error;
|
20153 | }
|
20154 | }
|
20155 |
|
20156 | module.exports = invariant;
|
20157 | },{}],163:[function(_dereq_,module,exports){
|
20158 | 'use strict';
|
20159 |
|
20160 |
|
20161 |
|
20162 |
|
20163 |
|
20164 |
|
20165 |
|
20166 |
|
20167 |
|
20168 |
|
20169 |
|
20170 |
|
20171 |
|
20172 |
|
20173 |
|
20174 |
|
20175 | function isNode(object) {
|
20176 | return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
|
20177 | }
|
20178 |
|
20179 | module.exports = isNode;
|
20180 | },{}],164:[function(_dereq_,module,exports){
|
20181 | 'use strict';
|
20182 |
|
20183 |
|
20184 |
|
20185 |
|
20186 |
|
20187 |
|
20188 |
|
20189 |
|
20190 |
|
20191 |
|
20192 |
|
20193 |
|
20194 | var isNode = _dereq_(163);
|
20195 |
|
20196 |
|
20197 |
|
20198 |
|
20199 |
|
20200 | function isTextNode(object) {
|
20201 | return isNode(object) && object.nodeType == 3;
|
20202 | }
|
20203 |
|
20204 | module.exports = isTextNode;
|
20205 | },{"163":163}],165:[function(_dereq_,module,exports){
|
20206 |
|
20207 |
|
20208 |
|
20209 |
|
20210 |
|
20211 |
|
20212 |
|
20213 |
|
20214 |
|
20215 |
|
20216 |
|
20217 | 'use strict';
|
20218 |
|
20219 | var invariant = _dereq_(162);
|
20220 |
|
20221 |
|
20222 |
|
20223 |
|
20224 |
|
20225 |
|
20226 |
|
20227 |
|
20228 |
|
20229 |
|
20230 |
|
20231 |
|
20232 |
|
20233 |
|
20234 |
|
20235 |
|
20236 |
|
20237 |
|
20238 |
|
20239 | var keyMirror = function keyMirror(obj) {
|
20240 | var ret = {};
|
20241 | var key;
|
20242 | !(obj instanceof Object && !Array.isArray(obj)) ? "development" !== 'production' ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : void 0;
|
20243 | for (key in obj) {
|
20244 | if (!obj.hasOwnProperty(key)) {
|
20245 | continue;
|
20246 | }
|
20247 | ret[key] = key;
|
20248 | }
|
20249 | return ret;
|
20250 | };
|
20251 |
|
20252 | module.exports = keyMirror;
|
20253 | },{"162":162}],166:[function(_dereq_,module,exports){
|
20254 | "use strict";
|
20255 |
|
20256 |
|
20257 |
|
20258 |
|
20259 |
|
20260 |
|
20261 |
|
20262 |
|
20263 |
|
20264 |
|
20265 |
|
20266 |
|
20267 |
|
20268 |
|
20269 |
|
20270 |
|
20271 |
|
20272 |
|
20273 |
|
20274 |
|
20275 |
|
20276 | var keyOf = function keyOf(oneKeyObj) {
|
20277 | var key;
|
20278 | for (key in oneKeyObj) {
|
20279 | if (!oneKeyObj.hasOwnProperty(key)) {
|
20280 | continue;
|
20281 | }
|
20282 | return key;
|
20283 | }
|
20284 | return null;
|
20285 | };
|
20286 |
|
20287 | module.exports = keyOf;
|
20288 | },{}],167:[function(_dereq_,module,exports){
|
20289 |
|
20290 |
|
20291 |
|
20292 |
|
20293 |
|
20294 |
|
20295 |
|
20296 |
|
20297 |
|
20298 |
|
20299 |
|
20300 |
|
20301 | 'use strict';
|
20302 |
|
20303 |
|
20304 |
|
20305 |
|
20306 |
|
20307 | function memoizeStringOnly(callback) {
|
20308 | var cache = {};
|
20309 | return function (string) {
|
20310 | if (!cache.hasOwnProperty(string)) {
|
20311 | cache[string] = callback.call(this, string);
|
20312 | }
|
20313 | return cache[string];
|
20314 | };
|
20315 | }
|
20316 |
|
20317 | module.exports = memoizeStringOnly;
|
20318 | },{}],168:[function(_dereq_,module,exports){
|
20319 |
|
20320 |
|
20321 |
|
20322 |
|
20323 |
|
20324 |
|
20325 |
|
20326 |
|
20327 |
|
20328 |
|
20329 |
|
20330 | 'use strict';
|
20331 |
|
20332 | var ExecutionEnvironment = _dereq_(148);
|
20333 |
|
20334 | var performance;
|
20335 |
|
20336 | if (ExecutionEnvironment.canUseDOM) {
|
20337 | performance = window.performance || window.msPerformance || window.webkitPerformance;
|
20338 | }
|
20339 |
|
20340 | module.exports = performance || {};
|
20341 | },{"148":148}],169:[function(_dereq_,module,exports){
|
20342 | 'use strict';
|
20343 |
|
20344 |
|
20345 |
|
20346 |
|
20347 |
|
20348 |
|
20349 |
|
20350 |
|
20351 |
|
20352 |
|
20353 |
|
20354 |
|
20355 | var performance = _dereq_(168);
|
20356 |
|
20357 | var performanceNow;
|
20358 |
|
20359 |
|
20360 |
|
20361 |
|
20362 |
|
20363 |
|
20364 | if (performance.now) {
|
20365 | performanceNow = function performanceNow() {
|
20366 | return performance.now();
|
20367 | };
|
20368 | } else {
|
20369 | performanceNow = function performanceNow() {
|
20370 | return Date.now();
|
20371 | };
|
20372 | }
|
20373 |
|
20374 | module.exports = performanceNow;
|
20375 | },{"168":168}],170:[function(_dereq_,module,exports){
|
20376 |
|
20377 |
|
20378 |
|
20379 |
|
20380 |
|
20381 |
|
20382 |
|
20383 |
|
20384 |
|
20385 |
|
20386 |
|
20387 |
|
20388 |
|
20389 |
|
20390 | 'use strict';
|
20391 |
|
20392 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
20393 |
|
20394 |
|
20395 |
|
20396 |
|
20397 |
|
20398 | function is(x, y) {
|
20399 |
|
20400 | if (x === y) {
|
20401 |
|
20402 |
|
20403 | return x !== 0 || 1 / x === 1 / y;
|
20404 | } else {
|
20405 |
|
20406 | return x !== x && y !== y;
|
20407 | }
|
20408 | }
|
20409 |
|
20410 |
|
20411 |
|
20412 |
|
20413 |
|
20414 |
|
20415 | function shallowEqual(objA, objB) {
|
20416 | if (is(objA, objB)) {
|
20417 | return true;
|
20418 | }
|
20419 |
|
20420 | if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
20421 | return false;
|
20422 | }
|
20423 |
|
20424 | var keysA = Object.keys(objA);
|
20425 | var keysB = Object.keys(objB);
|
20426 |
|
20427 | if (keysA.length !== keysB.length) {
|
20428 | return false;
|
20429 | }
|
20430 |
|
20431 |
|
20432 | for (var i = 0; i < keysA.length; i++) {
|
20433 | if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
20434 | return false;
|
20435 | }
|
20436 | }
|
20437 |
|
20438 | return true;
|
20439 | }
|
20440 |
|
20441 | module.exports = shallowEqual;
|
20442 | },{}],171:[function(_dereq_,module,exports){
|
20443 |
|
20444 |
|
20445 |
|
20446 |
|
20447 |
|
20448 |
|
20449 |
|
20450 |
|
20451 |
|
20452 |
|
20453 | 'use strict';
|
20454 |
|
20455 | var emptyFunction = _dereq_(154);
|
20456 |
|
20457 |
|
20458 |
|
20459 |
|
20460 |
|
20461 |
|
20462 |
|
20463 |
|
20464 | var warning = emptyFunction;
|
20465 |
|
20466 | if ("development" !== 'production') {
|
20467 | (function () {
|
20468 | var printWarning = function printWarning(format) {
|
20469 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
20470 | args[_key - 1] = arguments[_key];
|
20471 | }
|
20472 |
|
20473 | var argIndex = 0;
|
20474 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
20475 | return args[argIndex++];
|
20476 | });
|
20477 | if (typeof console !== 'undefined') {
|
20478 | console.error(message);
|
20479 | }
|
20480 | try {
|
20481 |
|
20482 |
|
20483 |
|
20484 | throw new Error(message);
|
20485 | } catch (x) {}
|
20486 | };
|
20487 |
|
20488 | warning = function warning(condition, format) {
|
20489 | if (format === undefined) {
|
20490 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
20491 | }
|
20492 |
|
20493 | if (format.indexOf('Failed Composite propType: ') === 0) {
|
20494 | return;
|
20495 | }
|
20496 |
|
20497 | if (!condition) {
|
20498 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
20499 | args[_key2 - 2] = arguments[_key2];
|
20500 | }
|
20501 |
|
20502 | printWarning.apply(undefined, [format].concat(args));
|
20503 | }
|
20504 | };
|
20505 | })();
|
20506 | }
|
20507 |
|
20508 | module.exports = warning;
|
20509 | },{"154":154}],172:[function(_dereq_,module,exports){
|
20510 | 'use strict';
|
20511 |
|
20512 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
20513 | var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
20514 |
|
20515 | function toObject(val) {
|
20516 | if (val === null || val === undefined) {
|
20517 | throw new TypeError('Object.assign cannot be called with null or undefined');
|
20518 | }
|
20519 |
|
20520 | return Object(val);
|
20521 | }
|
20522 |
|
20523 | function shouldUseNative() {
|
20524 | try {
|
20525 | if (!Object.assign) {
|
20526 | return false;
|
20527 | }
|
20528 |
|
20529 |
|
20530 |
|
20531 |
|
20532 | var test1 = new String('abc');
|
20533 | test1[5] = 'de';
|
20534 | if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
20535 | return false;
|
20536 | }
|
20537 |
|
20538 |
|
20539 | var test2 = {};
|
20540 | for (var i = 0; i < 10; i++) {
|
20541 | test2['_' + String.fromCharCode(i)] = i;
|
20542 | }
|
20543 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
20544 | return test2[n];
|
20545 | });
|
20546 | if (order2.join('') !== '0123456789') {
|
20547 | return false;
|
20548 | }
|
20549 |
|
20550 |
|
20551 | var test3 = {};
|
20552 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
20553 | test3[letter] = letter;
|
20554 | });
|
20555 | if (Object.keys(Object.assign({}, test3)).join('') !==
|
20556 | 'abcdefghijklmnopqrst') {
|
20557 | return false;
|
20558 | }
|
20559 |
|
20560 | return true;
|
20561 | } catch (e) {
|
20562 |
|
20563 | return false;
|
20564 | }
|
20565 | }
|
20566 |
|
20567 | module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
20568 | var from;
|
20569 | var to = toObject(target);
|
20570 | var symbols;
|
20571 |
|
20572 | for (var s = 1; s < arguments.length; s++) {
|
20573 | from = Object(arguments[s]);
|
20574 |
|
20575 | for (var key in from) {
|
20576 | if (hasOwnProperty.call(from, key)) {
|
20577 | to[key] = from[key];
|
20578 | }
|
20579 | }
|
20580 |
|
20581 | if (Object.getOwnPropertySymbols) {
|
20582 | symbols = Object.getOwnPropertySymbols(from);
|
20583 | for (var i = 0; i < symbols.length; i++) {
|
20584 | if (propIsEnumerable.call(from, symbols[i])) {
|
20585 | to[symbols[i]] = from[symbols[i]];
|
20586 | }
|
20587 | }
|
20588 | }
|
20589 | }
|
20590 |
|
20591 | return to;
|
20592 | };
|
20593 |
|
20594 | },{}]},{},[94])(94)
|
20595 | }); |
\ | No newline at end of file |