From 6d2deb7bec7ab1a26d71dfb7c23429c2dae46464 Mon Sep 17 00:00:00 2001 From: gnoff Date: Wed, 3 Apr 2024 00:47:42 +0000 Subject: [PATCH] Reland #28672: Remove IndeterminateComponent (#28681) This PR relands #28672 on top of the flag removal and the test demonstrating a breakage in Suspense for legacy mode. React has deprecated module pattern Function Components for many years at this point. Supporting this pattern required React to have a concept of an indeterminate component so that when a component first renders it can turn into either a ClassComponent or a FunctionComponent depending on what it returns. While this feature was deprecated and put behind a flag it is still in stable. This change remvoes the flag, removes the warnings, and removes the concept of IndeterminateComponent from the React codebase. While removing IndeterminateComponent type Seb and I discovered that we needed a concept of IncompleteFunctionComponent to support Suspense in legacy mode. This new work tag is only needed as long as legacy mode is around and ideally any code that considers this tag will be excludable from OSS builds once we land extra gates using `disableLegacyMode` flag. DiffTrain build for commit https://github.com/facebook/react/commit/5998a775194f491afa5d3badd9afe9ceaf12845e. --- .../cjs/ReactTestRenderer-dev.js | 325 ++++------- .../cjs/ReactTestRenderer-prod.js | 486 ++++++++-------- .../cjs/ReactTestRenderer-profiling.js | 538 +++++++++-------- .../Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 325 ++++------- .../implementations/ReactFabric-prod.fb.js | 470 ++++++++------- .../ReactFabric-profiling.fb.js | 522 +++++++++-------- .../ReactNativeRenderer-dev.fb.js | 325 ++++------- .../ReactNativeRenderer-prod.fb.js | 490 ++++++++-------- .../ReactNativeRenderer-profiling.fb.js | 542 +++++++++--------- 10 files changed, 1870 insertions(+), 2155 deletions(-) diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js index 1372958106e4e..8c561f4e68dd5 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9f9d8986c9c03351ab1c1fe7b1b2c49a>> + * @generated SignedSource<<6acbb1692d59c6261eb71f7ca657935e>> */ "use strict"; @@ -152,8 +152,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -180,6 +178,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; // ATTENTION // When adding new symbols to this file, @@ -427,7 +426,6 @@ if (__DEV__) { case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -3049,7 +3047,6 @@ if (__DEV__) { return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -5157,7 +5154,6 @@ if (__DEV__) { return describeBuiltInComponentFrame("SuspenseList", owner); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type, owner); @@ -12502,17 +12498,6 @@ if (__DEV__) { } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = false; var unmaskedContext = emptyContextObject; @@ -12576,7 +12561,14 @@ if (__DEV__) { instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -13527,6 +13519,14 @@ if (__DEV__) { update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -13837,7 +13837,6 @@ if (__DEV__) { ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -13848,7 +13847,6 @@ if (__DEV__) { { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -14462,6 +14460,24 @@ if (__DEV__) { } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -14469,6 +14485,39 @@ if (__DEV__) { nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + } + } + var context; { @@ -14923,70 +14972,68 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + { - validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = - resolveFunctionForHotReloading(Component); + resolveClassForHotReloading(Component); } - child = updateFunctionComponent( + return updateClassComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } + } else { + workInProgress.tag = FunctionComponent; - case ClassComponent: { { + validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = - resolveClassForHotReloading(Component); + resolveFunctionForHotReloading(Component); } - child = updateClassComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; + + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -15048,116 +15095,6 @@ if (__DEV__) { ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - { - var unmaskedContext = getUnmaskedContext( - workInProgress, - Component, - false - ); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - prepareToReadContext(workInProgress, renderLanes); - var value; - - { - markComponentRenderStarted(workInProgress); - } - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$1.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - setIsRendering(false); - } - - { - markComponentRenderStopped(); - } // React DevTools reads this flag. - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -15194,33 +15131,32 @@ if (__DEV__) { } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -15229,16 +15165,16 @@ if (__DEV__) { typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -16971,15 +16907,6 @@ if (__DEV__) { workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -17124,6 +17051,24 @@ if (__DEV__) { ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -18128,10 +18073,10 @@ if (__DEV__) { var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -24245,12 +24190,6 @@ if (__DEV__) { } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -25406,7 +25345,6 @@ if (__DEV__) { var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -26192,22 +26130,8 @@ if (__DEV__) { type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -26292,7 +26216,6 @@ if (__DEV__) { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -26418,7 +26341,7 @@ if (__DEV__) { mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; @@ -26803,7 +26726,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-canary-b7882942"; + var ReactVersion = "19.0.0-canary-220dd579"; // Might add PROFILE later. diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js index 632e4ef4fc2d6..ef28ed9e1f517 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<69239f8b92157c4f6a4c39bc63f04216>> */ "use strict"; @@ -158,7 +158,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -1265,7 +1264,6 @@ function describeFiber(fiber) { case 19: return describeComponentFrame("SuspenseList", null); case 0: - case 2: case 15: return describeFunctionComponentFrame(fiber.type); case 11: @@ -3681,12 +3679,15 @@ function throwException( : ((value.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) : ((value.flags |= 65536), (value.lanes = rootRenderLanes)), wakeable === noopSuspenseyCommitThenable @@ -4927,111 +4928,95 @@ function beginWork(current, workInProgress, renderLanes) { else didReceiveUpdate = !1; workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor$1.current - ); - prepareToReadContext(workInProgress, renderLanes); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - workInProgress.flags |= 1; - workInProgress.tag = 0; - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + elementType + + ". Lazy element type must resolve to a class or function." + ); } - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." - ); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -5040,24 +5025,24 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error("Should have a current fiber. This is a bug in React."); var nextProps = workInProgress.pendingProps; - context = workInProgress.memoizedState; - Component = context.element; + init = workInProgress.memoizedState; + elementType = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== context.cache && + nextCache !== init.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextProps.element; - context === Component + init = nextProps.element; + init === elementType ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, context, renderLanes), + : (reconcileChildren(current, workInProgress, init, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: @@ -5065,9 +5050,9 @@ function beginWork(current, workInProgress, renderLanes) { case 5: return ( pushHostContext(workInProgress), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), null !== workInProgress.memoizedState && - ((context = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -5075,17 +5060,17 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = context), + (HostTransitionContext._currentValue2 = init), didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, renderLanes )), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 6: @@ -5098,30 +5083,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -5157,15 +5147,15 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type._context; - context = workInProgress.pendingProps; + elementType = workInProgress.type._context; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = context.value; - pushProvider(workInProgress, Component, nextCache); + nextCache = init.value; + pushProvider(workInProgress, elementType, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === context.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -5175,37 +5165,33 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = workInProgress.type), - (Component = workInProgress.pendingProps.children), + (init = workInProgress.type), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), - (Component = Component(context)), + (init = readContext(init)), + (elementType = elementType(init)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -5219,29 +5205,47 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 22: @@ -5249,39 +5253,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (context.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (context.pooledCacheLanes |= renderLanes), - (context = nextProps)), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = nextProps.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = nextProps.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -5530,14 +5534,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$63 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$63 = lastTailNode), + for (var lastTailNode$67 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$67 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$63 + null === lastTailNode$67 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$63.sibling = null); + : (lastTailNode$67.sibling = null); } } function bubbleProperties(completedWork) { @@ -5547,19 +5551,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$64 = completedWork.child; null !== child$64; ) - (newChildLanes |= child$64.lanes | child$64.childLanes), - (subtreeFlags |= child$64.subtreeFlags & 31457280), - (subtreeFlags |= child$64.flags & 31457280), - (child$64.return = completedWork), - (child$64 = child$64.sibling); + for (var child$68 = completedWork.child; null !== child$68; ) + (newChildLanes |= child$68.lanes | child$68.childLanes), + (subtreeFlags |= child$68.subtreeFlags & 31457280), + (subtreeFlags |= child$68.flags & 31457280), + (child$68.return = completedWork), + (child$68 = child$68.sibling); else - for (child$64 = completedWork.child; null !== child$64; ) - (newChildLanes |= child$64.lanes | child$64.childLanes), - (subtreeFlags |= child$64.subtreeFlags), - (subtreeFlags |= child$64.flags), - (child$64.return = completedWork), - (child$64 = child$64.sibling); + for (child$68 = completedWork.child; null !== child$68; ) + (newChildLanes |= child$68.lanes | child$68.childLanes), + (subtreeFlags |= child$68.subtreeFlags), + (subtreeFlags |= child$68.flags), + (child$68.return = completedWork), + (child$68 = child$68.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5567,10 +5571,10 @@ function bubbleProperties(completedWork) { function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -5722,11 +5726,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$68 = null; + var cache$72 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$68 = newProps.memoizedState.cachePool.pool); - cache$68 !== index && (newProps.flags |= 2048); + (cache$72 = newProps.memoizedState.cachePool.pool); + cache$72 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -5753,8 +5757,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$68 = index.rendering; - if (null === cache$68) + cache$72 = index.rendering; + if (null === cache$72) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -5762,11 +5766,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$68 = findFirstSuspended(current); - if (null !== cache$68) { + cache$72 = findFirstSuspended(current); + if (null !== cache$72) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$68.updateQueue; + current = cache$72.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -5791,7 +5795,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$68)), null !== current)) { + if (((current = findFirstSuspended(cache$72)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -5801,7 +5805,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$68.alternate) + !cache$72.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -5813,13 +5817,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$68.sibling = workInProgress.child), - (workInProgress.child = cache$68)) + ? ((cache$72.sibling = workInProgress.child), + (workInProgress.child = cache$72)) : ((current = index.last), null !== current - ? (current.sibling = cache$68) - : (workInProgress.child = cache$68), - (index.last = cache$68)); + ? (current.sibling = cache$72) + : (workInProgress.child = cache$72), + (index.last = cache$72)); } if (null !== index.tail) return ( @@ -6032,8 +6036,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$84) { - captureCommitPhaseError(current, nearestMountedAncestor, error$84); + } catch (error$88) { + captureCommitPhaseError(current, nearestMountedAncestor, error$88); } else ref.current = null; } @@ -6139,10 +6143,10 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$85 = effect.create, + var create$89 = effect.create, inst = effect.inst; - create$85 = create$85(); - inst.destroy = create$85; + create$89 = create$89(); + inst.destroy = create$89; } effect = effect.next; } while (effect !== finishedWork); @@ -6196,11 +6200,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$86) { + } catch (error$90) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$86 + error$90 ); } } @@ -6577,8 +6581,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$94) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$94); + } catch (error$98) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$98); } } break; @@ -6616,8 +6620,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { (flags.type = type), (flags.props = existingHiddenCallbacks); - } catch (error$97) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$97); + } catch (error$101) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$101); } } break; @@ -6633,8 +6637,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { existingHiddenCallbacks = finishedWork.memoizedProps; try { flags.text = existingHiddenCallbacks; - } catch (error$98) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$98); + } catch (error$102) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$102); } } break; @@ -6720,11 +6724,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { wasHidden.stateNode.isHidden = existingHiddenCallbacks ? !0 : !1; - } catch (error$88) { + } catch (error$92) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$88 + error$92 ); } } else if ( @@ -6802,12 +6806,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$89 = JSCompiler_inline_result.stateNode.containerInfo, - before$90 = getHostSibling(finishedWork); + var parent$93 = JSCompiler_inline_result.stateNode.containerInfo, + before$94 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$90, - parent$89 + before$94, + parent$93 ); break; default: @@ -7939,8 +7943,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$106) { - handleThrow(root, thrownValue$106); + } catch (thrownValue$110) { + handleThrow(root, thrownValue$110); } while (1); lanes && root.shellSuspendCounter++; @@ -8048,8 +8052,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$108) { - handleThrow(root, thrownValue$108); + } catch (thrownValue$112) { + handleThrow(root, thrownValue$112); } while (1); resetContextDependencies(); @@ -8075,8 +8079,6 @@ function performUnitOfWork(unitOfWork) { function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -8526,16 +8528,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -8613,7 +8605,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) fiberTag = 5; @@ -9193,19 +9185,19 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_992 = { +var devToolsConfig$jscomp$inline_990 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-88ad4c2a", + version: "19.0.0-canary-7c981d93", rendererPackageName: "react-test-renderer" }; -var internals$jscomp$inline_1180 = { - bundleType: devToolsConfig$jscomp$inline_992.bundleType, - version: devToolsConfig$jscomp$inline_992.version, - rendererPackageName: devToolsConfig$jscomp$inline_992.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_992.rendererConfig, +var internals$jscomp$inline_1175 = { + bundleType: devToolsConfig$jscomp$inline_990.bundleType, + version: devToolsConfig$jscomp$inline_990.version, + rendererPackageName: devToolsConfig$jscomp$inline_990.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_990.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9222,26 +9214,26 @@ var internals$jscomp$inline_1180 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_992.findFiberByHostInstance || + devToolsConfig$jscomp$inline_990.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-88ad4c2a" + reconcilerVersion: "19.0.0-canary-7c981d93" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1181 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1176 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1181.isDisabled && - hook$jscomp$inline_1181.supportsFiber + !hook$jscomp$inline_1176.isDisabled && + hook$jscomp$inline_1176.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1181.inject( - internals$jscomp$inline_1180 + (rendererID = hook$jscomp$inline_1176.inject( + internals$jscomp$inline_1175 )), - (injectedHook = hook$jscomp$inline_1181); + (injectedHook = hook$jscomp$inline_1176); } catch (err) {} } exports._Scheduler = Scheduler; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js index f7a40152dfbf9..dcf81cb48f10f 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -158,7 +158,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -1353,7 +1352,6 @@ function describeFiber(fiber) { case 19: return describeComponentFrame("SuspenseList", null); case 0: - case 2: case 15: return describeFunctionComponentFrame(fiber.type); case 11: @@ -3839,12 +3837,15 @@ function throwException( : ((value.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) : ((value.flags |= 65536), (value.lanes = rootRenderLanes)), wakeable === noopSuspenseyCommitThenable @@ -5116,113 +5117,95 @@ function beginWork(current, workInProgress, renderLanes) { else didReceiveUpdate = !1; workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor$1.current - ); - prepareToReadContext(workInProgress, renderLanes); - markComponentRenderStarted(workInProgress); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - markComponentRenderStopped(); - workInProgress.flags |= 1; - workInProgress.tag = 0; - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + elementType + + ". Lazy element type must resolve to a class or function." + ); } - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." - ); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -5231,24 +5214,24 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error("Should have a current fiber. This is a bug in React."); var nextProps = workInProgress.pendingProps; - context = workInProgress.memoizedState; - Component = context.element; + init = workInProgress.memoizedState; + elementType = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== context.cache && + nextCache !== init.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextProps.element; - context === Component + init = nextProps.element; + init === elementType ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, context, renderLanes), + : (reconcileChildren(current, workInProgress, init, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: @@ -5256,9 +5239,9 @@ function beginWork(current, workInProgress, renderLanes) { case 5: return ( pushHostContext(workInProgress), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), null !== workInProgress.memoizedState && - ((context = renderWithHooks( + ((init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -5266,17 +5249,17 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = context), + (HostTransitionContext._currentValue2 = init), didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, renderLanes )), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 6: @@ -5289,30 +5272,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -5339,9 +5327,9 @@ function beginWork(current, workInProgress, renderLanes) { case 12: return ( (workInProgress.flags |= 4), - (Component = workInProgress.stateNode), - (Component.effectDuration = 0), - (Component.passiveEffectDuration = 0), + (elementType = workInProgress.stateNode), + (elementType.effectDuration = 0), + (elementType.passiveEffectDuration = 0), reconcileChildren( current, workInProgress, @@ -5352,15 +5340,15 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type._context; - context = workInProgress.pendingProps; + elementType = workInProgress.type._context; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = context.value; - pushProvider(workInProgress, Component, nextCache); + nextCache = init.value; + pushProvider(workInProgress, elementType, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === context.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -5370,39 +5358,35 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = workInProgress.type), - (Component = workInProgress.pendingProps.children), + (init = workInProgress.type), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), + (init = readContext(init)), markComponentRenderStarted(workInProgress), - (Component = Component(context)), + (elementType = elementType(init)), markComponentRenderStopped(), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -5416,29 +5400,47 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 22: @@ -5446,39 +5448,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (context.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (context.pooledCacheLanes |= renderLanes), - (context = nextProps)), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = nextProps.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = nextProps.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -5727,14 +5729,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$65 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$65 = lastTailNode), + for (var lastTailNode$69 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$69 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$65 + null === lastTailNode$69 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$65.sibling = null); + : (lastTailNode$69.sibling = null); } } function bubbleProperties(completedWork) { @@ -5746,53 +5748,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$67 = completedWork.selfBaseDuration, - child$68 = completedWork.child; - null !== child$68; + var treeBaseDuration$71 = completedWork.selfBaseDuration, + child$72 = completedWork.child; + null !== child$72; ) - (newChildLanes |= child$68.lanes | child$68.childLanes), - (subtreeFlags |= child$68.subtreeFlags & 31457280), - (subtreeFlags |= child$68.flags & 31457280), - (treeBaseDuration$67 += child$68.treeBaseDuration), - (child$68 = child$68.sibling); - completedWork.treeBaseDuration = treeBaseDuration$67; + (newChildLanes |= child$72.lanes | child$72.childLanes), + (subtreeFlags |= child$72.subtreeFlags & 31457280), + (subtreeFlags |= child$72.flags & 31457280), + (treeBaseDuration$71 += child$72.treeBaseDuration), + (child$72 = child$72.sibling); + completedWork.treeBaseDuration = treeBaseDuration$71; } else for ( - treeBaseDuration$67 = completedWork.child; - null !== treeBaseDuration$67; + treeBaseDuration$71 = completedWork.child; + null !== treeBaseDuration$71; ) (newChildLanes |= - treeBaseDuration$67.lanes | treeBaseDuration$67.childLanes), - (subtreeFlags |= treeBaseDuration$67.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$67.flags & 31457280), - (treeBaseDuration$67.return = completedWork), - (treeBaseDuration$67 = treeBaseDuration$67.sibling); + treeBaseDuration$71.lanes | treeBaseDuration$71.childLanes), + (subtreeFlags |= treeBaseDuration$71.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$71.flags & 31457280), + (treeBaseDuration$71.return = completedWork), + (treeBaseDuration$71 = treeBaseDuration$71.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$67 = completedWork.actualDuration; - child$68 = completedWork.selfBaseDuration; + treeBaseDuration$71 = completedWork.actualDuration; + child$72 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$67 += child.actualDuration), - (child$68 += child.treeBaseDuration), + (treeBaseDuration$71 += child.actualDuration), + (child$72 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$67; - completedWork.treeBaseDuration = child$68; + completedWork.actualDuration = treeBaseDuration$71; + completedWork.treeBaseDuration = child$72; } else for ( - treeBaseDuration$67 = completedWork.child; - null !== treeBaseDuration$67; + treeBaseDuration$71 = completedWork.child; + null !== treeBaseDuration$71; ) (newChildLanes |= - treeBaseDuration$67.lanes | treeBaseDuration$67.childLanes), - (subtreeFlags |= treeBaseDuration$67.subtreeFlags), - (subtreeFlags |= treeBaseDuration$67.flags), - (treeBaseDuration$67.return = completedWork), - (treeBaseDuration$67 = treeBaseDuration$67.sibling); + treeBaseDuration$71.lanes | treeBaseDuration$71.childLanes), + (subtreeFlags |= treeBaseDuration$71.subtreeFlags), + (subtreeFlags |= treeBaseDuration$71.flags), + (treeBaseDuration$71.return = completedWork), + (treeBaseDuration$71 = treeBaseDuration$71.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5800,10 +5802,10 @@ function bubbleProperties(completedWork) { function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -5965,11 +5967,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$75 = null; + var cache$79 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$75 = newProps.memoizedState.cachePool.pool); - cache$75 !== index && (newProps.flags |= 2048); + (cache$79 = newProps.memoizedState.cachePool.pool); + cache$79 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -6001,8 +6003,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$75 = index.rendering; - if (null === cache$75) + cache$79 = index.rendering; + if (null === cache$79) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -6010,11 +6012,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$75 = findFirstSuspended(current); - if (null !== cache$75) { + cache$79 = findFirstSuspended(current); + if (null !== cache$79) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$75.updateQueue; + current = cache$79.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6039,7 +6041,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$75)), null !== current)) { + if (((current = findFirstSuspended(cache$79)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6049,7 +6051,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$75.alternate) + !cache$79.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6061,13 +6063,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$75.sibling = workInProgress.child), - (workInProgress.child = cache$75)) + ? ((cache$79.sibling = workInProgress.child), + (workInProgress.child = cache$79)) : ((current = index.last), null !== current - ? (current.sibling = cache$75) - : (workInProgress.child = cache$75), - (index.last = cache$75)); + ? (current.sibling = cache$79) + : (workInProgress.child = cache$79), + (index.last = cache$79)); } if (null !== index.tail) return ( @@ -6321,8 +6323,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$91) { - captureCommitPhaseError(current, nearestMountedAncestor, error$91); + } catch (error$95) { + captureCommitPhaseError(current, nearestMountedAncestor, error$95); } else ref.current = null; } @@ -6457,10 +6459,10 @@ function commitHookEffectListMount(flags, finishedWork) { injectedProfilingHooks.markComponentLayoutEffectMountStarted( finishedWork ); - var create$92 = effect.create, + var create$96 = effect.create, inst = effect.inst; - create$92 = create$92(); - inst.destroy = create$92; + create$96 = create$96(); + inst.destroy = create$96; 0 !== (flags & 8) ? null !== injectedProfilingHooks && "function" === @@ -6488,8 +6490,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$94) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$94); + } catch (error$98) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$98); } } function commitClassCallbacks(finishedWork) { @@ -6569,11 +6571,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$95) { + } catch (error$99) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$95 + error$99 ); } else { @@ -6590,11 +6592,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$96) { + } catch (error$100) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$96 + error$100 ); } recordLayoutEffectDuration(finishedWork); @@ -6605,11 +6607,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$97) { + } catch (error$101) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$97 + error$101 ); } } @@ -6998,22 +7000,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$106) { + } catch (error$110) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$106 + error$110 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$107) { + } catch (error$111) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$107 + error$111 ); } } @@ -7052,8 +7054,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { (flags.type = type), (flags.props = existingHiddenCallbacks); - } catch (error$110) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$110); + } catch (error$114) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$114); } } break; @@ -7069,8 +7071,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { existingHiddenCallbacks = finishedWork.memoizedProps; try { flags.text = existingHiddenCallbacks; - } catch (error$111) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$111); + } catch (error$115) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$115); } } break; @@ -7156,11 +7158,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { wasHidden.stateNode.isHidden = existingHiddenCallbacks ? !0 : !1; - } catch (error$100) { + } catch (error$104) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$100 + error$104 ); } } else if ( @@ -7238,12 +7240,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$101 = JSCompiler_inline_result.stateNode.containerInfo, - before$102 = getHostSibling(finishedWork); + var parent$105 = JSCompiler_inline_result.stateNode.containerInfo, + before$106 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$102, - parent$101 + before$106, + parent$105 ); break; default: @@ -7423,8 +7425,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$115) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$115); + } catch (error$119) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$119); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -8445,8 +8447,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$120) { - handleThrow(root, thrownValue$120); + } catch (thrownValue$124) { + handleThrow(root, thrownValue$124); } while (1); lanes && root.shellSuspendCounter++; @@ -8556,8 +8558,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$122) { - handleThrow(root, thrownValue$122); + } catch (thrownValue$126) { + handleThrow(root, thrownValue$126); } while (1); resetContextDependencies(); @@ -8599,8 +8601,6 @@ function replaySuspendedUnitOfWork(unitOfWork) { isProfilingMode = 0 !== (unitOfWork.mode & 2); isProfilingMode && startProfilerTimer(unitOfWork); switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -8923,11 +8923,11 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$93 = commitTime, + commitTime$97 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && - onPostCommit(id, phase, passiveEffectDuration, commitTime$93); + onPostCommit(id, phase, passiveEffectDuration, commitTime$97); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { switch (parentFiber.tag) { @@ -9130,16 +9130,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -9225,7 +9215,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) fiberTag = 5; @@ -9811,12 +9801,12 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1076 = { +var devToolsConfig$jscomp$inline_1074 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-153a5857", + version: "19.0.0-canary-0b841a65", rendererPackageName: "react-test-renderer" }; (function (internals) { @@ -9833,10 +9823,10 @@ var devToolsConfig$jscomp$inline_1076 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1076.bundleType, - version: devToolsConfig$jscomp$inline_1076.version, - rendererPackageName: devToolsConfig$jscomp$inline_1076.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1076.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1074.bundleType, + version: devToolsConfig$jscomp$inline_1074.version, + rendererPackageName: devToolsConfig$jscomp$inline_1074.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1074.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9853,14 +9843,14 @@ var devToolsConfig$jscomp$inline_1076 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1076.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1074.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-153a5857" + reconcilerVersion: "19.0.0-canary-0b841a65" }); exports._Scheduler = Scheduler; exports.act = act; diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index ee6cf94fd0cf7..bc60c33d6fb92 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -8cb6a1c0347a69ad4c580c5cf5f28d8be544d6d4 +5998a775194f491afa5d3badd9afe9ceaf12845e diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 2a0051ae07639..1da29c8a2b5ef 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -993,8 +993,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -1021,6 +1019,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; /** * Instance of element that should respond to touch/move types of interactions, @@ -5375,7 +5374,6 @@ to return true:wantsResponderID| | case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -6192,7 +6190,6 @@ to return true:wantsResponderID| | return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -8611,7 +8608,6 @@ to return true:wantsResponderID| | return describeBuiltInComponentFrame("SuspenseList", owner); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type, owner); @@ -16133,17 +16129,6 @@ to return true:wantsResponderID| | } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = false; var unmaskedContext = emptyContextObject; @@ -16219,7 +16204,14 @@ to return true:wantsResponderID| | instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -17170,6 +17162,14 @@ to return true:wantsResponderID| | update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -17487,7 +17487,6 @@ to return true:wantsResponderID| | ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -17498,7 +17497,6 @@ to return true:wantsResponderID| | { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -18112,6 +18110,24 @@ to return true:wantsResponderID| | } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -18119,6 +18135,39 @@ to return true:wantsResponderID| | nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + } + } + var context; { @@ -18583,70 +18632,68 @@ to return true:wantsResponderID| | var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + { - validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = - resolveFunctionForHotReloading(Component); + resolveClassForHotReloading(Component); } - child = updateFunctionComponent( + return updateClassComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } + } else { + workInProgress.tag = FunctionComponent; - case ClassComponent: { { + validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = - resolveClassForHotReloading(Component); + resolveFunctionForHotReloading(Component); } - child = updateClassComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; + + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -18708,116 +18755,6 @@ to return true:wantsResponderID| | ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - { - var unmaskedContext = getUnmaskedContext( - workInProgress, - Component, - false - ); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - prepareToReadContext(workInProgress, renderLanes); - var value; - - { - markComponentRenderStarted(workInProgress); - } - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$2.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - setIsRendering(false); - } - - { - markComponentRenderStopped(); - } // React DevTools reads this flag. - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -18854,33 +18791,32 @@ to return true:wantsResponderID| | } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -18889,16 +18825,16 @@ to return true:wantsResponderID| | typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -20638,15 +20574,6 @@ to return true:wantsResponderID| | workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -20791,6 +20718,24 @@ to return true:wantsResponderID| | ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -22027,10 +21972,10 @@ to return true:wantsResponderID| | var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -27854,12 +27799,6 @@ to return true:wantsResponderID| | } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -29156,7 +29095,6 @@ to return true:wantsResponderID| | var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -29955,22 +29893,8 @@ to return true:wantsResponderID| | type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -30055,7 +29979,6 @@ to return true:wantsResponderID| | workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -30174,7 +30097,7 @@ to return true:wantsResponderID| | mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; @@ -30573,7 +30496,7 @@ to return true:wantsResponderID| | return root; } - var ReactVersion = "19.0.0-canary-0f204b29"; + var ReactVersion = "19.0.0-canary-be1b1c9f"; function createPortal$1( children, diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 997d8d0cbc50e..a64d05975ecfd 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7d726b31ddcda58c8e9067319a1c0ba0>> + * @generated SignedSource<<79b4201698c1766bcf98a9f2ca4b8113>> */ "use strict"; @@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_244 = { +var injectedNamesToPlugins$jscomp$inline_248 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_244 = { } } }, - isOrderingDirty$jscomp$inline_245 = !1, - pluginName$jscomp$inline_246; -for (pluginName$jscomp$inline_246 in injectedNamesToPlugins$jscomp$inline_244) + isOrderingDirty$jscomp$inline_249 = !1, + pluginName$jscomp$inline_250; +for (pluginName$jscomp$inline_250 in injectedNamesToPlugins$jscomp$inline_248) if ( - injectedNamesToPlugins$jscomp$inline_244.hasOwnProperty( - pluginName$jscomp$inline_246 + injectedNamesToPlugins$jscomp$inline_248.hasOwnProperty( + pluginName$jscomp$inline_250 ) ) { - var pluginModule$jscomp$inline_247 = - injectedNamesToPlugins$jscomp$inline_244[pluginName$jscomp$inline_246]; + var pluginModule$jscomp$inline_251 = + injectedNamesToPlugins$jscomp$inline_248[pluginName$jscomp$inline_250]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_246) || - namesToPlugins[pluginName$jscomp$inline_246] !== - pluginModule$jscomp$inline_247 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_250) || + namesToPlugins[pluginName$jscomp$inline_250] !== + pluginModule$jscomp$inline_251 ) { - if (namesToPlugins[pluginName$jscomp$inline_246]) + if (namesToPlugins[pluginName$jscomp$inline_250]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_246 + "`.") + (pluginName$jscomp$inline_250 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_246] = - pluginModule$jscomp$inline_247; - isOrderingDirty$jscomp$inline_245 = !0; + namesToPlugins[pluginName$jscomp$inline_250] = + pluginModule$jscomp$inline_251; + isOrderingDirty$jscomp$inline_249 = !0; } } -isOrderingDirty$jscomp$inline_245 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_249 && recomputePluginOrdering(); var emptyObject$1 = {}, removedKeys = null, removedKeyCount = 0, @@ -1776,7 +1776,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -2771,7 +2770,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return describeFunctionComponentFrame(fiber.type); case 11: @@ -5228,12 +5226,15 @@ function throwException( : ((value.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) : ((value.flags |= 65536), (value.lanes = rootRenderLanes)), wakeable === noopSuspenseyCommitThenable @@ -6477,111 +6478,95 @@ function beginWork(current, workInProgress, renderLanes) { else didReceiveUpdate = !1; workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor$1.current - ); - prepareToReadContext(workInProgress, renderLanes); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - workInProgress.flags |= 1; - workInProgress.tag = 0; - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + elementType + + ". Lazy element type must resolve to a class or function." + ); } - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." - ); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6590,34 +6575,34 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error("Should have a current fiber. This is a bug in React."); var nextProps = workInProgress.pendingProps; - context = workInProgress.memoizedState; - Component = context.element; + init = workInProgress.memoizedState; + elementType = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== context.cache && + nextCache !== init.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextProps.element; - context === Component + init = nextProps.element; + init === elementType ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, context, renderLanes), + : (reconcileChildren(current, workInProgress, init, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: case 27: case 5: pushHostContext(workInProgress); - Component = workInProgress.pendingProps.children; + elementType = workInProgress.pendingProps.children; if (enableAsyncActions && null !== workInProgress.memoizedState) { if (!enableAsyncActions) throw Error("Not implemented."); - context = renderWithHooks( + init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6625,10 +6610,10 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes ); - HostTransitionContext._currentValue2 = context; + HostTransitionContext._currentValue2 = init; didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, @@ -6636,7 +6621,7 @@ function beginWork(current, workInProgress, renderLanes) { ); } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: return null; @@ -6648,30 +6633,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6707,17 +6697,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = context.value; - pushProvider(workInProgress, Component, nextCache); + nextCache = init.value; + pushProvider(workInProgress, elementType, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === context.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -6727,39 +6717,35 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), - (Component = Component(context)), + (init = readContext(init)), + (elementType = elementType(init)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6773,29 +6759,47 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 22: @@ -6803,39 +6807,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (context.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (context.pooledCacheLanes |= renderLanes), - (context = nextProps)), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = nextProps.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = nextProps.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -7195,14 +7199,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$71 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$71 = lastTailNode), + for (var lastTailNode$75 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$75 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$71 + null === lastTailNode$75 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$71.sibling = null); + : (lastTailNode$75.sibling = null); } } function bubbleProperties(completedWork) { @@ -7212,19 +7216,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$72 = completedWork.child; null !== child$72; ) - (newChildLanes |= child$72.lanes | child$72.childLanes), - (subtreeFlags |= child$72.subtreeFlags & 31457280), - (subtreeFlags |= child$72.flags & 31457280), - (child$72.return = completedWork), - (child$72 = child$72.sibling); + for (var child$76 = completedWork.child; null !== child$76; ) + (newChildLanes |= child$76.lanes | child$76.childLanes), + (subtreeFlags |= child$76.subtreeFlags & 31457280), + (subtreeFlags |= child$76.flags & 31457280), + (child$76.return = completedWork), + (child$76 = child$76.sibling); else - for (child$72 = completedWork.child; null !== child$72; ) - (newChildLanes |= child$72.lanes | child$72.childLanes), - (subtreeFlags |= child$72.subtreeFlags), - (subtreeFlags |= child$72.flags), - (child$72.return = completedWork), - (child$72 = child$72.sibling); + for (child$76 = completedWork.child; null !== child$76; ) + (newChildLanes |= child$76.lanes | child$76.childLanes), + (subtreeFlags |= child$76.subtreeFlags), + (subtreeFlags |= child$76.flags), + (child$76.return = completedWork), + (child$76 = child$76.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7232,10 +7236,10 @@ function bubbleProperties(completedWork) { function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -7775,8 +7779,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$94) { - captureCommitPhaseError(current, nearestMountedAncestor, error$94); + } catch (error$98) { + captureCommitPhaseError(current, nearestMountedAncestor, error$98); } else ref.current = null; } @@ -7880,10 +7884,10 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$95 = effect.create, + var create$99 = effect.create, inst = effect.inst; - create$95 = create$95(); - inst.destroy = create$95; + create$99 = create$99(); + inst.destroy = create$99; } effect = effect.next; } while (effect !== finishedWork); @@ -7946,11 +7950,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$96) { + } catch (error$100) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$96 + error$100 ); } } @@ -8244,8 +8248,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$98) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$98); + } catch (error$102) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$102); } } break; @@ -9487,8 +9491,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$110) { - handleThrow(root, thrownValue$110); + } catch (thrownValue$114) { + handleThrow(root, thrownValue$114); } while (1); lanes && root.shellSuspendCounter++; @@ -9596,8 +9600,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$112) { - handleThrow(root, thrownValue$112); + } catch (thrownValue$116) { + handleThrow(root, thrownValue$116); } while (1); resetContextDependencies(); @@ -9623,8 +9627,6 @@ function performUnitOfWork(unitOfWork) { function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -10097,16 +10099,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -10184,7 +10176,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) fiberTag = 5; @@ -10614,10 +10606,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1094 = { + devToolsConfig$jscomp$inline_1092 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-62b40297", + version: "19.0.0-canary-0f09b065", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10633,11 +10625,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1331 = { - bundleType: devToolsConfig$jscomp$inline_1094.bundleType, - version: devToolsConfig$jscomp$inline_1094.version, - rendererPackageName: devToolsConfig$jscomp$inline_1094.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1094.rendererConfig, +var internals$jscomp$inline_1326 = { + bundleType: devToolsConfig$jscomp$inline_1092.bundleType, + version: devToolsConfig$jscomp$inline_1092.version, + rendererPackageName: devToolsConfig$jscomp$inline_1092.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1092.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10653,26 +10645,26 @@ var internals$jscomp$inline_1331 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1094.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1092.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-62b40297" + reconcilerVersion: "19.0.0-canary-0f09b065" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1332 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1327 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1332.isDisabled && - hook$jscomp$inline_1332.supportsFiber + !hook$jscomp$inline_1327.isDisabled && + hook$jscomp$inline_1327.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1332.inject( - internals$jscomp$inline_1331 + (rendererID = hook$jscomp$inline_1327.inject( + internals$jscomp$inline_1326 )), - (injectedHook = hook$jscomp$inline_1332); + (injectedHook = hook$jscomp$inline_1327); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index c1d1ad996e64e..b358fd7e1ee61 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_260 = { +var injectedNamesToPlugins$jscomp$inline_264 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_260 = { } } }, - isOrderingDirty$jscomp$inline_261 = !1, - pluginName$jscomp$inline_262; -for (pluginName$jscomp$inline_262 in injectedNamesToPlugins$jscomp$inline_260) + isOrderingDirty$jscomp$inline_265 = !1, + pluginName$jscomp$inline_266; +for (pluginName$jscomp$inline_266 in injectedNamesToPlugins$jscomp$inline_264) if ( - injectedNamesToPlugins$jscomp$inline_260.hasOwnProperty( - pluginName$jscomp$inline_262 + injectedNamesToPlugins$jscomp$inline_264.hasOwnProperty( + pluginName$jscomp$inline_266 ) ) { - var pluginModule$jscomp$inline_263 = - injectedNamesToPlugins$jscomp$inline_260[pluginName$jscomp$inline_262]; + var pluginModule$jscomp$inline_267 = + injectedNamesToPlugins$jscomp$inline_264[pluginName$jscomp$inline_266]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_262) || - namesToPlugins[pluginName$jscomp$inline_262] !== - pluginModule$jscomp$inline_263 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_266) || + namesToPlugins[pluginName$jscomp$inline_266] !== + pluginModule$jscomp$inline_267 ) { - if (namesToPlugins[pluginName$jscomp$inline_262]) + if (namesToPlugins[pluginName$jscomp$inline_266]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_262 + "`.") + (pluginName$jscomp$inline_266 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_262] = - pluginModule$jscomp$inline_263; - isOrderingDirty$jscomp$inline_261 = !0; + namesToPlugins[pluginName$jscomp$inline_266] = + pluginModule$jscomp$inline_267; + isOrderingDirty$jscomp$inline_265 = !0; } } -isOrderingDirty$jscomp$inline_261 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_265 && recomputePluginOrdering(); var emptyObject$1 = {}, removedKeys = null, removedKeyCount = 0, @@ -1898,7 +1898,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -2893,7 +2892,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return describeFunctionComponentFrame(fiber.type); case 11: @@ -5421,12 +5419,15 @@ function throwException( : ((value.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) : ((value.flags |= 65536), (value.lanes = rootRenderLanes)), wakeable === noopSuspenseyCommitThenable @@ -6701,113 +6702,95 @@ function beginWork(current, workInProgress, renderLanes) { else didReceiveUpdate = !1; workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor$1.current - ); - prepareToReadContext(workInProgress, renderLanes); - markComponentRenderStarted(workInProgress); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - markComponentRenderStopped(); - workInProgress.flags |= 1; - workInProgress.tag = 0; - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + elementType + + ". Lazy element type must resolve to a class or function." + ); } - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." - ); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6816,34 +6799,34 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error("Should have a current fiber. This is a bug in React."); var nextProps = workInProgress.pendingProps; - context = workInProgress.memoizedState; - Component = context.element; + init = workInProgress.memoizedState; + elementType = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== context.cache && + nextCache !== init.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextProps.element; - context === Component + init = nextProps.element; + init === elementType ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, context, renderLanes), + : (reconcileChildren(current, workInProgress, init, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: case 27: case 5: pushHostContext(workInProgress); - Component = workInProgress.pendingProps.children; + elementType = workInProgress.pendingProps.children; if (enableAsyncActions && null !== workInProgress.memoizedState) { if (!enableAsyncActions) throw Error("Not implemented."); - context = renderWithHooks( + init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6851,10 +6834,10 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes ); - HostTransitionContext._currentValue2 = context; + HostTransitionContext._currentValue2 = init; didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, @@ -6862,7 +6845,7 @@ function beginWork(current, workInProgress, renderLanes) { ); } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: return null; @@ -6874,30 +6857,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6924,9 +6912,9 @@ function beginWork(current, workInProgress, renderLanes) { case 12: return ( (workInProgress.flags |= 4), - (Component = workInProgress.stateNode), - (Component.effectDuration = 0), - (Component.passiveEffectDuration = 0), + (elementType = workInProgress.stateNode), + (elementType.effectDuration = 0), + (elementType.passiveEffectDuration = 0), reconcileChildren( current, workInProgress, @@ -6937,17 +6925,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = context.value; - pushProvider(workInProgress, Component, nextCache); + nextCache = init.value; + pushProvider(workInProgress, elementType, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === context.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -6957,41 +6945,37 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), + (init = readContext(init)), markComponentRenderStarted(workInProgress), - (Component = Component(context)), + (elementType = elementType(init)), markComponentRenderStopped(), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -7005,29 +6989,47 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 22: @@ -7035,39 +7037,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (context.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (context.pooledCacheLanes |= renderLanes), - (context = nextProps)), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = nextProps.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = nextProps.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -7427,14 +7429,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$75 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$75 = lastTailNode), + for (var lastTailNode$79 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$79 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$75 + null === lastTailNode$79 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$75.sibling = null); + : (lastTailNode$79.sibling = null); } } function bubbleProperties(completedWork) { @@ -7446,53 +7448,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$77 = completedWork.selfBaseDuration, - child$78 = completedWork.child; - null !== child$78; + var treeBaseDuration$81 = completedWork.selfBaseDuration, + child$82 = completedWork.child; + null !== child$82; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags & 31457280), - (subtreeFlags |= child$78.flags & 31457280), - (treeBaseDuration$77 += child$78.treeBaseDuration), - (child$78 = child$78.sibling); - completedWork.treeBaseDuration = treeBaseDuration$77; + (newChildLanes |= child$82.lanes | child$82.childLanes), + (subtreeFlags |= child$82.subtreeFlags & 31457280), + (subtreeFlags |= child$82.flags & 31457280), + (treeBaseDuration$81 += child$82.treeBaseDuration), + (child$82 = child$82.sibling); + completedWork.treeBaseDuration = treeBaseDuration$81; } else for ( - treeBaseDuration$77 = completedWork.child; - null !== treeBaseDuration$77; + treeBaseDuration$81 = completedWork.child; + null !== treeBaseDuration$81; ) (newChildLanes |= - treeBaseDuration$77.lanes | treeBaseDuration$77.childLanes), - (subtreeFlags |= treeBaseDuration$77.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$77.flags & 31457280), - (treeBaseDuration$77.return = completedWork), - (treeBaseDuration$77 = treeBaseDuration$77.sibling); + treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), + (subtreeFlags |= treeBaseDuration$81.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$81.flags & 31457280), + (treeBaseDuration$81.return = completedWork), + (treeBaseDuration$81 = treeBaseDuration$81.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$77 = completedWork.actualDuration; - child$78 = completedWork.selfBaseDuration; + treeBaseDuration$81 = completedWork.actualDuration; + child$82 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$77 += child.actualDuration), - (child$78 += child.treeBaseDuration), + (treeBaseDuration$81 += child.actualDuration), + (child$82 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$77; - completedWork.treeBaseDuration = child$78; + completedWork.actualDuration = treeBaseDuration$81; + completedWork.treeBaseDuration = child$82; } else for ( - treeBaseDuration$77 = completedWork.child; - null !== treeBaseDuration$77; + treeBaseDuration$81 = completedWork.child; + null !== treeBaseDuration$81; ) (newChildLanes |= - treeBaseDuration$77.lanes | treeBaseDuration$77.childLanes), - (subtreeFlags |= treeBaseDuration$77.subtreeFlags), - (subtreeFlags |= treeBaseDuration$77.flags), - (treeBaseDuration$77.return = completedWork), - (treeBaseDuration$77 = treeBaseDuration$77.sibling); + treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), + (subtreeFlags |= treeBaseDuration$81.subtreeFlags), + (subtreeFlags |= treeBaseDuration$81.flags), + (treeBaseDuration$81.return = completedWork), + (treeBaseDuration$81 = treeBaseDuration$81.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7500,10 +7502,10 @@ function bubbleProperties(completedWork) { function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -8101,8 +8103,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$103) { - captureCommitPhaseError(current, nearestMountedAncestor, error$103); + } catch (error$107) { + captureCommitPhaseError(current, nearestMountedAncestor, error$107); } else ref.current = null; } @@ -8235,10 +8237,10 @@ function commitHookEffectListMount(flags, finishedWork) { injectedProfilingHooks.markComponentLayoutEffectMountStarted( finishedWork ); - var create$104 = effect.create, + var create$108 = effect.create, inst = effect.inst; - create$104 = create$104(); - inst.destroy = create$104; + create$108 = create$108(); + inst.destroy = create$108; 0 !== (flags & 8) ? null !== injectedProfilingHooks && "function" === @@ -8266,8 +8268,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$106) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$106); + } catch (error$110) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$110); } } function commitClassCallbacks(finishedWork) { @@ -8356,11 +8358,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$107) { + } catch (error$111) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$107 + error$111 ); } else { @@ -8377,11 +8379,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$108) { + } catch (error$112) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$108 + error$112 ); } recordLayoutEffectDuration(finishedWork); @@ -8392,11 +8394,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$109) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$109 + error$113 ); } } @@ -8717,22 +8719,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$112) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$112 + error$116 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$113) { + } catch (error$117) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$113 + error$117 ); } } @@ -9029,8 +9031,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$121) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$121); + } catch (error$125) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$125); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -10060,8 +10062,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$126) { - handleThrow(root, thrownValue$126); + } catch (thrownValue$130) { + handleThrow(root, thrownValue$130); } while (1); lanes && root.shellSuspendCounter++; @@ -10180,8 +10182,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$128) { - handleThrow(root, thrownValue$128); + } catch (thrownValue$132) { + handleThrow(root, thrownValue$132); } while (1); resetContextDependencies(); @@ -10223,8 +10225,6 @@ function replaySuspendedUnitOfWork(unitOfWork) { isProfilingMode = 0 !== (unitOfWork.mode & 2); isProfilingMode && startProfilerTimer(unitOfWork); switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -10549,7 +10549,7 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$105 = commitTime, + commitTime$109 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && @@ -10557,7 +10557,7 @@ function flushPassiveEffects() { id, phase, passiveEffectDuration, - commitTime$105 + commitTime$109 ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { @@ -10788,16 +10788,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -10883,7 +10873,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) fiberTag = 5; @@ -11321,10 +11311,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1176 = { + devToolsConfig$jscomp$inline_1174 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-f31d9db0", + version: "19.0.0-canary-ccea4ec2", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11354,10 +11344,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1176.bundleType, - version: devToolsConfig$jscomp$inline_1176.version, - rendererPackageName: devToolsConfig$jscomp$inline_1176.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1176.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1174.bundleType, + version: devToolsConfig$jscomp$inline_1174.version, + rendererPackageName: devToolsConfig$jscomp$inline_1174.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1174.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11373,14 +11363,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1176.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1174.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-f31d9db0" + reconcilerVersion: "19.0.0-canary-ccea4ec2" }); exports.createPortal = function (children, containerTag) { return createPortal$1( diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 3884198cdb4ff..055c54bcba349 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<22a535e2c48d800961ea18814927a538>> */ "use strict"; @@ -993,8 +993,6 @@ if (__DEV__) { var FunctionComponent = 0; var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. @@ -1021,6 +1019,7 @@ if (__DEV__) { var TracingMarkerComponent = 25; var HostHoistable = 26; var HostSingleton = 27; + var IncompleteFunctionComponent = 28; /** * Instance of element that should respond to touch/move types of interactions, @@ -2971,7 +2970,6 @@ to return true:wantsResponderID| | case ClassComponent: case FunctionComponent: case IncompleteClassComponent: - case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { @@ -6487,7 +6485,6 @@ to return true:wantsResponderID| | return "SuspenseList"; case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: var fn = fiber.type; return fn.displayName || fn.name || null; @@ -8882,7 +8879,6 @@ to return true:wantsResponderID| | return describeBuiltInComponentFrame("SuspenseList", owner); case FunctionComponent: - case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type, owner); @@ -16404,17 +16400,6 @@ to return true:wantsResponderID| | } } - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = false; var unmaskedContext = emptyContextObject; @@ -16490,7 +16475,14 @@ to return true:wantsResponderID| | instance.state !== null && instance.state !== undefined ? instance.state : null); - adoptClassInstance(workInProgress, instance); + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } { if ( @@ -17441,6 +17433,14 @@ to return true:wantsResponderID| | update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } + } else if (sourceFiber.tag === FunctionComponent) { + var _currentSourceFiber = sourceFiber.alternate; + + if (_currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed function component. + sourceFiber.tag = IncompleteFunctionComponent; + } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. @@ -17758,7 +17758,6 @@ to return true:wantsResponderID| | ); var didReceiveUpdate = false; var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; @@ -17769,7 +17768,6 @@ to return true:wantsResponderID| | { didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; @@ -18383,6 +18381,24 @@ to return true:wantsResponderID| | } } + function mountIncompleteFunctionComponent( + _current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); + workInProgress.tag = FunctionComponent; + return updateFunctionComponent( + null, + workInProgress, + Component, + nextProps, + renderLanes + ); + } + function updateFunctionComponent( current, workInProgress, @@ -18390,6 +18406,39 @@ to return true:wantsResponderID| | nextProps, renderLanes ) { + { + if ( + Component.prototype && + typeof Component.prototype.render === "function" + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + + if (!didWarnAboutBadClass[componentName]) { + error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + "This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ); + + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictLegacyMode) { + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + } + + if (current === null) { + // Some validations were previously done in mountIndeterminateComponent however and are now run + // in updateFuntionComponent but only on mount + validateFunctionComponentInDev(workInProgress, workInProgress.type); + } + } + var context; { @@ -18854,70 +18903,68 @@ to return true:wantsResponderID| | var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedTag = (workInProgress.tag = - resolveLazyComponentTag(Component)); var resolvedProps = resolveDefaultProps(Component, props); - var child; - switch (resolvedTag) { - case FunctionComponent: { + if (typeof Component === "function") { + if (isFunctionClassComponent(Component)) { + workInProgress.tag = ClassComponent; + { - validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = - resolveFunctionForHotReloading(Component); + resolveClassForHotReloading(Component); } - child = updateFunctionComponent( + return updateClassComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } + } else { + workInProgress.tag = FunctionComponent; - case ClassComponent: { { + validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = - resolveClassForHotReloading(Component); + resolveFunctionForHotReloading(Component); } - child = updateClassComponent( + return updateFunctionComponent( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; } + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; + + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = ForwardRef; - case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } - child = updateForwardRef( + return updateForwardRef( null, workInProgress, Component, resolvedProps, renderLanes ); - return child; - } - - case MemoComponent: { - child = updateMemoComponent( + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = MemoComponent; + return updateMemoComponent( null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes ); - return child; } } @@ -18979,116 +19026,6 @@ to return true:wantsResponderID| | ); } - function mountIndeterminateComponent( - _current, - workInProgress, - Component, - renderLanes - ) { - resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); - var props = workInProgress.pendingProps; - var context; - - { - var unmaskedContext = getUnmaskedContext( - workInProgress, - Component, - false - ); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - prepareToReadContext(workInProgress, renderLanes); - var value; - - { - markComponentRenderStarted(workInProgress); - } - - { - if ( - Component.prototype && - typeof Component.prototype.render === "function" - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutBadClass[componentName]) { - error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + - "This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictLegacyMode) { - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - } - - setIsRendering(true); - ReactCurrentOwner$2.current = workInProgress; - value = renderWithHooks( - null, - workInProgress, - Component, - props, - context, - renderLanes - ); - setIsRendering(false); - } - - { - markComponentRenderStopped(); - } // React DevTools reads this flag. - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if ( - typeof value === "object" && - value !== null && - typeof value.render === "function" && - value.$$typeof === undefined - ) { - var _componentName = getComponentNameFromType(Component) || "Unknown"; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error( - "The <%s /> component appears to be a function component that returns a class instance. " + - "Change %s to a class that extends React.Component instead. " + - "If you can't use a class try assigning the prototype on the function as a workaround. " + - "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + - "cannot be called with `new` by React.", - _componentName, - _componentName, - _componentName - ); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } // Proceed under the assumption that this is a function component - - workInProgress.tag = FunctionComponent; - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { @@ -19125,33 +19062,32 @@ to return true:wantsResponderID| | } if (Component.defaultProps !== undefined) { - var _componentName2 = - getComponentNameFromType(Component) || "Unknown"; + var _componentName = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) { + if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) { error( "%s: Support for defaultProps will be removed from function components " + "in a future major release. Use JavaScript default parameters instead.", - _componentName2 + _componentName ); - didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true; + didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true; } } if (typeof Component.getDerivedStateFromProps === "function") { - var _componentName3 = + var _componentName2 = getComponentNameFromType(Component) || "Unknown"; if ( - !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] + !didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ) { error( "%s: Function components do not support getDerivedStateFromProps.", - _componentName3 + _componentName2 ); - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; } } @@ -19160,16 +19096,16 @@ to return true:wantsResponderID| | typeof Component.contextType === "object" && Component.contextType !== null ) { - var _componentName4 = + var _componentName3 = getComponentNameFromType(Component) || "Unknown"; - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { error( "%s: Function components do not support contextType.", - _componentName4 + _componentName3 ); - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; } } } @@ -20909,15 +20845,6 @@ to return true:wantsResponderID| | workInProgress.lanes = NoLanes; switch (workInProgress.tag) { - case IndeterminateComponent: { - return mountIndeterminateComponent( - current, - workInProgress, - workInProgress.type, - renderLanes - ); - } - case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent( @@ -21062,6 +20989,24 @@ to return true:wantsResponderID| | ); } + case IncompleteFunctionComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps5 = workInProgress.pendingProps; + + var _resolvedProps5 = + workInProgress.elementType === _Component3 + ? _unresolvedProps5 + : resolveDefaultProps(_Component3, _unresolvedProps5); + + return mountIncompleteFunctionComponent( + current, + workInProgress, + _Component3, + _resolvedProps5, + renderLanes + ); + } + case SuspenseListComponent: { return updateSuspenseListComponent( current, @@ -22065,10 +22010,10 @@ to return true:wantsResponderID| | var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing switch (workInProgress.tag) { - case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: + case IncompleteFunctionComponent: case ForwardRef: case Fragment: case Mode: @@ -28294,12 +28239,6 @@ to return true:wantsResponderID| | } switch (unitOfWork.tag) { - case IndeterminateComponent: { - // Because it suspended with `use`, we can assume it's a - // function component. - unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch. - } - case SimpleMemoComponent: case FunctionComponent: { // Resolve `defaultProps`. This logic is copied from `beginWork`. @@ -29596,7 +29535,6 @@ to return true:wantsResponderID| | var tag = fiber.tag; if ( - tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && @@ -30395,22 +30333,8 @@ to return true:wantsResponderID| | type.defaultProps === undefined ); } - function resolveLazyComponentTag(Component) { - if (typeof Component === "function") { - return shouldConstruct(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; + function isFunctionClassComponent(type) { + return shouldConstruct(type); } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { @@ -30495,7 +30419,6 @@ to return true:wantsResponderID| | workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { - case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); @@ -30614,7 +30537,7 @@ to return true:wantsResponderID| | mode, lanes ) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; @@ -31013,7 +30936,7 @@ to return true:wantsResponderID| | return root; } - var ReactVersion = "19.0.0-canary-753ddd75"; + var ReactVersion = "19.0.0-canary-fcdbf716"; function createPortal$1( children, diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index c419f10142de9..64bf9a09951c7 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<163deabcd1e6ba64ad6f1d1363fcf0c8>> */ "use strict"; @@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_251 = { +var injectedNamesToPlugins$jscomp$inline_255 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_251 = { } } }, - isOrderingDirty$jscomp$inline_252 = !1, - pluginName$jscomp$inline_253; -for (pluginName$jscomp$inline_253 in injectedNamesToPlugins$jscomp$inline_251) + isOrderingDirty$jscomp$inline_256 = !1, + pluginName$jscomp$inline_257; +for (pluginName$jscomp$inline_257 in injectedNamesToPlugins$jscomp$inline_255) if ( - injectedNamesToPlugins$jscomp$inline_251.hasOwnProperty( - pluginName$jscomp$inline_253 + injectedNamesToPlugins$jscomp$inline_255.hasOwnProperty( + pluginName$jscomp$inline_257 ) ) { - var pluginModule$jscomp$inline_254 = - injectedNamesToPlugins$jscomp$inline_251[pluginName$jscomp$inline_253]; + var pluginModule$jscomp$inline_258 = + injectedNamesToPlugins$jscomp$inline_255[pluginName$jscomp$inline_257]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_253) || - namesToPlugins[pluginName$jscomp$inline_253] !== - pluginModule$jscomp$inline_254 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_257) || + namesToPlugins[pluginName$jscomp$inline_257] !== + pluginModule$jscomp$inline_258 ) { - if (namesToPlugins[pluginName$jscomp$inline_253]) + if (namesToPlugins[pluginName$jscomp$inline_257]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_253 + "`.") + (pluginName$jscomp$inline_257 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_253] = - pluginModule$jscomp$inline_254; - isOrderingDirty$jscomp$inline_252 = !0; + namesToPlugins[pluginName$jscomp$inline_257] = + pluginModule$jscomp$inline_258; + isOrderingDirty$jscomp$inline_256 = !0; } } -isOrderingDirty$jscomp$inline_252 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_256 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -1264,7 +1264,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -2836,7 +2835,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return describeFunctionComponentFrame(fiber.type); case 11: @@ -5293,12 +5291,15 @@ function throwException( : ((value.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) : ((value.flags |= 65536), (value.lanes = rootRenderLanes)), wakeable === noopSuspenseyCommitThenable @@ -6542,111 +6543,95 @@ function beginWork(current, workInProgress, renderLanes) { else didReceiveUpdate = !1; workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor$1.current - ); - prepareToReadContext(workInProgress, renderLanes); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - workInProgress.flags |= 1; - workInProgress.tag = 0; - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + elementType + + ". Lazy element type must resolve to a class or function." + ); } - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." - ); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6655,34 +6640,34 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error("Should have a current fiber. This is a bug in React."); var nextProps = workInProgress.pendingProps; - context = workInProgress.memoizedState; - Component = context.element; + init = workInProgress.memoizedState; + elementType = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== context.cache && + nextCache !== init.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextProps.element; - context === Component + init = nextProps.element; + init === elementType ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, context, renderLanes), + : (reconcileChildren(current, workInProgress, init, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: case 27: case 5: pushHostContext(workInProgress); - Component = workInProgress.pendingProps.children; + elementType = workInProgress.pendingProps.children; if (enableAsyncActions && null !== workInProgress.memoizedState) { if (!enableAsyncActions) throw Error("Not implemented."); - context = renderWithHooks( + init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6690,10 +6675,10 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes ); - HostTransitionContext._currentValue = context; + HostTransitionContext._currentValue = init; didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, @@ -6701,7 +6686,7 @@ function beginWork(current, workInProgress, renderLanes) { ); } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: return null; @@ -6713,30 +6698,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6772,17 +6762,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = context.value; - pushProvider(workInProgress, Component, nextCache); + nextCache = init.value; + pushProvider(workInProgress, elementType, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === context.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -6792,39 +6782,35 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), - (Component = Component(context)), + (init = readContext(init)), + (elementType = elementType(init)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6838,29 +6824,47 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 22: @@ -6868,39 +6872,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (context.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (context.pooledCacheLanes |= renderLanes), - (context = nextProps)), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = nextProps.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = nextProps.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -7149,14 +7153,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$71 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$71 = lastTailNode), + for (var lastTailNode$75 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$75 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$71 + null === lastTailNode$75 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$71.sibling = null); + : (lastTailNode$75.sibling = null); } } function bubbleProperties(completedWork) { @@ -7166,19 +7170,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$72 = completedWork.child; null !== child$72; ) - (newChildLanes |= child$72.lanes | child$72.childLanes), - (subtreeFlags |= child$72.subtreeFlags & 31457280), - (subtreeFlags |= child$72.flags & 31457280), - (child$72.return = completedWork), - (child$72 = child$72.sibling); + for (var child$76 = completedWork.child; null !== child$76; ) + (newChildLanes |= child$76.lanes | child$76.childLanes), + (subtreeFlags |= child$76.subtreeFlags & 31457280), + (subtreeFlags |= child$76.flags & 31457280), + (child$76.return = completedWork), + (child$76 = child$76.sibling); else - for (child$72 = completedWork.child; null !== child$72; ) - (newChildLanes |= child$72.lanes | child$72.childLanes), - (subtreeFlags |= child$72.subtreeFlags), - (subtreeFlags |= child$72.flags), - (child$72.return = completedWork), - (child$72 = child$72.sibling); + for (child$76 = completedWork.child; null !== child$76; ) + (newChildLanes |= child$76.lanes | child$76.childLanes), + (subtreeFlags |= child$76.subtreeFlags), + (subtreeFlags |= child$76.flags), + (child$76.return = completedWork), + (child$76 = child$76.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7186,10 +7190,10 @@ function bubbleProperties(completedWork) { function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -7684,8 +7688,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$94) { - captureCommitPhaseError(current, nearestMountedAncestor, error$94); + } catch (error$98) { + captureCommitPhaseError(current, nearestMountedAncestor, error$98); } else ref.current = null; } @@ -7789,10 +7793,10 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$95 = effect.create, + var create$99 = effect.create, inst = effect.inst; - create$95 = create$95(); - inst.destroy = create$95; + create$99 = create$99(); + inst.destroy = create$99; } effect = effect.next; } while (effect !== finishedWork); @@ -7846,11 +7850,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$96) { + } catch (error$100) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$96 + error$100 ); } } @@ -8313,8 +8317,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$104) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$104); + } catch (error$108) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$108); } } break; @@ -8361,8 +8365,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { viewConfig.uiViewClassName, updatePayload ); - } catch (error$107) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$107); + } catch (error$111) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$111); } } break; @@ -8382,8 +8386,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { "RCTRawText", { text: current } ); - } catch (error$108) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$108); + } catch (error$112) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$112); } } break; @@ -8495,11 +8499,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { throw Error("Not yet implemented."); - } catch (error$98) { + } catch (error$102) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$98 + error$102 ); } } else if ( @@ -8573,12 +8577,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$99 = JSCompiler_inline_result.stateNode.containerInfo, - before$100 = getHostSibling(finishedWork); + var parent$103 = JSCompiler_inline_result.stateNode.containerInfo, + before$104 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$100, - parent$99 + before$104, + parent$103 ); break; default: @@ -9696,8 +9700,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$116) { - handleThrow(root, thrownValue$116); + } catch (thrownValue$120) { + handleThrow(root, thrownValue$120); } while (1); lanes && root.shellSuspendCounter++; @@ -9805,8 +9809,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$118) { - handleThrow(root, thrownValue$118); + } catch (thrownValue$122) { + handleThrow(root, thrownValue$122); } while (1); resetContextDependencies(); @@ -9832,8 +9836,6 @@ function performUnitOfWork(unitOfWork) { function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -10306,16 +10308,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -10393,7 +10385,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) fiberTag = 5; @@ -10830,10 +10822,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1161 = { + devToolsConfig$jscomp$inline_1159 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-ff03e3a4", + version: "19.0.0-canary-35fa8c72", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10849,11 +10841,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1412 = { - bundleType: devToolsConfig$jscomp$inline_1161.bundleType, - version: devToolsConfig$jscomp$inline_1161.version, - rendererPackageName: devToolsConfig$jscomp$inline_1161.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1161.rendererConfig, +var internals$jscomp$inline_1407 = { + bundleType: devToolsConfig$jscomp$inline_1159.bundleType, + version: devToolsConfig$jscomp$inline_1159.version, + rendererPackageName: devToolsConfig$jscomp$inline_1159.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1159.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10869,26 +10861,26 @@ var internals$jscomp$inline_1412 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1161.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1159.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-ff03e3a4" + reconcilerVersion: "19.0.0-canary-35fa8c72" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1413 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1408 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1413.isDisabled && - hook$jscomp$inline_1413.supportsFiber + !hook$jscomp$inline_1408.isDisabled && + hook$jscomp$inline_1408.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1413.inject( - internals$jscomp$inline_1412 + (rendererID = hook$jscomp$inline_1408.inject( + internals$jscomp$inline_1407 )), - (injectedHook = hook$jscomp$inline_1413); + (injectedHook = hook$jscomp$inline_1408); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 80ec4035d1e07..57902c2f143a9 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<599385fe4e89c287b93fd54b1bf287f9>> */ "use strict"; @@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_267 = { +var injectedNamesToPlugins$jscomp$inline_271 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_267 = { } } }, - isOrderingDirty$jscomp$inline_268 = !1, - pluginName$jscomp$inline_269; -for (pluginName$jscomp$inline_269 in injectedNamesToPlugins$jscomp$inline_267) + isOrderingDirty$jscomp$inline_272 = !1, + pluginName$jscomp$inline_273; +for (pluginName$jscomp$inline_273 in injectedNamesToPlugins$jscomp$inline_271) if ( - injectedNamesToPlugins$jscomp$inline_267.hasOwnProperty( - pluginName$jscomp$inline_269 + injectedNamesToPlugins$jscomp$inline_271.hasOwnProperty( + pluginName$jscomp$inline_273 ) ) { - var pluginModule$jscomp$inline_270 = - injectedNamesToPlugins$jscomp$inline_267[pluginName$jscomp$inline_269]; + var pluginModule$jscomp$inline_274 = + injectedNamesToPlugins$jscomp$inline_271[pluginName$jscomp$inline_273]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_269) || - namesToPlugins[pluginName$jscomp$inline_269] !== - pluginModule$jscomp$inline_270 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_273) || + namesToPlugins[pluginName$jscomp$inline_273] !== + pluginModule$jscomp$inline_274 ) { - if (namesToPlugins[pluginName$jscomp$inline_269]) + if (namesToPlugins[pluginName$jscomp$inline_273]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_269 + "`.") + (pluginName$jscomp$inline_273 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_269] = - pluginModule$jscomp$inline_270; - isOrderingDirty$jscomp$inline_268 = !0; + namesToPlugins[pluginName$jscomp$inline_273] = + pluginModule$jscomp$inline_274; + isOrderingDirty$jscomp$inline_272 = !0; } } -isOrderingDirty$jscomp$inline_268 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_272 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -1268,7 +1268,6 @@ function getComponentNameFromFiber(fiber) { case 1: case 0: case 17: - case 2: case 14: case 15: if ("function" === typeof type) @@ -2958,7 +2957,6 @@ function describeFiber(fiber) { case 19: return describeBuiltInComponentFrame("SuspenseList"); case 0: - case 2: case 15: return describeFunctionComponentFrame(fiber.type); case 11: @@ -5486,12 +5484,15 @@ function throwException( : ((value.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), - 1 === sourceFiber.tag && - (null === sourceFiber.alternate + 1 === sourceFiber.tag + ? null === sourceFiber.alternate ? (sourceFiber.tag = 17) : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), - enqueueUpdate(sourceFiber, returnFiber, 2))), + enqueueUpdate(sourceFiber, returnFiber, 2)) + : 0 === sourceFiber.tag && + null === sourceFiber.alternate && + (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) : ((value.flags |= 65536), (value.lanes = rootRenderLanes)), wakeable === noopSuspenseyCommitThenable @@ -6766,113 +6767,95 @@ function beginWork(current, workInProgress, renderLanes) { else didReceiveUpdate = !1; workInProgress.lanes = 0; switch (workInProgress.tag) { - case 2: - var Component = workInProgress.type; - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var context = getMaskedContext( - workInProgress, - contextStackCursor$1.current - ); - prepareToReadContext(workInProgress, renderLanes); - markComponentRenderStarted(workInProgress); - current = renderWithHooks( - null, - workInProgress, - Component, - current, - context, - renderLanes - ); - markComponentRenderStopped(); - workInProgress.flags |= 1; - workInProgress.tag = 0; - reconcileChildren(null, workInProgress, current, renderLanes); - return workInProgress.child; case 16: - Component = workInProgress.elementType; + var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); current = workInProgress.pendingProps; - context = Component._init; - Component = context(Component._payload); - workInProgress.type = Component; - context = workInProgress.tag = resolveLazyComponentTag(Component); - current = resolveDefaultProps(Component, current); - switch (context) { - case 0: - workInProgress = updateFunctionComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 1: - workInProgress = updateClassComponent( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 11: - workInProgress = updateForwardRef( - null, - workInProgress, - Component, - current, - renderLanes - ); - break a; - case 14: - workInProgress = updateMemoComponent( - null, - workInProgress, - Component, - resolveDefaultProps(Component.type, current), - renderLanes - ); - break a; + var init = elementType._init; + elementType = init(elementType._payload); + workInProgress.type = elementType; + current = resolveDefaultProps(elementType, current); + if ("function" === typeof elementType) + shouldConstruct(elementType) + ? ((workInProgress.tag = 1), + (workInProgress = updateClassComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))) + : ((workInProgress.tag = 0), + (workInProgress = updateFunctionComponent( + null, + workInProgress, + elementType, + current, + renderLanes + ))); + else { + if (void 0 !== elementType && null !== elementType) + if ( + ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ) { + workInProgress.tag = 11; + workInProgress = updateForwardRef( + null, + workInProgress, + elementType, + current, + renderLanes + ); + break a; + } else if (init === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + elementType, + resolveDefaultProps(elementType.type, current), + renderLanes + ); + break a; + } + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + elementType + + ". Lazy element type must resolve to a class or function." + ); } - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - Component + - ". Lazy element type must resolve to a class or function." - ); } return workInProgress; case 0: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateFunctionComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); case 1: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateClassComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6881,34 +6864,34 @@ function beginWork(current, workInProgress, renderLanes) { if (null === current) throw Error("Should have a current fiber. This is a bug in React."); var nextProps = workInProgress.pendingProps; - context = workInProgress.memoizedState; - Component = context.element; + init = workInProgress.memoizedState; + elementType = init.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== context.cache && + nextCache !== init.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - context = nextProps.element; - context === Component + init = nextProps.element; + init === elementType ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, context, renderLanes), + : (reconcileChildren(current, workInProgress, init, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: case 27: case 5: pushHostContext(workInProgress); - Component = workInProgress.pendingProps.children; + elementType = workInProgress.pendingProps.children; if (enableAsyncActions && null !== workInProgress.memoizedState) { if (!enableAsyncActions) throw Error("Not implemented."); - context = renderWithHooks( + init = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6916,10 +6899,10 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes ); - HostTransitionContext._currentValue = context; + HostTransitionContext._currentValue = init; didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== context && + current.memoizedState.memoizedState !== init && propagateContextChange( workInProgress, HostTransitionContext, @@ -6927,7 +6910,7 @@ function beginWork(current, workInProgress, renderLanes) { ); } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, Component, renderLanes); + reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; case 6: return null; @@ -6939,30 +6922,35 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (Component = workInProgress.pendingProps), + (elementType = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - Component, + elementType, renderLanes )) - : reconcileChildren(current, workInProgress, Component, renderLanes), + : reconcileChildren( + current, + workInProgress, + elementType, + renderLanes + ), workInProgress.child ); case 11: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), updateForwardRef( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -6989,9 +6977,9 @@ function beginWork(current, workInProgress, renderLanes) { case 12: return ( (workInProgress.flags |= 4), - (Component = workInProgress.stateNode), - (Component.effectDuration = 0), - (Component.passiveEffectDuration = 0), + (elementType = workInProgress.stateNode), + (elementType.effectDuration = 0), + (elementType.passiveEffectDuration = 0), reconcileChildren( current, workInProgress, @@ -7002,17 +6990,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - Component = enableRenderableContext + elementType = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - context = workInProgress.pendingProps; + init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = context.value; - pushProvider(workInProgress, Component, nextCache); + nextCache = init.value; + pushProvider(workInProgress, elementType, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === context.children && + nextProps.children === init.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -7022,41 +7010,37 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else propagateContextChange(workInProgress, Component, renderLanes); - reconcileChildren( - current, - workInProgress, - context.children, - renderLanes - ); + } else + propagateContextChange(workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, init.children, renderLanes); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (context = enableRenderableContext + (init = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (Component = workInProgress.pendingProps.children), + (elementType = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (context = readContext(context)), + (init = readContext(init)), markComponentRenderStarted(workInProgress), - (Component = Component(context)), + (elementType = elementType(init)), markComponentRenderStopped(), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, Component, renderLanes), + reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child ); case 14: return ( - (Component = workInProgress.type), - (context = resolveDefaultProps(Component, workInProgress.pendingProps)), - (context = resolveDefaultProps(Component.type, context)), + (elementType = workInProgress.type), + (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), + (init = resolveDefaultProps(elementType.type, init)), updateMemoComponent( current, workInProgress, - Component, - context, + elementType, + init, renderLanes ) ); @@ -7070,29 +7054,47 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (Component = workInProgress.type), - (context = workInProgress.pendingProps), - (context = - workInProgress.elementType === Component - ? context - : resolveDefaultProps(Component, context)), + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(Component) + isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, Component, context), - mountClassInstance(workInProgress, Component, context, renderLanes), + constructClassInstance(workInProgress, elementType, init), + mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( null, workInProgress, - Component, + elementType, !0, current, renderLanes ) ); + case 28: + return ( + (elementType = workInProgress.type), + (init = workInProgress.pendingProps), + (init = + workInProgress.elementType === elementType + ? init + : resolveDefaultProps(elementType, init)), + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), + (workInProgress.tag = 0), + updateFunctionComponent( + null, + workInProgress, + elementType, + init, + renderLanes + ) + ); case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 22: @@ -7100,39 +7102,39 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (Component = readContext(CacheContext)), + (elementType = readContext(CacheContext)), null === current - ? ((context = peekCacheFromPool()), - null === context && - ((context = workInProgressRoot), + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), (nextProps = createCache()), - (context.pooledCache = nextProps), + (init.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (context.pooledCacheLanes |= renderLanes), - (context = nextProps)), + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), (workInProgress.memoizedState = { - parent: Component, - cache: context + parent: elementType, + cache: init }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, context)) + pushProvider(workInProgress, CacheContext, init)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (context = current.memoizedState), + (init = current.memoizedState), (nextProps = workInProgress.memoizedState), - context.parent !== Component - ? ((context = { parent: Component, cache: Component }), - (workInProgress.memoizedState = context), + init.parent !== elementType + ? ((init = { parent: elementType, cache: elementType }), + (workInProgress.memoizedState = init), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - context), - pushProvider(workInProgress, CacheContext, Component)) - : ((Component = nextProps.cache), - pushProvider(workInProgress, CacheContext, Component), - Component !== context.cache && + init), + pushProvider(workInProgress, CacheContext, elementType)) + : ((elementType = nextProps.cache), + pushProvider(workInProgress, CacheContext, elementType), + elementType !== init.cache && propagateContextChange( workInProgress, CacheContext, @@ -7381,14 +7383,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$75 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$75 = lastTailNode), + for (var lastTailNode$79 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$79 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$75 + null === lastTailNode$79 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$75.sibling = null); + : (lastTailNode$79.sibling = null); } } function bubbleProperties(completedWork) { @@ -7400,53 +7402,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$77 = completedWork.selfBaseDuration, - child$78 = completedWork.child; - null !== child$78; + var treeBaseDuration$81 = completedWork.selfBaseDuration, + child$82 = completedWork.child; + null !== child$82; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags & 31457280), - (subtreeFlags |= child$78.flags & 31457280), - (treeBaseDuration$77 += child$78.treeBaseDuration), - (child$78 = child$78.sibling); - completedWork.treeBaseDuration = treeBaseDuration$77; + (newChildLanes |= child$82.lanes | child$82.childLanes), + (subtreeFlags |= child$82.subtreeFlags & 31457280), + (subtreeFlags |= child$82.flags & 31457280), + (treeBaseDuration$81 += child$82.treeBaseDuration), + (child$82 = child$82.sibling); + completedWork.treeBaseDuration = treeBaseDuration$81; } else for ( - treeBaseDuration$77 = completedWork.child; - null !== treeBaseDuration$77; + treeBaseDuration$81 = completedWork.child; + null !== treeBaseDuration$81; ) (newChildLanes |= - treeBaseDuration$77.lanes | treeBaseDuration$77.childLanes), - (subtreeFlags |= treeBaseDuration$77.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$77.flags & 31457280), - (treeBaseDuration$77.return = completedWork), - (treeBaseDuration$77 = treeBaseDuration$77.sibling); + treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), + (subtreeFlags |= treeBaseDuration$81.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$81.flags & 31457280), + (treeBaseDuration$81.return = completedWork), + (treeBaseDuration$81 = treeBaseDuration$81.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$77 = completedWork.actualDuration; - child$78 = completedWork.selfBaseDuration; + treeBaseDuration$81 = completedWork.actualDuration; + child$82 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$77 += child.actualDuration), - (child$78 += child.treeBaseDuration), + (treeBaseDuration$81 += child.actualDuration), + (child$82 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$77; - completedWork.treeBaseDuration = child$78; + completedWork.actualDuration = treeBaseDuration$81; + completedWork.treeBaseDuration = child$82; } else for ( - treeBaseDuration$77 = completedWork.child; - null !== treeBaseDuration$77; + treeBaseDuration$81 = completedWork.child; + null !== treeBaseDuration$81; ) (newChildLanes |= - treeBaseDuration$77.lanes | treeBaseDuration$77.childLanes), - (subtreeFlags |= treeBaseDuration$77.subtreeFlags), - (subtreeFlags |= treeBaseDuration$77.flags), - (treeBaseDuration$77.return = completedWork), - (treeBaseDuration$77 = treeBaseDuration$77.sibling); + treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), + (subtreeFlags |= treeBaseDuration$81.subtreeFlags), + (subtreeFlags |= treeBaseDuration$81.flags), + (treeBaseDuration$81.return = completedWork), + (treeBaseDuration$81 = treeBaseDuration$81.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7454,10 +7456,10 @@ function bubbleProperties(completedWork) { function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; switch (workInProgress.tag) { - case 2: case 16: case 15: case 0: + case 28: case 11: case 7: case 8: @@ -8010,8 +8012,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$103) { - captureCommitPhaseError(current, nearestMountedAncestor, error$103); + } catch (error$107) { + captureCommitPhaseError(current, nearestMountedAncestor, error$107); } else ref.current = null; } @@ -8144,10 +8146,10 @@ function commitHookEffectListMount(flags, finishedWork) { injectedProfilingHooks.markComponentLayoutEffectMountStarted( finishedWork ); - var create$104 = effect.create, + var create$108 = effect.create, inst = effect.inst; - create$104 = create$104(); - inst.destroy = create$104; + create$108 = create$108(); + inst.destroy = create$108; 0 !== (flags & 8) ? null !== injectedProfilingHooks && "function" === @@ -8175,8 +8177,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$106) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$106); + } catch (error$110) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$110); } } function commitClassCallbacks(finishedWork) { @@ -8256,11 +8258,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$107) { + } catch (error$111) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$107 + error$111 ); } else { @@ -8277,11 +8279,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$108) { + } catch (error$112) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$108 + error$112 ); } recordLayoutEffectDuration(finishedWork); @@ -8292,11 +8294,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$109) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$109 + error$113 ); } } @@ -8786,22 +8788,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$118) { + } catch (error$122) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$118 + error$122 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$119) { + } catch (error$123) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$119 + error$123 ); } } @@ -8849,8 +8851,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { viewConfig.uiViewClassName, updatePayload ); - } catch (error$122) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$122); + } catch (error$126) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$126); } } break; @@ -8870,8 +8872,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { "RCTRawText", { text: current } ); - } catch (error$123) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$123); + } catch (error$127) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$127); } } break; @@ -8983,11 +8985,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { throw Error("Not yet implemented."); - } catch (error$112) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$112 + error$116 ); } } else if ( @@ -9061,12 +9063,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$113 = JSCompiler_inline_result.stateNode.containerInfo, - before$114 = getHostSibling(finishedWork); + var parent$117 = JSCompiler_inline_result.stateNode.containerInfo, + before$118 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$114, - parent$113 + before$118, + parent$117 ); break; default: @@ -9252,8 +9254,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$127) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$127); + } catch (error$131) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$131); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -10270,8 +10272,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$132) { - handleThrow(root, thrownValue$132); + } catch (thrownValue$136) { + handleThrow(root, thrownValue$136); } while (1); lanes && root.shellSuspendCounter++; @@ -10390,8 +10392,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$134) { - handleThrow(root, thrownValue$134); + } catch (thrownValue$138) { + handleThrow(root, thrownValue$138); } while (1); resetContextDependencies(); @@ -10433,8 +10435,6 @@ function replaySuspendedUnitOfWork(unitOfWork) { isProfilingMode = 0 !== (unitOfWork.mode & 2); isProfilingMode && startProfilerTimer(unitOfWork); switch (unitOfWork.tag) { - case 2: - unitOfWork.tag = 0; case 15: case 0: var Component = unitOfWork.type, @@ -10759,7 +10759,7 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$105 = commitTime, + commitTime$109 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && @@ -10767,7 +10767,7 @@ function flushPassiveEffects() { id, phase, passiveEffectDuration, - commitTime$105 + commitTime$109 ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { @@ -10998,16 +10998,6 @@ function shouldConstruct(Component) { Component = Component.prototype; return !(!Component || !Component.isReactComponent); } -function resolveLazyComponentTag(Component) { - if ("function" === typeof Component) - return shouldConstruct(Component) ? 1 : 0; - if (void 0 !== Component && null !== Component) { - Component = Component.$$typeof; - if (Component === REACT_FORWARD_REF_TYPE) return 11; - if (Component === REACT_MEMO_TYPE) return 14; - } - return 2; -} function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; null === workInProgress @@ -11093,7 +11083,7 @@ function createFiberFromTypeAndProps( mode, lanes ) { - var fiberTag = 2; + var fiberTag = 0; owner = type; if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); else if ("string" === typeof type) fiberTag = 5; @@ -11538,10 +11528,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1243 = { + devToolsConfig$jscomp$inline_1241 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-9643b497", + version: "19.0.0-canary-553aa6e5", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11571,10 +11561,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1243.bundleType, - version: devToolsConfig$jscomp$inline_1243.version, - rendererPackageName: devToolsConfig$jscomp$inline_1243.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1243.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1241.bundleType, + version: devToolsConfig$jscomp$inline_1241.version, + rendererPackageName: devToolsConfig$jscomp$inline_1241.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1241.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11590,14 +11580,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1243.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1241.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-9643b497" + reconcilerVersion: "19.0.0-canary-553aa6e5" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {