react-test-renderer 16.8.2 → 16.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build-info.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "branch": "master",
3
- "buildNumber": null,
4
- "checksum": "2cfdfb4",
5
- "commit": "dfabb77a9",
6
- "environment": "local",
7
- "reactVersion": "16.8.1-canary-dfabb77a9"
2
+ "branch": "pull/15226",
3
+ "buildNumber": "14079",
4
+ "checksum": "4a4c239",
5
+ "commit": "297165f1e",
6
+ "environment": "ci",
7
+ "reactVersion": "16.8.5-canary-297165f1e"
8
8
  }
@@ -1,4 +1,4 @@
1
- /** @license React v16.8.2
1
+ /** @license React v16.8.6
2
2
  * react-test-renderer-shallow.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -424,6 +424,10 @@ var ReactShallowRenderer = function () {
424
424
  function ReactShallowRenderer() {
425
425
  _classCallCheck(this, ReactShallowRenderer);
426
426
 
427
+ this._reset();
428
+ }
429
+
430
+ ReactShallowRenderer.prototype._reset = function _reset() {
427
431
  this._context = null;
428
432
  this._element = null;
429
433
  this._instance = null;
@@ -438,13 +442,11 @@ var ReactShallowRenderer = function () {
438
442
  this._isReRender = false;
439
443
  this._didScheduleRenderPhaseUpdate = false;
440
444
  this._renderPhaseUpdates = null;
441
- this._currentlyRenderingComponent = null;
442
445
  this._numberOfReRenders = 0;
443
- this._previousComponentIdentity = null;
444
- }
446
+ };
445
447
 
446
448
  ReactShallowRenderer.prototype._validateCurrentlyRenderingComponent = function _validateCurrentlyRenderingComponent() {
447
- !(this._currentlyRenderingComponent !== null) ? invariant(false, 'Hooks can only be called inside the body of a function component. (https://fb.me/react-invalid-hook-call)') : void 0;
449
+ !(this._rendering && !this._instance) ? invariant(false, 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.') : void 0;
448
450
  };
449
451
 
450
452
  ReactShallowRenderer.prototype._createDispatcher = function _createDispatcher() {
@@ -454,32 +456,44 @@ var ReactShallowRenderer = function () {
454
456
  _this._validateCurrentlyRenderingComponent();
455
457
  _this._createWorkInProgressHook();
456
458
  var workInProgressHook = _this._workInProgressHook;
459
+
457
460
  if (_this._isReRender) {
458
- // This is a re-render. Apply the new render phase updates to the previous
461
+ // This is a re-render.
459
462
  var _queue = workInProgressHook.queue;
460
463
  var _dispatch = _queue.dispatch;
461
- if (_this._renderPhaseUpdates !== null) {
462
- // Render phase updates are stored in a map of queue -> linked list
463
- var firstRenderPhaseUpdate = _this._renderPhaseUpdates.get(_queue);
464
- if (firstRenderPhaseUpdate !== undefined) {
465
- _this._renderPhaseUpdates.delete(_queue);
466
- var newState = workInProgressHook.memoizedState;
467
- var update = firstRenderPhaseUpdate;
468
- do {
469
- // Process this render phase update. We don't have to check the
470
- // priority because it will always be the same as the current
471
- // render's.
472
- var _action = update.action;
473
- newState = reducer(newState, _action);
474
- update = update.next;
475
- } while (update !== null);
476
-
477
- workInProgressHook.memoizedState = newState;
478
-
479
- return [newState, _dispatch];
464
+ if (_this._numberOfReRenders > 0) {
465
+ // Apply the new render phase updates to the previous current hook.
466
+ if (_this._renderPhaseUpdates !== null) {
467
+ // Render phase updates are stored in a map of queue -> linked list
468
+ var firstRenderPhaseUpdate = _this._renderPhaseUpdates.get(_queue);
469
+ if (firstRenderPhaseUpdate !== undefined) {
470
+ _this._renderPhaseUpdates.delete(_queue);
471
+ var _newState = workInProgressHook.memoizedState;
472
+ var _update = firstRenderPhaseUpdate;
473
+ do {
474
+ var _action = _update.action;
475
+ _newState = reducer(_newState, _action);
476
+ _update = _update.next;
477
+ } while (_update !== null);
478
+ workInProgressHook.memoizedState = _newState;
479
+ return [_newState, _dispatch];
480
+ }
480
481
  }
482
+ return [workInProgressHook.memoizedState, _dispatch];
481
483
  }
482
- return [workInProgressHook.memoizedState, _dispatch];
484
+ // Process updates outside of render
485
+ var newState = workInProgressHook.memoizedState;
486
+ var update = _queue.first;
487
+ if (update !== null) {
488
+ do {
489
+ var _action2 = update.action;
490
+ newState = reducer(newState, _action2);
491
+ update = update.next;
492
+ } while (update !== null);
493
+ _queue.first = null;
494
+ workInProgressHook.memoizedState = newState;
495
+ }
496
+ return [newState, _dispatch];
483
497
  } else {
484
498
  var initialState = void 0;
485
499
  if (reducer === basicStateReducer) {
@@ -490,10 +504,10 @@ var ReactShallowRenderer = function () {
490
504
  }
491
505
  workInProgressHook.memoizedState = initialState;
492
506
  var _queue2 = workInProgressHook.queue = {
493
- last: null,
507
+ first: null,
494
508
  dispatch: null
495
509
  };
496
- var _dispatch2 = _queue2.dispatch = _this._dispatchAction.bind(_this, _this._currentlyRenderingComponent, _queue2);
510
+ var _dispatch2 = _queue2.dispatch = _this._dispatchAction.bind(_this, _queue2);
497
511
  return [workInProgressHook.memoizedState, _dispatch2];
498
512
  }
499
513
  };
@@ -571,10 +585,10 @@ var ReactShallowRenderer = function () {
571
585
  };
572
586
  };
573
587
 
574
- ReactShallowRenderer.prototype._dispatchAction = function _dispatchAction(componentIdentity, queue, action) {
588
+ ReactShallowRenderer.prototype._dispatchAction = function _dispatchAction(queue, action) {
575
589
  !(this._numberOfReRenders < RE_RENDER_LIMIT) ? invariant(false, 'Too many re-renders. React limits the number of renders to prevent an infinite loop.') : void 0;
576
590
 
577
- if (componentIdentity === this._currentlyRenderingComponent) {
591
+ if (this._rendering) {
578
592
  // This is a render phase update. Stash it in a lazily-created map of
579
593
  // queue -> linked list of updates. After this render pass, we'll restart
580
594
  // and apply the stashed updates on top of the work-in-progress hook.
@@ -599,9 +613,24 @@ var ReactShallowRenderer = function () {
599
613
  lastRenderPhaseUpdate.next = update;
600
614
  }
601
615
  } else {
602
- // This means an update has happened after the function component has
603
- // returned. On the server this is a no-op. In React Fiber, the update
604
- // would be scheduled for a future render.
616
+ var _update2 = {
617
+ action: action,
618
+ next: null
619
+ };
620
+
621
+ // Append the update to the end of the list.
622
+ var last = queue.first;
623
+ if (last === null) {
624
+ queue.first = _update2;
625
+ } else {
626
+ while (last.next !== null) {
627
+ last = last.next;
628
+ }
629
+ last.next = _update2;
630
+ }
631
+
632
+ // Re-render now.
633
+ this.render(this._element, this._context);
605
634
  }
606
635
  };
607
636
 
@@ -630,14 +659,6 @@ var ReactShallowRenderer = function () {
630
659
  return this._workInProgressHook;
631
660
  };
632
661
 
633
- ReactShallowRenderer.prototype._prepareToUseHooks = function _prepareToUseHooks(componentIdentity) {
634
- if (this._previousComponentIdentity !== null && this._previousComponentIdentity !== componentIdentity) {
635
- this._firstWorkInProgressHook = null;
636
- }
637
- this._currentlyRenderingComponent = componentIdentity;
638
- this._previousComponentIdentity = componentIdentity;
639
- };
640
-
641
662
  ReactShallowRenderer.prototype._finishHooks = function _finishHooks(element, context) {
642
663
  if (this._didScheduleRenderPhaseUpdate) {
643
664
  // Updates were scheduled during the render phase. They are stored in
@@ -652,7 +673,6 @@ var ReactShallowRenderer = function () {
652
673
  this._rendering = false;
653
674
  this.render(element, context);
654
675
  } else {
655
- this._currentlyRenderingComponent = null;
656
676
  this._workInProgressHook = null;
657
677
  this._renderPhaseUpdates = null;
658
678
  this._numberOfReRenders = 0;
@@ -674,50 +694,74 @@ var ReactShallowRenderer = function () {
674
694
  element = element;
675
695
  // Show a special message for host elements since it's a common case.
676
696
  !(typeof element.type !== 'string') ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.', element.type) : void 0;
677
- !(reactIs.isForwardRef(element) || typeof element.type === 'function') ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was `%s`.', Array.isArray(element.type) ? 'array' : element.type === null ? 'null' : typeof element.type) : void 0;
697
+ !(reactIs.isForwardRef(element) || typeof element.type === 'function' || reactIs.isMemo(element.type)) ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was `%s`.', Array.isArray(element.type) ? 'array' : element.type === null ? 'null' : typeof element.type) : void 0;
678
698
 
679
699
  if (this._rendering) {
680
700
  return;
681
701
  }
702
+ if (this._element != null && this._element.type !== element.type) {
703
+ this._reset();
704
+ }
705
+
706
+ var elementType = reactIs.isMemo(element.type) ? element.type.type : element.type;
707
+ var previousElement = this._element;
682
708
 
683
709
  this._rendering = true;
684
710
  this._element = element;
685
- this._context = getMaskedContext(element.type.contextTypes, context);
711
+ this._context = getMaskedContext(elementType.contextTypes, context);
712
+
713
+ // Inner memo component props aren't currently validated in createElement.
714
+ if (reactIs.isMemo(element.type) && elementType.propTypes) {
715
+ currentlyValidatingElement = element;
716
+ checkPropTypes(elementType.propTypes, element.props, 'prop', getComponentName(elementType), getStackAddendum);
717
+ }
686
718
 
687
719
  if (this._instance) {
688
- this._updateClassComponent(element, this._context);
720
+ this._updateClassComponent(elementType, element, this._context);
689
721
  } else {
690
- if (reactIs.isForwardRef(element)) {
691
- this._rendered = element.type.render(element.props, element.ref);
692
- } else if (shouldConstruct(element.type)) {
693
- this._instance = new element.type(element.props, this._context, this._updater);
694
-
695
- if (typeof element.type.getDerivedStateFromProps === 'function') {
696
- var partialState = element.type.getDerivedStateFromProps.call(null, element.props, this._instance.state);
722
+ if (shouldConstruct(elementType)) {
723
+ this._instance = new elementType(element.props, this._context, this._updater);
724
+ if (typeof elementType.getDerivedStateFromProps === 'function') {
725
+ var partialState = elementType.getDerivedStateFromProps.call(null, element.props, this._instance.state);
697
726
  if (partialState != null) {
698
727
  this._instance.state = _assign({}, this._instance.state, partialState);
699
728
  }
700
729
  }
701
730
 
702
- if (element.type.hasOwnProperty('contextTypes')) {
731
+ if (elementType.contextTypes) {
703
732
  currentlyValidatingElement = element;
704
-
705
- checkPropTypes(element.type.contextTypes, this._context, 'context', getName(element.type, this._instance), getStackAddendum);
733
+ checkPropTypes(elementType.contextTypes, this._context, 'context', getName(elementType, this._instance), getStackAddendum);
706
734
 
707
735
  currentlyValidatingElement = null;
708
736
  }
709
737
 
710
- this._mountClassComponent(element, this._context);
738
+ this._mountClassComponent(elementType, element, this._context);
711
739
  } else {
712
- var prevDispatcher = ReactCurrentDispatcher.current;
713
- ReactCurrentDispatcher.current = this._dispatcher;
714
- this._prepareToUseHooks(element.type);
715
- try {
716
- this._rendered = element.type.call(undefined, element.props, this._context);
717
- } finally {
718
- ReactCurrentDispatcher.current = prevDispatcher;
740
+ var shouldRender = true;
741
+ if (reactIs.isMemo(element.type) && previousElement !== null) {
742
+ // This is a Memo component that is being re-rendered.
743
+ var compare = element.type.compare || shallowEqual;
744
+ if (compare(previousElement.props, element.props)) {
745
+ shouldRender = false;
746
+ }
747
+ }
748
+ if (shouldRender) {
749
+ var prevDispatcher = ReactCurrentDispatcher.current;
750
+ ReactCurrentDispatcher.current = this._dispatcher;
751
+ try {
752
+ // elementType could still be a ForwardRef if it was
753
+ // nested inside Memo.
754
+ if (elementType.$$typeof === reactIs.ForwardRef) {
755
+ !(typeof elementType.render === 'function') ? invariant(false, 'forwardRef requires a render function but was given %s.', typeof elementType.render) : void 0;
756
+ this._rendered = elementType.render.call(undefined, element.props, element.ref);
757
+ } else {
758
+ this._rendered = elementType(element.props, this._context);
759
+ }
760
+ } finally {
761
+ ReactCurrentDispatcher.current = prevDispatcher;
762
+ }
763
+ this._finishHooks(element, context);
719
764
  }
720
- this._finishHooks(element, context);
721
765
  }
722
766
  }
723
767
 
@@ -733,17 +777,10 @@ var ReactShallowRenderer = function () {
733
777
  this._instance.componentWillUnmount();
734
778
  }
735
779
  }
736
-
737
- this._firstWorkInProgressHook = null;
738
- this._previousComponentIdentity = null;
739
- this._context = null;
740
- this._element = null;
741
- this._newState = null;
742
- this._rendered = null;
743
- this._instance = null;
780
+ this._reset();
744
781
  };
745
782
 
746
- ReactShallowRenderer.prototype._mountClassComponent = function _mountClassComponent(element, context) {
783
+ ReactShallowRenderer.prototype._mountClassComponent = function _mountClassComponent(elementType, element, context) {
747
784
  this._instance.context = context;
748
785
  this._instance.props = element.props;
749
786
  this._instance.state = this._instance.state || null;
@@ -754,7 +791,7 @@ var ReactShallowRenderer = function () {
754
791
 
755
792
  // In order to support react-lifecycles-compat polyfilled components,
756
793
  // Unsafe lifecycles should not be invoked for components using the new APIs.
757
- if (typeof element.type.getDerivedStateFromProps !== 'function' && typeof this._instance.getSnapshotBeforeUpdate !== 'function') {
794
+ if (typeof elementType.getDerivedStateFromProps !== 'function' && typeof this._instance.getSnapshotBeforeUpdate !== 'function') {
758
795
  if (typeof this._instance.componentWillMount === 'function') {
759
796
  this._instance.componentWillMount();
760
797
  }
@@ -774,9 +811,8 @@ var ReactShallowRenderer = function () {
774
811
  // because DOM refs are not available.
775
812
  };
776
813
 
777
- ReactShallowRenderer.prototype._updateClassComponent = function _updateClassComponent(element, context) {
778
- var props = element.props,
779
- type = element.type;
814
+ ReactShallowRenderer.prototype._updateClassComponent = function _updateClassComponent(elementType, element, context) {
815
+ var props = element.props;
780
816
 
781
817
 
782
818
  var oldState = this._instance.state || emptyObject;
@@ -785,7 +821,7 @@ var ReactShallowRenderer = function () {
785
821
  if (oldProps !== props) {
786
822
  // In order to support react-lifecycles-compat polyfilled components,
787
823
  // Unsafe lifecycles should not be invoked for components using the new APIs.
788
- if (typeof element.type.getDerivedStateFromProps !== 'function' && typeof this._instance.getSnapshotBeforeUpdate !== 'function') {
824
+ if (typeof elementType.getDerivedStateFromProps !== 'function' && typeof this._instance.getSnapshotBeforeUpdate !== 'function') {
789
825
  if (typeof this._instance.componentWillReceiveProps === 'function') {
790
826
  this._instance.componentWillReceiveProps(props, context);
791
827
  }
@@ -797,8 +833,8 @@ var ReactShallowRenderer = function () {
797
833
 
798
834
  // Read state after cWRP in case it calls setState
799
835
  var state = this._newState || oldState;
800
- if (typeof type.getDerivedStateFromProps === 'function') {
801
- var partialState = type.getDerivedStateFromProps.call(null, props, state);
836
+ if (typeof elementType.getDerivedStateFromProps === 'function') {
837
+ var partialState = elementType.getDerivedStateFromProps.call(null, props, state);
802
838
  if (partialState != null) {
803
839
  state = _assign({}, state, partialState);
804
840
  }
@@ -810,14 +846,14 @@ var ReactShallowRenderer = function () {
810
846
  this._forcedUpdate = false;
811
847
  } else if (typeof this._instance.shouldComponentUpdate === 'function') {
812
848
  shouldUpdate = !!this._instance.shouldComponentUpdate(props, state, context);
813
- } else if (type.prototype && type.prototype.isPureReactComponent) {
849
+ } else if (elementType.prototype && elementType.prototype.isPureReactComponent) {
814
850
  shouldUpdate = !shallowEqual(oldProps, props) || !shallowEqual(oldState, state);
815
851
  }
816
852
 
817
853
  if (shouldUpdate) {
818
854
  // In order to support react-lifecycles-compat polyfilled components,
819
855
  // Unsafe lifecycles should not be invoked for components using the new APIs.
820
- if (typeof element.type.getDerivedStateFromProps !== 'function' && typeof this._instance.getSnapshotBeforeUpdate !== 'function') {
856
+ if (typeof elementType.getDerivedStateFromProps !== 'function' && typeof this._instance.getSnapshotBeforeUpdate !== 'function') {
821
857
  if (typeof this._instance.componentWillUpdate === 'function') {
822
858
  this._instance.componentWillUpdate(props, state, context);
823
859
  }
@@ -856,7 +892,8 @@ function getDisplayName(element) {
856
892
  } else if (typeof element.type === 'string') {
857
893
  return element.type;
858
894
  } else {
859
- return element.type.displayName || element.type.name || 'Unknown';
895
+ var elementType = reactIs.isMemo(element.type) ? element.type.type : element.type;
896
+ return elementType.displayName || elementType.name || 'Unknown';
860
897
  }
861
898
  }
862
899
 
@@ -1,4 +1,4 @@
1
- /** @license React v16.8.2
1
+ /** @license React v16.8.6
2
2
  * react-test-renderer-shallow.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -7,28 +7,29 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
- 'use strict';var g=require("object-assign"),h=require("react"),m=require("react-is"),p=require("prop-types/checkPropTypes");function q(a,b,d,c,e,l,n,k){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[d,c,e,l,n,k],H=0;a=Error(b.replace(/%s/g,function(){return f[H++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
11
- function r(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);q(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",d)}
12
- var t=/^(.*)[\\\/]/,u="function"===typeof Symbol&&Symbol.for,v=u?Symbol.for("react.portal"):60106,w=u?Symbol.for("react.fragment"):60107,x=u?Symbol.for("react.strict_mode"):60108,y=u?Symbol.for("react.profiler"):60114,z=u?Symbol.for("react.provider"):60109,A=u?Symbol.for("react.context"):60110,B=u?Symbol.for("react.concurrent_mode"):60111,C=u?Symbol.for("react.forward_ref"):60112,D=u?Symbol.for("react.suspense"):60113,E=u?Symbol.for("react.memo"):60115,F=u?Symbol.for("react.lazy"):60116;
13
- function G(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case B:return"ConcurrentMode";case w:return"Fragment";case v:return"Portal";case y:return"Profiler";case x:return"StrictMode";case D:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case A:return"Context.Consumer";case z:return"Context.Provider";case C:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");
14
- case E:return G(a.type);case F:if(a=1===a._status?a._result:null)return G(a)}return null}function I(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var J=Object.prototype.hasOwnProperty;function K(a,b){if(I(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var d=Object.keys(a),c=Object.keys(b);if(d.length!==c.length)return!1;for(c=0;c<d.length;c++)if(!J.call(b,d[c])||!I(a[d[c]],b[d[c]]))return!1;return!0}var L=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
10
+ 'use strict';var k=require("object-assign"),l=require("react"),m=require("react-is"),n=require("prop-types/checkPropTypes");function p(a,b,d,c,f,e,g,h){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var H=[d,c,f,e,g,h],I=0;a=Error(b.replace(/%s/g,function(){return H[I++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
11
+ function q(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);p(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",d)}
12
+ var r=/^(.*)[\\\/]/,t="function"===typeof Symbol&&Symbol.for,u=t?Symbol.for("react.portal"):60106,v=t?Symbol.for("react.fragment"):60107,w=t?Symbol.for("react.strict_mode"):60108,x=t?Symbol.for("react.profiler"):60114,y=t?Symbol.for("react.provider"):60109,z=t?Symbol.for("react.context"):60110,A=t?Symbol.for("react.concurrent_mode"):60111,B=t?Symbol.for("react.forward_ref"):60112,C=t?Symbol.for("react.suspense"):60113,D=t?Symbol.for("react.memo"):60115,E=t?Symbol.for("react.lazy"):60116;
13
+ function F(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case A:return"ConcurrentMode";case v:return"Fragment";case u:return"Portal";case x:return"Profiler";case w:return"StrictMode";case C:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case z:return"Context.Consumer";case y:return"Context.Provider";case B:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");
14
+ case D:return F(a.type);case E:if(a=1===a._status?a._result:null)return F(a)}return null}function G(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var J=Object.prototype.hasOwnProperty;function K(a,b){if(G(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var d=Object.keys(a),c=Object.keys(b);if(d.length!==c.length)return!1;for(c=0;c<d.length;c++)if(!J.call(b,d[c])||!G(a[d[c]],b[d[c]]))return!1;return!0}var L=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
15
15
  L.hasOwnProperty("ReactCurrentDispatcher")||(L.ReactCurrentDispatcher={current:null});function M(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}
16
16
  var N=L.ReactCurrentDispatcher,O={},P=function(){function a(b){M(this,a);this._renderer=b;this._callbacks=[]}a.prototype._enqueueCallback=function(b,a){"function"===typeof b&&a&&this._callbacks.push({callback:b,publicInstance:a})};a.prototype._invokeCallbacks=function(){var b=this._callbacks;this._callbacks=[];b.forEach(function(b){b.callback.call(b.publicInstance)})};a.prototype.isMounted=function(){return!!this._renderer._element};a.prototype.enqueueForceUpdate=function(b,a){this._enqueueCallback(a,
17
- b);this._renderer._forcedUpdate=!0;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueReplaceState=function(b,a,c){this._enqueueCallback(c,b);this._renderer._newState=a;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueSetState=function(b,a,c){this._enqueueCallback(c,b);c=this._renderer._newState||b.state;"function"===typeof a&&(a=a.call(b,c,b.props));null!==a&&void 0!==a&&(this._renderer._newState=g({},c,a),this._renderer.render(this._renderer._element,
17
+ b);this._renderer._forcedUpdate=!0;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueReplaceState=function(b,a,c){this._enqueueCallback(c,b);this._renderer._newState=a;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueSetState=function(b,a,c){this._enqueueCallback(c,b);c=this._renderer._newState||b.state;"function"===typeof a&&(a=a.call(b,c,b.props));null!==a&&void 0!==a&&(this._renderer._newState=k({},c,a),this._renderer.render(this._renderer._element,
18
18
  this._renderer._context))};return a}();function Q(){return{memoizedState:null,queue:null,next:null}}function R(a,b){return"function"===typeof b?b(a):b}
19
- var U=function(){function a(){M(this,a);this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new P(this);this._dispatcher=this._createDispatcher();this._firstWorkInProgressHook=this._workInProgressHook=null;this._didScheduleRenderPhaseUpdate=this._isReRender=!1;this._currentlyRenderingComponent=this._renderPhaseUpdates=null;this._numberOfReRenders=0;this._previousComponentIdentity=null}a.prototype._validateCurrentlyRenderingComponent=
20
- function(){null===this._currentlyRenderingComponent?r("307"):void 0};a.prototype._createDispatcher=function(){function b(){c._validateCurrentlyRenderingComponent()}function a(b,a,d){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();var e=c._workInProgressHook;if(c._isReRender){var f=e.queue;a=f.dispatch;if(null!==c._renderPhaseUpdates&&(d=c._renderPhaseUpdates.get(f),void 0!==d)){c._renderPhaseUpdates.delete(f);f=e.memoizedState;do f=b(f,d.action),d=d.next;while(null!==d);e.memoizedState=
21
- f;return[f,a]}return[e.memoizedState,a]}b=b===R?"function"===typeof a?a():a:void 0!==d?d(a):a;e.memoizedState=b;b=e.queue={last:null,dispatch:null};b=b.dispatch=c._dispatchAction.bind(c,c._currentlyRenderingComponent,b);return[e.memoizedState,b]}var c=this;return{readContext:function(b){return b._currentValue},useCallback:function(b){return b},useContext:function(b){c._validateCurrentlyRenderingComponent();return b._currentValue},useDebugValue:b,useEffect:b,useImperativeHandle:b,useLayoutEffect:b,
22
- useMemo:function(b,a){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();a=void 0!==a?a:null;if(null!==c._workInProgressHook&&null!==c._workInProgressHook.memoizedState){var d=c._workInProgressHook.memoizedState,e=d[1];if(null!==a){a:if(null===e)e=!1;else{for(var f=0;f<e.length&&f<a.length;f++)if(!I(a[f],e[f])){e=!1;break a}e=!0}if(e)return d[0]}}b=b();c._workInProgressHook.memoizedState=[b,a];return b},useReducer:a,useRef:function(b){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();
23
- var a=c._workInProgressHook.memoizedState;return null===a?(b={current:b},c._workInProgressHook.memoizedState=b):a},useState:function(b){return a(R,b)}}};a.prototype._dispatchAction=function(b,a,c){25>this._numberOfReRenders?void 0:r("301");if(b===this._currentlyRenderingComponent){this._didScheduleRenderPhaseUpdate=!0;b={action:c,next:null};c=this._renderPhaseUpdates;null===c&&(this._renderPhaseUpdates=c=new Map);var d=c.get(a);if(void 0===d)c.set(a,b);else{for(a=d;null!==a.next;)a=a.next;a.next=
24
- b}}};a.prototype._createWorkInProgressHook=function(){null===this._workInProgressHook?null===this._firstWorkInProgressHook?(this._isReRender=!1,this._firstWorkInProgressHook=this._workInProgressHook=Q()):(this._isReRender=!0,this._workInProgressHook=this._firstWorkInProgressHook):null===this._workInProgressHook.next?(this._isReRender=!1,this._workInProgressHook=this._workInProgressHook.next=Q()):(this._isReRender=!0,this._workInProgressHook=this._workInProgressHook.next);return this._workInProgressHook};
25
- a.prototype._prepareToUseHooks=function(b){null!==this._previousComponentIdentity&&this._previousComponentIdentity!==b&&(this._firstWorkInProgressHook=null);this._previousComponentIdentity=this._currentlyRenderingComponent=b};a.prototype._finishHooks=function(b,a){this._didScheduleRenderPhaseUpdate?(this._didScheduleRenderPhaseUpdate=!1,this._numberOfReRenders+=1,this._workInProgressHook=null,this._rendering=!1,this.render(b,a)):(this._renderPhaseUpdates=this._workInProgressHook=this._currentlyRenderingComponent=
26
- null,this._numberOfReRenders=0)};a.prototype.getMountedInstance=function(){return this._instance};a.prototype.getRenderOutput=function(){return this._rendered};a.prototype.render=function(b){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:O;h.isValidElement(b)?void 0:r("12","function"===typeof b?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":"");"string"===typeof b.type?r("13",b.type):void 0;m.isForwardRef(b)||"function"===typeof b.type?
27
- void 0:r("249",Array.isArray(b.type)?"array":null===b.type?"null":typeof b.type);if(!this._rendering){this._rendering=!0;this._element=b;var c;if((c=b.type.contextTypes)&&a){var e={},l;for(l in c)e[l]=a[l];c=e}else c=O;this._context=c;if(this._instance)this._updateClassComponent(b,this._context);else if(m.isForwardRef(b))this._rendered=b.type.render(b.props,b.ref);else if(c=b.type,c.prototype&&c.prototype.isReactComponent)this._instance=new b.type(b.props,this._context,this._updater),"function"===
28
- typeof b.type.getDerivedStateFromProps&&(a=b.type.getDerivedStateFromProps.call(null,b.props,this._instance.state),null!=a&&(this._instance.state=g({},this._instance.state,a))),b.type.hasOwnProperty("contextTypes")&&(S=b,a=b.type,c=(c=this._instance)&&c.constructor,p(b.type.contextTypes,this._context,"context",a.displayName||c&&c.displayName||a.name||c&&c.name||null,T),S=null),this._mountClassComponent(b,this._context);else{c=N.current;N.current=this._dispatcher;this._prepareToUseHooks(b.type);try{this._rendered=
29
- b.type.call(void 0,b.props,this._context)}finally{N.current=c}this._finishHooks(b,a)}this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};a.prototype.unmount=function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount();this._instance=this._rendered=this._newState=this._element=this._context=this._previousComponentIdentity=this._firstWorkInProgressHook=null};a.prototype._mountClassComponent=function(b,a){this._instance.context=
30
- a;this._instance.props=b.props;this._instance.state=this._instance.state||null;this._instance.updater=this._updater;if("function"===typeof this._instance.UNSAFE_componentWillMount||"function"===typeof this._instance.componentWillMount)a=this._newState,"function"!==typeof b.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&&this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&
31
- this._instance.UNSAFE_componentWillMount()),a!==this._newState&&(this._instance.state=this._newState||O);this._rendered=this._instance.render()};a.prototype._updateClassComponent=function(a,d){var b=a.props,e=a.type,l=this._instance.state||O,n=this._instance.props;n!==b&&"function"!==typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&&this._instance.componentWillReceiveProps(b,d),"function"===
32
- typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(b,d));var k=this._newState||l;if("function"===typeof e.getDerivedStateFromProps){var f=e.getDerivedStateFromProps.call(null,b,k);null!=f&&(k=g({},k,f))}f=!0;this._forcedUpdate?(f=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?f=!!this._instance.shouldComponentUpdate(b,k,d):e.prototype&&e.prototype.isPureReactComponent&&(f=!K(n,b)||!K(l,k));f&&"function"!==typeof a.type.getDerivedStateFromProps&&
33
- "function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&&this._instance.componentWillUpdate(b,k,d),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(b,k,d));this._instance.context=d;this._instance.props=b;this._instance.state=k;this._newState=null;f&&(this._rendered=this._instance.render())};return a}();U.createRenderer=function(){return new U};var S=null;
34
- function T(){var a="";if(S){var b=null==S?"#empty":"string"===typeof S||"number"===typeof S?"#text":"string"===typeof S.type?S.type:S.type.displayName||S.type.name||"Unknown",d=S._owner,c=S._source;d=d&&G(d.type);var e="";c?e=" (at "+c.fileName.replace(t,"")+":"+c.lineNumber+")":d&&(e=" (created by "+d+")");a+="\n in "+(b||"Unknown")+e}return a}var V={default:U},W=V&&U||V;module.exports=W.default||W;
19
+ var U=function(){function a(){M(this,a);this._reset()}a.prototype._reset=function(){this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new P(this);this._dispatcher=this._createDispatcher();this._firstWorkInProgressHook=this._workInProgressHook=null;this._didScheduleRenderPhaseUpdate=this._isReRender=!1;this._renderPhaseUpdates=null;this._numberOfReRenders=0};a.prototype._validateCurrentlyRenderingComponent=function(){!this._rendering||
20
+ this._instance?q("321"):void 0};a.prototype._createDispatcher=function(){function b(){c._validateCurrentlyRenderingComponent()}function a(b,a,d){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();var f=c._workInProgressHook;if(c._isReRender){d=f.queue;a=d.dispatch;if(0<c._numberOfReRenders){if(null!==c._renderPhaseUpdates){var e=c._renderPhaseUpdates.get(d);if(void 0!==e){c._renderPhaseUpdates.delete(d);d=f.memoizedState;do d=b(d,e.action),e=e.next;while(null!==e);f.memoizedState=
21
+ d;return[d,a]}}return[f.memoizedState,a]}e=f.memoizedState;var g=d.first;if(null!==g){do e=b(e,g.action),g=g.next;while(null!==g);d.first=null;f.memoizedState=e}return[e,a]}b=b===R?"function"===typeof a?a():a:void 0!==d?d(a):a;f.memoizedState=b;b=f.queue={first:null,dispatch:null};b=b.dispatch=c._dispatchAction.bind(c,b);return[f.memoizedState,b]}var c=this;return{readContext:function(b){return b._currentValue},useCallback:function(b){return b},useContext:function(b){c._validateCurrentlyRenderingComponent();
22
+ return b._currentValue},useDebugValue:b,useEffect:b,useImperativeHandle:b,useLayoutEffect:b,useMemo:function(b,a){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();a=void 0!==a?a:null;if(null!==c._workInProgressHook&&null!==c._workInProgressHook.memoizedState){var d=c._workInProgressHook.memoizedState,f=d[1];if(null!==a){a:if(null===f)f=!1;else{for(var e=0;e<f.length&&e<a.length;e++)if(!G(a[e],f[e])){f=!1;break a}f=!0}if(f)return d[0]}}b=b();c._workInProgressHook.memoizedState=
23
+ [b,a];return b},useReducer:a,useRef:function(b){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();var a=c._workInProgressHook.memoizedState;return null===a?(b={current:b},c._workInProgressHook.memoizedState=b):a},useState:function(b){return a(R,b)}}};a.prototype._dispatchAction=function(b,a){25>this._numberOfReRenders?void 0:q("301");if(this._rendering){this._didScheduleRenderPhaseUpdate=!0;a={action:a,next:null};var c=this._renderPhaseUpdates;null===c&&(this._renderPhaseUpdates=
24
+ c=new Map);var d=c.get(b);if(void 0===d)c.set(b,a);else{for(b=d;null!==b.next;)b=b.next;b.next=a}}else{a={action:a,next:null};c=b.first;if(null===c)b.first=a;else{for(;null!==c.next;)c=c.next;c.next=a}this.render(this._element,this._context)}};a.prototype._createWorkInProgressHook=function(){null===this._workInProgressHook?null===this._firstWorkInProgressHook?(this._isReRender=!1,this._firstWorkInProgressHook=this._workInProgressHook=Q()):(this._isReRender=!0,this._workInProgressHook=this._firstWorkInProgressHook):
25
+ null===this._workInProgressHook.next?(this._isReRender=!1,this._workInProgressHook=this._workInProgressHook.next=Q()):(this._isReRender=!0,this._workInProgressHook=this._workInProgressHook.next);return this._workInProgressHook};a.prototype._finishHooks=function(b,a){this._didScheduleRenderPhaseUpdate?(this._didScheduleRenderPhaseUpdate=!1,this._numberOfReRenders+=1,this._workInProgressHook=null,this._rendering=!1,this.render(b,a)):(this._renderPhaseUpdates=this._workInProgressHook=null,this._numberOfReRenders=
26
+ 0)};a.prototype.getMountedInstance=function(){return this._instance};a.prototype.getRenderOutput=function(){return this._rendered};a.prototype.render=function(b){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:O;l.isValidElement(b)?void 0:q("12","function"===typeof b?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":"");"string"===typeof b.type?q("13",b.type):void 0;m.isForwardRef(b)||"function"===typeof b.type||m.isMemo(b.type)?
27
+ void 0:q("249",Array.isArray(b.type)?"array":null===b.type?"null":typeof b.type);if(!this._rendering){null!=this._element&&this._element.type!==b.type&&this._reset();var c=m.isMemo(b.type)?b.type.type:b.type,f=this._element;this._rendering=!0;this._element=b;var e;if((e=c.contextTypes)&&a){var g={},h;for(h in e)g[h]=a[h];e=g}else e=O;this._context=e;m.isMemo(b.type)&&c.propTypes&&(S=b,n(c.propTypes,b.props,"prop",F(c),T));if(this._instance)this._updateClassComponent(c,b,this._context);else if(c.prototype&&
28
+ c.prototype.isReactComponent)this._instance=new c(b.props,this._context,this._updater),"function"===typeof c.getDerivedStateFromProps&&(a=c.getDerivedStateFromProps.call(null,b.props,this._instance.state),null!=a&&(this._instance.state=k({},this._instance.state,a))),c.contextTypes&&(S=b,a=(a=this._instance)&&a.constructor,n(c.contextTypes,this._context,"context",c.displayName||a&&a.displayName||c.name||a&&a.name||null,T),S=null),this._mountClassComponent(c,b,this._context);else if(e=!0,m.isMemo(b.type)&&
29
+ null!==f&&(b.type.compare||K)(f.props,b.props)&&(e=!1),e){f=N.current;N.current=this._dispatcher;try{c.$$typeof===m.ForwardRef?("function"!==typeof c.render?q("322",typeof c.render):void 0,this._rendered=c.render.call(void 0,b.props,b.ref)):this._rendered=c(b.props,this._context)}finally{N.current=f}this._finishHooks(b,a)}this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};a.prototype.unmount=function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&
30
+ this._instance.componentWillUnmount();this._reset()};a.prototype._mountClassComponent=function(a,d,c){this._instance.context=c;this._instance.props=d.props;this._instance.state=this._instance.state||null;this._instance.updater=this._updater;if("function"===typeof this._instance.UNSAFE_componentWillMount||"function"===typeof this._instance.componentWillMount)d=this._newState,"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&&
31
+ this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&this._instance.UNSAFE_componentWillMount()),d!==this._newState&&(this._instance.state=this._newState||O);this._rendered=this._instance.render()};a.prototype._updateClassComponent=function(a,d,c){d=d.props;var b=this._instance.state||O,e=this._instance.props;e!==d&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&&
32
+ this._instance.componentWillReceiveProps(d,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(d,c));var g=this._newState||b;if("function"===typeof a.getDerivedStateFromProps){var h=a.getDerivedStateFromProps.call(null,d,g);null!=h&&(g=k({},g,h))}h=!0;this._forcedUpdate?(h=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?h=!!this._instance.shouldComponentUpdate(d,g,c):a.prototype&&a.prototype.isPureReactComponent&&
33
+ (h=!K(e,d)||!K(b,g));h&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&&this._instance.componentWillUpdate(d,g,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(d,g,c));this._instance.context=c;this._instance.props=d;this._instance.state=g;this._newState=null;h&&(this._rendered=this._instance.render())};return a}();
34
+ U.createRenderer=function(){return new U};var S=null;function V(a){if(null==a)return"#empty";if("string"===typeof a||"number"===typeof a)return"#text";if("string"===typeof a.type)return a.type;a=m.isMemo(a.type)?a.type.type:a.type;return a.displayName||a.name||"Unknown"}function T(){var a="";if(S){var b=V(S),d=S._owner,c=S._source;d=d&&F(d.type);var f="";c?f=" (at "+c.fileName.replace(r,"")+":"+c.lineNumber+")":d&&(f=" (created by "+d+")");a+="\n in "+(b||"Unknown")+f}return a}
35
+ var W={default:U},X=W&&U||W;module.exports=X.default||X;