[attribute-behavior] Use development builds of React and ReactDOM (#10544)
Enables warning detection. Start-up is noticeably slower, but after that the perf is about the same.
Andrew Clark committed
Aug 25, 2017 at 15:44 UTC
be9d982e8f7c56a477918f01735036a84e1c3efe
9 files changed
+24721
-224
fixtures/attribute-behavior/package.json
+1
@@ -10,6 +10,7 @@
10
"react-virtualized": "^9.9.0"
11
},
12
"scripts": {
13
+ "prestart": "cp ../../build/dist/{react,react-dom}.development.js public/",
14
"start": "react-scripts start",
15
"build": "react-scripts build",
16
"test": "react-scripts test --env=jsdom",
fixtures/attribute-behavior/public/react-dom.development.js
new
+22296
@@ -0,0 +1,22296 @@
1
+/**
2
+ * react-dom.development.js v16.0.0-beta.5
3
+ */
4
+
5
+(function(global, factory) {
6
+ typeof exports === 'object' && typeof module !== 'undefined'
7
+ ? (module.exports = factory(require('react')))
8
+ : typeof define === 'function' && define.amd
9
+ ? define(['react'], factory)
10
+ : (global.ReactDOM = factory(global.React));
11
+})(this, function(react) {
12
+ 'use strict';
13
+ /**
14
+ * Copyright (c) 2013-present, Facebook, Inc.
15
+ * All rights reserved.
16
+ *
17
+ * This source code is licensed under the BSD-style license found in the
18
+ * LICENSE file in the root directory of this source tree. An additional grant
19
+ * of patent rights can be found in the PATENTS file in the same directory.
20
+ *
21
+ * @providesModule reactProdInvariant
22
+ *
23
+ */
24
+
25
+ /**
26
+ * Copyright (c) 2013-present, Facebook, Inc.
27
+ * All rights reserved.
28
+ *
29
+ * This source code is licensed under the BSD-style license found in the
30
+ * LICENSE file in the root directory of this source tree. An additional grant
31
+ * of patent rights can be found in the PATENTS file in the same directory.
32
+ *
33
+ */
34
+
35
+ /**
36
+ * Use invariant() to assert state which your program assumes to be true.
37
+ *
38
+ * Provide sprintf-style format (only %s is supported) and arguments
39
+ * to provide information about what broke and what you were
40
+ * expecting.
41
+ *
42
+ * The invariant message will be stripped in production, but the invariant
43
+ * will remain to ensure logic does not differ in production.
44
+ */
45
+
46
+ var validateFormat = function validateFormat(format) {};
47
+
48
+ {
49
+ validateFormat = function validateFormat(format) {
50
+ if (format === undefined) {
51
+ throw new Error('invariant requires an error message argument');
52
+ }
53
+ };
54
+ }
55
+
56
+ function invariant(condition, format, a, b, c, d, e, f) {
57
+ validateFormat(format);
58
+
59
+ if (!condition) {
60
+ var error;
61
+ if (format === undefined) {
62
+ error = new Error(
63
+ 'Minified exception occurred; use the non-minified dev environment ' +
64
+ 'for the full error message and additional helpful warnings.'
65
+ );
66
+ } else {
67
+ var args = [a, b, c, d, e, f];
68
+ var argIndex = 0;
69
+ error = new Error(
70
+ format.replace(/%s/g, function() {
71
+ return args[argIndex++];
72
+ })
73
+ );
74
+ error.name = 'Invariant Violation';
75
+ }
76
+
77
+ error.framesToPop = 1; // we don't care about invariant's own frame
78
+ throw error;
79
+ }
80
+ }
81
+
82
+ var invariant_1 = invariant;
83
+
84
+ /**
85
+ * Copyright 2013-present, Facebook, Inc.
86
+ * All rights reserved.
87
+ *
88
+ * This source code is licensed under the BSD-style license found in the
89
+ * LICENSE file in the root directory of this source tree. An additional grant
90
+ * of patent rights can be found in the PATENTS file in the same directory.
91
+ *
92
+ * @providesModule checkReact
93
+ *
94
+ */
95
+
96
+ invariant_1(
97
+ react,
98
+ 'ReactDOM was loaded before React. Make sure you load ' +
99
+ 'the React package before loading ReactDOM.'
100
+ );
101
+
102
+ /**
103
+ * Copyright 2013-present, Facebook, Inc.
104
+ * All rights reserved.
105
+ *
106
+ * This source code is licensed under the BSD-style license found in the
107
+ * LICENSE file in the root directory of this source tree. An additional grant
108
+ * of patent rights can be found in the PATENTS file in the same directory.
109
+ *
110
+ * @providesModule DOMNamespaces
111
+ */
112
+
113
+ var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
114
+ var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
115
+ var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
116
+
117
+ var Namespaces = {
118
+ html: HTML_NAMESPACE,
119
+ mathml: MATH_NAMESPACE,
120
+ svg: SVG_NAMESPACE,
121
+ };
122
+
123
+ // Assumes there is no parent namespace.
124
+ function getIntrinsicNamespace(type) {
125
+ switch (type) {
126
+ case 'svg':
127
+ return SVG_NAMESPACE;
128
+ case 'math':
129
+ return MATH_NAMESPACE;
130
+ default:
131
+ return HTML_NAMESPACE;
132
+ }
133
+ }
134
+
135
+ function getChildNamespace$1(parentNamespace, type) {
136
+ if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
137
+ // No (or default) parent namespace: potential entry point.
138
+ return getIntrinsicNamespace(type);
139
+ }
140
+ if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
141
+ // We're leaving SVG.
142
+ return HTML_NAMESPACE;
143
+ }
144
+ // By default, pass namespace below.
145
+ return parentNamespace;
146
+ }
147
+
148
+ var Namespaces_1 = Namespaces;
149
+ var getIntrinsicNamespace_1 = getIntrinsicNamespace;
150
+ var getChildNamespace_1 = getChildNamespace$1;
151
+
152
+ var DOMNamespaces = {
153
+ Namespaces: Namespaces_1,
154
+ getIntrinsicNamespace: getIntrinsicNamespace_1,
155
+ getChildNamespace: getChildNamespace_1,
156
+ };
157
+
158
+ /**
159
+ * Copyright (c) 2013-present, Facebook, Inc.
160
+ * All rights reserved.
161
+ *
162
+ * This source code is licensed under the BSD-style license found in the
163
+ * LICENSE file in the root directory of this source tree. An additional grant
164
+ * of patent rights can be found in the PATENTS file in the same directory.
165
+ *
166
+ */
167
+
168
+ var canUseDOM = !!(typeof window !== 'undefined' &&
169
+ window.document &&
170
+ window.document.createElement);
171
+
172
+ /**
173
+ * Simple, lightweight module assisting with the detection and context of
174
+ * Worker. Helps avoid circular dependencies and allows code to reason about
175
+ * whether or not they are in a Worker, even if they never include the main
176
+ * `ReactWorker` dependency.
177
+ */
178
+ var ExecutionEnvironment = {
179
+ canUseDOM: canUseDOM,
180
+
181
+ canUseWorkers: typeof Worker !== 'undefined',
182
+
183
+ canUseEventListeners: canUseDOM &&
184
+ !!(window.addEventListener || window.attachEvent),
185
+
186
+ canUseViewport: canUseDOM && !!window.screen,
187
+
188
+ isInWorker: !canUseDOM, // For now, this is true - might change in the future.
189
+ };
190
+
191
+ var ExecutionEnvironment_1 = ExecutionEnvironment;
192
+
193
+ /*
194
+object-assign
195
+(c) Sindre Sorhus
196
+@license MIT
197
+*/
198
+
199
+ /* eslint-disable no-unused-vars */
200
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
201
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
202
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
203
+
204
+ function toObject(val) {
205
+ if (val === null || val === undefined) {
206
+ throw new TypeError(
207
+ 'Object.assign cannot be called with null or undefined'
208
+ );
209
+ }
210
+
211
+ return Object(val);
212
+ }
213
+
214
+ function shouldUseNative() {
215
+ try {
216
+ if (!Object.assign) {
217
+ return false;
218
+ }
219
+
220
+ // Detect buggy property enumeration order in older V8 versions.
221
+
222
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
223
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
224
+ test1[5] = 'de';
225
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
226
+ return false;
227
+ }
228
+
229
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
230
+ var test2 = {};
231
+ for (var i = 0; i < 10; i++) {
232
+ test2['_' + String.fromCharCode(i)] = i;
233
+ }
234
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
235
+ return test2[n];
236
+ });
237
+ if (order2.join('') !== '0123456789') {
238
+ return false;
239
+ }
240
+
241
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
242
+ var test3 = {};
243
+ 'abcdefghijklmnopqrst'.split('').forEach(function(letter) {
244
+ test3[letter] = letter;
245
+ });
246
+ if (
247
+ Object.keys(Object.assign({}, test3)).join('') !==
248
+ 'abcdefghijklmnopqrst'
249
+ ) {
250
+ return false;
251
+ }
252
+
253
+ return true;
254
+ } catch (err) {
255
+ // We don't expect any of the above to throw, but better to be safe.
256
+ return false;
257
+ }
258
+ }
259
+
260
+ var index = shouldUseNative()
261
+ ? Object.assign
262
+ : function(target, source) {
263
+ var from;
264
+ var to = toObject(target);
265
+ var symbols;
266
+
267
+ for (var s = 1; s < arguments.length; s++) {
268
+ from = Object(arguments[s]);
269
+
270
+ for (var key in from) {
271
+ if (hasOwnProperty.call(from, key)) {
272
+ to[key] = from[key];
273
+ }
274
+ }
275
+
276
+ if (getOwnPropertySymbols) {
277
+ symbols = getOwnPropertySymbols(from);
278
+ for (var i = 0; i < symbols.length; i++) {
279
+ if (propIsEnumerable.call(from, symbols[i])) {
280
+ to[symbols[i]] = from[symbols[i]];
281
+ }
282
+ }
283
+ }
284
+ }
285
+
286
+ return to;
287
+ };
288
+
289
+ /**
290
+ * Injectable ordering of event plugins.
291
+ */
292
+ var eventPluginOrder = null;
293
+
294
+ /**
295
+ * Injectable mapping from names to event plugin modules.
296
+ */
297
+ var namesToPlugins = {};
298
+
299
+ /**
300
+ * Recomputes the plugin list using the injected plugins and plugin ordering.
301
+ *
302
+ * @private
303
+ */
304
+ function recomputePluginOrdering() {
305
+ if (!eventPluginOrder) {
306
+ // Wait until an `eventPluginOrder` is injected.
307
+ return;
308
+ }
309
+ for (var pluginName in namesToPlugins) {
310
+ var pluginModule = namesToPlugins[pluginName];
311
+ var pluginIndex = eventPluginOrder.indexOf(pluginName);
312
+ !(pluginIndex > -1)
313
+ ? invariant_1(
314
+ false,
315
+ 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',
316
+ pluginName
317
+ )
318
+ : void 0;
319
+ if (EventPluginRegistry.plugins[pluginIndex]) {
320
+ continue;
321
+ }
322
+ !pluginModule.extractEvents
323
+ ? invariant_1(
324
+ false,
325
+ 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',
326
+ pluginName
327
+ )
328
+ : void 0;
329
+ EventPluginRegistry.plugins[pluginIndex] = pluginModule;
330
+ var publishedEvents = pluginModule.eventTypes;
331
+ for (var eventName in publishedEvents) {
332
+ !publishEventForPlugin(
333
+ publishedEvents[eventName],
334
+ pluginModule,
335
+ eventName
336
+ )
337
+ ? invariant_1(
338
+ false,
339
+ 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',
340
+ eventName,
341
+ pluginName
342
+ )
343
+ : void 0;
344
+ }
345
+ }
346
+ }
347
+
348
+ /**
349
+ * Publishes an event so that it can be dispatched by the supplied plugin.
350
+ *
351
+ * @param {object} dispatchConfig Dispatch configuration for the event.
352
+ * @param {object} PluginModule Plugin publishing the event.
353
+ * @return {boolean} True if the event was successfully published.
354
+ * @private
355
+ */
356
+ function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
357
+ !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName)
358
+ ? invariant_1(
359
+ false,
360
+ 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.',
361
+ eventName
362
+ )
363
+ : void 0;
364
+ EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
365
+
366
+ var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
367
+ if (phasedRegistrationNames) {
368
+ for (var phaseName in phasedRegistrationNames) {
369
+ if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
370
+ var phasedRegistrationName = phasedRegistrationNames[phaseName];
371
+ publishRegistrationName(
372
+ phasedRegistrationName,
373
+ pluginModule,
374
+ eventName
375
+ );
376
+ }
377
+ }
378
+ return true;
379
+ } else if (dispatchConfig.registrationName) {
380
+ publishRegistrationName(
381
+ dispatchConfig.registrationName,
382
+ pluginModule,
383
+ eventName
384
+ );
385
+ return true;
386
+ }
387
+ return false;
388
+ }
389
+
390
+ /**
391
+ * Publishes a registration name that is used to identify dispatched events.
392
+ *
393
+ * @param {string} registrationName Registration name to add.
394
+ * @param {object} PluginModule Plugin publishing the event.
395
+ * @private
396
+ */
397
+ function publishRegistrationName(registrationName, pluginModule, eventName) {
398
+ !!EventPluginRegistry.registrationNameModules[registrationName]
399
+ ? invariant_1(
400
+ false,
401
+ 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.',
402
+ registrationName
403
+ )
404
+ : void 0;
405
+ EventPluginRegistry.registrationNameModules[
406
+ registrationName
407
+ ] = pluginModule;
408
+ EventPluginRegistry.registrationNameDependencies[registrationName] =
409
+ pluginModule.eventTypes[eventName].dependencies;
410
+
411
+ {
412
+ var lowerCasedName = registrationName.toLowerCase();
413
+ EventPluginRegistry.possibleRegistrationNames[
414
+ lowerCasedName
415
+ ] = registrationName;
416
+
417
+ if (registrationName === 'onDoubleClick') {
418
+ EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
419
+ }
420
+ }
421
+ }
422
+
423
+ /**
424
+ * Registers plugins so that they can extract and dispatch events.
425
+ *
426
+ * @see {EventPluginHub}
427
+ */
428
+ var EventPluginRegistry = {
429
+ /**
430
+ * Ordered list of injected plugins.
431
+ */
432
+ plugins: [],
433
+
434
+ /**
435
+ * Mapping from event name to dispatch config
436
+ */
437
+ eventNameDispatchConfigs: {},
438
+
439
+ /**
440
+ * Mapping from registration name to plugin module
441
+ */
442
+ registrationNameModules: {},
443
+
444
+ /**
445
+ * Mapping from registration name to event name
446
+ */
447
+ registrationNameDependencies: {},
448
+
449
+ /**
450
+ * Mapping from lowercase registration names to the properly cased version,
451
+ * used to warn in the case of missing event handlers. Available
452
+ * only in true.
453
+ * @type {Object}
454
+ */
455
+ possibleRegistrationNames: {},
456
+ // Trust the developer to only use possibleRegistrationNames in true
457
+
458
+ /**
459
+ * Injects an ordering of plugins (by plugin name). This allows the ordering
460
+ * to be decoupled from injection of the actual plugins so that ordering is
461
+ * always deterministic regardless of packaging, on-the-fly injection, etc.
462
+ *
463
+ * @param {array} InjectedEventPluginOrder
464
+ * @internal
465
+ * @see {EventPluginHub.injection.injectEventPluginOrder}
466
+ */
467
+ injectEventPluginOrder: function(injectedEventPluginOrder) {
468
+ !!eventPluginOrder
469
+ ? invariant_1(
470
+ false,
471
+ 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.'
472
+ )
473
+ : void 0;
474
+ // Clone the ordering so it cannot be dynamically mutated.
475
+ eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
476
+ recomputePluginOrdering();
477
+ },
478
+
479
+ /**
480
+ * Injects plugins to be used by `EventPluginHub`. The plugin names must be
481
+ * in the ordering injected by `injectEventPluginOrder`.
482
+ *
483
+ * Plugins can be injected as part of page initialization or on-the-fly.
484
+ *
485
+ * @param {object} injectedNamesToPlugins Map from names to plugin modules.
486
+ * @internal
487
+ * @see {EventPluginHub.injection.injectEventPluginsByName}
488
+ */
489
+ injectEventPluginsByName: function(injectedNamesToPlugins) {
490
+ var isOrderingDirty = false;
491
+ for (var pluginName in injectedNamesToPlugins) {
492
+ if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
493
+ continue;
494
+ }
495
+ var pluginModule = injectedNamesToPlugins[pluginName];
496
+ if (
497
+ !namesToPlugins.hasOwnProperty(pluginName) ||
498
+ namesToPlugins[pluginName] !== pluginModule
499
+ ) {
500
+ !!namesToPlugins[pluginName]
501
+ ? invariant_1(
502
+ false,
503
+ 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.',
504
+ pluginName
505
+ )
506
+ : void 0;
507
+ namesToPlugins[pluginName] = pluginModule;
508
+ isOrderingDirty = true;
509
+ }
510
+ }
511
+ if (isOrderingDirty) {
512
+ recomputePluginOrdering();
513
+ }
514
+ },
515
+ };
516
+
517
+ var EventPluginRegistry_1 = EventPluginRegistry;
518
+
519
+ /**
520
+ * Copyright (c) 2013-present, Facebook, Inc.
521
+ * All rights reserved.
522
+ *
523
+ * This source code is licensed under the BSD-style license found in the
524
+ * LICENSE file in the root directory of this source tree. An additional grant
525
+ * of patent rights can be found in the PATENTS file in the same directory.
526
+ *
527
+ *
528
+ */
529
+
530
+ function makeEmptyFunction(arg) {
531
+ return function() {
532
+ return arg;
533
+ };
534
+ }
535
+
536
+ /**
537
+ * This function accepts and discards inputs; it has no side effects. This is
538
+ * primarily useful idiomatically for overridable function endpoints which
539
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
540
+ */
541
+ var emptyFunction = function emptyFunction() {};
542
+
543
+ emptyFunction.thatReturns = makeEmptyFunction;
544
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
545
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
546
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
547
+ emptyFunction.thatReturnsThis = function() {
548
+ return this;
549
+ };
550
+ emptyFunction.thatReturnsArgument = function(arg) {
551
+ return arg;
552
+ };
553
+
554
+ var emptyFunction_1 = emptyFunction;
555
+
556
+ /**
557
+ * Copyright (c) 2013-present, Facebook, Inc.
558
+ *
559
+ * Licensed under the Apache License, Version 2.0 (the "License");
560
+ * you may not use this file except in compliance with the License.
561
+ * You may obtain a copy of the License at
562
+ *
563
+ * http://www.apache.org/licenses/LICENSE-2.0
564
+ *
565
+ * Unless required by applicable law or agreed to in writing, software
566
+ * distributed under the License is distributed on an "AS IS" BASIS,
567
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
568
+ * See the License for the specific language governing permissions and
569
+ * limitations under the License.
570
+ *
571
+ * @typechecks
572
+ */
573
+
574
+ /**
575
+ * Upstream version of event listener. Does not take into account specific
576
+ * nature of platform.
577
+ */
578
+ var EventListener = {
579
+ /**
580
+ * Listen to DOM events during the bubble phase.
581
+ *
582
+ * @param {DOMEventTarget} target DOM element to register listener on.
583
+ * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
584
+ * @param {function} callback Callback function.
585
+ * @return {object} Object with a `remove` method.
586
+ */
587
+ listen: function listen(target, eventType, callback) {
588
+ if (target.addEventListener) {
589
+ target.addEventListener(eventType, callback, false);
590
+ return {
591
+ remove: function remove() {
592
+ target.removeEventListener(eventType, callback, false);
593
+ },
594
+ };
595
+ } else if (target.attachEvent) {
596
+ target.attachEvent('on' + eventType, callback);
597
+ return {
598
+ remove: function remove() {
599
+ target.detachEvent('on' + eventType, callback);
600
+ },
601
+ };
602
+ }
603
+ },
604
+
605
+ /**
606
+ * Listen to DOM events during the capture phase.
607
+ *
608
+ * @param {DOMEventTarget} target DOM element to register listener on.
609
+ * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
610
+ * @param {function} callback Callback function.
611
+ * @return {object} Object with a `remove` method.
612
+ */
613
+ capture: function capture(target, eventType, callback) {
614
+ if (target.addEventListener) {
615
+ target.addEventListener(eventType, callback, true);
616
+ return {
617
+ remove: function remove() {
618
+ target.removeEventListener(eventType, callback, true);
619
+ },
620
+ };
621
+ } else {
622
+ {
623
+ console.error(
624
+ 'Attempted to listen to events during the capture phase on a ' +
625
+ 'browser that does not support the capture phase. Your application ' +
626
+ 'will not receive some events.'
627
+ );
628
+ }
629
+ return {
630
+ remove: emptyFunction_1,
631
+ };
632
+ }
633
+ },
634
+
635
+ registerDefault: function registerDefault() {},
636
+ };
637
+
638
+ var EventListener_1 = EventListener;
639
+
640
+ // These attributes should be all lowercase to allow for
641
+ // case insensitive checks
642
+ var RESERVED_PROPS = {
643
+ children: true,
644
+ dangerouslysetinnerhtml: true,
645
+ autofocus: true,
646
+ defaultvalue: true,
647
+ defaultchecked: true,
648
+ innerhtml: true,
649
+ suppresscontenteditablewarning: true,
650
+ onfocusin: true,
651
+ onfocusout: true,
652
+ style: true,
653
+ };
654
+
655
+ function checkMask(value, bitmask) {
656
+ return (value & bitmask) === bitmask;
657
+ }
658
+
659
+ var DOMPropertyInjection = {
660
+ /**
661
+ * Mapping from normalized, camelcased property names to a configuration that
662
+ * specifies how the associated DOM property should be accessed or rendered.
663
+ */
664
+ MUST_USE_PROPERTY: 0x1,
665
+ HAS_BOOLEAN_VALUE: 0x4,
666
+ HAS_NUMERIC_VALUE: 0x8,
667
+ HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
668
+ HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
669
+
670
+ /**
671
+ * Inject some specialized knowledge about the DOM. This takes a config object
672
+ * with the following properties:
673
+ *
674
+ * Properties: object mapping DOM property name to one of the
675
+ * DOMPropertyInjection constants or null. If your attribute isn't in here,
676
+ * it won't get written to the DOM.
677
+ *
678
+ * DOMAttributeNames: object mapping React attribute name to the DOM
679
+ * attribute name. Attribute names not specified use the **lowercase**
680
+ * normalized name.
681
+ *
682
+ * DOMAttributeNamespaces: object mapping React attribute name to the DOM
683
+ * attribute namespace URL. (Attribute names not specified use no namespace.)
684
+ *
685
+ * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
686
+ * Property names not specified use the normalized name.
687
+ *
688
+ * DOMMutationMethods: Properties that require special mutation methods. If
689
+ * `value` is undefined, the mutation method should unset the property.
690
+ *
691
+ * @param {object} domPropertyConfig the config as described above.
692
+ */
693
+ injectDOMPropertyConfig: function(domPropertyConfig) {
694
+ var Injection = DOMPropertyInjection;
695
+ var Properties = domPropertyConfig.Properties || {};
696
+ var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {
697
+ };
698
+ var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
699
+ var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
700
+
701
+ for (var propName in Properties) {
702
+ !!DOMProperty.properties.hasOwnProperty(propName)
703
+ ? invariant_1(
704
+ false,
705
+ "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.",
706
+ propName
707
+ )
708
+ : void 0;
709
+
710
+ var lowerCased = propName.toLowerCase();
711
+ var propConfig = Properties[propName];
712
+
713
+ var propertyInfo = {
714
+ attributeName: lowerCased,
715
+ attributeNamespace: null,
716
+ propertyName: propName,
717
+ mutationMethod: null,
718
+
719
+ mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
720
+ hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
721
+ hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
722
+ hasPositiveNumericValue: checkMask(
723
+ propConfig,
724
+ Injection.HAS_POSITIVE_NUMERIC_VALUE
725
+ ),
726
+ hasOverloadedBooleanValue: checkMask(
727
+ propConfig,
728
+ Injection.HAS_OVERLOADED_BOOLEAN_VALUE
729
+ ),
730
+ };
731
+ !(propertyInfo.hasBooleanValue +
732
+ propertyInfo.hasNumericValue +
733
+ propertyInfo.hasOverloadedBooleanValue <=
734
+ 1)
735
+ ? invariant_1(
736
+ false,
737
+ 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s',
738
+ propName
739
+ )
740
+ : void 0;
741
+
742
+ if (DOMAttributeNames.hasOwnProperty(propName)) {
743
+ var attributeName = DOMAttributeNames[propName];
744
+
745
+ propertyInfo.attributeName = attributeName;
746
+ }
747
+
748
+ if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
749
+ propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
750
+ }
751
+
752
+ if (DOMMutationMethods.hasOwnProperty(propName)) {
753
+ propertyInfo.mutationMethod = DOMMutationMethods[propName];
754
+ }
755
+
756
+ // Downcase references to whitelist properties to check for membership
757
+ // without case-sensitivity. This allows the whitelist to pick up
758
+ // `allowfullscreen`, which should be written using the property configuration
759
+ // for `allowFullscreen`
760
+ DOMProperty.properties[propName] = propertyInfo;
761
+ }
762
+ },
763
+ };
764
+
765
+ /* eslint-disable max-len */
766
+ var ATTRIBUTE_NAME_START_CHAR =
767
+ ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
768
+ /* eslint-enable max-len */
769
+
770
+ /**
771
+ * DOMProperty exports lookup objects that can be used like functions:
772
+ *
773
+ * > DOMProperty.isValid['id']
774
+ * true
775
+ * > DOMProperty.isValid['foobar']
776
+ * undefined
777
+ *
778
+ * Although this may be confusing, it performs better in general.
779
+ *
780
+ * @see http://jsperf.com/key-exists
781
+ * @see http://jsperf.com/key-missing
782
+ */
783
+ var DOMProperty = {
784
+ ID_ATTRIBUTE_NAME: 'data-reactid',
785
+ ROOT_ATTRIBUTE_NAME: 'data-reactroot',
786
+
787
+ ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
788
+ ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR +
789
+ '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
790
+
791
+ /**
792
+ * Map from property "standard name" to an object with info about how to set
793
+ * the property in the DOM. Each object contains:
794
+ *
795
+ * attributeName:
796
+ * Used when rendering markup or with `*Attribute()`.
797
+ * attributeNamespace
798
+ * propertyName:
799
+ * Used on DOM node instances. (This includes properties that mutate due to
800
+ * external factors.)
801
+ * mutationMethod:
802
+ * If non-null, used instead of the property or `setAttribute()` after
803
+ * initial render.
804
+ * mustUseProperty:
805
+ * Whether the property must be accessed and mutated as an object property.
806
+ * hasBooleanValue:
807
+ * Whether the property should be removed when set to a falsey value.
808
+ * hasNumericValue:
809
+ * Whether the property must be numeric or parse as a numeric and should be
810
+ * removed when set to a falsey value.
811
+ * hasPositiveNumericValue:
812
+ * Whether the property must be positive numeric or parse as a positive
813
+ * numeric and should be removed when set to a falsey value.
814
+ * hasOverloadedBooleanValue:
815
+ * Whether the property can be used as a flag as well as with a value.
816
+ * Removed when strictly equal to false; present without a value when
817
+ * strictly equal to true; present with a value otherwise.
818
+ */
819
+ properties: {},
820
+
821
+ /**
822
+ * Checks whether a property name is a writeable attribute.
823
+ * @method
824
+ */
825
+ shouldSetAttribute: function(name, value) {
826
+ if (DOMProperty.isReservedProp(name)) {
827
+ return false;
828
+ }
829
+
830
+ if (value === null) {
831
+ return true;
832
+ }
833
+
834
+ var lowerCased = name.toLowerCase();
835
+
836
+ var propertyInfo = DOMProperty.properties[name];
837
+
838
+ switch (typeof value) {
839
+ case 'boolean':
840
+ if (propertyInfo) {
841
+ return true;
842
+ }
843
+ var prefix = lowerCased.slice(0, 5);
844
+ return prefix === 'data-' || prefix === 'aria-';
845
+ case 'undefined':
846
+ case 'number':
847
+ case 'string':
848
+ return true;
849
+ case 'object':
850
+ return true;
851
+ default:
852
+ // function, symbol
853
+ return false;
854
+ }
855
+ },
856
+
857
+ getPropertyInfo: function(name) {
858
+ return DOMProperty.properties.hasOwnProperty(name)
859
+ ? DOMProperty.properties[name]
860
+ : null;
861
+ },
862
+
863
+ /**
864
+ * Checks to see if a property name is within the list of properties
865
+ * reserved for internal React operations. These properties should
866
+ * not be set on an HTML element.
867
+ *
868
+ * @private
869
+ * @param {string} name
870
+ * @return {boolean} If the name is within reserved props
871
+ */
872
+ isReservedProp: function(name) {
873
+ return RESERVED_PROPS.hasOwnProperty(name.toLowerCase());
874
+ },
875
+
876
+ injection: DOMPropertyInjection,
877
+ };
878
+
879
+ var DOMProperty_1 = DOMProperty;
880
+
881
+ /**
882
+ * Copyright 2015-present, Facebook, Inc.
883
+ * All rights reserved.
884
+ *
885
+ * This source code is licensed under the BSD-style license found in the
886
+ * LICENSE file in the root directory of this source tree. An additional grant
887
+ * of patent rights can be found in the PATENTS file in the same directory.
888
+ *
889
+ * @providesModule ReactDOMComponentFlags
890
+ */
891
+
892
+ var ReactDOMComponentFlags = {
893
+ hasCachedChildNodes: 1 << 0,
894
+ };
895
+
896
+ var ReactDOMComponentFlags_1 = ReactDOMComponentFlags;
897
+
898
+ /**
899
+ * Copyright 2013-present, Facebook, Inc.
900
+ * All rights reserved.
901
+ *
902
+ * This source code is licensed under the BSD-style license found in the
903
+ * LICENSE file in the root directory of this source tree. An additional grant
904
+ * of patent rights can be found in the PATENTS file in the same directory.
905
+ *
906
+ * @providesModule ReactTypeOfWork
907
+ *
908
+ */
909
+
910
+ var ReactTypeOfWork = {
911
+ IndeterminateComponent: 0, // Before we know whether it is functional or class
912
+ FunctionalComponent: 1,
913
+ ClassComponent: 2,
914
+ HostRoot: 3, // Root of a host tree. Could be nested inside another node.
915
+ HostPortal: 4, // A subtree. Could be an entry point to a different renderer.
916
+ HostComponent: 5,
917
+ HostText: 6,
918
+ CoroutineComponent: 7,
919
+ CoroutineHandlerPhase: 8,
920
+ YieldComponent: 9,
921
+ Fragment: 10,
922
+ };
923
+
924
+ /**
925
+ * Copyright 2013-present, Facebook, Inc.
926
+ * All rights reserved.
927
+ *
928
+ * This source code is licensed under the BSD-style license found in the
929
+ * LICENSE file in the root directory of this source tree. An additional grant
930
+ * of patent rights can be found in the PATENTS file in the same directory.
931
+ *
932
+ * @providesModule HTMLNodeType
933
+ */
934
+
935
+ /**
936
+ * HTML nodeType values that represent the type of the node
937
+ */
938
+
939
+ var HTMLNodeType = {
940
+ ELEMENT_NODE: 1,
941
+ TEXT_NODE: 3,
942
+ COMMENT_NODE: 8,
943
+ DOCUMENT_NODE: 9,
944
+ DOCUMENT_FRAGMENT_NODE: 11,
945
+ };
946
+
947
+ var HTMLNodeType_1 = HTMLNodeType;
948
+
949
+ var HostComponent = ReactTypeOfWork.HostComponent;
950
+ var HostText = ReactTypeOfWork.HostText;
951
+
952
+ var ELEMENT_NODE$1 = HTMLNodeType_1.ELEMENT_NODE;
953
+ var COMMENT_NODE$1 = HTMLNodeType_1.COMMENT_NODE;
954
+
955
+ var ATTR_NAME = DOMProperty_1.ID_ATTRIBUTE_NAME;
956
+ var Flags = ReactDOMComponentFlags_1;
957
+
958
+ var randomKey = Math.random().toString(36).slice(2);
959
+
960
+ var internalInstanceKey = '__reactInternalInstance$' + randomKey;
961
+
962
+ var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
963
+
964
+ /**
965
+ * Check if a given node should be cached.
966
+ */
967
+ function shouldPrecacheNode(node, nodeID) {
968
+ return (
969
+ (node.nodeType === ELEMENT_NODE$1 &&
970
+ node.getAttribute(ATTR_NAME) === '' + nodeID) ||
971
+ (node.nodeType === COMMENT_NODE$1 &&
972
+ node.nodeValue === ' react-text: ' + nodeID + ' ') ||
973
+ (node.nodeType === COMMENT_NODE$1 &&
974
+ node.nodeValue === ' react-empty: ' + nodeID + ' ')
975
+ );
976
+ }
977
+
978
+ /**
979
+ * Drill down (through composites and empty components) until we get a host or
980
+ * host text component.
981
+ *
982
+ * This is pretty polymorphic but unavoidable with the current structure we have
983
+ * for `_renderedChildren`.
984
+ */
985
+ function getRenderedHostOrTextFromComponent(component) {
986
+ var rendered;
987
+ while ((rendered = component._renderedComponent)) {
988
+ component = rendered;
989
+ }
990
+ return component;
991
+ }
992
+
993
+ /**
994
+ * Populate `_hostNode` on the rendered host/text component with the given
995
+ * DOM node. The passed `inst` can be a composite.
996
+ */
997
+ function precacheNode(inst, node) {
998
+ var hostInst = getRenderedHostOrTextFromComponent(inst);
999
+ hostInst._hostNode = node;
1000
+ node[internalInstanceKey] = hostInst;
1001
+ }
1002
+
1003
+ function precacheFiberNode$1(hostInst, node) {
1004
+ node[internalInstanceKey] = hostInst;
1005
+ }
1006
+
1007
+ function uncacheNode(inst) {
1008
+ var node = inst._hostNode;
1009
+ if (node) {
1010
+ delete node[internalInstanceKey];
1011
+ inst._hostNode = null;
1012
+ }
1013
+ }
1014
+
1015
+ /**
1016
+ * Populate `_hostNode` on each child of `inst`, assuming that the children
1017
+ * match up with the DOM (element) children of `node`.
1018
+ *
1019
+ * We cache entire levels at once to avoid an n^2 problem where we access the
1020
+ * children of a node sequentially and have to walk from the start to our target
1021
+ * node every time.
1022
+ *
1023
+ * Since we update `_renderedChildren` and the actual DOM at (slightly)
1024
+ * different times, we could race here and see a newer `_renderedChildren` than
1025
+ * the DOM nodes we see. To avoid this, ReactMultiChild calls
1026
+ * `prepareToManageChildren` before we change `_renderedChildren`, at which
1027
+ * time the container's child nodes are always cached (until it unmounts).
1028
+ */
1029
+ function precacheChildNodes(inst, node) {
1030
+ if (inst._flags & Flags.hasCachedChildNodes) {
1031
+ return;
1032
+ }
1033
+ var children = inst._renderedChildren;
1034
+ var childNode = node.firstChild;
1035
+ outer: for (var name in children) {
1036
+ if (!children.hasOwnProperty(name)) {
1037
+ continue;
1038
+ }
1039
+ var childInst = children[name];
1040
+ var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
1041
+ if (childID === 0) {
1042
+ // We're currently unmounting this child in ReactMultiChild; skip it.
1043
+ continue;
1044
+ }
1045
+ // We assume the child nodes are in the same order as the child instances.
1046
+ for (; childNode !== null; childNode = childNode.nextSibling) {
1047
+ if (shouldPrecacheNode(childNode, childID)) {
1048
+ precacheNode(childInst, childNode);
1049
+ continue outer;
1050
+ }
1051
+ }
1052
+ // We reached the end of the DOM children without finding an ID match.
1053
+ invariant_1(false, 'Unable to find element with ID %s.', childID);
1054
+ }
1055
+ inst._flags |= Flags.hasCachedChildNodes;
1056
+ }
1057
+
1058
+ /**
1059
+ * Given a DOM node, return the closest ReactDOMComponent or
1060
+ * ReactDOMTextComponent instance ancestor.
1061
+ */
1062
+ function getClosestInstanceFromNode(node) {
1063
+ if (node[internalInstanceKey]) {
1064
+ return node[internalInstanceKey];
1065
+ }
1066
+
1067
+ // Walk up the tree until we find an ancestor whose instance we have cached.
1068
+ var parents = [];
1069
+ while (!node[internalInstanceKey]) {
1070
+ parents.push(node);
1071
+ if (node.parentNode) {
1072
+ node = node.parentNode;
1073
+ } else {
1074
+ // Top of the tree. This node must not be part of a React tree (or is
1075
+ // unmounted, potentially).
1076
+ return null;
1077
+ }
1078
+ }
1079
+
1080
+ var closest;
1081
+ var inst = node[internalInstanceKey];
1082
+ if (inst.tag === HostComponent || inst.tag === HostText) {
1083
+ // In Fiber, this will always be the deepest root.
1084
+ return inst;
1085
+ }
1086
+ for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
1087
+ closest = inst;
1088
+ if (parents.length) {
1089
+ precacheChildNodes(inst, node);
1090
+ }
1091
+ }
1092
+
1093
+ return closest;
1094
+ }
1095
+
1096
+ /**
1097
+ * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
1098
+ * instance, or null if the node was not rendered by this React.
1099
+ */
1100
+ function getInstanceFromNode(node) {
1101
+ var inst = node[internalInstanceKey];
1102
+ if (inst) {
1103
+ if (inst.tag === HostComponent || inst.tag === HostText) {
1104
+ return inst;
1105
+ } else if (inst._hostNode === node) {
1106
+ return inst;
1107
+ } else {
1108
+ return null;
1109
+ }
1110
+ }
1111
+ inst = getClosestInstanceFromNode(node);
1112
+ if (inst != null && inst._hostNode === node) {
1113
+ return inst;
1114
+ } else {
1115
+ return null;
1116
+ }
1117
+ }
1118
+
1119
+ /**
1120
+ * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
1121
+ * DOM node.
1122
+ */
1123
+ function getNodeFromInstance(inst) {
1124
+ if (inst.tag === HostComponent || inst.tag === HostText) {
1125
+ // In Fiber this, is just the state node right now. We assume it will be
1126
+ // a host component or host text.
1127
+ return inst.stateNode;
1128
+ }
1129
+
1130
+ // Without this first invariant, passing a non-DOM-component triggers the next
1131
+ // invariant for a missing parent, which is super confusing.
1132
+ !(inst._hostNode !== undefined)
1133
+ ? invariant_1(false, 'getNodeFromInstance: Invalid argument.')
1134
+ : void 0;
1135
+
1136
+ if (inst._hostNode) {
1137
+ return inst._hostNode;
1138
+ }
1139
+
1140
+ // Walk up the tree until we find an ancestor whose DOM node we have cached.
1141
+ var parents = [];
1142
+ while (!inst._hostNode) {
1143
+ parents.push(inst);
1144
+ !inst._hostParent
1145
+ ? invariant_1(
1146
+ false,
1147
+ 'React DOM tree root should always have a node reference.'
1148
+ )
1149
+ : void 0;
1150
+ inst = inst._hostParent;
1151
+ }
1152
+
1153
+ // Now parents contains each ancestor that does *not* have a cached native
1154
+ // node, and `inst` is the deepest ancestor that does.
1155
+ for (; parents.length; inst = parents.pop()) {
1156
+ precacheChildNodes(inst, inst._hostNode);
1157
+ }
1158
+
1159
+ return inst._hostNode;
1160
+ }
1161
+
1162
+ function getFiberCurrentPropsFromNode(node) {
1163
+ return node[internalEventHandlersKey] || null;
1164
+ }
1165
+
1166
+ function updateFiberProps$1(node, props) {
1167
+ node[internalEventHandlersKey] = props;
1168
+ }
1169
+
1170
+ var ReactDOMComponentTree = {
1171
+ getClosestInstanceFromNode: getClosestInstanceFromNode,
1172
+ getInstanceFromNode: getInstanceFromNode,
1173
+ getNodeFromInstance: getNodeFromInstance,
1174
+ precacheChildNodes: precacheChildNodes,
1175
+ precacheNode: precacheNode,
1176
+ uncacheNode: uncacheNode,
1177
+ precacheFiberNode: precacheFiberNode$1,
1178
+ getFiberCurrentPropsFromNode: getFiberCurrentPropsFromNode,
1179
+ updateFiberProps: updateFiberProps$1,
1180
+ };
1181
+
1182
+ var ReactDOMComponentTree_1 = ReactDOMComponentTree;
1183
+
1184
+ /**
1185
+ * Copyright 2013-present, Facebook, Inc.
1186
+ * All rights reserved.
1187
+ *
1188
+ * This source code is licensed under the BSD-style license found in the
1189
+ * LICENSE file in the root directory of this source tree. An additional grant
1190
+ * of patent rights can be found in the PATENTS file in the same directory.
1191
+ *
1192
+ * @providesModule ReactInstanceMap
1193
+ */
1194
+
1195
+ /**
1196
+ * `ReactInstanceMap` maintains a mapping from a public facing stateful
1197
+ * instance (key) and the internal representation (value). This allows public
1198
+ * methods to accept the user facing instance as an argument and map them back
1199
+ * to internal methods.
1200
+ */
1201
+
1202
+ // TODO: Replace this with ES6: var ReactInstanceMap = new Map();
1203
+
1204
+ var ReactInstanceMap = {
1205
+ /**
1206
+ * This API should be called `delete` but we'd have to make sure to always
1207
+ * transform these to strings for IE support. When this transform is fully
1208
+ * supported we can rename it.
1209
+ */
1210
+ remove: function(key) {
1211
+ key._reactInternalFiber = undefined;
1212
+ },
1213
+
1214
+ get: function(key) {
1215
+ return key._reactInternalFiber;
1216
+ },
1217
+
1218
+ has: function(key) {
1219
+ return key._reactInternalFiber !== undefined;
1220
+ },
1221
+
1222
+ set: function(key, value) {
1223
+ key._reactInternalFiber = value;
1224
+ },
1225
+ };
1226
+
1227
+ var ReactInstanceMap_1 = ReactInstanceMap;
1228
+
1229
+ var ReactInternals = react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1230
+
1231
+ var ReactGlobalSharedState = {
1232
+ ReactCurrentOwner: ReactInternals.ReactCurrentOwner,
1233
+ };
1234
+
1235
+ {
1236
+ index(ReactGlobalSharedState, {
1237
+ ReactComponentTreeHook: ReactInternals.ReactComponentTreeHook,
1238
+ ReactDebugCurrentFrame: ReactInternals.ReactDebugCurrentFrame,
1239
+ });
1240
+ }
1241
+
1242
+ var ReactGlobalSharedState_1 = ReactGlobalSharedState;
1243
+
1244
+ /**
1245
+ * Copyright 2013-present, Facebook, Inc.
1246
+ * All rights reserved.
1247
+ *
1248
+ * This source code is licensed under the BSD-style license found in the
1249
+ * LICENSE file in the root directory of this source tree. An additional grant
1250
+ * of patent rights can be found in the PATENTS file in the same directory.
1251
+ *
1252
+ * @providesModule getComponentName
1253
+ *
1254
+ */
1255
+
1256
+ function getComponentName(instanceOrFiber) {
1257
+ if (typeof instanceOrFiber.getName === 'function') {
1258
+ // Stack reconciler
1259
+ var instance = instanceOrFiber;
1260
+ return instance.getName();
1261
+ }
1262
+ if (typeof instanceOrFiber.tag === 'number') {
1263
+ // Fiber reconciler
1264
+ var fiber = instanceOrFiber;
1265
+ var type = fiber.type;
1266
+
1267
+ if (typeof type === 'string') {
1268
+ return type;
1269
+ }
1270
+ if (typeof type === 'function') {
1271
+ return type.displayName || type.name;
1272
+ }
1273
+ }
1274
+ return null;
1275
+ }
1276
+
1277
+ var getComponentName_1 = getComponentName;
1278
+
1279
+ /**
1280
+ * Similar to invariant but only logs a warning if the condition is not met.
1281
+ * This can be used to log issues in development environments in critical
1282
+ * paths. Removing the logging code for production environments will keep the
1283
+ * same logic and follow the same code paths.
1284
+ */
1285
+
1286
+ var warning$2 = emptyFunction_1;
1287
+
1288
+ {
1289
+ (function() {
1290
+ var printWarning = function printWarning(format) {
1291
+ for (
1292
+ var _len = arguments.length,
1293
+ args = Array(_len > 1 ? _len - 1 : 0),
1294
+ _key = 1;
1295
+ _key < _len;
1296
+ _key++
1297
+ ) {
1298
+ args[_key - 1] = arguments[_key];
1299
+ }
1300
+
1301
+ var argIndex = 0;
1302
+ var message =
1303
+ 'Warning: ' +
1304
+ format.replace(/%s/g, function() {
1305
+ return args[argIndex++];
1306
+ });
1307
+ if (typeof console !== 'undefined') {
1308
+ console.error(message);
1309
+ }
1310
+ try {
1311
+ // --- Welcome to debugging React ---
1312
+ // This error was thrown as a convenience so that you can use this stack
1313
+ // to find the callsite that caused this warning to fire.
1314
+ throw new Error(message);
1315
+ } catch (x) {}
1316
+ };
1317
+
1318
+ warning$2 = function warning(condition, format) {
1319
+ if (format === undefined) {
1320
+ throw new Error(
1321
+ '`warning(condition, format, ...args)` requires a warning ' +
1322
+ 'message argument'
1323
+ );
1324
+ }
1325
+
1326
+ if (format.indexOf('Failed Composite propType: ') === 0) {
1327
+ return; // Ignore CompositeComponent proptype check.
1328
+ }
1329
+
1330
+ if (!condition) {
1331
+ for (
1332
+ var _len2 = arguments.length,
1333
+ args = Array(_len2 > 2 ? _len2 - 2 : 0),
1334
+ _key2 = 2;
1335
+ _key2 < _len2;
1336
+ _key2++
1337
+ ) {
1338
+ args[_key2 - 2] = arguments[_key2];
1339
+ }
1340
+
1341
+ printWarning.apply(undefined, [format].concat(args));
1342
+ }
1343
+ };
1344
+ })();
1345
+ }
1346
+
1347
+ var warning_1 = warning$2;
1348
+
1349
+ /**
1350
+ * Copyright 2013-present, Facebook, Inc.
1351
+ * All rights reserved.
1352
+ *
1353
+ * This source code is licensed under the BSD-style license found in the
1354
+ * LICENSE file in the root directory of this source tree. An additional grant
1355
+ * of patent rights can be found in the PATENTS file in the same directory.
1356
+ *
1357
+ * @providesModule ReactTypeOfSideEffect
1358
+ *
1359
+ */
1360
+
1361
+ var ReactTypeOfSideEffect = {
1362
+ // Don't change these two values:
1363
+ NoEffect: 0, // 0b00000000
1364
+ PerformedWork: 1, // 0b00000001
1365
+ // You can change the rest (and add more).
1366
+ Placement: 2, // 0b00000010
1367
+ Update: 4, // 0b00000100
1368
+ PlacementAndUpdate: 6, // 0b00000110
1369
+ Deletion: 8, // 0b00001000
1370
+ ContentReset: 16, // 0b00010000
1371
+ Callback: 32, // 0b00100000
1372
+ Err: 64, // 0b01000000
1373
+ Ref: 128,
1374
+ };
1375
+
1376
+ var ReactCurrentOwner = ReactGlobalSharedState_1.ReactCurrentOwner;
1377
+
1378
+ {
1379
+ var warning$1 = warning_1;
1380
+ }
1381
+
1382
+ var ClassComponent = ReactTypeOfWork.ClassComponent;
1383
+ var HostComponent$1 = ReactTypeOfWork.HostComponent;
1384
+ var HostRoot$1 = ReactTypeOfWork.HostRoot;
1385
+ var HostPortal = ReactTypeOfWork.HostPortal;
1386
+ var HostText$1 = ReactTypeOfWork.HostText;
1387
+
1388
+ var NoEffect = ReactTypeOfSideEffect.NoEffect;
1389
+ var Placement = ReactTypeOfSideEffect.Placement;
1390
+
1391
+ var MOUNTING = 1;
1392
+ var MOUNTED = 2;
1393
+ var UNMOUNTED = 3;
1394
+
1395
+ function isFiberMountedImpl(fiber) {
1396
+ var node = fiber;
1397
+ if (!fiber.alternate) {
1398
+ // If there is no alternate, this might be a new tree that isn't inserted
1399
+ // yet. If it is, then it will have a pending insertion effect on it.
1400
+ if ((node.effectTag & Placement) !== NoEffect) {
1401
+ return MOUNTING;
1402
+ }
1403
+ while (node['return']) {
1404
+ node = node['return'];
1405
+ if ((node.effectTag & Placement) !== NoEffect) {
1406
+ return MOUNTING;
1407
+ }
1408
+ }
1409
+ } else {
1410
+ while (node['return']) {
1411
+ node = node['return'];
1412
+ }
1413
+ }
1414
+ if (node.tag === HostRoot$1) {
1415
+ // TODO: Check if this was a nested HostRoot when used with
1416
+ // renderContainerIntoSubtree.
1417
+ return MOUNTED;
1418
+ }
1419
+ // If we didn't hit the root, that means that we're in an disconnected tree
1420
+ // that has been unmounted.
1421
+ return UNMOUNTED;
1422
+ }
1423
+ var isFiberMounted = function(fiber) {
1424
+ return isFiberMountedImpl(fiber) === MOUNTED;
1425
+ };
1426
+
1427
+ var isMounted = function(component) {
1428
+ {
1429
+ var owner = ReactCurrentOwner.current;
1430
+ if (owner !== null && owner.tag === ClassComponent) {
1431
+ var ownerFiber = owner;
1432
+ var instance = ownerFiber.stateNode;
1433
+ warning$1(
1434
+ instance._warnedAboutRefsInRender,
1435
+ '%s is accessing isMounted inside its render() function. ' +
1436
+ 'render() should be a pure function of props and state. It should ' +
1437
+ 'never access something that requires stale data from the previous ' +
1438
+ 'render, such as refs. Move this logic to componentDidMount and ' +
1439
+ 'componentDidUpdate instead.',
1440
+ getComponentName_1(ownerFiber) || 'A component'
1441
+ );
1442
+ instance._warnedAboutRefsInRender = true;
1443
+ }
1444
+ }
1445
+
1446
+ var fiber = ReactInstanceMap_1.get(component);
1447
+ if (!fiber) {
1448
+ return false;
1449
+ }
1450
+ return isFiberMountedImpl(fiber) === MOUNTED;
1451
+ };
1452
+
1453
+ function assertIsMounted(fiber) {
1454
+ !(isFiberMountedImpl(fiber) === MOUNTED)
1455
+ ? invariant_1(false, 'Unable to find node on an unmounted component.')
1456
+ : void 0;
1457
+ }
1458
+
1459
+ function findCurrentFiberUsingSlowPath(fiber) {
1460
+ var alternate = fiber.alternate;
1461
+ if (!alternate) {
1462
+ // If there is no alternate, then we only need to check if it is mounted.
1463
+ var state = isFiberMountedImpl(fiber);
1464
+ !(state !== UNMOUNTED)
1465
+ ? invariant_1(false, 'Unable to find node on an unmounted component.')
1466
+ : void 0;
1467
+ if (state === MOUNTING) {
1468
+ return null;
1469
+ }
1470
+ return fiber;
1471
+ }
1472
+ // If we have two possible branches, we'll walk backwards up to the root
1473
+ // to see what path the root points to. On the way we may hit one of the
1474
+ // special cases and we'll deal with them.
1475
+ var a = fiber;
1476
+ var b = alternate;
1477
+ while (true) {
1478
+ var parentA = a['return'];
1479
+ var parentB = parentA ? parentA.alternate : null;
1480
+ if (!parentA || !parentB) {
1481
+ // We're at the root.
1482
+ break;
1483
+ }
1484
+
1485
+ // If both copies of the parent fiber point to the same child, we can
1486
+ // assume that the child is current. This happens when we bailout on low
1487
+ // priority: the bailed out fiber's child reuses the current child.
1488
+ if (parentA.child === parentB.child) {
1489
+ var child = parentA.child;
1490
+ while (child) {
1491
+ if (child === a) {
1492
+ // We've determined that A is the current branch.
1493
+ assertIsMounted(parentA);
1494
+ return fiber;
1495
+ }
1496
+ if (child === b) {
1497
+ // We've determined that B is the current branch.
1498
+ assertIsMounted(parentA);
1499
+ return alternate;
1500
+ }
1501
+ child = child.sibling;
1502
+ }
1503
+ // We should never have an alternate for any mounting node. So the only
1504
+ // way this could possibly happen is if this was unmounted, if at all.
1505
+ invariant_1(false, 'Unable to find node on an unmounted component.');
1506
+ }
1507
+
1508
+ if (a['return'] !== b['return']) {
1509
+ // The return pointer of A and the return pointer of B point to different
1510
+ // fibers. We assume that return pointers never criss-cross, so A must
1511
+ // belong to the child set of A.return, and B must belong to the child
1512
+ // set of B.return.
1513
+ a = parentA;
1514
+ b = parentB;
1515
+ } else {
1516
+ // The return pointers point to the same fiber. We'll have to use the
1517
+ // default, slow path: scan the child sets of each parent alternate to see
1518
+ // which child belongs to which set.
1519
+ //
1520
+ // Search parent A's child set
1521
+ var didFindChild = false;
1522
+ var _child = parentA.child;
1523
+ while (_child) {
1524
+ if (_child === a) {
1525
+ didFindChild = true;
1526
+ a = parentA;
1527
+ b = parentB;
1528
+ break;
1529
+ }
1530
+ if (_child === b) {
1531
+ didFindChild = true;
1532
+ b = parentA;
1533
+ a = parentB;
1534
+ break;
1535
+ }
1536
+ _child = _child.sibling;
1537
+ }
1538
+ if (!didFindChild) {
1539
+ // Search parent B's child set
1540
+ _child = parentB.child;
1541
+ while (_child) {
1542
+ if (_child === a) {
1543
+ didFindChild = true;
1544
+ a = parentB;
1545
+ b = parentA;
1546
+ break;
1547
+ }
1548
+ if (_child === b) {
1549
+ didFindChild = true;
1550
+ b = parentB;
1551
+ a = parentA;
1552
+ break;
1553
+ }
1554
+ _child = _child.sibling;
1555
+ }
1556
+ !didFindChild
1557
+ ? invariant_1(
1558
+ false,
1559
+ 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.'
1560
+ )
1561
+ : void 0;
1562
+ }
1563
+ }
1564
+
1565
+ !(a.alternate === b)
1566
+ ? invariant_1(
1567
+ false,
1568
+ "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
1569
+ )
1570
+ : void 0;
1571
+ }
1572
+ // If the root is not a host container, we're in a disconnected tree. I.e.
1573
+ // unmounted.
1574
+ !(a.tag === HostRoot$1)
1575
+ ? invariant_1(false, 'Unable to find node on an unmounted component.')
1576
+ : void 0;
1577
+ if (a.stateNode.current === a) {
1578
+ // We've determined that A is the current branch.
1579
+ return fiber;
1580
+ }
1581
+ // Otherwise B has to be current branch.
1582
+ return alternate;
1583
+ }
1584
+ var findCurrentFiberUsingSlowPath_1 = findCurrentFiberUsingSlowPath;
1585
+
1586
+ var findCurrentHostFiber = function(parent) {
1587
+ var currentParent = findCurrentFiberUsingSlowPath(parent);
1588
+ if (!currentParent) {
1589
+ return null;
1590
+ }
1591
+
1592
+ // Next we'll drill down this component to find the first HostComponent/Text.
1593
+ var node = currentParent;
1594
+ while (true) {
1595
+ if (node.tag === HostComponent$1 || node.tag === HostText$1) {
1596
+ return node;
1597
+ } else if (node.child) {
1598
+ node.child['return'] = node;
1599
+ node = node.child;
1600
+ continue;
1601
+ }
1602
+ if (node === currentParent) {
1603
+ return null;
1604
+ }
1605
+ while (!node.sibling) {
1606
+ if (!node['return'] || node['return'] === currentParent) {
1607
+ return null;
1608
+ }
1609
+ node = node['return'];
1610
+ }
1611
+ node.sibling['return'] = node['return'];
1612
+ node = node.sibling;
1613
+ }
1614
+ // Flow needs the return null here, but ESLint complains about it.
1615
+ // eslint-disable-next-line no-unreachable
1616
+ return null;
1617
+ };
1618
+
1619
+ var findCurrentHostFiberWithNoPortals = function(parent) {
1620
+ var currentParent = findCurrentFiberUsingSlowPath(parent);
1621
+ if (!currentParent) {
1622
+ return null;
1623
+ }
1624
+
1625
+ // Next we'll drill down this component to find the first HostComponent/Text.
1626
+ var node = currentParent;
1627
+ while (true) {
1628
+ if (node.tag === HostComponent$1 || node.tag === HostText$1) {
1629
+ return node;
1630
+ } else if (node.child && node.tag !== HostPortal) {
1631
+ node.child['return'] = node;
1632
+ node = node.child;
1633
+ continue;
1634
+ }
1635
+ if (node === currentParent) {
1636
+ return null;
1637
+ }
1638
+ while (!node.sibling) {
1639
+ if (!node['return'] || node['return'] === currentParent) {
1640
+ return null;
1641
+ }
1642
+ node = node['return'];
1643
+ }
1644
+ node.sibling['return'] = node['return'];
1645
+ node = node.sibling;
1646
+ }
1647
+ // Flow needs the return null here, but ESLint complains about it.
1648
+ // eslint-disable-next-line no-unreachable
1649
+ return null;
1650
+ };
1651
+
1652
+ var ReactFiberTreeReflection = {
1653
+ isFiberMounted: isFiberMounted,
1654
+ isMounted: isMounted,
1655
+ findCurrentFiberUsingSlowPath: findCurrentFiberUsingSlowPath_1,
1656
+ findCurrentHostFiber: findCurrentHostFiber,
1657
+ findCurrentHostFiberWithNoPortals: findCurrentHostFiberWithNoPortals,
1658
+ };
1659
+
1660
+ var ReactErrorUtils = {
1661
+ // Used by Fiber to simulate a try-catch.
1662
+ _caughtError: null,
1663
+ _hasCaughtError: false,
1664
+
1665
+ // Used by event system to capture/rethrow the first error.
1666
+ _rethrowError: null,
1667
+ _hasRethrowError: false,
1668
+
1669
+ injection: {
1670
+ injectErrorUtils: function(injectedErrorUtils) {
1671
+ !(typeof injectedErrorUtils.invokeGuardedCallback === 'function')
1672
+ ? invariant_1(
1673
+ false,
1674
+ 'Injected invokeGuardedCallback() must be a function.'
1675
+ )
1676
+ : void 0;
1677
+ invokeGuardedCallback = injectedErrorUtils.invokeGuardedCallback;
1678
+ },
1679
+ },
1680
+
1681
+ /**
1682
+ * Call a function while guarding against errors that happens within it.
1683
+ * Returns an error if it throws, otherwise null.
1684
+ *
1685
+ * In production, this is implemented using a try-catch. The reason we don't
1686
+ * use a try-catch directly is so that we can swap out a different
1687
+ * implementation in DEV mode.
1688
+ *
1689
+ * @param {String} name of the guard to use for logging or debugging
1690
+ * @param {Function} func The function to invoke
1691
+ * @param {*} context The context to use when calling the function
1692
+ * @param {...*} args Arguments for function
1693
+ */
1694
+ invokeGuardedCallback: function(name, func, context, a, b, c, d, e, f) {
1695
+ invokeGuardedCallback.apply(ReactErrorUtils, arguments);
1696
+ },
1697
+
1698
+ /**
1699
+ * Same as invokeGuardedCallback, but instead of returning an error, it stores
1700
+ * it in a global so it can be rethrown by `rethrowCaughtError` later.
1701
+ * TODO: See if _caughtError and _rethrowError can be unified.
1702
+ *
1703
+ * @param {String} name of the guard to use for logging or debugging
1704
+ * @param {Function} func The function to invoke
1705
+ * @param {*} context The context to use when calling the function
1706
+ * @param {...*} args Arguments for function
1707
+ */
1708
+ invokeGuardedCallbackAndCatchFirstError: function(
1709
+ name,
1710
+ func,
1711
+ context,
1712
+ a,
1713
+ b,
1714
+ c,
1715
+ d,
1716
+ e,
1717
+ f
1718
+ ) {
1719
+ ReactErrorUtils.invokeGuardedCallback.apply(this, arguments);
1720
+ if (ReactErrorUtils.hasCaughtError()) {
1721
+ var error = ReactErrorUtils.clearCaughtError();
1722
+ if (!ReactErrorUtils._hasRethrowError) {
1723
+ ReactErrorUtils._hasRethrowError = true;
1724
+ ReactErrorUtils._rethrowError = error;
1725
+ }
1726
+ }
1727
+ },
1728
+
1729
+ /**
1730
+ * During execution of guarded functions we will capture the first error which
1731
+ * we will rethrow to be handled by the top level error handler.
1732
+ */
1733
+ rethrowCaughtError: function() {
1734
+ return rethrowCaughtError.apply(ReactErrorUtils, arguments);
1735
+ },
1736
+
1737
+ hasCaughtError: function() {
1738
+ return ReactErrorUtils._hasCaughtError;
1739
+ },
1740
+
1741
+ clearCaughtError: function() {
1742
+ if (ReactErrorUtils._hasCaughtError) {
1743
+ var error = ReactErrorUtils._caughtError;
1744
+ ReactErrorUtils._caughtError = null;
1745
+ ReactErrorUtils._hasCaughtError = false;
1746
+ return error;
1747
+ } else {
1748
+ invariant_1(
1749
+ false,
1750
+ 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.'
1751
+ );
1752
+ }
1753
+ },
1754
+ };
1755
+
1756
+ var invokeGuardedCallback = function(name, func, context, a, b, c, d, e, f) {
1757
+ ReactErrorUtils._hasCaughtError = false;
1758
+ ReactErrorUtils._caughtError = null;
1759
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
1760
+ try {
1761
+ func.apply(context, funcArgs);
1762
+ } catch (error) {
1763
+ ReactErrorUtils._caughtError = error;
1764
+ ReactErrorUtils._hasCaughtError = true;
1765
+ }
1766
+ };
1767
+
1768
+ {
1769
+ // In DEV mode, we swap out invokeGuardedCallback for a special version
1770
+ // that plays more nicely with the browser's DevTools. The idea is to preserve
1771
+ // "Pause on exceptions" behavior. Because React wraps all user-provided
1772
+ // functions in invokeGuardedCallback, and the production version of
1773
+ // invokeGuardedCallback uses a try-catch, all user exceptions are treated
1774
+ // like caught exceptions, and the DevTools won't pause unless the developer
1775
+ // takes the extra step of enabling pause on caught exceptions. This is
1776
+ // untintuitive, though, because even though React has caught the error, from
1777
+ // the developer's perspective, the error is uncaught.
1778
+ //
1779
+ // To preserve the expected "Pause on exceptions" behavior, we don't use a
1780
+ // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
1781
+ // DOM node, and call the user-provided callback from inside an event handler
1782
+ // for that fake event. If the callback throws, the error is "captured" using
1783
+ // a global event handler. But because the error happens in a different
1784
+ // event loop context, it does not interrupt the normal program flow.
1785
+ // Effectively, this gives us try-catch behavior without actually using
1786
+ // try-catch. Neat!
1787
+
1788
+ // Check that the browser supports the APIs we need to implement our special
1789
+ // DEV version of invokeGuardedCallback
1790
+ if (
1791
+ typeof window !== 'undefined' &&
1792
+ typeof window.dispatchEvent === 'function' &&
1793
+ typeof document !== 'undefined' &&
1794
+ typeof document.createEvent === 'function'
1795
+ ) {
1796
+ var fakeNode = document.createElement('react');
1797
+
1798
+ var invokeGuardedCallbackDev = function(
1799
+ name,
1800
+ func,
1801
+ context,
1802
+ a,
1803
+ b,
1804
+ c,
1805
+ d,
1806
+ e,
1807
+ f
1808
+ ) {
1809
+ // Keeps track of whether the user-provided callback threw an error. We
1810
+ // set this to true at the beginning, then set it to false right after
1811
+ // calling the function. If the function errors, `didError` will never be
1812
+ // set to false. This strategy works even if the browser is flaky and
1813
+ // fails to call our global error handler, because it doesn't rely on
1814
+ // the error event at all.
1815
+ var didError = true;
1816
+
1817
+ // Create an event handler for our fake event. We will synchronously
1818
+ // dispatch our fake event using `dispatchEvent`. Inside the handler, we
1819
+ // call the user-provided callback.
1820
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
1821
+ function callCallback() {
1822
+ // We immediately remove the callback from event listeners so that
1823
+ // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
1824
+ // nested call would trigger the fake event handlers of any call higher
1825
+ // in the stack.
1826
+ fakeNode.removeEventListener(evtType, callCallback, false);
1827
+ func.apply(context, funcArgs);
1828
+ didError = false;
1829
+ }
1830
+
1831
+ // Create a global error event handler. We use this to capture the value
1832
+ // that was thrown. It's possible that this error handler will fire more
1833
+ // than once; for example, if non-React code also calls `dispatchEvent`
1834
+ // and a handler for that event throws. We should be resilient to most of
1835
+ // those cases. Even if our error event handler fires more than once, the
1836
+ // last error event is always used. If the callback actually does error,
1837
+ // we know that the last error event is the correct one, because it's not
1838
+ // possible for anything else to have happened in between our callback
1839
+ // erroring and the code that follows the `dispatchEvent` call below. If
1840
+ // the callback doesn't error, but the error event was fired, we know to
1841
+ // ignore it because `didError` will be false, as described above.
1842
+ var error = void 0;
1843
+ // Use this to track whether the error event is ever called.
1844
+ var didSetError = false;
1845
+ var isCrossOriginError = false;
1846
+
1847
+ function onError(event) {
1848
+ error = event.error;
1849
+ didSetError = true;
1850
+ if (error === null && event.colno === 0 && event.lineno === 0) {
1851
+ isCrossOriginError = true;
1852
+ }
1853
+ }
1854
+
1855
+ // Create a fake event type.
1856
+ var evtType = 'react-' + (name ? name : 'invokeguardedcallback');
1857
+
1858
+ // Attach our event handlers
1859
+ window.addEventListener('error', onError);
1860
+ fakeNode.addEventListener(evtType, callCallback, false);
1861
+
1862
+ // Synchronously dispatch our fake event. If the user-provided function
1863
+ // errors, it will trigger our global error handler.
1864
+ var evt = document.createEvent('Event');
1865
+ evt.initEvent(evtType, false, false);
1866
+ fakeNode.dispatchEvent(evt);
1867
+
1868
+ if (didError) {
1869
+ if (!didSetError) {
1870
+ // The callback errored, but the error event never fired.
1871
+ error = new Error(
1872
+ 'An error was thrown inside one of your components, but React ' +
1873
+ "doesn't know what it was. This is likely due to browser " +
1874
+ 'flakiness. React does its best to preserve the "Pause on ' +
1875
+ 'exceptions" behavior of the DevTools, which requires some ' +
1876
+ "DEV-mode only tricks. It's possible that these don't work in " +
1877
+ 'your browser. Try triggering the error in production mode, ' +
1878
+ 'or switching to a modern browser. If you suspect that this is ' +
1879
+ 'actually an issue with React, please file an issue.'
1880
+ );
1881
+ } else if (isCrossOriginError) {
1882
+ error = new Error(
1883
+ "A cross-origin error was thrown. React doesn't have access to " +
1884
+ 'the actual error object in development. ' +
1885
+ 'See https://fb.me/react-crossorigin-error for more information.'
1886
+ );
1887
+ }
1888
+ ReactErrorUtils._hasCaughtError = true;
1889
+ ReactErrorUtils._caughtError = error;
1890
+ } else {
1891
+ ReactErrorUtils._hasCaughtError = false;
1892
+ ReactErrorUtils._caughtError = null;
1893
+ }
1894
+
1895
+ // Remove our event listeners
1896
+ window.removeEventListener('error', onError);
1897
+ };
1898
+
1899
+ invokeGuardedCallback = invokeGuardedCallbackDev;
1900
+ }
1901
+ }
1902
+
1903
+ var rethrowCaughtError = function() {
1904
+ if (ReactErrorUtils._hasRethrowError) {
1905
+ var error = ReactErrorUtils._rethrowError;
1906
+ ReactErrorUtils._rethrowError = null;
1907
+ ReactErrorUtils._hasRethrowError = false;
1908
+ throw error;
1909
+ }
1910
+ };
1911
+
1912
+ var ReactErrorUtils_1 = ReactErrorUtils;
1913
+
1914
+ {
1915
+ var warning$3 = warning_1;
1916
+ }
1917
+
1918
+ /**
1919
+ * Injected dependencies:
1920
+ */
1921
+
1922
+ /**
1923
+ * - `ComponentTree`: [required] Module that can convert between React instances
1924
+ * and actual node references.
1925
+ */
1926
+ var ComponentTree;
1927
+ var injection = {
1928
+ injectComponentTree: function(Injected) {
1929
+ ComponentTree = Injected;
1930
+ {
1931
+ warning$3(
1932
+ Injected &&
1933
+ Injected.getNodeFromInstance &&
1934
+ Injected.getInstanceFromNode,
1935
+ 'EventPluginUtils.injection.injectComponentTree(...): Injected ' +
1936
+ 'module is missing getNodeFromInstance or getInstanceFromNode.'
1937
+ );
1938
+ }
1939
+ },
1940
+ };
1941
+
1942
+ function isEndish(topLevelType) {
1943
+ return (
1944
+ topLevelType === 'topMouseUp' ||
1945
+ topLevelType === 'topTouchEnd' ||
1946
+ topLevelType === 'topTouchCancel'
1947
+ );
1948
+ }
1949
+
1950
+ function isMoveish(topLevelType) {
1951
+ return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
1952
+ }
1953
+ function isStartish(topLevelType) {
1954
+ return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
1955
+ }
1956
+
1957
+ var validateEventDispatches;
1958
+ {
1959
+ validateEventDispatches = function(event) {
1960
+ var dispatchListeners = event._dispatchListeners;
1961
+ var dispatchInstances = event._dispatchInstances;
1962
+
1963
+ var listenersIsArr = Array.isArray(dispatchListeners);
1964
+ var listenersLen = listenersIsArr
1965
+ ? dispatchListeners.length
1966
+ : dispatchListeners ? 1 : 0;
1967
+
1968
+ var instancesIsArr = Array.isArray(dispatchInstances);
1969
+ var instancesLen = instancesIsArr
1970
+ ? dispatchInstances.length
1971
+ : dispatchInstances ? 1 : 0;
1972
+
1973
+ warning$3(
1974
+ instancesIsArr === listenersIsArr && instancesLen === listenersLen,
1975
+ 'EventPluginUtils: Invalid `event`.'
1976
+ );
1977
+ };
1978
+ }
1979
+
1980
+ /**
1981
+ * Dispatch the event to the listener.
1982
+ * @param {SyntheticEvent} event SyntheticEvent to handle
1983
+ * @param {boolean} simulated If the event is simulated (changes exn behavior)
1984
+ * @param {function} listener Application-level callback
1985
+ * @param {*} inst Internal component instance
1986
+ */
1987
+ function executeDispatch(event, simulated, listener, inst) {
1988
+ var type = event.type || 'unknown-event';
1989
+ event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
1990
+ ReactErrorUtils_1.invokeGuardedCallbackAndCatchFirstError(
1991
+ type,
1992
+ listener,
1993
+ undefined,
1994
+ event
1995
+ );
1996
+ event.currentTarget = null;
1997
+ }
1998
+
1999
+ /**
2000
+ * Standard/simple iteration through an event's collected dispatches.
2001
+ */
2002
+ function executeDispatchesInOrder(event, simulated) {
2003
+ var dispatchListeners = event._dispatchListeners;
2004
+ var dispatchInstances = event._dispatchInstances;
2005
+ {
2006
+ validateEventDispatches(event);
2007
+ }
2008
+ if (Array.isArray(dispatchListeners)) {
2009
+ for (var i = 0; i < dispatchListeners.length; i++) {
2010
+ if (event.isPropagationStopped()) {
2011
+ break;
2012
+ }
2013
+ // Listeners and Instances are two parallel arrays that are always in sync.
2014
+ executeDispatch(
2015
+ event,
2016
+ simulated,
2017
+ dispatchListeners[i],
2018
+ dispatchInstances[i]
2019
+ );
2020
+ }
2021
+ } else if (dispatchListeners) {
2022
+ executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
2023
+ }
2024
+ event._dispatchListeners = null;
2025
+ event._dispatchInstances = null;
2026
+ }
2027
+
2028
+ /**
2029
+ * Standard/simple iteration through an event's collected dispatches, but stops
2030
+ * at the first dispatch execution returning true, and returns that id.
2031
+ *
2032
+ * @return {?string} id of the first dispatch execution who's listener returns
2033
+ * true, or null if no listener returned true.
2034
+ */
2035
+ function executeDispatchesInOrderStopAtTrueImpl(event) {
2036
+ var dispatchListeners = event._dispatchListeners;
2037
+ var dispatchInstances = event._dispatchInstances;
2038
+ {
2039
+ validateEventDispatches(event);
2040
+ }
2041
+ if (Array.isArray(dispatchListeners)) {
2042
+ for (var i = 0; i < dispatchListeners.length; i++) {
2043
+ if (event.isPropagationStopped()) {
2044
+ break;
2045
+ }
2046
+ // Listeners and Instances are two parallel arrays that are always in sync.
2047
+ if (dispatchListeners[i](event, dispatchInstances[i])) {
2048
+ return dispatchInstances[i];
2049
+ }
2050
+ }
2051
+ } else if (dispatchListeners) {
2052
+ if (dispatchListeners(event, dispatchInstances)) {
2053
+ return dispatchInstances;
2054
+ }
2055
+ }
2056
+ return null;
2057
+ }
2058
+
2059
+ /**
2060
+ * @see executeDispatchesInOrderStopAtTrueImpl
2061
+ */
2062
+ function executeDispatchesInOrderStopAtTrue(event) {
2063
+ var ret = executeDispatchesInOrderStopAtTrueImpl(event);
2064
+ event._dispatchInstances = null;
2065
+ event._dispatchListeners = null;
2066
+ return ret;
2067
+ }
2068
+
2069
+ /**
2070
+ * Execution of a "direct" dispatch - there must be at most one dispatch
2071
+ * accumulated on the event or it is considered an error. It doesn't really make
2072
+ * sense for an event with multiple dispatches (bubbled) to keep track of the
2073
+ * return values at each dispatch execution, but it does tend to make sense when
2074
+ * dealing with "direct" dispatches.
2075
+ *
2076
+ * @return {*} The return value of executing the single dispatch.
2077
+ */
2078
+ function executeDirectDispatch(event) {
2079
+ {
2080
+ validateEventDispatches(event);
2081
+ }
2082
+ var dispatchListener = event._dispatchListeners;
2083
+ var dispatchInstance = event._dispatchInstances;
2084
+ !!Array.isArray(dispatchListener)
2085
+ ? invariant_1(false, 'executeDirectDispatch(...): Invalid `event`.')
2086
+ : void 0;
2087
+ event.currentTarget = dispatchListener
2088
+ ? EventPluginUtils.getNodeFromInstance(dispatchInstance)
2089
+ : null;
2090
+ var res = dispatchListener ? dispatchListener(event) : null;
2091
+ event.currentTarget = null;
2092
+ event._dispatchListeners = null;
2093
+ event._dispatchInstances = null;
2094
+ return res;
2095
+ }
2096
+
2097
+ /**
2098
+ * @param {SyntheticEvent} event
2099
+ * @return {boolean} True iff number of dispatches accumulated is greater than 0.
2100
+ */
2101
+ function hasDispatches(event) {
2102
+ return !!event._dispatchListeners;
2103
+ }
2104
+
2105
+ /**
2106
+ * General utilities that are useful in creating custom Event Plugins.
2107
+ */
2108
+ var EventPluginUtils = {
2109
+ isEndish: isEndish,
2110
+ isMoveish: isMoveish,
2111
+ isStartish: isStartish,
2112
+
2113
+ executeDirectDispatch: executeDirectDispatch,
2114
+ executeDispatchesInOrder: executeDispatchesInOrder,
2115
+ executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
2116
+ hasDispatches: hasDispatches,
2117
+
2118
+ getFiberCurrentPropsFromNode: function(node) {
2119
+ return ComponentTree.getFiberCurrentPropsFromNode(node);
2120
+ },
2121
+ getInstanceFromNode: function(node) {
2122
+ return ComponentTree.getInstanceFromNode(node);
2123
+ },
2124
+ getNodeFromInstance: function(node) {
2125
+ return ComponentTree.getNodeFromInstance(node);
2126
+ },
2127
+
2128
+ injection: injection,
2129
+ };
2130
+
2131
+ var EventPluginUtils_1 = EventPluginUtils;
2132
+
2133
+ // Use to restore controlled state after a change event has fired.
2134
+
2135
+ var fiberHostComponent = null;
2136
+
2137
+ var ReactControlledComponentInjection = {
2138
+ injectFiberControlledHostComponent: function(hostComponentImpl) {
2139
+ // The fiber implementation doesn't use dynamic dispatch so we need to
2140
+ // inject the implementation.
2141
+ fiberHostComponent = hostComponentImpl;
2142
+ },
2143
+ };
2144
+
2145
+ var restoreTarget = null;
2146
+ var restoreQueue = null;
2147
+
2148
+ function restoreStateOfTarget(target) {
2149
+ // We perform this translation at the end of the event loop so that we
2150
+ // always receive the correct fiber here
2151
+ var internalInstance = EventPluginUtils_1.getInstanceFromNode(target);
2152
+ if (!internalInstance) {
2153
+ // Unmounted
2154
+ return;
2155
+ }
2156
+ if (typeof internalInstance.tag === 'number') {
2157
+ !(fiberHostComponent &&
2158
+ typeof fiberHostComponent.restoreControlledState === 'function')
2159
+ ? invariant_1(
2160
+ false,
2161
+ 'Fiber needs to be injected to handle a fiber target for controlled events. This error is likely caused by a bug in React. Please file an issue.'
2162
+ )
2163
+ : void 0;
2164
+ var props = EventPluginUtils_1.getFiberCurrentPropsFromNode(
2165
+ internalInstance.stateNode
2166
+ );
2167
+ fiberHostComponent.restoreControlledState(
2168
+ internalInstance.stateNode,
2169
+ internalInstance.type,
2170
+ props
2171
+ );
2172
+ return;
2173
+ }
2174
+ !(typeof internalInstance.restoreControlledState === 'function')
2175
+ ? invariant_1(
2176
+ false,
2177
+ 'The internal instance must be a React host component. This error is likely caused by a bug in React. Please file an issue.'
2178
+ )
2179
+ : void 0;
2180
+ // If it is not a Fiber, we can just use dynamic dispatch.
2181
+ internalInstance.restoreControlledState();
2182
+ }
2183
+
2184
+ var ReactControlledComponent = {
2185
+ injection: ReactControlledComponentInjection,
2186
+
2187
+ enqueueStateRestore: function(target) {
2188
+ if (restoreTarget) {
2189
+ if (restoreQueue) {
2190
+ restoreQueue.push(target);
2191
+ } else {
2192
+ restoreQueue = [target];
2193
+ }
2194
+ } else {
2195
+ restoreTarget = target;
2196
+ }
2197
+ },
2198
+ restoreStateIfNeeded: function() {
2199
+ if (!restoreTarget) {
2200
+ return;
2201
+ }
2202
+ var target = restoreTarget;
2203
+ var queuedTargets = restoreQueue;
2204
+ restoreTarget = null;
2205
+ restoreQueue = null;
2206
+
2207
+ restoreStateOfTarget(target);
2208
+ if (queuedTargets) {
2209
+ for (var i = 0; i < queuedTargets.length; i++) {
2210
+ restoreStateOfTarget(queuedTargets[i]);
2211
+ }
2212
+ }
2213
+ },
2214
+ };
2215
+
2216
+ var ReactControlledComponent_1 = ReactControlledComponent;
2217
+
2218
+ // Used as a way to call batchedUpdates when we don't know if we're in a Fiber
2219
+ // or Stack context. Such as when we're dispatching events or if third party
2220
+ // libraries need to call batchedUpdates. Eventually, this API will go away when
2221
+ // everything is batched by default. We'll then have a similar API to opt-out of
2222
+ // scheduled work and instead do synchronous work.
2223
+
2224
+ // Defaults
2225
+ var stackBatchedUpdates = function(fn, a, b, c, d, e) {
2226
+ return fn(a, b, c, d, e);
2227
+ };
2228
+ var fiberBatchedUpdates = function(fn, bookkeeping) {
2229
+ return fn(bookkeeping);
2230
+ };
2231
+
2232
+ function performFiberBatchedUpdates(fn, bookkeeping) {
2233
+ // If we have Fiber loaded, we need to wrap this in a batching call so that
2234
+ // Fiber can apply its default priority for this call.
2235
+ return fiberBatchedUpdates(fn, bookkeeping);
2236
+ }
2237
+ function batchedUpdates(fn, bookkeeping) {
2238
+ // We first perform work with the stack batching strategy, by passing our
2239
+ // indirection to it.
2240
+ return stackBatchedUpdates(performFiberBatchedUpdates, fn, bookkeeping);
2241
+ }
2242
+
2243
+ var isNestingBatched = false;
2244
+ function batchedUpdatesWithControlledComponents(fn, bookkeeping) {
2245
+ if (isNestingBatched) {
2246
+ // If we are currently inside another batch, we need to wait until it
2247
+ // fully completes before restoring state. Therefore, we add the target to
2248
+ // a queue of work.
2249
+ return batchedUpdates(fn, bookkeeping);
2250
+ }
2251
+ isNestingBatched = true;
2252
+ try {
2253
+ return batchedUpdates(fn, bookkeeping);
2254
+ } finally {
2255
+ // Here we wait until all updates have propagated, which is important
2256
+ // when using controlled components within layers:
2257
+ // https://github.com/facebook/react/issues/1698
2258
+ // Then we restore state of any controlled component.
2259
+ isNestingBatched = false;
2260
+ ReactControlledComponent_1.restoreStateIfNeeded();
2261
+ }
2262
+ }
2263
+
2264
+ var ReactGenericBatchingInjection = {
2265
+ injectStackBatchedUpdates: function(_batchedUpdates) {
2266
+ stackBatchedUpdates = _batchedUpdates;
2267
+ },
2268
+ injectFiberBatchedUpdates: function(_batchedUpdates) {
2269
+ fiberBatchedUpdates = _batchedUpdates;
2270
+ },
2271
+ };
2272
+
2273
+ var ReactGenericBatching = {
2274
+ batchedUpdates: batchedUpdatesWithControlledComponents,
2275
+ injection: ReactGenericBatchingInjection,
2276
+ };
2277
+
2278
+ var ReactGenericBatching_1 = ReactGenericBatching;
2279
+
2280
+ var TEXT_NODE$1 = HTMLNodeType_1.TEXT_NODE;
2281
+
2282
+ /**
2283
+ * Gets the target node from a native browser event by accounting for
2284
+ * inconsistencies in browser DOM APIs.
2285
+ *
2286
+ * @param {object} nativeEvent Native browser event.
2287
+ * @return {DOMEventTarget} Target node.
2288
+ */
2289
+
2290
+ function getEventTarget(nativeEvent) {
2291
+ var target = nativeEvent.target || nativeEvent.srcElement || window;
2292
+
2293
+ // Normalize SVG <use> element events #4963
2294
+ if (target.correspondingUseElement) {
2295
+ target = target.correspondingUseElement;
2296
+ }
2297
+
2298
+ // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
2299
+ // @see http://www.quirksmode.org/js/events_properties.html
2300
+ return target.nodeType === TEXT_NODE$1 ? target.parentNode : target;
2301
+ }
2302
+
2303
+ var getEventTarget_1 = getEventTarget;
2304
+
2305
+ var HostRoot = ReactTypeOfWork.HostRoot;
2306
+
2307
+ var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
2308
+ var callbackBookkeepingPool = [];
2309
+
2310
+ /**
2311
+ * Find the deepest React component completely containing the root of the
2312
+ * passed-in instance (for use when entire React trees are nested within each
2313
+ * other). If React trees are not nested, returns null.
2314
+ */
2315
+ function findRootContainerNode(inst) {
2316
+ // TODO: It may be a good idea to cache this to prevent unnecessary DOM
2317
+ // traversal, but caching is difficult to do correctly without using a
2318
+ // mutation observer to listen for all DOM changes.
2319
+ if (typeof inst.tag === 'number') {
2320
+ while (inst['return']) {
2321
+ inst = inst['return'];
2322
+ }
2323
+ if (inst.tag !== HostRoot) {
2324
+ // This can happen if we're in a detached tree.
2325
+ return null;
2326
+ }
2327
+ return inst.stateNode.containerInfo;
2328
+ } else {
2329
+ while (inst._hostParent) {
2330
+ inst = inst._hostParent;
2331
+ }
2332
+ var rootNode = ReactDOMComponentTree_1.getNodeFromInstance(inst);
2333
+ return rootNode.parentNode;
2334
+ }
2335
+ }
2336
+
2337
+ // Used to store ancestor hierarchy in top level callback
2338
+ function getTopLevelCallbackBookKeeping(
2339
+ topLevelType,
2340
+ nativeEvent,
2341
+ targetInst
2342
+ ) {
2343
+ if (callbackBookkeepingPool.length) {
2344
+ var instance = callbackBookkeepingPool.pop();
2345
+ instance.topLevelType = topLevelType;
2346
+ instance.nativeEvent = nativeEvent;
2347
+ instance.targetInst = targetInst;
2348
+ return instance;
2349
+ }
2350
+ return {
2351
+ topLevelType: topLevelType,
2352
+ nativeEvent: nativeEvent,
2353
+ targetInst: targetInst,
2354
+ ancestors: [],
2355
+ };
2356
+ }
2357
+
2358
+ function releaseTopLevelCallbackBookKeeping(instance) {
2359
+ instance.topLevelType = null;
2360
+ instance.nativeEvent = null;
2361
+ instance.targetInst = null;
2362
+ instance.ancestors.length = 0;
2363
+ if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
2364
+ callbackBookkeepingPool.push(instance);
2365
+ }
2366
+ }
2367
+
2368
+ function handleTopLevelImpl(bookKeeping) {
2369
+ var targetInst = bookKeeping.targetInst;
2370
+
2371
+ // Loop through the hierarchy, in case there's any nested components.
2372
+ // It's important that we build the array of ancestors before calling any
2373
+ // event handlers, because event handlers can modify the DOM, leading to
2374
+ // inconsistencies with ReactMount's node cache. See #1105.
2375
+ var ancestor = targetInst;
2376
+ do {
2377
+ if (!ancestor) {
2378
+ bookKeeping.ancestors.push(ancestor);
2379
+ break;
2380
+ }
2381
+ var root = findRootContainerNode(ancestor);
2382
+ if (!root) {
2383
+ break;
2384
+ }
2385
+ bookKeeping.ancestors.push(ancestor);
2386
+ ancestor = ReactDOMComponentTree_1.getClosestInstanceFromNode(root);
2387
+ } while (ancestor);
2388
+
2389
+ for (var i = 0; i < bookKeeping.ancestors.length; i++) {
2390
+ targetInst = bookKeeping.ancestors[i];
2391
+ ReactDOMEventListener._handleTopLevel(
2392
+ bookKeeping.topLevelType,
2393
+ targetInst,
2394
+ bookKeeping.nativeEvent,
2395
+ getEventTarget_1(bookKeeping.nativeEvent)
2396
+ );
2397
+ }
2398
+ }
2399
+
2400
+ var ReactDOMEventListener = {
2401
+ _enabled: true,
2402
+ _handleTopLevel: null,
2403
+
2404
+ setHandleTopLevel: function(handleTopLevel) {
2405
+ ReactDOMEventListener._handleTopLevel = handleTopLevel;
2406
+ },
2407
+
2408
+ setEnabled: function(enabled) {
2409
+ ReactDOMEventListener._enabled = !!enabled;
2410
+ },
2411
+
2412
+ isEnabled: function() {
2413
+ return ReactDOMEventListener._enabled;
2414
+ },
2415
+
2416
+ /**
2417
+ * Traps top-level events by using event bubbling.
2418
+ *
2419
+ * @param {string} topLevelType Record from `BrowserEventConstants`.
2420
+ * @param {string} handlerBaseName Event name (e.g. "click").
2421
+ * @param {object} element Element on which to attach listener.
2422
+ * @return {?object} An object with a remove function which will forcefully
2423
+ * remove the listener.
2424
+ * @internal
2425
+ */
2426
+ trapBubbledEvent: function(topLevelType, handlerBaseName, element) {
2427
+ if (!element) {
2428
+ return null;
2429
+ }
2430
+ return EventListener_1.listen(
2431
+ element,
2432
+ handlerBaseName,
2433
+ ReactDOMEventListener.dispatchEvent.bind(null, topLevelType)
2434
+ );
2435
+ },
2436
+
2437
+ /**
2438
+ * Traps a top-level event by using event capturing.
2439
+ *
2440
+ * @param {string} topLevelType Record from `BrowserEventConstants`.
2441
+ * @param {string} handlerBaseName Event name (e.g. "click").
2442
+ * @param {object} element Element on which to attach listener.
2443
+ * @return {?object} An object with a remove function which will forcefully
2444
+ * remove the listener.
2445
+ * @internal
2446
+ */
2447
+ trapCapturedEvent: function(topLevelType, handlerBaseName, element) {
2448
+ if (!element) {
2449
+ return null;
2450
+ }
2451
+ return EventListener_1.capture(
2452
+ element,
2453
+ handlerBaseName,
2454
+ ReactDOMEventListener.dispatchEvent.bind(null, topLevelType)
2455
+ );
2456
+ },
2457
+
2458
+ dispatchEvent: function(topLevelType, nativeEvent) {
2459
+ if (!ReactDOMEventListener._enabled) {
2460
+ return;
2461
+ }
2462
+
2463
+ var nativeEventTarget = getEventTarget_1(nativeEvent);
2464
+ var targetInst = ReactDOMComponentTree_1.getClosestInstanceFromNode(
2465
+ nativeEventTarget
2466
+ );
2467
+ if (
2468
+ targetInst !== null &&
2469
+ typeof targetInst.tag === 'number' &&
2470
+ !ReactFiberTreeReflection.isFiberMounted(targetInst)
2471
+ ) {
2472
+ // If we get an event (ex: img onload) before committing that
2473
+ // component's mount, ignore it for now (that is, treat it as if it was an
2474
+ // event on a non-React tree). We might also consider queueing events and
2475
+ // dispatching them after the mount.
2476
+ targetInst = null;
2477
+ }
2478
+
2479
+ var bookKeeping = getTopLevelCallbackBookKeeping(
2480
+ topLevelType,
2481
+ nativeEvent,
2482
+ targetInst
2483
+ );
2484
+
2485
+ try {
2486
+ // Event queue being processed in the same cycle allows
2487
+ // `preventDefault`.
2488
+ ReactGenericBatching_1.batchedUpdates(handleTopLevelImpl, bookKeeping);
2489
+ } finally {
2490
+ releaseTopLevelCallbackBookKeeping(bookKeeping);
2491
+ }
2492
+ },
2493
+ };
2494
+
2495
+ var ReactDOMEventListener_1 = ReactDOMEventListener;
2496
+
2497
+ /**
2498
+ * Accumulates items that must not be null or undefined into the first one. This
2499
+ * is used to conserve memory by avoiding array allocations, and thus sacrifices
2500
+ * API cleanness. Since `current` can be null before being passed in and not
2501
+ * null after this function, make sure to assign it back to `current`:
2502
+ *
2503
+ * `a = accumulateInto(a, b);`
2504
+ *
2505
+ * This API should be sparingly used. Try `accumulate` for something cleaner.
2506
+ *
2507
+ * @return {*|array<*>} An accumulation of items.
2508
+ */
2509
+
2510
+ function accumulateInto(current, next) {
2511
+ !(next != null)
2512
+ ? invariant_1(
2513
+ false,
2514
+ 'accumulateInto(...): Accumulated items must not be null or undefined.'
2515
+ )
2516
+ : void 0;
2517
+
2518
+ if (current == null) {
2519
+ return next;
2520
+ }
2521
+
2522
+ // Both are not empty. Warning: Never call x.concat(y) when you are not
2523
+ // certain that x is an Array (x could be a string with concat method).
2524
+ if (Array.isArray(current)) {
2525
+ if (Array.isArray(next)) {
2526
+ current.push.apply(current, next);
2527
+ return current;
2528
+ }
2529
+ current.push(next);
2530
+ return current;
2531
+ }
2532
+
2533
+ if (Array.isArray(next)) {
2534
+ // A bit too dangerous to mutate `next`.
2535
+ return [current].concat(next);
2536
+ }
2537
+
2538
+ return [current, next];
2539
+ }
2540
+
2541
+ var accumulateInto_1 = accumulateInto;
2542
+
2543
+ /**
2544
+ * Copyright 2013-present, Facebook, Inc.
2545
+ * All rights reserved.
2546
+ *
2547
+ * This source code is licensed under the BSD-style license found in the
2548
+ * LICENSE file in the root directory of this source tree. An additional grant
2549
+ * of patent rights can be found in the PATENTS file in the same directory.
2550
+ *
2551
+ * @providesModule forEachAccumulated
2552
+ *
2553
+ */
2554
+
2555
+ /**
2556
+ * @param {array} arr an "accumulation" of items which is either an Array or
2557
+ * a single item. Useful when paired with the `accumulate` module. This is a
2558
+ * simple utility that allows us to reason about a collection of items, but
2559
+ * handling the case when there is exactly one item (and we do not need to
2560
+ * allocate an array).
2561
+ * @param {function} cb Callback invoked with each element or a collection.
2562
+ * @param {?} [scope] Scope used as `this` in a callback.
2563
+ */
2564
+
2565
+ function forEachAccumulated(arr, cb, scope) {
2566
+ if (Array.isArray(arr)) {
2567
+ arr.forEach(cb, scope);
2568
+ } else if (arr) {
2569
+ cb.call(scope, arr);
2570
+ }
2571
+ }
2572
+
2573
+ var forEachAccumulated_1 = forEachAccumulated;
2574
+
2575
+ /**
2576
+ * Internal queue of events that have accumulated their dispatches and are
2577
+ * waiting to have their dispatches executed.
2578
+ */
2579
+ var eventQueue = null;
2580
+
2581
+ /**
2582
+ * Dispatches an event and releases it back into the pool, unless persistent.
2583
+ *
2584
+ * @param {?object} event Synthetic event to be dispatched.
2585
+ * @param {boolean} simulated If the event is simulated (changes exn behavior)
2586
+ * @private
2587
+ */
2588
+ var executeDispatchesAndRelease = function(event, simulated) {
2589
+ if (event) {
2590
+ EventPluginUtils_1.executeDispatchesInOrder(event, simulated);
2591
+
2592
+ if (!event.isPersistent()) {
2593
+ event.constructor.release(event);
2594
+ }
2595
+ }
2596
+ };
2597
+ var executeDispatchesAndReleaseSimulated = function(e) {
2598
+ return executeDispatchesAndRelease(e, true);
2599
+ };
2600
+ var executeDispatchesAndReleaseTopLevel = function(e) {
2601
+ return executeDispatchesAndRelease(e, false);
2602
+ };
2603
+
2604
+ function isInteractive(tag) {
2605
+ return (
2606
+ tag === 'button' ||
2607
+ tag === 'input' ||
2608
+ tag === 'select' ||
2609
+ tag === 'textarea'
2610
+ );
2611
+ }
2612
+
2613
+ function shouldPreventMouseEvent(name, type, props) {
2614
+ switch (name) {
2615
+ case 'onClick':
2616
+ case 'onClickCapture':
2617
+ case 'onDoubleClick':
2618
+ case 'onDoubleClickCapture':
2619
+ case 'onMouseDown':
2620
+ case 'onMouseDownCapture':
2621
+ case 'onMouseMove':
2622
+ case 'onMouseMoveCapture':
2623
+ case 'onMouseUp':
2624
+ case 'onMouseUpCapture':
2625
+ return !!(props.disabled && isInteractive(type));
2626
+ default:
2627
+ return false;
2628
+ }
2629
+ }
2630
+
2631
+ /**
2632
+ * This is a unified interface for event plugins to be installed and configured.
2633
+ *
2634
+ * Event plugins can implement the following properties:
2635
+ *
2636
+ * `extractEvents` {function(string, DOMEventTarget, string, object): *}
2637
+ * Required. When a top-level event is fired, this method is expected to
2638
+ * extract synthetic events that will in turn be queued and dispatched.
2639
+ *
2640
+ * `eventTypes` {object}
2641
+ * Optional, plugins that fire events must publish a mapping of registration
2642
+ * names that are used to register listeners. Values of this mapping must
2643
+ * be objects that contain `registrationName` or `phasedRegistrationNames`.
2644
+ *
2645
+ * `executeDispatch` {function(object, function, string)}
2646
+ * Optional, allows plugins to override how an event gets dispatched. By
2647
+ * default, the listener is simply invoked.
2648
+ *
2649
+ * Each plugin that is injected into `EventsPluginHub` is immediately operable.
2650
+ *
2651
+ * @public
2652
+ */
2653
+ var EventPluginHub = {
2654
+ /**
2655
+ * Methods for injecting dependencies.
2656
+ */
2657
+ injection: {
2658
+ /**
2659
+ * @param {array} InjectedEventPluginOrder
2660
+ * @public
2661
+ */
2662
+ injectEventPluginOrder: EventPluginRegistry_1.injectEventPluginOrder,
2663
+
2664
+ /**
2665
+ * @param {object} injectedNamesToPlugins Map from names to plugin modules.
2666
+ */
2667
+ injectEventPluginsByName: EventPluginRegistry_1.injectEventPluginsByName,
2668
+ },
2669
+
2670
+ /**
2671
+ * @param {object} inst The instance, which is the source of events.
2672
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
2673
+ * @return {?function} The stored callback.
2674
+ */
2675
+ getListener: function(inst, registrationName) {
2676
+ var listener;
2677
+
2678
+ // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
2679
+ // live here; needs to be moved to a better place soon
2680
+ if (typeof inst.tag === 'number') {
2681
+ var stateNode = inst.stateNode;
2682
+ if (!stateNode) {
2683
+ // Work in progress (ex: onload events in incremental mode).
2684
+ return null;
2685
+ }
2686
+ var props = EventPluginUtils_1.getFiberCurrentPropsFromNode(stateNode);
2687
+ if (!props) {
2688
+ // Work in progress.
2689
+ return null;
2690
+ }
2691
+ listener = props[registrationName];
2692
+ if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
2693
+ return null;
2694
+ }
2695
+ } else {
2696
+ var currentElement = inst._currentElement;
2697
+ if (
2698
+ typeof currentElement === 'string' ||
2699
+ typeof currentElement === 'number'
2700
+ ) {
2701
+ // Text node, let it bubble through.
2702
+ return null;
2703
+ }
2704
+ if (!inst._rootNodeID) {
2705
+ // If the instance is already unmounted, we have no listeners.
2706
+ return null;
2707
+ }
2708
+ var _props = currentElement.props;
2709
+ listener = _props[registrationName];
2710
+ if (
2711
+ shouldPreventMouseEvent(registrationName, currentElement.type, _props)
2712
+ ) {
2713
+ return null;
2714
+ }
2715
+ }
2716
+
2717
+ invariant_1(
2718
+ !listener || typeof listener === 'function',
2719
+ 'Expected `%s` listener to be a function, instead got a value of `%s` type.',
2720
+ registrationName,
2721
+ typeof listener
2722
+ );
2723
+ return listener;
2724
+ },
2725
+
2726
+ /**
2727
+ * Allows registered plugins an opportunity to extract events from top-level
2728
+ * native browser events.
2729
+ *
2730
+ * @return {*} An accumulation of synthetic events.
2731
+ * @internal
2732
+ */
2733
+ extractEvents: function(
2734
+ topLevelType,
2735
+ targetInst,
2736
+ nativeEvent,
2737
+ nativeEventTarget
2738
+ ) {
2739
+ var events;
2740
+ var plugins = EventPluginRegistry_1.plugins;
2741
+ for (var i = 0; i < plugins.length; i++) {
2742
+ // Not every plugin in the ordering may be loaded at runtime.
2743
+ var possiblePlugin = plugins[i];
2744
+ if (possiblePlugin) {
2745
+ var extractedEvents = possiblePlugin.extractEvents(
2746
+ topLevelType,
2747
+ targetInst,
2748
+ nativeEvent,
2749
+ nativeEventTarget
2750
+ );
2751
+ if (extractedEvents) {
2752
+ events = accumulateInto_1(events, extractedEvents);
2753
+ }
2754
+ }
2755
+ }
2756
+ return events;
2757
+ },
2758
+
2759
+ /**
2760
+ * Enqueues a synthetic event that should be dispatched when
2761
+ * `processEventQueue` is invoked.
2762
+ *
2763
+ * @param {*} events An accumulation of synthetic events.
2764
+ * @internal
2765
+ */
2766
+ enqueueEvents: function(events) {
2767
+ if (events) {
2768
+ eventQueue = accumulateInto_1(eventQueue, events);
2769
+ }
2770
+ },
2771
+
2772
+ /**
2773
+ * Dispatches all synthetic events on the event queue.
2774
+ *
2775
+ * @internal
2776
+ */
2777
+ processEventQueue: function(simulated) {
2778
+ // Set `eventQueue` to null before processing it so that we can tell if more
2779
+ // events get enqueued while processing.
2780
+ var processingEventQueue = eventQueue;
2781
+ eventQueue = null;
2782
+ if (simulated) {
2783
+ forEachAccumulated_1(
2784
+ processingEventQueue,
2785
+ executeDispatchesAndReleaseSimulated
2786
+ );
2787
+ } else {
2788
+ forEachAccumulated_1(
2789
+ processingEventQueue,
2790
+ executeDispatchesAndReleaseTopLevel
2791
+ );
2792
+ }
2793
+ !!eventQueue
2794
+ ? invariant_1(
2795
+ false,
2796
+ 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.'
2797
+ )
2798
+ : void 0;
2799
+ // This would be a good time to rethrow if any of the event handlers threw.
2800
+ ReactErrorUtils_1.rethrowCaughtError();
2801
+ },
2802
+ };
2803
+
2804
+ var EventPluginHub_1 = EventPluginHub;
2805
+
2806
+ function runEventQueueInBatch(events) {
2807
+ EventPluginHub_1.enqueueEvents(events);
2808
+ EventPluginHub_1.processEventQueue(false);
2809
+ }
2810
+
2811
+ var ReactEventEmitterMixin = {
2812
+ /**
2813
+ * Streams a fired top-level event to `EventPluginHub` where plugins have the
2814
+ * opportunity to create `ReactEvent`s to be dispatched.
2815
+ */
2816
+ handleTopLevel: function(
2817
+ topLevelType,
2818
+ targetInst,
2819
+ nativeEvent,
2820
+ nativeEventTarget
2821
+ ) {
2822
+ var events = EventPluginHub_1.extractEvents(
2823
+ topLevelType,
2824
+ targetInst,
2825
+ nativeEvent,
2826
+ nativeEventTarget
2827
+ );
2828
+ runEventQueueInBatch(events);
2829
+ },
2830
+ };
2831
+
2832
+ var ReactEventEmitterMixin_1 = ReactEventEmitterMixin;
2833
+
2834
+ var useHasFeature;
2835
+ if (ExecutionEnvironment_1.canUseDOM) {
2836
+ useHasFeature =
2837
+ document.implementation &&
2838
+ document.implementation.hasFeature &&
2839
+ // always returns true in newer browsers as per the standard.
2840
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
2841
+ document.implementation.hasFeature('', '') !== true;
2842
+ }
2843
+
2844
+ /**
2845
+ * Checks if an event is supported in the current execution environment.
2846
+ *
2847
+ * NOTE: This will not work correctly for non-generic events such as `change`,
2848
+ * `reset`, `load`, `error`, and `select`.
2849
+ *
2850
+ * Borrows from Modernizr.
2851
+ *
2852
+ * @param {string} eventNameSuffix Event name, e.g. "click".
2853
+ * @param {?boolean} capture Check if the capture phase is supported.
2854
+ * @return {boolean} True if the event is supported.
2855
+ * @internal
2856
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
2857
+ */
2858
+ function isEventSupported(eventNameSuffix, capture) {
2859
+ if (
2860
+ !ExecutionEnvironment_1.canUseDOM ||
2861
+ (capture && !('addEventListener' in document))
2862
+ ) {
2863
+ return false;
2864
+ }
2865
+
2866
+ var eventName = 'on' + eventNameSuffix;
2867
+ var isSupported = eventName in document;
2868
+
2869
+ if (!isSupported) {
2870
+ var element = document.createElement('div');
2871
+ element.setAttribute(eventName, 'return;');
2872
+ isSupported = typeof element[eventName] === 'function';
2873
+ }
2874
+
2875
+ if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
2876
+ // This is the only way to test support for the `wheel` event in IE9+.
2877
+ isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
2878
+ }
2879
+
2880
+ return isSupported;
2881
+ }
2882
+
2883
+ var isEventSupported_1 = isEventSupported;
2884
+
2885
+ /**
2886
+ * Generate a mapping of standard vendor prefixes using the defined style property and event name.
2887
+ *
2888
+ * @param {string} styleProp
2889
+ * @param {string} eventName
2890
+ * @returns {object}
2891
+ */
2892
+ function makePrefixMap(styleProp, eventName) {
2893
+ var prefixes = {};
2894
+
2895
+ prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
2896
+ prefixes['Webkit' + styleProp] = 'webkit' + eventName;
2897
+ prefixes['Moz' + styleProp] = 'moz' + eventName;
2898
+ prefixes['ms' + styleProp] = 'MS' + eventName;
2899
+ prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
2900
+
2901
+ return prefixes;
2902
+ }
2903
+
2904
+ /**
2905
+ * A list of event names to a configurable list of vendor prefixes.
2906
+ */
2907
+ var vendorPrefixes = {
2908
+ animationend: makePrefixMap('Animation', 'AnimationEnd'),
2909
+ animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
2910
+ animationstart: makePrefixMap('Animation', 'AnimationStart'),
2911
+ transitionend: makePrefixMap('Transition', 'TransitionEnd'),
2912
+ };
2913
+
2914
+ /**
2915
+ * Event names that have already been detected and prefixed (if applicable).
2916
+ */
2917
+ var prefixedEventNames = {};
2918
+
2919
+ /**
2920
+ * Element to check for prefixes on.
2921
+ */
2922
+ var style = {};
2923
+
2924
+ /**
2925
+ * Bootstrap if a DOM exists.
2926
+ */
2927
+ if (ExecutionEnvironment_1.canUseDOM) {
2928
+ style = document.createElement('div').style;
2929
+
2930
+ // On some platforms, in particular some releases of Android 4.x,
2931
+ // the un-prefixed "animation" and "transition" properties are defined on the
2932
+ // style object but the events that fire will still be prefixed, so we need
2933
+ // to check if the un-prefixed events are usable, and if not remove them from the map.
2934
+ if (!('AnimationEvent' in window)) {
2935
+ delete vendorPrefixes.animationend.animation;
2936
+ delete vendorPrefixes.animationiteration.animation;
2937
+ delete vendorPrefixes.animationstart.animation;
2938
+ }
2939
+
2940
+ // Same as above
2941
+ if (!('TransitionEvent' in window)) {
2942
+ delete vendorPrefixes.transitionend.transition;
2943
+ }
2944
+ }
2945
+
2946
+ /**
2947
+ * Attempts to determine the correct vendor prefixed event name.
2948
+ *
2949
+ * @param {string} eventName
2950
+ * @returns {string}
2951
+ */
2952
+ function getVendorPrefixedEventName(eventName) {
2953
+ if (prefixedEventNames[eventName]) {
2954
+ return prefixedEventNames[eventName];
2955
+ } else if (!vendorPrefixes[eventName]) {
2956
+ return eventName;
2957
+ }
2958
+
2959
+ var prefixMap = vendorPrefixes[eventName];
2960
+
2961
+ for (var styleProp in prefixMap) {
2962
+ if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
2963
+ return (prefixedEventNames[eventName] = prefixMap[styleProp]);
2964
+ }
2965
+ }
2966
+
2967
+ return '';
2968
+ }
2969
+
2970
+ var getVendorPrefixedEventName_1 = getVendorPrefixedEventName;
2971
+
2972
+ /**
2973
+ * Types of raw signals from the browser caught at the top level.
2974
+ *
2975
+ * For events like 'submit' which don't consistently bubble (which we
2976
+ * trap at a lower node than `document`), binding at `document` would
2977
+ * cause duplicate events so we don't include them here.
2978
+ */
2979
+ var topLevelTypes$1 = {
2980
+ topAbort: 'abort',
2981
+ topAnimationEnd: getVendorPrefixedEventName_1('animationend') ||
2982
+ 'animationend',
2983
+ topAnimationIteration: getVendorPrefixedEventName_1('animationiteration') ||
2984
+ 'animationiteration',
2985
+ topAnimationStart: getVendorPrefixedEventName_1('animationstart') ||
2986
+ 'animationstart',
2987
+ topBlur: 'blur',
2988
+ topCancel: 'cancel',
2989
+ topCanPlay: 'canplay',
2990
+ topCanPlayThrough: 'canplaythrough',
2991
+ topChange: 'change',
2992
+ topClick: 'click',
2993
+ topClose: 'close',
2994
+ topCompositionEnd: 'compositionend',
2995
+ topCompositionStart: 'compositionstart',
2996
+ topCompositionUpdate: 'compositionupdate',
2997
+ topContextMenu: 'contextmenu',
2998
+ topCopy: 'copy',
2999
+ topCut: 'cut',
3000
+ topDoubleClick: 'dblclick',
3001
+ topDrag: 'drag',
3002
+ topDragEnd: 'dragend',
3003
+ topDragEnter: 'dragenter',
3004
+ topDragExit: 'dragexit',
3005
+ topDragLeave: 'dragleave',
3006
+ topDragOver: 'dragover',
3007
+ topDragStart: 'dragstart',
3008
+ topDrop: 'drop',
3009
+ topDurationChange: 'durationchange',
3010
+ topEmptied: 'emptied',
3011
+ topEncrypted: 'encrypted',
3012
+ topEnded: 'ended',
3013
+ topError: 'error',
3014
+ topFocus: 'focus',
3015
+ topInput: 'input',
3016
+ topKeyDown: 'keydown',
3017
+ topKeyPress: 'keypress',
3018
+ topKeyUp: 'keyup',
3019
+ topLoadedData: 'loadeddata',
3020
+ topLoad: 'load',
3021
+ topLoadedMetadata: 'loadedmetadata',
3022
+ topLoadStart: 'loadstart',
3023
+ topMouseDown: 'mousedown',
3024
+ topMouseMove: 'mousemove',
3025
+ topMouseOut: 'mouseout',
3026
+ topMouseOver: 'mouseover',
3027
+ topMouseUp: 'mouseup',
3028
+ topPaste: 'paste',
3029
+ topPause: 'pause',
3030
+ topPlay: 'play',
3031
+ topPlaying: 'playing',
3032
+ topProgress: 'progress',
3033
+ topRateChange: 'ratechange',
3034
+ topScroll: 'scroll',
3035
+ topSeeked: 'seeked',
3036
+ topSeeking: 'seeking',
3037
+ topSelectionChange: 'selectionchange',
3038
+ topStalled: 'stalled',
3039
+ topSuspend: 'suspend',
3040
+ topTextInput: 'textInput',
3041
+ topTimeUpdate: 'timeupdate',
3042
+ topToggle: 'toggle',
3043
+ topTouchCancel: 'touchcancel',
3044
+ topTouchEnd: 'touchend',
3045
+ topTouchMove: 'touchmove',
3046
+ topTouchStart: 'touchstart',
3047
+ topTransitionEnd: getVendorPrefixedEventName_1('transitionend') ||
3048
+ 'transitionend',
3049
+ topVolumeChange: 'volumechange',
3050
+ topWaiting: 'waiting',
3051
+ topWheel: 'wheel',
3052
+ };
3053
+
3054
+ var BrowserEventConstants = {
3055
+ topLevelTypes: topLevelTypes$1,
3056
+ };
3057
+
3058
+ var BrowserEventConstants_1 = BrowserEventConstants;
3059
+
3060
+ var topLevelTypes = BrowserEventConstants_1.topLevelTypes;
3061
+
3062
+ /**
3063
+ * Summary of `ReactBrowserEventEmitter` event handling:
3064
+ *
3065
+ * - Top-level delegation is used to trap most native browser events. This
3066
+ * may only occur in the main thread and is the responsibility of
3067
+ * ReactDOMEventListener, which is injected and can therefore support
3068
+ * pluggable event sources. This is the only work that occurs in the main
3069
+ * thread.
3070
+ *
3071
+ * - We normalize and de-duplicate events to account for browser quirks. This
3072
+ * may be done in the worker thread.
3073
+ *
3074
+ * - Forward these native events (with the associated top-level type used to
3075
+ * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
3076
+ * to extract any synthetic events.
3077
+ *
3078
+ * - The `EventPluginHub` will then process each event by annotating them with
3079
+ * "dispatches", a sequence of listeners and IDs that care about that event.
3080
+ *
3081
+ * - The `EventPluginHub` then dispatches the events.
3082
+ *
3083
+ * Overview of React and the event system:
3084
+ *
3085
+ * +------------+ .
3086
+ * | DOM | .
3087
+ * +------------+ .
3088
+ * | .
3089
+ * v .
3090
+ * +------------+ .
3091
+ * | ReactEvent | .
3092
+ * | Listener | .
3093
+ * +------------+ . +-----------+
3094
+ * | . +--------+|SimpleEvent|
3095
+ * | . | |Plugin |
3096
+ * +-----|------+ . v +-----------+
3097
+ * | | | . +--------------+ +------------+
3098
+ * | +-----------.--->|EventPluginHub| | Event |
3099
+ * | | . | | +-----------+ | Propagators|
3100
+ * | ReactEvent | . | | |TapEvent | |------------|
3101
+ * | Emitter | . | |<---+|Plugin | |other plugin|
3102
+ * | | . | | +-----------+ | utilities |
3103
+ * | +-----------.--->| | +------------+
3104
+ * | | | . +--------------+
3105
+ * +-----|------+ . ^ +-----------+
3106
+ * | . | |Enter/Leave|
3107
+ * + . +-------+|Plugin |
3108
+ * +-------------+ . +-----------+
3109
+ * | application | .
3110
+ * |-------------| .
3111
+ * | | .
3112
+ * | | .
3113
+ * +-------------+ .
3114
+ * .
3115
+ * React Core . General Purpose Event Plugin System
3116
+ */
3117
+
3118
+ var alreadyListeningTo = {};
3119
+ var reactTopListenersCounter = 0;
3120
+
3121
+ /**
3122
+ * To ensure no conflicts with other potential React instances on the page
3123
+ */
3124
+ var topListenersIDKey = '_reactListenersID' + ('' + Math.random()).slice(2);
3125
+
3126
+ function getListeningForDocument(mountAt) {
3127
+ // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
3128
+ // directly.
3129
+ if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
3130
+ mountAt[topListenersIDKey] = reactTopListenersCounter++;
3131
+ alreadyListeningTo[mountAt[topListenersIDKey]] = {};
3132
+ }
3133
+ return alreadyListeningTo[mountAt[topListenersIDKey]];
3134
+ }
3135
+
3136
+ var ReactBrowserEventEmitter = index({}, ReactEventEmitterMixin_1, {
3137
+ /**
3138
+ * Sets whether or not any created callbacks should be enabled.
3139
+ *
3140
+ * @param {boolean} enabled True if callbacks should be enabled.
3141
+ */
3142
+ setEnabled: function(enabled) {
3143
+ if (ReactDOMEventListener_1) {
3144
+ ReactDOMEventListener_1.setEnabled(enabled);
3145
+ }
3146
+ },
3147
+
3148
+ /**
3149
+ * @return {boolean} True if callbacks are enabled.
3150
+ */
3151
+ isEnabled: function() {
3152
+ return !!(ReactDOMEventListener_1 && ReactDOMEventListener_1.isEnabled());
3153
+ },
3154
+
3155
+ /**
3156
+ * We listen for bubbled touch events on the document object.
3157
+ *
3158
+ * Firefox v8.01 (and possibly others) exhibited strange behavior when
3159
+ * mounting `onmousemove` events at some node that was not the document
3160
+ * element. The symptoms were that if your mouse is not moving over something
3161
+ * contained within that mount point (for example on the background) the
3162
+ * top-level listeners for `onmousemove` won't be called. However, if you
3163
+ * register the `mousemove` on the document object, then it will of course
3164
+ * catch all `mousemove`s. This along with iOS quirks, justifies restricting
3165
+ * top-level listeners to the document object only, at least for these
3166
+ * movement types of events and possibly all events.
3167
+ *
3168
+ * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
3169
+ *
3170
+ * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
3171
+ * they bubble to document.
3172
+ *
3173
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
3174
+ * @param {object} contentDocumentHandle Document which owns the container
3175
+ */
3176
+ listenTo: function(registrationName, contentDocumentHandle) {
3177
+ var mountAt = contentDocumentHandle;
3178
+ var isListening = getListeningForDocument(mountAt);
3179
+ var dependencies =
3180
+ EventPluginRegistry_1.registrationNameDependencies[registrationName];
3181
+
3182
+ for (var i = 0; i < dependencies.length; i++) {
3183
+ var dependency = dependencies[i];
3184
+ if (
3185
+ !(isListening.hasOwnProperty(dependency) && isListening[dependency])
3186
+ ) {
3187
+ if (dependency === 'topWheel') {
3188
+ if (isEventSupported_1('wheel')) {
3189
+ ReactDOMEventListener_1.trapBubbledEvent(
3190
+ 'topWheel',
3191
+ 'wheel',
3192
+ mountAt
3193
+ );
3194
+ } else if (isEventSupported_1('mousewheel')) {
3195
+ ReactDOMEventListener_1.trapBubbledEvent(
3196
+ 'topWheel',
3197
+ 'mousewheel',
3198
+ mountAt
3199
+ );
3200
+ } else {
3201
+ // Firefox needs to capture a different mouse scroll event.
3202
+ // @see http://www.quirksmode.org/dom/events/tests/scroll.html
3203
+ ReactDOMEventListener_1.trapBubbledEvent(
3204
+ 'topWheel',
3205
+ 'DOMMouseScroll',
3206
+ mountAt
3207
+ );
3208
+ }
3209
+ } else if (dependency === 'topScroll') {
3210
+ ReactDOMEventListener_1.trapCapturedEvent(
3211
+ 'topScroll',
3212
+ 'scroll',
3213
+ mountAt
3214
+ );
3215
+ } else if (dependency === 'topFocus' || dependency === 'topBlur') {
3216
+ ReactDOMEventListener_1.trapCapturedEvent(
3217
+ 'topFocus',
3218
+ 'focus',
3219
+ mountAt
3220
+ );
3221
+ ReactDOMEventListener_1.trapCapturedEvent(
3222
+ 'topBlur',
3223
+ 'blur',
3224
+ mountAt
3225
+ );
3226
+
3227
+ // to make sure blur and focus event listeners are only attached once
3228
+ isListening.topBlur = true;
3229
+ isListening.topFocus = true;
3230
+ } else if (dependency === 'topCancel') {
3231
+ if (isEventSupported_1('cancel', true)) {
3232
+ ReactDOMEventListener_1.trapCapturedEvent(
3233
+ 'topCancel',
3234
+ 'cancel',
3235
+ mountAt
3236
+ );
3237
+ }
3238
+ isListening.topCancel = true;
3239
+ } else if (dependency === 'topClose') {
3240
+ if (isEventSupported_1('close', true)) {
3241
+ ReactDOMEventListener_1.trapCapturedEvent(
3242
+ 'topClose',
3243
+ 'close',
3244
+ mountAt
3245
+ );
3246
+ }
3247
+ isListening.topClose = true;
3248
+ } else if (topLevelTypes.hasOwnProperty(dependency)) {
3249
+ ReactDOMEventListener_1.trapBubbledEvent(
3250
+ dependency,
3251
+ topLevelTypes[dependency],
3252
+ mountAt
3253
+ );
3254
+ }
3255
+
3256
+ isListening[dependency] = true;
3257
+ }
3258
+ }
3259
+ },
3260
+
3261
+ isListeningToAllDependencies: function(registrationName, mountAt) {
3262
+ var isListening = getListeningForDocument(mountAt);
3263
+ var dependencies =
3264
+ EventPluginRegistry_1.registrationNameDependencies[registrationName];
3265
+ for (var i = 0; i < dependencies.length; i++) {
3266
+ var dependency = dependencies[i];
3267
+ if (
3268
+ !(isListening.hasOwnProperty(dependency) && isListening[dependency])
3269
+ ) {
3270
+ return false;
3271
+ }
3272
+ }
3273
+ return true;
3274
+ },
3275
+
3276
+ trapBubbledEvent: function(topLevelType, handlerBaseName, handle) {
3277
+ return ReactDOMEventListener_1.trapBubbledEvent(
3278
+ topLevelType,
3279
+ handlerBaseName,
3280
+ handle
3281
+ );
3282
+ },
3283
+
3284
+ trapCapturedEvent: function(topLevelType, handlerBaseName, handle) {
3285
+ return ReactDOMEventListener_1.trapCapturedEvent(
3286
+ topLevelType,
3287
+ handlerBaseName,
3288
+ handle
3289
+ );
3290
+ },
3291
+ });
3292
+
3293
+ var ReactBrowserEventEmitter_1 = ReactBrowserEventEmitter;
3294
+
3295
+ /**
3296
+ * Copyright 2013-present, Facebook, Inc.
3297
+ * All rights reserved.
3298
+ *
3299
+ * This source code is licensed under the BSD-style license found in the
3300
+ * LICENSE file in the root directory of this source tree. An additional grant
3301
+ * of patent rights can be found in the PATENTS file in the same directory.
3302
+ *
3303
+ * @providesModule ReactFeatureFlags
3304
+ *
3305
+ */
3306
+
3307
+ var ReactFeatureFlags = {
3308
+ disableNewFiberFeatures: false,
3309
+ enableAsyncSubtreeAPI: true,
3310
+ };
3311
+
3312
+ var ReactFeatureFlags_1 = ReactFeatureFlags;
3313
+
3314
+ /**
3315
+ * Copyright 2013-present, Facebook, Inc.
3316
+ * All rights reserved.
3317
+ *
3318
+ * This source code is licensed under the BSD-style license found in the
3319
+ * LICENSE file in the root directory of this source tree. An additional grant
3320
+ * of patent rights can be found in the PATENTS file in the same directory.
3321
+ *
3322
+ * @providesModule ReactDOMFeatureFlags
3323
+ */
3324
+
3325
+ var ReactDOMFeatureFlags = {
3326
+ fiberAsyncScheduling: false,
3327
+ useFiber: true,
3328
+ };
3329
+
3330
+ var ReactDOMFeatureFlags_1 = ReactDOMFeatureFlags;
3331
+
3332
+ /**
3333
+ * Copyright 2013-present, Facebook, Inc.
3334
+ * All rights reserved.
3335
+ *
3336
+ * This source code is licensed under the BSD-style license found in the
3337
+ * LICENSE file in the root directory of this source tree. An additional grant
3338
+ * of patent rights can be found in the PATENTS file in the same directory.
3339
+ *
3340
+ * @providesModule CSSProperty
3341
+ */
3342
+
3343
+ /**
3344
+ * CSS properties which accept numbers but are not in units of "px".
3345
+ */
3346
+
3347
+ var isUnitlessNumber = {
3348
+ animationIterationCount: true,
3349
+ borderImageOutset: true,
3350
+ borderImageSlice: true,
3351
+ borderImageWidth: true,
3352
+ boxFlex: true,
3353
+ boxFlexGroup: true,
3354
+ boxOrdinalGroup: true,
3355
+ columnCount: true,
3356
+ columns: true,
3357
+ flex: true,
3358
+ flexGrow: true,
3359
+ flexPositive: true,
3360
+ flexShrink: true,
3361
+ flexNegative: true,
3362
+ flexOrder: true,
3363
+ gridRow: true,
3364
+ gridRowEnd: true,
3365
+ gridRowSpan: true,
3366
+ gridRowStart: true,
3367
+ gridColumn: true,
3368
+ gridColumnEnd: true,
3369
+ gridColumnSpan: true,
3370
+ gridColumnStart: true,
3371
+ fontWeight: true,
3372
+ lineClamp: true,
3373
+ lineHeight: true,
3374
+ opacity: true,
3375
+ order: true,
3376
+ orphans: true,
3377
+ tabSize: true,
3378
+ widows: true,
3379
+ zIndex: true,
3380
+ zoom: true,
3381
+
3382
+ // SVG-related properties
3383
+ fillOpacity: true,
3384
+ floodOpacity: true,
3385
+ stopOpacity: true,
3386
+ strokeDasharray: true,
3387
+ strokeDashoffset: true,
3388
+ strokeMiterlimit: true,
3389
+ strokeOpacity: true,
3390
+ strokeWidth: true,
3391
+ };
3392
+
3393
+ /**
3394
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
3395
+ * @param {string} key style name, eg: transitionDuration
3396
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
3397
+ * WebkitTransitionDuration
3398
+ */
3399
+ function prefixKey(prefix, key) {
3400
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
3401
+ }
3402
+
3403
+ /**
3404
+ * Support style names that may come passed in prefixed by adding permutations
3405
+ * of vendor prefixes.
3406
+ */
3407
+ var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
3408
+
3409
+ // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
3410
+ // infinite loop, because it iterates over the newly added props too.
3411
+ Object.keys(isUnitlessNumber).forEach(function(prop) {
3412
+ prefixes.forEach(function(prefix) {
3413
+ isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
3414
+ });
3415
+ });
3416
+
3417
+ /**
3418
+ * Most style properties can be unset by doing .style[prop] = '' but IE8
3419
+ * doesn't like doing that with shorthand properties so for the properties that
3420
+ * IE8 breaks on, which are listed here, we instead unset each of the
3421
+ * individual properties. See http://bugs.jquery.com/ticket/12385.
3422
+ * The 4-value 'clock' properties like margin, padding, border-width seem to
3423
+ * behave without any problems. Curiously, list-style works too without any
3424
+ * special prodding.
3425
+ */
3426
+ var shorthandPropertyExpansions = {
3427
+ background: {
3428
+ backgroundAttachment: true,
3429
+ backgroundColor: true,
3430
+ backgroundImage: true,
3431
+ backgroundPositionX: true,
3432
+ backgroundPositionY: true,
3433
+ backgroundRepeat: true,
3434
+ },
3435
+ backgroundPosition: {
3436
+ backgroundPositionX: true,
3437
+ backgroundPositionY: true,
3438
+ },
3439
+ border: {
3440
+ borderWidth: true,
3441
+ borderStyle: true,
3442
+ borderColor: true,
3443
+ },
3444
+ borderBottom: {
3445
+ borderBottomWidth: true,
3446
+ borderBottomStyle: true,
3447
+ borderBottomColor: true,
3448
+ },
3449
+ borderLeft: {
3450
+ borderLeftWidth: true,
3451
+ borderLeftStyle: true,
3452
+ borderLeftColor: true,
3453
+ },
3454
+ borderRight: {
3455
+ borderRightWidth: true,
3456
+ borderRightStyle: true,
3457
+ borderRightColor: true,
3458
+ },
3459
+ borderTop: {
3460
+ borderTopWidth: true,
3461
+ borderTopStyle: true,
3462
+ borderTopColor: true,
3463
+ },
3464
+ font: {
3465
+ fontStyle: true,
3466
+ fontVariant: true,
3467
+ fontWeight: true,
3468
+ fontSize: true,
3469
+ lineHeight: true,
3470
+ fontFamily: true,
3471
+ },
3472
+ outline: {
3473
+ outlineWidth: true,
3474
+ outlineStyle: true,
3475
+ outlineColor: true,
3476
+ },
3477
+ };
3478
+
3479
+ var CSSProperty = {
3480
+ isUnitlessNumber: isUnitlessNumber,
3481
+ shorthandPropertyExpansions: shorthandPropertyExpansions,
3482
+ };
3483
+
3484
+ var CSSProperty_1 = CSSProperty;
3485
+
3486
+ var isUnitlessNumber$1 = CSSProperty_1.isUnitlessNumber;
3487
+
3488
+ /**
3489
+ * Convert a value into the proper css writable value. The style name `name`
3490
+ * should be logical (no hyphens), as specified
3491
+ * in `CSSProperty.isUnitlessNumber`.
3492
+ *
3493
+ * @param {string} name CSS property name such as `topMargin`.
3494
+ * @param {*} value CSS property value such as `10px`.
3495
+ * @return {string} Normalized style value with dimensions applied.
3496
+ */
3497
+ function dangerousStyleValue(name, value, isCustomProperty) {
3498
+ // Note that we've removed escapeTextForBrowser() calls here since the
3499
+ // whole string will be escaped when the attribute is injected into
3500
+ // the markup. If you provide unsafe user data here they can inject
3501
+ // arbitrary CSS which may be problematic (I couldn't repro this):
3502
+ // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
3503
+ // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
3504
+ // This is not an XSS hole but instead a potential CSS injection issue
3505
+ // which has lead to a greater discussion about how we're going to
3506
+ // trust URLs moving forward. See #2115901
3507
+
3508
+ var isEmpty = value == null || typeof value === 'boolean' || value === '';
3509
+ if (isEmpty) {
3510
+ return '';
3511
+ }
3512
+
3513
+ if (
3514
+ !isCustomProperty &&
3515
+ typeof value === 'number' &&
3516
+ value !== 0 &&
3517
+ !(isUnitlessNumber$1.hasOwnProperty(name) && isUnitlessNumber$1[name])
3518
+ ) {
3519
+ return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
3520
+ }
3521
+
3522
+ return ('' + value).trim();
3523
+ }
3524
+
3525
+ var dangerousStyleValue_1 = dangerousStyleValue;
3526
+
3527
+ /**
3528
+ * Copyright (c) 2013-present, Facebook, Inc.
3529
+ * All rights reserved.
3530
+ *
3531
+ * This source code is licensed under the BSD-style license found in the
3532
+ * LICENSE file in the root directory of this source tree. An additional grant
3533
+ * of patent rights can be found in the PATENTS file in the same directory.
3534
+ *
3535
+ * @typechecks
3536
+ */
3537
+
3538
+ var _uppercasePattern = /([A-Z])/g;
3539
+
3540
+ /**
3541
+ * Hyphenates a camelcased string, for example:
3542
+ *
3543
+ * > hyphenate('backgroundColor')
3544
+ * < "background-color"
3545
+ *
3546
+ * For CSS style names, use `hyphenateStyleName` instead which works properly
3547
+ * with all vendor prefixes, including `ms`.
3548
+ *
3549
+ * @param {string} string
3550
+ * @return {string}
3551
+ */
3552
+ function hyphenate(string) {
3553
+ return string.replace(_uppercasePattern, '-$1').toLowerCase();
3554
+ }
3555
+
3556
+ var hyphenate_1 = hyphenate;
3557
+
3558
+ var msPattern = /^ms-/;
3559
+
3560
+ /**
3561
+ * Hyphenates a camelcased CSS property name, for example:
3562
+ *
3563
+ * > hyphenateStyleName('backgroundColor')
3564
+ * < "background-color"
3565
+ * > hyphenateStyleName('MozTransition')
3566
+ * < "-moz-transition"
3567
+ * > hyphenateStyleName('msTransition')
3568
+ * < "-ms-transition"
3569
+ *
3570
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
3571
+ * is converted to `-ms-`.
3572
+ *
3573
+ * @param {string} string
3574
+ * @return {string}
3575
+ */
3576
+ function hyphenateStyleName$1(string) {
3577
+ return hyphenate_1(string).replace(msPattern, '-ms-');
3578
+ }
3579
+
3580
+ var hyphenateStyleName_1 = hyphenateStyleName$1;
3581
+
3582
+ /**
3583
+ * Copyright (c) 2013-present, Facebook, Inc.
3584
+ * All rights reserved.
3585
+ *
3586
+ * This source code is licensed under the BSD-style license found in the
3587
+ * LICENSE file in the root directory of this source tree. An additional grant
3588
+ * of patent rights can be found in the PATENTS file in the same directory.
3589
+ *
3590
+ * @typechecks
3591
+ */
3592
+
3593
+ var _hyphenPattern = /-(.)/g;
3594
+
3595
+ /**
3596
+ * Camelcases a hyphenated string, for example:
3597
+ *
3598
+ * > camelize('background-color')
3599
+ * < "backgroundColor"
3600
+ *
3601
+ * @param {string} string
3602
+ * @return {string}
3603
+ */
3604
+ function camelize(string) {
3605
+ return string.replace(_hyphenPattern, function(_, character) {
3606
+ return character.toUpperCase();
3607
+ });
3608
+ }
3609
+
3610
+ var camelize_1 = camelize;
3611
+
3612
+ var msPattern$1 = /^-ms-/;
3613
+
3614
+ /**
3615
+ * Camelcases a hyphenated CSS property name, for example:
3616
+ *
3617
+ * > camelizeStyleName('background-color')
3618
+ * < "backgroundColor"
3619
+ * > camelizeStyleName('-moz-transition')
3620
+ * < "MozTransition"
3621
+ * > camelizeStyleName('-ms-transition')
3622
+ * < "msTransition"
3623
+ *
3624
+ * As Andi Smith suggests
3625
+ * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
3626
+ * is converted to lowercase `ms`.
3627
+ *
3628
+ * @param {string} string
3629
+ * @return {string}
3630
+ */
3631
+ function camelizeStyleName$1(string) {
3632
+ return camelize_1(string.replace(msPattern$1, 'ms-'));
3633
+ }
3634
+
3635
+ var camelizeStyleName_1 = camelizeStyleName$1;
3636
+
3637
+ /**
3638
+ * Copyright 2016-present, Facebook, Inc.
3639
+ * All rights reserved.
3640
+ *
3641
+ * This source code is licensed under the BSD-style license found in the
3642
+ * LICENSE file in the root directory of this source tree. An additional grant
3643
+ * of patent rights can be found in the PATENTS file in the same directory.
3644
+ *
3645
+ *
3646
+ * @providesModule describeComponentFrame
3647
+ */
3648
+
3649
+ var describeComponentFrame = function(name, source, ownerName) {
3650
+ return (
3651
+ '\n in ' +
3652
+ (name || 'Unknown') +
3653
+ (source
3654
+ ? ' (at ' +
3655
+ source.fileName.replace(/^.*[\\\/]/, '') +
3656
+ ':' +
3657
+ source.lineNumber +
3658
+ ')'
3659
+ : ownerName ? ' (created by ' + ownerName + ')' : '')
3660
+ );
3661
+ };
3662
+
3663
+ var IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent;
3664
+ var FunctionalComponent = ReactTypeOfWork.FunctionalComponent;
3665
+ var ClassComponent$1 = ReactTypeOfWork.ClassComponent;
3666
+ var HostComponent$2 = ReactTypeOfWork.HostComponent;
3667
+
3668
+ function describeFiber(fiber) {
3669
+ switch (fiber.tag) {
3670
+ case IndeterminateComponent:
3671
+ case FunctionalComponent:
3672
+ case ClassComponent$1:
3673
+ case HostComponent$2:
3674
+ var owner = fiber._debugOwner;
3675
+ var source = fiber._debugSource;
3676
+ var name = getComponentName_1(fiber);
3677
+ var ownerName = null;
3678
+ if (owner) {
3679
+ ownerName = getComponentName_1(owner);
3680
+ }
3681
+ return describeComponentFrame(name, source, ownerName);
3682
+ default:
3683
+ return '';
3684
+ }
3685
+ }
3686
+
3687
+ // This function can only be called with a work-in-progress fiber and
3688
+ // only during begin or complete phase. Do not call it under any other
3689
+ // circumstances.
3690
+ function getStackAddendumByWorkInProgressFiber$1(workInProgress) {
3691
+ var info = '';
3692
+ var node = workInProgress;
3693
+ do {
3694
+ info += describeFiber(node);
3695
+ // Otherwise this return pointer might point to the wrong tree:
3696
+ node = node['return'];
3697
+ } while (node);
3698
+ return info;
3699
+ }
3700
+
3701
+ var ReactFiberComponentTreeHook = {
3702
+ getStackAddendumByWorkInProgressFiber: getStackAddendumByWorkInProgressFiber$1,
3703
+ };
3704
+
3705
+ var ReactDebugCurrentFrame = ReactGlobalSharedState_1.ReactDebugCurrentFrame;
3706
+
3707
+ {
3708
+ var getComponentName$3 = getComponentName_1;
3709
+
3710
+ var _require2$2 = ReactFiberComponentTreeHook,
3711
+ getStackAddendumByWorkInProgressFiber =
3712
+ _require2$2.getStackAddendumByWorkInProgressFiber;
3713
+ }
3714
+
3715
+ function getCurrentFiberOwnerName$2() {
3716
+ {
3717
+ var fiber = ReactDebugCurrentFiber.current;
3718
+ if (fiber === null) {
3719
+ return null;
3720
+ }
3721
+ if (fiber._debugOwner != null) {
3722
+ return getComponentName$3(fiber._debugOwner);
3723
+ }
3724
+ }
3725
+ return null;
3726
+ }
3727
+
3728
+ function getCurrentFiberStackAddendum$1() {
3729
+ {
3730
+ var fiber = ReactDebugCurrentFiber.current;
3731
+ if (fiber === null) {
3732
+ return null;
3733
+ }
3734
+ // Safe because if current fiber exists, we are reconciling,
3735
+ // and it is guaranteed to be the work-in-progress version.
3736
+ return getStackAddendumByWorkInProgressFiber(fiber);
3737
+ }
3738
+ return null;
3739
+ }
3740
+
3741
+ function resetCurrentFiber() {
3742
+ ReactDebugCurrentFrame.getCurrentStack = null;
3743
+ ReactDebugCurrentFiber.current = null;
3744
+ ReactDebugCurrentFiber.phase = null;
3745
+ }
3746
+
3747
+ function setCurrentFiber(fiber, phase) {
3748
+ ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackAddendum$1;
3749
+ ReactDebugCurrentFiber.current = fiber;
3750
+ ReactDebugCurrentFiber.phase = phase;
3751
+ }
3752
+
3753
+ var ReactDebugCurrentFiber = {
3754
+ current: null,
3755
+ phase: null,
3756
+ resetCurrentFiber: resetCurrentFiber,
3757
+ setCurrentFiber: setCurrentFiber,
3758
+ getCurrentFiberOwnerName: getCurrentFiberOwnerName$2,
3759
+ getCurrentFiberStackAddendum: getCurrentFiberStackAddendum$1,
3760
+ };
3761
+
3762
+ var ReactDebugCurrentFiber_1 = ReactDebugCurrentFiber;
3763
+
3764
+ var warnValidStyle$1 = emptyFunction_1;
3765
+
3766
+ {
3767
+ var camelizeStyleName = camelizeStyleName_1;
3768
+ var getComponentName$2 = getComponentName_1;
3769
+ var warning$5 = warning_1;
3770
+
3771
+ var _require$3 = ReactDebugCurrentFiber_1,
3772
+ getCurrentFiberOwnerName$1 = _require$3.getCurrentFiberOwnerName;
3773
+
3774
+ // 'msTransform' is correct, but the other prefixes should be capitalized
3775
+
3776
+ var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
3777
+
3778
+ // style values shouldn't contain a semicolon
3779
+ var badStyleValueWithSemicolonPattern = /;\s*$/;
3780
+
3781
+ var warnedStyleNames = {};
3782
+ var warnedStyleValues = {};
3783
+ var warnedForNaNValue = false;
3784
+ var warnedForInfinityValue = false;
3785
+
3786
+ var warnHyphenatedStyleName = function(name, owner) {
3787
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
3788
+ return;
3789
+ }
3790
+
3791
+ warnedStyleNames[name] = true;
3792
+ warning$5(
3793
+ false,
3794
+ 'Unsupported style property %s. Did you mean %s?%s',
3795
+ name,
3796
+ camelizeStyleName(name),
3797
+ checkRenderMessage(owner)
3798
+ );
3799
+ };
3800
+
3801
+ var warnBadVendoredStyleName = function(name, owner) {
3802
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
3803
+ return;
3804
+ }
3805
+
3806
+ warnedStyleNames[name] = true;
3807
+ warning$5(
3808
+ false,
3809
+ 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s',
3810
+ name,
3811
+ name.charAt(0).toUpperCase() + name.slice(1),
3812
+ checkRenderMessage(owner)
3813
+ );
3814
+ };
3815
+
3816
+ var warnStyleValueWithSemicolon = function(name, value, owner) {
3817
+ if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
3818
+ return;
3819
+ }
3820
+
3821
+ warnedStyleValues[value] = true;
3822
+ warning$5(
3823
+ false,
3824
+ "Style property values shouldn't contain a semicolon.%s " +
3825
+ 'Try "%s: %s" instead.',
3826
+ checkRenderMessage(owner),
3827
+ name,
3828
+ value.replace(badStyleValueWithSemicolonPattern, '')
3829
+ );
3830
+ };
3831
+
3832
+ var warnStyleValueIsNaN = function(name, value, owner) {
3833
+ if (warnedForNaNValue) {
3834
+ return;
3835
+ }
3836
+
3837
+ warnedForNaNValue = true;
3838
+ warning$5(
3839
+ false,
3840
+ '`NaN` is an invalid value for the `%s` css style property.%s',
3841
+ name,
3842
+ checkRenderMessage(owner)
3843
+ );
3844
+ };
3845
+
3846
+ var warnStyleValueIsInfinity = function(name, value, owner) {
3847
+ if (warnedForInfinityValue) {
3848
+ return;
3849
+ }
3850
+
3851
+ warnedForInfinityValue = true;
3852
+ warning$5(
3853
+ false,
3854
+ '`Infinity` is an invalid value for the `%s` css style property.%s',
3855
+ name,
3856
+ checkRenderMessage(owner)
3857
+ );
3858
+ };
3859
+
3860
+ var checkRenderMessage = function(owner) {
3861
+ var ownerName;
3862
+ if (owner != null) {
3863
+ // Stack passes the owner manually all the way to CSSPropertyOperations.
3864
+ ownerName = getComponentName$2(owner);
3865
+ } else {
3866
+ // Fiber doesn't pass it but uses ReactDebugCurrentFiber to track it.
3867
+ // It is only enabled in development and tracks host components too.
3868
+ ownerName = getCurrentFiberOwnerName$1();
3869
+ // TODO: also report the stack.
3870
+ }
3871
+ if (ownerName) {
3872
+ return '\n\nCheck the render method of `' + ownerName + '`.';
3873
+ }
3874
+ return '';
3875
+ };
3876
+
3877
+ warnValidStyle$1 = function(name, value, component) {
3878
+ var owner;
3879
+ if (component) {
3880
+ // TODO: this only works with Stack. Seems like we need to add unit tests?
3881
+ owner = component._currentElement._owner;
3882
+ }
3883
+ if (name.indexOf('-') > -1) {
3884
+ warnHyphenatedStyleName(name, owner);
3885
+ } else if (badVendoredStyleNamePattern.test(name)) {
3886
+ warnBadVendoredStyleName(name, owner);
3887
+ } else if (badStyleValueWithSemicolonPattern.test(value)) {
3888
+ warnStyleValueWithSemicolon(name, value, owner);
3889
+ }
3890
+
3891
+ if (typeof value === 'number') {
3892
+ if (isNaN(value)) {
3893
+ warnStyleValueIsNaN(name, value, owner);
3894
+ } else if (!isFinite(value)) {
3895
+ warnStyleValueIsInfinity(name, value, owner);
3896
+ }
3897
+ }
3898
+ };
3899
+ }
3900
+
3901
+ var warnValidStyle_1 = warnValidStyle$1;
3902
+
3903
+ {
3904
+ var hyphenateStyleName = hyphenateStyleName_1;
3905
+ var warnValidStyle = warnValidStyle_1;
3906
+ }
3907
+
3908
+ var hasShorthandPropertyBug = false;
3909
+ if (ExecutionEnvironment_1.canUseDOM) {
3910
+ var tempStyle = document.createElement('div').style;
3911
+ try {
3912
+ // IE8 throws "Invalid argument." if resetting shorthand style properties.
3913
+ tempStyle.font = '';
3914
+ } catch (e) {
3915
+ hasShorthandPropertyBug = true;
3916
+ }
3917
+ }
3918
+
3919
+ /**
3920
+ * Operations for dealing with CSS properties.
3921
+ */
3922
+ var CSSPropertyOperations = {
3923
+ /**
3924
+ * This creates a string that is expected to be equivalent to the style
3925
+ * attribute generated by server-side rendering. It by-passes warnings and
3926
+ * security checks so it's not safe to use this value for anything other than
3927
+ * comparison. It is only used in DEV for SSR validation.
3928
+ */
3929
+ createDangerousStringForStyles: function(styles) {
3930
+ {
3931
+ var serialized = '';
3932
+ var delimiter = '';
3933
+ for (var styleName in styles) {
3934
+ if (!styles.hasOwnProperty(styleName)) {
3935
+ continue;
3936
+ }
3937
+ var styleValue = styles[styleName];
3938
+ if (styleValue != null) {
3939
+ var isCustomProperty = styleName.indexOf('--') === 0;
3940
+ serialized += delimiter + hyphenateStyleName(styleName) + ':';
3941
+ serialized += dangerousStyleValue_1(
3942
+ styleName,
3943
+ styleValue,
3944
+ isCustomProperty
3945
+ );
3946
+
3947
+ delimiter = ';';
3948
+ }
3949
+ }
3950
+ return serialized || null;
3951
+ }
3952
+ },
3953
+
3954
+ /**
3955
+ * Sets the value for multiple styles on a node. If a value is specified as
3956
+ * '' (empty string), the corresponding style property will be unset.
3957
+ *
3958
+ * @param {DOMElement} node
3959
+ * @param {object} styles
3960
+ * @param {ReactDOMComponent} component
3961
+ */
3962
+ setValueForStyles: function(node, styles, component) {
3963
+ var style = node.style;
3964
+ for (var styleName in styles) {
3965
+ if (!styles.hasOwnProperty(styleName)) {
3966
+ continue;
3967
+ }
3968
+ var isCustomProperty = styleName.indexOf('--') === 0;
3969
+ {
3970
+ if (!isCustomProperty) {
3971
+ warnValidStyle(styleName, styles[styleName], component);
3972
+ }
3973
+ }
3974
+ var styleValue = dangerousStyleValue_1(
3975
+ styleName,
3976
+ styles[styleName],
3977
+ isCustomProperty
3978
+ );
3979
+ if (styleName === 'float') {
3980
+ styleName = 'cssFloat';
3981
+ }
3982
+ if (isCustomProperty) {
3983
+ style.setProperty(styleName, styleValue);
3984
+ } else if (styleValue) {
3985
+ style[styleName] = styleValue;
3986
+ } else {
3987
+ var expansion =
3988
+ hasShorthandPropertyBug &&
3989
+ CSSProperty_1.shorthandPropertyExpansions[styleName];
3990
+ if (expansion) {
3991
+ // Shorthand property that IE8 won't like unsetting, so unset each
3992
+ // component to placate it
3993
+ for (var individualStyleName in expansion) {
3994
+ style[individualStyleName] = '';
3995
+ }
3996
+ } else {
3997
+ style[styleName] = '';
3998
+ }
3999
+ }
4000
+ }
4001
+ },
4002
+ };
4003
+
4004
+ var CSSPropertyOperations_1 = CSSPropertyOperations;
4005
+
4006
+ var ReactInvalidSetStateWarningHook = {};
4007
+
4008
+ {
4009
+ var warning$8 = warning_1;
4010
+ var processingChildContext = false;
4011
+
4012
+ var warnInvalidSetState = function() {
4013
+ warning$8(
4014
+ !processingChildContext,
4015
+ 'setState(...): Cannot call setState() inside getChildContext()'
4016
+ );
4017
+ };
4018
+
4019
+ ReactInvalidSetStateWarningHook = {
4020
+ onBeginProcessingChildContext: function() {
4021
+ processingChildContext = true;
4022
+ },
4023
+ onEndProcessingChildContext: function() {
4024
+ processingChildContext = false;
4025
+ },
4026
+ onSetState: function() {
4027
+ warnInvalidSetState();
4028
+ },
4029
+ };
4030
+ }
4031
+
4032
+ var ReactInvalidSetStateWarningHook_1 = ReactInvalidSetStateWarningHook;
4033
+
4034
+ /**
4035
+ * Copyright 2016-present, Facebook, Inc.
4036
+ * All rights reserved.
4037
+ *
4038
+ * This source code is licensed under the BSD-style license found in the
4039
+ * LICENSE file in the root directory of this source tree. An additional grant
4040
+ * of patent rights can be found in the PATENTS file in the same directory.
4041
+ *
4042
+ * @providesModule ReactHostOperationHistoryHook
4043
+ *
4044
+ */
4045
+
4046
+ // Trust the developer to only use this with a true check
4047
+ var ReactHostOperationHistoryHook = null;
4048
+
4049
+ {
4050
+ var history = [];
4051
+
4052
+ ReactHostOperationHistoryHook = {
4053
+ onHostOperation: function(operation) {
4054
+ history.push(operation);
4055
+ },
4056
+ clearHistory: function() {
4057
+ if (ReactHostOperationHistoryHook._preventClearing) {
4058
+ // Should only be used for tests.
4059
+ return;
4060
+ }
4061
+
4062
+ history = [];
4063
+ },
4064
+ getHistory: function() {
4065
+ return history;
4066
+ },
4067
+ };
4068
+ }
4069
+
4070
+ var ReactHostOperationHistoryHook_1 = ReactHostOperationHistoryHook;
4071
+
4072
+ var performance$1;
4073
+
4074
+ if (ExecutionEnvironment_1.canUseDOM) {
4075
+ performance$1 =
4076
+ window.performance || window.msPerformance || window.webkitPerformance;
4077
+ }
4078
+
4079
+ var performance_1 = performance$1 || {};
4080
+
4081
+ /**
4082
+ * Copyright (c) 2013-present, Facebook, Inc.
4083
+ * All rights reserved.
4084
+ *
4085
+ * This source code is licensed under the BSD-style license found in the
4086
+ * LICENSE file in the root directory of this source tree. An additional grant
4087
+ * of patent rights can be found in the PATENTS file in the same directory.
4088
+ *
4089
+ * @typechecks
4090
+ */
4091
+
4092
+ var performanceNow;
4093
+
4094
+ /**
4095
+ * Detect if we can use `window.performance.now()` and gracefully fallback to
4096
+ * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
4097
+ * because of Facebook's testing infrastructure.
4098
+ */
4099
+ if (performance_1.now) {
4100
+ performanceNow = function performanceNow() {
4101
+ return performance_1.now();
4102
+ };
4103
+ } else {
4104
+ performanceNow = function performanceNow() {
4105
+ return Date.now();
4106
+ };
4107
+ }
4108
+
4109
+ var performanceNow_1 = performanceNow;
4110
+
4111
+ var ReactComponentTreeHook = ReactGlobalSharedState_1.ReactComponentTreeHook;
4112
+
4113
+ {
4114
+ var warning$7 = warning_1;
4115
+ }
4116
+
4117
+ // Trust the developer to only use this with a true check
4118
+ var ReactDebugTool$1 = null;
4119
+
4120
+ {
4121
+ var hooks = [];
4122
+ var didHookThrowForEvent = {};
4123
+
4124
+ var callHook = function(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
4125
+ try {
4126
+ fn.call(context, arg1, arg2, arg3, arg4, arg5);
4127
+ } catch (e) {
4128
+ warning$7(
4129
+ didHookThrowForEvent[event],
4130
+ 'Exception thrown by hook while handling %s: %s',
4131
+ event,
4132
+ e + '\n' + e.stack
4133
+ );
4134
+ didHookThrowForEvent[event] = true;
4135
+ }
4136
+ };
4137
+
4138
+ var emitEvent = function(event, arg1, arg2, arg3, arg4, arg5) {
4139
+ for (var i = 0; i < hooks.length; i++) {
4140
+ var hook = hooks[i];
4141
+ var fn = hook[event];
4142
+ if (fn) {
4143
+ callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
4144
+ }
4145
+ }
4146
+ };
4147
+
4148
+ var isProfiling = false;
4149
+ var flushHistory = [];
4150
+ var lifeCycleTimerStack = [];
4151
+ var currentFlushNesting = 0;
4152
+ var currentFlushMeasurements = [];
4153
+ var currentFlushStartTime = 0;
4154
+ var currentTimerDebugID = null;
4155
+ var currentTimerStartTime = 0;
4156
+ var currentTimerNestedFlushDuration = 0;
4157
+ var currentTimerType = null;
4158
+
4159
+ var lifeCycleTimerHasWarned = false;
4160
+
4161
+ var clearHistory = function() {
4162
+ ReactComponentTreeHook.purgeUnmountedComponents();
4163
+ ReactHostOperationHistoryHook_1.clearHistory();
4164
+ };
4165
+
4166
+ var getTreeSnapshot = function(registeredIDs) {
4167
+ return registeredIDs.reduce(function(tree, id) {
4168
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
4169
+ var parentID = ReactComponentTreeHook.getParentID(id);
4170
+ tree[id] = {
4171
+ displayName: ReactComponentTreeHook.getDisplayName(id),
4172
+ text: ReactComponentTreeHook.getText(id),
4173
+ updateCount: ReactComponentTreeHook.getUpdateCount(id),
4174
+ childIDs: ReactComponentTreeHook.getChildIDs(id),
4175
+ // Text nodes don't have owners but this is close enough.
4176
+ ownerID: ownerID ||
4177
+ (parentID && ReactComponentTreeHook.getOwnerID(parentID)) ||
4178
+ 0,
4179
+ parentID: parentID,
4180
+ };
4181
+ return tree;
4182
+ }, {});
4183
+ };
4184
+
4185
+ var resetMeasurements = function() {
4186
+ var previousStartTime = currentFlushStartTime;
4187
+ var previousMeasurements = currentFlushMeasurements;
4188
+ var previousOperations = ReactHostOperationHistoryHook_1.getHistory();
4189
+
4190
+ if (currentFlushNesting === 0) {
4191
+ currentFlushStartTime = 0;
4192
+ currentFlushMeasurements = [];
4193
+ clearHistory();
4194
+ return;
4195
+ }
4196
+
4197
+ if (previousMeasurements.length || previousOperations.length) {
4198
+ var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
4199
+ flushHistory.push({
4200
+ duration: performanceNow_1() - previousStartTime,
4201
+ measurements: previousMeasurements || [],
4202
+ operations: previousOperations || [],
4203
+ treeSnapshot: getTreeSnapshot(registeredIDs),
4204
+ });
4205
+ }
4206
+
4207
+ clearHistory();
4208
+ currentFlushStartTime = performanceNow_1();
4209
+ currentFlushMeasurements = [];
4210
+ };
4211
+
4212
+ var checkDebugID = function(debugID) {
4213
+ var allowRoot = arguments.length > 1 && arguments[1] !== undefined
4214
+ ? arguments[1]
4215
+ : false;
4216
+
4217
+ if (allowRoot && debugID === 0) {
4218
+ return;
4219
+ }
4220
+ if (!debugID) {
4221
+ warning$7(false, 'ReactDebugTool: debugID may not be empty.');
4222
+ }
4223
+ };
4224
+
4225
+ var beginLifeCycleTimer = function(debugID, timerType) {
4226
+ if (currentFlushNesting === 0) {
4227
+ return;
4228
+ }
4229
+ if (currentTimerType && !lifeCycleTimerHasWarned) {
4230
+ warning$7(
4231
+ false,
4232
+ 'There is an internal error in the React performance measurement code.' +
4233
+ '\n\nDid not expect %s timer to start while %s timer is still in ' +
4234
+ 'progress for %s instance.',
4235
+ timerType,
4236
+ currentTimerType || 'no',
4237
+ debugID === currentTimerDebugID ? 'the same' : 'another'
4238
+ );
4239
+ lifeCycleTimerHasWarned = true;
4240
+ }
4241
+ currentTimerStartTime = performanceNow_1();
4242
+ currentTimerNestedFlushDuration = 0;
4243
+ currentTimerDebugID = debugID;
4244
+ currentTimerType = timerType;
4245
+ };
4246
+
4247
+ var endLifeCycleTimer = function(debugID, timerType) {
4248
+ if (currentFlushNesting === 0) {
4249
+ return;
4250
+ }
4251
+ if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
4252
+ warning$7(
4253
+ false,
4254
+ 'There is an internal error in the React performance measurement code. ' +
4255
+ 'We did not expect %s timer to stop while %s timer is still in ' +
4256
+ 'progress for %s instance. Please report this as a bug in React.',
4257
+ timerType,
4258
+ currentTimerType || 'no',
4259
+ debugID === currentTimerDebugID ? 'the same' : 'another'
4260
+ );
4261
+ lifeCycleTimerHasWarned = true;
4262
+ }
4263
+ if (isProfiling) {
4264
+ currentFlushMeasurements.push({
4265
+ timerType: timerType,
4266
+ instanceID: debugID,
4267
+ duration: performanceNow_1() -
4268
+ currentTimerStartTime -
4269
+ currentTimerNestedFlushDuration,
4270
+ });
4271
+ }
4272
+ currentTimerStartTime = 0;
4273
+ currentTimerNestedFlushDuration = 0;
4274
+ currentTimerDebugID = null;
4275
+ currentTimerType = null;
4276
+ };
4277
+
4278
+ var pauseCurrentLifeCycleTimer = function() {
4279
+ var currentTimer = {
4280
+ startTime: currentTimerStartTime,
4281
+ nestedFlushStartTime: performanceNow_1(),
4282
+ debugID: currentTimerDebugID,
4283
+ timerType: currentTimerType,
4284
+ };
4285
+ lifeCycleTimerStack.push(currentTimer);
4286
+ currentTimerStartTime = 0;
4287
+ currentTimerNestedFlushDuration = 0;
4288
+ currentTimerDebugID = null;
4289
+ currentTimerType = null;
4290
+ };
4291
+
4292
+ var resumeCurrentLifeCycleTimer = function() {
4293
+ var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
4294
+ startTime = _lifeCycleTimerStack$.startTime,
4295
+ nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
4296
+ debugID = _lifeCycleTimerStack$.debugID,
4297
+ timerType = _lifeCycleTimerStack$.timerType;
4298
+
4299
+ var nestedFlushDuration = performanceNow_1() - nestedFlushStartTime;
4300
+ currentTimerStartTime = startTime;
4301
+ currentTimerNestedFlushDuration += nestedFlushDuration;
4302
+ currentTimerDebugID = debugID;
4303
+ currentTimerType = timerType;
4304
+ };
4305
+
4306
+ var lastMarkTimeStamp = 0;
4307
+ var canUsePerformanceMeasure =
4308
+ typeof performance !== 'undefined' &&
4309
+ typeof performance.mark === 'function' &&
4310
+ typeof performance.clearMarks === 'function' &&
4311
+ typeof performance.measure === 'function' &&
4312
+ typeof performance.clearMeasures === 'function';
4313
+
4314
+ var shouldMark = function(debugID) {
4315
+ if (!isProfiling || !canUsePerformanceMeasure) {
4316
+ return false;
4317
+ }
4318
+ var element = ReactComponentTreeHook.getElement(debugID);
4319
+ if (element == null || typeof element !== 'object') {
4320
+ return false;
4321
+ }
4322
+ var isHostElement = typeof element.type === 'string';
4323
+ if (isHostElement) {
4324
+ return false;
4325
+ }
4326
+ return true;
4327
+ };
4328
+
4329
+ var markBegin = function(debugID, markType) {
4330
+ if (!shouldMark(debugID)) {
4331
+ return;
4332
+ }
4333
+
4334
+ var markName = debugID + '::' + markType;
4335
+ lastMarkTimeStamp = performanceNow_1();
4336
+ performance.mark(markName);
4337
+ };
4338
+
4339
+ var markEnd = function(debugID, markType) {
4340
+ if (!shouldMark(debugID)) {
4341
+ return;
4342
+ }
4343
+
4344
+ var markName = debugID + '::' + markType;
4345
+ var displayName =
4346
+ ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
4347
+
4348
+ // Chrome has an issue of dropping markers recorded too fast:
4349
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=640652
4350
+ // To work around this, we will not report very small measurements.
4351
+ // I determined the magic number by tweaking it back and forth.
4352
+ // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe.
4353
+ // When the bug is fixed, we can `measure()` unconditionally if we want to.
4354
+ var timeStamp = performanceNow_1();
4355
+ if (timeStamp - lastMarkTimeStamp > 0.1) {
4356
+ var measurementName = displayName + ' [' + markType + ']';
4357
+ performance.measure(measurementName, markName);
4358
+ }
4359
+
4360
+ performance.clearMarks(markName);
4361
+ if (measurementName) {
4362
+ performance.clearMeasures(measurementName);
4363
+ }
4364
+ };
4365
+
4366
+ ReactDebugTool$1 = {
4367
+ addHook: function(hook) {
4368
+ hooks.push(hook);
4369
+ },
4370
+ removeHook: function(hook) {
4371
+ for (var i = 0; i < hooks.length; i++) {
4372
+ if (hooks[i] === hook) {
4373
+ hooks.splice(i, 1);
4374
+ i--;
4375
+ }
4376
+ }
4377
+ },
4378
+ isProfiling: function() {
4379
+ return isProfiling;
4380
+ },
4381
+ beginProfiling: function() {
4382
+ if (isProfiling) {
4383
+ return;
4384
+ }
4385
+
4386
+ isProfiling = true;
4387
+ flushHistory.length = 0;
4388
+ resetMeasurements();
4389
+ ReactDebugTool$1.addHook(ReactHostOperationHistoryHook_1);
4390
+ },
4391
+ endProfiling: function() {
4392
+ if (!isProfiling) {
4393
+ return;
4394
+ }
4395
+
4396
+ isProfiling = false;
4397
+ resetMeasurements();
4398
+ ReactDebugTool$1.removeHook(ReactHostOperationHistoryHook_1);
4399
+ },
4400
+ getFlushHistory: function() {
4401
+ return flushHistory;
4402
+ },
4403
+ onBeginFlush: function() {
4404
+ currentFlushNesting++;
4405
+ resetMeasurements();
4406
+ pauseCurrentLifeCycleTimer();
4407
+ emitEvent('onBeginFlush');
4408
+ },
4409
+ onEndFlush: function() {
4410
+ resetMeasurements();
4411
+ currentFlushNesting--;
4412
+ resumeCurrentLifeCycleTimer();
4413
+ emitEvent('onEndFlush');
4414
+ },
4415
+ onBeginLifeCycleTimer: function(debugID, timerType) {
4416
+ checkDebugID(debugID);
4417
+ emitEvent('onBeginLifeCycleTimer', debugID, timerType);
4418
+ markBegin(debugID, timerType);
4419
+ beginLifeCycleTimer(debugID, timerType);
4420
+ },
4421
+ onEndLifeCycleTimer: function(debugID, timerType) {
4422
+ checkDebugID(debugID);
4423
+ endLifeCycleTimer(debugID, timerType);
4424
+ markEnd(debugID, timerType);
4425
+ emitEvent('onEndLifeCycleTimer', debugID, timerType);
4426
+ },
4427
+ onBeginProcessingChildContext: function() {
4428
+ emitEvent('onBeginProcessingChildContext');
4429
+ },
4430
+ onEndProcessingChildContext: function() {
4431
+ emitEvent('onEndProcessingChildContext');
4432
+ },
4433
+ onHostOperation: function(operation) {
4434
+ checkDebugID(operation.instanceID);
4435
+ emitEvent('onHostOperation', operation);
4436
+ },
4437
+ onSetState: function() {
4438
+ emitEvent('onSetState');
4439
+ },
4440
+ onSetChildren: function(debugID, childDebugIDs) {
4441
+ checkDebugID(debugID);
4442
+ childDebugIDs.forEach(checkDebugID);
4443
+ emitEvent('onSetChildren', debugID, childDebugIDs);
4444
+ },
4445
+ onBeforeMountComponent: function(debugID, element, parentDebugID) {
4446
+ checkDebugID(debugID);
4447
+ checkDebugID(parentDebugID, true);
4448
+ emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
4449
+ markBegin(debugID, 'mount');
4450
+ },
4451
+ onMountComponent: function(debugID) {
4452
+ checkDebugID(debugID);
4453
+ markEnd(debugID, 'mount');
4454
+ emitEvent('onMountComponent', debugID);
4455
+ },
4456
+ onBeforeUpdateComponent: function(debugID, element) {
4457
+ checkDebugID(debugID);
4458
+ emitEvent('onBeforeUpdateComponent', debugID, element);
4459
+ markBegin(debugID, 'update');
4460
+ },
4461
+ onUpdateComponent: function(debugID) {
4462
+ checkDebugID(debugID);
4463
+ markEnd(debugID, 'update');
4464
+ emitEvent('onUpdateComponent', debugID);
4465
+ },
4466
+ onBeforeUnmountComponent: function(debugID) {
4467
+ checkDebugID(debugID);
4468
+ emitEvent('onBeforeUnmountComponent', debugID);
4469
+ markBegin(debugID, 'unmount');
4470
+ },
4471
+ onUnmountComponent: function(debugID) {
4472
+ checkDebugID(debugID);
4473
+ markEnd(debugID, 'unmount');
4474
+ emitEvent('onUnmountComponent', debugID);
4475
+ },
4476
+ onTestEvent: function() {
4477
+ emitEvent('onTestEvent');
4478
+ },
4479
+ };
4480
+
4481
+ ReactDebugTool$1.addHook(ReactInvalidSetStateWarningHook_1);
4482
+ ReactDebugTool$1.addHook(ReactComponentTreeHook);
4483
+ var url = (ExecutionEnvironment_1.canUseDOM && window.location.href) || '';
4484
+ if (/[?&]react_perf\b/.test(url)) {
4485
+ ReactDebugTool$1.beginProfiling();
4486
+ }
4487
+ }
4488
+
4489
+ var ReactDebugTool_1 = ReactDebugTool$1;
4490
+
4491
+ // Trust the developer to only use ReactInstrumentation with a true check
4492
+
4493
+ var debugTool = null;
4494
+
4495
+ {
4496
+ var ReactDebugTool = ReactDebugTool_1;
4497
+ debugTool = ReactDebugTool;
4498
+ }
4499
+
4500
+ var ReactInstrumentation = {debugTool: debugTool};
4501
+
4502
+ {
4503
+ var warning$6 = warning_1;
4504
+ }
4505
+
4506
+ // isAttributeNameSafe() is currently duplicated in DOMMarkupOperations.
4507
+ // TODO: Find a better place for this.
4508
+ var VALID_ATTRIBUTE_NAME_REGEX = new RegExp(
4509
+ '^[' +
4510
+ DOMProperty_1.ATTRIBUTE_NAME_START_CHAR +
4511
+ '][' +
4512
+ DOMProperty_1.ATTRIBUTE_NAME_CHAR +
4513
+ ']*$'
4514
+ );
4515
+ var illegalAttributeNameCache = {};
4516
+ var validatedAttributeNameCache = {};
4517
+ function isAttributeNameSafe(attributeName) {
4518
+ if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
4519
+ return true;
4520
+ }
4521
+ if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
4522
+ return false;
4523
+ }
4524
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
4525
+ validatedAttributeNameCache[attributeName] = true;
4526
+ return true;
4527
+ }
4528
+ illegalAttributeNameCache[attributeName] = true;
4529
+ {
4530
+ warning$6(false, 'Invalid attribute name: `%s`', attributeName);
4531
+ }
4532
+ return false;
4533
+ }
4534
+
4535
+ // shouldIgnoreValue() is currently duplicated in DOMMarkupOperations.
4536
+ // TODO: Find a better place for this.
4537
+ function shouldIgnoreValue(propertyInfo, value) {
4538
+ return (
4539
+ value == null ||
4540
+ (propertyInfo.hasBooleanValue && !value) ||
4541
+ (propertyInfo.hasNumericValue && isNaN(value)) ||
4542
+ (propertyInfo.hasPositiveNumericValue && value < 1) ||
4543
+ (propertyInfo.hasOverloadedBooleanValue && value === false)
4544
+ );
4545
+ }
4546
+
4547
+ /**
4548
+ * Operations for dealing with DOM properties.
4549
+ */
4550
+ var DOMPropertyOperations = {
4551
+ setAttributeForID: function(node, id) {
4552
+ node.setAttribute(DOMProperty_1.ID_ATTRIBUTE_NAME, id);
4553
+ },
4554
+
4555
+ setAttributeForRoot: function(node) {
4556
+ node.setAttribute(DOMProperty_1.ROOT_ATTRIBUTE_NAME, '');
4557
+ },
4558
+
4559
+ /**
4560
+ * Get the value for a property on a node. Only used in DEV for SSR validation.
4561
+ * The "expected" argument is used as a hint of what the expected value is.
4562
+ * Some properties have multiple equivalent values.
4563
+ */
4564
+ getValueForProperty: function(node, name, expected) {
4565
+ {
4566
+ var propertyInfo = DOMProperty_1.getPropertyInfo(name);
4567
+ if (propertyInfo) {
4568
+ var mutationMethod = propertyInfo.mutationMethod;
4569
+ if (mutationMethod || propertyInfo.mustUseProperty) {
4570
+ return node[propertyInfo.propertyName];
4571
+ } else {
4572
+ var attributeName = propertyInfo.attributeName;
4573
+
4574
+ var stringValue = null;
4575
+
4576
+ if (propertyInfo.hasOverloadedBooleanValue) {
4577
+ if (node.hasAttribute(attributeName)) {
4578
+ var value = node.getAttribute(attributeName);
4579
+ if (value === '') {
4580
+ return true;
4581
+ }
4582
+ if (shouldIgnoreValue(propertyInfo, expected)) {
4583
+ return value;
4584
+ }
4585
+ if (value === '' + expected) {
4586
+ return expected;
4587
+ }
4588
+ return value;
4589
+ }
4590
+ } else if (node.hasAttribute(attributeName)) {
4591
+ if (shouldIgnoreValue(propertyInfo, expected)) {
4592
+ // We had an attribute but shouldn't have had one, so read it
4593
+ // for the error message.
4594
+ return node.getAttribute(attributeName);
4595
+ }
4596
+ if (propertyInfo.hasBooleanValue) {
4597
+ // If this was a boolean, it doesn't matter what the value is
4598
+ // the fact that we have it is the same as the expected.
4599
+ return expected;
4600
+ }
4601
+ // Even if this property uses a namespace we use getAttribute
4602
+ // because we assume its namespaced name is the same as our config.
4603
+ // To use getAttributeNS we need the local name which we don't have
4604
+ // in our config atm.
4605
+ stringValue = node.getAttribute(attributeName);
4606
+ }
4607
+
4608
+ if (shouldIgnoreValue(propertyInfo, expected)) {
4609
+ return stringValue === null ? expected : stringValue;
4610
+ } else if (stringValue === '' + expected) {
4611
+ return expected;
4612
+ } else {
4613
+ return stringValue;
4614
+ }
4615
+ }
4616
+ }
4617
+ }
4618
+ },
4619
+
4620
+ /**
4621
+ * Get the value for a attribute on a node. Only used in DEV for SSR validation.
4622
+ * The third argument is used as a hint of what the expected value is. Some
4623
+ * attributes have multiple equivalent values.
4624
+ */
4625
+ getValueForAttribute: function(node, name, expected) {
4626
+ {
4627
+ if (!isAttributeNameSafe(name)) {
4628
+ return;
4629
+ }
4630
+ if (!node.hasAttribute(name)) {
4631
+ return expected === undefined ? undefined : null;
4632
+ }
4633
+ var value = node.getAttribute(name);
4634
+ if (value === '' + expected) {
4635
+ return expected;
4636
+ }
4637
+ return value;
4638
+ }
4639
+ },
4640
+
4641
+ /**
4642
+ * Sets the value for a property on a node.
4643
+ *
4644
+ * @param {DOMElement} node
4645
+ * @param {string} name
4646
+ * @param {*} value
4647
+ */
4648
+ setValueForProperty: function(node, name, value) {
4649
+ var propertyInfo = DOMProperty_1.getPropertyInfo(name);
4650
+
4651
+ if (propertyInfo && DOMProperty_1.shouldSetAttribute(name, value)) {
4652
+ var mutationMethod = propertyInfo.mutationMethod;
4653
+ if (mutationMethod) {
4654
+ mutationMethod(node, value);
4655
+ } else if (shouldIgnoreValue(propertyInfo, value)) {
4656
+ DOMPropertyOperations.deleteValueForProperty(node, name);
4657
+ return;
4658
+ } else if (propertyInfo.mustUseProperty) {
4659
+ // Contrary to `setAttribute`, object properties are properly
4660
+ // `toString`ed by IE8/9.
4661
+ node[propertyInfo.propertyName] = value;
4662
+ } else {
4663
+ var attributeName = propertyInfo.attributeName;
4664
+ var namespace = propertyInfo.attributeNamespace;
4665
+ // `setAttribute` with objects becomes only `[object]` in IE8/9,
4666
+ // ('' + value) makes it output the correct toString()-value.
4667
+ if (namespace) {
4668
+ node.setAttributeNS(namespace, attributeName, '' + value);
4669
+ } else if (
4670
+ propertyInfo.hasBooleanValue ||
4671
+ (propertyInfo.hasOverloadedBooleanValue && value === true)
4672
+ ) {
4673
+ node.setAttribute(attributeName, '');
4674
+ } else {
4675
+ node.setAttribute(attributeName, '' + value);
4676
+ }
4677
+ }
4678
+ } else {
4679
+ DOMPropertyOperations.setValueForAttribute(
4680
+ node,
4681
+ name,
4682
+ DOMProperty_1.shouldSetAttribute(name, value) ? value : null
4683
+ );
4684
+ return;
4685
+ }
4686
+
4687
+ {
4688
+ var payload = {};
4689
+ payload[name] = value;
4690
+ ReactInstrumentation.debugTool.onHostOperation({
4691
+ instanceID: ReactDOMComponentTree_1.getInstanceFromNode(node)
4692
+ ._debugID,
4693
+ type: 'update attribute',
4694
+ payload: payload,
4695
+ });
4696
+ }
4697
+ },
4698
+
4699
+ setValueForAttribute: function(node, name, value) {
4700
+ if (!isAttributeNameSafe(name)) {
4701
+ return;
4702
+ }
4703
+ if (value == null) {
4704
+ node.removeAttribute(name);
4705
+ } else {
4706
+ node.setAttribute(name, '' + value);
4707
+ }
4708
+
4709
+ {
4710
+ var payload = {};
4711
+ payload[name] = value;
4712
+ ReactInstrumentation.debugTool.onHostOperation({
4713
+ instanceID: ReactDOMComponentTree_1.getInstanceFromNode(node)
4714
+ ._debugID,
4715
+ type: 'update attribute',
4716
+ payload: payload,
4717
+ });
4718
+ }
4719
+ },
4720
+
4721
+ /**
4722
+ * Deletes an attributes from a node.
4723
+ *
4724
+ * @param {DOMElement} node
4725
+ * @param {string} name
4726
+ */
4727
+ deleteValueForAttribute: function(node, name) {
4728
+ node.removeAttribute(name);
4729
+ {
4730
+ ReactInstrumentation.debugTool.onHostOperation({
4731
+ instanceID: ReactDOMComponentTree_1.getInstanceFromNode(node)
4732
+ ._debugID,
4733
+ type: 'remove attribute',
4734
+ payload: name,
4735
+ });
4736
+ }
4737
+ },
4738
+
4739
+ /**
4740
+ * Deletes the value for a property on a node.
4741
+ *
4742
+ * @param {DOMElement} node
4743
+ * @param {string} name
4744
+ */
4745
+ deleteValueForProperty: function(node, name) {
4746
+ var propertyInfo = DOMProperty_1.getPropertyInfo(name);
4747
+ if (propertyInfo) {
4748
+ var mutationMethod = propertyInfo.mutationMethod;
4749
+ if (mutationMethod) {
4750
+ mutationMethod(node, undefined);
4751
+ } else if (propertyInfo.mustUseProperty) {
4752
+ var propName = propertyInfo.propertyName;
4753
+ if (propertyInfo.hasBooleanValue) {
4754
+ node[propName] = false;
4755
+ } else {
4756
+ node[propName] = '';
4757
+ }
4758
+ } else {
4759
+ node.removeAttribute(propertyInfo.attributeName);
4760
+ }
4761
+ } else {
4762
+ node.removeAttribute(name);
4763
+ }
4764
+
4765
+ {
4766
+ ReactInstrumentation.debugTool.onHostOperation({
4767
+ instanceID: ReactDOMComponentTree_1.getInstanceFromNode(node)
4768
+ ._debugID,
4769
+ type: 'remove attribute',
4770
+ payload: name,
4771
+ });
4772
+ }
4773
+ },
4774
+ };
4775
+
4776
+ var DOMPropertyOperations_1 = DOMPropertyOperations;
4777
+
4778
+ function createCommonjsModule(fn, module) {
4779
+ return (module = {exports: {}}), fn(module, module.exports), module.exports;
4780
+ }
4781
+
4782
+ /**
4783
+ * Copyright 2013-present, Facebook, Inc.
4784
+ * All rights reserved.
4785
+ *
4786
+ * This source code is licensed under the BSD-style license found in the
4787
+ * LICENSE file in the root directory of this source tree. An additional grant
4788
+ * of patent rights can be found in the PATENTS file in the same directory.
4789
+ */
4790
+
4791
+ var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
4792
+
4793
+ var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
4794
+
4795
+ {
4796
+ var invariant$2 = invariant_1;
4797
+ var warning$11 = warning_1;
4798
+ var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
4799
+ var loggedTypeFailures$1 = {};
4800
+ }
4801
+
4802
+ /**
4803
+ * Assert that the values match with the type specs.
4804
+ * Error messages are memorized and will only be shown once.
4805
+ *
4806
+ * @param {object} typeSpecs Map of name to a ReactPropType
4807
+ * @param {object} values Runtime values that need to be type-checked
4808
+ * @param {string} location e.g. "prop", "context", "child context"
4809
+ * @param {string} componentName Name of the component for error messages.
4810
+ * @param {?Function} getStack Returns the component stack.
4811
+ * @private
4812
+ */
4813
+ function checkPropTypes(
4814
+ typeSpecs,
4815
+ values,
4816
+ location,
4817
+ componentName,
4818
+ getStack
4819
+ ) {
4820
+ {
4821
+ for (var typeSpecName in typeSpecs) {
4822
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
4823
+ var error;
4824
+ // Prop type validation may throw. In case they do, we don't want to
4825
+ // fail the render phase where it didn't fail before. So we log it.
4826
+ // After these have been cleaned up, we'll let them throw.
4827
+ try {
4828
+ // This is intentionally an invariant that gets caught. It's the same
4829
+ // behavior as without this statement except with a better message.
4830
+ invariant$2(
4831
+ typeof typeSpecs[typeSpecName] === 'function',
4832
+ '%s: %s type `%s` is invalid; it must be a function, usually from ' +
4833
+ 'React.PropTypes.',
4834
+ componentName || 'React class',
4835
+ location,
4836
+ typeSpecName
4837
+ );
4838
+ error = typeSpecs[typeSpecName](
4839
+ values,
4840
+ typeSpecName,
4841
+ componentName,
4842
+ location,
4843
+ null,
4844
+ ReactPropTypesSecret$2
4845
+ );
4846
+ } catch (ex) {
4847
+ error = ex;
4848
+ }
4849
+ warning$11(
4850
+ !error || error instanceof Error,
4851
+ '%s: type specification of %s `%s` is invalid; the type checker ' +
4852
+ 'function must return `null` or an `Error` but returned a %s. ' +
4853
+ 'You may have forgotten to pass an argument to the type checker ' +
4854
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
4855
+ 'shape all require an argument).',
4856
+ componentName || 'React class',
4857
+ location,
4858
+ typeSpecName,
4859
+ typeof error
4860
+ );
4861
+ if (
4862
+ error instanceof Error &&
4863
+ !(error.message in loggedTypeFailures$1)
4864
+ ) {
4865
+ // Only monitor this failure once because there tends to be a lot of the
4866
+ // same error.
4867
+ loggedTypeFailures$1[error.message] = true;
4868
+
4869
+ var stack = getStack ? getStack() : '';
4870
+
4871
+ warning$11(
4872
+ false,
4873
+ 'Failed %s type: %s%s',
4874
+ location,
4875
+ error.message,
4876
+ stack != null ? stack : ''
4877
+ );
4878
+ }
4879
+ }
4880
+ }
4881
+ }
4882
+ }
4883
+
4884
+ var checkPropTypes_1 = checkPropTypes;
4885
+
4886
+ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
4887
+ /* global Symbol */
4888
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4889
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4890
+
4891
+ /**
4892
+ * Returns the iterator method function contained on the iterable object.
4893
+ *
4894
+ * Be sure to invoke the function with the iterable as context:
4895
+ *
4896
+ * var iteratorFn = getIteratorFn(myIterable);
4897
+ * if (iteratorFn) {
4898
+ * var iterator = iteratorFn.call(myIterable);
4899
+ * ...
4900
+ * }
4901
+ *
4902
+ * @param {?object} maybeIterable
4903
+ * @return {?function}
4904
+ */
4905
+ function getIteratorFn(maybeIterable) {
4906
+ var iteratorFn =
4907
+ maybeIterable &&
4908
+ ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) ||
4909
+ maybeIterable[FAUX_ITERATOR_SYMBOL]);
4910
+ if (typeof iteratorFn === 'function') {
4911
+ return iteratorFn;
4912
+ }
4913
+ }
4914
+
4915
+ /**
4916
+ * Collection of methods that allow declaration and validation of props that are
4917
+ * supplied to React components. Example usage:
4918
+ *
4919
+ * var Props = require('ReactPropTypes');
4920
+ * var MyArticle = React.createClass({
4921
+ * propTypes: {
4922
+ * // An optional string prop named "description".
4923
+ * description: Props.string,
4924
+ *
4925
+ * // A required enum prop named "category".
4926
+ * category: Props.oneOf(['News','Photos']).isRequired,
4927
+ *
4928
+ * // A prop named "dialog" that requires an instance of Dialog.
4929
+ * dialog: Props.instanceOf(Dialog).isRequired
4930
+ * },
4931
+ * render: function() { ... }
4932
+ * });
4933
+ *
4934
+ * A more formal specification of how these methods are used:
4935
+ *
4936
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4937
+ * decl := ReactPropTypes.{type}(.isRequired)?
4938
+ *
4939
+ * Each and every declaration produces a function with the same signature. This
4940
+ * allows the creation of custom validation functions. For example:
4941
+ *
4942
+ * var MyLink = React.createClass({
4943
+ * propTypes: {
4944
+ * // An optional string or URI prop named "href".
4945
+ * href: function(props, propName, componentName) {
4946
+ * var propValue = props[propName];
4947
+ * if (propValue != null && typeof propValue !== 'string' &&
4948
+ * !(propValue instanceof URI)) {
4949
+ * return new Error(
4950
+ * 'Expected a string or an URI for ' + propName + ' in ' +
4951
+ * componentName
4952
+ * );
4953
+ * }
4954
+ * }
4955
+ * },
4956
+ * render: function() {...}
4957
+ * });
4958
+ *
4959
+ * @internal
4960
+ */
4961
+
4962
+ var ANONYMOUS = '<<anonymous>>';
4963
+
4964
+ // Important!
4965
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4966
+ var ReactPropTypes = {
4967
+ array: createPrimitiveTypeChecker('array'),
4968
+ bool: createPrimitiveTypeChecker('boolean'),
4969
+ func: createPrimitiveTypeChecker('function'),
4970
+ number: createPrimitiveTypeChecker('number'),
4971
+ object: createPrimitiveTypeChecker('object'),
4972
+ string: createPrimitiveTypeChecker('string'),
4973
+ symbol: createPrimitiveTypeChecker('symbol'),
4974
+
4975
+ any: createAnyTypeChecker(),
4976
+ arrayOf: createArrayOfTypeChecker,
4977
+ element: createElementTypeChecker(),
4978
+ instanceOf: createInstanceTypeChecker,
4979
+ node: createNodeChecker(),
4980
+ objectOf: createObjectOfTypeChecker,
4981
+ oneOf: createEnumTypeChecker,
4982
+ oneOfType: createUnionTypeChecker,
4983
+ shape: createShapeTypeChecker,
4984
+ };
4985
+
4986
+ /**
4987
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
4988
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
4989
+ */
4990
+ /*eslint-disable no-self-compare*/
4991
+ function is(x, y) {
4992
+ // SameValue algorithm
4993
+ if (x === y) {
4994
+ // Steps 1-5, 7-10
4995
+ // Steps 6.b-6.e: +0 != -0
4996
+ return x !== 0 || 1 / x === 1 / y;
4997
+ } else {
4998
+ // Step 6.a: NaN == NaN
4999
+ return x !== x && y !== y;
This file is too large to show in full.
fixtures/attribute-behavior/public/react-dom.production.min.js
deleted
-203
@@ -1,203 +0,0 @@
1
-/*
2
- Modernizr 3.0.0pre (Custom Build) | MIT
3
-*/
4
-// prettier-ignore
5
-function Mb(ab){function Nb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Mc(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function Le(a){return a[1].toUpperCase()}function bb(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;return 32<=a||13===a?a:0}function Ob(){return Me}function Nc(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Ne[a.type]:"textarea"===b?!0:!1}function cb(a){if(null==a)return null;
6
-if(1===a.nodeType)return a;var b=ha.get(a);if(b)return"number"===typeof b.tag?Oc(b):Pc(b);"function"===typeof a.render?k("188"):k("213",Object.keys(a))}function Pc(){k("212")}function Oc(){k("211")}function Pb(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function Qc(a){var b=(a?a.ownerDocument||a:document).defaultView||window;return!!(a&&("function"===typeof b.Node?a instanceof b.Node:"object"===
7
-typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName))&&3==a.nodeType}function Rc(){!Qb&&m&&(Qb="textContent"in document.documentElement?"textContent":"innerText");return Qb}function Sc(a,b){var c=Tc(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Tc(c)}}function Uc(){k("196")}function Oe(a){function b(){for(;null!==z&&0===z.current.pendingWorkPriority;){z.isScheduled=
8
-!1;var a=z.nextScheduledRoot;z.nextScheduledRoot=null;if(z===O)return O=z=null,A=0,null;z=a}a=z;for(var b=null,c=0;null!==a;)0!==a.current.pendingWorkPriority&&(0===c||c>a.current.pendingWorkPriority)&&(c=a.current.pendingWorkPriority,b=a),a=a.nextScheduledRoot;if(null!==b){for(A=c;-1<ca;)db[ca]=null,ca--;eb=ba;da.current=ba;T.current=!1;B();H=Vc(b.current,c)}else A=0,H=null}function c(c){W=!0;D=null;var d=c.stateNode;d.current===c?k("177"):void 0;1!==A&&2!==A||Y++;fb.current=null;if(1<c.effectTag)if(null!==
9
-c.lastEffect){c.lastEffect.nextEffect=c;var e=c.firstEffect}else e=c;else e=c.firstEffect;K();for(v=e;null!==v;){var t=!1,l=void 0;try{for(;null!==v;){var f=v.effectTag;f&16&&a.resetTextContent(v.stateNode);if(f&128){var r=v.alternate;null!==r&&Pe(r)}switch(f&-242){case 2:Wc(v);v.effectTag&=-3;break;case 6:Wc(v);v.effectTag&=-3;Xc(v.alternate,v);break;case 4:Xc(v.alternate,v);break;case 8:X=!0,Qe(v),X=!1}v=v.nextEffect}}catch(Rb){t=!0,l=Rb}t&&(null===v?k("178"):void 0,S(v,l),null!==v&&(v=v.nextEffect))}L();
10
-d.current=c;for(v=e;null!==v;){d=!1;e=void 0;try{for(;null!==v;){var g=v.effectTag;g&36&&Re(v.alternate,v);g&128&&Se(v);if(g&64)switch(t=v,l=void 0,null!==Q&&(l=Q.get(t),Q["delete"](t),null==l&&null!==t.alternate&&(t=t.alternate,l=Q.get(t),Q["delete"](t))),null==l?k("184"):void 0,t.tag){case 2:t.stateNode.componentDidCatch(l.error,{componentStack:l.componentStack});break;case 3:null===N&&(N=l.error);break;default:k("157")}var u=v.nextEffect;v.nextEffect=null;v=u}}catch(Rb){d=!0,e=Rb}d&&(null===v?
11
-k("178"):void 0,S(v,e),null!==v&&(v=v.nextEffect))}W=!1;"function"===typeof Yc&&Yc(c.stateNode);F&&(F.forEach(Z),F=null);b()}function d(a){for(;;){var b=t(a.alternate,a,A),c=a["return"],d=a.sibling;var e=a;if(!(0!==e.pendingWorkPriority&&e.pendingWorkPriority>A)){var l=e.updateQueue;l=null===l||2!==e.tag&&3!==e.tag?0:null!==l.first?l.first.priorityLevel:0;for(var f=e.child;null!==f;){var r=f.pendingWorkPriority;l=0!==l&&(0===r||r>l)?l:r;f=f.sibling}e.pendingWorkPriority=l}if(null!==b)return b;null!==
12
-c&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1<a.effectTag&&(null!==c.lastEffect?c.lastEffect.nextEffect=a:c.firstEffect=a,c.lastEffect=a));if(null!==d)return d;if(null!==c)a=c;else{D=a;break}}return null}function e(a){var b=l(a.alternate,a,A);null===b&&(b=d(a));fb.current=null;return b}function f(a){var b=r(a.alternate,a,A);null===b&&(b=d(a));fb.current=null;return b}function g(a){I(5,
13
-a)}function h(){if(null!==Q&&0<Q.size&&2===A)for(;null!==H;){var a=H;H=null!==Q&&(Q.has(a)||null!==a.alternate&&Q.has(a.alternate))?f(H):e(H);if(null===H&&(null===D?k("179"):void 0,J=2,c(D),J=A,null===Q||0===Q.size||2!==A))break}}function p(a,d){null!==D?(J=2,c(D),h()):null===H&&b();if(!(0===A||A>a)){J=A;a:do{if(2>=A)for(;null!==H&&!(H=e(H),null===H&&(null===D?k("179"):void 0,J=2,c(D),J=A,h(),0===A||A>a||2<A)););else if(null!==d)for(;null!==H&&!E;)if(1<d.timeRemaining()){if(H=e(H),null===H)if(null===
14
-D?k("179"):void 0,1<d.timeRemaining()){if(J=2,c(D),J=A,h(),0===A||A>a||3>A)break}else E=!0}else E=!0;switch(A){case 1:case 2:if(A<=a)continue a;break a;case 3:case 4:case 5:if(null===d)break a;if(!E&&A<=a)continue a;break a;case 0:break a;default:k("181")}}while(1)}}function I(a,b){x?k("182"):void 0;x=!0;Y=0;var c=J,d=!1,e=null;try{p(a,b)}catch(Sb){d=!0,e=Sb}for(;d;){if(R){N=e;break}var t=H;if(null===t)R=!0;else{var l=S(t,e);null===l?k("183"):void 0;if(!R){try{d=l;e=a;l=b;for(var r=d;null!==t;){switch(t.tag){case 2:Zc(t);
15
-break;case 5:y(t);break;case 3:$c(t);break;case 4:$c(t)}if(t===r||t.alternate===r)break;t=t["return"]}H=f(d);p(e,l)}catch(Sb){d=!0;e=Sb;continue}break}}}J=c;null!==b&&(P=!1);2<A&&!P&&(q(g),P=!0);a=N;R=E=x=!1;G=Q=N=null;if(null!==a)throw a;}function S(a,b){var c=fb.current=null,d=!1,e=!1,t=null;if(3===a.tag)c=a,C(a)&&(R=!0);else for(var l=a["return"];null!==l&&null===c;){2===l.tag?"function"===typeof l.stateNode.componentDidCatch&&(d=!0,t=Ba(l),c=l,e=!0):3===l.tag&&(c=l);if(C(l)){if(X||null!==F&&(F.has(l)||
16
-null!==l.alternate&&F.has(l.alternate)))return null;c=null;e=!1}l=l["return"]}if(null!==c){null===G&&(G=new Set);G.add(c);var f="";l=a;do{a:switch(l.tag){case 0:case 1:case 2:case 5:var r=l._debugOwner,g=l._debugSource;var u=Ba(l);var h=null;r&&(h=Ba(r));r=g;u="\n in "+(u||"Unknown")+(r?" (at "+r.fileName.replace(/^.*[\\\/]/,"")+":"+r.lineNumber+")":h?" (created by "+h+")":"");break a;default:u=""}f+=u;l=l["return"]}while(l);l=f;a=Ba(a);null===Q&&(Q=new Map);b={componentName:a,componentStack:l,
17
-error:b,errorBoundary:d?c.stateNode:null,errorBoundaryFound:d,errorBoundaryName:t,willRetry:e};Q.set(c,b);try{console.error(b.error)}catch(Te){console.error(Te)}W?(null===F&&(F=new Set),F.add(c)):Z(c);return c}null===N&&(N=b);return null}function C(a){return null!==G&&(G.has(a)||null!==a.alternate&&G.has(a.alternate))}function ad(a,b){return U(a,b,!1)}function U(a,b){Y>aa&&(R=!0,k("185"));!x&&b<=A&&(H=null);for(var c=!0;null!==a&&c;){c=!1;if(0===a.pendingWorkPriority||a.pendingWorkPriority>b)c=!0,
18
-a.pendingWorkPriority=b;null!==a.alternate&&(0===a.alternate.pendingWorkPriority||a.alternate.pendingWorkPriority>b)&&(c=!0,a.alternate.pendingWorkPriority=b);if(null===a["return"])if(3===a.tag){var d=a.stateNode;0===b||d.isScheduled||(d.isScheduled=!0,O?O.nextScheduledRoot=d:z=d,O=d);if(!x)switch(b){case 1:M?I(1,null):I(2,null);break;case 2:m?void 0:k("186");break;default:P||(q(g),P=!0)}}else break;a=a["return"]}}function n(a,b){var c=J;0===c&&(c=!w||a.internalContextTag&1||b?4:1);return 1===c&&
19
-(x||m)?2:c}function Z(a){U(a,2,!0)}var V=Ue(a),bd=Ve(a),$c=V.popHostContainer,y=V.popHostContext,B=V.resetHostContainer,u=We(a,V,bd,ad,n),l=u.beginWork,r=u.beginFailedWork,t=Xe(a,V,bd).completeWork;V=Ye(a,S);var Wc=V.commitPlacement,Qe=V.commitDeletion,Xc=V.commitWork,Re=V.commitLifeCycles,Se=V.commitAttachRef,Pe=V.commitDetachRef,q=a.scheduleDeferredCallback,w=a.useSyncScheduling,K=a.prepareForCommit,L=a.resetAfterCommit,J=0,x=!1,E=!1,m=!1,M=!1,H=null,A=0,v=null,D=null,z=null,O=null,P=!1,Q=null,
20
-G=null,F=null,N=null,R=!1,W=!1,X=!1,aa=1E3,Y=0;return{scheduleUpdate:ad,getPriorityContext:n,performWithPriority:function(a,b){var c=J;J=a;try{b()}finally{J=c}},batchedUpdates:function(a,b){var c=m;m=!0;try{return a(b)}finally{m=c,x||m||I(2,null)}},unbatchedUpdates:function(a){var b=M,c=m;M=m;m=!1;try{return a()}finally{m=c,M=b}},flushSync:function(a){var b=m,c=J;m=!0;J=1;try{return a()}finally{m=b,J=c,x?k("187"):void 0,I(2,null)}},deferredUpdates:function(a){var b=J;J=4;try{return a()}finally{J=
21
-b}}}}function Yc(a){"function"===typeof Tb&&Tb(a)}function Ve(a){function b(a,b){var c=new M(5,null,0);c.type="DELETED";c.stateNode=b;c["return"]=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function c(a,b){switch(a.tag){case 5:return f(b,a.type,a.pendingProps);case 6:return g(b,a.pendingProps);default:return!1}}function d(a){for(a=a["return"];null!==a&&5!==a.tag&&3!==a.tag;)a=a["return"];U=a}var e=a.shouldSetTextContent,f=a.canHydrateInstance,
22
-g=a.canHydrateTextInstance,h=a.getNextHydratableSibling,p=a.getFirstHydratableChild,I=a.hydrateInstance,S=a.hydrateTextInstance,C=a.didNotHydrateInstance,n=a.didNotFindHydratableInstance;a=a.didNotFindHydratableTextInstance;if(!(f&&g&&h&&p&&I&&S&&C&&n&&a))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){k("175")},prepareToHydrateHostTextInstance:function(){k("176")},popHydrationState:function(){return!1}};
23
-var U=null,m=null,Z=!1;return{enterHydrationState:function(a){m=p(a.stateNode.containerInfo);U=a;return Z=!0},resetHydrationState:function(){m=U=null;Z=!1},tryToClaimNextHydratableInstance:function(a){if(Z){var d=m;if(d){if(!c(a,d)){d=h(d);if(!d||!c(a,d)){a.effectTag|=2;Z=!1;U=a;return}b(U,m)}a.stateNode=d;U=a;m=p(d)}else a.effectTag|=2,Z=!1,U=a}},prepareToHydrateHostInstance:function(a,b){b=I(a.stateNode,a.type,a.memoizedProps,b,a);a.updateQueue=b;return null!==b?!0:!1},prepareToHydrateHostTextInstance:function(a){return S(a.stateNode,
24
-a.memoizedProps,a)},popHydrationState:function(a){if(a!==U)return!1;if(!Z)return d(a),Z=!0,!1;var c=a.type;if(5!==a.tag||"head"!==c&&"body"!==c&&!e(c,a.memoizedProps))for(c=m;c;)b(a,c),c=h(c);d(a);m=U?h(a.stateNode):null;return!0}}}function Ue(a){function b(a){a===ra?k("174"):void 0;return a}var c=a.getChildHostContext,d=a.getRootHostContext,e={current:ra},f={current:ra},g={current:ra};return{getHostContext:function(){return b(e.current)},getRootHostContainer:function(){return b(g.current)},popHostContainer:function(a){N(e,
25
-a);N(f,a);N(g,a)},popHostContext:function(a){f.current===a&&(N(e,a),N(f,a))},pushHostContainer:function(a,b){O(g,b,a);b=d(b);O(f,a,a);O(e,b,a)},pushHostContext:function(a){var d=b(g.current),h=b(e.current);d=c(h,a.type,d);h!==d&&(O(f,a,a),O(e,d,a))},resetHostContainer:function(){e.current=ra;g.current=ra}}}function Ye(a,b){function c(a){var c=a.ref;if(null!==c)try{c(null)}catch(B){b(a,B)}}function d(a){return 5===a.tag||3===a.tag||4===a.tag}function e(a){for(var b=a;;)if(g(b),null!==b.child&&4!==
26
-b.tag)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;null===b.sibling;){if(null===b["return"]||b["return"]===a)return;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}}function f(a){for(var b=a,c=!1,d=void 0,l=void 0;;){if(!c){c=b["return"];a:for(;;){null===c?k("160"):void 0;switch(c.tag){case 5:d=c.stateNode;l=!1;break a;case 3:d=c.stateNode.containerInfo;l=!0;break a;case 4:d=c.stateNode.containerInfo;l=!0;break a}c=c["return"]}c=!0}if(5===b.tag||6===b.tag)e(b),l?V(d,b.stateNode):
27
-Z(d,b.stateNode);else if(4===b.tag?d=b.stateNode.containerInfo:g(b),null!==b.child){b.child["return"]=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b["return"]||b["return"]===a)return;b=b["return"];4===b.tag&&(c=!1)}b.sibling["return"]=b["return"];b=b.sibling}}function g(a){"function"===typeof cd&&cd(a);switch(a.tag){case 2:c(a);var d=a.stateNode;if("function"===typeof d.componentWillUnmount)try{d.props=a.memoizedProps,d.state=a.memoizedState,d.componentWillUnmount()}catch(B){b(a,
28
-B)}break;case 5:c(a);break;case 7:e(a.stateNode);break;case 4:f(a)}}var h=a.commitMount,p=a.commitUpdate,I=a.resetTextContent,S=a.commitTextUpdate,m=a.appendChild,n=a.appendChildToContainer,U=a.insertBefore,q=a.insertInContainerBefore,Z=a.removeChild,V=a.removeChildFromContainer,w=a.getPublicInstance;return{commitPlacement:function(a){a:{for(var b=a["return"];null!==b;){if(d(b)){var c=b;break a}b=b["return"]}k("160");c=void 0}var e=b=void 0;switch(c.tag){case 5:b=c.stateNode;e=!1;break;case 3:b=c.stateNode.containerInfo;
29
-e=!0;break;case 4:b=c.stateNode.containerInfo;e=!0;break;default:k("161")}c.effectTag&16&&(I(b),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c["return"]||d(c["return"])){c=null;break a}c=c["return"]}c.sibling["return"]=c["return"];for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child["return"]=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var l=a;;){if(5===l.tag||6===l.tag)c?e?q(b,l.stateNode,c):
30
-U(b,l.stateNode,c):e?n(b,l.stateNode):m(b,l.stateNode);else if(4!==l.tag&&null!==l.child){l.child["return"]=l;l=l.child;continue}if(l===a)break;for(;null===l.sibling;){if(null===l["return"]||l["return"]===a)return;l=l["return"]}l.sibling["return"]=l["return"];l=l.sibling}},commitDeletion:function(a){f(a);a["return"]=null;a.child=null;a.alternate&&(a.alternate.child=null,a.alternate["return"]=null)},commitWork:function(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;
31
-a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&p(c,f,e,a,d,b)}break;case 6:null===b.stateNode?k("162"):void 0;c=b.memoizedProps;S(b.stateNode,null!==a?a.memoizedProps:c,c);break;case 3:break;case 4:break;default:k("163")}},commitLifeCycles:function(a,b){switch(b.tag){case 2:var c=b.stateNode;if(b.effectTag&4)if(null===a)c.props=b.memoizedProps,c.state=b.memoizedState,c.componentDidMount();else{var d=a.memoizedProps;a=a.memoizedState;c.props=b.memoizedProps;
32
-c.state=b.memoizedState;c.componentDidUpdate(d,a)}b.effectTag&32&&null!==b.updateQueue&&dd(b,b.updateQueue,c);break;case 3:a=b.updateQueue;null!==a&&dd(b,a,b.child&&b.child.stateNode);break;case 5:c=b.stateNode;null===a&&b.effectTag&4&&h(c,b.type,b.memoizedProps,b);break;case 6:break;case 4:break;default:k("163")}},commitAttachRef:function(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:b(w(c));break;default:b(c)}}},commitDetachRef:function(a){a=a.ref;null!==a&&a(null)}}}function cd(a){"function"===
33
-typeof Ub&&Ub(a)}function dd(a,b,c){a=b.callbackList;if(null!==a)for(b.callbackList=null,b=0;b<a.length;b++){var d=a[b];"function"!==typeof d?k("191",d):void 0;d.call(c)}}function Xe(a,b,c){var d=a.createInstance,e=a.createTextInstance,f=a.appendInitialChild,g=a.finalizeInitialChildren,h=a.prepareUpdate,p=b.getRootHostContainer,I=b.popHostContext,S=b.getHostContext,m=b.popHostContainer,n=c.prepareToHydrateHostInstance,q=c.prepareToHydrateHostTextInstance,w=c.popHydrationState;return{completeWork:function(a,
34
-b,c){var C=b.pendingProps;if(null===C)C=b.memoizedProps;else if(5!==b.pendingWorkPriority||5===c)b.pendingProps=null;switch(b.tag){case 1:return null;case 2:return Zc(b),null;case 3:C=b.stateNode;C.pendingContext&&(C.context=C.pendingContext,C.pendingContext=null);if(null===a||null===a.child)w(b),b.effectTag&=-3;return null;case 5:I(b);c=p();var y=b.type;if(null!==a&&null!=b.stateNode){var B=a.memoizedProps,u=b.stateNode,l=S();C=h(u,y,B,C,c,l);if(b.updateQueue=C)b.effectTag|=4;a.ref!==b.ref&&(b.effectTag|=
35
-128)}else{if(!C)return null===b.stateNode?k("166"):void 0,null;a=S();if(w(b))n(b,c)&&(b.effectTag|=4);else{a=d(y,C,c,a,b);a:for(B=b.child;null!==B;){if(5===B.tag||6===B.tag)f(a,B.stateNode);else if(4!==B.tag&&null!==B.child){B=B.child;continue}if(B===b)break a;for(;null===B.sibling;){if(null===B["return"]||B["return"]===b)break a;B=B["return"]}B=B.sibling}g(a,y,C,c)&&(b.effectTag|=4);b.stateNode=a}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)a.memoizedProps!==C&&(b.effectTag|=
36
-4);else{if("string"!==typeof C)return null===b.stateNode?k("166"):void 0,null;a=p();c=S();w(b)?q(b)&&(b.effectTag|=4):b.stateNode=e(C,a,c,b)}return null;case 7:(C=b.memoizedProps)?void 0:k("165");b.tag=8;c=[];a:for((y=b.stateNode)&&(y["return"]=b);null!==y;){if(5===y.tag||6===y.tag||4===y.tag)k("164");else if(9===y.tag)c.push(y.type);else if(null!==y.child){y.child["return"]=y;y=y.child;continue}for(;null===y.sibling;){if(null===y["return"]||y["return"]===b)break a;y=y["return"]}y.sibling["return"]=
37
-y["return"];y=y.sibling}y=C.handler;C=y(C.props,c);b.child=Vb(b,null!==a?a.child:null,C,b.pendingWorkPriority);return b.child;case 8:return b.tag=7,null;case 9:return null;case 10:return null;case 4:return b.effectTag|=4,m(b),null;case 0:k("167");default:k("156")}}}}function We(a,b,c,d,e){function f(a,b,c){g(a,b,c,b.pendingWorkPriority)}function g(a,b,c,d){b.child=null===a?Wb(b,b.child,c,d):a.child===b.child?Vb(b,b.child,c,d):Xb(b,b.child,c,d)}function h(a,b){var c=b.ref;null===c||a&&a.ref===c||(b.effectTag|=
38
-128)}function p(a,b,c,d){h(a,b);if(!c)return d&&ed(b,!1),I(a,b);c=b.stateNode;Ze.current=b;var e=c.render();b.effectTag|=1;f(a,b,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&ed(b,!0);return b.child}function I(a,b){null!==a&&b.child!==a.child?k("153"):void 0;if(null!==b.child){a=b.child;var c=Yb(a,a.pendingWorkPriority);c.pendingProps=a.pendingProps;b.child=c;for(c["return"]=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Yb(a,a.pendingWorkPriority),c.pendingProps=a.pendingProps,c["return"]=b;
39
-c.sibling=null}return b.child}function m(a,b){switch(b.tag){case 2:gb(b);break;case 4:x(b,b.stateNode.containerInfo)}return null}var C=a.shouldSetTextContent,n=a.useSyncScheduling,q=a.shouldDeprioritizeSubtree,w=b.pushHostContext,x=b.pushHostContainer,D=c.enterHydrationState,z=c.resetHydrationState,E=c.tryToClaimNextHydratableInstance;a=$e(d,e,function(a,b){a.memoizedProps=b},function(a,b){a.memoizedState=b});var y=a.adoptClassInstance,B=a.constructClassInstance,u=a.mountClassInstance,l=a.updateClassInstance;
40
-return{beginWork:function(a,b,c){if(0===b.pendingWorkPriority||b.pendingWorkPriority>c)return m(a,b);switch(b.tag){case 0:null!==a?k("155"):void 0;var d=b.type,e=b.pendingProps,g=Ca(b);g=Da(b,g);d=d(e,g);b.effectTag|=1;"object"===typeof d&&null!==d&&"function"===typeof d.render?(b.tag=2,e=gb(b),y(b,d),u(b,c),b=p(a,b,!0,e)):(b.tag=1,f(a,b,d),b.memoizedProps=e,b=b.child);return b;case 1:a:{e=b.type;c=b.pendingProps;d=b.memoizedProps;if(T.current)null===c&&(c=d);else if(null===c||d===c){b=I(a,b);break a}d=
41
-Ca(b);d=Da(b,d);e=e(c,d);b.effectTag|=1;f(a,b,e);b.memoizedProps=c;b=b.child}return b;case 2:return e=gb(b),d=void 0,null===a?b.stateNode?k("153"):(B(b,b.pendingProps),u(b,c),d=!0):d=l(a,b,c),p(a,b,d,e);case 3:return e=b.stateNode,e.pendingContext?fd(b,e.pendingContext,e.pendingContext!==e.context):e.context&&fd(b,e.context,!1),x(b,e.containerInfo),d=b.updateQueue,null!==d?(e=b.memoizedState,d=Zb(a,b,d,null,e,null,c),e===d?(z(),b=I(a,b)):(e=d.element,null!==a&&null!==a.child||!D(b)?(z(),f(a,b,e)):
42
-(b.effectTag|=2,b.child=Wb(b,b.child,e,c)),b.memoizedState=d,b=b.child)):(z(),b=I(a,b)),b;case 5:w(b);null===a&&E(b);e=b.type;var r=b.memoizedProps;d=b.pendingProps;null===d&&(d=r,null===d?k("154"):void 0);g=null!==a?a.memoizedProps:null;T.current||null!==d&&r!==d?(r=d.children,C(e,d)?r=null:g&&C(e,g)&&(b.effectTag|=16),h(a,b),5!==c&&!n&&q(e,d)?(b.pendingWorkPriority=5,b=null):(f(a,b,r),b.memoizedProps=d,b=b.child)):b=I(a,b);return b;case 6:return null===a&&E(b),a=b.pendingProps,null===a&&(a=b.memoizedProps),
43
-b.memoizedProps=a,null;case 8:b.tag=7;case 7:c=b.pendingProps;if(T.current)null===c&&(c=a&&a.memoizedProps,null===c?k("154"):void 0);else if(null===c||b.memoizedProps===c)c=b.memoizedProps;e=c.children;d=b.pendingWorkPriority;b.stateNode=null===a?Wb(b,b.stateNode,e,d):a.child===b.child?Vb(b,b.stateNode,e,d):Xb(b,b.stateNode,e,d);b.memoizedProps=c;return b.stateNode;case 9:return null;case 4:a:{x(b,b.stateNode.containerInfo);c=b.pendingWorkPriority;e=b.pendingProps;if(T.current)null===e&&(e=a&&a.memoizedProps,
44
-null==e?k("154"):void 0);else if(null===e||b.memoizedProps===e){b=I(a,b);break a}null===a?b.child=Xb(b,b.child,e,c):f(a,b,e);b.memoizedProps=e;b=b.child}return b;case 10:a:{c=b.pendingProps;if(T.current)null===c&&(c=b.memoizedProps);else if(null===c||b.memoizedProps===c){b=I(a,b);break a}f(a,b,c);b.memoizedProps=c;b=b.child}return b;default:k("156")}},beginFailedWork:function(a,b,c){switch(b.tag){case 2:gb(b);break;case 3:x(b,b.stateNode.containerInfo);break;default:k("157")}b.effectTag|=64;null===
45
-a?b.child=null:b.child!==a.child&&(b.child=a.child);if(0===b.pendingWorkPriority||b.pendingWorkPriority>c)return m(a,b);b.firstEffect=null;b.lastEffect=null;g(a,b,null,c);2===b.tag&&(a=b.stateNode,b.memoizedProps=a.props,b.memoizedState=a.state);return b.child}}}function ed(a,b){var c=a.stateNode;c?void 0:k("169");if(b){var d=gd(a,eb,!0);c.__reactInternalMemoizedMergedChildContext=d;N(T,a);N(da,a);O(da,d,a)}else N(T,a);O(T,b,a)}function fd(a,b,c){null!=da.cursor?k("168"):void 0;O(da,b,a);O(T,c,a)}
46
-function gb(a){if(!Ea(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ba;eb=da.current;O(da,b,a);O(T,T.current,a);return!0}function $e(a,b,c,d){function e(a,b){b.updater=f;a.stateNode=b;ha.set(b,a)}var f={isMounted:af,enqueueSetState:function(c,d,e){c=ha.get(c);var f=b(c,!1);hb(c,{priorityLevel:f,partialState:d,callback:void 0===e?null:e,isReplace:!1,isForced:!1,isTopLevelUnmount:!1,next:null});a(c,f)},enqueueReplaceState:function(c,d,e){c=ha.get(c);var f=b(c,!1);hb(c,
47
-{priorityLevel:f,partialState:d,callback:void 0===e?null:e,isReplace:!0,isForced:!1,isTopLevelUnmount:!1,next:null});a(c,f)},enqueueForceUpdate:function(c,d){c=ha.get(c);var e=b(c,!1);hb(c,{priorityLevel:e,partialState:null,callback:void 0===d?null:d,isReplace:!1,isForced:!0,isTopLevelUnmount:!1,next:null});a(c,e)}};return{adoptClassInstance:e,constructClassInstance:function(a,b){var c=a.type,d=Ca(a),f=2===a.tag&&null!=a.type.contextTypes,g=f?Da(a,d):ba;b=new c(b,g);e(a,b);f&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=
48
-d,a.__reactInternalMemoizedMaskedChildContext=g);return b},mountClassInstance:function(a,b){var c=a.alternate,d=a.stateNode,e=d.state||null,g=a.pendingProps;g?void 0:k("158");var h=Ca(a);d.props=g;d.state=e;d.refs=ba;d.context=Da(a,h);ib.enableAsyncSubtreeAPI&&null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent&&(a.internalContextTag|=1);"function"===typeof d.componentWillMount&&(h=d.state,d.componentWillMount(),h!==d.state&&f.enqueueReplaceState(d,d.state,null),
49
-h=a.updateQueue,null!==h&&(d.state=Zb(c,a,h,d,e,g,b)));"function"===typeof d.componentDidMount&&(a.effectTag|=4)},updateClassInstance:function(a,b,e){var g=b.stateNode;g.props=b.memoizedProps;g.state=b.memoizedState;var h=b.memoizedProps,p=b.pendingProps;p||(p=h,null==p?k("159"):void 0);var m=g.context,n=Ca(b);n=Da(b,n);"function"!==typeof g.componentWillReceiveProps||h===p&&m===n||(m=g.state,g.componentWillReceiveProps(p,n),g.state!==m&&f.enqueueReplaceState(g,g.state,null));m=b.memoizedState;e=
50
-null!==b.updateQueue?Zb(a,b,b.updateQueue,g,m,p,e):m;if(!(h!==p||m!==e||T.current||null!==b.updateQueue&&b.updateQueue.hasForceUpdate))return"function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&m===a.memoizedState||(b.effectTag|=4),!1;var q=p;if(null===h||null!==b.updateQueue&&b.updateQueue.hasForceUpdate)q=!0;else{var w=b.stateNode,x=b.type;q="function"===typeof w.shouldComponentUpdate?w.shouldComponentUpdate(q,e,n):x.prototype&&x.prototype.isPureReactComponent?!$b(h,q)||!$b(m,e):!0}q?
51
-("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(p,e,n),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&m===a.memoizedState||(b.effectTag|=4),c(b,p),d(b,e));g.props=p;g.state=e;g.context=n;return q}}}function $b(a,b){if(hd(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!bf.call(b,
52
-c[d])||!hd(a[c[d]],b[c[d]]))return!1;return!0}function ac(a,b,c){b=new M(4,a.key,b);b.pendingProps=a.children||[];b.pendingWorkPriority=c;b.stateNode={containerInfo:a.containerInfo,implementation:a.implementation};return b}function bc(a,b,c){b=new M(7,a.key,b);b.type=a.handler;b.pendingProps=a;b.pendingWorkPriority=c;return b}function cc(a,b,c){b=new M(6,null,b);b.pendingProps=a;b.pendingWorkPriority=c;return b}function id(a,b,c){b=new M(10,null,b);b.pendingProps=a;b.pendingWorkPriority=c;return b}
53
-function dc(a,b,c){var d=a.type,e=a.key,f=void 0;"function"===typeof d?(f=d.prototype&&d.prototype.isReactComponent?new M(2,e,b):new M(0,e,b),f.type=d):"string"===typeof d?(f=new M(5,e,b),f.type=d):"object"===typeof d&&null!==d&&"number"===typeof d.tag?f=d:k("130",null==d?d:typeof d,"");b=f;b.pendingProps=a.props;b.pendingWorkPriority=c;return b}function Vc(a,b){var c=a.alternate;null===c?(c=new M(a.tag,a.key,a.internalContextTag),c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):
54
-(c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.pendingWorkPriority=b;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}function Zc(a){Ea(a)&&(N(T,a),N(da,a))}function Da(a,b){var c=a.type.contextTypes;if(!c)return ba;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=
55
-b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ca(a){return Ea(a)?eb:da.current}function O(a,b){ca++;db[ca]=a.current;a.current=b}function N(a){0>ca||(a.current=db[ca],db[ca]=null,ca--)}function Zb(a,b,c,d,e,f,g){null!==a&&a.updateQueue===c&&(c=b.updateQueue={first:c.first,last:c.last,callbackList:null,hasForceUpdate:!1});a=c.callbackList;for(var h=c.hasForceUpdate,k=!0,m=c.first;null!==m&&0>=ec(m.priorityLevel,
56
-g);){c.first=m.next;null===c.first&&(c.last=null);var n;if(m.isReplace)e=jd(m,d,e,f),k=!0;else if(n=jd(m,d,e,f))e=k?D({},e,n):D(e,n),k=!1;m.isForced&&(h=!0);null===m.callback||m.isTopLevelUnmount&&null!==m.next||(a=null!==a?a:[],a.push(m.callback),b.effectTag|=32);m=m.next}c.callbackList=a;c.hasForceUpdate=h;null!==c.first||null!==a||h||(b.updateQueue=null);return e}function kd(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function fc(a,
57
-b){return 0<=a.indexOf("-")||null!=b.is}function gc(a,b){b&&(cf[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?k("137",a,""):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?k("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:k("61")),null!=b.style&&"object"!==typeof b.style?k("62",""):void 0)}function jb(a){if(hc[a])return hc[a];if(!sa[a])return a;var b=sa[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in ld)return hc[a]=b[c];return""}
58
-function Fa(a,b){if(!m||b&&!("addEventListener"in document))return!1;b="on"+a;var c=b in document;c||(c=document.createElement("div"),c.setAttribute(b,"return;"),c="function"===typeof c[b]);!c&&md&&"wheel"===a&&(c=document.implementation.hasFeature("Events.wheel","3.0"));return c}function df(a){return nd(a,!1)}function ef(a){return nd(a,!0)}function nd(a,b){a&&(Ga.executeDispatchesInOrder(a,b),a.isPersistent()||a.constructor.release(a))}function Ha(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,
59
-a)}function ta(a,b){null==b?k("30"):void 0;if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function kb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function od(a,b){return a(b)}function ic(a,b,c,d,e,f){return a(b,c,d,e,f)}function ff(){if(w._hasRethrowError){var a=w._rethrowError;w._rethrowError=null;w._hasRethrowError=
60
-!1;throw a;}}function pd(a,b,c,d,e,f,g,h,k){w._hasCaughtError=!1;w._caughtError=null;var p=Array.prototype.slice.call(arguments,3);try{b.apply(c,p)}catch(S){w._caughtError=S,w._hasCaughtError=!0}}function Ba(a){if("function"===typeof a.getName)return a.getName();if("number"===typeof a.tag){a=a.type;if("string"===typeof a)return a;if("function"===typeof a)return a.displayName||a.name}return null}function la(){}function qd(a,b,c,d,e,f,g,h){if(!a){if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
61
-else{var k=[c,d,e,f,g,h],m=0;a=Error(b.replace(/%s/g,function(){return k[m++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}function k(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;d<b;d++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);b=Error(c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";
62
-b.framesToPop=1;throw b;}function Mc(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function rd(){if(lb)for(var a in ua){var b=ua[a],c=lb.indexOf(a);-1<c?void 0:k("96",a);if(!ia.plugins[c]){b.extractEvents?void 0:k("97",a);ia.plugins[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;ia.eventNameDispatchConfigs.hasOwnProperty(h)?k("99",h):void 0;ia.eventNameDispatchConfigs[h]=
63
-f;var p=f.phasedRegistrationNames;if(p){for(e in p)p.hasOwnProperty(e)&&sd(p[e],g,h);e=!0}else f.registrationName?(sd(f.registrationName,g,h),e=!0):e=!1;e?void 0:k("98",d,a)}}}}function sd(a,b,c){ia.registrationNameModules[a]?k("100",a):void 0;ia.registrationNameModules[a]=b;ia.registrationNameDependencies[a]=b.eventTypes[c].dependencies}function mb(a){return function(){return a}}function Ia(a,b){return(a&b)===b}function td(a){for(var b;b=a._renderedComponent;)a=b;return a}function ud(a,b){a=td(a);
64
-a._hostNode=b;b[R]=a}function jc(a,b){if(!(a._flags&vd.hasCachedChildNodes)){var c=a._renderedChildren;b=b.firstChild;var d;a:for(d in c)if(c.hasOwnProperty(d)){var e=c[d],f=td(e)._domID;if(0!==f){for(;null!==b;b=b.nextSibling){var g=b,h=f;if(1===g.nodeType&&g.getAttribute(gf)===""+h||8===g.nodeType&&g.nodeValue===" react-text: "+h+" "||8===g.nodeType&&g.nodeValue===" react-empty: "+h+" "){ud(e,b);continue a}}k("32",f)}}a._flags|=vd.hasCachedChildNodes}}function wd(a){if(a[R])return a[R];for(var b=
65
-[];!a[R];)if(b.push(a),a.parentNode)a=a.parentNode;else return null;var c=a[R];if(5===c.tag||6===c.tag)return c;for(;a&&(c=a[R]);a=b.pop()){var d=c;b.length&&jc(c,a)}return d}function nb(a){var b=a;if(a.alternate)for(;b["return"];)b=b["return"];else{if(0!==(b.effectTag&2))return 1;for(;b["return"];)if(b=b["return"],0!==(b.effectTag&2))return 1}return 3===b.tag?2:3}function xd(a){2!==nb(a)?k("188"):void 0}function kc(a){var b=a.alternate;if(!b)return b=nb(a),3===b?k("188"):void 0,1===b?null:a;for(var c=
66
-a,d=b;;){var e=c["return"],f=e?e.alternate:null;if(!e||!f)break;if(e.child===f.child){for(var g=e.child;g;){if(g===c)return xd(e),a;if(g===d)return xd(e),b;g=g.sibling}k("188")}if(c["return"]!==d["return"])c=e,d=f;else{g=!1;for(var h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}g?void 0:k("189")}}c.alternate!==d?k("190"):void 0}3!==c.tag?k("188"):void 0;return c.stateNode.current===
67
-c?a:b}function yd(a,b,c,d){b=a.type||"unknown-event";a.currentTarget=lc.getNodeFromInstance(d);zd.invokeGuardedCallbackAndCatchFirstError(b,c,void 0,a);a.currentTarget=null}function Ad(a){if(a=Ga.getInstanceFromNode(a))if("number"===typeof a.tag){ob&&"function"===typeof ob.restoreControlledState?void 0:k("194");var b=Ga.getFiberCurrentPropsFromNode(a.stateNode);ob.restoreControlledState(a.stateNode,a.type,b)}else"function"!==typeof a.restoreControlledState?k("195"):void 0,a.restoreControlledState()}
68
-function Bd(a,b){return od(a,b)}function hf(a){var b=a.targetInst;do{if(!b){a.ancestors.push(b);break}var c=b;if("number"===typeof c.tag){for(;c["return"];)c=c["return"];c=3!==c.tag?null:c.stateNode.containerInfo}else{for(;c._hostParent;)c=c._hostParent;c=x.getNodeFromInstance(c).parentNode}if(!c)break;a.ancestors.push(b);b=x.getClosestInstanceFromNode(c)}while(b);for(c=0;c<a.ancestors.length;c++)b=a.ancestors[c],ja._handleTopLevel(a.topLevelType,b,a.nativeEvent,kb(a.nativeEvent))}function Cd(a,b,
69
-c){switch(a){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":return!(!c.disabled||"button"!==b&&"input"!==b&&"select"!==b&&"textarea"!==b);default:return!1}}function pb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;c["ms"+a]="MS"+b;c["O"+a]="o"+b.toLowerCase();return c}function Dd(a){Object.prototype.hasOwnProperty.call(a,
70
-qb)||(a[qb]=jf++,Ed[a[qb]]={});return Ed[a[qb]]}function kf(a){if(Fd.hasOwnProperty(a))return!0;if(Gd.hasOwnProperty(a))return!1;if(lf.test(a))return Fd[a]=!0;Gd[a]=!0;return!1}function Hd(){return null}function mf(a){var b="";ab.Children.forEach(a,function(a){null==a||"string"!==typeof a&&"number"!==typeof a||(b+=a)});return b}function va(a,b,c){a=a.options;if(b){b={};for(var d=0;d<c.length;d++)b["$"+c[d]]=!0;for(c=0;c<a.length;c++)d=b.hasOwnProperty("$"+a[c].value),a[c].selected!==d&&(a[c].selected=
71
-d)}else{c=""+c;for(b=0;b<a.length;b++)if(a[b].value===c){a[b].selected=!0;return}a.length&&(a[0].selected=!0)}}function Id(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function nf(a){var b=Id(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"function"===typeof c.get&&"function"===typeof c.set)return Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:!0,get:function(){return c.get.call(this)},
72
-set:function(a){d=""+a;c.set.call(this,a)}}),{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}function W(a,b){of(b,9===a.nodeType||11===a.nodeType?a:a.ownerDocument)}function ec(a,b){return 2!==a&&1!==a||2!==b&&1!==b?0===a&&0!==b?-255:0!==a&&0===b?255:a-b:0}function Jd(){return{first:null,last:null,hasForceUpdate:!1,callbackList:null}}function mc(a,b,c,d){null!==c?c.next=b:(b.next=a.first,a.first=b);null!==d?b.next=d:a.last=b}function Kd(a,
73
-b){b=b.priorityLevel;var c=null;if(null!==a.last&&0>=ec(a.last.priorityLevel,b))c=a.last;else for(a=a.first;null!==a&&0>=ec(a.priorityLevel,b);)c=a,a=a.next;return c}function Ld(a){var b=a.alternate,c=a.updateQueue;null===c&&(c=a.updateQueue=Jd());null!==b?(a=b.updateQueue,null===a&&(a=b.updateQueue=Jd())):a=null;return[c,a!==c?a:null]}function hb(a,b){var c=Ld(a);a=c[0];c=c[1];var d=Kd(a,b),e=null!==d?d.next:a.first;if(null===c)return mc(a,b,d,e),null;var f=Kd(c,b),g=null!==f?f.next:c.first;mc(a,
74
-b,d,e);if(e===g&&null!==e||d===f&&null!==d)return null===f&&(c.first=b),null===g&&(c.last=null),null;b={priorityLevel:b.priorityLevel,partialState:b.partialState,callback:b.callback,isReplace:b.isReplace,isForced:b.isForced,isTopLevelUnmount:b.isTopLevelUnmount,next:null};mc(c,b,f,g);return b}function jd(a,b,c,d){a=a.partialState;return"function"===typeof a?a.call(b,c,d):a}function Ea(a){return 2===a.tag&&null!=a.type.childContextTypes}function gd(a,b){var c=a.stateNode,d=a.type.childContextTypes;
75
-if("function"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:k("108",Ba(a)||"Unknown",e);return D({},b,c)}function M(a,b,c){this.tag=a;this.key=b;this.stateNode=this.type=null;this.sibling=this.child=this["return"]=null;this.index=0;this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null;this.internalContextTag=c;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.pendingWorkPriority=0;this.alternate=null}
76
-function Ja(a){if(null===a||"undefined"===typeof a)return null;a=Md&&a[Md]||a["@@iterator"];return"function"===typeof a?a:null}function Ka(a,b){var c=b.ref;if(null!==c&&"function"!==typeof c){if(b._owner){b=b._owner;var d=void 0;b&&("number"===typeof b.tag?(2!==b.tag?k("110"):void 0,d=b.stateNode):d=b.getPublicInstance());d?void 0:k("147",c);var e=""+c;if(null!==a&&null!==a.ref&&a.ref._stringRef===e)return a.ref;a=function(a){var b=d.refs===ba?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};a._stringRef=
77
-e;return a}"string"!==typeof c?k("148"):void 0;b._owner?void 0:k("149",c)}return c}function rb(a,b){"textarea"!==a.type&&k("31","[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,"")}function nc(a,b){function c(c,d){if(b){if(!a){if(null===d.alternate)return;d=d.alternate}var e=c.lastEffect;null!==e?(e.nextEffect=d,c.lastEffect=d):c.firstEffect=c.lastEffect=d;d.nextEffect=null;d.effectTag=8}}function d(a,d){if(!b)return null;for(;null!==d;)c(a,
78
-d),d=d.sibling;return null}function e(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function f(b,c){if(a)return b=Yb(b,c),b.index=0,b.sibling=null,b;b.pendingWorkPriority=c;b.effectTag=0;b.index=0;b.sibling=null;return b}function g(a,c,d){a.index=d;if(!b)return c;d=a.alternate;if(null!==d)return d=d.index,d<c?(a.effectTag=2,c):d;a.effectTag=2;return c}function h(a){b&&null===a.alternate&&(a.effectTag=2);return a}function p(a,b,c,d){if(null===b||6!==
79
-b.tag)return c=cc(c,a.internalContextTag,d),c["return"]=a,c;b=f(b,d);b.pendingProps=c;b["return"]=a;return b}function m(a,b,c,d){if(null===b||b.type!==c.type)return d=dc(c,a.internalContextTag,d),d.ref=Ka(b,c),d["return"]=a,d;d=f(b,d);d.ref=Ka(b,c);d.pendingProps=c.props;d["return"]=a;return d}function n(a,b,c,d){if(null===b||7!==b.tag)return c=bc(c,a.internalContextTag,d),c["return"]=a,c;b=f(b,d);b.pendingProps=c;b["return"]=a;return b}function q(a,b,c,d){if(null===b||9!==b.tag)return b=new M(9,
80
-null,a.internalContextTag),b.type=c.value,b["return"]=a,b;b=f(b,d);b.type=c.value;b["return"]=a;return b}function w(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return c=ac(c,a.internalContextTag,d),c["return"]=a,c;b=f(b,d);b.pendingProps=c.children||[];b["return"]=a;return b}function x(a,b,c,d){if(null===b||10!==b.tag)return c=id(c,a.internalContextTag,d),c["return"]=a,c;b=f(b,d);b.pendingProps=c;b["return"]=a;return b}
81
-function z(a,b,c){if("string"===typeof b||"number"===typeof b)return b=cc(""+b,a.internalContextTag,c),b["return"]=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case La:return c=dc(b,a.internalContextTag,c),c.ref=Ka(null,b),c["return"]=a,c;case sb:return b=bc(b,a.internalContextTag,c),b["return"]=a,b;case tb:return c=new M(9,null,a.internalContextTag),c.type=b.value,c["return"]=a,c;case Ma:return b=ac(b,a.internalContextTag,c),b["return"]=a,b}if(ub(b)||Ja(b))return b=id(b,a.internalContextTag,
82
-c),b["return"]=a,b;rb(a,b)}return null}function D(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:p(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case La:return c.key===e?m(a,b,c,d):null;case sb:return c.key===e?n(a,b,c,d):null;case tb:return null===e?q(a,b,c,d):null;case Ma:return c.key===e?w(a,b,c,d):null}if(ub(c)||Ja(c))return null!==e?null:x(a,b,c,d);rb(a,c)}return null}function E(a,b,c,d,e){if("string"===typeof d||"number"===
83
-typeof d)return a=a.get(c)||null,p(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case La:return a=a.get(null===d.key?c:d.key)||null,m(b,a,d,e);case sb:return a=a.get(null===d.key?c:d.key)||null,n(b,a,d,e);case tb:return a=a.get(c)||null,q(b,a,d,e);case Ma:return a=a.get(null===d.key?c:d.key)||null,w(b,a,d,e)}if(ub(d)||Ja(d))return a=a.get(c)||null,x(b,a,d,e);rb(b,d)}return null}function F(a,f,h,k){for(var l=null,r=null,p=f,u=f=0,m=null;null!==p&&u<h.length;u++){p.index>u?(m=p,p=
84
-null):m=p.sibling;var t=D(a,p,h[u],k);if(null===t){null===p&&(p=m);break}b&&p&&null===t.alternate&&c(a,p);f=g(t,f,u);null===r?l=t:r.sibling=t;r=t;p=m}if(u===h.length)return d(a,p),l;if(null===p){for(;u<h.length;u++)if(p=z(a,h[u],k))f=g(p,f,u),null===r?l=p:r.sibling=p,r=p;return l}for(p=e(a,p);u<h.length;u++)if(m=E(p,a,u,h[u],k)){if(b&&null!==m.alternate)p["delete"](null===m.key?u:m.key);f=g(m,f,u);null===r?l=m:r.sibling=m;r=m}b&&p.forEach(function(b){return c(a,b)});return l}function G(a,f,h,p){var l=
85
-Ja(h);"function"!==typeof l?k("150"):void 0;h=l.call(h);null==h?k("151"):void 0;for(var r=l=null,m=f,u=f=0,t=null,n=h.next();null!==m&&!n.done;u++,n=h.next()){m.index>u?(t=m,m=null):t=m.sibling;var q=D(a,m,n.value,p);if(null===q){m||(m=t);break}b&&m&&null===q.alternate&&c(a,m);f=g(q,f,u);null===r?l=q:r.sibling=q;r=q;m=t}if(n.done)return d(a,m),l;if(null===m){for(;!n.done;u++,n=h.next())n=z(a,n.value,p),null!==n&&(f=g(n,f,u),null===r?l=n:r.sibling=n,r=n);return l}for(m=e(a,m);!n.done;u++,n=h.next())if(n=
86
-E(m,a,u,n.value,p),null!==n){if(b&&null!==n.alternate)m["delete"](null===n.key?u:n.key);f=g(n,f,u);null===r?l=n:r.sibling=n;r=n}b&&m.forEach(function(b){return c(a,b)});return l}function y(a,b,e,g){for(var h=e.key,l=b;null!==l;){if(l.key===h){if(l.type===e.type)return d(a,l.sibling),b=f(l,g),b.ref=Ka(l,e),b.pendingProps=e.props,b["return"]=a,b;d(a,l);break}else c(a,l);l=l.sibling}l=dc(e,a.internalContextTag,g);l.ref=Ka(b,e);l["return"]=a;return l}function B(a,b,e,g){for(var h=e.key;null!==b;){if(b.key===
87
-h){if(4===b.tag&&b.stateNode.containerInfo===e.containerInfo&&b.stateNode.implementation===e.implementation)return d(a,b.sibling),g=f(b,g),g.pendingProps=e.children||[],g["return"]=a,g;d(a,b);break}else c(a,b);b=b.sibling}e=ac(e,a.internalContextTag,g);e["return"]=a;return e}return function(a,b,e,g){var l=ib.disableNewFiberFeatures,p="object"===typeof e&&null!==e;if(p)if(l)switch(e.$$typeof){case La:return h(y(a,b,e,g));case Ma:return h(B(a,b,e,g))}else switch(e.$$typeof){case La:return h(y(a,b,e,
88
-g));case sb:a:{for(l=e.key;null!==b;){if(b.key===l)if(7===b.tag){d(a,b.sibling);b=f(b,g);b.pendingProps=e;b["return"]=a;a=b;break a}else{d(a,b);break}else c(a,b);b=b.sibling}e=bc(e,a.internalContextTag,g);e["return"]=a;a=e}return h(a);case tb:a:{if(null!==b)if(9===b.tag){d(a,b.sibling);b=f(b,g);b.type=e.value;b["return"]=a;a=b;break a}else d(a,b);b=new M(9,null,a.internalContextTag);b.type=e.value;b["return"]=a;a=b}return h(a);case Ma:return h(B(a,b,e,g))}if(l)switch(a.tag){case 2:var m=a.type;null!==
89
-e&&!1!==e?k("109",m.displayName||m.name||"Component"):void 0;break;case 1:m=a.type,null!==e&&!1!==e?k("105",m.displayName||m.name||"Component"):void 0}if("string"===typeof e||"number"===typeof e)return e=""+e,null!==b&&6===b.tag?(d(a,b.sibling),b=f(b,g),b.pendingProps=e,b["return"]=a,a=b):(d(a,b),e=cc(e,a.internalContextTag,g),e["return"]=a,a=e),h(a);if(ub(e))return F(a,b,e,g);if(Ja(e))return G(a,b,e,g);p&&rb(a,e);if(!l&&"undefined"===typeof e)switch(a.tag){case 2:case 1:e=a.type,k("152",e.displayName||
90
-e.name||"Component")}return d(a,b)}}function hd(a,b){return a===b?0!==a||0!==b||1/a===1/b:a!==a&&b!==b}function Nd(a){return function(b){try{return a(b)}catch(c){}}}function oc(a){if(!a)return ba;a=ha.get(a);return"number"===typeof a.tag?Uc(a):a._processChildContext(a._context)}function Tc(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Od(a,b){return a&&b?a===b?!0:Qc(a)?!1:Qc(b)?Od(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):
91
-!1:!1}function P(a){if(void 0!==a._hostParent)return a._hostParent;if("number"===typeof a.tag){do a=a["return"];while(a&&5!==a.tag);if(a)return a}return null}function Pd(a,b){for(var c=0,d=a;d;d=P(d))c++;d=0;for(var e=b;e;e=P(e))d++;for(;0<c-d;)a=P(a),c--;for(;0<d-c;)b=P(b),d--;for(;c--;){if(a===b||a===b.alternate)return a;a=P(a);b=P(b)}return null}function Qd(a,b,c){if(b=Rd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ta(c._dispatchListeners,b),c._dispatchInstances=ta(c._dispatchInstances,
92
-a)}function pf(a){a&&a.dispatchConfig.phasedRegistrationNames&&vb.traverseTwoPhase(a._targetInst,Qd,a)}function qf(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?vb.getParentInstance(b):null;vb.traverseTwoPhase(b,Qd,a)}}function Sd(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Rd(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=ta(c._dispatchListeners,b),c._dispatchInstances=ta(c._dispatchInstances,a))}function rf(a){a&&a.dispatchConfig.registrationName&&
93
-Sd(a._targetInst,null,a)}function Na(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?z.thatReturnsTrue:z.thatReturnsFalse;this.isPropagationStopped=z.thatReturnsFalse;return this}function sf(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,
94
-a,b,c,d);return e}return new this(a,b,c,d)}function tf(a){a instanceof this?void 0:k("223");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function Td(a){a.eventPool=[];a.getPooled=sf;a.release=tf}function Ud(a,b,c,d){return E.call(this,a,b,c,d)}function Vd(a,b,c,d){return E.call(this,a,b,c,d)}function uf(){var a=window.opera;return"object"===typeof a&&"function"===typeof a.version&&12>=parseInt(a.version(),10)}function Wd(a,b){switch(a){case "topKeyUp":return-1!==vf.indexOf(b.keyCode);
95
-case "topKeyDown":return 229!==b.keyCode;case "topKeyPress":case "topMouseDown":case "topBlur":return!0;default:return!1}}function Xd(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}function wf(a,b){switch(a){case "topCompositionEnd":return Xd(b);case "topKeyPress":if(32!==b.which)return null;Yd=!0;return Zd;case "topTextInput":return a=b.data,a===Zd&&Yd?null:a;default:return null}}function xf(a,b){if(wa)return"topCompositionEnd"===a||!pc&&Wd(a,b)?(a=wb.getData(),wb.reset(),wa=!1,
96
-a):null;switch(a){case "topPaste":return null;case "topKeyPress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "topCompositionEnd":return $d?null:b.data;default:return null}}function ae(a,b,c){a=E.getPooled(be.change,a,b,c);a.type="change";xb.enqueueStateRestore(c);ma.accumulateTwoPhaseDispatches(a);return a}function yf(a){X.enqueueEvents(a);X.processEventQueue(!1)}function yb(a){var b=
97
-x.getNodeFromInstance(a);if(xa.updateValueIfChanged(b))return a}function zf(a,b){if("topChange"===a)return b}function ce(){Oa&&(Oa.detachEvent("onpropertychange",de),Pa=Oa=null)}function de(a){"value"===a.propertyName&&yb(Pa)&&(a=ae(Pa,a,kb(a)),zb.batchedUpdates(yf,a))}function Af(a,b,c){"topFocus"===a?(ce(),Oa=b,Pa=c,Oa.attachEvent("onpropertychange",de)):"topBlur"===a&&ce()}function Bf(a){if("topSelectionChange"===a||"topKeyUp"===a||"topKeyDown"===a)return yb(Pa)}function Cf(a,b){if("topClick"===
98
-a)return yb(b)}function Df(a,b){if("topInput"===a||"topChange"===a)return yb(b)}function ee(a,b,c,d){return E.call(this,a,b,c,d)}function Me(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Ef[a])?!!b[a]:!1}function fe(a,b,c,d){return aa.call(this,a,b,c,d)}function ge(a,b){if(qc||null==ya||ya!==Pb())return null;var c=ya;"selectionStart"in c&&rc.hasSelectionCapabilities(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,
99
-anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return Qa&&$b(Qa,c)?null:(Qa=c,a=E.getPooled(he.select,sc,a,b),a.type="select",a.target=ya,ma.accumulateTwoPhaseDispatches(a),a)}function ie(a,b,c,d){return E.call(this,a,b,c,d)}function je(a,b,c,d){return E.call(this,a,b,c,d)}function ke(a,b,c,d){return aa.call(this,a,b,c,d)}function le(a,b,c,d){return aa.call(this,a,b,c,d)}function me(a,b,c,d){return na.call(this,a,b,c,d)}function ne(a,b,c,d){return aa.call(this,
100
-a,b,c,d)}function oe(a,b,c,d){return E.call(this,a,b,c,d)}function pe(a,b,c,d){return na.call(this,a,b,c,d)}function qe(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function Ff(a){a=a?9===a.nodeType?a.documentElement:a.firstChild:null;return!(!a||1!==a.nodeType||!a.hasAttribute(Gf))}function Ab(a,b,c,d,e){qe(c)?void 0:k("200");var f=c._reactRootContainer;if(f)G.updateContainer(b,f,a,e);else{if(!d&&!Ff(c))for(d=void 0;d=
101
-c.lastChild;)c.removeChild(d);var g=G.createContainer(c);f=c._reactRootContainer=g;G.unbatchedUpdates(function(){G.updateContainer(b,g,a,e)})}return G.getPublicRootInstance(f)}qd(ab,"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");var m=!("undefined"===typeof window||!window.document||!window.document.createElement),re=Object.getOwnPropertySymbols,Hf=Object.prototype.hasOwnProperty,If=Object.prototype.propertyIsEnumerable,D=function(){try{if(!Object.assign)return!1;
102
-var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var c={};"abcdefghijklmnopqrst".split("").forEach(function(a){c[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},c)).join("")?!1:!0}catch(d){return!1}}()?Object.assign:function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");
103
-var c=Object(a);for(var d,e=1;e<arguments.length;e++){var f=Object(arguments[e]);for(var g in f)Hf.call(f,g)&&(c[g]=f[g]);if(re){d=re(f);for(var h=0;h<d.length;h++)If.call(f,d[h])&&(c[d[h]]=f[d[h]])}}return c},lb=null,ua={},ia={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(a){lb?k("101"):void 0;lb=Array.prototype.slice.call(a);rd()},injectEventPluginsByName:function(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=
104
-a[c];ua.hasOwnProperty(c)&&ua[c]===d||(ua[c]?k("102",c):void 0,ua[c]=d,b=!0)}b&&rd()}},oa=ia;la.thatReturns=mb;la.thatReturnsFalse=mb(!1);la.thatReturnsTrue=mb(!0);la.thatReturnsNull=mb(null);la.thatReturnsThis=function(){return this};la.thatReturnsArgument=function(a){return a};var z=la,se={listen:function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),{remove:function(){a.removeEventListener(b,c,!1)}};if(a.attachEvent)return a.attachEvent("on"+b,c),{remove:function(){a.detachEvent("on"+
105
-b,c)}}},capture:function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!0),{remove:function(){a.removeEventListener(b,c,!0)}}):{remove:z}},registerDefault:function(){}},Jf={children:!0,dangerouslysetinnerhtml:!0,autofocus:!0,defaultvalue:!0,defaultchecked:!0,innerhtml:!0,suppresscontenteditablewarning:!0,onfocusin:!0,onfocusout:!0,style:!0},te={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(a){var b=
106
-te,c=a.Properties||{},d=a.DOMAttributeNamespaces||{},e=a.DOMAttributeNames||{};a=a.DOMMutationMethods||{};for(var f in c){pa.properties.hasOwnProperty(f)?k("48",f):void 0;var g=f.toLowerCase(),h=c[f];g={attributeName:g,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseProperty:Ia(h,b.MUST_USE_PROPERTY),hasBooleanValue:Ia(h,b.HAS_BOOLEAN_VALUE),hasNumericValue:Ia(h,b.HAS_NUMERIC_VALUE),hasPositiveNumericValue:Ia(h,b.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:Ia(h,b.HAS_OVERLOADED_BOOLEAN_VALUE)};
107
-1>=g.hasBooleanValue+g.hasNumericValue+g.hasOverloadedBooleanValue?void 0:k("50",f);e.hasOwnProperty(f)&&(g.attributeName=e[f]);d.hasOwnProperty(f)&&(g.attributeNamespace=d[f]);a.hasOwnProperty(f)&&(g.mutationMethod=a[f]);pa.properties[f]=g}}},pa={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",
108
-ATTRIBUTE_NAME_CHAR:":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},shouldSetAttribute:function(a,b){if(pa.isReservedProp(a))return!1;if(null===b)return!0;var c=a.toLowerCase();a=pa.properties[a];switch(typeof b){case "boolean":if(a)return!0;b=c.slice(0,5);return"data-"===b||"aria-"===b;case "undefined":case "number":case "string":return!0;
109
-case "object":return!0;default:return!1}},getPropertyInfo:function(a){return pa.properties.hasOwnProperty(a)?pa.properties[a]:null},isReservedProp:function(a){return Jf.hasOwnProperty(a.toLowerCase())},injection:te},K=pa,gf=K.ID_ATTRIBUTE_NAME,vd={hasCachedChildNodes:1},ue=Math.random().toString(36).slice(2),R="__reactInternalInstance$"+ue,ve="__reactEventHandlers$"+ue,x={getClosestInstanceFromNode:wd,getInstanceFromNode:function(a){var b=a[R];if(b)return 5===b.tag||6===b.tag?b:b._hostNode===a?b:
110
-null;b=wd(a);return null!=b&&b._hostNode===a?b:null},getNodeFromInstance:function(a){if(5===a.tag||6===a.tag)return a.stateNode;void 0===a._hostNode?k("33"):void 0;if(a._hostNode)return a._hostNode;for(var b=[];!a._hostNode;)b.push(a),a._hostParent?void 0:k("34"),a=a._hostParent;for(;b.length;a=b.pop())jc(a,a._hostNode);return a._hostNode},precacheChildNodes:jc,precacheNode:ud,uncacheNode:function(a){var b=a._hostNode;b&&(delete b[R],a._hostNode=null)},precacheFiberNode:function(a,b){b[R]=a},getFiberCurrentPropsFromNode:function(a){return a[ve]||
111
-null},updateFiberProps:function(a,b){a[ve]=b}},ha={remove:function(a){a._reactInternalFiber=void 0},get:function(a){return a._reactInternalFiber},has:function(a){return void 0!==a._reactInternalFiber},set:function(a,b){a._reactInternalFiber=b}},tc={ReactCurrentOwner:ab.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner},Ra={isFiberMounted:function(a){return 2===nb(a)},isMounted:function(a){return(a=ha.get(a))?2===nb(a):!1},findCurrentFiberUsingSlowPath:kc,findCurrentHostFiber:function(a){a=
112
-kc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b["return"]||b["return"]===a)return null;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}}return null},findCurrentHostFiberWithNoPortals:function(a){a=kc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child&&4!==b.tag)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b["return"]||b["return"]===
113
-a)return null;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}}return null}},w={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(a){"function"!==typeof a.invokeGuardedCallback?k("197"):void 0;pd=a.invokeGuardedCallback}},invokeGuardedCallback:function(a,b,c,d,e,f,g,h,k){pd.apply(w,arguments)},invokeGuardedCallbackAndCatchFirstError:function(a,b,c,d,e,f,g,h,k){w.invokeGuardedCallback.apply(this,arguments);if(w.hasCaughtError()){var p=
114
-w.clearCaughtError();w._hasRethrowError||(w._hasRethrowError=!0,w._rethrowError=p)}},rethrowCaughtError:function(){return ff.apply(w,arguments)},hasCaughtError:function(){return w._hasCaughtError},clearCaughtError:function(){if(w._hasCaughtError){var a=w._caughtError;w._caughtError=null;w._hasCaughtError=!1;return a}k("198")}},zd=w,Bb,lc={isEndish:function(a){return"topMouseUp"===a||"topTouchEnd"===a||"topTouchCancel"===a},isMoveish:function(a){return"topMouseMove"===a||"topTouchMove"===a},isStartish:function(a){return"topMouseDown"===
115
-a||"topTouchStart"===a},executeDirectDispatch:function(a){var b=a._dispatchListeners,c=a._dispatchInstances;Array.isArray(b)?k("103"):void 0;a.currentTarget=b?lc.getNodeFromInstance(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b},executeDispatchesInOrder:function(a,b){var c=a._dispatchListeners,d=a._dispatchInstances;if(Array.isArray(c))for(var e=0;e<c.length&&!a.isPropagationStopped();e++)yd(a,b,c[e],d[e]);else c&&yd(a,b,c,d);a._dispatchListeners=
116
-null;a._dispatchInstances=null},executeDispatchesInOrderStopAtTrue:function(a){a:{var b=a._dispatchListeners;var c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++){if(b[d](a,c[d])){b=c[d];break a}}else if(b&&b(a,c)){b=c;break a}b=null}a._dispatchInstances=null;a._dispatchListeners=null;return b},hasDispatches:function(a){return!!a._dispatchListeners},getFiberCurrentPropsFromNode:function(a){return Bb.getFiberCurrentPropsFromNode(a)},getInstanceFromNode:function(a){return Bb.getInstanceFromNode(a)},
117
-getNodeFromInstance:function(a){return Bb.getNodeFromInstance(a)},injection:{injectComponentTree:function(a){Bb=a}}},Ga=lc,ob=null,Sa=null,Ta=null,xb={injection:{injectFiberControlledHostComponent:function(a){ob=a}},enqueueStateRestore:function(a){Sa?Ta?Ta.push(a):Ta=[a]:Sa=a},restoreStateIfNeeded:function(){if(Sa){var a=Sa,b=Ta;Ta=Sa=null;Ad(a);if(b)for(a=0;a<b.length;a++)Ad(b[a])}}},uc=!1,zb={batchedUpdates:function(a,b){if(uc)return ic(Bd,a,b);uc=!0;try{return ic(Bd,a,b)}finally{uc=!1,xb.restoreStateIfNeeded()}},
118
-injection:{injectStackBatchedUpdates:function(a){ic=a},injectFiberBatchedUpdates:function(a){od=a}}},Cb=[],ja={_enabled:!0,_handleTopLevel:null,setHandleTopLevel:function(a){ja._handleTopLevel=a},setEnabled:function(a){ja._enabled=!!a},isEnabled:function(){return ja._enabled},trapBubbledEvent:function(a,b,c){return c?se.listen(c,b,ja.dispatchEvent.bind(null,a)):null},trapCapturedEvent:function(a,b,c){return c?se.capture(c,b,ja.dispatchEvent.bind(null,a)):null},dispatchEvent:function(a,b){if(ja._enabled){var c=
119
-kb(b);c=x.getClosestInstanceFromNode(c);null===c||"number"!==typeof c.tag||Ra.isFiberMounted(c)||(c=null);if(Cb.length){var d=Cb.pop();d.topLevelType=a;d.nativeEvent=b;d.targetInst=c;a=d}else a={topLevelType:a,nativeEvent:b,targetInst:c,ancestors:[]};try{zb.batchedUpdates(hf,a)}finally{a.topLevelType=null,a.nativeEvent=null,a.targetInst=null,a.ancestors.length=0,10>Cb.length&&Cb.push(a)}}}},L=ja,Ua=null,X={injection:{injectEventPluginOrder:oa.injectEventPluginOrder,injectEventPluginsByName:oa.injectEventPluginsByName},
120
-getListener:function(a,b){if("number"===typeof a.tag){var c=a.stateNode;if(!c)return null;var d=Ga.getFiberCurrentPropsFromNode(c);if(!d)return null;c=d[b];if(Cd(b,a.type,d))return null}else{d=a._currentElement;if("string"===typeof d||"number"===typeof d||!a._rootNodeID)return null;a=d.props;c=a[b];if(Cd(b,d.type,a))return null}qd(!c||"function"===typeof c,"Expected `%s` listener to be a function, instead got a value of `%s` type.",b,typeof c);return c},extractEvents:function(a,b,c,d){for(var e,f=
121
-oa.plugins,g=0;g<f.length;g++){var h=f[g];h&&(h=h.extractEvents(a,b,c,d))&&(e=ta(e,h))}return e},enqueueEvents:function(a){a&&(Ua=ta(Ua,a))},processEventQueue:function(a){var b=Ua;Ua=null;a?Ha(b,ef):Ha(b,df);Ua?k("95"):void 0;zd.rethrowCaughtError()}},md;m&&(md=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var sa={animationend:pb("Animation","AnimationEnd"),animationiteration:pb("Animation","AnimationIteration"),animationstart:pb("Animation",
122
-"AnimationStart"),transitionend:pb("Transition","TransitionEnd")},hc={},ld={};m&&(ld=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);var we={topAbort:"abort",topAnimationEnd:jb("animationend")||"animationend",topAnimationIteration:jb("animationiteration")||"animationiteration",topAnimationStart:jb("animationstart")||
123
-"animationstart",topBlur:"blur",topCancel:"cancel",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",
124
-topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoad:"load",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",
125
-topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:jb("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},Ed={},jf=0,qb=
126
-"_reactListenersID"+(""+Math.random()).slice(2),n=D({},{handleTopLevel:function(a,b,c,d){a=X.extractEvents(a,b,c,d);X.enqueueEvents(a);X.processEventQueue(!1)}},{setEnabled:function(a){L&&L.setEnabled(a)},isEnabled:function(){return!(!L||!L.isEnabled())},listenTo:function(a,b){var c=Dd(b);a=oa.registrationNameDependencies[a];for(var d=0;d<a.length;d++){var e=a[d];c.hasOwnProperty(e)&&c[e]||("topWheel"===e?Fa("wheel")?L.trapBubbledEvent("topWheel","wheel",b):Fa("mousewheel")?L.trapBubbledEvent("topWheel",
127
-"mousewheel",b):L.trapBubbledEvent("topWheel","DOMMouseScroll",b):"topScroll"===e?L.trapCapturedEvent("topScroll","scroll",b):"topFocus"===e||"topBlur"===e?(L.trapCapturedEvent("topFocus","focus",b),L.trapCapturedEvent("topBlur","blur",b),c.topBlur=!0,c.topFocus=!0):"topCancel"===e?(Fa("cancel",!0)&&L.trapCapturedEvent("topCancel","cancel",b),c.topCancel=!0):"topClose"===e?(Fa("close",!0)&&L.trapCapturedEvent("topClose","close",b),c.topClose=!0):we.hasOwnProperty(e)&&L.trapBubbledEvent(e,we[e],b),
128
-c[e]=!0)}},isListeningToAllDependencies:function(a,b){b=Dd(b);a=oa.registrationNameDependencies[a];for(var c=0;c<a.length;c++){var d=a[c];if(!b.hasOwnProperty(d)||!b[d])return!1}return!0},trapBubbledEvent:function(a,b,c){return L.trapBubbledEvent(a,b,c)},trapCapturedEvent:function(a,b,c){return L.trapCapturedEvent(a,b,c)}}),ib={disableNewFiberFeatures:!1,enableAsyncSubtreeAPI:!1},Va={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,
129
-boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kf=["Webkit",
130
-"ms","Moz","O"];Object.keys(Va).forEach(function(a){Kf.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Va[b]=Va[a]})});var Lf={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,
131
-borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},xe=!1;if(m){var Mf=document.createElement("div").style;try{Mf.font=""}catch(a){xe=!0}}var ye={createDangerousStringForStyles:function(){},setValueForStyles:function(a,b){a=a.style;
132
-for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--");var e=c;var f=b[c];e=null==f||"boolean"===typeof f||""===f?"":d||"number"!==typeof f||0===f||Va.hasOwnProperty(e)&&Va[e]?(""+f).trim():f+"px";"float"===c&&(c="cssFloat");if(d)a.setProperty(c,e);else if(e)a[c]=e;else if(d=xe&&Lf[c])for(var g in d)a[g]="";else a[c]=""}}},lf=new RegExp("^["+K.ATTRIBUTE_NAME_START_CHAR+"]["+K.ATTRIBUTE_NAME_CHAR+"]*$"),Gd={},Fd={},vc={setAttributeForID:function(a,b){a.setAttribute(K.ID_ATTRIBUTE_NAME,b)},
133
-setAttributeForRoot:function(a){a.setAttribute(K.ROOT_ATTRIBUTE_NAME,"")},getValueForProperty:function(){},getValueForAttribute:function(){},setValueForProperty:function(a,b,c){var d=K.getPropertyInfo(b);if(d&&K.shouldSetAttribute(b,c)){var e=d.mutationMethod;e?e(a,c):null==c||d.hasBooleanValue&&!c||d.hasNumericValue&&isNaN(c)||d.hasPositiveNumericValue&&1>c||d.hasOverloadedBooleanValue&&!1===c?vc.deleteValueForProperty(a,b):d.mustUseProperty?a[d.propertyName]=c:(b=d.attributeName,(e=d.attributeNamespace)?
134
-a.setAttributeNS(e,b,""+c):d.hasBooleanValue||d.hasOverloadedBooleanValue&&!0===c?a.setAttribute(b,""):a.setAttribute(b,""+c))}else vc.setValueForAttribute(a,b,K.shouldSetAttribute(b,c)?c:null)},setValueForAttribute:function(a,b,c){kf(b)&&(null==c?a.removeAttribute(b):a.setAttribute(b,""+c))},deleteValueForAttribute:function(a,b){a.removeAttribute(b)},deleteValueForProperty:function(a,b){var c=K.getPropertyInfo(b);c?(b=c.mutationMethod)?b(a,void 0):c.mustUseProperty?a[c.propertyName]=c.hasBooleanValue?
135
-!1:"":a.removeAttribute(c.attributeName):a.removeAttribute(b)}},qa=vc,ze=tc.ReactDebugCurrentFrame,Wa={current:null,phase:null,resetCurrentFiber:function(){ze.getCurrentStack=null;Wa.current=null;Wa.phase=null},setCurrentFiber:function(a,b){ze.getCurrentStack=Hd;Wa.current=a;Wa.phase=b},getCurrentFiberOwnerName:function(){return null},getCurrentFiberStackAddendum:Hd},Nf=Wa,wc={getHostProps:function(a,b){var c=b.value,d=b.checked;return D({type:void 0,step:void 0,min:void 0,max:void 0},b,{defaultChecked:void 0,
136
-defaultValue:void 0,value:null!=c?c:a._wrapperState.initialValue,checked:null!=d?d:a._wrapperState.initialChecked})},initWrapperState:function(a,b){var c=b.defaultValue;a._wrapperState={initialChecked:null!=b.checked?b.checked:b.defaultChecked,initialValue:null!=b.value?b.value:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}},updateWrapper:function(a,b){var c=b.checked;null!=c&&qa.setValueForProperty(a,"checked",c||!1);c=b.value;if(null!=c)if(0===c&&""===a.value)a.value=
137
-"0";else if("number"===b.type){if(b=parseFloat(a.value)||0,c!=b||c==b&&a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else null==b.value&&null!=b.defaultValue&&a.defaultValue!==""+b.defaultValue&&(a.defaultValue=""+b.defaultValue),null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)},postMountWrapper:function(a,b){switch(b.type){case "submit":case "reset":break;case "color":case "date":case "datetime":case "datetime-local":case "month":case "time":case "week":a.value=
138
-"";a.value=a.defaultValue;break;default:a.value=a.value}b=a.name;""!==b&&(a.name="");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!a.defaultChecked;""!==b&&(a.name=b)},restoreControlledState:function(a,b){wc.updateWrapper(a,b);var c=b.name;if("radio"===b.type&&null!=c){for(b=a;b.parentNode;)b=b.parentNode;c=b.querySelectorAll("input[name\x3d"+JSON.stringify(""+c)+'][type\x3d"radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=x.getFiberCurrentPropsFromNode(d);e?void 0:
139
-k("90");wc.updateWrapper(d,e)}}}}},Y=wc,za={validateProps:function(){},postMountWrapper:function(a,b){null!=b.value&&a.setAttribute("value",b.value)},getHostProps:function(a,b){a=D({children:void 0},b);if(b=mf(b.children))a.children=b;return a}},ka={getHostProps:function(a,b){return D({},b,{value:void 0})},initWrapperState:function(a,b){var c=b.value;a._wrapperState={initialValue:null!=c?c:b.defaultValue,wasMultiple:!!b.multiple}},postMountWrapper:function(a,b){a.multiple=!!b.multiple;var c=b.value;
140
-null!=c?va(a,!!b.multiple,c):null!=b.defaultValue&&va(a,!!b.multiple,b.defaultValue)},postUpdateWrapper:function(a,b){a._wrapperState.initialValue=void 0;var c=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!b.multiple;var d=b.value;null!=d?va(a,!!b.multiple,d):c!==!!b.multiple&&(null!=b.defaultValue?va(a,!!b.multiple,b.defaultValue):va(a,!!b.multiple,b.multiple?[]:""))},restoreControlledState:function(a,b){var c=b.value;null!=c&&va(a,!!b.multiple,c)}},Ae={getHostProps:function(a,b){null!=
141
-b.dangerouslySetInnerHTML?k("91"):void 0;return D({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})},initWrapperState:function(a,b){var c=b.value,d=c;null==c&&(c=b.defaultValue,b=b.children,null!=b&&(null!=c?k("92"):void 0,Array.isArray(b)&&(1>=b.length?void 0:k("93"),b=b[0]),c=""+b),null==c&&(c=""),d=c);a._wrapperState={initialValue:""+d}},updateWrapper:function(a,b){var c=b.value;null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));
142
-null!=b.defaultValue&&(a.defaultValue=b.defaultValue)},postMountWrapper:function(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)},restoreControlledState:function(a,b){Ae.updateWrapper(a,b)}},ea=Ae,cf=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),xa={_getTrackerFromNode:function(a){return a._valueTracker},track:function(a){a._valueTracker||(a._valueTracker=nf(a))},updateValueIfChanged:function(a){if(!a)return!1;
143
-var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Id(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1},stopTracking:function(a){(a=a._valueTracker)&&a.stopTracking()}},Db,xc=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else for(Db=Db||document.createElement("div"),
144
-Db.innerHTML="\x3csvg\x3e"+b+"\x3c/svg\x3e",b=Db.firstChild;b.firstChild;)a.appendChild(b.firstChild)}),Of=/["'&<>]/;m&&("textContent"in document.documentElement||(kd=function(a,b){if(3===a.nodeType)a.nodeValue=b;else{if("boolean"===typeof b||"number"===typeof b)b=""+b;else{b=""+b;var c=Of.exec(b);if(c){var d="",e,f=0;for(e=c.index;e<b.length;e++){switch(b.charCodeAt(e)){case 34:c="\x26quot;";break;case 38:c="\x26amp;";break;case 39:c="\x26#x27;";break;case 60:c="\x26lt;";break;case 62:c="\x26gt;";
145
-break;default:continue}f!==e&&(d+=b.substring(f,e));f=e+1;d+=c}b=f!==e?d+b.substring(f,e):d}}xc(a,b)}}));var yc=kd,zc=Nf.getCurrentFiberOwnerName,of=n.listenTo,Eb=oa.registrationNameModules,Aa={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",
146
-topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},F={createElement:function(a,b,c,d){c=9===c.nodeType?c:c.ownerDocument;"http://www.w3.org/1999/xhtml"===d&&(d=Mc(a));"http://www.w3.org/1999/xhtml"===d?"script"===a?(a=c.createElement("div"),a.innerHTML="\x3cscript\x3e\x3c/script\x3e",a=a.removeChild(a.firstChild)):a=b.is?
147
-c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a},setInitialProperties:function(a,b,c,d){var e=fc(b,c);switch(b){case "iframe":case "object":n.trapBubbledEvent("topLoad","load",a);var f=c;break;case "video":case "audio":for(f in Aa)Aa.hasOwnProperty(f)&&n.trapBubbledEvent(f,Aa[f],a);f=c;break;case "source":n.trapBubbledEvent("topError","error",a);f=c;break;case "img":case "image":n.trapBubbledEvent("topError","error",a);n.trapBubbledEvent("topLoad","load",a);f=c;break;
148
-case "form":n.trapBubbledEvent("topReset","reset",a);n.trapBubbledEvent("topSubmit","submit",a);f=c;break;case "details":n.trapBubbledEvent("topToggle","toggle",a);f=c;break;case "input":Y.initWrapperState(a,c);f=Y.getHostProps(a,c);n.trapBubbledEvent("topInvalid","invalid",a);W(d,"onChange");break;case "option":za.validateProps(a,c);f=za.getHostProps(a,c);break;case "select":ka.initWrapperState(a,c);f=ka.getHostProps(a,c);n.trapBubbledEvent("topInvalid","invalid",a);W(d,"onChange");break;case "textarea":ea.initWrapperState(a,
149
-c);f=ea.getHostProps(a,c);n.trapBubbledEvent("topInvalid","invalid",a);W(d,"onChange");break;default:f=c}gc(b,f,zc);var g=f,h;for(h in g)if(g.hasOwnProperty(h)){var k=g[h];"style"===h?ye.setValueForStyles(a,k):"dangerouslySetInnerHTML"===h?(k=k?k.__html:void 0,null!=k&&xc(a,k)):"children"===h?"string"===typeof k?yc(a,k):"number"===typeof k&&yc(a,""+k):"suppressContentEditableWarning"!==h&&(Eb.hasOwnProperty(h)?k&&W(d,h):e?qa.setValueForAttribute(a,h,k):null!=k&&qa.setValueForProperty(a,h,k))}switch(b){case "input":xa.track(a);
150
-Y.postMountWrapper(a,c);break;case "textarea":xa.track(a);ea.postMountWrapper(a,c);break;case "option":za.postMountWrapper(a,c);break;case "select":ka.postMountWrapper(a,c);break;default:"function"===typeof f.onClick&&(a.onclick=z)}},diffProperties:function(a,b,c,d,e){var f=null;switch(b){case "input":c=Y.getHostProps(a,c);d=Y.getHostProps(a,d);f=[];break;case "option":c=za.getHostProps(a,c);d=za.getHostProps(a,d);f=[];break;case "select":c=ka.getHostProps(a,c);d=ka.getHostProps(a,d);f=[];break;case "textarea":c=
151
-ea.getHostProps(a,c);d=ea.getHostProps(a,d);f=[];break;default:"function"!==typeof c.onClick&&"function"===typeof d.onClick&&(a.onclick=z)}gc(b,d,zc);var g,h;a=null;for(g in c)if(!d.hasOwnProperty(g)&&c.hasOwnProperty(g)&&null!=c[g])if("style"===g)for(h in b=c[g],b)b.hasOwnProperty(h)&&(a||(a={}),a[h]="");else"dangerouslySetInnerHTML"!==g&&"children"!==g&&"suppressContentEditableWarning"!==g&&(Eb.hasOwnProperty(g)?f||(f=[]):(f=f||[]).push(g,null));for(g in d){var k=d[g];b=null!=c?c[g]:void 0;if(d.hasOwnProperty(g)&&
152
-k!==b&&(null!=k||null!=b))if("style"===g)if(b){for(h in b)!b.hasOwnProperty(h)||k&&k.hasOwnProperty(h)||(a||(a={}),a[h]="");for(h in k)k.hasOwnProperty(h)&&b[h]!==k[h]&&(a||(a={}),a[h]=k[h])}else a||(f||(f=[]),f.push(g,a)),a=k;else"dangerouslySetInnerHTML"===g?(k=k?k.__html:void 0,b=b?b.__html:void 0,null!=k&&b!==k&&(f=f||[]).push(g,""+k)):"children"===g?b===k||"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(g,""+k):"suppressContentEditableWarning"!==g&&(Eb.hasOwnProperty(g)?(k&&W(e,g),f||
153
-b===k||(f=[])):(f=f||[]).push(g,k))}a&&(f=f||[]).push("style",a);return f},updateProperties:function(a,b,c,d,e){fc(c,d);d=fc(c,e);for(var f=0;f<b.length;f+=2){var g=b[f],h=b[f+1];"style"===g?ye.setValueForStyles(a,h):"dangerouslySetInnerHTML"===g?xc(a,h):"children"===g?yc(a,h):d?null!=h?qa.setValueForAttribute(a,g,h):qa.deleteValueForAttribute(a,g):null!=h?qa.setValueForProperty(a,g,h):qa.deleteValueForProperty(a,g)}switch(c){case "input":Y.updateWrapper(a,e);xa.updateValueIfChanged(a);break;case "textarea":ea.updateWrapper(a,
154
-e);break;case "select":ka.postUpdateWrapper(a,e)}},diffHydratedProperties:function(a,b,c,d){switch(b){case "iframe":case "object":n.trapBubbledEvent("topLoad","load",a);break;case "video":case "audio":for(var e in Aa)Aa.hasOwnProperty(e)&&n.trapBubbledEvent(e,Aa[e],a);break;case "source":n.trapBubbledEvent("topError","error",a);break;case "img":case "image":n.trapBubbledEvent("topError","error",a);n.trapBubbledEvent("topLoad","load",a);break;case "form":n.trapBubbledEvent("topReset","reset",a);n.trapBubbledEvent("topSubmit",
155
-"submit",a);break;case "details":n.trapBubbledEvent("topToggle","toggle",a);break;case "input":Y.initWrapperState(a,c);n.trapBubbledEvent("topInvalid","invalid",a);W(d,"onChange");break;case "option":za.validateProps(a,c);break;case "select":ka.initWrapperState(a,c);n.trapBubbledEvent("topInvalid","invalid",a);W(d,"onChange");break;case "textarea":ea.initWrapperState(a,c),n.trapBubbledEvent("topInvalid","invalid",a),W(d,"onChange")}gc(b,c,zc);e=null;for(var f in c)if(c.hasOwnProperty(f)){var g=c[f];
156
-"children"===f?"string"===typeof g?a.textContent!==g&&(e=["children",g]):"number"===typeof g&&a.textContent!==""+g&&(e=["children",""+g]):Eb.hasOwnProperty(f)&&g&&W(d,f)}switch(b){case "input":xa.track(a);Y.postMountWrapper(a,c);break;case "textarea":xa.track(a);ea.postMountWrapper(a,c);break;case "select":case "option":break;default:"function"===typeof c.onClick&&(a.onclick=z)}return e},diffHydratedText:function(a,b){return a.nodeValue!==b},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},
157
-warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(a,b,c){switch(b){case "input":Y.restoreControlledState(a,c);break;case "textarea":ea.restoreControlledState(a,c);break;case "select":ka.restoreControlledState(a,c)}}},Fb=void 0;if(m)if("function"!==typeof requestIdleCallback){var Be=null,Ac=null,Bc=!1,Cc=!1,Gb=0,Hb=33,Xa=33,Pf={timeRemaining:"object"===typeof performance&&"function"===typeof performance.now?function(){return Gb-performance.now()}:
158
-function(){return Gb-Date.now()}},Ce="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(a){a.source===window&&a.data===Ce&&(Bc=!1,a=Ac,Ac=null,null!==a&&a(Pf))},!1);var Qf=function(a){Cc=!1;var b=a-Gb+Xa;b<Xa&&Hb<Xa?(8>b&&(b=8),Xa=b<Hb?Hb:b):Hb=b;Gb=a+Xa;Bc||(Bc=!0,window.postMessage(Ce,"*"));b=Be;Be=null;null!==b&&b(a)};Fb=function(a){Ac=a;Cc||(Cc=!0,requestAnimationFrame(Qf));return 0}}else Fb=requestIdleCallback;else Fb=function(a){setTimeout(function(){a({timeRemaining:function(){return Infinity}})});
159
-return 0};var Rf=Fb,ba={},db=[],ca=-1,Sf=Ra.isFiberMounted,da={current:ba},T={current:!1},eb=ba;if("function"===typeof Symbol&&Symbol["for"]){var De=Symbol["for"]("react.coroutine");var Ee=Symbol["for"]("react.yield")}else De=60104,Ee=60105;var Tf=Ee,Uf=De,Dc="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.portal")||60106,Fe={createPortal:function(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Dc,key:null==d?null:""+d,children:a,containerInfo:b,
160
-implementation:c}},isPortal:function(a){return"object"===typeof a&&null!==a&&a.$$typeof===Dc},REACT_PORTAL_TYPE:Dc},sb=Uf,tb=Tf,Ma=Fe.REACT_PORTAL_TYPE,Yb=Vc,ub=Array.isArray,Md="function"===typeof Symbol&&Symbol.iterator,La="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,Vb=nc(!0,!0),Xb=nc(!1,!0),Wb=nc(!1,!1),bf=Object.prototype.hasOwnProperty,af=Ra.isMounted,Ze=tc.ReactCurrentOwner,Tb=null,Ub=null,ra={},fb=tc.ReactCurrentOwner;oc._injectFiber=function(a){Uc=a};var Vf=
161
-Ra.findCurrentHostFiber,Wf=Ra.findCurrentHostFiberWithNoPortals;oc._injectFiber(function(a){var b;a:{Sf(a)&&2===a.tag?void 0:k("170");for(b=a;3!==b.tag;){if(Ea(b)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}(b=b["return"])?void 0:k("171")}b=b.stateNode.context}return Ea(a)?gd(a,b,!1):b});var Qb=null,Ge={getOffsets:function(a){var b=window.getSelection&&window.getSelection();if(!b||0===b.rangeCount)return null;var c=b.anchorNode,d=b.anchorOffset,e=b.focusNode,f=b.focusOffset,g=
162
-b.getRangeAt(0);try{g.startContainer.nodeType,g.endContainer.nodeType}catch(p){return null}b=b.anchorNode===b.focusNode&&b.anchorOffset===b.focusOffset?0:g.toString().length;var h=g.cloneRange();h.selectNodeContents(a);h.setEnd(g.startContainer,g.startOffset);a=h.startContainer===h.endContainer&&h.startOffset===h.endOffset?0:h.toString().length;g=a+b;b=document.createRange();b.setStart(c,d);b.setEnd(e,f);c=b.collapsed;return{start:c?g:a,end:c?a:g}},setOffsets:function(a,b){if(window.getSelection){var c=
163
-window.getSelection(),d=a[Rc()].length,e=Math.min(b.start,d);b=void 0===b.end?e:Math.min(b.end,d);!c.extend&&e>b&&(d=b,b=e,e=d);d=Sc(a,e);a=Sc(a,b);if(d&&a){var f=document.createRange();f.setStart(d.node,d.offset);c.removeAllRanges();e>b?(c.addRange(f),c.extend(a.node,a.offset)):(f.setEnd(a.node,a.offset),c.addRange(f))}}}},Ya={hasSelectionCapabilities:function(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&"text"===a.type||"textarea"===b||"true"===a.contentEditable)},getSelectionInformation:function(){var a=
164
-Pb();return{focusedElem:a,selectionRange:Ya.hasSelectionCapabilities(a)?Ya.getSelection(a):null}},restoreSelection:function(a){var b=Pb(),c=a.focusedElem;a=a.selectionRange;if(b!==c&&Od(document.documentElement,c)){Ya.hasSelectionCapabilities(c)&&Ya.setSelection(c,a);b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});try{c.focus()}catch(d){}for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}},getSelection:function(a){return("selectionStart"in
165
-a?{start:a.selectionStart,end:a.selectionEnd}:Ge.getOffsets(a))||{start:0,end:0}},setSelection:function(a,b){var c=b.start,d=b.end;void 0===d&&(d=c);"selectionStart"in a?(a.selectionStart=c,a.selectionEnd=Math.min(d,a.value.length)):Ge.setOffsets(a,b)}},rc=Ya;cb._injectFiber=function(a){Oc=a};cb._injectStack=function(a){Pc=a};var vb={isAncestor:function(a,b){for(;b;){if(a===b||a===b.alternate)return!0;b=P(b)}return!1},getLowestCommonAncestor:Pd,getParentInstance:function(a){return P(a)},traverseTwoPhase:function(a,
166
-b,c){for(var d=[];a;)d.push(a),a=P(a);for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)},traverseEnterLeave:function(a,b,c,d,e){for(var f=a&&b?Pd(a,b):null,g=[];a&&a!==f;)g.push(a),a=P(a);for(a=[];b&&b!==f;)a.push(b),b=P(b);for(b=0;b<g.length;b++)c(g[b],"bubbled",d);for(b=a.length;0<b--;)c(a[b],"captured",e)}},Rd=X.getListener,ma={accumulateTwoPhaseDispatches:function(a){Ha(a,pf)},accumulateTwoPhaseDispatchesSkipTarget:function(a){Ha(a,qf)},accumulateDirectDispatches:function(a){Ha(a,
167
-rf)},accumulateEnterLeaveDispatches:function(a,b,c,d){vb.traverseEnterLeave(c,d,Sd,a,b)}},Za=null,Ec=null,Ib=null,Fc={initialize:function(a){Za=a;Ec=Fc.getText();return!0},reset:function(){Ib=Ec=Za=null},getData:function(){if(Ib)return Ib;var a,b=Ec,c=b.length,d,e=Fc.getText(),f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return Ib=e.slice(a,1<d?1-d:void 0)},getText:function(){return"value"in Za?Za.value:Za[Rc()]}},wb=Fc,He="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),
168
-Xf={type:null,target:null,currentTarget:z.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};D(Na.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=z.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():
169
-"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=z.thatReturnsTrue)},persist:function(){this.isPersistent=z.thatReturnsTrue},isPersistent:z.thatReturnsFalse,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;for(a=0;a<He.length;a++)this[He[a]]=null}});Na.Interface=Xf;Na.augmentClass=function(a,b){function c(){}c.prototype=this.prototype;var d=new c;D(d,a.prototype);a.prototype=d;a.prototype.constructor=a;a.Interface=D({},this.Interface,
170
-b);a.augmentClass=this.augmentClass;Td(a)};Td(Na);var E=Na;E.augmentClass(Ud,{data:null});E.augmentClass(Vd,{data:null});var vf=[9,13,27,32],pc=m&&"CompositionEvent"in window,$a=null;m&&"documentMode"in document&&($a=document.documentMode);var Yf=m&&"TextEvent"in window&&!$a&&!uf(),$d=m&&(!pc||$a&&8<$a&&11>=$a),Zd=String.fromCharCode(32),fa={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput",
171
-"topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},
172
-dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Yd=!1,wa=!1,Zf={eventTypes:fa,extractEvents:function(a,b,c,d){var e;if(pc)b:{switch(a){case "topCompositionStart":var f=fa.compositionStart;break b;case "topCompositionEnd":f=fa.compositionEnd;break b;case "topCompositionUpdate":f=fa.compositionUpdate;break b}f=void 0}else wa?Wd(a,c)&&(f=fa.compositionEnd):"topKeyDown"===a&&229===c.keyCode&&(f=fa.compositionStart);f?($d&&(wa||f!==fa.compositionStart?
173
-f===fa.compositionEnd&&wa&&(e=wb.getData()):wa=wb.initialize(d)),f=Ud.getPooled(f,b,c,d),e?f.data=e:(e=Xd(c),null!==e&&(f.data=e)),ma.accumulateTwoPhaseDispatches(f),e=f):e=null;(a=Yf?wf(a,c):xf(a,c))?(b=Vd.getPooled(fa.beforeInput,b,c,d),b.data=a,ma.accumulateTwoPhaseDispatches(b)):b=null;return[e,b]}},Ne={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},be={change:{phasedRegistrationNames:{bubbled:"onChange",
174
-captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Oa=null,Pa=null,Gc=!1;m&&(Gc=Fa("input")&&(!document.documentMode||9<document.documentMode));var $f={eventTypes:be,_isInputEventSupported:Gc,extractEvents:function(a,b,c,d){var e=b?x.getNodeFromInstance(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=zf;else if(Nc(e))if(Gc)g=Df;else{g=Bf;var h=Af}else f=e.nodeName,
175
-!f||"input"!==f.toLowerCase()||"checkbox"!==e.type&&"radio"!==e.type||(g=Cf);if(g&&(g=g(a,b)))return ae(g,c,d);h&&h(a,e,b);"topBlur"===a&&null!=b&&(a=b._wrapperState||e._wrapperState)&&a.controlled&&"number"===e.type&&(a=""+e.value,e.getAttribute("value")!==a&&e.setAttribute("value",a))}};E.augmentClass(ee,{view:function(a){if(a.view)return a.view;a=kb(a);return a.window===a?a:(a=a.ownerDocument)?a.defaultView||a.parentWindow:window},detail:function(a){return a.detail||0}});var aa=ee,Ef={Alt:"altKey",
176
-Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};aa.augmentClass(fe,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Ob,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)}});var na=fe,Hc={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut",
177
-"topMouseOver"]}},ag={eventTypes:Hc,extractEvents:function(a,b,c,d){if("topMouseOver"===a&&(c.relatedTarget||c.fromElement)||"topMouseOut"!==a&&"topMouseOver"!==a)return null;var e=d.window===d?d:(e=d.ownerDocument)?e.defaultView||e.parentWindow:window;"topMouseOut"===a?(a=b,b=(b=c.relatedTarget||c.toElement)?x.getClosestInstanceFromNode(b):null):a=null;if(a===b)return null;var f=null==a?e:x.getNodeFromInstance(a);e=null==b?e:x.getNodeFromInstance(b);var g=na.getPooled(Hc.mouseLeave,a,c,d);g.type=
178
-"mouseleave";g.target=f;g.relatedTarget=e;c=na.getPooled(Hc.mouseEnter,b,c,d);c.type="mouseenter";c.target=e;c.relatedTarget=f;ma.accumulateEnterLeaveDispatches(g,c,a,b);return[g,c]}},bg=m&&"documentMode"in document&&11>=document.documentMode,he={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},ya=null,sc=null,Qa=null,qc=!1,cg=n.isListeningToAllDependencies,
179
-dg={eventTypes:he,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument;if(!e||!cg("onSelect",e))return null;e=b?x.getNodeFromInstance(b):window;switch(a){case "topFocus":if(Nc(e)||"true"===e.contentEditable)ya=e,sc=b,Qa=null;break;case "topBlur":Qa=sc=ya=null;break;case "topMouseDown":qc=!0;break;case "topContextMenu":case "topMouseUp":return qc=!1,ge(c,d);case "topSelectionChange":if(bg)break;case "topKeyDown":case "topKeyUp":return ge(c,d)}return null}};
180
-E.augmentClass(ie,{animationName:null,elapsedTime:null,pseudoElement:null});E.augmentClass(je,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});aa.augmentClass(ke,{relatedTarget:null});var eg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",
181
-18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};aa.augmentClass(le,{key:function(a){if(a.key){var b=eg[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=bb(a),13===a?"Enter":String.fromCharCode(a)):
182
-"keydown"===a.type||"keyup"===a.type?fg[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Ob,charCode:function(a){return"keypress"===a.type?bb(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?bb(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}});na.augmentClass(me,{dataTransfer:null});aa.augmentClass(ne,{touches:null,targetTouches:null,
183
-changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Ob});E.augmentClass(oe,{propertyName:null,elapsedTime:null,pseudoElement:null});na.augmentClass(pe,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null});var Ie={},Je={};"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel".split(" ").forEach(function(a){var b=
184
-a[0].toUpperCase()+a.slice(1),c="on"+b;b="top"+b;c={phasedRegistrationNames:{bubbled:c,captured:c+"Capture"},dependencies:[b]};Ie[a]=c;Je[b]=c});var gg={eventTypes:Ie,extractEvents:function(a,b,c,d){var e=Je[a];if(!e)return null;switch(a){case "topAbort":case "topCancel":case "topCanPlay":case "topCanPlayThrough":case "topClose":case "topDurationChange":case "topEmptied":case "topEncrypted":case "topEnded":case "topError":case "topInput":case "topInvalid":case "topLoad":case "topLoadedData":case "topLoadedMetadata":case "topLoadStart":case "topPause":case "topPlay":case "topPlaying":case "topProgress":case "topRateChange":case "topReset":case "topSeeked":case "topSeeking":case "topStalled":case "topSubmit":case "topSuspend":case "topTimeUpdate":case "topToggle":case "topVolumeChange":case "topWaiting":var f=
185
-E;break;case "topKeyPress":if(0===bb(c))return null;case "topKeyDown":case "topKeyUp":f=le;break;case "topBlur":case "topFocus":f=ke;break;case "topClick":if(2===c.button)return null;case "topDoubleClick":case "topMouseDown":case "topMouseMove":case "topMouseUp":case "topMouseOut":case "topMouseOver":case "topContextMenu":f=na;break;case "topDrag":case "topDragEnd":case "topDragEnter":case "topDragExit":case "topDragLeave":case "topDragOver":case "topDragStart":case "topDrop":f=me;break;case "topTouchCancel":case "topTouchEnd":case "topTouchMove":case "topTouchStart":f=
186
-ne;break;case "topAnimationEnd":case "topAnimationIteration":case "topAnimationStart":f=ie;break;case "topTransitionEnd":f=oe;break;case "topScroll":f=aa;break;case "topWheel":f=pe;break;case "topCopy":case "topCut":case "topPaste":f=je}f?void 0:k("86",a);a=f.getPooled(e,b,c,d);ma.accumulateTwoPhaseDispatches(a);return a}};L.setHandleTopLevel(n.handleTopLevel);X.injection.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));
187
-Ga.injection.injectComponentTree(x);X.injection.injectEventPluginsByName({SimpleEventPlugin:gg,EnterLeaveEventPlugin:ag,ChangeEventPlugin:$f,SelectEventPlugin:dg,BeforeInputEventPlugin:Zf});var Jb=K.injection.MUST_USE_PROPERTY,q=K.injection.HAS_BOOLEAN_VALUE,Ke=K.injection.HAS_NUMERIC_VALUE,Kb=K.injection.HAS_POSITIVE_NUMERIC_VALUE,hg={Properties:{allowFullScreen:q,async:q,autoPlay:q,capture:q,checked:Jb|q,cols:Kb,controls:q,"default":q,defer:q,disabled:q,download:K.injection.HAS_OVERLOADED_BOOLEAN_VALUE,
188
-formNoValidate:q,hidden:q,loop:q,multiple:Jb|q,muted:Jb|q,noValidate:q,open:q,playsInline:q,readOnly:q,required:q,reversed:q,rows:Kb,rowSpan:Ke,scoped:q,seamless:q,selected:Jb|q,size:Kb,start:Ke,span:Kb,style:0,itemScope:q,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:0,autoComplete:0,allowTransparency:0,contentEditable:0,draggable:0,spellCheck:0,autoCapitalize:0,autoCorrect:0,autoSave:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},
189
-DOMMutationMethods:{value:function(a,b){if(null==b)return a.removeAttribute("value");"number"!==a.type||!1===a.hasAttribute("value")?a.setAttribute("value",""+b):a.validity&&!a.validity.badInput&&a.ownerDocument.activeElement!==a&&a.setAttribute("value",""+b)}}},Ic={Properties:{},DOMAttributeNamespaces:{xlinkActuate:"http://www.w3.org/1999/xlink",xlinkArcrole:"http://www.w3.org/1999/xlink",xlinkHref:"http://www.w3.org/1999/xlink",xlinkRole:"http://www.w3.org/1999/xlink",xlinkShow:"http://www.w3.org/1999/xlink",
190
-xlinkTitle:"http://www.w3.org/1999/xlink",xlinkType:"http://www.w3.org/1999/xlink",xmlBase:"http://www.w3.org/XML/1998/namespace",xmlLang:"http://www.w3.org/XML/1998/namespace",xmlSpace:"http://www.w3.org/XML/1998/namespace"},DOMAttributeNames:{}},ig=/[\-\:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space autoReverse externalResourcesRequired preserveAlpha".split(" ").forEach(function(a){var b=
191
-a.replace(ig,Le);Ic.Properties[b]=0;Ic.DOMAttributeNames[b]=a});K.injection.injectDOMPropertyConfig(hg);K.injection.injectDOMPropertyConfig(Ic);var jg=ab.isValidElement,Gf=K.ROOT_ATTRIBUTE_NAME,kg=F.createElement,lg=F.setInitialProperties,mg=F.diffProperties,ng=F.updateProperties,og=F.diffHydratedProperties,pg=F.diffHydratedText,qg=F.warnForDeletedHydratableElement,rg=F.warnForDeletedHydratableText,sg=F.warnForInsertedHydratedElement,tg=F.warnForInsertedHydratedText,Lb=x.precacheFiberNode,Jc=x.updateFiberProps;
192
-xb.injection.injectFiberControlledHostComponent(F);cb._injectFiber(function(a){return G.findHostInstance(a)});var Kc=null,Lc=null,G=function(a){var b=a.getPublicInstance;a=Oe(a);var c=a.scheduleUpdate,d=a.getPriorityContext;return{createContainer:function(a){var b=new M(3,null,0);a={current:b,containerInfo:a,isScheduled:!1,nextScheduledRoot:null,context:null,pendingContext:null};return b.stateNode=a},updateContainer:function(a,b,g,h){var e=b.current;g=oc(g);null===b.context?b.context=g:b.pendingContext=
193
-g;b=d(e,ib.enableAsyncSubtreeAPI&&null!=a&&null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent);a={element:a};g=null===a.element;a={priorityLevel:b,partialState:a,callback:void 0===h?null:h,isReplace:!1,isForced:!1,isTopLevelUnmount:g,next:null};h=hb(e,a);if(g){var f=Ld(e);g=f[0];f=f[1];null!==g&&null!==a.next&&(a.next=null,g.last=a);null!==f&&null!==h&&null!==h.next&&(h.next=null,f.last=a)}c(e,b)},performWithPriority:a.performWithPriority,batchedUpdates:a.batchedUpdates,
194
-unbatchedUpdates:a.unbatchedUpdates,deferredUpdates:a.deferredUpdates,flushSync:a.flushSync,getPublicRootInstance:function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return b(a.child.stateNode);default:return a.child.stateNode}},findHostInstance:function(a){a=Vf(a);return null===a?null:a.stateNode},findHostInstanceWithNoPortals:function(a){a=Wf(a);return null===a?null:a.stateNode}}}({getRootHostContext:function(a){if(9===a.nodeType)a=(a=a.documentElement)?a.namespaceURI:Nb(null,
195
-"");else{var b=8===a.nodeType?a.parentNode:a;a=b.namespaceURI||null;b=b.tagName;a=Nb(a,b)}return a},getChildHostContext:function(a,b){return Nb(a,b)},getPublicInstance:function(a){return a},prepareForCommit:function(){Kc=n.isEnabled();Lc=rc.getSelectionInformation();n.setEnabled(!1)},resetAfterCommit:function(){rc.restoreSelection(Lc);Lc=null;n.setEnabled(Kc);Kc=null},createInstance:function(a,b,c,d,e){a=kg(a,b,c,d);Lb(e,a);Jc(a,b);return a},appendInitialChild:function(a,b){a.appendChild(b)},finalizeInitialChildren:function(a,
196
-b,c,d){lg(a,b,c,d);a:{switch(b){case "button":case "input":case "select":case "textarea":a=!!c.autoFocus;break a}a=!1}return a},prepareUpdate:function(a,b,c,d,e){return mg(a,b,c,d,e)},commitMount:function(a){a.focus()},commitUpdate:function(a,b,c,d,e){Jc(a,e);ng(a,b,c,d,e)},shouldSetTextContent:function(a,b){return"textarea"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&"string"===typeof b.dangerouslySetInnerHTML.__html},
197
-resetTextContent:function(a){a.textContent=""},shouldDeprioritizeSubtree:function(a,b){return!!b.hidden},createTextInstance:function(a,b,c,d){a=document.createTextNode(a);Lb(d,a);return a},commitTextUpdate:function(a,b,c){a.nodeValue=c},appendChild:function(a,b){a.appendChild(b)},appendChildToContainer:function(a,b){8===a.nodeType?a.parentNode.insertBefore(b,a):a.appendChild(b)},insertBefore:function(a,b,c){a.insertBefore(b,c)},insertInContainerBefore:function(a,b,c){8===a.nodeType?a.parentNode.insertBefore(b,
198
-c):a.insertBefore(b,c)},removeChild:function(a,b){a.removeChild(b)},removeChildFromContainer:function(a,b){8===a.nodeType?a.parentNode.removeChild(b):a.removeChild(b)},canHydrateInstance:function(a,b){return 1===a.nodeType&&b===a.nodeName.toLowerCase()},canHydrateTextInstance:function(a,b){return""===b?!1:3===a.nodeType},getNextHydratableSibling:function(a){for(a=a.nextSibling;a&&1!==a.nodeType&&3!==a.nodeType;)a=a.nextSibling;return a},getFirstHydratableChild:function(a){for(a=a.firstChild;a&&1!==
199
-a.nodeType&&3!==a.nodeType;)a=a.nextSibling;return a},hydrateInstance:function(a,b,c,d,e){Lb(e,a);Jc(a,c);return og(a,b,c,d)},hydrateTextInstance:function(a,b,c){Lb(c,a);return pg(a,b)},didNotHydrateInstance:function(a,b){1===b.nodeType?qg(a,b):rg(a,b)},didNotFindHydratableInstance:function(a,b,c){sg(a,b,c)},didNotFindHydratableTextInstance:function(a,b){tg(a,b)},scheduleDeferredCallback:Rf,useSyncScheduling:!0});zb.injection.injectFiberBatchedUpdates(G.batchedUpdates);var ug={hydrate:function(a,
200
-b,c){return Ab(null,a,b,!0,c)},render:function(a,b,c){ib.disableNewFiberFeatures&&(jg(a)||("string"===typeof a?k("201"):"function"===typeof a?k("202"):null!=a&&"undefined"!==typeof a.props?k("203"):k("204")));return Ab(null,a,b,!1,c)},unstable_renderSubtreeIntoContainer:function(a,b,c,d){null!=a&&ha.has(a)?void 0:k("38");return Ab(a,b,c,!1,d)},unmountComponentAtNode:function(a){qe(a)?void 0:k("40");return a._reactRootContainer?(G.unbatchedUpdates(function(){Ab(null,null,a,!1,function(){a._reactRootContainer=
201
-null})}),!0):!1},findDOMNode:cb,unstable_createPortal:function(a,b){return Fe.createPortal(a,b,null,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},unstable_batchedUpdates:zb.batchedUpdates,unstable_deferredUpdates:G.deferredUpdates,flushSync:G.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:X,EventPluginRegistry:oa,EventPropagators:ma,ReactControlledComponent:xb,ReactDOMComponentTree:x,ReactDOMEventListener:L}};(function(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;
202
-var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!b.supportsFiber)return!0;try{var c=b.inject(a);Tb=Nd(function(a){return b.onCommitFiberRoot(c,a)});Ub=Nd(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0})({findFiberByHostInstance:x.getClosestInstanceFromNode,findHostInstanceByFiber:G.findHostInstance,bundleType:0,version:"16.0.0-beta.5",rendererPackageName:"react-dom"});return ug}
203
-"object"===typeof exports&&"undefined"!==typeof module?module.exports=Mb(require("react")):"function"===typeof define&&define.amd?define(["react"],Mb):this.ReactDOM=Mb(this.React);
fixtures/attribute-behavior/public/react.development.js
new
+2404
@@ -0,0 +1,2404 @@
1
+/**
2
+ * react.development.js v16.0.0-beta.5
3
+ */
4
+
5
+(function(global, factory) {
6
+ typeof exports === 'object' && typeof module !== 'undefined'
7
+ ? (module.exports = factory())
8
+ : typeof define === 'function' && define.amd
9
+ ? define(factory)
10
+ : (global.React = factory());
11
+})(this, function() {
12
+ 'use strict';
13
+ /*
14
+object-assign
15
+(c) Sindre Sorhus
16
+@license MIT
17
+*/
18
+
19
+ /* eslint-disable no-unused-vars */
20
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
21
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
22
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
23
+
24
+ function toObject(val) {
25
+ if (val === null || val === undefined) {
26
+ throw new TypeError(
27
+ 'Object.assign cannot be called with null or undefined'
28
+ );
29
+ }
30
+
31
+ return Object(val);
32
+ }
33
+
34
+ function shouldUseNative() {
35
+ try {
36
+ if (!Object.assign) {
37
+ return false;
38
+ }
39
+
40
+ // Detect buggy property enumeration order in older V8 versions.
41
+
42
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
43
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
44
+ test1[5] = 'de';
45
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
46
+ return false;
47
+ }
48
+
49
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
50
+ var test2 = {};
51
+ for (var i = 0; i < 10; i++) {
52
+ test2['_' + String.fromCharCode(i)] = i;
53
+ }
54
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
55
+ return test2[n];
56
+ });
57
+ if (order2.join('') !== '0123456789') {
58
+ return false;
59
+ }
60
+
61
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
62
+ var test3 = {};
63
+ 'abcdefghijklmnopqrst'.split('').forEach(function(letter) {
64
+ test3[letter] = letter;
65
+ });
66
+ if (
67
+ Object.keys(Object.assign({}, test3)).join('') !==
68
+ 'abcdefghijklmnopqrst'
69
+ ) {
70
+ return false;
71
+ }
72
+
73
+ return true;
74
+ } catch (err) {
75
+ // We don't expect any of the above to throw, but better to be safe.
76
+ return false;
77
+ }
78
+ }
79
+
80
+ var index = shouldUseNative()
81
+ ? Object.assign
82
+ : function(target, source) {
83
+ var from;
84
+ var to = toObject(target);
85
+ var symbols;
86
+
87
+ for (var s = 1; s < arguments.length; s++) {
88
+ from = Object(arguments[s]);
89
+
90
+ for (var key in from) {
91
+ if (hasOwnProperty.call(from, key)) {
92
+ to[key] = from[key];
93
+ }
94
+ }
95
+
96
+ if (getOwnPropertySymbols) {
97
+ symbols = getOwnPropertySymbols(from);
98
+ for (var i = 0; i < symbols.length; i++) {
99
+ if (propIsEnumerable.call(from, symbols[i])) {
100
+ to[symbols[i]] = from[symbols[i]];
101
+ }
102
+ }
103
+ }
104
+ }
105
+
106
+ return to;
107
+ };
108
+
109
+ /**
110
+ * Copyright (c) 2013-present, Facebook, Inc.
111
+ * All rights reserved.
112
+ *
113
+ * This source code is licensed under the BSD-style license found in the
114
+ * LICENSE file in the root directory of this source tree. An additional grant
115
+ * of patent rights can be found in the PATENTS file in the same directory.
116
+ *
117
+ * @providesModule reactProdInvariant
118
+ *
119
+ */
120
+
121
+ /**
122
+ * Copyright (c) 2013-present, Facebook, Inc.
123
+ * All rights reserved.
124
+ *
125
+ * This source code is licensed under the BSD-style license found in the
126
+ * LICENSE file in the root directory of this source tree. An additional grant
127
+ * of patent rights can be found in the PATENTS file in the same directory.
128
+ *
129
+ *
130
+ */
131
+
132
+ function makeEmptyFunction(arg) {
133
+ return function() {
134
+ return arg;
135
+ };
136
+ }
137
+
138
+ /**
139
+ * This function accepts and discards inputs; it has no side effects. This is
140
+ * primarily useful idiomatically for overridable function endpoints which
141
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
142
+ */
143
+ var emptyFunction = function emptyFunction() {};
144
+
145
+ emptyFunction.thatReturns = makeEmptyFunction;
146
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
147
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
148
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
149
+ emptyFunction.thatReturnsThis = function() {
150
+ return this;
151
+ };
152
+ emptyFunction.thatReturnsArgument = function(arg) {
153
+ return arg;
154
+ };
155
+
156
+ var emptyFunction_1 = emptyFunction;
157
+
158
+ /**
159
+ * Similar to invariant but only logs a warning if the condition is not met.
160
+ * This can be used to log issues in development environments in critical
161
+ * paths. Removing the logging code for production environments will keep the
162
+ * same logic and follow the same code paths.
163
+ */
164
+
165
+ var warning$1 = emptyFunction_1;
166
+
167
+ {
168
+ (function() {
169
+ var printWarning = function printWarning(format) {
170
+ for (
171
+ var _len = arguments.length,
172
+ args = Array(_len > 1 ? _len - 1 : 0),
173
+ _key = 1;
174
+ _key < _len;
175
+ _key++
176
+ ) {
177
+ args[_key - 1] = arguments[_key];
178
+ }
179
+
180
+ var argIndex = 0;
181
+ var message =
182
+ 'Warning: ' +
183
+ format.replace(/%s/g, function() {
184
+ return args[argIndex++];
185
+ });
186
+ if (typeof console !== 'undefined') {
187
+ console.error(message);
188
+ }
189
+ try {
190
+ // --- Welcome to debugging React ---
191
+ // This error was thrown as a convenience so that you can use this stack
192
+ // to find the callsite that caused this warning to fire.
193
+ throw new Error(message);
194
+ } catch (x) {}
195
+ };
196
+
197
+ warning$1 = function warning(condition, format) {
198
+ if (format === undefined) {
199
+ throw new Error(
200
+ '`warning(condition, format, ...args)` requires a warning ' +
201
+ 'message argument'
202
+ );
203
+ }
204
+
205
+ if (format.indexOf('Failed Composite propType: ') === 0) {
206
+ return; // Ignore CompositeComponent proptype check.
207
+ }
208
+
209
+ if (!condition) {
210
+ for (
211
+ var _len2 = arguments.length,
212
+ args = Array(_len2 > 2 ? _len2 - 2 : 0),
213
+ _key2 = 2;
214
+ _key2 < _len2;
215
+ _key2++
216
+ ) {
217
+ args[_key2 - 2] = arguments[_key2];
218
+ }
219
+
220
+ printWarning.apply(undefined, [format].concat(args));
221
+ }
222
+ };
223
+ })();
224
+ }
225
+
226
+ var warning_1 = warning$1;
227
+
228
+ {
229
+ var warning = warning_1;
230
+ }
231
+
232
+ function warnNoop(publicInstance, callerName) {
233
+ {
234
+ var constructor = publicInstance.constructor;
235
+ warning(
236
+ false,
237
+ '%s(...): Can only update a mounted or mounting component. ' +
238
+ 'This usually means you called %s() on an unmounted component. ' +
239
+ 'This is a no-op.\n\nPlease check the code for the %s component.',
240
+ callerName,
241
+ callerName,
242
+ (constructor && (constructor.displayName || constructor.name)) ||
243
+ 'ReactClass'
244
+ );
245
+ }
246
+ }
247
+
248
+ /**
249
+ * This is the abstract API for an update queue.
250
+ */
251
+ var ReactNoopUpdateQueue = {
252
+ /**
253
+ * Checks whether or not this composite component is mounted.
254
+ * @param {ReactClass} publicInstance The instance we want to test.
255
+ * @return {boolean} True if mounted, false otherwise.
256
+ * @protected
257
+ * @final
258
+ */
259
+ isMounted: function(publicInstance) {
260
+ return false;
261
+ },
262
+
263
+ /**
264
+ * Forces an update. This should only be invoked when it is known with
265
+ * certainty that we are **not** in a DOM transaction.
266
+ *
267
+ * You may want to call this when you know that some deeper aspect of the
268
+ * component's state has changed but `setState` was not called.
269
+ *
270
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
271
+ * `componentWillUpdate` and `componentDidUpdate`.
272
+ *
273
+ * @param {ReactClass} publicInstance The instance that should rerender.
274
+ * @param {?function} callback Called after component is updated.
275
+ * @param {?string} callerName name of the calling function in the public API.
276
+ * @internal
277
+ */
278
+ enqueueForceUpdate: function(publicInstance, callback, callerName) {
279
+ warnNoop(publicInstance, 'forceUpdate');
280
+ },
281
+
282
+ /**
283
+ * Replaces all of the state. Always use this or `setState` to mutate state.
284
+ * You should treat `this.state` as immutable.
285
+ *
286
+ * There is no guarantee that `this.state` will be immediately updated, so
287
+ * accessing `this.state` after calling this method may return the old value.
288
+ *
289
+ * @param {ReactClass} publicInstance The instance that should rerender.
290
+ * @param {object} completeState Next state.
291
+ * @param {?function} callback Called after component is updated.
292
+ * @param {?string} callerName name of the calling function in the public API.
293
+ * @internal
294
+ */
295
+ enqueueReplaceState: function(
296
+ publicInstance,
297
+ completeState,
298
+ callback,
299
+ callerName
300
+ ) {
301
+ warnNoop(publicInstance, 'replaceState');
302
+ },
303
+
304
+ /**
305
+ * Sets a subset of the state. This only exists because _pendingState is
306
+ * internal. This provides a merging strategy that is not available to deep
307
+ * properties which is confusing. TODO: Expose pendingState or don't use it
308
+ * during the merge.
309
+ *
310
+ * @param {ReactClass} publicInstance The instance that should rerender.
311
+ * @param {object} partialState Next partial state to be merged with state.
312
+ * @param {?function} callback Called after component is updated.
313
+ * @param {?string} Name of the calling function in the public API.
314
+ * @internal
315
+ */
316
+ enqueueSetState: function(
317
+ publicInstance,
318
+ partialState,
319
+ callback,
320
+ callerName
321
+ ) {
322
+ warnNoop(publicInstance, 'setState');
323
+ },
324
+ };
325
+
326
+ var ReactNoopUpdateQueue_1 = ReactNoopUpdateQueue;
327
+
328
+ /**
329
+ * Copyright (c) 2013-present, Facebook, Inc.
330
+ * All rights reserved.
331
+ *
332
+ * This source code is licensed under the BSD-style license found in the
333
+ * LICENSE file in the root directory of this source tree. An additional grant
334
+ * of patent rights can be found in the PATENTS file in the same directory.
335
+ *
336
+ */
337
+
338
+ var emptyObject = {};
339
+
340
+ {
341
+ Object.freeze(emptyObject);
342
+ }
343
+
344
+ var emptyObject_1 = emptyObject;
345
+
346
+ /**
347
+ * Copyright (c) 2013-present, Facebook, Inc.
348
+ * All rights reserved.
349
+ *
350
+ * This source code is licensed under the BSD-style license found in the
351
+ * LICENSE file in the root directory of this source tree. An additional grant
352
+ * of patent rights can be found in the PATENTS file in the same directory.
353
+ *
354
+ */
355
+
356
+ /**
357
+ * Use invariant() to assert state which your program assumes to be true.
358
+ *
359
+ * Provide sprintf-style format (only %s is supported) and arguments
360
+ * to provide information about what broke and what you were
361
+ * expecting.
362
+ *
363
+ * The invariant message will be stripped in production, but the invariant
364
+ * will remain to ensure logic does not differ in production.
365
+ */
366
+
367
+ var validateFormat = function validateFormat(format) {};
368
+
369
+ {
370
+ validateFormat = function validateFormat(format) {
371
+ if (format === undefined) {
372
+ throw new Error('invariant requires an error message argument');
373
+ }
374
+ };
375
+ }
376
+
377
+ function invariant(condition, format, a, b, c, d, e, f) {
378
+ validateFormat(format);
379
+
380
+ if (!condition) {
381
+ var error;
382
+ if (format === undefined) {
383
+ error = new Error(
384
+ 'Minified exception occurred; use the non-minified dev environment ' +
385
+ 'for the full error message and additional helpful warnings.'
386
+ );
387
+ } else {
388
+ var args = [a, b, c, d, e, f];
389
+ var argIndex = 0;
390
+ error = new Error(
391
+ format.replace(/%s/g, function() {
392
+ return args[argIndex++];
393
+ })
394
+ );
395
+ error.name = 'Invariant Violation';
396
+ }
397
+
398
+ error.framesToPop = 1; // we don't care about invariant's own frame
399
+ throw error;
400
+ }
401
+ }
402
+
403
+ var invariant_1 = invariant;
404
+
405
+ /**
406
+ * Copyright 2014-2015, Facebook, Inc.
407
+ * All rights reserved.
408
+ *
409
+ * This source code is licensed under the BSD-style license found in the
410
+ * LICENSE file in the root directory of this source tree. An additional grant
411
+ * of patent rights can be found in the PATENTS file in the same directory.
412
+ *
413
+ * @providesModule lowPriorityWarning
414
+ */
415
+
416
+ /**
417
+ * Forked from fbjs/warning:
418
+ * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
419
+ *
420
+ * Only change is we use console.warn instead of console.error,
421
+ * and do nothing when 'console' is not supported.
422
+ * This really simplifies the code.
423
+ * ---
424
+ * Similar to invariant but only logs a warning if the condition is not met.
425
+ * This can be used to log issues in development environments in critical
426
+ * paths. Removing the logging code for production environments will keep the
427
+ * same logic and follow the same code paths.
428
+ */
429
+
430
+ var lowPriorityWarning = function() {};
431
+
432
+ {
433
+ var printWarning = function(format) {
434
+ for (
435
+ var _len = arguments.length,
436
+ args = Array(_len > 1 ? _len - 1 : 0),
437
+ _key = 1;
438
+ _key < _len;
439
+ _key++
440
+ ) {
441
+ args[_key - 1] = arguments[_key];
442
+ }
443
+
444
+ var argIndex = 0;
445
+ var message =
446
+ 'Warning: ' +
447
+ format.replace(/%s/g, function() {
448
+ return args[argIndex++];
449
+ });
450
+ if (typeof console !== 'undefined') {
451
+ console.warn(message);
452
+ }
453
+ try {
454
+ // --- Welcome to debugging React ---
455
+ // This error was thrown as a convenience so that you can use this stack
456
+ // to find the callsite that caused this warning to fire.
457
+ throw new Error(message);
458
+ } catch (x) {}
459
+ };
460
+
461
+ lowPriorityWarning = function(condition, format) {
462
+ if (format === undefined) {
463
+ throw new Error(
464
+ '`warning(condition, format, ...args)` requires a warning ' +
465
+ 'message argument'
466
+ );
467
+ }
468
+ if (!condition) {
469
+ for (
470
+ var _len2 = arguments.length,
471
+ args = Array(_len2 > 2 ? _len2 - 2 : 0),
472
+ _key2 = 2;
473
+ _key2 < _len2;
474
+ _key2++
475
+ ) {
476
+ args[_key2 - 2] = arguments[_key2];
477
+ }
478
+
479
+ printWarning.apply(undefined, [format].concat(args));
480
+ }
481
+ };
482
+ }
483
+
484
+ var lowPriorityWarning_1 = lowPriorityWarning;
485
+
486
+ /**
487
+ * Base class helpers for the updating state of a component.
488
+ */
489
+ function ReactComponent(props, context, updater) {
490
+ this.props = props;
491
+ this.context = context;
492
+ this.refs = emptyObject_1;
493
+ // We initialize the default updater but the real one gets injected by the
494
+ // renderer.
495
+ this.updater = updater || ReactNoopUpdateQueue_1;
496
+ }
497
+
498
+ ReactComponent.prototype.isReactComponent = {};
499
+
500
+ /**
501
+ * Sets a subset of the state. Always use this to mutate
502
+ * state. You should treat `this.state` as immutable.
503
+ *
504
+ * There is no guarantee that `this.state` will be immediately updated, so
505
+ * accessing `this.state` after calling this method may return the old value.
506
+ *
507
+ * There is no guarantee that calls to `setState` will run synchronously,
508
+ * as they may eventually be batched together. You can provide an optional
509
+ * callback that will be executed when the call to setState is actually
510
+ * completed.
511
+ *
512
+ * When a function is provided to setState, it will be called at some point in
513
+ * the future (not synchronously). It will be called with the up to date
514
+ * component arguments (state, props, context). These values can be different
515
+ * from this.* because your function may be called after receiveProps but before
516
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
517
+ * assigned to this.
518
+ *
519
+ * @param {object|function} partialState Next partial state or function to
520
+ * produce next partial state to be merged with current state.
521
+ * @param {?function} callback Called after state is updated.
522
+ * @final
523
+ * @protected
524
+ */
525
+ ReactComponent.prototype.setState = function(partialState, callback) {
526
+ !(typeof partialState === 'object' ||
527
+ typeof partialState === 'function' ||
528
+ partialState == null)
529
+ ? invariant_1(
530
+ false,
531
+ 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.'
532
+ )
533
+ : void 0;
534
+ this.updater.enqueueSetState(this, partialState, callback, 'setState');
535
+ };
536
+
537
+ /**
538
+ * Forces an update. This should only be invoked when it is known with
539
+ * certainty that we are **not** in a DOM transaction.
540
+ *
541
+ * You may want to call this when you know that some deeper aspect of the
542
+ * component's state has changed but `setState` was not called.
543
+ *
544
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
545
+ * `componentWillUpdate` and `componentDidUpdate`.
546
+ *
547
+ * @param {?function} callback Called after update is complete.
548
+ * @final
549
+ * @protected
550
+ */
551
+ ReactComponent.prototype.forceUpdate = function(callback) {
552
+ this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
553
+ };
554
+
555
+ /**
556
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
557
+ * we would like to deprecate them, we're not going to move them over to this
558
+ * modern base class. Instead, we define a getter that warns if it's accessed.
559
+ */
560
+ {
561
+ var deprecatedAPIs = {
562
+ isMounted: [
563
+ 'isMounted',
564
+ 'Instead, make sure to clean up subscriptions and pending requests in ' +
565
+ 'componentWillUnmount to prevent memory leaks.',
566
+ ],
567
+ replaceState: [
568
+ 'replaceState',
569
+ 'Refactor your code to use setState instead (see ' +
570
+ 'https://github.com/facebook/react/issues/3236).',
571
+ ],
572
+ };
573
+ var defineDeprecationWarning = function(methodName, info) {
574
+ Object.defineProperty(ReactComponent.prototype, methodName, {
575
+ get: function() {
576
+ lowPriorityWarning_1(
577
+ false,
578
+ '%s(...) is deprecated in plain JavaScript React classes. %s',
579
+ info[0],
580
+ info[1]
581
+ );
582
+ return undefined;
583
+ },
584
+ });
585
+ };
586
+ for (var fnName in deprecatedAPIs) {
587
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
588
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
589
+ }
590
+ }
591
+ }
592
+
593
+ /**
594
+ * Base class helpers for the updating state of a component.
595
+ */
596
+ function ReactPureComponent(props, context, updater) {
597
+ // Duplicated from ReactComponent.
598
+ this.props = props;
599
+ this.context = context;
600
+ this.refs = emptyObject_1;
601
+ // We initialize the default updater but the real one gets injected by the
602
+ // renderer.
603
+ this.updater = updater || ReactNoopUpdateQueue_1;
604
+ }
605
+
606
+ function ComponentDummy() {}
607
+ ComponentDummy.prototype = ReactComponent.prototype;
608
+ var pureComponentPrototype = (ReactPureComponent.prototype = new ComponentDummy());
609
+ pureComponentPrototype.constructor = ReactPureComponent;
610
+ // Avoid an extra prototype jump for these methods.
611
+ index(pureComponentPrototype, ReactComponent.prototype);
612
+ pureComponentPrototype.isPureReactComponent = true;
613
+
614
+ function ReactAsyncComponent(props, context, updater) {
615
+ // Duplicated from ReactComponent.
616
+ this.props = props;
617
+ this.context = context;
618
+ this.refs = emptyObject_1;
619
+ // We initialize the default updater but the real one gets injected by the
620
+ // renderer.
621
+ this.updater = updater || ReactNoopUpdateQueue_1;
622
+ }
623
+
624
+ var asyncComponentPrototype = (ReactAsyncComponent.prototype = new ComponentDummy());
625
+ asyncComponentPrototype.constructor = ReactAsyncComponent;
626
+ // Avoid an extra prototype jump for these methods.
627
+ index(asyncComponentPrototype, ReactComponent.prototype);
628
+ asyncComponentPrototype.unstable_isAsyncReactComponent = true;
629
+ asyncComponentPrototype.render = function() {
630
+ return this.props.children;
631
+ };
632
+
633
+ var ReactBaseClasses = {
634
+ Component: ReactComponent,
635
+ PureComponent: ReactPureComponent,
636
+ AsyncComponent: ReactAsyncComponent,
637
+ };
638
+
639
+ /**
640
+ * Copyright 2013-present, Facebook, Inc.
641
+ * All rights reserved.
642
+ *
643
+ * This source code is licensed under the BSD-style license found in the
644
+ * LICENSE file in the root directory of this source tree. An additional grant
645
+ * of patent rights can be found in the PATENTS file in the same directory.
646
+ *
647
+ * @providesModule ReactCurrentOwner
648
+ *
649
+ */
650
+
651
+ /**
652
+ * Keeps track of the current owner.
653
+ *
654
+ * The current owner is the component who should own any components that are
655
+ * currently being constructed.
656
+ */
657
+ var ReactCurrentOwner = {
658
+ /**
659
+ * @internal
660
+ * @type {ReactComponent}
661
+ */
662
+ current: null,
663
+ };
664
+
665
+ var ReactCurrentOwner_1 = ReactCurrentOwner;
666
+
667
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
668
+
669
+ {
670
+ var warning$3 = warning_1;
671
+ }
672
+
673
+ // The Symbol used to tag the ReactElement type. If there is no native Symbol
674
+ // nor polyfill, then a plain number is used for performance.
675
+ var REACT_ELEMENT_TYPE$1 =
676
+ (typeof Symbol === 'function' &&
677
+ Symbol['for'] &&
678
+ Symbol['for']('react.element')) ||
679
+ 0xeac7;
680
+
681
+ var RESERVED_PROPS = {
682
+ key: true,
683
+ ref: true,
684
+ __self: true,
685
+ __source: true,
686
+ };
687
+
688
+ var specialPropKeyWarningShown;
689
+ var specialPropRefWarningShown;
690
+
691
+ function hasValidRef(config) {
692
+ {
693
+ if (hasOwnProperty$1.call(config, 'ref')) {
694
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
695
+ if (getter && getter.isReactWarning) {
696
+ return false;
697
+ }
698
+ }
699
+ }
700
+ return config.ref !== undefined;
701
+ }
702
+
703
+ function hasValidKey(config) {
704
+ {
705
+ if (hasOwnProperty$1.call(config, 'key')) {
706
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
707
+ if (getter && getter.isReactWarning) {
708
+ return false;
709
+ }
710
+ }
711
+ }
712
+ return config.key !== undefined;
713
+ }
714
+
715
+ function defineKeyPropWarningGetter(props, displayName) {
716
+ var warnAboutAccessingKey = function() {
717
+ if (!specialPropKeyWarningShown) {
718
+ specialPropKeyWarningShown = true;
719
+ warning$3(
720
+ false,
721
+ '%s: `key` is not a prop. Trying to access it will result ' +
722
+ 'in `undefined` being returned. If you need to access the same ' +
723
+ 'value within the child component, you should pass it as a different ' +
724
+ 'prop. (https://fb.me/react-special-props)',
725
+ displayName
726
+ );
727
+ }
728
+ };
729
+ warnAboutAccessingKey.isReactWarning = true;
730
+ Object.defineProperty(props, 'key', {
731
+ get: warnAboutAccessingKey,
732
+ configurable: true,
733
+ });
734
+ }
735
+
736
+ function defineRefPropWarningGetter(props, displayName) {
737
+ var warnAboutAccessingRef = function() {
738
+ if (!specialPropRefWarningShown) {
739
+ specialPropRefWarningShown = true;
740
+ warning$3(
741
+ false,
742
+ '%s: `ref` is not a prop. Trying to access it will result ' +
743
+ 'in `undefined` being returned. If you need to access the same ' +
744
+ 'value within the child component, you should pass it as a different ' +
745
+ 'prop. (https://fb.me/react-special-props)',
746
+ displayName
747
+ );
748
+ }
749
+ };
750
+ warnAboutAccessingRef.isReactWarning = true;
751
+ Object.defineProperty(props, 'ref', {
752
+ get: warnAboutAccessingRef,
753
+ configurable: true,
754
+ });
755
+ }
756
+
757
+ /**
758
+ * Factory method to create a new React element. This no longer adheres to
759
+ * the class pattern, so do not use new to call it. Also, no instanceof check
760
+ * will work. Instead test $$typeof field against Symbol.for('react.element') to check
761
+ * if something is a React Element.
762
+ *
763
+ * @param {*} type
764
+ * @param {*} key
765
+ * @param {string|object} ref
766
+ * @param {*} self A *temporary* helper to detect places where `this` is
767
+ * different from the `owner` when React.createElement is called, so that we
768
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
769
+ * functions, and as long as `this` and owner are the same, there will be no
770
+ * change in behavior.
771
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
772
+ * indicating filename, line number, and/or other information.
773
+ * @param {*} owner
774
+ * @param {*} props
775
+ * @internal
776
+ */
777
+ var ReactElement = function(type, key, ref, self, source, owner, props) {
778
+ var element = {
779
+ // This tag allow us to uniquely identify this as a React Element
780
+ $$typeof: REACT_ELEMENT_TYPE$1,
781
+
782
+ // Built-in properties that belong on the element
783
+ type: type,
784
+ key: key,
785
+ ref: ref,
786
+ props: props,
787
+
788
+ // Record the component responsible for creating this element.
789
+ _owner: owner,
790
+ };
791
+
792
+ {
793
+ // The validation flag is currently mutative. We put it on
794
+ // an external backing store so that we can freeze the whole object.
795
+ // This can be replaced with a WeakMap once they are implemented in
796
+ // commonly used development environments.
797
+ element._store = {};
798
+
799
+ // To make comparing ReactElements easier for testing purposes, we make
800
+ // the validation flag non-enumerable (where possible, which should
801
+ // include every environment we run tests in), so the test framework
802
+ // ignores it.
803
+ Object.defineProperty(element._store, 'validated', {
804
+ configurable: false,
805
+ enumerable: false,
806
+ writable: true,
807
+ value: false,
808
+ });
809
+ // self and source are DEV only properties.
810
+ Object.defineProperty(element, '_self', {
811
+ configurable: false,
812
+ enumerable: false,
813
+ writable: false,
814
+ value: self,
815
+ });
816
+ // Two elements created in two different places should be considered
817
+ // equal for testing purposes and therefore we hide it from enumeration.
818
+ Object.defineProperty(element, '_source', {
819
+ configurable: false,
820
+ enumerable: false,
821
+ writable: false,
822
+ value: source,
823
+ });
824
+ if (Object.freeze) {
825
+ Object.freeze(element.props);
826
+ Object.freeze(element);
827
+ }
828
+ }
829
+
830
+ return element;
831
+ };
832
+
833
+ /**
834
+ * Create and return a new ReactElement of the given type.
835
+ * See https://facebook.github.io/react/docs/react-api.html#createelement
836
+ */
837
+ ReactElement.createElement = function(type, config, children) {
838
+ var propName;
839
+
840
+ // Reserved names are extracted
841
+ var props = {};
842
+
843
+ var key = null;
844
+ var ref = null;
845
+ var self = null;
846
+ var source = null;
847
+
848
+ if (config != null) {
849
+ if (hasValidRef(config)) {
850
+ ref = config.ref;
851
+ }
852
+ if (hasValidKey(config)) {
853
+ key = '' + config.key;
854
+ }
855
+
856
+ self = config.__self === undefined ? null : config.__self;
857
+ source = config.__source === undefined ? null : config.__source;
858
+ // Remaining properties are added to a new props object
859
+ for (propName in config) {
860
+ if (
861
+ hasOwnProperty$1.call(config, propName) &&
862
+ !RESERVED_PROPS.hasOwnProperty(propName)
863
+ ) {
864
+ props[propName] = config[propName];
865
+ }
866
+ }
867
+ }
868
+
869
+ // Children can be more than one argument, and those are transferred onto
870
+ // the newly allocated props object.
871
+ var childrenLength = arguments.length - 2;
872
+ if (childrenLength === 1) {
873
+ props.children = children;
874
+ } else if (childrenLength > 1) {
875
+ var childArray = Array(childrenLength);
876
+ for (var i = 0; i < childrenLength; i++) {
877
+ childArray[i] = arguments[i + 2];
878
+ }
879
+ {
880
+ if (Object.freeze) {
881
+ Object.freeze(childArray);
882
+ }
883
+ }
884
+ props.children = childArray;
885
+ }
886
+
887
+ // Resolve default props
888
+ if (type && type.defaultProps) {
889
+ var defaultProps = type.defaultProps;
890
+ for (propName in defaultProps) {
891
+ if (props[propName] === undefined) {
892
+ props[propName] = defaultProps[propName];
893
+ }
894
+ }
895
+ }
896
+ {
897
+ if (key || ref) {
898
+ if (
899
+ typeof props.$$typeof === 'undefined' ||
900
+ props.$$typeof !== REACT_ELEMENT_TYPE$1
901
+ ) {
902
+ var displayName = typeof type === 'function'
903
+ ? type.displayName || type.name || 'Unknown'
904
+ : type;
905
+ if (key) {
906
+ defineKeyPropWarningGetter(props, displayName);
907
+ }
908
+ if (ref) {
909
+ defineRefPropWarningGetter(props, displayName);
910
+ }
911
+ }
912
+ }
913
+ }
914
+ return ReactElement(
915
+ type,
916
+ key,
917
+ ref,
918
+ self,
919
+ source,
920
+ ReactCurrentOwner_1.current,
921
+ props
922
+ );
923
+ };
924
+
925
+ /**
926
+ * Return a function that produces ReactElements of a given type.
927
+ * See https://facebook.github.io/react/docs/react-api.html#createfactory
928
+ */
929
+ ReactElement.createFactory = function(type) {
930
+ var factory = ReactElement.createElement.bind(null, type);
931
+ // Expose the type on the factory and the prototype so that it can be
932
+ // easily accessed on elements. E.g. `<Foo />.type === Foo`.
933
+ // This should not be named `constructor` since this may not be the function
934
+ // that created the element, and it may not even be a constructor.
935
+ // Legacy hook TODO: Warn if this is accessed
936
+ factory.type = type;
937
+ return factory;
938
+ };
939
+
940
+ ReactElement.cloneAndReplaceKey = function(oldElement, newKey) {
941
+ var newElement = ReactElement(
942
+ oldElement.type,
943
+ newKey,
944
+ oldElement.ref,
945
+ oldElement._self,
946
+ oldElement._source,
947
+ oldElement._owner,
948
+ oldElement.props
949
+ );
950
+
951
+ return newElement;
952
+ };
953
+
954
+ /**
955
+ * Clone and return a new ReactElement using element as the starting point.
956
+ * See https://facebook.github.io/react/docs/react-api.html#cloneelement
957
+ */
958
+ ReactElement.cloneElement = function(element, config, children) {
959
+ var propName;
960
+
961
+ // Original props are copied
962
+ var props = index({}, element.props);
963
+
964
+ // Reserved names are extracted
965
+ var key = element.key;
966
+ var ref = element.ref;
967
+ // Self is preserved since the owner is preserved.
968
+ var self = element._self;
969
+ // Source is preserved since cloneElement is unlikely to be targeted by a
970
+ // transpiler, and the original source is probably a better indicator of the
971
+ // true owner.
972
+ var source = element._source;
973
+
974
+ // Owner will be preserved, unless ref is overridden
975
+ var owner = element._owner;
976
+
977
+ if (config != null) {
978
+ if (hasValidRef(config)) {
979
+ // Silently steal the ref from the parent.
980
+ ref = config.ref;
981
+ owner = ReactCurrentOwner_1.current;
982
+ }
983
+ if (hasValidKey(config)) {
984
+ key = '' + config.key;
985
+ }
986
+
987
+ // Remaining properties override existing props
988
+ var defaultProps;
989
+ if (element.type && element.type.defaultProps) {
990
+ defaultProps = element.type.defaultProps;
991
+ }
992
+ for (propName in config) {
993
+ if (
994
+ hasOwnProperty$1.call(config, propName) &&
995
+ !RESERVED_PROPS.hasOwnProperty(propName)
996
+ ) {
997
+ if (config[propName] === undefined && defaultProps !== undefined) {
998
+ // Resolve default props
999
+ props[propName] = defaultProps[propName];
1000
+ } else {
1001
+ props[propName] = config[propName];
1002
+ }
1003
+ }
1004
+ }
1005
+ }
1006
+
1007
+ // Children can be more than one argument, and those are transferred onto
1008
+ // the newly allocated props object.
1009
+ var childrenLength = arguments.length - 2;
1010
+ if (childrenLength === 1) {
1011
+ props.children = children;
1012
+ } else if (childrenLength > 1) {
1013
+ var childArray = Array(childrenLength);
1014
+ for (var i = 0; i < childrenLength; i++) {
1015
+ childArray[i] = arguments[i + 2];
1016
+ }
1017
+ props.children = childArray;
1018
+ }
1019
+
1020
+ return ReactElement(element.type, key, ref, self, source, owner, props);
1021
+ };
1022
+
1023
+ /**
1024
+ * Verifies the object is a ReactElement.
1025
+ * See https://facebook.github.io/react/docs/react-api.html#isvalidelement
1026
+ * @param {?object} object
1027
+ * @return {boolean} True if `object` is a valid component.
1028
+ * @final
1029
+ */
1030
+ ReactElement.isValidElement = function(object) {
1031
+ return (
1032
+ typeof object === 'object' &&
1033
+ object !== null &&
1034
+ object.$$typeof === REACT_ELEMENT_TYPE$1
1035
+ );
1036
+ };
1037
+
1038
+ var ReactElement_1 = ReactElement;
1039
+
1040
+ /**
1041
+ * Copyright 2013-present, Facebook, Inc.
1042
+ * All rights reserved.
1043
+ *
1044
+ * This source code is licensed under the BSD-style license found in the
1045
+ * LICENSE file in the root directory of this source tree. An additional grant
1046
+ * of patent rights can be found in the PATENTS file in the same directory.
1047
+ *
1048
+ * @providesModule ReactDebugCurrentFrame
1049
+ *
1050
+ */
1051
+
1052
+ var ReactDebugCurrentFrame = {};
1053
+
1054
+ {
1055
+ // Component that is being worked on
1056
+ ReactDebugCurrentFrame.getCurrentStack = null;
1057
+
1058
+ ReactDebugCurrentFrame.getStackAddendum = function() {
1059
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
1060
+ if (impl) {
1061
+ return impl();
1062
+ }
1063
+ return null;
1064
+ };
1065
+ }
1066
+
1067
+ var ReactDebugCurrentFrame_1 = ReactDebugCurrentFrame;
1068
+
1069
+ {
1070
+ var warning$2 = warning_1;
1071
+
1072
+ var _require = ReactDebugCurrentFrame_1,
1073
+ getStackAddendum = _require.getStackAddendum;
1074
+ }
1075
+
1076
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1077
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
1078
+ // The Symbol used to tag the ReactElement type. If there is no native Symbol
1079
+ // nor polyfill, then a plain number is used for performance.
1080
+ var REACT_ELEMENT_TYPE =
1081
+ (typeof Symbol === 'function' &&
1082
+ Symbol['for'] &&
1083
+ Symbol['for']('react.element')) ||
1084
+ 0xeac7;
1085
+
1086
+ var SEPARATOR = '.';
1087
+ var SUBSEPARATOR = ':';
1088
+
1089
+ /**
1090
+ * Escape and wrap key so it is safe to use as a reactid
1091
+ *
1092
+ * @param {string} key to be escaped.
1093
+ * @return {string} the escaped key.
1094
+ */
1095
+ function escape(key) {
1096
+ var escapeRegex = /[=:]/g;
1097
+ var escaperLookup = {
1098
+ '=': '=0',
1099
+ ':': '=2',
1100
+ };
1101
+ var escapedString = ('' + key).replace(escapeRegex, function(match) {
1102
+ return escaperLookup[match];
1103
+ });
1104
+
1105
+ return '$' + escapedString;
1106
+ }
1107
+
1108
+ /**
1109
+ * TODO: Test that a single child and an array with one item have the same key
1110
+ * pattern.
1111
+ */
1112
+
1113
+ var didWarnAboutMaps = false;
1114
+
1115
+ var userProvidedKeyEscapeRegex = /\/+/g;
1116
+ function escapeUserProvidedKey(text) {
1117
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
1118
+ }
1119
+
1120
+ var POOL_SIZE = 10;
1121
+ var traverseContextPool = [];
1122
+ function getPooledTraverseContext(
1123
+ mapResult,
1124
+ keyPrefix,
1125
+ mapFunction,
1126
+ mapContext
1127
+ ) {
1128
+ if (traverseContextPool.length) {
1129
+ var traverseContext = traverseContextPool.pop();
1130
+ traverseContext.result = mapResult;
1131
+ traverseContext.keyPrefix = keyPrefix;
1132
+ traverseContext.func = mapFunction;
1133
+ traverseContext.context = mapContext;
1134
+ traverseContext.count = 0;
1135
+ return traverseContext;
1136
+ } else {
1137
+ return {
1138
+ result: mapResult,
1139
+ keyPrefix: keyPrefix,
1140
+ func: mapFunction,
1141
+ context: mapContext,
1142
+ count: 0,
1143
+ };
1144
+ }
1145
+ }
1146
+
1147
+ function releaseTraverseContext(traverseContext) {
1148
+ traverseContext.result = null;
1149
+ traverseContext.keyPrefix = null;
1150
+ traverseContext.func = null;
1151
+ traverseContext.context = null;
1152
+ traverseContext.count = 0;
1153
+ if (traverseContextPool.length < POOL_SIZE) {
1154
+ traverseContextPool.push(traverseContext);
1155
+ }
1156
+ }
1157
+
1158
+ /**
1159
+ * @param {?*} children Children tree container.
1160
+ * @param {!string} nameSoFar Name of the key path so far.
1161
+ * @param {!function} callback Callback to invoke with each child found.
1162
+ * @param {?*} traverseContext Used to pass information throughout the traversal
1163
+ * process.
1164
+ * @return {!number} The number of children in this subtree.
1165
+ */
1166
+ function traverseAllChildrenImpl(
1167
+ children,
1168
+ nameSoFar,
1169
+ callback,
1170
+ traverseContext
1171
+ ) {
1172
+ var type = typeof children;
1173
+
1174
+ if (type === 'undefined' || type === 'boolean') {
1175
+ // All of the above are perceived as null.
1176
+ children = null;
1177
+ }
1178
+
1179
+ if (
1180
+ children === null ||
1181
+ type === 'string' ||
1182
+ type === 'number' ||
1183
+ // The following is inlined from ReactElement. This means we can optimize
1184
+ // some checks. React Fiber also inlines this logic for similar purposes.
1185
+ (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE)
1186
+ ) {
1187
+ callback(
1188
+ traverseContext,
1189
+ children,
1190
+ // If it's the only child, treat the name as if it was wrapped in an array
1191
+ // so that it's consistent if the number of children grows.
1192
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar
1193
+ );
1194
+ return 1;
1195
+ }
1196
+
1197
+ var child;
1198
+ var nextName;
1199
+ var subtreeCount = 0; // Count of children found in the current subtree.
1200
+ var nextNamePrefix = nameSoFar === ''
1201
+ ? SEPARATOR
1202
+ : nameSoFar + SUBSEPARATOR;
1203
+
1204
+ if (Array.isArray(children)) {
1205
+ for (var i = 0; i < children.length; i++) {
1206
+ child = children[i];
1207
+ nextName = nextNamePrefix + getComponentKey(child, i);
1208
+ subtreeCount += traverseAllChildrenImpl(
1209
+ child,
1210
+ nextName,
1211
+ callback,
1212
+ traverseContext
1213
+ );
1214
+ }
1215
+ } else {
1216
+ var iteratorFn =
1217
+ (ITERATOR_SYMBOL && children[ITERATOR_SYMBOL]) ||
1218
+ children[FAUX_ITERATOR_SYMBOL];
1219
+ if (typeof iteratorFn === 'function') {
1220
+ {
1221
+ // Warn about using Maps as children
1222
+ if (iteratorFn === children.entries) {
1223
+ warning$2(
1224
+ didWarnAboutMaps,
1225
+ 'Using Maps as children is unsupported and will likely yield ' +
1226
+ 'unexpected results. Convert it to a sequence/iterable of keyed ' +
1227
+ 'ReactElements instead.%s',
1228
+ getStackAddendum()
1229
+ );
1230
+ didWarnAboutMaps = true;
1231
+ }
1232
+ }
1233
+
1234
+ var iterator = iteratorFn.call(children);
1235
+ var step;
1236
+ var ii = 0;
1237
+ while (!(step = iterator.next()).done) {
1238
+ child = step.value;
1239
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
1240
+ subtreeCount += traverseAllChildrenImpl(
1241
+ child,
1242
+ nextName,
1243
+ callback,
1244
+ traverseContext
1245
+ );
1246
+ }
1247
+ } else if (type === 'object') {
1248
+ var addendum = '';
1249
+ {
1250
+ addendum =
1251
+ ' If you meant to render a collection of children, use an array ' +
1252
+ 'instead.' +
1253
+ getStackAddendum();
1254
+ }
1255
+ var childrenString = '' + children;
1256
+ invariant_1(
1257
+ false,
1258
+ 'Objects are not valid as a React child (found: %s).%s',
1259
+ childrenString === '[object Object]'
1260
+ ? 'object with keys {' + Object.keys(children).join(', ') + '}'
1261
+ : childrenString,
1262
+ addendum
1263
+ );
1264
+ }
1265
+ }
1266
+
1267
+ return subtreeCount;
1268
+ }
1269
+
1270
+ /**
1271
+ * Traverses children that are typically specified as `props.children`, but
1272
+ * might also be specified through attributes:
1273
+ *
1274
+ * - `traverseAllChildren(this.props.children, ...)`
1275
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
1276
+ *
1277
+ * The `traverseContext` is an optional argument that is passed through the
1278
+ * entire traversal. It can be used to store accumulations or anything else that
1279
+ * the callback might find relevant.
1280
+ *
1281
+ * @param {?*} children Children tree object.
1282
+ * @param {!function} callback To invoke upon traversing each child.
1283
+ * @param {?*} traverseContext Context for traversal.
1284
+ * @return {!number} The number of children in this subtree.
1285
+ */
1286
+ function traverseAllChildren(children, callback, traverseContext) {
1287
+ if (children == null) {
1288
+ return 0;
1289
+ }
1290
+
1291
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
1292
+ }
1293
+
1294
+ /**
1295
+ * Generate a key string that identifies a component within a set.
1296
+ *
1297
+ * @param {*} component A component that could contain a manual key.
1298
+ * @param {number} index Index that is used if a manual key is not provided.
1299
+ * @return {string}
1300
+ */
1301
+ function getComponentKey(component, index) {
1302
+ // Do some typechecking here since we call this blindly. We want to ensure
1303
+ // that we don't block potential future ES APIs.
1304
+ if (
1305
+ typeof component === 'object' &&
1306
+ component !== null &&
1307
+ component.key != null
1308
+ ) {
1309
+ // Explicit key
1310
+ return escape(component.key);
1311
+ }
1312
+ // Implicit key determined by the index in the set
1313
+ return index.toString(36);
1314
+ }
1315
+
1316
+ function forEachSingleChild(bookKeeping, child, name) {
1317
+ var func = bookKeeping.func, context = bookKeeping.context;
1318
+
1319
+ func.call(context, child, bookKeeping.count++);
1320
+ }
1321
+
1322
+ /**
1323
+ * Iterates through children that are typically specified as `props.children`.
1324
+ *
1325
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.foreach
1326
+ *
1327
+ * The provided forEachFunc(child, index) will be called for each
1328
+ * leaf child.
1329
+ *
1330
+ * @param {?*} children Children tree container.
1331
+ * @param {function(*, int)} forEachFunc
1332
+ * @param {*} forEachContext Context for forEachContext.
1333
+ */
1334
+ function forEachChildren(children, forEachFunc, forEachContext) {
1335
+ if (children == null) {
1336
+ return children;
1337
+ }
1338
+ var traverseContext = getPooledTraverseContext(
1339
+ null,
1340
+ null,
1341
+ forEachFunc,
1342
+ forEachContext
1343
+ );
1344
+ traverseAllChildren(children, forEachSingleChild, traverseContext);
1345
+ releaseTraverseContext(traverseContext);
1346
+ }
1347
+
1348
+ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
1349
+ var result = bookKeeping.result,
1350
+ keyPrefix = bookKeeping.keyPrefix,
1351
+ func = bookKeeping.func,
1352
+ context = bookKeeping.context;
1353
+
1354
+ var mappedChild = func.call(context, child, bookKeeping.count++);
1355
+ if (Array.isArray(mappedChild)) {
1356
+ mapIntoWithKeyPrefixInternal(
1357
+ mappedChild,
1358
+ result,
1359
+ childKey,
1360
+ emptyFunction_1.thatReturnsArgument
1361
+ );
1362
+ } else if (mappedChild != null) {
1363
+ if (ReactElement_1.isValidElement(mappedChild)) {
1364
+ mappedChild = ReactElement_1.cloneAndReplaceKey(
1365
+ mappedChild,
1366
+ // Keep both the (mapped) and old keys if they differ, just as
1367
+ // traverseAllChildren used to do for objects as children
1368
+ keyPrefix +
1369
+ (mappedChild.key && (!child || child.key !== mappedChild.key)
1370
+ ? escapeUserProvidedKey(mappedChild.key) + '/'
1371
+ : '') +
1372
+ childKey
1373
+ );
1374
+ }
1375
+ result.push(mappedChild);
1376
+ }
1377
+ }
1378
+
1379
+ function mapIntoWithKeyPrefixInternal(
1380
+ children,
1381
+ array,
1382
+ prefix,
1383
+ func,
1384
+ context
1385
+ ) {
1386
+ var escapedPrefix = '';
1387
+ if (prefix != null) {
1388
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
1389
+ }
1390
+ var traverseContext = getPooledTraverseContext(
1391
+ array,
1392
+ escapedPrefix,
1393
+ func,
1394
+ context
1395
+ );
1396
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
1397
+ releaseTraverseContext(traverseContext);
1398
+ }
1399
+
1400
+ /**
1401
+ * Maps children that are typically specified as `props.children`.
1402
+ *
1403
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.map
1404
+ *
1405
+ * The provided mapFunction(child, key, index) will be called for each
1406
+ * leaf child.
1407
+ *
1408
+ * @param {?*} children Children tree container.
1409
+ * @param {function(*, int)} func The map function.
1410
+ * @param {*} context Context for mapFunction.
1411
+ * @return {object} Object containing the ordered map of results.
1412
+ */
1413
+ function mapChildren(children, func, context) {
1414
+ if (children == null) {
1415
+ return children;
1416
+ }
1417
+ var result = [];
1418
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
1419
+ return result;
1420
+ }
1421
+
1422
+ /**
1423
+ * Count the number of children that are typically specified as
1424
+ * `props.children`.
1425
+ *
1426
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.count
1427
+ *
1428
+ * @param {?*} children Children tree container.
1429
+ * @return {number} The number of children.
1430
+ */
1431
+ function countChildren(children, context) {
1432
+ return traverseAllChildren(children, emptyFunction_1.thatReturnsNull, null);
1433
+ }
1434
+
1435
+ /**
1436
+ * Flatten a children object (typically specified as `props.children`) and
1437
+ * return an array with appropriately re-keyed children.
1438
+ *
1439
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.toarray
1440
+ */
1441
+ function toArray(children) {
1442
+ var result = [];
1443
+ mapIntoWithKeyPrefixInternal(
1444
+ children,
1445
+ result,
1446
+ null,
1447
+ emptyFunction_1.thatReturnsArgument
1448
+ );
1449
+ return result;
1450
+ }
1451
+
1452
+ var ReactChildren = {
1453
+ forEach: forEachChildren,
1454
+ map: mapChildren,
1455
+ count: countChildren,
1456
+ toArray: toArray,
1457
+ };
1458
+
1459
+ var ReactChildren_1 = ReactChildren;
1460
+
1461
+ /**
1462
+ * Copyright 2013-present, Facebook, Inc.
1463
+ * All rights reserved.
1464
+ *
1465
+ * This source code is licensed under the BSD-style license found in the
1466
+ * LICENSE file in the root directory of this source tree. An additional grant
1467
+ * of patent rights can be found in the PATENTS file in the same directory.
1468
+ *
1469
+ * @providesModule ReactVersion
1470
+ */
1471
+
1472
+ var ReactVersion = '16.0.0-beta.5';
1473
+
1474
+ /**
1475
+ * Returns the first child in a collection of children and verifies that there
1476
+ * is only one child in the collection.
1477
+ *
1478
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.only
1479
+ *
1480
+ * The current implementation of this function assumes that a single child gets
1481
+ * passed without a wrapper, but the purpose of this helper function is to
1482
+ * abstract away the particular structure of children.
1483
+ *
1484
+ * @param {?object} children Child collection structure.
1485
+ * @return {ReactElement} The first and only `ReactElement` contained in the
1486
+ * structure.
1487
+ */
1488
+ function onlyChild(children) {
1489
+ !ReactElement_1.isValidElement(children)
1490
+ ? invariant_1(
1491
+ false,
1492
+ 'React.Children.only expected to receive a single React element child.'
1493
+ )
1494
+ : void 0;
1495
+ return children;
1496
+ }
1497
+
1498
+ var onlyChild_1 = onlyChild;
1499
+
1500
+ /**
1501
+ * Copyright 2013-present, Facebook, Inc.
1502
+ * All rights reserved.
1503
+ *
1504
+ * This source code is licensed under the BSD-style license found in the
1505
+ * LICENSE file in the root directory of this source tree. An additional grant
1506
+ * of patent rights can be found in the PATENTS file in the same directory.
1507
+ */
1508
+
1509
+ var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1510
+
1511
+ var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
1512
+
1513
+ {
1514
+ var invariant$2 = invariant_1;
1515
+ var warning$5 = warning_1;
1516
+ var ReactPropTypesSecret = ReactPropTypesSecret_1;
1517
+ var loggedTypeFailures = {};
1518
+ }
1519
+
1520
+ /**
1521
+ * Assert that the values match with the type specs.
1522
+ * Error messages are memorized and will only be shown once.
1523
+ *
1524
+ * @param {object} typeSpecs Map of name to a ReactPropType
1525
+ * @param {object} values Runtime values that need to be type-checked
1526
+ * @param {string} location e.g. "prop", "context", "child context"
1527
+ * @param {string} componentName Name of the component for error messages.
1528
+ * @param {?Function} getStack Returns the component stack.
1529
+ * @private
1530
+ */
1531
+ function checkPropTypes$1(
1532
+ typeSpecs,
1533
+ values,
1534
+ location,
1535
+ componentName,
1536
+ getStack
1537
+ ) {
1538
+ {
1539
+ for (var typeSpecName in typeSpecs) {
1540
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
1541
+ var error;
1542
+ // Prop type validation may throw. In case they do, we don't want to
1543
+ // fail the render phase where it didn't fail before. So we log it.
1544
+ // After these have been cleaned up, we'll let them throw.
1545
+ try {
1546
+ // This is intentionally an invariant that gets caught. It's the same
1547
+ // behavior as without this statement except with a better message.
1548
+ invariant$2(
1549
+ typeof typeSpecs[typeSpecName] === 'function',
1550
+ '%s: %s type `%s` is invalid; it must be a function, usually from ' +
1551
+ 'React.PropTypes.',
1552
+ componentName || 'React class',
1553
+ location,
1554
+ typeSpecName
1555
+ );
1556
+ error = typeSpecs[typeSpecName](
1557
+ values,
1558
+ typeSpecName,
1559
+ componentName,
1560
+ location,
1561
+ null,
1562
+ ReactPropTypesSecret
1563
+ );
1564
+ } catch (ex) {
1565
+ error = ex;
1566
+ }
1567
+ warning$5(
1568
+ !error || error instanceof Error,
1569
+ '%s: type specification of %s `%s` is invalid; the type checker ' +
1570
+ 'function must return `null` or an `Error` but returned a %s. ' +
1571
+ 'You may have forgotten to pass an argument to the type checker ' +
1572
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1573
+ 'shape all require an argument).',
1574
+ componentName || 'React class',
1575
+ location,
1576
+ typeSpecName,
1577
+ typeof error
1578
+ );
1579
+ if (
1580
+ error instanceof Error &&
1581
+ !(error.message in loggedTypeFailures)
1582
+ ) {
1583
+ // Only monitor this failure once because there tends to be a lot of the
1584
+ // same error.
1585
+ loggedTypeFailures[error.message] = true;
1586
+
1587
+ var stack = getStack ? getStack() : '';
1588
+
1589
+ warning$5(
1590
+ false,
1591
+ 'Failed %s type: %s%s',
1592
+ location,
1593
+ error.message,
1594
+ stack != null ? stack : ''
1595
+ );
1596
+ }
1597
+ }
1598
+ }
1599
+ }
1600
+ }
1601
+
1602
+ var checkPropTypes_1 = checkPropTypes$1;
1603
+
1604
+ /**
1605
+ * Copyright 2016-present, Facebook, Inc.
1606
+ * All rights reserved.
1607
+ *
1608
+ * This source code is licensed under the BSD-style license found in the
1609
+ * LICENSE file in the root directory of this source tree. An additional grant
1610
+ * of patent rights can be found in the PATENTS file in the same directory.
1611
+ *
1612
+ *
1613
+ * @providesModule describeComponentFrame
1614
+ */
1615
+
1616
+ var describeComponentFrame$1 = function(name, source, ownerName) {
1617
+ return (
1618
+ '\n in ' +
1619
+ (name || 'Unknown') +
1620
+ (source
1621
+ ? ' (at ' +
1622
+ source.fileName.replace(/^.*[\\\/]/, '') +
1623
+ ':' +
1624
+ source.lineNumber +
1625
+ ')'
1626
+ : ownerName ? ' (created by ' + ownerName + ')' : '')
1627
+ );
1628
+ };
1629
+
1630
+ /**
1631
+ * Copyright 2013-present, Facebook, Inc.
1632
+ * All rights reserved.
1633
+ *
1634
+ * This source code is licensed under the BSD-style license found in the
1635
+ * LICENSE file in the root directory of this source tree. An additional grant
1636
+ * of patent rights can be found in the PATENTS file in the same directory.
1637
+ *
1638
+ * @providesModule getComponentName
1639
+ *
1640
+ */
1641
+
1642
+ function getComponentName$1(instanceOrFiber) {
1643
+ if (typeof instanceOrFiber.getName === 'function') {
1644
+ // Stack reconciler
1645
+ var instance = instanceOrFiber;
1646
+ return instance.getName();
1647
+ }
1648
+ if (typeof instanceOrFiber.tag === 'number') {
1649
+ // Fiber reconciler
1650
+ var fiber = instanceOrFiber;
1651
+ var type = fiber.type;
1652
+
1653
+ if (typeof type === 'string') {
1654
+ return type;
1655
+ }
1656
+ if (typeof type === 'function') {
1657
+ return type.displayName || type.name;
1658
+ }
1659
+ }
1660
+ return null;
1661
+ }
1662
+
1663
+ var getComponentName_1 = getComponentName$1;
1664
+
1665
+ {
1666
+ var checkPropTypes = checkPropTypes_1;
1667
+ var lowPriorityWarning$1 = lowPriorityWarning_1;
1668
+ var ReactDebugCurrentFrame$1 = ReactDebugCurrentFrame_1;
1669
+ var warning$4 = warning_1;
1670
+ var describeComponentFrame = describeComponentFrame$1;
1671
+ var getComponentName = getComponentName_1;
1672
+
1673
+ var currentlyValidatingElement = null;
1674
+
1675
+ var getDisplayName = function(element) {
1676
+ if (element == null) {
1677
+ return '#empty';
1678
+ } else if (typeof element === 'string' || typeof element === 'number') {
1679
+ return '#text';
1680
+ } else if (typeof element.type === 'string') {
1681
+ return element.type;
1682
+ } else {
1683
+ return element.type.displayName || element.type.name || 'Unknown';
1684
+ }
1685
+ };
1686
+
1687
+ var getStackAddendum$1 = function() {
1688
+ var stack = '';
1689
+ if (currentlyValidatingElement) {
1690
+ var name = getDisplayName(currentlyValidatingElement);
1691
+ var owner = currentlyValidatingElement._owner;
1692
+ stack += describeComponentFrame(
1693
+ name,
1694
+ currentlyValidatingElement._source,
1695
+ owner && getComponentName(owner)
1696
+ );
1697
+ }
1698
+ stack += ReactDebugCurrentFrame$1.getStackAddendum() || '';
1699
+ return stack;
1700
+ };
1701
+ }
1702
+
1703
+ var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator;
1704
+ var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec.
1705
+
1706
+ function getDeclarationErrorAddendum() {
1707
+ if (ReactCurrentOwner_1.current) {
1708
+ var name = getComponentName(ReactCurrentOwner_1.current);
1709
+ if (name) {
1710
+ return '\n\nCheck the render method of `' + name + '`.';
1711
+ }
1712
+ }
1713
+ return '';
1714
+ }
1715
+
1716
+ function getSourceInfoErrorAddendum(elementProps) {
1717
+ if (
1718
+ elementProps !== null &&
1719
+ elementProps !== undefined &&
1720
+ elementProps.__source !== undefined
1721
+ ) {
1722
+ var source = elementProps.__source;
1723
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
1724
+ var lineNumber = source.lineNumber;
1725
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
1726
+ }
1727
+ return '';
1728
+ }
1729
+
1730
+ /**
1731
+ * Warn if there's no key explicitly set on dynamic arrays of children or
1732
+ * object keys are not valid. This allows us to keep track of children between
1733
+ * updates.
1734
+ */
1735
+ var ownerHasKeyUseWarning = {};
1736
+
1737
+ function getCurrentComponentErrorInfo(parentType) {
1738
+ var info = getDeclarationErrorAddendum();
1739
+
1740
+ if (!info) {
1741
+ var parentName = typeof parentType === 'string'
1742
+ ? parentType
1743
+ : parentType.displayName || parentType.name;
1744
+ if (parentName) {
1745
+ info =
1746
+ '\n\nCheck the top-level render call using <' + parentName + '>.';
1747
+ }
1748
+ }
1749
+ return info;
1750
+ }
1751
+
1752
+ /**
1753
+ * Warn if the element doesn't have an explicit key assigned to it.
1754
+ * This element is in an array. The array could grow and shrink or be
1755
+ * reordered. All children that haven't already been validated are required to
1756
+ * have a "key" property assigned to it. Error statuses are cached so a warning
1757
+ * will only be shown once.
1758
+ *
1759
+ * @internal
1760
+ * @param {ReactElement} element Element that requires a key.
1761
+ * @param {*} parentType element's parent's type.
1762
+ */
1763
+ function validateExplicitKey(element, parentType) {
1764
+ if (!element._store || element._store.validated || element.key != null) {
1765
+ return;
1766
+ }
1767
+ element._store.validated = true;
1768
+
1769
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1770
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1771
+ return;
1772
+ }
1773
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
1774
+
1775
+ // Usually the current owner is the offender, but if it accepts children as a
1776
+ // property, it may be the creator of the child that's responsible for
1777
+ // assigning it a key.
1778
+ var childOwner = '';
1779
+ if (
1780
+ element &&
1781
+ element._owner &&
1782
+ element._owner !== ReactCurrentOwner_1.current
1783
+ ) {
1784
+ // Give the component that originally created this child.
1785
+ childOwner =
1786
+ ' It was passed a child from ' + getComponentName(element._owner) + '.';
1787
+ }
1788
+
1789
+ currentlyValidatingElement = element;
1790
+ {
1791
+ warning$4(
1792
+ false,
1793
+ 'Each child in an array or iterator should have a unique "key" prop.' +
1794
+ '%s%s See https://fb.me/react-warning-keys for more information.%s',
1795
+ currentComponentErrorInfo,
1796
+ childOwner,
1797
+ getStackAddendum$1()
1798
+ );
1799
+ }
1800
+ currentlyValidatingElement = null;
1801
+ }
1802
+
1803
+ /**
1804
+ * Ensure that every element either is passed in a static location, in an
1805
+ * array with an explicit keys property defined, or in an object literal
1806
+ * with valid key property.
1807
+ *
1808
+ * @internal
1809
+ * @param {ReactNode} node Statically passed child of any type.
1810
+ * @param {*} parentType node's parent's type.
1811
+ */
1812
+ function validateChildKeys(node, parentType) {
1813
+ if (typeof node !== 'object') {
1814
+ return;
1815
+ }
1816
+ if (Array.isArray(node)) {
1817
+ for (var i = 0; i < node.length; i++) {
1818
+ var child = node[i];
1819
+ if (ReactElement_1.isValidElement(child)) {
1820
+ validateExplicitKey(child, parentType);
1821
+ }
1822
+ }
1823
+ } else if (ReactElement_1.isValidElement(node)) {
1824
+ // This element was passed in a valid location.
1825
+ if (node._store) {
1826
+ node._store.validated = true;
1827
+ }
1828
+ } else if (node) {
1829
+ var iteratorFn =
1830
+ (ITERATOR_SYMBOL$1 && node[ITERATOR_SYMBOL$1]) ||
1831
+ node[FAUX_ITERATOR_SYMBOL$1];
1832
+ if (typeof iteratorFn === 'function') {
1833
+ // Entry iterators used to provide implicit keys,
1834
+ // but now we print a separate warning for them later.
1835
+ if (iteratorFn !== node.entries) {
1836
+ var iterator = iteratorFn.call(node);
1837
+ var step;
1838
+ while (!(step = iterator.next()).done) {
1839
+ if (ReactElement_1.isValidElement(step.value)) {
1840
+ validateExplicitKey(step.value, parentType);
1841
+ }
1842
+ }
1843
+ }
1844
+ }
1845
+ }
1846
+ }
1847
+
1848
+ /**
1849
+ * Given an element, validate that its props follow the propTypes definition,
1850
+ * provided by the type.
1851
+ *
1852
+ * @param {ReactElement} element
1853
+ */
1854
+ function validatePropTypes(element) {
1855
+ var componentClass = element.type;
1856
+ if (typeof componentClass !== 'function') {
1857
+ return;
1858
+ }
1859
+ var name = componentClass.displayName || componentClass.name;
1860
+
1861
+ // ReactNative `View.propTypes` have been deprecated in favor of `ViewPropTypes`.
1862
+ // In their place a temporary getter has been added with a deprecated warning message.
1863
+ // Avoid triggering that warning during validation using the temporary workaround,
1864
+ // __propTypesSecretDontUseThesePlease.
1865
+ // TODO (bvaughn) Revert this particular change any time after April 1 ReactNative tag.
1866
+ var propTypes = typeof componentClass.__propTypesSecretDontUseThesePlease ===
1867
+ 'object'
1868
+ ? componentClass.__propTypesSecretDontUseThesePlease
1869
+ : componentClass.propTypes;
1870
+
1871
+ if (propTypes) {
1872
+ currentlyValidatingElement = element;
1873
+ checkPropTypes(
1874
+ propTypes,
1875
+ element.props,
1876
+ 'prop',
1877
+ name,
1878
+ getStackAddendum$1
1879
+ );
1880
+ currentlyValidatingElement = null;
1881
+ }
1882
+ if (typeof componentClass.getDefaultProps === 'function') {
1883
+ warning$4(
1884
+ componentClass.getDefaultProps.isReactClassApproved,
1885
+ 'getDefaultProps is only used on classic React.createClass ' +
1886
+ 'definitions. Use a static property named `defaultProps` instead.'
1887
+ );
1888
+ }
1889
+ }
1890
+
1891
+ var ReactElementValidator$1 = {
1892
+ createElement: function(type, props, children) {
1893
+ var validType = typeof type === 'string' || typeof type === 'function';
1894
+ // We warn in this case but don't throw. We expect the element creation to
1895
+ // succeed and there will likely be errors in render.
1896
+ if (!validType) {
1897
+ var info = '';
1898
+ if (
1899
+ type === undefined ||
1900
+ (typeof type === 'object' &&
1901
+ type !== null &&
1902
+ Object.keys(type).length === 0)
1903
+ ) {
1904
+ info +=
1905
+ ' You likely forgot to export your component from the file ' +
1906
+ "it's defined in.";
1907
+ }
1908
+
1909
+ var sourceInfo = getSourceInfoErrorAddendum(props);
1910
+ if (sourceInfo) {
1911
+ info += sourceInfo;
1912
+ } else {
1913
+ info += getDeclarationErrorAddendum();
1914
+ }
1915
+
1916
+ info += ReactDebugCurrentFrame$1.getStackAddendum() || '';
1917
+
1918
+ warning$4(
1919
+ false,
1920
+ 'React.createElement: type is invalid -- expected a string (for ' +
1921
+ 'built-in components) or a class/function (for composite ' +
1922
+ 'components) but got: %s.%s',
1923
+ type == null ? type : typeof type,
1924
+ info
1925
+ );
1926
+ }
1927
+
1928
+ var element = ReactElement_1.createElement.apply(this, arguments);
1929
+
1930
+ // The result can be nullish if a mock or a custom function is used.
1931
+ // TODO: Drop this when these are no longer allowed as the type argument.
1932
+ if (element == null) {
1933
+ return element;
1934
+ }
1935
+
1936
+ // Skip key warning if the type isn't valid since our key validation logic
1937
+ // doesn't expect a non-string/function type and can throw confusing errors.
1938
+ // We don't want exception behavior to differ between dev and prod.
1939
+ // (Rendering will throw with a helpful message and as soon as the type is
1940
+ // fixed, the key warnings will appear.)
1941
+ if (validType) {
1942
+ for (var i = 2; i < arguments.length; i++) {
1943
+ validateChildKeys(arguments[i], type);
1944
+ }
1945
+ }
1946
+
1947
+ validatePropTypes(element);
1948
+
1949
+ return element;
1950
+ },
1951
+
1952
+ createFactory: function(type) {
1953
+ var validatedFactory = ReactElementValidator$1.createElement.bind(
1954
+ null,
1955
+ type
1956
+ );
1957
+ // Legacy hook TODO: Warn if this is accessed
1958
+ validatedFactory.type = type;
1959
+
1960
+ {
1961
+ Object.defineProperty(validatedFactory, 'type', {
1962
+ enumerable: false,
1963
+ get: function() {
1964
+ lowPriorityWarning$1(
1965
+ false,
1966
+ 'Factory.type is deprecated. Access the class directly ' +
1967
+ 'before passing it to createFactory.'
1968
+ );
1969
+ Object.defineProperty(this, 'type', {
1970
+ value: type,
1971
+ });
1972
+ return type;
1973
+ },
1974
+ });
1975
+ }
1976
+
1977
+ return validatedFactory;
1978
+ },
1979
+
1980
+ cloneElement: function(element, props, children) {
1981
+ var newElement = ReactElement_1.cloneElement.apply(this, arguments);
1982
+ for (var i = 2; i < arguments.length; i++) {
1983
+ validateChildKeys(arguments[i], newElement.type);
1984
+ }
1985
+ validatePropTypes(newElement);
1986
+ return newElement;
1987
+ },
1988
+ };
1989
+
1990
+ var ReactElementValidator_1 = ReactElementValidator$1;
1991
+
1992
+ {
1993
+ var warning$6 = warning_1;
1994
+ }
1995
+
1996
+ function isNative(fn) {
1997
+ // Based on isNative() from Lodash
1998
+ var funcToString = Function.prototype.toString;
1999
+ var reIsNative = RegExp(
2000
+ '^' +
2001
+ funcToString
2002
+ // Take an example native function source for comparison
2003
+ .call(Object.prototype.hasOwnProperty)
2004
+ // Strip regex characters so we can use it for regex
2005
+ .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
2006
+ // Remove hasOwnProperty from the template to make it generic
2007
+ .replace(
2008
+ /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
2009
+ '$1.*?'
2010
+ ) +
2011
+ '$'
2012
+ );
2013
+ try {
2014
+ var source = funcToString.call(fn);
2015
+ return reIsNative.test(source);
2016
+ } catch (err) {
2017
+ return false;
2018
+ }
2019
+ }
2020
+
2021
+ var canUseCollections =
2022
+ // Array.from
2023
+ typeof Array.from === 'function' &&
2024
+ // Map
2025
+ typeof Map === 'function' &&
2026
+ isNative(Map) &&
2027
+ // Map.prototype.keys
2028
+ Map.prototype != null &&
2029
+ typeof Map.prototype.keys === 'function' &&
2030
+ isNative(Map.prototype.keys) &&
2031
+ // Set
2032
+ typeof Set === 'function' &&
2033
+ isNative(Set) &&
2034
+ // Set.prototype.keys
2035
+ Set.prototype != null &&
2036
+ typeof Set.prototype.keys === 'function' &&
2037
+ isNative(Set.prototype.keys);
2038
+
2039
+ var setItem;
2040
+ var getItem;
2041
+ var removeItem;
2042
+ var getItemIDs;
2043
+ var addRoot;
2044
+ var removeRoot;
2045
+ var getRootIDs;
2046
+
2047
+ if (canUseCollections) {
2048
+ var itemMap = new Map();
2049
+ var rootIDSet = new Set();
2050
+
2051
+ setItem = function(id, item) {
2052
+ itemMap.set(id, item);
2053
+ };
2054
+ getItem = function(id) {
2055
+ return itemMap.get(id);
2056
+ };
2057
+ removeItem = function(id) {
2058
+ itemMap['delete'](id);
2059
+ };
2060
+ getItemIDs = function() {
2061
+ return Array.from(itemMap.keys());
2062
+ };
2063
+
2064
+ addRoot = function(id) {
2065
+ rootIDSet.add(id);
2066
+ };
2067
+ removeRoot = function(id) {
2068
+ rootIDSet['delete'](id);
2069
+ };
2070
+ getRootIDs = function() {
2071
+ return Array.from(rootIDSet.keys());
2072
+ };
2073
+ } else {
2074
+ var itemByKey = {};
2075
+ var rootByKey = {};
2076
+
2077
+ // Use non-numeric keys to prevent V8 performance issues:
2078
+ // https://github.com/facebook/react/pull/7232
2079
+ var getKeyFromID = function(id) {
2080
+ return '.' + id;
2081
+ };
2082
+ var getIDFromKey = function(key) {
2083
+ return parseInt(key.substr(1), 10);
2084
+ };
2085
+
2086
+ setItem = function(id, item) {
2087
+ var key = getKeyFromID(id);
2088
+ itemByKey[key] = item;
2089
+ };
2090
+ getItem = function(id) {
2091
+ var key = getKeyFromID(id);
2092
+ return itemByKey[key];
2093
+ };
2094
+ removeItem = function(id) {
2095
+ var key = getKeyFromID(id);
2096
+ delete itemByKey[key];
2097
+ };
2098
+ getItemIDs = function() {
2099
+ return Object.keys(itemByKey).map(getIDFromKey);
2100
+ };
2101
+
2102
+ addRoot = function(id) {
2103
+ var key = getKeyFromID(id);
2104
+ rootByKey[key] = true;
2105
+ };
2106
+ removeRoot = function(id) {
2107
+ var key = getKeyFromID(id);
2108
+ delete rootByKey[key];
2109
+ };
2110
+ getRootIDs = function() {
2111
+ return Object.keys(rootByKey).map(getIDFromKey);
2112
+ };
2113
+ }
2114
+
2115
+ var unmountedIDs = [];
2116
+
2117
+ function purgeDeep(id) {
2118
+ var item = getItem(id);
2119
+ if (item) {
2120
+ var childIDs = item.childIDs;
2121
+
2122
+ removeItem(id);
2123
+ childIDs.forEach(purgeDeep);
2124
+ }
2125
+ }
2126
+
2127
+ function getDisplayName$1(element) {
2128
+ if (element == null) {
2129
+ return '#empty';
2130
+ } else if (typeof element === 'string' || typeof element === 'number') {
2131
+ return '#text';
2132
+ } else if (typeof element.type === 'string') {
2133
+ return element.type;
2134
+ } else {
2135
+ return element.type.displayName || element.type.name || 'Unknown';
2136
+ }
2137
+ }
2138
+
2139
+ function describeID(id) {
2140
+ var name = ReactComponentTreeHook.getDisplayName(id);
2141
+ var element = ReactComponentTreeHook.getElement(id);
2142
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
2143
+ var ownerName = void 0;
2144
+
2145
+ if (ownerID) {
2146
+ ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
2147
+ }
2148
+ warning$6(
2149
+ element,
2150
+ 'ReactComponentTreeHook: Missing React element for debugID %s when ' +
2151
+ 'building stack',
2152
+ id
2153
+ );
2154
+ return describeComponentFrame$1(
2155
+ name || '',
2156
+ element && element._source,
2157
+ ownerName || ''
2158
+ );
2159
+ }
2160
+
2161
+ var ReactComponentTreeHook = {
2162
+ onSetChildren: function(id, nextChildIDs) {
2163
+ var item = getItem(id);
2164
+ !item ? invariant_1(false, 'Item must have been set') : void 0;
2165
+ item.childIDs = nextChildIDs;
2166
+
2167
+ for (var i = 0; i < nextChildIDs.length; i++) {
2168
+ var nextChildID = nextChildIDs[i];
2169
+ var nextChild = getItem(nextChildID);
2170
+ !nextChild
2171
+ ? invariant_1(
2172
+ false,
2173
+ 'Expected hook events to fire for the child before its parent includes it in onSetChildren().'
2174
+ )
2175
+ : void 0;
2176
+ !(nextChild.childIDs != null ||
2177
+ typeof nextChild.element !== 'object' ||
2178
+ nextChild.element == null)
2179
+ ? invariant_1(
2180
+ false,
2181
+ 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().'
2182
+ )
2183
+ : void 0;
2184
+ !nextChild.isMounted
2185
+ ? invariant_1(
2186
+ false,
2187
+ 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().'
2188
+ )
2189
+ : void 0;
2190
+ if (nextChild.parentID == null) {
2191
+ nextChild.parentID = id;
2192
+ // TODO: This shouldn't be necessary but mounting a new root during in
2193
+ // componentWillMount currently causes not-yet-mounted components to
2194
+ // be purged from our tree data so their parent id is missing.
2195
+ }
2196
+ !(nextChild.parentID === id)
2197
+ ? invariant_1(
2198
+ false,
2199
+ 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).',
2200
+ nextChildID,
2201
+ nextChild.parentID,
2202
+ id
2203
+ )
2204
+ : void 0;
2205
+ }
2206
+ },
2207
+ onBeforeMountComponent: function(id, element, parentID) {
2208
+ var item = {
2209
+ element: element,
2210
+ parentID: parentID,
2211
+ text: null,
2212
+ childIDs: [],
2213
+ isMounted: false,
2214
+ updateCount: 0,
2215
+ };
2216
+ setItem(id, item);
2217
+ },
2218
+ onBeforeUpdateComponent: function(id, element) {
2219
+ var item = getItem(id);
2220
+ if (!item || !item.isMounted) {
2221
+ // We may end up here as a result of setState() in componentWillUnmount().
2222
+ // In this case, ignore the element.
2223
+ return;
2224
+ }
2225
+ item.element = element;
2226
+ },
2227
+ onMountComponent: function(id) {
2228
+ var item = getItem(id);
2229
+ !item ? invariant_1(false, 'Item must have been set') : void 0;
2230
+ item.isMounted = true;
2231
+ var isRoot = item.parentID === 0;
2232
+ if (isRoot) {
2233
+ addRoot(id);
2234
+ }
2235
+ },
2236
+ onUpdateComponent: function(id) {
2237
+ var item = getItem(id);
2238
+ if (!item || !item.isMounted) {
2239
+ // We may end up here as a result of setState() in componentWillUnmount().
2240
+ // In this case, ignore the element.
2241
+ return;
2242
+ }
2243
+ item.updateCount++;
2244
+ },
2245
+ onUnmountComponent: function(id) {
2246
+ var item = getItem(id);
2247
+ if (item) {
2248
+ // We need to check if it exists.
2249
+ // `item` might not exist if it is inside an error boundary, and a sibling
2250
+ // error boundary child threw while mounting. Then this instance never
2251
+ // got a chance to mount, but it still gets an unmounting event during
2252
+ // the error boundary cleanup.
2253
+ item.isMounted = false;
2254
+ var isRoot = item.parentID === 0;
2255
+ if (isRoot) {
2256
+ removeRoot(id);
2257
+ }
2258
+ }
2259
+ unmountedIDs.push(id);
2260
+ },
2261
+ purgeUnmountedComponents: function() {
2262
+ if (ReactComponentTreeHook._preventPurging) {
2263
+ // Should only be used for testing.
2264
+ return;
2265
+ }
2266
+
2267
+ for (var i = 0; i < unmountedIDs.length; i++) {
2268
+ var id = unmountedIDs[i];
2269
+ purgeDeep(id);
2270
+ }
2271
+ unmountedIDs.length = 0;
2272
+ },
2273
+ isMounted: function(id) {
2274
+ var item = getItem(id);
2275
+ return item ? item.isMounted : false;
2276
+ },
2277
+ getCurrentStackAddendum: function() {
2278
+ var info = '';
2279
+ var currentOwner = ReactCurrentOwner_1.current;
2280
+ if (currentOwner) {
2281
+ !(typeof currentOwner.tag !== 'number')
2282
+ ? invariant_1(
2283
+ false,
2284
+ 'Fiber owners should not show up in Stack stack traces.'
2285
+ )
2286
+ : void 0;
2287
+ if (typeof currentOwner._debugID === 'number') {
2288
+ info += ReactComponentTreeHook.getStackAddendumByID(
2289
+ currentOwner._debugID
2290
+ );
2291
+ }
2292
+ }
2293
+ return info;
2294
+ },
2295
+ getStackAddendumByID: function(id) {
2296
+ var info = '';
2297
+ while (id) {
2298
+ info += describeID(id);
2299
+ id = ReactComponentTreeHook.getParentID(id);
2300
+ }
2301
+ return info;
2302
+ },
2303
+ getChildIDs: function(id) {
2304
+ var item = getItem(id);
2305
+ return item ? item.childIDs : [];
2306
+ },
2307
+ getDisplayName: function(id) {
2308
+ var element = ReactComponentTreeHook.getElement(id);
2309
+ if (!element) {
2310
+ return null;
2311
+ }
2312
+ return getDisplayName$1(element);
2313
+ },
2314
+ getElement: function(id) {
2315
+ var item = getItem(id);
2316
+ return item ? item.element : null;
2317
+ },
2318
+ getOwnerID: function(id) {
2319
+ var element = ReactComponentTreeHook.getElement(id);
2320
+ if (!element || !element._owner) {
2321
+ return null;
2322
+ }
2323
+ return element._owner._debugID;
2324
+ },
2325
+ getParentID: function(id) {
2326
+ var item = getItem(id);
2327
+ return item ? item.parentID : null;
2328
+ },
2329
+ getSource: function(id) {
2330
+ var item = getItem(id);
2331
+ var element = item ? item.element : null;
2332
+ var source = element != null ? element._source : null;
2333
+ return source;
2334
+ },
2335
+ getText: function(id) {
2336
+ var element = ReactComponentTreeHook.getElement(id);
2337
+ if (typeof element === 'string') {
2338
+ return element;
2339
+ } else if (typeof element === 'number') {
2340
+ return '' + element;
2341
+ } else {
2342
+ return null;
2343
+ }
2344
+ },
2345
+ getUpdateCount: function(id) {
2346
+ var item = getItem(id);
2347
+ return item ? item.updateCount : 0;
2348
+ },
2349
+
2350
+ getRootIDs: getRootIDs,
2351
+ getRegisteredIDs: getItemIDs,
2352
+ };
2353
+
2354
+ var ReactComponentTreeHook_1 = ReactComponentTreeHook;
2355
+
2356
+ var createElement = ReactElement_1.createElement;
2357
+ var createFactory = ReactElement_1.createFactory;
2358
+ var cloneElement = ReactElement_1.cloneElement;
2359
+
2360
+ {
2361
+ var ReactElementValidator = ReactElementValidator_1;
2362
+ createElement = ReactElementValidator.createElement;
2363
+ createFactory = ReactElementValidator.createFactory;
2364
+ cloneElement = ReactElementValidator.cloneElement;
2365
+ }
2366
+
2367
+ var React = {
2368
+ Children: {
2369
+ map: ReactChildren_1.map,
2370
+ forEach: ReactChildren_1.forEach,
2371
+ count: ReactChildren_1.count,
2372
+ toArray: ReactChildren_1.toArray,
2373
+ only: onlyChild_1,
2374
+ },
2375
+
2376
+ Component: ReactBaseClasses.Component,
2377
+ PureComponent: ReactBaseClasses.PureComponent,
2378
+ unstable_AsyncComponent: ReactBaseClasses.AsyncComponent,
2379
+
2380
+ createElement: createElement,
2381
+ cloneElement: cloneElement,
2382
+ isValidElement: ReactElement_1.isValidElement,
2383
+
2384
+ createFactory: createFactory,
2385
+
2386
+ version: ReactVersion,
2387
+
2388
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
2389
+ ReactCurrentOwner: ReactCurrentOwner_1,
2390
+ },
2391
+ };
2392
+
2393
+ {
2394
+ index(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
2395
+ // These should not be included in production.
2396
+ ReactComponentTreeHook: ReactComponentTreeHook_1,
2397
+ ReactDebugCurrentFrame: ReactDebugCurrentFrame_1,
2398
+ });
2399
+ }
2400
+
2401
+ var ReactEntry = React;
2402
+
2403
+ return ReactEntry;
2404
+});
fixtures/attribute-behavior/public/react.production.min.js
deleted
-13
@@ -1,13 +0,0 @@
1
-function x(){function q(){}function n(a,b,c,d,e,f,g){return{$$typeof:J,type:a,key:b,ref:c,props:g,_owner:f}}function y(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;d<b;d++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);b=Error(c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;
2
-}function r(a,b,c){this.props=a;this.context=b;this.refs=z;this.updater=c||A}function B(a,b,c){this.props=a;this.context=b;this.refs=z;this.updater=c||A}function C(){}function D(a,b,c){this.props=a;this.context=b;this.refs=z;this.updater=c||A}function v(a){return function(){return a}}function R(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function K(a,b,c,d){if(w.length){var e=w.pop();e.result=a;e.keyPrefix=b;e.func=c;e.context=d;e.count=0;return e}return{result:a,
3
-keyPrefix:b,func:c,context:d,count:0}}function L(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>w.length&&w.push(a)}function u(a,b,c,d){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;if(null===a||"string"===e||"number"===e||"object"===e&&a.$$typeof===S)return c(d,a,""===b?"."+E(a,0):b),1;var f=0;b=""===b?".":b+":";if(Array.isArray(a))for(var g=0;g<a.length;g++){e=a[g];var h=b+E(e,g);f+=u(e,h,c,d)}else if(h=M&&a[M]||a["@@iterator"],"function"===typeof h)for(a=h.call(a),
4
-g=0;!(e=a.next()).done;)e=e.value,h=b+E(e,g++),f+=u(e,h,c,d);else"object"===e&&(c=""+a,y("31","[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return f}function E(a,b){return"object"===typeof a&&null!==a&&null!=a.key?R(a.key):b.toString(36)}function T(a,b){a.func.call(a.context,b,a.count++)}function U(a,b,c){var d=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?F(a,d,c,G.thatReturnsArgument):null!=a&&(t.isValidElement(a)&&(a=t.cloneAndReplaceKey(a,
5
-e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(N,"$\x26/")+"/")+c)),d.push(a))}function F(a,b,c,d,e){var f="";null!=c&&(f=(""+c).replace(N,"$\x26/")+"/");b=K(b,f,d,e);null==a||u(a,"",U,b);L(b)}var O=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,H=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==
6
-Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var c={};"abcdefghijklmnopqrst".split("").forEach(function(a){c[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},c)).join("")?!1:!0}catch(d){return!1}}()?Object.assign:function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var c=Object(a);for(var d,e=1;e<arguments.length;e++){var f=Object(arguments[e]);for(var g in f)V.call(f,g)&&(c[g]=f[g]);if(O){d=
7
-O(f);for(var h=0;h<d.length;h++)W.call(f,d[h])&&(c[d[h]]=f[d[h]])}}return c},A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z={};r.prototype.isReactComponent={};r.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?y("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};r.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};C.prototype=r.prototype;
8
-var k=B.prototype=new C;k.constructor=B;H(k,r.prototype);k.isPureReactComponent=!0;k=D.prototype=new C;k.constructor=D;H(k,r.prototype);k.unstable_isAsyncReactComponent=!0;k.render=function(){return this.props.children};var I={current:null},P=Object.prototype.hasOwnProperty,J="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,Q={key:!0,ref:!0,__self:!0,__source:!0};n.createElement=function(a,b,c){var d,e={},f=null,g=null,h=null,k=null;if(null!=b)for(d in void 0!==b.ref&&
9
-(g=b.ref),void 0!==b.key&&(f=""+b.key),h=void 0===b.__self?null:b.__self,k=void 0===b.__source?null:b.__source,b)P.call(b,d)&&!Q.hasOwnProperty(d)&&(e[d]=b[d]);var m=arguments.length-2;if(1===m)e.children=c;else if(1<m){for(var l=Array(m),p=0;p<m;p++)l[p]=arguments[p+2];e.children=l}if(a&&a.defaultProps)for(d in m=a.defaultProps,m)void 0===e[d]&&(e[d]=m[d]);return n(a,f,g,h,k,I.current,e)};n.createFactory=function(a){var b=n.createElement.bind(null,a);b.type=a;return b};n.cloneAndReplaceKey=function(a,
10
-b){return n(a.type,b,a.ref,a._self,a._source,a._owner,a.props)};n.cloneElement=function(a,b,c){var d=H({},a.props),e=a.key,f=a.ref,g=a._self,h=a._source,k=a._owner;if(null!=b){void 0!==b.ref&&(f=b.ref,k=I.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var m=a.type.defaultProps;for(l in b)P.call(b,l)&&!Q.hasOwnProperty(l)&&(d[l]=void 0===b[l]&&void 0!==m?m[l]:b[l])}var l=arguments.length-2;if(1===l)d.children=c;else if(1<l){m=Array(l);for(var p=0;p<l;p++)m[p]=arguments[p+2];d.children=
11
-m}return n(a.type,e,f,g,h,k,d)};n.isValidElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===J};var t=n;q.thatReturns=v;q.thatReturnsFalse=v(!1);q.thatReturnsTrue=v(!0);q.thatReturnsNull=v(null);q.thatReturnsThis=function(){return this};q.thatReturnsArgument=function(a){return a};var G=q,M="function"===typeof Symbol&&Symbol.iterator,S="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,N=/\/+/g,w=[];return{Children:{map:function(a,b,c){if(null==a)return a;
12
-var d=[];F(a,d,null,b,c);return d},forEach:function(a,b,c){if(null==a)return a;b=K(null,null,b,c);null==a||u(a,"",T,b);L(b)},count:function(a){return null==a?0:u(a,"",G.thatReturnsNull,null)},toArray:function(a){var b=[];F(a,b,null,G.thatReturnsArgument);return b},only:function(a){t.isValidElement(a)?void 0:y("143");return a}},Component:r,PureComponent:B,unstable_AsyncComponent:D,createElement:t.createElement,cloneElement:t.cloneElement,isValidElement:t.isValidElement,createFactory:t.createFactory,
13
-version:"16.0.0-beta.5",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:I}}}"object"===typeof exports&&"undefined"!==typeof module?module.exports=x():"function"===typeof define&&define.amd?define(x):this.React=x();
fixtures/attribute-behavior/src/App.js
+11
-2
@@ -4,6 +4,11 @@ import {createElement} from 'glamor/react'; // eslint-disable-line
4
import {MultiGrid, AutoSizer} from 'react-virtualized';
5
import 'react-virtualized/styles.css';
6
7
+import {
8
+ inject as injectErrorOverlay,
9
+ uninject as uninjectErrorOverlay,
10
+} from 'react-error-overlay/lib/overlay';
11
+
12
const React = global.React;
13
const {Component} = React;
14
@@ -1267,6 +1272,8 @@ function getRenderedAttributeValue(renderer, attribute, type) {
1272
case 'array with string':
1273
testValue = [attribute.overrideStringValue];
1274
break;
1275
+ default:
1276
+ break;
1277
}
1278
}
1279
@@ -1288,7 +1295,6 @@ function getRenderedAttributeValue(renderer, attribute, type) {
1295
return {
1296
testValue,
1297
defaultValue,
1291
- defaultValue,
1298
result,
1299
didWarn: _didWarn,
1300
didError: false,
@@ -1297,7 +1303,6 @@ function getRenderedAttributeValue(renderer, attribute, type) {
1303
return {
1304
testValue,
1305
defaultValue,
1300
- defaultValue,
1306
result: null,
1307
didWarn: _didWarn,
1308
didError: true,
@@ -1331,6 +1336,8 @@ function getRenderedAttributeValues(attribute, type) {
1336
1337
const table = new Map();
1338
1339
+// Disable error overlay while test each attribute
1340
+uninjectErrorOverlay();
1341
for (let attribute of attributes) {
1342
const row = new Map();
1343
for (let type of types) {
@@ -1339,6 +1346,8 @@ for (let attribute of attributes) {
1346
}
1347
table.set(attribute, row);
1348
}
1349
+// Renable error overlay
1350
+injectErrorOverlay();
1351
1352
const successColor = 'white';
1353
const warnColor = 'yellow';
fixtures/attribute-behavior/src/index.js
+4
-4
@@ -2,15 +2,15 @@ import {loadScript} from './react-loader';
2
import './index.css';
3
4
(async function foo() {
5
- await loadScript('https://unpkg.com/react@15.6.1/dist/react.min.js');
6
- await loadScript('https://unpkg.com/react-dom@15.6.1/dist/react-dom.min.js');
5
+ await loadScript('https://unpkg.com/react@15.6.1/dist/react.js');
6
+ await loadScript('https://unpkg.com/react-dom@15.6.1/dist/react-dom.js');
7
window.React15 = window.React;
8
window.ReactDOM15 = window.ReactDOM;
9
delete window.React;
10
delete window.ReactDOM;
11
12
- await loadScript('/react.production.min.js');
13
- await loadScript('/react-dom.production.min.js');
12
+ await loadScript('/react.development.js');
13
+ await loadScript('/react-dom.development.js');
14
15
const React = (window.React16 = window.React);
16
const ReactDOM = (window.ReactDOM16 = window.ReactDOM);
src/renderers/dom/shared/hooks/ReactDOMInvalidARIAHook.js
+3
-1
@@ -19,6 +19,8 @@ var rARIACamel = new RegExp(
19
'^(aria)[A-Z][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$',
20
);
21
22
+var hasOwnProperty = Object.prototype.hasOwnProperty;
23
+
24
if (__DEV__) {
25
var warning = require('fbjs/lib/warning');
26
var {
@@ -42,7 +44,7 @@ function getStackAddendum(debugID) {
44
}
45
46
function validateProperty(tagName, name, debugID) {
45
- if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
47
+ if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {
48
return true;
49
}
50
src/renderers/dom/shared/hooks/ReactDOMUnknownPropertyHook.js
+2
-1
@@ -36,12 +36,13 @@ function getStackAddendum(debugID) {
36
37
if (__DEV__) {
38
var warnedProperties = {};
39
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
40
var EVENT_NAME_REGEX = /^on[A-Z]/;
41
var ARIA_NAME_REGEX = /^aria-/i;
42
var possibleStandardNames = require('possibleStandardNames');
43
44
var validateProperty = function(tagName, name, value, debugID) {
44
- if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
45
+ if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {
46
return true;
47
}
48