react-rails 1.6.2 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +1 -1
  4. data/lib/assets/javascripts/react_ujs.js +1 -0
  5. data/lib/assets/javascripts/react_ujs_event_setup.js +2 -0
  6. data/lib/assets/javascripts/react_ujs_mount.js +2 -7
  7. data/lib/assets/javascripts/react_ujs_pjax.js +10 -0
  8. data/lib/assets/javascripts/react_ujs_turbolinks.js +1 -1
  9. data/lib/assets/react-source/development-with-addons/react-server.js +16152 -15809
  10. data/lib/assets/react-source/development-with-addons/react.js +16039 -15899
  11. data/lib/assets/react-source/development/react-addons-create-fragment.js +749 -1064
  12. data/lib/assets/react-source/development/react-addons-css-transition-group.js +15531 -15193
  13. data/lib/assets/react-source/development/react-addons-linked-state-mixin.js +2434 -18445
  14. data/lib/assets/react-source/development/react-addons-perf.js +5551 -5461
  15. data/lib/assets/react-source/development/react-addons-pure-render-mixin.js +32 -16
  16. data/lib/assets/react-source/development/react-addons-test-utils.js +13306 -12927
  17. data/lib/assets/react-source/development/react-addons-transition-group.js +2494 -18457
  18. data/lib/assets/react-source/development/react-addons-update.js +104 -112
  19. data/lib/assets/react-source/development/react-server.js +13480 -12921
  20. data/lib/assets/react-source/development/react.js +13337 -12981
  21. data/lib/assets/react-source/production-with-addons/react-server.js +6 -6
  22. data/lib/assets/react-source/production-with-addons/react.js +6 -6
  23. data/lib/assets/react-source/production/react-addons-create-fragment.js +1 -1
  24. data/lib/assets/react-source/production/react-addons-css-transition-group.js +6 -6
  25. data/lib/assets/react-source/production/react-addons-linked-state-mixin.js +1 -19
  26. data/lib/assets/react-source/production/react-addons-perf.js +2 -2
  27. data/lib/assets/react-source/production/react-addons-pure-render-mixin.js +1 -1
  28. data/lib/assets/react-source/production/react-addons-test-utils.js +6 -6
  29. data/lib/assets/react-source/production/react-addons-transition-group.js +1 -19
  30. data/lib/assets/react-source/production/react-addons-update.js +1 -1
  31. data/lib/assets/react-source/production/react-server.js +6 -6
  32. data/lib/assets/react-source/production/react.js +6 -6
  33. data/lib/react/rails/component_mount.rb +6 -4
  34. data/lib/react/rails/version.rb +1 -1
  35. data/lib/react/server_rendering/sprockets_renderer/console_replay.js +3 -3
  36. metadata +17 -4
  37. data/lib/assets/react-source/development/react-addons-clone-with-props.js +0 -888
  38. data/lib/assets/react-source/production/react-addons-clone-with-props.js +0 -1
@@ -45,12 +45,86 @@
45
45
  /***/ function(module, exports, __webpack_require__) {
46
46
 
47
47
  window.React.addons = window.React.addons || {};
48
- window.React.addons.createFragment = __webpack_require__(13);
48
+ window.React.addons.createFragment = __webpack_require__(1);
49
49
 
50
50
 
51
51
  /***/ },
52
- /* 1 */,
53
- /* 2 */,
52
+ /* 1 */
53
+ /***/ function(module, exports, __webpack_require__) {
54
+
55
+ module.exports = __webpack_require__(2).create;
56
+
57
+ /***/ },
58
+ /* 2 */
59
+ /***/ function(module, exports, __webpack_require__) {
60
+
61
+ /* WEBPACK VAR INJECTION */(function(process) {/**
62
+ * Copyright 2015-present, Facebook, Inc.
63
+ * All rights reserved.
64
+ *
65
+ * This source code is licensed under the BSD-style license found in the
66
+ * LICENSE file in the root directory of this source tree. An additional grant
67
+ * of patent rights can be found in the PATENTS file in the same directory.
68
+ *
69
+ * @providesModule ReactFragment
70
+ */
71
+
72
+ 'use strict';
73
+
74
+ var ReactChildren = __webpack_require__(4);
75
+ var ReactElement = __webpack_require__(7);
76
+
77
+ var emptyFunction = __webpack_require__(11);
78
+ var invariant = __webpack_require__(6);
79
+ var warning = __webpack_require__(10);
80
+
81
+ /**
82
+ * We used to allow keyed objects to serve as a collection of ReactElements,
83
+ * or nested sets. This allowed us a way to explicitly key a set or fragment of
84
+ * components. This is now being replaced with an opaque data structure.
85
+ * The upgrade path is to call React.addons.createFragment({ key: value }) to
86
+ * create a keyed fragment. The resulting data structure is an array.
87
+ */
88
+
89
+ var numericPropertyRegex = /^\d+$/;
90
+
91
+ var warnedAboutNumeric = false;
92
+
93
+ var ReactFragment = {
94
+ // Wrap a keyed object in an opaque proxy that warns you if you access any
95
+ // of its properties.
96
+ create: function (object) {
97
+ if (typeof object !== 'object' || !object || Array.isArray(object)) {
98
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : void 0;
99
+ return object;
100
+ }
101
+ if (ReactElement.isValidElement(object)) {
102
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : void 0;
103
+ return object;
104
+ }
105
+
106
+ !(object.nodeType !== 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM ' + 'elements are not valid children of React components.') : invariant(false) : void 0;
107
+
108
+ var result = [];
109
+
110
+ for (var key in object) {
111
+ if (process.env.NODE_ENV !== 'production') {
112
+ if (!warnedAboutNumeric && numericPropertyRegex.test(key)) {
113
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : void 0;
114
+ warnedAboutNumeric = true;
115
+ }
116
+ }
117
+ ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument);
118
+ }
119
+
120
+ return result;
121
+ }
122
+ };
123
+
124
+ module.exports = ReactFragment;
125
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
126
+
127
+ /***/ },
54
128
  /* 3 */
55
129
  /***/ function(module, exports) {
56
130
 
@@ -151,931 +225,884 @@
151
225
  /* 4 */
152
226
  /***/ function(module, exports, __webpack_require__) {
153
227
 
154
- /* WEBPACK VAR INJECTION */(function(process) {/**
155
- * Copyright 2014-2015, Facebook, Inc.
228
+ /**
229
+ * Copyright 2013-present, Facebook, Inc.
156
230
  * All rights reserved.
157
231
  *
158
232
  * This source code is licensed under the BSD-style license found in the
159
233
  * LICENSE file in the root directory of this source tree. An additional grant
160
234
  * of patent rights can be found in the PATENTS file in the same directory.
161
235
  *
162
- * @providesModule ReactElement
236
+ * @providesModule ReactChildren
163
237
  */
164
238
 
165
239
  'use strict';
166
240
 
167
- var ReactCurrentOwner = __webpack_require__(5);
241
+ var PooledClass = __webpack_require__(5);
242
+ var ReactElement = __webpack_require__(7);
168
243
 
169
- var assign = __webpack_require__(6);
170
- var canDefineProperty = __webpack_require__(7);
244
+ var emptyFunction = __webpack_require__(11);
245
+ var traverseAllChildren = __webpack_require__(13);
171
246
 
172
- // The Symbol used to tag the ReactElement type. If there is no native Symbol
173
- // nor polyfill, then a plain number is used for performance.
174
- var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
247
+ var twoArgumentPooler = PooledClass.twoArgumentPooler;
248
+ var fourArgumentPooler = PooledClass.fourArgumentPooler;
175
249
 
176
- var RESERVED_PROPS = {
177
- key: true,
178
- ref: true,
179
- __self: true,
180
- __source: true
181
- };
250
+ var userProvidedKeyEscapeRegex = /\/+/g;
251
+ function escapeUserProvidedKey(text) {
252
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
253
+ }
182
254
 
183
255
  /**
184
- * Base constructor for all React elements. This is only used to make this
185
- * work with a dynamic instanceof check. Nothing should live on this prototype.
256
+ * PooledClass representing the bookkeeping associated with performing a child
257
+ * traversal. Allows avoiding binding callbacks.
186
258
  *
187
- * @param {*} type
188
- * @param {*} key
189
- * @param {string|object} ref
190
- * @param {*} self A *temporary* helper to detect places where `this` is
191
- * different from the `owner` when React.createElement is called, so that we
192
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
193
- * functions, and as long as `this` and owner are the same, there will be no
194
- * change in behavior.
195
- * @param {*} source An annotation object (added by a transpiler or otherwise)
196
- * indicating filename, line number, and/or other information.
197
- * @param {*} owner
198
- * @param {*} props
199
- * @internal
259
+ * @constructor ForEachBookKeeping
260
+ * @param {!function} forEachFunction Function to perform traversal with.
261
+ * @param {?*} forEachContext Context to perform context with.
200
262
  */
201
- var ReactElement = function (type, key, ref, self, source, owner, props) {
202
- var element = {
203
- // This tag allow us to uniquely identify this as a React Element
204
- $$typeof: REACT_ELEMENT_TYPE,
205
-
206
- // Built-in properties that belong on the element
207
- type: type,
208
- key: key,
209
- ref: ref,
210
- props: props,
263
+ function ForEachBookKeeping(forEachFunction, forEachContext) {
264
+ this.func = forEachFunction;
265
+ this.context = forEachContext;
266
+ this.count = 0;
267
+ }
268
+ ForEachBookKeeping.prototype.destructor = function () {
269
+ this.func = null;
270
+ this.context = null;
271
+ this.count = 0;
272
+ };
273
+ PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
211
274
 
212
- // Record the component responsible for creating this element.
213
- _owner: owner
214
- };
275
+ function forEachSingleChild(bookKeeping, child, name) {
276
+ var func = bookKeeping.func;
277
+ var context = bookKeeping.context;
215
278
 
216
- if (process.env.NODE_ENV !== 'production') {
217
- // The validation flag is currently mutative. We put it on
218
- // an external backing store so that we can freeze the whole object.
219
- // This can be replaced with a WeakMap once they are implemented in
220
- // commonly used development environments.
221
- element._store = {};
279
+ func.call(context, child, bookKeeping.count++);
280
+ }
222
281
 
223
- // To make comparing ReactElements easier for testing purposes, we make
224
- // the validation flag non-enumerable (where possible, which should
225
- // include every environment we run tests in), so the test framework
226
- // ignores it.
227
- if (canDefineProperty) {
228
- Object.defineProperty(element._store, 'validated', {
229
- configurable: false,
230
- enumerable: false,
231
- writable: true,
232
- value: false
233
- });
234
- // self and source are DEV only properties.
235
- Object.defineProperty(element, '_self', {
236
- configurable: false,
237
- enumerable: false,
238
- writable: false,
239
- value: self
240
- });
241
- // Two elements created in two different places should be considered
242
- // equal for testing purposes and therefore we hide it from enumeration.
243
- Object.defineProperty(element, '_source', {
244
- configurable: false,
245
- enumerable: false,
246
- writable: false,
247
- value: source
248
- });
249
- } else {
250
- element._store.validated = false;
251
- element._self = self;
252
- element._source = source;
253
- }
254
- Object.freeze(element.props);
255
- Object.freeze(element);
282
+ /**
283
+ * Iterates through children that are typically specified as `props.children`.
284
+ *
285
+ * The provided forEachFunc(child, index) will be called for each
286
+ * leaf child.
287
+ *
288
+ * @param {?*} children Children tree container.
289
+ * @param {function(*, int)} forEachFunc
290
+ * @param {*} forEachContext Context for forEachContext.
291
+ */
292
+ function forEachChildren(children, forEachFunc, forEachContext) {
293
+ if (children == null) {
294
+ return children;
256
295
  }
296
+ var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
297
+ traverseAllChildren(children, forEachSingleChild, traverseContext);
298
+ ForEachBookKeeping.release(traverseContext);
299
+ }
257
300
 
258
- return element;
301
+ /**
302
+ * PooledClass representing the bookkeeping associated with performing a child
303
+ * mapping. Allows avoiding binding callbacks.
304
+ *
305
+ * @constructor MapBookKeeping
306
+ * @param {!*} mapResult Object containing the ordered map of results.
307
+ * @param {!function} mapFunction Function to perform mapping with.
308
+ * @param {?*} mapContext Context to perform mapping with.
309
+ */
310
+ function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
311
+ this.result = mapResult;
312
+ this.keyPrefix = keyPrefix;
313
+ this.func = mapFunction;
314
+ this.context = mapContext;
315
+ this.count = 0;
316
+ }
317
+ MapBookKeeping.prototype.destructor = function () {
318
+ this.result = null;
319
+ this.keyPrefix = null;
320
+ this.func = null;
321
+ this.context = null;
322
+ this.count = 0;
259
323
  };
324
+ PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
260
325
 
261
- ReactElement.createElement = function (type, config, children) {
262
- var propName;
263
-
264
- // Reserved names are extracted
265
- var props = {};
326
+ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
327
+ var result = bookKeeping.result;
328
+ var keyPrefix = bookKeeping.keyPrefix;
329
+ var func = bookKeeping.func;
330
+ var context = bookKeeping.context;
266
331
 
267
- var key = null;
268
- var ref = null;
269
- var self = null;
270
- var source = null;
271
332
 
272
- if (config != null) {
273
- ref = config.ref === undefined ? null : config.ref;
274
- key = config.key === undefined ? null : '' + config.key;
275
- self = config.__self === undefined ? null : config.__self;
276
- source = config.__source === undefined ? null : config.__source;
277
- // Remaining properties are added to a new props object
278
- for (propName in config) {
279
- if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
280
- props[propName] = config[propName];
281
- }
333
+ var mappedChild = func.call(context, child, bookKeeping.count++);
334
+ if (Array.isArray(mappedChild)) {
335
+ mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
336
+ } else if (mappedChild != null) {
337
+ if (ReactElement.isValidElement(mappedChild)) {
338
+ mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
339
+ // Keep both the (mapped) and old keys if they differ, just as
340
+ // traverseAllChildren used to do for objects as children
341
+ keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
282
342
  }
343
+ result.push(mappedChild);
283
344
  }
345
+ }
284
346
 
285
- // Children can be more than one argument, and those are transferred onto
286
- // the newly allocated props object.
287
- var childrenLength = arguments.length - 2;
288
- if (childrenLength === 1) {
289
- props.children = children;
290
- } else if (childrenLength > 1) {
291
- var childArray = Array(childrenLength);
292
- for (var i = 0; i < childrenLength; i++) {
293
- childArray[i] = arguments[i + 2];
294
- }
295
- props.children = childArray;
347
+ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
348
+ var escapedPrefix = '';
349
+ if (prefix != null) {
350
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
296
351
  }
297
-
298
- // Resolve default props
299
- if (type && type.defaultProps) {
300
- var defaultProps = type.defaultProps;
301
- for (propName in defaultProps) {
302
- if (typeof props[propName] === 'undefined') {
303
- props[propName] = defaultProps[propName];
304
- }
305
- }
306
- }
307
-
308
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
309
- };
310
-
311
- ReactElement.createFactory = function (type) {
312
- var factory = ReactElement.createElement.bind(null, type);
313
- // Expose the type on the factory and the prototype so that it can be
314
- // easily accessed on elements. E.g. `<Foo />.type === Foo`.
315
- // This should not be named `constructor` since this may not be the function
316
- // that created the element, and it may not even be a constructor.
317
- // Legacy hook TODO: Warn if this is accessed
318
- factory.type = type;
319
- return factory;
320
- };
321
-
322
- ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
323
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
324
-
325
- return newElement;
326
- };
327
-
328
- ReactElement.cloneAndReplaceProps = function (oldElement, newProps) {
329
- var newElement = ReactElement(oldElement.type, oldElement.key, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, newProps);
330
-
331
- if (process.env.NODE_ENV !== 'production') {
332
- // If the key on the original is valid, then the clone is valid
333
- newElement._store.validated = oldElement._store.validated;
334
- }
335
-
336
- return newElement;
337
- };
338
-
339
- ReactElement.cloneElement = function (element, config, children) {
340
- var propName;
341
-
342
- // Original props are copied
343
- var props = assign({}, element.props);
344
-
345
- // Reserved names are extracted
346
- var key = element.key;
347
- var ref = element.ref;
348
- // Self is preserved since the owner is preserved.
349
- var self = element._self;
350
- // Source is preserved since cloneElement is unlikely to be targeted by a
351
- // transpiler, and the original source is probably a better indicator of the
352
- // true owner.
353
- var source = element._source;
354
-
355
- // Owner will be preserved, unless ref is overridden
356
- var owner = element._owner;
357
-
358
- if (config != null) {
359
- if (config.ref !== undefined) {
360
- // Silently steal the ref from the parent.
361
- ref = config.ref;
362
- owner = ReactCurrentOwner.current;
363
- }
364
- if (config.key !== undefined) {
365
- key = '' + config.key;
366
- }
367
- // Remaining properties override existing props
368
- for (propName in config) {
369
- if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
370
- props[propName] = config[propName];
371
- }
372
- }
373
- }
374
-
375
- // Children can be more than one argument, and those are transferred onto
376
- // the newly allocated props object.
377
- var childrenLength = arguments.length - 2;
378
- if (childrenLength === 1) {
379
- props.children = children;
380
- } else if (childrenLength > 1) {
381
- var childArray = Array(childrenLength);
382
- for (var i = 0; i < childrenLength; i++) {
383
- childArray[i] = arguments[i + 2];
384
- }
385
- props.children = childArray;
386
- }
387
-
388
- return ReactElement(element.type, key, ref, self, source, owner, props);
389
- };
390
-
391
- /**
392
- * @param {?object} object
393
- * @return {boolean} True if `object` is a valid component.
394
- * @final
395
- */
396
- ReactElement.isValidElement = function (object) {
397
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
398
- };
399
-
400
- module.exports = ReactElement;
401
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
402
-
403
- /***/ },
404
- /* 5 */
405
- /***/ function(module, exports) {
352
+ var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
353
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
354
+ MapBookKeeping.release(traverseContext);
355
+ }
406
356
 
407
357
  /**
408
- * Copyright 2013-2015, Facebook, Inc.
409
- * All rights reserved.
358
+ * Maps children that are typically specified as `props.children`.
410
359
  *
411
- * This source code is licensed under the BSD-style license found in the
412
- * LICENSE file in the root directory of this source tree. An additional grant
413
- * of patent rights can be found in the PATENTS file in the same directory.
360
+ * The provided mapFunction(child, key, index) will be called for each
361
+ * leaf child.
414
362
  *
415
- * @providesModule ReactCurrentOwner
363
+ * @param {?*} children Children tree container.
364
+ * @param {function(*, int)} func The map function.
365
+ * @param {*} context Context for mapFunction.
366
+ * @return {object} Object containing the ordered map of results.
416
367
  */
368
+ function mapChildren(children, func, context) {
369
+ if (children == null) {
370
+ return children;
371
+ }
372
+ var result = [];
373
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
374
+ return result;
375
+ }
417
376
 
418
- 'use strict';
377
+ function forEachSingleChildDummy(traverseContext, child, name) {
378
+ return null;
379
+ }
419
380
 
420
381
  /**
421
- * Keeps track of the current owner.
382
+ * Count the number of children that are typically specified as
383
+ * `props.children`.
422
384
  *
423
- * The current owner is the component who should own any components that are
424
- * currently being constructed.
385
+ * @param {?*} children Children tree container.
386
+ * @return {number} The number of children.
425
387
  */
426
- var ReactCurrentOwner = {
388
+ function countChildren(children, context) {
389
+ return traverseAllChildren(children, forEachSingleChildDummy, null);
390
+ }
427
391
 
428
- /**
429
- * @internal
430
- * @type {ReactComponent}
431
- */
432
- current: null
392
+ /**
393
+ * Flatten a children object (typically specified as `props.children`) and
394
+ * return an array with appropriately re-keyed children.
395
+ */
396
+ function toArray(children) {
397
+ var result = [];
398
+ mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
399
+ return result;
400
+ }
433
401
 
402
+ var ReactChildren = {
403
+ forEach: forEachChildren,
404
+ map: mapChildren,
405
+ mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
406
+ count: countChildren,
407
+ toArray: toArray
434
408
  };
435
409
 
436
- module.exports = ReactCurrentOwner;
410
+ module.exports = ReactChildren;
437
411
 
438
412
  /***/ },
439
- /* 6 */
440
- /***/ function(module, exports) {
413
+ /* 5 */
414
+ /***/ function(module, exports, __webpack_require__) {
441
415
 
442
- /**
443
- * Copyright 2014-2015, Facebook, Inc.
416
+ /* WEBPACK VAR INJECTION */(function(process) {/**
417
+ * Copyright 2013-present, Facebook, Inc.
444
418
  * All rights reserved.
445
419
  *
446
420
  * This source code is licensed under the BSD-style license found in the
447
421
  * LICENSE file in the root directory of this source tree. An additional grant
448
422
  * of patent rights can be found in the PATENTS file in the same directory.
449
423
  *
450
- * @providesModule Object.assign
424
+ * @providesModule PooledClass
451
425
  */
452
426
 
453
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign
454
-
455
427
  'use strict';
456
428
 
457
- function assign(target, sources) {
458
- if (target == null) {
459
- throw new TypeError('Object.assign target cannot be null or undefined');
460
- }
461
-
462
- var to = Object(target);
463
- var hasOwnProperty = Object.prototype.hasOwnProperty;
429
+ var invariant = __webpack_require__(6);
464
430
 
465
- for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
466
- var nextSource = arguments[nextIndex];
467
- if (nextSource == null) {
468
- continue;
469
- }
470
-
471
- var from = Object(nextSource);
472
-
473
- // We don't currently support accessors nor proxies. Therefore this
474
- // copy cannot throw. If we ever supported this then we must handle
475
- // exceptions and side-effects. We don't support symbols so they won't
476
- // be transferred.
477
-
478
- for (var key in from) {
479
- if (hasOwnProperty.call(from, key)) {
480
- to[key] = from[key];
481
- }
482
- }
431
+ /**
432
+ * Static poolers. Several custom versions for each potential number of
433
+ * arguments. A completely generic pooler is easy to implement, but would
434
+ * require accessing the `arguments` object. In each of these, `this` refers to
435
+ * the Class itself, not an instance. If any others are needed, simply add them
436
+ * here, or in their own files.
437
+ */
438
+ var oneArgumentPooler = function (copyFieldsFrom) {
439
+ var Klass = this;
440
+ if (Klass.instancePool.length) {
441
+ var instance = Klass.instancePool.pop();
442
+ Klass.call(instance, copyFieldsFrom);
443
+ return instance;
444
+ } else {
445
+ return new Klass(copyFieldsFrom);
483
446
  }
447
+ };
484
448
 
485
- return to;
486
- }
487
-
488
- module.exports = assign;
489
-
490
- /***/ },
491
- /* 7 */
492
- /***/ function(module, exports, __webpack_require__) {
449
+ var twoArgumentPooler = function (a1, a2) {
450
+ var Klass = this;
451
+ if (Klass.instancePool.length) {
452
+ var instance = Klass.instancePool.pop();
453
+ Klass.call(instance, a1, a2);
454
+ return instance;
455
+ } else {
456
+ return new Klass(a1, a2);
457
+ }
458
+ };
493
459
 
494
- /* WEBPACK VAR INJECTION */(function(process) {/**
495
- * Copyright 2013-2015, Facebook, Inc.
496
- * All rights reserved.
497
- *
498
- * This source code is licensed under the BSD-style license found in the
499
- * LICENSE file in the root directory of this source tree. An additional grant
500
- * of patent rights can be found in the PATENTS file in the same directory.
501
- *
502
- * @providesModule canDefineProperty
503
- */
460
+ var threeArgumentPooler = function (a1, a2, a3) {
461
+ var Klass = this;
462
+ if (Klass.instancePool.length) {
463
+ var instance = Klass.instancePool.pop();
464
+ Klass.call(instance, a1, a2, a3);
465
+ return instance;
466
+ } else {
467
+ return new Klass(a1, a2, a3);
468
+ }
469
+ };
504
470
 
505
- 'use strict';
471
+ var fourArgumentPooler = function (a1, a2, a3, a4) {
472
+ var Klass = this;
473
+ if (Klass.instancePool.length) {
474
+ var instance = Klass.instancePool.pop();
475
+ Klass.call(instance, a1, a2, a3, a4);
476
+ return instance;
477
+ } else {
478
+ return new Klass(a1, a2, a3, a4);
479
+ }
480
+ };
506
481
 
507
- var canDefineProperty = false;
508
- if (process.env.NODE_ENV !== 'production') {
509
- try {
510
- Object.defineProperty({}, 'x', { get: function () {} });
511
- canDefineProperty = true;
512
- } catch (x) {
513
- // IE will fail on defineProperty
482
+ var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
483
+ var Klass = this;
484
+ if (Klass.instancePool.length) {
485
+ var instance = Klass.instancePool.pop();
486
+ Klass.call(instance, a1, a2, a3, a4, a5);
487
+ return instance;
488
+ } else {
489
+ return new Klass(a1, a2, a3, a4, a5);
514
490
  }
515
- }
491
+ };
516
492
 
517
- module.exports = canDefineProperty;
518
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
493
+ var standardReleaser = function (instance) {
494
+ var Klass = this;
495
+ !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : invariant(false) : void 0;
496
+ instance.destructor();
497
+ if (Klass.instancePool.length < Klass.poolSize) {
498
+ Klass.instancePool.push(instance);
499
+ }
500
+ };
519
501
 
520
- /***/ },
521
- /* 8 */,
522
- /* 9 */
523
- /***/ function(module, exports) {
502
+ var DEFAULT_POOL_SIZE = 10;
503
+ var DEFAULT_POOLER = oneArgumentPooler;
524
504
 
525
505
  /**
526
- * Copyright 2013-2015, Facebook, Inc.
527
- * All rights reserved.
528
- *
529
- * This source code is licensed under the BSD-style license found in the
530
- * LICENSE file in the root directory of this source tree. An additional grant
531
- * of patent rights can be found in the PATENTS file in the same directory.
506
+ * Augments `CopyConstructor` to be a poolable class, augmenting only the class
507
+ * itself (statically) not adding any prototypical fields. Any CopyConstructor
508
+ * you give this may have a `poolSize` property, and will look for a
509
+ * prototypical `destructor` on instances (optional).
532
510
  *
533
- * @providesModule emptyFunction
534
- */
535
-
536
- "use strict";
537
-
538
- function makeEmptyFunction(arg) {
539
- return function () {
540
- return arg;
541
- };
542
- }
543
-
544
- /**
545
- * This function accepts and discards inputs; it has no side effects. This is
546
- * primarily useful idiomatically for overridable function endpoints which
547
- * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
511
+ * @param {Function} CopyConstructor Constructor that can be used to reset.
512
+ * @param {Function} pooler Customizable pooler.
548
513
  */
549
- function emptyFunction() {}
550
-
551
- emptyFunction.thatReturns = makeEmptyFunction;
552
- emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
553
- emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
554
- emptyFunction.thatReturnsNull = makeEmptyFunction(null);
555
- emptyFunction.thatReturnsThis = function () {
556
- return this;
514
+ var addPoolingTo = function (CopyConstructor, pooler) {
515
+ var NewKlass = CopyConstructor;
516
+ NewKlass.instancePool = [];
517
+ NewKlass.getPooled = pooler || DEFAULT_POOLER;
518
+ if (!NewKlass.poolSize) {
519
+ NewKlass.poolSize = DEFAULT_POOL_SIZE;
520
+ }
521
+ NewKlass.release = standardReleaser;
522
+ return NewKlass;
557
523
  };
558
- emptyFunction.thatReturnsArgument = function (arg) {
559
- return arg;
524
+
525
+ var PooledClass = {
526
+ addPoolingTo: addPoolingTo,
527
+ oneArgumentPooler: oneArgumentPooler,
528
+ twoArgumentPooler: twoArgumentPooler,
529
+ threeArgumentPooler: threeArgumentPooler,
530
+ fourArgumentPooler: fourArgumentPooler,
531
+ fiveArgumentPooler: fiveArgumentPooler
560
532
  };
561
533
 
562
- module.exports = emptyFunction;
534
+ module.exports = PooledClass;
535
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
563
536
 
564
537
  /***/ },
565
- /* 10 */,
566
- /* 11 */,
567
- /* 12 */
538
+ /* 6 */
568
539
  /***/ function(module, exports, __webpack_require__) {
569
540
 
570
541
  /* WEBPACK VAR INJECTION */(function(process) {/**
571
- * Copyright 2014-2015, Facebook, Inc.
542
+ * Copyright (c) 2013-present, Facebook, Inc.
572
543
  * All rights reserved.
573
544
  *
574
545
  * This source code is licensed under the BSD-style license found in the
575
546
  * LICENSE file in the root directory of this source tree. An additional grant
576
547
  * of patent rights can be found in the PATENTS file in the same directory.
577
548
  *
578
- * @providesModule warning
579
549
  */
580
550
 
581
551
  'use strict';
582
552
 
583
- var emptyFunction = __webpack_require__(9);
584
-
585
553
  /**
586
- * Similar to invariant but only logs a warning if the condition is not met.
587
- * This can be used to log issues in development environments in critical
588
- * paths. Removing the logging code for production environments will keep the
589
- * same logic and follow the same code paths.
554
+ * Use invariant() to assert state which your program assumes to be true.
555
+ *
556
+ * Provide sprintf-style format (only %s is supported) and arguments
557
+ * to provide information about what broke and what you were
558
+ * expecting.
559
+ *
560
+ * The invariant message will be stripped in production, but the invariant
561
+ * will remain to ensure logic does not differ in production.
590
562
  */
591
563
 
592
- var warning = emptyFunction;
593
-
594
- if (process.env.NODE_ENV !== 'production') {
595
- warning = function (condition, format) {
596
- for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
597
- args[_key - 2] = arguments[_key];
598
- }
599
-
564
+ function invariant(condition, format, a, b, c, d, e, f) {
565
+ if (process.env.NODE_ENV !== 'production') {
600
566
  if (format === undefined) {
601
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
602
- }
603
-
604
- if (format.indexOf('Failed Composite propType: ') === 0) {
605
- return; // Ignore CompositeComponent proptype check.
567
+ throw new Error('invariant requires an error message argument');
606
568
  }
569
+ }
607
570
 
608
- if (!condition) {
571
+ if (!condition) {
572
+ var error;
573
+ if (format === undefined) {
574
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
575
+ } else {
576
+ var args = [a, b, c, d, e, f];
609
577
  var argIndex = 0;
610
- var message = 'Warning: ' + format.replace(/%s/g, function () {
578
+ error = new Error(format.replace(/%s/g, function () {
611
579
  return args[argIndex++];
612
- });
613
- if (typeof console !== 'undefined') {
614
- console.error(message);
615
- }
616
- try {
617
- // --- Welcome to debugging React ---
618
- // This error was thrown as a convenience so that you can use this stack
619
- // to find the callsite that caused this warning to fire.
620
- throw new Error(message);
621
- } catch (x) {}
580
+ }));
581
+ error.name = 'Invariant Violation';
622
582
  }
623
- };
583
+
584
+ error.framesToPop = 1; // we don't care about invariant's own frame
585
+ throw error;
586
+ }
624
587
  }
625
588
 
626
- module.exports = warning;
589
+ module.exports = invariant;
627
590
  /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
628
591
 
629
592
  /***/ },
630
- /* 13 */
631
- /***/ function(module, exports, __webpack_require__) {
632
-
633
- module.exports = __webpack_require__(14).create;
634
-
635
- /***/ },
636
- /* 14 */
593
+ /* 7 */
637
594
  /***/ function(module, exports, __webpack_require__) {
638
595
 
639
596
  /* WEBPACK VAR INJECTION */(function(process) {/**
640
- * Copyright 2015, Facebook, Inc.
597
+ * Copyright 2014-present, Facebook, Inc.
641
598
  * All rights reserved.
642
599
  *
643
600
  * This source code is licensed under the BSD-style license found in the
644
601
  * LICENSE file in the root directory of this source tree. An additional grant
645
602
  * of patent rights can be found in the PATENTS file in the same directory.
646
603
  *
647
- * @providesModule ReactFragment
604
+ * @providesModule ReactElement
648
605
  */
649
606
 
650
607
  'use strict';
651
608
 
652
- var ReactChildren = __webpack_require__(15);
653
- var ReactElement = __webpack_require__(4);
609
+ var _assign = __webpack_require__(8);
610
+
611
+ var ReactCurrentOwner = __webpack_require__(9);
654
612
 
655
- var emptyFunction = __webpack_require__(9);
656
- var invariant = __webpack_require__(17);
657
- var warning = __webpack_require__(12);
613
+ var warning = __webpack_require__(10);
614
+ var canDefineProperty = __webpack_require__(12);
615
+
616
+ // The Symbol used to tag the ReactElement type. If there is no native Symbol
617
+ // nor polyfill, then a plain number is used for performance.
618
+ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
619
+
620
+ var RESERVED_PROPS = {
621
+ key: true,
622
+ ref: true,
623
+ __self: true,
624
+ __source: true
625
+ };
626
+
627
+ var specialPropKeyWarningShown, specialPropRefWarningShown;
658
628
 
659
629
  /**
660
- * We used to allow keyed objects to serve as a collection of ReactElements,
661
- * or nested sets. This allowed us a way to explicitly key a set a fragment of
662
- * components. This is now being replaced with an opaque data structure.
663
- * The upgrade path is to call React.addons.createFragment({ key: value }) to
664
- * create a keyed fragment. The resulting data structure is an array.
630
+ * Factory method to create a new React element. This no longer adheres to
631
+ * the class pattern, so do not use new to call it. Also, no instanceof check
632
+ * will work. Instead test $$typeof field against Symbol.for('react.element') to check
633
+ * if something is a React Element.
634
+ *
635
+ * @param {*} type
636
+ * @param {*} key
637
+ * @param {string|object} ref
638
+ * @param {*} self A *temporary* helper to detect places where `this` is
639
+ * different from the `owner` when React.createElement is called, so that we
640
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
641
+ * functions, and as long as `this` and owner are the same, there will be no
642
+ * change in behavior.
643
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
644
+ * indicating filename, line number, and/or other information.
645
+ * @param {*} owner
646
+ * @param {*} props
647
+ * @internal
665
648
  */
649
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
650
+ var element = {
651
+ // This tag allow us to uniquely identify this as a React Element
652
+ $$typeof: REACT_ELEMENT_TYPE,
666
653
 
667
- var numericPropertyRegex = /^\d+$/;
654
+ // Built-in properties that belong on the element
655
+ type: type,
656
+ key: key,
657
+ ref: ref,
658
+ props: props,
668
659
 
669
- var warnedAboutNumeric = false;
660
+ // Record the component responsible for creating this element.
661
+ _owner: owner
662
+ };
670
663
 
671
- var ReactFragment = {
672
- // Wrap a keyed object in an opaque proxy that warns you if you access any
673
- // of its properties.
674
- create: function (object) {
675
- if (typeof object !== 'object' || !object || Array.isArray(object)) {
676
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : undefined;
677
- return object;
664
+ if (process.env.NODE_ENV !== 'production') {
665
+ // The validation flag is currently mutative. We put it on
666
+ // an external backing store so that we can freeze the whole object.
667
+ // This can be replaced with a WeakMap once they are implemented in
668
+ // commonly used development environments.
669
+ element._store = {};
670
+
671
+ // To make comparing ReactElements easier for testing purposes, we make
672
+ // the validation flag non-enumerable (where possible, which should
673
+ // include every environment we run tests in), so the test framework
674
+ // ignores it.
675
+ if (canDefineProperty) {
676
+ Object.defineProperty(element._store, 'validated', {
677
+ configurable: false,
678
+ enumerable: false,
679
+ writable: true,
680
+ value: false
681
+ });
682
+ // self and source are DEV only properties.
683
+ Object.defineProperty(element, '_self', {
684
+ configurable: false,
685
+ enumerable: false,
686
+ writable: false,
687
+ value: self
688
+ });
689
+ // Two elements created in two different places should be considered
690
+ // equal for testing purposes and therefore we hide it from enumeration.
691
+ Object.defineProperty(element, '_source', {
692
+ configurable: false,
693
+ enumerable: false,
694
+ writable: false,
695
+ value: source
696
+ });
697
+ } else {
698
+ element._store.validated = false;
699
+ element._self = self;
700
+ element._source = source;
678
701
  }
679
- if (ReactElement.isValidElement(object)) {
680
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : undefined;
681
- return object;
702
+ if (Object.freeze) {
703
+ Object.freeze(element.props);
704
+ Object.freeze(element);
682
705
  }
706
+ }
683
707
 
684
- !(object.nodeType !== 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM ' + 'elements are not valid children of React components.') : invariant(false) : undefined;
708
+ return element;
709
+ };
685
710
 
686
- var result = [];
711
+ ReactElement.createElement = function (type, config, children) {
712
+ var propName;
687
713
 
688
- for (var key in object) {
689
- if (process.env.NODE_ENV !== 'production') {
690
- if (!warnedAboutNumeric && numericPropertyRegex.test(key)) {
691
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : undefined;
692
- warnedAboutNumeric = true;
693
- }
714
+ // Reserved names are extracted
715
+ var props = {};
716
+
717
+ var key = null;
718
+ var ref = null;
719
+ var self = null;
720
+ var source = null;
721
+
722
+ if (config != null) {
723
+ if (process.env.NODE_ENV !== 'production') {
724
+ ref = !config.hasOwnProperty('ref') || Object.getOwnPropertyDescriptor(config, 'ref').get ? null : config.ref;
725
+ key = !config.hasOwnProperty('key') || Object.getOwnPropertyDescriptor(config, 'key').get ? null : '' + config.key;
726
+ } else {
727
+ ref = config.ref === undefined ? null : config.ref;
728
+ key = config.key === undefined ? null : '' + config.key;
729
+ }
730
+ self = config.__self === undefined ? null : config.__self;
731
+ source = config.__source === undefined ? null : config.__source;
732
+ // Remaining properties are added to a new props object
733
+ for (propName in config) {
734
+ if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
735
+ props[propName] = config[propName];
694
736
  }
695
- ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument);
696
737
  }
738
+ }
697
739
 
698
- return result;
740
+ // Children can be more than one argument, and those are transferred onto
741
+ // the newly allocated props object.
742
+ var childrenLength = arguments.length - 2;
743
+ if (childrenLength === 1) {
744
+ props.children = children;
745
+ } else if (childrenLength > 1) {
746
+ var childArray = Array(childrenLength);
747
+ for (var i = 0; i < childrenLength; i++) {
748
+ childArray[i] = arguments[i + 2];
749
+ }
750
+ props.children = childArray;
751
+ }
752
+
753
+ // Resolve default props
754
+ if (type && type.defaultProps) {
755
+ var defaultProps = type.defaultProps;
756
+ for (propName in defaultProps) {
757
+ if (props[propName] === undefined) {
758
+ props[propName] = defaultProps[propName];
759
+ }
760
+ }
761
+ }
762
+ if (process.env.NODE_ENV !== 'production') {
763
+ // Create dummy `key` and `ref` property to `props` to warn users
764
+ // against its use
765
+ if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
766
+ if (!props.hasOwnProperty('key')) {
767
+ Object.defineProperty(props, 'key', {
768
+ get: function () {
769
+ if (!specialPropKeyWarningShown) {
770
+ specialPropKeyWarningShown = true;
771
+ process.env.NODE_ENV !== '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)', typeof type === 'function' && 'displayName' in type ? type.displayName : 'Element') : void 0;
772
+ }
773
+ return undefined;
774
+ },
775
+ configurable: true
776
+ });
777
+ }
778
+ if (!props.hasOwnProperty('ref')) {
779
+ Object.defineProperty(props, 'ref', {
780
+ get: function () {
781
+ if (!specialPropRefWarningShown) {
782
+ specialPropRefWarningShown = true;
783
+ process.env.NODE_ENV !== '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)', typeof type === 'function' && 'displayName' in type ? type.displayName : 'Element') : void 0;
784
+ }
785
+ return undefined;
786
+ },
787
+ configurable: true
788
+ });
789
+ }
790
+ }
699
791
  }
792
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
700
793
  };
701
794
 
702
- module.exports = ReactFragment;
703
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
795
+ ReactElement.createFactory = function (type) {
796
+ var factory = ReactElement.createElement.bind(null, type);
797
+ // Expose the type on the factory and the prototype so that it can be
798
+ // easily accessed on elements. E.g. `<Foo />.type === Foo`.
799
+ // This should not be named `constructor` since this may not be the function
800
+ // that created the element, and it may not even be a constructor.
801
+ // Legacy hook TODO: Warn if this is accessed
802
+ factory.type = type;
803
+ return factory;
804
+ };
704
805
 
705
- /***/ },
706
- /* 15 */
707
- /***/ function(module, exports, __webpack_require__) {
806
+ ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
807
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
708
808
 
709
- /**
710
- * Copyright 2013-2015, Facebook, Inc.
711
- * All rights reserved.
712
- *
713
- * This source code is licensed under the BSD-style license found in the
714
- * LICENSE file in the root directory of this source tree. An additional grant
715
- * of patent rights can be found in the PATENTS file in the same directory.
716
- *
717
- * @providesModule ReactChildren
718
- */
809
+ return newElement;
810
+ };
719
811
 
720
- 'use strict';
812
+ ReactElement.cloneElement = function (element, config, children) {
813
+ var propName;
721
814
 
722
- var PooledClass = __webpack_require__(16);
723
- var ReactElement = __webpack_require__(4);
815
+ // Original props are copied
816
+ var props = _assign({}, element.props);
724
817
 
725
- var emptyFunction = __webpack_require__(9);
726
- var traverseAllChildren = __webpack_require__(18);
818
+ // Reserved names are extracted
819
+ var key = element.key;
820
+ var ref = element.ref;
821
+ // Self is preserved since the owner is preserved.
822
+ var self = element._self;
823
+ // Source is preserved since cloneElement is unlikely to be targeted by a
824
+ // transpiler, and the original source is probably a better indicator of the
825
+ // true owner.
826
+ var source = element._source;
727
827
 
728
- var twoArgumentPooler = PooledClass.twoArgumentPooler;
729
- var fourArgumentPooler = PooledClass.fourArgumentPooler;
828
+ // Owner will be preserved, unless ref is overridden
829
+ var owner = element._owner;
730
830
 
731
- var userProvidedKeyEscapeRegex = /\/(?!\/)/g;
732
- function escapeUserProvidedKey(text) {
733
- return ('' + text).replace(userProvidedKeyEscapeRegex, '//');
734
- }
831
+ if (config != null) {
832
+ if (config.ref !== undefined) {
833
+ // Silently steal the ref from the parent.
834
+ ref = config.ref;
835
+ owner = ReactCurrentOwner.current;
836
+ }
837
+ if (config.key !== undefined) {
838
+ key = '' + config.key;
839
+ }
840
+ // Remaining properties override existing props
841
+ var defaultProps;
842
+ if (element.type && element.type.defaultProps) {
843
+ defaultProps = element.type.defaultProps;
844
+ }
845
+ for (propName in config) {
846
+ if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
847
+ if (config[propName] === undefined && defaultProps !== undefined) {
848
+ // Resolve default props
849
+ props[propName] = defaultProps[propName];
850
+ } else {
851
+ props[propName] = config[propName];
852
+ }
853
+ }
854
+ }
855
+ }
856
+
857
+ // Children can be more than one argument, and those are transferred onto
858
+ // the newly allocated props object.
859
+ var childrenLength = arguments.length - 2;
860
+ if (childrenLength === 1) {
861
+ props.children = children;
862
+ } else if (childrenLength > 1) {
863
+ var childArray = Array(childrenLength);
864
+ for (var i = 0; i < childrenLength; i++) {
865
+ childArray[i] = arguments[i + 2];
866
+ }
867
+ props.children = childArray;
868
+ }
869
+
870
+ return ReactElement(element.type, key, ref, self, source, owner, props);
871
+ };
735
872
 
736
873
  /**
737
- * PooledClass representing the bookkeeping associated with performing a child
738
- * traversal. Allows avoiding binding callbacks.
739
- *
740
- * @constructor ForEachBookKeeping
741
- * @param {!function} forEachFunction Function to perform traversal with.
742
- * @param {?*} forEachContext Context to perform context with.
874
+ * @param {?object} object
875
+ * @return {boolean} True if `object` is a valid component.
876
+ * @final
743
877
  */
744
- function ForEachBookKeeping(forEachFunction, forEachContext) {
745
- this.func = forEachFunction;
746
- this.context = forEachContext;
747
- this.count = 0;
748
- }
749
- ForEachBookKeeping.prototype.destructor = function () {
750
- this.func = null;
751
- this.context = null;
752
- this.count = 0;
878
+ ReactElement.isValidElement = function (object) {
879
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
753
880
  };
754
- PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
755
881
 
756
- function forEachSingleChild(bookKeeping, child, name) {
757
- var func = bookKeeping.func;
758
- var context = bookKeeping.context;
882
+ module.exports = ReactElement;
883
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
759
884
 
760
- func.call(context, child, bookKeeping.count++);
761
- }
885
+ /***/ },
886
+ /* 8 */
887
+ /***/ function(module, exports) {
762
888
 
763
- /**
764
- * Iterates through children that are typically specified as `props.children`.
765
- *
766
- * The provided forEachFunc(child, index) will be called for each
767
- * leaf child.
768
- *
769
- * @param {?*} children Children tree container.
770
- * @param {function(*, int)} forEachFunc
771
- * @param {*} forEachContext Context for forEachContext.
772
- */
773
- function forEachChildren(children, forEachFunc, forEachContext) {
774
- if (children == null) {
775
- return children;
776
- }
777
- var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
778
- traverseAllChildren(children, forEachSingleChild, traverseContext);
779
- ForEachBookKeeping.release(traverseContext);
780
- }
889
+ /* eslint-disable no-unused-vars */
890
+ 'use strict';
891
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
892
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
781
893
 
782
- /**
783
- * PooledClass representing the bookkeeping associated with performing a child
784
- * mapping. Allows avoiding binding callbacks.
785
- *
786
- * @constructor MapBookKeeping
787
- * @param {!*} mapResult Object containing the ordered map of results.
788
- * @param {!function} mapFunction Function to perform mapping with.
789
- * @param {?*} mapContext Context to perform mapping with.
790
- */
791
- function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
792
- this.result = mapResult;
793
- this.keyPrefix = keyPrefix;
794
- this.func = mapFunction;
795
- this.context = mapContext;
796
- this.count = 0;
894
+ function toObject(val) {
895
+ if (val === null || val === undefined) {
896
+ throw new TypeError('Object.assign cannot be called with null or undefined');
897
+ }
898
+
899
+ return Object(val);
797
900
  }
798
- MapBookKeeping.prototype.destructor = function () {
799
- this.result = null;
800
- this.keyPrefix = null;
801
- this.func = null;
802
- this.context = null;
803
- this.count = 0;
804
- };
805
- PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
806
901
 
807
- function mapSingleChildIntoContext(bookKeeping, child, childKey) {
808
- var result = bookKeeping.result;
809
- var keyPrefix = bookKeeping.keyPrefix;
810
- var func = bookKeeping.func;
811
- var context = bookKeeping.context;
902
+ module.exports = Object.assign || function (target, source) {
903
+ var from;
904
+ var to = toObject(target);
905
+ var symbols;
906
+
907
+ for (var s = 1; s < arguments.length; s++) {
908
+ from = Object(arguments[s]);
909
+
910
+ for (var key in from) {
911
+ if (hasOwnProperty.call(from, key)) {
912
+ to[key] = from[key];
913
+ }
914
+ }
915
+
916
+ if (Object.getOwnPropertySymbols) {
917
+ symbols = Object.getOwnPropertySymbols(from);
918
+ for (var i = 0; i < symbols.length; i++) {
919
+ if (propIsEnumerable.call(from, symbols[i])) {
920
+ to[symbols[i]] = from[symbols[i]];
921
+ }
922
+ }
923
+ }
924
+ }
925
+
926
+ return to;
927
+ };
812
928
 
813
- var mappedChild = func.call(context, child, bookKeeping.count++);
814
- if (Array.isArray(mappedChild)) {
815
- mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
816
- } else if (mappedChild != null) {
817
- if (ReactElement.isValidElement(mappedChild)) {
818
- mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
819
- // Keep both the (mapped) and old keys if they differ, just as
820
- // traverseAllChildren used to do for objects as children
821
- keyPrefix + (mappedChild !== child ? escapeUserProvidedKey(mappedChild.key || '') + '/' : '') + childKey);
822
- }
823
- result.push(mappedChild);
824
- }
825
- }
826
929
 
827
- function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
828
- var escapedPrefix = '';
829
- if (prefix != null) {
830
- escapedPrefix = escapeUserProvidedKey(prefix) + '/';
831
- }
832
- var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
833
- traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
834
- MapBookKeeping.release(traverseContext);
835
- }
930
+ /***/ },
931
+ /* 9 */
932
+ /***/ function(module, exports) {
836
933
 
837
934
  /**
838
- * Maps children that are typically specified as `props.children`.
935
+ * Copyright 2013-present, Facebook, Inc.
936
+ * All rights reserved.
839
937
  *
840
- * The provided mapFunction(child, key, index) will be called for each
841
- * leaf child.
938
+ * This source code is licensed under the BSD-style license found in the
939
+ * LICENSE file in the root directory of this source tree. An additional grant
940
+ * of patent rights can be found in the PATENTS file in the same directory.
842
941
  *
843
- * @param {?*} children Children tree container.
844
- * @param {function(*, int)} func The map function.
845
- * @param {*} context Context for mapFunction.
846
- * @return {object} Object containing the ordered map of results.
942
+ * @providesModule ReactCurrentOwner
847
943
  */
848
- function mapChildren(children, func, context) {
849
- if (children == null) {
850
- return children;
851
- }
852
- var result = [];
853
- mapIntoWithKeyPrefixInternal(children, result, null, func, context);
854
- return result;
855
- }
856
944
 
857
- function forEachSingleChildDummy(traverseContext, child, name) {
858
- return null;
859
- }
945
+ 'use strict';
860
946
 
861
947
  /**
862
- * Count the number of children that are typically specified as
863
- * `props.children`.
948
+ * Keeps track of the current owner.
864
949
  *
865
- * @param {?*} children Children tree container.
866
- * @return {number} The number of children.
950
+ * The current owner is the component who should own any components that are
951
+ * currently being constructed.
867
952
  */
868
- function countChildren(children, context) {
869
- return traverseAllChildren(children, forEachSingleChildDummy, null);
870
- }
871
953
 
872
- /**
873
- * Flatten a children object (typically specified as `props.children`) and
874
- * return an array with appropriately re-keyed children.
875
- */
876
- function toArray(children) {
877
- var result = [];
878
- mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
879
- return result;
880
- }
954
+ var ReactCurrentOwner = {
955
+
956
+ /**
957
+ * @internal
958
+ * @type {ReactComponent}
959
+ */
960
+ current: null
881
961
 
882
- var ReactChildren = {
883
- forEach: forEachChildren,
884
- map: mapChildren,
885
- mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
886
- count: countChildren,
887
- toArray: toArray
888
962
  };
889
963
 
890
- module.exports = ReactChildren;
964
+ module.exports = ReactCurrentOwner;
891
965
 
892
966
  /***/ },
893
- /* 16 */
967
+ /* 10 */
894
968
  /***/ function(module, exports, __webpack_require__) {
895
969
 
896
970
  /* WEBPACK VAR INJECTION */(function(process) {/**
897
- * Copyright 2013-2015, Facebook, Inc.
971
+ * Copyright 2014-2015, Facebook, Inc.
898
972
  * All rights reserved.
899
973
  *
900
974
  * This source code is licensed under the BSD-style license found in the
901
975
  * LICENSE file in the root directory of this source tree. An additional grant
902
976
  * of patent rights can be found in the PATENTS file in the same directory.
903
977
  *
904
- * @providesModule PooledClass
905
978
  */
906
979
 
907
980
  'use strict';
908
981
 
909
- var invariant = __webpack_require__(17);
982
+ var emptyFunction = __webpack_require__(11);
910
983
 
911
984
  /**
912
- * Static poolers. Several custom versions for each potential number of
913
- * arguments. A completely generic pooler is easy to implement, but would
914
- * require accessing the `arguments` object. In each of these, `this` refers to
915
- * the Class itself, not an instance. If any others are needed, simply add them
916
- * here, or in their own files.
985
+ * Similar to invariant but only logs a warning if the condition is not met.
986
+ * This can be used to log issues in development environments in critical
987
+ * paths. Removing the logging code for production environments will keep the
988
+ * same logic and follow the same code paths.
917
989
  */
918
- var oneArgumentPooler = function (copyFieldsFrom) {
919
- var Klass = this;
920
- if (Klass.instancePool.length) {
921
- var instance = Klass.instancePool.pop();
922
- Klass.call(instance, copyFieldsFrom);
923
- return instance;
924
- } else {
925
- return new Klass(copyFieldsFrom);
926
- }
927
- };
928
990
 
929
- var twoArgumentPooler = function (a1, a2) {
930
- var Klass = this;
931
- if (Klass.instancePool.length) {
932
- var instance = Klass.instancePool.pop();
933
- Klass.call(instance, a1, a2);
934
- return instance;
935
- } else {
936
- return new Klass(a1, a2);
937
- }
938
- };
991
+ var warning = emptyFunction;
939
992
 
940
- var threeArgumentPooler = function (a1, a2, a3) {
941
- var Klass = this;
942
- if (Klass.instancePool.length) {
943
- var instance = Klass.instancePool.pop();
944
- Klass.call(instance, a1, a2, a3);
945
- return instance;
946
- } else {
947
- return new Klass(a1, a2, a3);
948
- }
949
- };
993
+ if (process.env.NODE_ENV !== 'production') {
994
+ warning = function (condition, format) {
995
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
996
+ args[_key - 2] = arguments[_key];
997
+ }
950
998
 
951
- var fourArgumentPooler = function (a1, a2, a3, a4) {
952
- var Klass = this;
953
- if (Klass.instancePool.length) {
954
- var instance = Klass.instancePool.pop();
955
- Klass.call(instance, a1, a2, a3, a4);
956
- return instance;
957
- } else {
958
- return new Klass(a1, a2, a3, a4);
959
- }
960
- };
999
+ if (format === undefined) {
1000
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
1001
+ }
961
1002
 
962
- var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
963
- var Klass = this;
964
- if (Klass.instancePool.length) {
965
- var instance = Klass.instancePool.pop();
966
- Klass.call(instance, a1, a2, a3, a4, a5);
967
- return instance;
968
- } else {
969
- return new Klass(a1, a2, a3, a4, a5);
970
- }
971
- };
1003
+ if (format.indexOf('Failed Composite propType: ') === 0) {
1004
+ return; // Ignore CompositeComponent proptype check.
1005
+ }
1006
+
1007
+ if (!condition) {
1008
+ var argIndex = 0;
1009
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
1010
+ return args[argIndex++];
1011
+ });
1012
+ if (typeof console !== 'undefined') {
1013
+ console.error(message);
1014
+ }
1015
+ try {
1016
+ // --- Welcome to debugging React ---
1017
+ // This error was thrown as a convenience so that you can use this stack
1018
+ // to find the callsite that caused this warning to fire.
1019
+ throw new Error(message);
1020
+ } catch (x) {}
1021
+ }
1022
+ };
1023
+ }
1024
+
1025
+ module.exports = warning;
1026
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
972
1027
 
973
- var standardReleaser = function (instance) {
974
- var Klass = this;
975
- !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : invariant(false) : undefined;
976
- instance.destructor();
977
- if (Klass.instancePool.length < Klass.poolSize) {
978
- Klass.instancePool.push(instance);
979
- }
980
- };
1028
+ /***/ },
1029
+ /* 11 */
1030
+ /***/ function(module, exports) {
981
1031
 
982
- var DEFAULT_POOL_SIZE = 10;
983
- var DEFAULT_POOLER = oneArgumentPooler;
1032
+ "use strict";
984
1033
 
985
1034
  /**
986
- * Augments `CopyConstructor` to be a poolable class, augmenting only the class
987
- * itself (statically) not adding any prototypical fields. Any CopyConstructor
988
- * you give this may have a `poolSize` property, and will look for a
989
- * prototypical `destructor` on instances (optional).
1035
+ * Copyright (c) 2013-present, Facebook, Inc.
1036
+ * All rights reserved.
1037
+ *
1038
+ * This source code is licensed under the BSD-style license found in the
1039
+ * LICENSE file in the root directory of this source tree. An additional grant
1040
+ * of patent rights can be found in the PATENTS file in the same directory.
990
1041
  *
991
- * @param {Function} CopyConstructor Constructor that can be used to reset.
992
- * @param {Function} pooler Customizable pooler.
993
1042
  */
994
- var addPoolingTo = function (CopyConstructor, pooler) {
995
- var NewKlass = CopyConstructor;
996
- NewKlass.instancePool = [];
997
- NewKlass.getPooled = pooler || DEFAULT_POOLER;
998
- if (!NewKlass.poolSize) {
999
- NewKlass.poolSize = DEFAULT_POOL_SIZE;
1000
- }
1001
- NewKlass.release = standardReleaser;
1002
- return NewKlass;
1003
- };
1004
1043
 
1005
- var PooledClass = {
1006
- addPoolingTo: addPoolingTo,
1007
- oneArgumentPooler: oneArgumentPooler,
1008
- twoArgumentPooler: twoArgumentPooler,
1009
- threeArgumentPooler: threeArgumentPooler,
1010
- fourArgumentPooler: fourArgumentPooler,
1011
- fiveArgumentPooler: fiveArgumentPooler
1044
+ function makeEmptyFunction(arg) {
1045
+ return function () {
1046
+ return arg;
1047
+ };
1048
+ }
1049
+
1050
+ /**
1051
+ * This function accepts and discards inputs; it has no side effects. This is
1052
+ * primarily useful idiomatically for overridable function endpoints which
1053
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
1054
+ */
1055
+ function emptyFunction() {}
1056
+
1057
+ emptyFunction.thatReturns = makeEmptyFunction;
1058
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
1059
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
1060
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
1061
+ emptyFunction.thatReturnsThis = function () {
1062
+ return this;
1063
+ };
1064
+ emptyFunction.thatReturnsArgument = function (arg) {
1065
+ return arg;
1012
1066
  };
1013
1067
 
1014
- module.exports = PooledClass;
1015
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
1068
+ module.exports = emptyFunction;
1016
1069
 
1017
1070
  /***/ },
1018
- /* 17 */
1071
+ /* 12 */
1019
1072
  /***/ function(module, exports, __webpack_require__) {
1020
1073
 
1021
1074
  /* WEBPACK VAR INJECTION */(function(process) {/**
1022
- * Copyright 2013-2015, Facebook, Inc.
1075
+ * Copyright 2013-present, Facebook, Inc.
1023
1076
  * All rights reserved.
1024
1077
  *
1025
1078
  * This source code is licensed under the BSD-style license found in the
1026
1079
  * LICENSE file in the root directory of this source tree. An additional grant
1027
1080
  * of patent rights can be found in the PATENTS file in the same directory.
1028
1081
  *
1029
- * @providesModule invariant
1082
+ * @providesModule canDefineProperty
1030
1083
  */
1031
1084
 
1032
1085
  'use strict';
1033
1086
 
1034
- /**
1035
- * Use invariant() to assert state which your program assumes to be true.
1036
- *
1037
- * Provide sprintf-style format (only %s is supported) and arguments
1038
- * to provide information about what broke and what you were
1039
- * expecting.
1040
- *
1041
- * The invariant message will be stripped in production, but the invariant
1042
- * will remain to ensure logic does not differ in production.
1043
- */
1044
-
1045
- function invariant(condition, format, a, b, c, d, e, f) {
1046
- if (process.env.NODE_ENV !== 'production') {
1047
- if (format === undefined) {
1048
- throw new Error('invariant requires an error message argument');
1049
- }
1050
- }
1051
-
1052
- if (!condition) {
1053
- var error;
1054
- if (format === undefined) {
1055
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
1056
- } else {
1057
- var args = [a, b, c, d, e, f];
1058
- var argIndex = 0;
1059
- error = new Error(format.replace(/%s/g, function () {
1060
- return args[argIndex++];
1061
- }));
1062
- error.name = 'Invariant Violation';
1063
- }
1064
-
1065
- error.framesToPop = 1; // we don't care about invariant's own frame
1066
- throw error;
1087
+ var canDefineProperty = false;
1088
+ if (process.env.NODE_ENV !== 'production') {
1089
+ try {
1090
+ Object.defineProperty({}, 'x', { get: function () {} });
1091
+ canDefineProperty = true;
1092
+ } catch (x) {
1093
+ // IE will fail on defineProperty
1067
1094
  }
1068
1095
  }
1069
1096
 
1070
- module.exports = invariant;
1097
+ module.exports = canDefineProperty;
1071
1098
  /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
1072
1099
 
1073
1100
  /***/ },
1074
- /* 18 */
1101
+ /* 13 */
1075
1102
  /***/ function(module, exports, __webpack_require__) {
1076
1103
 
1077
1104
  /* WEBPACK VAR INJECTION */(function(process) {/**
1078
- * Copyright 2013-2015, Facebook, Inc.
1105
+ * Copyright 2013-present, Facebook, Inc.
1079
1106
  * All rights reserved.
1080
1107
  *
1081
1108
  * This source code is licensed under the BSD-style license found in the
@@ -1087,15 +1114,14 @@
1087
1114
 
1088
1115
  'use strict';
1089
1116
 
1090
- var ReactCurrentOwner = __webpack_require__(5);
1091
- var ReactElement = __webpack_require__(4);
1092
- var ReactInstanceHandles = __webpack_require__(19);
1117
+ var ReactCurrentOwner = __webpack_require__(9);
1118
+ var ReactElement = __webpack_require__(7);
1093
1119
 
1094
- var getIteratorFn = __webpack_require__(21);
1095
- var invariant = __webpack_require__(17);
1096
- var warning = __webpack_require__(12);
1120
+ var getIteratorFn = __webpack_require__(14);
1121
+ var invariant = __webpack_require__(6);
1122
+ var warning = __webpack_require__(10);
1097
1123
 
1098
- var SEPARATOR = ReactInstanceHandles.SEPARATOR;
1124
+ var SEPARATOR = '.';
1099
1125
  var SUBSEPARATOR = ':';
1100
1126
 
1101
1127
  /**
@@ -1105,11 +1131,10 @@
1105
1131
 
1106
1132
  var userProvidedKeyEscaperLookup = {
1107
1133
  '=': '=0',
1108
- '.': '=1',
1109
1134
  ':': '=2'
1110
1135
  };
1111
1136
 
1112
- var userProvidedKeyEscapeRegex = /[=.:]/g;
1137
+ var userProvidedKeyEscapeRegex = /[=:]/g;
1113
1138
 
1114
1139
  var didWarnAboutMaps = false;
1115
1140
 
@@ -1125,7 +1150,9 @@
1125
1150
  * @return {string}
1126
1151
  */
1127
1152
  function getComponentKey(component, index) {
1128
- if (component && component.key != null) {
1153
+ // Do some typechecking here since we call this blindly. We want to ensure
1154
+ // that we don't block potential future ES APIs.
1155
+ if (component && typeof component === 'object' && component.key != null) {
1129
1156
  // Explicit key
1130
1157
  return wrapUserProvidedKey(component.key);
1131
1158
  }
@@ -1203,7 +1230,7 @@
1203
1230
  }
1204
1231
  } else {
1205
1232
  if (process.env.NODE_ENV !== 'production') {
1206
- process.env.NODE_ENV !== '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.') : undefined;
1233
+ process.env.NODE_ENV !== '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.') : void 0;
1207
1234
  didWarnAboutMaps = true;
1208
1235
  }
1209
1236
  // Iterator will provide entry [k,v] tuples rather than values.
@@ -1231,7 +1258,7 @@
1231
1258
  }
1232
1259
  }
1233
1260
  var childrenString = String(children);
1234
- true ? process.env.NODE_ENV !== '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) : invariant(false) : undefined;
1261
+ true ? process.env.NODE_ENV !== '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) : invariant(false) : void 0;
1235
1262
  }
1236
1263
  }
1237
1264
 
@@ -1266,353 +1293,11 @@
1266
1293
  /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
1267
1294
 
1268
1295
  /***/ },
1269
- /* 19 */
1270
- /***/ function(module, exports, __webpack_require__) {
1271
-
1272
- /* WEBPACK VAR INJECTION */(function(process) {/**
1273
- * Copyright 2013-2015, Facebook, Inc.
1274
- * All rights reserved.
1275
- *
1276
- * This source code is licensed under the BSD-style license found in the
1277
- * LICENSE file in the root directory of this source tree. An additional grant
1278
- * of patent rights can be found in the PATENTS file in the same directory.
1279
- *
1280
- * @providesModule ReactInstanceHandles
1281
- * @typechecks static-only
1282
- */
1283
-
1284
- 'use strict';
1285
-
1286
- var ReactRootIndex = __webpack_require__(20);
1287
-
1288
- var invariant = __webpack_require__(17);
1289
-
1290
- var SEPARATOR = '.';
1291
- var SEPARATOR_LENGTH = SEPARATOR.length;
1292
-
1293
- /**
1294
- * Maximum depth of traversals before we consider the possibility of a bad ID.
1295
- */
1296
- var MAX_TREE_DEPTH = 10000;
1297
-
1298
- /**
1299
- * Creates a DOM ID prefix to use when mounting React components.
1300
- *
1301
- * @param {number} index A unique integer
1302
- * @return {string} React root ID.
1303
- * @internal
1304
- */
1305
- function getReactRootIDString(index) {
1306
- return SEPARATOR + index.toString(36);
1307
- }
1308
-
1309
- /**
1310
- * Checks if a character in the supplied ID is a separator or the end.
1311
- *
1312
- * @param {string} id A React DOM ID.
1313
- * @param {number} index Index of the character to check.
1314
- * @return {boolean} True if the character is a separator or end of the ID.
1315
- * @private
1316
- */
1317
- function isBoundary(id, index) {
1318
- return id.charAt(index) === SEPARATOR || index === id.length;
1319
- }
1320
-
1321
- /**
1322
- * Checks if the supplied string is a valid React DOM ID.
1323
- *
1324
- * @param {string} id A React DOM ID, maybe.
1325
- * @return {boolean} True if the string is a valid React DOM ID.
1326
- * @private
1327
- */
1328
- function isValidID(id) {
1329
- return id === '' || id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR;
1330
- }
1331
-
1332
- /**
1333
- * Checks if the first ID is an ancestor of or equal to the second ID.
1334
- *
1335
- * @param {string} ancestorID
1336
- * @param {string} descendantID
1337
- * @return {boolean} True if `ancestorID` is an ancestor of `descendantID`.
1338
- * @internal
1339
- */
1340
- function isAncestorIDOf(ancestorID, descendantID) {
1341
- return descendantID.indexOf(ancestorID) === 0 && isBoundary(descendantID, ancestorID.length);
1342
- }
1343
-
1344
- /**
1345
- * Gets the parent ID of the supplied React DOM ID, `id`.
1346
- *
1347
- * @param {string} id ID of a component.
1348
- * @return {string} ID of the parent, or an empty string.
1349
- * @private
1350
- */
1351
- function getParentID(id) {
1352
- return id ? id.substr(0, id.lastIndexOf(SEPARATOR)) : '';
1353
- }
1354
-
1355
- /**
1356
- * Gets the next DOM ID on the tree path from the supplied `ancestorID` to the
1357
- * supplied `destinationID`. If they are equal, the ID is returned.
1358
- *
1359
- * @param {string} ancestorID ID of an ancestor node of `destinationID`.
1360
- * @param {string} destinationID ID of the destination node.
1361
- * @return {string} Next ID on the path from `ancestorID` to `destinationID`.
1362
- * @private
1363
- */
1364
- function getNextDescendantID(ancestorID, destinationID) {
1365
- !(isValidID(ancestorID) && isValidID(destinationID)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', ancestorID, destinationID) : invariant(false) : undefined;
1366
- !isAncestorIDOf(ancestorID, destinationID) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNextDescendantID(...): React has made an invalid assumption about ' + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', ancestorID, destinationID) : invariant(false) : undefined;
1367
- if (ancestorID === destinationID) {
1368
- return ancestorID;
1369
- }
1370
- // Skip over the ancestor and the immediate separator. Traverse until we hit
1371
- // another separator or we reach the end of `destinationID`.
1372
- var start = ancestorID.length + SEPARATOR_LENGTH;
1373
- var i;
1374
- for (i = start; i < destinationID.length; i++) {
1375
- if (isBoundary(destinationID, i)) {
1376
- break;
1377
- }
1378
- }
1379
- return destinationID.substr(0, i);
1380
- }
1381
-
1382
- /**
1383
- * Gets the nearest common ancestor ID of two IDs.
1384
- *
1385
- * Using this ID scheme, the nearest common ancestor ID is the longest common
1386
- * prefix of the two IDs that immediately preceded a "marker" in both strings.
1387
- *
1388
- * @param {string} oneID
1389
- * @param {string} twoID
1390
- * @return {string} Nearest common ancestor ID, or the empty string if none.
1391
- * @private
1392
- */
1393
- function getFirstCommonAncestorID(oneID, twoID) {
1394
- var minLength = Math.min(oneID.length, twoID.length);
1395
- if (minLength === 0) {
1396
- return '';
1397
- }
1398
- var lastCommonMarkerIndex = 0;
1399
- // Use `<=` to traverse until the "EOL" of the shorter string.
1400
- for (var i = 0; i <= minLength; i++) {
1401
- if (isBoundary(oneID, i) && isBoundary(twoID, i)) {
1402
- lastCommonMarkerIndex = i;
1403
- } else if (oneID.charAt(i) !== twoID.charAt(i)) {
1404
- break;
1405
- }
1406
- }
1407
- var longestCommonID = oneID.substr(0, lastCommonMarkerIndex);
1408
- !isValidID(longestCommonID) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', oneID, twoID, longestCommonID) : invariant(false) : undefined;
1409
- return longestCommonID;
1410
- }
1411
-
1412
- /**
1413
- * Traverses the parent path between two IDs (either up or down). The IDs must
1414
- * not be the same, and there must exist a parent path between them. If the
1415
- * callback returns `false`, traversal is stopped.
1416
- *
1417
- * @param {?string} start ID at which to start traversal.
1418
- * @param {?string} stop ID at which to end traversal.
1419
- * @param {function} cb Callback to invoke each ID with.
1420
- * @param {*} arg Argument to invoke the callback with.
1421
- * @param {?boolean} skipFirst Whether or not to skip the first node.
1422
- * @param {?boolean} skipLast Whether or not to skip the last node.
1423
- * @private
1424
- */
1425
- function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
1426
- start = start || '';
1427
- stop = stop || '';
1428
- !(start !== stop) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', start) : invariant(false) : undefined;
1429
- var traverseUp = isAncestorIDOf(stop, start);
1430
- !(traverseUp || isAncestorIDOf(start, stop)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + 'not have a parent path.', start, stop) : invariant(false) : undefined;
1431
- // Traverse from `start` to `stop` one depth at a time.
1432
- var depth = 0;
1433
- var traverse = traverseUp ? getParentID : getNextDescendantID;
1434
- for (var id = start;; /* until break */id = traverse(id, stop)) {
1435
- var ret;
1436
- if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) {
1437
- ret = cb(id, traverseUp, arg);
1438
- }
1439
- if (ret === false || id === stop) {
1440
- // Only break //after// visiting `stop`.
1441
- break;
1442
- }
1443
- !(depth++ < MAX_TREE_DEPTH) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', start, stop, id) : invariant(false) : undefined;
1444
- }
1445
- }
1446
-
1447
- /**
1448
- * Manages the IDs assigned to DOM representations of React components. This
1449
- * uses a specific scheme in order to traverse the DOM efficiently (e.g. in
1450
- * order to simulate events).
1451
- *
1452
- * @internal
1453
- */
1454
- var ReactInstanceHandles = {
1455
-
1456
- /**
1457
- * Constructs a React root ID
1458
- * @return {string} A React root ID.
1459
- */
1460
- createReactRootID: function () {
1461
- return getReactRootIDString(ReactRootIndex.createReactRootIndex());
1462
- },
1463
-
1464
- /**
1465
- * Constructs a React ID by joining a root ID with a name.
1466
- *
1467
- * @param {string} rootID Root ID of a parent component.
1468
- * @param {string} name A component's name (as flattened children).
1469
- * @return {string} A React ID.
1470
- * @internal
1471
- */
1472
- createReactID: function (rootID, name) {
1473
- return rootID + name;
1474
- },
1475
-
1476
- /**
1477
- * Gets the DOM ID of the React component that is the root of the tree that
1478
- * contains the React component with the supplied DOM ID.
1479
- *
1480
- * @param {string} id DOM ID of a React component.
1481
- * @return {?string} DOM ID of the React component that is the root.
1482
- * @internal
1483
- */
1484
- getReactRootIDFromNodeID: function (id) {
1485
- if (id && id.charAt(0) === SEPARATOR && id.length > 1) {
1486
- var index = id.indexOf(SEPARATOR, 1);
1487
- return index > -1 ? id.substr(0, index) : id;
1488
- }
1489
- return null;
1490
- },
1491
-
1492
- /**
1493
- * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
1494
- * should would receive a `mouseEnter` or `mouseLeave` event.
1495
- *
1496
- * NOTE: Does not invoke the callback on the nearest common ancestor because
1497
- * nothing "entered" or "left" that element.
1498
- *
1499
- * @param {string} leaveID ID being left.
1500
- * @param {string} enterID ID being entered.
1501
- * @param {function} cb Callback to invoke on each entered/left ID.
1502
- * @param {*} upArg Argument to invoke the callback with on left IDs.
1503
- * @param {*} downArg Argument to invoke the callback with on entered IDs.
1504
- * @internal
1505
- */
1506
- traverseEnterLeave: function (leaveID, enterID, cb, upArg, downArg) {
1507
- var ancestorID = getFirstCommonAncestorID(leaveID, enterID);
1508
- if (ancestorID !== leaveID) {
1509
- traverseParentPath(leaveID, ancestorID, cb, upArg, false, true);
1510
- }
1511
- if (ancestorID !== enterID) {
1512
- traverseParentPath(ancestorID, enterID, cb, downArg, true, false);
1513
- }
1514
- },
1515
-
1516
- /**
1517
- * Simulates the traversal of a two-phase, capture/bubble event dispatch.
1518
- *
1519
- * NOTE: This traversal happens on IDs without touching the DOM.
1520
- *
1521
- * @param {string} targetID ID of the target node.
1522
- * @param {function} cb Callback to invoke.
1523
- * @param {*} arg Argument to invoke the callback with.
1524
- * @internal
1525
- */
1526
- traverseTwoPhase: function (targetID, cb, arg) {
1527
- if (targetID) {
1528
- traverseParentPath('', targetID, cb, arg, true, false);
1529
- traverseParentPath(targetID, '', cb, arg, false, true);
1530
- }
1531
- },
1532
-
1533
- /**
1534
- * Same as `traverseTwoPhase` but skips the `targetID`.
1535
- */
1536
- traverseTwoPhaseSkipTarget: function (targetID, cb, arg) {
1537
- if (targetID) {
1538
- traverseParentPath('', targetID, cb, arg, true, true);
1539
- traverseParentPath(targetID, '', cb, arg, true, true);
1540
- }
1541
- },
1542
-
1543
- /**
1544
- * Traverse a node ID, calling the supplied `cb` for each ancestor ID. For
1545
- * example, passing `.0.$row-0.1` would result in `cb` getting called
1546
- * with `.0`, `.0.$row-0`, and `.0.$row-0.1`.
1547
- *
1548
- * NOTE: This traversal happens on IDs without touching the DOM.
1549
- *
1550
- * @param {string} targetID ID of the target node.
1551
- * @param {function} cb Callback to invoke.
1552
- * @param {*} arg Argument to invoke the callback with.
1553
- * @internal
1554
- */
1555
- traverseAncestors: function (targetID, cb, arg) {
1556
- traverseParentPath('', targetID, cb, arg, true, false);
1557
- },
1558
-
1559
- getFirstCommonAncestorID: getFirstCommonAncestorID,
1560
-
1561
- /**
1562
- * Exposed for unit testing.
1563
- * @private
1564
- */
1565
- _getNextDescendantID: getNextDescendantID,
1566
-
1567
- isAncestorIDOf: isAncestorIDOf,
1568
-
1569
- SEPARATOR: SEPARATOR
1570
-
1571
- };
1572
-
1573
- module.exports = ReactInstanceHandles;
1574
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
1575
-
1576
- /***/ },
1577
- /* 20 */
1578
- /***/ function(module, exports) {
1579
-
1580
- /**
1581
- * Copyright 2013-2015, Facebook, Inc.
1582
- * All rights reserved.
1583
- *
1584
- * This source code is licensed under the BSD-style license found in the
1585
- * LICENSE file in the root directory of this source tree. An additional grant
1586
- * of patent rights can be found in the PATENTS file in the same directory.
1587
- *
1588
- * @providesModule ReactRootIndex
1589
- * @typechecks
1590
- */
1591
-
1592
- 'use strict';
1593
-
1594
- var ReactRootIndexInjection = {
1595
- /**
1596
- * @param {function} _createReactRootIndex
1597
- */
1598
- injectCreateReactRootIndex: function (_createReactRootIndex) {
1599
- ReactRootIndex.createReactRootIndex = _createReactRootIndex;
1600
- }
1601
- };
1602
-
1603
- var ReactRootIndex = {
1604
- createReactRootIndex: null,
1605
- injection: ReactRootIndexInjection
1606
- };
1607
-
1608
- module.exports = ReactRootIndex;
1609
-
1610
- /***/ },
1611
- /* 21 */
1296
+ /* 14 */
1612
1297
  /***/ function(module, exports) {
1613
1298
 
1614
1299
  /**
1615
- * Copyright 2013-2015, Facebook, Inc.
1300
+ * Copyright 2013-present, Facebook, Inc.
1616
1301
  * All rights reserved.
1617
1302
  *
1618
1303
  * This source code is licensed under the BSD-style license found in the
@@ -1620,12 +1305,12 @@
1620
1305
  * of patent rights can be found in the PATENTS file in the same directory.
1621
1306
  *
1622
1307
  * @providesModule getIteratorFn
1623
- * @typechecks static-only
1624
1308
  */
1625
1309
 
1626
1310
  'use strict';
1627
1311
 
1628
1312
  /* global Symbol */
1313
+
1629
1314
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1630
1315
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
1631
1316