hyper-console 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3987 @@
1
+ /**
2
+ * React v15.5.4
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
+ * Copyright 2013-present, Facebook, Inc.
7
+ * All rights reserved.
8
+ *
9
+ * This source code is licensed under the BSD-style license found in the
10
+ * LICENSE file in the root directory of this source tree. An additional grant
11
+ * of patent rights can be found in the PATENTS file in the same directory.
12
+ *
13
+ *
14
+ */
15
+
16
+ 'use strict';
17
+
18
+ /**
19
+ * Escape and wrap key so it is safe to use as a reactid
20
+ *
21
+ * @param {string} key to be escaped.
22
+ * @return {string} the escaped key.
23
+ */
24
+
25
+ function escape(key) {
26
+ var escapeRegex = /[=:]/g;
27
+ var escaperLookup = {
28
+ '=': '=0',
29
+ ':': '=2'
30
+ };
31
+ var escapedString = ('' + key).replace(escapeRegex, function (match) {
32
+ return escaperLookup[match];
33
+ });
34
+
35
+ return '$' + escapedString;
36
+ }
37
+
38
+ /**
39
+ * Unescape and unwrap key for human-readable display
40
+ *
41
+ * @param {string} key to unescape.
42
+ * @return {string} the unescaped key.
43
+ */
44
+ function unescape(key) {
45
+ var unescapeRegex = /(=0|=2)/g;
46
+ var unescaperLookup = {
47
+ '=0': '=',
48
+ '=2': ':'
49
+ };
50
+ var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
51
+
52
+ return ('' + keySubstring).replace(unescapeRegex, function (match) {
53
+ return unescaperLookup[match];
54
+ });
55
+ }
56
+
57
+ var KeyEscapeUtils = {
58
+ escape: escape,
59
+ unescape: unescape
60
+ };
61
+
62
+ module.exports = KeyEscapeUtils;
63
+ },{}],2:[function(_dereq_,module,exports){
64
+ /**
65
+ * Copyright 2013-present, Facebook, Inc.
66
+ * All rights reserved.
67
+ *
68
+ * This source code is licensed under the BSD-style license found in the
69
+ * LICENSE file in the root directory of this source tree. An additional grant
70
+ * of patent rights can be found in the PATENTS file in the same directory.
71
+ *
72
+ *
73
+ */
74
+
75
+ 'use strict';
76
+
77
+ var _prodInvariant = _dereq_(25);
78
+
79
+ var invariant = _dereq_(29);
80
+
81
+ /**
82
+ * Static poolers. Several custom versions for each potential number of
83
+ * arguments. A completely generic pooler is easy to implement, but would
84
+ * require accessing the `arguments` object. In each of these, `this` refers to
85
+ * the Class itself, not an instance. If any others are needed, simply add them
86
+ * here, or in their own files.
87
+ */
88
+ var oneArgumentPooler = function (copyFieldsFrom) {
89
+ var Klass = this;
90
+ if (Klass.instancePool.length) {
91
+ var instance = Klass.instancePool.pop();
92
+ Klass.call(instance, copyFieldsFrom);
93
+ return instance;
94
+ } else {
95
+ return new Klass(copyFieldsFrom);
96
+ }
97
+ };
98
+
99
+ var twoArgumentPooler = function (a1, a2) {
100
+ var Klass = this;
101
+ if (Klass.instancePool.length) {
102
+ var instance = Klass.instancePool.pop();
103
+ Klass.call(instance, a1, a2);
104
+ return instance;
105
+ } else {
106
+ return new Klass(a1, a2);
107
+ }
108
+ };
109
+
110
+ var threeArgumentPooler = function (a1, a2, a3) {
111
+ var Klass = this;
112
+ if (Klass.instancePool.length) {
113
+ var instance = Klass.instancePool.pop();
114
+ Klass.call(instance, a1, a2, a3);
115
+ return instance;
116
+ } else {
117
+ return new Klass(a1, a2, a3);
118
+ }
119
+ };
120
+
121
+ var fourArgumentPooler = function (a1, a2, a3, a4) {
122
+ var Klass = this;
123
+ if (Klass.instancePool.length) {
124
+ var instance = Klass.instancePool.pop();
125
+ Klass.call(instance, a1, a2, a3, a4);
126
+ return instance;
127
+ } else {
128
+ return new Klass(a1, a2, a3, a4);
129
+ }
130
+ };
131
+
132
+ var standardReleaser = function (instance) {
133
+ var Klass = this;
134
+ !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
135
+ instance.destructor();
136
+ if (Klass.instancePool.length < Klass.poolSize) {
137
+ Klass.instancePool.push(instance);
138
+ }
139
+ };
140
+
141
+ var DEFAULT_POOL_SIZE = 10;
142
+ var DEFAULT_POOLER = oneArgumentPooler;
143
+
144
+ /**
145
+ * Augments `CopyConstructor` to be a poolable class, augmenting only the class
146
+ * itself (statically) not adding any prototypical fields. Any CopyConstructor
147
+ * you give this may have a `poolSize` property, and will look for a
148
+ * prototypical `destructor` on instances.
149
+ *
150
+ * @param {Function} CopyConstructor Constructor that can be used to reset.
151
+ * @param {Function} pooler Customizable pooler.
152
+ */
153
+ var addPoolingTo = function (CopyConstructor, pooler) {
154
+ // Casting as any so that flow ignores the actual implementation and trusts
155
+ // it to match the type we declared
156
+ var NewKlass = CopyConstructor;
157
+ NewKlass.instancePool = [];
158
+ NewKlass.getPooled = pooler || DEFAULT_POOLER;
159
+ if (!NewKlass.poolSize) {
160
+ NewKlass.poolSize = DEFAULT_POOL_SIZE;
161
+ }
162
+ NewKlass.release = standardReleaser;
163
+ return NewKlass;
164
+ };
165
+
166
+ var PooledClass = {
167
+ addPoolingTo: addPoolingTo,
168
+ oneArgumentPooler: oneArgumentPooler,
169
+ twoArgumentPooler: twoArgumentPooler,
170
+ threeArgumentPooler: threeArgumentPooler,
171
+ fourArgumentPooler: fourArgumentPooler
172
+ };
173
+
174
+ module.exports = PooledClass;
175
+ },{"25":25,"29":29}],3:[function(_dereq_,module,exports){
176
+ /**
177
+ * Copyright 2013-present, Facebook, Inc.
178
+ * All rights reserved.
179
+ *
180
+ * This source code is licensed under the BSD-style license found in the
181
+ * LICENSE file in the root directory of this source tree. An additional grant
182
+ * of patent rights can be found in the PATENTS file in the same directory.
183
+ *
184
+ */
185
+
186
+ 'use strict';
187
+
188
+ var _assign = _dereq_(31);
189
+
190
+ var ReactChildren = _dereq_(4);
191
+ var ReactComponent = _dereq_(6);
192
+ var ReactPureComponent = _dereq_(17);
193
+ var ReactClass = _dereq_(5);
194
+ var ReactDOMFactories = _dereq_(9);
195
+ var ReactElement = _dereq_(10);
196
+ var ReactPropTypes = _dereq_(15);
197
+ var ReactVersion = _dereq_(19);
198
+
199
+ var onlyChild = _dereq_(24);
200
+ var warning = _dereq_(30);
201
+
202
+ var createElement = ReactElement.createElement;
203
+ var createFactory = ReactElement.createFactory;
204
+ var cloneElement = ReactElement.cloneElement;
205
+
206
+ if ("development" !== 'production') {
207
+ var canDefineProperty = _dereq_(20);
208
+ var ReactElementValidator = _dereq_(12);
209
+ var didWarnPropTypesDeprecated = false;
210
+ createElement = ReactElementValidator.createElement;
211
+ createFactory = ReactElementValidator.createFactory;
212
+ cloneElement = ReactElementValidator.cloneElement;
213
+ }
214
+
215
+ var __spread = _assign;
216
+
217
+ if ("development" !== 'production') {
218
+ var warned = false;
219
+ __spread = function () {
220
+ "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;
221
+ warned = true;
222
+ return _assign.apply(null, arguments);
223
+ };
224
+ }
225
+
226
+ var React = {
227
+
228
+ // Modern
229
+
230
+ Children: {
231
+ map: ReactChildren.map,
232
+ forEach: ReactChildren.forEach,
233
+ count: ReactChildren.count,
234
+ toArray: ReactChildren.toArray,
235
+ only: onlyChild
236
+ },
237
+
238
+ Component: ReactComponent,
239
+ PureComponent: ReactPureComponent,
240
+
241
+ createElement: createElement,
242
+ cloneElement: cloneElement,
243
+ isValidElement: ReactElement.isValidElement,
244
+
245
+ // Classic
246
+
247
+ PropTypes: ReactPropTypes,
248
+ createClass: ReactClass.createClass,
249
+ createFactory: createFactory,
250
+ createMixin: function (mixin) {
251
+ // Currently a noop. Will be used to validate and trace mixins.
252
+ return mixin;
253
+ },
254
+
255
+ // This looks DOM specific but these are actually isomorphic helpers
256
+ // since they are just generating DOM strings.
257
+ DOM: ReactDOMFactories,
258
+
259
+ version: ReactVersion,
260
+
261
+ // Deprecated hook for JSX spread, don't use this for anything.
262
+ __spread: __spread
263
+ };
264
+
265
+ // TODO: Fix tests so that this deprecation warning doesn't cause failures.
266
+ if ("development" !== 'production') {
267
+ if (canDefineProperty) {
268
+ Object.defineProperty(React, 'PropTypes', {
269
+ get: function () {
270
+ "development" !== 'production' ? warning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated. Use ' + 'the prop-types package from npm instead.') : void 0;
271
+ didWarnPropTypesDeprecated = true;
272
+ return ReactPropTypes;
273
+ }
274
+ });
275
+ }
276
+ }
277
+
278
+ module.exports = React;
279
+ },{"10":10,"12":12,"15":15,"17":17,"19":19,"20":20,"24":24,"30":30,"31":31,"4":4,"5":5,"6":6,"9":9}],4:[function(_dereq_,module,exports){
280
+ /**
281
+ * Copyright 2013-present, Facebook, Inc.
282
+ * All rights reserved.
283
+ *
284
+ * This source code is licensed under the BSD-style license found in the
285
+ * LICENSE file in the root directory of this source tree. An additional grant
286
+ * of patent rights can be found in the PATENTS file in the same directory.
287
+ *
288
+ */
289
+
290
+ 'use strict';
291
+
292
+ var PooledClass = _dereq_(2);
293
+ var ReactElement = _dereq_(10);
294
+
295
+ var emptyFunction = _dereq_(27);
296
+ var traverseAllChildren = _dereq_(26);
297
+
298
+ var twoArgumentPooler = PooledClass.twoArgumentPooler;
299
+ var fourArgumentPooler = PooledClass.fourArgumentPooler;
300
+
301
+ var userProvidedKeyEscapeRegex = /\/+/g;
302
+ function escapeUserProvidedKey(text) {
303
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
304
+ }
305
+
306
+ /**
307
+ * PooledClass representing the bookkeeping associated with performing a child
308
+ * traversal. Allows avoiding binding callbacks.
309
+ *
310
+ * @constructor ForEachBookKeeping
311
+ * @param {!function} forEachFunction Function to perform traversal with.
312
+ * @param {?*} forEachContext Context to perform context with.
313
+ */
314
+ function ForEachBookKeeping(forEachFunction, forEachContext) {
315
+ this.func = forEachFunction;
316
+ this.context = forEachContext;
317
+ this.count = 0;
318
+ }
319
+ ForEachBookKeeping.prototype.destructor = function () {
320
+ this.func = null;
321
+ this.context = null;
322
+ this.count = 0;
323
+ };
324
+ PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
325
+
326
+ function forEachSingleChild(bookKeeping, child, name) {
327
+ var func = bookKeeping.func,
328
+ context = bookKeeping.context;
329
+
330
+ func.call(context, child, bookKeeping.count++);
331
+ }
332
+
333
+ /**
334
+ * Iterates through children that are typically specified as `props.children`.
335
+ *
336
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
337
+ *
338
+ * The provided forEachFunc(child, index) will be called for each
339
+ * leaf child.
340
+ *
341
+ * @param {?*} children Children tree container.
342
+ * @param {function(*, int)} forEachFunc
343
+ * @param {*} forEachContext Context for forEachContext.
344
+ */
345
+ function forEachChildren(children, forEachFunc, forEachContext) {
346
+ if (children == null) {
347
+ return children;
348
+ }
349
+ var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
350
+ traverseAllChildren(children, forEachSingleChild, traverseContext);
351
+ ForEachBookKeeping.release(traverseContext);
352
+ }
353
+
354
+ /**
355
+ * PooledClass representing the bookkeeping associated with performing a child
356
+ * mapping. Allows avoiding binding callbacks.
357
+ *
358
+ * @constructor MapBookKeeping
359
+ * @param {!*} mapResult Object containing the ordered map of results.
360
+ * @param {!function} mapFunction Function to perform mapping with.
361
+ * @param {?*} mapContext Context to perform mapping with.
362
+ */
363
+ function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
364
+ this.result = mapResult;
365
+ this.keyPrefix = keyPrefix;
366
+ this.func = mapFunction;
367
+ this.context = mapContext;
368
+ this.count = 0;
369
+ }
370
+ MapBookKeeping.prototype.destructor = function () {
371
+ this.result = null;
372
+ this.keyPrefix = null;
373
+ this.func = null;
374
+ this.context = null;
375
+ this.count = 0;
376
+ };
377
+ PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
378
+
379
+ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
380
+ var result = bookKeeping.result,
381
+ keyPrefix = bookKeeping.keyPrefix,
382
+ func = bookKeeping.func,
383
+ context = bookKeeping.context;
384
+
385
+
386
+ var mappedChild = func.call(context, child, bookKeeping.count++);
387
+ if (Array.isArray(mappedChild)) {
388
+ mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
389
+ } else if (mappedChild != null) {
390
+ if (ReactElement.isValidElement(mappedChild)) {
391
+ mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
392
+ // Keep both the (mapped) and old keys if they differ, just as
393
+ // traverseAllChildren used to do for objects as children
394
+ keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
395
+ }
396
+ result.push(mappedChild);
397
+ }
398
+ }
399
+
400
+ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
401
+ var escapedPrefix = '';
402
+ if (prefix != null) {
403
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
404
+ }
405
+ var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
406
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
407
+ MapBookKeeping.release(traverseContext);
408
+ }
409
+
410
+ /**
411
+ * Maps children that are typically specified as `props.children`.
412
+ *
413
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
414
+ *
415
+ * The provided mapFunction(child, key, index) will be called for each
416
+ * leaf child.
417
+ *
418
+ * @param {?*} children Children tree container.
419
+ * @param {function(*, int)} func The map function.
420
+ * @param {*} context Context for mapFunction.
421
+ * @return {object} Object containing the ordered map of results.
422
+ */
423
+ function mapChildren(children, func, context) {
424
+ if (children == null) {
425
+ return children;
426
+ }
427
+ var result = [];
428
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
429
+ return result;
430
+ }
431
+
432
+ function forEachSingleChildDummy(traverseContext, child, name) {
433
+ return null;
434
+ }
435
+
436
+ /**
437
+ * Count the number of children that are typically specified as
438
+ * `props.children`.
439
+ *
440
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
441
+ *
442
+ * @param {?*} children Children tree container.
443
+ * @return {number} The number of children.
444
+ */
445
+ function countChildren(children, context) {
446
+ return traverseAllChildren(children, forEachSingleChildDummy, null);
447
+ }
448
+
449
+ /**
450
+ * Flatten a children object (typically specified as `props.children`) and
451
+ * return an array with appropriately re-keyed children.
452
+ *
453
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
454
+ */
455
+ function toArray(children) {
456
+ var result = [];
457
+ mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
458
+ return result;
459
+ }
460
+
461
+ var ReactChildren = {
462
+ forEach: forEachChildren,
463
+ map: mapChildren,
464
+ mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
465
+ count: countChildren,
466
+ toArray: toArray
467
+ };
468
+
469
+ module.exports = ReactChildren;
470
+ },{"10":10,"2":2,"26":26,"27":27}],5:[function(_dereq_,module,exports){
471
+ /**
472
+ * Copyright 2013-present, Facebook, Inc.
473
+ * All rights reserved.
474
+ *
475
+ * This source code is licensed under the BSD-style license found in the
476
+ * LICENSE file in the root directory of this source tree. An additional grant
477
+ * of patent rights can be found in the PATENTS file in the same directory.
478
+ *
479
+ */
480
+
481
+ 'use strict';
482
+
483
+ var _prodInvariant = _dereq_(25),
484
+ _assign = _dereq_(31);
485
+
486
+ var ReactComponent = _dereq_(6);
487
+ var ReactElement = _dereq_(10);
488
+ var ReactPropTypeLocationNames = _dereq_(14);
489
+ var ReactNoopUpdateQueue = _dereq_(13);
490
+
491
+ var emptyObject = _dereq_(28);
492
+ var invariant = _dereq_(29);
493
+ var warning = _dereq_(30);
494
+
495
+ var MIXINS_KEY = 'mixins';
496
+
497
+ // Helper function to allow the creation of anonymous functions which do not
498
+ // have .name set to the name of the variable being assigned to.
499
+ function identity(fn) {
500
+ return fn;
501
+ }
502
+
503
+ /**
504
+ * Policies that describe methods in `ReactClassInterface`.
505
+ */
506
+
507
+
508
+ var injectedMixins = [];
509
+
510
+ /**
511
+ * Composite components are higher-level components that compose other composite
512
+ * or host components.
513
+ *
514
+ * To create a new type of `ReactClass`, pass a specification of
515
+ * your new class to `React.createClass`. The only requirement of your class
516
+ * specification is that you implement a `render` method.
517
+ *
518
+ * var MyComponent = React.createClass({
519
+ * render: function() {
520
+ * return <div>Hello World</div>;
521
+ * }
522
+ * });
523
+ *
524
+ * The class specification supports a specific protocol of methods that have
525
+ * special meaning (e.g. `render`). See `ReactClassInterface` for
526
+ * more the comprehensive protocol. Any other properties and methods in the
527
+ * class specification will be available on the prototype.
528
+ *
529
+ * @interface ReactClassInterface
530
+ * @internal
531
+ */
532
+ var ReactClassInterface = {
533
+
534
+ /**
535
+ * An array of Mixin objects to include when defining your component.
536
+ *
537
+ * @type {array}
538
+ * @optional
539
+ */
540
+ mixins: 'DEFINE_MANY',
541
+
542
+ /**
543
+ * An object containing properties and methods that should be defined on
544
+ * the component's constructor instead of its prototype (static methods).
545
+ *
546
+ * @type {object}
547
+ * @optional
548
+ */
549
+ statics: 'DEFINE_MANY',
550
+
551
+ /**
552
+ * Definition of prop types for this component.
553
+ *
554
+ * @type {object}
555
+ * @optional
556
+ */
557
+ propTypes: 'DEFINE_MANY',
558
+
559
+ /**
560
+ * Definition of context types for this component.
561
+ *
562
+ * @type {object}
563
+ * @optional
564
+ */
565
+ contextTypes: 'DEFINE_MANY',
566
+
567
+ /**
568
+ * Definition of context types this component sets for its children.
569
+ *
570
+ * @type {object}
571
+ * @optional
572
+ */
573
+ childContextTypes: 'DEFINE_MANY',
574
+
575
+ // ==== Definition methods ====
576
+
577
+ /**
578
+ * Invoked when the component is mounted. Values in the mapping will be set on
579
+ * `this.props` if that prop is not specified (i.e. using an `in` check).
580
+ *
581
+ * This method is invoked before `getInitialState` and therefore cannot rely
582
+ * on `this.state` or use `this.setState`.
583
+ *
584
+ * @return {object}
585
+ * @optional
586
+ */
587
+ getDefaultProps: 'DEFINE_MANY_MERGED',
588
+
589
+ /**
590
+ * Invoked once before the component is mounted. The return value will be used
591
+ * as the initial value of `this.state`.
592
+ *
593
+ * getInitialState: function() {
594
+ * return {
595
+ * isOn: false,
596
+ * fooBaz: new BazFoo()
597
+ * }
598
+ * }
599
+ *
600
+ * @return {object}
601
+ * @optional
602
+ */
603
+ getInitialState: 'DEFINE_MANY_MERGED',
604
+
605
+ /**
606
+ * @return {object}
607
+ * @optional
608
+ */
609
+ getChildContext: 'DEFINE_MANY_MERGED',
610
+
611
+ /**
612
+ * Uses props from `this.props` and state from `this.state` to render the
613
+ * structure of the component.
614
+ *
615
+ * No guarantees are made about when or how often this method is invoked, so
616
+ * it must not have side effects.
617
+ *
618
+ * render: function() {
619
+ * var name = this.props.name;
620
+ * return <div>Hello, {name}!</div>;
621
+ * }
622
+ *
623
+ * @return {ReactComponent}
624
+ * @required
625
+ */
626
+ render: 'DEFINE_ONCE',
627
+
628
+ // ==== Delegate methods ====
629
+
630
+ /**
631
+ * Invoked when the component is initially created and about to be mounted.
632
+ * This may have side effects, but any external subscriptions or data created
633
+ * by this method must be cleaned up in `componentWillUnmount`.
634
+ *
635
+ * @optional
636
+ */
637
+ componentWillMount: 'DEFINE_MANY',
638
+
639
+ /**
640
+ * Invoked when the component has been mounted and has a DOM representation.
641
+ * However, there is no guarantee that the DOM node is in the document.
642
+ *
643
+ * Use this as an opportunity to operate on the DOM when the component has
644
+ * been mounted (initialized and rendered) for the first time.
645
+ *
646
+ * @param {DOMElement} rootNode DOM element representing the component.
647
+ * @optional
648
+ */
649
+ componentDidMount: 'DEFINE_MANY',
650
+
651
+ /**
652
+ * Invoked before the component receives new props.
653
+ *
654
+ * Use this as an opportunity to react to a prop transition by updating the
655
+ * state using `this.setState`. Current props are accessed via `this.props`.
656
+ *
657
+ * componentWillReceiveProps: function(nextProps, nextContext) {
658
+ * this.setState({
659
+ * likesIncreasing: nextProps.likeCount > this.props.likeCount
660
+ * });
661
+ * }
662
+ *
663
+ * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
664
+ * transition may cause a state change, but the opposite is not true. If you
665
+ * need it, you are probably looking for `componentWillUpdate`.
666
+ *
667
+ * @param {object} nextProps
668
+ * @optional
669
+ */
670
+ componentWillReceiveProps: 'DEFINE_MANY',
671
+
672
+ /**
673
+ * Invoked while deciding if the component should be updated as a result of
674
+ * receiving new props, state and/or context.
675
+ *
676
+ * Use this as an opportunity to `return false` when you're certain that the
677
+ * transition to the new props/state/context will not require a component
678
+ * update.
679
+ *
680
+ * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
681
+ * return !equal(nextProps, this.props) ||
682
+ * !equal(nextState, this.state) ||
683
+ * !equal(nextContext, this.context);
684
+ * }
685
+ *
686
+ * @param {object} nextProps
687
+ * @param {?object} nextState
688
+ * @param {?object} nextContext
689
+ * @return {boolean} True if the component should update.
690
+ * @optional
691
+ */
692
+ shouldComponentUpdate: 'DEFINE_ONCE',
693
+
694
+ /**
695
+ * Invoked when the component is about to update due to a transition from
696
+ * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
697
+ * and `nextContext`.
698
+ *
699
+ * Use this as an opportunity to perform preparation before an update occurs.
700
+ *
701
+ * NOTE: You **cannot** use `this.setState()` in this method.
702
+ *
703
+ * @param {object} nextProps
704
+ * @param {?object} nextState
705
+ * @param {?object} nextContext
706
+ * @param {ReactReconcileTransaction} transaction
707
+ * @optional
708
+ */
709
+ componentWillUpdate: 'DEFINE_MANY',
710
+
711
+ /**
712
+ * Invoked when the component's DOM representation has been updated.
713
+ *
714
+ * Use this as an opportunity to operate on the DOM when the component has
715
+ * been updated.
716
+ *
717
+ * @param {object} prevProps
718
+ * @param {?object} prevState
719
+ * @param {?object} prevContext
720
+ * @param {DOMElement} rootNode DOM element representing the component.
721
+ * @optional
722
+ */
723
+ componentDidUpdate: 'DEFINE_MANY',
724
+
725
+ /**
726
+ * Invoked when the component is about to be removed from its parent and have
727
+ * its DOM representation destroyed.
728
+ *
729
+ * Use this as an opportunity to deallocate any external resources.
730
+ *
731
+ * NOTE: There is no `componentDidUnmount` since your component will have been
732
+ * destroyed by that point.
733
+ *
734
+ * @optional
735
+ */
736
+ componentWillUnmount: 'DEFINE_MANY',
737
+
738
+ // ==== Advanced methods ====
739
+
740
+ /**
741
+ * Updates the component's currently mounted DOM representation.
742
+ *
743
+ * By default, this implements React's rendering and reconciliation algorithm.
744
+ * Sophisticated clients may wish to override this.
745
+ *
746
+ * @param {ReactReconcileTransaction} transaction
747
+ * @internal
748
+ * @overridable
749
+ */
750
+ updateComponent: 'OVERRIDE_BASE'
751
+
752
+ };
753
+
754
+ /**
755
+ * Mapping from class specification keys to special processing functions.
756
+ *
757
+ * Although these are declared like instance properties in the specification
758
+ * when defining classes using `React.createClass`, they are actually static
759
+ * and are accessible on the constructor instead of the prototype. Despite
760
+ * being static, they must be defined outside of the "statics" key under
761
+ * which all other static methods are defined.
762
+ */
763
+ var RESERVED_SPEC_KEYS = {
764
+ displayName: function (Constructor, displayName) {
765
+ Constructor.displayName = displayName;
766
+ },
767
+ mixins: function (Constructor, mixins) {
768
+ if (mixins) {
769
+ for (var i = 0; i < mixins.length; i++) {
770
+ mixSpecIntoComponent(Constructor, mixins[i]);
771
+ }
772
+ }
773
+ },
774
+ childContextTypes: function (Constructor, childContextTypes) {
775
+ if ("development" !== 'production') {
776
+ validateTypeDef(Constructor, childContextTypes, 'childContext');
777
+ }
778
+ Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
779
+ },
780
+ contextTypes: function (Constructor, contextTypes) {
781
+ if ("development" !== 'production') {
782
+ validateTypeDef(Constructor, contextTypes, 'context');
783
+ }
784
+ Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
785
+ },
786
+ /**
787
+ * Special case getDefaultProps which should move into statics but requires
788
+ * automatic merging.
789
+ */
790
+ getDefaultProps: function (Constructor, getDefaultProps) {
791
+ if (Constructor.getDefaultProps) {
792
+ Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
793
+ } else {
794
+ Constructor.getDefaultProps = getDefaultProps;
795
+ }
796
+ },
797
+ propTypes: function (Constructor, propTypes) {
798
+ if ("development" !== 'production') {
799
+ validateTypeDef(Constructor, propTypes, 'prop');
800
+ }
801
+ Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
802
+ },
803
+ statics: function (Constructor, statics) {
804
+ mixStaticSpecIntoComponent(Constructor, statics);
805
+ },
806
+ autobind: function () {} };
807
+
808
+ function validateTypeDef(Constructor, typeDef, location) {
809
+ for (var propName in typeDef) {
810
+ if (typeDef.hasOwnProperty(propName)) {
811
+ // use a warning instead of an invariant so components
812
+ // don't show up in prod but only in __DEV__
813
+ "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;
814
+ }
815
+ }
816
+ }
817
+
818
+ function validateMethodOverride(isAlreadyDefined, name) {
819
+ var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
820
+
821
+ // Disallow overriding of base class methods unless explicitly allowed.
822
+ if (ReactClassMixin.hasOwnProperty(name)) {
823
+ !(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;
824
+ }
825
+
826
+ // Disallow defining methods more than once unless explicitly allowed.
827
+ if (isAlreadyDefined) {
828
+ !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;
829
+ }
830
+ }
831
+
832
+ /**
833
+ * Mixin helper which handles policy validation and reserved
834
+ * specification keys when building React classes.
835
+ */
836
+ function mixSpecIntoComponent(Constructor, spec) {
837
+ if (!spec) {
838
+ if ("development" !== 'production') {
839
+ var typeofSpec = typeof spec;
840
+ var isMixinValid = typeofSpec === 'object' && spec !== null;
841
+
842
+ "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;
843
+ }
844
+
845
+ return;
846
+ }
847
+
848
+ !(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;
849
+ !!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;
850
+
851
+ var proto = Constructor.prototype;
852
+ var autoBindPairs = proto.__reactAutoBindPairs;
853
+
854
+ // By handling mixins before any other properties, we ensure the same
855
+ // chaining order is applied to methods with DEFINE_MANY policy, whether
856
+ // mixins are listed before or after these methods in the spec.
857
+ if (spec.hasOwnProperty(MIXINS_KEY)) {
858
+ RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
859
+ }
860
+
861
+ for (var name in spec) {
862
+ if (!spec.hasOwnProperty(name)) {
863
+ continue;
864
+ }
865
+
866
+ if (name === MIXINS_KEY) {
867
+ // We have already handled mixins in a special case above.
868
+ continue;
869
+ }
870
+
871
+ var property = spec[name];
872
+ var isAlreadyDefined = proto.hasOwnProperty(name);
873
+ validateMethodOverride(isAlreadyDefined, name);
874
+
875
+ if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
876
+ RESERVED_SPEC_KEYS[name](Constructor, property);
877
+ } else {
878
+ // Setup methods on prototype:
879
+ // The following member methods should not be automatically bound:
880
+ // 1. Expected ReactClass methods (in the "interface").
881
+ // 2. Overridden methods (that were mixed in).
882
+ var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
883
+ var isFunction = typeof property === 'function';
884
+ var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
885
+
886
+ if (shouldAutoBind) {
887
+ autoBindPairs.push(name, property);
888
+ proto[name] = property;
889
+ } else {
890
+ if (isAlreadyDefined) {
891
+ var specPolicy = ReactClassInterface[name];
892
+
893
+ // These cases should already be caught by validateMethodOverride.
894
+ !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? "development" !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;
895
+
896
+ // For methods which are defined more than once, call the existing
897
+ // methods before calling the new property, merging if appropriate.
898
+ if (specPolicy === 'DEFINE_MANY_MERGED') {
899
+ proto[name] = createMergedResultFunction(proto[name], property);
900
+ } else if (specPolicy === 'DEFINE_MANY') {
901
+ proto[name] = createChainedFunction(proto[name], property);
902
+ }
903
+ } else {
904
+ proto[name] = property;
905
+ if ("development" !== 'production') {
906
+ // Add verbose displayName to the function, which helps when looking
907
+ // at profiling tools.
908
+ if (typeof property === 'function' && spec.displayName) {
909
+ proto[name].displayName = spec.displayName + '_' + name;
910
+ }
911
+ }
912
+ }
913
+ }
914
+ }
915
+ }
916
+ }
917
+
918
+ function mixStaticSpecIntoComponent(Constructor, statics) {
919
+ if (!statics) {
920
+ return;
921
+ }
922
+ for (var name in statics) {
923
+ var property = statics[name];
924
+ if (!statics.hasOwnProperty(name)) {
925
+ continue;
926
+ }
927
+
928
+ var isReserved = name in RESERVED_SPEC_KEYS;
929
+ !!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;
930
+
931
+ var isInherited = name in Constructor;
932
+ !!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;
933
+ Constructor[name] = property;
934
+ }
935
+ }
936
+
937
+ /**
938
+ * Merge two objects, but throw if both contain the same key.
939
+ *
940
+ * @param {object} one The first object, which is mutated.
941
+ * @param {object} two The second object
942
+ * @return {object} one after it has been mutated to contain everything in two.
943
+ */
944
+ function mergeIntoWithNoDuplicateKeys(one, two) {
945
+ !(one && two && typeof one === 'object' && typeof two === 'object') ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;
946
+
947
+ for (var key in two) {
948
+ if (two.hasOwnProperty(key)) {
949
+ !(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;
950
+ one[key] = two[key];
951
+ }
952
+ }
953
+ return one;
954
+ }
955
+
956
+ /**
957
+ * Creates a function that invokes two functions and merges their return values.
958
+ *
959
+ * @param {function} one Function to invoke first.
960
+ * @param {function} two Function to invoke second.
961
+ * @return {function} Function that invokes the two argument functions.
962
+ * @private
963
+ */
964
+ function createMergedResultFunction(one, two) {
965
+ return function mergedResult() {
966
+ var a = one.apply(this, arguments);
967
+ var b = two.apply(this, arguments);
968
+ if (a == null) {
969
+ return b;
970
+ } else if (b == null) {
971
+ return a;
972
+ }
973
+ var c = {};
974
+ mergeIntoWithNoDuplicateKeys(c, a);
975
+ mergeIntoWithNoDuplicateKeys(c, b);
976
+ return c;
977
+ };
978
+ }
979
+
980
+ /**
981
+ * Creates a function that invokes two functions and ignores their return vales.
982
+ *
983
+ * @param {function} one Function to invoke first.
984
+ * @param {function} two Function to invoke second.
985
+ * @return {function} Function that invokes the two argument functions.
986
+ * @private
987
+ */
988
+ function createChainedFunction(one, two) {
989
+ return function chainedFunction() {
990
+ one.apply(this, arguments);
991
+ two.apply(this, arguments);
992
+ };
993
+ }
994
+
995
+ /**
996
+ * Binds a method to the component.
997
+ *
998
+ * @param {object} component Component whose method is going to be bound.
999
+ * @param {function} method Method to be bound.
1000
+ * @return {function} The bound method.
1001
+ */
1002
+ function bindAutoBindMethod(component, method) {
1003
+ var boundMethod = method.bind(component);
1004
+ if ("development" !== 'production') {
1005
+ boundMethod.__reactBoundContext = component;
1006
+ boundMethod.__reactBoundMethod = method;
1007
+ boundMethod.__reactBoundArguments = null;
1008
+ var componentName = component.constructor.displayName;
1009
+ var _bind = boundMethod.bind;
1010
+ boundMethod.bind = function (newThis) {
1011
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1012
+ args[_key - 1] = arguments[_key];
1013
+ }
1014
+
1015
+ // User is trying to bind() an autobound method; we effectively will
1016
+ // ignore the value of "this" that the user is trying to use, so
1017
+ // let's warn.
1018
+ if (newThis !== component && newThis !== null) {
1019
+ "development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
1020
+ } else if (!args.length) {
1021
+ "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;
1022
+ return boundMethod;
1023
+ }
1024
+ var reboundMethod = _bind.apply(boundMethod, arguments);
1025
+ reboundMethod.__reactBoundContext = component;
1026
+ reboundMethod.__reactBoundMethod = method;
1027
+ reboundMethod.__reactBoundArguments = args;
1028
+ return reboundMethod;
1029
+ };
1030
+ }
1031
+ return boundMethod;
1032
+ }
1033
+
1034
+ /**
1035
+ * Binds all auto-bound methods in a component.
1036
+ *
1037
+ * @param {object} component Component whose method is going to be bound.
1038
+ */
1039
+ function bindAutoBindMethods(component) {
1040
+ var pairs = component.__reactAutoBindPairs;
1041
+ for (var i = 0; i < pairs.length; i += 2) {
1042
+ var autoBindKey = pairs[i];
1043
+ var method = pairs[i + 1];
1044
+ component[autoBindKey] = bindAutoBindMethod(component, method);
1045
+ }
1046
+ }
1047
+
1048
+ /**
1049
+ * Add more to the ReactClass base class. These are all legacy features and
1050
+ * therefore not already part of the modern ReactComponent.
1051
+ */
1052
+ var ReactClassMixin = {
1053
+
1054
+ /**
1055
+ * TODO: This will be deprecated because state should always keep a consistent
1056
+ * type signature and the only use case for this, is to avoid that.
1057
+ */
1058
+ replaceState: function (newState, callback) {
1059
+ this.updater.enqueueReplaceState(this, newState);
1060
+ if (callback) {
1061
+ this.updater.enqueueCallback(this, callback, 'replaceState');
1062
+ }
1063
+ },
1064
+
1065
+ /**
1066
+ * Checks whether or not this composite component is mounted.
1067
+ * @return {boolean} True if mounted, false otherwise.
1068
+ * @protected
1069
+ * @final
1070
+ */
1071
+ isMounted: function () {
1072
+ return this.updater.isMounted(this);
1073
+ }
1074
+ };
1075
+
1076
+ var ReactClassComponent = function () {};
1077
+ _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
1078
+
1079
+ var didWarnDeprecated = false;
1080
+
1081
+ /**
1082
+ * Module for creating composite components.
1083
+ *
1084
+ * @class ReactClass
1085
+ */
1086
+ var ReactClass = {
1087
+
1088
+ /**
1089
+ * Creates a composite component class given a class specification.
1090
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
1091
+ *
1092
+ * @param {object} spec Class specification (which must define `render`).
1093
+ * @return {function} Component constructor function.
1094
+ * @public
1095
+ */
1096
+ createClass: function (spec) {
1097
+ if ("development" !== 'production') {
1098
+ "development" !== 'production' ? warning(didWarnDeprecated, '%s: React.createClass is deprecated and will be removed in version 16. ' + 'Use plain JavaScript classes instead. If you\'re not yet ready to ' + 'migrate, create-react-class is available on npm as a ' + 'drop-in replacement.', spec && spec.displayName || 'A Component') : void 0;
1099
+ didWarnDeprecated = true;
1100
+ }
1101
+
1102
+ // To keep our warnings more understandable, we'll use a little hack here to
1103
+ // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
1104
+ // unnecessarily identify a class without displayName as 'Constructor'.
1105
+ var Constructor = identity(function (props, context, updater) {
1106
+ // This constructor gets overridden by mocks. The argument is used
1107
+ // by mocks to assert on what gets mounted.
1108
+
1109
+ if ("development" !== 'production') {
1110
+ "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;
1111
+ }
1112
+
1113
+ // Wire up auto-binding
1114
+ if (this.__reactAutoBindPairs.length) {
1115
+ bindAutoBindMethods(this);
1116
+ }
1117
+
1118
+ this.props = props;
1119
+ this.context = context;
1120
+ this.refs = emptyObject;
1121
+ this.updater = updater || ReactNoopUpdateQueue;
1122
+
1123
+ this.state = null;
1124
+
1125
+ // ReactClasses doesn't have constructors. Instead, they use the
1126
+ // getInitialState and componentWillMount methods for initialization.
1127
+
1128
+ var initialState = this.getInitialState ? this.getInitialState() : null;
1129
+ if ("development" !== 'production') {
1130
+ // We allow auto-mocks to proceed as if they're returning null.
1131
+ if (initialState === undefined && this.getInitialState._isMockFunction) {
1132
+ // This is probably bad practice. Consider warning here and
1133
+ // deprecating this convenience.
1134
+ initialState = null;
1135
+ }
1136
+ }
1137
+ !(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;
1138
+
1139
+ this.state = initialState;
1140
+ });
1141
+ Constructor.prototype = new ReactClassComponent();
1142
+ Constructor.prototype.constructor = Constructor;
1143
+ Constructor.prototype.__reactAutoBindPairs = [];
1144
+
1145
+ injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
1146
+
1147
+ mixSpecIntoComponent(Constructor, spec);
1148
+
1149
+ // Initialize the defaultProps property after all mixins have been merged.
1150
+ if (Constructor.getDefaultProps) {
1151
+ Constructor.defaultProps = Constructor.getDefaultProps();
1152
+ }
1153
+
1154
+ if ("development" !== 'production') {
1155
+ // This is a tag to indicate that the use of these method names is ok,
1156
+ // since it's used with createClass. If it's not, then it's likely a
1157
+ // mistake so we'll warn you to use the static property, property
1158
+ // initializer or constructor respectively.
1159
+ if (Constructor.getDefaultProps) {
1160
+ Constructor.getDefaultProps.isReactClassApproved = {};
1161
+ }
1162
+ if (Constructor.prototype.getInitialState) {
1163
+ Constructor.prototype.getInitialState.isReactClassApproved = {};
1164
+ }
1165
+ }
1166
+
1167
+ !Constructor.prototype.render ? "development" !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;
1168
+
1169
+ if ("development" !== 'production') {
1170
+ "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;
1171
+ "development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
1172
+ }
1173
+
1174
+ // Reduce time spent doing lookups by setting these on the prototype.
1175
+ for (var methodName in ReactClassInterface) {
1176
+ if (!Constructor.prototype[methodName]) {
1177
+ Constructor.prototype[methodName] = null;
1178
+ }
1179
+ }
1180
+
1181
+ return Constructor;
1182
+ },
1183
+
1184
+ injection: {
1185
+ injectMixin: function (mixin) {
1186
+ injectedMixins.push(mixin);
1187
+ }
1188
+ }
1189
+
1190
+ };
1191
+
1192
+ module.exports = ReactClass;
1193
+ },{"10":10,"13":13,"14":14,"25":25,"28":28,"29":29,"30":30,"31":31,"6":6}],6:[function(_dereq_,module,exports){
1194
+ /**
1195
+ * Copyright 2013-present, Facebook, Inc.
1196
+ * All rights reserved.
1197
+ *
1198
+ * This source code is licensed under the BSD-style license found in the
1199
+ * LICENSE file in the root directory of this source tree. An additional grant
1200
+ * of patent rights can be found in the PATENTS file in the same directory.
1201
+ *
1202
+ */
1203
+
1204
+ 'use strict';
1205
+
1206
+ var _prodInvariant = _dereq_(25);
1207
+
1208
+ var ReactNoopUpdateQueue = _dereq_(13);
1209
+
1210
+ var canDefineProperty = _dereq_(20);
1211
+ var emptyObject = _dereq_(28);
1212
+ var invariant = _dereq_(29);
1213
+ var warning = _dereq_(30);
1214
+
1215
+ /**
1216
+ * Base class helpers for the updating state of a component.
1217
+ */
1218
+ function ReactComponent(props, context, updater) {
1219
+ this.props = props;
1220
+ this.context = context;
1221
+ this.refs = emptyObject;
1222
+ // We initialize the default updater but the real one gets injected by the
1223
+ // renderer.
1224
+ this.updater = updater || ReactNoopUpdateQueue;
1225
+ }
1226
+
1227
+ ReactComponent.prototype.isReactComponent = {};
1228
+
1229
+ /**
1230
+ * Sets a subset of the state. Always use this to mutate
1231
+ * state. You should treat `this.state` as immutable.
1232
+ *
1233
+ * There is no guarantee that `this.state` will be immediately updated, so
1234
+ * accessing `this.state` after calling this method may return the old value.
1235
+ *
1236
+ * There is no guarantee that calls to `setState` will run synchronously,
1237
+ * as they may eventually be batched together. You can provide an optional
1238
+ * callback that will be executed when the call to setState is actually
1239
+ * completed.
1240
+ *
1241
+ * When a function is provided to setState, it will be called at some point in
1242
+ * the future (not synchronously). It will be called with the up to date
1243
+ * component arguments (state, props, context). These values can be different
1244
+ * from this.* because your function may be called after receiveProps but before
1245
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
1246
+ * assigned to this.
1247
+ *
1248
+ * @param {object|function} partialState Next partial state or function to
1249
+ * produce next partial state to be merged with current state.
1250
+ * @param {?function} callback Called after state is updated.
1251
+ * @final
1252
+ * @protected
1253
+ */
1254
+ ReactComponent.prototype.setState = function (partialState, callback) {
1255
+ !(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;
1256
+ this.updater.enqueueSetState(this, partialState);
1257
+ if (callback) {
1258
+ this.updater.enqueueCallback(this, callback, 'setState');
1259
+ }
1260
+ };
1261
+
1262
+ /**
1263
+ * Forces an update. This should only be invoked when it is known with
1264
+ * certainty that we are **not** in a DOM transaction.
1265
+ *
1266
+ * You may want to call this when you know that some deeper aspect of the
1267
+ * component's state has changed but `setState` was not called.
1268
+ *
1269
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
1270
+ * `componentWillUpdate` and `componentDidUpdate`.
1271
+ *
1272
+ * @param {?function} callback Called after update is complete.
1273
+ * @final
1274
+ * @protected
1275
+ */
1276
+ ReactComponent.prototype.forceUpdate = function (callback) {
1277
+ this.updater.enqueueForceUpdate(this);
1278
+ if (callback) {
1279
+ this.updater.enqueueCallback(this, callback, 'forceUpdate');
1280
+ }
1281
+ };
1282
+
1283
+ /**
1284
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
1285
+ * we would like to deprecate them, we're not going to move them over to this
1286
+ * modern base class. Instead, we define a getter that warns if it's accessed.
1287
+ */
1288
+ if ("development" !== 'production') {
1289
+ var deprecatedAPIs = {
1290
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
1291
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
1292
+ };
1293
+ var defineDeprecationWarning = function (methodName, info) {
1294
+ if (canDefineProperty) {
1295
+ Object.defineProperty(ReactComponent.prototype, methodName, {
1296
+ get: function () {
1297
+ "development" !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
1298
+ return undefined;
1299
+ }
1300
+ });
1301
+ }
1302
+ };
1303
+ for (var fnName in deprecatedAPIs) {
1304
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
1305
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1306
+ }
1307
+ }
1308
+ }
1309
+
1310
+ module.exports = ReactComponent;
1311
+ },{"13":13,"20":20,"25":25,"28":28,"29":29,"30":30}],7:[function(_dereq_,module,exports){
1312
+ /**
1313
+ * Copyright 2016-present, Facebook, Inc.
1314
+ * All rights reserved.
1315
+ *
1316
+ * This source code is licensed under the BSD-style license found in the
1317
+ * LICENSE file in the root directory of this source tree. An additional grant
1318
+ * of patent rights can be found in the PATENTS file in the same directory.
1319
+ *
1320
+ *
1321
+ */
1322
+
1323
+ 'use strict';
1324
+
1325
+ var _prodInvariant = _dereq_(25);
1326
+
1327
+ var ReactCurrentOwner = _dereq_(8);
1328
+
1329
+ var invariant = _dereq_(29);
1330
+ var warning = _dereq_(30);
1331
+
1332
+ function isNative(fn) {
1333
+ // Based on isNative() from Lodash
1334
+ var funcToString = Function.prototype.toString;
1335
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1336
+ var reIsNative = RegExp('^' + funcToString
1337
+ // Take an example native function source for comparison
1338
+ .call(hasOwnProperty)
1339
+ // Strip regex characters so we can use it for regex
1340
+ .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
1341
+ // Remove hasOwnProperty from the template to make it generic
1342
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
1343
+ try {
1344
+ var source = funcToString.call(fn);
1345
+ return reIsNative.test(source);
1346
+ } catch (err) {
1347
+ return false;
1348
+ }
1349
+ }
1350
+
1351
+ var canUseCollections =
1352
+ // Array.from
1353
+ typeof Array.from === 'function' &&
1354
+ // Map
1355
+ typeof Map === 'function' && isNative(Map) &&
1356
+ // Map.prototype.keys
1357
+ Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
1358
+ // Set
1359
+ typeof Set === 'function' && isNative(Set) &&
1360
+ // Set.prototype.keys
1361
+ Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
1362
+
1363
+ var setItem;
1364
+ var getItem;
1365
+ var removeItem;
1366
+ var getItemIDs;
1367
+ var addRoot;
1368
+ var removeRoot;
1369
+ var getRootIDs;
1370
+
1371
+ if (canUseCollections) {
1372
+ var itemMap = new Map();
1373
+ var rootIDSet = new Set();
1374
+
1375
+ setItem = function (id, item) {
1376
+ itemMap.set(id, item);
1377
+ };
1378
+ getItem = function (id) {
1379
+ return itemMap.get(id);
1380
+ };
1381
+ removeItem = function (id) {
1382
+ itemMap['delete'](id);
1383
+ };
1384
+ getItemIDs = function () {
1385
+ return Array.from(itemMap.keys());
1386
+ };
1387
+
1388
+ addRoot = function (id) {
1389
+ rootIDSet.add(id);
1390
+ };
1391
+ removeRoot = function (id) {
1392
+ rootIDSet['delete'](id);
1393
+ };
1394
+ getRootIDs = function () {
1395
+ return Array.from(rootIDSet.keys());
1396
+ };
1397
+ } else {
1398
+ var itemByKey = {};
1399
+ var rootByKey = {};
1400
+
1401
+ // Use non-numeric keys to prevent V8 performance issues:
1402
+ // https://github.com/facebook/react/pull/7232
1403
+ var getKeyFromID = function (id) {
1404
+ return '.' + id;
1405
+ };
1406
+ var getIDFromKey = function (key) {
1407
+ return parseInt(key.substr(1), 10);
1408
+ };
1409
+
1410
+ setItem = function (id, item) {
1411
+ var key = getKeyFromID(id);
1412
+ itemByKey[key] = item;
1413
+ };
1414
+ getItem = function (id) {
1415
+ var key = getKeyFromID(id);
1416
+ return itemByKey[key];
1417
+ };
1418
+ removeItem = function (id) {
1419
+ var key = getKeyFromID(id);
1420
+ delete itemByKey[key];
1421
+ };
1422
+ getItemIDs = function () {
1423
+ return Object.keys(itemByKey).map(getIDFromKey);
1424
+ };
1425
+
1426
+ addRoot = function (id) {
1427
+ var key = getKeyFromID(id);
1428
+ rootByKey[key] = true;
1429
+ };
1430
+ removeRoot = function (id) {
1431
+ var key = getKeyFromID(id);
1432
+ delete rootByKey[key];
1433
+ };
1434
+ getRootIDs = function () {
1435
+ return Object.keys(rootByKey).map(getIDFromKey);
1436
+ };
1437
+ }
1438
+
1439
+ var unmountedIDs = [];
1440
+
1441
+ function purgeDeep(id) {
1442
+ var item = getItem(id);
1443
+ if (item) {
1444
+ var childIDs = item.childIDs;
1445
+
1446
+ removeItem(id);
1447
+ childIDs.forEach(purgeDeep);
1448
+ }
1449
+ }
1450
+
1451
+ function describeComponentFrame(name, source, ownerName) {
1452
+ return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
1453
+ }
1454
+
1455
+ function getDisplayName(element) {
1456
+ if (element == null) {
1457
+ return '#empty';
1458
+ } else if (typeof element === 'string' || typeof element === 'number') {
1459
+ return '#text';
1460
+ } else if (typeof element.type === 'string') {
1461
+ return element.type;
1462
+ } else {
1463
+ return element.type.displayName || element.type.name || 'Unknown';
1464
+ }
1465
+ }
1466
+
1467
+ function describeID(id) {
1468
+ var name = ReactComponentTreeHook.getDisplayName(id);
1469
+ var element = ReactComponentTreeHook.getElement(id);
1470
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
1471
+ var ownerName;
1472
+ if (ownerID) {
1473
+ ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
1474
+ }
1475
+ "development" !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
1476
+ return describeComponentFrame(name, element && element._source, ownerName);
1477
+ }
1478
+
1479
+ var ReactComponentTreeHook = {
1480
+ onSetChildren: function (id, nextChildIDs) {
1481
+ var item = getItem(id);
1482
+ !item ? "development" !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
1483
+ item.childIDs = nextChildIDs;
1484
+
1485
+ for (var i = 0; i < nextChildIDs.length; i++) {
1486
+ var nextChildID = nextChildIDs[i];
1487
+ var nextChild = getItem(nextChildID);
1488
+ !nextChild ? "development" !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
1489
+ !(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;
1490
+ !nextChild.isMounted ? "development" !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
1491
+ if (nextChild.parentID == null) {
1492
+ nextChild.parentID = id;
1493
+ // TODO: This shouldn't be necessary but mounting a new root during in
1494
+ // componentWillMount currently causes not-yet-mounted components to
1495
+ // be purged from our tree data so their parent id is missing.
1496
+ }
1497
+ !(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;
1498
+ }
1499
+ },
1500
+ onBeforeMountComponent: function (id, element, parentID) {
1501
+ var item = {
1502
+ element: element,
1503
+ parentID: parentID,
1504
+ text: null,
1505
+ childIDs: [],
1506
+ isMounted: false,
1507
+ updateCount: 0
1508
+ };
1509
+ setItem(id, item);
1510
+ },
1511
+ onBeforeUpdateComponent: function (id, element) {
1512
+ var item = getItem(id);
1513
+ if (!item || !item.isMounted) {
1514
+ // We may end up here as a result of setState() in componentWillUnmount().
1515
+ // In this case, ignore the element.
1516
+ return;
1517
+ }
1518
+ item.element = element;
1519
+ },
1520
+ onMountComponent: function (id) {
1521
+ var item = getItem(id);
1522
+ !item ? "development" !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
1523
+ item.isMounted = true;
1524
+ var isRoot = item.parentID === 0;
1525
+ if (isRoot) {
1526
+ addRoot(id);
1527
+ }
1528
+ },
1529
+ onUpdateComponent: function (id) {
1530
+ var item = getItem(id);
1531
+ if (!item || !item.isMounted) {
1532
+ // We may end up here as a result of setState() in componentWillUnmount().
1533
+ // In this case, ignore the element.
1534
+ return;
1535
+ }
1536
+ item.updateCount++;
1537
+ },
1538
+ onUnmountComponent: function (id) {
1539
+ var item = getItem(id);
1540
+ if (item) {
1541
+ // We need to check if it exists.
1542
+ // `item` might not exist if it is inside an error boundary, and a sibling
1543
+ // error boundary child threw while mounting. Then this instance never
1544
+ // got a chance to mount, but it still gets an unmounting event during
1545
+ // the error boundary cleanup.
1546
+ item.isMounted = false;
1547
+ var isRoot = item.parentID === 0;
1548
+ if (isRoot) {
1549
+ removeRoot(id);
1550
+ }
1551
+ }
1552
+ unmountedIDs.push(id);
1553
+ },
1554
+ purgeUnmountedComponents: function () {
1555
+ if (ReactComponentTreeHook._preventPurging) {
1556
+ // Should only be used for testing.
1557
+ return;
1558
+ }
1559
+
1560
+ for (var i = 0; i < unmountedIDs.length; i++) {
1561
+ var id = unmountedIDs[i];
1562
+ purgeDeep(id);
1563
+ }
1564
+ unmountedIDs.length = 0;
1565
+ },
1566
+ isMounted: function (id) {
1567
+ var item = getItem(id);
1568
+ return item ? item.isMounted : false;
1569
+ },
1570
+ getCurrentStackAddendum: function (topElement) {
1571
+ var info = '';
1572
+ if (topElement) {
1573
+ var name = getDisplayName(topElement);
1574
+ var owner = topElement._owner;
1575
+ info += describeComponentFrame(name, topElement._source, owner && owner.getName());
1576
+ }
1577
+
1578
+ var currentOwner = ReactCurrentOwner.current;
1579
+ var id = currentOwner && currentOwner._debugID;
1580
+
1581
+ info += ReactComponentTreeHook.getStackAddendumByID(id);
1582
+ return info;
1583
+ },
1584
+ getStackAddendumByID: function (id) {
1585
+ var info = '';
1586
+ while (id) {
1587
+ info += describeID(id);
1588
+ id = ReactComponentTreeHook.getParentID(id);
1589
+ }
1590
+ return info;
1591
+ },
1592
+ getChildIDs: function (id) {
1593
+ var item = getItem(id);
1594
+ return item ? item.childIDs : [];
1595
+ },
1596
+ getDisplayName: function (id) {
1597
+ var element = ReactComponentTreeHook.getElement(id);
1598
+ if (!element) {
1599
+ return null;
1600
+ }
1601
+ return getDisplayName(element);
1602
+ },
1603
+ getElement: function (id) {
1604
+ var item = getItem(id);
1605
+ return item ? item.element : null;
1606
+ },
1607
+ getOwnerID: function (id) {
1608
+ var element = ReactComponentTreeHook.getElement(id);
1609
+ if (!element || !element._owner) {
1610
+ return null;
1611
+ }
1612
+ return element._owner._debugID;
1613
+ },
1614
+ getParentID: function (id) {
1615
+ var item = getItem(id);
1616
+ return item ? item.parentID : null;
1617
+ },
1618
+ getSource: function (id) {
1619
+ var item = getItem(id);
1620
+ var element = item ? item.element : null;
1621
+ var source = element != null ? element._source : null;
1622
+ return source;
1623
+ },
1624
+ getText: function (id) {
1625
+ var element = ReactComponentTreeHook.getElement(id);
1626
+ if (typeof element === 'string') {
1627
+ return element;
1628
+ } else if (typeof element === 'number') {
1629
+ return '' + element;
1630
+ } else {
1631
+ return null;
1632
+ }
1633
+ },
1634
+ getUpdateCount: function (id) {
1635
+ var item = getItem(id);
1636
+ return item ? item.updateCount : 0;
1637
+ },
1638
+
1639
+
1640
+ getRootIDs: getRootIDs,
1641
+ getRegisteredIDs: getItemIDs
1642
+ };
1643
+
1644
+ module.exports = ReactComponentTreeHook;
1645
+ },{"25":25,"29":29,"30":30,"8":8}],8:[function(_dereq_,module,exports){
1646
+ /**
1647
+ * Copyright 2013-present, Facebook, Inc.
1648
+ * All rights reserved.
1649
+ *
1650
+ * This source code is licensed under the BSD-style license found in the
1651
+ * LICENSE file in the root directory of this source tree. An additional grant
1652
+ * of patent rights can be found in the PATENTS file in the same directory.
1653
+ *
1654
+ *
1655
+ */
1656
+
1657
+ 'use strict';
1658
+
1659
+ /**
1660
+ * Keeps track of the current owner.
1661
+ *
1662
+ * The current owner is the component who should own any components that are
1663
+ * currently being constructed.
1664
+ */
1665
+ var ReactCurrentOwner = {
1666
+
1667
+ /**
1668
+ * @internal
1669
+ * @type {ReactComponent}
1670
+ */
1671
+ current: null
1672
+
1673
+ };
1674
+
1675
+ module.exports = ReactCurrentOwner;
1676
+ },{}],9:[function(_dereq_,module,exports){
1677
+ /**
1678
+ * Copyright 2013-present, Facebook, Inc.
1679
+ * All rights reserved.
1680
+ *
1681
+ * This source code is licensed under the BSD-style license found in the
1682
+ * LICENSE file in the root directory of this source tree. An additional grant
1683
+ * of patent rights can be found in the PATENTS file in the same directory.
1684
+ *
1685
+ */
1686
+
1687
+ 'use strict';
1688
+
1689
+ var ReactElement = _dereq_(10);
1690
+
1691
+ /**
1692
+ * Create a factory that creates HTML tag elements.
1693
+ *
1694
+ * @private
1695
+ */
1696
+ var createDOMFactory = ReactElement.createFactory;
1697
+ if ("development" !== 'production') {
1698
+ var ReactElementValidator = _dereq_(12);
1699
+ createDOMFactory = ReactElementValidator.createFactory;
1700
+ }
1701
+
1702
+ /**
1703
+ * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
1704
+ * This is also accessible via `React.DOM`.
1705
+ *
1706
+ * @public
1707
+ */
1708
+ var ReactDOMFactories = {
1709
+ a: createDOMFactory('a'),
1710
+ abbr: createDOMFactory('abbr'),
1711
+ address: createDOMFactory('address'),
1712
+ area: createDOMFactory('area'),
1713
+ article: createDOMFactory('article'),
1714
+ aside: createDOMFactory('aside'),
1715
+ audio: createDOMFactory('audio'),
1716
+ b: createDOMFactory('b'),
1717
+ base: createDOMFactory('base'),
1718
+ bdi: createDOMFactory('bdi'),
1719
+ bdo: createDOMFactory('bdo'),
1720
+ big: createDOMFactory('big'),
1721
+ blockquote: createDOMFactory('blockquote'),
1722
+ body: createDOMFactory('body'),
1723
+ br: createDOMFactory('br'),
1724
+ button: createDOMFactory('button'),
1725
+ canvas: createDOMFactory('canvas'),
1726
+ caption: createDOMFactory('caption'),
1727
+ cite: createDOMFactory('cite'),
1728
+ code: createDOMFactory('code'),
1729
+ col: createDOMFactory('col'),
1730
+ colgroup: createDOMFactory('colgroup'),
1731
+ data: createDOMFactory('data'),
1732
+ datalist: createDOMFactory('datalist'),
1733
+ dd: createDOMFactory('dd'),
1734
+ del: createDOMFactory('del'),
1735
+ details: createDOMFactory('details'),
1736
+ dfn: createDOMFactory('dfn'),
1737
+ dialog: createDOMFactory('dialog'),
1738
+ div: createDOMFactory('div'),
1739
+ dl: createDOMFactory('dl'),
1740
+ dt: createDOMFactory('dt'),
1741
+ em: createDOMFactory('em'),
1742
+ embed: createDOMFactory('embed'),
1743
+ fieldset: createDOMFactory('fieldset'),
1744
+ figcaption: createDOMFactory('figcaption'),
1745
+ figure: createDOMFactory('figure'),
1746
+ footer: createDOMFactory('footer'),
1747
+ form: createDOMFactory('form'),
1748
+ h1: createDOMFactory('h1'),
1749
+ h2: createDOMFactory('h2'),
1750
+ h3: createDOMFactory('h3'),
1751
+ h4: createDOMFactory('h4'),
1752
+ h5: createDOMFactory('h5'),
1753
+ h6: createDOMFactory('h6'),
1754
+ head: createDOMFactory('head'),
1755
+ header: createDOMFactory('header'),
1756
+ hgroup: createDOMFactory('hgroup'),
1757
+ hr: createDOMFactory('hr'),
1758
+ html: createDOMFactory('html'),
1759
+ i: createDOMFactory('i'),
1760
+ iframe: createDOMFactory('iframe'),
1761
+ img: createDOMFactory('img'),
1762
+ input: createDOMFactory('input'),
1763
+ ins: createDOMFactory('ins'),
1764
+ kbd: createDOMFactory('kbd'),
1765
+ keygen: createDOMFactory('keygen'),
1766
+ label: createDOMFactory('label'),
1767
+ legend: createDOMFactory('legend'),
1768
+ li: createDOMFactory('li'),
1769
+ link: createDOMFactory('link'),
1770
+ main: createDOMFactory('main'),
1771
+ map: createDOMFactory('map'),
1772
+ mark: createDOMFactory('mark'),
1773
+ menu: createDOMFactory('menu'),
1774
+ menuitem: createDOMFactory('menuitem'),
1775
+ meta: createDOMFactory('meta'),
1776
+ meter: createDOMFactory('meter'),
1777
+ nav: createDOMFactory('nav'),
1778
+ noscript: createDOMFactory('noscript'),
1779
+ object: createDOMFactory('object'),
1780
+ ol: createDOMFactory('ol'),
1781
+ optgroup: createDOMFactory('optgroup'),
1782
+ option: createDOMFactory('option'),
1783
+ output: createDOMFactory('output'),
1784
+ p: createDOMFactory('p'),
1785
+ param: createDOMFactory('param'),
1786
+ picture: createDOMFactory('picture'),
1787
+ pre: createDOMFactory('pre'),
1788
+ progress: createDOMFactory('progress'),
1789
+ q: createDOMFactory('q'),
1790
+ rp: createDOMFactory('rp'),
1791
+ rt: createDOMFactory('rt'),
1792
+ ruby: createDOMFactory('ruby'),
1793
+ s: createDOMFactory('s'),
1794
+ samp: createDOMFactory('samp'),
1795
+ script: createDOMFactory('script'),
1796
+ section: createDOMFactory('section'),
1797
+ select: createDOMFactory('select'),
1798
+ small: createDOMFactory('small'),
1799
+ source: createDOMFactory('source'),
1800
+ span: createDOMFactory('span'),
1801
+ strong: createDOMFactory('strong'),
1802
+ style: createDOMFactory('style'),
1803
+ sub: createDOMFactory('sub'),
1804
+ summary: createDOMFactory('summary'),
1805
+ sup: createDOMFactory('sup'),
1806
+ table: createDOMFactory('table'),
1807
+ tbody: createDOMFactory('tbody'),
1808
+ td: createDOMFactory('td'),
1809
+ textarea: createDOMFactory('textarea'),
1810
+ tfoot: createDOMFactory('tfoot'),
1811
+ th: createDOMFactory('th'),
1812
+ thead: createDOMFactory('thead'),
1813
+ time: createDOMFactory('time'),
1814
+ title: createDOMFactory('title'),
1815
+ tr: createDOMFactory('tr'),
1816
+ track: createDOMFactory('track'),
1817
+ u: createDOMFactory('u'),
1818
+ ul: createDOMFactory('ul'),
1819
+ 'var': createDOMFactory('var'),
1820
+ video: createDOMFactory('video'),
1821
+ wbr: createDOMFactory('wbr'),
1822
+
1823
+ // SVG
1824
+ circle: createDOMFactory('circle'),
1825
+ clipPath: createDOMFactory('clipPath'),
1826
+ defs: createDOMFactory('defs'),
1827
+ ellipse: createDOMFactory('ellipse'),
1828
+ g: createDOMFactory('g'),
1829
+ image: createDOMFactory('image'),
1830
+ line: createDOMFactory('line'),
1831
+ linearGradient: createDOMFactory('linearGradient'),
1832
+ mask: createDOMFactory('mask'),
1833
+ path: createDOMFactory('path'),
1834
+ pattern: createDOMFactory('pattern'),
1835
+ polygon: createDOMFactory('polygon'),
1836
+ polyline: createDOMFactory('polyline'),
1837
+ radialGradient: createDOMFactory('radialGradient'),
1838
+ rect: createDOMFactory('rect'),
1839
+ stop: createDOMFactory('stop'),
1840
+ svg: createDOMFactory('svg'),
1841
+ text: createDOMFactory('text'),
1842
+ tspan: createDOMFactory('tspan')
1843
+ };
1844
+
1845
+ module.exports = ReactDOMFactories;
1846
+ },{"10":10,"12":12}],10:[function(_dereq_,module,exports){
1847
+ /**
1848
+ * Copyright 2014-present, Facebook, Inc.
1849
+ * All rights reserved.
1850
+ *
1851
+ * This source code is licensed under the BSD-style license found in the
1852
+ * LICENSE file in the root directory of this source tree. An additional grant
1853
+ * of patent rights can be found in the PATENTS file in the same directory.
1854
+ *
1855
+ */
1856
+
1857
+ 'use strict';
1858
+
1859
+ var _assign = _dereq_(31);
1860
+
1861
+ var ReactCurrentOwner = _dereq_(8);
1862
+
1863
+ var warning = _dereq_(30);
1864
+ var canDefineProperty = _dereq_(20);
1865
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1866
+
1867
+ var REACT_ELEMENT_TYPE = _dereq_(11);
1868
+
1869
+ var RESERVED_PROPS = {
1870
+ key: true,
1871
+ ref: true,
1872
+ __self: true,
1873
+ __source: true
1874
+ };
1875
+
1876
+ var specialPropKeyWarningShown, specialPropRefWarningShown;
1877
+
1878
+ function hasValidRef(config) {
1879
+ if ("development" !== 'production') {
1880
+ if (hasOwnProperty.call(config, 'ref')) {
1881
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
1882
+ if (getter && getter.isReactWarning) {
1883
+ return false;
1884
+ }
1885
+ }
1886
+ }
1887
+ return config.ref !== undefined;
1888
+ }
1889
+
1890
+ function hasValidKey(config) {
1891
+ if ("development" !== 'production') {
1892
+ if (hasOwnProperty.call(config, 'key')) {
1893
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
1894
+ if (getter && getter.isReactWarning) {
1895
+ return false;
1896
+ }
1897
+ }
1898
+ }
1899
+ return config.key !== undefined;
1900
+ }
1901
+
1902
+ function defineKeyPropWarningGetter(props, displayName) {
1903
+ var warnAboutAccessingKey = function () {
1904
+ if (!specialPropKeyWarningShown) {
1905
+ specialPropKeyWarningShown = true;
1906
+ "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;
1907
+ }
1908
+ };
1909
+ warnAboutAccessingKey.isReactWarning = true;
1910
+ Object.defineProperty(props, 'key', {
1911
+ get: warnAboutAccessingKey,
1912
+ configurable: true
1913
+ });
1914
+ }
1915
+
1916
+ function defineRefPropWarningGetter(props, displayName) {
1917
+ var warnAboutAccessingRef = function () {
1918
+ if (!specialPropRefWarningShown) {
1919
+ specialPropRefWarningShown = true;
1920
+ "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;
1921
+ }
1922
+ };
1923
+ warnAboutAccessingRef.isReactWarning = true;
1924
+ Object.defineProperty(props, 'ref', {
1925
+ get: warnAboutAccessingRef,
1926
+ configurable: true
1927
+ });
1928
+ }
1929
+
1930
+ /**
1931
+ * Factory method to create a new React element. This no longer adheres to
1932
+ * the class pattern, so do not use new to call it. Also, no instanceof check
1933
+ * will work. Instead test $$typeof field against Symbol.for('react.element') to check
1934
+ * if something is a React Element.
1935
+ *
1936
+ * @param {*} type
1937
+ * @param {*} key
1938
+ * @param {string|object} ref
1939
+ * @param {*} self A *temporary* helper to detect places where `this` is
1940
+ * different from the `owner` when React.createElement is called, so that we
1941
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
1942
+ * functions, and as long as `this` and owner are the same, there will be no
1943
+ * change in behavior.
1944
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
1945
+ * indicating filename, line number, and/or other information.
1946
+ * @param {*} owner
1947
+ * @param {*} props
1948
+ * @internal
1949
+ */
1950
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
1951
+ var element = {
1952
+ // This tag allow us to uniquely identify this as a React Element
1953
+ $$typeof: REACT_ELEMENT_TYPE,
1954
+
1955
+ // Built-in properties that belong on the element
1956
+ type: type,
1957
+ key: key,
1958
+ ref: ref,
1959
+ props: props,
1960
+
1961
+ // Record the component responsible for creating this element.
1962
+ _owner: owner
1963
+ };
1964
+
1965
+ if ("development" !== 'production') {
1966
+ // The validation flag is currently mutative. We put it on
1967
+ // an external backing store so that we can freeze the whole object.
1968
+ // This can be replaced with a WeakMap once they are implemented in
1969
+ // commonly used development environments.
1970
+ element._store = {};
1971
+
1972
+ // To make comparing ReactElements easier for testing purposes, we make
1973
+ // the validation flag non-enumerable (where possible, which should
1974
+ // include every environment we run tests in), so the test framework
1975
+ // ignores it.
1976
+ if (canDefineProperty) {
1977
+ Object.defineProperty(element._store, 'validated', {
1978
+ configurable: false,
1979
+ enumerable: false,
1980
+ writable: true,
1981
+ value: false
1982
+ });
1983
+ // self and source are DEV only properties.
1984
+ Object.defineProperty(element, '_self', {
1985
+ configurable: false,
1986
+ enumerable: false,
1987
+ writable: false,
1988
+ value: self
1989
+ });
1990
+ // Two elements created in two different places should be considered
1991
+ // equal for testing purposes and therefore we hide it from enumeration.
1992
+ Object.defineProperty(element, '_source', {
1993
+ configurable: false,
1994
+ enumerable: false,
1995
+ writable: false,
1996
+ value: source
1997
+ });
1998
+ } else {
1999
+ element._store.validated = false;
2000
+ element._self = self;
2001
+ element._source = source;
2002
+ }
2003
+ if (Object.freeze) {
2004
+ Object.freeze(element.props);
2005
+ Object.freeze(element);
2006
+ }
2007
+ }
2008
+
2009
+ return element;
2010
+ };
2011
+
2012
+ /**
2013
+ * Create and return a new ReactElement of the given type.
2014
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
2015
+ */
2016
+ ReactElement.createElement = function (type, config, children) {
2017
+ var propName;
2018
+
2019
+ // Reserved names are extracted
2020
+ var props = {};
2021
+
2022
+ var key = null;
2023
+ var ref = null;
2024
+ var self = null;
2025
+ var source = null;
2026
+
2027
+ if (config != null) {
2028
+ if (hasValidRef(config)) {
2029
+ ref = config.ref;
2030
+ }
2031
+ if (hasValidKey(config)) {
2032
+ key = '' + config.key;
2033
+ }
2034
+
2035
+ self = config.__self === undefined ? null : config.__self;
2036
+ source = config.__source === undefined ? null : config.__source;
2037
+ // Remaining properties are added to a new props object
2038
+ for (propName in config) {
2039
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2040
+ props[propName] = config[propName];
2041
+ }
2042
+ }
2043
+ }
2044
+
2045
+ // Children can be more than one argument, and those are transferred onto
2046
+ // the newly allocated props object.
2047
+ var childrenLength = arguments.length - 2;
2048
+ if (childrenLength === 1) {
2049
+ props.children = children;
2050
+ } else if (childrenLength > 1) {
2051
+ var childArray = Array(childrenLength);
2052
+ for (var i = 0; i < childrenLength; i++) {
2053
+ childArray[i] = arguments[i + 2];
2054
+ }
2055
+ if ("development" !== 'production') {
2056
+ if (Object.freeze) {
2057
+ Object.freeze(childArray);
2058
+ }
2059
+ }
2060
+ props.children = childArray;
2061
+ }
2062
+
2063
+ // Resolve default props
2064
+ if (type && type.defaultProps) {
2065
+ var defaultProps = type.defaultProps;
2066
+ for (propName in defaultProps) {
2067
+ if (props[propName] === undefined) {
2068
+ props[propName] = defaultProps[propName];
2069
+ }
2070
+ }
2071
+ }
2072
+ if ("development" !== 'production') {
2073
+ if (key || ref) {
2074
+ if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
2075
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
2076
+ if (key) {
2077
+ defineKeyPropWarningGetter(props, displayName);
2078
+ }
2079
+ if (ref) {
2080
+ defineRefPropWarningGetter(props, displayName);
2081
+ }
2082
+ }
2083
+ }
2084
+ }
2085
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2086
+ };
2087
+
2088
+ /**
2089
+ * Return a function that produces ReactElements of a given type.
2090
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
2091
+ */
2092
+ ReactElement.createFactory = function (type) {
2093
+ var factory = ReactElement.createElement.bind(null, type);
2094
+ // Expose the type on the factory and the prototype so that it can be
2095
+ // easily accessed on elements. E.g. `<Foo />.type === Foo`.
2096
+ // This should not be named `constructor` since this may not be the function
2097
+ // that created the element, and it may not even be a constructor.
2098
+ // Legacy hook TODO: Warn if this is accessed
2099
+ factory.type = type;
2100
+ return factory;
2101
+ };
2102
+
2103
+ ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
2104
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
2105
+
2106
+ return newElement;
2107
+ };
2108
+
2109
+ /**
2110
+ * Clone and return a new ReactElement using element as the starting point.
2111
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
2112
+ */
2113
+ ReactElement.cloneElement = function (element, config, children) {
2114
+ var propName;
2115
+
2116
+ // Original props are copied
2117
+ var props = _assign({}, element.props);
2118
+
2119
+ // Reserved names are extracted
2120
+ var key = element.key;
2121
+ var ref = element.ref;
2122
+ // Self is preserved since the owner is preserved.
2123
+ var self = element._self;
2124
+ // Source is preserved since cloneElement is unlikely to be targeted by a
2125
+ // transpiler, and the original source is probably a better indicator of the
2126
+ // true owner.
2127
+ var source = element._source;
2128
+
2129
+ // Owner will be preserved, unless ref is overridden
2130
+ var owner = element._owner;
2131
+
2132
+ if (config != null) {
2133
+ if (hasValidRef(config)) {
2134
+ // Silently steal the ref from the parent.
2135
+ ref = config.ref;
2136
+ owner = ReactCurrentOwner.current;
2137
+ }
2138
+ if (hasValidKey(config)) {
2139
+ key = '' + config.key;
2140
+ }
2141
+
2142
+ // Remaining properties override existing props
2143
+ var defaultProps;
2144
+ if (element.type && element.type.defaultProps) {
2145
+ defaultProps = element.type.defaultProps;
2146
+ }
2147
+ for (propName in config) {
2148
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2149
+ if (config[propName] === undefined && defaultProps !== undefined) {
2150
+ // Resolve default props
2151
+ props[propName] = defaultProps[propName];
2152
+ } else {
2153
+ props[propName] = config[propName];
2154
+ }
2155
+ }
2156
+ }
2157
+ }
2158
+
2159
+ // Children can be more than one argument, and those are transferred onto
2160
+ // the newly allocated props object.
2161
+ var childrenLength = arguments.length - 2;
2162
+ if (childrenLength === 1) {
2163
+ props.children = children;
2164
+ } else if (childrenLength > 1) {
2165
+ var childArray = Array(childrenLength);
2166
+ for (var i = 0; i < childrenLength; i++) {
2167
+ childArray[i] = arguments[i + 2];
2168
+ }
2169
+ props.children = childArray;
2170
+ }
2171
+
2172
+ return ReactElement(element.type, key, ref, self, source, owner, props);
2173
+ };
2174
+
2175
+ /**
2176
+ * Verifies the object is a ReactElement.
2177
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
2178
+ * @param {?object} object
2179
+ * @return {boolean} True if `object` is a valid component.
2180
+ * @final
2181
+ */
2182
+ ReactElement.isValidElement = function (object) {
2183
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2184
+ };
2185
+
2186
+ module.exports = ReactElement;
2187
+ },{"11":11,"20":20,"30":30,"31":31,"8":8}],11:[function(_dereq_,module,exports){
2188
+ /**
2189
+ * Copyright 2014-present, Facebook, Inc.
2190
+ * All rights reserved.
2191
+ *
2192
+ * This source code is licensed under the BSD-style license found in the
2193
+ * LICENSE file in the root directory of this source tree. An additional grant
2194
+ * of patent rights can be found in the PATENTS file in the same directory.
2195
+ *
2196
+ *
2197
+ */
2198
+
2199
+ 'use strict';
2200
+
2201
+ // The Symbol used to tag the ReactElement type. If there is no native Symbol
2202
+ // nor polyfill, then a plain number is used for performance.
2203
+
2204
+ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
2205
+
2206
+ module.exports = REACT_ELEMENT_TYPE;
2207
+ },{}],12:[function(_dereq_,module,exports){
2208
+ /**
2209
+ * Copyright 2014-present, Facebook, Inc.
2210
+ * All rights reserved.
2211
+ *
2212
+ * This source code is licensed under the BSD-style license found in the
2213
+ * LICENSE file in the root directory of this source tree. An additional grant
2214
+ * of patent rights can be found in the PATENTS file in the same directory.
2215
+ *
2216
+ */
2217
+
2218
+ /**
2219
+ * ReactElementValidator provides a wrapper around a element factory
2220
+ * which validates the props passed to the element. This is intended to be
2221
+ * used only in DEV and could be replaced by a static type checker for languages
2222
+ * that support it.
2223
+ */
2224
+
2225
+ 'use strict';
2226
+
2227
+ var ReactCurrentOwner = _dereq_(8);
2228
+ var ReactComponentTreeHook = _dereq_(7);
2229
+ var ReactElement = _dereq_(10);
2230
+
2231
+ var checkReactTypeSpec = _dereq_(21);
2232
+
2233
+ var canDefineProperty = _dereq_(20);
2234
+ var getIteratorFn = _dereq_(22);
2235
+ var warning = _dereq_(30);
2236
+
2237
+ function getDeclarationErrorAddendum() {
2238
+ if (ReactCurrentOwner.current) {
2239
+ var name = ReactCurrentOwner.current.getName();
2240
+ if (name) {
2241
+ return ' Check the render method of `' + name + '`.';
2242
+ }
2243
+ }
2244
+ return '';
2245
+ }
2246
+
2247
+ function getSourceInfoErrorAddendum(elementProps) {
2248
+ if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
2249
+ var source = elementProps.__source;
2250
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
2251
+ var lineNumber = source.lineNumber;
2252
+ return ' Check your code at ' + fileName + ':' + lineNumber + '.';
2253
+ }
2254
+ return '';
2255
+ }
2256
+
2257
+ /**
2258
+ * Warn if there's no key explicitly set on dynamic arrays of children or
2259
+ * object keys are not valid. This allows us to keep track of children between
2260
+ * updates.
2261
+ */
2262
+ var ownerHasKeyUseWarning = {};
2263
+
2264
+ function getCurrentComponentErrorInfo(parentType) {
2265
+ var info = getDeclarationErrorAddendum();
2266
+
2267
+ if (!info) {
2268
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
2269
+ if (parentName) {
2270
+ info = ' Check the top-level render call using <' + parentName + '>.';
2271
+ }
2272
+ }
2273
+ return info;
2274
+ }
2275
+
2276
+ /**
2277
+ * Warn if the element doesn't have an explicit key assigned to it.
2278
+ * This element is in an array. The array could grow and shrink or be
2279
+ * reordered. All children that haven't already been validated are required to
2280
+ * have a "key" property assigned to it. Error statuses are cached so a warning
2281
+ * will only be shown once.
2282
+ *
2283
+ * @internal
2284
+ * @param {ReactElement} element Element that requires a key.
2285
+ * @param {*} parentType element's parent's type.
2286
+ */
2287
+ function validateExplicitKey(element, parentType) {
2288
+ if (!element._store || element._store.validated || element.key != null) {
2289
+ return;
2290
+ }
2291
+ element._store.validated = true;
2292
+
2293
+ var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
2294
+
2295
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2296
+ if (memoizer[currentComponentErrorInfo]) {
2297
+ return;
2298
+ }
2299
+ memoizer[currentComponentErrorInfo] = true;
2300
+
2301
+ // Usually the current owner is the offender, but if it accepts children as a
2302
+ // property, it may be the creator of the child that's responsible for
2303
+ // assigning it a key.
2304
+ var childOwner = '';
2305
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
2306
+ // Give the component that originally created this child.
2307
+ childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
2308
+ }
2309
+
2310
+ "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;
2311
+ }
2312
+
2313
+ /**
2314
+ * Ensure that every element either is passed in a static location, in an
2315
+ * array with an explicit keys property defined, or in an object literal
2316
+ * with valid key property.
2317
+ *
2318
+ * @internal
2319
+ * @param {ReactNode} node Statically passed child of any type.
2320
+ * @param {*} parentType node's parent's type.
2321
+ */
2322
+ function validateChildKeys(node, parentType) {
2323
+ if (typeof node !== 'object') {
2324
+ return;
2325
+ }
2326
+ if (Array.isArray(node)) {
2327
+ for (var i = 0; i < node.length; i++) {
2328
+ var child = node[i];
2329
+ if (ReactElement.isValidElement(child)) {
2330
+ validateExplicitKey(child, parentType);
2331
+ }
2332
+ }
2333
+ } else if (ReactElement.isValidElement(node)) {
2334
+ // This element was passed in a valid location.
2335
+ if (node._store) {
2336
+ node._store.validated = true;
2337
+ }
2338
+ } else if (node) {
2339
+ var iteratorFn = getIteratorFn(node);
2340
+ // Entry iterators provide implicit keys.
2341
+ if (iteratorFn) {
2342
+ if (iteratorFn !== node.entries) {
2343
+ var iterator = iteratorFn.call(node);
2344
+ var step;
2345
+ while (!(step = iterator.next()).done) {
2346
+ if (ReactElement.isValidElement(step.value)) {
2347
+ validateExplicitKey(step.value, parentType);
2348
+ }
2349
+ }
2350
+ }
2351
+ }
2352
+ }
2353
+ }
2354
+
2355
+ /**
2356
+ * Given an element, validate that its props follow the propTypes definition,
2357
+ * provided by the type.
2358
+ *
2359
+ * @param {ReactElement} element
2360
+ */
2361
+ function validatePropTypes(element) {
2362
+ var componentClass = element.type;
2363
+ if (typeof componentClass !== 'function') {
2364
+ return;
2365
+ }
2366
+ var name = componentClass.displayName || componentClass.name;
2367
+ if (componentClass.propTypes) {
2368
+ checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
2369
+ }
2370
+ if (typeof componentClass.getDefaultProps === 'function') {
2371
+ "development" !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
2372
+ }
2373
+ }
2374
+
2375
+ var ReactElementValidator = {
2376
+
2377
+ createElement: function (type, props, children) {
2378
+ var validType = typeof type === 'string' || typeof type === 'function';
2379
+ // We warn in this case but don't throw. We expect the element creation to
2380
+ // succeed and there will likely be errors in render.
2381
+ if (!validType) {
2382
+ if (typeof type !== 'function' && typeof type !== 'string') {
2383
+ var info = '';
2384
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2385
+ info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
2386
+ }
2387
+
2388
+ var sourceInfo = getSourceInfoErrorAddendum(props);
2389
+ if (sourceInfo) {
2390
+ info += sourceInfo;
2391
+ } else {
2392
+ info += getDeclarationErrorAddendum();
2393
+ }
2394
+
2395
+ info += ReactComponentTreeHook.getCurrentStackAddendum();
2396
+
2397
+ "development" !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
2398
+ }
2399
+ }
2400
+
2401
+ var element = ReactElement.createElement.apply(this, arguments);
2402
+
2403
+ // The result can be nullish if a mock or a custom function is used.
2404
+ // TODO: Drop this when these are no longer allowed as the type argument.
2405
+ if (element == null) {
2406
+ return element;
2407
+ }
2408
+
2409
+ // Skip key warning if the type isn't valid since our key validation logic
2410
+ // doesn't expect a non-string/function type and can throw confusing errors.
2411
+ // We don't want exception behavior to differ between dev and prod.
2412
+ // (Rendering will throw with a helpful message and as soon as the type is
2413
+ // fixed, the key warnings will appear.)
2414
+ if (validType) {
2415
+ for (var i = 2; i < arguments.length; i++) {
2416
+ validateChildKeys(arguments[i], type);
2417
+ }
2418
+ }
2419
+
2420
+ validatePropTypes(element);
2421
+
2422
+ return element;
2423
+ },
2424
+
2425
+ createFactory: function (type) {
2426
+ var validatedFactory = ReactElementValidator.createElement.bind(null, type);
2427
+ // Legacy hook TODO: Warn if this is accessed
2428
+ validatedFactory.type = type;
2429
+
2430
+ if ("development" !== 'production') {
2431
+ if (canDefineProperty) {
2432
+ Object.defineProperty(validatedFactory, 'type', {
2433
+ enumerable: false,
2434
+ get: function () {
2435
+ "development" !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0;
2436
+ Object.defineProperty(this, 'type', {
2437
+ value: type
2438
+ });
2439
+ return type;
2440
+ }
2441
+ });
2442
+ }
2443
+ }
2444
+
2445
+ return validatedFactory;
2446
+ },
2447
+
2448
+ cloneElement: function (element, props, children) {
2449
+ var newElement = ReactElement.cloneElement.apply(this, arguments);
2450
+ for (var i = 2; i < arguments.length; i++) {
2451
+ validateChildKeys(arguments[i], newElement.type);
2452
+ }
2453
+ validatePropTypes(newElement);
2454
+ return newElement;
2455
+ }
2456
+
2457
+ };
2458
+
2459
+ module.exports = ReactElementValidator;
2460
+ },{"10":10,"20":20,"21":21,"22":22,"30":30,"7":7,"8":8}],13:[function(_dereq_,module,exports){
2461
+ /**
2462
+ * Copyright 2015-present, Facebook, Inc.
2463
+ * All rights reserved.
2464
+ *
2465
+ * This source code is licensed under the BSD-style license found in the
2466
+ * LICENSE file in the root directory of this source tree. An additional grant
2467
+ * of patent rights can be found in the PATENTS file in the same directory.
2468
+ *
2469
+ */
2470
+
2471
+ 'use strict';
2472
+
2473
+ var warning = _dereq_(30);
2474
+
2475
+ function warnNoop(publicInstance, callerName) {
2476
+ if ("development" !== 'production') {
2477
+ var constructor = publicInstance.constructor;
2478
+ "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;
2479
+ }
2480
+ }
2481
+
2482
+ /**
2483
+ * This is the abstract API for an update queue.
2484
+ */
2485
+ var ReactNoopUpdateQueue = {
2486
+
2487
+ /**
2488
+ * Checks whether or not this composite component is mounted.
2489
+ * @param {ReactClass} publicInstance The instance we want to test.
2490
+ * @return {boolean} True if mounted, false otherwise.
2491
+ * @protected
2492
+ * @final
2493
+ */
2494
+ isMounted: function (publicInstance) {
2495
+ return false;
2496
+ },
2497
+
2498
+ /**
2499
+ * Enqueue a callback that will be executed after all the pending updates
2500
+ * have processed.
2501
+ *
2502
+ * @param {ReactClass} publicInstance The instance to use as `this` context.
2503
+ * @param {?function} callback Called after state is updated.
2504
+ * @internal
2505
+ */
2506
+ enqueueCallback: function (publicInstance, callback) {},
2507
+
2508
+ /**
2509
+ * Forces an update. This should only be invoked when it is known with
2510
+ * certainty that we are **not** in a DOM transaction.
2511
+ *
2512
+ * You may want to call this when you know that some deeper aspect of the
2513
+ * component's state has changed but `setState` was not called.
2514
+ *
2515
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
2516
+ * `componentWillUpdate` and `componentDidUpdate`.
2517
+ *
2518
+ * @param {ReactClass} publicInstance The instance that should rerender.
2519
+ * @internal
2520
+ */
2521
+ enqueueForceUpdate: function (publicInstance) {
2522
+ warnNoop(publicInstance, 'forceUpdate');
2523
+ },
2524
+
2525
+ /**
2526
+ * Replaces all of the state. Always use this or `setState` to mutate state.
2527
+ * You should treat `this.state` as immutable.
2528
+ *
2529
+ * There is no guarantee that `this.state` will be immediately updated, so
2530
+ * accessing `this.state` after calling this method may return the old value.
2531
+ *
2532
+ * @param {ReactClass} publicInstance The instance that should rerender.
2533
+ * @param {object} completeState Next state.
2534
+ * @internal
2535
+ */
2536
+ enqueueReplaceState: function (publicInstance, completeState) {
2537
+ warnNoop(publicInstance, 'replaceState');
2538
+ },
2539
+
2540
+ /**
2541
+ * Sets a subset of the state. This only exists because _pendingState is
2542
+ * internal. This provides a merging strategy that is not available to deep
2543
+ * properties which is confusing. TODO: Expose pendingState or don't use it
2544
+ * during the merge.
2545
+ *
2546
+ * @param {ReactClass} publicInstance The instance that should rerender.
2547
+ * @param {object} partialState Next partial state to be merged with state.
2548
+ * @internal
2549
+ */
2550
+ enqueueSetState: function (publicInstance, partialState) {
2551
+ warnNoop(publicInstance, 'setState');
2552
+ }
2553
+ };
2554
+
2555
+ module.exports = ReactNoopUpdateQueue;
2556
+ },{"30":30}],14:[function(_dereq_,module,exports){
2557
+ /**
2558
+ * Copyright 2013-present, Facebook, Inc.
2559
+ * All rights reserved.
2560
+ *
2561
+ * This source code is licensed under the BSD-style license found in the
2562
+ * LICENSE file in the root directory of this source tree. An additional grant
2563
+ * of patent rights can be found in the PATENTS file in the same directory.
2564
+ *
2565
+ *
2566
+ */
2567
+
2568
+ 'use strict';
2569
+
2570
+ var ReactPropTypeLocationNames = {};
2571
+
2572
+ if ("development" !== 'production') {
2573
+ ReactPropTypeLocationNames = {
2574
+ prop: 'prop',
2575
+ context: 'context',
2576
+ childContext: 'child context'
2577
+ };
2578
+ }
2579
+
2580
+ module.exports = ReactPropTypeLocationNames;
2581
+ },{}],15:[function(_dereq_,module,exports){
2582
+ /**
2583
+ * Copyright 2013-present, Facebook, Inc.
2584
+ * All rights reserved.
2585
+ *
2586
+ * This source code is licensed under the BSD-style license found in the
2587
+ * LICENSE file in the root directory of this source tree. An additional grant
2588
+ * of patent rights can be found in the PATENTS file in the same directory.
2589
+ *
2590
+ */
2591
+
2592
+ 'use strict';
2593
+
2594
+ var _require = _dereq_(10),
2595
+ isValidElement = _require.isValidElement;
2596
+
2597
+ var factory = _dereq_(33);
2598
+
2599
+ module.exports = factory(isValidElement);
2600
+ },{"10":10,"33":33}],16:[function(_dereq_,module,exports){
2601
+ /**
2602
+ * Copyright 2013-present, Facebook, Inc.
2603
+ * All rights reserved.
2604
+ *
2605
+ * This source code is licensed under the BSD-style license found in the
2606
+ * LICENSE file in the root directory of this source tree. An additional grant
2607
+ * of patent rights can be found in the PATENTS file in the same directory.
2608
+ *
2609
+ *
2610
+ */
2611
+
2612
+ 'use strict';
2613
+
2614
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2615
+
2616
+ module.exports = ReactPropTypesSecret;
2617
+ },{}],17:[function(_dereq_,module,exports){
2618
+ /**
2619
+ * Copyright 2013-present, Facebook, Inc.
2620
+ * All rights reserved.
2621
+ *
2622
+ * This source code is licensed under the BSD-style license found in the
2623
+ * LICENSE file in the root directory of this source tree. An additional grant
2624
+ * of patent rights can be found in the PATENTS file in the same directory.
2625
+ *
2626
+ */
2627
+
2628
+ 'use strict';
2629
+
2630
+ var _assign = _dereq_(31);
2631
+
2632
+ var ReactComponent = _dereq_(6);
2633
+ var ReactNoopUpdateQueue = _dereq_(13);
2634
+
2635
+ var emptyObject = _dereq_(28);
2636
+
2637
+ /**
2638
+ * Base class helpers for the updating state of a component.
2639
+ */
2640
+ function ReactPureComponent(props, context, updater) {
2641
+ // Duplicated from ReactComponent.
2642
+ this.props = props;
2643
+ this.context = context;
2644
+ this.refs = emptyObject;
2645
+ // We initialize the default updater but the real one gets injected by the
2646
+ // renderer.
2647
+ this.updater = updater || ReactNoopUpdateQueue;
2648
+ }
2649
+
2650
+ function ComponentDummy() {}
2651
+ ComponentDummy.prototype = ReactComponent.prototype;
2652
+ ReactPureComponent.prototype = new ComponentDummy();
2653
+ ReactPureComponent.prototype.constructor = ReactPureComponent;
2654
+ // Avoid an extra prototype jump for these methods.
2655
+ _assign(ReactPureComponent.prototype, ReactComponent.prototype);
2656
+ ReactPureComponent.prototype.isPureReactComponent = true;
2657
+
2658
+ module.exports = ReactPureComponent;
2659
+ },{"13":13,"28":28,"31":31,"6":6}],18:[function(_dereq_,module,exports){
2660
+ /**
2661
+ * Copyright 2013-present, Facebook, Inc.
2662
+ * All rights reserved.
2663
+ *
2664
+ * This source code is licensed under the BSD-style license found in the
2665
+ * LICENSE file in the root directory of this source tree. An additional grant
2666
+ * of patent rights can be found in the PATENTS file in the same directory.
2667
+ *
2668
+ */
2669
+
2670
+ 'use strict';
2671
+
2672
+ var _assign = _dereq_(31);
2673
+
2674
+ var React = _dereq_(3);
2675
+
2676
+ // `version` will be added here by the React module.
2677
+ var ReactUMDEntry = _assign(React, {
2678
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
2679
+ ReactCurrentOwner: _dereq_(8)
2680
+ }
2681
+ });
2682
+
2683
+ if ("development" !== 'production') {
2684
+ _assign(ReactUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
2685
+ // ReactComponentTreeHook should not be included in production.
2686
+ ReactComponentTreeHook: _dereq_(7),
2687
+ getNextDebugID: _dereq_(23)
2688
+ });
2689
+ }
2690
+
2691
+ module.exports = ReactUMDEntry;
2692
+ },{"23":23,"3":3,"31":31,"7":7,"8":8}],19:[function(_dereq_,module,exports){
2693
+ /**
2694
+ * Copyright 2013-present, Facebook, Inc.
2695
+ * All rights reserved.
2696
+ *
2697
+ * This source code is licensed under the BSD-style license found in the
2698
+ * LICENSE file in the root directory of this source tree. An additional grant
2699
+ * of patent rights can be found in the PATENTS file in the same directory.
2700
+ *
2701
+ */
2702
+
2703
+ 'use strict';
2704
+
2705
+ module.exports = '15.5.4';
2706
+ },{}],20:[function(_dereq_,module,exports){
2707
+ /**
2708
+ * Copyright 2013-present, Facebook, Inc.
2709
+ * All rights reserved.
2710
+ *
2711
+ * This source code is licensed under the BSD-style license found in the
2712
+ * LICENSE file in the root directory of this source tree. An additional grant
2713
+ * of patent rights can be found in the PATENTS file in the same directory.
2714
+ *
2715
+ *
2716
+ */
2717
+
2718
+ 'use strict';
2719
+
2720
+ var canDefineProperty = false;
2721
+ if ("development" !== 'production') {
2722
+ try {
2723
+ // $FlowFixMe https://github.com/facebook/flow/issues/285
2724
+ Object.defineProperty({}, 'x', { get: function () {} });
2725
+ canDefineProperty = true;
2726
+ } catch (x) {
2727
+ // IE will fail on defineProperty
2728
+ }
2729
+ }
2730
+
2731
+ module.exports = canDefineProperty;
2732
+ },{}],21:[function(_dereq_,module,exports){
2733
+ (function (process){
2734
+ /**
2735
+ * Copyright 2013-present, Facebook, Inc.
2736
+ * All rights reserved.
2737
+ *
2738
+ * This source code is licensed under the BSD-style license found in the
2739
+ * LICENSE file in the root directory of this source tree. An additional grant
2740
+ * of patent rights can be found in the PATENTS file in the same directory.
2741
+ *
2742
+ */
2743
+
2744
+ 'use strict';
2745
+
2746
+ var _prodInvariant = _dereq_(25);
2747
+
2748
+ var ReactPropTypeLocationNames = _dereq_(14);
2749
+ var ReactPropTypesSecret = _dereq_(16);
2750
+
2751
+ var invariant = _dereq_(29);
2752
+ var warning = _dereq_(30);
2753
+
2754
+ var ReactComponentTreeHook;
2755
+
2756
+ if (typeof process !== 'undefined' && process.env && "development" === 'test') {
2757
+ // Temporary hack.
2758
+ // Inline requires don't work well with Jest:
2759
+ // https://github.com/facebook/react/issues/7240
2760
+ // Remove the inline requires when we don't need them anymore:
2761
+ // https://github.com/facebook/react/pull/7178
2762
+ ReactComponentTreeHook = _dereq_(7);
2763
+ }
2764
+
2765
+ var loggedTypeFailures = {};
2766
+
2767
+ /**
2768
+ * Assert that the values match with the type specs.
2769
+ * Error messages are memorized and will only be shown once.
2770
+ *
2771
+ * @param {object} typeSpecs Map of name to a ReactPropType
2772
+ * @param {object} values Runtime values that need to be type-checked
2773
+ * @param {string} location e.g. "prop", "context", "child context"
2774
+ * @param {string} componentName Name of the component for error messages.
2775
+ * @param {?object} element The React element that is being type-checked
2776
+ * @param {?number} debugID The React component instance that is being type-checked
2777
+ * @private
2778
+ */
2779
+ function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
2780
+ for (var typeSpecName in typeSpecs) {
2781
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
2782
+ var error;
2783
+ // Prop type validation may throw. In case they do, we don't want to
2784
+ // fail the render phase where it didn't fail before. So we log it.
2785
+ // After these have been cleaned up, we'll let them throw.
2786
+ try {
2787
+ // This is intentionally an invariant that gets caught. It's the same
2788
+ // behavior as without this statement except with a better message.
2789
+ !(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;
2790
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
2791
+ } catch (ex) {
2792
+ error = ex;
2793
+ }
2794
+ "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;
2795
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
2796
+ // Only monitor this failure once because there tends to be a lot of the
2797
+ // same error.
2798
+ loggedTypeFailures[error.message] = true;
2799
+
2800
+ var componentStackInfo = '';
2801
+
2802
+ if ("development" !== 'production') {
2803
+ if (!ReactComponentTreeHook) {
2804
+ ReactComponentTreeHook = _dereq_(7);
2805
+ }
2806
+ if (debugID !== null) {
2807
+ componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
2808
+ } else if (element !== null) {
2809
+ componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
2810
+ }
2811
+ }
2812
+
2813
+ "development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
2814
+ }
2815
+ }
2816
+ }
2817
+ }
2818
+
2819
+ module.exports = checkReactTypeSpec;
2820
+ }).call(this,undefined)
2821
+ },{"14":14,"16":16,"25":25,"29":29,"30":30,"7":7}],22:[function(_dereq_,module,exports){
2822
+ /**
2823
+ * Copyright 2013-present, Facebook, Inc.
2824
+ * All rights reserved.
2825
+ *
2826
+ * This source code is licensed under the BSD-style license found in the
2827
+ * LICENSE file in the root directory of this source tree. An additional grant
2828
+ * of patent rights can be found in the PATENTS file in the same directory.
2829
+ *
2830
+ *
2831
+ */
2832
+
2833
+ 'use strict';
2834
+
2835
+ /* global Symbol */
2836
+
2837
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2838
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
2839
+
2840
+ /**
2841
+ * Returns the iterator method function contained on the iterable object.
2842
+ *
2843
+ * Be sure to invoke the function with the iterable as context:
2844
+ *
2845
+ * var iteratorFn = getIteratorFn(myIterable);
2846
+ * if (iteratorFn) {
2847
+ * var iterator = iteratorFn.call(myIterable);
2848
+ * ...
2849
+ * }
2850
+ *
2851
+ * @param {?object} maybeIterable
2852
+ * @return {?function}
2853
+ */
2854
+ function getIteratorFn(maybeIterable) {
2855
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
2856
+ if (typeof iteratorFn === 'function') {
2857
+ return iteratorFn;
2858
+ }
2859
+ }
2860
+
2861
+ module.exports = getIteratorFn;
2862
+ },{}],23:[function(_dereq_,module,exports){
2863
+ /**
2864
+ * Copyright 2013-present, Facebook, Inc.
2865
+ * All rights reserved.
2866
+ *
2867
+ * This source code is licensed under the BSD-style license found in the
2868
+ * LICENSE file in the root directory of this source tree. An additional grant
2869
+ * of patent rights can be found in the PATENTS file in the same directory.
2870
+ *
2871
+ *
2872
+ */
2873
+
2874
+ 'use strict';
2875
+
2876
+ var nextDebugID = 1;
2877
+
2878
+ function getNextDebugID() {
2879
+ return nextDebugID++;
2880
+ }
2881
+
2882
+ module.exports = getNextDebugID;
2883
+ },{}],24:[function(_dereq_,module,exports){
2884
+ /**
2885
+ * Copyright 2013-present, Facebook, Inc.
2886
+ * All rights reserved.
2887
+ *
2888
+ * This source code is licensed under the BSD-style license found in the
2889
+ * LICENSE file in the root directory of this source tree. An additional grant
2890
+ * of patent rights can be found in the PATENTS file in the same directory.
2891
+ *
2892
+ */
2893
+ 'use strict';
2894
+
2895
+ var _prodInvariant = _dereq_(25);
2896
+
2897
+ var ReactElement = _dereq_(10);
2898
+
2899
+ var invariant = _dereq_(29);
2900
+
2901
+ /**
2902
+ * Returns the first child in a collection of children and verifies that there
2903
+ * is only one child in the collection.
2904
+ *
2905
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
2906
+ *
2907
+ * The current implementation of this function assumes that a single child gets
2908
+ * passed without a wrapper, but the purpose of this helper function is to
2909
+ * abstract away the particular structure of children.
2910
+ *
2911
+ * @param {?object} children Child collection structure.
2912
+ * @return {ReactElement} The first and only `ReactElement` contained in the
2913
+ * structure.
2914
+ */
2915
+ function onlyChild(children) {
2916
+ !ReactElement.isValidElement(children) ? "development" !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
2917
+ return children;
2918
+ }
2919
+
2920
+ module.exports = onlyChild;
2921
+ },{"10":10,"25":25,"29":29}],25:[function(_dereq_,module,exports){
2922
+ /**
2923
+ * Copyright (c) 2013-present, Facebook, Inc.
2924
+ * All rights reserved.
2925
+ *
2926
+ * This source code is licensed under the BSD-style license found in the
2927
+ * LICENSE file in the root directory of this source tree. An additional grant
2928
+ * of patent rights can be found in the PATENTS file in the same directory.
2929
+ *
2930
+ *
2931
+ */
2932
+ 'use strict';
2933
+
2934
+ /**
2935
+ * WARNING: DO NOT manually require this module.
2936
+ * This is a replacement for `invariant(...)` used by the error code system
2937
+ * and will _only_ be required by the corresponding babel pass.
2938
+ * It always throws.
2939
+ */
2940
+
2941
+ function reactProdInvariant(code) {
2942
+ var argCount = arguments.length - 1;
2943
+
2944
+ var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
2945
+
2946
+ for (var argIdx = 0; argIdx < argCount; argIdx++) {
2947
+ message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
2948
+ }
2949
+
2950
+ message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
2951
+
2952
+ var error = new Error(message);
2953
+ error.name = 'Invariant Violation';
2954
+ error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
2955
+
2956
+ throw error;
2957
+ }
2958
+
2959
+ module.exports = reactProdInvariant;
2960
+ },{}],26:[function(_dereq_,module,exports){
2961
+ /**
2962
+ * Copyright 2013-present, Facebook, Inc.
2963
+ * All rights reserved.
2964
+ *
2965
+ * This source code is licensed under the BSD-style license found in the
2966
+ * LICENSE file in the root directory of this source tree. An additional grant
2967
+ * of patent rights can be found in the PATENTS file in the same directory.
2968
+ *
2969
+ */
2970
+
2971
+ 'use strict';
2972
+
2973
+ var _prodInvariant = _dereq_(25);
2974
+
2975
+ var ReactCurrentOwner = _dereq_(8);
2976
+ var REACT_ELEMENT_TYPE = _dereq_(11);
2977
+
2978
+ var getIteratorFn = _dereq_(22);
2979
+ var invariant = _dereq_(29);
2980
+ var KeyEscapeUtils = _dereq_(1);
2981
+ var warning = _dereq_(30);
2982
+
2983
+ var SEPARATOR = '.';
2984
+ var SUBSEPARATOR = ':';
2985
+
2986
+ /**
2987
+ * This is inlined from ReactElement since this file is shared between
2988
+ * isomorphic and renderers. We could extract this to a
2989
+ *
2990
+ */
2991
+
2992
+ /**
2993
+ * TODO: Test that a single child and an array with one item have the same key
2994
+ * pattern.
2995
+ */
2996
+
2997
+ var didWarnAboutMaps = false;
2998
+
2999
+ /**
3000
+ * Generate a key string that identifies a component within a set.
3001
+ *
3002
+ * @param {*} component A component that could contain a manual key.
3003
+ * @param {number} index Index that is used if a manual key is not provided.
3004
+ * @return {string}
3005
+ */
3006
+ function getComponentKey(component, index) {
3007
+ // Do some typechecking here since we call this blindly. We want to ensure
3008
+ // that we don't block potential future ES APIs.
3009
+ if (component && typeof component === 'object' && component.key != null) {
3010
+ // Explicit key
3011
+ return KeyEscapeUtils.escape(component.key);
3012
+ }
3013
+ // Implicit key determined by the index in the set
3014
+ return index.toString(36);
3015
+ }
3016
+
3017
+ /**
3018
+ * @param {?*} children Children tree container.
3019
+ * @param {!string} nameSoFar Name of the key path so far.
3020
+ * @param {!function} callback Callback to invoke with each child found.
3021
+ * @param {?*} traverseContext Used to pass information throughout the traversal
3022
+ * process.
3023
+ * @return {!number} The number of children in this subtree.
3024
+ */
3025
+ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
3026
+ var type = typeof children;
3027
+
3028
+ if (type === 'undefined' || type === 'boolean') {
3029
+ // All of the above are perceived as null.
3030
+ children = null;
3031
+ }
3032
+
3033
+ if (children === null || type === 'string' || type === 'number' ||
3034
+ // The following is inlined from ReactElement. This means we can optimize
3035
+ // some checks. React Fiber also inlines this logic for similar purposes.
3036
+ type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
3037
+ callback(traverseContext, children,
3038
+ // If it's the only child, treat the name as if it was wrapped in an array
3039
+ // so that it's consistent if the number of children grows.
3040
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
3041
+ return 1;
3042
+ }
3043
+
3044
+ var child;
3045
+ var nextName;
3046
+ var subtreeCount = 0; // Count of children found in the current subtree.
3047
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
3048
+
3049
+ if (Array.isArray(children)) {
3050
+ for (var i = 0; i < children.length; i++) {
3051
+ child = children[i];
3052
+ nextName = nextNamePrefix + getComponentKey(child, i);
3053
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
3054
+ }
3055
+ } else {
3056
+ var iteratorFn = getIteratorFn(children);
3057
+ if (iteratorFn) {
3058
+ var iterator = iteratorFn.call(children);
3059
+ var step;
3060
+ if (iteratorFn !== children.entries) {
3061
+ var ii = 0;
3062
+ while (!(step = iterator.next()).done) {
3063
+ child = step.value;
3064
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
3065
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
3066
+ }
3067
+ } else {
3068
+ if ("development" !== 'production') {
3069
+ var mapsAsChildrenAddendum = '';
3070
+ if (ReactCurrentOwner.current) {
3071
+ var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
3072
+ if (mapsAsChildrenOwnerName) {
3073
+ mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
3074
+ }
3075
+ }
3076
+ "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;
3077
+ didWarnAboutMaps = true;
3078
+ }
3079
+ // Iterator will provide entry [k,v] tuples rather than values.
3080
+ while (!(step = iterator.next()).done) {
3081
+ var entry = step.value;
3082
+ if (entry) {
3083
+ child = entry[1];
3084
+ nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
3085
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
3086
+ }
3087
+ }
3088
+ }
3089
+ } else if (type === 'object') {
3090
+ var addendum = '';
3091
+ if ("development" !== 'production') {
3092
+ 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.';
3093
+ if (children._isReactElement) {
3094
+ 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.';
3095
+ }
3096
+ if (ReactCurrentOwner.current) {
3097
+ var name = ReactCurrentOwner.current.getName();
3098
+ if (name) {
3099
+ addendum += ' Check the render method of `' + name + '`.';
3100
+ }
3101
+ }
3102
+ }
3103
+ var childrenString = String(children);
3104
+ !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;
3105
+ }
3106
+ }
3107
+
3108
+ return subtreeCount;
3109
+ }
3110
+
3111
+ /**
3112
+ * Traverses children that are typically specified as `props.children`, but
3113
+ * might also be specified through attributes:
3114
+ *
3115
+ * - `traverseAllChildren(this.props.children, ...)`
3116
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
3117
+ *
3118
+ * The `traverseContext` is an optional argument that is passed through the
3119
+ * entire traversal. It can be used to store accumulations or anything else that
3120
+ * the callback might find relevant.
3121
+ *
3122
+ * @param {?*} children Children tree object.
3123
+ * @param {!function} callback To invoke upon traversing each child.
3124
+ * @param {?*} traverseContext Context for traversal.
3125
+ * @return {!number} The number of children in this subtree.
3126
+ */
3127
+ function traverseAllChildren(children, callback, traverseContext) {
3128
+ if (children == null) {
3129
+ return 0;
3130
+ }
3131
+
3132
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
3133
+ }
3134
+
3135
+ module.exports = traverseAllChildren;
3136
+ },{"1":1,"11":11,"22":22,"25":25,"29":29,"30":30,"8":8}],27:[function(_dereq_,module,exports){
3137
+ "use strict";
3138
+
3139
+ /**
3140
+ * Copyright (c) 2013-present, Facebook, Inc.
3141
+ * All rights reserved.
3142
+ *
3143
+ * This source code is licensed under the BSD-style license found in the
3144
+ * LICENSE file in the root directory of this source tree. An additional grant
3145
+ * of patent rights can be found in the PATENTS file in the same directory.
3146
+ *
3147
+ *
3148
+ */
3149
+
3150
+ function makeEmptyFunction(arg) {
3151
+ return function () {
3152
+ return arg;
3153
+ };
3154
+ }
3155
+
3156
+ /**
3157
+ * This function accepts and discards inputs; it has no side effects. This is
3158
+ * primarily useful idiomatically for overridable function endpoints which
3159
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
3160
+ */
3161
+ var emptyFunction = function emptyFunction() {};
3162
+
3163
+ emptyFunction.thatReturns = makeEmptyFunction;
3164
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
3165
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
3166
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
3167
+ emptyFunction.thatReturnsThis = function () {
3168
+ return this;
3169
+ };
3170
+ emptyFunction.thatReturnsArgument = function (arg) {
3171
+ return arg;
3172
+ };
3173
+
3174
+ module.exports = emptyFunction;
3175
+ },{}],28:[function(_dereq_,module,exports){
3176
+ /**
3177
+ * Copyright (c) 2013-present, Facebook, Inc.
3178
+ * All rights reserved.
3179
+ *
3180
+ * This source code is licensed under the BSD-style license found in the
3181
+ * LICENSE file in the root directory of this source tree. An additional grant
3182
+ * of patent rights can be found in the PATENTS file in the same directory.
3183
+ *
3184
+ */
3185
+
3186
+ 'use strict';
3187
+
3188
+ var emptyObject = {};
3189
+
3190
+ if ("development" !== 'production') {
3191
+ Object.freeze(emptyObject);
3192
+ }
3193
+
3194
+ module.exports = emptyObject;
3195
+ },{}],29:[function(_dereq_,module,exports){
3196
+ /**
3197
+ * Copyright (c) 2013-present, Facebook, Inc.
3198
+ * All rights reserved.
3199
+ *
3200
+ * This source code is licensed under the BSD-style license found in the
3201
+ * LICENSE file in the root directory of this source tree. An additional grant
3202
+ * of patent rights can be found in the PATENTS file in the same directory.
3203
+ *
3204
+ */
3205
+
3206
+ 'use strict';
3207
+
3208
+ /**
3209
+ * Use invariant() to assert state which your program assumes to be true.
3210
+ *
3211
+ * Provide sprintf-style format (only %s is supported) and arguments
3212
+ * to provide information about what broke and what you were
3213
+ * expecting.
3214
+ *
3215
+ * The invariant message will be stripped in production, but the invariant
3216
+ * will remain to ensure logic does not differ in production.
3217
+ */
3218
+
3219
+ var validateFormat = function validateFormat(format) {};
3220
+
3221
+ if ("development" !== 'production') {
3222
+ validateFormat = function validateFormat(format) {
3223
+ if (format === undefined) {
3224
+ throw new Error('invariant requires an error message argument');
3225
+ }
3226
+ };
3227
+ }
3228
+
3229
+ function invariant(condition, format, a, b, c, d, e, f) {
3230
+ validateFormat(format);
3231
+
3232
+ if (!condition) {
3233
+ var error;
3234
+ if (format === undefined) {
3235
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
3236
+ } else {
3237
+ var args = [a, b, c, d, e, f];
3238
+ var argIndex = 0;
3239
+ error = new Error(format.replace(/%s/g, function () {
3240
+ return args[argIndex++];
3241
+ }));
3242
+ error.name = 'Invariant Violation';
3243
+ }
3244
+
3245
+ error.framesToPop = 1; // we don't care about invariant's own frame
3246
+ throw error;
3247
+ }
3248
+ }
3249
+
3250
+ module.exports = invariant;
3251
+ },{}],30:[function(_dereq_,module,exports){
3252
+ /**
3253
+ * Copyright 2014-2015, Facebook, Inc.
3254
+ * All rights reserved.
3255
+ *
3256
+ * This source code is licensed under the BSD-style license found in the
3257
+ * LICENSE file in the root directory of this source tree. An additional grant
3258
+ * of patent rights can be found in the PATENTS file in the same directory.
3259
+ *
3260
+ */
3261
+
3262
+ 'use strict';
3263
+
3264
+ var emptyFunction = _dereq_(27);
3265
+
3266
+ /**
3267
+ * Similar to invariant but only logs a warning if the condition is not met.
3268
+ * This can be used to log issues in development environments in critical
3269
+ * paths. Removing the logging code for production environments will keep the
3270
+ * same logic and follow the same code paths.
3271
+ */
3272
+
3273
+ var warning = emptyFunction;
3274
+
3275
+ if ("development" !== 'production') {
3276
+ (function () {
3277
+ var printWarning = function printWarning(format) {
3278
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3279
+ args[_key - 1] = arguments[_key];
3280
+ }
3281
+
3282
+ var argIndex = 0;
3283
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
3284
+ return args[argIndex++];
3285
+ });
3286
+ if (typeof console !== 'undefined') {
3287
+ console.error(message);
3288
+ }
3289
+ try {
3290
+ // --- Welcome to debugging React ---
3291
+ // This error was thrown as a convenience so that you can use this stack
3292
+ // to find the callsite that caused this warning to fire.
3293
+ throw new Error(message);
3294
+ } catch (x) {}
3295
+ };
3296
+
3297
+ warning = function warning(condition, format) {
3298
+ if (format === undefined) {
3299
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
3300
+ }
3301
+
3302
+ if (format.indexOf('Failed Composite propType: ') === 0) {
3303
+ return; // Ignore CompositeComponent proptype check.
3304
+ }
3305
+
3306
+ if (!condition) {
3307
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
3308
+ args[_key2 - 2] = arguments[_key2];
3309
+ }
3310
+
3311
+ printWarning.apply(undefined, [format].concat(args));
3312
+ }
3313
+ };
3314
+ })();
3315
+ }
3316
+
3317
+ module.exports = warning;
3318
+ },{"27":27}],31:[function(_dereq_,module,exports){
3319
+ /*
3320
+ object-assign
3321
+ (c) Sindre Sorhus
3322
+ @license MIT
3323
+ */
3324
+
3325
+ 'use strict';
3326
+ /* eslint-disable no-unused-vars */
3327
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
3328
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
3329
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
3330
+
3331
+ function toObject(val) {
3332
+ if (val === null || val === undefined) {
3333
+ throw new TypeError('Object.assign cannot be called with null or undefined');
3334
+ }
3335
+
3336
+ return Object(val);
3337
+ }
3338
+
3339
+ function shouldUseNative() {
3340
+ try {
3341
+ if (!Object.assign) {
3342
+ return false;
3343
+ }
3344
+
3345
+ // Detect buggy property enumeration order in older V8 versions.
3346
+
3347
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
3348
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
3349
+ test1[5] = 'de';
3350
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
3351
+ return false;
3352
+ }
3353
+
3354
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
3355
+ var test2 = {};
3356
+ for (var i = 0; i < 10; i++) {
3357
+ test2['_' + String.fromCharCode(i)] = i;
3358
+ }
3359
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
3360
+ return test2[n];
3361
+ });
3362
+ if (order2.join('') !== '0123456789') {
3363
+ return false;
3364
+ }
3365
+
3366
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
3367
+ var test3 = {};
3368
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
3369
+ test3[letter] = letter;
3370
+ });
3371
+ if (Object.keys(Object.assign({}, test3)).join('') !==
3372
+ 'abcdefghijklmnopqrst') {
3373
+ return false;
3374
+ }
3375
+
3376
+ return true;
3377
+ } catch (err) {
3378
+ // We don't expect any of the above to throw, but better to be safe.
3379
+ return false;
3380
+ }
3381
+ }
3382
+
3383
+ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
3384
+ var from;
3385
+ var to = toObject(target);
3386
+ var symbols;
3387
+
3388
+ for (var s = 1; s < arguments.length; s++) {
3389
+ from = Object(arguments[s]);
3390
+
3391
+ for (var key in from) {
3392
+ if (hasOwnProperty.call(from, key)) {
3393
+ to[key] = from[key];
3394
+ }
3395
+ }
3396
+
3397
+ if (getOwnPropertySymbols) {
3398
+ symbols = getOwnPropertySymbols(from);
3399
+ for (var i = 0; i < symbols.length; i++) {
3400
+ if (propIsEnumerable.call(from, symbols[i])) {
3401
+ to[symbols[i]] = from[symbols[i]];
3402
+ }
3403
+ }
3404
+ }
3405
+ }
3406
+
3407
+ return to;
3408
+ };
3409
+
3410
+ },{}],32:[function(_dereq_,module,exports){
3411
+ /**
3412
+ * Copyright 2013-present, Facebook, Inc.
3413
+ * All rights reserved.
3414
+ *
3415
+ * This source code is licensed under the BSD-style license found in the
3416
+ * LICENSE file in the root directory of this source tree. An additional grant
3417
+ * of patent rights can be found in the PATENTS file in the same directory.
3418
+ */
3419
+
3420
+ 'use strict';
3421
+
3422
+ if ("development" !== 'production') {
3423
+ var invariant = _dereq_(29);
3424
+ var warning = _dereq_(30);
3425
+ var ReactPropTypesSecret = _dereq_(35);
3426
+ var loggedTypeFailures = {};
3427
+ }
3428
+
3429
+ /**
3430
+ * Assert that the values match with the type specs.
3431
+ * Error messages are memorized and will only be shown once.
3432
+ *
3433
+ * @param {object} typeSpecs Map of name to a ReactPropType
3434
+ * @param {object} values Runtime values that need to be type-checked
3435
+ * @param {string} location e.g. "prop", "context", "child context"
3436
+ * @param {string} componentName Name of the component for error messages.
3437
+ * @param {?Function} getStack Returns the component stack.
3438
+ * @private
3439
+ */
3440
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
3441
+ if ("development" !== 'production') {
3442
+ for (var typeSpecName in typeSpecs) {
3443
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
3444
+ var error;
3445
+ // Prop type validation may throw. In case they do, we don't want to
3446
+ // fail the render phase where it didn't fail before. So we log it.
3447
+ // After these have been cleaned up, we'll let them throw.
3448
+ try {
3449
+ // This is intentionally an invariant that gets caught. It's the same
3450
+ // behavior as without this statement except with a better message.
3451
+ invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
3452
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
3453
+ } catch (ex) {
3454
+ error = ex;
3455
+ }
3456
+ 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', location, typeSpecName, typeof error);
3457
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
3458
+ // Only monitor this failure once because there tends to be a lot of the
3459
+ // same error.
3460
+ loggedTypeFailures[error.message] = true;
3461
+
3462
+ var stack = getStack ? getStack() : '';
3463
+
3464
+ warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
3465
+ }
3466
+ }
3467
+ }
3468
+ }
3469
+ }
3470
+
3471
+ module.exports = checkPropTypes;
3472
+
3473
+ },{"29":29,"30":30,"35":35}],33:[function(_dereq_,module,exports){
3474
+ /**
3475
+ * Copyright 2013-present, Facebook, Inc.
3476
+ * All rights reserved.
3477
+ *
3478
+ * This source code is licensed under the BSD-style license found in the
3479
+ * LICENSE file in the root directory of this source tree. An additional grant
3480
+ * of patent rights can be found in the PATENTS file in the same directory.
3481
+ */
3482
+
3483
+ 'use strict';
3484
+
3485
+ // React 15.5 references this module, and assumes PropTypes are still callable in production.
3486
+ // Therefore we re-export development-only version with all the PropTypes checks here.
3487
+ // However if one is migrating to the `prop-types` npm library, they will go through the
3488
+ // `index.js` entry point, and it will branch depending on the environment.
3489
+ var factory = _dereq_(34);
3490
+ module.exports = function(isValidElement) {
3491
+ // It is still allowed in 15.5.
3492
+ var throwOnDirectAccess = false;
3493
+ return factory(isValidElement, throwOnDirectAccess);
3494
+ };
3495
+
3496
+ },{"34":34}],34:[function(_dereq_,module,exports){
3497
+ /**
3498
+ * Copyright 2013-present, Facebook, Inc.
3499
+ * All rights reserved.
3500
+ *
3501
+ * This source code is licensed under the BSD-style license found in the
3502
+ * LICENSE file in the root directory of this source tree. An additional grant
3503
+ * of patent rights can be found in the PATENTS file in the same directory.
3504
+ */
3505
+
3506
+ 'use strict';
3507
+
3508
+ var emptyFunction = _dereq_(27);
3509
+ var invariant = _dereq_(29);
3510
+ var warning = _dereq_(30);
3511
+
3512
+ var ReactPropTypesSecret = _dereq_(35);
3513
+ var checkPropTypes = _dereq_(32);
3514
+
3515
+ module.exports = function(isValidElement, throwOnDirectAccess) {
3516
+ /* global Symbol */
3517
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
3518
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
3519
+
3520
+ /**
3521
+ * Returns the iterator method function contained on the iterable object.
3522
+ *
3523
+ * Be sure to invoke the function with the iterable as context:
3524
+ *
3525
+ * var iteratorFn = getIteratorFn(myIterable);
3526
+ * if (iteratorFn) {
3527
+ * var iterator = iteratorFn.call(myIterable);
3528
+ * ...
3529
+ * }
3530
+ *
3531
+ * @param {?object} maybeIterable
3532
+ * @return {?function}
3533
+ */
3534
+ function getIteratorFn(maybeIterable) {
3535
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
3536
+ if (typeof iteratorFn === 'function') {
3537
+ return iteratorFn;
3538
+ }
3539
+ }
3540
+
3541
+ /**
3542
+ * Collection of methods that allow declaration and validation of props that are
3543
+ * supplied to React components. Example usage:
3544
+ *
3545
+ * var Props = require('ReactPropTypes');
3546
+ * var MyArticle = React.createClass({
3547
+ * propTypes: {
3548
+ * // An optional string prop named "description".
3549
+ * description: Props.string,
3550
+ *
3551
+ * // A required enum prop named "category".
3552
+ * category: Props.oneOf(['News','Photos']).isRequired,
3553
+ *
3554
+ * // A prop named "dialog" that requires an instance of Dialog.
3555
+ * dialog: Props.instanceOf(Dialog).isRequired
3556
+ * },
3557
+ * render: function() { ... }
3558
+ * });
3559
+ *
3560
+ * A more formal specification of how these methods are used:
3561
+ *
3562
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
3563
+ * decl := ReactPropTypes.{type}(.isRequired)?
3564
+ *
3565
+ * Each and every declaration produces a function with the same signature. This
3566
+ * allows the creation of custom validation functions. For example:
3567
+ *
3568
+ * var MyLink = React.createClass({
3569
+ * propTypes: {
3570
+ * // An optional string or URI prop named "href".
3571
+ * href: function(props, propName, componentName) {
3572
+ * var propValue = props[propName];
3573
+ * if (propValue != null && typeof propValue !== 'string' &&
3574
+ * !(propValue instanceof URI)) {
3575
+ * return new Error(
3576
+ * 'Expected a string or an URI for ' + propName + ' in ' +
3577
+ * componentName
3578
+ * );
3579
+ * }
3580
+ * }
3581
+ * },
3582
+ * render: function() {...}
3583
+ * });
3584
+ *
3585
+ * @internal
3586
+ */
3587
+
3588
+ var ANONYMOUS = '<<anonymous>>';
3589
+
3590
+ // Important!
3591
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
3592
+ var ReactPropTypes = {
3593
+ array: createPrimitiveTypeChecker('array'),
3594
+ bool: createPrimitiveTypeChecker('boolean'),
3595
+ func: createPrimitiveTypeChecker('function'),
3596
+ number: createPrimitiveTypeChecker('number'),
3597
+ object: createPrimitiveTypeChecker('object'),
3598
+ string: createPrimitiveTypeChecker('string'),
3599
+ symbol: createPrimitiveTypeChecker('symbol'),
3600
+
3601
+ any: createAnyTypeChecker(),
3602
+ arrayOf: createArrayOfTypeChecker,
3603
+ element: createElementTypeChecker(),
3604
+ instanceOf: createInstanceTypeChecker,
3605
+ node: createNodeChecker(),
3606
+ objectOf: createObjectOfTypeChecker,
3607
+ oneOf: createEnumTypeChecker,
3608
+ oneOfType: createUnionTypeChecker,
3609
+ shape: createShapeTypeChecker
3610
+ };
3611
+
3612
+ /**
3613
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
3614
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
3615
+ */
3616
+ /*eslint-disable no-self-compare*/
3617
+ function is(x, y) {
3618
+ // SameValue algorithm
3619
+ if (x === y) {
3620
+ // Steps 1-5, 7-10
3621
+ // Steps 6.b-6.e: +0 != -0
3622
+ return x !== 0 || 1 / x === 1 / y;
3623
+ } else {
3624
+ // Step 6.a: NaN == NaN
3625
+ return x !== x && y !== y;
3626
+ }
3627
+ }
3628
+ /*eslint-enable no-self-compare*/
3629
+
3630
+ /**
3631
+ * We use an Error-like object for backward compatibility as people may call
3632
+ * PropTypes directly and inspect their output. However, we don't use real
3633
+ * Errors anymore. We don't inspect their stack anyway, and creating them
3634
+ * is prohibitively expensive if they are created too often, such as what
3635
+ * happens in oneOfType() for any type before the one that matched.
3636
+ */
3637
+ function PropTypeError(message) {
3638
+ this.message = message;
3639
+ this.stack = '';
3640
+ }
3641
+ // Make `instanceof Error` still work for returned errors.
3642
+ PropTypeError.prototype = Error.prototype;
3643
+
3644
+ function createChainableTypeChecker(validate) {
3645
+ if ("development" !== 'production') {
3646
+ var manualPropTypeCallCache = {};
3647
+ }
3648
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
3649
+ componentName = componentName || ANONYMOUS;
3650
+ propFullName = propFullName || propName;
3651
+
3652
+ if (secret !== ReactPropTypesSecret) {
3653
+ if (throwOnDirectAccess) {
3654
+ // New behavior only for users of `prop-types` package
3655
+ invariant(
3656
+ false,
3657
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
3658
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
3659
+ 'Read more at http://fb.me/use-check-prop-types'
3660
+ );
3661
+ } else if ("development" !== 'production' && typeof console !== 'undefined') {
3662
+ // Old behavior for people using React.PropTypes
3663
+ var cacheKey = componentName + ':' + propName;
3664
+ if (!manualPropTypeCallCache[cacheKey]) {
3665
+ warning(
3666
+ false,
3667
+ 'You are manually calling a React.PropTypes validation ' +
3668
+ 'function for the `%s` prop on `%s`. This is deprecated ' +
3669
+ 'and will throw in the standalone `prop-types` package. ' +
3670
+ 'You may be seeing this warning due to a third-party PropTypes ' +
3671
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
3672
+ propFullName,
3673
+ componentName
3674
+ );
3675
+ manualPropTypeCallCache[cacheKey] = true;
3676
+ }
3677
+ }
3678
+ }
3679
+ if (props[propName] == null) {
3680
+ if (isRequired) {
3681
+ if (props[propName] === null) {
3682
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
3683
+ }
3684
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
3685
+ }
3686
+ return null;
3687
+ } else {
3688
+ return validate(props, propName, componentName, location, propFullName);
3689
+ }
3690
+ }
3691
+
3692
+ var chainedCheckType = checkType.bind(null, false);
3693
+ chainedCheckType.isRequired = checkType.bind(null, true);
3694
+
3695
+ return chainedCheckType;
3696
+ }
3697
+
3698
+ function createPrimitiveTypeChecker(expectedType) {
3699
+ function validate(props, propName, componentName, location, propFullName, secret) {
3700
+ var propValue = props[propName];
3701
+ var propType = getPropType(propValue);
3702
+ if (propType !== expectedType) {
3703
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
3704
+ // check, but we can offer a more precise error message here rather than
3705
+ // 'of type `object`'.
3706
+ var preciseType = getPreciseType(propValue);
3707
+
3708
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
3709
+ }
3710
+ return null;
3711
+ }
3712
+ return createChainableTypeChecker(validate);
3713
+ }
3714
+
3715
+ function createAnyTypeChecker() {
3716
+ return createChainableTypeChecker(emptyFunction.thatReturnsNull);
3717
+ }
3718
+
3719
+ function createArrayOfTypeChecker(typeChecker) {
3720
+ function validate(props, propName, componentName, location, propFullName) {
3721
+ if (typeof typeChecker !== 'function') {
3722
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
3723
+ }
3724
+ var propValue = props[propName];
3725
+ if (!Array.isArray(propValue)) {
3726
+ var propType = getPropType(propValue);
3727
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
3728
+ }
3729
+ for (var i = 0; i < propValue.length; i++) {
3730
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
3731
+ if (error instanceof Error) {
3732
+ return error;
3733
+ }
3734
+ }
3735
+ return null;
3736
+ }
3737
+ return createChainableTypeChecker(validate);
3738
+ }
3739
+
3740
+ function createElementTypeChecker() {
3741
+ function validate(props, propName, componentName, location, propFullName) {
3742
+ var propValue = props[propName];
3743
+ if (!isValidElement(propValue)) {
3744
+ var propType = getPropType(propValue);
3745
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
3746
+ }
3747
+ return null;
3748
+ }
3749
+ return createChainableTypeChecker(validate);
3750
+ }
3751
+
3752
+ function createInstanceTypeChecker(expectedClass) {
3753
+ function validate(props, propName, componentName, location, propFullName) {
3754
+ if (!(props[propName] instanceof expectedClass)) {
3755
+ var expectedClassName = expectedClass.name || ANONYMOUS;
3756
+ var actualClassName = getClassName(props[propName]);
3757
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
3758
+ }
3759
+ return null;
3760
+ }
3761
+ return createChainableTypeChecker(validate);
3762
+ }
3763
+
3764
+ function createEnumTypeChecker(expectedValues) {
3765
+ if (!Array.isArray(expectedValues)) {
3766
+ "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
3767
+ return emptyFunction.thatReturnsNull;
3768
+ }
3769
+
3770
+ function validate(props, propName, componentName, location, propFullName) {
3771
+ var propValue = props[propName];
3772
+ for (var i = 0; i < expectedValues.length; i++) {
3773
+ if (is(propValue, expectedValues[i])) {
3774
+ return null;
3775
+ }
3776
+ }
3777
+
3778
+ var valuesString = JSON.stringify(expectedValues);
3779
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
3780
+ }
3781
+ return createChainableTypeChecker(validate);
3782
+ }
3783
+
3784
+ function createObjectOfTypeChecker(typeChecker) {
3785
+ function validate(props, propName, componentName, location, propFullName) {
3786
+ if (typeof typeChecker !== 'function') {
3787
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
3788
+ }
3789
+ var propValue = props[propName];
3790
+ var propType = getPropType(propValue);
3791
+ if (propType !== 'object') {
3792
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
3793
+ }
3794
+ for (var key in propValue) {
3795
+ if (propValue.hasOwnProperty(key)) {
3796
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
3797
+ if (error instanceof Error) {
3798
+ return error;
3799
+ }
3800
+ }
3801
+ }
3802
+ return null;
3803
+ }
3804
+ return createChainableTypeChecker(validate);
3805
+ }
3806
+
3807
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
3808
+ if (!Array.isArray(arrayOfTypeCheckers)) {
3809
+ "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
3810
+ return emptyFunction.thatReturnsNull;
3811
+ }
3812
+
3813
+ function validate(props, propName, componentName, location, propFullName) {
3814
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
3815
+ var checker = arrayOfTypeCheckers[i];
3816
+ if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
3817
+ return null;
3818
+ }
3819
+ }
3820
+
3821
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
3822
+ }
3823
+ return createChainableTypeChecker(validate);
3824
+ }
3825
+
3826
+ function createNodeChecker() {
3827
+ function validate(props, propName, componentName, location, propFullName) {
3828
+ if (!isNode(props[propName])) {
3829
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
3830
+ }
3831
+ return null;
3832
+ }
3833
+ return createChainableTypeChecker(validate);
3834
+ }
3835
+
3836
+ function createShapeTypeChecker(shapeTypes) {
3837
+ function validate(props, propName, componentName, location, propFullName) {
3838
+ var propValue = props[propName];
3839
+ var propType = getPropType(propValue);
3840
+ if (propType !== 'object') {
3841
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
3842
+ }
3843
+ for (var key in shapeTypes) {
3844
+ var checker = shapeTypes[key];
3845
+ if (!checker) {
3846
+ continue;
3847
+ }
3848
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
3849
+ if (error) {
3850
+ return error;
3851
+ }
3852
+ }
3853
+ return null;
3854
+ }
3855
+ return createChainableTypeChecker(validate);
3856
+ }
3857
+
3858
+ function isNode(propValue) {
3859
+ switch (typeof propValue) {
3860
+ case 'number':
3861
+ case 'string':
3862
+ case 'undefined':
3863
+ return true;
3864
+ case 'boolean':
3865
+ return !propValue;
3866
+ case 'object':
3867
+ if (Array.isArray(propValue)) {
3868
+ return propValue.every(isNode);
3869
+ }
3870
+ if (propValue === null || isValidElement(propValue)) {
3871
+ return true;
3872
+ }
3873
+
3874
+ var iteratorFn = getIteratorFn(propValue);
3875
+ if (iteratorFn) {
3876
+ var iterator = iteratorFn.call(propValue);
3877
+ var step;
3878
+ if (iteratorFn !== propValue.entries) {
3879
+ while (!(step = iterator.next()).done) {
3880
+ if (!isNode(step.value)) {
3881
+ return false;
3882
+ }
3883
+ }
3884
+ } else {
3885
+ // Iterator will provide entry [k,v] tuples rather than values.
3886
+ while (!(step = iterator.next()).done) {
3887
+ var entry = step.value;
3888
+ if (entry) {
3889
+ if (!isNode(entry[1])) {
3890
+ return false;
3891
+ }
3892
+ }
3893
+ }
3894
+ }
3895
+ } else {
3896
+ return false;
3897
+ }
3898
+
3899
+ return true;
3900
+ default:
3901
+ return false;
3902
+ }
3903
+ }
3904
+
3905
+ function isSymbol(propType, propValue) {
3906
+ // Native Symbol.
3907
+ if (propType === 'symbol') {
3908
+ return true;
3909
+ }
3910
+
3911
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
3912
+ if (propValue['@@toStringTag'] === 'Symbol') {
3913
+ return true;
3914
+ }
3915
+
3916
+ // Fallback for non-spec compliant Symbols which are polyfilled.
3917
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
3918
+ return true;
3919
+ }
3920
+
3921
+ return false;
3922
+ }
3923
+
3924
+ // Equivalent of `typeof` but with special handling for array and regexp.
3925
+ function getPropType(propValue) {
3926
+ var propType = typeof propValue;
3927
+ if (Array.isArray(propValue)) {
3928
+ return 'array';
3929
+ }
3930
+ if (propValue instanceof RegExp) {
3931
+ // Old webkits (at least until Android 4.0) return 'function' rather than
3932
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
3933
+ // passes PropTypes.object.
3934
+ return 'object';
3935
+ }
3936
+ if (isSymbol(propType, propValue)) {
3937
+ return 'symbol';
3938
+ }
3939
+ return propType;
3940
+ }
3941
+
3942
+ // This handles more types than `getPropType`. Only used for error messages.
3943
+ // See `createPrimitiveTypeChecker`.
3944
+ function getPreciseType(propValue) {
3945
+ var propType = getPropType(propValue);
3946
+ if (propType === 'object') {
3947
+ if (propValue instanceof Date) {
3948
+ return 'date';
3949
+ } else if (propValue instanceof RegExp) {
3950
+ return 'regexp';
3951
+ }
3952
+ }
3953
+ return propType;
3954
+ }
3955
+
3956
+ // Returns class name of the object, if any.
3957
+ function getClassName(propValue) {
3958
+ if (!propValue.constructor || !propValue.constructor.name) {
3959
+ return ANONYMOUS;
3960
+ }
3961
+ return propValue.constructor.name;
3962
+ }
3963
+
3964
+ ReactPropTypes.checkPropTypes = checkPropTypes;
3965
+ ReactPropTypes.PropTypes = ReactPropTypes;
3966
+
3967
+ return ReactPropTypes;
3968
+ };
3969
+
3970
+ },{"27":27,"29":29,"30":30,"32":32,"35":35}],35:[function(_dereq_,module,exports){
3971
+ /**
3972
+ * Copyright 2013-present, Facebook, Inc.
3973
+ * All rights reserved.
3974
+ *
3975
+ * This source code is licensed under the BSD-style license found in the
3976
+ * LICENSE file in the root directory of this source tree. An additional grant
3977
+ * of patent rights can be found in the PATENTS file in the same directory.
3978
+ */
3979
+
3980
+ 'use strict';
3981
+
3982
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
3983
+
3984
+ module.exports = ReactPropTypesSecret;
3985
+
3986
+ },{}]},{},[18])(18)
3987
+ });