mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix mistaken "react-server" condition (#28835)
This is a Fizz server. DiffTrain build for commit https://github.com/facebook/react/commit/ed4023603632787db6416bee8e85e68d98ad29bd.
This commit is contained in:
+429
-489
File diff suppressed because it is too large
Load Diff
+183
-255
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<432e9d2dc4a6b45da0162dd89f63ecfc>>
|
||||
* @generated SignedSource<<1dd8bb3dc2153d156dd96432dba441cd>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -30,7 +30,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
||||
}
|
||||
var assign = Object.assign,
|
||||
ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
||||
@@ -509,7 +509,6 @@ function markRootEntangled(root, entangledLanes) {
|
||||
rootEntangledLanes &= ~lane;
|
||||
}
|
||||
}
|
||||
var currentUpdatePriority = 0;
|
||||
function lanesToEventPriority(lanes) {
|
||||
lanes &= -lanes;
|
||||
return 2 < lanes
|
||||
@@ -551,7 +550,8 @@ function insertBefore(parentInstance, child, beforeChild) {
|
||||
beforeChild = parentInstance.children.indexOf(beforeChild);
|
||||
parentInstance.children.splice(beforeChild, 0, child);
|
||||
}
|
||||
var scheduleTimeout = setTimeout,
|
||||
var currentUpdatePriority = 0,
|
||||
scheduleTimeout = setTimeout,
|
||||
cancelTimeout = clearTimeout,
|
||||
valueStack = [],
|
||||
index = -1;
|
||||
@@ -654,28 +654,24 @@ function is(x, y) {
|
||||
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
||||
}
|
||||
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
||||
function describeComponentFrame(name, ownerName) {
|
||||
var sourceInfo = "";
|
||||
ownerName && (sourceInfo = " (created by " + ownerName + ")");
|
||||
return "\n in " + (name || "Unknown") + sourceInfo;
|
||||
function describeBuiltInComponentFrame(name) {
|
||||
return "\n in " + (name || "Unknown");
|
||||
}
|
||||
function describeFunctionComponentFrame(fn) {
|
||||
return fn
|
||||
? describeComponentFrame(fn.displayName || fn.name || null, null)
|
||||
: "";
|
||||
return fn ? "\n in " + (fn.displayName || fn.name || "Unknown") : "";
|
||||
}
|
||||
function describeFiber(fiber) {
|
||||
switch (fiber.tag) {
|
||||
case 26:
|
||||
case 27:
|
||||
case 5:
|
||||
return describeComponentFrame(fiber.type, null);
|
||||
return describeBuiltInComponentFrame(fiber.type);
|
||||
case 16:
|
||||
return describeComponentFrame("Lazy", null);
|
||||
return describeBuiltInComponentFrame("Lazy");
|
||||
case 13:
|
||||
return describeComponentFrame("Suspense", null);
|
||||
return describeBuiltInComponentFrame("Suspense");
|
||||
case 19:
|
||||
return describeComponentFrame("SuspenseList", null);
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
case 0:
|
||||
case 15:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
@@ -1388,55 +1384,6 @@ function unwrapThenable(thenable) {
|
||||
null === thenableState$1 && (thenableState$1 = []);
|
||||
return trackUsedThenable(thenableState$1, thenable, index);
|
||||
}
|
||||
function convertStringRefToCallbackRef(
|
||||
returnFiber,
|
||||
current,
|
||||
element,
|
||||
mixedRef
|
||||
) {
|
||||
function ref(value) {
|
||||
var refs = inst.refs;
|
||||
null === value ? delete refs[stringRef] : (refs[stringRef] = value);
|
||||
}
|
||||
var stringRef = "" + mixedRef;
|
||||
returnFiber = element._owner;
|
||||
if (!returnFiber)
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
if (1 !== returnFiber.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = returnFiber.stateNode;
|
||||
if (!inst)
|
||||
throw Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a bug in React. Please file an issue."
|
||||
);
|
||||
if (
|
||||
null !== current &&
|
||||
null !== current.ref &&
|
||||
"function" === typeof current.ref &&
|
||||
current.ref._stringRef === stringRef
|
||||
)
|
||||
return current.ref;
|
||||
ref._stringRef = stringRef;
|
||||
return ref;
|
||||
}
|
||||
function coerceRef(returnFiber, current, workInProgress, element) {
|
||||
var mixedRef = element.ref;
|
||||
returnFiber =
|
||||
"string" === typeof mixedRef ||
|
||||
"number" === typeof mixedRef ||
|
||||
"boolean" === typeof mixedRef
|
||||
? convertStringRefToCallbackRef(returnFiber, current, element, mixedRef)
|
||||
: mixedRef;
|
||||
workInProgress.ref = returnFiber;
|
||||
}
|
||||
function throwOnInvalidObjectType(returnFiber, newChild) {
|
||||
returnFiber = Object.prototype.toString.call(newChild);
|
||||
throw Error(
|
||||
@@ -1532,12 +1479,12 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
resolveLazy(elementType) === current.type))
|
||||
)
|
||||
return (
|
||||
(lanes = useFiber(current, element.props)),
|
||||
coerceRef(returnFiber, current, lanes, element),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
(current = useFiber(current, element.props)),
|
||||
(current.ref = element.ref),
|
||||
(current.return = returnFiber),
|
||||
current
|
||||
);
|
||||
lanes = createFiberFromTypeAndProps(
|
||||
current = createFiberFromTypeAndProps(
|
||||
element.type,
|
||||
element.key,
|
||||
element.props,
|
||||
@@ -1545,9 +1492,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
coerceRef(returnFiber, current, lanes, element);
|
||||
lanes.return = returnFiber;
|
||||
return lanes;
|
||||
current.ref = element.ref;
|
||||
current.return = returnFiber;
|
||||
return current;
|
||||
}
|
||||
function updatePortal(returnFiber, current, portal, lanes) {
|
||||
if (
|
||||
@@ -1608,7 +1555,7 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, null, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
);
|
||||
@@ -1948,52 +1895,54 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
switch (newChild.$$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
a: {
|
||||
for (
|
||||
var key = newChild.key, child = currentFirstChild;
|
||||
null !== child;
|
||||
|
||||
) {
|
||||
if (child.key === key) {
|
||||
for (var key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key) {
|
||||
key = newChild.type;
|
||||
if (key === REACT_FRAGMENT_TYPE) {
|
||||
if (7 === child.tag) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(
|
||||
child,
|
||||
if (7 === currentFirstChild.tag) {
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.props.children
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
} else if (
|
||||
child.elementType === key ||
|
||||
currentFirstChild.elementType === key ||
|
||||
("object" === typeof key &&
|
||||
null !== key &&
|
||||
key.$$typeof === REACT_LAZY_TYPE &&
|
||||
resolveLazy(key) === child.type)
|
||||
resolveLazy(key) === currentFirstChild.type)
|
||||
) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(child, newChild.props);
|
||||
coerceRef(returnFiber, child, currentFirstChild, newChild);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(currentFirstChild, newChild.props);
|
||||
lanes.ref = newChild.ref;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
deleteRemainingChildren(returnFiber, child);
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
break;
|
||||
} else deleteChild(returnFiber, child);
|
||||
child = child.sibling;
|
||||
} else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
newChild.type === REACT_FRAGMENT_TYPE
|
||||
? ((currentFirstChild = createFiberFromFragment(
|
||||
? ((lanes = createFiberFromFragment(
|
||||
newChild.props.children,
|
||||
returnFiber.mode,
|
||||
lanes,
|
||||
newChild.key
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: ((lanes = createFiberFromTypeAndProps(
|
||||
newChild.type,
|
||||
newChild.key,
|
||||
@@ -2002,15 +1951,15 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, currentFirstChild, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes));
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_PORTAL_TYPE:
|
||||
a: {
|
||||
for (child = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === child)
|
||||
for (key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key)
|
||||
if (
|
||||
4 === currentFirstChild.tag &&
|
||||
currentFirstChild.stateNode.containerInfo ===
|
||||
@@ -2022,12 +1971,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
currentFirstChild = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.children || []
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = useFiber(currentFirstChild, newChild.children || []);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
} else {
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
@@ -2036,22 +1982,18 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
currentFirstChild = createFiberFromPortal(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_LAZY_TYPE:
|
||||
return (
|
||||
(child = newChild._init),
|
||||
(key = newChild._init),
|
||||
reconcileChildFibersImpl(
|
||||
returnFiber,
|
||||
currentFirstChild,
|
||||
child(newChild._payload),
|
||||
key(newChild._payload),
|
||||
lanes
|
||||
)
|
||||
);
|
||||
@@ -2092,17 +2034,13 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
? ((newChild = "" + newChild),
|
||||
null !== currentFirstChild && 6 === currentFirstChild.tag
|
||||
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
|
||||
(currentFirstChild = useFiber(currentFirstChild, newChild)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes = useFiber(currentFirstChild, newChild)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: (deleteRemainingChildren(returnFiber, currentFirstChild),
|
||||
(currentFirstChild = createFiberFromText(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild)),
|
||||
(lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes)),
|
||||
placeSingleChild(returnFiber))
|
||||
: deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
}
|
||||
@@ -2195,9 +2133,7 @@ function findFirstSuspended(row) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
renderLanes = 0,
|
||||
var renderLanes = 0,
|
||||
currentlyRenderingFiber$1 = null,
|
||||
currentHook = null,
|
||||
workInProgressHook = null,
|
||||
@@ -2231,7 +2167,7 @@ function renderWithHooks(
|
||||
workInProgress.memoizedState = null;
|
||||
workInProgress.updateQueue = null;
|
||||
workInProgress.lanes = 0;
|
||||
ReactCurrentDispatcher$1.current =
|
||||
ReactSharedInternals.H =
|
||||
null === current || null === current.memoizedState
|
||||
? HooksDispatcherOnMount
|
||||
: HooksDispatcherOnUpdate;
|
||||
@@ -2249,7 +2185,7 @@ function renderWithHooks(
|
||||
return current;
|
||||
}
|
||||
function finishRenderingHooks() {
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
|
||||
renderLanes = 0;
|
||||
workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
|
||||
@@ -2275,16 +2211,22 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
|
||||
numberOfReRenders += 1;
|
||||
workInProgressHook = currentHook = null;
|
||||
workInProgress.updateQueue = null;
|
||||
ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender;
|
||||
ReactSharedInternals.H = HooksDispatcherOnRerender;
|
||||
var children = Component(props, secondArg);
|
||||
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
||||
return children;
|
||||
}
|
||||
function TransitionAwareHostComponent() {
|
||||
var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0];
|
||||
return "function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
var dispatcher = ReactSharedInternals.H,
|
||||
maybeThenable = dispatcher.useState()[0];
|
||||
maybeThenable =
|
||||
"function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
dispatcher = dispatcher.useState()[0];
|
||||
(null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
|
||||
(currentlyRenderingFiber$1.flags |= 1024);
|
||||
return maybeThenable;
|
||||
}
|
||||
function bailoutHooks(current, workInProgress, lanes) {
|
||||
workInProgress.updateQueue = current.updateQueue;
|
||||
@@ -2372,7 +2314,7 @@ function useThenable(thenable) {
|
||||
(null === workInProgressHook
|
||||
? null === currentlyRenderingFiber$1.memoizedState
|
||||
: null === workInProgressHook.next) &&
|
||||
(ReactCurrentDispatcher$1.current = HooksDispatcherOnMount);
|
||||
(ReactSharedInternals.H = HooksDispatcherOnMount);
|
||||
return thenable;
|
||||
}
|
||||
function use(usable) {
|
||||
@@ -2672,9 +2614,9 @@ function dispatchActionState(
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
ReactCurrentBatchConfig$2.transition = currentTransition;
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
try {
|
||||
var returnValue = action(prevState, payload);
|
||||
@@ -2707,7 +2649,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
setState({ then: function () {}, status: "rejected", reason: error }),
|
||||
finishRunningActionStateAction(actionQueue, setPendingState, setState);
|
||||
} finally {
|
||||
ReactCurrentBatchConfig$2.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
}
|
||||
function finishRunningActionStateAction(
|
||||
@@ -2916,26 +2858,24 @@ function updateMemo(nextCreate, deps) {
|
||||
hook.memoizedState = [prevState, deps];
|
||||
return prevState;
|
||||
}
|
||||
function mountDeferredValueImpl(hook, value, initialValue) {
|
||||
if (void 0 === initialValue || 0 !== (renderLanes & 1073741824))
|
||||
return (hook.memoizedState = value);
|
||||
hook.memoizedState = initialValue;
|
||||
hook = requestDeferredLane();
|
||||
currentlyRenderingFiber$1.lanes |= hook;
|
||||
workInProgressRootSkippedLanes |= hook;
|
||||
return initialValue;
|
||||
}
|
||||
function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
|
||||
function updateDeferredValueImpl(hook, prevValue, value) {
|
||||
if (objectIs(value, prevValue)) return value;
|
||||
if (null !== currentTreeHiddenStackCursor.current)
|
||||
return (
|
||||
(hook = mountDeferredValueImpl(hook, value, initialValue)),
|
||||
objectIs(hook, prevValue) || (didReceiveUpdate = !0),
|
||||
hook
|
||||
(hook.memoizedState = value),
|
||||
objectIs(value, prevValue) || (didReceiveUpdate = !0),
|
||||
value
|
||||
);
|
||||
if (0 === (renderLanes & 42))
|
||||
return (didReceiveUpdate = !0), (hook.memoizedState = value);
|
||||
hook = requestDeferredLane();
|
||||
0 === workInProgressDeferredLane &&
|
||||
(workInProgressDeferredLane =
|
||||
0 !== (workInProgressRootRenderLanes & 536870912)
|
||||
? 536870912
|
||||
: claimNextTransitionLane());
|
||||
hook = suspenseHandlerStackCursor.current;
|
||||
null !== hook && (hook.flags |= 32);
|
||||
hook = workInProgressDeferredLane;
|
||||
currentlyRenderingFiber$1.lanes |= hook;
|
||||
workInProgressRootSkippedLanes |= hook;
|
||||
return prevValue;
|
||||
@@ -2944,9 +2884,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
var previousPriority = currentUpdatePriority;
|
||||
currentUpdatePriority =
|
||||
0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
|
||||
var prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
ReactCurrentBatchConfig$2.transition = currentTransition;
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
dispatchOptimisticSetState(fiber, !1, queue, pendingState);
|
||||
try {
|
||||
var returnValue = callback();
|
||||
@@ -2970,7 +2910,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
});
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig$2.transition = prevTransition);
|
||||
(ReactSharedInternals.T = prevTransition);
|
||||
}
|
||||
}
|
||||
function useHostTransitionStatus() {
|
||||
@@ -3198,9 +3138,9 @@ var HooksDispatcherOnMount = {
|
||||
return [initialState.memoizedState, dispatch];
|
||||
},
|
||||
useDebugValue: mountDebugValue,
|
||||
useDeferredValue: function (value, initialValue) {
|
||||
var hook = mountWorkInProgressHook();
|
||||
return mountDeferredValueImpl(hook, value, initialValue);
|
||||
useDeferredValue: function (value) {
|
||||
mountWorkInProgressHook().memoizedState = value;
|
||||
return value;
|
||||
},
|
||||
useTransition: function () {
|
||||
var stateHook = mountStateImpl(!1);
|
||||
@@ -3295,14 +3235,9 @@ var HooksDispatcherOnUpdate = {
|
||||
return updateReducer(basicStateReducer);
|
||||
},
|
||||
useDebugValue: mountDebugValue,
|
||||
useDeferredValue: function (value, initialValue) {
|
||||
useDeferredValue: function (value) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
return updateDeferredValueImpl(
|
||||
hook,
|
||||
currentHook.memoizedState,
|
||||
value,
|
||||
initialValue
|
||||
);
|
||||
return updateDeferredValueImpl(hook, currentHook.memoizedState, value);
|
||||
},
|
||||
useTransition: function () {
|
||||
var booleanOrThenable = updateReducer(basicStateReducer)[0],
|
||||
@@ -3342,16 +3277,11 @@ var HooksDispatcherOnRerender = {
|
||||
return rerenderReducer(basicStateReducer);
|
||||
},
|
||||
useDebugValue: mountDebugValue,
|
||||
useDeferredValue: function (value, initialValue) {
|
||||
useDeferredValue: function (value) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
return null === currentHook
|
||||
? mountDeferredValueImpl(hook, value, initialValue)
|
||||
: updateDeferredValueImpl(
|
||||
hook,
|
||||
currentHook.memoizedState,
|
||||
value,
|
||||
initialValue
|
||||
);
|
||||
? ((hook.memoizedState = value), value)
|
||||
: updateDeferredValueImpl(hook, currentHook.memoizedState, value);
|
||||
},
|
||||
useTransition: function () {
|
||||
var booleanOrThenable = rerenderReducer(basicStateReducer)[0],
|
||||
@@ -3534,7 +3464,7 @@ function resolveClassComponentProps(
|
||||
) {
|
||||
var newProps = baseProps;
|
||||
if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) {
|
||||
newProps = assign({}, newProps, baseProps);
|
||||
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
|
||||
for (var propName in Component)
|
||||
void 0 === newProps[propName] &&
|
||||
(newProps[propName] = Component[propName]);
|
||||
@@ -3806,8 +3736,7 @@ function throwException(
|
||||
} while (null !== returnFiber);
|
||||
return !1;
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
|
||||
SelectiveHydrationException = Error(
|
||||
var SelectiveHydrationException = Error(
|
||||
"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
|
||||
),
|
||||
didReceiveUpdate = !1;
|
||||
@@ -4022,8 +3951,22 @@ function markRef(current, workInProgress) {
|
||||
throw Error(
|
||||
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
|
||||
);
|
||||
if (null === current || current.ref !== ref)
|
||||
if (null === current || current.ref !== ref) {
|
||||
if (
|
||||
null !== current &&
|
||||
((current = current.ref),
|
||||
"function" === typeof current &&
|
||||
"function" === typeof ref &&
|
||||
"string" === typeof current.__stringRef &&
|
||||
current.__stringRef === ref.__stringRef &&
|
||||
current.__stringRefType === ref.__stringRefType &&
|
||||
current.__stringRefOwner === ref.__stringRefOwner)
|
||||
) {
|
||||
workInProgress.ref = current;
|
||||
return;
|
||||
}
|
||||
workInProgress.flags |= 2097664;
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateFunctionComponent(
|
||||
@@ -4304,7 +4247,7 @@ function finishClassComponent(
|
||||
bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
||||
);
|
||||
shouldUpdate = workInProgress.stateNode;
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
ReactSharedInternals.owner = workInProgress;
|
||||
var nextChildren =
|
||||
didCaptureError && "function" !== typeof Component.getDerivedStateFromError
|
||||
? null
|
||||
@@ -5500,9 +5443,8 @@ function releaseCache(cache) {
|
||||
cache.controller.abort();
|
||||
});
|
||||
}
|
||||
var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
|
||||
function requestCurrentTransition() {
|
||||
var transition = ReactCurrentBatchConfig$1.transition;
|
||||
var transition = ReactSharedInternals.T;
|
||||
null !== transition && transition._callbacks.add(handleAsyncAction);
|
||||
return transition;
|
||||
}
|
||||
@@ -6586,7 +6528,7 @@ function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
|
||||
captureCommitPhaseError(childToDelete, parentFiber, error);
|
||||
}
|
||||
}
|
||||
if (parentFiber.subtreeFlags & 12854)
|
||||
if (parentFiber.subtreeFlags & 13878)
|
||||
for (parentFiber = parentFiber.child; null !== parentFiber; )
|
||||
commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
|
||||
(parentFiber = parentFiber.sibling);
|
||||
@@ -7445,10 +7387,6 @@ var DefaultCacheDispatcher = {
|
||||
}
|
||||
},
|
||||
PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
|
||||
ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentCache = ReactSharedInternals.ReactCurrentCache,
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
executionContext = 0,
|
||||
workInProgressRoot = null,
|
||||
workInProgress = null,
|
||||
@@ -7485,18 +7423,8 @@ function requestUpdateLane(fiber) {
|
||||
(fiber = currentEntangledLane),
|
||||
0 !== fiber ? fiber : requestTransitionLane()
|
||||
);
|
||||
fiber = currentUpdatePriority;
|
||||
return 0 !== fiber ? fiber : 32;
|
||||
}
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
(workInProgressDeferredLane =
|
||||
0 !== (workInProgressRootRenderLanes & 536870912)
|
||||
? 536870912
|
||||
: claimNextTransitionLane());
|
||||
var suspenseHandler = suspenseHandlerStackCursor.current;
|
||||
null !== suspenseHandler && (suspenseHandler.flags |= 32);
|
||||
return workInProgressDeferredLane;
|
||||
fiber = 0 !== currentUpdatePriority ? currentUpdatePriority : 32;
|
||||
return fiber;
|
||||
}
|
||||
function scheduleUpdateOnFiber(root, fiber, lane) {
|
||||
if (
|
||||
@@ -7564,13 +7492,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root,
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
if (
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
)),
|
||||
(renderWasConcurrent = !1),
|
||||
2 !== exitStatus)
|
||||
)
|
||||
continue;
|
||||
}
|
||||
if (1 === exitStatus) {
|
||||
prepareFreshStack(root, 0);
|
||||
@@ -7795,25 +7728,21 @@ function performSyncWorkOnRoot(root, lanes) {
|
||||
ensureRootIsScheduled(root);
|
||||
return null;
|
||||
}
|
||||
function flushSync(fn) {
|
||||
function flushSyncFromReconciler(fn) {
|
||||
null !== rootWithPendingPassiveEffects &&
|
||||
0 === rootWithPendingPassiveEffects.tag &&
|
||||
0 === (executionContext & 6) &&
|
||||
flushPassiveEffects();
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 1;
|
||||
var prevTransition = ReactCurrentBatchConfig.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
previousPriority = currentUpdatePriority;
|
||||
try {
|
||||
if (
|
||||
((ReactCurrentBatchConfig.transition = null),
|
||||
(currentUpdatePriority = 2),
|
||||
fn)
|
||||
)
|
||||
if (((currentUpdatePriority = 2), (ReactSharedInternals.T = null), fn))
|
||||
return fn();
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig.transition = prevTransition),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
(executionContext = prevExecutionContext),
|
||||
0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(!1);
|
||||
}
|
||||
@@ -7879,8 +7808,8 @@ function prepareFreshStack(root, lanes) {
|
||||
}
|
||||
function handleThrow(root, thrownValue) {
|
||||
currentlyRenderingFiber$1 = null;
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.owner = null;
|
||||
if (thrownValue === SuspenseException) {
|
||||
thrownValue = getSuspendedThenable();
|
||||
var handler = suspenseHandlerStackCursor.current;
|
||||
@@ -7918,13 +7847,13 @@ function handleThrow(root, thrownValue) {
|
||||
));
|
||||
}
|
||||
function pushDispatcher() {
|
||||
var prevDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = ContextOnlyDispatcher;
|
||||
var prevDispatcher = ReactSharedInternals.H;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
|
||||
}
|
||||
function pushCacheDispatcher() {
|
||||
var prevCacheDispatcher = ReactCurrentCache.current;
|
||||
ReactCurrentCache.current = DefaultCacheDispatcher;
|
||||
var prevCacheDispatcher = ReactSharedInternals.C;
|
||||
ReactSharedInternals.C = DefaultCacheDispatcher;
|
||||
return prevCacheDispatcher;
|
||||
}
|
||||
function renderDidSuspendDelayIfPossible() {
|
||||
@@ -7976,8 +7905,8 @@ function renderRootSync(root, lanes) {
|
||||
lanes && root.shellSuspendCounter++;
|
||||
resetContextDependencies();
|
||||
executionContext = prevExecutionContext;
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
if (null !== workInProgress)
|
||||
throw Error(
|
||||
"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."
|
||||
@@ -8083,8 +8012,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
executionContext = prevExecutionContext;
|
||||
if (null !== workInProgress) return 0;
|
||||
workInProgressRoot = null;
|
||||
@@ -8100,7 +8029,7 @@ function performUnitOfWork(unitOfWork) {
|
||||
var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);
|
||||
unitOfWork.memoizedProps = unitOfWork.pendingProps;
|
||||
null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
var current = unitOfWork.alternate;
|
||||
@@ -8154,7 +8083,7 @@ function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
null === current
|
||||
? completeUnitOfWork(unitOfWork)
|
||||
: (workInProgress = current);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {
|
||||
resetContextDependencies();
|
||||
@@ -8241,11 +8170,11 @@ function commitRoot(
|
||||
didIncludeRenderPhaseUpdate,
|
||||
spawnedLane
|
||||
) {
|
||||
var previousUpdateLanePriority = currentUpdatePriority,
|
||||
prevTransition = ReactCurrentBatchConfig.transition;
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
previousUpdateLanePriority = currentUpdatePriority;
|
||||
try {
|
||||
(ReactCurrentBatchConfig.transition = null),
|
||||
(currentUpdatePriority = 2),
|
||||
(currentUpdatePriority = 2),
|
||||
(ReactSharedInternals.T = null),
|
||||
commitRootImpl(
|
||||
root,
|
||||
recoverableErrors,
|
||||
@@ -8255,7 +8184,7 @@ function commitRoot(
|
||||
spawnedLane
|
||||
);
|
||||
} finally {
|
||||
(ReactCurrentBatchConfig.transition = prevTransition),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
(currentUpdatePriority = previousUpdateLanePriority);
|
||||
}
|
||||
return null;
|
||||
@@ -8302,13 +8231,13 @@ function commitRootImpl(
|
||||
}));
|
||||
transitions = 0 !== (finishedWork.flags & 15990);
|
||||
if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) {
|
||||
transitions = ReactCurrentBatchConfig.transition;
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
transitions = ReactSharedInternals.T;
|
||||
ReactSharedInternals.T = null;
|
||||
spawnedLane = currentUpdatePriority;
|
||||
currentUpdatePriority = 2;
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 4;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
commitBeforeMutationEffects(root, finishedWork);
|
||||
commitMutationEffectsOnFiber(finishedWork, root);
|
||||
root.current = finishedWork;
|
||||
@@ -8316,7 +8245,7 @@ function commitRootImpl(
|
||||
requestPaint();
|
||||
executionContext = prevExecutionContext;
|
||||
currentUpdatePriority = spawnedLane;
|
||||
ReactCurrentBatchConfig.transition = transitions;
|
||||
ReactSharedInternals.T = transitions;
|
||||
} else root.current = finishedWork;
|
||||
rootDoesHavePassiveEffects
|
||||
? ((rootDoesHavePassiveEffects = !1),
|
||||
@@ -8361,16 +8290,15 @@ function flushPassiveEffects() {
|
||||
remainingLanes = pendingPassiveEffectsRemainingLanes;
|
||||
pendingPassiveEffectsRemainingLanes = 0;
|
||||
var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
|
||||
priority = 32 > renderPriority ? 32 : renderPriority;
|
||||
renderPriority = ReactCurrentBatchConfig.transition;
|
||||
var previousPriority = currentUpdatePriority;
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
previousPriority = currentUpdatePriority;
|
||||
try {
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
currentUpdatePriority = priority;
|
||||
currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
|
||||
ReactSharedInternals.T = null;
|
||||
if (null === rootWithPendingPassiveEffects)
|
||||
var JSCompiler_inline_result = !1;
|
||||
else {
|
||||
priority = pendingPassiveTransitions;
|
||||
renderPriority = pendingPassiveTransitions;
|
||||
pendingPassiveTransitions = null;
|
||||
var root$jscomp$0 = rootWithPendingPassiveEffects,
|
||||
lanes = pendingPassiveEffectsLanes;
|
||||
@@ -8385,7 +8313,7 @@ function flushPassiveEffects() {
|
||||
root$jscomp$0,
|
||||
root$jscomp$0.current,
|
||||
lanes,
|
||||
priority
|
||||
renderPriority
|
||||
);
|
||||
executionContext = prevExecutionContext;
|
||||
flushSyncWorkAcrossRoots_impl(!1);
|
||||
@@ -8401,7 +8329,7 @@ function flushPassiveEffects() {
|
||||
return JSCompiler_inline_result;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig.transition = renderPriority),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
releaseRootPooledCache(root, remainingLanes);
|
||||
}
|
||||
}
|
||||
@@ -9211,19 +9139,19 @@ function wrapFiber(fiber) {
|
||||
fiberToWrapper.set(fiber, wrapper));
|
||||
return wrapper;
|
||||
}
|
||||
var devToolsConfig$jscomp$inline_995 = {
|
||||
var devToolsConfig$jscomp$inline_1019 = {
|
||||
findFiberByHostInstance: function () {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "19.0.0-canary-0689007c",
|
||||
version: "19.0.0-canary-5154cd5b",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1185 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_995.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_995.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_995.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_995.rendererConfig,
|
||||
var internals$jscomp$inline_1238 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1019.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1019.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1019.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1019.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -9233,33 +9161,33 @@ var internals$jscomp$inline_1185 = {
|
||||
setErrorHandler: null,
|
||||
setSuspenseHandler: null,
|
||||
scheduleUpdate: null,
|
||||
currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findHostInstanceByFiber: function (fiber) {
|
||||
fiber = findCurrentFiberUsingSlowPath(fiber);
|
||||
fiber = null !== fiber ? findCurrentHostFiberImpl(fiber) : null;
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_995.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1019.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-canary-0689007c"
|
||||
reconcilerVersion: "19.0.0-canary-5154cd5b"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1186 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1239 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1186.isDisabled &&
|
||||
hook$jscomp$inline_1186.supportsFiber
|
||||
!hook$jscomp$inline_1239.isDisabled &&
|
||||
hook$jscomp$inline_1239.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1186.inject(
|
||||
internals$jscomp$inline_1185
|
||||
(rendererID = hook$jscomp$inline_1239.inject(
|
||||
internals$jscomp$inline_1238
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1186);
|
||||
(injectedHook = hook$jscomp$inline_1239);
|
||||
} catch (err) {}
|
||||
}
|
||||
exports._Scheduler = Scheduler;
|
||||
@@ -9359,7 +9287,7 @@ exports.create = function (element, options) {
|
||||
}
|
||||
return JSCompiler_inline_result;
|
||||
},
|
||||
unstable_flushSync: flushSync
|
||||
unstable_flushSync: flushSyncFromReconciler
|
||||
};
|
||||
Object.defineProperty(element, "root", {
|
||||
configurable: !0,
|
||||
|
||||
+160
-210
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<c03b4f2580a3f28e5204dac43fdc8e39>>
|
||||
* @generated SignedSource<<479c2ca549cdf886d9b952949809f126>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -30,7 +30,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
||||
}
|
||||
var assign = Object.assign,
|
||||
ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
||||
@@ -597,7 +597,6 @@ function markRootEntangled(root, entangledLanes) {
|
||||
rootEntangledLanes &= ~lane;
|
||||
}
|
||||
}
|
||||
var currentUpdatePriority = 0;
|
||||
function lanesToEventPriority(lanes) {
|
||||
lanes &= -lanes;
|
||||
return 2 < lanes
|
||||
@@ -639,7 +638,8 @@ function insertBefore(parentInstance, child, beforeChild) {
|
||||
beforeChild = parentInstance.children.indexOf(beforeChild);
|
||||
parentInstance.children.splice(beforeChild, 0, child);
|
||||
}
|
||||
var scheduleTimeout = setTimeout,
|
||||
var currentUpdatePriority = 0,
|
||||
scheduleTimeout = setTimeout,
|
||||
cancelTimeout = clearTimeout,
|
||||
valueStack = [],
|
||||
index = -1;
|
||||
@@ -742,28 +742,24 @@ function is(x, y) {
|
||||
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
||||
}
|
||||
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
||||
function describeComponentFrame(name, ownerName) {
|
||||
var sourceInfo = "";
|
||||
ownerName && (sourceInfo = " (created by " + ownerName + ")");
|
||||
return "\n in " + (name || "Unknown") + sourceInfo;
|
||||
function describeBuiltInComponentFrame(name) {
|
||||
return "\n in " + (name || "Unknown");
|
||||
}
|
||||
function describeFunctionComponentFrame(fn) {
|
||||
return fn
|
||||
? describeComponentFrame(fn.displayName || fn.name || null, null)
|
||||
: "";
|
||||
return fn ? "\n in " + (fn.displayName || fn.name || "Unknown") : "";
|
||||
}
|
||||
function describeFiber(fiber) {
|
||||
switch (fiber.tag) {
|
||||
case 26:
|
||||
case 27:
|
||||
case 5:
|
||||
return describeComponentFrame(fiber.type, null);
|
||||
return describeBuiltInComponentFrame(fiber.type);
|
||||
case 16:
|
||||
return describeComponentFrame("Lazy", null);
|
||||
return describeBuiltInComponentFrame("Lazy");
|
||||
case 13:
|
||||
return describeComponentFrame("Suspense", null);
|
||||
return describeBuiltInComponentFrame("Suspense");
|
||||
case 19:
|
||||
return describeComponentFrame("SuspenseList", null);
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
case 0:
|
||||
case 15:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
@@ -1476,55 +1472,6 @@ function unwrapThenable(thenable) {
|
||||
null === thenableState$1 && (thenableState$1 = []);
|
||||
return trackUsedThenable(thenableState$1, thenable, index);
|
||||
}
|
||||
function convertStringRefToCallbackRef(
|
||||
returnFiber,
|
||||
current,
|
||||
element,
|
||||
mixedRef
|
||||
) {
|
||||
function ref(value) {
|
||||
var refs = inst.refs;
|
||||
null === value ? delete refs[stringRef] : (refs[stringRef] = value);
|
||||
}
|
||||
var stringRef = "" + mixedRef;
|
||||
returnFiber = element._owner;
|
||||
if (!returnFiber)
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
if (1 !== returnFiber.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = returnFiber.stateNode;
|
||||
if (!inst)
|
||||
throw Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a bug in React. Please file an issue."
|
||||
);
|
||||
if (
|
||||
null !== current &&
|
||||
null !== current.ref &&
|
||||
"function" === typeof current.ref &&
|
||||
current.ref._stringRef === stringRef
|
||||
)
|
||||
return current.ref;
|
||||
ref._stringRef = stringRef;
|
||||
return ref;
|
||||
}
|
||||
function coerceRef(returnFiber, current, workInProgress, element) {
|
||||
var mixedRef = element.ref;
|
||||
returnFiber =
|
||||
"string" === typeof mixedRef ||
|
||||
"number" === typeof mixedRef ||
|
||||
"boolean" === typeof mixedRef
|
||||
? convertStringRefToCallbackRef(returnFiber, current, element, mixedRef)
|
||||
: mixedRef;
|
||||
workInProgress.ref = returnFiber;
|
||||
}
|
||||
function throwOnInvalidObjectType(returnFiber, newChild) {
|
||||
returnFiber = Object.prototype.toString.call(newChild);
|
||||
throw Error(
|
||||
@@ -1620,12 +1567,12 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
resolveLazy(elementType) === current.type))
|
||||
)
|
||||
return (
|
||||
(lanes = useFiber(current, element.props)),
|
||||
coerceRef(returnFiber, current, lanes, element),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
(current = useFiber(current, element.props)),
|
||||
(current.ref = element.ref),
|
||||
(current.return = returnFiber),
|
||||
current
|
||||
);
|
||||
lanes = createFiberFromTypeAndProps(
|
||||
current = createFiberFromTypeAndProps(
|
||||
element.type,
|
||||
element.key,
|
||||
element.props,
|
||||
@@ -1633,9 +1580,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
coerceRef(returnFiber, current, lanes, element);
|
||||
lanes.return = returnFiber;
|
||||
return lanes;
|
||||
current.ref = element.ref;
|
||||
current.return = returnFiber;
|
||||
return current;
|
||||
}
|
||||
function updatePortal(returnFiber, current, portal, lanes) {
|
||||
if (
|
||||
@@ -1696,7 +1643,7 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, null, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
);
|
||||
@@ -2036,52 +1983,54 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
switch (newChild.$$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
a: {
|
||||
for (
|
||||
var key = newChild.key, child = currentFirstChild;
|
||||
null !== child;
|
||||
|
||||
) {
|
||||
if (child.key === key) {
|
||||
for (var key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key) {
|
||||
key = newChild.type;
|
||||
if (key === REACT_FRAGMENT_TYPE) {
|
||||
if (7 === child.tag) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(
|
||||
child,
|
||||
if (7 === currentFirstChild.tag) {
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.props.children
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
} else if (
|
||||
child.elementType === key ||
|
||||
currentFirstChild.elementType === key ||
|
||||
("object" === typeof key &&
|
||||
null !== key &&
|
||||
key.$$typeof === REACT_LAZY_TYPE &&
|
||||
resolveLazy(key) === child.type)
|
||||
resolveLazy(key) === currentFirstChild.type)
|
||||
) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(child, newChild.props);
|
||||
coerceRef(returnFiber, child, currentFirstChild, newChild);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(currentFirstChild, newChild.props);
|
||||
lanes.ref = newChild.ref;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
deleteRemainingChildren(returnFiber, child);
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
break;
|
||||
} else deleteChild(returnFiber, child);
|
||||
child = child.sibling;
|
||||
} else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
newChild.type === REACT_FRAGMENT_TYPE
|
||||
? ((currentFirstChild = createFiberFromFragment(
|
||||
? ((lanes = createFiberFromFragment(
|
||||
newChild.props.children,
|
||||
returnFiber.mode,
|
||||
lanes,
|
||||
newChild.key
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: ((lanes = createFiberFromTypeAndProps(
|
||||
newChild.type,
|
||||
newChild.key,
|
||||
@@ -2090,15 +2039,15 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, currentFirstChild, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes));
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_PORTAL_TYPE:
|
||||
a: {
|
||||
for (child = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === child)
|
||||
for (key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key)
|
||||
if (
|
||||
4 === currentFirstChild.tag &&
|
||||
currentFirstChild.stateNode.containerInfo ===
|
||||
@@ -2110,12 +2059,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
currentFirstChild = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.children || []
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = useFiber(currentFirstChild, newChild.children || []);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
} else {
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
@@ -2124,22 +2070,18 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
currentFirstChild = createFiberFromPortal(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_LAZY_TYPE:
|
||||
return (
|
||||
(child = newChild._init),
|
||||
(key = newChild._init),
|
||||
reconcileChildFibersImpl(
|
||||
returnFiber,
|
||||
currentFirstChild,
|
||||
child(newChild._payload),
|
||||
key(newChild._payload),
|
||||
lanes
|
||||
)
|
||||
);
|
||||
@@ -2180,17 +2122,13 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
? ((newChild = "" + newChild),
|
||||
null !== currentFirstChild && 6 === currentFirstChild.tag
|
||||
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
|
||||
(currentFirstChild = useFiber(currentFirstChild, newChild)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes = useFiber(currentFirstChild, newChild)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: (deleteRemainingChildren(returnFiber, currentFirstChild),
|
||||
(currentFirstChild = createFiberFromText(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild)),
|
||||
(lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes)),
|
||||
placeSingleChild(returnFiber))
|
||||
: deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
}
|
||||
@@ -2283,9 +2221,7 @@ function findFirstSuspended(row) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
renderLanes = 0,
|
||||
var renderLanes = 0,
|
||||
currentlyRenderingFiber$1 = null,
|
||||
currentHook = null,
|
||||
workInProgressHook = null,
|
||||
@@ -2319,7 +2255,7 @@ function renderWithHooks(
|
||||
workInProgress.memoizedState = null;
|
||||
workInProgress.updateQueue = null;
|
||||
workInProgress.lanes = 0;
|
||||
ReactCurrentDispatcher$1.current =
|
||||
ReactSharedInternals.H =
|
||||
null === current || null === current.memoizedState
|
||||
? HooksDispatcherOnMount
|
||||
: HooksDispatcherOnUpdate;
|
||||
@@ -2337,7 +2273,7 @@ function renderWithHooks(
|
||||
return current;
|
||||
}
|
||||
function finishRenderingHooks() {
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
|
||||
renderLanes = 0;
|
||||
workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
|
||||
@@ -2363,16 +2299,22 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
|
||||
numberOfReRenders += 1;
|
||||
workInProgressHook = currentHook = null;
|
||||
workInProgress.updateQueue = null;
|
||||
ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender;
|
||||
ReactSharedInternals.H = HooksDispatcherOnRerender;
|
||||
var children = Component(props, secondArg);
|
||||
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
||||
return children;
|
||||
}
|
||||
function TransitionAwareHostComponent() {
|
||||
var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0];
|
||||
return "function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
var dispatcher = ReactSharedInternals.H,
|
||||
maybeThenable = dispatcher.useState()[0];
|
||||
maybeThenable =
|
||||
"function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
dispatcher = dispatcher.useState()[0];
|
||||
(null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
|
||||
(currentlyRenderingFiber$1.flags |= 1024);
|
||||
return maybeThenable;
|
||||
}
|
||||
function bailoutHooks(current, workInProgress, lanes) {
|
||||
workInProgress.updateQueue = current.updateQueue;
|
||||
@@ -2460,7 +2402,7 @@ function useThenable(thenable) {
|
||||
(null === workInProgressHook
|
||||
? null === currentlyRenderingFiber$1.memoizedState
|
||||
: null === workInProgressHook.next) &&
|
||||
(ReactCurrentDispatcher$1.current = HooksDispatcherOnMount);
|
||||
(ReactSharedInternals.H = HooksDispatcherOnMount);
|
||||
return thenable;
|
||||
}
|
||||
function use(usable) {
|
||||
@@ -2760,9 +2702,9 @@ function dispatchActionState(
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
ReactCurrentBatchConfig$2.transition = currentTransition;
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
try {
|
||||
var returnValue = action(prevState, payload);
|
||||
@@ -2795,7 +2737,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
setState({ then: function () {}, status: "rejected", reason: error }),
|
||||
finishRunningActionStateAction(actionQueue, setPendingState, setState);
|
||||
} finally {
|
||||
ReactCurrentBatchConfig$2.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
}
|
||||
function finishRunningActionStateAction(
|
||||
@@ -3032,9 +2974,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
var previousPriority = currentUpdatePriority;
|
||||
currentUpdatePriority =
|
||||
0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
|
||||
var prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
ReactCurrentBatchConfig$2.transition = currentTransition;
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
dispatchOptimisticSetState(fiber, !1, queue, pendingState);
|
||||
try {
|
||||
var returnValue = callback();
|
||||
@@ -3058,7 +3000,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
});
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig$2.transition = prevTransition);
|
||||
(ReactSharedInternals.T = prevTransition);
|
||||
}
|
||||
}
|
||||
function useHostTransitionStatus() {
|
||||
@@ -3692,7 +3634,7 @@ function resolveClassComponentProps(
|
||||
) {
|
||||
var newProps = baseProps;
|
||||
if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) {
|
||||
newProps = assign({}, newProps, baseProps);
|
||||
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
|
||||
for (var propName in Component)
|
||||
void 0 === newProps[propName] &&
|
||||
(newProps[propName] = Component[propName]);
|
||||
@@ -3964,8 +3906,7 @@ function throwException(
|
||||
} while (null !== returnFiber);
|
||||
return !1;
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
|
||||
SelectiveHydrationException = Error(
|
||||
var SelectiveHydrationException = Error(
|
||||
"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
|
||||
),
|
||||
didReceiveUpdate = !1;
|
||||
@@ -4182,8 +4123,22 @@ function markRef(current, workInProgress) {
|
||||
throw Error(
|
||||
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
|
||||
);
|
||||
if (null === current || current.ref !== ref)
|
||||
if (null === current || current.ref !== ref) {
|
||||
if (
|
||||
null !== current &&
|
||||
((current = current.ref),
|
||||
"function" === typeof current &&
|
||||
"function" === typeof ref &&
|
||||
"string" === typeof current.__stringRef &&
|
||||
current.__stringRef === ref.__stringRef &&
|
||||
current.__stringRefType === ref.__stringRefType &&
|
||||
current.__stringRefOwner === ref.__stringRefOwner)
|
||||
) {
|
||||
workInProgress.ref = current;
|
||||
return;
|
||||
}
|
||||
workInProgress.flags |= 2097664;
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateFunctionComponent(
|
||||
@@ -4468,7 +4423,7 @@ function finishClassComponent(
|
||||
bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
||||
);
|
||||
shouldUpdate = workInProgress.stateNode;
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
ReactSharedInternals.owner = workInProgress;
|
||||
if (
|
||||
didCaptureError &&
|
||||
"function" !== typeof Component.getDerivedStateFromError
|
||||
@@ -5695,9 +5650,8 @@ function releaseCache(cache) {
|
||||
cache.controller.abort();
|
||||
});
|
||||
}
|
||||
var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
|
||||
function requestCurrentTransition() {
|
||||
var transition = ReactCurrentBatchConfig$1.transition;
|
||||
var transition = ReactSharedInternals.T;
|
||||
null !== transition && transition._callbacks.add(handleAsyncAction);
|
||||
return transition;
|
||||
}
|
||||
@@ -7000,7 +6954,7 @@ function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
|
||||
captureCommitPhaseError(childToDelete, parentFiber, error);
|
||||
}
|
||||
}
|
||||
if (parentFiber.subtreeFlags & 12854)
|
||||
if (parentFiber.subtreeFlags & 13878)
|
||||
for (parentFiber = parentFiber.child; null !== parentFiber; )
|
||||
commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
|
||||
(parentFiber = parentFiber.sibling);
|
||||
@@ -7915,10 +7869,6 @@ var DefaultCacheDispatcher = {
|
||||
}
|
||||
},
|
||||
PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
|
||||
ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentCache = ReactSharedInternals.ReactCurrentCache,
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
executionContext = 0,
|
||||
workInProgressRoot = null,
|
||||
workInProgress = null,
|
||||
@@ -7956,8 +7906,8 @@ function requestUpdateLane(fiber) {
|
||||
(fiber = currentEntangledLane),
|
||||
0 !== fiber ? fiber : requestTransitionLane()
|
||||
);
|
||||
fiber = currentUpdatePriority;
|
||||
return 0 !== fiber ? fiber : 32;
|
||||
fiber = 0 !== currentUpdatePriority ? currentUpdatePriority : 32;
|
||||
return fiber;
|
||||
}
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
@@ -8036,13 +7986,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root,
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
if (
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
)),
|
||||
(renderWasConcurrent = !1),
|
||||
2 !== exitStatus)
|
||||
)
|
||||
continue;
|
||||
}
|
||||
if (1 === exitStatus) {
|
||||
prepareFreshStack(root, 0);
|
||||
@@ -8269,25 +8224,21 @@ function performSyncWorkOnRoot(root, lanes) {
|
||||
ensureRootIsScheduled(root);
|
||||
return null;
|
||||
}
|
||||
function flushSync(fn) {
|
||||
function flushSyncFromReconciler(fn) {
|
||||
null !== rootWithPendingPassiveEffects &&
|
||||
0 === rootWithPendingPassiveEffects.tag &&
|
||||
0 === (executionContext & 6) &&
|
||||
flushPassiveEffects();
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 1;
|
||||
var prevTransition = ReactCurrentBatchConfig.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
previousPriority = currentUpdatePriority;
|
||||
try {
|
||||
if (
|
||||
((ReactCurrentBatchConfig.transition = null),
|
||||
(currentUpdatePriority = 2),
|
||||
fn)
|
||||
)
|
||||
if (((currentUpdatePriority = 2), (ReactSharedInternals.T = null), fn))
|
||||
return fn();
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig.transition = prevTransition),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
(executionContext = prevExecutionContext),
|
||||
0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(!1);
|
||||
}
|
||||
@@ -8353,8 +8304,8 @@ function prepareFreshStack(root, lanes) {
|
||||
}
|
||||
function handleThrow(root, thrownValue) {
|
||||
currentlyRenderingFiber$1 = null;
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.owner = null;
|
||||
if (thrownValue === SuspenseException) {
|
||||
thrownValue = getSuspendedThenable();
|
||||
var handler = suspenseHandlerStackCursor.current;
|
||||
@@ -8421,13 +8372,13 @@ function handleThrow(root, thrownValue) {
|
||||
}
|
||||
}
|
||||
function pushDispatcher() {
|
||||
var prevDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = ContextOnlyDispatcher;
|
||||
var prevDispatcher = ReactSharedInternals.H;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
|
||||
}
|
||||
function pushCacheDispatcher() {
|
||||
var prevCacheDispatcher = ReactCurrentCache.current;
|
||||
ReactCurrentCache.current = DefaultCacheDispatcher;
|
||||
var prevCacheDispatcher = ReactSharedInternals.C;
|
||||
ReactSharedInternals.C = DefaultCacheDispatcher;
|
||||
return prevCacheDispatcher;
|
||||
}
|
||||
function renderDidSuspendDelayIfPossible() {
|
||||
@@ -8480,8 +8431,8 @@ function renderRootSync(root, lanes) {
|
||||
lanes && root.shellSuspendCounter++;
|
||||
resetContextDependencies();
|
||||
executionContext = prevExecutionContext;
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
if (null !== workInProgress)
|
||||
throw Error(
|
||||
"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."
|
||||
@@ -8589,8 +8540,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
executionContext = prevExecutionContext;
|
||||
if (null !== workInProgress)
|
||||
return (
|
||||
@@ -8620,7 +8571,7 @@ function performUnitOfWork(unitOfWork) {
|
||||
null === current
|
||||
? completeUnitOfWork(unitOfWork)
|
||||
: (workInProgress = current);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
var current = unitOfWork.alternate,
|
||||
@@ -8677,7 +8628,7 @@ function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
null === current
|
||||
? completeUnitOfWork(unitOfWork)
|
||||
: (workInProgress = current);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {
|
||||
resetContextDependencies();
|
||||
@@ -8773,11 +8724,11 @@ function commitRoot(
|
||||
didIncludeRenderPhaseUpdate,
|
||||
spawnedLane
|
||||
) {
|
||||
var previousUpdateLanePriority = currentUpdatePriority,
|
||||
prevTransition = ReactCurrentBatchConfig.transition;
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
previousUpdateLanePriority = currentUpdatePriority;
|
||||
try {
|
||||
(ReactCurrentBatchConfig.transition = null),
|
||||
(currentUpdatePriority = 2),
|
||||
(currentUpdatePriority = 2),
|
||||
(ReactSharedInternals.T = null),
|
||||
commitRootImpl(
|
||||
root,
|
||||
recoverableErrors,
|
||||
@@ -8787,7 +8738,7 @@ function commitRoot(
|
||||
spawnedLane
|
||||
);
|
||||
} finally {
|
||||
(ReactCurrentBatchConfig.transition = prevTransition),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
(currentUpdatePriority = previousUpdateLanePriority);
|
||||
}
|
||||
return null;
|
||||
@@ -8837,13 +8788,13 @@ function commitRootImpl(
|
||||
}));
|
||||
transitions = 0 !== (finishedWork.flags & 15990);
|
||||
if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) {
|
||||
transitions = ReactCurrentBatchConfig.transition;
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
transitions = ReactSharedInternals.T;
|
||||
ReactSharedInternals.T = null;
|
||||
spawnedLane = currentUpdatePriority;
|
||||
currentUpdatePriority = 2;
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 4;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
commitBeforeMutationEffects(root, finishedWork);
|
||||
commitTime = now();
|
||||
commitMutationEffectsOnFiber(finishedWork, root);
|
||||
@@ -8860,7 +8811,7 @@ function commitRootImpl(
|
||||
requestPaint();
|
||||
executionContext = prevExecutionContext;
|
||||
currentUpdatePriority = spawnedLane;
|
||||
ReactCurrentBatchConfig.transition = transitions;
|
||||
ReactSharedInternals.T = transitions;
|
||||
} else (root.current = finishedWork), (commitTime = now());
|
||||
rootDoesHavePassiveEffects
|
||||
? ((rootDoesHavePassiveEffects = !1),
|
||||
@@ -8907,18 +8858,17 @@ function flushPassiveEffects() {
|
||||
remainingLanes = pendingPassiveEffectsRemainingLanes;
|
||||
pendingPassiveEffectsRemainingLanes = 0;
|
||||
var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
|
||||
priority = 32 > renderPriority ? 32 : renderPriority;
|
||||
renderPriority = ReactCurrentBatchConfig.transition;
|
||||
var previousPriority = currentUpdatePriority;
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
previousPriority = currentUpdatePriority;
|
||||
try {
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
currentUpdatePriority = priority;
|
||||
currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
|
||||
ReactSharedInternals.T = null;
|
||||
if (null === rootWithPendingPassiveEffects)
|
||||
var JSCompiler_inline_result = !1;
|
||||
else {
|
||||
var transitions = pendingPassiveTransitions;
|
||||
pendingPassiveTransitions = null;
|
||||
priority = rootWithPendingPassiveEffects;
|
||||
renderPriority = rootWithPendingPassiveEffects;
|
||||
var lanes = pendingPassiveEffectsLanes;
|
||||
rootWithPendingPassiveEffects = null;
|
||||
pendingPassiveEffectsLanes = 0;
|
||||
@@ -8930,10 +8880,10 @@ function flushPassiveEffects() {
|
||||
injectedProfilingHooks.markPassiveEffectsStarted(lanes);
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 4;
|
||||
commitPassiveUnmountOnFiber(priority.current);
|
||||
commitPassiveUnmountOnFiber(renderPriority.current);
|
||||
commitPassiveMountOnFiber(
|
||||
priority,
|
||||
priority.current,
|
||||
renderPriority,
|
||||
renderPriority.current,
|
||||
lanes,
|
||||
transitions
|
||||
);
|
||||
@@ -8981,9 +8931,9 @@ function flushPassiveEffects() {
|
||||
"function" === typeof injectedHook.onPostCommitFiberRoot
|
||||
)
|
||||
try {
|
||||
injectedHook.onPostCommitFiberRoot(rendererID, priority);
|
||||
injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
|
||||
} catch (err) {}
|
||||
var stateNode = priority.current.stateNode;
|
||||
var stateNode = renderPriority.current.stateNode;
|
||||
stateNode.effectDuration = 0;
|
||||
stateNode.passiveEffectDuration = 0;
|
||||
JSCompiler_inline_result = !0;
|
||||
@@ -8991,7 +8941,7 @@ function flushPassiveEffects() {
|
||||
return JSCompiler_inline_result;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig.transition = renderPriority),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
releaseRootPooledCache(root, remainingLanes);
|
||||
}
|
||||
}
|
||||
@@ -9827,12 +9777,12 @@ function wrapFiber(fiber) {
|
||||
fiberToWrapper.set(fiber, wrapper));
|
||||
return wrapper;
|
||||
}
|
||||
var devToolsConfig$jscomp$inline_1079 = {
|
||||
var devToolsConfig$jscomp$inline_1082 = {
|
||||
findFiberByHostInstance: function () {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "19.0.0-canary-3aa3c53d",
|
||||
version: "19.0.0-canary-2a177f7f",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
(function (internals) {
|
||||
@@ -9849,10 +9799,10 @@ var devToolsConfig$jscomp$inline_1079 = {
|
||||
} catch (err) {}
|
||||
return hook.checkDCE ? !0 : !1;
|
||||
})({
|
||||
bundleType: devToolsConfig$jscomp$inline_1079.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1079.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1079.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1079.rendererConfig,
|
||||
bundleType: devToolsConfig$jscomp$inline_1082.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1082.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1082.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1082.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -9862,21 +9812,21 @@ var devToolsConfig$jscomp$inline_1079 = {
|
||||
setErrorHandler: null,
|
||||
setSuspenseHandler: null,
|
||||
scheduleUpdate: null,
|
||||
currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findHostInstanceByFiber: function (fiber) {
|
||||
fiber = findCurrentFiberUsingSlowPath(fiber);
|
||||
fiber = null !== fiber ? findCurrentHostFiberImpl(fiber) : null;
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1079.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1082.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-canary-3aa3c53d"
|
||||
reconcilerVersion: "19.0.0-canary-2a177f7f"
|
||||
});
|
||||
exports._Scheduler = Scheduler;
|
||||
exports.act = act;
|
||||
@@ -9975,7 +9925,7 @@ exports.create = function (element, options) {
|
||||
}
|
||||
return JSCompiler_inline_result;
|
||||
},
|
||||
unstable_flushSync: flushSync
|
||||
unstable_flushSync: flushSyncFromReconciler
|
||||
};
|
||||
Object.defineProperty(element, "root", {
|
||||
configurable: !0,
|
||||
|
||||
+330
-89
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<a8afda57718ad3b33cfb6599aaf37407>>
|
||||
* @generated SignedSource<<7bcb460fce55ee6870184e537edd4d8f>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -57,7 +57,7 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
var ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
function error(format) {
|
||||
{
|
||||
@@ -81,9 +81,7 @@ if (__DEV__) {
|
||||
// When changing this logic, you might want to also
|
||||
// update consoleWithStackDev.www.js as well.
|
||||
{
|
||||
var ReactDebugCurrentFrame =
|
||||
ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
||||
var stack = ReactSharedInternals.getStackAddendum();
|
||||
|
||||
if (stack !== "") {
|
||||
format += "%s";
|
||||
@@ -116,7 +114,7 @@ if (__DEV__) {
|
||||
var enableLegacyHidden = false;
|
||||
var enableTransitionTracing = false;
|
||||
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
function getWrappedName$1(outerType, innerType, wrapperName) {
|
||||
var displayName = outerType.displayName;
|
||||
|
||||
if (displayName) {
|
||||
@@ -129,7 +127,7 @@ if (__DEV__) {
|
||||
: wrapperName;
|
||||
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
||||
|
||||
function getContextName(type) {
|
||||
function getContextName$1(type) {
|
||||
return type.displayName || "Context";
|
||||
}
|
||||
|
||||
@@ -190,28 +188,28 @@ if (__DEV__) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
return getContextName$1(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
return getContextName$1(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
|
||||
case REACT_MEMO_TYPE:
|
||||
var outerName = type.displayName || null;
|
||||
@@ -317,6 +315,20 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
}
|
||||
function checkPropStringCoercion(value, propName) {
|
||||
{
|
||||
if (willCoercionThrow(value)) {
|
||||
error(
|
||||
"The provided `%s` prop is an unsupported type %s." +
|
||||
" This value must be coerced to a string before using it here.",
|
||||
propName,
|
||||
typeName(value)
|
||||
);
|
||||
|
||||
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference");
|
||||
function isValidElementType(type) {
|
||||
@@ -463,9 +475,8 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
||||
var prefix;
|
||||
function describeBuiltInComponentFrame(name, ownerFn) {
|
||||
function describeBuiltInComponentFrame(name) {
|
||||
if (enableComponentStackLocations) {
|
||||
if (prefix === undefined) {
|
||||
// Extract the VM specific prefix used by each line.
|
||||
@@ -479,13 +490,7 @@ if (__DEV__) {
|
||||
|
||||
return "\n" + prefix + name;
|
||||
} else {
|
||||
var ownerName = null;
|
||||
|
||||
if (ownerFn) {
|
||||
ownerName = ownerFn.displayName || ownerFn.name || null;
|
||||
}
|
||||
|
||||
return describeComponentFrame(name, ownerName);
|
||||
return describeComponentFrame(name);
|
||||
}
|
||||
}
|
||||
var reentry = false;
|
||||
@@ -525,13 +530,13 @@ if (__DEV__) {
|
||||
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.
|
||||
|
||||
Error.prepareStackTrace = undefined;
|
||||
var previousDispatcher;
|
||||
var previousDispatcher = null;
|
||||
|
||||
{
|
||||
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
||||
previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function
|
||||
// for warnings.
|
||||
|
||||
ReactCurrentDispatcher.current = null;
|
||||
ReactSharedInternals.H = null;
|
||||
disableLogs();
|
||||
}
|
||||
/**
|
||||
@@ -724,7 +729,7 @@ if (__DEV__) {
|
||||
reentry = false;
|
||||
|
||||
{
|
||||
ReactCurrentDispatcher.current = previousDispatcher;
|
||||
ReactSharedInternals.H = previousDispatcher;
|
||||
reenableLogs();
|
||||
}
|
||||
|
||||
@@ -743,16 +748,10 @@ if (__DEV__) {
|
||||
return syntheticFrame;
|
||||
}
|
||||
|
||||
function describeComponentFrame(name, ownerName) {
|
||||
var sourceInfo = "";
|
||||
|
||||
if (ownerName) {
|
||||
sourceInfo = " (created by " + ownerName + ")";
|
||||
}
|
||||
|
||||
return "\n in " + (name || "Unknown") + sourceInfo;
|
||||
function describeComponentFrame(name) {
|
||||
return "\n in " + (name || "Unknown");
|
||||
}
|
||||
function describeFunctionComponentFrame(fn, ownerFn) {
|
||||
function describeFunctionComponentFrame(fn) {
|
||||
if (enableComponentStackLocations) {
|
||||
return describeNativeComponentFrame(fn, false);
|
||||
} else {
|
||||
@@ -761,13 +760,7 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
var name = fn.displayName || fn.name || null;
|
||||
var ownerName = null;
|
||||
|
||||
if (ownerFn) {
|
||||
ownerName = ownerFn.displayName || ownerFn.name || null;
|
||||
}
|
||||
|
||||
return describeComponentFrame(name, ownerName);
|
||||
return describeComponentFrame(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -776,7 +769,7 @@ if (__DEV__) {
|
||||
return !!(prototype && prototype.isReactComponent);
|
||||
}
|
||||
|
||||
function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
||||
function describeUnknownElementTypeFrameInDEV(type) {
|
||||
if (type == null) {
|
||||
return "";
|
||||
}
|
||||
@@ -785,30 +778,30 @@ if (__DEV__) {
|
||||
if (enableComponentStackLocations) {
|
||||
return describeNativeComponentFrame(type, shouldConstruct(type));
|
||||
} else {
|
||||
return describeFunctionComponentFrame(type, ownerFn);
|
||||
return describeFunctionComponentFrame(type);
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof type === "string") {
|
||||
return describeBuiltInComponentFrame(type, ownerFn);
|
||||
return describeBuiltInComponentFrame(type);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return describeBuiltInComponentFrame("Suspense", ownerFn);
|
||||
return describeBuiltInComponentFrame("Suspense");
|
||||
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return describeBuiltInComponentFrame("SuspenseList", ownerFn);
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
}
|
||||
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return describeFunctionComponentFrame(type.render, ownerFn);
|
||||
return describeFunctionComponentFrame(type.render);
|
||||
|
||||
case REACT_MEMO_TYPE:
|
||||
// Memo may contain any component type so we recursively resolve it.
|
||||
return describeUnknownElementTypeFrameInDEV(type.type, ownerFn);
|
||||
return describeUnknownElementTypeFrameInDEV(type.type);
|
||||
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
@@ -817,10 +810,7 @@ if (__DEV__) {
|
||||
|
||||
try {
|
||||
// Lazy may contain any component type so we recursively resolve it.
|
||||
return describeUnknownElementTypeFrameInDEV(
|
||||
init(payload),
|
||||
ownerFn
|
||||
);
|
||||
return describeUnknownElementTypeFrameInDEV(init(payload));
|
||||
} catch (x) {}
|
||||
}
|
||||
}
|
||||
@@ -829,8 +819,152 @@ if (__DEV__) {
|
||||
return "";
|
||||
}
|
||||
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
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.
|
||||
|
||||
var HostComponent = 5;
|
||||
var HostText = 6;
|
||||
var Fragment = 7;
|
||||
var Mode = 8;
|
||||
var ContextConsumer = 9;
|
||||
var ContextProvider = 10;
|
||||
var ForwardRef = 11;
|
||||
var Profiler = 12;
|
||||
var SuspenseComponent = 13;
|
||||
var MemoComponent = 14;
|
||||
var SimpleMemoComponent = 15;
|
||||
var LazyComponent = 16;
|
||||
var IncompleteClassComponent = 17;
|
||||
var DehydratedFragment = 18;
|
||||
var SuspenseListComponent = 19;
|
||||
var ScopeComponent = 21;
|
||||
var OffscreenComponent = 22;
|
||||
var CacheComponent = 24;
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
var functionName = innerType.displayName || innerType.name || "";
|
||||
return (
|
||||
outerType.displayName ||
|
||||
(functionName !== ""
|
||||
? wrapperName + "(" + functionName + ")"
|
||||
: wrapperName)
|
||||
);
|
||||
} // Keep in sync with shared/getComponentNameFromType
|
||||
|
||||
function getContextName(type) {
|
||||
return type.displayName || "Context";
|
||||
}
|
||||
function getComponentNameFromFiber(fiber) {
|
||||
var tag = fiber.tag,
|
||||
type = fiber.type;
|
||||
|
||||
switch (tag) {
|
||||
case CacheComponent:
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
return getContextName(_context) + ".Provider";
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
|
||||
case ForwardRef:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
|
||||
case Fragment:
|
||||
return "Fragment";
|
||||
|
||||
case HostHoistable:
|
||||
case HostSingleton:
|
||||
case HostComponent:
|
||||
// Host component type is the display name (e.g. "div", "View")
|
||||
return type;
|
||||
|
||||
case HostPortal:
|
||||
return "Portal";
|
||||
|
||||
case HostRoot:
|
||||
return "Root";
|
||||
|
||||
case HostText:
|
||||
return "Text";
|
||||
|
||||
case LazyComponent:
|
||||
// Name comes from the type in this case; we don't have a tag.
|
||||
return getComponentNameFromType(type);
|
||||
|
||||
case Mode:
|
||||
if (type === REACT_STRICT_MODE_TYPE) {
|
||||
// Don't be less specific than shared/getComponentNameFromType
|
||||
return "StrictMode";
|
||||
}
|
||||
|
||||
return "Mode";
|
||||
|
||||
case OffscreenComponent:
|
||||
return "Offscreen";
|
||||
|
||||
case Profiler:
|
||||
return "Profiler";
|
||||
|
||||
case ScopeComponent:
|
||||
return "Scope";
|
||||
|
||||
case SuspenseComponent:
|
||||
return "Suspense";
|
||||
|
||||
case SuspenseListComponent:
|
||||
return "SuspenseList";
|
||||
|
||||
case TracingMarkerComponent:
|
||||
return "TracingMarker";
|
||||
// The display name for these tags come from the user-provided type:
|
||||
|
||||
case IncompleteClassComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
|
||||
// Fallthrough
|
||||
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
return type.displayName || type.name || null;
|
||||
}
|
||||
|
||||
if (typeof type === "string") {
|
||||
return type;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
@@ -872,12 +1006,12 @@ if (__DEV__) {
|
||||
{
|
||||
if (
|
||||
typeof config.ref === "string" &&
|
||||
ReactCurrentOwner.current &&
|
||||
ReactSharedInternals.owner &&
|
||||
self &&
|
||||
ReactCurrentOwner.current.stateNode !== self
|
||||
ReactSharedInternals.owner.stateNode !== self
|
||||
) {
|
||||
var componentName = getComponentNameFromType(
|
||||
ReactCurrentOwner.current.type
|
||||
ReactSharedInternals.owner.type
|
||||
);
|
||||
|
||||
if (!didWarnAboutStringRefs[componentName]) {
|
||||
@@ -888,7 +1022,7 @@ if (__DEV__) {
|
||||
"We ask you to manually fix this case by using useRef() or createRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://react.dev/link/strict-mode-string-ref",
|
||||
getComponentNameFromType(ReactCurrentOwner.current.type),
|
||||
getComponentNameFromType(ReactSharedInternals.owner.type),
|
||||
config.ref
|
||||
);
|
||||
|
||||
@@ -1141,9 +1275,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
var propName; // Reserved names are extracted
|
||||
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
||||
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
||||
@@ -1171,20 +1302,32 @@ if (__DEV__) {
|
||||
if (hasValidRef(config)) {
|
||||
{
|
||||
ref = config.ref;
|
||||
|
||||
{
|
||||
ref = coerceStringRef(ref, ReactSharedInternals.owner, type);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
}
|
||||
} // Remaining properties are added to a new props object
|
||||
}
|
||||
|
||||
for (propName in config) {
|
||||
if (
|
||||
hasOwnProperty.call(config, propName) && // Skip over reserved prop names
|
||||
propName !== "key" &&
|
||||
propName !== "ref"
|
||||
) {
|
||||
props[propName] = config[propName];
|
||||
var props;
|
||||
|
||||
{
|
||||
// We need to remove reserved props (key, prop, ref). Create a fresh props
|
||||
// object and copy over all the non-reserved props. We don't use `delete`
|
||||
// because in V8 it will deopt the object to dictionary mode.
|
||||
props = {};
|
||||
|
||||
for (var propName in config) {
|
||||
// Skip over reserved prop names
|
||||
if (propName !== "key" && propName !== "ref") {
|
||||
{
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1193,9 +1336,9 @@ if (__DEV__) {
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === undefined) {
|
||||
props[propName] = defaultProps[propName];
|
||||
for (var _propName2 in defaultProps) {
|
||||
if (props[_propName2] === undefined) {
|
||||
props[_propName2] = defaultProps[_propName2];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1222,7 +1365,7 @@ if (__DEV__) {
|
||||
ref,
|
||||
self,
|
||||
source,
|
||||
ReactCurrentOwner.current,
|
||||
ReactSharedInternals.owner,
|
||||
props
|
||||
);
|
||||
|
||||
@@ -1236,8 +1379,8 @@ if (__DEV__) {
|
||||
|
||||
function getDeclarationErrorAddendum() {
|
||||
{
|
||||
if (ReactCurrentOwner.current) {
|
||||
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
||||
if (ReactSharedInternals.owner) {
|
||||
var name = getComponentNameFromType(ReactSharedInternals.owner.type);
|
||||
|
||||
if (name) {
|
||||
return "\n\nCheck the render method of `" + name + "`.";
|
||||
@@ -1351,14 +1494,18 @@ if (__DEV__) {
|
||||
|
||||
if (
|
||||
element &&
|
||||
element._owner &&
|
||||
element._owner !== ReactCurrentOwner.current
|
||||
element._owner != null &&
|
||||
element._owner !== ReactSharedInternals.owner
|
||||
) {
|
||||
// Give the component that originally created this child.
|
||||
childOwner =
|
||||
" It was passed a child from " +
|
||||
getComponentNameFromType(element._owner.type) +
|
||||
".";
|
||||
var ownerName = null;
|
||||
|
||||
if (typeof element._owner.tag === "number") {
|
||||
ownerName = getComponentNameFromType(element._owner.type);
|
||||
} else if (typeof element._owner.name === "string") {
|
||||
ownerName = element._owner.name;
|
||||
} // Give the component that originally created this child.
|
||||
|
||||
childOwner = " It was passed a child from " + ownerName + ".";
|
||||
}
|
||||
|
||||
setCurrentlyValidatingElement(element);
|
||||
@@ -1377,14 +1524,10 @@ if (__DEV__) {
|
||||
function setCurrentlyValidatingElement(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(
|
||||
element.type,
|
||||
owner ? owner.type : null
|
||||
);
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type);
|
||||
ReactSharedInternals.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
||||
ReactSharedInternals.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1442,6 +1585,104 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function coerceStringRef(mixedRef, owner, type) {
|
||||
var stringRef;
|
||||
|
||||
if (typeof mixedRef === "string") {
|
||||
stringRef = mixedRef;
|
||||
} else {
|
||||
if (typeof mixedRef === "number" || typeof mixedRef === "boolean") {
|
||||
{
|
||||
checkPropStringCoercion(mixedRef, "ref");
|
||||
}
|
||||
|
||||
stringRef = "" + mixedRef;
|
||||
} else {
|
||||
return mixedRef;
|
||||
}
|
||||
}
|
||||
|
||||
var callback = stringRefAsCallbackRef.bind(null, stringRef, type, owner); // This is used to check whether two callback refs conceptually represent
|
||||
// the same string ref, and can therefore be reused by the reconciler. Needed
|
||||
// for backwards compatibility with old Meta code that relies on string refs
|
||||
// not being reattached on every render.
|
||||
|
||||
callback.__stringRef = stringRef;
|
||||
callback.__type = type;
|
||||
callback.__owner = owner;
|
||||
return callback;
|
||||
}
|
||||
|
||||
function stringRefAsCallbackRef(stringRef, type, owner, value) {
|
||||
if (!owner) {
|
||||
throw new Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of" +
|
||||
" the following reasons:\n" +
|
||||
"1. You may be adding a ref to a function component\n" +
|
||||
"2. You may be adding a ref to a component that was not created inside a component's render method\n" +
|
||||
"3. You have multiple copies of React loaded\n" +
|
||||
"See https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
}
|
||||
|
||||
if (owner.tag !== ClassComponent) {
|
||||
throw new Error(
|
||||
"Function components cannot have string refs. " +
|
||||
"We recommend using useRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
// Will already warn with "Function components cannot be given refs"
|
||||
!(typeof type === "function" && !isReactClass(type))
|
||||
) {
|
||||
var componentName = getComponentNameFromFiber(owner) || "Component";
|
||||
|
||||
if (!didWarnAboutStringRefs[componentName]) {
|
||||
error(
|
||||
'Component "%s" contains the string ref "%s". Support for string refs ' +
|
||||
"will be removed in a future major release. We recommend using " +
|
||||
"useRef() or createRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://react.dev/link/strict-mode-string-ref",
|
||||
componentName,
|
||||
stringRef
|
||||
);
|
||||
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var inst = owner.stateNode;
|
||||
|
||||
if (!inst) {
|
||||
throw new Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a " +
|
||||
"bug in React. Please file an issue."
|
||||
);
|
||||
}
|
||||
|
||||
var refs = inst.refs;
|
||||
|
||||
if (value === null) {
|
||||
delete refs[stringRef];
|
||||
} else {
|
||||
refs[stringRef] = value;
|
||||
}
|
||||
}
|
||||
|
||||
function isReactClass(type) {
|
||||
return type.prototype && type.prototype.isReactComponent;
|
||||
}
|
||||
|
||||
var jsxDEV = jsxDEV$1;
|
||||
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
|
||||
+330
-89
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<282fb3cb626f5517884e1ac1196ba98f>>
|
||||
* @generated SignedSource<<7b2e78bcb8542591ec0d9c0850e3ca30>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -57,7 +57,7 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
var ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
function error(format) {
|
||||
{
|
||||
@@ -81,9 +81,7 @@ if (__DEV__) {
|
||||
// When changing this logic, you might want to also
|
||||
// update consoleWithStackDev.www.js as well.
|
||||
{
|
||||
var ReactDebugCurrentFrame =
|
||||
ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
||||
var stack = ReactSharedInternals.getStackAddendum();
|
||||
|
||||
if (stack !== "") {
|
||||
format += "%s";
|
||||
@@ -116,7 +114,7 @@ if (__DEV__) {
|
||||
var enableLegacyHidden = false;
|
||||
var enableTransitionTracing = false;
|
||||
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
function getWrappedName$1(outerType, innerType, wrapperName) {
|
||||
var displayName = outerType.displayName;
|
||||
|
||||
if (displayName) {
|
||||
@@ -129,7 +127,7 @@ if (__DEV__) {
|
||||
: wrapperName;
|
||||
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
||||
|
||||
function getContextName(type) {
|
||||
function getContextName$1(type) {
|
||||
return type.displayName || "Context";
|
||||
}
|
||||
|
||||
@@ -190,28 +188,28 @@ if (__DEV__) {
|
||||
return null;
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
return getContextName$1(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
|
||||
if (enableRenderableContext) {
|
||||
return getContextName(context) + ".Provider";
|
||||
return getContextName$1(context) + ".Provider";
|
||||
} else {
|
||||
return getContextName(context) + ".Consumer";
|
||||
return getContextName$1(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case REACT_CONSUMER_TYPE:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
return getContextName$1(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
return getWrappedName$1(type, type.render, "ForwardRef");
|
||||
|
||||
case REACT_MEMO_TYPE:
|
||||
var outerName = type.displayName || null;
|
||||
@@ -317,6 +315,20 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
}
|
||||
function checkPropStringCoercion(value, propName) {
|
||||
{
|
||||
if (willCoercionThrow(value)) {
|
||||
error(
|
||||
"The provided `%s` prop is an unsupported type %s." +
|
||||
" This value must be coerced to a string before using it here.",
|
||||
propName,
|
||||
typeName(value)
|
||||
);
|
||||
|
||||
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference");
|
||||
function isValidElementType(type) {
|
||||
@@ -463,9 +475,8 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
||||
var prefix;
|
||||
function describeBuiltInComponentFrame(name, ownerFn) {
|
||||
function describeBuiltInComponentFrame(name) {
|
||||
if (enableComponentStackLocations) {
|
||||
if (prefix === undefined) {
|
||||
// Extract the VM specific prefix used by each line.
|
||||
@@ -479,13 +490,7 @@ if (__DEV__) {
|
||||
|
||||
return "\n" + prefix + name;
|
||||
} else {
|
||||
var ownerName = null;
|
||||
|
||||
if (ownerFn) {
|
||||
ownerName = ownerFn.displayName || ownerFn.name || null;
|
||||
}
|
||||
|
||||
return describeComponentFrame(name, ownerName);
|
||||
return describeComponentFrame(name);
|
||||
}
|
||||
}
|
||||
var reentry = false;
|
||||
@@ -525,13 +530,13 @@ if (__DEV__) {
|
||||
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.
|
||||
|
||||
Error.prepareStackTrace = undefined;
|
||||
var previousDispatcher;
|
||||
var previousDispatcher = null;
|
||||
|
||||
{
|
||||
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
||||
previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function
|
||||
// for warnings.
|
||||
|
||||
ReactCurrentDispatcher.current = null;
|
||||
ReactSharedInternals.H = null;
|
||||
disableLogs();
|
||||
}
|
||||
/**
|
||||
@@ -724,7 +729,7 @@ if (__DEV__) {
|
||||
reentry = false;
|
||||
|
||||
{
|
||||
ReactCurrentDispatcher.current = previousDispatcher;
|
||||
ReactSharedInternals.H = previousDispatcher;
|
||||
reenableLogs();
|
||||
}
|
||||
|
||||
@@ -743,16 +748,10 @@ if (__DEV__) {
|
||||
return syntheticFrame;
|
||||
}
|
||||
|
||||
function describeComponentFrame(name, ownerName) {
|
||||
var sourceInfo = "";
|
||||
|
||||
if (ownerName) {
|
||||
sourceInfo = " (created by " + ownerName + ")";
|
||||
}
|
||||
|
||||
return "\n in " + (name || "Unknown") + sourceInfo;
|
||||
function describeComponentFrame(name) {
|
||||
return "\n in " + (name || "Unknown");
|
||||
}
|
||||
function describeFunctionComponentFrame(fn, ownerFn) {
|
||||
function describeFunctionComponentFrame(fn) {
|
||||
if (enableComponentStackLocations) {
|
||||
return describeNativeComponentFrame(fn, false);
|
||||
} else {
|
||||
@@ -761,13 +760,7 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
var name = fn.displayName || fn.name || null;
|
||||
var ownerName = null;
|
||||
|
||||
if (ownerFn) {
|
||||
ownerName = ownerFn.displayName || ownerFn.name || null;
|
||||
}
|
||||
|
||||
return describeComponentFrame(name, ownerName);
|
||||
return describeComponentFrame(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -776,7 +769,7 @@ if (__DEV__) {
|
||||
return !!(prototype && prototype.isReactComponent);
|
||||
}
|
||||
|
||||
function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
||||
function describeUnknownElementTypeFrameInDEV(type) {
|
||||
if (type == null) {
|
||||
return "";
|
||||
}
|
||||
@@ -785,30 +778,30 @@ if (__DEV__) {
|
||||
if (enableComponentStackLocations) {
|
||||
return describeNativeComponentFrame(type, shouldConstruct(type));
|
||||
} else {
|
||||
return describeFunctionComponentFrame(type, ownerFn);
|
||||
return describeFunctionComponentFrame(type);
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof type === "string") {
|
||||
return describeBuiltInComponentFrame(type, ownerFn);
|
||||
return describeBuiltInComponentFrame(type);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return describeBuiltInComponentFrame("Suspense", ownerFn);
|
||||
return describeBuiltInComponentFrame("Suspense");
|
||||
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return describeBuiltInComponentFrame("SuspenseList", ownerFn);
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
}
|
||||
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return describeFunctionComponentFrame(type.render, ownerFn);
|
||||
return describeFunctionComponentFrame(type.render);
|
||||
|
||||
case REACT_MEMO_TYPE:
|
||||
// Memo may contain any component type so we recursively resolve it.
|
||||
return describeUnknownElementTypeFrameInDEV(type.type, ownerFn);
|
||||
return describeUnknownElementTypeFrameInDEV(type.type);
|
||||
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
@@ -817,10 +810,7 @@ if (__DEV__) {
|
||||
|
||||
try {
|
||||
// Lazy may contain any component type so we recursively resolve it.
|
||||
return describeUnknownElementTypeFrameInDEV(
|
||||
init(payload),
|
||||
ownerFn
|
||||
);
|
||||
return describeUnknownElementTypeFrameInDEV(init(payload));
|
||||
} catch (x) {}
|
||||
}
|
||||
}
|
||||
@@ -829,8 +819,152 @@ if (__DEV__) {
|
||||
return "";
|
||||
}
|
||||
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
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.
|
||||
|
||||
var HostComponent = 5;
|
||||
var HostText = 6;
|
||||
var Fragment = 7;
|
||||
var Mode = 8;
|
||||
var ContextConsumer = 9;
|
||||
var ContextProvider = 10;
|
||||
var ForwardRef = 11;
|
||||
var Profiler = 12;
|
||||
var SuspenseComponent = 13;
|
||||
var MemoComponent = 14;
|
||||
var SimpleMemoComponent = 15;
|
||||
var LazyComponent = 16;
|
||||
var IncompleteClassComponent = 17;
|
||||
var DehydratedFragment = 18;
|
||||
var SuspenseListComponent = 19;
|
||||
var ScopeComponent = 21;
|
||||
var OffscreenComponent = 22;
|
||||
var CacheComponent = 24;
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
var functionName = innerType.displayName || innerType.name || "";
|
||||
return (
|
||||
outerType.displayName ||
|
||||
(functionName !== ""
|
||||
? wrapperName + "(" + functionName + ")"
|
||||
: wrapperName)
|
||||
);
|
||||
} // Keep in sync with shared/getComponentNameFromType
|
||||
|
||||
function getContextName(type) {
|
||||
return type.displayName || "Context";
|
||||
}
|
||||
function getComponentNameFromFiber(fiber) {
|
||||
var tag = fiber.tag,
|
||||
type = fiber.type;
|
||||
|
||||
switch (tag) {
|
||||
case CacheComponent:
|
||||
return "Cache";
|
||||
|
||||
case ContextConsumer:
|
||||
if (enableRenderableContext) {
|
||||
var consumer = type;
|
||||
return getContextName(consumer._context) + ".Consumer";
|
||||
} else {
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
}
|
||||
|
||||
case ContextProvider:
|
||||
if (enableRenderableContext) {
|
||||
var _context = type;
|
||||
return getContextName(_context) + ".Provider";
|
||||
} else {
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
}
|
||||
|
||||
case DehydratedFragment:
|
||||
return "DehydratedFragment";
|
||||
|
||||
case ForwardRef:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
|
||||
case Fragment:
|
||||
return "Fragment";
|
||||
|
||||
case HostHoistable:
|
||||
case HostSingleton:
|
||||
case HostComponent:
|
||||
// Host component type is the display name (e.g. "div", "View")
|
||||
return type;
|
||||
|
||||
case HostPortal:
|
||||
return "Portal";
|
||||
|
||||
case HostRoot:
|
||||
return "Root";
|
||||
|
||||
case HostText:
|
||||
return "Text";
|
||||
|
||||
case LazyComponent:
|
||||
// Name comes from the type in this case; we don't have a tag.
|
||||
return getComponentNameFromType(type);
|
||||
|
||||
case Mode:
|
||||
if (type === REACT_STRICT_MODE_TYPE) {
|
||||
// Don't be less specific than shared/getComponentNameFromType
|
||||
return "StrictMode";
|
||||
}
|
||||
|
||||
return "Mode";
|
||||
|
||||
case OffscreenComponent:
|
||||
return "Offscreen";
|
||||
|
||||
case Profiler:
|
||||
return "Profiler";
|
||||
|
||||
case ScopeComponent:
|
||||
return "Scope";
|
||||
|
||||
case SuspenseComponent:
|
||||
return "Suspense";
|
||||
|
||||
case SuspenseListComponent:
|
||||
return "SuspenseList";
|
||||
|
||||
case TracingMarkerComponent:
|
||||
return "TracingMarker";
|
||||
// The display name for these tags come from the user-provided type:
|
||||
|
||||
case IncompleteClassComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
|
||||
// Fallthrough
|
||||
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
return type.displayName || type.name || null;
|
||||
}
|
||||
|
||||
if (typeof type === "string") {
|
||||
return type;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
@@ -872,12 +1006,12 @@ if (__DEV__) {
|
||||
{
|
||||
if (
|
||||
typeof config.ref === "string" &&
|
||||
ReactCurrentOwner.current &&
|
||||
ReactSharedInternals.owner &&
|
||||
self &&
|
||||
ReactCurrentOwner.current.stateNode !== self
|
||||
ReactSharedInternals.owner.stateNode !== self
|
||||
) {
|
||||
var componentName = getComponentNameFromType(
|
||||
ReactCurrentOwner.current.type
|
||||
ReactSharedInternals.owner.type
|
||||
);
|
||||
|
||||
if (!didWarnAboutStringRefs[componentName]) {
|
||||
@@ -888,7 +1022,7 @@ if (__DEV__) {
|
||||
"We ask you to manually fix this case by using useRef() or createRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://react.dev/link/strict-mode-string-ref",
|
||||
getComponentNameFromType(ReactCurrentOwner.current.type),
|
||||
getComponentNameFromType(ReactSharedInternals.owner.type),
|
||||
config.ref
|
||||
);
|
||||
|
||||
@@ -1177,9 +1311,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
var propName; // Reserved names are extracted
|
||||
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
||||
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
||||
@@ -1207,20 +1338,32 @@ if (__DEV__) {
|
||||
if (hasValidRef(config)) {
|
||||
{
|
||||
ref = config.ref;
|
||||
|
||||
{
|
||||
ref = coerceStringRef(ref, ReactSharedInternals.owner, type);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
}
|
||||
} // Remaining properties are added to a new props object
|
||||
}
|
||||
|
||||
for (propName in config) {
|
||||
if (
|
||||
hasOwnProperty.call(config, propName) && // Skip over reserved prop names
|
||||
propName !== "key" &&
|
||||
propName !== "ref"
|
||||
) {
|
||||
props[propName] = config[propName];
|
||||
var props;
|
||||
|
||||
{
|
||||
// We need to remove reserved props (key, prop, ref). Create a fresh props
|
||||
// object and copy over all the non-reserved props. We don't use `delete`
|
||||
// because in V8 it will deopt the object to dictionary mode.
|
||||
props = {};
|
||||
|
||||
for (var propName in config) {
|
||||
// Skip over reserved prop names
|
||||
if (propName !== "key" && propName !== "ref") {
|
||||
{
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1229,9 +1372,9 @@ if (__DEV__) {
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === undefined) {
|
||||
props[propName] = defaultProps[propName];
|
||||
for (var _propName2 in defaultProps) {
|
||||
if (props[_propName2] === undefined) {
|
||||
props[_propName2] = defaultProps[_propName2];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1258,7 +1401,7 @@ if (__DEV__) {
|
||||
ref,
|
||||
self,
|
||||
source,
|
||||
ReactCurrentOwner.current,
|
||||
ReactSharedInternals.owner,
|
||||
props
|
||||
);
|
||||
|
||||
@@ -1272,8 +1415,8 @@ if (__DEV__) {
|
||||
|
||||
function getDeclarationErrorAddendum() {
|
||||
{
|
||||
if (ReactCurrentOwner.current) {
|
||||
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
||||
if (ReactSharedInternals.owner) {
|
||||
var name = getComponentNameFromType(ReactSharedInternals.owner.type);
|
||||
|
||||
if (name) {
|
||||
return "\n\nCheck the render method of `" + name + "`.";
|
||||
@@ -1387,14 +1530,18 @@ if (__DEV__) {
|
||||
|
||||
if (
|
||||
element &&
|
||||
element._owner &&
|
||||
element._owner !== ReactCurrentOwner.current
|
||||
element._owner != null &&
|
||||
element._owner !== ReactSharedInternals.owner
|
||||
) {
|
||||
// Give the component that originally created this child.
|
||||
childOwner =
|
||||
" It was passed a child from " +
|
||||
getComponentNameFromType(element._owner.type) +
|
||||
".";
|
||||
var ownerName = null;
|
||||
|
||||
if (typeof element._owner.tag === "number") {
|
||||
ownerName = getComponentNameFromType(element._owner.type);
|
||||
} else if (typeof element._owner.name === "string") {
|
||||
ownerName = element._owner.name;
|
||||
} // Give the component that originally created this child.
|
||||
|
||||
childOwner = " It was passed a child from " + ownerName + ".";
|
||||
}
|
||||
|
||||
setCurrentlyValidatingElement(element);
|
||||
@@ -1413,14 +1560,10 @@ if (__DEV__) {
|
||||
function setCurrentlyValidatingElement(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(
|
||||
element.type,
|
||||
owner ? owner.type : null
|
||||
);
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type);
|
||||
ReactSharedInternals.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
||||
ReactSharedInternals.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1478,6 +1621,104 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function coerceStringRef(mixedRef, owner, type) {
|
||||
var stringRef;
|
||||
|
||||
if (typeof mixedRef === "string") {
|
||||
stringRef = mixedRef;
|
||||
} else {
|
||||
if (typeof mixedRef === "number" || typeof mixedRef === "boolean") {
|
||||
{
|
||||
checkPropStringCoercion(mixedRef, "ref");
|
||||
}
|
||||
|
||||
stringRef = "" + mixedRef;
|
||||
} else {
|
||||
return mixedRef;
|
||||
}
|
||||
}
|
||||
|
||||
var callback = stringRefAsCallbackRef.bind(null, stringRef, type, owner); // This is used to check whether two callback refs conceptually represent
|
||||
// the same string ref, and can therefore be reused by the reconciler. Needed
|
||||
// for backwards compatibility with old Meta code that relies on string refs
|
||||
// not being reattached on every render.
|
||||
|
||||
callback.__stringRef = stringRef;
|
||||
callback.__type = type;
|
||||
callback.__owner = owner;
|
||||
return callback;
|
||||
}
|
||||
|
||||
function stringRefAsCallbackRef(stringRef, type, owner, value) {
|
||||
if (!owner) {
|
||||
throw new Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of" +
|
||||
" the following reasons:\n" +
|
||||
"1. You may be adding a ref to a function component\n" +
|
||||
"2. You may be adding a ref to a component that was not created inside a component's render method\n" +
|
||||
"3. You have multiple copies of React loaded\n" +
|
||||
"See https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
}
|
||||
|
||||
if (owner.tag !== ClassComponent) {
|
||||
throw new Error(
|
||||
"Function components cannot have string refs. " +
|
||||
"We recommend using useRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
// Will already warn with "Function components cannot be given refs"
|
||||
!(typeof type === "function" && !isReactClass(type))
|
||||
) {
|
||||
var componentName = getComponentNameFromFiber(owner) || "Component";
|
||||
|
||||
if (!didWarnAboutStringRefs[componentName]) {
|
||||
error(
|
||||
'Component "%s" contains the string ref "%s". Support for string refs ' +
|
||||
"will be removed in a future major release. We recommend using " +
|
||||
"useRef() or createRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://react.dev/link/strict-mode-string-ref",
|
||||
componentName,
|
||||
stringRef
|
||||
);
|
||||
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var inst = owner.stateNode;
|
||||
|
||||
if (!inst) {
|
||||
throw new Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a " +
|
||||
"bug in React. Please file an issue."
|
||||
);
|
||||
}
|
||||
|
||||
var refs = inst.refs;
|
||||
|
||||
if (value === null) {
|
||||
delete refs[stringRef];
|
||||
} else {
|
||||
refs[stringRef] = value;
|
||||
}
|
||||
}
|
||||
|
||||
function isReactClass(type) {
|
||||
return type.prototype && type.prototype.isReactComponent;
|
||||
}
|
||||
|
||||
var jsx = jsxProdSignatureRunningInDevWithDynamicChildren; // we may want to special case jsxs internally to take advantage of static children.
|
||||
// for now we can ship identical prod functions
|
||||
|
||||
|
||||
+53
-19
@@ -7,44 +7,78 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<26fbc8eee6902991682d526f8537439c>>
|
||||
* @generated SignedSource<<881038bf21de122675cb4eb0358c5cfd>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"),
|
||||
React = require("react"),
|
||||
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
||||
disableDefaultPropsExceptForClasses =
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
function formatProdErrorMessage(code) {
|
||||
var url = "https://react.dev/errors/" + code;
|
||||
if (1 < arguments.length) {
|
||||
url += "?args[]=" + encodeURIComponent(arguments[1]);
|
||||
for (var i = 2; i < arguments.length; i++)
|
||||
url += "&args[]=" + encodeURIComponent(arguments[i]);
|
||||
}
|
||||
return (
|
||||
"Minified React error #" +
|
||||
code +
|
||||
"; visit " +
|
||||
url +
|
||||
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
|
||||
);
|
||||
}
|
||||
var disableDefaultPropsExceptForClasses =
|
||||
dynamicFlagsUntyped.disableDefaultPropsExceptForClasses,
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
ReactCurrentOwner =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
|
||||
ReactSharedInternals =
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
function jsxProd(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
var key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
"key" !== propName &&
|
||||
if (void 0 !== config.ref)
|
||||
a: {
|
||||
(ref = config.ref), (maybeKey = ReactSharedInternals.owner);
|
||||
if ("string" !== typeof ref)
|
||||
if ("number" === typeof ref || "boolean" === typeof ref) ref = "" + ref;
|
||||
else break a;
|
||||
var callback = stringRefAsCallbackRef.bind(null, ref, type, maybeKey);
|
||||
callback.__stringRef = ref;
|
||||
callback.__type = type;
|
||||
callback.__owner = maybeKey;
|
||||
ref = callback;
|
||||
}
|
||||
maybeKey = {};
|
||||
for (var propName in config)
|
||||
"key" !== propName &&
|
||||
"ref" !== propName &&
|
||||
(props[propName] = config[propName]);
|
||||
if (!disableDefaultPropsExceptForClasses && type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
(maybeKey[propName] = config[propName]);
|
||||
if (!disableDefaultPropsExceptForClasses && type && type.defaultProps) {
|
||||
config = type.defaultProps;
|
||||
for (var propName$0 in config)
|
||||
void 0 === maybeKey[propName$0] &&
|
||||
(maybeKey[propName$0] = config[propName$0]);
|
||||
}
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
props: maybeKey,
|
||||
_owner: ReactSharedInternals.owner
|
||||
};
|
||||
}
|
||||
function stringRefAsCallbackRef(stringRef, type, owner, value) {
|
||||
if (!owner) throw Error(formatProdErrorMessage(290, stringRef));
|
||||
if (1 !== owner.tag) throw Error(formatProdErrorMessage(309));
|
||||
type = owner.stateNode;
|
||||
if (!type) throw Error(formatProdErrorMessage(147, stringRef));
|
||||
type = type.refs;
|
||||
null === value ? delete type[stringRef] : (type[stringRef] = value);
|
||||
}
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
exports.jsx = jsxProd;
|
||||
exports.jsxs = jsxProd;
|
||||
|
||||
Vendored
+53
-19
@@ -7,44 +7,78 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<26fbc8eee6902991682d526f8537439c>>
|
||||
* @generated SignedSource<<881038bf21de122675cb4eb0358c5cfd>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"),
|
||||
React = require("react"),
|
||||
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
||||
disableDefaultPropsExceptForClasses =
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
function formatProdErrorMessage(code) {
|
||||
var url = "https://react.dev/errors/" + code;
|
||||
if (1 < arguments.length) {
|
||||
url += "?args[]=" + encodeURIComponent(arguments[1]);
|
||||
for (var i = 2; i < arguments.length; i++)
|
||||
url += "&args[]=" + encodeURIComponent(arguments[i]);
|
||||
}
|
||||
return (
|
||||
"Minified React error #" +
|
||||
code +
|
||||
"; visit " +
|
||||
url +
|
||||
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
|
||||
);
|
||||
}
|
||||
var disableDefaultPropsExceptForClasses =
|
||||
dynamicFlagsUntyped.disableDefaultPropsExceptForClasses,
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
ReactCurrentOwner =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
|
||||
ReactSharedInternals =
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
function jsxProd(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
var key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
"key" !== propName &&
|
||||
if (void 0 !== config.ref)
|
||||
a: {
|
||||
(ref = config.ref), (maybeKey = ReactSharedInternals.owner);
|
||||
if ("string" !== typeof ref)
|
||||
if ("number" === typeof ref || "boolean" === typeof ref) ref = "" + ref;
|
||||
else break a;
|
||||
var callback = stringRefAsCallbackRef.bind(null, ref, type, maybeKey);
|
||||
callback.__stringRef = ref;
|
||||
callback.__type = type;
|
||||
callback.__owner = maybeKey;
|
||||
ref = callback;
|
||||
}
|
||||
maybeKey = {};
|
||||
for (var propName in config)
|
||||
"key" !== propName &&
|
||||
"ref" !== propName &&
|
||||
(props[propName] = config[propName]);
|
||||
if (!disableDefaultPropsExceptForClasses && type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
(maybeKey[propName] = config[propName]);
|
||||
if (!disableDefaultPropsExceptForClasses && type && type.defaultProps) {
|
||||
config = type.defaultProps;
|
||||
for (var propName$0 in config)
|
||||
void 0 === maybeKey[propName$0] &&
|
||||
(maybeKey[propName$0] = config[propName$0]);
|
||||
}
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
props: maybeKey,
|
||||
_owner: ReactSharedInternals.owner
|
||||
};
|
||||
}
|
||||
function stringRefAsCallbackRef(stringRef, type, owner, value) {
|
||||
if (!owner) throw Error(formatProdErrorMessage(290, stringRef));
|
||||
if (1 !== owner.tag) throw Error(formatProdErrorMessage(309));
|
||||
type = owner.stateNode;
|
||||
if (!type) throw Error(formatProdErrorMessage(147, stringRef));
|
||||
type = type.refs;
|
||||
null === value ? delete type[stringRef] : (type[stringRef] = value);
|
||||
}
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
exports.jsx = jsxProd;
|
||||
exports.jsxs = jsxProd;
|
||||
|
||||
+447
-221
File diff suppressed because it is too large
Load Diff
+86
-56
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<b1e8f7cea4c2238622f5d5ff373a78b6>>
|
||||
* @generated SignedSource<<00252b7815c38ef0d757b44717a43f7d>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -86,17 +86,8 @@ var isArrayImpl = Array.isArray,
|
||||
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
|
||||
disableDefaultPropsExceptForClasses =
|
||||
dynamicFlagsUntyped.disableDefaultPropsExceptForClasses,
|
||||
ReactCurrentDispatcher = { current: null },
|
||||
ReactCurrentCache = { current: null },
|
||||
ReactCurrentBatchConfig = { transition: null },
|
||||
ReactSharedInternals = {
|
||||
ReactCurrentDispatcher: ReactCurrentDispatcher,
|
||||
ReactCurrentCache: ReactCurrentCache,
|
||||
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
||||
ReactCurrentOwner: { current: null }
|
||||
},
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
ReactSharedInternals = { H: null, C: null, T: null, owner: null },
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
function ReactElement(type, key, _ref, self, source, owner, props) {
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
@@ -108,29 +99,32 @@ function ReactElement(type, key, _ref, self, source, owner, props) {
|
||||
};
|
||||
}
|
||||
function jsxProd(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
var key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
"key" !== propName &&
|
||||
void 0 !== config.ref &&
|
||||
((ref = config.ref),
|
||||
(ref = coerceStringRef(ref, ReactSharedInternals.owner, type)));
|
||||
maybeKey = {};
|
||||
for (var propName in config)
|
||||
"key" !== propName &&
|
||||
"ref" !== propName &&
|
||||
(props[propName] = config[propName]);
|
||||
if (!disableDefaultPropsExceptForClasses && type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
(maybeKey[propName] = config[propName]);
|
||||
if (!disableDefaultPropsExceptForClasses && type && type.defaultProps) {
|
||||
config = type.defaultProps;
|
||||
for (var propName$0 in config)
|
||||
void 0 === maybeKey[propName$0] &&
|
||||
(maybeKey[propName$0] = config[propName$0]);
|
||||
}
|
||||
return ReactElement(
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
void 0,
|
||||
void 0,
|
||||
ReactCurrentOwner.current,
|
||||
props
|
||||
ReactSharedInternals.owner,
|
||||
maybeKey
|
||||
);
|
||||
}
|
||||
function cloneAndReplaceKey(oldElement, newKey) {
|
||||
@@ -151,6 +145,38 @@ function isValidElement(object) {
|
||||
object.$$typeof === REACT_ELEMENT_TYPE
|
||||
);
|
||||
}
|
||||
function coerceStringRef(mixedRef, owner, type) {
|
||||
if ("string" !== typeof mixedRef)
|
||||
if ("number" === typeof mixedRef || "boolean" === typeof mixedRef)
|
||||
mixedRef = "" + mixedRef;
|
||||
else return mixedRef;
|
||||
var callback = stringRefAsCallbackRef.bind(null, mixedRef, type, owner);
|
||||
callback.__stringRef = mixedRef;
|
||||
callback.__type = type;
|
||||
callback.__owner = owner;
|
||||
return callback;
|
||||
}
|
||||
function stringRefAsCallbackRef(stringRef, type, owner, value) {
|
||||
if (!owner)
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
if (1 !== owner.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
type = owner.stateNode;
|
||||
if (!type)
|
||||
throw Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a bug in React. Please file an issue."
|
||||
);
|
||||
type = type.refs;
|
||||
null === value ? delete type[stringRef] : (type[stringRef] = value);
|
||||
}
|
||||
function escape(key) {
|
||||
var escaperLookup = { "=": "=0", ":": "=2" };
|
||||
return (
|
||||
@@ -404,7 +430,7 @@ exports.Profiler = REACT_PROFILER_TYPE;
|
||||
exports.PureComponent = PureComponent;
|
||||
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
||||
exports.Suspense = REACT_SUSPENSE_TYPE;
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED =
|
||||
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
||||
ReactSharedInternals;
|
||||
exports.act = function () {
|
||||
throw Error("act(...) is not supported in production builds of React.");
|
||||
@@ -425,7 +451,9 @@ exports.cloneElement = function (element, config, children) {
|
||||
owner = element._owner;
|
||||
if (null != config) {
|
||||
void 0 !== config.ref &&
|
||||
((ref = config.ref), (owner = ReactCurrentOwner.current));
|
||||
((owner = ReactSharedInternals.owner),
|
||||
(ref = config.ref),
|
||||
(ref = coerceStringRef(ref, owner, element.type)));
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
if (
|
||||
!disableDefaultPropsExceptForClasses &&
|
||||
@@ -483,7 +511,9 @@ exports.createElement = function (type, config, children) {
|
||||
key = null,
|
||||
ref = null;
|
||||
if (null != config)
|
||||
for (propName in (void 0 !== config.ref && (ref = config.ref),
|
||||
for (propName in (void 0 !== config.ref &&
|
||||
((ref = config.ref),
|
||||
(ref = coerceStringRef(ref, ReactSharedInternals.owner, type))),
|
||||
void 0 !== config.key && (key = "" + config.key),
|
||||
config))
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
@@ -509,7 +539,7 @@ exports.createElement = function (type, config, children) {
|
||||
ref,
|
||||
void 0,
|
||||
void 0,
|
||||
ReactCurrentOwner.current,
|
||||
ReactSharedInternals.owner,
|
||||
props
|
||||
);
|
||||
};
|
||||
@@ -517,7 +547,7 @@ exports.createRef = function () {
|
||||
return { current: null };
|
||||
};
|
||||
exports.experimental_useEffectEvent = function (callback) {
|
||||
return ReactCurrentDispatcher.current.useEffectEvent(callback);
|
||||
return ReactSharedInternals.H.useEffectEvent(callback);
|
||||
};
|
||||
exports.forwardRef = function (render) {
|
||||
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
|
||||
@@ -541,10 +571,10 @@ exports.memo = function (type, compare) {
|
||||
};
|
||||
};
|
||||
exports.startTransition = function (scope) {
|
||||
var prevTransition = ReactCurrentBatchConfig.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
callbacks = new Set();
|
||||
ReactCurrentBatchConfig.transition = { _callbacks: callbacks };
|
||||
var currentTransition = ReactCurrentBatchConfig.transition;
|
||||
ReactSharedInternals.T = { _callbacks: callbacks };
|
||||
var currentTransition = ReactSharedInternals.T;
|
||||
if (enableAsyncActions)
|
||||
try {
|
||||
var returnValue = scope();
|
||||
@@ -558,13 +588,13 @@ exports.startTransition = function (scope) {
|
||||
} catch (error) {
|
||||
reportGlobalError(error);
|
||||
} finally {
|
||||
ReactCurrentBatchConfig.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
else
|
||||
try {
|
||||
scope();
|
||||
} finally {
|
||||
ReactCurrentBatchConfig.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
};
|
||||
exports.unstable_Activity = REACT_OFFSCREEN_TYPE;
|
||||
@@ -574,21 +604,21 @@ exports.unstable_Scope = REACT_SCOPE_TYPE;
|
||||
exports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
||||
exports.unstable_TracingMarker = REACT_TRACING_MARKER_TYPE;
|
||||
exports.unstable_getCacheForType = function (resourceType) {
|
||||
var dispatcher = ReactCurrentCache.current;
|
||||
var dispatcher = ReactSharedInternals.C;
|
||||
return dispatcher ? dispatcher.getCacheForType(resourceType) : resourceType();
|
||||
};
|
||||
exports.unstable_useCacheRefresh = function () {
|
||||
return ReactCurrentDispatcher.current.useCacheRefresh();
|
||||
return ReactSharedInternals.H.useCacheRefresh();
|
||||
};
|
||||
exports.unstable_useMemoCache = function (size) {
|
||||
return ReactCurrentDispatcher.current.useMemoCache(size);
|
||||
return ReactSharedInternals.H.useMemoCache(size);
|
||||
};
|
||||
exports.use = function (usable) {
|
||||
return ReactCurrentDispatcher.current.use(usable);
|
||||
return ReactSharedInternals.H.use(usable);
|
||||
};
|
||||
exports.useActionState = function (action, initialState, permalink) {
|
||||
if (enableAsyncActions)
|
||||
return ReactCurrentDispatcher.current.useActionState(
|
||||
return ReactSharedInternals.H.useActionState(
|
||||
action,
|
||||
initialState,
|
||||
permalink
|
||||
@@ -596,57 +626,57 @@ exports.useActionState = function (action, initialState, permalink) {
|
||||
throw Error("Not implemented.");
|
||||
};
|
||||
exports.useCallback = function (callback, deps) {
|
||||
return ReactCurrentDispatcher.current.useCallback(callback, deps);
|
||||
return ReactSharedInternals.H.useCallback(callback, deps);
|
||||
};
|
||||
exports.useContext = function (Context) {
|
||||
return ReactCurrentDispatcher.current.useContext(Context);
|
||||
return ReactSharedInternals.H.useContext(Context);
|
||||
};
|
||||
exports.useDebugValue = function () {};
|
||||
exports.useDeferredValue = function (value, initialValue) {
|
||||
return ReactCurrentDispatcher.current.useDeferredValue(value, initialValue);
|
||||
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
||||
};
|
||||
exports.useEffect = function (create, deps) {
|
||||
return ReactCurrentDispatcher.current.useEffect(create, deps);
|
||||
return ReactSharedInternals.H.useEffect(create, deps);
|
||||
};
|
||||
exports.useId = function () {
|
||||
return ReactCurrentDispatcher.current.useId();
|
||||
return ReactSharedInternals.H.useId();
|
||||
};
|
||||
exports.useImperativeHandle = function (ref, create, deps) {
|
||||
return ReactCurrentDispatcher.current.useImperativeHandle(ref, create, deps);
|
||||
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
||||
};
|
||||
exports.useInsertionEffect = function (create, deps) {
|
||||
return ReactCurrentDispatcher.current.useInsertionEffect(create, deps);
|
||||
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
||||
};
|
||||
exports.useLayoutEffect = function (create, deps) {
|
||||
return ReactCurrentDispatcher.current.useLayoutEffect(create, deps);
|
||||
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
||||
};
|
||||
exports.useMemo = function (create, deps) {
|
||||
return ReactCurrentDispatcher.current.useMemo(create, deps);
|
||||
return ReactSharedInternals.H.useMemo(create, deps);
|
||||
};
|
||||
exports.useOptimistic = function (passthrough, reducer) {
|
||||
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
|
||||
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
||||
};
|
||||
exports.useReducer = function (reducer, initialArg, init) {
|
||||
return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init);
|
||||
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
||||
};
|
||||
exports.useRef = function (initialValue) {
|
||||
return ReactCurrentDispatcher.current.useRef(initialValue);
|
||||
return ReactSharedInternals.H.useRef(initialValue);
|
||||
};
|
||||
exports.useState = function (initialState) {
|
||||
return ReactCurrentDispatcher.current.useState(initialState);
|
||||
return ReactSharedInternals.H.useState(initialState);
|
||||
};
|
||||
exports.useSyncExternalStore = function (
|
||||
subscribe,
|
||||
getSnapshot,
|
||||
getServerSnapshot
|
||||
) {
|
||||
return ReactCurrentDispatcher.current.useSyncExternalStore(
|
||||
return ReactSharedInternals.H.useSyncExternalStore(
|
||||
subscribe,
|
||||
getSnapshot,
|
||||
getServerSnapshot
|
||||
);
|
||||
};
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-canary-c781fee2";
|
||||
exports.version = "19.0.0-canary-3277b133";
|
||||
|
||||
+86
-56
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<be131f90efa167ba38901cfaea311b01>>
|
||||
* @generated SignedSource<<9fd3393509037fbe670735ccea6d8cca>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -90,17 +90,8 @@ var isArrayImpl = Array.isArray,
|
||||
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
|
||||
disableDefaultPropsExceptForClasses =
|
||||
dynamicFlagsUntyped.disableDefaultPropsExceptForClasses,
|
||||
ReactCurrentDispatcher = { current: null },
|
||||
ReactCurrentCache = { current: null },
|
||||
ReactCurrentBatchConfig = { transition: null },
|
||||
ReactSharedInternals = {
|
||||
ReactCurrentDispatcher: ReactCurrentDispatcher,
|
||||
ReactCurrentCache: ReactCurrentCache,
|
||||
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
||||
ReactCurrentOwner: { current: null }
|
||||
},
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
ReactSharedInternals = { H: null, C: null, T: null, owner: null },
|
||||
hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
function ReactElement(type, key, _ref, self, source, owner, props) {
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
@@ -112,29 +103,32 @@ function ReactElement(type, key, _ref, self, source, owner, props) {
|
||||
};
|
||||
}
|
||||
function jsxProd(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
var key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
"key" !== propName &&
|
||||
void 0 !== config.ref &&
|
||||
((ref = config.ref),
|
||||
(ref = coerceStringRef(ref, ReactSharedInternals.owner, type)));
|
||||
maybeKey = {};
|
||||
for (var propName in config)
|
||||
"key" !== propName &&
|
||||
"ref" !== propName &&
|
||||
(props[propName] = config[propName]);
|
||||
if (!disableDefaultPropsExceptForClasses && type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
(maybeKey[propName] = config[propName]);
|
||||
if (!disableDefaultPropsExceptForClasses && type && type.defaultProps) {
|
||||
config = type.defaultProps;
|
||||
for (var propName$0 in config)
|
||||
void 0 === maybeKey[propName$0] &&
|
||||
(maybeKey[propName$0] = config[propName$0]);
|
||||
}
|
||||
return ReactElement(
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
void 0,
|
||||
void 0,
|
||||
ReactCurrentOwner.current,
|
||||
props
|
||||
ReactSharedInternals.owner,
|
||||
maybeKey
|
||||
);
|
||||
}
|
||||
function cloneAndReplaceKey(oldElement, newKey) {
|
||||
@@ -155,6 +149,38 @@ function isValidElement(object) {
|
||||
object.$$typeof === REACT_ELEMENT_TYPE
|
||||
);
|
||||
}
|
||||
function coerceStringRef(mixedRef, owner, type) {
|
||||
if ("string" !== typeof mixedRef)
|
||||
if ("number" === typeof mixedRef || "boolean" === typeof mixedRef)
|
||||
mixedRef = "" + mixedRef;
|
||||
else return mixedRef;
|
||||
var callback = stringRefAsCallbackRef.bind(null, mixedRef, type, owner);
|
||||
callback.__stringRef = mixedRef;
|
||||
callback.__type = type;
|
||||
callback.__owner = owner;
|
||||
return callback;
|
||||
}
|
||||
function stringRefAsCallbackRef(stringRef, type, owner, value) {
|
||||
if (!owner)
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
if (1 !== owner.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
type = owner.stateNode;
|
||||
if (!type)
|
||||
throw Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a bug in React. Please file an issue."
|
||||
);
|
||||
type = type.refs;
|
||||
null === value ? delete type[stringRef] : (type[stringRef] = value);
|
||||
}
|
||||
function escape(key) {
|
||||
var escaperLookup = { "=": "=0", ":": "=2" };
|
||||
return (
|
||||
@@ -408,7 +434,7 @@ exports.Profiler = REACT_PROFILER_TYPE;
|
||||
exports.PureComponent = PureComponent;
|
||||
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
||||
exports.Suspense = REACT_SUSPENSE_TYPE;
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED =
|
||||
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
||||
ReactSharedInternals;
|
||||
exports.act = function () {
|
||||
throw Error("act(...) is not supported in production builds of React.");
|
||||
@@ -429,7 +455,9 @@ exports.cloneElement = function (element, config, children) {
|
||||
owner = element._owner;
|
||||
if (null != config) {
|
||||
void 0 !== config.ref &&
|
||||
((ref = config.ref), (owner = ReactCurrentOwner.current));
|
||||
((owner = ReactSharedInternals.owner),
|
||||
(ref = config.ref),
|
||||
(ref = coerceStringRef(ref, owner, element.type)));
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
if (
|
||||
!disableDefaultPropsExceptForClasses &&
|
||||
@@ -487,7 +515,9 @@ exports.createElement = function (type, config, children) {
|
||||
key = null,
|
||||
ref = null;
|
||||
if (null != config)
|
||||
for (propName in (void 0 !== config.ref && (ref = config.ref),
|
||||
for (propName in (void 0 !== config.ref &&
|
||||
((ref = config.ref),
|
||||
(ref = coerceStringRef(ref, ReactSharedInternals.owner, type))),
|
||||
void 0 !== config.key && (key = "" + config.key),
|
||||
config))
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
@@ -513,7 +543,7 @@ exports.createElement = function (type, config, children) {
|
||||
ref,
|
||||
void 0,
|
||||
void 0,
|
||||
ReactCurrentOwner.current,
|
||||
ReactSharedInternals.owner,
|
||||
props
|
||||
);
|
||||
};
|
||||
@@ -521,7 +551,7 @@ exports.createRef = function () {
|
||||
return { current: null };
|
||||
};
|
||||
exports.experimental_useEffectEvent = function (callback) {
|
||||
return ReactCurrentDispatcher.current.useEffectEvent(callback);
|
||||
return ReactSharedInternals.H.useEffectEvent(callback);
|
||||
};
|
||||
exports.forwardRef = function (render) {
|
||||
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
|
||||
@@ -545,10 +575,10 @@ exports.memo = function (type, compare) {
|
||||
};
|
||||
};
|
||||
exports.startTransition = function (scope) {
|
||||
var prevTransition = ReactCurrentBatchConfig.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
callbacks = new Set();
|
||||
ReactCurrentBatchConfig.transition = { _callbacks: callbacks };
|
||||
var currentTransition = ReactCurrentBatchConfig.transition;
|
||||
ReactSharedInternals.T = { _callbacks: callbacks };
|
||||
var currentTransition = ReactSharedInternals.T;
|
||||
if (enableAsyncActions)
|
||||
try {
|
||||
var returnValue = scope();
|
||||
@@ -562,13 +592,13 @@ exports.startTransition = function (scope) {
|
||||
} catch (error) {
|
||||
reportGlobalError(error);
|
||||
} finally {
|
||||
ReactCurrentBatchConfig.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
else
|
||||
try {
|
||||
scope();
|
||||
} finally {
|
||||
ReactCurrentBatchConfig.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
};
|
||||
exports.unstable_Activity = REACT_OFFSCREEN_TYPE;
|
||||
@@ -578,21 +608,21 @@ exports.unstable_Scope = REACT_SCOPE_TYPE;
|
||||
exports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
||||
exports.unstable_TracingMarker = REACT_TRACING_MARKER_TYPE;
|
||||
exports.unstable_getCacheForType = function (resourceType) {
|
||||
var dispatcher = ReactCurrentCache.current;
|
||||
var dispatcher = ReactSharedInternals.C;
|
||||
return dispatcher ? dispatcher.getCacheForType(resourceType) : resourceType();
|
||||
};
|
||||
exports.unstable_useCacheRefresh = function () {
|
||||
return ReactCurrentDispatcher.current.useCacheRefresh();
|
||||
return ReactSharedInternals.H.useCacheRefresh();
|
||||
};
|
||||
exports.unstable_useMemoCache = function (size) {
|
||||
return ReactCurrentDispatcher.current.useMemoCache(size);
|
||||
return ReactSharedInternals.H.useMemoCache(size);
|
||||
};
|
||||
exports.use = function (usable) {
|
||||
return ReactCurrentDispatcher.current.use(usable);
|
||||
return ReactSharedInternals.H.use(usable);
|
||||
};
|
||||
exports.useActionState = function (action, initialState, permalink) {
|
||||
if (enableAsyncActions)
|
||||
return ReactCurrentDispatcher.current.useActionState(
|
||||
return ReactSharedInternals.H.useActionState(
|
||||
action,
|
||||
initialState,
|
||||
permalink
|
||||
@@ -600,60 +630,60 @@ exports.useActionState = function (action, initialState, permalink) {
|
||||
throw Error("Not implemented.");
|
||||
};
|
||||
exports.useCallback = function (callback, deps) {
|
||||
return ReactCurrentDispatcher.current.useCallback(callback, deps);
|
||||
return ReactSharedInternals.H.useCallback(callback, deps);
|
||||
};
|
||||
exports.useContext = function (Context) {
|
||||
return ReactCurrentDispatcher.current.useContext(Context);
|
||||
return ReactSharedInternals.H.useContext(Context);
|
||||
};
|
||||
exports.useDebugValue = function () {};
|
||||
exports.useDeferredValue = function (value, initialValue) {
|
||||
return ReactCurrentDispatcher.current.useDeferredValue(value, initialValue);
|
||||
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
||||
};
|
||||
exports.useEffect = function (create, deps) {
|
||||
return ReactCurrentDispatcher.current.useEffect(create, deps);
|
||||
return ReactSharedInternals.H.useEffect(create, deps);
|
||||
};
|
||||
exports.useId = function () {
|
||||
return ReactCurrentDispatcher.current.useId();
|
||||
return ReactSharedInternals.H.useId();
|
||||
};
|
||||
exports.useImperativeHandle = function (ref, create, deps) {
|
||||
return ReactCurrentDispatcher.current.useImperativeHandle(ref, create, deps);
|
||||
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
||||
};
|
||||
exports.useInsertionEffect = function (create, deps) {
|
||||
return ReactCurrentDispatcher.current.useInsertionEffect(create, deps);
|
||||
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
||||
};
|
||||
exports.useLayoutEffect = function (create, deps) {
|
||||
return ReactCurrentDispatcher.current.useLayoutEffect(create, deps);
|
||||
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
||||
};
|
||||
exports.useMemo = function (create, deps) {
|
||||
return ReactCurrentDispatcher.current.useMemo(create, deps);
|
||||
return ReactSharedInternals.H.useMemo(create, deps);
|
||||
};
|
||||
exports.useOptimistic = function (passthrough, reducer) {
|
||||
return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer);
|
||||
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
||||
};
|
||||
exports.useReducer = function (reducer, initialArg, init) {
|
||||
return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init);
|
||||
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
||||
};
|
||||
exports.useRef = function (initialValue) {
|
||||
return ReactCurrentDispatcher.current.useRef(initialValue);
|
||||
return ReactSharedInternals.H.useRef(initialValue);
|
||||
};
|
||||
exports.useState = function (initialState) {
|
||||
return ReactCurrentDispatcher.current.useState(initialState);
|
||||
return ReactSharedInternals.H.useState(initialState);
|
||||
};
|
||||
exports.useSyncExternalStore = function (
|
||||
subscribe,
|
||||
getSnapshot,
|
||||
getServerSnapshot
|
||||
) {
|
||||
return ReactCurrentDispatcher.current.useSyncExternalStore(
|
||||
return ReactSharedInternals.H.useSyncExternalStore(
|
||||
subscribe,
|
||||
getSnapshot,
|
||||
getServerSnapshot
|
||||
);
|
||||
};
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-canary-46b57fd6";
|
||||
exports.version = "19.0.0-canary-52747c26";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
87b495f7d26a2c631c08952661d38bb5ce5acb03
|
||||
ed4023603632787db6416bee8e85e68d98ad29bd
|
||||
|
||||
+433
-556
File diff suppressed because it is too large
Load Diff
+203
-247
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<224bcce6fb232bb63170272f6821f359>>
|
||||
* @generated SignedSource<<4ab04a84cd69ab2bd7c9b727f4fa1612>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([
|
||||
"ReactNativeBridgeEventPlugin"
|
||||
]);
|
||||
recomputePluginOrdering();
|
||||
var injectedNamesToPlugins$jscomp$inline_248 = {
|
||||
var injectedNamesToPlugins$jscomp$inline_247 = {
|
||||
ResponderEventPlugin: ResponderEventPlugin,
|
||||
ReactNativeBridgeEventPlugin: {
|
||||
eventTypes: {},
|
||||
@@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_248 = {
|
||||
}
|
||||
}
|
||||
},
|
||||
isOrderingDirty$jscomp$inline_249 = !1,
|
||||
pluginName$jscomp$inline_250;
|
||||
for (pluginName$jscomp$inline_250 in injectedNamesToPlugins$jscomp$inline_248)
|
||||
isOrderingDirty$jscomp$inline_248 = !1,
|
||||
pluginName$jscomp$inline_249;
|
||||
for (pluginName$jscomp$inline_249 in injectedNamesToPlugins$jscomp$inline_247)
|
||||
if (
|
||||
injectedNamesToPlugins$jscomp$inline_248.hasOwnProperty(
|
||||
pluginName$jscomp$inline_250
|
||||
injectedNamesToPlugins$jscomp$inline_247.hasOwnProperty(
|
||||
pluginName$jscomp$inline_249
|
||||
)
|
||||
) {
|
||||
var pluginModule$jscomp$inline_251 =
|
||||
injectedNamesToPlugins$jscomp$inline_248[pluginName$jscomp$inline_250];
|
||||
var pluginModule$jscomp$inline_250 =
|
||||
injectedNamesToPlugins$jscomp$inline_247[pluginName$jscomp$inline_249];
|
||||
if (
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_250) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_250] !==
|
||||
pluginModule$jscomp$inline_251
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_249) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_249] !==
|
||||
pluginModule$jscomp$inline_250
|
||||
) {
|
||||
if (namesToPlugins[pluginName$jscomp$inline_250])
|
||||
if (namesToPlugins[pluginName$jscomp$inline_249])
|
||||
throw Error(
|
||||
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
|
||||
(pluginName$jscomp$inline_250 + "`.")
|
||||
(pluginName$jscomp$inline_249 + "`.")
|
||||
);
|
||||
namesToPlugins[pluginName$jscomp$inline_250] =
|
||||
pluginModule$jscomp$inline_251;
|
||||
isOrderingDirty$jscomp$inline_249 = !0;
|
||||
namesToPlugins[pluginName$jscomp$inline_249] =
|
||||
pluginModule$jscomp$inline_250;
|
||||
isOrderingDirty$jscomp$inline_248 = !0;
|
||||
}
|
||||
}
|
||||
isOrderingDirty$jscomp$inline_249 && recomputePluginOrdering();
|
||||
isOrderingDirty$jscomp$inline_248 && recomputePluginOrdering();
|
||||
var emptyObject$1 = {},
|
||||
removedKeys = null,
|
||||
removedKeyCount = 0,
|
||||
@@ -1292,7 +1292,7 @@ var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries,
|
||||
log$1 = Scheduler.log,
|
||||
unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
|
||||
ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
rendererID = null,
|
||||
injectedHook = null;
|
||||
function onCommitRoot(root) {
|
||||
@@ -1527,7 +1527,6 @@ function markRootEntangled(root, entangledLanes) {
|
||||
rootEntangledLanes &= ~lane;
|
||||
}
|
||||
}
|
||||
var currentUpdatePriority = 0;
|
||||
function lanesToEventPriority(lanes) {
|
||||
lanes &= -lanes;
|
||||
return 2 < lanes
|
||||
@@ -1586,6 +1585,19 @@ function getPublicInstance(instance) {
|
||||
? instance
|
||||
: null;
|
||||
}
|
||||
var currentUpdatePriority = 0;
|
||||
function resolveUpdatePriority() {
|
||||
if (0 !== currentUpdatePriority) return currentUpdatePriority;
|
||||
var currentEventPriority = fabricGetCurrentEventPriority
|
||||
? fabricGetCurrentEventPriority()
|
||||
: null;
|
||||
if (null != currentEventPriority)
|
||||
switch (currentEventPriority) {
|
||||
case FabricDiscretePriority:
|
||||
return 2;
|
||||
}
|
||||
return 32;
|
||||
}
|
||||
var scheduleTimeout = setTimeout,
|
||||
cancelTimeout = clearTimeout;
|
||||
function cloneHiddenInstance(instance) {
|
||||
@@ -2006,7 +2018,7 @@ function describeBuiltInComponentFrame(name) {
|
||||
}
|
||||
return "\n" + prefix + name;
|
||||
}
|
||||
return describeComponentFrame(name, null);
|
||||
return "\n in " + (name || "Unknown");
|
||||
}
|
||||
var reentry = !1;
|
||||
function describeNativeComponentFrame(fn, construct) {
|
||||
@@ -2140,16 +2152,11 @@ function describeNativeComponentFrame(fn, construct) {
|
||||
? describeBuiltInComponentFrame(previousPrepareStackTrace)
|
||||
: "";
|
||||
}
|
||||
function describeComponentFrame(name, ownerName) {
|
||||
var sourceInfo = "";
|
||||
ownerName && (sourceInfo = " (created by " + ownerName + ")");
|
||||
return "\n in " + (name || "Unknown") + sourceInfo;
|
||||
}
|
||||
function describeFunctionComponentFrame(fn) {
|
||||
return enableComponentStackLocations
|
||||
? describeNativeComponentFrame(fn, !1)
|
||||
: fn
|
||||
? describeComponentFrame(fn.displayName || fn.name || null, null)
|
||||
? "\n in " + (fn.displayName || fn.name || "Unknown")
|
||||
: "";
|
||||
}
|
||||
function describeFiber(fiber) {
|
||||
@@ -2900,55 +2907,6 @@ function unwrapThenable(thenable) {
|
||||
null === thenableState$1 && (thenableState$1 = []);
|
||||
return trackUsedThenable(thenableState$1, thenable, index);
|
||||
}
|
||||
function convertStringRefToCallbackRef(
|
||||
returnFiber,
|
||||
current,
|
||||
element,
|
||||
mixedRef
|
||||
) {
|
||||
function ref(value) {
|
||||
var refs = inst.refs;
|
||||
null === value ? delete refs[stringRef] : (refs[stringRef] = value);
|
||||
}
|
||||
var stringRef = "" + mixedRef;
|
||||
returnFiber = element._owner;
|
||||
if (!returnFiber)
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
if (1 !== returnFiber.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = returnFiber.stateNode;
|
||||
if (!inst)
|
||||
throw Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a bug in React. Please file an issue."
|
||||
);
|
||||
if (
|
||||
null !== current &&
|
||||
null !== current.ref &&
|
||||
"function" === typeof current.ref &&
|
||||
current.ref._stringRef === stringRef
|
||||
)
|
||||
return current.ref;
|
||||
ref._stringRef = stringRef;
|
||||
return ref;
|
||||
}
|
||||
function coerceRef(returnFiber, current, workInProgress, element) {
|
||||
var mixedRef = element.ref;
|
||||
returnFiber =
|
||||
"string" === typeof mixedRef ||
|
||||
"number" === typeof mixedRef ||
|
||||
"boolean" === typeof mixedRef
|
||||
? convertStringRefToCallbackRef(returnFiber, current, element, mixedRef)
|
||||
: mixedRef;
|
||||
workInProgress.ref = returnFiber;
|
||||
}
|
||||
function throwOnInvalidObjectType(returnFiber, newChild) {
|
||||
returnFiber = Object.prototype.toString.call(newChild);
|
||||
throw Error(
|
||||
@@ -3044,12 +3002,12 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
resolveLazy(elementType) === current.type))
|
||||
)
|
||||
return (
|
||||
(lanes = useFiber(current, element.props)),
|
||||
coerceRef(returnFiber, current, lanes, element),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
(current = useFiber(current, element.props)),
|
||||
(current.ref = element.ref),
|
||||
(current.return = returnFiber),
|
||||
current
|
||||
);
|
||||
lanes = createFiberFromTypeAndProps(
|
||||
current = createFiberFromTypeAndProps(
|
||||
element.type,
|
||||
element.key,
|
||||
element.props,
|
||||
@@ -3057,9 +3015,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
coerceRef(returnFiber, current, lanes, element);
|
||||
lanes.return = returnFiber;
|
||||
return lanes;
|
||||
current.ref = element.ref;
|
||||
current.return = returnFiber;
|
||||
return current;
|
||||
}
|
||||
function updatePortal(returnFiber, current, portal, lanes) {
|
||||
if (
|
||||
@@ -3120,7 +3078,7 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, null, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
);
|
||||
@@ -3460,52 +3418,54 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
switch (newChild.$$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
a: {
|
||||
for (
|
||||
var key = newChild.key, child = currentFirstChild;
|
||||
null !== child;
|
||||
|
||||
) {
|
||||
if (child.key === key) {
|
||||
for (var key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key) {
|
||||
key = newChild.type;
|
||||
if (key === REACT_FRAGMENT_TYPE) {
|
||||
if (7 === child.tag) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(
|
||||
child,
|
||||
if (7 === currentFirstChild.tag) {
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.props.children
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
} else if (
|
||||
child.elementType === key ||
|
||||
currentFirstChild.elementType === key ||
|
||||
("object" === typeof key &&
|
||||
null !== key &&
|
||||
key.$$typeof === REACT_LAZY_TYPE &&
|
||||
resolveLazy(key) === child.type)
|
||||
resolveLazy(key) === currentFirstChild.type)
|
||||
) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(child, newChild.props);
|
||||
coerceRef(returnFiber, child, currentFirstChild, newChild);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(currentFirstChild, newChild.props);
|
||||
lanes.ref = newChild.ref;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
deleteRemainingChildren(returnFiber, child);
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
break;
|
||||
} else deleteChild(returnFiber, child);
|
||||
child = child.sibling;
|
||||
} else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
newChild.type === REACT_FRAGMENT_TYPE
|
||||
? ((currentFirstChild = createFiberFromFragment(
|
||||
? ((lanes = createFiberFromFragment(
|
||||
newChild.props.children,
|
||||
returnFiber.mode,
|
||||
lanes,
|
||||
newChild.key
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: ((lanes = createFiberFromTypeAndProps(
|
||||
newChild.type,
|
||||
newChild.key,
|
||||
@@ -3514,15 +3474,15 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, currentFirstChild, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes));
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_PORTAL_TYPE:
|
||||
a: {
|
||||
for (child = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === child)
|
||||
for (key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key)
|
||||
if (
|
||||
4 === currentFirstChild.tag &&
|
||||
currentFirstChild.stateNode.containerInfo ===
|
||||
@@ -3534,12 +3494,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
currentFirstChild = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.children || []
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = useFiber(currentFirstChild, newChild.children || []);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
} else {
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
@@ -3548,22 +3505,18 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
currentFirstChild = createFiberFromPortal(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_LAZY_TYPE:
|
||||
return (
|
||||
(child = newChild._init),
|
||||
(key = newChild._init),
|
||||
reconcileChildFibersImpl(
|
||||
returnFiber,
|
||||
currentFirstChild,
|
||||
child(newChild._payload),
|
||||
key(newChild._payload),
|
||||
lanes
|
||||
)
|
||||
);
|
||||
@@ -3604,17 +3557,13 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
? ((newChild = "" + newChild),
|
||||
null !== currentFirstChild && 6 === currentFirstChild.tag
|
||||
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
|
||||
(currentFirstChild = useFiber(currentFirstChild, newChild)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes = useFiber(currentFirstChild, newChild)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: (deleteRemainingChildren(returnFiber, currentFirstChild),
|
||||
(currentFirstChild = createFiberFromText(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild)),
|
||||
(lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes)),
|
||||
placeSingleChild(returnFiber))
|
||||
: deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
}
|
||||
@@ -3707,9 +3656,7 @@ function findFirstSuspended(row) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
renderLanes = 0,
|
||||
var renderLanes = 0,
|
||||
currentlyRenderingFiber$1 = null,
|
||||
currentHook = null,
|
||||
workInProgressHook = null,
|
||||
@@ -3743,7 +3690,7 @@ function renderWithHooks(
|
||||
workInProgress.memoizedState = null;
|
||||
workInProgress.updateQueue = null;
|
||||
workInProgress.lanes = 0;
|
||||
ReactCurrentDispatcher$1.current =
|
||||
ReactSharedInternals.H =
|
||||
null === current || null === current.memoizedState
|
||||
? HooksDispatcherOnMount
|
||||
: HooksDispatcherOnUpdate;
|
||||
@@ -3761,7 +3708,7 @@ function renderWithHooks(
|
||||
return current;
|
||||
}
|
||||
function finishRenderingHooks() {
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
|
||||
renderLanes = 0;
|
||||
workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
|
||||
@@ -3787,17 +3734,23 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
|
||||
numberOfReRenders += 1;
|
||||
workInProgressHook = currentHook = null;
|
||||
workInProgress.updateQueue = null;
|
||||
ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender;
|
||||
ReactSharedInternals.H = HooksDispatcherOnRerender;
|
||||
var children = Component(props, secondArg);
|
||||
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
||||
return children;
|
||||
}
|
||||
function TransitionAwareHostComponent() {
|
||||
if (!enableAsyncActions) throw Error("Not implemented.");
|
||||
var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0];
|
||||
return "function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
var dispatcher = ReactSharedInternals.H,
|
||||
maybeThenable = dispatcher.useState()[0];
|
||||
maybeThenable =
|
||||
"function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
dispatcher = dispatcher.useState()[0];
|
||||
(null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
|
||||
(currentlyRenderingFiber$1.flags |= 1024);
|
||||
return maybeThenable;
|
||||
}
|
||||
function bailoutHooks(current, workInProgress, lanes) {
|
||||
workInProgress.updateQueue = current.updateQueue;
|
||||
@@ -3885,7 +3838,7 @@ function useThenable(thenable) {
|
||||
(null === workInProgressHook
|
||||
? null === currentlyRenderingFiber$1.memoizedState
|
||||
: null === workInProgressHook.next) &&
|
||||
(ReactCurrentDispatcher$1.current = HooksDispatcherOnMount);
|
||||
(ReactSharedInternals.H = HooksDispatcherOnMount);
|
||||
return thenable;
|
||||
}
|
||||
function use(usable) {
|
||||
@@ -4219,9 +4172,9 @@ function dispatchActionState(
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
ReactCurrentBatchConfig$2.transition = currentTransition;
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
try {
|
||||
var returnValue = action(prevState, payload);
|
||||
@@ -4254,7 +4207,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
setState({ then: function () {}, status: "rejected", reason: error }),
|
||||
finishRunningActionStateAction(actionQueue, setPendingState, setState);
|
||||
} finally {
|
||||
ReactCurrentBatchConfig$2.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
}
|
||||
function finishRunningActionStateAction(
|
||||
@@ -4494,14 +4447,14 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
var previousPriority = currentUpdatePriority;
|
||||
currentUpdatePriority =
|
||||
0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
|
||||
var prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
enableAsyncActions
|
||||
? ((ReactCurrentBatchConfig$2.transition = currentTransition),
|
||||
? ((ReactSharedInternals.T = currentTransition),
|
||||
dispatchOptimisticSetState(fiber, !1, queue, pendingState))
|
||||
: ((ReactCurrentBatchConfig$2.transition = null),
|
||||
: ((ReactSharedInternals.T = null),
|
||||
dispatchSetState(fiber, queue, pendingState),
|
||||
(ReactCurrentBatchConfig$2.transition = currentTransition));
|
||||
(ReactSharedInternals.T = currentTransition));
|
||||
try {
|
||||
if (enableAsyncActions) {
|
||||
var returnValue = callback();
|
||||
@@ -4528,7 +4481,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
else throw error;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig$2.transition = prevTransition);
|
||||
(ReactSharedInternals.T = prevTransition);
|
||||
}
|
||||
}
|
||||
function useHostTransitionStatus() {
|
||||
@@ -5081,7 +5034,7 @@ function resolveClassComponentProps(
|
||||
(Component = Component.defaultProps) &&
|
||||
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
|
||||
) {
|
||||
newProps = assign({}, newProps, baseProps);
|
||||
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
|
||||
for (var propName in Component)
|
||||
void 0 === newProps[propName] &&
|
||||
(newProps[propName] = Component[propName]);
|
||||
@@ -5348,8 +5301,7 @@ function throwException(
|
||||
} while (null !== returnFiber);
|
||||
return !1;
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
|
||||
SelectiveHydrationException = Error(
|
||||
var SelectiveHydrationException = Error(
|
||||
"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
|
||||
),
|
||||
didReceiveUpdate = !1;
|
||||
@@ -5564,8 +5516,22 @@ function markRef(current, workInProgress) {
|
||||
throw Error(
|
||||
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
|
||||
);
|
||||
if (null === current || current.ref !== ref)
|
||||
if (null === current || current.ref !== ref) {
|
||||
if (
|
||||
null !== current &&
|
||||
((current = current.ref),
|
||||
"function" === typeof current &&
|
||||
"function" === typeof ref &&
|
||||
"string" === typeof current.__stringRef &&
|
||||
current.__stringRef === ref.__stringRef &&
|
||||
current.__stringRefType === ref.__stringRefType &&
|
||||
current.__stringRefOwner === ref.__stringRefOwner)
|
||||
) {
|
||||
workInProgress.ref = current;
|
||||
return;
|
||||
}
|
||||
workInProgress.flags |= 2097664;
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateFunctionComponent(
|
||||
@@ -5846,7 +5812,7 @@ function finishClassComponent(
|
||||
bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
||||
);
|
||||
shouldUpdate = workInProgress.stateNode;
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
ReactSharedInternals.owner = workInProgress;
|
||||
var nextChildren =
|
||||
didCaptureError && "function" !== typeof Component.getDerivedStateFromError
|
||||
? null
|
||||
@@ -7058,9 +7024,8 @@ function releaseCache(cache) {
|
||||
cache.controller.abort();
|
||||
});
|
||||
}
|
||||
var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
|
||||
function requestCurrentTransition() {
|
||||
var transition = ReactCurrentBatchConfig$1.transition;
|
||||
var transition = ReactSharedInternals.T;
|
||||
null !== transition && transition._callbacks.add(handleAsyncAction);
|
||||
return transition;
|
||||
}
|
||||
@@ -7094,7 +7059,7 @@ function doesRequireClone(current, completedWork) {
|
||||
if (null !== current && current.child === completedWork.child) return !1;
|
||||
if (0 !== (completedWork.flags & 16)) return !0;
|
||||
for (current = completedWork.child; null !== current; ) {
|
||||
if (0 !== (current.flags & 12854) || 0 !== (current.subtreeFlags & 12854))
|
||||
if (0 !== (current.flags & 13878) || 0 !== (current.subtreeFlags & 13878))
|
||||
return !0;
|
||||
current = current.sibling;
|
||||
}
|
||||
@@ -8257,7 +8222,7 @@ function recursivelyTraverseMutationEffects(root, parentFiber) {
|
||||
captureCommitPhaseError(childToDelete, parentFiber, error);
|
||||
}
|
||||
}
|
||||
if (parentFiber.subtreeFlags & 12854)
|
||||
if (parentFiber.subtreeFlags & 13878)
|
||||
for (parentFiber = parentFiber.child; null !== parentFiber; )
|
||||
commitMutationEffectsOnFiber(parentFiber, root),
|
||||
(parentFiber = parentFiber.sibling);
|
||||
@@ -8998,10 +8963,6 @@ var DefaultCacheDispatcher = {
|
||||
}
|
||||
},
|
||||
PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
|
||||
ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentCache = ReactSharedInternals.ReactCurrentCache,
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
executionContext = 0,
|
||||
workInProgressRoot = null,
|
||||
workInProgress = null,
|
||||
@@ -9031,29 +8992,14 @@ var DefaultCacheDispatcher = {
|
||||
nestedUpdateCount = 0,
|
||||
rootWithNestedUpdates = null;
|
||||
function requestUpdateLane(fiber) {
|
||||
if (0 === (fiber.mode & 1)) return 2;
|
||||
if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes)
|
||||
return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
|
||||
if (null !== requestCurrentTransition())
|
||||
return (
|
||||
(fiber = currentEntangledLane),
|
||||
0 !== fiber ? fiber : requestTransitionLane()
|
||||
);
|
||||
fiber = currentUpdatePriority;
|
||||
if (0 === fiber)
|
||||
a: {
|
||||
fiber = fabricGetCurrentEventPriority
|
||||
? fabricGetCurrentEventPriority()
|
||||
: null;
|
||||
if (null != fiber)
|
||||
switch (fiber) {
|
||||
case FabricDiscretePriority:
|
||||
fiber = 2;
|
||||
break a;
|
||||
}
|
||||
fiber = 32;
|
||||
}
|
||||
return fiber;
|
||||
return 0 === (fiber.mode & 1)
|
||||
? 2
|
||||
: 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes
|
||||
? workInProgressRootRenderLanes & -workInProgressRootRenderLanes
|
||||
: null !== requestCurrentTransition()
|
||||
? ((fiber = currentEntangledLane),
|
||||
0 !== fiber ? fiber : requestTransitionLane())
|
||||
: resolveUpdatePriority();
|
||||
}
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
@@ -9129,13 +9075,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root,
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
if (
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
)),
|
||||
(renderWasConcurrent = !1),
|
||||
2 !== exitStatus)
|
||||
)
|
||||
continue;
|
||||
}
|
||||
if (1 === exitStatus) {
|
||||
prepareFreshStack(root, 0);
|
||||
@@ -9431,8 +9382,8 @@ function prepareFreshStack(root, lanes) {
|
||||
}
|
||||
function handleThrow(root, thrownValue) {
|
||||
currentlyRenderingFiber$1 = null;
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.owner = null;
|
||||
if (thrownValue === SuspenseException) {
|
||||
thrownValue = getSuspendedThenable();
|
||||
var handler = suspenseHandlerStackCursor.current;
|
||||
@@ -9470,13 +9421,13 @@ function handleThrow(root, thrownValue) {
|
||||
));
|
||||
}
|
||||
function pushDispatcher() {
|
||||
var prevDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = ContextOnlyDispatcher;
|
||||
var prevDispatcher = ReactSharedInternals.H;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
|
||||
}
|
||||
function pushCacheDispatcher() {
|
||||
var prevCacheDispatcher = ReactCurrentCache.current;
|
||||
ReactCurrentCache.current = DefaultCacheDispatcher;
|
||||
var prevCacheDispatcher = ReactSharedInternals.C;
|
||||
ReactSharedInternals.C = DefaultCacheDispatcher;
|
||||
return prevCacheDispatcher;
|
||||
}
|
||||
function renderDidSuspendDelayIfPossible() {
|
||||
@@ -9528,8 +9479,8 @@ function renderRootSync(root, lanes) {
|
||||
lanes && root.shellSuspendCounter++;
|
||||
resetContextDependencies();
|
||||
executionContext = prevExecutionContext;
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
if (null !== workInProgress)
|
||||
throw Error(
|
||||
"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."
|
||||
@@ -9635,8 +9586,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
executionContext = prevExecutionContext;
|
||||
if (null !== workInProgress) return 0;
|
||||
workInProgressRoot = null;
|
||||
@@ -9652,7 +9603,7 @@ function performUnitOfWork(unitOfWork) {
|
||||
var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);
|
||||
unitOfWork.memoizedProps = unitOfWork.pendingProps;
|
||||
null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
var current = unitOfWork.alternate;
|
||||
@@ -9708,7 +9659,7 @@ function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
null === current
|
||||
? completeUnitOfWork(unitOfWork)
|
||||
: (workInProgress = current);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {
|
||||
resetContextDependencies();
|
||||
@@ -9795,11 +9746,11 @@ function commitRoot(
|
||||
didIncludeRenderPhaseUpdate,
|
||||
spawnedLane
|
||||
) {
|
||||
var previousUpdateLanePriority = currentUpdatePriority,
|
||||
prevTransition = ReactCurrentBatchConfig.transition;
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
previousUpdateLanePriority = currentUpdatePriority;
|
||||
try {
|
||||
(ReactCurrentBatchConfig.transition = null),
|
||||
(currentUpdatePriority = 2),
|
||||
(currentUpdatePriority = 2),
|
||||
(ReactSharedInternals.T = null),
|
||||
commitRootImpl(
|
||||
root,
|
||||
recoverableErrors,
|
||||
@@ -9809,7 +9760,7 @@ function commitRoot(
|
||||
spawnedLane
|
||||
);
|
||||
} finally {
|
||||
(ReactCurrentBatchConfig.transition = prevTransition),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
(currentUpdatePriority = previousUpdateLanePriority);
|
||||
}
|
||||
return null;
|
||||
@@ -9857,13 +9808,13 @@ function commitRootImpl(
|
||||
}));
|
||||
transitions = 0 !== (finishedWork.flags & 15990);
|
||||
if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) {
|
||||
transitions = ReactCurrentBatchConfig.transition;
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
transitions = ReactSharedInternals.T;
|
||||
ReactSharedInternals.T = null;
|
||||
spawnedLane = currentUpdatePriority;
|
||||
currentUpdatePriority = 2;
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 4;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
commitBeforeMutationEffects(root, finishedWork);
|
||||
commitMutationEffectsOnFiber(finishedWork, root);
|
||||
root.current = finishedWork;
|
||||
@@ -9871,7 +9822,7 @@ function commitRootImpl(
|
||||
requestPaint();
|
||||
executionContext = prevExecutionContext;
|
||||
currentUpdatePriority = spawnedLane;
|
||||
ReactCurrentBatchConfig.transition = transitions;
|
||||
ReactSharedInternals.T = transitions;
|
||||
} else root.current = finishedWork;
|
||||
rootDoesHavePassiveEffects
|
||||
? ((rootDoesHavePassiveEffects = !1),
|
||||
@@ -9918,16 +9869,15 @@ function flushPassiveEffects() {
|
||||
remainingLanes = pendingPassiveEffectsRemainingLanes;
|
||||
pendingPassiveEffectsRemainingLanes = 0;
|
||||
var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
|
||||
priority = 32 > renderPriority ? 32 : renderPriority;
|
||||
renderPriority = ReactCurrentBatchConfig.transition;
|
||||
var previousPriority = currentUpdatePriority;
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
previousPriority = currentUpdatePriority;
|
||||
try {
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
currentUpdatePriority = priority;
|
||||
currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
|
||||
ReactSharedInternals.T = null;
|
||||
if (null === rootWithPendingPassiveEffects)
|
||||
var JSCompiler_inline_result = !1;
|
||||
else {
|
||||
priority = pendingPassiveTransitions;
|
||||
renderPriority = pendingPassiveTransitions;
|
||||
pendingPassiveTransitions = null;
|
||||
var root$jscomp$0 = rootWithPendingPassiveEffects,
|
||||
lanes = pendingPassiveEffectsLanes;
|
||||
@@ -9942,7 +9892,7 @@ function flushPassiveEffects() {
|
||||
root$jscomp$0,
|
||||
root$jscomp$0.current,
|
||||
lanes,
|
||||
priority
|
||||
renderPriority
|
||||
);
|
||||
executionContext = prevExecutionContext;
|
||||
flushSyncWorkAcrossRoots_impl(!1);
|
||||
@@ -9958,7 +9908,7 @@ function flushPassiveEffects() {
|
||||
return JSCompiler_inline_result;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig.transition = renderPriority),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
releaseRootPooledCache(root, remainingLanes);
|
||||
}
|
||||
}
|
||||
@@ -10563,6 +10513,13 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
componentStack: ""
|
||||
};
|
||||
closestInstance = findCurrentFiberUsingSlowPath(closestInstance);
|
||||
if (null === closestInstance)
|
||||
return {
|
||||
hierarchy: [],
|
||||
props: emptyObject,
|
||||
selectedIndex: null,
|
||||
componentStack: ""
|
||||
};
|
||||
var hierarchy = [];
|
||||
traverseOwnerTreeUp(hierarchy, closestInstance);
|
||||
var JSCompiler_inline_result;
|
||||
@@ -10583,10 +10540,7 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
instance = createHierarchy(hierarchy);
|
||||
var props = getHostProps(JSCompiler_inline_result);
|
||||
hierarchy = hierarchy.indexOf(JSCompiler_inline_result);
|
||||
closestInstance =
|
||||
null !== closestInstance
|
||||
? getStackByFiberInDevAndProd(closestInstance)
|
||||
: "";
|
||||
closestInstance = getStackByFiberInDevAndProd(closestInstance);
|
||||
return {
|
||||
closestInstance: JSCompiler_inline_result,
|
||||
hierarchy: instance,
|
||||
@@ -10596,9 +10550,11 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
};
|
||||
}
|
||||
function traverseOwnerTreeUp(hierarchy, instance) {
|
||||
instance &&
|
||||
(hierarchy.unshift(instance),
|
||||
traverseOwnerTreeUp(hierarchy, instance._debugOwner));
|
||||
hierarchy.unshift(instance);
|
||||
instance = instance._debugOwner;
|
||||
null != instance &&
|
||||
"number" === typeof instance.tag &&
|
||||
traverseOwnerTreeUp(hierarchy, instance);
|
||||
}
|
||||
if (
|
||||
"function" !==
|
||||
@@ -10638,10 +10594,10 @@ batchedUpdatesImpl = function (fn, a) {
|
||||
}
|
||||
};
|
||||
var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1096 = {
|
||||
devToolsConfig$jscomp$inline_1099 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-canary-e9ef48bd",
|
||||
version: "19.0.0-canary-58256eec",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -10657,11 +10613,11 @@ var roots = new Map(),
|
||||
}.bind(null, findNodeHandle)
|
||||
}
|
||||
};
|
||||
var internals$jscomp$inline_1335 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1096.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1096.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1096.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1096.rendererConfig,
|
||||
var internals$jscomp$inline_1366 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1099.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1099.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1099.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1099.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -10671,32 +10627,32 @@ var internals$jscomp$inline_1335 = {
|
||||
setErrorHandler: null,
|
||||
setSuspenseHandler: null,
|
||||
scheduleUpdate: null,
|
||||
currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findHostInstanceByFiber: function (fiber) {
|
||||
fiber = findCurrentHostFiber(fiber);
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1096.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1099.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-canary-e9ef48bd"
|
||||
reconcilerVersion: "19.0.0-canary-58256eec"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1336 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1367 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1336.isDisabled &&
|
||||
hook$jscomp$inline_1336.supportsFiber
|
||||
!hook$jscomp$inline_1367.isDisabled &&
|
||||
hook$jscomp$inline_1367.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1336.inject(
|
||||
internals$jscomp$inline_1335
|
||||
(rendererID = hook$jscomp$inline_1367.inject(
|
||||
internals$jscomp$inline_1366
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1336);
|
||||
(injectedHook = hook$jscomp$inline_1367);
|
||||
} catch (err) {}
|
||||
}
|
||||
exports.createPortal = function (children, containerTag) {
|
||||
|
||||
+200
-244
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<73c6c2752bbd85d9ac37604b580550af>>
|
||||
* @generated SignedSource<<813f6dc65831980928080bda767b77e1>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([
|
||||
"ReactNativeBridgeEventPlugin"
|
||||
]);
|
||||
recomputePluginOrdering();
|
||||
var injectedNamesToPlugins$jscomp$inline_264 = {
|
||||
var injectedNamesToPlugins$jscomp$inline_263 = {
|
||||
ResponderEventPlugin: ResponderEventPlugin,
|
||||
ReactNativeBridgeEventPlugin: {
|
||||
eventTypes: {},
|
||||
@@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_264 = {
|
||||
}
|
||||
}
|
||||
},
|
||||
isOrderingDirty$jscomp$inline_265 = !1,
|
||||
pluginName$jscomp$inline_266;
|
||||
for (pluginName$jscomp$inline_266 in injectedNamesToPlugins$jscomp$inline_264)
|
||||
isOrderingDirty$jscomp$inline_264 = !1,
|
||||
pluginName$jscomp$inline_265;
|
||||
for (pluginName$jscomp$inline_265 in injectedNamesToPlugins$jscomp$inline_263)
|
||||
if (
|
||||
injectedNamesToPlugins$jscomp$inline_264.hasOwnProperty(
|
||||
pluginName$jscomp$inline_266
|
||||
injectedNamesToPlugins$jscomp$inline_263.hasOwnProperty(
|
||||
pluginName$jscomp$inline_265
|
||||
)
|
||||
) {
|
||||
var pluginModule$jscomp$inline_267 =
|
||||
injectedNamesToPlugins$jscomp$inline_264[pluginName$jscomp$inline_266];
|
||||
var pluginModule$jscomp$inline_266 =
|
||||
injectedNamesToPlugins$jscomp$inline_263[pluginName$jscomp$inline_265];
|
||||
if (
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_266) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_266] !==
|
||||
pluginModule$jscomp$inline_267
|
||||
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_265) ||
|
||||
namesToPlugins[pluginName$jscomp$inline_265] !==
|
||||
pluginModule$jscomp$inline_266
|
||||
) {
|
||||
if (namesToPlugins[pluginName$jscomp$inline_266])
|
||||
if (namesToPlugins[pluginName$jscomp$inline_265])
|
||||
throw Error(
|
||||
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
|
||||
(pluginName$jscomp$inline_266 + "`.")
|
||||
(pluginName$jscomp$inline_265 + "`.")
|
||||
);
|
||||
namesToPlugins[pluginName$jscomp$inline_266] =
|
||||
pluginModule$jscomp$inline_267;
|
||||
isOrderingDirty$jscomp$inline_265 = !0;
|
||||
namesToPlugins[pluginName$jscomp$inline_265] =
|
||||
pluginModule$jscomp$inline_266;
|
||||
isOrderingDirty$jscomp$inline_264 = !0;
|
||||
}
|
||||
}
|
||||
isOrderingDirty$jscomp$inline_265 && recomputePluginOrdering();
|
||||
isOrderingDirty$jscomp$inline_264 && recomputePluginOrdering();
|
||||
var emptyObject$1 = {},
|
||||
removedKeys = null,
|
||||
removedKeyCount = 0,
|
||||
@@ -1296,7 +1296,7 @@ var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries,
|
||||
log$1 = Scheduler.log,
|
||||
unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
|
||||
ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
rendererID = null,
|
||||
injectedHook = null,
|
||||
injectedProfilingHooks = null,
|
||||
@@ -1649,7 +1649,6 @@ function movePendingFibersToMemoized(root, lanes) {
|
||||
lanes &= ~root;
|
||||
}
|
||||
}
|
||||
var currentUpdatePriority = 0;
|
||||
function lanesToEventPriority(lanes) {
|
||||
lanes &= -lanes;
|
||||
return 2 < lanes
|
||||
@@ -1708,6 +1707,19 @@ function getPublicInstance(instance) {
|
||||
? instance
|
||||
: null;
|
||||
}
|
||||
var currentUpdatePriority = 0;
|
||||
function resolveUpdatePriority() {
|
||||
if (0 !== currentUpdatePriority) return currentUpdatePriority;
|
||||
var currentEventPriority = fabricGetCurrentEventPriority
|
||||
? fabricGetCurrentEventPriority()
|
||||
: null;
|
||||
if (null != currentEventPriority)
|
||||
switch (currentEventPriority) {
|
||||
case FabricDiscretePriority:
|
||||
return 2;
|
||||
}
|
||||
return 32;
|
||||
}
|
||||
var scheduleTimeout = setTimeout,
|
||||
cancelTimeout = clearTimeout;
|
||||
function cloneHiddenInstance(instance) {
|
||||
@@ -2128,7 +2140,7 @@ function describeBuiltInComponentFrame(name) {
|
||||
}
|
||||
return "\n" + prefix + name;
|
||||
}
|
||||
return describeComponentFrame(name, null);
|
||||
return "\n in " + (name || "Unknown");
|
||||
}
|
||||
var reentry = !1;
|
||||
function describeNativeComponentFrame(fn, construct) {
|
||||
@@ -2262,16 +2274,11 @@ function describeNativeComponentFrame(fn, construct) {
|
||||
? describeBuiltInComponentFrame(previousPrepareStackTrace)
|
||||
: "";
|
||||
}
|
||||
function describeComponentFrame(name, ownerName) {
|
||||
var sourceInfo = "";
|
||||
ownerName && (sourceInfo = " (created by " + ownerName + ")");
|
||||
return "\n in " + (name || "Unknown") + sourceInfo;
|
||||
}
|
||||
function describeFunctionComponentFrame(fn) {
|
||||
return enableComponentStackLocations
|
||||
? describeNativeComponentFrame(fn, !1)
|
||||
: fn
|
||||
? describeComponentFrame(fn.displayName || fn.name || null, null)
|
||||
? "\n in " + (fn.displayName || fn.name || "Unknown")
|
||||
: "";
|
||||
}
|
||||
function describeFiber(fiber) {
|
||||
@@ -3022,55 +3029,6 @@ function unwrapThenable(thenable) {
|
||||
null === thenableState$1 && (thenableState$1 = []);
|
||||
return trackUsedThenable(thenableState$1, thenable, index);
|
||||
}
|
||||
function convertStringRefToCallbackRef(
|
||||
returnFiber,
|
||||
current,
|
||||
element,
|
||||
mixedRef
|
||||
) {
|
||||
function ref(value) {
|
||||
var refs = inst.refs;
|
||||
null === value ? delete refs[stringRef] : (refs[stringRef] = value);
|
||||
}
|
||||
var stringRef = "" + mixedRef;
|
||||
returnFiber = element._owner;
|
||||
if (!returnFiber)
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
if (1 !== returnFiber.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = returnFiber.stateNode;
|
||||
if (!inst)
|
||||
throw Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a bug in React. Please file an issue."
|
||||
);
|
||||
if (
|
||||
null !== current &&
|
||||
null !== current.ref &&
|
||||
"function" === typeof current.ref &&
|
||||
current.ref._stringRef === stringRef
|
||||
)
|
||||
return current.ref;
|
||||
ref._stringRef = stringRef;
|
||||
return ref;
|
||||
}
|
||||
function coerceRef(returnFiber, current, workInProgress, element) {
|
||||
var mixedRef = element.ref;
|
||||
returnFiber =
|
||||
"string" === typeof mixedRef ||
|
||||
"number" === typeof mixedRef ||
|
||||
"boolean" === typeof mixedRef
|
||||
? convertStringRefToCallbackRef(returnFiber, current, element, mixedRef)
|
||||
: mixedRef;
|
||||
workInProgress.ref = returnFiber;
|
||||
}
|
||||
function throwOnInvalidObjectType(returnFiber, newChild) {
|
||||
returnFiber = Object.prototype.toString.call(newChild);
|
||||
throw Error(
|
||||
@@ -3166,12 +3124,12 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
resolveLazy(elementType) === current.type))
|
||||
)
|
||||
return (
|
||||
(lanes = useFiber(current, element.props)),
|
||||
coerceRef(returnFiber, current, lanes, element),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
(current = useFiber(current, element.props)),
|
||||
(current.ref = element.ref),
|
||||
(current.return = returnFiber),
|
||||
current
|
||||
);
|
||||
lanes = createFiberFromTypeAndProps(
|
||||
current = createFiberFromTypeAndProps(
|
||||
element.type,
|
||||
element.key,
|
||||
element.props,
|
||||
@@ -3179,9 +3137,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
coerceRef(returnFiber, current, lanes, element);
|
||||
lanes.return = returnFiber;
|
||||
return lanes;
|
||||
current.ref = element.ref;
|
||||
current.return = returnFiber;
|
||||
return current;
|
||||
}
|
||||
function updatePortal(returnFiber, current, portal, lanes) {
|
||||
if (
|
||||
@@ -3242,7 +3200,7 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, null, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
);
|
||||
@@ -3582,52 +3540,54 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
switch (newChild.$$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
a: {
|
||||
for (
|
||||
var key = newChild.key, child = currentFirstChild;
|
||||
null !== child;
|
||||
|
||||
) {
|
||||
if (child.key === key) {
|
||||
for (var key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key) {
|
||||
key = newChild.type;
|
||||
if (key === REACT_FRAGMENT_TYPE) {
|
||||
if (7 === child.tag) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(
|
||||
child,
|
||||
if (7 === currentFirstChild.tag) {
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.props.children
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
} else if (
|
||||
child.elementType === key ||
|
||||
currentFirstChild.elementType === key ||
|
||||
("object" === typeof key &&
|
||||
null !== key &&
|
||||
key.$$typeof === REACT_LAZY_TYPE &&
|
||||
resolveLazy(key) === child.type)
|
||||
resolveLazy(key) === currentFirstChild.type)
|
||||
) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(child, newChild.props);
|
||||
coerceRef(returnFiber, child, currentFirstChild, newChild);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(currentFirstChild, newChild.props);
|
||||
lanes.ref = newChild.ref;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
deleteRemainingChildren(returnFiber, child);
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
break;
|
||||
} else deleteChild(returnFiber, child);
|
||||
child = child.sibling;
|
||||
} else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
newChild.type === REACT_FRAGMENT_TYPE
|
||||
? ((currentFirstChild = createFiberFromFragment(
|
||||
? ((lanes = createFiberFromFragment(
|
||||
newChild.props.children,
|
||||
returnFiber.mode,
|
||||
lanes,
|
||||
newChild.key
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: ((lanes = createFiberFromTypeAndProps(
|
||||
newChild.type,
|
||||
newChild.key,
|
||||
@@ -3636,15 +3596,15 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, currentFirstChild, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes));
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_PORTAL_TYPE:
|
||||
a: {
|
||||
for (child = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === child)
|
||||
for (key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key)
|
||||
if (
|
||||
4 === currentFirstChild.tag &&
|
||||
currentFirstChild.stateNode.containerInfo ===
|
||||
@@ -3656,12 +3616,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
currentFirstChild = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.children || []
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = useFiber(currentFirstChild, newChild.children || []);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
} else {
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
@@ -3670,22 +3627,18 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
currentFirstChild = createFiberFromPortal(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_LAZY_TYPE:
|
||||
return (
|
||||
(child = newChild._init),
|
||||
(key = newChild._init),
|
||||
reconcileChildFibersImpl(
|
||||
returnFiber,
|
||||
currentFirstChild,
|
||||
child(newChild._payload),
|
||||
key(newChild._payload),
|
||||
lanes
|
||||
)
|
||||
);
|
||||
@@ -3726,17 +3679,13 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
? ((newChild = "" + newChild),
|
||||
null !== currentFirstChild && 6 === currentFirstChild.tag
|
||||
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
|
||||
(currentFirstChild = useFiber(currentFirstChild, newChild)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes = useFiber(currentFirstChild, newChild)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: (deleteRemainingChildren(returnFiber, currentFirstChild),
|
||||
(currentFirstChild = createFiberFromText(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild)),
|
||||
(lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes)),
|
||||
placeSingleChild(returnFiber))
|
||||
: deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
}
|
||||
@@ -3829,9 +3778,7 @@ function findFirstSuspended(row) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
renderLanes = 0,
|
||||
var renderLanes = 0,
|
||||
currentlyRenderingFiber$1 = null,
|
||||
currentHook = null,
|
||||
workInProgressHook = null,
|
||||
@@ -3865,7 +3812,7 @@ function renderWithHooks(
|
||||
workInProgress.memoizedState = null;
|
||||
workInProgress.updateQueue = null;
|
||||
workInProgress.lanes = 0;
|
||||
ReactCurrentDispatcher$1.current =
|
||||
ReactSharedInternals.H =
|
||||
null === current || null === current.memoizedState
|
||||
? HooksDispatcherOnMount
|
||||
: HooksDispatcherOnUpdate;
|
||||
@@ -3883,7 +3830,7 @@ function renderWithHooks(
|
||||
return current;
|
||||
}
|
||||
function finishRenderingHooks() {
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
|
||||
renderLanes = 0;
|
||||
workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
|
||||
@@ -3909,17 +3856,23 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
|
||||
numberOfReRenders += 1;
|
||||
workInProgressHook = currentHook = null;
|
||||
workInProgress.updateQueue = null;
|
||||
ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender;
|
||||
ReactSharedInternals.H = HooksDispatcherOnRerender;
|
||||
var children = Component(props, secondArg);
|
||||
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
||||
return children;
|
||||
}
|
||||
function TransitionAwareHostComponent() {
|
||||
if (!enableAsyncActions) throw Error("Not implemented.");
|
||||
var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0];
|
||||
return "function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
var dispatcher = ReactSharedInternals.H,
|
||||
maybeThenable = dispatcher.useState()[0];
|
||||
maybeThenable =
|
||||
"function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
dispatcher = dispatcher.useState()[0];
|
||||
(null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
|
||||
(currentlyRenderingFiber$1.flags |= 1024);
|
||||
return maybeThenable;
|
||||
}
|
||||
function bailoutHooks(current, workInProgress, lanes) {
|
||||
workInProgress.updateQueue = current.updateQueue;
|
||||
@@ -4007,7 +3960,7 @@ function useThenable(thenable) {
|
||||
(null === workInProgressHook
|
||||
? null === currentlyRenderingFiber$1.memoizedState
|
||||
: null === workInProgressHook.next) &&
|
||||
(ReactCurrentDispatcher$1.current = HooksDispatcherOnMount);
|
||||
(ReactSharedInternals.H = HooksDispatcherOnMount);
|
||||
return thenable;
|
||||
}
|
||||
function use(usable) {
|
||||
@@ -4341,9 +4294,9 @@ function dispatchActionState(
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
ReactCurrentBatchConfig$2.transition = currentTransition;
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
try {
|
||||
var returnValue = action(prevState, payload);
|
||||
@@ -4376,7 +4329,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
setState({ then: function () {}, status: "rejected", reason: error }),
|
||||
finishRunningActionStateAction(actionQueue, setPendingState, setState);
|
||||
} finally {
|
||||
ReactCurrentBatchConfig$2.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
}
|
||||
function finishRunningActionStateAction(
|
||||
@@ -4616,14 +4569,14 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
var previousPriority = currentUpdatePriority;
|
||||
currentUpdatePriority =
|
||||
0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
|
||||
var prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
enableAsyncActions
|
||||
? ((ReactCurrentBatchConfig$2.transition = currentTransition),
|
||||
? ((ReactSharedInternals.T = currentTransition),
|
||||
dispatchOptimisticSetState(fiber, !1, queue, pendingState))
|
||||
: ((ReactCurrentBatchConfig$2.transition = null),
|
||||
: ((ReactSharedInternals.T = null),
|
||||
dispatchSetState(fiber, queue, pendingState),
|
||||
(ReactCurrentBatchConfig$2.transition = currentTransition));
|
||||
(ReactSharedInternals.T = currentTransition));
|
||||
try {
|
||||
if (enableAsyncActions) {
|
||||
var returnValue = callback();
|
||||
@@ -4650,7 +4603,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
else throw error;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig$2.transition = prevTransition);
|
||||
(ReactSharedInternals.T = prevTransition);
|
||||
}
|
||||
}
|
||||
function useHostTransitionStatus() {
|
||||
@@ -5273,7 +5226,7 @@ function resolveClassComponentProps(
|
||||
(Component = Component.defaultProps) &&
|
||||
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
|
||||
) {
|
||||
newProps = assign({}, newProps, baseProps);
|
||||
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
|
||||
for (var propName in Component)
|
||||
void 0 === newProps[propName] &&
|
||||
(newProps[propName] = Component[propName]);
|
||||
@@ -5541,8 +5494,7 @@ function throwException(
|
||||
} while (null !== returnFiber);
|
||||
return !1;
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
|
||||
SelectiveHydrationException = Error(
|
||||
var SelectiveHydrationException = Error(
|
||||
"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
|
||||
),
|
||||
didReceiveUpdate = !1;
|
||||
@@ -5759,8 +5711,22 @@ function markRef(current, workInProgress) {
|
||||
throw Error(
|
||||
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
|
||||
);
|
||||
if (null === current || current.ref !== ref)
|
||||
if (null === current || current.ref !== ref) {
|
||||
if (
|
||||
null !== current &&
|
||||
((current = current.ref),
|
||||
"function" === typeof current &&
|
||||
"function" === typeof ref &&
|
||||
"string" === typeof current.__stringRef &&
|
||||
current.__stringRef === ref.__stringRef &&
|
||||
current.__stringRefType === ref.__stringRefType &&
|
||||
current.__stringRefOwner === ref.__stringRefOwner)
|
||||
) {
|
||||
workInProgress.ref = current;
|
||||
return;
|
||||
}
|
||||
workInProgress.flags |= 2097664;
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateFunctionComponent(
|
||||
@@ -6045,7 +6011,7 @@ function finishClassComponent(
|
||||
bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
||||
);
|
||||
shouldUpdate = workInProgress.stateNode;
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
ReactSharedInternals.owner = workInProgress;
|
||||
if (
|
||||
didCaptureError &&
|
||||
"function" !== typeof Component.getDerivedStateFromError
|
||||
@@ -7288,9 +7254,8 @@ function releaseCache(cache) {
|
||||
cache.controller.abort();
|
||||
});
|
||||
}
|
||||
var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
|
||||
function requestCurrentTransition() {
|
||||
var transition = ReactCurrentBatchConfig$1.transition;
|
||||
var transition = ReactSharedInternals.T;
|
||||
null !== transition && transition._callbacks.add(handleAsyncAction);
|
||||
return transition;
|
||||
}
|
||||
@@ -7324,7 +7289,7 @@ function doesRequireClone(current, completedWork) {
|
||||
if (null !== current && current.child === completedWork.child) return !1;
|
||||
if (0 !== (completedWork.flags & 16)) return !0;
|
||||
for (current = completedWork.child; null !== current; ) {
|
||||
if (0 !== (current.flags & 12854) || 0 !== (current.subtreeFlags & 12854))
|
||||
if (0 !== (current.flags & 13878) || 0 !== (current.subtreeFlags & 13878))
|
||||
return !0;
|
||||
current = current.sibling;
|
||||
}
|
||||
@@ -8723,7 +8688,7 @@ function recursivelyTraverseMutationEffects(root, parentFiber) {
|
||||
captureCommitPhaseError(childToDelete, parentFiber, error);
|
||||
}
|
||||
}
|
||||
if (parentFiber.subtreeFlags & 12854)
|
||||
if (parentFiber.subtreeFlags & 13878)
|
||||
for (parentFiber = parentFiber.child; null !== parentFiber; )
|
||||
commitMutationEffectsOnFiber(parentFiber, root),
|
||||
(parentFiber = parentFiber.sibling);
|
||||
@@ -9525,10 +9490,6 @@ var DefaultCacheDispatcher = {
|
||||
}
|
||||
},
|
||||
PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
|
||||
ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentCache = ReactSharedInternals.ReactCurrentCache,
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
executionContext = 0,
|
||||
workInProgressRoot = null,
|
||||
workInProgress = null,
|
||||
@@ -9559,29 +9520,14 @@ var DefaultCacheDispatcher = {
|
||||
nestedUpdateCount = 0,
|
||||
rootWithNestedUpdates = null;
|
||||
function requestUpdateLane(fiber) {
|
||||
if (0 === (fiber.mode & 1)) return 2;
|
||||
if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes)
|
||||
return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
|
||||
if (null !== requestCurrentTransition())
|
||||
return (
|
||||
(fiber = currentEntangledLane),
|
||||
0 !== fiber ? fiber : requestTransitionLane()
|
||||
);
|
||||
fiber = currentUpdatePriority;
|
||||
if (0 === fiber)
|
||||
a: {
|
||||
fiber = fabricGetCurrentEventPriority
|
||||
? fabricGetCurrentEventPriority()
|
||||
: null;
|
||||
if (null != fiber)
|
||||
switch (fiber) {
|
||||
case FabricDiscretePriority:
|
||||
fiber = 2;
|
||||
break a;
|
||||
}
|
||||
fiber = 32;
|
||||
}
|
||||
return fiber;
|
||||
return 0 === (fiber.mode & 1)
|
||||
? 2
|
||||
: 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes
|
||||
? workInProgressRootRenderLanes & -workInProgressRootRenderLanes
|
||||
: null !== requestCurrentTransition()
|
||||
? ((fiber = currentEntangledLane),
|
||||
0 !== fiber ? fiber : requestTransitionLane())
|
||||
: resolveUpdatePriority();
|
||||
}
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
@@ -9659,13 +9605,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root,
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
if (
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
)),
|
||||
(renderWasConcurrent = !1),
|
||||
2 !== exitStatus)
|
||||
)
|
||||
continue;
|
||||
}
|
||||
if (1 === exitStatus) {
|
||||
prepareFreshStack(root, 0);
|
||||
@@ -9963,8 +9914,8 @@ function prepareFreshStack(root, lanes) {
|
||||
}
|
||||
function handleThrow(root, thrownValue) {
|
||||
currentlyRenderingFiber$1 = null;
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.owner = null;
|
||||
if (thrownValue === SuspenseException) {
|
||||
thrownValue = getSuspendedThenable();
|
||||
var handler = suspenseHandlerStackCursor.current;
|
||||
@@ -10031,13 +9982,13 @@ function handleThrow(root, thrownValue) {
|
||||
}
|
||||
}
|
||||
function pushDispatcher() {
|
||||
var prevDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = ContextOnlyDispatcher;
|
||||
var prevDispatcher = ReactSharedInternals.H;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
|
||||
}
|
||||
function pushCacheDispatcher() {
|
||||
var prevCacheDispatcher = ReactCurrentCache.current;
|
||||
ReactCurrentCache.current = DefaultCacheDispatcher;
|
||||
var prevCacheDispatcher = ReactSharedInternals.C;
|
||||
ReactSharedInternals.C = DefaultCacheDispatcher;
|
||||
return prevCacheDispatcher;
|
||||
}
|
||||
function renderDidSuspendDelayIfPossible() {
|
||||
@@ -10099,8 +10050,8 @@ function renderRootSync(root, lanes) {
|
||||
lanes && root.shellSuspendCounter++;
|
||||
resetContextDependencies();
|
||||
executionContext = prevExecutionContext;
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
if (null !== workInProgress)
|
||||
throw Error(
|
||||
"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."
|
||||
@@ -10217,8 +10168,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
executionContext = prevExecutionContext;
|
||||
if (null !== workInProgress)
|
||||
return (
|
||||
@@ -10248,7 +10199,7 @@ function performUnitOfWork(unitOfWork) {
|
||||
null === current
|
||||
? completeUnitOfWork(unitOfWork)
|
||||
: (workInProgress = current);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
var current = unitOfWork.alternate,
|
||||
@@ -10307,7 +10258,7 @@ function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
null === current
|
||||
? completeUnitOfWork(unitOfWork)
|
||||
: (workInProgress = current);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {
|
||||
resetContextDependencies();
|
||||
@@ -10403,11 +10354,11 @@ function commitRoot(
|
||||
didIncludeRenderPhaseUpdate,
|
||||
spawnedLane
|
||||
) {
|
||||
var previousUpdateLanePriority = currentUpdatePriority,
|
||||
prevTransition = ReactCurrentBatchConfig.transition;
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
previousUpdateLanePriority = currentUpdatePriority;
|
||||
try {
|
||||
(ReactCurrentBatchConfig.transition = null),
|
||||
(currentUpdatePriority = 2),
|
||||
(currentUpdatePriority = 2),
|
||||
(ReactSharedInternals.T = null),
|
||||
commitRootImpl(
|
||||
root,
|
||||
recoverableErrors,
|
||||
@@ -10417,7 +10368,7 @@ function commitRoot(
|
||||
spawnedLane
|
||||
);
|
||||
} finally {
|
||||
(ReactCurrentBatchConfig.transition = prevTransition),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
(currentUpdatePriority = previousUpdateLanePriority);
|
||||
}
|
||||
return null;
|
||||
@@ -10468,13 +10419,13 @@ function commitRootImpl(
|
||||
}));
|
||||
transitions = 0 !== (finishedWork.flags & 15990);
|
||||
if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) {
|
||||
transitions = ReactCurrentBatchConfig.transition;
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
transitions = ReactSharedInternals.T;
|
||||
ReactSharedInternals.T = null;
|
||||
spawnedLane = currentUpdatePriority;
|
||||
currentUpdatePriority = 2;
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 4;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
commitBeforeMutationEffects(root, finishedWork);
|
||||
commitTime = now();
|
||||
commitMutationEffects(root, finishedWork, lanes);
|
||||
@@ -10489,7 +10440,7 @@ function commitRootImpl(
|
||||
requestPaint();
|
||||
executionContext = prevExecutionContext;
|
||||
currentUpdatePriority = spawnedLane;
|
||||
ReactCurrentBatchConfig.transition = transitions;
|
||||
ReactSharedInternals.T = transitions;
|
||||
} else (root.current = finishedWork), (commitTime = now());
|
||||
rootDoesHavePassiveEffects
|
||||
? ((rootDoesHavePassiveEffects = !1),
|
||||
@@ -10539,18 +10490,17 @@ function flushPassiveEffects() {
|
||||
remainingLanes = pendingPassiveEffectsRemainingLanes;
|
||||
pendingPassiveEffectsRemainingLanes = 0;
|
||||
var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
|
||||
priority = 32 > renderPriority ? 32 : renderPriority;
|
||||
renderPriority = ReactCurrentBatchConfig.transition;
|
||||
var previousPriority = currentUpdatePriority;
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
previousPriority = currentUpdatePriority;
|
||||
try {
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
currentUpdatePriority = priority;
|
||||
currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
|
||||
ReactSharedInternals.T = null;
|
||||
if (null === rootWithPendingPassiveEffects)
|
||||
var JSCompiler_inline_result = !1;
|
||||
else {
|
||||
var transitions = pendingPassiveTransitions;
|
||||
pendingPassiveTransitions = null;
|
||||
priority = rootWithPendingPassiveEffects;
|
||||
renderPriority = rootWithPendingPassiveEffects;
|
||||
var lanes = pendingPassiveEffectsLanes;
|
||||
rootWithPendingPassiveEffects = null;
|
||||
pendingPassiveEffectsLanes = 0;
|
||||
@@ -10562,10 +10512,10 @@ function flushPassiveEffects() {
|
||||
injectedProfilingHooks.markPassiveEffectsStarted(lanes);
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 4;
|
||||
commitPassiveUnmountOnFiber(priority.current);
|
||||
commitPassiveUnmountOnFiber(renderPriority.current);
|
||||
commitPassiveMountOnFiber(
|
||||
priority,
|
||||
priority.current,
|
||||
renderPriority,
|
||||
renderPriority.current,
|
||||
lanes,
|
||||
transitions
|
||||
);
|
||||
@@ -10618,9 +10568,9 @@ function flushPassiveEffects() {
|
||||
"function" === typeof injectedHook.onPostCommitFiberRoot
|
||||
)
|
||||
try {
|
||||
injectedHook.onPostCommitFiberRoot(rendererID, priority);
|
||||
injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
|
||||
} catch (err) {}
|
||||
var stateNode = priority.current.stateNode;
|
||||
var stateNode = renderPriority.current.stateNode;
|
||||
stateNode.effectDuration = 0;
|
||||
stateNode.passiveEffectDuration = 0;
|
||||
JSCompiler_inline_result = !0;
|
||||
@@ -10628,7 +10578,7 @@ function flushPassiveEffects() {
|
||||
return JSCompiler_inline_result;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig.transition = renderPriority),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
releaseRootPooledCache(root, remainingLanes);
|
||||
}
|
||||
}
|
||||
@@ -11268,6 +11218,13 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
componentStack: ""
|
||||
};
|
||||
closestInstance = findCurrentFiberUsingSlowPath(closestInstance);
|
||||
if (null === closestInstance)
|
||||
return {
|
||||
hierarchy: [],
|
||||
props: emptyObject,
|
||||
selectedIndex: null,
|
||||
componentStack: ""
|
||||
};
|
||||
var hierarchy = [];
|
||||
traverseOwnerTreeUp(hierarchy, closestInstance);
|
||||
var JSCompiler_inline_result;
|
||||
@@ -11288,10 +11245,7 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
instance = createHierarchy(hierarchy);
|
||||
var props = getHostProps(JSCompiler_inline_result);
|
||||
hierarchy = hierarchy.indexOf(JSCompiler_inline_result);
|
||||
closestInstance =
|
||||
null !== closestInstance
|
||||
? getStackByFiberInDevAndProd(closestInstance)
|
||||
: "";
|
||||
closestInstance = getStackByFiberInDevAndProd(closestInstance);
|
||||
return {
|
||||
closestInstance: JSCompiler_inline_result,
|
||||
hierarchy: instance,
|
||||
@@ -11301,9 +11255,11 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
};
|
||||
}
|
||||
function traverseOwnerTreeUp(hierarchy, instance) {
|
||||
instance &&
|
||||
(hierarchy.unshift(instance),
|
||||
traverseOwnerTreeUp(hierarchy, instance._debugOwner));
|
||||
hierarchy.unshift(instance);
|
||||
instance = instance._debugOwner;
|
||||
null != instance &&
|
||||
"number" === typeof instance.tag &&
|
||||
traverseOwnerTreeUp(hierarchy, instance);
|
||||
}
|
||||
if (
|
||||
"function" !==
|
||||
@@ -11343,10 +11299,10 @@ batchedUpdatesImpl = function (fn, a) {
|
||||
}
|
||||
};
|
||||
var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1178 = {
|
||||
devToolsConfig$jscomp$inline_1179 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-canary-9599a17c",
|
||||
version: "19.0.0-canary-348a26f7",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -11376,10 +11332,10 @@ var roots = new Map(),
|
||||
} catch (err) {}
|
||||
return hook.checkDCE ? !0 : !1;
|
||||
})({
|
||||
bundleType: devToolsConfig$jscomp$inline_1178.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1178.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1178.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1178.rendererConfig,
|
||||
bundleType: devToolsConfig$jscomp$inline_1179.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1179.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1179.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1179.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -11389,20 +11345,20 @@ var roots = new Map(),
|
||||
setErrorHandler: null,
|
||||
setSuspenseHandler: null,
|
||||
scheduleUpdate: null,
|
||||
currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findHostInstanceByFiber: function (fiber) {
|
||||
fiber = findCurrentHostFiber(fiber);
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1178.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1179.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-canary-9599a17c"
|
||||
reconcilerVersion: "19.0.0-canary-348a26f7"
|
||||
});
|
||||
exports.createPortal = function (children, containerTag) {
|
||||
return createPortal$1(
|
||||
|
||||
+445
-555
File diff suppressed because it is too large
Load Diff
+167
-208
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<b925d48a7024c1b46e25d078f9a52fea>>
|
||||
* @generated SignedSource<<00af43e020c169c2dff69684d08d5d7a>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -1111,7 +1111,7 @@ ResponderEventPlugin.injection.injectGlobalResponderHandler({
|
||||
}
|
||||
});
|
||||
var ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries,
|
||||
consoleManagedByDevToolsDuringStrictMode =
|
||||
dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode,
|
||||
@@ -1914,7 +1914,6 @@ function markRootEntangled(root, entangledLanes) {
|
||||
rootEntangledLanes &= ~lane;
|
||||
}
|
||||
}
|
||||
var currentUpdatePriority = 0;
|
||||
function lanesToEventPriority(lanes) {
|
||||
lanes &= -lanes;
|
||||
return 2 < lanes
|
||||
@@ -1967,6 +1966,7 @@ function getPublicInstance(instance) {
|
||||
}
|
||||
var scheduleTimeout = setTimeout,
|
||||
cancelTimeout = clearTimeout,
|
||||
currentUpdatePriority = 0,
|
||||
valueStack = [],
|
||||
index = -1;
|
||||
function createCursor(defaultValue) {
|
||||
@@ -2080,7 +2080,7 @@ function describeBuiltInComponentFrame(name) {
|
||||
}
|
||||
return "\n" + prefix + name;
|
||||
}
|
||||
return describeComponentFrame(name, null);
|
||||
return "\n in " + (name || "Unknown");
|
||||
}
|
||||
var reentry = !1;
|
||||
function describeNativeComponentFrame(fn, construct) {
|
||||
@@ -2214,16 +2214,11 @@ function describeNativeComponentFrame(fn, construct) {
|
||||
? describeBuiltInComponentFrame(previousPrepareStackTrace)
|
||||
: "";
|
||||
}
|
||||
function describeComponentFrame(name, ownerName) {
|
||||
var sourceInfo = "";
|
||||
ownerName && (sourceInfo = " (created by " + ownerName + ")");
|
||||
return "\n in " + (name || "Unknown") + sourceInfo;
|
||||
}
|
||||
function describeFunctionComponentFrame(fn) {
|
||||
return enableComponentStackLocations
|
||||
? describeNativeComponentFrame(fn, !1)
|
||||
: fn
|
||||
? describeComponentFrame(fn.displayName || fn.name || null, null)
|
||||
? "\n in " + (fn.displayName || fn.name || "Unknown")
|
||||
: "";
|
||||
}
|
||||
function describeFiber(fiber) {
|
||||
@@ -2965,55 +2960,6 @@ function unwrapThenable(thenable) {
|
||||
null === thenableState$1 && (thenableState$1 = []);
|
||||
return trackUsedThenable(thenableState$1, thenable, index);
|
||||
}
|
||||
function convertStringRefToCallbackRef(
|
||||
returnFiber,
|
||||
current,
|
||||
element,
|
||||
mixedRef
|
||||
) {
|
||||
function ref(value) {
|
||||
var refs = inst.refs;
|
||||
null === value ? delete refs[stringRef] : (refs[stringRef] = value);
|
||||
}
|
||||
var stringRef = "" + mixedRef;
|
||||
returnFiber = element._owner;
|
||||
if (!returnFiber)
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
if (1 !== returnFiber.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = returnFiber.stateNode;
|
||||
if (!inst)
|
||||
throw Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a bug in React. Please file an issue."
|
||||
);
|
||||
if (
|
||||
null !== current &&
|
||||
null !== current.ref &&
|
||||
"function" === typeof current.ref &&
|
||||
current.ref._stringRef === stringRef
|
||||
)
|
||||
return current.ref;
|
||||
ref._stringRef = stringRef;
|
||||
return ref;
|
||||
}
|
||||
function coerceRef(returnFiber, current, workInProgress, element) {
|
||||
var mixedRef = element.ref;
|
||||
returnFiber =
|
||||
"string" === typeof mixedRef ||
|
||||
"number" === typeof mixedRef ||
|
||||
"boolean" === typeof mixedRef
|
||||
? convertStringRefToCallbackRef(returnFiber, current, element, mixedRef)
|
||||
: mixedRef;
|
||||
workInProgress.ref = returnFiber;
|
||||
}
|
||||
function throwOnInvalidObjectType(returnFiber, newChild) {
|
||||
returnFiber = Object.prototype.toString.call(newChild);
|
||||
throw Error(
|
||||
@@ -3109,12 +3055,12 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
resolveLazy(elementType) === current.type))
|
||||
)
|
||||
return (
|
||||
(lanes = useFiber(current, element.props)),
|
||||
coerceRef(returnFiber, current, lanes, element),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
(current = useFiber(current, element.props)),
|
||||
(current.ref = element.ref),
|
||||
(current.return = returnFiber),
|
||||
current
|
||||
);
|
||||
lanes = createFiberFromTypeAndProps(
|
||||
current = createFiberFromTypeAndProps(
|
||||
element.type,
|
||||
element.key,
|
||||
element.props,
|
||||
@@ -3122,9 +3068,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
coerceRef(returnFiber, current, lanes, element);
|
||||
lanes.return = returnFiber;
|
||||
return lanes;
|
||||
current.ref = element.ref;
|
||||
current.return = returnFiber;
|
||||
return current;
|
||||
}
|
||||
function updatePortal(returnFiber, current, portal, lanes) {
|
||||
if (
|
||||
@@ -3185,7 +3131,7 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, null, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
);
|
||||
@@ -3525,52 +3471,54 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
switch (newChild.$$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
a: {
|
||||
for (
|
||||
var key = newChild.key, child = currentFirstChild;
|
||||
null !== child;
|
||||
|
||||
) {
|
||||
if (child.key === key) {
|
||||
for (var key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key) {
|
||||
key = newChild.type;
|
||||
if (key === REACT_FRAGMENT_TYPE) {
|
||||
if (7 === child.tag) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(
|
||||
child,
|
||||
if (7 === currentFirstChild.tag) {
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.props.children
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
} else if (
|
||||
child.elementType === key ||
|
||||
currentFirstChild.elementType === key ||
|
||||
("object" === typeof key &&
|
||||
null !== key &&
|
||||
key.$$typeof === REACT_LAZY_TYPE &&
|
||||
resolveLazy(key) === child.type)
|
||||
resolveLazy(key) === currentFirstChild.type)
|
||||
) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(child, newChild.props);
|
||||
coerceRef(returnFiber, child, currentFirstChild, newChild);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(currentFirstChild, newChild.props);
|
||||
lanes.ref = newChild.ref;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
deleteRemainingChildren(returnFiber, child);
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
break;
|
||||
} else deleteChild(returnFiber, child);
|
||||
child = child.sibling;
|
||||
} else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
newChild.type === REACT_FRAGMENT_TYPE
|
||||
? ((currentFirstChild = createFiberFromFragment(
|
||||
? ((lanes = createFiberFromFragment(
|
||||
newChild.props.children,
|
||||
returnFiber.mode,
|
||||
lanes,
|
||||
newChild.key
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: ((lanes = createFiberFromTypeAndProps(
|
||||
newChild.type,
|
||||
newChild.key,
|
||||
@@ -3579,15 +3527,15 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, currentFirstChild, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes));
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_PORTAL_TYPE:
|
||||
a: {
|
||||
for (child = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === child)
|
||||
for (key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key)
|
||||
if (
|
||||
4 === currentFirstChild.tag &&
|
||||
currentFirstChild.stateNode.containerInfo ===
|
||||
@@ -3599,12 +3547,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
currentFirstChild = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.children || []
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = useFiber(currentFirstChild, newChild.children || []);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
} else {
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
@@ -3613,22 +3558,18 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
currentFirstChild = createFiberFromPortal(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_LAZY_TYPE:
|
||||
return (
|
||||
(child = newChild._init),
|
||||
(key = newChild._init),
|
||||
reconcileChildFibersImpl(
|
||||
returnFiber,
|
||||
currentFirstChild,
|
||||
child(newChild._payload),
|
||||
key(newChild._payload),
|
||||
lanes
|
||||
)
|
||||
);
|
||||
@@ -3669,17 +3610,13 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
? ((newChild = "" + newChild),
|
||||
null !== currentFirstChild && 6 === currentFirstChild.tag
|
||||
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
|
||||
(currentFirstChild = useFiber(currentFirstChild, newChild)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes = useFiber(currentFirstChild, newChild)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: (deleteRemainingChildren(returnFiber, currentFirstChild),
|
||||
(currentFirstChild = createFiberFromText(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild)),
|
||||
(lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes)),
|
||||
placeSingleChild(returnFiber))
|
||||
: deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
}
|
||||
@@ -3772,9 +3709,7 @@ function findFirstSuspended(row) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
renderLanes = 0,
|
||||
var renderLanes = 0,
|
||||
currentlyRenderingFiber$1 = null,
|
||||
currentHook = null,
|
||||
workInProgressHook = null,
|
||||
@@ -3808,7 +3743,7 @@ function renderWithHooks(
|
||||
workInProgress.memoizedState = null;
|
||||
workInProgress.updateQueue = null;
|
||||
workInProgress.lanes = 0;
|
||||
ReactCurrentDispatcher$1.current =
|
||||
ReactSharedInternals.H =
|
||||
null === current || null === current.memoizedState
|
||||
? HooksDispatcherOnMount
|
||||
: HooksDispatcherOnUpdate;
|
||||
@@ -3826,7 +3761,7 @@ function renderWithHooks(
|
||||
return current;
|
||||
}
|
||||
function finishRenderingHooks() {
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
|
||||
renderLanes = 0;
|
||||
workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
|
||||
@@ -3852,17 +3787,23 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
|
||||
numberOfReRenders += 1;
|
||||
workInProgressHook = currentHook = null;
|
||||
workInProgress.updateQueue = null;
|
||||
ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender;
|
||||
ReactSharedInternals.H = HooksDispatcherOnRerender;
|
||||
var children = Component(props, secondArg);
|
||||
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
||||
return children;
|
||||
}
|
||||
function TransitionAwareHostComponent() {
|
||||
if (!enableAsyncActions) throw Error("Not implemented.");
|
||||
var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0];
|
||||
return "function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
var dispatcher = ReactSharedInternals.H,
|
||||
maybeThenable = dispatcher.useState()[0];
|
||||
maybeThenable =
|
||||
"function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
dispatcher = dispatcher.useState()[0];
|
||||
(null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
|
||||
(currentlyRenderingFiber$1.flags |= 1024);
|
||||
return maybeThenable;
|
||||
}
|
||||
function bailoutHooks(current, workInProgress, lanes) {
|
||||
workInProgress.updateQueue = current.updateQueue;
|
||||
@@ -3950,7 +3891,7 @@ function useThenable(thenable) {
|
||||
(null === workInProgressHook
|
||||
? null === currentlyRenderingFiber$1.memoizedState
|
||||
: null === workInProgressHook.next) &&
|
||||
(ReactCurrentDispatcher$1.current = HooksDispatcherOnMount);
|
||||
(ReactSharedInternals.H = HooksDispatcherOnMount);
|
||||
return thenable;
|
||||
}
|
||||
function use(usable) {
|
||||
@@ -4284,9 +4225,9 @@ function dispatchActionState(
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
ReactCurrentBatchConfig$2.transition = currentTransition;
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
try {
|
||||
var returnValue = action(prevState, payload);
|
||||
@@ -4319,7 +4260,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
setState({ then: function () {}, status: "rejected", reason: error }),
|
||||
finishRunningActionStateAction(actionQueue, setPendingState, setState);
|
||||
} finally {
|
||||
ReactCurrentBatchConfig$2.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
}
|
||||
function finishRunningActionStateAction(
|
||||
@@ -4559,14 +4500,14 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
var previousPriority = currentUpdatePriority;
|
||||
currentUpdatePriority =
|
||||
0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
|
||||
var prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
enableAsyncActions
|
||||
? ((ReactCurrentBatchConfig$2.transition = currentTransition),
|
||||
? ((ReactSharedInternals.T = currentTransition),
|
||||
dispatchOptimisticSetState(fiber, !1, queue, pendingState))
|
||||
: ((ReactCurrentBatchConfig$2.transition = null),
|
||||
: ((ReactSharedInternals.T = null),
|
||||
dispatchSetState(fiber, queue, pendingState),
|
||||
(ReactCurrentBatchConfig$2.transition = currentTransition));
|
||||
(ReactSharedInternals.T = currentTransition));
|
||||
try {
|
||||
if (enableAsyncActions) {
|
||||
var returnValue = callback();
|
||||
@@ -4593,7 +4534,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
else throw error;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig$2.transition = prevTransition);
|
||||
(ReactSharedInternals.T = prevTransition);
|
||||
}
|
||||
}
|
||||
function useHostTransitionStatus() {
|
||||
@@ -5146,7 +5087,7 @@ function resolveClassComponentProps(
|
||||
(Component = Component.defaultProps) &&
|
||||
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
|
||||
) {
|
||||
newProps = assign({}, newProps, baseProps);
|
||||
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
|
||||
for (var propName in Component)
|
||||
void 0 === newProps[propName] &&
|
||||
(newProps[propName] = Component[propName]);
|
||||
@@ -5413,8 +5354,7 @@ function throwException(
|
||||
} while (null !== returnFiber);
|
||||
return !1;
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
|
||||
SelectiveHydrationException = Error(
|
||||
var SelectiveHydrationException = Error(
|
||||
"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
|
||||
),
|
||||
didReceiveUpdate = !1;
|
||||
@@ -5629,8 +5569,22 @@ function markRef(current, workInProgress) {
|
||||
throw Error(
|
||||
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
|
||||
);
|
||||
if (null === current || current.ref !== ref)
|
||||
if (null === current || current.ref !== ref) {
|
||||
if (
|
||||
null !== current &&
|
||||
((current = current.ref),
|
||||
"function" === typeof current &&
|
||||
"function" === typeof ref &&
|
||||
"string" === typeof current.__stringRef &&
|
||||
current.__stringRef === ref.__stringRef &&
|
||||
current.__stringRefType === ref.__stringRefType &&
|
||||
current.__stringRefOwner === ref.__stringRefOwner)
|
||||
) {
|
||||
workInProgress.ref = current;
|
||||
return;
|
||||
}
|
||||
workInProgress.flags |= 2097664;
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateFunctionComponent(
|
||||
@@ -5911,7 +5865,7 @@ function finishClassComponent(
|
||||
bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
||||
);
|
||||
shouldUpdate = workInProgress.stateNode;
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
ReactSharedInternals.owner = workInProgress;
|
||||
var nextChildren =
|
||||
didCaptureError && "function" !== typeof Component.getDerivedStateFromError
|
||||
? null
|
||||
@@ -7123,9 +7077,8 @@ function releaseCache(cache) {
|
||||
cache.controller.abort();
|
||||
});
|
||||
}
|
||||
var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
|
||||
function requestCurrentTransition() {
|
||||
var transition = ReactCurrentBatchConfig$1.transition;
|
||||
var transition = ReactSharedInternals.T;
|
||||
null !== transition && transition._callbacks.add(handleAsyncAction);
|
||||
return transition;
|
||||
}
|
||||
@@ -8326,7 +8279,7 @@ function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
|
||||
captureCommitPhaseError(childToDelete, parentFiber, error);
|
||||
}
|
||||
}
|
||||
if (parentFiber.subtreeFlags & 12854)
|
||||
if (parentFiber.subtreeFlags & 13878)
|
||||
for (parentFiber = parentFiber.child; null !== parentFiber; )
|
||||
commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
|
||||
(parentFiber = parentFiber.sibling);
|
||||
@@ -9220,10 +9173,6 @@ var DefaultCacheDispatcher = {
|
||||
}
|
||||
},
|
||||
PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
|
||||
ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentCache = ReactSharedInternals.ReactCurrentCache,
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
executionContext = 0,
|
||||
workInProgressRoot = null,
|
||||
workInProgress = null,
|
||||
@@ -9261,8 +9210,8 @@ function requestUpdateLane(fiber) {
|
||||
(fiber = currentEntangledLane),
|
||||
0 !== fiber ? fiber : requestTransitionLane()
|
||||
);
|
||||
fiber = currentUpdatePriority;
|
||||
return 0 !== fiber ? fiber : 32;
|
||||
fiber = 0 !== currentUpdatePriority ? currentUpdatePriority : 32;
|
||||
return fiber;
|
||||
}
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
@@ -9338,13 +9287,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root,
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
if (
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
)),
|
||||
(renderWasConcurrent = !1),
|
||||
2 !== exitStatus)
|
||||
)
|
||||
continue;
|
||||
}
|
||||
if (1 === exitStatus) {
|
||||
prepareFreshStack(root, 0);
|
||||
@@ -9640,8 +9594,8 @@ function prepareFreshStack(root, lanes) {
|
||||
}
|
||||
function handleThrow(root, thrownValue) {
|
||||
currentlyRenderingFiber$1 = null;
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.owner = null;
|
||||
if (thrownValue === SuspenseException) {
|
||||
thrownValue = getSuspendedThenable();
|
||||
var handler = suspenseHandlerStackCursor.current;
|
||||
@@ -9679,13 +9633,13 @@ function handleThrow(root, thrownValue) {
|
||||
));
|
||||
}
|
||||
function pushDispatcher() {
|
||||
var prevDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = ContextOnlyDispatcher;
|
||||
var prevDispatcher = ReactSharedInternals.H;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
|
||||
}
|
||||
function pushCacheDispatcher() {
|
||||
var prevCacheDispatcher = ReactCurrentCache.current;
|
||||
ReactCurrentCache.current = DefaultCacheDispatcher;
|
||||
var prevCacheDispatcher = ReactSharedInternals.C;
|
||||
ReactSharedInternals.C = DefaultCacheDispatcher;
|
||||
return prevCacheDispatcher;
|
||||
}
|
||||
function renderDidSuspendDelayIfPossible() {
|
||||
@@ -9737,8 +9691,8 @@ function renderRootSync(root, lanes) {
|
||||
lanes && root.shellSuspendCounter++;
|
||||
resetContextDependencies();
|
||||
executionContext = prevExecutionContext;
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
if (null !== workInProgress)
|
||||
throw Error(
|
||||
"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."
|
||||
@@ -9844,8 +9798,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
executionContext = prevExecutionContext;
|
||||
if (null !== workInProgress) return 0;
|
||||
workInProgressRoot = null;
|
||||
@@ -9861,7 +9815,7 @@ function performUnitOfWork(unitOfWork) {
|
||||
var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);
|
||||
unitOfWork.memoizedProps = unitOfWork.pendingProps;
|
||||
null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
var current = unitOfWork.alternate;
|
||||
@@ -9917,7 +9871,7 @@ function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
null === current
|
||||
? completeUnitOfWork(unitOfWork)
|
||||
: (workInProgress = current);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {
|
||||
resetContextDependencies();
|
||||
@@ -10004,11 +9958,11 @@ function commitRoot(
|
||||
didIncludeRenderPhaseUpdate,
|
||||
spawnedLane
|
||||
) {
|
||||
var previousUpdateLanePriority = currentUpdatePriority,
|
||||
prevTransition = ReactCurrentBatchConfig.transition;
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
previousUpdateLanePriority = currentUpdatePriority;
|
||||
try {
|
||||
(ReactCurrentBatchConfig.transition = null),
|
||||
(currentUpdatePriority = 2),
|
||||
(currentUpdatePriority = 2),
|
||||
(ReactSharedInternals.T = null),
|
||||
commitRootImpl(
|
||||
root,
|
||||
recoverableErrors,
|
||||
@@ -10018,7 +9972,7 @@ function commitRoot(
|
||||
spawnedLane
|
||||
);
|
||||
} finally {
|
||||
(ReactCurrentBatchConfig.transition = prevTransition),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
(currentUpdatePriority = previousUpdateLanePriority);
|
||||
}
|
||||
return null;
|
||||
@@ -10066,13 +10020,13 @@ function commitRootImpl(
|
||||
}));
|
||||
transitions = 0 !== (finishedWork.flags & 15990);
|
||||
if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) {
|
||||
transitions = ReactCurrentBatchConfig.transition;
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
transitions = ReactSharedInternals.T;
|
||||
ReactSharedInternals.T = null;
|
||||
spawnedLane = currentUpdatePriority;
|
||||
currentUpdatePriority = 2;
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 4;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
commitBeforeMutationEffects(root, finishedWork);
|
||||
commitMutationEffectsOnFiber(finishedWork, root);
|
||||
root.current = finishedWork;
|
||||
@@ -10080,7 +10034,7 @@ function commitRootImpl(
|
||||
requestPaint();
|
||||
executionContext = prevExecutionContext;
|
||||
currentUpdatePriority = spawnedLane;
|
||||
ReactCurrentBatchConfig.transition = transitions;
|
||||
ReactSharedInternals.T = transitions;
|
||||
} else root.current = finishedWork;
|
||||
rootDoesHavePassiveEffects
|
||||
? ((rootDoesHavePassiveEffects = !1),
|
||||
@@ -10127,16 +10081,15 @@ function flushPassiveEffects() {
|
||||
remainingLanes = pendingPassiveEffectsRemainingLanes;
|
||||
pendingPassiveEffectsRemainingLanes = 0;
|
||||
var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
|
||||
priority = 32 > renderPriority ? 32 : renderPriority;
|
||||
renderPriority = ReactCurrentBatchConfig.transition;
|
||||
var previousPriority = currentUpdatePriority;
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
previousPriority = currentUpdatePriority;
|
||||
try {
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
currentUpdatePriority = priority;
|
||||
currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
|
||||
ReactSharedInternals.T = null;
|
||||
if (null === rootWithPendingPassiveEffects)
|
||||
var JSCompiler_inline_result = !1;
|
||||
else {
|
||||
priority = pendingPassiveTransitions;
|
||||
renderPriority = pendingPassiveTransitions;
|
||||
pendingPassiveTransitions = null;
|
||||
var root$jscomp$0 = rootWithPendingPassiveEffects,
|
||||
lanes = pendingPassiveEffectsLanes;
|
||||
@@ -10151,7 +10104,7 @@ function flushPassiveEffects() {
|
||||
root$jscomp$0,
|
||||
root$jscomp$0.current,
|
||||
lanes,
|
||||
priority
|
||||
renderPriority
|
||||
);
|
||||
executionContext = prevExecutionContext;
|
||||
flushSyncWorkAcrossRoots_impl(!1);
|
||||
@@ -10167,7 +10120,7 @@ function flushPassiveEffects() {
|
||||
return JSCompiler_inline_result;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig.transition = renderPriority),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
releaseRootPooledCache(root, remainingLanes);
|
||||
}
|
||||
}
|
||||
@@ -10772,6 +10725,13 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
componentStack: ""
|
||||
};
|
||||
closestInstance = findCurrentFiberUsingSlowPath(closestInstance);
|
||||
if (null === closestInstance)
|
||||
return {
|
||||
hierarchy: [],
|
||||
props: emptyObject,
|
||||
selectedIndex: null,
|
||||
componentStack: ""
|
||||
};
|
||||
var hierarchy = [];
|
||||
traverseOwnerTreeUp(hierarchy, closestInstance);
|
||||
var JSCompiler_inline_result;
|
||||
@@ -10792,10 +10752,7 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
instance = createHierarchy(hierarchy);
|
||||
var props = getHostProps(JSCompiler_inline_result);
|
||||
hierarchy = hierarchy.indexOf(JSCompiler_inline_result);
|
||||
closestInstance =
|
||||
null !== closestInstance
|
||||
? getStackByFiberInDevAndProd(closestInstance)
|
||||
: "";
|
||||
closestInstance = getStackByFiberInDevAndProd(closestInstance);
|
||||
return {
|
||||
closestInstance: JSCompiler_inline_result,
|
||||
hierarchy: instance,
|
||||
@@ -10805,9 +10762,11 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
};
|
||||
}
|
||||
function traverseOwnerTreeUp(hierarchy, instance) {
|
||||
instance &&
|
||||
(hierarchy.unshift(instance),
|
||||
traverseOwnerTreeUp(hierarchy, instance._debugOwner));
|
||||
hierarchy.unshift(instance);
|
||||
instance = instance._debugOwner;
|
||||
null != instance &&
|
||||
"number" === typeof instance.tag &&
|
||||
traverseOwnerTreeUp(hierarchy, instance);
|
||||
}
|
||||
if (
|
||||
"function" !==
|
||||
@@ -10854,10 +10813,10 @@ batchedUpdatesImpl = function (fn, a) {
|
||||
}
|
||||
};
|
||||
var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1163 = {
|
||||
devToolsConfig$jscomp$inline_1168 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-canary-495cb589",
|
||||
version: "19.0.0-canary-69bc894f",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -10873,11 +10832,11 @@ var roots = new Map(),
|
||||
}.bind(null, findNodeHandle)
|
||||
}
|
||||
};
|
||||
var internals$jscomp$inline_1416 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1163.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1163.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1163.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1163.rendererConfig,
|
||||
var internals$jscomp$inline_1452 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1168.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1168.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1168.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1168.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -10887,32 +10846,32 @@ var internals$jscomp$inline_1416 = {
|
||||
setErrorHandler: null,
|
||||
setSuspenseHandler: null,
|
||||
scheduleUpdate: null,
|
||||
currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findHostInstanceByFiber: function (fiber) {
|
||||
fiber = findCurrentHostFiber(fiber);
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1163.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1168.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-canary-495cb589"
|
||||
reconcilerVersion: "19.0.0-canary-69bc894f"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1417 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1453 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1417.isDisabled &&
|
||||
hook$jscomp$inline_1417.supportsFiber
|
||||
!hook$jscomp$inline_1453.isDisabled &&
|
||||
hook$jscomp$inline_1453.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1417.inject(
|
||||
internals$jscomp$inline_1416
|
||||
(rendererID = hook$jscomp$inline_1453.inject(
|
||||
internals$jscomp$inline_1452
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1417);
|
||||
(injectedHook = hook$jscomp$inline_1453);
|
||||
} catch (err) {}
|
||||
}
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
|
||||
|
||||
+164
-205
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<b0ebabe3a3dde6c44189b1af9cfee2b8>>
|
||||
* @generated SignedSource<<434690ae3c6bd7083e119ab852376c3e>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -1115,7 +1115,7 @@ ResponderEventPlugin.injection.injectGlobalResponderHandler({
|
||||
}
|
||||
});
|
||||
var ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries,
|
||||
consoleManagedByDevToolsDuringStrictMode =
|
||||
dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode,
|
||||
@@ -2036,7 +2036,6 @@ function movePendingFibersToMemoized(root, lanes) {
|
||||
lanes &= ~root;
|
||||
}
|
||||
}
|
||||
var currentUpdatePriority = 0;
|
||||
function lanesToEventPriority(lanes) {
|
||||
lanes &= -lanes;
|
||||
return 2 < lanes
|
||||
@@ -2089,6 +2088,7 @@ function getPublicInstance(instance) {
|
||||
}
|
||||
var scheduleTimeout = setTimeout,
|
||||
cancelTimeout = clearTimeout,
|
||||
currentUpdatePriority = 0,
|
||||
valueStack = [],
|
||||
index = -1;
|
||||
function createCursor(defaultValue) {
|
||||
@@ -2202,7 +2202,7 @@ function describeBuiltInComponentFrame(name) {
|
||||
}
|
||||
return "\n" + prefix + name;
|
||||
}
|
||||
return describeComponentFrame(name, null);
|
||||
return "\n in " + (name || "Unknown");
|
||||
}
|
||||
var reentry = !1;
|
||||
function describeNativeComponentFrame(fn, construct) {
|
||||
@@ -2336,16 +2336,11 @@ function describeNativeComponentFrame(fn, construct) {
|
||||
? describeBuiltInComponentFrame(previousPrepareStackTrace)
|
||||
: "";
|
||||
}
|
||||
function describeComponentFrame(name, ownerName) {
|
||||
var sourceInfo = "";
|
||||
ownerName && (sourceInfo = " (created by " + ownerName + ")");
|
||||
return "\n in " + (name || "Unknown") + sourceInfo;
|
||||
}
|
||||
function describeFunctionComponentFrame(fn) {
|
||||
return enableComponentStackLocations
|
||||
? describeNativeComponentFrame(fn, !1)
|
||||
: fn
|
||||
? describeComponentFrame(fn.displayName || fn.name || null, null)
|
||||
? "\n in " + (fn.displayName || fn.name || "Unknown")
|
||||
: "";
|
||||
}
|
||||
function describeFiber(fiber) {
|
||||
@@ -3087,55 +3082,6 @@ function unwrapThenable(thenable) {
|
||||
null === thenableState$1 && (thenableState$1 = []);
|
||||
return trackUsedThenable(thenableState$1, thenable, index);
|
||||
}
|
||||
function convertStringRefToCallbackRef(
|
||||
returnFiber,
|
||||
current,
|
||||
element,
|
||||
mixedRef
|
||||
) {
|
||||
function ref(value) {
|
||||
var refs = inst.refs;
|
||||
null === value ? delete refs[stringRef] : (refs[stringRef] = value);
|
||||
}
|
||||
var stringRef = "" + mixedRef;
|
||||
returnFiber = element._owner;
|
||||
if (!returnFiber)
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
stringRef +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
if (1 !== returnFiber.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = returnFiber.stateNode;
|
||||
if (!inst)
|
||||
throw Error(
|
||||
"Missing owner for string ref " +
|
||||
stringRef +
|
||||
". This error is likely caused by a bug in React. Please file an issue."
|
||||
);
|
||||
if (
|
||||
null !== current &&
|
||||
null !== current.ref &&
|
||||
"function" === typeof current.ref &&
|
||||
current.ref._stringRef === stringRef
|
||||
)
|
||||
return current.ref;
|
||||
ref._stringRef = stringRef;
|
||||
return ref;
|
||||
}
|
||||
function coerceRef(returnFiber, current, workInProgress, element) {
|
||||
var mixedRef = element.ref;
|
||||
returnFiber =
|
||||
"string" === typeof mixedRef ||
|
||||
"number" === typeof mixedRef ||
|
||||
"boolean" === typeof mixedRef
|
||||
? convertStringRefToCallbackRef(returnFiber, current, element, mixedRef)
|
||||
: mixedRef;
|
||||
workInProgress.ref = returnFiber;
|
||||
}
|
||||
function throwOnInvalidObjectType(returnFiber, newChild) {
|
||||
returnFiber = Object.prototype.toString.call(newChild);
|
||||
throw Error(
|
||||
@@ -3231,12 +3177,12 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
resolveLazy(elementType) === current.type))
|
||||
)
|
||||
return (
|
||||
(lanes = useFiber(current, element.props)),
|
||||
coerceRef(returnFiber, current, lanes, element),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
(current = useFiber(current, element.props)),
|
||||
(current.ref = element.ref),
|
||||
(current.return = returnFiber),
|
||||
current
|
||||
);
|
||||
lanes = createFiberFromTypeAndProps(
|
||||
current = createFiberFromTypeAndProps(
|
||||
element.type,
|
||||
element.key,
|
||||
element.props,
|
||||
@@ -3244,9 +3190,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
coerceRef(returnFiber, current, lanes, element);
|
||||
lanes.return = returnFiber;
|
||||
return lanes;
|
||||
current.ref = element.ref;
|
||||
current.return = returnFiber;
|
||||
return current;
|
||||
}
|
||||
function updatePortal(returnFiber, current, portal, lanes) {
|
||||
if (
|
||||
@@ -3307,7 +3253,7 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, null, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
lanes
|
||||
);
|
||||
@@ -3647,52 +3593,54 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
switch (newChild.$$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
a: {
|
||||
for (
|
||||
var key = newChild.key, child = currentFirstChild;
|
||||
null !== child;
|
||||
|
||||
) {
|
||||
if (child.key === key) {
|
||||
for (var key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key) {
|
||||
key = newChild.type;
|
||||
if (key === REACT_FRAGMENT_TYPE) {
|
||||
if (7 === child.tag) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(
|
||||
child,
|
||||
if (7 === currentFirstChild.tag) {
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.props.children
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
} else if (
|
||||
child.elementType === key ||
|
||||
currentFirstChild.elementType === key ||
|
||||
("object" === typeof key &&
|
||||
null !== key &&
|
||||
key.$$typeof === REACT_LAZY_TYPE &&
|
||||
resolveLazy(key) === child.type)
|
||||
resolveLazy(key) === currentFirstChild.type)
|
||||
) {
|
||||
deleteRemainingChildren(returnFiber, child.sibling);
|
||||
currentFirstChild = useFiber(child, newChild.props);
|
||||
coerceRef(returnFiber, child, currentFirstChild, newChild);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
deleteRemainingChildren(
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
lanes = useFiber(currentFirstChild, newChild.props);
|
||||
lanes.ref = newChild.ref;
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
}
|
||||
deleteRemainingChildren(returnFiber, child);
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
break;
|
||||
} else deleteChild(returnFiber, child);
|
||||
child = child.sibling;
|
||||
} else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
newChild.type === REACT_FRAGMENT_TYPE
|
||||
? ((currentFirstChild = createFiberFromFragment(
|
||||
? ((lanes = createFiberFromFragment(
|
||||
newChild.props.children,
|
||||
returnFiber.mode,
|
||||
lanes,
|
||||
newChild.key
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: ((lanes = createFiberFromTypeAndProps(
|
||||
newChild.type,
|
||||
newChild.key,
|
||||
@@ -3701,15 +3649,15 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
coerceRef(returnFiber, currentFirstChild, lanes, newChild),
|
||||
(lanes.ref = newChild.ref),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes));
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_PORTAL_TYPE:
|
||||
a: {
|
||||
for (child = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === child)
|
||||
for (key = newChild.key; null !== currentFirstChild; ) {
|
||||
if (currentFirstChild.key === key)
|
||||
if (
|
||||
4 === currentFirstChild.tag &&
|
||||
currentFirstChild.stateNode.containerInfo ===
|
||||
@@ -3721,12 +3669,9 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
returnFiber,
|
||||
currentFirstChild.sibling
|
||||
);
|
||||
currentFirstChild = useFiber(
|
||||
currentFirstChild,
|
||||
newChild.children || []
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = useFiber(currentFirstChild, newChild.children || []);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
break a;
|
||||
} else {
|
||||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
@@ -3735,22 +3680,18 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
else deleteChild(returnFiber, currentFirstChild);
|
||||
currentFirstChild = currentFirstChild.sibling;
|
||||
}
|
||||
currentFirstChild = createFiberFromPortal(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
);
|
||||
currentFirstChild.return = returnFiber;
|
||||
returnFiber = currentFirstChild;
|
||||
lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);
|
||||
lanes.return = returnFiber;
|
||||
returnFiber = lanes;
|
||||
}
|
||||
return placeSingleChild(returnFiber);
|
||||
case REACT_LAZY_TYPE:
|
||||
return (
|
||||
(child = newChild._init),
|
||||
(key = newChild._init),
|
||||
reconcileChildFibersImpl(
|
||||
returnFiber,
|
||||
currentFirstChild,
|
||||
child(newChild._payload),
|
||||
key(newChild._payload),
|
||||
lanes
|
||||
)
|
||||
);
|
||||
@@ -3791,17 +3732,13 @@ function createChildReconciler(shouldTrackSideEffects) {
|
||||
? ((newChild = "" + newChild),
|
||||
null !== currentFirstChild && 6 === currentFirstChild.tag
|
||||
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
|
||||
(currentFirstChild = useFiber(currentFirstChild, newChild)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild))
|
||||
(lanes = useFiber(currentFirstChild, newChild)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes))
|
||||
: (deleteRemainingChildren(returnFiber, currentFirstChild),
|
||||
(currentFirstChild = createFiberFromText(
|
||||
newChild,
|
||||
returnFiber.mode,
|
||||
lanes
|
||||
)),
|
||||
(currentFirstChild.return = returnFiber),
|
||||
(returnFiber = currentFirstChild)),
|
||||
(lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),
|
||||
(lanes.return = returnFiber),
|
||||
(returnFiber = lanes)),
|
||||
placeSingleChild(returnFiber))
|
||||
: deleteRemainingChildren(returnFiber, currentFirstChild);
|
||||
}
|
||||
@@ -3894,9 +3831,7 @@ function findFirstSuspended(row) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
renderLanes = 0,
|
||||
var renderLanes = 0,
|
||||
currentlyRenderingFiber$1 = null,
|
||||
currentHook = null,
|
||||
workInProgressHook = null,
|
||||
@@ -3930,7 +3865,7 @@ function renderWithHooks(
|
||||
workInProgress.memoizedState = null;
|
||||
workInProgress.updateQueue = null;
|
||||
workInProgress.lanes = 0;
|
||||
ReactCurrentDispatcher$1.current =
|
||||
ReactSharedInternals.H =
|
||||
null === current || null === current.memoizedState
|
||||
? HooksDispatcherOnMount
|
||||
: HooksDispatcherOnUpdate;
|
||||
@@ -3948,7 +3883,7 @@ function renderWithHooks(
|
||||
return current;
|
||||
}
|
||||
function finishRenderingHooks() {
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
|
||||
renderLanes = 0;
|
||||
workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
|
||||
@@ -3974,17 +3909,23 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
|
||||
numberOfReRenders += 1;
|
||||
workInProgressHook = currentHook = null;
|
||||
workInProgress.updateQueue = null;
|
||||
ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender;
|
||||
ReactSharedInternals.H = HooksDispatcherOnRerender;
|
||||
var children = Component(props, secondArg);
|
||||
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
||||
return children;
|
||||
}
|
||||
function TransitionAwareHostComponent() {
|
||||
if (!enableAsyncActions) throw Error("Not implemented.");
|
||||
var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0];
|
||||
return "function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
var dispatcher = ReactSharedInternals.H,
|
||||
maybeThenable = dispatcher.useState()[0];
|
||||
maybeThenable =
|
||||
"function" === typeof maybeThenable.then
|
||||
? useThenable(maybeThenable)
|
||||
: maybeThenable;
|
||||
dispatcher = dispatcher.useState()[0];
|
||||
(null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
|
||||
(currentlyRenderingFiber$1.flags |= 1024);
|
||||
return maybeThenable;
|
||||
}
|
||||
function bailoutHooks(current, workInProgress, lanes) {
|
||||
workInProgress.updateQueue = current.updateQueue;
|
||||
@@ -4072,7 +4013,7 @@ function useThenable(thenable) {
|
||||
(null === workInProgressHook
|
||||
? null === currentlyRenderingFiber$1.memoizedState
|
||||
: null === workInProgressHook.next) &&
|
||||
(ReactCurrentDispatcher$1.current = HooksDispatcherOnMount);
|
||||
(ReactSharedInternals.H = HooksDispatcherOnMount);
|
||||
return thenable;
|
||||
}
|
||||
function use(usable) {
|
||||
@@ -4406,9 +4347,9 @@ function dispatchActionState(
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
ReactCurrentBatchConfig$2.transition = currentTransition;
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
try {
|
||||
var returnValue = action(prevState, payload);
|
||||
@@ -4441,7 +4382,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
setState({ then: function () {}, status: "rejected", reason: error }),
|
||||
finishRunningActionStateAction(actionQueue, setPendingState, setState);
|
||||
} finally {
|
||||
ReactCurrentBatchConfig$2.transition = prevTransition;
|
||||
ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
}
|
||||
function finishRunningActionStateAction(
|
||||
@@ -4681,14 +4622,14 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
var previousPriority = currentUpdatePriority;
|
||||
currentUpdatePriority =
|
||||
0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
|
||||
var prevTransition = ReactCurrentBatchConfig$2.transition,
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = { _callbacks: new Set() };
|
||||
enableAsyncActions
|
||||
? ((ReactCurrentBatchConfig$2.transition = currentTransition),
|
||||
? ((ReactSharedInternals.T = currentTransition),
|
||||
dispatchOptimisticSetState(fiber, !1, queue, pendingState))
|
||||
: ((ReactCurrentBatchConfig$2.transition = null),
|
||||
: ((ReactSharedInternals.T = null),
|
||||
dispatchSetState(fiber, queue, pendingState),
|
||||
(ReactCurrentBatchConfig$2.transition = currentTransition));
|
||||
(ReactSharedInternals.T = currentTransition));
|
||||
try {
|
||||
if (enableAsyncActions) {
|
||||
var returnValue = callback();
|
||||
@@ -4715,7 +4656,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
||||
else throw error;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig$2.transition = prevTransition);
|
||||
(ReactSharedInternals.T = prevTransition);
|
||||
}
|
||||
}
|
||||
function useHostTransitionStatus() {
|
||||
@@ -5338,7 +5279,7 @@ function resolveClassComponentProps(
|
||||
(Component = Component.defaultProps) &&
|
||||
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
|
||||
) {
|
||||
newProps = assign({}, newProps, baseProps);
|
||||
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
|
||||
for (var propName in Component)
|
||||
void 0 === newProps[propName] &&
|
||||
(newProps[propName] = Component[propName]);
|
||||
@@ -5606,8 +5547,7 @@ function throwException(
|
||||
} while (null !== returnFiber);
|
||||
return !1;
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
|
||||
SelectiveHydrationException = Error(
|
||||
var SelectiveHydrationException = Error(
|
||||
"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
|
||||
),
|
||||
didReceiveUpdate = !1;
|
||||
@@ -5824,8 +5764,22 @@ function markRef(current, workInProgress) {
|
||||
throw Error(
|
||||
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
|
||||
);
|
||||
if (null === current || current.ref !== ref)
|
||||
if (null === current || current.ref !== ref) {
|
||||
if (
|
||||
null !== current &&
|
||||
((current = current.ref),
|
||||
"function" === typeof current &&
|
||||
"function" === typeof ref &&
|
||||
"string" === typeof current.__stringRef &&
|
||||
current.__stringRef === ref.__stringRef &&
|
||||
current.__stringRefType === ref.__stringRefType &&
|
||||
current.__stringRefOwner === ref.__stringRefOwner)
|
||||
) {
|
||||
workInProgress.ref = current;
|
||||
return;
|
||||
}
|
||||
workInProgress.flags |= 2097664;
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateFunctionComponent(
|
||||
@@ -6110,7 +6064,7 @@ function finishClassComponent(
|
||||
bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
||||
);
|
||||
shouldUpdate = workInProgress.stateNode;
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
ReactSharedInternals.owner = workInProgress;
|
||||
if (
|
||||
didCaptureError &&
|
||||
"function" !== typeof Component.getDerivedStateFromError
|
||||
@@ -7353,9 +7307,8 @@ function releaseCache(cache) {
|
||||
cache.controller.abort();
|
||||
});
|
||||
}
|
||||
var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
|
||||
function requestCurrentTransition() {
|
||||
var transition = ReactCurrentBatchConfig$1.transition;
|
||||
var transition = ReactSharedInternals.T;
|
||||
null !== transition && transition._callbacks.add(handleAsyncAction);
|
||||
return transition;
|
||||
}
|
||||
@@ -8792,7 +8745,7 @@ function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
|
||||
captureCommitPhaseError(childToDelete, parentFiber, error);
|
||||
}
|
||||
}
|
||||
if (parentFiber.subtreeFlags & 12854)
|
||||
if (parentFiber.subtreeFlags & 13878)
|
||||
for (parentFiber = parentFiber.child; null !== parentFiber; )
|
||||
commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
|
||||
(parentFiber = parentFiber.sibling);
|
||||
@@ -9748,10 +9701,6 @@ var DefaultCacheDispatcher = {
|
||||
}
|
||||
},
|
||||
PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
|
||||
ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
ReactCurrentCache = ReactSharedInternals.ReactCurrentCache,
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
|
||||
executionContext = 0,
|
||||
workInProgressRoot = null,
|
||||
workInProgress = null,
|
||||
@@ -9790,8 +9739,8 @@ function requestUpdateLane(fiber) {
|
||||
(fiber = currentEntangledLane),
|
||||
0 !== fiber ? fiber : requestTransitionLane()
|
||||
);
|
||||
fiber = currentUpdatePriority;
|
||||
return 0 !== fiber ? fiber : 32;
|
||||
fiber = 0 !== currentUpdatePriority ? currentUpdatePriority : 32;
|
||||
return fiber;
|
||||
}
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
@@ -9869,13 +9818,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root,
|
||||
renderWasConcurrent
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
if (
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
renderWasConcurrent,
|
||||
errorRetryLanes
|
||||
)));
|
||||
)),
|
||||
(renderWasConcurrent = !1),
|
||||
2 !== exitStatus)
|
||||
)
|
||||
continue;
|
||||
}
|
||||
if (1 === exitStatus) {
|
||||
prepareFreshStack(root, 0);
|
||||
@@ -10173,8 +10127,8 @@ function prepareFreshStack(root, lanes) {
|
||||
}
|
||||
function handleThrow(root, thrownValue) {
|
||||
currentlyRenderingFiber$1 = null;
|
||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
ReactSharedInternals.owner = null;
|
||||
if (thrownValue === SuspenseException) {
|
||||
thrownValue = getSuspendedThenable();
|
||||
var handler = suspenseHandlerStackCursor.current;
|
||||
@@ -10241,13 +10195,13 @@ function handleThrow(root, thrownValue) {
|
||||
}
|
||||
}
|
||||
function pushDispatcher() {
|
||||
var prevDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = ContextOnlyDispatcher;
|
||||
var prevDispatcher = ReactSharedInternals.H;
|
||||
ReactSharedInternals.H = ContextOnlyDispatcher;
|
||||
return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
|
||||
}
|
||||
function pushCacheDispatcher() {
|
||||
var prevCacheDispatcher = ReactCurrentCache.current;
|
||||
ReactCurrentCache.current = DefaultCacheDispatcher;
|
||||
var prevCacheDispatcher = ReactSharedInternals.C;
|
||||
ReactSharedInternals.C = DefaultCacheDispatcher;
|
||||
return prevCacheDispatcher;
|
||||
}
|
||||
function renderDidSuspendDelayIfPossible() {
|
||||
@@ -10309,8 +10263,8 @@ function renderRootSync(root, lanes) {
|
||||
lanes && root.shellSuspendCounter++;
|
||||
resetContextDependencies();
|
||||
executionContext = prevExecutionContext;
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
if (null !== workInProgress)
|
||||
throw Error(
|
||||
"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."
|
||||
@@ -10427,8 +10381,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
ReactCurrentDispatcher.current = prevDispatcher;
|
||||
ReactCurrentCache.current = prevCacheDispatcher;
|
||||
ReactSharedInternals.H = prevDispatcher;
|
||||
ReactSharedInternals.C = prevCacheDispatcher;
|
||||
executionContext = prevExecutionContext;
|
||||
if (null !== workInProgress)
|
||||
return (
|
||||
@@ -10458,7 +10412,7 @@ function performUnitOfWork(unitOfWork) {
|
||||
null === current
|
||||
? completeUnitOfWork(unitOfWork)
|
||||
: (workInProgress = current);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
var current = unitOfWork.alternate,
|
||||
@@ -10517,7 +10471,7 @@ function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
null === current
|
||||
? completeUnitOfWork(unitOfWork)
|
||||
: (workInProgress = current);
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
}
|
||||
function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {
|
||||
resetContextDependencies();
|
||||
@@ -10613,11 +10567,11 @@ function commitRoot(
|
||||
didIncludeRenderPhaseUpdate,
|
||||
spawnedLane
|
||||
) {
|
||||
var previousUpdateLanePriority = currentUpdatePriority,
|
||||
prevTransition = ReactCurrentBatchConfig.transition;
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
previousUpdateLanePriority = currentUpdatePriority;
|
||||
try {
|
||||
(ReactCurrentBatchConfig.transition = null),
|
||||
(currentUpdatePriority = 2),
|
||||
(currentUpdatePriority = 2),
|
||||
(ReactSharedInternals.T = null),
|
||||
commitRootImpl(
|
||||
root,
|
||||
recoverableErrors,
|
||||
@@ -10627,7 +10581,7 @@ function commitRoot(
|
||||
spawnedLane
|
||||
);
|
||||
} finally {
|
||||
(ReactCurrentBatchConfig.transition = prevTransition),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
(currentUpdatePriority = previousUpdateLanePriority);
|
||||
}
|
||||
return null;
|
||||
@@ -10678,13 +10632,13 @@ function commitRootImpl(
|
||||
}));
|
||||
transitions = 0 !== (finishedWork.flags & 15990);
|
||||
if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) {
|
||||
transitions = ReactCurrentBatchConfig.transition;
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
transitions = ReactSharedInternals.T;
|
||||
ReactSharedInternals.T = null;
|
||||
spawnedLane = currentUpdatePriority;
|
||||
currentUpdatePriority = 2;
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 4;
|
||||
ReactCurrentOwner.current = null;
|
||||
ReactSharedInternals.owner = null;
|
||||
commitBeforeMutationEffects(root, finishedWork);
|
||||
commitTime = now();
|
||||
commitMutationEffects(root, finishedWork, lanes);
|
||||
@@ -10699,7 +10653,7 @@ function commitRootImpl(
|
||||
requestPaint();
|
||||
executionContext = prevExecutionContext;
|
||||
currentUpdatePriority = spawnedLane;
|
||||
ReactCurrentBatchConfig.transition = transitions;
|
||||
ReactSharedInternals.T = transitions;
|
||||
} else (root.current = finishedWork), (commitTime = now());
|
||||
rootDoesHavePassiveEffects
|
||||
? ((rootDoesHavePassiveEffects = !1),
|
||||
@@ -10749,18 +10703,17 @@ function flushPassiveEffects() {
|
||||
remainingLanes = pendingPassiveEffectsRemainingLanes;
|
||||
pendingPassiveEffectsRemainingLanes = 0;
|
||||
var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
|
||||
priority = 32 > renderPriority ? 32 : renderPriority;
|
||||
renderPriority = ReactCurrentBatchConfig.transition;
|
||||
var previousPriority = currentUpdatePriority;
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
previousPriority = currentUpdatePriority;
|
||||
try {
|
||||
ReactCurrentBatchConfig.transition = null;
|
||||
currentUpdatePriority = priority;
|
||||
currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
|
||||
ReactSharedInternals.T = null;
|
||||
if (null === rootWithPendingPassiveEffects)
|
||||
var JSCompiler_inline_result = !1;
|
||||
else {
|
||||
var transitions = pendingPassiveTransitions;
|
||||
pendingPassiveTransitions = null;
|
||||
priority = rootWithPendingPassiveEffects;
|
||||
renderPriority = rootWithPendingPassiveEffects;
|
||||
var lanes = pendingPassiveEffectsLanes;
|
||||
rootWithPendingPassiveEffects = null;
|
||||
pendingPassiveEffectsLanes = 0;
|
||||
@@ -10772,10 +10725,10 @@ function flushPassiveEffects() {
|
||||
injectedProfilingHooks.markPassiveEffectsStarted(lanes);
|
||||
var prevExecutionContext = executionContext;
|
||||
executionContext |= 4;
|
||||
commitPassiveUnmountOnFiber(priority.current);
|
||||
commitPassiveUnmountOnFiber(renderPriority.current);
|
||||
commitPassiveMountOnFiber(
|
||||
priority,
|
||||
priority.current,
|
||||
renderPriority,
|
||||
renderPriority.current,
|
||||
lanes,
|
||||
transitions
|
||||
);
|
||||
@@ -10828,9 +10781,9 @@ function flushPassiveEffects() {
|
||||
"function" === typeof injectedHook.onPostCommitFiberRoot
|
||||
)
|
||||
try {
|
||||
injectedHook.onPostCommitFiberRoot(rendererID, priority);
|
||||
injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
|
||||
} catch (err) {}
|
||||
var stateNode = priority.current.stateNode;
|
||||
var stateNode = renderPriority.current.stateNode;
|
||||
stateNode.effectDuration = 0;
|
||||
stateNode.passiveEffectDuration = 0;
|
||||
JSCompiler_inline_result = !0;
|
||||
@@ -10838,7 +10791,7 @@ function flushPassiveEffects() {
|
||||
return JSCompiler_inline_result;
|
||||
} finally {
|
||||
(currentUpdatePriority = previousPriority),
|
||||
(ReactCurrentBatchConfig.transition = renderPriority),
|
||||
(ReactSharedInternals.T = prevTransition),
|
||||
releaseRootPooledCache(root, remainingLanes);
|
||||
}
|
||||
}
|
||||
@@ -11478,6 +11431,13 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
componentStack: ""
|
||||
};
|
||||
closestInstance = findCurrentFiberUsingSlowPath(closestInstance);
|
||||
if (null === closestInstance)
|
||||
return {
|
||||
hierarchy: [],
|
||||
props: emptyObject,
|
||||
selectedIndex: null,
|
||||
componentStack: ""
|
||||
};
|
||||
var hierarchy = [];
|
||||
traverseOwnerTreeUp(hierarchy, closestInstance);
|
||||
var JSCompiler_inline_result;
|
||||
@@ -11498,10 +11458,7 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
instance = createHierarchy(hierarchy);
|
||||
var props = getHostProps(JSCompiler_inline_result);
|
||||
hierarchy = hierarchy.indexOf(JSCompiler_inline_result);
|
||||
closestInstance =
|
||||
null !== closestInstance
|
||||
? getStackByFiberInDevAndProd(closestInstance)
|
||||
: "";
|
||||
closestInstance = getStackByFiberInDevAndProd(closestInstance);
|
||||
return {
|
||||
closestInstance: JSCompiler_inline_result,
|
||||
hierarchy: instance,
|
||||
@@ -11511,9 +11468,11 @@ function getInspectorDataForInstance(closestInstance) {
|
||||
};
|
||||
}
|
||||
function traverseOwnerTreeUp(hierarchy, instance) {
|
||||
instance &&
|
||||
(hierarchy.unshift(instance),
|
||||
traverseOwnerTreeUp(hierarchy, instance._debugOwner));
|
||||
hierarchy.unshift(instance);
|
||||
instance = instance._debugOwner;
|
||||
null != instance &&
|
||||
"number" === typeof instance.tag &&
|
||||
traverseOwnerTreeUp(hierarchy, instance);
|
||||
}
|
||||
if (
|
||||
"function" !==
|
||||
@@ -11560,10 +11519,10 @@ batchedUpdatesImpl = function (fn, a) {
|
||||
}
|
||||
};
|
||||
var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1245 = {
|
||||
devToolsConfig$jscomp$inline_1248 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-canary-e56bfcc6",
|
||||
version: "19.0.0-canary-ad58aafc",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -11593,10 +11552,10 @@ var roots = new Map(),
|
||||
} catch (err) {}
|
||||
return hook.checkDCE ? !0 : !1;
|
||||
})({
|
||||
bundleType: devToolsConfig$jscomp$inline_1245.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1245.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1245.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1245.rendererConfig,
|
||||
bundleType: devToolsConfig$jscomp$inline_1248.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1248.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1248.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1248.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -11606,20 +11565,20 @@ var roots = new Map(),
|
||||
setErrorHandler: null,
|
||||
setSuspenseHandler: null,
|
||||
scheduleUpdate: null,
|
||||
currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findHostInstanceByFiber: function (fiber) {
|
||||
fiber = findCurrentHostFiber(fiber);
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1245.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1248.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-canary-e56bfcc6"
|
||||
reconcilerVersion: "19.0.0-canary-ad58aafc"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
|
||||
computeComponentStackForErrorReporting: function (reactTag) {
|
||||
|
||||
Reference in New Issue
Block a user