@office-iss/react-native-win32 0.69.0 → 0.70.0-preview.1
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/.eslintrc.js +0 -1
- package/.flowconfig +5 -1
- package/CHANGELOG.json +194 -32
- package/CHANGELOG.md +79 -19
- package/IntegrationTests/AsyncStorageTest.js +20 -4
- package/IntegrationTests/BUCK +2 -2
- package/IntegrationTests/LayoutEventsTest.js +4 -1
- package/IntegrationTests/{launchWebSocketServer.command → launchWebSocketServer.sh} +3 -9
- package/Libraries/Alert/Alert.js +18 -4
- package/Libraries/Alert/Alert.win32.js +2 -0
- package/Libraries/Alert/NativeAlertManager.js +1 -0
- package/Libraries/Animated/Animated.js +2 -2
- package/Libraries/Animated/AnimatedEvent.js +7 -4
- package/Libraries/Animated/AnimatedImplementation.js +17 -3
- package/Libraries/Animated/AnimatedMock.js +7 -2
- package/Libraries/Animated/NativeAnimatedHelper.js +220 -95
- package/Libraries/Animated/NativeAnimatedModule.js +3 -0
- package/Libraries/Animated/NativeAnimatedTurboModule.js +3 -0
- package/Libraries/Animated/animations/SpringAnimation.js +3 -3
- package/Libraries/Animated/animations/TimingAnimation.js +3 -3
- package/Libraries/Animated/createAnimatedComponent.js +8 -1
- package/Libraries/Animated/nodes/AnimatedAddition.js +3 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +50 -29
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +3 -1
- package/Libraries/Animated/nodes/AnimatedDivision.js +3 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -21
- package/Libraries/Animated/nodes/AnimatedModulo.js +3 -1
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +3 -2
- package/Libraries/Animated/nodes/AnimatedProps.js +20 -12
- package/Libraries/Animated/nodes/AnimatedStyle.js +19 -16
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +3 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
- package/Libraries/Animated/nodes/AnimatedValue.js +14 -5
- package/Libraries/Animated/nodes/AnimatedValueXY.js +28 -1
- package/Libraries/Animated/useAnimatedProps.js +1 -0
- package/Libraries/AppState/AppState.js +0 -32
- package/Libraries/BatchedBridge/MessageQueue.js +21 -15
- package/Libraries/BatchedBridge/NativeModules.js +3 -4
- package/Libraries/Blob/FileReader.js +0 -6
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +0 -20
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +0 -20
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
- package/Libraries/Components/Keyboard/Keyboard.js +0 -11
- package/Libraries/Components/Pressable/Pressable.js +2 -0
- package/Libraries/Components/Pressable/Pressable.win32.js +2 -0
- package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -30
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +4 -32
- package/Libraries/Components/ScrollView/ScrollView.js +13 -11
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -3
- package/Libraries/Components/StatusBar/StatusBar.js +10 -7
- package/Libraries/Components/TextInput/InputAccessoryView.js +14 -13
- package/Libraries/Components/TextInput/TextInput.js +12 -2
- package/Libraries/Components/Touchable/PooledClass.js +16 -4
- package/Libraries/Components/Touchable/Touchable.js +50 -1
- package/Libraries/Components/Touchable/Touchable.win32.js +972 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -2
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
- package/Libraries/Components/View/ViewPropTypes.js +3 -8
- package/Libraries/Components/View/ViewPropTypes.win32.js +3 -8
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +2 -2
- package/Libraries/Core/polyfillPromise.js +0 -32
- package/Libraries/Core/setUpBatchedBridge.js +5 -1
- package/Libraries/Core/setUpPerformance.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +0 -13
- package/Libraries/Image/AssetSourceResolver.js +2 -2
- package/Libraries/Image/Image.android.js +5 -3
- package/Libraries/Image/Image.ios.js +6 -3
- package/Libraries/Image/Image.win32.js +6 -3
- package/Libraries/Image/ImageSource.js +7 -5
- package/Libraries/Inspector/ElementBox.js +2 -2
- package/Libraries/Inspector/NetworkOverlay.js +13 -8
- package/Libraries/Interaction/PanResponder.js +16 -14
- package/Libraries/Linking/Linking.js +0 -11
- package/Libraries/Lists/FlatList.js +3 -2
- package/Libraries/Lists/SectionList.js +2 -0
- package/Libraries/Lists/ViewabilityHelper.js +7 -3
- package/Libraries/Lists/VirtualizeUtils.js +33 -20
- package/Libraries/Lists/VirtualizedList.js +93 -47
- package/Libraries/Lists/VirtualizedListContext.js +1 -0
- package/Libraries/Lists/VirtualizedSectionList.js +14 -9
- package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +19 -18
- package/Libraries/Lists/__tests__/VirtualizedList-test.js +10 -6
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/LogBox.js +3 -1
- package/Libraries/LogBox/UI/AnsiHighlight.js +2 -0
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +3 -0
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -3
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +8 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +26 -12
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +26 -12
- package/Libraries/Network/XMLHttpRequest.js +9 -11
- package/Libraries/Performance/PureComponentDebug.js +1 -0
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +9 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +16 -0
- package/Libraries/Pressability/Pressability.js +26 -16
- package/Libraries/Pressability/Pressability.win32.js +26 -16
- package/Libraries/Promise.js +0 -1
- package/Libraries/ReactNative/AppRegistry.js +16 -13
- package/Libraries/ReactNative/BridgelessUIManager.js +2 -0
- package/Libraries/ReactNative/PaperUIManager.js +9 -9
- package/Libraries/ReactNative/PaperUIManager.win32.js +7 -8
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +12 -0
- package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
- package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
- package/Libraries/ReactNative/renderApplication.js +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4443 -3615
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +1496 -1170
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1694 -1356
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4439 -3588
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1583 -1249
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1719 -1372
- package/Libraries/Storage/AsyncStorage.js +7 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +8 -0
- package/Libraries/StyleSheet/flattenStyle.js +1 -1
- package/Libraries/StyleSheet/processTransform.js +2 -0
- package/Libraries/StyleSheet/splitLayoutProps.js +2 -0
- package/Libraries/Text/Text.js +15 -7
- package/Libraries/Types/CoreEventTypes.js +137 -11
- package/Libraries/Types/CoreEventTypes.win32.js +147 -22
- package/Libraries/Utilities/Dimensions.js +0 -13
- package/Libraries/Utilities/Dimensions.win32.js +0 -9
- package/Libraries/Utilities/HMRClient.js +3 -3
- package/Libraries/Utilities/Platform.ios.js +0 -7
- package/Libraries/Utilities/ReactNativeTestTools.js +3 -1
- package/Libraries/Utilities/codegenNativeCommands.js +11 -2
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/Utilities/stringifySafe.js +3 -1
- package/Libraries/Utilities/truncate.js +1 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
- package/Libraries/Vibration/Vibration.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +1 -0
- package/Libraries/vendor/emitter/EventEmitter.js +105 -12
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
- package/flow/JSITimerInternalType.js +30 -0
- package/jest/assetFileTransformer.js +3 -2
- package/jest/setup.js +4 -0
- package/jest.config.js +0 -1
- package/overrides.json +23 -16
- package/package.json +23 -24
- package/rntypes/index.d.ts +0 -1
- package/src/rntypes/index.d.ts +0 -1
- package/Libraries/vendor/emitter/EventSubscription.js +0 -19
- package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
- package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
- package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
- package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
- package/jest/preprocessor.js +0 -40
- package/jest/preprocessor_DO_NOT_USE.js +0 -122
- package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizeUtils-test.js.snap +0 -3
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @nolint
|
|
9
9
|
* @providesModule ReactFabric-profiling
|
|
10
10
|
* @preventMunge
|
|
11
|
-
* @generated SignedSource<<
|
|
11
|
+
* @generated SignedSource<<fd8c8eef5a1108a23d586e36861855b9>>
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
|
|
@@ -1028,7 +1028,7 @@ eventPluginOrder = Array.prototype.slice.call([
|
|
|
1028
1028
|
"ReactNativeBridgeEventPlugin"
|
|
1029
1029
|
]);
|
|
1030
1030
|
recomputePluginOrdering();
|
|
1031
|
-
var injectedNamesToPlugins$jscomp$
|
|
1031
|
+
var injectedNamesToPlugins$jscomp$inline_229 = {
|
|
1032
1032
|
ResponderEventPlugin: ResponderEventPlugin,
|
|
1033
1033
|
ReactNativeBridgeEventPlugin: {
|
|
1034
1034
|
eventTypes: {},
|
|
@@ -1074,33 +1074,33 @@ var injectedNamesToPlugins$jscomp$inline_223 = {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
1076
|
},
|
|
1077
|
-
isOrderingDirty$jscomp$
|
|
1078
|
-
pluginName$jscomp$
|
|
1079
|
-
for (pluginName$jscomp$
|
|
1077
|
+
isOrderingDirty$jscomp$inline_230 = !1,
|
|
1078
|
+
pluginName$jscomp$inline_231;
|
|
1079
|
+
for (pluginName$jscomp$inline_231 in injectedNamesToPlugins$jscomp$inline_229)
|
|
1080
1080
|
if (
|
|
1081
|
-
injectedNamesToPlugins$jscomp$
|
|
1082
|
-
pluginName$jscomp$
|
|
1081
|
+
injectedNamesToPlugins$jscomp$inline_229.hasOwnProperty(
|
|
1082
|
+
pluginName$jscomp$inline_231
|
|
1083
1083
|
)
|
|
1084
1084
|
) {
|
|
1085
|
-
var pluginModule$jscomp$
|
|
1086
|
-
injectedNamesToPlugins$jscomp$
|
|
1085
|
+
var pluginModule$jscomp$inline_232 =
|
|
1086
|
+
injectedNamesToPlugins$jscomp$inline_229[pluginName$jscomp$inline_231];
|
|
1087
1087
|
if (
|
|
1088
|
-
!namesToPlugins.hasOwnProperty(pluginName$jscomp$
|
|
1089
|
-
namesToPlugins[pluginName$jscomp$
|
|
1090
|
-
pluginModule$jscomp$
|
|
1088
|
+
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_231) ||
|
|
1089
|
+
namesToPlugins[pluginName$jscomp$inline_231] !==
|
|
1090
|
+
pluginModule$jscomp$inline_232
|
|
1091
1091
|
) {
|
|
1092
|
-
if (namesToPlugins[pluginName$jscomp$
|
|
1092
|
+
if (namesToPlugins[pluginName$jscomp$inline_231])
|
|
1093
1093
|
throw Error(
|
|
1094
1094
|
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
|
|
1095
|
-
(pluginName$jscomp$
|
|
1095
|
+
(pluginName$jscomp$inline_231 + "`.")
|
|
1096
1096
|
);
|
|
1097
1097
|
namesToPlugins[
|
|
1098
|
-
pluginName$jscomp$
|
|
1099
|
-
] = pluginModule$jscomp$
|
|
1100
|
-
isOrderingDirty$jscomp$
|
|
1098
|
+
pluginName$jscomp$inline_231
|
|
1099
|
+
] = pluginModule$jscomp$inline_232;
|
|
1100
|
+
isOrderingDirty$jscomp$inline_230 = !0;
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
|
-
isOrderingDirty$jscomp$
|
|
1103
|
+
isOrderingDirty$jscomp$inline_230 && recomputePluginOrdering();
|
|
1104
1104
|
function getInstanceFromInstance(instanceHandle) {
|
|
1105
1105
|
return instanceHandle;
|
|
1106
1106
|
}
|
|
@@ -1870,6 +1870,12 @@ function getLanesToRetrySynchronouslyOnError(root) {
|
|
|
1870
1870
|
root = root.pendingLanes & -1073741825;
|
|
1871
1871
|
return 0 !== root ? root : root & 1073741824 ? 1073741824 : 0;
|
|
1872
1872
|
}
|
|
1873
|
+
function claimNextTransitionLane() {
|
|
1874
|
+
var lane = nextTransitionLane;
|
|
1875
|
+
nextTransitionLane <<= 1;
|
|
1876
|
+
0 === (nextTransitionLane & 4194240) && (nextTransitionLane = 64);
|
|
1877
|
+
return lane;
|
|
1878
|
+
}
|
|
1873
1879
|
function createLaneMap(initial) {
|
|
1874
1880
|
for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
|
|
1875
1881
|
return laneMap;
|
|
@@ -2248,7 +2254,28 @@ function flushSyncCallbacks() {
|
|
|
2248
2254
|
}
|
|
2249
2255
|
return null;
|
|
2250
2256
|
}
|
|
2251
|
-
var
|
|
2257
|
+
var forkStack = [],
|
|
2258
|
+
forkStackIndex = 0,
|
|
2259
|
+
treeForkProvider = null,
|
|
2260
|
+
idStack = [],
|
|
2261
|
+
idStackIndex = 0,
|
|
2262
|
+
treeContextProvider = null;
|
|
2263
|
+
function popTreeContext(workInProgress) {
|
|
2264
|
+
for (; workInProgress === treeForkProvider; )
|
|
2265
|
+
(treeForkProvider = forkStack[--forkStackIndex]),
|
|
2266
|
+
(forkStack[forkStackIndex] = null),
|
|
2267
|
+
--forkStackIndex,
|
|
2268
|
+
(forkStack[forkStackIndex] = null);
|
|
2269
|
+
for (; workInProgress === treeContextProvider; )
|
|
2270
|
+
(treeContextProvider = idStack[--idStackIndex]),
|
|
2271
|
+
(idStack[idStackIndex] = null),
|
|
2272
|
+
--idStackIndex,
|
|
2273
|
+
(idStack[idStackIndex] = null),
|
|
2274
|
+
--idStackIndex,
|
|
2275
|
+
(idStack[idStackIndex] = null);
|
|
2276
|
+
}
|
|
2277
|
+
var hydrationErrors = null,
|
|
2278
|
+
ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
|
|
2252
2279
|
function shallowEqual(objA, objB) {
|
|
2253
2280
|
if (objectIs(objA, objB)) return !0;
|
|
2254
2281
|
if (
|
|
@@ -2393,9 +2420,7 @@ function enqueueUpdate(fiber, update) {
|
|
|
2393
2420
|
var updateQueue = fiber.updateQueue;
|
|
2394
2421
|
null !== updateQueue &&
|
|
2395
2422
|
((updateQueue = updateQueue.shared),
|
|
2396
|
-
|
|
2397
|
-
0 !== (fiber.mode & 1) &&
|
|
2398
|
-
0 === (executionContext & 2)
|
|
2423
|
+
isInterleavedUpdate(fiber)
|
|
2399
2424
|
? ((fiber = updateQueue.interleaved),
|
|
2400
2425
|
null === fiber
|
|
2401
2426
|
? ((update.next = update),
|
|
@@ -2763,26 +2788,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
|
|
|
2763
2788
|
"function" === typeof instance.componentDidMount &&
|
|
2764
2789
|
(workInProgress.flags |= 4);
|
|
2765
2790
|
}
|
|
2766
|
-
var forkStack = [],
|
|
2767
|
-
forkStackIndex = 0,
|
|
2768
|
-
treeForkProvider = null,
|
|
2769
|
-
idStack = [],
|
|
2770
|
-
idStackIndex = 0,
|
|
2771
|
-
treeContextProvider = null;
|
|
2772
|
-
function popTreeContext(workInProgress) {
|
|
2773
|
-
for (; workInProgress === treeForkProvider; )
|
|
2774
|
-
(treeForkProvider = forkStack[--forkStackIndex]),
|
|
2775
|
-
(forkStack[forkStackIndex] = null),
|
|
2776
|
-
--forkStackIndex,
|
|
2777
|
-
(forkStack[forkStackIndex] = null);
|
|
2778
|
-
for (; workInProgress === treeContextProvider; )
|
|
2779
|
-
(treeContextProvider = idStack[--idStackIndex]),
|
|
2780
|
-
(idStack[idStackIndex] = null),
|
|
2781
|
-
--idStackIndex,
|
|
2782
|
-
(idStack[idStackIndex] = null),
|
|
2783
|
-
--idStackIndex,
|
|
2784
|
-
(idStack[idStackIndex] = null);
|
|
2785
|
-
}
|
|
2786
2791
|
function coerceRef(returnFiber, current, element) {
|
|
2787
2792
|
returnFiber = element.ref;
|
|
2788
2793
|
if (
|
|
@@ -2845,6 +2850,10 @@ function throwOnInvalidObjectType(returnFiber, newChild) {
|
|
|
2845
2850
|
"). If you meant to render a collection of children, use an array instead."
|
|
2846
2851
|
);
|
|
2847
2852
|
}
|
|
2853
|
+
function resolveLazy(lazyType) {
|
|
2854
|
+
var init = lazyType._init;
|
|
2855
|
+
return init(lazyType._payload);
|
|
2856
|
+
}
|
|
2848
2857
|
function ChildReconciler(shouldTrackSideEffects) {
|
|
2849
2858
|
function deleteChild(returnFiber, childToDelete) {
|
|
2850
2859
|
if (shouldTrackSideEffects) {
|
|
@@ -2917,7 +2926,14 @@ function ChildReconciler(shouldTrackSideEffects) {
|
|
|
2917
2926
|
lanes,
|
|
2918
2927
|
element.key
|
|
2919
2928
|
);
|
|
2920
|
-
if (
|
|
2929
|
+
if (
|
|
2930
|
+
null !== current &&
|
|
2931
|
+
(current.elementType === elementType ||
|
|
2932
|
+
("object" === typeof elementType &&
|
|
2933
|
+
null !== elementType &&
|
|
2934
|
+
elementType.$$typeof === REACT_LAZY_TYPE &&
|
|
2935
|
+
resolveLazy(elementType) === current.type))
|
|
2936
|
+
)
|
|
2921
2937
|
return (
|
|
2922
2938
|
(lanes = useFiber(current, element.props)),
|
|
2923
2939
|
(lanes.ref = coerceRef(returnFiber, current, element)),
|
|
@@ -3008,6 +3024,9 @@ function ChildReconciler(shouldTrackSideEffects) {
|
|
|
3008
3024
|
(newChild.return = returnFiber),
|
|
3009
3025
|
newChild
|
|
3010
3026
|
);
|
|
3027
|
+
case REACT_LAZY_TYPE:
|
|
3028
|
+
var init = newChild._init;
|
|
3029
|
+
return createChild(returnFiber, init(newChild._payload), lanes);
|
|
3011
3030
|
}
|
|
3012
3031
|
if (isArrayImpl(newChild) || getIteratorFn(newChild))
|
|
3013
3032
|
return (
|
|
@@ -3043,6 +3062,11 @@ function ChildReconciler(shouldTrackSideEffects) {
|
|
|
3043
3062
|
return newChild.key === key
|
|
3044
3063
|
? updatePortal(returnFiber, oldFiber, newChild, lanes)
|
|
3045
3064
|
: null;
|
|
3065
|
+
case REACT_LAZY_TYPE:
|
|
3066
|
+
return (
|
|
3067
|
+
(key = newChild._init),
|
|
3068
|
+
updateSlot(returnFiber, oldFiber, key(newChild._payload), lanes)
|
|
3069
|
+
);
|
|
3046
3070
|
}
|
|
3047
3071
|
if (isArrayImpl(newChild) || getIteratorFn(newChild))
|
|
3048
3072
|
return null !== key
|
|
@@ -3085,6 +3109,15 @@ function ChildReconciler(shouldTrackSideEffects) {
|
|
|
3085
3109
|
) || null),
|
|
3086
3110
|
updatePortal(returnFiber, existingChildren, newChild, lanes)
|
|
3087
3111
|
);
|
|
3112
|
+
case REACT_LAZY_TYPE:
|
|
3113
|
+
var init = newChild._init;
|
|
3114
|
+
return updateFromMap(
|
|
3115
|
+
existingChildren,
|
|
3116
|
+
returnFiber,
|
|
3117
|
+
newIdx,
|
|
3118
|
+
init(newChild._payload),
|
|
3119
|
+
lanes
|
|
3120
|
+
);
|
|
3088
3121
|
}
|
|
3089
3122
|
if (isArrayImpl(newChild) || getIteratorFn(newChild))
|
|
3090
3123
|
return (
|
|
@@ -3262,7 +3295,12 @@ function ChildReconciler(shouldTrackSideEffects) {
|
|
|
3262
3295
|
});
|
|
3263
3296
|
return iteratorFn;
|
|
3264
3297
|
}
|
|
3265
|
-
|
|
3298
|
+
function reconcileChildFibers(
|
|
3299
|
+
returnFiber,
|
|
3300
|
+
currentFirstChild,
|
|
3301
|
+
newChild,
|
|
3302
|
+
lanes
|
|
3303
|
+
) {
|
|
3266
3304
|
"object" === typeof newChild &&
|
|
3267
3305
|
null !== newChild &&
|
|
3268
3306
|
newChild.type === REACT_FRAGMENT_TYPE &&
|
|
@@ -3290,7 +3328,13 @@ function ChildReconciler(shouldTrackSideEffects) {
|
|
|
3290
3328
|
returnFiber = currentFirstChild;
|
|
3291
3329
|
break a;
|
|
3292
3330
|
}
|
|
3293
|
-
} else if (
|
|
3331
|
+
} else if (
|
|
3332
|
+
child.elementType === key ||
|
|
3333
|
+
("object" === typeof key &&
|
|
3334
|
+
null !== key &&
|
|
3335
|
+
key.$$typeof === REACT_LAZY_TYPE &&
|
|
3336
|
+
resolveLazy(key) === child.type)
|
|
3337
|
+
) {
|
|
3294
3338
|
deleteRemainingChildren(returnFiber, child.sibling);
|
|
3295
3339
|
currentFirstChild = useFiber(child, newChild.props);
|
|
3296
3340
|
currentFirstChild.ref = coerceRef(
|
|
@@ -3371,6 +3415,16 @@ function ChildReconciler(shouldTrackSideEffects) {
|
|
|
3371
3415
|
returnFiber = currentFirstChild;
|
|
3372
3416
|
}
|
|
3373
3417
|
return placeSingleChild(returnFiber);
|
|
3418
|
+
case REACT_LAZY_TYPE:
|
|
3419
|
+
return (
|
|
3420
|
+
(child = newChild._init),
|
|
3421
|
+
reconcileChildFibers(
|
|
3422
|
+
returnFiber,
|
|
3423
|
+
currentFirstChild,
|
|
3424
|
+
child(newChild._payload),
|
|
3425
|
+
lanes
|
|
3426
|
+
)
|
|
3427
|
+
);
|
|
3374
3428
|
}
|
|
3375
3429
|
if (isArrayImpl(newChild))
|
|
3376
3430
|
return reconcileChildrenArray(
|
|
@@ -3406,7 +3460,8 @@ function ChildReconciler(shouldTrackSideEffects) {
|
|
|
3406
3460
|
(returnFiber = currentFirstChild)),
|
|
3407
3461
|
placeSingleChild(returnFiber))
|
|
3408
3462
|
: deleteRemainingChildren(returnFiber, currentFirstChild);
|
|
3409
|
-
}
|
|
3463
|
+
}
|
|
3464
|
+
return reconcileChildFibers;
|
|
3410
3465
|
}
|
|
3411
3466
|
var reconcileChildFibers = ChildReconciler(!0),
|
|
3412
3467
|
mountChildFibers = ChildReconciler(!1),
|
|
@@ -3893,6 +3948,19 @@ function updateMemo(nextCreate, deps) {
|
|
|
3893
3948
|
hook.memoizedState = [nextCreate, deps];
|
|
3894
3949
|
return nextCreate;
|
|
3895
3950
|
}
|
|
3951
|
+
function updateDeferredValueImpl(hook, prevValue, value) {
|
|
3952
|
+
if (0 === (renderLanes & 21))
|
|
3953
|
+
return (
|
|
3954
|
+
hook.baseState && ((hook.baseState = !1), (didReceiveUpdate = !0)),
|
|
3955
|
+
(hook.memoizedState = value)
|
|
3956
|
+
);
|
|
3957
|
+
objectIs(value, prevValue) ||
|
|
3958
|
+
((value = claimNextTransitionLane()),
|
|
3959
|
+
(currentlyRenderingFiber$1.lanes |= value),
|
|
3960
|
+
(workInProgressRootSkippedLanes |= value),
|
|
3961
|
+
(hook.baseState = !0));
|
|
3962
|
+
return prevValue;
|
|
3963
|
+
}
|
|
3896
3964
|
function startTransition(setPending, callback) {
|
|
3897
3965
|
var previousPriority = currentUpdatePriority;
|
|
3898
3966
|
currentUpdatePriority =
|
|
@@ -3974,9 +4042,7 @@ function enqueueRenderPhaseUpdate(queue, update) {
|
|
|
3974
4042
|
queue.pending = update;
|
|
3975
4043
|
}
|
|
3976
4044
|
function enqueueUpdate$1(fiber, queue, update) {
|
|
3977
|
-
|
|
3978
|
-
0 !== (fiber.mode & 1) &&
|
|
3979
|
-
0 === (executionContext & 2)
|
|
4045
|
+
isInterleavedUpdate(fiber)
|
|
3980
4046
|
? ((fiber = queue.interleaved),
|
|
3981
4047
|
null === fiber
|
|
3982
4048
|
? ((update.next = update),
|
|
@@ -4081,29 +4147,14 @@ var ContextOnlyDispatcher = {
|
|
|
4081
4147
|
useState: mountState,
|
|
4082
4148
|
useDebugValue: mountDebugValue,
|
|
4083
4149
|
useDeferredValue: function(value) {
|
|
4084
|
-
|
|
4085
|
-
prevValue = _mountState[0],
|
|
4086
|
-
setValue = _mountState[1];
|
|
4087
|
-
mountEffect(
|
|
4088
|
-
function() {
|
|
4089
|
-
var prevTransition = ReactCurrentBatchConfig$1.transition;
|
|
4090
|
-
ReactCurrentBatchConfig$1.transition = {};
|
|
4091
|
-
try {
|
|
4092
|
-
setValue(value);
|
|
4093
|
-
} finally {
|
|
4094
|
-
ReactCurrentBatchConfig$1.transition = prevTransition;
|
|
4095
|
-
}
|
|
4096
|
-
},
|
|
4097
|
-
[value]
|
|
4098
|
-
);
|
|
4099
|
-
return prevValue;
|
|
4150
|
+
return (mountWorkInProgressHook().memoizedState = value);
|
|
4100
4151
|
},
|
|
4101
4152
|
useTransition: function() {
|
|
4102
|
-
var
|
|
4103
|
-
isPending =
|
|
4104
|
-
|
|
4105
|
-
mountWorkInProgressHook().memoizedState =
|
|
4106
|
-
return [isPending,
|
|
4153
|
+
var _mountState = mountState(!1),
|
|
4154
|
+
isPending = _mountState[0];
|
|
4155
|
+
_mountState = startTransition.bind(null, _mountState[1]);
|
|
4156
|
+
mountWorkInProgressHook().memoizedState = _mountState;
|
|
4157
|
+
return [isPending, _mountState];
|
|
4107
4158
|
},
|
|
4108
4159
|
useMutableSource: function() {},
|
|
4109
4160
|
useSyncExternalStore: function(subscribe, getSnapshot) {
|
|
@@ -4157,22 +4208,8 @@ var ContextOnlyDispatcher = {
|
|
|
4157
4208
|
},
|
|
4158
4209
|
useDebugValue: mountDebugValue,
|
|
4159
4210
|
useDeferredValue: function(value) {
|
|
4160
|
-
var
|
|
4161
|
-
|
|
4162
|
-
setValue = _updateState[1];
|
|
4163
|
-
updateEffect(
|
|
4164
|
-
function() {
|
|
4165
|
-
var prevTransition = ReactCurrentBatchConfig$1.transition;
|
|
4166
|
-
ReactCurrentBatchConfig$1.transition = {};
|
|
4167
|
-
try {
|
|
4168
|
-
setValue(value);
|
|
4169
|
-
} finally {
|
|
4170
|
-
ReactCurrentBatchConfig$1.transition = prevTransition;
|
|
4171
|
-
}
|
|
4172
|
-
},
|
|
4173
|
-
[value]
|
|
4174
|
-
);
|
|
4175
|
-
return prevValue;
|
|
4211
|
+
var hook = updateWorkInProgressHook();
|
|
4212
|
+
return updateDeferredValueImpl(hook, currentHook.memoizedState, value);
|
|
4176
4213
|
},
|
|
4177
4214
|
useTransition: function() {
|
|
4178
4215
|
var isPending = updateReducer(basicStateReducer)[0],
|
|
@@ -4200,22 +4237,10 @@ var ContextOnlyDispatcher = {
|
|
|
4200
4237
|
},
|
|
4201
4238
|
useDebugValue: mountDebugValue,
|
|
4202
4239
|
useDeferredValue: function(value) {
|
|
4203
|
-
var
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
function() {
|
|
4208
|
-
var prevTransition = ReactCurrentBatchConfig$1.transition;
|
|
4209
|
-
ReactCurrentBatchConfig$1.transition = {};
|
|
4210
|
-
try {
|
|
4211
|
-
setValue(value);
|
|
4212
|
-
} finally {
|
|
4213
|
-
ReactCurrentBatchConfig$1.transition = prevTransition;
|
|
4214
|
-
}
|
|
4215
|
-
},
|
|
4216
|
-
[value]
|
|
4217
|
-
);
|
|
4218
|
-
return prevValue;
|
|
4240
|
+
var hook = updateWorkInProgressHook();
|
|
4241
|
+
return null === currentHook
|
|
4242
|
+
? (hook.memoizedState = value)
|
|
4243
|
+
: updateDeferredValueImpl(hook, currentHook.memoizedState, value);
|
|
4219
4244
|
},
|
|
4220
4245
|
useTransition: function() {
|
|
4221
4246
|
var isPending = rerenderReducer(basicStateReducer)[0],
|
|
@@ -4377,641 +4402,94 @@ function attachPingListener(root, wakeable, lanes) {
|
|
|
4377
4402
|
isDevToolsPresent && restorePendingUpdaters(root, lanes),
|
|
4378
4403
|
wakeable.then(pingCache, pingCache));
|
|
4379
4404
|
}
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4405
|
+
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
|
|
4406
|
+
didReceiveUpdate = !1;
|
|
4407
|
+
function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
|
|
4408
|
+
workInProgress.child =
|
|
4409
|
+
null === current
|
|
4410
|
+
? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
|
|
4411
|
+
: reconcileChildFibers(
|
|
4412
|
+
workInProgress,
|
|
4413
|
+
current.child,
|
|
4414
|
+
nextChildren,
|
|
4415
|
+
renderLanes
|
|
4416
|
+
);
|
|
4389
4417
|
}
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
parent,
|
|
4418
|
+
function updateForwardRef(
|
|
4419
|
+
current,
|
|
4393
4420
|
workInProgress,
|
|
4394
|
-
|
|
4395
|
-
|
|
4421
|
+
Component,
|
|
4422
|
+
nextProps,
|
|
4423
|
+
renderLanes
|
|
4396
4424
|
) {
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
if (null === node.return || node.return === workInProgress) return;
|
|
4422
|
-
node = node.return;
|
|
4423
|
-
}
|
|
4424
|
-
node.sibling.return = node.return;
|
|
4425
|
-
node = node.sibling;
|
|
4426
|
-
}
|
|
4427
|
-
};
|
|
4428
|
-
function appendAllChildrenToContainer(
|
|
4429
|
-
containerChildSet,
|
|
4425
|
+
Component = Component.render;
|
|
4426
|
+
var ref = workInProgress.ref;
|
|
4427
|
+
prepareToReadContext(workInProgress, renderLanes);
|
|
4428
|
+
nextProps = renderWithHooks(
|
|
4429
|
+
current,
|
|
4430
|
+
workInProgress,
|
|
4431
|
+
Component,
|
|
4432
|
+
nextProps,
|
|
4433
|
+
ref,
|
|
4434
|
+
renderLanes
|
|
4435
|
+
);
|
|
4436
|
+
if (null !== current && !didReceiveUpdate)
|
|
4437
|
+
return (
|
|
4438
|
+
(workInProgress.updateQueue = current.updateQueue),
|
|
4439
|
+
(workInProgress.flags &= -2053),
|
|
4440
|
+
(current.lanes &= ~renderLanes),
|
|
4441
|
+
bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
|
4442
|
+
);
|
|
4443
|
+
workInProgress.flags |= 1;
|
|
4444
|
+
reconcileChildren(current, workInProgress, nextProps, renderLanes);
|
|
4445
|
+
return workInProgress.child;
|
|
4446
|
+
}
|
|
4447
|
+
function updateMemoComponent(
|
|
4448
|
+
current,
|
|
4430
4449
|
workInProgress,
|
|
4431
|
-
|
|
4432
|
-
|
|
4450
|
+
Component,
|
|
4451
|
+
nextProps,
|
|
4452
|
+
renderLanes
|
|
4433
4453
|
) {
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4454
|
+
if (null === current) {
|
|
4455
|
+
var type = Component.type;
|
|
4456
|
+
if (
|
|
4457
|
+
"function" === typeof type &&
|
|
4458
|
+
!shouldConstruct(type) &&
|
|
4459
|
+
void 0 === type.defaultProps &&
|
|
4460
|
+
null === Component.compare &&
|
|
4461
|
+
void 0 === Component.defaultProps
|
|
4462
|
+
)
|
|
4463
|
+
return (
|
|
4464
|
+
(workInProgress.tag = 15),
|
|
4465
|
+
(workInProgress.type = type),
|
|
4466
|
+
updateSimpleMemoComponent(
|
|
4467
|
+
current,
|
|
4468
|
+
workInProgress,
|
|
4469
|
+
type,
|
|
4470
|
+
nextProps,
|
|
4471
|
+
renderLanes
|
|
4472
|
+
)
|
|
4473
|
+
);
|
|
4474
|
+
current = createFiberFromTypeAndProps(
|
|
4475
|
+
Component.type,
|
|
4476
|
+
null,
|
|
4477
|
+
nextProps,
|
|
4478
|
+
workInProgress,
|
|
4479
|
+
workInProgress.mode,
|
|
4480
|
+
renderLanes
|
|
4481
|
+
);
|
|
4482
|
+
current.ref = workInProgress.ref;
|
|
4483
|
+
current.return = workInProgress;
|
|
4484
|
+
return (workInProgress.child = current);
|
|
4463
4485
|
}
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
portalOrRoot.pendingChildren = newChildSet;
|
|
4472
|
-
workInProgress.flags |= 4;
|
|
4473
|
-
completeRoot(current, newChildSet);
|
|
4474
|
-
}
|
|
4475
|
-
};
|
|
4476
|
-
updateHostComponent = function(current, workInProgress, type, newProps) {
|
|
4477
|
-
type = current.stateNode;
|
|
4478
|
-
var oldProps = current.memoizedProps;
|
|
4479
|
-
if (
|
|
4480
|
-
(current = hadNoMutationsEffects(current, workInProgress)) &&
|
|
4481
|
-
oldProps === newProps
|
|
4482
|
-
)
|
|
4483
|
-
workInProgress.stateNode = type;
|
|
4484
|
-
else {
|
|
4485
|
-
var recyclableInstance = workInProgress.stateNode;
|
|
4486
|
-
requiredContext(contextStackCursor$1.current);
|
|
4487
|
-
var updatePayload = null;
|
|
4488
|
-
oldProps !== newProps &&
|
|
4489
|
-
((oldProps = diffProperties(
|
|
4490
|
-
null,
|
|
4491
|
-
oldProps,
|
|
4492
|
-
newProps,
|
|
4493
|
-
recyclableInstance.canonical.viewConfig.validAttributes
|
|
4494
|
-
)),
|
|
4495
|
-
(recyclableInstance.canonical.currentProps = newProps),
|
|
4496
|
-
(updatePayload = oldProps));
|
|
4497
|
-
current && null === updatePayload
|
|
4498
|
-
? (workInProgress.stateNode = type)
|
|
4499
|
-
: ((newProps = updatePayload),
|
|
4500
|
-
(oldProps = type.node),
|
|
4501
|
-
(type = {
|
|
4502
|
-
node: current
|
|
4503
|
-
? null !== newProps
|
|
4504
|
-
? cloneNodeWithNewProps(oldProps, newProps)
|
|
4505
|
-
: cloneNode(oldProps)
|
|
4506
|
-
: null !== newProps
|
|
4507
|
-
? cloneNodeWithNewChildrenAndProps(oldProps, newProps)
|
|
4508
|
-
: cloneNodeWithNewChildren(oldProps),
|
|
4509
|
-
canonical: type.canonical
|
|
4510
|
-
}),
|
|
4511
|
-
(workInProgress.stateNode = type),
|
|
4512
|
-
current
|
|
4513
|
-
? (workInProgress.flags |= 4)
|
|
4514
|
-
: appendAllChildren(type, workInProgress, !1, !1));
|
|
4515
|
-
}
|
|
4516
|
-
};
|
|
4517
|
-
updateHostText = function(current, workInProgress, oldText, newText) {
|
|
4518
|
-
oldText !== newText
|
|
4519
|
-
? ((current = requiredContext(rootInstanceStackCursor.current)),
|
|
4520
|
-
(oldText = requiredContext(contextStackCursor$1.current)),
|
|
4521
|
-
(workInProgress.stateNode = createTextInstance(
|
|
4522
|
-
newText,
|
|
4523
|
-
current,
|
|
4524
|
-
oldText,
|
|
4525
|
-
workInProgress
|
|
4526
|
-
)),
|
|
4527
|
-
(workInProgress.flags |= 4))
|
|
4528
|
-
: (workInProgress.stateNode = current.stateNode);
|
|
4529
|
-
};
|
|
4530
|
-
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
|
|
4531
|
-
switch (renderState.tailMode) {
|
|
4532
|
-
case "hidden":
|
|
4533
|
-
hasRenderedATailFallback = renderState.tail;
|
|
4534
|
-
for (var lastTailNode = null; null !== hasRenderedATailFallback; )
|
|
4535
|
-
null !== hasRenderedATailFallback.alternate &&
|
|
4536
|
-
(lastTailNode = hasRenderedATailFallback),
|
|
4537
|
-
(hasRenderedATailFallback = hasRenderedATailFallback.sibling);
|
|
4538
|
-
null === lastTailNode
|
|
4539
|
-
? (renderState.tail = null)
|
|
4540
|
-
: (lastTailNode.sibling = null);
|
|
4541
|
-
break;
|
|
4542
|
-
case "collapsed":
|
|
4543
|
-
lastTailNode = renderState.tail;
|
|
4544
|
-
for (var lastTailNode$37 = null; null !== lastTailNode; )
|
|
4545
|
-
null !== lastTailNode.alternate && (lastTailNode$37 = lastTailNode),
|
|
4546
|
-
(lastTailNode = lastTailNode.sibling);
|
|
4547
|
-
null === lastTailNode$37
|
|
4548
|
-
? hasRenderedATailFallback || null === renderState.tail
|
|
4549
|
-
? (renderState.tail = null)
|
|
4550
|
-
: (renderState.tail.sibling = null)
|
|
4551
|
-
: (lastTailNode$37.sibling = null);
|
|
4552
|
-
}
|
|
4553
|
-
}
|
|
4554
|
-
function bubbleProperties(completedWork) {
|
|
4555
|
-
var didBailout =
|
|
4556
|
-
null !== completedWork.alternate &&
|
|
4557
|
-
completedWork.alternate.child === completedWork.child,
|
|
4558
|
-
newChildLanes = 0,
|
|
4559
|
-
subtreeFlags = 0;
|
|
4560
|
-
if (didBailout)
|
|
4561
|
-
if (0 !== (completedWork.mode & 2)) {
|
|
4562
|
-
for (
|
|
4563
|
-
var treeBaseDuration$39 = completedWork.selfBaseDuration,
|
|
4564
|
-
child$40 = completedWork.child;
|
|
4565
|
-
null !== child$40;
|
|
4566
|
-
|
|
4567
|
-
)
|
|
4568
|
-
(newChildLanes |= child$40.lanes | child$40.childLanes),
|
|
4569
|
-
(subtreeFlags |= child$40.subtreeFlags & 14680064),
|
|
4570
|
-
(subtreeFlags |= child$40.flags & 14680064),
|
|
4571
|
-
(treeBaseDuration$39 += child$40.treeBaseDuration),
|
|
4572
|
-
(child$40 = child$40.sibling);
|
|
4573
|
-
completedWork.treeBaseDuration = treeBaseDuration$39;
|
|
4574
|
-
} else
|
|
4575
|
-
for (
|
|
4576
|
-
treeBaseDuration$39 = completedWork.child;
|
|
4577
|
-
null !== treeBaseDuration$39;
|
|
4578
|
-
|
|
4579
|
-
)
|
|
4580
|
-
(newChildLanes |=
|
|
4581
|
-
treeBaseDuration$39.lanes | treeBaseDuration$39.childLanes),
|
|
4582
|
-
(subtreeFlags |= treeBaseDuration$39.subtreeFlags & 14680064),
|
|
4583
|
-
(subtreeFlags |= treeBaseDuration$39.flags & 14680064),
|
|
4584
|
-
(treeBaseDuration$39.return = completedWork),
|
|
4585
|
-
(treeBaseDuration$39 = treeBaseDuration$39.sibling);
|
|
4586
|
-
else if (0 !== (completedWork.mode & 2)) {
|
|
4587
|
-
treeBaseDuration$39 = completedWork.actualDuration;
|
|
4588
|
-
child$40 = completedWork.selfBaseDuration;
|
|
4589
|
-
for (var child = completedWork.child; null !== child; )
|
|
4590
|
-
(newChildLanes |= child.lanes | child.childLanes),
|
|
4591
|
-
(subtreeFlags |= child.subtreeFlags),
|
|
4592
|
-
(subtreeFlags |= child.flags),
|
|
4593
|
-
(treeBaseDuration$39 += child.actualDuration),
|
|
4594
|
-
(child$40 += child.treeBaseDuration),
|
|
4595
|
-
(child = child.sibling);
|
|
4596
|
-
completedWork.actualDuration = treeBaseDuration$39;
|
|
4597
|
-
completedWork.treeBaseDuration = child$40;
|
|
4598
|
-
} else
|
|
4599
|
-
for (
|
|
4600
|
-
treeBaseDuration$39 = completedWork.child;
|
|
4601
|
-
null !== treeBaseDuration$39;
|
|
4602
|
-
|
|
4603
|
-
)
|
|
4604
|
-
(newChildLanes |=
|
|
4605
|
-
treeBaseDuration$39.lanes | treeBaseDuration$39.childLanes),
|
|
4606
|
-
(subtreeFlags |= treeBaseDuration$39.subtreeFlags),
|
|
4607
|
-
(subtreeFlags |= treeBaseDuration$39.flags),
|
|
4608
|
-
(treeBaseDuration$39.return = completedWork),
|
|
4609
|
-
(treeBaseDuration$39 = treeBaseDuration$39.sibling);
|
|
4610
|
-
completedWork.subtreeFlags |= subtreeFlags;
|
|
4611
|
-
completedWork.childLanes = newChildLanes;
|
|
4612
|
-
return didBailout;
|
|
4613
|
-
}
|
|
4614
|
-
function completeWork(current, workInProgress, renderLanes) {
|
|
4615
|
-
var newProps = workInProgress.pendingProps;
|
|
4616
|
-
popTreeContext(workInProgress);
|
|
4617
|
-
switch (workInProgress.tag) {
|
|
4618
|
-
case 2:
|
|
4619
|
-
case 16:
|
|
4620
|
-
case 15:
|
|
4621
|
-
case 0:
|
|
4622
|
-
case 11:
|
|
4623
|
-
case 7:
|
|
4624
|
-
case 8:
|
|
4625
|
-
case 12:
|
|
4626
|
-
case 9:
|
|
4627
|
-
case 14:
|
|
4628
|
-
return bubbleProperties(workInProgress), null;
|
|
4629
|
-
case 1:
|
|
4630
|
-
return (
|
|
4631
|
-
isContextProvider(workInProgress.type) && popContext(),
|
|
4632
|
-
bubbleProperties(workInProgress),
|
|
4633
|
-
null
|
|
4634
|
-
);
|
|
4635
|
-
case 3:
|
|
4636
|
-
return (
|
|
4637
|
-
(newProps = workInProgress.stateNode),
|
|
4638
|
-
popHostContainer(),
|
|
4639
|
-
pop(didPerformWorkStackCursor),
|
|
4640
|
-
pop(contextStackCursor),
|
|
4641
|
-
resetWorkInProgressVersions(),
|
|
4642
|
-
newProps.pendingContext &&
|
|
4643
|
-
((newProps.context = newProps.pendingContext),
|
|
4644
|
-
(newProps.pendingContext = null)),
|
|
4645
|
-
(null !== current && null !== current.child) ||
|
|
4646
|
-
null === current ||
|
|
4647
|
-
(current.memoizedState.isDehydrated &&
|
|
4648
|
-
0 === (workInProgress.flags & 256)) ||
|
|
4649
|
-
(workInProgress.flags |= 1024),
|
|
4650
|
-
updateHostContainer(current, workInProgress),
|
|
4651
|
-
bubbleProperties(workInProgress),
|
|
4652
|
-
null
|
|
4653
|
-
);
|
|
4654
|
-
case 5:
|
|
4655
|
-
popHostContext(workInProgress);
|
|
4656
|
-
renderLanes = requiredContext(rootInstanceStackCursor.current);
|
|
4657
|
-
var type = workInProgress.type;
|
|
4658
|
-
if (null !== current && null != workInProgress.stateNode)
|
|
4659
|
-
updateHostComponent(
|
|
4660
|
-
current,
|
|
4661
|
-
workInProgress,
|
|
4662
|
-
type,
|
|
4663
|
-
newProps,
|
|
4664
|
-
renderLanes
|
|
4665
|
-
),
|
|
4666
|
-
current.ref !== workInProgress.ref && (workInProgress.flags |= 512);
|
|
4667
|
-
else {
|
|
4668
|
-
if (!newProps) {
|
|
4669
|
-
if (null === workInProgress.stateNode)
|
|
4670
|
-
throw Error(
|
|
4671
|
-
"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
|
|
4672
|
-
);
|
|
4673
|
-
bubbleProperties(workInProgress);
|
|
4674
|
-
return null;
|
|
4675
|
-
}
|
|
4676
|
-
requiredContext(contextStackCursor$1.current);
|
|
4677
|
-
current = nextReactTag;
|
|
4678
|
-
nextReactTag += 2;
|
|
4679
|
-
type = getViewConfigForType(type);
|
|
4680
|
-
var updatePayload = diffProperties(
|
|
4681
|
-
null,
|
|
4682
|
-
emptyObject,
|
|
4683
|
-
newProps,
|
|
4684
|
-
type.validAttributes
|
|
4685
|
-
);
|
|
4686
|
-
renderLanes = createNode(
|
|
4687
|
-
current,
|
|
4688
|
-
type.uiViewClassName,
|
|
4689
|
-
renderLanes,
|
|
4690
|
-
updatePayload,
|
|
4691
|
-
workInProgress
|
|
4692
|
-
);
|
|
4693
|
-
current = new ReactFabricHostComponent(
|
|
4694
|
-
current,
|
|
4695
|
-
type,
|
|
4696
|
-
newProps,
|
|
4697
|
-
workInProgress
|
|
4698
|
-
);
|
|
4699
|
-
current = { node: renderLanes, canonical: current };
|
|
4700
|
-
appendAllChildren(current, workInProgress, !1, !1);
|
|
4701
|
-
workInProgress.stateNode = current;
|
|
4702
|
-
null !== workInProgress.ref && (workInProgress.flags |= 512);
|
|
4703
|
-
}
|
|
4704
|
-
bubbleProperties(workInProgress);
|
|
4705
|
-
return null;
|
|
4706
|
-
case 6:
|
|
4707
|
-
if (current && null != workInProgress.stateNode)
|
|
4708
|
-
updateHostText(
|
|
4709
|
-
current,
|
|
4710
|
-
workInProgress,
|
|
4711
|
-
current.memoizedProps,
|
|
4712
|
-
newProps
|
|
4713
|
-
);
|
|
4714
|
-
else {
|
|
4715
|
-
if ("string" !== typeof newProps && null === workInProgress.stateNode)
|
|
4716
|
-
throw Error(
|
|
4717
|
-
"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
|
|
4718
|
-
);
|
|
4719
|
-
current = requiredContext(rootInstanceStackCursor.current);
|
|
4720
|
-
renderLanes = requiredContext(contextStackCursor$1.current);
|
|
4721
|
-
workInProgress.stateNode = createTextInstance(
|
|
4722
|
-
newProps,
|
|
4723
|
-
current,
|
|
4724
|
-
renderLanes,
|
|
4725
|
-
workInProgress
|
|
4726
|
-
);
|
|
4727
|
-
}
|
|
4728
|
-
bubbleProperties(workInProgress);
|
|
4729
|
-
return null;
|
|
4730
|
-
case 13:
|
|
4731
|
-
pop(suspenseStackCursor);
|
|
4732
|
-
newProps = workInProgress.memoizedState;
|
|
4733
|
-
if (0 !== (workInProgress.flags & 128))
|
|
4734
|
-
return (
|
|
4735
|
-
(workInProgress.lanes = renderLanes),
|
|
4736
|
-
0 !== (workInProgress.mode & 2) &&
|
|
4737
|
-
transferActualDuration(workInProgress),
|
|
4738
|
-
workInProgress
|
|
4739
|
-
);
|
|
4740
|
-
newProps = null !== newProps;
|
|
4741
|
-
renderLanes = !1;
|
|
4742
|
-
null !== current && (renderLanes = null !== current.memoizedState);
|
|
4743
|
-
newProps &&
|
|
4744
|
-
!renderLanes &&
|
|
4745
|
-
((workInProgress.child.flags |= 8192),
|
|
4746
|
-
0 !== (workInProgress.mode & 1) &&
|
|
4747
|
-
(null === current || 0 !== (suspenseStackCursor.current & 1)
|
|
4748
|
-
? 0 === workInProgressRootExitStatus &&
|
|
4749
|
-
(workInProgressRootExitStatus = 3)
|
|
4750
|
-
: renderDidSuspendDelayIfPossible()));
|
|
4751
|
-
null !== workInProgress.updateQueue && (workInProgress.flags |= 4);
|
|
4752
|
-
bubbleProperties(workInProgress);
|
|
4753
|
-
0 !== (workInProgress.mode & 2) &&
|
|
4754
|
-
newProps &&
|
|
4755
|
-
((current = workInProgress.child),
|
|
4756
|
-
null !== current &&
|
|
4757
|
-
(workInProgress.treeBaseDuration -= current.treeBaseDuration));
|
|
4758
|
-
return null;
|
|
4759
|
-
case 4:
|
|
4760
|
-
return (
|
|
4761
|
-
popHostContainer(),
|
|
4762
|
-
updateHostContainer(current, workInProgress),
|
|
4763
|
-
bubbleProperties(workInProgress),
|
|
4764
|
-
null
|
|
4765
|
-
);
|
|
4766
|
-
case 10:
|
|
4767
|
-
return (
|
|
4768
|
-
popProvider(workInProgress.type._context),
|
|
4769
|
-
bubbleProperties(workInProgress),
|
|
4770
|
-
null
|
|
4771
|
-
);
|
|
4772
|
-
case 17:
|
|
4773
|
-
return (
|
|
4774
|
-
isContextProvider(workInProgress.type) && popContext(),
|
|
4775
|
-
bubbleProperties(workInProgress),
|
|
4776
|
-
null
|
|
4777
|
-
);
|
|
4778
|
-
case 19:
|
|
4779
|
-
pop(suspenseStackCursor);
|
|
4780
|
-
type = workInProgress.memoizedState;
|
|
4781
|
-
if (null === type) return bubbleProperties(workInProgress), null;
|
|
4782
|
-
newProps = 0 !== (workInProgress.flags & 128);
|
|
4783
|
-
updatePayload = type.rendering;
|
|
4784
|
-
if (null === updatePayload)
|
|
4785
|
-
if (newProps) cutOffTailIfNeeded(type, !1);
|
|
4786
|
-
else {
|
|
4787
|
-
if (
|
|
4788
|
-
0 !== workInProgressRootExitStatus ||
|
|
4789
|
-
(null !== current && 0 !== (current.flags & 128))
|
|
4790
|
-
)
|
|
4791
|
-
for (current = workInProgress.child; null !== current; ) {
|
|
4792
|
-
updatePayload = findFirstSuspended(current);
|
|
4793
|
-
if (null !== updatePayload) {
|
|
4794
|
-
workInProgress.flags |= 128;
|
|
4795
|
-
cutOffTailIfNeeded(type, !1);
|
|
4796
|
-
current = updatePayload.updateQueue;
|
|
4797
|
-
null !== current &&
|
|
4798
|
-
((workInProgress.updateQueue = current),
|
|
4799
|
-
(workInProgress.flags |= 4));
|
|
4800
|
-
workInProgress.subtreeFlags = 0;
|
|
4801
|
-
current = renderLanes;
|
|
4802
|
-
for (newProps = workInProgress.child; null !== newProps; )
|
|
4803
|
-
(renderLanes = newProps),
|
|
4804
|
-
(updatePayload = current),
|
|
4805
|
-
(renderLanes.flags &= 14680066),
|
|
4806
|
-
(type = renderLanes.alternate),
|
|
4807
|
-
null === type
|
|
4808
|
-
? ((renderLanes.childLanes = 0),
|
|
4809
|
-
(renderLanes.lanes = updatePayload),
|
|
4810
|
-
(renderLanes.child = null),
|
|
4811
|
-
(renderLanes.subtreeFlags = 0),
|
|
4812
|
-
(renderLanes.memoizedProps = null),
|
|
4813
|
-
(renderLanes.memoizedState = null),
|
|
4814
|
-
(renderLanes.updateQueue = null),
|
|
4815
|
-
(renderLanes.dependencies = null),
|
|
4816
|
-
(renderLanes.stateNode = null),
|
|
4817
|
-
(renderLanes.selfBaseDuration = 0),
|
|
4818
|
-
(renderLanes.treeBaseDuration = 0))
|
|
4819
|
-
: ((renderLanes.childLanes = type.childLanes),
|
|
4820
|
-
(renderLanes.lanes = type.lanes),
|
|
4821
|
-
(renderLanes.child = type.child),
|
|
4822
|
-
(renderLanes.subtreeFlags = 0),
|
|
4823
|
-
(renderLanes.deletions = null),
|
|
4824
|
-
(renderLanes.memoizedProps = type.memoizedProps),
|
|
4825
|
-
(renderLanes.memoizedState = type.memoizedState),
|
|
4826
|
-
(renderLanes.updateQueue = type.updateQueue),
|
|
4827
|
-
(renderLanes.type = type.type),
|
|
4828
|
-
(updatePayload = type.dependencies),
|
|
4829
|
-
(renderLanes.dependencies =
|
|
4830
|
-
null === updatePayload
|
|
4831
|
-
? null
|
|
4832
|
-
: {
|
|
4833
|
-
lanes: updatePayload.lanes,
|
|
4834
|
-
firstContext: updatePayload.firstContext
|
|
4835
|
-
}),
|
|
4836
|
-
(renderLanes.selfBaseDuration = type.selfBaseDuration),
|
|
4837
|
-
(renderLanes.treeBaseDuration = type.treeBaseDuration)),
|
|
4838
|
-
(newProps = newProps.sibling);
|
|
4839
|
-
push(
|
|
4840
|
-
suspenseStackCursor,
|
|
4841
|
-
(suspenseStackCursor.current & 1) | 2
|
|
4842
|
-
);
|
|
4843
|
-
return workInProgress.child;
|
|
4844
|
-
}
|
|
4845
|
-
current = current.sibling;
|
|
4846
|
-
}
|
|
4847
|
-
null !== type.tail &&
|
|
4848
|
-
now() > workInProgressRootRenderTargetTime &&
|
|
4849
|
-
((workInProgress.flags |= 128),
|
|
4850
|
-
(newProps = !0),
|
|
4851
|
-
cutOffTailIfNeeded(type, !1),
|
|
4852
|
-
(workInProgress.lanes = 4194304));
|
|
4853
|
-
}
|
|
4854
|
-
else {
|
|
4855
|
-
if (!newProps)
|
|
4856
|
-
if (
|
|
4857
|
-
((current = findFirstSuspended(updatePayload)), null !== current)
|
|
4858
|
-
) {
|
|
4859
|
-
if (
|
|
4860
|
-
((workInProgress.flags |= 128),
|
|
4861
|
-
(newProps = !0),
|
|
4862
|
-
(current = current.updateQueue),
|
|
4863
|
-
null !== current &&
|
|
4864
|
-
((workInProgress.updateQueue = current),
|
|
4865
|
-
(workInProgress.flags |= 4)),
|
|
4866
|
-
cutOffTailIfNeeded(type, !0),
|
|
4867
|
-
null === type.tail &&
|
|
4868
|
-
"hidden" === type.tailMode &&
|
|
4869
|
-
!updatePayload.alternate)
|
|
4870
|
-
)
|
|
4871
|
-
return bubbleProperties(workInProgress), null;
|
|
4872
|
-
} else
|
|
4873
|
-
2 * now() - type.renderingStartTime >
|
|
4874
|
-
workInProgressRootRenderTargetTime &&
|
|
4875
|
-
1073741824 !== renderLanes &&
|
|
4876
|
-
((workInProgress.flags |= 128),
|
|
4877
|
-
(newProps = !0),
|
|
4878
|
-
cutOffTailIfNeeded(type, !1),
|
|
4879
|
-
(workInProgress.lanes = 4194304));
|
|
4880
|
-
type.isBackwards
|
|
4881
|
-
? ((updatePayload.sibling = workInProgress.child),
|
|
4882
|
-
(workInProgress.child = updatePayload))
|
|
4883
|
-
: ((current = type.last),
|
|
4884
|
-
null !== current
|
|
4885
|
-
? (current.sibling = updatePayload)
|
|
4886
|
-
: (workInProgress.child = updatePayload),
|
|
4887
|
-
(type.last = updatePayload));
|
|
4888
|
-
}
|
|
4889
|
-
if (null !== type.tail)
|
|
4890
|
-
return (
|
|
4891
|
-
(workInProgress = type.tail),
|
|
4892
|
-
(type.rendering = workInProgress),
|
|
4893
|
-
(type.tail = workInProgress.sibling),
|
|
4894
|
-
(type.renderingStartTime = now()),
|
|
4895
|
-
(workInProgress.sibling = null),
|
|
4896
|
-
(current = suspenseStackCursor.current),
|
|
4897
|
-
push(suspenseStackCursor, newProps ? (current & 1) | 2 : current & 1),
|
|
4898
|
-
workInProgress
|
|
4899
|
-
);
|
|
4900
|
-
bubbleProperties(workInProgress);
|
|
4901
|
-
return null;
|
|
4902
|
-
case 22:
|
|
4903
|
-
case 23:
|
|
4904
|
-
return (
|
|
4905
|
-
popRenderLanes(),
|
|
4906
|
-
(newProps = null !== workInProgress.memoizedState),
|
|
4907
|
-
null !== current &&
|
|
4908
|
-
(null !== current.memoizedState) !== newProps &&
|
|
4909
|
-
(workInProgress.flags |= 8192),
|
|
4910
|
-
newProps && 0 !== (workInProgress.mode & 1)
|
|
4911
|
-
? 0 !== (subtreeRenderLanes & 1073741824) &&
|
|
4912
|
-
bubbleProperties(workInProgress)
|
|
4913
|
-
: bubbleProperties(workInProgress),
|
|
4914
|
-
null
|
|
4915
|
-
);
|
|
4916
|
-
case 24:
|
|
4917
|
-
return null;
|
|
4918
|
-
case 25:
|
|
4919
|
-
return null;
|
|
4920
|
-
}
|
|
4921
|
-
throw Error(
|
|
4922
|
-
"Unknown unit of work tag (" +
|
|
4923
|
-
workInProgress.tag +
|
|
4924
|
-
"). This error is likely caused by a bug in React. Please file an issue."
|
|
4925
|
-
);
|
|
4926
|
-
}
|
|
4927
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
|
|
4928
|
-
didReceiveUpdate = !1;
|
|
4929
|
-
function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
|
|
4930
|
-
workInProgress.child =
|
|
4931
|
-
null === current
|
|
4932
|
-
? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
|
|
4933
|
-
: reconcileChildFibers(
|
|
4934
|
-
workInProgress,
|
|
4935
|
-
current.child,
|
|
4936
|
-
nextChildren,
|
|
4937
|
-
renderLanes
|
|
4938
|
-
);
|
|
4939
|
-
}
|
|
4940
|
-
function updateForwardRef(
|
|
4941
|
-
current,
|
|
4942
|
-
workInProgress,
|
|
4943
|
-
Component,
|
|
4944
|
-
nextProps,
|
|
4945
|
-
renderLanes
|
|
4946
|
-
) {
|
|
4947
|
-
Component = Component.render;
|
|
4948
|
-
var ref = workInProgress.ref;
|
|
4949
|
-
prepareToReadContext(workInProgress, renderLanes);
|
|
4950
|
-
nextProps = renderWithHooks(
|
|
4951
|
-
current,
|
|
4952
|
-
workInProgress,
|
|
4953
|
-
Component,
|
|
4954
|
-
nextProps,
|
|
4955
|
-
ref,
|
|
4956
|
-
renderLanes
|
|
4957
|
-
);
|
|
4958
|
-
if (null !== current && !didReceiveUpdate)
|
|
4959
|
-
return (
|
|
4960
|
-
(workInProgress.updateQueue = current.updateQueue),
|
|
4961
|
-
(workInProgress.flags &= -2053),
|
|
4962
|
-
(current.lanes &= ~renderLanes),
|
|
4963
|
-
bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
|
4964
|
-
);
|
|
4965
|
-
workInProgress.flags |= 1;
|
|
4966
|
-
reconcileChildren(current, workInProgress, nextProps, renderLanes);
|
|
4967
|
-
return workInProgress.child;
|
|
4968
|
-
}
|
|
4969
|
-
function updateMemoComponent(
|
|
4970
|
-
current,
|
|
4971
|
-
workInProgress,
|
|
4972
|
-
Component,
|
|
4973
|
-
nextProps,
|
|
4974
|
-
renderLanes
|
|
4975
|
-
) {
|
|
4976
|
-
if (null === current) {
|
|
4977
|
-
var type = Component.type;
|
|
4978
|
-
if (
|
|
4979
|
-
"function" === typeof type &&
|
|
4980
|
-
!shouldConstruct(type) &&
|
|
4981
|
-
void 0 === type.defaultProps &&
|
|
4982
|
-
null === Component.compare &&
|
|
4983
|
-
void 0 === Component.defaultProps
|
|
4984
|
-
)
|
|
4985
|
-
return (
|
|
4986
|
-
(workInProgress.tag = 15),
|
|
4987
|
-
(workInProgress.type = type),
|
|
4988
|
-
updateSimpleMemoComponent(
|
|
4989
|
-
current,
|
|
4990
|
-
workInProgress,
|
|
4991
|
-
type,
|
|
4992
|
-
nextProps,
|
|
4993
|
-
renderLanes
|
|
4994
|
-
)
|
|
4995
|
-
);
|
|
4996
|
-
current = createFiberFromTypeAndProps(
|
|
4997
|
-
Component.type,
|
|
4998
|
-
null,
|
|
4999
|
-
nextProps,
|
|
5000
|
-
workInProgress,
|
|
5001
|
-
workInProgress.mode,
|
|
5002
|
-
renderLanes
|
|
5003
|
-
);
|
|
5004
|
-
current.ref = workInProgress.ref;
|
|
5005
|
-
current.return = workInProgress;
|
|
5006
|
-
return (workInProgress.child = current);
|
|
5007
|
-
}
|
|
5008
|
-
type = current.child;
|
|
5009
|
-
if (0 === (current.lanes & renderLanes)) {
|
|
5010
|
-
var prevProps = type.memoizedProps;
|
|
5011
|
-
Component = Component.compare;
|
|
5012
|
-
Component = null !== Component ? Component : shallowEqual;
|
|
5013
|
-
if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)
|
|
5014
|
-
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
4486
|
+
type = current.child;
|
|
4487
|
+
if (0 === (current.lanes & renderLanes)) {
|
|
4488
|
+
var prevProps = type.memoizedProps;
|
|
4489
|
+
Component = Component.compare;
|
|
4490
|
+
Component = null !== Component ? Component : shallowEqual;
|
|
4491
|
+
if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)
|
|
4492
|
+
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
5015
4493
|
}
|
|
5016
4494
|
workInProgress.flags |= 1;
|
|
5017
4495
|
current = createWorkInProgress(type, nextProps);
|
|
@@ -5026,18 +4504,24 @@ function updateSimpleMemoComponent(
|
|
|
5026
4504
|
nextProps,
|
|
5027
4505
|
renderLanes
|
|
5028
4506
|
) {
|
|
5029
|
-
if (
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
(
|
|
5039
|
-
|
|
5040
|
-
|
|
4507
|
+
if (null !== current) {
|
|
4508
|
+
var prevProps = current.memoizedProps;
|
|
4509
|
+
if (
|
|
4510
|
+
shallowEqual(prevProps, nextProps) &&
|
|
4511
|
+
current.ref === workInProgress.ref
|
|
4512
|
+
)
|
|
4513
|
+
if (
|
|
4514
|
+
((didReceiveUpdate = !1),
|
|
4515
|
+
(workInProgress.pendingProps = nextProps = prevProps),
|
|
4516
|
+
0 !== (current.lanes & renderLanes))
|
|
4517
|
+
)
|
|
4518
|
+
0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
|
|
4519
|
+
else
|
|
4520
|
+
return (
|
|
4521
|
+
(workInProgress.lanes = current.lanes),
|
|
4522
|
+
bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
|
4523
|
+
);
|
|
4524
|
+
}
|
|
5041
4525
|
return updateFunctionComponent(
|
|
5042
4526
|
current,
|
|
5043
4527
|
workInProgress,
|
|
@@ -5052,7 +4536,11 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
|
|
|
5052
4536
|
prevState = null !== current ? current.memoizedState : null;
|
|
5053
4537
|
if ("hidden" === nextProps.mode)
|
|
5054
4538
|
if (0 === (workInProgress.mode & 1))
|
|
5055
|
-
(workInProgress.memoizedState = {
|
|
4539
|
+
(workInProgress.memoizedState = {
|
|
4540
|
+
baseLanes: 0,
|
|
4541
|
+
cachePool: null,
|
|
4542
|
+
transitions: null
|
|
4543
|
+
}),
|
|
5056
4544
|
push(subtreeRenderLanesCursor, subtreeRenderLanes),
|
|
5057
4545
|
(subtreeRenderLanes |= renderLanes);
|
|
5058
4546
|
else {
|
|
@@ -5065,14 +4553,19 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
|
|
|
5065
4553
|
(workInProgress.lanes = workInProgress.childLanes = 1073741824),
|
|
5066
4554
|
(workInProgress.memoizedState = {
|
|
5067
4555
|
baseLanes: current,
|
|
5068
|
-
cachePool: null
|
|
4556
|
+
cachePool: null,
|
|
4557
|
+
transitions: null
|
|
5069
4558
|
}),
|
|
5070
4559
|
(workInProgress.updateQueue = null),
|
|
5071
4560
|
push(subtreeRenderLanesCursor, subtreeRenderLanes),
|
|
5072
4561
|
(subtreeRenderLanes |= current),
|
|
5073
4562
|
null
|
|
5074
4563
|
);
|
|
5075
|
-
workInProgress.memoizedState = {
|
|
4564
|
+
workInProgress.memoizedState = {
|
|
4565
|
+
baseLanes: 0,
|
|
4566
|
+
cachePool: null,
|
|
4567
|
+
transitions: null
|
|
4568
|
+
};
|
|
5076
4569
|
nextProps = null !== prevState ? prevState.baseLanes : renderLanes;
|
|
5077
4570
|
push(subtreeRenderLanesCursor, subtreeRenderLanes);
|
|
5078
4571
|
subtreeRenderLanes |= nextProps;
|
|
@@ -5087,7 +4580,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
|
|
|
5087
4580
|
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
|
|
5088
4581
|
return workInProgress.child;
|
|
5089
4582
|
}
|
|
5090
|
-
function markRef
|
|
4583
|
+
function markRef(current, workInProgress) {
|
|
5091
4584
|
var ref = workInProgress.ref;
|
|
5092
4585
|
if (
|
|
5093
4586
|
(null === current && null !== ref) ||
|
|
@@ -5139,10 +4632,7 @@ function updateClassComponent(
|
|
|
5139
4632
|
} else hasContext = !1;
|
|
5140
4633
|
prepareToReadContext(workInProgress, renderLanes);
|
|
5141
4634
|
if (null === workInProgress.stateNode)
|
|
5142
|
-
|
|
5143
|
-
((current.alternate = null),
|
|
5144
|
-
(workInProgress.alternate = null),
|
|
5145
|
-
(workInProgress.flags |= 2)),
|
|
4635
|
+
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
|
|
5146
4636
|
constructClassInstance(workInProgress, Component, nextProps),
|
|
5147
4637
|
mountClassInstance(workInProgress, Component, nextProps, renderLanes),
|
|
5148
4638
|
(nextProps = !0);
|
|
@@ -5336,7 +4826,7 @@ function finishClassComponent(
|
|
|
5336
4826
|
hasContext,
|
|
5337
4827
|
renderLanes
|
|
5338
4828
|
) {
|
|
5339
|
-
markRef
|
|
4829
|
+
markRef(current, workInProgress);
|
|
5340
4830
|
var didCaptureError = 0 !== (workInProgress.flags & 128);
|
|
5341
4831
|
if (!shouldUpdate && !didCaptureError)
|
|
5342
4832
|
return (
|
|
@@ -5386,14 +4876,15 @@ function pushHostRootContext(workInProgress) {
|
|
|
5386
4876
|
}
|
|
5387
4877
|
var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 };
|
|
5388
4878
|
function mountSuspenseOffscreenState(renderLanes) {
|
|
5389
|
-
return { baseLanes: renderLanes, cachePool: null };
|
|
4879
|
+
return { baseLanes: renderLanes, cachePool: null, transitions: null };
|
|
5390
4880
|
}
|
|
5391
4881
|
function updateSuspenseComponent(current, workInProgress, renderLanes) {
|
|
5392
4882
|
var nextProps = workInProgress.pendingProps,
|
|
5393
4883
|
suspenseContext = suspenseStackCursor.current,
|
|
5394
4884
|
showFallback = !1,
|
|
4885
|
+
didSuspend = 0 !== (workInProgress.flags & 128),
|
|
5395
4886
|
JSCompiler_temp;
|
|
5396
|
-
(JSCompiler_temp =
|
|
4887
|
+
(JSCompiler_temp = didSuspend) ||
|
|
5397
4888
|
(JSCompiler_temp =
|
|
5398
4889
|
null !== current && null === current.memoizedState
|
|
5399
4890
|
? !1
|
|
@@ -5403,177 +4894,307 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
|
|
|
5403
4894
|
suspenseContext |= 1;
|
|
5404
4895
|
push(suspenseStackCursor, suspenseContext & 1);
|
|
5405
4896
|
if (null === current) {
|
|
5406
|
-
|
|
5407
|
-
current
|
|
5408
|
-
if (showFallback)
|
|
4897
|
+
current = workInProgress.memoizedState;
|
|
4898
|
+
if (null !== current && null !== current.dehydrated)
|
|
5409
4899
|
return (
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
4900
|
+
0 === (workInProgress.mode & 1)
|
|
4901
|
+
? (workInProgress.lanes = 1)
|
|
4902
|
+
: shim$1()
|
|
4903
|
+
? (workInProgress.lanes = 8)
|
|
4904
|
+
: (workInProgress.lanes = 1073741824),
|
|
4905
|
+
null
|
|
4906
|
+
);
|
|
4907
|
+
didSuspend = nextProps.children;
|
|
4908
|
+
current = nextProps.fallback;
|
|
4909
|
+
return showFallback
|
|
4910
|
+
? ((nextProps = workInProgress.mode),
|
|
4911
|
+
(showFallback = workInProgress.child),
|
|
4912
|
+
(didSuspend = { mode: "hidden", children: didSuspend }),
|
|
4913
|
+
0 === (nextProps & 1) && null !== showFallback
|
|
4914
|
+
? ((showFallback.childLanes = 0),
|
|
4915
|
+
(showFallback.pendingProps = didSuspend),
|
|
5416
4916
|
workInProgress.mode & 2 &&
|
|
5417
|
-
((
|
|
5418
|
-
(
|
|
5419
|
-
(
|
|
5420
|
-
(
|
|
5421
|
-
: (
|
|
5422
|
-
|
|
5423
|
-
|
|
4917
|
+
((showFallback.actualDuration = 0),
|
|
4918
|
+
(showFallback.actualStartTime = -1),
|
|
4919
|
+
(showFallback.selfBaseDuration = 0),
|
|
4920
|
+
(showFallback.treeBaseDuration = 0)))
|
|
4921
|
+
: (showFallback = createFiberFromOffscreen(
|
|
4922
|
+
didSuspend,
|
|
4923
|
+
nextProps,
|
|
5424
4924
|
0,
|
|
5425
4925
|
null
|
|
5426
4926
|
)),
|
|
5427
4927
|
(current = createFiberFromFragment(
|
|
5428
4928
|
current,
|
|
5429
|
-
|
|
4929
|
+
nextProps,
|
|
5430
4930
|
renderLanes,
|
|
5431
4931
|
null
|
|
5432
4932
|
)),
|
|
5433
|
-
(
|
|
4933
|
+
(showFallback.return = workInProgress),
|
|
5434
4934
|
(current.return = workInProgress),
|
|
5435
|
-
(
|
|
5436
|
-
(workInProgress.child =
|
|
4935
|
+
(showFallback.sibling = current),
|
|
4936
|
+
(workInProgress.child = showFallback),
|
|
5437
4937
|
(workInProgress.child.memoizedState = mountSuspenseOffscreenState(
|
|
5438
4938
|
renderLanes
|
|
5439
4939
|
)),
|
|
5440
4940
|
(workInProgress.memoizedState = SUSPENDED_MARKER),
|
|
5441
|
-
current
|
|
5442
|
-
);
|
|
5443
|
-
renderLanes = createFiberFromOffscreen(
|
|
5444
|
-
{ mode: "visible", children: suspenseContext },
|
|
5445
|
-
workInProgress.mode,
|
|
5446
|
-
0,
|
|
5447
|
-
null
|
|
5448
|
-
);
|
|
5449
|
-
renderLanes.return = workInProgress;
|
|
5450
|
-
return (workInProgress.child = renderLanes);
|
|
4941
|
+
current)
|
|
4942
|
+
: mountSuspensePrimaryChildren(workInProgress, didSuspend);
|
|
5451
4943
|
}
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
nextProps.children,
|
|
5459
|
-
nextProps.fallback,
|
|
5460
|
-
renderLanes
|
|
5461
|
-
)),
|
|
5462
|
-
(nextProps = workInProgress.child),
|
|
5463
|
-
(suspenseContext = current.child.memoizedState),
|
|
5464
|
-
(nextProps.memoizedState =
|
|
5465
|
-
null === suspenseContext
|
|
5466
|
-
? mountSuspenseOffscreenState(renderLanes)
|
|
5467
|
-
: {
|
|
5468
|
-
baseLanes: suspenseContext.baseLanes | renderLanes,
|
|
5469
|
-
cachePool: null
|
|
5470
|
-
}),
|
|
5471
|
-
(nextProps.childLanes = current.childLanes & ~renderLanes),
|
|
5472
|
-
(workInProgress.memoizedState = SUSPENDED_MARKER),
|
|
5473
|
-
showFallback
|
|
5474
|
-
);
|
|
5475
|
-
renderLanes = updateSuspensePrimaryChildren(
|
|
4944
|
+
suspenseContext = current.memoizedState;
|
|
4945
|
+
if (
|
|
4946
|
+
null !== suspenseContext &&
|
|
4947
|
+
((JSCompiler_temp = suspenseContext.dehydrated), null !== JSCompiler_temp)
|
|
4948
|
+
)
|
|
4949
|
+
return updateDehydratedSuspenseComponent(
|
|
5476
4950
|
current,
|
|
5477
4951
|
workInProgress,
|
|
5478
|
-
|
|
4952
|
+
didSuspend,
|
|
4953
|
+
nextProps,
|
|
4954
|
+
JSCompiler_temp,
|
|
4955
|
+
suspenseContext,
|
|
5479
4956
|
renderLanes
|
|
5480
4957
|
);
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
nextProps.
|
|
5490
|
-
nextProps.
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
workInProgress
|
|
5509
|
-
nextProps.
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
4958
|
+
if (showFallback) {
|
|
4959
|
+
showFallback = nextProps.fallback;
|
|
4960
|
+
didSuspend = workInProgress.mode;
|
|
4961
|
+
suspenseContext = current.child;
|
|
4962
|
+
JSCompiler_temp = suspenseContext.sibling;
|
|
4963
|
+
var primaryChildProps = { mode: "hidden", children: nextProps.children };
|
|
4964
|
+
0 === (didSuspend & 1) && workInProgress.child !== suspenseContext
|
|
4965
|
+
? ((nextProps = workInProgress.child),
|
|
4966
|
+
(nextProps.childLanes = 0),
|
|
4967
|
+
(nextProps.pendingProps = primaryChildProps),
|
|
4968
|
+
workInProgress.mode & 2 &&
|
|
4969
|
+
((nextProps.actualDuration = 0),
|
|
4970
|
+
(nextProps.actualStartTime = -1),
|
|
4971
|
+
(nextProps.selfBaseDuration = suspenseContext.selfBaseDuration),
|
|
4972
|
+
(nextProps.treeBaseDuration = suspenseContext.treeBaseDuration)),
|
|
4973
|
+
(workInProgress.deletions = null))
|
|
4974
|
+
: ((nextProps = createWorkInProgress(suspenseContext, primaryChildProps)),
|
|
4975
|
+
(nextProps.subtreeFlags = suspenseContext.subtreeFlags & 14680064));
|
|
4976
|
+
null !== JSCompiler_temp
|
|
4977
|
+
? (showFallback = createWorkInProgress(JSCompiler_temp, showFallback))
|
|
4978
|
+
: ((showFallback = createFiberFromFragment(
|
|
4979
|
+
showFallback,
|
|
4980
|
+
didSuspend,
|
|
4981
|
+
renderLanes,
|
|
4982
|
+
null
|
|
4983
|
+
)),
|
|
4984
|
+
(showFallback.flags |= 2));
|
|
4985
|
+
showFallback.return = workInProgress;
|
|
4986
|
+
nextProps.return = workInProgress;
|
|
4987
|
+
nextProps.sibling = showFallback;
|
|
4988
|
+
workInProgress.child = nextProps;
|
|
4989
|
+
nextProps = showFallback;
|
|
4990
|
+
showFallback = workInProgress.child;
|
|
4991
|
+
didSuspend = current.child.memoizedState;
|
|
4992
|
+
didSuspend =
|
|
4993
|
+
null === didSuspend
|
|
4994
|
+
? mountSuspenseOffscreenState(renderLanes)
|
|
4995
|
+
: {
|
|
4996
|
+
baseLanes: didSuspend.baseLanes | renderLanes,
|
|
4997
|
+
cachePool: null,
|
|
4998
|
+
transitions: didSuspend.transitions
|
|
4999
|
+
};
|
|
5000
|
+
showFallback.memoizedState = didSuspend;
|
|
5001
|
+
showFallback.childLanes = current.childLanes & ~renderLanes;
|
|
5002
|
+
workInProgress.memoizedState = SUSPENDED_MARKER;
|
|
5003
|
+
return nextProps;
|
|
5004
|
+
}
|
|
5005
|
+
showFallback = current.child;
|
|
5006
|
+
current = showFallback.sibling;
|
|
5007
|
+
nextProps = createWorkInProgress(showFallback, {
|
|
5524
5008
|
mode: "visible",
|
|
5525
|
-
children:
|
|
5009
|
+
children: nextProps.children
|
|
5526
5010
|
});
|
|
5527
|
-
0 === (workInProgress.mode & 1) && (
|
|
5528
|
-
|
|
5529
|
-
|
|
5011
|
+
0 === (workInProgress.mode & 1) && (nextProps.lanes = renderLanes);
|
|
5012
|
+
nextProps.return = workInProgress;
|
|
5013
|
+
nextProps.sibling = null;
|
|
5530
5014
|
null !== current &&
|
|
5531
5015
|
((renderLanes = workInProgress.deletions),
|
|
5532
5016
|
null === renderLanes
|
|
5533
5017
|
? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))
|
|
5534
5018
|
: renderLanes.push(current));
|
|
5019
|
+
workInProgress.child = nextProps;
|
|
5020
|
+
workInProgress.memoizedState = null;
|
|
5021
|
+
return nextProps;
|
|
5022
|
+
}
|
|
5023
|
+
function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
|
|
5024
|
+
primaryChildren = createFiberFromOffscreen(
|
|
5025
|
+
{ mode: "visible", children: primaryChildren },
|
|
5026
|
+
workInProgress.mode,
|
|
5027
|
+
0,
|
|
5028
|
+
null
|
|
5029
|
+
);
|
|
5030
|
+
primaryChildren.return = workInProgress;
|
|
5535
5031
|
return (workInProgress.child = primaryChildren);
|
|
5536
5032
|
}
|
|
5537
|
-
function
|
|
5033
|
+
function retrySuspenseComponentWithoutHydrating(
|
|
5034
|
+
current,
|
|
5035
|
+
workInProgress,
|
|
5036
|
+
renderLanes,
|
|
5037
|
+
recoverableError
|
|
5038
|
+
) {
|
|
5039
|
+
null !== recoverableError &&
|
|
5040
|
+
(null === hydrationErrors
|
|
5041
|
+
? (hydrationErrors = [recoverableError])
|
|
5042
|
+
: hydrationErrors.push(recoverableError));
|
|
5043
|
+
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
|
|
5044
|
+
current = mountSuspensePrimaryChildren(
|
|
5045
|
+
workInProgress,
|
|
5046
|
+
workInProgress.pendingProps.children
|
|
5047
|
+
);
|
|
5048
|
+
current.flags |= 2;
|
|
5049
|
+
workInProgress.memoizedState = null;
|
|
5050
|
+
return current;
|
|
5051
|
+
}
|
|
5052
|
+
function updateDehydratedSuspenseComponent(
|
|
5538
5053
|
current,
|
|
5539
5054
|
workInProgress,
|
|
5540
|
-
|
|
5541
|
-
|
|
5055
|
+
didSuspend,
|
|
5056
|
+
nextProps,
|
|
5057
|
+
suspenseInstance,
|
|
5058
|
+
suspenseState,
|
|
5542
5059
|
renderLanes
|
|
5543
5060
|
) {
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
? (fallbackChildren = createWorkInProgress(
|
|
5562
|
-
currentFallbackChildFragment,
|
|
5563
|
-
fallbackChildren
|
|
5564
|
-
))
|
|
5565
|
-
: ((fallbackChildren = createFiberFromFragment(
|
|
5566
|
-
fallbackChildren,
|
|
5567
|
-
mode,
|
|
5568
|
-
renderLanes,
|
|
5061
|
+
if (didSuspend) {
|
|
5062
|
+
if (workInProgress.flags & 256)
|
|
5063
|
+
return (
|
|
5064
|
+
(workInProgress.flags &= -257),
|
|
5065
|
+
retrySuspenseComponentWithoutHydrating(
|
|
5066
|
+
current,
|
|
5067
|
+
workInProgress,
|
|
5068
|
+
renderLanes,
|
|
5069
|
+
Error(
|
|
5070
|
+
"There was an error while hydrating this Suspense boundary. Switched to client rendering."
|
|
5071
|
+
)
|
|
5072
|
+
)
|
|
5073
|
+
);
|
|
5074
|
+
if (null !== workInProgress.memoizedState)
|
|
5075
|
+
return (
|
|
5076
|
+
(workInProgress.child = current.child),
|
|
5077
|
+
(workInProgress.flags |= 128),
|
|
5569
5078
|
null
|
|
5570
|
-
)
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5079
|
+
);
|
|
5080
|
+
suspenseState = nextProps.fallback;
|
|
5081
|
+
didSuspend = workInProgress.mode;
|
|
5082
|
+
nextProps = createFiberFromOffscreen(
|
|
5083
|
+
{ mode: "visible", children: nextProps.children },
|
|
5084
|
+
didSuspend,
|
|
5085
|
+
0,
|
|
5086
|
+
null
|
|
5087
|
+
);
|
|
5088
|
+
suspenseState = createFiberFromFragment(
|
|
5089
|
+
suspenseState,
|
|
5090
|
+
didSuspend,
|
|
5091
|
+
renderLanes,
|
|
5092
|
+
null
|
|
5093
|
+
);
|
|
5094
|
+
suspenseState.flags |= 2;
|
|
5095
|
+
nextProps.return = workInProgress;
|
|
5096
|
+
suspenseState.return = workInProgress;
|
|
5097
|
+
nextProps.sibling = suspenseState;
|
|
5098
|
+
workInProgress.child = nextProps;
|
|
5099
|
+
0 !== (workInProgress.mode & 1) &&
|
|
5100
|
+
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
|
|
5101
|
+
workInProgress.child.memoizedState = mountSuspenseOffscreenState(
|
|
5102
|
+
renderLanes
|
|
5103
|
+
);
|
|
5104
|
+
workInProgress.memoizedState = SUSPENDED_MARKER;
|
|
5105
|
+
return suspenseState;
|
|
5106
|
+
}
|
|
5107
|
+
if (0 === (workInProgress.mode & 1))
|
|
5108
|
+
return retrySuspenseComponentWithoutHydrating(
|
|
5109
|
+
current,
|
|
5110
|
+
workInProgress,
|
|
5111
|
+
renderLanes,
|
|
5112
|
+
null
|
|
5113
|
+
);
|
|
5114
|
+
if (shim$1())
|
|
5115
|
+
return (
|
|
5116
|
+
(suspenseState = shim$1().errorMessage),
|
|
5117
|
+
retrySuspenseComponentWithoutHydrating(
|
|
5118
|
+
current,
|
|
5119
|
+
workInProgress,
|
|
5120
|
+
renderLanes,
|
|
5121
|
+
suspenseState
|
|
5122
|
+
? Error(suspenseState)
|
|
5123
|
+
: Error(
|
|
5124
|
+
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
|
|
5125
|
+
)
|
|
5126
|
+
)
|
|
5127
|
+
);
|
|
5128
|
+
didSuspend = 0 !== (renderLanes & current.childLanes);
|
|
5129
|
+
if (didReceiveUpdate || didSuspend) {
|
|
5130
|
+
nextProps = workInProgressRoot;
|
|
5131
|
+
if (null !== nextProps) {
|
|
5132
|
+
switch (renderLanes & -renderLanes) {
|
|
5133
|
+
case 4:
|
|
5134
|
+
didSuspend = 2;
|
|
5135
|
+
break;
|
|
5136
|
+
case 16:
|
|
5137
|
+
didSuspend = 8;
|
|
5138
|
+
break;
|
|
5139
|
+
case 64:
|
|
5140
|
+
case 128:
|
|
5141
|
+
case 256:
|
|
5142
|
+
case 512:
|
|
5143
|
+
case 1024:
|
|
5144
|
+
case 2048:
|
|
5145
|
+
case 4096:
|
|
5146
|
+
case 8192:
|
|
5147
|
+
case 16384:
|
|
5148
|
+
case 32768:
|
|
5149
|
+
case 65536:
|
|
5150
|
+
case 131072:
|
|
5151
|
+
case 262144:
|
|
5152
|
+
case 524288:
|
|
5153
|
+
case 1048576:
|
|
5154
|
+
case 2097152:
|
|
5155
|
+
case 4194304:
|
|
5156
|
+
case 8388608:
|
|
5157
|
+
case 16777216:
|
|
5158
|
+
case 33554432:
|
|
5159
|
+
case 67108864:
|
|
5160
|
+
didSuspend = 32;
|
|
5161
|
+
break;
|
|
5162
|
+
case 536870912:
|
|
5163
|
+
didSuspend = 268435456;
|
|
5164
|
+
break;
|
|
5165
|
+
default:
|
|
5166
|
+
didSuspend = 0;
|
|
5167
|
+
}
|
|
5168
|
+
nextProps =
|
|
5169
|
+
0 !== (didSuspend & (nextProps.suspendedLanes | renderLanes))
|
|
5170
|
+
? 0
|
|
5171
|
+
: didSuspend;
|
|
5172
|
+
0 !== nextProps &&
|
|
5173
|
+
nextProps !== suspenseState.retryLane &&
|
|
5174
|
+
((suspenseState.retryLane = nextProps),
|
|
5175
|
+
scheduleUpdateOnFiber(current, nextProps, -1));
|
|
5176
|
+
}
|
|
5177
|
+
renderDidSuspendDelayIfPossible();
|
|
5178
|
+
return retrySuspenseComponentWithoutHydrating(
|
|
5179
|
+
current,
|
|
5180
|
+
workInProgress,
|
|
5181
|
+
renderLanes,
|
|
5182
|
+
Error(
|
|
5183
|
+
"This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."
|
|
5184
|
+
)
|
|
5185
|
+
);
|
|
5186
|
+
}
|
|
5187
|
+
if (shim$1())
|
|
5188
|
+
return (
|
|
5189
|
+
(workInProgress.flags |= 128),
|
|
5190
|
+
(workInProgress.child = current.child),
|
|
5191
|
+
retryDehydratedSuspenseBoundary.bind(null, current),
|
|
5192
|
+
shim$1(),
|
|
5193
|
+
null
|
|
5194
|
+
);
|
|
5195
|
+
current = mountSuspensePrimaryChildren(workInProgress, nextProps.children);
|
|
5196
|
+
current.flags |= 4096;
|
|
5197
|
+
return current;
|
|
5577
5198
|
}
|
|
5578
5199
|
function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
|
|
5579
5200
|
fiber.lanes |= renderLanes;
|
|
@@ -5635,158 +5256,753 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) {
|
|
|
5635
5256
|
current.sibling.return = current.return;
|
|
5636
5257
|
current = current.sibling;
|
|
5637
5258
|
}
|
|
5638
|
-
nextProps &= 1;
|
|
5259
|
+
nextProps &= 1;
|
|
5260
|
+
}
|
|
5261
|
+
push(suspenseStackCursor, nextProps);
|
|
5262
|
+
if (0 === (workInProgress.mode & 1)) workInProgress.memoizedState = null;
|
|
5263
|
+
else
|
|
5264
|
+
switch (revealOrder) {
|
|
5265
|
+
case "forwards":
|
|
5266
|
+
renderLanes = workInProgress.child;
|
|
5267
|
+
for (revealOrder = null; null !== renderLanes; )
|
|
5268
|
+
(current = renderLanes.alternate),
|
|
5269
|
+
null !== current &&
|
|
5270
|
+
null === findFirstSuspended(current) &&
|
|
5271
|
+
(revealOrder = renderLanes),
|
|
5272
|
+
(renderLanes = renderLanes.sibling);
|
|
5273
|
+
renderLanes = revealOrder;
|
|
5274
|
+
null === renderLanes
|
|
5275
|
+
? ((revealOrder = workInProgress.child),
|
|
5276
|
+
(workInProgress.child = null))
|
|
5277
|
+
: ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));
|
|
5278
|
+
initSuspenseListRenderState(
|
|
5279
|
+
workInProgress,
|
|
5280
|
+
!1,
|
|
5281
|
+
revealOrder,
|
|
5282
|
+
renderLanes,
|
|
5283
|
+
tailMode
|
|
5284
|
+
);
|
|
5285
|
+
break;
|
|
5286
|
+
case "backwards":
|
|
5287
|
+
renderLanes = null;
|
|
5288
|
+
revealOrder = workInProgress.child;
|
|
5289
|
+
for (workInProgress.child = null; null !== revealOrder; ) {
|
|
5290
|
+
current = revealOrder.alternate;
|
|
5291
|
+
if (null !== current && null === findFirstSuspended(current)) {
|
|
5292
|
+
workInProgress.child = revealOrder;
|
|
5293
|
+
break;
|
|
5294
|
+
}
|
|
5295
|
+
current = revealOrder.sibling;
|
|
5296
|
+
revealOrder.sibling = renderLanes;
|
|
5297
|
+
renderLanes = revealOrder;
|
|
5298
|
+
revealOrder = current;
|
|
5299
|
+
}
|
|
5300
|
+
initSuspenseListRenderState(
|
|
5301
|
+
workInProgress,
|
|
5302
|
+
!0,
|
|
5303
|
+
renderLanes,
|
|
5304
|
+
null,
|
|
5305
|
+
tailMode
|
|
5306
|
+
);
|
|
5307
|
+
break;
|
|
5308
|
+
case "together":
|
|
5309
|
+
initSuspenseListRenderState(workInProgress, !1, null, null, void 0);
|
|
5310
|
+
break;
|
|
5311
|
+
default:
|
|
5312
|
+
workInProgress.memoizedState = null;
|
|
5313
|
+
}
|
|
5314
|
+
return workInProgress.child;
|
|
5315
|
+
}
|
|
5316
|
+
function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {
|
|
5317
|
+
0 === (workInProgress.mode & 1) &&
|
|
5318
|
+
null !== current &&
|
|
5319
|
+
((current.alternate = null),
|
|
5320
|
+
(workInProgress.alternate = null),
|
|
5321
|
+
(workInProgress.flags |= 2));
|
|
5322
|
+
}
|
|
5323
|
+
function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
|
|
5324
|
+
null !== current && (workInProgress.dependencies = current.dependencies);
|
|
5325
|
+
profilerStartTime = -1;
|
|
5326
|
+
workInProgressRootSkippedLanes |= workInProgress.lanes;
|
|
5327
|
+
if (0 === (renderLanes & workInProgress.childLanes)) return null;
|
|
5328
|
+
if (null !== current && workInProgress.child !== current.child)
|
|
5329
|
+
throw Error("Resuming work not yet implemented.");
|
|
5330
|
+
if (null !== workInProgress.child) {
|
|
5331
|
+
current = workInProgress.child;
|
|
5332
|
+
renderLanes = createWorkInProgress(current, current.pendingProps);
|
|
5333
|
+
workInProgress.child = renderLanes;
|
|
5334
|
+
for (renderLanes.return = workInProgress; null !== current.sibling; )
|
|
5335
|
+
(current = current.sibling),
|
|
5336
|
+
(renderLanes = renderLanes.sibling = createWorkInProgress(
|
|
5337
|
+
current,
|
|
5338
|
+
current.pendingProps
|
|
5339
|
+
)),
|
|
5340
|
+
(renderLanes.return = workInProgress);
|
|
5341
|
+
renderLanes.sibling = null;
|
|
5342
|
+
}
|
|
5343
|
+
return workInProgress.child;
|
|
5344
|
+
}
|
|
5345
|
+
function attemptEarlyBailoutIfNoScheduledUpdate(
|
|
5346
|
+
current,
|
|
5347
|
+
workInProgress,
|
|
5348
|
+
renderLanes
|
|
5349
|
+
) {
|
|
5350
|
+
switch (workInProgress.tag) {
|
|
5351
|
+
case 3:
|
|
5352
|
+
pushHostRootContext(workInProgress);
|
|
5353
|
+
break;
|
|
5354
|
+
case 5:
|
|
5355
|
+
pushHostContext(workInProgress);
|
|
5356
|
+
break;
|
|
5357
|
+
case 1:
|
|
5358
|
+
isContextProvider(workInProgress.type) &&
|
|
5359
|
+
pushContextProvider(workInProgress);
|
|
5360
|
+
break;
|
|
5361
|
+
case 4:
|
|
5362
|
+
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
|
|
5363
|
+
break;
|
|
5364
|
+
case 10:
|
|
5365
|
+
var context = workInProgress.type._context,
|
|
5366
|
+
nextValue = workInProgress.memoizedProps.value;
|
|
5367
|
+
push(valueCursor, context._currentValue2);
|
|
5368
|
+
context._currentValue2 = nextValue;
|
|
5369
|
+
break;
|
|
5370
|
+
case 12:
|
|
5371
|
+
0 !== (renderLanes & workInProgress.childLanes) &&
|
|
5372
|
+
(workInProgress.flags |= 4);
|
|
5373
|
+
context = workInProgress.stateNode;
|
|
5374
|
+
context.effectDuration = 0;
|
|
5375
|
+
context.passiveEffectDuration = 0;
|
|
5376
|
+
break;
|
|
5377
|
+
case 13:
|
|
5378
|
+
context = workInProgress.memoizedState;
|
|
5379
|
+
if (null !== context) {
|
|
5380
|
+
if (null !== context.dehydrated)
|
|
5381
|
+
return (
|
|
5382
|
+
push(suspenseStackCursor, suspenseStackCursor.current & 1),
|
|
5383
|
+
(workInProgress.flags |= 128),
|
|
5384
|
+
null
|
|
5385
|
+
);
|
|
5386
|
+
if (0 !== (renderLanes & workInProgress.child.childLanes))
|
|
5387
|
+
return updateSuspenseComponent(current, workInProgress, renderLanes);
|
|
5388
|
+
push(suspenseStackCursor, suspenseStackCursor.current & 1);
|
|
5389
|
+
current = bailoutOnAlreadyFinishedWork(
|
|
5390
|
+
current,
|
|
5391
|
+
workInProgress,
|
|
5392
|
+
renderLanes
|
|
5393
|
+
);
|
|
5394
|
+
return null !== current ? current.sibling : null;
|
|
5395
|
+
}
|
|
5396
|
+
push(suspenseStackCursor, suspenseStackCursor.current & 1);
|
|
5397
|
+
break;
|
|
5398
|
+
case 19:
|
|
5399
|
+
context = 0 !== (renderLanes & workInProgress.childLanes);
|
|
5400
|
+
if (0 !== (current.flags & 128)) {
|
|
5401
|
+
if (context)
|
|
5402
|
+
return updateSuspenseListComponent(
|
|
5403
|
+
current,
|
|
5404
|
+
workInProgress,
|
|
5405
|
+
renderLanes
|
|
5406
|
+
);
|
|
5407
|
+
workInProgress.flags |= 128;
|
|
5408
|
+
}
|
|
5409
|
+
nextValue = workInProgress.memoizedState;
|
|
5410
|
+
null !== nextValue &&
|
|
5411
|
+
((nextValue.rendering = null),
|
|
5412
|
+
(nextValue.tail = null),
|
|
5413
|
+
(nextValue.lastEffect = null));
|
|
5414
|
+
push(suspenseStackCursor, suspenseStackCursor.current);
|
|
5415
|
+
if (context) break;
|
|
5416
|
+
else return null;
|
|
5417
|
+
case 22:
|
|
5418
|
+
case 23:
|
|
5419
|
+
return (
|
|
5420
|
+
(workInProgress.lanes = 0),
|
|
5421
|
+
updateOffscreenComponent(current, workInProgress, renderLanes)
|
|
5422
|
+
);
|
|
5423
|
+
}
|
|
5424
|
+
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
5425
|
+
}
|
|
5426
|
+
function hadNoMutationsEffects(current, completedWork) {
|
|
5427
|
+
if (null !== current && current.child === completedWork.child) return !0;
|
|
5428
|
+
if (0 !== (completedWork.flags & 16)) return !1;
|
|
5429
|
+
for (current = completedWork.child; null !== current; ) {
|
|
5430
|
+
if (0 !== (current.flags & 12854) || 0 !== (current.subtreeFlags & 12854))
|
|
5431
|
+
return !1;
|
|
5432
|
+
current = current.sibling;
|
|
5433
|
+
}
|
|
5434
|
+
return !0;
|
|
5435
|
+
}
|
|
5436
|
+
var appendAllChildren,
|
|
5437
|
+
updateHostContainer,
|
|
5438
|
+
updateHostComponent$1,
|
|
5439
|
+
updateHostText$1;
|
|
5440
|
+
appendAllChildren = function(
|
|
5441
|
+
parent,
|
|
5442
|
+
workInProgress,
|
|
5443
|
+
needsVisibilityToggle,
|
|
5444
|
+
isHidden
|
|
5445
|
+
) {
|
|
5446
|
+
for (var node = workInProgress.child; null !== node; ) {
|
|
5447
|
+
if (5 === node.tag) {
|
|
5448
|
+
var instance = node.stateNode;
|
|
5449
|
+
needsVisibilityToggle &&
|
|
5450
|
+
isHidden &&
|
|
5451
|
+
(instance = cloneHiddenInstance(instance));
|
|
5452
|
+
appendChildNode(parent.node, instance.node);
|
|
5453
|
+
} else if (6 === node.tag) {
|
|
5454
|
+
instance = node.stateNode;
|
|
5455
|
+
if (needsVisibilityToggle && isHidden)
|
|
5456
|
+
throw Error("Not yet implemented.");
|
|
5457
|
+
appendChildNode(parent.node, instance.node);
|
|
5458
|
+
} else if (4 !== node.tag)
|
|
5459
|
+
if (22 === node.tag && null !== node.memoizedState)
|
|
5460
|
+
(instance = node.child),
|
|
5461
|
+
null !== instance && (instance.return = node),
|
|
5462
|
+
appendAllChildren(parent, node, !0, !0);
|
|
5463
|
+
else if (null !== node.child) {
|
|
5464
|
+
node.child.return = node;
|
|
5465
|
+
node = node.child;
|
|
5466
|
+
continue;
|
|
5467
|
+
}
|
|
5468
|
+
if (node === workInProgress) break;
|
|
5469
|
+
for (; null === node.sibling; ) {
|
|
5470
|
+
if (null === node.return || node.return === workInProgress) return;
|
|
5471
|
+
node = node.return;
|
|
5472
|
+
}
|
|
5473
|
+
node.sibling.return = node.return;
|
|
5474
|
+
node = node.sibling;
|
|
5639
5475
|
}
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
}
|
|
5674
|
-
current = revealOrder.sibling;
|
|
5675
|
-
revealOrder.sibling = renderLanes;
|
|
5676
|
-
renderLanes = revealOrder;
|
|
5677
|
-
revealOrder = current;
|
|
5678
|
-
}
|
|
5679
|
-
initSuspenseListRenderState(
|
|
5680
|
-
workInProgress,
|
|
5681
|
-
!0,
|
|
5682
|
-
renderLanes,
|
|
5683
|
-
null,
|
|
5684
|
-
tailMode
|
|
5685
|
-
);
|
|
5686
|
-
break;
|
|
5687
|
-
case "together":
|
|
5688
|
-
initSuspenseListRenderState(workInProgress, !1, null, null, void 0);
|
|
5689
|
-
break;
|
|
5690
|
-
default:
|
|
5691
|
-
workInProgress.memoizedState = null;
|
|
5476
|
+
};
|
|
5477
|
+
function appendAllChildrenToContainer(
|
|
5478
|
+
containerChildSet,
|
|
5479
|
+
workInProgress,
|
|
5480
|
+
needsVisibilityToggle,
|
|
5481
|
+
isHidden
|
|
5482
|
+
) {
|
|
5483
|
+
for (var node = workInProgress.child; null !== node; ) {
|
|
5484
|
+
if (5 === node.tag) {
|
|
5485
|
+
var instance = node.stateNode;
|
|
5486
|
+
needsVisibilityToggle &&
|
|
5487
|
+
isHidden &&
|
|
5488
|
+
(instance = cloneHiddenInstance(instance));
|
|
5489
|
+
appendChildNodeToSet(containerChildSet, instance.node);
|
|
5490
|
+
} else if (6 === node.tag) {
|
|
5491
|
+
instance = node.stateNode;
|
|
5492
|
+
if (needsVisibilityToggle && isHidden)
|
|
5493
|
+
throw Error("Not yet implemented.");
|
|
5494
|
+
appendChildNodeToSet(containerChildSet, instance.node);
|
|
5495
|
+
} else if (4 !== node.tag)
|
|
5496
|
+
if (22 === node.tag && null !== node.memoizedState)
|
|
5497
|
+
(instance = node.child),
|
|
5498
|
+
null !== instance && (instance.return = node),
|
|
5499
|
+
appendAllChildrenToContainer(containerChildSet, node, !0, !0);
|
|
5500
|
+
else if (null !== node.child) {
|
|
5501
|
+
node.child.return = node;
|
|
5502
|
+
node = node.child;
|
|
5503
|
+
continue;
|
|
5504
|
+
}
|
|
5505
|
+
if (node === workInProgress) break;
|
|
5506
|
+
for (; null === node.sibling; ) {
|
|
5507
|
+
if (null === node.return || node.return === workInProgress) return;
|
|
5508
|
+
node = node.return;
|
|
5692
5509
|
}
|
|
5693
|
-
|
|
5510
|
+
node.sibling.return = node.return;
|
|
5511
|
+
node = node.sibling;
|
|
5512
|
+
}
|
|
5694
5513
|
}
|
|
5695
|
-
function
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
current
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5514
|
+
updateHostContainer = function(current, workInProgress) {
|
|
5515
|
+
var portalOrRoot = workInProgress.stateNode;
|
|
5516
|
+
if (!hadNoMutationsEffects(current, workInProgress)) {
|
|
5517
|
+
current = portalOrRoot.containerInfo;
|
|
5518
|
+
var newChildSet = createChildNodeSet(current);
|
|
5519
|
+
appendAllChildrenToContainer(newChildSet, workInProgress, !1, !1);
|
|
5520
|
+
portalOrRoot.pendingChildren = newChildSet;
|
|
5521
|
+
workInProgress.flags |= 4;
|
|
5522
|
+
completeRoot(current, newChildSet);
|
|
5523
|
+
}
|
|
5524
|
+
};
|
|
5525
|
+
updateHostComponent$1 = function(current, workInProgress, type, newProps) {
|
|
5526
|
+
type = current.stateNode;
|
|
5527
|
+
var oldProps = current.memoizedProps;
|
|
5528
|
+
if (
|
|
5529
|
+
(current = hadNoMutationsEffects(current, workInProgress)) &&
|
|
5530
|
+
oldProps === newProps
|
|
5531
|
+
)
|
|
5532
|
+
workInProgress.stateNode = type;
|
|
5533
|
+
else {
|
|
5534
|
+
var recyclableInstance = workInProgress.stateNode;
|
|
5535
|
+
requiredContext(contextStackCursor$1.current);
|
|
5536
|
+
var updatePayload = null;
|
|
5537
|
+
oldProps !== newProps &&
|
|
5538
|
+
((oldProps = diffProperties(
|
|
5539
|
+
null,
|
|
5540
|
+
oldProps,
|
|
5541
|
+
newProps,
|
|
5542
|
+
recyclableInstance.canonical.viewConfig.validAttributes
|
|
5543
|
+
)),
|
|
5544
|
+
(recyclableInstance.canonical.currentProps = newProps),
|
|
5545
|
+
(updatePayload = oldProps));
|
|
5546
|
+
current && null === updatePayload
|
|
5547
|
+
? (workInProgress.stateNode = type)
|
|
5548
|
+
: ((newProps = updatePayload),
|
|
5549
|
+
(oldProps = type.node),
|
|
5550
|
+
(type = {
|
|
5551
|
+
node: current
|
|
5552
|
+
? null !== newProps
|
|
5553
|
+
? cloneNodeWithNewProps(oldProps, newProps)
|
|
5554
|
+
: cloneNode(oldProps)
|
|
5555
|
+
: null !== newProps
|
|
5556
|
+
? cloneNodeWithNewChildrenAndProps(oldProps, newProps)
|
|
5557
|
+
: cloneNodeWithNewChildren(oldProps),
|
|
5558
|
+
canonical: type.canonical
|
|
5559
|
+
}),
|
|
5560
|
+
(workInProgress.stateNode = type),
|
|
5561
|
+
current
|
|
5562
|
+
? (workInProgress.flags |= 4)
|
|
5563
|
+
: appendAllChildren(type, workInProgress, !1, !1));
|
|
5564
|
+
}
|
|
5565
|
+
};
|
|
5566
|
+
updateHostText$1 = function(current, workInProgress, oldText, newText) {
|
|
5567
|
+
oldText !== newText
|
|
5568
|
+
? ((current = requiredContext(rootInstanceStackCursor.current)),
|
|
5569
|
+
(oldText = requiredContext(contextStackCursor$1.current)),
|
|
5570
|
+
(workInProgress.stateNode = createTextInstance(
|
|
5571
|
+
newText,
|
|
5572
|
+
current,
|
|
5573
|
+
oldText,
|
|
5574
|
+
workInProgress
|
|
5575
|
+
)),
|
|
5576
|
+
(workInProgress.flags |= 4))
|
|
5577
|
+
: (workInProgress.stateNode = current.stateNode);
|
|
5578
|
+
};
|
|
5579
|
+
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
|
|
5580
|
+
switch (renderState.tailMode) {
|
|
5581
|
+
case "hidden":
|
|
5582
|
+
hasRenderedATailFallback = renderState.tail;
|
|
5583
|
+
for (var lastTailNode = null; null !== hasRenderedATailFallback; )
|
|
5584
|
+
null !== hasRenderedATailFallback.alternate &&
|
|
5585
|
+
(lastTailNode = hasRenderedATailFallback),
|
|
5586
|
+
(hasRenderedATailFallback = hasRenderedATailFallback.sibling);
|
|
5587
|
+
null === lastTailNode
|
|
5588
|
+
? (renderState.tail = null)
|
|
5589
|
+
: (lastTailNode.sibling = null);
|
|
5590
|
+
break;
|
|
5591
|
+
case "collapsed":
|
|
5592
|
+
lastTailNode = renderState.tail;
|
|
5593
|
+
for (var lastTailNode$63 = null; null !== lastTailNode; )
|
|
5594
|
+
null !== lastTailNode.alternate && (lastTailNode$63 = lastTailNode),
|
|
5595
|
+
(lastTailNode = lastTailNode.sibling);
|
|
5596
|
+
null === lastTailNode$63
|
|
5597
|
+
? hasRenderedATailFallback || null === renderState.tail
|
|
5598
|
+
? (renderState.tail = null)
|
|
5599
|
+
: (renderState.tail.sibling = null)
|
|
5600
|
+
: (lastTailNode$63.sibling = null);
|
|
5714
5601
|
}
|
|
5715
|
-
return workInProgress.child;
|
|
5716
5602
|
}
|
|
5717
|
-
function
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5603
|
+
function bubbleProperties(completedWork) {
|
|
5604
|
+
var didBailout =
|
|
5605
|
+
null !== completedWork.alternate &&
|
|
5606
|
+
completedWork.alternate.child === completedWork.child,
|
|
5607
|
+
newChildLanes = 0,
|
|
5608
|
+
subtreeFlags = 0;
|
|
5609
|
+
if (didBailout)
|
|
5610
|
+
if (0 !== (completedWork.mode & 2)) {
|
|
5611
|
+
for (
|
|
5612
|
+
var treeBaseDuration$65 = completedWork.selfBaseDuration,
|
|
5613
|
+
child$66 = completedWork.child;
|
|
5614
|
+
null !== child$66;
|
|
5615
|
+
|
|
5616
|
+
)
|
|
5617
|
+
(newChildLanes |= child$66.lanes | child$66.childLanes),
|
|
5618
|
+
(subtreeFlags |= child$66.subtreeFlags & 14680064),
|
|
5619
|
+
(subtreeFlags |= child$66.flags & 14680064),
|
|
5620
|
+
(treeBaseDuration$65 += child$66.treeBaseDuration),
|
|
5621
|
+
(child$66 = child$66.sibling);
|
|
5622
|
+
completedWork.treeBaseDuration = treeBaseDuration$65;
|
|
5623
|
+
} else
|
|
5624
|
+
for (
|
|
5625
|
+
treeBaseDuration$65 = completedWork.child;
|
|
5626
|
+
null !== treeBaseDuration$65;
|
|
5627
|
+
|
|
5628
|
+
)
|
|
5629
|
+
(newChildLanes |=
|
|
5630
|
+
treeBaseDuration$65.lanes | treeBaseDuration$65.childLanes),
|
|
5631
|
+
(subtreeFlags |= treeBaseDuration$65.subtreeFlags & 14680064),
|
|
5632
|
+
(subtreeFlags |= treeBaseDuration$65.flags & 14680064),
|
|
5633
|
+
(treeBaseDuration$65.return = completedWork),
|
|
5634
|
+
(treeBaseDuration$65 = treeBaseDuration$65.sibling);
|
|
5635
|
+
else if (0 !== (completedWork.mode & 2)) {
|
|
5636
|
+
treeBaseDuration$65 = completedWork.actualDuration;
|
|
5637
|
+
child$66 = completedWork.selfBaseDuration;
|
|
5638
|
+
for (var child = completedWork.child; null !== child; )
|
|
5639
|
+
(newChildLanes |= child.lanes | child.childLanes),
|
|
5640
|
+
(subtreeFlags |= child.subtreeFlags),
|
|
5641
|
+
(subtreeFlags |= child.flags),
|
|
5642
|
+
(treeBaseDuration$65 += child.actualDuration),
|
|
5643
|
+
(child$66 += child.treeBaseDuration),
|
|
5644
|
+
(child = child.sibling);
|
|
5645
|
+
completedWork.actualDuration = treeBaseDuration$65;
|
|
5646
|
+
completedWork.treeBaseDuration = child$66;
|
|
5647
|
+
} else
|
|
5648
|
+
for (
|
|
5649
|
+
treeBaseDuration$65 = completedWork.child;
|
|
5650
|
+
null !== treeBaseDuration$65;
|
|
5651
|
+
|
|
5652
|
+
)
|
|
5653
|
+
(newChildLanes |=
|
|
5654
|
+
treeBaseDuration$65.lanes | treeBaseDuration$65.childLanes),
|
|
5655
|
+
(subtreeFlags |= treeBaseDuration$65.subtreeFlags),
|
|
5656
|
+
(subtreeFlags |= treeBaseDuration$65.flags),
|
|
5657
|
+
(treeBaseDuration$65.return = completedWork),
|
|
5658
|
+
(treeBaseDuration$65 = treeBaseDuration$65.sibling);
|
|
5659
|
+
completedWork.subtreeFlags |= subtreeFlags;
|
|
5660
|
+
completedWork.childLanes = newChildLanes;
|
|
5661
|
+
return didBailout;
|
|
5662
|
+
}
|
|
5663
|
+
function completeWork(current, workInProgress, renderLanes) {
|
|
5664
|
+
var newProps = workInProgress.pendingProps;
|
|
5665
|
+
popTreeContext(workInProgress);
|
|
5722
5666
|
switch (workInProgress.tag) {
|
|
5667
|
+
case 2:
|
|
5668
|
+
case 16:
|
|
5669
|
+
case 15:
|
|
5670
|
+
case 0:
|
|
5671
|
+
case 11:
|
|
5672
|
+
case 7:
|
|
5673
|
+
case 8:
|
|
5674
|
+
case 12:
|
|
5675
|
+
case 9:
|
|
5676
|
+
case 14:
|
|
5677
|
+
return bubbleProperties(workInProgress), null;
|
|
5678
|
+
case 1:
|
|
5679
|
+
return (
|
|
5680
|
+
isContextProvider(workInProgress.type) && popContext(),
|
|
5681
|
+
bubbleProperties(workInProgress),
|
|
5682
|
+
null
|
|
5683
|
+
);
|
|
5723
5684
|
case 3:
|
|
5724
|
-
|
|
5725
|
-
|
|
5685
|
+
return (
|
|
5686
|
+
(renderLanes = workInProgress.stateNode),
|
|
5687
|
+
popHostContainer(),
|
|
5688
|
+
pop(didPerformWorkStackCursor),
|
|
5689
|
+
pop(contextStackCursor),
|
|
5690
|
+
resetWorkInProgressVersions(),
|
|
5691
|
+
renderLanes.pendingContext &&
|
|
5692
|
+
((renderLanes.context = renderLanes.pendingContext),
|
|
5693
|
+
(renderLanes.pendingContext = null)),
|
|
5694
|
+
(null !== current && null !== current.child) ||
|
|
5695
|
+
null === current ||
|
|
5696
|
+
(current.memoizedState.isDehydrated &&
|
|
5697
|
+
0 === (workInProgress.flags & 256)) ||
|
|
5698
|
+
((workInProgress.flags |= 1024),
|
|
5699
|
+
null !== hydrationErrors &&
|
|
5700
|
+
(queueRecoverableErrors(hydrationErrors),
|
|
5701
|
+
(hydrationErrors = null))),
|
|
5702
|
+
updateHostContainer(current, workInProgress),
|
|
5703
|
+
bubbleProperties(workInProgress),
|
|
5704
|
+
null
|
|
5705
|
+
);
|
|
5726
5706
|
case 5:
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
break;
|
|
5733
|
-
case 4:
|
|
5734
|
-
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
|
|
5735
|
-
break;
|
|
5736
|
-
case 10:
|
|
5737
|
-
var context = workInProgress.type._context,
|
|
5738
|
-
nextValue = workInProgress.memoizedProps.value;
|
|
5739
|
-
push(valueCursor, context._currentValue2);
|
|
5740
|
-
context._currentValue2 = nextValue;
|
|
5741
|
-
break;
|
|
5742
|
-
case 12:
|
|
5743
|
-
0 !== (renderLanes & workInProgress.childLanes) &&
|
|
5744
|
-
(workInProgress.flags |= 4);
|
|
5745
|
-
context = workInProgress.stateNode;
|
|
5746
|
-
context.effectDuration = 0;
|
|
5747
|
-
context.passiveEffectDuration = 0;
|
|
5748
|
-
break;
|
|
5749
|
-
case 13:
|
|
5750
|
-
if (null !== workInProgress.memoizedState) {
|
|
5751
|
-
if (0 !== (renderLanes & workInProgress.child.childLanes))
|
|
5752
|
-
return updateSuspenseComponent(current, workInProgress, renderLanes);
|
|
5753
|
-
push(suspenseStackCursor, suspenseStackCursor.current & 1);
|
|
5754
|
-
current = bailoutOnAlreadyFinishedWork(
|
|
5707
|
+
popHostContext(workInProgress);
|
|
5708
|
+
renderLanes = requiredContext(rootInstanceStackCursor.current);
|
|
5709
|
+
var type = workInProgress.type;
|
|
5710
|
+
if (null !== current && null != workInProgress.stateNode)
|
|
5711
|
+
updateHostComponent$1(
|
|
5755
5712
|
current,
|
|
5756
5713
|
workInProgress,
|
|
5714
|
+
type,
|
|
5715
|
+
newProps,
|
|
5757
5716
|
renderLanes
|
|
5717
|
+
),
|
|
5718
|
+
current.ref !== workInProgress.ref && (workInProgress.flags |= 512);
|
|
5719
|
+
else {
|
|
5720
|
+
if (!newProps) {
|
|
5721
|
+
if (null === workInProgress.stateNode)
|
|
5722
|
+
throw Error(
|
|
5723
|
+
"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
|
|
5724
|
+
);
|
|
5725
|
+
bubbleProperties(workInProgress);
|
|
5726
|
+
return null;
|
|
5727
|
+
}
|
|
5728
|
+
requiredContext(contextStackCursor$1.current);
|
|
5729
|
+
current = nextReactTag;
|
|
5730
|
+
nextReactTag += 2;
|
|
5731
|
+
type = getViewConfigForType(type);
|
|
5732
|
+
var updatePayload = diffProperties(
|
|
5733
|
+
null,
|
|
5734
|
+
emptyObject,
|
|
5735
|
+
newProps,
|
|
5736
|
+
type.validAttributes
|
|
5758
5737
|
);
|
|
5759
|
-
|
|
5738
|
+
renderLanes = createNode(
|
|
5739
|
+
current,
|
|
5740
|
+
type.uiViewClassName,
|
|
5741
|
+
renderLanes,
|
|
5742
|
+
updatePayload,
|
|
5743
|
+
workInProgress
|
|
5744
|
+
);
|
|
5745
|
+
current = new ReactFabricHostComponent(
|
|
5746
|
+
current,
|
|
5747
|
+
type,
|
|
5748
|
+
newProps,
|
|
5749
|
+
workInProgress
|
|
5750
|
+
);
|
|
5751
|
+
current = { node: renderLanes, canonical: current };
|
|
5752
|
+
appendAllChildren(current, workInProgress, !1, !1);
|
|
5753
|
+
workInProgress.stateNode = current;
|
|
5754
|
+
null !== workInProgress.ref && (workInProgress.flags |= 512);
|
|
5760
5755
|
}
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
case
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5756
|
+
bubbleProperties(workInProgress);
|
|
5757
|
+
return null;
|
|
5758
|
+
case 6:
|
|
5759
|
+
if (current && null != workInProgress.stateNode)
|
|
5760
|
+
updateHostText$1(
|
|
5761
|
+
current,
|
|
5762
|
+
workInProgress,
|
|
5763
|
+
current.memoizedProps,
|
|
5764
|
+
newProps
|
|
5765
|
+
);
|
|
5766
|
+
else {
|
|
5767
|
+
if ("string" !== typeof newProps && null === workInProgress.stateNode)
|
|
5768
|
+
throw Error(
|
|
5769
|
+
"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
|
|
5771
5770
|
);
|
|
5772
|
-
|
|
5771
|
+
current = requiredContext(rootInstanceStackCursor.current);
|
|
5772
|
+
renderLanes = requiredContext(contextStackCursor$1.current);
|
|
5773
|
+
workInProgress.stateNode = createTextInstance(
|
|
5774
|
+
newProps,
|
|
5775
|
+
current,
|
|
5776
|
+
renderLanes,
|
|
5777
|
+
workInProgress
|
|
5778
|
+
);
|
|
5779
|
+
}
|
|
5780
|
+
bubbleProperties(workInProgress);
|
|
5781
|
+
return null;
|
|
5782
|
+
case 13:
|
|
5783
|
+
pop(suspenseStackCursor);
|
|
5784
|
+
newProps = workInProgress.memoizedState;
|
|
5785
|
+
if (
|
|
5786
|
+
null === current ||
|
|
5787
|
+
(null !== current.memoizedState &&
|
|
5788
|
+
null !== current.memoizedState.dehydrated)
|
|
5789
|
+
) {
|
|
5790
|
+
if (null !== newProps && null !== newProps.dehydrated) {
|
|
5791
|
+
if (null === current) {
|
|
5792
|
+
throw Error(
|
|
5793
|
+
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
|
|
5794
|
+
);
|
|
5795
|
+
throw Error(
|
|
5796
|
+
"Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
|
|
5797
|
+
);
|
|
5798
|
+
}
|
|
5799
|
+
0 === (workInProgress.flags & 128) &&
|
|
5800
|
+
(workInProgress.memoizedState = null);
|
|
5801
|
+
workInProgress.flags |= 4;
|
|
5802
|
+
bubbleProperties(workInProgress);
|
|
5803
|
+
0 !== (workInProgress.mode & 2) &&
|
|
5804
|
+
null !== newProps &&
|
|
5805
|
+
((type = workInProgress.child),
|
|
5806
|
+
null !== type &&
|
|
5807
|
+
(workInProgress.treeBaseDuration -= type.treeBaseDuration));
|
|
5808
|
+
type = !1;
|
|
5809
|
+
} else
|
|
5810
|
+
null !== hydrationErrors &&
|
|
5811
|
+
(queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)),
|
|
5812
|
+
(type = !0);
|
|
5813
|
+
if (!type) return workInProgress.flags & 65536 ? workInProgress : null;
|
|
5814
|
+
}
|
|
5815
|
+
if (0 !== (workInProgress.flags & 128))
|
|
5816
|
+
return (
|
|
5817
|
+
(workInProgress.lanes = renderLanes),
|
|
5818
|
+
0 !== (workInProgress.mode & 2) &&
|
|
5819
|
+
transferActualDuration(workInProgress),
|
|
5820
|
+
workInProgress
|
|
5821
|
+
);
|
|
5822
|
+
renderLanes = null !== newProps;
|
|
5823
|
+
renderLanes !== (null !== current && null !== current.memoizedState) &&
|
|
5824
|
+
renderLanes &&
|
|
5825
|
+
((workInProgress.child.flags |= 8192),
|
|
5826
|
+
0 !== (workInProgress.mode & 1) &&
|
|
5827
|
+
(null === current || 0 !== (suspenseStackCursor.current & 1)
|
|
5828
|
+
? 0 === workInProgressRootExitStatus &&
|
|
5829
|
+
(workInProgressRootExitStatus = 3)
|
|
5830
|
+
: renderDidSuspendDelayIfPossible()));
|
|
5831
|
+
null !== workInProgress.updateQueue && (workInProgress.flags |= 4);
|
|
5832
|
+
bubbleProperties(workInProgress);
|
|
5833
|
+
0 !== (workInProgress.mode & 2) &&
|
|
5834
|
+
renderLanes &&
|
|
5835
|
+
((current = workInProgress.child),
|
|
5836
|
+
null !== current &&
|
|
5837
|
+
(workInProgress.treeBaseDuration -= current.treeBaseDuration));
|
|
5838
|
+
return null;
|
|
5839
|
+
case 4:
|
|
5840
|
+
return (
|
|
5841
|
+
popHostContainer(),
|
|
5842
|
+
updateHostContainer(current, workInProgress),
|
|
5843
|
+
bubbleProperties(workInProgress),
|
|
5844
|
+
null
|
|
5845
|
+
);
|
|
5846
|
+
case 10:
|
|
5847
|
+
return (
|
|
5848
|
+
popProvider(workInProgress.type._context),
|
|
5849
|
+
bubbleProperties(workInProgress),
|
|
5850
|
+
null
|
|
5851
|
+
);
|
|
5852
|
+
case 17:
|
|
5853
|
+
return (
|
|
5854
|
+
isContextProvider(workInProgress.type) && popContext(),
|
|
5855
|
+
bubbleProperties(workInProgress),
|
|
5856
|
+
null
|
|
5857
|
+
);
|
|
5858
|
+
case 19:
|
|
5859
|
+
pop(suspenseStackCursor);
|
|
5860
|
+
type = workInProgress.memoizedState;
|
|
5861
|
+
if (null === type) return bubbleProperties(workInProgress), null;
|
|
5862
|
+
newProps = 0 !== (workInProgress.flags & 128);
|
|
5863
|
+
updatePayload = type.rendering;
|
|
5864
|
+
if (null === updatePayload)
|
|
5865
|
+
if (newProps) cutOffTailIfNeeded(type, !1);
|
|
5866
|
+
else {
|
|
5867
|
+
if (
|
|
5868
|
+
0 !== workInProgressRootExitStatus ||
|
|
5869
|
+
(null !== current && 0 !== (current.flags & 128))
|
|
5870
|
+
)
|
|
5871
|
+
for (current = workInProgress.child; null !== current; ) {
|
|
5872
|
+
updatePayload = findFirstSuspended(current);
|
|
5873
|
+
if (null !== updatePayload) {
|
|
5874
|
+
workInProgress.flags |= 128;
|
|
5875
|
+
cutOffTailIfNeeded(type, !1);
|
|
5876
|
+
current = updatePayload.updateQueue;
|
|
5877
|
+
null !== current &&
|
|
5878
|
+
((workInProgress.updateQueue = current),
|
|
5879
|
+
(workInProgress.flags |= 4));
|
|
5880
|
+
workInProgress.subtreeFlags = 0;
|
|
5881
|
+
current = renderLanes;
|
|
5882
|
+
for (renderLanes = workInProgress.child; null !== renderLanes; )
|
|
5883
|
+
(newProps = renderLanes),
|
|
5884
|
+
(updatePayload = current),
|
|
5885
|
+
(newProps.flags &= 14680066),
|
|
5886
|
+
(type = newProps.alternate),
|
|
5887
|
+
null === type
|
|
5888
|
+
? ((newProps.childLanes = 0),
|
|
5889
|
+
(newProps.lanes = updatePayload),
|
|
5890
|
+
(newProps.child = null),
|
|
5891
|
+
(newProps.subtreeFlags = 0),
|
|
5892
|
+
(newProps.memoizedProps = null),
|
|
5893
|
+
(newProps.memoizedState = null),
|
|
5894
|
+
(newProps.updateQueue = null),
|
|
5895
|
+
(newProps.dependencies = null),
|
|
5896
|
+
(newProps.stateNode = null),
|
|
5897
|
+
(newProps.selfBaseDuration = 0),
|
|
5898
|
+
(newProps.treeBaseDuration = 0))
|
|
5899
|
+
: ((newProps.childLanes = type.childLanes),
|
|
5900
|
+
(newProps.lanes = type.lanes),
|
|
5901
|
+
(newProps.child = type.child),
|
|
5902
|
+
(newProps.subtreeFlags = 0),
|
|
5903
|
+
(newProps.deletions = null),
|
|
5904
|
+
(newProps.memoizedProps = type.memoizedProps),
|
|
5905
|
+
(newProps.memoizedState = type.memoizedState),
|
|
5906
|
+
(newProps.updateQueue = type.updateQueue),
|
|
5907
|
+
(newProps.type = type.type),
|
|
5908
|
+
(updatePayload = type.dependencies),
|
|
5909
|
+
(newProps.dependencies =
|
|
5910
|
+
null === updatePayload
|
|
5911
|
+
? null
|
|
5912
|
+
: {
|
|
5913
|
+
lanes: updatePayload.lanes,
|
|
5914
|
+
firstContext: updatePayload.firstContext
|
|
5915
|
+
}),
|
|
5916
|
+
(newProps.selfBaseDuration = type.selfBaseDuration),
|
|
5917
|
+
(newProps.treeBaseDuration = type.treeBaseDuration)),
|
|
5918
|
+
(renderLanes = renderLanes.sibling);
|
|
5919
|
+
push(
|
|
5920
|
+
suspenseStackCursor,
|
|
5921
|
+
(suspenseStackCursor.current & 1) | 2
|
|
5922
|
+
);
|
|
5923
|
+
return workInProgress.child;
|
|
5924
|
+
}
|
|
5925
|
+
current = current.sibling;
|
|
5926
|
+
}
|
|
5927
|
+
null !== type.tail &&
|
|
5928
|
+
now() > workInProgressRootRenderTargetTime &&
|
|
5929
|
+
((workInProgress.flags |= 128),
|
|
5930
|
+
(newProps = !0),
|
|
5931
|
+
cutOffTailIfNeeded(type, !1),
|
|
5932
|
+
(workInProgress.lanes = 4194304));
|
|
5933
|
+
}
|
|
5934
|
+
else {
|
|
5935
|
+
if (!newProps)
|
|
5936
|
+
if (
|
|
5937
|
+
((current = findFirstSuspended(updatePayload)), null !== current)
|
|
5938
|
+
) {
|
|
5939
|
+
if (
|
|
5940
|
+
((workInProgress.flags |= 128),
|
|
5941
|
+
(newProps = !0),
|
|
5942
|
+
(current = current.updateQueue),
|
|
5943
|
+
null !== current &&
|
|
5944
|
+
((workInProgress.updateQueue = current),
|
|
5945
|
+
(workInProgress.flags |= 4)),
|
|
5946
|
+
cutOffTailIfNeeded(type, !0),
|
|
5947
|
+
null === type.tail &&
|
|
5948
|
+
"hidden" === type.tailMode &&
|
|
5949
|
+
!updatePayload.alternate)
|
|
5950
|
+
)
|
|
5951
|
+
return bubbleProperties(workInProgress), null;
|
|
5952
|
+
} else
|
|
5953
|
+
2 * now() - type.renderingStartTime >
|
|
5954
|
+
workInProgressRootRenderTargetTime &&
|
|
5955
|
+
1073741824 !== renderLanes &&
|
|
5956
|
+
((workInProgress.flags |= 128),
|
|
5957
|
+
(newProps = !0),
|
|
5958
|
+
cutOffTailIfNeeded(type, !1),
|
|
5959
|
+
(workInProgress.lanes = 4194304));
|
|
5960
|
+
type.isBackwards
|
|
5961
|
+
? ((updatePayload.sibling = workInProgress.child),
|
|
5962
|
+
(workInProgress.child = updatePayload))
|
|
5963
|
+
: ((current = type.last),
|
|
5964
|
+
null !== current
|
|
5965
|
+
? (current.sibling = updatePayload)
|
|
5966
|
+
: (workInProgress.child = updatePayload),
|
|
5967
|
+
(type.last = updatePayload));
|
|
5773
5968
|
}
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5969
|
+
if (null !== type.tail)
|
|
5970
|
+
return (
|
|
5971
|
+
(workInProgress = type.tail),
|
|
5972
|
+
(type.rendering = workInProgress),
|
|
5973
|
+
(type.tail = workInProgress.sibling),
|
|
5974
|
+
(type.renderingStartTime = now()),
|
|
5975
|
+
(workInProgress.sibling = null),
|
|
5976
|
+
(current = suspenseStackCursor.current),
|
|
5977
|
+
push(suspenseStackCursor, newProps ? (current & 1) | 2 : current & 1),
|
|
5978
|
+
workInProgress
|
|
5979
|
+
);
|
|
5980
|
+
bubbleProperties(workInProgress);
|
|
5981
|
+
return null;
|
|
5782
5982
|
case 22:
|
|
5783
5983
|
case 23:
|
|
5784
5984
|
return (
|
|
5785
|
-
(
|
|
5786
|
-
|
|
5985
|
+
popRenderLanes(),
|
|
5986
|
+
(renderLanes = null !== workInProgress.memoizedState),
|
|
5987
|
+
null !== current &&
|
|
5988
|
+
(null !== current.memoizedState) !== renderLanes &&
|
|
5989
|
+
(workInProgress.flags |= 8192),
|
|
5990
|
+
renderLanes && 0 !== (workInProgress.mode & 1)
|
|
5991
|
+
? 0 !== (subtreeRenderLanes & 1073741824) &&
|
|
5992
|
+
bubbleProperties(workInProgress)
|
|
5993
|
+
: bubbleProperties(workInProgress),
|
|
5994
|
+
null
|
|
5787
5995
|
);
|
|
5996
|
+
case 24:
|
|
5997
|
+
return null;
|
|
5998
|
+
case 25:
|
|
5999
|
+
return null;
|
|
5788
6000
|
}
|
|
5789
|
-
|
|
6001
|
+
throw Error(
|
|
6002
|
+
"Unknown unit of work tag (" +
|
|
6003
|
+
workInProgress.tag +
|
|
6004
|
+
"). This error is likely caused by a bug in React. Please file an issue."
|
|
6005
|
+
);
|
|
5790
6006
|
}
|
|
5791
6007
|
function unwindWork(current, workInProgress) {
|
|
5792
6008
|
popTreeContext(workInProgress);
|
|
@@ -5816,16 +6032,23 @@ function unwindWork(current, workInProgress) {
|
|
|
5816
6032
|
case 5:
|
|
5817
6033
|
return popHostContext(workInProgress), null;
|
|
5818
6034
|
case 13:
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
current
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
6035
|
+
pop(suspenseStackCursor);
|
|
6036
|
+
current = workInProgress.memoizedState;
|
|
6037
|
+
if (
|
|
6038
|
+
null !== current &&
|
|
6039
|
+
null !== current.dehydrated &&
|
|
6040
|
+
null === workInProgress.alternate
|
|
6041
|
+
)
|
|
6042
|
+
throw Error(
|
|
6043
|
+
"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
|
|
6044
|
+
);
|
|
6045
|
+
current = workInProgress.flags;
|
|
6046
|
+
return current & 65536
|
|
6047
|
+
? ((workInProgress.flags = (current & -65537) | 128),
|
|
6048
|
+
0 !== (workInProgress.mode & 2) &&
|
|
6049
|
+
transferActualDuration(workInProgress),
|
|
6050
|
+
workInProgress)
|
|
6051
|
+
: null;
|
|
5829
6052
|
case 19:
|
|
5830
6053
|
return pop(suspenseStackCursor), null;
|
|
5831
6054
|
case 4:
|
|
@@ -5957,8 +6180,8 @@ function commitHookEffectListMount(flags, finishedWork) {
|
|
|
5957
6180
|
var effect = (finishedWork = finishedWork.next);
|
|
5958
6181
|
do {
|
|
5959
6182
|
if ((effect.tag & flags) === flags) {
|
|
5960
|
-
var create$
|
|
5961
|
-
effect.destroy = create$
|
|
6183
|
+
var create$81 = effect.create;
|
|
6184
|
+
effect.destroy = create$81();
|
|
5962
6185
|
}
|
|
5963
6186
|
effect = effect.next;
|
|
5964
6187
|
} while (effect !== finishedWork);
|
|
@@ -5980,48 +6203,129 @@ function detachFiberAfterEffects(fiber) {
|
|
|
5980
6203
|
fiber.stateNode = null;
|
|
5981
6204
|
fiber.updateQueue = null;
|
|
5982
6205
|
}
|
|
5983
|
-
function
|
|
5984
|
-
|
|
6206
|
+
function recursivelyTraverseDeletionEffects(
|
|
6207
|
+
finishedRoot,
|
|
6208
|
+
nearestMountedAncestor,
|
|
6209
|
+
parent
|
|
6210
|
+
) {
|
|
6211
|
+
for (parent = parent.child; null !== parent; )
|
|
6212
|
+
commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),
|
|
6213
|
+
(parent = parent.sibling);
|
|
6214
|
+
}
|
|
6215
|
+
function commitDeletionEffectsOnFiber(
|
|
6216
|
+
finishedRoot,
|
|
6217
|
+
nearestMountedAncestor,
|
|
6218
|
+
deletedFiber
|
|
6219
|
+
) {
|
|
6220
|
+
if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
|
|
6221
|
+
try {
|
|
6222
|
+
injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
|
|
6223
|
+
} catch (err) {}
|
|
6224
|
+
switch (deletedFiber.tag) {
|
|
6225
|
+
case 5:
|
|
6226
|
+
safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
|
6227
|
+
case 6:
|
|
6228
|
+
recursivelyTraverseDeletionEffects(
|
|
6229
|
+
finishedRoot,
|
|
6230
|
+
nearestMountedAncestor,
|
|
6231
|
+
deletedFiber
|
|
6232
|
+
);
|
|
6233
|
+
break;
|
|
6234
|
+
case 18:
|
|
6235
|
+
break;
|
|
6236
|
+
case 4:
|
|
6237
|
+
createChildNodeSet(deletedFiber.stateNode.containerInfo);
|
|
6238
|
+
recursivelyTraverseDeletionEffects(
|
|
6239
|
+
finishedRoot,
|
|
6240
|
+
nearestMountedAncestor,
|
|
6241
|
+
deletedFiber
|
|
6242
|
+
);
|
|
6243
|
+
break;
|
|
5985
6244
|
case 0:
|
|
5986
6245
|
case 11:
|
|
5987
6246
|
case 14:
|
|
5988
6247
|
case 15:
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
6248
|
+
var updateQueue = deletedFiber.updateQueue;
|
|
6249
|
+
if (
|
|
6250
|
+
null !== updateQueue &&
|
|
6251
|
+
((updateQueue = updateQueue.lastEffect), null !== updateQueue)
|
|
6252
|
+
) {
|
|
6253
|
+
var effect = (updateQueue = updateQueue.next);
|
|
6254
|
+
do {
|
|
6255
|
+
var _effect = effect,
|
|
6256
|
+
destroy = _effect.destroy;
|
|
6257
|
+
_effect = _effect.tag;
|
|
6258
|
+
void 0 !== destroy &&
|
|
6259
|
+
(0 !== (_effect & 2)
|
|
6260
|
+
? safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy)
|
|
6261
|
+
: 0 !== (_effect & 4) &&
|
|
6262
|
+
(deletedFiber.mode & 2
|
|
6263
|
+
? (startLayoutEffectTimer(),
|
|
6264
|
+
safelyCallDestroy(
|
|
6265
|
+
deletedFiber,
|
|
6266
|
+
nearestMountedAncestor,
|
|
6267
|
+
destroy
|
|
6268
|
+
),
|
|
6269
|
+
recordLayoutEffectDuration(deletedFiber))
|
|
6270
|
+
: safelyCallDestroy(
|
|
6271
|
+
deletedFiber,
|
|
6272
|
+
nearestMountedAncestor,
|
|
6273
|
+
destroy
|
|
6274
|
+
)));
|
|
6275
|
+
effect = effect.next;
|
|
6276
|
+
} while (effect !== updateQueue);
|
|
6277
|
+
}
|
|
6278
|
+
recursivelyTraverseDeletionEffects(
|
|
6279
|
+
finishedRoot,
|
|
6280
|
+
nearestMountedAncestor,
|
|
6281
|
+
deletedFiber
|
|
6282
|
+
);
|
|
6283
|
+
break;
|
|
6284
|
+
case 1:
|
|
6285
|
+
safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
|
6286
|
+
updateQueue = deletedFiber.stateNode;
|
|
6287
|
+
if ("function" === typeof updateQueue.componentWillUnmount)
|
|
5992
6288
|
try {
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
6289
|
+
if (
|
|
6290
|
+
((updateQueue.props = deletedFiber.memoizedProps),
|
|
6291
|
+
(updateQueue.state = deletedFiber.memoizedState),
|
|
6292
|
+
deletedFiber.mode & 2)
|
|
6293
|
+
)
|
|
6294
|
+
try {
|
|
6295
|
+
startLayoutEffectTimer(), updateQueue.componentWillUnmount();
|
|
6296
|
+
} finally {
|
|
6297
|
+
recordLayoutEffectDuration(deletedFiber);
|
|
6298
|
+
}
|
|
6299
|
+
else updateQueue.componentWillUnmount();
|
|
6300
|
+
} catch (error) {
|
|
6301
|
+
captureCommitPhaseError(deletedFiber, nearestMountedAncestor, error);
|
|
5997
6302
|
}
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6303
|
+
recursivelyTraverseDeletionEffects(
|
|
6304
|
+
finishedRoot,
|
|
6305
|
+
nearestMountedAncestor,
|
|
6306
|
+
deletedFiber
|
|
6307
|
+
);
|
|
6308
|
+
break;
|
|
6309
|
+
case 21:
|
|
6310
|
+
recursivelyTraverseDeletionEffects(
|
|
6311
|
+
finishedRoot,
|
|
6312
|
+
nearestMountedAncestor,
|
|
6313
|
+
deletedFiber
|
|
6314
|
+
);
|
|
6315
|
+
break;
|
|
6008
6316
|
case 22:
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
}
|
|
6022
|
-
throw Error(
|
|
6023
|
-
"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
|
|
6024
|
-
);
|
|
6317
|
+
recursivelyTraverseDeletionEffects(
|
|
6318
|
+
finishedRoot,
|
|
6319
|
+
nearestMountedAncestor,
|
|
6320
|
+
deletedFiber
|
|
6321
|
+
);
|
|
6322
|
+
break;
|
|
6323
|
+
default:
|
|
6324
|
+
recursivelyTraverseDeletionEffects(
|
|
6325
|
+
finishedRoot,
|
|
6326
|
+
nearestMountedAncestor,
|
|
6327
|
+
deletedFiber
|
|
6328
|
+
);
|
|
6025
6329
|
}
|
|
6026
6330
|
}
|
|
6027
6331
|
function attachSuspenseRetryListeners(finishedWork) {
|
|
@@ -6047,172 +6351,128 @@ function attachSuspenseRetryListeners(finishedWork) {
|
|
|
6047
6351
|
});
|
|
6048
6352
|
}
|
|
6049
6353
|
}
|
|
6050
|
-
function commitMutationEffects(root,
|
|
6354
|
+
function commitMutationEffects(root, finishedWork, committedLanes) {
|
|
6051
6355
|
inProgressLanes = committedLanes;
|
|
6052
6356
|
inProgressRoot = root;
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6357
|
+
commitMutationEffectsOnFiber(finishedWork, root);
|
|
6358
|
+
inProgressRoot = inProgressLanes = null;
|
|
6359
|
+
}
|
|
6360
|
+
function recursivelyTraverseMutationEffects(root, parentFiber) {
|
|
6361
|
+
var deletions = parentFiber.deletions;
|
|
6362
|
+
if (null !== deletions)
|
|
6363
|
+
for (var i = 0; i < deletions.length; i++) {
|
|
6364
|
+
var childToDelete = deletions[i];
|
|
6365
|
+
try {
|
|
6366
|
+
commitDeletionEffectsOnFiber(root, parentFiber, childToDelete);
|
|
6367
|
+
var alternate = childToDelete.alternate;
|
|
6368
|
+
null !== alternate && (alternate.return = null);
|
|
6369
|
+
childToDelete.return = null;
|
|
6370
|
+
} catch (error) {
|
|
6371
|
+
captureCommitPhaseError(childToDelete, parentFiber, error);
|
|
6372
|
+
}
|
|
6373
|
+
}
|
|
6374
|
+
if (parentFiber.subtreeFlags & 12854)
|
|
6375
|
+
for (parentFiber = parentFiber.child; null !== parentFiber; )
|
|
6376
|
+
commitMutationEffectsOnFiber(parentFiber, root),
|
|
6377
|
+
(parentFiber = parentFiber.sibling);
|
|
6378
|
+
}
|
|
6379
|
+
function commitMutationEffectsOnFiber(finishedWork, root) {
|
|
6380
|
+
var current = finishedWork.alternate,
|
|
6381
|
+
flags = finishedWork.flags;
|
|
6382
|
+
switch (finishedWork.tag) {
|
|
6383
|
+
case 0:
|
|
6384
|
+
case 11:
|
|
6385
|
+
case 14:
|
|
6386
|
+
case 15:
|
|
6387
|
+
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
6388
|
+
commitReconciliationEffects(finishedWork);
|
|
6389
|
+
if (flags & 4) {
|
|
6063
6390
|
try {
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
if (
|
|
6067
|
-
injectedHook &&
|
|
6068
|
-
"function" === typeof injectedHook.onCommitFiberUnmount
|
|
6069
|
-
)
|
|
6070
|
-
try {
|
|
6071
|
-
injectedHook.onCommitFiberUnmount(rendererID, current);
|
|
6072
|
-
} catch (err) {}
|
|
6073
|
-
switch (current.tag) {
|
|
6074
|
-
case 0:
|
|
6075
|
-
case 11:
|
|
6076
|
-
case 14:
|
|
6077
|
-
case 15:
|
|
6078
|
-
var updateQueue = current.updateQueue;
|
|
6079
|
-
if (null !== updateQueue) {
|
|
6080
|
-
var lastEffect = updateQueue.lastEffect;
|
|
6081
|
-
if (null !== lastEffect) {
|
|
6082
|
-
var firstEffect = lastEffect.next,
|
|
6083
|
-
effect = firstEffect;
|
|
6084
|
-
do {
|
|
6085
|
-
var _effect = effect,
|
|
6086
|
-
destroy = _effect.destroy,
|
|
6087
|
-
tag = _effect.tag;
|
|
6088
|
-
void 0 !== destroy &&
|
|
6089
|
-
(0 !== (tag & 2)
|
|
6090
|
-
? safelyCallDestroy(current, root, destroy)
|
|
6091
|
-
: 0 !== (tag & 4) &&
|
|
6092
|
-
(current.mode & 2
|
|
6093
|
-
? (startLayoutEffectTimer(),
|
|
6094
|
-
safelyCallDestroy(current, root, destroy),
|
|
6095
|
-
recordLayoutEffectDuration(current))
|
|
6096
|
-
: safelyCallDestroy(current, root, destroy)));
|
|
6097
|
-
effect = effect.next;
|
|
6098
|
-
} while (effect !== firstEffect);
|
|
6099
|
-
}
|
|
6100
|
-
}
|
|
6101
|
-
break;
|
|
6102
|
-
case 1:
|
|
6103
|
-
safelyDetachRef(current, root);
|
|
6104
|
-
var instance = current.stateNode;
|
|
6105
|
-
if ("function" === typeof instance.componentWillUnmount)
|
|
6106
|
-
try {
|
|
6107
|
-
if (
|
|
6108
|
-
((effect = current),
|
|
6109
|
-
(_effect = instance),
|
|
6110
|
-
(_effect.props = effect.memoizedProps),
|
|
6111
|
-
(_effect.state = effect.memoizedState),
|
|
6112
|
-
effect.mode & 2)
|
|
6113
|
-
)
|
|
6114
|
-
try {
|
|
6115
|
-
startLayoutEffectTimer(),
|
|
6116
|
-
_effect.componentWillUnmount();
|
|
6117
|
-
} finally {
|
|
6118
|
-
recordLayoutEffectDuration(effect);
|
|
6119
|
-
}
|
|
6120
|
-
else _effect.componentWillUnmount();
|
|
6121
|
-
} catch (error) {
|
|
6122
|
-
captureCommitPhaseError(current, root, error);
|
|
6123
|
-
}
|
|
6124
|
-
break;
|
|
6125
|
-
case 5:
|
|
6126
|
-
safelyDetachRef(current, root);
|
|
6127
|
-
break;
|
|
6128
|
-
case 4:
|
|
6129
|
-
createChildNodeSet(current.stateNode.containerInfo);
|
|
6130
|
-
}
|
|
6131
|
-
if (null !== node.child)
|
|
6132
|
-
(node.child.return = node), (node = node.child);
|
|
6133
|
-
else {
|
|
6134
|
-
if (node === childToDelete) break;
|
|
6135
|
-
for (; null === node.sibling; ) {
|
|
6136
|
-
if (null === node.return || node.return === childToDelete)
|
|
6137
|
-
break a;
|
|
6138
|
-
node = node.return;
|
|
6139
|
-
}
|
|
6140
|
-
node.sibling.return = node.return;
|
|
6141
|
-
node = node.sibling;
|
|
6142
|
-
}
|
|
6143
|
-
}
|
|
6144
|
-
var alternate = childToDelete.alternate;
|
|
6145
|
-
null !== alternate && (alternate.return = null);
|
|
6146
|
-
childToDelete.return = null;
|
|
6391
|
+
commitHookEffectListUnmount(3, finishedWork, finishedWork.return),
|
|
6392
|
+
commitHookEffectListMount(3, finishedWork);
|
|
6147
6393
|
} catch (error) {
|
|
6148
|
-
captureCommitPhaseError(
|
|
6394
|
+
captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
|
6149
6395
|
}
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
var current$jscomp$0 = root.alternate;
|
|
6161
|
-
if (null !== current$jscomp$0) {
|
|
6162
|
-
firstChild = current$jscomp$0;
|
|
6163
|
-
var currentRef = firstChild.ref;
|
|
6164
|
-
if (null !== currentRef)
|
|
6165
|
-
if ("function" === typeof currentRef)
|
|
6166
|
-
if (firstChild.mode & 2)
|
|
6167
|
-
try {
|
|
6168
|
-
startLayoutEffectTimer(), currentRef(null);
|
|
6169
|
-
} finally {
|
|
6170
|
-
recordLayoutEffectDuration(firstChild);
|
|
6171
|
-
}
|
|
6172
|
-
else currentRef(null);
|
|
6173
|
-
else currentRef.current = null;
|
|
6174
|
-
}
|
|
6396
|
+
if (finishedWork.mode & 2) {
|
|
6397
|
+
try {
|
|
6398
|
+
startLayoutEffectTimer(),
|
|
6399
|
+
commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
|
|
6400
|
+
} catch (error$87) {
|
|
6401
|
+
captureCommitPhaseError(
|
|
6402
|
+
finishedWork,
|
|
6403
|
+
finishedWork.return,
|
|
6404
|
+
error$87
|
|
6405
|
+
);
|
|
6175
6406
|
}
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
case 2:
|
|
6187
|
-
root.flags &= -3;
|
|
6188
|
-
break;
|
|
6189
|
-
case 6:
|
|
6190
|
-
root.flags &= -3;
|
|
6191
|
-
commitWork(root.alternate, root);
|
|
6192
|
-
break;
|
|
6193
|
-
case 4096:
|
|
6194
|
-
root.flags &= -4097;
|
|
6195
|
-
break;
|
|
6196
|
-
case 4100:
|
|
6197
|
-
root.flags &= -4097;
|
|
6198
|
-
commitWork(root.alternate, root);
|
|
6199
|
-
break;
|
|
6200
|
-
case 4:
|
|
6201
|
-
commitWork(root.alternate, root);
|
|
6407
|
+
recordLayoutEffectDuration(finishedWork);
|
|
6408
|
+
} else
|
|
6409
|
+
try {
|
|
6410
|
+
commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
|
|
6411
|
+
} catch (error$88) {
|
|
6412
|
+
captureCommitPhaseError(
|
|
6413
|
+
finishedWork,
|
|
6414
|
+
finishedWork.return,
|
|
6415
|
+
error$88
|
|
6416
|
+
);
|
|
6202
6417
|
}
|
|
6203
|
-
} catch (error) {
|
|
6204
|
-
captureCommitPhaseError(root, root.return, error);
|
|
6205
|
-
}
|
|
6206
|
-
firstChild = root.sibling;
|
|
6207
|
-
if (null !== firstChild) {
|
|
6208
|
-
firstChild.return = root.return;
|
|
6209
|
-
nextEffect = firstChild;
|
|
6210
|
-
break;
|
|
6211
|
-
}
|
|
6212
|
-
nextEffect = root.return;
|
|
6213
6418
|
}
|
|
6419
|
+
break;
|
|
6420
|
+
case 1:
|
|
6421
|
+
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
6422
|
+
commitReconciliationEffects(finishedWork);
|
|
6423
|
+
flags & 512 &&
|
|
6424
|
+
null !== current &&
|
|
6425
|
+
safelyDetachRef(current, current.return);
|
|
6426
|
+
break;
|
|
6427
|
+
case 5:
|
|
6428
|
+
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
6429
|
+
commitReconciliationEffects(finishedWork);
|
|
6430
|
+
flags & 512 &&
|
|
6431
|
+
null !== current &&
|
|
6432
|
+
safelyDetachRef(current, current.return);
|
|
6433
|
+
break;
|
|
6434
|
+
case 6:
|
|
6435
|
+
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
6436
|
+
commitReconciliationEffects(finishedWork);
|
|
6437
|
+
break;
|
|
6438
|
+
case 3:
|
|
6439
|
+
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
6440
|
+
commitReconciliationEffects(finishedWork);
|
|
6441
|
+
break;
|
|
6442
|
+
case 4:
|
|
6443
|
+
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
6444
|
+
commitReconciliationEffects(finishedWork);
|
|
6445
|
+
break;
|
|
6446
|
+
case 13:
|
|
6447
|
+
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
6448
|
+
commitReconciliationEffects(finishedWork);
|
|
6449
|
+
root = finishedWork.child;
|
|
6450
|
+
root.flags & 8192 &&
|
|
6451
|
+
null !== root.memoizedState &&
|
|
6452
|
+
(null === root.alternate || null === root.alternate.memoizedState) &&
|
|
6453
|
+
(globalMostRecentFallbackTime = now());
|
|
6454
|
+
flags & 4 && attachSuspenseRetryListeners(finishedWork);
|
|
6455
|
+
break;
|
|
6456
|
+
case 22:
|
|
6457
|
+
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
6458
|
+
commitReconciliationEffects(finishedWork);
|
|
6459
|
+
break;
|
|
6460
|
+
case 19:
|
|
6461
|
+
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
6462
|
+
commitReconciliationEffects(finishedWork);
|
|
6463
|
+
flags & 4 && attachSuspenseRetryListeners(finishedWork);
|
|
6464
|
+
break;
|
|
6465
|
+
case 21:
|
|
6466
|
+
break;
|
|
6467
|
+
default:
|
|
6468
|
+
recursivelyTraverseMutationEffects(root, finishedWork),
|
|
6469
|
+
commitReconciliationEffects(finishedWork);
|
|
6214
6470
|
}
|
|
6215
|
-
|
|
6471
|
+
}
|
|
6472
|
+
function commitReconciliationEffects(finishedWork) {
|
|
6473
|
+
var flags = finishedWork.flags;
|
|
6474
|
+
flags & 2 && (finishedWork.flags &= -3);
|
|
6475
|
+
flags & 4096 && (finishedWork.flags &= -4097);
|
|
6216
6476
|
}
|
|
6217
6477
|
function commitLayoutEffects(finishedWork, root, committedLanes) {
|
|
6218
6478
|
inProgressLanes = committedLanes;
|
|
@@ -6288,22 +6548,22 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
|
|
|
6288
6548
|
commitUpdateQueue(committedLanes, updateQueue, instance);
|
|
6289
6549
|
break;
|
|
6290
6550
|
case 3:
|
|
6291
|
-
var updateQueue$
|
|
6292
|
-
if (null !== updateQueue$
|
|
6293
|
-
var instance$
|
|
6551
|
+
var updateQueue$83 = committedLanes.updateQueue;
|
|
6552
|
+
if (null !== updateQueue$83) {
|
|
6553
|
+
var instance$84 = null;
|
|
6294
6554
|
if (null !== committedLanes.child)
|
|
6295
6555
|
switch (committedLanes.child.tag) {
|
|
6296
6556
|
case 5:
|
|
6297
|
-
instance$
|
|
6557
|
+
instance$84 =
|
|
6298
6558
|
committedLanes.child.stateNode.canonical;
|
|
6299
6559
|
break;
|
|
6300
6560
|
case 1:
|
|
6301
|
-
instance$
|
|
6561
|
+
instance$84 = committedLanes.child.stateNode;
|
|
6302
6562
|
}
|
|
6303
6563
|
commitUpdateQueue(
|
|
6304
6564
|
committedLanes,
|
|
6305
|
-
updateQueue$
|
|
6306
|
-
instance$
|
|
6565
|
+
updateQueue$83,
|
|
6566
|
+
instance$84
|
|
6307
6567
|
);
|
|
6308
6568
|
}
|
|
6309
6569
|
break;
|
|
@@ -6322,7 +6582,7 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
|
|
|
6322
6582
|
onCommit = _finishedWork$memoize2.onCommit,
|
|
6323
6583
|
onRender = _finishedWork$memoize2.onRender,
|
|
6324
6584
|
effectDuration = committedLanes.stateNode.effectDuration;
|
|
6325
|
-
instance$
|
|
6585
|
+
instance$84 = commitTime;
|
|
6326
6586
|
current = null === current ? "mount" : "update";
|
|
6327
6587
|
currentUpdateIsNested && (current = "nested-update");
|
|
6328
6588
|
"function" === typeof onRender &&
|
|
@@ -6332,14 +6592,14 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
|
|
|
6332
6592
|
committedLanes.actualDuration,
|
|
6333
6593
|
committedLanes.treeBaseDuration,
|
|
6334
6594
|
committedLanes.actualStartTime,
|
|
6335
|
-
instance$
|
|
6595
|
+
instance$84
|
|
6336
6596
|
);
|
|
6337
6597
|
"function" === typeof onCommit &&
|
|
6338
6598
|
onCommit(
|
|
6339
6599
|
committedLanes.memoizedProps.id,
|
|
6340
6600
|
current,
|
|
6341
6601
|
effectDuration,
|
|
6342
|
-
instance$
|
|
6602
|
+
instance$84
|
|
6343
6603
|
);
|
|
6344
6604
|
enqueuePendingPassiveProfilerEffect(committedLanes);
|
|
6345
6605
|
var parentFiber = committedLanes.return;
|
|
@@ -6362,6 +6622,7 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
|
|
|
6362
6622
|
case 21:
|
|
6363
6623
|
case 22:
|
|
6364
6624
|
case 23:
|
|
6625
|
+
case 25:
|
|
6365
6626
|
break;
|
|
6366
6627
|
default:
|
|
6367
6628
|
throw Error(
|
|
@@ -6369,27 +6630,27 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
|
|
|
6369
6630
|
);
|
|
6370
6631
|
}
|
|
6371
6632
|
if (committedLanes.flags & 512) {
|
|
6372
|
-
instance$
|
|
6633
|
+
instance$84 = void 0;
|
|
6373
6634
|
current = committedLanes;
|
|
6374
6635
|
var ref = current.ref;
|
|
6375
6636
|
if (null !== ref) {
|
|
6376
6637
|
var instance$jscomp$0 = current.stateNode;
|
|
6377
6638
|
switch (current.tag) {
|
|
6378
6639
|
case 5:
|
|
6379
|
-
instance$
|
|
6640
|
+
instance$84 = instance$jscomp$0.canonical;
|
|
6380
6641
|
break;
|
|
6381
6642
|
default:
|
|
6382
|
-
instance$
|
|
6643
|
+
instance$84 = instance$jscomp$0;
|
|
6383
6644
|
}
|
|
6384
6645
|
if ("function" === typeof ref)
|
|
6385
6646
|
if (current.mode & 2)
|
|
6386
6647
|
try {
|
|
6387
|
-
startLayoutEffectTimer(), ref(instance$
|
|
6648
|
+
startLayoutEffectTimer(), ref(instance$84);
|
|
6388
6649
|
} finally {
|
|
6389
6650
|
recordLayoutEffectDuration(current);
|
|
6390
6651
|
}
|
|
6391
|
-
else ref(instance$
|
|
6392
|
-
else ref.current = instance$
|
|
6652
|
+
else ref(instance$84);
|
|
6653
|
+
else ref.current = instance$84;
|
|
6393
6654
|
}
|
|
6394
6655
|
}
|
|
6395
6656
|
} catch (error) {
|
|
@@ -6404,10 +6665,10 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
|
|
|
6404
6665
|
nextEffect = null;
|
|
6405
6666
|
break;
|
|
6406
6667
|
}
|
|
6407
|
-
instance$
|
|
6408
|
-
if (null !== instance$
|
|
6409
|
-
instance$
|
|
6410
|
-
nextEffect = instance$
|
|
6668
|
+
instance$84 = committedLanes.sibling;
|
|
6669
|
+
if (null !== instance$84) {
|
|
6670
|
+
instance$84.return = committedLanes.return;
|
|
6671
|
+
nextEffect = instance$84;
|
|
6411
6672
|
break;
|
|
6412
6673
|
}
|
|
6413
6674
|
nextEffect = committedLanes.return;
|
|
@@ -6433,6 +6694,7 @@ var ceil = Math.ceil,
|
|
|
6433
6694
|
workInProgressRootRecoverableErrors = null,
|
|
6434
6695
|
globalMostRecentFallbackTime = 0,
|
|
6435
6696
|
workInProgressRootRenderTargetTime = Infinity,
|
|
6697
|
+
workInProgressTransitions = null,
|
|
6436
6698
|
hasUncaughtError = !1,
|
|
6437
6699
|
firstUncaughtError = null,
|
|
6438
6700
|
legacyErrorBoundariesThatAlreadyFailed = null,
|
|
@@ -6458,10 +6720,7 @@ function requestUpdateLane(fiber) {
|
|
|
6458
6720
|
if (null !== ReactCurrentBatchConfig.transition)
|
|
6459
6721
|
return (
|
|
6460
6722
|
0 === currentEventTransitionLane &&
|
|
6461
|
-
(
|
|
6462
|
-
(nextTransitionLane <<= 1),
|
|
6463
|
-
0 === (nextTransitionLane & 4194240) && (nextTransitionLane = 64),
|
|
6464
|
-
(currentEventTransitionLane = fiber)),
|
|
6723
|
+
(currentEventTransitionLane = claimNextTransitionLane()),
|
|
6465
6724
|
currentEventTransitionLane
|
|
6466
6725
|
);
|
|
6467
6726
|
fiber = currentUpdatePriority;
|
|
@@ -6518,6 +6777,13 @@ function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
|
|
|
6518
6777
|
(sourceFiber = sourceFiber.return);
|
|
6519
6778
|
return 3 === alternate.tag ? alternate.stateNode : null;
|
|
6520
6779
|
}
|
|
6780
|
+
function isInterleavedUpdate(fiber) {
|
|
6781
|
+
return (
|
|
6782
|
+
(null !== workInProgressRoot || null !== interleavedQueues) &&
|
|
6783
|
+
0 !== (fiber.mode & 1) &&
|
|
6784
|
+
0 === (executionContext & 2)
|
|
6785
|
+
);
|
|
6786
|
+
}
|
|
6521
6787
|
function ensureRootIsScheduled(root, currentTime) {
|
|
6522
6788
|
for (
|
|
6523
6789
|
var existingCallbackNode = root.callbackNode,
|
|
@@ -6621,6 +6887,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
|
|
6621
6887
|
memoizedUpdaters.clear());
|
|
6622
6888
|
movePendingFibersToMemoized(root, didTimeout);
|
|
6623
6889
|
}
|
|
6890
|
+
workInProgressTransitions = null;
|
|
6624
6891
|
workInProgressRootRenderTargetTime = now() + 500;
|
|
6625
6892
|
prepareFreshStack(root, didTimeout);
|
|
6626
6893
|
}
|
|
@@ -6679,7 +6946,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
|
|
6679
6946
|
case 1:
|
|
6680
6947
|
throw Error("Root did not complete. This is a bug in React.");
|
|
6681
6948
|
case 2:
|
|
6682
|
-
commitRoot(
|
|
6949
|
+
commitRoot(
|
|
6950
|
+
root,
|
|
6951
|
+
workInProgressRootRecoverableErrors,
|
|
6952
|
+
workInProgressTransitions
|
|
6953
|
+
);
|
|
6683
6954
|
break;
|
|
6684
6955
|
case 3:
|
|
6685
6956
|
markRootSuspended$1(root, lanes);
|
|
@@ -6696,12 +6967,21 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
|
|
6696
6967
|
break;
|
|
6697
6968
|
}
|
|
6698
6969
|
root.timeoutHandle = scheduleTimeout(
|
|
6699
|
-
commitRoot.bind(
|
|
6970
|
+
commitRoot.bind(
|
|
6971
|
+
null,
|
|
6972
|
+
root,
|
|
6973
|
+
workInProgressRootRecoverableErrors,
|
|
6974
|
+
workInProgressTransitions
|
|
6975
|
+
),
|
|
6700
6976
|
didTimeout
|
|
6701
6977
|
);
|
|
6702
6978
|
break;
|
|
6703
6979
|
}
|
|
6704
|
-
commitRoot(
|
|
6980
|
+
commitRoot(
|
|
6981
|
+
root,
|
|
6982
|
+
workInProgressRootRecoverableErrors,
|
|
6983
|
+
workInProgressTransitions
|
|
6984
|
+
);
|
|
6705
6985
|
break;
|
|
6706
6986
|
case 4:
|
|
6707
6987
|
markRootSuspended$1(root, lanes);
|
|
@@ -6732,15 +7012,28 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
|
|
6732
7012
|
: 1960 * ceil(lanes / 1960)) - lanes;
|
|
6733
7013
|
if (10 < lanes) {
|
|
6734
7014
|
root.timeoutHandle = scheduleTimeout(
|
|
6735
|
-
commitRoot.bind(
|
|
7015
|
+
commitRoot.bind(
|
|
7016
|
+
null,
|
|
7017
|
+
root,
|
|
7018
|
+
workInProgressRootRecoverableErrors,
|
|
7019
|
+
workInProgressTransitions
|
|
7020
|
+
),
|
|
6736
7021
|
lanes
|
|
6737
7022
|
);
|
|
6738
7023
|
break;
|
|
6739
7024
|
}
|
|
6740
|
-
commitRoot(
|
|
7025
|
+
commitRoot(
|
|
7026
|
+
root,
|
|
7027
|
+
workInProgressRootRecoverableErrors,
|
|
7028
|
+
workInProgressTransitions
|
|
7029
|
+
);
|
|
6741
7030
|
break;
|
|
6742
7031
|
case 5:
|
|
6743
|
-
commitRoot(
|
|
7032
|
+
commitRoot(
|
|
7033
|
+
root,
|
|
7034
|
+
workInProgressRootRecoverableErrors,
|
|
7035
|
+
workInProgressTransitions
|
|
7036
|
+
);
|
|
6744
7037
|
break;
|
|
6745
7038
|
default:
|
|
6746
7039
|
throw Error("Unknown root exit status.");
|
|
@@ -6760,15 +7053,17 @@ function recoverFromConcurrentError(root, errorRetryLanes) {
|
|
|
6760
7053
|
2 !== root &&
|
|
6761
7054
|
((errorRetryLanes = workInProgressRootRecoverableErrors),
|
|
6762
7055
|
(workInProgressRootRecoverableErrors = errorsFromFirstAttempt),
|
|
6763
|
-
null !== errorRetryLanes &&
|
|
6764
|
-
(null === workInProgressRootRecoverableErrors
|
|
6765
|
-
? (workInProgressRootRecoverableErrors = errorRetryLanes)
|
|
6766
|
-
: workInProgressRootRecoverableErrors.push.apply(
|
|
6767
|
-
workInProgressRootRecoverableErrors,
|
|
6768
|
-
errorRetryLanes
|
|
6769
|
-
)));
|
|
7056
|
+
null !== errorRetryLanes && queueRecoverableErrors(errorRetryLanes));
|
|
6770
7057
|
return root;
|
|
6771
7058
|
}
|
|
7059
|
+
function queueRecoverableErrors(errors) {
|
|
7060
|
+
null === workInProgressRootRecoverableErrors
|
|
7061
|
+
? (workInProgressRootRecoverableErrors = errors)
|
|
7062
|
+
: workInProgressRootRecoverableErrors.push.apply(
|
|
7063
|
+
workInProgressRootRecoverableErrors,
|
|
7064
|
+
errors
|
|
7065
|
+
);
|
|
7066
|
+
}
|
|
6772
7067
|
function isRenderConsistentWithExternalStores(finishedWork) {
|
|
6773
7068
|
for (var node = finishedWork; ; ) {
|
|
6774
7069
|
if (node.flags & 16384) {
|
|
@@ -6840,7 +7135,11 @@ function performSyncWorkOnRoot(root) {
|
|
|
6840
7135
|
throw Error("Root did not complete. This is a bug in React.");
|
|
6841
7136
|
root.finishedWork = root.current.alternate;
|
|
6842
7137
|
root.finishedLanes = lanes;
|
|
6843
|
-
commitRoot(
|
|
7138
|
+
commitRoot(
|
|
7139
|
+
root,
|
|
7140
|
+
workInProgressRootRecoverableErrors,
|
|
7141
|
+
workInProgressTransitions
|
|
7142
|
+
);
|
|
6844
7143
|
ensureRootIsScheduled(root, now());
|
|
6845
7144
|
return null;
|
|
6846
7145
|
}
|
|
@@ -7079,12 +7378,12 @@ function handleError(root$jscomp$0, thrownValue) {
|
|
|
7079
7378
|
root.flags |= 65536;
|
|
7080
7379
|
thrownValue &= -thrownValue;
|
|
7081
7380
|
root.lanes |= thrownValue;
|
|
7082
|
-
var update$
|
|
7381
|
+
var update$34 = createClassErrorUpdate(
|
|
7083
7382
|
root,
|
|
7084
7383
|
wakeable,
|
|
7085
7384
|
thrownValue
|
|
7086
7385
|
);
|
|
7087
|
-
enqueueCapturedUpdate(root, update$
|
|
7386
|
+
enqueueCapturedUpdate(root, update$34);
|
|
7088
7387
|
break a;
|
|
7089
7388
|
}
|
|
7090
7389
|
}
|
|
@@ -7131,6 +7430,7 @@ function renderRootSync(root, lanes) {
|
|
|
7131
7430
|
memoizedUpdaters.clear());
|
|
7132
7431
|
movePendingFibersToMemoized(root, lanes);
|
|
7133
7432
|
}
|
|
7433
|
+
workInProgressTransitions = null;
|
|
7134
7434
|
prepareFreshStack(root, lanes);
|
|
7135
7435
|
}
|
|
7136
7436
|
do
|
|
@@ -7225,50 +7525,60 @@ function completeUnitOfWork(unitOfWork) {
|
|
|
7225
7525
|
} while (null !== completedWork);
|
|
7226
7526
|
0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
|
|
7227
7527
|
}
|
|
7228
|
-
function commitRoot(root, recoverableErrors) {
|
|
7528
|
+
function commitRoot(root, recoverableErrors, transitions) {
|
|
7229
7529
|
var previousUpdateLanePriority = currentUpdatePriority,
|
|
7230
7530
|
prevTransition = ReactCurrentBatchConfig$2.transition;
|
|
7231
7531
|
try {
|
|
7232
7532
|
(ReactCurrentBatchConfig$2.transition = null),
|
|
7233
7533
|
(currentUpdatePriority = 1),
|
|
7234
|
-
commitRootImpl(
|
|
7534
|
+
commitRootImpl(
|
|
7535
|
+
root,
|
|
7536
|
+
recoverableErrors,
|
|
7537
|
+
transitions,
|
|
7538
|
+
previousUpdateLanePriority
|
|
7539
|
+
);
|
|
7235
7540
|
} finally {
|
|
7236
7541
|
(ReactCurrentBatchConfig$2.transition = prevTransition),
|
|
7237
7542
|
(currentUpdatePriority = previousUpdateLanePriority);
|
|
7238
7543
|
}
|
|
7239
7544
|
return null;
|
|
7240
7545
|
}
|
|
7241
|
-
function commitRootImpl(
|
|
7546
|
+
function commitRootImpl(
|
|
7547
|
+
root,
|
|
7548
|
+
recoverableErrors,
|
|
7549
|
+
transitions,
|
|
7550
|
+
renderPriorityLevel
|
|
7551
|
+
) {
|
|
7242
7552
|
do flushPassiveEffects();
|
|
7243
7553
|
while (null !== rootWithPendingPassiveEffects);
|
|
7244
7554
|
if (0 !== (executionContext & 6))
|
|
7245
7555
|
throw Error("Should not already be working.");
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
if (null ===
|
|
7556
|
+
transitions = root.finishedWork;
|
|
7557
|
+
var lanes = root.finishedLanes;
|
|
7558
|
+
if (null === transitions) return null;
|
|
7249
7559
|
root.finishedWork = null;
|
|
7250
7560
|
root.finishedLanes = 0;
|
|
7251
|
-
if (
|
|
7561
|
+
if (transitions === root.current)
|
|
7252
7562
|
throw Error(
|
|
7253
7563
|
"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
|
|
7254
7564
|
);
|
|
7255
7565
|
root.callbackNode = null;
|
|
7256
7566
|
root.callbackPriority = 0;
|
|
7257
|
-
var remainingLanes =
|
|
7567
|
+
var remainingLanes = transitions.lanes | transitions.childLanes;
|
|
7258
7568
|
markRootFinished(root, remainingLanes);
|
|
7259
7569
|
root === workInProgressRoot &&
|
|
7260
7570
|
((workInProgress = workInProgressRoot = null),
|
|
7261
7571
|
(workInProgressRootRenderLanes = 0));
|
|
7262
|
-
(0 === (
|
|
7263
|
-
0 === (
|
|
7572
|
+
(0 === (transitions.subtreeFlags & 2064) &&
|
|
7573
|
+
0 === (transitions.flags & 2064)) ||
|
|
7264
7574
|
rootDoesHavePassiveEffects ||
|
|
7265
7575
|
((rootDoesHavePassiveEffects = !0),
|
|
7266
7576
|
scheduleCallback$1(NormalPriority, function() {
|
|
7267
7577
|
flushPassiveEffects();
|
|
7268
7578
|
return null;
|
|
7269
7579
|
}));
|
|
7270
|
-
remainingLanes = 0 !== (
|
|
7271
|
-
if (0 !== (
|
|
7580
|
+
remainingLanes = 0 !== (transitions.flags & 15990);
|
|
7581
|
+
if (0 !== (transitions.subtreeFlags & 15990) || remainingLanes) {
|
|
7272
7582
|
remainingLanes = ReactCurrentBatchConfig$2.transition;
|
|
7273
7583
|
ReactCurrentBatchConfig$2.transition = null;
|
|
7274
7584
|
var previousPriority = currentUpdatePriority;
|
|
@@ -7276,32 +7586,32 @@ function commitRootImpl(root, recoverableErrors, renderPriorityLevel) {
|
|
|
7276
7586
|
var prevExecutionContext = executionContext;
|
|
7277
7587
|
executionContext |= 4;
|
|
7278
7588
|
ReactCurrentOwner$2.current = null;
|
|
7279
|
-
commitBeforeMutationEffects(root,
|
|
7589
|
+
commitBeforeMutationEffects(root, transitions);
|
|
7280
7590
|
commitTime = now$1();
|
|
7281
|
-
commitMutationEffects(root,
|
|
7282
|
-
root.current =
|
|
7283
|
-
commitLayoutEffects(
|
|
7591
|
+
commitMutationEffects(root, transitions, lanes);
|
|
7592
|
+
root.current = transitions;
|
|
7593
|
+
commitLayoutEffects(transitions, root, lanes);
|
|
7284
7594
|
requestPaint();
|
|
7285
7595
|
executionContext = prevExecutionContext;
|
|
7286
7596
|
currentUpdatePriority = previousPriority;
|
|
7287
7597
|
ReactCurrentBatchConfig$2.transition = remainingLanes;
|
|
7288
|
-
} else (root.current =
|
|
7598
|
+
} else (root.current = transitions), (commitTime = now$1());
|
|
7289
7599
|
rootDoesHavePassiveEffects &&
|
|
7290
7600
|
((rootDoesHavePassiveEffects = !1),
|
|
7291
7601
|
(rootWithPendingPassiveEffects = root),
|
|
7292
7602
|
(pendingPassiveEffectsLanes = lanes));
|
|
7293
7603
|
remainingLanes = root.pendingLanes;
|
|
7294
7604
|
0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
|
|
7295
|
-
onCommitRoot(
|
|
7605
|
+
onCommitRoot(transitions.stateNode, renderPriorityLevel);
|
|
7296
7606
|
isDevToolsPresent && root.memoizedUpdaters.clear();
|
|
7297
7607
|
ensureRootIsScheduled(root, now());
|
|
7298
7608
|
if (null !== recoverableErrors)
|
|
7299
7609
|
for (
|
|
7300
|
-
renderPriorityLevel = root.onRecoverableError,
|
|
7301
|
-
|
|
7302
|
-
|
|
7610
|
+
renderPriorityLevel = root.onRecoverableError, transitions = 0;
|
|
7611
|
+
transitions < recoverableErrors.length;
|
|
7612
|
+
transitions++
|
|
7303
7613
|
)
|
|
7304
|
-
renderPriorityLevel(recoverableErrors[
|
|
7614
|
+
renderPriorityLevel(recoverableErrors[transitions]);
|
|
7305
7615
|
if (hasUncaughtError)
|
|
7306
7616
|
throw ((hasUncaughtError = !1),
|
|
7307
7617
|
(root = firstUncaughtError),
|
|
@@ -7602,21 +7912,43 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) {
|
|
|
7602
7912
|
: (workInProgressRootPingedLanes |= pingedLanes));
|
|
7603
7913
|
ensureRootIsScheduled(root, wakeable);
|
|
7604
7914
|
}
|
|
7605
|
-
function
|
|
7606
|
-
|
|
7607
|
-
null !== retryCache && retryCache.delete(wakeable);
|
|
7608
|
-
wakeable = 0;
|
|
7609
|
-
0 === wakeable &&
|
|
7915
|
+
function retryTimedOutBoundary(boundaryFiber, retryLane) {
|
|
7916
|
+
0 === retryLane &&
|
|
7610
7917
|
(0 === (boundaryFiber.mode & 1)
|
|
7611
|
-
? (
|
|
7612
|
-
: ((
|
|
7918
|
+
? (retryLane = 1)
|
|
7919
|
+
: ((retryLane = nextRetryLane),
|
|
7613
7920
|
(nextRetryLane <<= 1),
|
|
7614
7921
|
0 === (nextRetryLane & 130023424) && (nextRetryLane = 4194304)));
|
|
7615
|
-
|
|
7616
|
-
boundaryFiber = markUpdateLaneFromFiberToRoot(boundaryFiber,
|
|
7922
|
+
var eventTime = requestEventTime();
|
|
7923
|
+
boundaryFiber = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);
|
|
7617
7924
|
null !== boundaryFiber &&
|
|
7618
|
-
(markRootUpdated(boundaryFiber,
|
|
7619
|
-
ensureRootIsScheduled(boundaryFiber,
|
|
7925
|
+
(markRootUpdated(boundaryFiber, retryLane, eventTime),
|
|
7926
|
+
ensureRootIsScheduled(boundaryFiber, eventTime));
|
|
7927
|
+
}
|
|
7928
|
+
function retryDehydratedSuspenseBoundary(boundaryFiber) {
|
|
7929
|
+
var suspenseState = boundaryFiber.memoizedState,
|
|
7930
|
+
retryLane = 0;
|
|
7931
|
+
null !== suspenseState && (retryLane = suspenseState.retryLane);
|
|
7932
|
+
retryTimedOutBoundary(boundaryFiber, retryLane);
|
|
7933
|
+
}
|
|
7934
|
+
function resolveRetryWakeable(boundaryFiber, wakeable) {
|
|
7935
|
+
var retryLane = 0;
|
|
7936
|
+
switch (boundaryFiber.tag) {
|
|
7937
|
+
case 13:
|
|
7938
|
+
var retryCache = boundaryFiber.stateNode;
|
|
7939
|
+
var suspenseState = boundaryFiber.memoizedState;
|
|
7940
|
+
null !== suspenseState && (retryLane = suspenseState.retryLane);
|
|
7941
|
+
break;
|
|
7942
|
+
case 19:
|
|
7943
|
+
retryCache = boundaryFiber.stateNode;
|
|
7944
|
+
break;
|
|
7945
|
+
default:
|
|
7946
|
+
throw Error(
|
|
7947
|
+
"Pinged unknown suspense boundary type. This is probably a bug in React."
|
|
7948
|
+
);
|
|
7949
|
+
}
|
|
7950
|
+
null !== retryCache && retryCache.delete(wakeable);
|
|
7951
|
+
retryTimedOutBoundary(boundaryFiber, retryLane);
|
|
7620
7952
|
}
|
|
7621
7953
|
var beginWork$1;
|
|
7622
7954
|
beginWork$1 = function(current, workInProgress, renderLanes) {
|
|
@@ -7646,10 +7978,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
|
|
|
7646
7978
|
switch (workInProgress.tag) {
|
|
7647
7979
|
case 2:
|
|
7648
7980
|
var Component = workInProgress.type;
|
|
7649
|
-
|
|
7650
|
-
((current.alternate = null),
|
|
7651
|
-
(workInProgress.alternate = null),
|
|
7652
|
-
(workInProgress.flags |= 2));
|
|
7981
|
+
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
|
|
7653
7982
|
current = workInProgress.pendingProps;
|
|
7654
7983
|
var context = getMaskedContext(
|
|
7655
7984
|
workInProgress,
|
|
@@ -7703,10 +8032,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
|
|
|
7703
8032
|
case 16:
|
|
7704
8033
|
Component = workInProgress.elementType;
|
|
7705
8034
|
a: {
|
|
7706
|
-
|
|
7707
|
-
((current.alternate = null),
|
|
7708
|
-
(workInProgress.alternate = null),
|
|
7709
|
-
(workInProgress.flags |= 2));
|
|
8035
|
+
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
|
|
7710
8036
|
current = workInProgress.pendingProps;
|
|
7711
8037
|
context = Component._init;
|
|
7712
8038
|
Component = context(Component._payload);
|
|
@@ -7812,7 +8138,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
|
|
|
7812
8138
|
return (
|
|
7813
8139
|
pushHostContext(workInProgress),
|
|
7814
8140
|
(Component = workInProgress.pendingProps.children),
|
|
7815
|
-
markRef
|
|
8141
|
+
markRef(current, workInProgress),
|
|
7816
8142
|
reconcileChildren(current, workInProgress, Component, renderLanes),
|
|
7817
8143
|
workInProgress.child
|
|
7818
8144
|
);
|
|
@@ -7910,24 +8236,24 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
|
|
|
7910
8236
|
}
|
|
7911
8237
|
} else
|
|
7912
8238
|
for (
|
|
7913
|
-
|
|
7914
|
-
null !==
|
|
7915
|
-
null !==
|
|
8239
|
+
hasContext = workInProgress.child,
|
|
8240
|
+
null !== hasContext && (hasContext.return = workInProgress);
|
|
8241
|
+
null !== hasContext;
|
|
7916
8242
|
|
|
7917
8243
|
) {
|
|
7918
|
-
var list =
|
|
8244
|
+
var list = hasContext.dependencies;
|
|
7919
8245
|
if (null !== list) {
|
|
7920
|
-
|
|
8246
|
+
newValue = hasContext.child;
|
|
7921
8247
|
for (
|
|
7922
8248
|
var dependency = list.firstContext;
|
|
7923
8249
|
null !== dependency;
|
|
7924
8250
|
|
|
7925
8251
|
) {
|
|
7926
8252
|
if (dependency.context === Component) {
|
|
7927
|
-
if (1 ===
|
|
8253
|
+
if (1 === hasContext.tag) {
|
|
7928
8254
|
dependency = createUpdate(-1, renderLanes & -renderLanes);
|
|
7929
8255
|
dependency.tag = 2;
|
|
7930
|
-
var updateQueue =
|
|
8256
|
+
var updateQueue = hasContext.updateQueue;
|
|
7931
8257
|
if (null !== updateQueue) {
|
|
7932
8258
|
updateQueue = updateQueue.shared;
|
|
7933
8259
|
var pending = updateQueue.pending;
|
|
@@ -7938,11 +8264,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
|
|
|
7938
8264
|
updateQueue.pending = dependency;
|
|
7939
8265
|
}
|
|
7940
8266
|
}
|
|
7941
|
-
|
|
7942
|
-
dependency =
|
|
8267
|
+
hasContext.lanes |= renderLanes;
|
|
8268
|
+
dependency = hasContext.alternate;
|
|
7943
8269
|
null !== dependency && (dependency.lanes |= renderLanes);
|
|
7944
8270
|
scheduleContextWorkOnParentPath(
|
|
7945
|
-
|
|
8271
|
+
hasContext.return,
|
|
7946
8272
|
renderLanes,
|
|
7947
8273
|
workInProgress
|
|
7948
8274
|
);
|
|
@@ -7951,29 +8277,43 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
|
|
|
7951
8277
|
}
|
|
7952
8278
|
dependency = dependency.next;
|
|
7953
8279
|
}
|
|
7954
|
-
} else
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
?
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
8280
|
+
} else if (10 === hasContext.tag)
|
|
8281
|
+
newValue =
|
|
8282
|
+
hasContext.type === workInProgress.type
|
|
8283
|
+
? null
|
|
8284
|
+
: hasContext.child;
|
|
8285
|
+
else if (18 === hasContext.tag) {
|
|
8286
|
+
newValue = hasContext.return;
|
|
8287
|
+
if (null === newValue)
|
|
8288
|
+
throw Error(
|
|
8289
|
+
"We just came from a parent so we must have had a parent. This is a bug in React."
|
|
8290
|
+
);
|
|
8291
|
+
newValue.lanes |= renderLanes;
|
|
8292
|
+
list = newValue.alternate;
|
|
8293
|
+
null !== list && (list.lanes |= renderLanes);
|
|
8294
|
+
scheduleContextWorkOnParentPath(
|
|
8295
|
+
newValue,
|
|
8296
|
+
renderLanes,
|
|
8297
|
+
workInProgress
|
|
8298
|
+
);
|
|
8299
|
+
newValue = hasContext.sibling;
|
|
8300
|
+
} else newValue = hasContext.child;
|
|
8301
|
+
if (null !== newValue) newValue.return = hasContext;
|
|
7962
8302
|
else
|
|
7963
|
-
for (
|
|
7964
|
-
if (
|
|
7965
|
-
|
|
8303
|
+
for (newValue = hasContext; null !== newValue; ) {
|
|
8304
|
+
if (newValue === workInProgress) {
|
|
8305
|
+
newValue = null;
|
|
7966
8306
|
break;
|
|
7967
8307
|
}
|
|
7968
|
-
|
|
7969
|
-
if (null !==
|
|
7970
|
-
|
|
7971
|
-
|
|
8308
|
+
hasContext = newValue.sibling;
|
|
8309
|
+
if (null !== hasContext) {
|
|
8310
|
+
hasContext.return = newValue.return;
|
|
8311
|
+
newValue = hasContext;
|
|
7972
8312
|
break;
|
|
7973
8313
|
}
|
|
7974
|
-
|
|
8314
|
+
newValue = newValue.return;
|
|
7975
8315
|
}
|
|
7976
|
-
|
|
8316
|
+
hasContext = newValue;
|
|
7977
8317
|
}
|
|
7978
8318
|
reconcileChildren(
|
|
7979
8319
|
current,
|
|
@@ -8024,10 +8364,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
|
|
|
8024
8364
|
workInProgress.elementType === Component
|
|
8025
8365
|
? context
|
|
8026
8366
|
: resolveDefaultProps(Component, context)),
|
|
8027
|
-
|
|
8028
|
-
((current.alternate = null),
|
|
8029
|
-
(workInProgress.alternate = null),
|
|
8030
|
-
(workInProgress.flags |= 2)),
|
|
8367
|
+
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
|
|
8031
8368
|
(workInProgress.tag = 1),
|
|
8032
8369
|
isContextProvider(Component)
|
|
8033
8370
|
? ((current = !0), pushContextProvider(workInProgress))
|
|
@@ -8385,10 +8722,10 @@ batchedUpdatesImpl = function(fn, a) {
|
|
|
8385
8722
|
}
|
|
8386
8723
|
};
|
|
8387
8724
|
var roots = new Map(),
|
|
8388
|
-
devToolsConfig$jscomp$
|
|
8725
|
+
devToolsConfig$jscomp$inline_968 = {
|
|
8389
8726
|
findFiberByHostInstance: getInstanceFromInstance,
|
|
8390
8727
|
bundleType: 0,
|
|
8391
|
-
version: "18.
|
|
8728
|
+
version: "18.2.0-next-d300cebde-20220601",
|
|
8392
8729
|
rendererPackageName: "react-native-renderer",
|
|
8393
8730
|
rendererConfig: {
|
|
8394
8731
|
getInspectorDataForViewTag: function() {
|
|
@@ -8403,11 +8740,11 @@ var roots = new Map(),
|
|
|
8403
8740
|
}.bind(null, findNodeHandle)
|
|
8404
8741
|
}
|
|
8405
8742
|
};
|
|
8406
|
-
var internals$jscomp$
|
|
8407
|
-
bundleType: devToolsConfig$jscomp$
|
|
8408
|
-
version: devToolsConfig$jscomp$
|
|
8409
|
-
rendererPackageName: devToolsConfig$jscomp$
|
|
8410
|
-
rendererConfig: devToolsConfig$jscomp$
|
|
8743
|
+
var internals$jscomp$inline_1234 = {
|
|
8744
|
+
bundleType: devToolsConfig$jscomp$inline_968.bundleType,
|
|
8745
|
+
version: devToolsConfig$jscomp$inline_968.version,
|
|
8746
|
+
rendererPackageName: devToolsConfig$jscomp$inline_968.rendererPackageName,
|
|
8747
|
+
rendererConfig: devToolsConfig$jscomp$inline_968.rendererConfig,
|
|
8411
8748
|
overrideHookState: null,
|
|
8412
8749
|
overrideHookStateDeletePath: null,
|
|
8413
8750
|
overrideHookStateRenamePath: null,
|
|
@@ -8423,26 +8760,26 @@ var internals$jscomp$inline_1238 = {
|
|
|
8423
8760
|
return null === fiber ? null : fiber.stateNode;
|
|
8424
8761
|
},
|
|
8425
8762
|
findFiberByHostInstance:
|
|
8426
|
-
devToolsConfig$jscomp$
|
|
8763
|
+
devToolsConfig$jscomp$inline_968.findFiberByHostInstance ||
|
|
8427
8764
|
emptyFindFiberByHostInstance,
|
|
8428
8765
|
findHostInstancesForRefresh: null,
|
|
8429
8766
|
scheduleRefresh: null,
|
|
8430
8767
|
scheduleRoot: null,
|
|
8431
8768
|
setRefreshHandler: null,
|
|
8432
8769
|
getCurrentFiber: null,
|
|
8433
|
-
reconcilerVersion: "18.
|
|
8770
|
+
reconcilerVersion: "18.2.0-next-d300cebde-20220601"
|
|
8434
8771
|
};
|
|
8435
8772
|
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
|
8436
|
-
var hook$jscomp$
|
|
8773
|
+
var hook$jscomp$inline_1235 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
8437
8774
|
if (
|
|
8438
|
-
!hook$jscomp$
|
|
8439
|
-
hook$jscomp$
|
|
8775
|
+
!hook$jscomp$inline_1235.isDisabled &&
|
|
8776
|
+
hook$jscomp$inline_1235.supportsFiber
|
|
8440
8777
|
)
|
|
8441
8778
|
try {
|
|
8442
|
-
(rendererID = hook$jscomp$
|
|
8443
|
-
internals$jscomp$
|
|
8779
|
+
(rendererID = hook$jscomp$inline_1235.inject(
|
|
8780
|
+
internals$jscomp$inline_1234
|
|
8444
8781
|
)),
|
|
8445
|
-
(injectedHook = hook$jscomp$
|
|
8782
|
+
(injectedHook = hook$jscomp$inline_1235);
|
|
8446
8783
|
} catch (err) {}
|
|
8447
8784
|
}
|
|
8448
8785
|
exports.createPortal = function(children, containerTag) {
|
|
@@ -8499,7 +8836,8 @@ exports.render = function(element, containerTag, callback, concurrentRoot) {
|
|
|
8499
8836
|
element: null,
|
|
8500
8837
|
isDehydrated: !1,
|
|
8501
8838
|
cache: null,
|
|
8502
|
-
transitions: null
|
|
8839
|
+
transitions: null,
|
|
8840
|
+
pendingSuspenseBoundaries: null
|
|
8503
8841
|
}),
|
|
8504
8842
|
initializeUpdateQueue(root),
|
|
8505
8843
|
(root = concurrentRoot),
|