diff --git a/package.json b/package.json index 65e752e1b1f89..29420145b35f9 100644 --- a/package.json +++ b/package.json @@ -227,16 +227,16 @@ "pretty-ms": "7.0.0", "random-seed": "0.3.0", "react": "19.0.0", - "react-builtin": "npm:react@19.2.0-canary-63779030-20250328", + "react-builtin": "npm:react@19.2.0-canary-040f8286-20250402", "react-dom": "19.0.0", - "react-dom-builtin": "npm:react-dom@19.2.0-canary-63779030-20250328", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-63779030-20250328", - "react-experimental-builtin": "npm:react@0.0.0-experimental-63779030-20250328", - "react-is-builtin": "npm:react-is@19.2.0-canary-63779030-20250328", - "react-server-dom-turbopack": "19.2.0-canary-63779030-20250328", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-63779030-20250328", - "react-server-dom-webpack": "19.2.0-canary-63779030-20250328", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-63779030-20250328", + "react-dom-builtin": "npm:react-dom@19.2.0-canary-040f8286-20250402", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-040f8286-20250402", + "react-experimental-builtin": "npm:react@0.0.0-experimental-040f8286-20250402", + "react-is-builtin": "npm:react-is@19.2.0-canary-040f8286-20250402", + "react-server-dom-turbopack": "19.2.0-canary-040f8286-20250402", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-040f8286-20250402", + "react-server-dom-webpack": "19.2.0-canary-040f8286-20250402", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-040f8286-20250402", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -246,8 +246,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.12.2", - "scheduler-builtin": "npm:scheduler@0.27.0-canary-63779030-20250328", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-63779030-20250328", + "scheduler-builtin": "npm:scheduler@0.27.0-canary-040f8286-20250402", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-040f8286-20250402", "seedrandom": "3.0.5", "semver": "7.3.7", "shell-quote": "1.7.3", @@ -290,10 +290,10 @@ "@types/react": "19.0.8", "@types/react-dom": "19.0.3", "jest-snapshot": "30.0.0-alpha.6", - "react": "19.2.0-canary-63779030-20250328", - "react-dom": "19.2.0-canary-63779030-20250328", - "react-is": "19.2.0-canary-63779030-20250328", - "scheduler": "0.27.0-canary-63779030-20250328" + "react": "19.2.0-canary-040f8286-20250402", + "react-dom": "19.2.0-canary-040f8286-20250402", + "react-is": "19.2.0-canary-040f8286-20250402", + "scheduler": "0.27.0-canary-040f8286-20250402" }, "patchedDependencies": { "webpack-sources@3.2.3": "patches/webpack-sources@3.2.3.patch", diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js index 172de760541cf..180dd80b22544 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js @@ -489,1021 +489,1021 @@ (pop(hostTransitionProviderCursor, fiber), (HostTransitionContext._currentValue = NotPendingTransition)); } - function typeName(value) { - return ( - ("function" === typeof Symbol && - Symbol.toStringTag && - value[Symbol.toStringTag]) || - value.constructor.name || - "Object" - ); - } - function willCoercionThrow(value) { - try { - return testStringCoercion(value), !1; - } catch (e) { - return !0; + function disabledLog() {} + function disableLogs() { + if (0 === disabledDepth) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: !0, + enumerable: !0, + value: disabledLog, + writable: !0 + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); } + disabledDepth++; } - function testStringCoercion(value) { - return "" + value; - } - function checkAttributeStringCoercion(value, attributeName) { - if (willCoercionThrow(value)) - return ( - console.error( - "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", - attributeName, - typeName(value) - ), - testStringCoercion(value) - ); - } - function checkCSSPropertyStringCoercion(value, propName) { - if (willCoercionThrow(value)) - return ( - console.error( - "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", - propName, - typeName(value) - ), - testStringCoercion(value) - ); - } - function checkFormFieldValueStringCoercion(value) { - if (willCoercionThrow(value)) - return ( - console.error( - "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", - typeName(value) - ), - testStringCoercion(value) - ); - } - function injectInternals(internals) { - if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; - var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; - if (hook.isDisabled) return !0; - if (!hook.supportsFiber) - return ( - console.error( - "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" - ), - !0 - ); - try { - (rendererID = hook.inject(internals)), (injectedHook = hook); - } catch (err) { - console.error("React instrumentation encountered an error: %s.", err); + function reenableLogs() { + disabledDepth--; + if (0 === disabledDepth) { + var props = { configurable: !0, enumerable: !0, writable: !0 }; + Object.defineProperties(console, { + log: assign({}, props, { value: prevLog }), + info: assign({}, props, { value: prevInfo }), + warn: assign({}, props, { value: prevWarn }), + error: assign({}, props, { value: prevError }), + group: assign({}, props, { value: prevGroup }), + groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), + groupEnd: assign({}, props, { value: prevGroupEnd }) + }); } - return hook.checkDCE ? !0 : !1; + 0 > disabledDepth && + console.error( + "disabledDepth fell below zero. This is a bug in React. Please file an issue." + ); } - function setIsStrictModeForDevtools(newIsStrictMode) { - "function" === typeof log$1 && - unstable_setDisableYieldValue(newIsStrictMode); - if (injectedHook && "function" === typeof injectedHook.setStrictMode) + function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) try { - injectedHook.setStrictMode(rendererID, newIsStrictMode); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - console.error( - "React instrumentation encountered an error: %s", - err - )); + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; } + return "\n" + prefix + name + suffix; } - function clz32Fallback(x) { - x >>>= 0; - return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; - } - function getHighestPriorityLanes(lanes) { - var pendingSyncLanes = lanes & 42; - if (0 !== pendingSyncLanes) return pendingSyncLanes; - switch (lanes & -lanes) { - case 1: - return 1; - case 2: - return 2; - case 4: - return 4; - case 8: - return 8; - case 16: - return 16; - case 32: - return 32; - case 64: - return 64; - case 128: - return 128; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return lanes & 4194048; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return lanes & 62914560; - case 67108864: - return 67108864; - case 134217728: - return 134217728; - case 268435456: - return 268435456; - case 536870912: - return 536870912; - case 1073741824: - return 0; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - lanes - ); - } - } - function getNextLanes(root, wipLanes, rootHasPendingCommit) { - var pendingLanes = root.pendingLanes; - if (0 === pendingLanes) return 0; - var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; - var nonIdlePendingLanes = pendingLanes & 134217727; - 0 !== nonIdlePendingLanes - ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = nonIdlePendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = - getHighestPriorityLanes(rootHasPendingCommit))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = pendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); - return 0 === nextLanes - ? 0 - : 0 !== wipLanes && - wipLanes !== nextLanes && - 0 === (wipLanes & suspendedLanes) && - ((suspendedLanes = nextLanes & -nextLanes), - (rootHasPendingCommit = wipLanes & -wipLanes), - suspendedLanes >= rootHasPendingCommit || - (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) - ? wipLanes - : nextLanes; - } - function checkIfRootIsPrerendering(root, renderLanes) { - return ( - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - renderLanes) - ); - } - function computeExpirationTime(lane, currentTime) { - switch (lane) { - case 1: - case 2: - case 4: - case 8: - case 64: - return currentTime + 250; - case 16: - case 32: - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return currentTime + 5e3; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return -1; - case 67108864: - case 134217728: - case 268435456: - case 536870912: - case 1073741824: - return -1; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - -1 + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + var frame = componentFrameCache.get(fn); + if (void 0 !== frame) return frame; + reentry = !0; + frame = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher = null; + previousDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = null; + disableLogs(); + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$0) { + control = x$0; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$1) { + control = x$1; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } ); - } - } - function claimNextTransitionLane() { - var lane = nextTransitionLane; - nextTransitionLane <<= 1; - 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); - return lane; - } - function claimNextRetryLane() { - var lane = nextRetryLane; - nextRetryLane <<= 1; - 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); - return lane; - } - function createLaneMap(initial) { - for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); - return laneMap; - } - function markRootUpdated$1(root, updateLane) { - root.pendingLanes |= updateLane; - 268435456 !== updateLane && - ((root.suspendedLanes = 0), - (root.pingedLanes = 0), - (root.warmLanes = 0)); - } - function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ) { - var previouslyPendingLanes = root.pendingLanes; - root.pendingLanes = remainingLanes; - root.suspendedLanes = 0; - root.pingedLanes = 0; - root.warmLanes = 0; - root.expiredLanes &= remainingLanes; - root.entangledLanes &= remainingLanes; - root.errorRecoveryDisabledLanes &= remainingLanes; - root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - for ( - remainingLanes = previouslyPendingLanes & ~remainingLanes; - 0 < remainingLanes; + var _RunInRootFrame$Deter = + RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + _RunInRootFrame$Deter = namePropDescriptor = 0; + namePropDescriptor < sampleLines.length && + !sampleLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); - ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; - expirationTimes[index] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index]; - if (null !== hiddenUpdatesForLane) + ) + namePropDescriptor++; for ( - hiddenUpdates[index] = null, index = 0; - index < hiddenUpdatesForLane.length; - index++ - ) { - var update = hiddenUpdatesForLane[index]; - null !== update && (update.lane &= -536870913); - } - remainingLanes &= ~lane; + ; + _RunInRootFrame$Deter < controlLines.length && + !controlLines[_RunInRootFrame$Deter].includes( + "DetermineComponentFrameRoot" + ); + + ) + _RunInRootFrame$Deter++; + if ( + namePropDescriptor === sampleLines.length || + _RunInRootFrame$Deter === controlLines.length + ) + for ( + namePropDescriptor = sampleLines.length - 1, + _RunInRootFrame$Deter = controlLines.length - 1; + 1 <= namePropDescriptor && + 0 <= _RunInRootFrame$Deter && + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]; + + ) + _RunInRootFrame$Deter--; + for ( + ; + 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; + namePropDescriptor--, _RunInRootFrame$Deter-- + ) + if ( + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter] + ) { + if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { + do + if ( + (namePropDescriptor--, + _RunInRootFrame$Deter--, + 0 > _RunInRootFrame$Deter || + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]) + ) { + var _frame = + "\n" + + sampleLines[namePropDescriptor].replace( + " at new ", + " at " + ); + fn.displayName && + _frame.includes("") && + (_frame = _frame.replace("", fn.displayName)); + "function" === typeof fn && + componentFrameCache.set(fn, _frame); + return _frame; + } + while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); + } + break; + } + } + } finally { + (reentry = !1), + (ReactSharedInternals.H = previousDispatcher), + reenableLogs(), + (Error.prepareStackTrace = frame); } - 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); - } - function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { - root.pendingLanes |= spawnedLane; - root.suspendedLanes &= ~spawnedLane; - var spawnedLaneIndex = 31 - clz32(spawnedLane); - root.entangledLanes |= spawnedLane; - root.entanglements[spawnedLaneIndex] = - root.entanglements[spawnedLaneIndex] | - 1073741824 | - (entangledLanes & 4194090); + sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(sampleLines) + : ""; + "function" === typeof fn && componentFrameCache.set(fn, sampleLines); + return sampleLines; } - function markRootEntangled(root, entangledLanes) { - var rootEntangledLanes = (root.entangledLanes |= entangledLanes); - for (root = root.entanglements; rootEntangledLanes; ) { - var index = 31 - clz32(rootEntangledLanes), - lane = 1 << index; - (lane & entangledLanes) | (root[index] & entangledLanes) && - (root[index] |= entangledLanes); - rootEntangledLanes &= ~lane; - } + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; } - function getBumpedLaneForHydrationByLane(lane) { - switch (lane) { - case 2: - lane = 1; - break; - case 8: - lane = 4; - break; - case 32: - lane = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - lane = 128; - break; - case 268435456: - lane = 134217728; - break; + function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + case 30: + return describeBuiltInComponentFrame("ViewTransition"); default: - lane = 0; + return ""; } - return lane; - } - function addFiberToLanesMap(root, fiber, lanes) { - if (isDevToolsPresent) - for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index = 31 - clz32(lanes), - lane = 1 << index; - root[index].add(fiber); - lanes &= ~lane; - } - } - function movePendingFibersToMemoized(root, lanes) { - if (isDevToolsPresent) - for ( - var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, - memoizedUpdaters = root.memoizedUpdaters; - 0 < lanes; - - ) { - var index = 31 - clz32(lanes); - root = 1 << index; - index = pendingUpdatersLaneMap[index]; - 0 < index.size && - (index.forEach(function (fiber) { - var alternate = fiber.alternate; - (null !== alternate && memoizedUpdaters.has(alternate)) || - memoizedUpdaters.add(fiber); - }), - index.clear()); - lanes &= ~root; - } - } - function lanesToEventPriority(lanes) { - lanes &= -lanes; - return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes - ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes - ? 0 !== (lanes & 134217727) - ? DefaultEventPriority - : IdleEventPriority - : ContinuousEventPriority - : DiscreteEventPriority; } - function resolveUpdatePriority() { - var updatePriority = ReactDOMSharedInternals.p; - if (0 !== updatePriority) return updatePriority; - updatePriority = window.event; - return void 0 === updatePriority - ? DefaultEventPriority - : getEventPriority(updatePriority.type); - } - function runWithPriority(priority, fn) { - var previousPriority = ReactDOMSharedInternals.p; + function getStackByFiberInDevAndProd(workInProgress) { try { - return (ReactDOMSharedInternals.p = priority), fn(); - } finally { - ReactDOMSharedInternals.p = previousPriority; + var info = ""; + do { + info += describeFiber(workInProgress); + var debugInfo = workInProgress._debugInfo; + if (debugInfo) + for (var i = debugInfo.length - 1; 0 <= i; i--) { + var entry = debugInfo[i]; + if ("string" === typeof entry.name) { + var JSCompiler_temp_const = info, + env = entry.env; + var JSCompiler_inline_result = describeBuiltInComponentFrame( + entry.name + (env ? " [" + env + "]" : "") + ); + info = JSCompiler_temp_const + JSCompiler_inline_result; + } + } + workInProgress = workInProgress.return; + } while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; } } - function detachDeletedInstance(node) { - delete node[internalInstanceKey]; - delete node[internalPropsKey]; - delete node[internalEventHandlersKey]; - delete node[internalEventHandlerListenersKey]; - delete node[internalEventHandlesSetKey]; + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; } - function getClosestInstanceFromNode(targetNode) { - var targetInst = targetNode[internalInstanceKey]; - if (targetInst) return targetInst; - for (var parentNode = targetNode.parentNode; parentNode; ) { - if ( - (targetInst = - parentNode[internalContainerInstanceKey] || - parentNode[internalInstanceKey]) - ) { - parentNode = targetInst.alternate; - if ( - null !== targetInst.child || - (null !== parentNode && null !== parentNode.child) - ) - for ( - targetNode = getParentSuspenseInstance(targetNode); - null !== targetNode; - - ) { - if ((parentNode = targetNode[internalInstanceKey])) - return parentNode; - targetNode = getParentSuspenseInstance(targetNode); - } - return targetInst; + function getCurrentFiberOwnerNameInDevOrNull() { + if (null === current) return null; + var owner = current._debugOwner; + return null != owner ? getComponentNameFromOwner(owner) : null; + } + function getCurrentFiberStackInDev() { + if (null === current) return ""; + var workInProgress = current; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 31: + info += describeBuiltInComponentFrame("Activity"); + break; + case 30: + info += describeBuiltInComponentFrame("ViewTransition"); + break; + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); } - targetNode = parentNode; - parentNode = targetNode.parentNode; + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + workInProgress && + debugStack && + ("string" !== typeof debugStack && + (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), + "" !== debugStack && (info += "\n" + debugStack)); + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + var JSCompiler_inline_result = info; + } catch (x) { + JSCompiler_inline_result = + "\nError generating stack: " + x.message + "\n" + x.stack; } - return null; + return JSCompiler_inline_result; } - function getInstanceFromNode(node) { - if ( - (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) - ) { - var tag = node.tag; - if ( - 5 === tag || - 6 === tag || - 13 === tag || - 26 === tag || - 27 === tag || - 3 === tag - ) - return node; + function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { + var previousFiber = current; + setCurrentFiber(fiber); + try { + return null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); + } finally { + setCurrentFiber(previousFiber); } - return null; + throw Error( + "runWithFiberInDEV should never be called in production. This is a bug in React." + ); } - function getNodeFromInstance(inst) { - var tag = inst.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) - return inst.stateNode; - throw Error("getNodeFromInstance: Invalid argument."); + function setCurrentFiber(fiber) { + ReactSharedInternals.getCurrentStack = + null === fiber ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = fiber; } - function getResourcesFromRoot(root) { - var resources = root[internalRootNodeResourcesKey]; - resources || - (resources = root[internalRootNodeResourcesKey] = - { hoistableStyles: new Map(), hoistableScripts: new Map() }); - return resources; + function typeName(value) { + return ( + ("function" === typeof Symbol && + Symbol.toStringTag && + value[Symbol.toStringTag]) || + value.constructor.name || + "Object" + ); } - function markNodeAsHoistable(node) { - node[internalHoistableMarker] = !0; + function willCoercionThrow(value) { + try { + return testStringCoercion(value), !1; + } catch (e) { + return !0; + } } - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + "Capture", dependencies); + function testStringCoercion(value) { + return "" + value; } - function registerDirectEvent(registrationName, dependencies) { - registrationNameDependencies[registrationName] && - console.error( - "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", - registrationName + function checkAttributeStringCoercion(value, attributeName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", + attributeName, + typeName(value) + ), + testStringCoercion(value) ); - registrationNameDependencies[registrationName] = dependencies; - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - "onDoubleClick" === registrationName && - (possibleRegistrationNames.ondblclick = registrationName); - for ( - registrationName = 0; - registrationName < dependencies.length; - registrationName++ - ) - allNativeEvents.add(dependencies[registrationName]); } - function checkControlledValueProps(tagName, props) { - hasReadOnlyValue[props.type] || - props.onChange || - props.onInput || - props.readOnly || - props.disabled || - null == props.value || - ("select" === tagName - ? console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." - ) - : console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." - )); - props.onChange || - props.readOnly || - props.disabled || - null == props.checked || - console.error( - "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + function checkCSSPropertyStringCoercion(value, propName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", + propName, + typeName(value) + ), + testStringCoercion(value) ); } - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) - return !0; - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) - return !1; - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) - return (validatedAttributeNameCache[attributeName] = !0); - illegalAttributeNameCache[attributeName] = !0; - console.error("Invalid attribute name: `%s`", attributeName); - return !1; - } - function pushMutationContext() { - var prev = viewTransitionMutationContext; - viewTransitionMutationContext = !1; - return prev; + function checkFormFieldValueStringCoercion(value) { + if (willCoercionThrow(value)) + return ( + console.error( + "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", + typeName(value) + ), + testStringCoercion(value) + ); } - function getValueForAttributeOnCustomComponent(node, name, expected) { - if (isAttributeNameSafe(name)) { - if (!node.hasAttribute(name)) { - switch (typeof expected) { - case "symbol": - case "object": - return expected; - case "function": - return expected; - case "boolean": - if (!1 === expected) return expected; - } - return void 0 === expected ? void 0 : null; - } - node = node.getAttribute(name); - if ("" === node && !0 === expected) return !0; - checkAttributeStringCoercion(expected, name); - return node === "" + expected ? expected : node; + function injectInternals(internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled) return !0; + if (!hook.supportsFiber) + return ( + console.error( + "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" + ), + !0 + ); + try { + (rendererID = hook.inject(internals)), (injectedHook = hook); + } catch (err) { + console.error("React instrumentation encountered an error: %s.", err); } + return hook.checkDCE ? !0 : !1; } - function setValueForAttribute(node, name, value) { - if (isAttributeNameSafe(name)) - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix && "aria-" !== prefix) { - node.removeAttribute(name); - return; - } - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); + function setIsStrictModeForDevtools(newIsStrictMode) { + "function" === typeof log$1 && + unstable_setDisableYieldValue(newIsStrictMode); + if (injectedHook && "function" === typeof injectedHook.setStrictMode) + try { + injectedHook.setStrictMode(rendererID, newIsStrictMode); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + console.error( + "React instrumentation encountered an error: %s", + err + )); } } - function setValueForKnownAttribute(node, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); - } + function clz32Fallback(x) { + x >>>= 0; + return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; } - function setValueForNamespacedAttribute(node, namespace, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttributeNS(namespace, name, "" + value); + function getHighestPriorityLanes(lanes) { + var pendingSyncLanes = lanes & 42; + if (0 !== pendingSyncLanes) return pendingSyncLanes; + switch (lanes & -lanes) { + case 1: + return 1; + case 2: + return 2; + case 4: + return 4; + case 8: + return 8; + case 16: + return 16; + case 32: + return 32; + case 64: + return 64; + case 128: + return 128; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return lanes & 4194048; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return lanes & 62914560; + case 67108864: + return 67108864; + case 134217728: + return 134217728; + case 268435456: + return 268435456; + case 536870912: + return 536870912; + case 1073741824: + return 0; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + lanes + ); } } - function disabledLog() {} - function disableLogs() { - if (0 === disabledDepth) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: !0, - enumerable: !0, - value: disabledLog, - writable: !0 - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); + function getNextLanes(root, wipLanes, rootHasPendingCommit) { + var pendingLanes = root.pendingLanes; + if (0 === pendingLanes) return 0; + var nextLanes = 0, + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; + var nonIdlePendingLanes = pendingLanes & 134217727; + 0 !== nonIdlePendingLanes + ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); + return 0 === nextLanes + ? 0 + : 0 !== wipLanes && + wipLanes !== nextLanes && + 0 === (wipLanes & suspendedLanes) && + ((suspendedLanes = nextLanes & -nextLanes), + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) + ? wipLanes + : nextLanes; + } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } + function computeExpirationTime(lane, currentTime) { + switch (lane) { + case 1: + case 2: + case 4: + case 8: + case 64: + return currentTime + 250; + case 16: + case 32: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return currentTime + 5e3; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return -1; + case 67108864: + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + -1 + ); } - disabledDepth++; } - function reenableLogs() { - disabledDepth--; - if (0 === disabledDepth) { - var props = { configurable: !0, enumerable: !0, writable: !0 }; - Object.defineProperties(console, { - log: assign({}, props, { value: prevLog }), - info: assign({}, props, { value: prevInfo }), - warn: assign({}, props, { value: prevWarn }), - error: assign({}, props, { value: prevError }), - group: assign({}, props, { value: prevGroup }), - groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), - groupEnd: assign({}, props, { value: prevGroupEnd }) - }); - } - 0 > disabledDepth && - console.error( - "disabledDepth fell below zero. This is a bug in React. Please file an issue." - ); + function claimNextTransitionLane() { + var lane = nextTransitionLane; + nextTransitionLane <<= 1; + 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); + return lane; } - function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; - } - return "\n" + prefix + name + suffix; + function claimNextRetryLane() { + var lane = nextRetryLane; + nextRetryLane <<= 1; + 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); + return lane; } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - var frame = componentFrameCache.get(fn); - if (void 0 !== frame) return frame; - reentry = !0; - frame = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher = null; - previousDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = null; - disableLogs(); - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$0) { - control = x$0; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$1) { - control = x$1; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = - RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - _RunInRootFrame$Deter = namePropDescriptor = 0; - namePropDescriptor < sampleLines.length && - !sampleLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); + function createLaneMap(initial) { + for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); + return laneMap; + } + function markRootUpdated$1(root, updateLane) { + root.pendingLanes |= updateLane; + 268435456 !== updateLane && + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); + } + function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ) { + var previouslyPendingLanes = root.pendingLanes; + root.pendingLanes = remainingLanes; + root.suspendedLanes = 0; + root.pingedLanes = 0; + root.warmLanes = 0; + root.expiredLanes &= remainingLanes; + root.entangledLanes &= remainingLanes; + root.errorRecoveryDisabledLanes &= remainingLanes; + root.shellSuspendCounter = 0; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; + for ( + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; - ) - namePropDescriptor++; + ) { + var index = 31 - clz32(remainingLanes), + lane = 1 << index; + entanglements[index] = 0; + expirationTimes[index] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index]; + if (null !== hiddenUpdatesForLane) for ( - ; - _RunInRootFrame$Deter < controlLines.length && - !controlLines[_RunInRootFrame$Deter].includes( - "DetermineComponentFrameRoot" - ); + hiddenUpdates[index] = null, index = 0; + index < hiddenUpdatesForLane.length; + index++ + ) { + var update = hiddenUpdatesForLane[index]; + null !== update && (update.lane &= -536870913); + } + remainingLanes &= ~lane; + } + 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); + } + function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { + root.pendingLanes |= spawnedLane; + root.suspendedLanes &= ~spawnedLane; + var spawnedLaneIndex = 31 - clz32(spawnedLane); + root.entangledLanes |= spawnedLane; + root.entanglements[spawnedLaneIndex] = + root.entanglements[spawnedLaneIndex] | + 1073741824 | + (entangledLanes & 4194090); + } + function markRootEntangled(root, entangledLanes) { + var rootEntangledLanes = (root.entangledLanes |= entangledLanes); + for (root = root.entanglements; rootEntangledLanes; ) { + var index = 31 - clz32(rootEntangledLanes), + lane = 1 << index; + (lane & entangledLanes) | (root[index] & entangledLanes) && + (root[index] |= entangledLanes); + rootEntangledLanes &= ~lane; + } + } + function getBumpedLaneForHydrationByLane(lane) { + switch (lane) { + case 2: + lane = 1; + break; + case 8: + lane = 4; + break; + case 32: + lane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + lane = 128; + break; + case 268435456: + lane = 134217728; + break; + default: + lane = 0; + } + return lane; + } + function addFiberToLanesMap(root, fiber, lanes) { + if (isDevToolsPresent) + for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { + var index = 31 - clz32(lanes), + lane = 1 << index; + root[index].add(fiber); + lanes &= ~lane; + } + } + function movePendingFibersToMemoized(root, lanes) { + if (isDevToolsPresent) + for ( + var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, + memoizedUpdaters = root.memoizedUpdaters; + 0 < lanes; - ) - _RunInRootFrame$Deter++; + ) { + var index = 31 - clz32(lanes); + root = 1 << index; + index = pendingUpdatersLaneMap[index]; + 0 < index.size && + (index.forEach(function (fiber) { + var alternate = fiber.alternate; + (null !== alternate && memoizedUpdaters.has(alternate)) || + memoizedUpdaters.add(fiber); + }), + index.clear()); + lanes &= ~root; + } + } + function lanesToEventPriority(lanes) { + lanes &= -lanes; + return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes + ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes + ? 0 !== (lanes & 134217727) + ? DefaultEventPriority + : IdleEventPriority + : ContinuousEventPriority + : DiscreteEventPriority; + } + function resolveUpdatePriority() { + var updatePriority = ReactDOMSharedInternals.p; + if (0 !== updatePriority) return updatePriority; + updatePriority = window.event; + return void 0 === updatePriority + ? DefaultEventPriority + : getEventPriority(updatePriority.type); + } + function runWithPriority(priority, fn) { + var previousPriority = ReactDOMSharedInternals.p; + try { + return (ReactDOMSharedInternals.p = priority), fn(); + } finally { + ReactDOMSharedInternals.p = previousPriority; + } + } + function detachDeletedInstance(node) { + delete node[internalInstanceKey]; + delete node[internalPropsKey]; + delete node[internalEventHandlersKey]; + delete node[internalEventHandlerListenersKey]; + delete node[internalEventHandlesSetKey]; + } + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + if (targetInst) return targetInst; + for (var parentNode = targetNode.parentNode; parentNode; ) { + if ( + (targetInst = + parentNode[internalContainerInstanceKey] || + parentNode[internalInstanceKey]) + ) { + parentNode = targetInst.alternate; if ( - namePropDescriptor === sampleLines.length || - _RunInRootFrame$Deter === controlLines.length + null !== targetInst.child || + (null !== parentNode && null !== parentNode.child) ) for ( - namePropDescriptor = sampleLines.length - 1, - _RunInRootFrame$Deter = controlLines.length - 1; - 1 <= namePropDescriptor && - 0 <= _RunInRootFrame$Deter && - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]; + targetNode = getParentSuspenseInstance(targetNode); + null !== targetNode; - ) - _RunInRootFrame$Deter--; - for ( - ; - 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; - namePropDescriptor--, _RunInRootFrame$Deter-- - ) - if ( - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter] ) { - if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { - do - if ( - (namePropDescriptor--, - _RunInRootFrame$Deter--, - 0 > _RunInRootFrame$Deter || - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]) - ) { - var _frame = - "\n" + - sampleLines[namePropDescriptor].replace( - " at new ", - " at " - ); - fn.displayName && - _frame.includes("") && - (_frame = _frame.replace("", fn.displayName)); - "function" === typeof fn && - componentFrameCache.set(fn, _frame); - return _frame; - } - while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); - } - break; + if ((parentNode = targetNode[internalInstanceKey])) + return parentNode; + targetNode = getParentSuspenseInstance(targetNode); } + return targetInst; } - } finally { - (reentry = !1), - (ReactSharedInternals.H = previousDispatcher), - reenableLogs(), - (Error.prepareStackTrace = frame); + targetNode = parentNode; + parentNode = targetNode.parentNode; } - sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(sampleLines) - : ""; - "function" === typeof fn && componentFrameCache.set(fn, sampleLines); - return sampleLines; + return null; } - function formatOwnerStack(error) { - var prevPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - error = error.stack; - Error.prepareStackTrace = prevPrepareStackTrace; - error.startsWith("Error: react-stack-top-frame\n") && - (error = error.slice(29)); - prevPrepareStackTrace = error.indexOf("\n"); - -1 !== prevPrepareStackTrace && - (error = error.slice(prevPrepareStackTrace + 1)); - prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); - -1 !== prevPrepareStackTrace && - (prevPrepareStackTrace = error.lastIndexOf( - "\n", - prevPrepareStackTrace - )); - if (-1 !== prevPrepareStackTrace) - error = error.slice(0, prevPrepareStackTrace); - else return ""; - return error; + function getInstanceFromNode(node) { + if ( + (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) + ) { + var tag = node.tag; + if ( + 5 === tag || + 6 === tag || + 13 === tag || + 26 === tag || + 27 === tag || + 3 === tag + ) + return node; + } + return null; + } + function getNodeFromInstance(inst) { + var tag = inst.tag; + if (5 === tag || 26 === tag || 27 === tag || 6 === tag) + return inst.stateNode; + throw Error("getNodeFromInstance: Invalid argument."); + } + function getResourcesFromRoot(root) { + var resources = root[internalRootNodeResourcesKey]; + resources || + (resources = root[internalRootNodeResourcesKey] = + { hoistableStyles: new Map(), hoistableScripts: new Map() }); + return resources; + } + function markNodeAsHoistable(node) { + node[internalHoistableMarker] = !0; + } + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + registrationNameDependencies[registrationName] && + console.error( + "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", + registrationName + ); + registrationNameDependencies[registrationName] = dependencies; + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + "onDoubleClick" === registrationName && + (possibleRegistrationNames.ondblclick = registrationName); + for ( + registrationName = 0; + registrationName < dependencies.length; + registrationName++ + ) + allNativeEvents.add(dependencies[registrationName]); + } + function checkControlledValueProps(tagName, props) { + hasReadOnlyValue[props.type] || + props.onChange || + props.onInput || + props.readOnly || + props.disabled || + null == props.value || + ("select" === tagName + ? console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." + ) + : console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + )); + props.onChange || + props.readOnly || + props.disabled || + null == props.checked || + console.error( + "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + ); + } + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) + return !0; + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) + return !1; + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) + return (validatedAttributeNameCache[attributeName] = !0); + illegalAttributeNameCache[attributeName] = !0; + console.error("Invalid attribute name: `%s`", attributeName); + return !1; + } + function pushMutationContext() { + var prev = viewTransitionMutationContext; + viewTransitionMutationContext = !1; + return prev; } - function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - case 30: - return describeBuiltInComponentFrame("ViewTransition"); - default: - return ""; + function getValueForAttributeOnCustomComponent(node, name, expected) { + if (isAttributeNameSafe(name)) { + if (!node.hasAttribute(name)) { + switch (typeof expected) { + case "symbol": + case "object": + return expected; + case "function": + return expected; + case "boolean": + if (!1 === expected) return expected; + } + return void 0 === expected ? void 0 : null; + } + node = node.getAttribute(name); + if ("" === node && !0 === expected) return !0; + checkAttributeStringCoercion(expected, name); + return node === "" + expected ? expected : node; } } - function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do { - info += describeFiber(workInProgress); - var debugInfo = workInProgress._debugInfo; - if (debugInfo) - for (var i = debugInfo.length - 1; 0 <= i; i--) { - var entry = debugInfo[i]; - if ("string" === typeof entry.name) { - var JSCompiler_temp_const = info, - env = entry.env; - var JSCompiler_inline_result = describeBuiltInComponentFrame( - entry.name + (env ? " [" + env + "]" : "") - ); - info = JSCompiler_temp_const + JSCompiler_inline_result; + function setValueForAttribute(node, name, value) { + if (isAttributeNameSafe(name)) + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix && "aria-" !== prefix) { + node.removeAttribute(name); + return; } - } - workInProgress = workInProgress.return; - } while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; - } - } - function describeFunctionComponentFrameWithoutLineNumber(fn) { - return (fn = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(fn) - : ""; - } - function getCurrentFiberOwnerNameInDevOrNull() { - if (null === current) return null; - var owner = current._debugOwner; - return null != owner ? getComponentNameFromOwner(owner) : null; + } + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); + } } - function getCurrentFiberStackInDev() { - if (null === current) return ""; - var workInProgress = current; - try { - var info = ""; - 6 === workInProgress.tag && (workInProgress = workInProgress.return); - switch (workInProgress.tag) { - case 26: - case 27: - case 5: - info += describeBuiltInComponentFrame(workInProgress.type); - break; - case 13: - info += describeBuiltInComponentFrame("Suspense"); - break; - case 19: - info += describeBuiltInComponentFrame("SuspenseList"); - break; - case 31: - info += describeBuiltInComponentFrame("Activity"); - break; - case 30: - info += describeBuiltInComponentFrame("ViewTransition"); - break; - case 0: - case 15: - case 1: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type - )); - break; - case 11: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type.render - )); + function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; } - for (; workInProgress; ) - if ("number" === typeof workInProgress.tag) { - var fiber = workInProgress; - workInProgress = fiber._debugOwner; - var debugStack = fiber._debugStack; - workInProgress && - debugStack && - ("string" !== typeof debugStack && - (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), - "" !== debugStack && (info += "\n" + debugStack)); - } else if (null != workInProgress.debugStack) { - var ownerStack = workInProgress.debugStack; - (workInProgress = workInProgress.owner) && - ownerStack && - (info += "\n" + formatOwnerStack(ownerStack)); - } else break; - var JSCompiler_inline_result = info; - } catch (x) { - JSCompiler_inline_result = - "\nError generating stack: " + x.message + "\n" + x.stack; + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); } - return JSCompiler_inline_result; } - function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { - var previousFiber = current; - setCurrentFiber(fiber); - try { - return null !== fiber && fiber._debugTask - ? fiber._debugTask.run( - callback.bind(null, arg0, arg1, arg2, arg3, arg4) - ) - : callback(arg0, arg1, arg2, arg3, arg4); - } finally { - setCurrentFiber(previousFiber); + function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + checkAttributeStringCoercion(value, name); + node.setAttributeNS(namespace, name, "" + value); } - throw Error( - "runWithFiberInDEV should never be called in production. This is a bug in React." - ); - } - function setCurrentFiber(fiber) { - ReactSharedInternals.getCurrentStack = - null === fiber ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = fiber; } function getToStringValue(value) { switch (typeof value) { @@ -3797,11 +3797,6 @@ enqueueUpdate$1(fiber, null, null, lane); return getRootForUpdatedFiber(fiber); } - function enqueueGestureRender(fiber) { - fiber = markUpdateLaneFromFiberToRoot(fiber, null, 64); - null !== fiber && markRootUpdated$1(fiber, 64); - return fiber; - } function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { sourceFiber.lanes |= lane; var alternate = sourceFiber.alternate; @@ -5135,6 +5130,21 @@ cache.controller.abort(); }); } + function queueTransitionTypes(root, transitionTypes) { + if (0 !== (root.pendingLanes & 4194048)) { + var queued = root.transitionTypes; + null === queued && (queued = root.transitionTypes = []); + for (root = 0; root < transitionTypes.length; root++) { + var transitionType = transitionTypes[root]; + -1 === queued.indexOf(transitionType) && queued.push(transitionType); + } + } + } + function claimQueuedTransitionTypes(root) { + var claimed = root.transitionTypes; + root.transitionTypes = null; + return claimed; + } function startUpdateTimerByLane(lane) { var JSCompiler_temp; (JSCompiler_temp = 0 !== (lane & 3)) || @@ -5264,6 +5274,7 @@ if ( 0 === --currentEntangledPendingCount && (-1 < transitionUpdateTime || (transitionStartTime = -1.1), + (entangledTransitionTypes = null), null !== currentEntangledListeners) ) { null !== currentEntangledActionThenable && @@ -5284,21 +5295,115 @@ then: function (resolve) { listeners.push(resolve); } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; + } + function startScheduledGesture( + root, + gestureTimeline, + gestureOptions, + transitionTypes + ) { + if (gestureOptions && null != gestureOptions.rangeStart) + var JSCompiler_temp = gestureOptions.rangeStart; + else { + JSCompiler_temp = gestureTimeline.currentTime; + if (null === JSCompiler_temp) + throw Error( + "Cannot start a gesture with a disconnected AnimationTimeline." + ); + JSCompiler_temp = + "number" === typeof JSCompiler_temp + ? JSCompiler_temp + : JSCompiler_temp.value; + } + gestureOptions = + gestureOptions && null != gestureOptions.rangeEnd + ? gestureOptions.rangeEnd + : 50 > JSCompiler_temp + ? 100 + : 0; + for (root = root.pendingGestures; null !== root; ) { + if (root.provider === gestureTimeline) { + root.count++; + root.rangeStart = JSCompiler_temp; + root.rangeEnd = gestureOptions; + if (null !== transitionTypes) + for ( + gestureTimeline = root.types, + null === gestureTimeline && (gestureTimeline = root.types = []), + JSCompiler_temp = 0; + JSCompiler_temp < transitionTypes.length; + JSCompiler_temp++ + ) + (gestureOptions = transitionTypes[JSCompiler_temp]), + -1 === gestureTimeline.indexOf(gestureOptions) && + gestureTimeline.push(gestureOptions); + return root; + } + root = root.next; + if (null === root) break; + } + return null; + } + function deleteScheduledGesture(root, gesture) { + null === gesture.prev + ? (root.pendingGestures === gesture && + ((root.pendingGestures = gesture.next), + null === root.pendingGestures && (root.pendingLanes &= -65)), + root.stoppingGestures === gesture && + (root.stoppingGestures = gesture.next)) + : ((gesture.prev.next = gesture.next), + null !== gesture.next && (gesture.next.prev = gesture.prev), + (gesture.prev = null), + (gesture.next = null)); + } + function stopCompletedGestures(root) { + var gesture = root.stoppingGestures; + for (root.stoppingGestures = null; null !== gesture; ) + null !== gesture.running && + (gesture.running.skipTransition(), (gesture.running = null)), + (root = gesture.next), + (gesture.next = null), + (gesture.prev = null), + (gesture = root); + } + function chainGestureCancellation(root, scheduledGesture, prevCancel) { + return function () { + if ( + null !== scheduledGesture && + (scheduledGesture.count--, 0 === scheduledGesture.count) + ) { + deleteScheduledGesture(root, scheduledGesture); + var runningTransition = scheduledGesture.running; + if (null !== runningTransition) { + var pendingLanesExcludingGestureLane = root.pendingLanes & -65; + 0 !== (pendingLanesExcludingGestureLane & 124) || + 0 !== (pendingLanesExcludingGestureLane & 4194048) + ? ((runningTransition = root.stoppingGestures), + null !== runningTransition && + ((scheduledGesture.next = runningTransition), + (runningTransition.prev = scheduledGesture)), + (root.stoppingGestures = scheduledGesture)) + : ((scheduledGesture.running = null), + runningTransition.skipTransition()); + } } - ); - return thenableWithOverride; + null !== prevCancel && prevCancel(); + }; } function peekCacheFromPool() { var cacheResumedFromPreviousRender = resumedCache.current; @@ -6919,76 +7024,6 @@ } return null; } - function scheduleGesture( - root, - provider, - initialDirection, - rangePrevious, - rangeCurrent, - rangeNext - ) { - for (var prev = root.pendingGestures; null !== prev; ) { - if (prev.provider === provider) return prev.count++, prev; - var next = prev.next; - if (null === next) break; - prev = next; - } - var isFlippedDirection = rangePrevious > rangeNext; - next = subscribeToGestureDirection( - provider, - rangeCurrent, - function (direction) { - isFlippedDirection && (direction = !direction); - gesture.direction !== direction && - ((gesture.direction = direction), - null === gesture.prev && - root.pendingGestures !== gesture && - ((direction = root.pendingGestures), - (gesture.next = direction), - null !== direction && (direction.prev = gesture), - (root.pendingGestures = gesture), - (root.pendingLanes |= 64), - ensureRootIsScheduled(root))); - } - ); - var gesture = { - provider: provider, - count: 1, - direction: initialDirection, - rangePrevious: rangePrevious, - rangeCurrent: rangeCurrent, - rangeNext: rangeNext, - cancel: next, - running: null, - prev: prev, - next: null - }; - null === prev ? (root.pendingGestures = gesture) : (prev.next = gesture); - ensureRootIsScheduled(root); - return gesture; - } - function deleteScheduledGesture(root, gesture) { - null === gesture.prev - ? (root.pendingGestures === gesture && - ((root.pendingGestures = gesture.next), - null === root.pendingGestures && (root.pendingLanes &= -65)), - root.stoppingGestures === gesture && - (root.stoppingGestures = gesture.next)) - : ((gesture.prev.next = gesture.next), - null !== gesture.next && (gesture.next.prev = gesture.prev), - (gesture.prev = null), - (gesture.next = null)); - } - function stopCompletedGestures(root) { - var gesture = root.stoppingGestures; - for (root.stoppingGestures = null; null !== gesture; ) - null !== gesture.running && - (gesture.running.skipTransition(), (gesture.running = null)), - (root = gesture.next), - (gesture.next = null), - (gesture.prev = null), - (gesture = root); - } function mountHookTypesDev() { var hookName = currentHookNameInDev; null === hookTypesDev @@ -7453,19 +7488,53 @@ update = current, didReadFromEntangledAsyncAction = !1; do { - var updateLane = update.lane & -536870913; - if ( - updateLane !== update.lane - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - var revertLane = update.revertLane; - if (0 === revertLane) + var updateLane = update.lane & -536870913, + shouldSkipUpdate = + updateLane !== update.lane + ? (workInProgressRootRenderLanes & updateLane) !== updateLane + : (renderLanes & updateLane) !== updateLane; + if (64 === updateLane) { + var scheduledGesture = update.gesture; + if (null !== scheduledGesture) + if (0 === scheduledGesture.count) { + update = update.next; + continue; + } else if (64 !== renderLanes) shouldSkipUpdate = !0; + else { + shouldSkipUpdate = workInProgressRoot; + if (null === shouldSkipUpdate) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + shouldSkipUpdate = + shouldSkipUpdate.pendingGestures !== scheduledGesture; + } + } + if (shouldSkipUpdate) + (scheduledGesture = { + lane: updateLane, + revertLane: update.revertLane, + gesture: update.gesture, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), + null === newBaseQueueLast + ? ((newBaseQueueFirst = newBaseQueueLast = scheduledGesture), + (baseFirst = pendingQueue)) + : (newBaseQueueLast = newBaseQueueLast.next = scheduledGesture), + (currentlyRenderingFiber.lanes |= updateLane), + (workInProgressRootSkippedLanes |= updateLane); + else { + scheduledGesture = update.revertLane; + if (0 === scheduledGesture) null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7473,15 +7542,16 @@ }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = !0); - else if ((renderLanes & revertLane) === revertLane) { + else if ((renderLanes & scheduledGesture) === scheduledGesture) { update = update.next; - revertLane === currentEntangledLane && + scheduledGesture === currentEntangledLane && (didReadFromEntangledAsyncAction = !0); continue; } else (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7491,29 +7561,15 @@ ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber.lanes |= revertLane), - (workInProgressRootSkippedLanes |= revertLane); + (currentlyRenderingFiber.lanes |= scheduledGesture), + (workInProgressRootSkippedLanes |= scheduledGesture); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane); - } else - (revertLane = { - lane: updateLane, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), - null === newBaseQueueLast - ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), - (baseFirst = pendingQueue)) - : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber.lanes |= updateLane), - (workInProgressRootSkippedLanes |= updateLane); + } update = update.next; } while (null !== update && update !== current); null === newBaseQueueLast @@ -7824,8 +7880,11 @@ if (node.isTransition) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; - ReactSharedInternals.T._updatedFibers = new Set(); try { var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S; @@ -7835,7 +7894,15 @@ } catch (error) { onActionError(actionQueue, node, error); } finally { - (ReactSharedInternals.T = prevTransition), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), + (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && ((actionQueue = currentTransition._updatedFibers.size), @@ -7857,7 +7924,9 @@ null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then - ? (returnValue.then( + ? (ReactSharedInternals.asyncTransitions++, + returnValue.then(releaseAsyncTransition, releaseAsyncTransition), + returnValue.then( function (nextState) { onActionSuccess(actionQueue, node, nextState); }, @@ -8293,6 +8362,9 @@ workInProgressRootSkippedLanes |= hook; return prevValue; } + function releaseAsyncTransition() { + ReactSharedInternals.asyncTransitions--; + } function startTransition( fiber, queue, @@ -8307,9 +8379,12 @@ : ContinuousEventPriority; var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); - currentTransition._updatedFibers = new Set(); try { var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S; @@ -8320,6 +8395,8 @@ "object" === typeof returnValue && "function" === typeof returnValue.then ) { + ReactSharedInternals.asyncTransitions++; + returnValue.then(releaseAsyncTransition, releaseAsyncTransition); var thenableForFinishedState = chainThenableValue( returnValue, finishedState @@ -8346,6 +8423,14 @@ ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && @@ -8412,14 +8497,19 @@ return existingStateHook; } function requestFormReset$1(formFiber) { - null === ReactSharedInternals.T && + var transition = ReactSharedInternals.T; + if (null === transition) console.error( "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition." ); - var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + else if (transition.gesture) + throw Error( + "Cannot requestFormReset() inside a startGestureTransition. There should be no side-effects associated with starting a Gesture until its Action is invoked. Move side-effects to the Action instead." + ); + transition = ensureFormComponentIsStateful(formFiber).next.queue; dispatchSetStateInternal( formFiber, - resetStateQueue, + transition, {}, requestUpdateLane(formFiber) ); @@ -8513,6 +8603,7 @@ var update = { lane: args, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8540,6 +8631,7 @@ var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8588,14 +8680,17 @@ queue, action ) { - null === ReactSharedInternals.T && + var transition = ReactSharedInternals.T; + null === transition && 0 === currentEntangledLane && console.error( "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition." ); + var lane = null !== transition && transition.gesture ? 64 : 2; action = { - lane: 2, + lane: lane, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8605,16 +8700,47 @@ if (throwIfDuringRender) throw Error("Cannot update optimistic state while rendering."); console.error("Cannot call startTransition while rendering."); - } else - (throwIfDuringRender = enqueueConcurrentHookUpdate( + } else if ( + ((throwIfDuringRender = enqueueConcurrentHookUpdate( fiber, queue, action, - 2 + lane )), - null !== throwIfDuringRender && - (startUpdateTimerByLane(2), - scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2)); + null !== throwIfDuringRender && + (startUpdateTimerByLane(lane), + scheduleUpdateOnFiber(throwIfDuringRender, fiber, lane), + null !== transition && + ((transition = transition.gesture), null !== transition))) + ) { + a: { + for (fiber = throwIfDuringRender.pendingGestures; null !== fiber; ) { + if (fiber.provider === transition) { + throwIfDuringRender = fiber; + break a; + } + lane = fiber.next; + if (null === lane) break; + fiber = lane; + } + transition = { + provider: transition, + count: 0, + rangeStart: 0, + rangeEnd: 100, + types: null, + running: null, + prev: fiber, + next: null + }; + null === fiber + ? (throwIfDuringRender.pendingGestures = transition) + : (fiber.next = transition); + ensureRootIsScheduled(throwIfDuringRender); + throwIfDuringRender = transition; + } + action.gesture = throwIfDuringRender; + } } function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; @@ -8641,115 +8767,6 @@ markRootEntangled(root, lane); } } - function startGesture(fiber, queue, gestureProvider, gestureOptions) { - var root = enqueueGestureRender(fiber); - if (null === root) return function () {}; - fiber = getCurrentGestureOffset(gestureProvider); - var range = gestureOptions && gestureOptions.range, - rangePrevious = range ? range[0] : 0, - rangeCurrent = range ? range[1] : fiber; - range = range ? range[2] : 100; - ((rangePrevious > rangeCurrent && range > rangeCurrent) || - (rangePrevious < rangeCurrent && range < rangeCurrent)) && - console.error( - 'The range of a gesture needs "previous" and "next" to be on either side of the "current" offset. Both cannot be above current and both cannot be below current.' - ); - var isFlippedDirection = rangePrevious > range, - update = { - gesture: scheduleGesture( - root, - gestureProvider, - fiber < rangeCurrent - ? isFlippedDirection - : fiber > rangeCurrent - ? !isFlippedDirection - : gestureOptions && "next" === gestureOptions.direction - ? !0 - : gestureOptions && "previous" === gestureOptions.direction - ? !1 - : queue.initialDirection, - rangePrevious, - rangeCurrent, - range - ), - prev: null, - next: queue.pending - }; - null !== queue.pending && (queue.pending.prev = update); - queue.pending = update; - return function () { - if (null === update.prev) - if (queue.pending === update) queue.pending = update.next; - else return; - else - (update.prev.next = update.next), - null !== update.next && (update.next.prev = update.prev), - (update.prev = null), - (update.next = null); - var gesture = update.gesture; - gesture.count--; - if (0 === gesture.count) { - var cancelDirectionSubscription = gesture.cancel; - cancelDirectionSubscription(); - deleteScheduledGesture(root, gesture); - cancelDirectionSubscription = gesture.running; - if (null !== cancelDirectionSubscription) { - var pendingLanesExcludingGestureLane = root.pendingLanes & -65; - 0 !== (pendingLanesExcludingGestureLane & 124) || - 0 !== (pendingLanesExcludingGestureLane & 4194048) - ? ((cancelDirectionSubscription = root.stoppingGestures), - null !== cancelDirectionSubscription && - ((gesture.next = cancelDirectionSubscription), - (cancelDirectionSubscription.prev = gesture)), - (root.stoppingGestures = gesture)) - : ((gesture.running = null), - cancelDirectionSubscription.skipTransition()); - } - } - }; - } - function mountSwipeTransition(previous, current) { - previous = { - pending: null, - dispatch: null, - initialDirection: previous === current - }; - var startGestureOnHook = (previous.dispatch = startGesture.bind( - null, - currentlyRenderingFiber, - previous - )); - mountWorkInProgressHook().queue = previous; - return [current, startGestureOnHook]; - } - function updateSwipeTransition(previous, current, next) { - var queue = updateWorkInProgressHook().queue, - startGestureOnHook = queue.dispatch, - rootRenderLanes = workInProgressRootRenderLanes, - value = current; - if (null !== queue.pending) { - if (64 === rootRenderLanes) { - rootRenderLanes = workInProgressRoot; - if (null === rootRenderLanes) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - rootRenderLanes = rootRenderLanes.pendingGestures; - if (null !== rootRenderLanes) - for (var update = queue.pending; null !== update; ) { - if (rootRenderLanes === update.gesture) { - value = rootRenderLanes.direction ? next : previous; - break; - } - update = update.next; - } - didReceiveUpdate = !0; - } - currentlyRenderingFiber.lanes |= 64; - } - queue.initialDirection = previous === current; - return [value, startGestureOnHook]; - } function warnOnInvalidCallback(callback) { if (null !== callback && "function" !== typeof callback) { var key = String(callback); @@ -10161,33 +10178,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2828; - var JSCompiler_object_inline_stack_2827 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2845; + var JSCompiler_object_inline_stack_2844 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2825 = !1; + var JSCompiler_object_inline_message_2842 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2828 = didSuspend) || - (JSCompiler_object_inline_componentStack_2828 = + (JSCompiler_object_inline_componentStack_2845 = didSuspend) || + (JSCompiler_object_inline_componentStack_2845 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2828 && - ((JSCompiler_object_inline_message_2825 = !0), + JSCompiler_object_inline_componentStack_2845 && + ((JSCompiler_object_inline_message_2842 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2828 = + JSCompiler_object_inline_componentStack_2845 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2825 + JSCompiler_object_inline_message_2842 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2826 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2843 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2826)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2843)) { c: { - var instance = JSCompiler_object_inline_digest_2826; + var instance = JSCompiler_object_inline_digest_2843; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -10229,87 +10246,87 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2826 + JSCompiler_object_inline_digest_2843 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2826 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2843 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2826 && - ((JSCompiler_object_inline_digest_2826 = - JSCompiler_object_inline_digest_2826.dehydrated), - null !== JSCompiler_object_inline_digest_2826) + null !== JSCompiler_object_inline_digest_2843 && + ((JSCompiler_object_inline_digest_2843 = + JSCompiler_object_inline_digest_2843.dehydrated), + null !== JSCompiler_object_inline_digest_2843) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2826) + isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2843) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2826 = - JSCompiler_object_inline_stack_2827.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2827.fallback; - if (JSCompiler_object_inline_message_2825) + JSCompiler_object_inline_digest_2843 = + JSCompiler_object_inline_stack_2844.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2844.fallback; + if (JSCompiler_object_inline_message_2842) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2827 = + (JSCompiler_object_inline_stack_2844 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2826, + JSCompiler_object_inline_digest_2843, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2825 = workInProgress.child), - (JSCompiler_object_inline_message_2825.memoizedState = + (JSCompiler_object_inline_message_2842 = workInProgress.child), + (JSCompiler_object_inline_message_2842.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2825.childLanes = + (JSCompiler_object_inline_message_2842.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2828, + JSCompiler_object_inline_componentStack_2845, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2827 + JSCompiler_object_inline_stack_2844 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2827.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2844.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2827 = + (JSCompiler_object_inline_stack_2844 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2826, + JSCompiler_object_inline_digest_2843, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2825 = workInProgress.child), - (JSCompiler_object_inline_message_2825.memoizedState = + (JSCompiler_object_inline_message_2842 = workInProgress.child), + (JSCompiler_object_inline_message_2842.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2825.childLanes = + (JSCompiler_object_inline_message_2842.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2828, + JSCompiler_object_inline_componentStack_2845, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2827 + JSCompiler_object_inline_stack_2844 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2826 + JSCompiler_object_inline_digest_2843 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2826 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2826) + ((JSCompiler_object_inline_digest_2843 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2843) ) { if (didSuspend) workInProgress.flags & 256 @@ -10326,94 +10343,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2825 = - JSCompiler_object_inline_stack_2827.fallback), - (JSCompiler_object_inline_digest_2826 = workInProgress.mode), - (JSCompiler_object_inline_stack_2827 = + (JSCompiler_object_inline_message_2842 = + JSCompiler_object_inline_stack_2844.fallback), + (JSCompiler_object_inline_digest_2843 = workInProgress.mode), + (JSCompiler_object_inline_stack_2844 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2827.children + children: JSCompiler_object_inline_stack_2844.children }, - JSCompiler_object_inline_digest_2826 + JSCompiler_object_inline_digest_2843 )), - (JSCompiler_object_inline_message_2825 = + (JSCompiler_object_inline_message_2842 = createFiberFromFragment( - JSCompiler_object_inline_message_2825, - JSCompiler_object_inline_digest_2826, + JSCompiler_object_inline_message_2842, + JSCompiler_object_inline_digest_2843, renderLanes, null )), - (JSCompiler_object_inline_message_2825.flags |= 2), - (JSCompiler_object_inline_stack_2827.return = workInProgress), - (JSCompiler_object_inline_message_2825.return = workInProgress), - (JSCompiler_object_inline_stack_2827.sibling = - JSCompiler_object_inline_message_2825), - (workInProgress.child = JSCompiler_object_inline_stack_2827), + (JSCompiler_object_inline_message_2842.flags |= 2), + (JSCompiler_object_inline_stack_2844.return = workInProgress), + (JSCompiler_object_inline_message_2842.return = workInProgress), + (JSCompiler_object_inline_stack_2844.sibling = + JSCompiler_object_inline_message_2842), + (workInProgress.child = JSCompiler_object_inline_stack_2844), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2827 = workInProgress.child), - (JSCompiler_object_inline_stack_2827.memoizedState = + (JSCompiler_object_inline_stack_2844 = workInProgress.child), + (JSCompiler_object_inline_stack_2844.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2827.childLanes = + (JSCompiler_object_inline_stack_2844.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2828, + JSCompiler_object_inline_componentStack_2845, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2825)); + (workInProgress = JSCompiler_object_inline_message_2842)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2826)) + isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2843)) ) { - JSCompiler_object_inline_componentStack_2828 = - JSCompiler_object_inline_digest_2826.nextSibling && - JSCompiler_object_inline_digest_2826.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2828) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2828.dgst; - var message = JSCompiler_object_inline_componentStack_2828.msg; - instance = JSCompiler_object_inline_componentStack_2828.stck; + JSCompiler_object_inline_componentStack_2845 = + JSCompiler_object_inline_digest_2843.nextSibling && + JSCompiler_object_inline_digest_2843.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2845) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2845.dgst; + var message = JSCompiler_object_inline_componentStack_2845.msg; + instance = JSCompiler_object_inline_componentStack_2845.stck; var componentStack = - JSCompiler_object_inline_componentStack_2828.cstck; + JSCompiler_object_inline_componentStack_2845.cstck; } - JSCompiler_object_inline_message_2825 = message; - JSCompiler_object_inline_digest_2826 = JSCompiler_temp; - JSCompiler_object_inline_stack_2827 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2828 = + JSCompiler_object_inline_message_2842 = message; + JSCompiler_object_inline_digest_2843 = JSCompiler_temp; + JSCompiler_object_inline_stack_2844 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2845 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2826 && - ((JSCompiler_object_inline_componentStack_2828 = - JSCompiler_object_inline_message_2825 - ? Error(JSCompiler_object_inline_message_2825) + "POSTPONE" !== JSCompiler_object_inline_digest_2843 && + ((JSCompiler_object_inline_componentStack_2845 = + JSCompiler_object_inline_message_2842 + ? Error(JSCompiler_object_inline_message_2842) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_componentStack_2828.stack = - JSCompiler_object_inline_stack_2827 || ""), - (JSCompiler_object_inline_componentStack_2828.digest = - JSCompiler_object_inline_digest_2826), - (JSCompiler_object_inline_stack_2827 = + (JSCompiler_object_inline_componentStack_2845.stack = + JSCompiler_object_inline_stack_2844 || ""), + (JSCompiler_object_inline_componentStack_2845.digest = + JSCompiler_object_inline_digest_2843), + (JSCompiler_object_inline_stack_2844 = void 0 === JSCompiler_temp ? null : JSCompiler_temp), - (JSCompiler_object_inline_message_2825 = { - value: JSCompiler_object_inline_componentStack_2828, + (JSCompiler_object_inline_message_2842 = { + value: JSCompiler_object_inline_componentStack_2845, source: null, - stack: JSCompiler_object_inline_stack_2827 + stack: JSCompiler_object_inline_stack_2844 }), - "string" === typeof JSCompiler_object_inline_stack_2827 && + "string" === typeof JSCompiler_object_inline_stack_2844 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2828, - JSCompiler_object_inline_message_2825 + JSCompiler_object_inline_componentStack_2845, + JSCompiler_object_inline_message_2842 ), - queueHydrationError(JSCompiler_object_inline_message_2825)); + queueHydrationError(JSCompiler_object_inline_message_2842)); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -10427,44 +10444,44 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2828 = + (JSCompiler_object_inline_componentStack_2845 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2828) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2845) ) { - JSCompiler_object_inline_componentStack_2828 = workInProgressRoot; + JSCompiler_object_inline_componentStack_2845 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_componentStack_2828 && - ((JSCompiler_object_inline_stack_2827 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2827 = - 0 !== (JSCompiler_object_inline_stack_2827 & 42) + null !== JSCompiler_object_inline_componentStack_2845 && + ((JSCompiler_object_inline_stack_2844 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2844 = + 0 !== (JSCompiler_object_inline_stack_2844 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2827 + JSCompiler_object_inline_stack_2844 )), - (JSCompiler_object_inline_stack_2827 = + (JSCompiler_object_inline_stack_2844 = 0 !== - (JSCompiler_object_inline_stack_2827 & - (JSCompiler_object_inline_componentStack_2828.suspendedLanes | + (JSCompiler_object_inline_stack_2844 & + (JSCompiler_object_inline_componentStack_2845.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2827), - 0 !== JSCompiler_object_inline_stack_2827 && - JSCompiler_object_inline_stack_2827 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2844), + 0 !== JSCompiler_object_inline_stack_2844 && + JSCompiler_object_inline_stack_2844 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2827), + ((prevState.retryLane = JSCompiler_object_inline_stack_2844), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2827 + JSCompiler_object_inline_stack_2844 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2828, + JSCompiler_object_inline_componentStack_2845, current, - JSCompiler_object_inline_stack_2827 + JSCompiler_object_inline_stack_2844 ), SelectiveHydrationException) ); - JSCompiler_object_inline_digest_2826.data === + JSCompiler_object_inline_digest_2843.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -10472,14 +10489,14 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2826.data === + JSCompiler_object_inline_digest_2843.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2826.nextSibling + JSCompiler_object_inline_digest_2843.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -10497,54 +10514,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2827.children + JSCompiler_object_inline_stack_2844.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2825) + if (JSCompiler_object_inline_message_2842) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2825 = - JSCompiler_object_inline_stack_2827.fallback), - (JSCompiler_object_inline_digest_2826 = workInProgress.mode), + (JSCompiler_object_inline_message_2842 = + JSCompiler_object_inline_stack_2844.fallback), + (JSCompiler_object_inline_digest_2843 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2827 = createWorkInProgress( + (JSCompiler_object_inline_stack_2844 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2827.children + children: JSCompiler_object_inline_stack_2844.children } )), - (JSCompiler_object_inline_stack_2827.subtreeFlags = + (JSCompiler_object_inline_stack_2844.subtreeFlags = JSCompiler_temp.subtreeFlags & 65011712), null !== instance - ? (JSCompiler_object_inline_message_2825 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2842 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2825 + JSCompiler_object_inline_message_2842 )) - : ((JSCompiler_object_inline_message_2825 = createFiberFromFragment( - JSCompiler_object_inline_message_2825, - JSCompiler_object_inline_digest_2826, + : ((JSCompiler_object_inline_message_2842 = createFiberFromFragment( + JSCompiler_object_inline_message_2842, + JSCompiler_object_inline_digest_2843, renderLanes, null )), - (JSCompiler_object_inline_message_2825.flags |= 2)), - (JSCompiler_object_inline_message_2825.return = workInProgress), - (JSCompiler_object_inline_stack_2827.return = workInProgress), - (JSCompiler_object_inline_stack_2827.sibling = - JSCompiler_object_inline_message_2825), - (workInProgress.child = JSCompiler_object_inline_stack_2827), - (JSCompiler_object_inline_stack_2827 = - JSCompiler_object_inline_message_2825), - (JSCompiler_object_inline_message_2825 = workInProgress.child), - (JSCompiler_object_inline_digest_2826 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2826 - ? (JSCompiler_object_inline_digest_2826 = + (JSCompiler_object_inline_message_2842.flags |= 2)), + (JSCompiler_object_inline_message_2842.return = workInProgress), + (JSCompiler_object_inline_stack_2844.return = workInProgress), + (JSCompiler_object_inline_stack_2844.sibling = + JSCompiler_object_inline_message_2842), + (workInProgress.child = JSCompiler_object_inline_stack_2844), + (JSCompiler_object_inline_stack_2844 = + JSCompiler_object_inline_message_2842), + (JSCompiler_object_inline_message_2842 = workInProgress.child), + (JSCompiler_object_inline_digest_2843 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2843 + ? (JSCompiler_object_inline_digest_2843 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2826.cachePool), + JSCompiler_object_inline_digest_2843.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -10552,38 +10569,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2826 = { + (JSCompiler_object_inline_digest_2843 = { baseLanes: - JSCompiler_object_inline_digest_2826.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2843.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2825.memoizedState = - JSCompiler_object_inline_digest_2826), - (JSCompiler_object_inline_message_2825.childLanes = + (JSCompiler_object_inline_message_2842.memoizedState = + JSCompiler_object_inline_digest_2843), + (JSCompiler_object_inline_message_2842.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2828, + JSCompiler_object_inline_componentStack_2845, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2827 + JSCompiler_object_inline_stack_2844 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2827.children + children: JSCompiler_object_inline_stack_2844.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2828 = + ((JSCompiler_object_inline_componentStack_2845 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2828 + null === JSCompiler_object_inline_componentStack_2845 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2828.push(current)); + : JSCompiler_object_inline_componentStack_2845.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -13038,7 +13055,8 @@ if (5 === tag || 6 === tag) { var stateNode = node.stateNode; before - ? ((parent = + ? (warnForReactChildrenConflict(parent), + (parent = 9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName @@ -13047,20 +13065,20 @@ supportsMoveBefore && null !== stateNode.parentNode ? parent.moveBefore(stateNode, before) : parent.insertBefore(stateNode, before)) - : ((before = parent), - (parent = - 9 === before.nodeType - ? before.body - : "HTML" === before.nodeName - ? before.ownerDocument.body - : before), + : (warnForReactChildrenConflict(parent), + (before = + 9 === parent.nodeType + ? parent.body + : "HTML" === parent.nodeName + ? parent.ownerDocument.body + : parent), supportsMoveBefore && null !== stateNode.parentNode - ? parent.moveBefore(stateNode, null) - : parent.appendChild(stateNode), - (stateNode = before._reactRootContainer), + ? before.moveBefore(stateNode, null) + : before.appendChild(stateNode), + (stateNode = parent._reactRootContainer), (null !== stateNode && void 0 !== stateNode) || - null !== parent.onclick || - (parent.onclick = noop$1)); + null !== before.onclick || + (before.onclick = noop$1)); 5 === tag && null === node.alternate && null !== parentFragmentInstances && @@ -14762,13 +14780,16 @@ root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: - current = currentHoistableRoot; + current = pushMutationContext(); + flags = currentHoistableRoot; currentHoistableRoot = getHoistableRoot( finishedWork.stateNode.containerInfo ); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); - currentHoistableRoot = current; + currentHoistableRoot = flags; + viewTransitionMutationContext && (rootViewTransitionAffected = !0); + viewTransitionMutationContext = current; break; case 12: current = pushNestedEffectDurations(); @@ -14968,7 +14989,10 @@ viewTransitionContextChanged$1 = !1; pushViewTransitionCancelableScope(); recursivelyTraverseAfterMutationEffects(root, finishedWork); - if (!viewTransitionContextChanged$1) { + if ( + !viewTransitionContextChanged$1 && + !rootViewTransitionAffected + ) { finishedWork = viewTransitionCancelableChildren; if (null !== finishedWork) for (var i = 0; i < finishedWork.length; i += 3) @@ -14984,6 +15008,13 @@ case 5: recursivelyTraverseAfterMutationEffects(root, finishedWork); break; + case 4: + i = viewTransitionContextChanged$1; + viewTransitionContextChanged$1 = !1; + recursivelyTraverseAfterMutationEffects(root, finishedWork); + viewTransitionContextChanged$1 && (rootViewTransitionAffected = !0); + viewTransitionContextChanged$1 = i; + break; case 22: null === finishedWork.memoizedState && (null !== current.memoizedState @@ -16179,7 +16210,7 @@ ); finishedWork.flags & 4 && console.error( - "useSwipeTransition() caused something to render a new <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't mount any new <%s> elements.", + "startGestureTransition() caused something to render a new <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't mount any new <%s> elements.", finishedWork.type, finishedWork.type ); @@ -16416,7 +16447,7 @@ ), viewTransitionMutationContext && console.error( - "useSwipeTransition() caused something to mutate <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't update any state which causes <%s> to change.", + "startGestureTransition() caused something to mutate <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't update any state which causes <%s> to change.", deletions.type, deletions.type ), @@ -16674,12 +16705,17 @@ ) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; var transition = ReactSharedInternals.T; - return null !== transition - ? (transition._updatedFibers || (transition._updatedFibers = new Set()), - transition._updatedFibers.add(fiber), - (fiber = currentEntangledLane), - 0 !== fiber ? fiber : requestTransitionLane()) - : resolveUpdatePriority(); + if (null !== transition) { + if (transition.gesture) + throw Error( + "Cannot setState on regular state inside a startGestureTransition. Gestures can only update the useOptimistic() hook. There should be no side-effects associated with starting a Gesture until its Action is invoked. Move side-effects to the Action instead." + ); + transition._updatedFibers || (transition._updatedFibers = new Set()); + transition._updatedFibers.add(fiber); + fiber = currentEntangledLane; + return 0 !== fiber ? fiber : requestTransitionLane(); + } + return resolveUpdatePriority(); } function requestDeferredLane() { 0 === workInProgressDeferredLane && @@ -17979,8 +18015,7 @@ else { pendingViewTransitionEvents = null; (lanes & 335544064) === lanes - ? ((pendingTransitionTypes = ReactSharedInternals.V), - (ReactSharedInternals.V = null), + ? ((pendingTransitionTypes = claimQueuedTransitionTypes(root)), (recoverableErrors = 10262)) : ((pendingTransitionTypes = null), (recoverableErrors = 10256)); 0 !== finishedWork.actualDuration || @@ -18076,6 +18111,7 @@ try { inProgressLanes = lanes; inProgressRoot = root; + rootViewTransitionAffected = !1; resetComponentEffectTimers(); commitMutationEffectsOnFiber(finishedWork, root, lanes); inProgressRoot = inProgressLanes = null; @@ -18375,7 +18411,7 @@ didWarnForRootClone || ((didWarnForRootClone = !0), console.warn( - "useSwipeTransition() caused something to mutate or relayout the root. This currently requires a clone of the whole document. Make sure to add a directly around an absolutely positioned DOM node to minimize the impact of any changes caused by the Swipe Transition." + "startGestureTransition() caused something to mutate or relayout the root. This currently requires a clone of the whole document. Make sure to add a directly around an absolutely positioned DOM node to minimize the impact of any changes caused by the Gesture Transition." )); var rootContainer = root.containerInfo, documentElement = @@ -18394,7 +18430,7 @@ var containerParent = containerInstance.parentNode; if (null === containerParent) throw Error( - "Cannot use a useSwipeTransition() in a detached root." + "Cannot use a startGestureTransition() on a detached root." ); var clone = containerInstance.cloneNode(!1), computedStyle = getComputedStyle(containerInstance); @@ -18502,16 +18538,14 @@ (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } - pendingTransitionTypes = null; + pendingTransitionTypes = finishedGesture.types; pendingEffectsStatus = PENDING_GESTURE_MUTATION_PHASE; pendingViewTransition = finishedGesture.running = startGestureTransition( root.containerInfo, finishedGesture.provider, - finishedGesture.rangeCurrent, - finishedGesture.direction - ? finishedGesture.rangeNext - : finishedGesture.rangePrevious, + finishedGesture.rangeStart, + finishedGesture.rangeEnd, pendingTransitionTypes, flushGestureMutations, flushGestureAnimations, @@ -18547,7 +18581,7 @@ var containerParent = containerInstance.parentNode; if (null === containerParent) throw Error( - "Cannot use a useSwipeTransition() in a detached root." + "Cannot use a startGestureTransition() on a detached root." ); containerParent.removeChild(rootClone); containerInstance.style.viewTransitionName = "root"; @@ -22455,6 +22489,30 @@ ? parentInstance.moveBefore(child, null) : parentInstance.appendChild(child); } + function warnForReactChildrenConflict(container) { + if (!container.__reactWarnedAboutChildrenConflict) { + var props = container[internalPropsKey] || null; + if (null !== props) { + var fiber = getInstanceFromNode(container); + null !== fiber && + ("string" === typeof props.children || + "number" === typeof props.children + ? ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + })) + : null != props.dangerouslySetInnerHTML && + ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + }))); + } + } + } function isSingletonScope(type) { return "head" === type; } @@ -22771,7 +22829,7 @@ (error = customizeViewTransitionError(error, !1)), null !== error && errorCallback(error); } finally { - spawnedWorkCallback(); + mutationCallback(), layoutCallback(), spawnedWorkCallback(); } }); transition.finished.finally(function () { @@ -22881,65 +22939,89 @@ animations = documentElement.getAnimations({ subtree: !0 }), foundGroups = new Set(), foundNews = new Set(), + longestDuration = 0, i = 0; i < animations.length; i++ ) { - var pseudoElement = animations[i].effect.pseudoElement; + var effect = animations[i].effect, + pseudoElement = effect.pseudoElement; null != pseudoElement && - (pseudoElement.startsWith("::view-transition-group") + pseudoElement.startsWith("::view-transition") && + ((effect = effect.getTiming()), + (effect = + effect.delay + + ("number" === typeof effect.duration ? effect.duration : 0)), + effect > longestDuration && (longestDuration = effect), + pseudoElement.startsWith("::view-transition-group") ? foundGroups.add(pseudoElement.slice(23)) : pseudoElement.startsWith("::view-transition-new") && foundNews.add(pseudoElement.slice(21))); } + longestDuration = (rangeEnd - rangeStart) / longestDuration; for (i = 0; i < animations.length; i++) { var anim = animations[i]; - if ("running" === anim.playState) { - pseudoElement = anim.effect; - var _pseudoElement = pseudoElement.pseudoElement; - if ( - null != _pseudoElement && - _pseudoElement.startsWith("::view-transition") && - pseudoElement.target === documentElement - ) { - anim.cancel(); - var isGeneratedGroupAnim = !1, - isExitGroupAnim = !1; - if (_pseudoElement.startsWith("::view-transition-group")) { - var groupName = _pseudoElement.slice(23); - foundNews.has(groupName) - ? ((anim = anim.animationName), - (isGeneratedGroupAnim = - null != anim && - anim.startsWith("-ua-view-transition-group-anim-"))) - : (isExitGroupAnim = !0); - } - animateGesture( - pseudoElement.getKeyframes(), - pseudoElement.target, - _pseudoElement, - timeline, - rangeStart, - rangeEnd, - isGeneratedGroupAnim, - isExitGroupAnim - ); - _pseudoElement.startsWith("::view-transition-old") && - ((_pseudoElement = _pseudoElement.slice(21)), - foundGroups.has(_pseudoElement) || - foundNews.has(_pseudoElement) || - (foundGroups.add(_pseudoElement), - animateGesture( - [{}, {}], - pseudoElement.target, - "::view-transition-group" + _pseudoElement, - timeline, - rangeStart, - rangeEnd, - !1, - !0 - ))); + if ( + "running" === anim.playState && + ((pseudoElement = anim.effect), + (effect = pseudoElement.pseudoElement), + null != effect && + effect.startsWith("::view-transition") && + pseudoElement.target === documentElement) + ) { + anim.cancel(); + var isGeneratedGroupAnim = !1, + isExitGroupAnim = !1; + if (effect.startsWith("::view-transition-group")) { + var groupName = effect.slice(23); + foundNews.has(groupName) + ? ((isGeneratedGroupAnim = anim.animationName), + (isGeneratedGroupAnim = + null != isGeneratedGroupAnim && + isGeneratedGroupAnim.startsWith( + "-ua-view-transition-group-anim-" + ))) + : (isExitGroupAnim = !0); } + var _timing = pseudoElement.getTiming(); + anim = + rangeEnd - + (("number" === typeof _timing.duration + ? _timing.duration + : 0) + + _timing.delay) * + longestDuration; + groupName = rangeEnd - _timing.delay * longestDuration; + if ( + "reverse" === _timing.direction || + "alternate-reverse" === _timing.direction + ) + (_timing = anim), (anim = groupName), (groupName = _timing); + animateGesture( + pseudoElement.getKeyframes(), + pseudoElement.target, + effect, + timeline, + anim, + groupName, + isGeneratedGroupAnim, + isExitGroupAnim + ); + effect.startsWith("::view-transition-old") && + ((effect = effect.slice(21)), + foundGroups.has(effect) || + foundNews.has(effect) || + (foundGroups.add(effect), + animateGesture( + [{}, {}], + pseudoElement.target, + "::view-transition-group" + effect, + timeline, + rangeStart, + rangeEnd, + !1, + !0 + ))); } } documentElement @@ -22961,7 +23043,7 @@ (error = customizeViewTransitionError(error, !0)), null !== error && errorCallback(error); } finally { - readyCallback(); + mutationCallback(), animateCallback(); } }); transition.finished.finally(function () { @@ -22987,50 +23069,6 @@ new: new ViewTransitionPseudoElement("new", name) }; } - function getCurrentGestureOffset(provider) { - provider = provider.currentTime; - if (null === provider) - throw Error( - "Cannot start a gesture with a disconnected AnimationTimeline." - ); - return "number" === typeof provider ? provider : provider.value; - } - function subscribeToGestureDirection( - provider, - currentOffset, - directionCallback - ) { - function rafCallback() { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && - directionCallback(newTime > currentOffset)); - callbackID = requestAnimationFrame(rafCallback); - } - if ( - "function" === typeof ScrollTimeline && - provider instanceof ScrollTimeline - ) { - var element = provider.source, - scrollCallback = function () { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = - "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && - directionCallback(newTime > currentOffset)); - }; - element.addEventListener("scroll", scrollCallback, !1); - return function () { - element.removeEventListener("scroll", scrollCallback, !1); - }; - } - var callbackID = requestAnimationFrame(rafCallback); - return function () { - cancelAnimationFrame(callbackID); - }; - } function FragmentInstance(fragmentFiber) { this._fragmentFiber = fragmentFiber; this._observers = this._eventListeners = null; @@ -24168,7 +24206,11 @@ this.pooledCache = null; this.pooledCacheLanes = 0; this.formState = formState; - this.gestureClone = this.stoppingGestures = this.pendingGestures = null; + this.gestureClone = + this.stoppingGestures = + this.pendingGestures = + this.transitionTypes = + null; this.incompleteTransitions = new Map(); this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); @@ -24929,6 +24971,23 @@ contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), + disabledDepth = 0, + prevLog, + prevInfo, + prevWarn, + prevError, + prevGroup, + prevGroupCollapsed, + prevGroupEnd; + disabledLog.__reactDisabledLog = !0; + var prefix, + suffix, + reentry = !1; + var componentFrameCache = new ( + "function" === typeof WeakMap ? WeakMap : Map + )(); + var current = null, + isRendering = !1, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -24984,23 +25043,6 @@ illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, viewTransitionMutationContext = !1, - disabledDepth = 0, - prevLog, - prevInfo, - prevWarn, - prevError, - prevGroup, - prevGroupCollapsed, - prevGroupEnd; - disabledLog.__reactDisabledLog = !0; - var prefix, - suffix, - reentry = !1; - var componentFrameCache = new ( - "function" === typeof WeakMap ? WeakMap : Map - )(); - var current = null, - isRendering = !1, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = !1, didWarnCheckedDefaultChecked = !1, @@ -26322,6 +26364,7 @@ _currentRenderer: null, _currentRenderer2: null }, + entangledTransitionTypes = null, now = Scheduler.unstable_now, renderStartTime = -0, commitStartTime = -0, @@ -26376,9 +26419,51 @@ } entangleAsyncAction(transition, returnValue); } + if (null !== entangledTransitionTypes) + for (newEventTime = firstScheduledRoot; null !== newEventTime; ) + queueTransitionTypes(newEventTime, entangledTransitionTypes), + (newEventTime = newEventTime.next); + newEventTime = transition.types; + if (null !== newEventTime) { + for (newEventType = firstScheduledRoot; null !== newEventType; ) + queueTransitionTypes(newEventType, newEventTime), + (newEventType = newEventType.next); + if (0 !== currentEntangledLane) { + newEventType = entangledTransitionTypes; + null === newEventType && + (newEventType = entangledTransitionTypes = []); + for (var i = 0; i < newEventTime.length; i++) { + var transitionType = newEventTime[i]; + -1 === newEventType.indexOf(transitionType) && + newEventType.push(transitionType); + } + } + } null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue); }; + var prevOnStartGestureTransitionFinish = ReactSharedInternals.G; + ReactSharedInternals.G = function (transition, provider, options) { + var cancel = null; + null !== prevOnStartGestureTransitionFinish && + (cancel = prevOnStartGestureTransitionFinish( + transition, + provider, + options + )); + for (var root = firstScheduledRoot; null !== root; ) { + var scheduledGesture = startScheduledGesture( + root, + provider, + options, + transition.types + ); + null !== scheduledGesture && + (cancel = chainGestureCancellation(root, scheduledGesture, cancel)); + root = root.next; + } + return null !== cancel ? cancel : function () {}; + }; var resumedCache = createCursor(null), ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, @@ -26834,7 +26919,6 @@ useCacheRefresh: throwInvalidHookError }; ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; - ContextOnlyDispatcher.useSwipeTransition = throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -26980,11 +27064,6 @@ currentHookNameInDev = "useEffectEvent"; mountHookTypesDev(); return mountEvent(callback); - }, - useSwipeTransition: function (previous, current) { - currentHookNameInDev = "useSwipeTransition"; - mountHookTypesDev(); - return mountSwipeTransition(previous, current); } }; HooksDispatcherOnMountWithHookTypesInDEV = { @@ -27119,11 +27198,6 @@ currentHookNameInDev = "useEffectEvent"; updateHookTypesDev(); return mountEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; HooksDispatcherOnUpdateInDEV = { @@ -27258,11 +27332,6 @@ currentHookNameInDev = "useEffectEvent"; updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; HooksDispatcherOnRerenderInDEV = { @@ -27397,11 +27466,6 @@ currentHookNameInDev = "useEffectEvent"; updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; InvalidNestedHooksDispatcherOnMountInDEV = { @@ -27561,12 +27625,6 @@ warnInvalidHookAccess(); mountHookTypesDev(); return mountEvent(callback); - }, - useSwipeTransition: function (previous, current) { - currentHookNameInDev = "useSwipeTransition"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountSwipeTransition(previous, current); } }; InvalidNestedHooksDispatcherOnUpdateInDEV = { @@ -27726,12 +27784,6 @@ warnInvalidHookAccess(); updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; InvalidNestedHooksDispatcherOnRerenderInDEV = { @@ -27891,12 +27943,6 @@ warnInvalidHookAccess(); updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; var fakeInternalInstance = {}; @@ -28022,6 +28068,7 @@ inProgressLanes = null, inProgressRoot = null, viewTransitionContextChanged$1 = !1, + rootViewTransitionAffected = !1, hostParent = null, hostParentIsContainer = !1, currentHoistableRoot = null, @@ -28864,11 +28911,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -28905,10 +28952,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-experimental-63779030-20250328", + version: "19.2.0-experimental-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-63779030-20250328" + reconcilerVersion: "19.2.0-experimental-040f8286-20250402" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -29050,7 +29097,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js index a7cbff9357ce7..24b455c473f46 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js @@ -322,6 +322,196 @@ function popHostContext(fiber) { (pop(hostTransitionProviderCursor), (HostTransitionContext._currentValue = sharedNotPendingObject)); } +var prefix, suffix; +function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; + } + return "\n" + prefix + name + suffix; +} +var reentry = !1; +function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + reentry = !0; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$1) { + control = x$1; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$2) { + control = x$2; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } + ); + var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + namePropDescriptor = RunInRootFrame = 0; + RunInRootFrame < sampleLines.length && + !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); + + ) + RunInRootFrame++; + for ( + ; + namePropDescriptor < controlLines.length && + !controlLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); + + ) + namePropDescriptor++; + if ( + RunInRootFrame === sampleLines.length || + namePropDescriptor === controlLines.length + ) + for ( + RunInRootFrame = sampleLines.length - 1, + namePropDescriptor = controlLines.length - 1; + 1 <= RunInRootFrame && + 0 <= namePropDescriptor && + sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; + + ) + namePropDescriptor--; + for ( + ; + 1 <= RunInRootFrame && 0 <= namePropDescriptor; + RunInRootFrame--, namePropDescriptor-- + ) + if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { + if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { + do + if ( + (RunInRootFrame--, + namePropDescriptor--, + 0 > namePropDescriptor || + sampleLines[RunInRootFrame] !== + controlLines[namePropDescriptor]) + ) { + var frame = + "\n" + + sampleLines[RunInRootFrame].replace(" at new ", " at "); + fn.displayName && + frame.includes("") && + (frame = frame.replace("", fn.displayName)); + return frame; + } + while (1 <= RunInRootFrame && 0 <= namePropDescriptor); + } + break; + } + } + } finally { + (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); + } + return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(previousPrepareStackTrace) + : ""; +} +function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + case 30: + return describeBuiltInComponentFrame("ViewTransition"); + default: + return ""; + } +} +function getStackByFiberInDevAndProd(workInProgress) { + try { + var info = ""; + do + (info += describeFiber(workInProgress)), + (workInProgress = workInProgress.return); + while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } +} var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -543,18 +733,18 @@ function markRootFinished( 0 < remainingLanes; ) { - var index$5 = 31 - clz32(remainingLanes), - lane = 1 << index$5; - entanglements[index$5] = 0; - expirationTimes[index$5] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$5]; + var index$7 = 31 - clz32(remainingLanes), + lane = 1 << index$7; + entanglements[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$5] = null, index$5 = 0; - index$5 < hiddenUpdatesForLane.length; - index$5++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$5]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } remainingLanes &= ~lane; @@ -579,10 +769,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$6 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$6; - (lane & entangledLanes) | (root[index$6] & entangledLanes) && - (root[index$6] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -765,239 +955,49 @@ function pushMutationContext() { function setValueForAttribute(node, name, value) { if (isAttributeNameSafe(name)) if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix$8 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$8 && "aria-" !== prefix$8) { - node.removeAttribute(name); - return; - } - } - node.setAttribute(name, "" + value); - } -} -function setValueForKnownAttribute(node, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - node.setAttribute(name, "" + value); - } -} -function setValueForNamespacedAttribute(node, namespace, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - node.setAttributeNS(namespace, name, "" + value); - } -} -var prefix, suffix; -function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; - } - return "\n" + prefix + name + suffix; -} -var reentry = !1; -function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - reentry = !0; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$9) { - control = x$9; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$10) { - control = x$10; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - namePropDescriptor = RunInRootFrame = 0; - RunInRootFrame < sampleLines.length && - !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); - - ) - RunInRootFrame++; - for ( - ; - namePropDescriptor < controlLines.length && - !controlLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); - - ) - namePropDescriptor++; - if ( - RunInRootFrame === sampleLines.length || - namePropDescriptor === controlLines.length - ) - for ( - RunInRootFrame = sampleLines.length - 1, - namePropDescriptor = controlLines.length - 1; - 1 <= RunInRootFrame && - 0 <= namePropDescriptor && - sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; - - ) - namePropDescriptor--; - for ( - ; - 1 <= RunInRootFrame && 0 <= namePropDescriptor; - RunInRootFrame--, namePropDescriptor-- - ) - if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { - if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { - do - if ( - (RunInRootFrame--, - namePropDescriptor--, - 0 > namePropDescriptor || - sampleLines[RunInRootFrame] !== - controlLines[namePropDescriptor]) - ) { - var frame = - "\n" + - sampleLines[RunInRootFrame].replace(" at new ", " at "); - fn.displayName && - frame.includes("") && - (frame = frame.replace("", fn.displayName)); - return frame; - } - while (1 <= RunInRootFrame && 0 <= namePropDescriptor); - } - break; - } - } - } finally { - (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); - } - return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(previousPrepareStackTrace) - : ""; -} -function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - case 30: - return describeBuiltInComponentFrame("ViewTransition"); - default: - return ""; + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix$10 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$10 && "aria-" !== prefix$10) { + node.removeAttribute(name); + return; + } + } + node.setAttribute(name, "" + value); + } +} +function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + node.setAttribute(name, "" + value); } } -function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do - (info += describeFiber(workInProgress)), - (workInProgress = workInProgress.return); - while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; +function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + node.setAttributeNS(namespace, name, "" + value); } } function getToStringValue(value) { @@ -2363,11 +2363,6 @@ function enqueueConcurrentRenderForLane(fiber, lane) { enqueueUpdate$1(fiber, null, null, lane); return getRootForUpdatedFiber(fiber); } -function enqueueGestureRender(fiber) { - fiber = markUpdateLaneFromFiberToRoot(fiber, null, 64); - null !== fiber && markRootUpdated$1(fiber, 64); - return fiber; -} function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { sourceFiber.lanes |= lane; var alternate = sourceFiber.alternate; @@ -3128,6 +3123,22 @@ function releaseCache(cache) { cache.controller.abort(); }); } +function queueTransitionTypes(root, transitionTypes) { + if (0 !== (root.pendingLanes & 4194048)) { + var queued = root.transitionTypes; + null === queued && (queued = root.transitionTypes = []); + for (root = 0; root < transitionTypes.length; root++) { + var transitionType = transitionTypes[root]; + -1 === queued.indexOf(transitionType) && queued.push(transitionType); + } + } +} +var entangledTransitionTypes = null; +function claimQueuedTransitionTypes(root) { + var claimed = root.transitionTypes; + root.transitionTypes = null; + return claimed; +} var currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, @@ -3152,7 +3163,7 @@ function entangleAsyncAction(transition, thenable) { function pingEngtangledActionScope() { if ( 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners + ((entangledTransitionTypes = null), null !== currentEntangledListeners) ) { null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled"); @@ -3188,15 +3199,145 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } +function startScheduledGesture( + root, + gestureTimeline, + gestureOptions, + transitionTypes +) { + if (gestureOptions && null != gestureOptions.rangeStart) + var JSCompiler_temp = gestureOptions.rangeStart; + else { + JSCompiler_temp = gestureTimeline.currentTime; + if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(549)); + JSCompiler_temp = + "number" === typeof JSCompiler_temp + ? JSCompiler_temp + : JSCompiler_temp.value; + } + gestureOptions = + gestureOptions && null != gestureOptions.rangeEnd + ? gestureOptions.rangeEnd + : 50 > JSCompiler_temp + ? 100 + : 0; + for (root = root.pendingGestures; null !== root; ) { + if (root.provider === gestureTimeline) { + root.count++; + root.rangeStart = JSCompiler_temp; + root.rangeEnd = gestureOptions; + if (null !== transitionTypes) + for ( + gestureTimeline = root.types, + null === gestureTimeline && (gestureTimeline = root.types = []), + JSCompiler_temp = 0; + JSCompiler_temp < transitionTypes.length; + JSCompiler_temp++ + ) + (gestureOptions = transitionTypes[JSCompiler_temp]), + -1 === gestureTimeline.indexOf(gestureOptions) && + gestureTimeline.push(gestureOptions); + return root; + } + root = root.next; + if (null === root) break; + } + return null; +} +function deleteScheduledGesture(root, gesture) { + null === gesture.prev + ? (root.pendingGestures === gesture && + ((root.pendingGestures = gesture.next), + null === root.pendingGestures && (root.pendingLanes &= -65)), + root.stoppingGestures === gesture && + (root.stoppingGestures = gesture.next)) + : ((gesture.prev.next = gesture.next), + null !== gesture.next && (gesture.next.prev = gesture.prev), + (gesture.prev = null), + (gesture.next = null)); +} +function stopCompletedGestures(root) { + var gesture = root.stoppingGestures; + for (root.stoppingGestures = null; null !== gesture; ) + null !== gesture.running && + (gesture.running.skipTransition(), (gesture.running = null)), + (root = gesture.next), + (gesture.next = null), + (gesture.prev = null), + (gesture = root); +} var prevOnStartTransitionFinish = ReactSharedInternals.S; ReactSharedInternals.S = function (transition, returnValue) { "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && entangleAsyncAction(transition, returnValue); + if (null !== entangledTransitionTypes) + for (var root$26 = firstScheduledRoot; null !== root$26; ) + queueTransitionTypes(root$26, entangledTransitionTypes), + (root$26 = root$26.next); + root$26 = transition.types; + if (null !== root$26) { + for (var root$27 = firstScheduledRoot; null !== root$27; ) + queueTransitionTypes(root$27, root$26), (root$27 = root$27.next); + if (0 !== currentEntangledLane) { + root$27 = entangledTransitionTypes; + null === root$27 && (root$27 = entangledTransitionTypes = []); + for (var i = 0; i < root$26.length; i++) { + var transitionType = root$26[i]; + -1 === root$27.indexOf(transitionType) && root$27.push(transitionType); + } + } + } null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue); }; +function chainGestureCancellation(root, scheduledGesture, prevCancel) { + return function () { + if ( + null !== scheduledGesture && + (scheduledGesture.count--, 0 === scheduledGesture.count) + ) { + deleteScheduledGesture(root, scheduledGesture); + var runningTransition = scheduledGesture.running; + if (null !== runningTransition) { + var pendingLanesExcludingGestureLane = root.pendingLanes & -65; + 0 !== (pendingLanesExcludingGestureLane & 124) || + 0 !== (pendingLanesExcludingGestureLane & 4194048) + ? ((runningTransition = root.stoppingGestures), + null !== runningTransition && + ((scheduledGesture.next = runningTransition), + (runningTransition.prev = scheduledGesture)), + (root.stoppingGestures = scheduledGesture)) + : ((scheduledGesture.running = null), + runningTransition.skipTransition()); + } + } + null !== prevCancel && prevCancel(); + }; +} +var prevOnStartGestureTransitionFinish = ReactSharedInternals.G; +ReactSharedInternals.G = function (transition, provider, options) { + var cancel = null; + null !== prevOnStartGestureTransitionFinish && + (cancel = prevOnStartGestureTransitionFinish( + transition, + provider, + options + )); + for (var root = firstScheduledRoot; null !== root; ) { + var scheduledGesture = startScheduledGesture( + root, + provider, + options, + transition.types + ); + null !== scheduledGesture && + (cancel = chainGestureCancellation(root, scheduledGesture, cancel)); + root = root.next; + } + return null !== cancel ? cancel : function () {}; +}; var resumedCache = createCursor(null); function peekCacheFromPool() { var cacheResumedFromPreviousRender = resumedCache.current; @@ -4371,76 +4512,6 @@ function findFirstSuspended(row) { } return null; } -function scheduleGesture( - root, - provider, - initialDirection, - rangePrevious, - rangeCurrent, - rangeNext -) { - for (var prev = root.pendingGestures; null !== prev; ) { - if (prev.provider === provider) return prev.count++, prev; - var next = prev.next; - if (null === next) break; - prev = next; - } - var isFlippedDirection = rangePrevious > rangeNext; - next = subscribeToGestureDirection( - provider, - rangeCurrent, - function (direction) { - isFlippedDirection && (direction = !direction); - gesture.direction !== direction && - ((gesture.direction = direction), - null === gesture.prev && - root.pendingGestures !== gesture && - ((direction = root.pendingGestures), - (gesture.next = direction), - null !== direction && (direction.prev = gesture), - (root.pendingGestures = gesture), - (root.pendingLanes |= 64), - ensureRootIsScheduled(root))); - } - ); - var gesture = { - provider: provider, - count: 1, - direction: initialDirection, - rangePrevious: rangePrevious, - rangeCurrent: rangeCurrent, - rangeNext: rangeNext, - cancel: next, - running: null, - prev: prev, - next: null - }; - null === prev ? (root.pendingGestures = gesture) : (prev.next = gesture); - ensureRootIsScheduled(root); - return gesture; -} -function deleteScheduledGesture(root, gesture) { - null === gesture.prev - ? (root.pendingGestures === gesture && - ((root.pendingGestures = gesture.next), - null === root.pendingGestures && (root.pendingLanes &= -65)), - root.stoppingGestures === gesture && - (root.stoppingGestures = gesture.next)) - : ((gesture.prev.next = gesture.next), - null !== gesture.next && (gesture.next.prev = gesture.prev), - (gesture.prev = null), - (gesture.next = null)); -} -function stopCompletedGestures(root) { - var gesture = root.stoppingGestures; - for (root.stoppingGestures = null; null !== gesture; ) - null !== gesture.running && - (gesture.running.skipTransition(), (gesture.running = null)), - (root = gesture.next), - (gesture.next = null), - (gesture.prev = null), - (gesture = root); -} var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, @@ -4707,37 +4778,70 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$61 = !1; + didReadFromEntangledAsyncAction$63 = !1; do { - var updateLane = update.lane & -536870913; - if ( - updateLane !== update.lane - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - var revertLane = update.revertLane; - if (0 === revertLane) + var updateLane = update.lane & -536870913, + shouldSkipUpdate = + updateLane !== update.lane + ? (workInProgressRootRenderLanes & updateLane) !== updateLane + : (renderLanes & updateLane) !== updateLane; + if (64 === updateLane) { + var scheduledGesture = update.gesture; + if (null !== scheduledGesture) + if (0 === scheduledGesture.count) { + update = update.next; + continue; + } else if (64 !== renderLanes) shouldSkipUpdate = !0; + else { + shouldSkipUpdate = workInProgressRoot; + if (null === shouldSkipUpdate) + throw Error(formatProdErrorMessage(349)); + shouldSkipUpdate = + shouldSkipUpdate.pendingGestures !== scheduledGesture; + } + } + if (shouldSkipUpdate) + (scheduledGesture = { + lane: updateLane, + revertLane: update.revertLane, + gesture: update.gesture, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), + null === newBaseQueueLast + ? ((newBaseQueueFirst = newBaseQueueLast = scheduledGesture), + (baseFirst = pendingQueue)) + : (newBaseQueueLast = newBaseQueueLast.next = scheduledGesture), + (currentlyRenderingFiber.lanes |= updateLane), + (workInProgressRootSkippedLanes |= updateLane); + else { + scheduledGesture = update.revertLane; + if (0 === scheduledGesture) null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$61 = !0); - else if ((renderLanes & revertLane) === revertLane) { + (didReadFromEntangledAsyncAction$63 = !0); + else if ((renderLanes & scheduledGesture) === scheduledGesture) { update = update.next; - revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$61 = !0); + scheduledGesture === currentEntangledLane && + (didReadFromEntangledAsyncAction$63 = !0); continue; } else (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -4747,29 +4851,15 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber.lanes |= revertLane), - (workInProgressRootSkippedLanes |= revertLane); + (currentlyRenderingFiber.lanes |= scheduledGesture), + (workInProgressRootSkippedLanes |= scheduledGesture); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane); - } else - (revertLane = { - lane: updateLane, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), - null === newBaseQueueLast - ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), - (baseFirst = pendingQueue)) - : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber.lanes |= updateLane), - (workInProgressRootSkippedLanes |= updateLane); + } update = update.next; } while (null !== update && update !== current); null === newBaseQueueLast @@ -4778,7 +4868,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$61 && + didReadFromEntangledAsyncAction$63 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4964,6 +5054,9 @@ function runActionStateAction(actionQueue, node) { if (node.isTransition) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; ReactSharedInternals.T = currentTransition; try { var returnValue = action(prevState, payload), @@ -4974,14 +5067,17 @@ function runActionStateAction(actionQueue, node) { } catch (error) { onActionError(actionQueue, node, error); } finally { - ReactSharedInternals.T = prevTransition; + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), + (ReactSharedInternals.T = prevTransition); } } else try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$67) { - onActionError(actionQueue, node, error$67); + } catch (error$70) { + onActionError(actionQueue, node, error$70); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -5332,6 +5428,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); try { @@ -5370,6 +5469,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), (ReactSharedInternals.T = prevTransition); } } @@ -5426,8 +5528,11 @@ function ensureFormComponentIsStateful(formFiber) { return existingStateHook; } function requestFormReset$1(formFiber) { - var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; - dispatchSetStateInternal(formFiber, resetStateQueue, {}, requestUpdateLane()); + var transition = ReactSharedInternals.T; + if (null !== transition && transition.gesture) + throw Error(formatProdErrorMessage(555)); + transition = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetStateInternal(formFiber, transition, {}, requestUpdateLane()); } function useHostTransitionStatus() { return readContext(HostTransitionContext); @@ -5445,14 +5550,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$70 = enqueueUpdate(provider, fiber, lane); - null !== root$70 && - (scheduleUpdateOnFiber(root$70, provider, lane), - entangleTransitions(root$70, provider, lane)); + var root$73 = enqueueUpdate(provider, fiber, lane); + null !== root$73 && + (scheduleUpdateOnFiber(root$73, provider, lane), + entangleTransitions(root$73, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$70 && + null !== root$73 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -5465,6 +5570,7 @@ function dispatchReducerAction(fiber, queue, action) { action = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5485,6 +5591,7 @@ function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5523,9 +5630,12 @@ function dispatchSetStateInternal(fiber, queue, action, lane) { return !1; } function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { + var transition = ReactSharedInternals.T, + lane = null !== transition && transition.gesture ? 64 : 2; action = { - lane: 2, + lane: lane, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5533,15 +5643,46 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { }; if (isRenderPhaseUpdate(fiber)) { if (throwIfDuringRender) throw Error(formatProdErrorMessage(479)); - } else - (throwIfDuringRender = enqueueConcurrentHookUpdate( + } else if ( + ((throwIfDuringRender = enqueueConcurrentHookUpdate( fiber, queue, action, - 2 + lane )), - null !== throwIfDuringRender && - scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2); + null !== throwIfDuringRender && + (scheduleUpdateOnFiber(throwIfDuringRender, fiber, lane), + null !== transition && + ((transition = transition.gesture), null !== transition))) + ) { + a: { + for (fiber = throwIfDuringRender.pendingGestures; null !== fiber; ) { + if (fiber.provider === transition) { + throwIfDuringRender = fiber; + break a; + } + lane = fiber.next; + if (null === lane) break; + fiber = lane; + } + transition = { + provider: transition, + count: 0, + rangeStart: 0, + rangeEnd: 100, + types: null, + running: null, + prev: fiber, + next: null + }; + null === fiber + ? (throwIfDuringRender.pendingGestures = transition) + : (fiber.next = transition); + ensureRootIsScheduled(throwIfDuringRender); + throwIfDuringRender = transition; + } + action.gesture = throwIfDuringRender; + } } function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; @@ -5568,93 +5709,6 @@ function entangleTransitionUpdate(root, queue, lane) { markRootEntangled(root, lane); } } -function startGesture(fiber, queue, gestureProvider, gestureOptions) { - var root = enqueueGestureRender(fiber); - if (null === root) return function () {}; - fiber = getCurrentGestureOffset(gestureProvider); - var range = gestureOptions && gestureOptions.range, - rangePrevious = range ? range[0] : 0, - rangeCurrent = range ? range[1] : fiber; - range = range ? range[2] : 100; - var isFlippedDirection = rangePrevious > range, - update = { - gesture: scheduleGesture( - root, - gestureProvider, - fiber < rangeCurrent - ? isFlippedDirection - : fiber > rangeCurrent - ? !isFlippedDirection - : gestureOptions && "next" === gestureOptions.direction - ? !0 - : gestureOptions && "previous" === gestureOptions.direction - ? !1 - : queue.initialDirection, - rangePrevious, - rangeCurrent, - range - ), - prev: null, - next: queue.pending - }; - null !== queue.pending && (queue.pending.prev = update); - queue.pending = update; - return function () { - if (null === update.prev) - if (queue.pending === update) queue.pending = update.next; - else return; - else - (update.prev.next = update.next), - null !== update.next && (update.next.prev = update.prev), - (update.prev = null), - (update.next = null); - var cancelledGestured = update.gesture; - cancelledGestured.count--; - if (0 === cancelledGestured.count) { - var cancelDirectionSubscription = cancelledGestured.cancel; - cancelDirectionSubscription(); - deleteScheduledGesture(root, cancelledGestured); - cancelDirectionSubscription = cancelledGestured.running; - if (null !== cancelDirectionSubscription) { - var pendingLanesExcludingGestureLane = root.pendingLanes & -65; - 0 !== (pendingLanesExcludingGestureLane & 124) || - 0 !== (pendingLanesExcludingGestureLane & 4194048) - ? ((cancelDirectionSubscription = root.stoppingGestures), - null !== cancelDirectionSubscription && - ((cancelledGestured.next = cancelDirectionSubscription), - (cancelDirectionSubscription.prev = cancelledGestured)), - (root.stoppingGestures = cancelledGestured)) - : ((cancelledGestured.running = null), - cancelDirectionSubscription.skipTransition()); - } - } - }; -} -function updateSwipeTransition(previous, current, next) { - var queue = updateWorkInProgressHook().queue, - startGestureOnHook = queue.dispatch, - rootRenderLanes = workInProgressRootRenderLanes, - value = current; - if (null !== queue.pending) { - if (64 === rootRenderLanes) { - rootRenderLanes = workInProgressRoot; - if (null === rootRenderLanes) throw Error(formatProdErrorMessage(349)); - rootRenderLanes = rootRenderLanes.pendingGestures; - if (null !== rootRenderLanes) - for (var update = queue.pending; null !== update; ) { - if (rootRenderLanes === update.gesture) { - value = rootRenderLanes.direction ? next : previous; - break; - } - update = update.next; - } - didReceiveUpdate = !0; - } - currentlyRenderingFiber.lanes |= 64; - } - queue.initialDirection = previous === current; - return [value, startGestureOnHook]; -} var ContextOnlyDispatcher = { readContext: readContext, use: use, @@ -5681,7 +5735,6 @@ var ContextOnlyDispatcher = { useCacheRefresh: throwInvalidHookError }; ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; -ContextOnlyDispatcher.useSwipeTransition = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -5871,20 +5924,6 @@ var HooksDispatcherOnMount = { throw Error(formatProdErrorMessage(440)); return ref.impl.apply(void 0, arguments); }; - }, - useSwipeTransition: function (previous, current) { - previous = { - pending: null, - dispatch: null, - initialDirection: previous === current - }; - var startGestureOnHook = (previous.dispatch = startGesture.bind( - null, - currentlyRenderingFiber, - previous - )); - mountWorkInProgressHook().queue = previous; - return [current, startGestureOnHook]; } }, HooksDispatcherOnUpdate = { @@ -5935,7 +5974,6 @@ var HooksDispatcherOnMount = { useCacheRefresh: updateRefresh }; HooksDispatcherOnUpdate.useEffectEvent = updateEvent; -HooksDispatcherOnUpdate.useSwipeTransition = updateSwipeTransition; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -5989,7 +6027,6 @@ var HooksDispatcherOnRerender = { useCacheRefresh: updateRefresh }; HooksDispatcherOnRerender.useEffectEvent = updateEvent; -HooksDispatcherOnRerender.useSwipeTransition = updateSwipeTransition; function applyDerivedStateFromProps( workInProgress, ctor, @@ -6081,9 +6118,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$75 in Component) - void 0 === newProps[propName$75] && - (newProps[propName$75] = Component[propName$75]); + for (var propName$77 in Component) + void 0 === newProps[propName$77] && + (newProps[propName$77] = Component[propName$77]); } return newProps; } @@ -6129,9 +6166,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$76) { + } catch (e$78) { setTimeout(function () { - throw e$76; + throw e$78; }); } } @@ -6142,9 +6179,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$77) { + } catch (e$79) { setTimeout(function () { - throw e$77; + throw e$79; }); } } @@ -8146,14 +8183,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$117 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$117 = lastTailNode), + for (var lastTailNode$119 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$119 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$117 + null === lastTailNode$119 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$117.sibling = null); + : (lastTailNode$119.sibling = null); } } function bubbleProperties(completedWork) { @@ -8163,19 +8200,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$118 = completedWork.child; null !== child$118; ) - (newChildLanes |= child$118.lanes | child$118.childLanes), - (subtreeFlags |= child$118.subtreeFlags & 65011712), - (subtreeFlags |= child$118.flags & 65011712), - (child$118.return = completedWork), - (child$118 = child$118.sibling); + for (var child$120 = completedWork.child; null !== child$120; ) + (newChildLanes |= child$120.lanes | child$120.childLanes), + (subtreeFlags |= child$120.subtreeFlags & 65011712), + (subtreeFlags |= child$120.flags & 65011712), + (child$120.return = completedWork), + (child$120 = child$120.sibling); else - for (child$118 = completedWork.child; null !== child$118; ) - (newChildLanes |= child$118.lanes | child$118.childLanes), - (subtreeFlags |= child$118.subtreeFlags), - (subtreeFlags |= child$118.flags), - (child$118.return = completedWork), - (child$118 = child$118.sibling); + for (child$120 = completedWork.child; null !== child$120; ) + (newChildLanes |= child$120.lanes | child$120.childLanes), + (subtreeFlags |= child$120.subtreeFlags), + (subtreeFlags |= child$120.flags), + (child$120.return = completedWork), + (child$120 = child$120.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8457,11 +8494,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$131 = null; + var cache$133 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$131 = newProps.memoizedState.cachePool.pool); - cache$131 !== type && (newProps.flags |= 2048); + (cache$133 = newProps.memoizedState.cachePool.pool); + cache$133 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -8486,8 +8523,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$131 = type.rendering; - if (null === cache$131) + cache$133 = type.rendering; + if (null === cache$133) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8495,11 +8532,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$131 = findFirstSuspended(current); - if (null !== cache$131) { + cache$133 = findFirstSuspended(current); + if (null !== cache$133) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$131.updateQueue; + current = cache$133.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8524,7 +8561,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$131)), null !== current)) { + if (((current = findFirstSuspended(cache$133)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8534,7 +8571,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$131.alternate && + !cache$133.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8547,13 +8584,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$131.sibling = workInProgress.child), - (workInProgress.child = cache$131)) + ? ((cache$133.sibling = workInProgress.child), + (workInProgress.child = cache$133)) : ((current = type.last), null !== current - ? (current.sibling = cache$131) - : (workInProgress.child = cache$131), - (type.last = cache$131)); + ? (current.sibling = cache$133) + : (workInProgress.child = cache$133), + (type.last = cache$133)); } if (null !== type.tail) return ( @@ -8852,8 +8889,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$148) { - captureCommitPhaseError(current, nearestMountedAncestor, error$148); + } catch (error$150) { + captureCommitPhaseError(current, nearestMountedAncestor, error$150); } else ref.current = null; } @@ -9489,7 +9526,8 @@ var offscreenSubtreeIsHidden = !1, needsFormReset = !1, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null, - viewTransitionContextChanged$1 = !1; + viewTransitionContextChanged$1 = !1, + rootViewTransitionAffected = !1; function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; eventsEnabled = _enabled; @@ -9741,11 +9779,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$146) { + } catch (error$148) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$146 + error$148 ); } } @@ -10174,111 +10212,112 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return)); - if (flags & 4) { - var currentResource = null !== current ? current.memoizedState : null; - flags = finishedWork.memoizedState; - if (null === current) + if (flags & 4) + if ( + ((root = null !== current ? current.memoizedState : null), + (flags = finishedWork.memoizedState), + null === current) + ) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; + root = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - currentResource = - hoistableRoot.getElementsByTagName("title")[0]; + lanes = root.getElementsByTagName("title")[0]; if ( - !currentResource || - currentResource[internalHoistableMarker] || - currentResource[internalInstanceKey] || - "http://www.w3.org/2000/svg" === - currentResource.namespaceURI || - currentResource.hasAttribute("itemprop") + !lanes || + lanes[internalHoistableMarker] || + lanes[internalInstanceKey] || + "http://www.w3.org/2000/svg" === lanes.namespaceURI || + lanes.hasAttribute("itemprop") ) - (currentResource = hoistableRoot.createElement(flags)), - hoistableRoot.head.insertBefore( - currentResource, - hoistableRoot.querySelector("head > title") + (lanes = root.createElement(flags)), + root.head.insertBefore( + lanes, + root.querySelector("head > title") ); - setInitialProperties(currentResource, flags, current); - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + setInitialProperties(lanes, flags, current); + lanes[internalInstanceKey] = finishedWork; + markNodeAsHoistable(lanes); + flags = lanes; break a; case "link": - var maybeNodes = getHydratableHoistableCache( - "link", - "href", - hoistableRoot - ).get(flags + (current.href || "")); - if (maybeNodes) - for (root = 0; root < maybeNodes.length; root++) + if ( + (hoistableRoot = getHydratableHoistableCache( + "link", + "href", + root + ).get(flags + (current.href || ""))) + ) + for (var i = 0; i < hoistableRoot.length; i++) if ( - ((currentResource = maybeNodes[root]), - currentResource.getAttribute("href") === + ((lanes = hoistableRoot[i]), + lanes.getAttribute("href") === (null == current.href || "" === current.href ? null : current.href) && - currentResource.getAttribute("rel") === + lanes.getAttribute("rel") === (null == current.rel ? null : current.rel) && - currentResource.getAttribute("title") === + lanes.getAttribute("title") === (null == current.title ? null : current.title) && - currentResource.getAttribute("crossorigin") === + lanes.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) ) { - maybeNodes.splice(root, 1); + hoistableRoot.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); + root.head.appendChild(lanes); break; case "meta": if ( - (maybeNodes = getHydratableHoistableCache( + (hoistableRoot = getHydratableHoistableCache( "meta", "content", - hoistableRoot + root ).get(flags + (current.content || ""))) ) - for (root = 0; root < maybeNodes.length; root++) + for (i = 0; i < hoistableRoot.length; i++) if ( - ((currentResource = maybeNodes[root]), - currentResource.getAttribute("content") === + ((lanes = hoistableRoot[i]), + lanes.getAttribute("content") === (null == current.content ? null : "" + current.content) && - currentResource.getAttribute("name") === + lanes.getAttribute("name") === (null == current.name ? null : current.name) && - currentResource.getAttribute("property") === + lanes.getAttribute("property") === (null == current.property ? null : current.property) && - currentResource.getAttribute("http-equiv") === + lanes.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - currentResource.getAttribute("charset") === + lanes.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) ) { - maybeNodes.splice(root, 1); + hoistableRoot.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); + root.head.appendChild(lanes); break; default: throw Error(formatProdErrorMessage(468, flags)); } - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + lanes[internalInstanceKey] = finishedWork; + markNodeAsHoistable(lanes); + flags = lanes; } finishedWork.stateNode = flags; } else @@ -10294,12 +10333,12 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.memoizedProps ); else - currentResource !== flags - ? (null === currentResource + root !== flags + ? (null === root ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : currentResource.count--, + : root.count--, null === flags ? mountHoistable( hoistableRoot, @@ -10318,7 +10357,6 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.memoizedProps, current.memoizedProps ); - } break; case 27: recursivelyTraverseMutationEffects(root, finishedWork, lanes); @@ -10343,21 +10381,20 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { null === current || safelyDetachRef(current, current.return)); if (finishedWork.flags & 32) { - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { - setTextContent(hoistableRoot, ""), - (viewTransitionMutationContext = !0); + setTextContent(root, ""), (viewTransitionMutationContext = !0); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 4 && null != finishedWork.stateNode && - ((hoistableRoot = finishedWork.memoizedProps), + ((root = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - hoistableRoot, - null !== current ? current.memoizedProps : hoistableRoot + root, + null !== current ? current.memoizedProps : root )); flags & 1024 && (needsFormReset = !0); break; @@ -10393,13 +10430,16 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { ((needsFormReset = !1), recursivelyResetForms(finishedWork)); break; case 4: - flags = currentHoistableRoot; + flags = pushMutationContext(); + current = currentHoistableRoot; currentHoistableRoot = getHoistableRoot( finishedWork.stateNode.containerInfo ); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); - currentHoistableRoot = flags; + currentHoistableRoot = current; + viewTransitionMutationContext && (rootViewTransitionAffected = !0); + viewTransitionMutationContext = flags; break; case 12: recursivelyTraverseMutationEffects(root, finishedWork, lanes); @@ -10450,13 +10490,12 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { if (null === current) { lanes = current = root; try { - (currentResource = lanes.stateNode), - hoistableRoot - ? ((maybeNodes = currentResource.style), - "function" === typeof maybeNodes.setProperty - ? maybeNodes.setProperty("display", "none", "important") - : (maybeNodes.display = "none")) - : unhideInstance(lanes.stateNode, lanes.memoizedProps); + if (((i = lanes.stateNode), hoistableRoot)) { + var style = i.style; + "function" === typeof style.setProperty + ? style.setProperty("display", "none", "important") + : (style.display = "none"); + } else unhideInstance(lanes.stateNode, lanes.memoizedProps); } catch (error) { captureCommitPhaseError(lanes, lanes.return, error); } @@ -10571,25 +10610,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$149 = hostParentFiber.stateNode; + var parent$151 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$149, ""), (hostParentFiber.flags &= -33)); - var before$150 = getHostSibling(finishedWork); + (setTextContent(parent$151, ""), (hostParentFiber.flags &= -33)); + var before$152 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$150, - parent$149, + before$152, + parent$151, parentFragmentInstances ); break; case 3: case 4: - var parent$151 = hostParentFiber.stateNode.containerInfo, - before$152 = getHostSibling(finishedWork); + var parent$153 = hostParentFiber.stateNode.containerInfo, + before$154 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$152, - parent$151, + before$154, + parent$153, parentFragmentInstances ); break; @@ -10628,7 +10667,7 @@ function commitAfterMutationEffectsOnFiber(finishedWork, root) { viewTransitionContextChanged$1 = !1; pushViewTransitionCancelableScope(); recursivelyTraverseAfterMutationEffects(root, finishedWork); - if (!viewTransitionContextChanged$1) { + if (!viewTransitionContextChanged$1 && !rootViewTransitionAffected) { finishedWork = viewTransitionCancelableChildren; if (null !== finishedWork) for (var i = 0; i < finishedWork.length; i += 3) @@ -10644,6 +10683,13 @@ function commitAfterMutationEffectsOnFiber(finishedWork, root) { case 5: recursivelyTraverseAfterMutationEffects(root, finishedWork); break; + case 4: + i = viewTransitionContextChanged$1; + viewTransitionContextChanged$1 = !1; + recursivelyTraverseAfterMutationEffects(root, finishedWork); + viewTransitionContextChanged$1 && (rootViewTransitionAffected = !0); + viewTransitionContextChanged$1 = i; + break; case 22: null === finishedWork.memoizedState && (null !== current.memoizedState @@ -11695,7 +11741,7 @@ function recursivelyInsertClones( if (null === nextPhase) recursivelyInsertNewFiber(deletions, i, parentViewTransition, 5); else { - var nextPhase$172 = deletions.flags; + var nextPhase$176 = deletions.flags; switch (deletions.tag) { case 26: recursivelyInsertClones( @@ -11721,16 +11767,16 @@ function recursivelyInsertClones( (setTextContent(clone, ""), (viewTransitionMutationContext = !0))) : (clone = clone.cloneNode(!1)); - if (nextPhase$172 & 4) { - nextPhase$172 = clone; + if (nextPhase$176 & 4) { + nextPhase$176 = clone; var newProps = deletions.memoizedProps; updateProperties( - nextPhase$172, + nextPhase$176, deletions.type, nextPhase.memoizedProps, newProps ); - nextPhase$172[internalPropsKey] = newProps; + nextPhase$176[internalPropsKey] = newProps; } 1 === visitPhase || 2 === visitPhase ? (recursivelyInsertClones(deletions, clone, null, 3), @@ -11749,7 +11795,7 @@ function recursivelyInsertClones( if (null === parentViewTransition) throw Error(formatProdErrorMessage(162)); parentViewTransition = parentViewTransition.cloneNode(!1); - nextPhase$172 & 4 && + nextPhase$176 & 4 && ((parentViewTransition.nodeValue = nextPhase.memoizedProps), (viewTransitionMutationContext = !0)); appendChild(i, parentViewTransition); @@ -11762,7 +11808,7 @@ function recursivelyInsertClones( case 22: null === deletions.memoizedState ? ((nextPhase = - 0 === visitPhase && 0 !== (nextPhase$172 & 8192) + 0 === visitPhase && 0 !== (nextPhase$176 & 8192) ? 1 : visitPhase), recursivelyInsertClones( @@ -11780,8 +11826,8 @@ function recursivelyInsertClones( parentViewTransition = pushMutationContext(); clone = deletions.stateNode; clone.clones = null; - nextPhase$172 = 1 === visitPhase ? 2 : visitPhase; - recursivelyInsertClones(deletions, i, clone, nextPhase$172); + nextPhase$176 = 1 === visitPhase ? 2 : visitPhase; + recursivelyInsertClones(deletions, i, clone, nextPhase$176); viewTransitionMutationContext && (deletions.flags |= 4); 1 === visitPhase ? applyExitViewTransition(deletions) @@ -11962,9 +12008,11 @@ var DefaultAsyncDispatcher = { function requestUpdateLane() { if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; - if (null !== ReactSharedInternals.T) { - var actionScopeLane = currentEntangledLane; - return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane(); + var transition = ReactSharedInternals.T; + if (null !== transition) { + if (transition.gesture) throw Error(formatProdErrorMessage(554)); + transition = currentEntangledLane; + return 0 !== transition ? transition : requestTransitionLane(); } return resolveUpdatePriority(); } @@ -12317,9 +12365,9 @@ function markRootSuspended( didAttemptEntireTree && (root.warmLanes |= suspendedLanes); didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4; - didAttemptEntireTree[index$4] = -1; + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -12381,9 +12429,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$2 = 31 - clz32(allEntangledLanes), - lane = 1 << index$2; - lanes |= root[index$2]; + var index$4 = 31 - clz32(allEntangledLanes), + lane = 1 << index$4; + lanes |= root[index$4]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -12493,8 +12541,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$177) { - handleThrow(root, thrownValue$177); + } catch (thrownValue$181) { + handleThrow(root, thrownValue$181); } while (1); lanes && root.shellSuspendCounter++; @@ -12609,8 +12657,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$179) { - handleThrow(root, thrownValue$179); + } catch (thrownValue$183) { + handleThrow(root, thrownValue$183); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -12823,8 +12871,7 @@ function commitRoot( else { pendingViewTransitionEvents = null; (lanes & 335544064) === lanes - ? ((pendingTransitionTypes = ReactSharedInternals.V), - (ReactSharedInternals.V = null), + ? ((pendingTransitionTypes = claimQueuedTransitionTypes(root)), (recoverableErrors = 10262)) : ((pendingTransitionTypes = null), (recoverableErrors = 10256)); 0 !== (finishedWork.subtreeFlags & recoverableErrors) || @@ -12899,6 +12946,7 @@ function flushMutationEffects() { var prevExecutionContext = executionContext; executionContext |= 4; try { + rootViewTransitionAffected = !1; commitMutationEffectsOnFiber(finishedWork, root, lanes); lanes = selectionInformation; var curFocusedElem = getActiveElementDeep(root.containerInfo), @@ -13198,26 +13246,26 @@ function commitGestureOnRoot(root, finishedWork) { } var rotate = computedStyle.rotate; if ("none" !== rotate && "" !== rotate) { - var parts$254 = rotate.split(" "); + var parts$258 = rotate.split(" "); transform = - 1 === parts$254.length - ? "rotate(" + parts$254[0] + ") " + transform - : 2 === parts$254.length + 1 === parts$258.length + ? "rotate(" + parts$258[0] + ") " + transform + : 2 === parts$258.length ? "rotate" + - parts$254[0].toUpperCase() + + parts$258[0].toUpperCase() + "(" + - parts$254[1] + + parts$258[1] + ") " + transform - : "rotate3d(" + parts$254.join(", ") + ") " + transform; + : "rotate3d(" + parts$258.join(", ") + ") " + transform; } var translate = computedStyle.translate; if ("none" !== translate && "" !== translate) { - var parts$255 = translate.split(" "); + var parts$259 = translate.split(" "); transform = - (3 === parts$255.length ? "translate3d" : "translate") + + (3 === parts$259.length ? "translate3d" : "translate") + "(" + - parts$255.join(", ") + + parts$259.join(", ") + ") " + transform; } @@ -13238,15 +13286,13 @@ function commitGestureOnRoot(root, finishedWork) { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } - pendingTransitionTypes = null; + pendingTransitionTypes = finishedGesture.types; pendingEffectsStatus = 6; pendingViewTransition = finishedGesture.running = startGestureTransition( root.containerInfo, finishedGesture.provider, - finishedGesture.rangeCurrent, - finishedGesture.direction - ? finishedGesture.rangeNext - : finishedGesture.rangePrevious, + finishedGesture.rangeStart, + finishedGesture.rangeEnd, pendingTransitionTypes, flushGestureMutations, flushGestureAnimations, @@ -13528,14 +13574,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$185 = firstScheduledRoot; null !== root$185; ) { + for (var root$189 = firstScheduledRoot; null !== root$189; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$185.pendingLanes; + var pendingLanes = root$189.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$185.suspendedLanes, - pingedLanes = root$185.pingedLanes; + var suspendedLanes = root$189.suspendedLanes, + pingedLanes = root$189.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -13549,21 +13595,21 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$185, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$189, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$185, - root$185 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$185.cancelPendingCommit || - -1 !== root$185.timeoutHandle + root$189, + root$189 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$189.cancelPendingCommit || + -1 !== root$189.timeoutHandle )), (0 === (JSCompiler_inline_result & 3) && 64 !== JSCompiler_inline_result) || - checkIfRootIsPrerendering(root$185, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$189, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$185, JSCompiler_inline_result)); - root$185 = root$185.next; + performSyncWorkOnRoot(root$189, JSCompiler_inline_result)); + root$189 = root$189.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -13609,12 +13655,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3, - expirationTime = expirationTimes[index$3]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$3] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -13840,20 +13886,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1669 = 0; - i$jscomp$inline_1669 < simpleEventPluginEvents.length; - i$jscomp$inline_1669++ + var i$jscomp$inline_1691 = 0; + i$jscomp$inline_1691 < simpleEventPluginEvents.length; + i$jscomp$inline_1691++ ) { - var eventName$jscomp$inline_1670 = - simpleEventPluginEvents[i$jscomp$inline_1669], - domEventName$jscomp$inline_1671 = - eventName$jscomp$inline_1670.toLowerCase(), - capitalizedEvent$jscomp$inline_1672 = - eventName$jscomp$inline_1670[0].toUpperCase() + - eventName$jscomp$inline_1670.slice(1); + var eventName$jscomp$inline_1692 = + simpleEventPluginEvents[i$jscomp$inline_1691], + domEventName$jscomp$inline_1693 = + eventName$jscomp$inline_1692.toLowerCase(), + capitalizedEvent$jscomp$inline_1694 = + eventName$jscomp$inline_1692[0].toUpperCase() + + eventName$jscomp$inline_1692.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1671, - "on" + capitalizedEvent$jscomp$inline_1672 + domEventName$jscomp$inline_1693, + "on" + capitalizedEvent$jscomp$inline_1694 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15101,34 +15147,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$199 = props[hasSrc]; - if (null != propValue$199) + var propValue$203 = props[hasSrc]; + if (null != propValue$203) switch (hasSrc) { case "name": - hasSrcSet = propValue$199; + hasSrcSet = propValue$203; break; case "type": - propValue = propValue$199; + propValue = propValue$203; break; case "checked": - checked = propValue$199; + checked = propValue$203; break; case "defaultChecked": - defaultChecked = propValue$199; + defaultChecked = propValue$203; break; case "value": - propKey = propValue$199; + propKey = propValue$203; break; case "defaultValue": - defaultValue = propValue$199; + defaultValue = propValue$203; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$199) + if (null != propValue$203) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$199, props, null); + setProp(domElement, tag, hasSrc, propValue$203, props, null); } } initInput( @@ -15267,14 +15313,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$199 in props) - props.hasOwnProperty(propValue$199) && - ((hasSrc = props[propValue$199]), + for (propValue$203 in props) + props.hasOwnProperty(propValue$203) && + ((hasSrc = props[propValue$203]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$199, + propValue$203, hasSrc, props, void 0 @@ -15322,14 +15368,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$216 in nextProps) { - var propKey = nextProps[propKey$216]; - lastProp = lastProps[propKey$216]; + for (var propKey$220 in nextProps) { + var propKey = nextProps[propKey$220]; + lastProp = lastProps[propKey$220]; if ( - nextProps.hasOwnProperty(propKey$216) && + nextProps.hasOwnProperty(propKey$220) && (null != propKey || null != lastProp) ) - switch (propKey$216) { + switch (propKey$220) { case "type": propKey !== lastProp && (viewTransitionMutationContext = !0); type = propKey; @@ -15364,7 +15410,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$216, + propKey$220, propKey, nextProps, lastProp @@ -15383,7 +15429,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$216 = null; + propKey = value = defaultValue = propKey$220 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15415,7 +15461,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && (viewTransitionMutationContext = !0); - propKey$216 = type; + propKey$220 = type; break; case "defaultValue": type !== lastDefaultValue && (viewTransitionMutationContext = !0); @@ -15438,15 +15484,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$216 - ? updateOptions(domElement, !!lastProps, propKey$216, !1) + null != propKey$220 + ? updateOptions(domElement, !!lastProps, propKey$220, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$216 = null; + propKey = propKey$220 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15471,7 +15517,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && (viewTransitionMutationContext = !0); - propKey$216 = name; + propKey$220 = name; break; case "defaultValue": name !== type && (viewTransitionMutationContext = !0); @@ -15486,17 +15532,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$216, propKey); + updateTextarea(domElement, propKey$220, propKey); return; case "option": - for (var propKey$232 in lastProps) + for (var propKey$236 in lastProps) if ( - ((propKey$216 = lastProps[propKey$232]), - lastProps.hasOwnProperty(propKey$232) && - null != propKey$216 && - !nextProps.hasOwnProperty(propKey$232)) + ((propKey$220 = lastProps[propKey$236]), + lastProps.hasOwnProperty(propKey$236) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$236)) ) - switch (propKey$232) { + switch (propKey$236) { case "selected": domElement.selected = !1; break; @@ -15504,34 +15550,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$232, + propKey$236, null, nextProps, - propKey$216 + propKey$220 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$216 = nextProps[lastDefaultValue]), + ((propKey$220 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$216 !== propKey && - (null != propKey$216 || null != propKey)) + propKey$220 !== propKey && + (null != propKey$220 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$216 !== propKey && (viewTransitionMutationContext = !0); + propKey$220 !== propKey && (viewTransitionMutationContext = !0); domElement.selected = - propKey$216 && - "function" !== typeof propKey$216 && - "symbol" !== typeof propKey$216; + propKey$220 && + "function" !== typeof propKey$220 && + "symbol" !== typeof propKey$220; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$216, + propKey$220, nextProps, propKey ); @@ -15552,24 +15598,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$237 in lastProps) - (propKey$216 = lastProps[propKey$237]), - lastProps.hasOwnProperty(propKey$237) && - null != propKey$216 && - !nextProps.hasOwnProperty(propKey$237) && - setProp(domElement, tag, propKey$237, null, nextProps, propKey$216); + for (var propKey$241 in lastProps) + (propKey$220 = lastProps[propKey$241]), + lastProps.hasOwnProperty(propKey$241) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$241) && + setProp(domElement, tag, propKey$241, null, nextProps, propKey$220); for (checked in nextProps) if ( - ((propKey$216 = nextProps[checked]), + ((propKey$220 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$216 !== propKey && - (null != propKey$216 || null != propKey)) + propKey$220 !== propKey && + (null != propKey$220 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$216) + if (null != propKey$220) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15577,7 +15623,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$216, + propKey$220, nextProps, propKey ); @@ -15585,49 +15631,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$242 in lastProps) - (propKey$216 = lastProps[propKey$242]), - lastProps.hasOwnProperty(propKey$242) && - void 0 !== propKey$216 && - !nextProps.hasOwnProperty(propKey$242) && + for (var propKey$246 in lastProps) + (propKey$220 = lastProps[propKey$246]), + lastProps.hasOwnProperty(propKey$246) && + void 0 !== propKey$220 && + !nextProps.hasOwnProperty(propKey$246) && setPropOnCustomElement( domElement, tag, - propKey$242, + propKey$246, void 0, nextProps, - propKey$216 + propKey$220 ); for (defaultChecked in nextProps) - (propKey$216 = nextProps[defaultChecked]), + (propKey$220 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$216 === propKey || - (void 0 === propKey$216 && void 0 === propKey) || + propKey$220 === propKey || + (void 0 === propKey$220 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$216, + propKey$220, nextProps, propKey ); return; } } - for (var propKey$247 in lastProps) - (propKey$216 = lastProps[propKey$247]), - lastProps.hasOwnProperty(propKey$247) && - null != propKey$216 && - !nextProps.hasOwnProperty(propKey$247) && - setProp(domElement, tag, propKey$247, null, nextProps, propKey$216); + for (var propKey$251 in lastProps) + (propKey$220 = lastProps[propKey$251]), + lastProps.hasOwnProperty(propKey$251) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$251) && + setProp(domElement, tag, propKey$251, null, nextProps, propKey$220); for (lastProp in nextProps) - (propKey$216 = nextProps[lastProp]), + (propKey$220 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$216 === propKey || - (null == propKey$216 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$216, nextProps, propKey); + propKey$220 === propKey || + (null == propKey$220 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$220, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15979,7 +16025,7 @@ function startViewTransition( (error = customizeViewTransitionError(error, !1)), null !== error && errorCallback(error); } finally { - spawnedWorkCallback(); + mutationCallback(), layoutCallback(), spawnedWorkCallback(); } }); transition.finished.finally(function () { @@ -16085,65 +16131,89 @@ function startGestureTransition( animations = documentElement.getAnimations({ subtree: !0 }), foundGroups = new Set(), foundNews = new Set(), + longestDuration = 0, i = 0; i < animations.length; i++ ) { - var pseudoElement = animations[i].effect.pseudoElement; + var effect = animations[i].effect, + pseudoElement = effect.pseudoElement; null != pseudoElement && - (pseudoElement.startsWith("::view-transition-group") + pseudoElement.startsWith("::view-transition") && + ((effect = effect.getTiming()), + (effect = + effect.delay + + ("number" === typeof effect.duration ? effect.duration : 0)), + effect > longestDuration && (longestDuration = effect), + pseudoElement.startsWith("::view-transition-group") ? foundGroups.add(pseudoElement.slice(23)) : pseudoElement.startsWith("::view-transition-new") && foundNews.add(pseudoElement.slice(21))); } + longestDuration = (rangeEnd - rangeStart) / longestDuration; for (i = 0; i < animations.length; i++) { var anim = animations[i]; - if ("running" === anim.playState) { - pseudoElement = anim.effect; - var pseudoElement$257 = pseudoElement.pseudoElement; - if ( - null != pseudoElement$257 && - pseudoElement$257.startsWith("::view-transition") && - pseudoElement.target === documentElement - ) { - anim.cancel(); - var isGeneratedGroupAnim = !1, - isExitGroupAnim = !1; - if (pseudoElement$257.startsWith("::view-transition-group")) { - var groupName = pseudoElement$257.slice(23); - foundNews.has(groupName) - ? ((anim = anim.animationName), - (isGeneratedGroupAnim = - null != anim && - anim.startsWith("-ua-view-transition-group-anim-"))) - : (isExitGroupAnim = !0); - } - animateGesture( - pseudoElement.getKeyframes(), - pseudoElement.target, - pseudoElement$257, - timeline, - rangeStart, - rangeEnd, - isGeneratedGroupAnim, - isExitGroupAnim - ); - pseudoElement$257.startsWith("::view-transition-old") && - ((pseudoElement$257 = pseudoElement$257.slice(21)), - foundGroups.has(pseudoElement$257) || - foundNews.has(pseudoElement$257) || - (foundGroups.add(pseudoElement$257), - animateGesture( - [{}, {}], - pseudoElement.target, - "::view-transition-group" + pseudoElement$257, - timeline, - rangeStart, - rangeEnd, - !1, - !0 - ))); + if ( + "running" === anim.playState && + ((pseudoElement = anim.effect), + (effect = pseudoElement.pseudoElement), + null != effect && + effect.startsWith("::view-transition") && + pseudoElement.target === documentElement) + ) { + anim.cancel(); + var isGeneratedGroupAnim = !1, + isExitGroupAnim = !1; + if (effect.startsWith("::view-transition-group")) { + var groupName = effect.slice(23); + foundNews.has(groupName) + ? ((isGeneratedGroupAnim = anim.animationName), + (isGeneratedGroupAnim = + null != isGeneratedGroupAnim && + isGeneratedGroupAnim.startsWith( + "-ua-view-transition-group-anim-" + ))) + : (isExitGroupAnim = !0); } + var timing$263 = pseudoElement.getTiming(); + anim = + rangeEnd - + (("number" === typeof timing$263.duration + ? timing$263.duration + : 0) + + timing$263.delay) * + longestDuration; + groupName = rangeEnd - timing$263.delay * longestDuration; + if ( + "reverse" === timing$263.direction || + "alternate-reverse" === timing$263.direction + ) + (timing$263 = anim), (anim = groupName), (groupName = timing$263); + animateGesture( + pseudoElement.getKeyframes(), + pseudoElement.target, + effect, + timeline, + anim, + groupName, + isGeneratedGroupAnim, + isExitGroupAnim + ); + effect.startsWith("::view-transition-old") && + ((effect = effect.slice(21)), + foundGroups.has(effect) || + foundNews.has(effect) || + (foundGroups.add(effect), + animateGesture( + [{}, {}], + pseudoElement.target, + "::view-transition-group" + effect, + timeline, + rangeStart, + rangeEnd, + !1, + !0 + ))); } } documentElement @@ -16165,7 +16235,7 @@ function startGestureTransition( (error = customizeViewTransitionError(error, !0)), null !== error && errorCallback(error); } finally { - readyCallback(); + mutationCallback(), animateCallback(); } }); transition.finished.finally(function () { @@ -16218,45 +16288,6 @@ function createViewTransitionInstance(name) { new: new ViewTransitionPseudoElement("new", name) }; } -function getCurrentGestureOffset(provider) { - provider = provider.currentTime; - if (null === provider) throw Error(formatProdErrorMessage(549)); - return "number" === typeof provider ? provider : provider.value; -} -function subscribeToGestureDirection( - provider, - currentOffset, - directionCallback -) { - function rafCallback() { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && directionCallback(newTime > currentOffset)); - callbackID = requestAnimationFrame(rafCallback); - } - if ( - "function" === typeof ScrollTimeline && - provider instanceof ScrollTimeline - ) { - var element = provider.source, - scrollCallback = function () { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && - directionCallback(newTime > currentOffset)); - }; - element.addEventListener("scroll", scrollCallback, !1); - return function () { - element.removeEventListener("scroll", scrollCallback, !1); - }; - } - var callbackID = requestAnimationFrame(rafCallback); - return function () { - cancelAnimationFrame(callbackID); - }; -} function FragmentInstance(fragmentFiber) { this._fragmentFiber = fragmentFiber; this._observers = this._eventListeners = null; @@ -16970,26 +17001,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$261 = getResourcesFromRoot( + var styles$268 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$262 = styles$261.get(type); - resource$262 || + resource$269 = styles$268.get(type); + resource$269 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$262 = { + (resource$269 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$261.set(type, resource$262), - (styles$261 = JSCompiler_inline_result.querySelector( + styles$268.set(type, resource$269), + (styles$268 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$261._p && - ((resource$262.instance = styles$261), - (resource$262.state.loading = 5)), + !styles$268._p && + ((resource$269.instance = styles$268), + (resource$269.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -17002,16 +17033,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$261 || + styles$268 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$262.state + resource$269.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$262; + return resource$269; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -17108,37 +17139,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$267 = hoistableRoot.querySelector( + var instance$274 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$267) + if (instance$274) return ( (resource.state.loading |= 4), - (resource.instance = instance$267), - markNodeAsHoistable(instance$267), - instance$267 + (resource.instance = instance$274), + markNodeAsHoistable(instance$274), + instance$274 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$267 = ( + instance$274 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$267); - var linkInstance = instance$267; + markNodeAsHoistable(instance$274); + var linkInstance = instance$274; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$267, "link", instance); + setInitialProperties(instance$274, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$267, props.precedence, hoistableRoot); - return (resource.instance = instance$267); + insertStylesheet(instance$274, props.precedence, hoistableRoot); + return (resource.instance = instance$274); case "script": - instance$267 = getScriptKey(props.src); + instance$274 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$267) + getScriptSelectorFromKey(instance$274) )) ) return ( @@ -17147,7 +17178,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$267))) + if ((styleProps = preloadPropsMap.get(instance$274))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17479,7 +17510,11 @@ function FiberRootNode( this.pooledCache = null; this.pooledCacheLanes = 0; this.formState = formState; - this.gestureClone = this.stoppingGestures = this.pendingGestures = null; + this.gestureClone = + this.stoppingGestures = + this.pendingGestures = + this.transitionTypes = + null; this.incompleteTransitions = new Map(); } function createFiberRoot( @@ -18167,16 +18202,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1981 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2003 = React.version; if ( - "19.2.0-experimental-63779030-20250328" !== - isomorphicReactPackageVersion$jscomp$inline_1981 + "19.2.0-experimental-040f8286-20250402" !== + isomorphicReactPackageVersion$jscomp$inline_2003 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1981, - "19.2.0-experimental-63779030-20250328" + isomorphicReactPackageVersion$jscomp$inline_2003, + "19.2.0-experimental-040f8286-20250402" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -18196,24 +18231,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2596 = { +var internals$jscomp$inline_2620 = { bundleType: 0, - version: "19.2.0-experimental-63779030-20250328", + version: "19.2.0-experimental-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-63779030-20250328" + reconcilerVersion: "19.2.0-experimental-040f8286-20250402" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2597 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2621 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2597.isDisabled && - hook$jscomp$inline_2597.supportsFiber + !hook$jscomp$inline_2621.isDisabled && + hook$jscomp$inline_2621.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2597.inject( - internals$jscomp$inline_2596 + (rendererID = hook$jscomp$inline_2621.inject( + internals$jscomp$inline_2620 )), - (injectedHook = hook$jscomp$inline_2597); + (injectedHook = hook$jscomp$inline_2621); } catch (err) {} } exports.createRoot = function (container, options) { @@ -18305,4 +18340,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js index 3ad2edb5966df..9cc0de5ca0dbf 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js @@ -497,1021 +497,1021 @@ (pop(hostTransitionProviderCursor, fiber), (HostTransitionContext._currentValue = NotPendingTransition)); } - function typeName(value) { - return ( - ("function" === typeof Symbol && - Symbol.toStringTag && - value[Symbol.toStringTag]) || - value.constructor.name || - "Object" - ); - } - function willCoercionThrow(value) { - try { - return testStringCoercion(value), !1; - } catch (e) { - return !0; + function disabledLog() {} + function disableLogs() { + if (0 === disabledDepth) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: !0, + enumerable: !0, + value: disabledLog, + writable: !0 + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); } + disabledDepth++; } - function testStringCoercion(value) { - return "" + value; - } - function checkAttributeStringCoercion(value, attributeName) { - if (willCoercionThrow(value)) - return ( - console.error( - "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", - attributeName, - typeName(value) - ), - testStringCoercion(value) - ); - } - function checkCSSPropertyStringCoercion(value, propName) { - if (willCoercionThrow(value)) - return ( - console.error( - "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", - propName, - typeName(value) - ), - testStringCoercion(value) - ); - } - function checkFormFieldValueStringCoercion(value) { - if (willCoercionThrow(value)) - return ( - console.error( - "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", - typeName(value) - ), - testStringCoercion(value) - ); - } - function injectInternals(internals) { - if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; - var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; - if (hook.isDisabled) return !0; - if (!hook.supportsFiber) - return ( - console.error( - "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" - ), - !0 - ); - try { - (rendererID = hook.inject(internals)), (injectedHook = hook); - } catch (err) { - console.error("React instrumentation encountered an error: %s.", err); + function reenableLogs() { + disabledDepth--; + if (0 === disabledDepth) { + var props = { configurable: !0, enumerable: !0, writable: !0 }; + Object.defineProperties(console, { + log: assign({}, props, { value: prevLog }), + info: assign({}, props, { value: prevInfo }), + warn: assign({}, props, { value: prevWarn }), + error: assign({}, props, { value: prevError }), + group: assign({}, props, { value: prevGroup }), + groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), + groupEnd: assign({}, props, { value: prevGroupEnd }) + }); } - return hook.checkDCE ? !0 : !1; + 0 > disabledDepth && + console.error( + "disabledDepth fell below zero. This is a bug in React. Please file an issue." + ); } - function setIsStrictModeForDevtools(newIsStrictMode) { - "function" === typeof log$1 && - unstable_setDisableYieldValue(newIsStrictMode); - if (injectedHook && "function" === typeof injectedHook.setStrictMode) + function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) try { - injectedHook.setStrictMode(rendererID, newIsStrictMode); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - console.error( - "React instrumentation encountered an error: %s", - err - )); + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; } + return "\n" + prefix + name + suffix; } - function clz32Fallback(x) { - x >>>= 0; - return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; - } - function getHighestPriorityLanes(lanes) { - var pendingSyncLanes = lanes & 42; - if (0 !== pendingSyncLanes) return pendingSyncLanes; - switch (lanes & -lanes) { - case 1: - return 1; - case 2: - return 2; - case 4: - return 4; - case 8: - return 8; - case 16: - return 16; - case 32: - return 32; - case 64: - return 64; - case 128: - return 128; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return lanes & 4194048; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return lanes & 62914560; - case 67108864: - return 67108864; - case 134217728: - return 134217728; - case 268435456: - return 268435456; - case 536870912: - return 536870912; - case 1073741824: - return 0; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - lanes - ); - } - } - function getNextLanes(root, wipLanes, rootHasPendingCommit) { - var pendingLanes = root.pendingLanes; - if (0 === pendingLanes) return 0; - var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; - var nonIdlePendingLanes = pendingLanes & 134217727; - 0 !== nonIdlePendingLanes - ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = nonIdlePendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = - getHighestPriorityLanes(rootHasPendingCommit))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = pendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); - return 0 === nextLanes - ? 0 - : 0 !== wipLanes && - wipLanes !== nextLanes && - 0 === (wipLanes & suspendedLanes) && - ((suspendedLanes = nextLanes & -nextLanes), - (rootHasPendingCommit = wipLanes & -wipLanes), - suspendedLanes >= rootHasPendingCommit || - (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) - ? wipLanes - : nextLanes; - } - function checkIfRootIsPrerendering(root, renderLanes) { - return ( - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - renderLanes) - ); - } - function computeExpirationTime(lane, currentTime) { - switch (lane) { - case 1: - case 2: - case 4: - case 8: - case 64: - return currentTime + 250; - case 16: - case 32: - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return currentTime + 5e3; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return -1; - case 67108864: - case 134217728: - case 268435456: - case 536870912: - case 1073741824: - return -1; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - -1 + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + var frame = componentFrameCache.get(fn); + if (void 0 !== frame) return frame; + reentry = !0; + frame = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher = null; + previousDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = null; + disableLogs(); + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$0) { + control = x$0; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$1) { + control = x$1; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } ); - } - } - function claimNextTransitionLane() { - var lane = nextTransitionLane; - nextTransitionLane <<= 1; - 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); - return lane; - } - function claimNextRetryLane() { - var lane = nextRetryLane; - nextRetryLane <<= 1; - 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); - return lane; - } - function createLaneMap(initial) { - for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); - return laneMap; - } - function markRootUpdated$1(root, updateLane) { - root.pendingLanes |= updateLane; - 268435456 !== updateLane && - ((root.suspendedLanes = 0), - (root.pingedLanes = 0), - (root.warmLanes = 0)); - } - function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ) { - var previouslyPendingLanes = root.pendingLanes; - root.pendingLanes = remainingLanes; - root.suspendedLanes = 0; - root.pingedLanes = 0; - root.warmLanes = 0; - root.expiredLanes &= remainingLanes; - root.entangledLanes &= remainingLanes; - root.errorRecoveryDisabledLanes &= remainingLanes; - root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - for ( - remainingLanes = previouslyPendingLanes & ~remainingLanes; - 0 < remainingLanes; + var _RunInRootFrame$Deter = + RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + _RunInRootFrame$Deter = namePropDescriptor = 0; + namePropDescriptor < sampleLines.length && + !sampleLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); - ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; - expirationTimes[index] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index]; - if (null !== hiddenUpdatesForLane) + ) + namePropDescriptor++; for ( - hiddenUpdates[index] = null, index = 0; - index < hiddenUpdatesForLane.length; - index++ - ) { - var update = hiddenUpdatesForLane[index]; - null !== update && (update.lane &= -536870913); - } - remainingLanes &= ~lane; + ; + _RunInRootFrame$Deter < controlLines.length && + !controlLines[_RunInRootFrame$Deter].includes( + "DetermineComponentFrameRoot" + ); + + ) + _RunInRootFrame$Deter++; + if ( + namePropDescriptor === sampleLines.length || + _RunInRootFrame$Deter === controlLines.length + ) + for ( + namePropDescriptor = sampleLines.length - 1, + _RunInRootFrame$Deter = controlLines.length - 1; + 1 <= namePropDescriptor && + 0 <= _RunInRootFrame$Deter && + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]; + + ) + _RunInRootFrame$Deter--; + for ( + ; + 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; + namePropDescriptor--, _RunInRootFrame$Deter-- + ) + if ( + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter] + ) { + if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { + do + if ( + (namePropDescriptor--, + _RunInRootFrame$Deter--, + 0 > _RunInRootFrame$Deter || + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]) + ) { + var _frame = + "\n" + + sampleLines[namePropDescriptor].replace( + " at new ", + " at " + ); + fn.displayName && + _frame.includes("") && + (_frame = _frame.replace("", fn.displayName)); + "function" === typeof fn && + componentFrameCache.set(fn, _frame); + return _frame; + } + while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); + } + break; + } + } + } finally { + (reentry = !1), + (ReactSharedInternals.H = previousDispatcher), + reenableLogs(), + (Error.prepareStackTrace = frame); } - 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); - } - function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { - root.pendingLanes |= spawnedLane; - root.suspendedLanes &= ~spawnedLane; - var spawnedLaneIndex = 31 - clz32(spawnedLane); - root.entangledLanes |= spawnedLane; - root.entanglements[spawnedLaneIndex] = - root.entanglements[spawnedLaneIndex] | - 1073741824 | - (entangledLanes & 4194090); + sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(sampleLines) + : ""; + "function" === typeof fn && componentFrameCache.set(fn, sampleLines); + return sampleLines; } - function markRootEntangled(root, entangledLanes) { - var rootEntangledLanes = (root.entangledLanes |= entangledLanes); - for (root = root.entanglements; rootEntangledLanes; ) { - var index = 31 - clz32(rootEntangledLanes), - lane = 1 << index; - (lane & entangledLanes) | (root[index] & entangledLanes) && - (root[index] |= entangledLanes); - rootEntangledLanes &= ~lane; - } + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; } - function getBumpedLaneForHydrationByLane(lane) { - switch (lane) { - case 2: - lane = 1; - break; - case 8: - lane = 4; - break; - case 32: - lane = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - lane = 128; - break; - case 268435456: - lane = 134217728; - break; + function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + case 30: + return describeBuiltInComponentFrame("ViewTransition"); default: - lane = 0; + return ""; } - return lane; - } - function addFiberToLanesMap(root, fiber, lanes) { - if (isDevToolsPresent) - for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index = 31 - clz32(lanes), - lane = 1 << index; - root[index].add(fiber); - lanes &= ~lane; - } - } - function movePendingFibersToMemoized(root, lanes) { - if (isDevToolsPresent) - for ( - var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, - memoizedUpdaters = root.memoizedUpdaters; - 0 < lanes; - - ) { - var index = 31 - clz32(lanes); - root = 1 << index; - index = pendingUpdatersLaneMap[index]; - 0 < index.size && - (index.forEach(function (fiber) { - var alternate = fiber.alternate; - (null !== alternate && memoizedUpdaters.has(alternate)) || - memoizedUpdaters.add(fiber); - }), - index.clear()); - lanes &= ~root; - } - } - function lanesToEventPriority(lanes) { - lanes &= -lanes; - return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes - ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes - ? 0 !== (lanes & 134217727) - ? DefaultEventPriority - : IdleEventPriority - : ContinuousEventPriority - : DiscreteEventPriority; } - function resolveUpdatePriority() { - var updatePriority = ReactDOMSharedInternals.p; - if (0 !== updatePriority) return updatePriority; - updatePriority = window.event; - return void 0 === updatePriority - ? DefaultEventPriority - : getEventPriority(updatePriority.type); - } - function runWithPriority(priority, fn) { - var previousPriority = ReactDOMSharedInternals.p; + function getStackByFiberInDevAndProd(workInProgress) { try { - return (ReactDOMSharedInternals.p = priority), fn(); - } finally { - ReactDOMSharedInternals.p = previousPriority; + var info = ""; + do { + info += describeFiber(workInProgress); + var debugInfo = workInProgress._debugInfo; + if (debugInfo) + for (var i = debugInfo.length - 1; 0 <= i; i--) { + var entry = debugInfo[i]; + if ("string" === typeof entry.name) { + var JSCompiler_temp_const = info, + env = entry.env; + var JSCompiler_inline_result = describeBuiltInComponentFrame( + entry.name + (env ? " [" + env + "]" : "") + ); + info = JSCompiler_temp_const + JSCompiler_inline_result; + } + } + workInProgress = workInProgress.return; + } while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; } } - function detachDeletedInstance(node) { - delete node[internalInstanceKey]; - delete node[internalPropsKey]; - delete node[internalEventHandlersKey]; - delete node[internalEventHandlerListenersKey]; - delete node[internalEventHandlesSetKey]; + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; } - function getClosestInstanceFromNode(targetNode) { - var targetInst = targetNode[internalInstanceKey]; - if (targetInst) return targetInst; - for (var parentNode = targetNode.parentNode; parentNode; ) { - if ( - (targetInst = - parentNode[internalContainerInstanceKey] || - parentNode[internalInstanceKey]) - ) { - parentNode = targetInst.alternate; - if ( - null !== targetInst.child || - (null !== parentNode && null !== parentNode.child) - ) - for ( - targetNode = getParentSuspenseInstance(targetNode); - null !== targetNode; - - ) { - if ((parentNode = targetNode[internalInstanceKey])) - return parentNode; - targetNode = getParentSuspenseInstance(targetNode); - } - return targetInst; + function getCurrentFiberOwnerNameInDevOrNull() { + if (null === current) return null; + var owner = current._debugOwner; + return null != owner ? getComponentNameFromOwner(owner) : null; + } + function getCurrentFiberStackInDev() { + if (null === current) return ""; + var workInProgress = current; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 31: + info += describeBuiltInComponentFrame("Activity"); + break; + case 30: + info += describeBuiltInComponentFrame("ViewTransition"); + break; + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); } - targetNode = parentNode; - parentNode = targetNode.parentNode; + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + workInProgress && + debugStack && + ("string" !== typeof debugStack && + (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), + "" !== debugStack && (info += "\n" + debugStack)); + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + var JSCompiler_inline_result = info; + } catch (x) { + JSCompiler_inline_result = + "\nError generating stack: " + x.message + "\n" + x.stack; } - return null; + return JSCompiler_inline_result; } - function getInstanceFromNode(node) { - if ( - (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) - ) { - var tag = node.tag; - if ( - 5 === tag || - 6 === tag || - 13 === tag || - 26 === tag || - 27 === tag || - 3 === tag - ) - return node; + function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { + var previousFiber = current; + setCurrentFiber(fiber); + try { + return null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); + } finally { + setCurrentFiber(previousFiber); } - return null; + throw Error( + "runWithFiberInDEV should never be called in production. This is a bug in React." + ); } - function getNodeFromInstance(inst) { - var tag = inst.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) - return inst.stateNode; - throw Error("getNodeFromInstance: Invalid argument."); + function setCurrentFiber(fiber) { + ReactSharedInternals.getCurrentStack = + null === fiber ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = fiber; } - function getResourcesFromRoot(root) { - var resources = root[internalRootNodeResourcesKey]; - resources || - (resources = root[internalRootNodeResourcesKey] = - { hoistableStyles: new Map(), hoistableScripts: new Map() }); - return resources; + function typeName(value) { + return ( + ("function" === typeof Symbol && + Symbol.toStringTag && + value[Symbol.toStringTag]) || + value.constructor.name || + "Object" + ); } - function markNodeAsHoistable(node) { - node[internalHoistableMarker] = !0; + function willCoercionThrow(value) { + try { + return testStringCoercion(value), !1; + } catch (e) { + return !0; + } } - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + "Capture", dependencies); + function testStringCoercion(value) { + return "" + value; } - function registerDirectEvent(registrationName, dependencies) { - registrationNameDependencies[registrationName] && - console.error( - "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", - registrationName + function checkAttributeStringCoercion(value, attributeName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", + attributeName, + typeName(value) + ), + testStringCoercion(value) ); - registrationNameDependencies[registrationName] = dependencies; - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - "onDoubleClick" === registrationName && - (possibleRegistrationNames.ondblclick = registrationName); - for ( - registrationName = 0; - registrationName < dependencies.length; - registrationName++ - ) - allNativeEvents.add(dependencies[registrationName]); } - function checkControlledValueProps(tagName, props) { - hasReadOnlyValue[props.type] || - props.onChange || - props.onInput || - props.readOnly || - props.disabled || - null == props.value || - ("select" === tagName - ? console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." - ) - : console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." - )); - props.onChange || - props.readOnly || - props.disabled || - null == props.checked || - console.error( - "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + function checkCSSPropertyStringCoercion(value, propName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", + propName, + typeName(value) + ), + testStringCoercion(value) ); } - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) - return !0; - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) - return !1; - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) - return (validatedAttributeNameCache[attributeName] = !0); - illegalAttributeNameCache[attributeName] = !0; - console.error("Invalid attribute name: `%s`", attributeName); - return !1; - } - function pushMutationContext() { - var prev = viewTransitionMutationContext; - viewTransitionMutationContext = !1; - return prev; + function checkFormFieldValueStringCoercion(value) { + if (willCoercionThrow(value)) + return ( + console.error( + "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", + typeName(value) + ), + testStringCoercion(value) + ); } - function getValueForAttributeOnCustomComponent(node, name, expected) { - if (isAttributeNameSafe(name)) { - if (!node.hasAttribute(name)) { - switch (typeof expected) { - case "symbol": - case "object": - return expected; - case "function": - return expected; - case "boolean": - if (!1 === expected) return expected; - } - return void 0 === expected ? void 0 : null; - } - node = node.getAttribute(name); - if ("" === node && !0 === expected) return !0; - checkAttributeStringCoercion(expected, name); - return node === "" + expected ? expected : node; + function injectInternals(internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled) return !0; + if (!hook.supportsFiber) + return ( + console.error( + "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" + ), + !0 + ); + try { + (rendererID = hook.inject(internals)), (injectedHook = hook); + } catch (err) { + console.error("React instrumentation encountered an error: %s.", err); } + return hook.checkDCE ? !0 : !1; } - function setValueForAttribute(node, name, value) { - if (isAttributeNameSafe(name)) - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix && "aria-" !== prefix) { - node.removeAttribute(name); - return; - } - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); + function setIsStrictModeForDevtools(newIsStrictMode) { + "function" === typeof log$1 && + unstable_setDisableYieldValue(newIsStrictMode); + if (injectedHook && "function" === typeof injectedHook.setStrictMode) + try { + injectedHook.setStrictMode(rendererID, newIsStrictMode); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + console.error( + "React instrumentation encountered an error: %s", + err + )); } } - function setValueForKnownAttribute(node, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); - } + function clz32Fallback(x) { + x >>>= 0; + return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; } - function setValueForNamespacedAttribute(node, namespace, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttributeNS(namespace, name, "" + value); + function getHighestPriorityLanes(lanes) { + var pendingSyncLanes = lanes & 42; + if (0 !== pendingSyncLanes) return pendingSyncLanes; + switch (lanes & -lanes) { + case 1: + return 1; + case 2: + return 2; + case 4: + return 4; + case 8: + return 8; + case 16: + return 16; + case 32: + return 32; + case 64: + return 64; + case 128: + return 128; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return lanes & 4194048; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return lanes & 62914560; + case 67108864: + return 67108864; + case 134217728: + return 134217728; + case 268435456: + return 268435456; + case 536870912: + return 536870912; + case 1073741824: + return 0; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + lanes + ); } } - function disabledLog() {} - function disableLogs() { - if (0 === disabledDepth) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: !0, - enumerable: !0, - value: disabledLog, - writable: !0 - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); + function getNextLanes(root, wipLanes, rootHasPendingCommit) { + var pendingLanes = root.pendingLanes; + if (0 === pendingLanes) return 0; + var nextLanes = 0, + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; + var nonIdlePendingLanes = pendingLanes & 134217727; + 0 !== nonIdlePendingLanes + ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); + return 0 === nextLanes + ? 0 + : 0 !== wipLanes && + wipLanes !== nextLanes && + 0 === (wipLanes & suspendedLanes) && + ((suspendedLanes = nextLanes & -nextLanes), + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) + ? wipLanes + : nextLanes; + } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } + function computeExpirationTime(lane, currentTime) { + switch (lane) { + case 1: + case 2: + case 4: + case 8: + case 64: + return currentTime + 250; + case 16: + case 32: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return currentTime + 5e3; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return -1; + case 67108864: + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + -1 + ); } - disabledDepth++; } - function reenableLogs() { - disabledDepth--; - if (0 === disabledDepth) { - var props = { configurable: !0, enumerable: !0, writable: !0 }; - Object.defineProperties(console, { - log: assign({}, props, { value: prevLog }), - info: assign({}, props, { value: prevInfo }), - warn: assign({}, props, { value: prevWarn }), - error: assign({}, props, { value: prevError }), - group: assign({}, props, { value: prevGroup }), - groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), - groupEnd: assign({}, props, { value: prevGroupEnd }) - }); - } - 0 > disabledDepth && - console.error( - "disabledDepth fell below zero. This is a bug in React. Please file an issue." - ); + function claimNextTransitionLane() { + var lane = nextTransitionLane; + nextTransitionLane <<= 1; + 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); + return lane; } - function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; - } - return "\n" + prefix + name + suffix; + function claimNextRetryLane() { + var lane = nextRetryLane; + nextRetryLane <<= 1; + 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); + return lane; } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - var frame = componentFrameCache.get(fn); - if (void 0 !== frame) return frame; - reentry = !0; - frame = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher = null; - previousDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = null; - disableLogs(); - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$0) { - control = x$0; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$1) { - control = x$1; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = - RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - _RunInRootFrame$Deter = namePropDescriptor = 0; - namePropDescriptor < sampleLines.length && - !sampleLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); + function createLaneMap(initial) { + for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); + return laneMap; + } + function markRootUpdated$1(root, updateLane) { + root.pendingLanes |= updateLane; + 268435456 !== updateLane && + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); + } + function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ) { + var previouslyPendingLanes = root.pendingLanes; + root.pendingLanes = remainingLanes; + root.suspendedLanes = 0; + root.pingedLanes = 0; + root.warmLanes = 0; + root.expiredLanes &= remainingLanes; + root.entangledLanes &= remainingLanes; + root.errorRecoveryDisabledLanes &= remainingLanes; + root.shellSuspendCounter = 0; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; + for ( + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; - ) - namePropDescriptor++; + ) { + var index = 31 - clz32(remainingLanes), + lane = 1 << index; + entanglements[index] = 0; + expirationTimes[index] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index]; + if (null !== hiddenUpdatesForLane) for ( - ; - _RunInRootFrame$Deter < controlLines.length && - !controlLines[_RunInRootFrame$Deter].includes( - "DetermineComponentFrameRoot" - ); + hiddenUpdates[index] = null, index = 0; + index < hiddenUpdatesForLane.length; + index++ + ) { + var update = hiddenUpdatesForLane[index]; + null !== update && (update.lane &= -536870913); + } + remainingLanes &= ~lane; + } + 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); + } + function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { + root.pendingLanes |= spawnedLane; + root.suspendedLanes &= ~spawnedLane; + var spawnedLaneIndex = 31 - clz32(spawnedLane); + root.entangledLanes |= spawnedLane; + root.entanglements[spawnedLaneIndex] = + root.entanglements[spawnedLaneIndex] | + 1073741824 | + (entangledLanes & 4194090); + } + function markRootEntangled(root, entangledLanes) { + var rootEntangledLanes = (root.entangledLanes |= entangledLanes); + for (root = root.entanglements; rootEntangledLanes; ) { + var index = 31 - clz32(rootEntangledLanes), + lane = 1 << index; + (lane & entangledLanes) | (root[index] & entangledLanes) && + (root[index] |= entangledLanes); + rootEntangledLanes &= ~lane; + } + } + function getBumpedLaneForHydrationByLane(lane) { + switch (lane) { + case 2: + lane = 1; + break; + case 8: + lane = 4; + break; + case 32: + lane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + lane = 128; + break; + case 268435456: + lane = 134217728; + break; + default: + lane = 0; + } + return lane; + } + function addFiberToLanesMap(root, fiber, lanes) { + if (isDevToolsPresent) + for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { + var index = 31 - clz32(lanes), + lane = 1 << index; + root[index].add(fiber); + lanes &= ~lane; + } + } + function movePendingFibersToMemoized(root, lanes) { + if (isDevToolsPresent) + for ( + var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, + memoizedUpdaters = root.memoizedUpdaters; + 0 < lanes; - ) - _RunInRootFrame$Deter++; + ) { + var index = 31 - clz32(lanes); + root = 1 << index; + index = pendingUpdatersLaneMap[index]; + 0 < index.size && + (index.forEach(function (fiber) { + var alternate = fiber.alternate; + (null !== alternate && memoizedUpdaters.has(alternate)) || + memoizedUpdaters.add(fiber); + }), + index.clear()); + lanes &= ~root; + } + } + function lanesToEventPriority(lanes) { + lanes &= -lanes; + return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes + ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes + ? 0 !== (lanes & 134217727) + ? DefaultEventPriority + : IdleEventPriority + : ContinuousEventPriority + : DiscreteEventPriority; + } + function resolveUpdatePriority() { + var updatePriority = ReactDOMSharedInternals.p; + if (0 !== updatePriority) return updatePriority; + updatePriority = window.event; + return void 0 === updatePriority + ? DefaultEventPriority + : getEventPriority(updatePriority.type); + } + function runWithPriority(priority, fn) { + var previousPriority = ReactDOMSharedInternals.p; + try { + return (ReactDOMSharedInternals.p = priority), fn(); + } finally { + ReactDOMSharedInternals.p = previousPriority; + } + } + function detachDeletedInstance(node) { + delete node[internalInstanceKey]; + delete node[internalPropsKey]; + delete node[internalEventHandlersKey]; + delete node[internalEventHandlerListenersKey]; + delete node[internalEventHandlesSetKey]; + } + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + if (targetInst) return targetInst; + for (var parentNode = targetNode.parentNode; parentNode; ) { + if ( + (targetInst = + parentNode[internalContainerInstanceKey] || + parentNode[internalInstanceKey]) + ) { + parentNode = targetInst.alternate; if ( - namePropDescriptor === sampleLines.length || - _RunInRootFrame$Deter === controlLines.length + null !== targetInst.child || + (null !== parentNode && null !== parentNode.child) ) for ( - namePropDescriptor = sampleLines.length - 1, - _RunInRootFrame$Deter = controlLines.length - 1; - 1 <= namePropDescriptor && - 0 <= _RunInRootFrame$Deter && - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]; + targetNode = getParentSuspenseInstance(targetNode); + null !== targetNode; - ) - _RunInRootFrame$Deter--; - for ( - ; - 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; - namePropDescriptor--, _RunInRootFrame$Deter-- - ) - if ( - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter] ) { - if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { - do - if ( - (namePropDescriptor--, - _RunInRootFrame$Deter--, - 0 > _RunInRootFrame$Deter || - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]) - ) { - var _frame = - "\n" + - sampleLines[namePropDescriptor].replace( - " at new ", - " at " - ); - fn.displayName && - _frame.includes("") && - (_frame = _frame.replace("", fn.displayName)); - "function" === typeof fn && - componentFrameCache.set(fn, _frame); - return _frame; - } - while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); - } - break; + if ((parentNode = targetNode[internalInstanceKey])) + return parentNode; + targetNode = getParentSuspenseInstance(targetNode); } + return targetInst; } - } finally { - (reentry = !1), - (ReactSharedInternals.H = previousDispatcher), - reenableLogs(), - (Error.prepareStackTrace = frame); + targetNode = parentNode; + parentNode = targetNode.parentNode; } - sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(sampleLines) - : ""; - "function" === typeof fn && componentFrameCache.set(fn, sampleLines); - return sampleLines; + return null; } - function formatOwnerStack(error) { - var prevPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - error = error.stack; - Error.prepareStackTrace = prevPrepareStackTrace; - error.startsWith("Error: react-stack-top-frame\n") && - (error = error.slice(29)); - prevPrepareStackTrace = error.indexOf("\n"); - -1 !== prevPrepareStackTrace && - (error = error.slice(prevPrepareStackTrace + 1)); - prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); - -1 !== prevPrepareStackTrace && - (prevPrepareStackTrace = error.lastIndexOf( - "\n", - prevPrepareStackTrace - )); - if (-1 !== prevPrepareStackTrace) - error = error.slice(0, prevPrepareStackTrace); - else return ""; - return error; + function getInstanceFromNode(node) { + if ( + (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) + ) { + var tag = node.tag; + if ( + 5 === tag || + 6 === tag || + 13 === tag || + 26 === tag || + 27 === tag || + 3 === tag + ) + return node; + } + return null; + } + function getNodeFromInstance(inst) { + var tag = inst.tag; + if (5 === tag || 26 === tag || 27 === tag || 6 === tag) + return inst.stateNode; + throw Error("getNodeFromInstance: Invalid argument."); + } + function getResourcesFromRoot(root) { + var resources = root[internalRootNodeResourcesKey]; + resources || + (resources = root[internalRootNodeResourcesKey] = + { hoistableStyles: new Map(), hoistableScripts: new Map() }); + return resources; + } + function markNodeAsHoistable(node) { + node[internalHoistableMarker] = !0; + } + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + registrationNameDependencies[registrationName] && + console.error( + "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", + registrationName + ); + registrationNameDependencies[registrationName] = dependencies; + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + "onDoubleClick" === registrationName && + (possibleRegistrationNames.ondblclick = registrationName); + for ( + registrationName = 0; + registrationName < dependencies.length; + registrationName++ + ) + allNativeEvents.add(dependencies[registrationName]); + } + function checkControlledValueProps(tagName, props) { + hasReadOnlyValue[props.type] || + props.onChange || + props.onInput || + props.readOnly || + props.disabled || + null == props.value || + ("select" === tagName + ? console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." + ) + : console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + )); + props.onChange || + props.readOnly || + props.disabled || + null == props.checked || + console.error( + "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + ); + } + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) + return !0; + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) + return !1; + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) + return (validatedAttributeNameCache[attributeName] = !0); + illegalAttributeNameCache[attributeName] = !0; + console.error("Invalid attribute name: `%s`", attributeName); + return !1; + } + function pushMutationContext() { + var prev = viewTransitionMutationContext; + viewTransitionMutationContext = !1; + return prev; } - function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - case 30: - return describeBuiltInComponentFrame("ViewTransition"); - default: - return ""; + function getValueForAttributeOnCustomComponent(node, name, expected) { + if (isAttributeNameSafe(name)) { + if (!node.hasAttribute(name)) { + switch (typeof expected) { + case "symbol": + case "object": + return expected; + case "function": + return expected; + case "boolean": + if (!1 === expected) return expected; + } + return void 0 === expected ? void 0 : null; + } + node = node.getAttribute(name); + if ("" === node && !0 === expected) return !0; + checkAttributeStringCoercion(expected, name); + return node === "" + expected ? expected : node; } } - function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do { - info += describeFiber(workInProgress); - var debugInfo = workInProgress._debugInfo; - if (debugInfo) - for (var i = debugInfo.length - 1; 0 <= i; i--) { - var entry = debugInfo[i]; - if ("string" === typeof entry.name) { - var JSCompiler_temp_const = info, - env = entry.env; - var JSCompiler_inline_result = describeBuiltInComponentFrame( - entry.name + (env ? " [" + env + "]" : "") - ); - info = JSCompiler_temp_const + JSCompiler_inline_result; + function setValueForAttribute(node, name, value) { + if (isAttributeNameSafe(name)) + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix && "aria-" !== prefix) { + node.removeAttribute(name); + return; } - } - workInProgress = workInProgress.return; - } while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; - } - } - function describeFunctionComponentFrameWithoutLineNumber(fn) { - return (fn = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(fn) - : ""; - } - function getCurrentFiberOwnerNameInDevOrNull() { - if (null === current) return null; - var owner = current._debugOwner; - return null != owner ? getComponentNameFromOwner(owner) : null; + } + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); + } } - function getCurrentFiberStackInDev() { - if (null === current) return ""; - var workInProgress = current; - try { - var info = ""; - 6 === workInProgress.tag && (workInProgress = workInProgress.return); - switch (workInProgress.tag) { - case 26: - case 27: - case 5: - info += describeBuiltInComponentFrame(workInProgress.type); - break; - case 13: - info += describeBuiltInComponentFrame("Suspense"); - break; - case 19: - info += describeBuiltInComponentFrame("SuspenseList"); - break; - case 31: - info += describeBuiltInComponentFrame("Activity"); - break; - case 30: - info += describeBuiltInComponentFrame("ViewTransition"); - break; - case 0: - case 15: - case 1: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type - )); - break; - case 11: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type.render - )); + function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; } - for (; workInProgress; ) - if ("number" === typeof workInProgress.tag) { - var fiber = workInProgress; - workInProgress = fiber._debugOwner; - var debugStack = fiber._debugStack; - workInProgress && - debugStack && - ("string" !== typeof debugStack && - (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), - "" !== debugStack && (info += "\n" + debugStack)); - } else if (null != workInProgress.debugStack) { - var ownerStack = workInProgress.debugStack; - (workInProgress = workInProgress.owner) && - ownerStack && - (info += "\n" + formatOwnerStack(ownerStack)); - } else break; - var JSCompiler_inline_result = info; - } catch (x) { - JSCompiler_inline_result = - "\nError generating stack: " + x.message + "\n" + x.stack; + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); } - return JSCompiler_inline_result; } - function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { - var previousFiber = current; - setCurrentFiber(fiber); - try { - return null !== fiber && fiber._debugTask - ? fiber._debugTask.run( - callback.bind(null, arg0, arg1, arg2, arg3, arg4) - ) - : callback(arg0, arg1, arg2, arg3, arg4); - } finally { - setCurrentFiber(previousFiber); + function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + checkAttributeStringCoercion(value, name); + node.setAttributeNS(namespace, name, "" + value); } - throw Error( - "runWithFiberInDEV should never be called in production. This is a bug in React." - ); - } - function setCurrentFiber(fiber) { - ReactSharedInternals.getCurrentStack = - null === fiber ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = fiber; } function getToStringValue(value) { switch (typeof value) { @@ -3805,11 +3805,6 @@ enqueueUpdate$1(fiber, null, null, lane); return getRootForUpdatedFiber(fiber); } - function enqueueGestureRender(fiber) { - fiber = markUpdateLaneFromFiberToRoot(fiber, null, 64); - null !== fiber && markRootUpdated$1(fiber, 64); - return fiber; - } function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { sourceFiber.lanes |= lane; var alternate = sourceFiber.alternate; @@ -5143,6 +5138,21 @@ cache.controller.abort(); }); } + function queueTransitionTypes(root, transitionTypes) { + if (0 !== (root.pendingLanes & 4194048)) { + var queued = root.transitionTypes; + null === queued && (queued = root.transitionTypes = []); + for (root = 0; root < transitionTypes.length; root++) { + var transitionType = transitionTypes[root]; + -1 === queued.indexOf(transitionType) && queued.push(transitionType); + } + } + } + function claimQueuedTransitionTypes(root) { + var claimed = root.transitionTypes; + root.transitionTypes = null; + return claimed; + } function startUpdateTimerByLane(lane) { var JSCompiler_temp; (JSCompiler_temp = 0 !== (lane & 3)) || @@ -5272,6 +5282,7 @@ if ( 0 === --currentEntangledPendingCount && (-1 < transitionUpdateTime || (transitionStartTime = -1.1), + (entangledTransitionTypes = null), null !== currentEntangledListeners) ) { null !== currentEntangledActionThenable && @@ -5292,21 +5303,115 @@ then: function (resolve) { listeners.push(resolve); } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; + } + function startScheduledGesture( + root, + gestureTimeline, + gestureOptions, + transitionTypes + ) { + if (gestureOptions && null != gestureOptions.rangeStart) + var JSCompiler_temp = gestureOptions.rangeStart; + else { + JSCompiler_temp = gestureTimeline.currentTime; + if (null === JSCompiler_temp) + throw Error( + "Cannot start a gesture with a disconnected AnimationTimeline." + ); + JSCompiler_temp = + "number" === typeof JSCompiler_temp + ? JSCompiler_temp + : JSCompiler_temp.value; + } + gestureOptions = + gestureOptions && null != gestureOptions.rangeEnd + ? gestureOptions.rangeEnd + : 50 > JSCompiler_temp + ? 100 + : 0; + for (root = root.pendingGestures; null !== root; ) { + if (root.provider === gestureTimeline) { + root.count++; + root.rangeStart = JSCompiler_temp; + root.rangeEnd = gestureOptions; + if (null !== transitionTypes) + for ( + gestureTimeline = root.types, + null === gestureTimeline && (gestureTimeline = root.types = []), + JSCompiler_temp = 0; + JSCompiler_temp < transitionTypes.length; + JSCompiler_temp++ + ) + (gestureOptions = transitionTypes[JSCompiler_temp]), + -1 === gestureTimeline.indexOf(gestureOptions) && + gestureTimeline.push(gestureOptions); + return root; + } + root = root.next; + if (null === root) break; + } + return null; + } + function deleteScheduledGesture(root, gesture) { + null === gesture.prev + ? (root.pendingGestures === gesture && + ((root.pendingGestures = gesture.next), + null === root.pendingGestures && (root.pendingLanes &= -65)), + root.stoppingGestures === gesture && + (root.stoppingGestures = gesture.next)) + : ((gesture.prev.next = gesture.next), + null !== gesture.next && (gesture.next.prev = gesture.prev), + (gesture.prev = null), + (gesture.next = null)); + } + function stopCompletedGestures(root) { + var gesture = root.stoppingGestures; + for (root.stoppingGestures = null; null !== gesture; ) + null !== gesture.running && + (gesture.running.skipTransition(), (gesture.running = null)), + (root = gesture.next), + (gesture.next = null), + (gesture.prev = null), + (gesture = root); + } + function chainGestureCancellation(root, scheduledGesture, prevCancel) { + return function () { + if ( + null !== scheduledGesture && + (scheduledGesture.count--, 0 === scheduledGesture.count) + ) { + deleteScheduledGesture(root, scheduledGesture); + var runningTransition = scheduledGesture.running; + if (null !== runningTransition) { + var pendingLanesExcludingGestureLane = root.pendingLanes & -65; + 0 !== (pendingLanesExcludingGestureLane & 124) || + 0 !== (pendingLanesExcludingGestureLane & 4194048) + ? ((runningTransition = root.stoppingGestures), + null !== runningTransition && + ((scheduledGesture.next = runningTransition), + (runningTransition.prev = scheduledGesture)), + (root.stoppingGestures = scheduledGesture)) + : ((scheduledGesture.running = null), + runningTransition.skipTransition()); + } } - ); - return thenableWithOverride; + null !== prevCancel && prevCancel(); + }; } function peekCacheFromPool() { var cacheResumedFromPreviousRender = resumedCache.current; @@ -6927,76 +7032,6 @@ } return null; } - function scheduleGesture( - root, - provider, - initialDirection, - rangePrevious, - rangeCurrent, - rangeNext - ) { - for (var prev = root.pendingGestures; null !== prev; ) { - if (prev.provider === provider) return prev.count++, prev; - var next = prev.next; - if (null === next) break; - prev = next; - } - var isFlippedDirection = rangePrevious > rangeNext; - next = subscribeToGestureDirection( - provider, - rangeCurrent, - function (direction) { - isFlippedDirection && (direction = !direction); - gesture.direction !== direction && - ((gesture.direction = direction), - null === gesture.prev && - root.pendingGestures !== gesture && - ((direction = root.pendingGestures), - (gesture.next = direction), - null !== direction && (direction.prev = gesture), - (root.pendingGestures = gesture), - (root.pendingLanes |= 64), - ensureRootIsScheduled(root))); - } - ); - var gesture = { - provider: provider, - count: 1, - direction: initialDirection, - rangePrevious: rangePrevious, - rangeCurrent: rangeCurrent, - rangeNext: rangeNext, - cancel: next, - running: null, - prev: prev, - next: null - }; - null === prev ? (root.pendingGestures = gesture) : (prev.next = gesture); - ensureRootIsScheduled(root); - return gesture; - } - function deleteScheduledGesture(root, gesture) { - null === gesture.prev - ? (root.pendingGestures === gesture && - ((root.pendingGestures = gesture.next), - null === root.pendingGestures && (root.pendingLanes &= -65)), - root.stoppingGestures === gesture && - (root.stoppingGestures = gesture.next)) - : ((gesture.prev.next = gesture.next), - null !== gesture.next && (gesture.next.prev = gesture.prev), - (gesture.prev = null), - (gesture.next = null)); - } - function stopCompletedGestures(root) { - var gesture = root.stoppingGestures; - for (root.stoppingGestures = null; null !== gesture; ) - null !== gesture.running && - (gesture.running.skipTransition(), (gesture.running = null)), - (root = gesture.next), - (gesture.next = null), - (gesture.prev = null), - (gesture = root); - } function mountHookTypesDev() { var hookName = currentHookNameInDev; null === hookTypesDev @@ -7461,19 +7496,53 @@ update = current, didReadFromEntangledAsyncAction = !1; do { - var updateLane = update.lane & -536870913; - if ( - updateLane !== update.lane - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - var revertLane = update.revertLane; - if (0 === revertLane) + var updateLane = update.lane & -536870913, + shouldSkipUpdate = + updateLane !== update.lane + ? (workInProgressRootRenderLanes & updateLane) !== updateLane + : (renderLanes & updateLane) !== updateLane; + if (64 === updateLane) { + var scheduledGesture = update.gesture; + if (null !== scheduledGesture) + if (0 === scheduledGesture.count) { + update = update.next; + continue; + } else if (64 !== renderLanes) shouldSkipUpdate = !0; + else { + shouldSkipUpdate = workInProgressRoot; + if (null === shouldSkipUpdate) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + shouldSkipUpdate = + shouldSkipUpdate.pendingGestures !== scheduledGesture; + } + } + if (shouldSkipUpdate) + (scheduledGesture = { + lane: updateLane, + revertLane: update.revertLane, + gesture: update.gesture, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), + null === newBaseQueueLast + ? ((newBaseQueueFirst = newBaseQueueLast = scheduledGesture), + (baseFirst = pendingQueue)) + : (newBaseQueueLast = newBaseQueueLast.next = scheduledGesture), + (currentlyRenderingFiber.lanes |= updateLane), + (workInProgressRootSkippedLanes |= updateLane); + else { + scheduledGesture = update.revertLane; + if (0 === scheduledGesture) null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7481,15 +7550,16 @@ }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = !0); - else if ((renderLanes & revertLane) === revertLane) { + else if ((renderLanes & scheduledGesture) === scheduledGesture) { update = update.next; - revertLane === currentEntangledLane && + scheduledGesture === currentEntangledLane && (didReadFromEntangledAsyncAction = !0); continue; } else (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7499,29 +7569,15 @@ ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber.lanes |= revertLane), - (workInProgressRootSkippedLanes |= revertLane); + (currentlyRenderingFiber.lanes |= scheduledGesture), + (workInProgressRootSkippedLanes |= scheduledGesture); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane); - } else - (revertLane = { - lane: updateLane, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), - null === newBaseQueueLast - ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), - (baseFirst = pendingQueue)) - : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber.lanes |= updateLane), - (workInProgressRootSkippedLanes |= updateLane); + } update = update.next; } while (null !== update && update !== current); null === newBaseQueueLast @@ -7832,8 +7888,11 @@ if (node.isTransition) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; - ReactSharedInternals.T._updatedFibers = new Set(); try { var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S; @@ -7843,7 +7902,15 @@ } catch (error) { onActionError(actionQueue, node, error); } finally { - (ReactSharedInternals.T = prevTransition), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), + (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && ((actionQueue = currentTransition._updatedFibers.size), @@ -7865,7 +7932,9 @@ null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then - ? (returnValue.then( + ? (ReactSharedInternals.asyncTransitions++, + returnValue.then(releaseAsyncTransition, releaseAsyncTransition), + returnValue.then( function (nextState) { onActionSuccess(actionQueue, node, nextState); }, @@ -8301,6 +8370,9 @@ workInProgressRootSkippedLanes |= hook; return prevValue; } + function releaseAsyncTransition() { + ReactSharedInternals.asyncTransitions--; + } function startTransition( fiber, queue, @@ -8315,9 +8387,12 @@ : ContinuousEventPriority; var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); - currentTransition._updatedFibers = new Set(); try { var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S; @@ -8328,6 +8403,8 @@ "object" === typeof returnValue && "function" === typeof returnValue.then ) { + ReactSharedInternals.asyncTransitions++; + returnValue.then(releaseAsyncTransition, releaseAsyncTransition); var thenableForFinishedState = chainThenableValue( returnValue, finishedState @@ -8354,6 +8431,14 @@ ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && @@ -8420,14 +8505,19 @@ return existingStateHook; } function requestFormReset$2(formFiber) { - null === ReactSharedInternals.T && + var transition = ReactSharedInternals.T; + if (null === transition) console.error( "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition." ); - var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + else if (transition.gesture) + throw Error( + "Cannot requestFormReset() inside a startGestureTransition. There should be no side-effects associated with starting a Gesture until its Action is invoked. Move side-effects to the Action instead." + ); + transition = ensureFormComponentIsStateful(formFiber).next.queue; dispatchSetStateInternal( formFiber, - resetStateQueue, + transition, {}, requestUpdateLane(formFiber) ); @@ -8521,6 +8611,7 @@ var update = { lane: args, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8548,6 +8639,7 @@ var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8596,14 +8688,17 @@ queue, action ) { - null === ReactSharedInternals.T && + var transition = ReactSharedInternals.T; + null === transition && 0 === currentEntangledLane && console.error( "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition." ); + var lane = null !== transition && transition.gesture ? 64 : 2; action = { - lane: 2, + lane: lane, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8613,16 +8708,47 @@ if (throwIfDuringRender) throw Error("Cannot update optimistic state while rendering."); console.error("Cannot call startTransition while rendering."); - } else - (throwIfDuringRender = enqueueConcurrentHookUpdate( + } else if ( + ((throwIfDuringRender = enqueueConcurrentHookUpdate( fiber, queue, action, - 2 + lane )), - null !== throwIfDuringRender && - (startUpdateTimerByLane(2), - scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2)); + null !== throwIfDuringRender && + (startUpdateTimerByLane(lane), + scheduleUpdateOnFiber(throwIfDuringRender, fiber, lane), + null !== transition && + ((transition = transition.gesture), null !== transition))) + ) { + a: { + for (fiber = throwIfDuringRender.pendingGestures; null !== fiber; ) { + if (fiber.provider === transition) { + throwIfDuringRender = fiber; + break a; + } + lane = fiber.next; + if (null === lane) break; + fiber = lane; + } + transition = { + provider: transition, + count: 0, + rangeStart: 0, + rangeEnd: 100, + types: null, + running: null, + prev: fiber, + next: null + }; + null === fiber + ? (throwIfDuringRender.pendingGestures = transition) + : (fiber.next = transition); + ensureRootIsScheduled(throwIfDuringRender); + throwIfDuringRender = transition; + } + action.gesture = throwIfDuringRender; + } } function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; @@ -8649,115 +8775,6 @@ markRootEntangled(root, lane); } } - function startGesture(fiber, queue, gestureProvider, gestureOptions) { - var root = enqueueGestureRender(fiber); - if (null === root) return function () {}; - fiber = getCurrentGestureOffset(gestureProvider); - var range = gestureOptions && gestureOptions.range, - rangePrevious = range ? range[0] : 0, - rangeCurrent = range ? range[1] : fiber; - range = range ? range[2] : 100; - ((rangePrevious > rangeCurrent && range > rangeCurrent) || - (rangePrevious < rangeCurrent && range < rangeCurrent)) && - console.error( - 'The range of a gesture needs "previous" and "next" to be on either side of the "current" offset. Both cannot be above current and both cannot be below current.' - ); - var isFlippedDirection = rangePrevious > range, - update = { - gesture: scheduleGesture( - root, - gestureProvider, - fiber < rangeCurrent - ? isFlippedDirection - : fiber > rangeCurrent - ? !isFlippedDirection - : gestureOptions && "next" === gestureOptions.direction - ? !0 - : gestureOptions && "previous" === gestureOptions.direction - ? !1 - : queue.initialDirection, - rangePrevious, - rangeCurrent, - range - ), - prev: null, - next: queue.pending - }; - null !== queue.pending && (queue.pending.prev = update); - queue.pending = update; - return function () { - if (null === update.prev) - if (queue.pending === update) queue.pending = update.next; - else return; - else - (update.prev.next = update.next), - null !== update.next && (update.next.prev = update.prev), - (update.prev = null), - (update.next = null); - var gesture = update.gesture; - gesture.count--; - if (0 === gesture.count) { - var cancelDirectionSubscription = gesture.cancel; - cancelDirectionSubscription(); - deleteScheduledGesture(root, gesture); - cancelDirectionSubscription = gesture.running; - if (null !== cancelDirectionSubscription) { - var pendingLanesExcludingGestureLane = root.pendingLanes & -65; - 0 !== (pendingLanesExcludingGestureLane & 124) || - 0 !== (pendingLanesExcludingGestureLane & 4194048) - ? ((cancelDirectionSubscription = root.stoppingGestures), - null !== cancelDirectionSubscription && - ((gesture.next = cancelDirectionSubscription), - (cancelDirectionSubscription.prev = gesture)), - (root.stoppingGestures = gesture)) - : ((gesture.running = null), - cancelDirectionSubscription.skipTransition()); - } - } - }; - } - function mountSwipeTransition(previous, current) { - previous = { - pending: null, - dispatch: null, - initialDirection: previous === current - }; - var startGestureOnHook = (previous.dispatch = startGesture.bind( - null, - currentlyRenderingFiber, - previous - )); - mountWorkInProgressHook().queue = previous; - return [current, startGestureOnHook]; - } - function updateSwipeTransition(previous, current, next) { - var queue = updateWorkInProgressHook().queue, - startGestureOnHook = queue.dispatch, - rootRenderLanes = workInProgressRootRenderLanes, - value = current; - if (null !== queue.pending) { - if (64 === rootRenderLanes) { - rootRenderLanes = workInProgressRoot; - if (null === rootRenderLanes) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - rootRenderLanes = rootRenderLanes.pendingGestures; - if (null !== rootRenderLanes) - for (var update = queue.pending; null !== update; ) { - if (rootRenderLanes === update.gesture) { - value = rootRenderLanes.direction ? next : previous; - break; - } - update = update.next; - } - didReceiveUpdate = !0; - } - currentlyRenderingFiber.lanes |= 64; - } - queue.initialDirection = previous === current; - return [value, startGestureOnHook]; - } function warnOnInvalidCallback(callback) { if (null !== callback && "function" !== typeof callback) { var key = String(callback); @@ -10169,33 +10186,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2833; - var JSCompiler_object_inline_stack_2832 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2850; + var JSCompiler_object_inline_stack_2849 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2830 = !1; + var JSCompiler_object_inline_message_2847 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2833 = didSuspend) || - (JSCompiler_object_inline_componentStack_2833 = + (JSCompiler_object_inline_componentStack_2850 = didSuspend) || + (JSCompiler_object_inline_componentStack_2850 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2833 && - ((JSCompiler_object_inline_message_2830 = !0), + JSCompiler_object_inline_componentStack_2850 && + ((JSCompiler_object_inline_message_2847 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2833 = + JSCompiler_object_inline_componentStack_2850 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2830 + JSCompiler_object_inline_message_2847 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2831 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2848 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2831)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2848)) { c: { - var instance = JSCompiler_object_inline_digest_2831; + var instance = JSCompiler_object_inline_digest_2848; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -10237,87 +10254,87 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2831 + JSCompiler_object_inline_digest_2848 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2831 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2848 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2831 && - ((JSCompiler_object_inline_digest_2831 = - JSCompiler_object_inline_digest_2831.dehydrated), - null !== JSCompiler_object_inline_digest_2831) + null !== JSCompiler_object_inline_digest_2848 && + ((JSCompiler_object_inline_digest_2848 = + JSCompiler_object_inline_digest_2848.dehydrated), + null !== JSCompiler_object_inline_digest_2848) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2831) + isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2848) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2831 = - JSCompiler_object_inline_stack_2832.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2832.fallback; - if (JSCompiler_object_inline_message_2830) + JSCompiler_object_inline_digest_2848 = + JSCompiler_object_inline_stack_2849.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2849.fallback; + if (JSCompiler_object_inline_message_2847) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2832 = + (JSCompiler_object_inline_stack_2849 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2831, + JSCompiler_object_inline_digest_2848, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2830 = workInProgress.child), - (JSCompiler_object_inline_message_2830.memoizedState = + (JSCompiler_object_inline_message_2847 = workInProgress.child), + (JSCompiler_object_inline_message_2847.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2830.childLanes = + (JSCompiler_object_inline_message_2847.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2833, + JSCompiler_object_inline_componentStack_2850, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2832 + JSCompiler_object_inline_stack_2849 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2832.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2849.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2832 = + (JSCompiler_object_inline_stack_2849 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2831, + JSCompiler_object_inline_digest_2848, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2830 = workInProgress.child), - (JSCompiler_object_inline_message_2830.memoizedState = + (JSCompiler_object_inline_message_2847 = workInProgress.child), + (JSCompiler_object_inline_message_2847.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2830.childLanes = + (JSCompiler_object_inline_message_2847.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2833, + JSCompiler_object_inline_componentStack_2850, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2832 + JSCompiler_object_inline_stack_2849 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2831 + JSCompiler_object_inline_digest_2848 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2831 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2831) + ((JSCompiler_object_inline_digest_2848 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2848) ) { if (didSuspend) workInProgress.flags & 256 @@ -10334,94 +10351,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2830 = - JSCompiler_object_inline_stack_2832.fallback), - (JSCompiler_object_inline_digest_2831 = workInProgress.mode), - (JSCompiler_object_inline_stack_2832 = + (JSCompiler_object_inline_message_2847 = + JSCompiler_object_inline_stack_2849.fallback), + (JSCompiler_object_inline_digest_2848 = workInProgress.mode), + (JSCompiler_object_inline_stack_2849 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2832.children + children: JSCompiler_object_inline_stack_2849.children }, - JSCompiler_object_inline_digest_2831 + JSCompiler_object_inline_digest_2848 )), - (JSCompiler_object_inline_message_2830 = + (JSCompiler_object_inline_message_2847 = createFiberFromFragment( - JSCompiler_object_inline_message_2830, - JSCompiler_object_inline_digest_2831, + JSCompiler_object_inline_message_2847, + JSCompiler_object_inline_digest_2848, renderLanes, null )), - (JSCompiler_object_inline_message_2830.flags |= 2), - (JSCompiler_object_inline_stack_2832.return = workInProgress), - (JSCompiler_object_inline_message_2830.return = workInProgress), - (JSCompiler_object_inline_stack_2832.sibling = - JSCompiler_object_inline_message_2830), - (workInProgress.child = JSCompiler_object_inline_stack_2832), + (JSCompiler_object_inline_message_2847.flags |= 2), + (JSCompiler_object_inline_stack_2849.return = workInProgress), + (JSCompiler_object_inline_message_2847.return = workInProgress), + (JSCompiler_object_inline_stack_2849.sibling = + JSCompiler_object_inline_message_2847), + (workInProgress.child = JSCompiler_object_inline_stack_2849), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2832 = workInProgress.child), - (JSCompiler_object_inline_stack_2832.memoizedState = + (JSCompiler_object_inline_stack_2849 = workInProgress.child), + (JSCompiler_object_inline_stack_2849.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2832.childLanes = + (JSCompiler_object_inline_stack_2849.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2833, + JSCompiler_object_inline_componentStack_2850, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2830)); + (workInProgress = JSCompiler_object_inline_message_2847)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2831)) + isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2848)) ) { - JSCompiler_object_inline_componentStack_2833 = - JSCompiler_object_inline_digest_2831.nextSibling && - JSCompiler_object_inline_digest_2831.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2833) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2833.dgst; - var message = JSCompiler_object_inline_componentStack_2833.msg; - instance = JSCompiler_object_inline_componentStack_2833.stck; + JSCompiler_object_inline_componentStack_2850 = + JSCompiler_object_inline_digest_2848.nextSibling && + JSCompiler_object_inline_digest_2848.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2850) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2850.dgst; + var message = JSCompiler_object_inline_componentStack_2850.msg; + instance = JSCompiler_object_inline_componentStack_2850.stck; var componentStack = - JSCompiler_object_inline_componentStack_2833.cstck; + JSCompiler_object_inline_componentStack_2850.cstck; } - JSCompiler_object_inline_message_2830 = message; - JSCompiler_object_inline_digest_2831 = JSCompiler_temp; - JSCompiler_object_inline_stack_2832 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2833 = + JSCompiler_object_inline_message_2847 = message; + JSCompiler_object_inline_digest_2848 = JSCompiler_temp; + JSCompiler_object_inline_stack_2849 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2850 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2831 && - ((JSCompiler_object_inline_componentStack_2833 = - JSCompiler_object_inline_message_2830 - ? Error(JSCompiler_object_inline_message_2830) + "POSTPONE" !== JSCompiler_object_inline_digest_2848 && + ((JSCompiler_object_inline_componentStack_2850 = + JSCompiler_object_inline_message_2847 + ? Error(JSCompiler_object_inline_message_2847) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_componentStack_2833.stack = - JSCompiler_object_inline_stack_2832 || ""), - (JSCompiler_object_inline_componentStack_2833.digest = - JSCompiler_object_inline_digest_2831), - (JSCompiler_object_inline_stack_2832 = + (JSCompiler_object_inline_componentStack_2850.stack = + JSCompiler_object_inline_stack_2849 || ""), + (JSCompiler_object_inline_componentStack_2850.digest = + JSCompiler_object_inline_digest_2848), + (JSCompiler_object_inline_stack_2849 = void 0 === JSCompiler_temp ? null : JSCompiler_temp), - (JSCompiler_object_inline_message_2830 = { - value: JSCompiler_object_inline_componentStack_2833, + (JSCompiler_object_inline_message_2847 = { + value: JSCompiler_object_inline_componentStack_2850, source: null, - stack: JSCompiler_object_inline_stack_2832 + stack: JSCompiler_object_inline_stack_2849 }), - "string" === typeof JSCompiler_object_inline_stack_2832 && + "string" === typeof JSCompiler_object_inline_stack_2849 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2833, - JSCompiler_object_inline_message_2830 + JSCompiler_object_inline_componentStack_2850, + JSCompiler_object_inline_message_2847 ), - queueHydrationError(JSCompiler_object_inline_message_2830)); + queueHydrationError(JSCompiler_object_inline_message_2847)); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -10435,44 +10452,44 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2833 = + (JSCompiler_object_inline_componentStack_2850 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2833) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2850) ) { - JSCompiler_object_inline_componentStack_2833 = workInProgressRoot; + JSCompiler_object_inline_componentStack_2850 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_componentStack_2833 && - ((JSCompiler_object_inline_stack_2832 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2832 = - 0 !== (JSCompiler_object_inline_stack_2832 & 42) + null !== JSCompiler_object_inline_componentStack_2850 && + ((JSCompiler_object_inline_stack_2849 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2849 = + 0 !== (JSCompiler_object_inline_stack_2849 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2832 + JSCompiler_object_inline_stack_2849 )), - (JSCompiler_object_inline_stack_2832 = + (JSCompiler_object_inline_stack_2849 = 0 !== - (JSCompiler_object_inline_stack_2832 & - (JSCompiler_object_inline_componentStack_2833.suspendedLanes | + (JSCompiler_object_inline_stack_2849 & + (JSCompiler_object_inline_componentStack_2850.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2832), - 0 !== JSCompiler_object_inline_stack_2832 && - JSCompiler_object_inline_stack_2832 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2849), + 0 !== JSCompiler_object_inline_stack_2849 && + JSCompiler_object_inline_stack_2849 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2832), + ((prevState.retryLane = JSCompiler_object_inline_stack_2849), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2832 + JSCompiler_object_inline_stack_2849 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2833, + JSCompiler_object_inline_componentStack_2850, current, - JSCompiler_object_inline_stack_2832 + JSCompiler_object_inline_stack_2849 ), SelectiveHydrationException) ); - JSCompiler_object_inline_digest_2831.data === + JSCompiler_object_inline_digest_2848.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -10480,14 +10497,14 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2831.data === + JSCompiler_object_inline_digest_2848.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2831.nextSibling + JSCompiler_object_inline_digest_2848.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -10505,54 +10522,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2832.children + JSCompiler_object_inline_stack_2849.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2830) + if (JSCompiler_object_inline_message_2847) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2830 = - JSCompiler_object_inline_stack_2832.fallback), - (JSCompiler_object_inline_digest_2831 = workInProgress.mode), + (JSCompiler_object_inline_message_2847 = + JSCompiler_object_inline_stack_2849.fallback), + (JSCompiler_object_inline_digest_2848 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2832 = createWorkInProgress( + (JSCompiler_object_inline_stack_2849 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2832.children + children: JSCompiler_object_inline_stack_2849.children } )), - (JSCompiler_object_inline_stack_2832.subtreeFlags = + (JSCompiler_object_inline_stack_2849.subtreeFlags = JSCompiler_temp.subtreeFlags & 65011712), null !== instance - ? (JSCompiler_object_inline_message_2830 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2847 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2830 + JSCompiler_object_inline_message_2847 )) - : ((JSCompiler_object_inline_message_2830 = createFiberFromFragment( - JSCompiler_object_inline_message_2830, - JSCompiler_object_inline_digest_2831, + : ((JSCompiler_object_inline_message_2847 = createFiberFromFragment( + JSCompiler_object_inline_message_2847, + JSCompiler_object_inline_digest_2848, renderLanes, null )), - (JSCompiler_object_inline_message_2830.flags |= 2)), - (JSCompiler_object_inline_message_2830.return = workInProgress), - (JSCompiler_object_inline_stack_2832.return = workInProgress), - (JSCompiler_object_inline_stack_2832.sibling = - JSCompiler_object_inline_message_2830), - (workInProgress.child = JSCompiler_object_inline_stack_2832), - (JSCompiler_object_inline_stack_2832 = - JSCompiler_object_inline_message_2830), - (JSCompiler_object_inline_message_2830 = workInProgress.child), - (JSCompiler_object_inline_digest_2831 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2831 - ? (JSCompiler_object_inline_digest_2831 = + (JSCompiler_object_inline_message_2847.flags |= 2)), + (JSCompiler_object_inline_message_2847.return = workInProgress), + (JSCompiler_object_inline_stack_2849.return = workInProgress), + (JSCompiler_object_inline_stack_2849.sibling = + JSCompiler_object_inline_message_2847), + (workInProgress.child = JSCompiler_object_inline_stack_2849), + (JSCompiler_object_inline_stack_2849 = + JSCompiler_object_inline_message_2847), + (JSCompiler_object_inline_message_2847 = workInProgress.child), + (JSCompiler_object_inline_digest_2848 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2848 + ? (JSCompiler_object_inline_digest_2848 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2831.cachePool), + JSCompiler_object_inline_digest_2848.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -10560,38 +10577,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2831 = { + (JSCompiler_object_inline_digest_2848 = { baseLanes: - JSCompiler_object_inline_digest_2831.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2848.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2830.memoizedState = - JSCompiler_object_inline_digest_2831), - (JSCompiler_object_inline_message_2830.childLanes = + (JSCompiler_object_inline_message_2847.memoizedState = + JSCompiler_object_inline_digest_2848), + (JSCompiler_object_inline_message_2847.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2833, + JSCompiler_object_inline_componentStack_2850, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2832 + JSCompiler_object_inline_stack_2849 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2832.children + children: JSCompiler_object_inline_stack_2849.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2833 = + ((JSCompiler_object_inline_componentStack_2850 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2833 + null === JSCompiler_object_inline_componentStack_2850 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2833.push(current)); + : JSCompiler_object_inline_componentStack_2850.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -13046,7 +13063,8 @@ if (5 === tag || 6 === tag) { var stateNode = node.stateNode; before - ? ((parent = + ? (warnForReactChildrenConflict(parent), + (parent = 9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName @@ -13055,20 +13073,20 @@ supportsMoveBefore && null !== stateNode.parentNode ? parent.moveBefore(stateNode, before) : parent.insertBefore(stateNode, before)) - : ((before = parent), - (parent = - 9 === before.nodeType - ? before.body - : "HTML" === before.nodeName - ? before.ownerDocument.body - : before), + : (warnForReactChildrenConflict(parent), + (before = + 9 === parent.nodeType + ? parent.body + : "HTML" === parent.nodeName + ? parent.ownerDocument.body + : parent), supportsMoveBefore && null !== stateNode.parentNode - ? parent.moveBefore(stateNode, null) - : parent.appendChild(stateNode), - (stateNode = before._reactRootContainer), + ? before.moveBefore(stateNode, null) + : before.appendChild(stateNode), + (stateNode = parent._reactRootContainer), (null !== stateNode && void 0 !== stateNode) || - null !== parent.onclick || - (parent.onclick = noop$2)); + null !== before.onclick || + (before.onclick = noop$2)); 5 === tag && null === node.alternate && null !== parentFragmentInstances && @@ -14770,13 +14788,16 @@ root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: - current = currentHoistableRoot; + current = pushMutationContext(); + flags = currentHoistableRoot; currentHoistableRoot = getHoistableRoot( finishedWork.stateNode.containerInfo ); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); - currentHoistableRoot = current; + currentHoistableRoot = flags; + viewTransitionMutationContext && (rootViewTransitionAffected = !0); + viewTransitionMutationContext = current; break; case 12: current = pushNestedEffectDurations(); @@ -14976,7 +14997,10 @@ viewTransitionContextChanged$1 = !1; pushViewTransitionCancelableScope(); recursivelyTraverseAfterMutationEffects(root, finishedWork); - if (!viewTransitionContextChanged$1) { + if ( + !viewTransitionContextChanged$1 && + !rootViewTransitionAffected + ) { finishedWork = viewTransitionCancelableChildren; if (null !== finishedWork) for (var i = 0; i < finishedWork.length; i += 3) @@ -14992,6 +15016,13 @@ case 5: recursivelyTraverseAfterMutationEffects(root, finishedWork); break; + case 4: + i = viewTransitionContextChanged$1; + viewTransitionContextChanged$1 = !1; + recursivelyTraverseAfterMutationEffects(root, finishedWork); + viewTransitionContextChanged$1 && (rootViewTransitionAffected = !0); + viewTransitionContextChanged$1 = i; + break; case 22: null === finishedWork.memoizedState && (null !== current.memoizedState @@ -16187,7 +16218,7 @@ ); finishedWork.flags & 4 && console.error( - "useSwipeTransition() caused something to render a new <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't mount any new <%s> elements.", + "startGestureTransition() caused something to render a new <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't mount any new <%s> elements.", finishedWork.type, finishedWork.type ); @@ -16424,7 +16455,7 @@ ), viewTransitionMutationContext && console.error( - "useSwipeTransition() caused something to mutate <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't update any state which causes <%s> to change.", + "startGestureTransition() caused something to mutate <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't update any state which causes <%s> to change.", deletions.type, deletions.type ), @@ -16682,12 +16713,17 @@ ) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; var transition = ReactSharedInternals.T; - return null !== transition - ? (transition._updatedFibers || (transition._updatedFibers = new Set()), - transition._updatedFibers.add(fiber), - (fiber = currentEntangledLane), - 0 !== fiber ? fiber : requestTransitionLane()) - : resolveUpdatePriority(); + if (null !== transition) { + if (transition.gesture) + throw Error( + "Cannot setState on regular state inside a startGestureTransition. Gestures can only update the useOptimistic() hook. There should be no side-effects associated with starting a Gesture until its Action is invoked. Move side-effects to the Action instead." + ); + transition._updatedFibers || (transition._updatedFibers = new Set()); + transition._updatedFibers.add(fiber); + fiber = currentEntangledLane; + return 0 !== fiber ? fiber : requestTransitionLane(); + } + return resolveUpdatePriority(); } function requestDeferredLane() { 0 === workInProgressDeferredLane && @@ -17987,8 +18023,7 @@ else { pendingViewTransitionEvents = null; (lanes & 335544064) === lanes - ? ((pendingTransitionTypes = ReactSharedInternals.V), - (ReactSharedInternals.V = null), + ? ((pendingTransitionTypes = claimQueuedTransitionTypes(root)), (recoverableErrors = 10262)) : ((pendingTransitionTypes = null), (recoverableErrors = 10256)); 0 !== finishedWork.actualDuration || @@ -18084,6 +18119,7 @@ try { inProgressLanes = lanes; inProgressRoot = root; + rootViewTransitionAffected = !1; resetComponentEffectTimers(); commitMutationEffectsOnFiber(finishedWork, root, lanes); inProgressRoot = inProgressLanes = null; @@ -18383,7 +18419,7 @@ didWarnForRootClone || ((didWarnForRootClone = !0), console.warn( - "useSwipeTransition() caused something to mutate or relayout the root. This currently requires a clone of the whole document. Make sure to add a directly around an absolutely positioned DOM node to minimize the impact of any changes caused by the Swipe Transition." + "startGestureTransition() caused something to mutate or relayout the root. This currently requires a clone of the whole document. Make sure to add a directly around an absolutely positioned DOM node to minimize the impact of any changes caused by the Gesture Transition." )); var rootContainer = root.containerInfo, documentElement = @@ -18402,7 +18438,7 @@ var containerParent = containerInstance.parentNode; if (null === containerParent) throw Error( - "Cannot use a useSwipeTransition() in a detached root." + "Cannot use a startGestureTransition() on a detached root." ); var clone = containerInstance.cloneNode(!1), computedStyle = getComputedStyle(containerInstance); @@ -18510,16 +18546,14 @@ (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } - pendingTransitionTypes = null; + pendingTransitionTypes = finishedGesture.types; pendingEffectsStatus = PENDING_GESTURE_MUTATION_PHASE; pendingViewTransition = finishedGesture.running = startGestureTransition( root.containerInfo, finishedGesture.provider, - finishedGesture.rangeCurrent, - finishedGesture.direction - ? finishedGesture.rangeNext - : finishedGesture.rangePrevious, + finishedGesture.rangeStart, + finishedGesture.rangeEnd, pendingTransitionTypes, flushGestureMutations, flushGestureAnimations, @@ -18555,7 +18589,7 @@ var containerParent = containerInstance.parentNode; if (null === containerParent) throw Error( - "Cannot use a useSwipeTransition() in a detached root." + "Cannot use a startGestureTransition() on a detached root." ); containerParent.removeChild(rootClone); containerInstance.style.viewTransitionName = "root"; @@ -22463,6 +22497,30 @@ ? parentInstance.moveBefore(child, null) : parentInstance.appendChild(child); } + function warnForReactChildrenConflict(container) { + if (!container.__reactWarnedAboutChildrenConflict) { + var props = container[internalPropsKey] || null; + if (null !== props) { + var fiber = getInstanceFromNode(container); + null !== fiber && + ("string" === typeof props.children || + "number" === typeof props.children + ? ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + })) + : null != props.dangerouslySetInnerHTML && + ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + }))); + } + } + } function isSingletonScope(type) { return "head" === type; } @@ -22779,7 +22837,7 @@ (error = customizeViewTransitionError(error, !1)), null !== error && errorCallback(error); } finally { - spawnedWorkCallback(); + mutationCallback(), layoutCallback(), spawnedWorkCallback(); } }); transition.finished.finally(function () { @@ -22889,65 +22947,89 @@ animations = documentElement.getAnimations({ subtree: !0 }), foundGroups = new Set(), foundNews = new Set(), + longestDuration = 0, i = 0; i < animations.length; i++ ) { - var pseudoElement = animations[i].effect.pseudoElement; + var effect = animations[i].effect, + pseudoElement = effect.pseudoElement; null != pseudoElement && - (pseudoElement.startsWith("::view-transition-group") + pseudoElement.startsWith("::view-transition") && + ((effect = effect.getTiming()), + (effect = + effect.delay + + ("number" === typeof effect.duration ? effect.duration : 0)), + effect > longestDuration && (longestDuration = effect), + pseudoElement.startsWith("::view-transition-group") ? foundGroups.add(pseudoElement.slice(23)) : pseudoElement.startsWith("::view-transition-new") && foundNews.add(pseudoElement.slice(21))); } + longestDuration = (rangeEnd - rangeStart) / longestDuration; for (i = 0; i < animations.length; i++) { var anim = animations[i]; - if ("running" === anim.playState) { - pseudoElement = anim.effect; - var _pseudoElement = pseudoElement.pseudoElement; - if ( - null != _pseudoElement && - _pseudoElement.startsWith("::view-transition") && - pseudoElement.target === documentElement - ) { - anim.cancel(); - var isGeneratedGroupAnim = !1, - isExitGroupAnim = !1; - if (_pseudoElement.startsWith("::view-transition-group")) { - var groupName = _pseudoElement.slice(23); - foundNews.has(groupName) - ? ((anim = anim.animationName), - (isGeneratedGroupAnim = - null != anim && - anim.startsWith("-ua-view-transition-group-anim-"))) - : (isExitGroupAnim = !0); - } - animateGesture( - pseudoElement.getKeyframes(), - pseudoElement.target, - _pseudoElement, - timeline, - rangeStart, - rangeEnd, - isGeneratedGroupAnim, - isExitGroupAnim - ); - _pseudoElement.startsWith("::view-transition-old") && - ((_pseudoElement = _pseudoElement.slice(21)), - foundGroups.has(_pseudoElement) || - foundNews.has(_pseudoElement) || - (foundGroups.add(_pseudoElement), - animateGesture( - [{}, {}], - pseudoElement.target, - "::view-transition-group" + _pseudoElement, - timeline, - rangeStart, - rangeEnd, - !1, - !0 - ))); + if ( + "running" === anim.playState && + ((pseudoElement = anim.effect), + (effect = pseudoElement.pseudoElement), + null != effect && + effect.startsWith("::view-transition") && + pseudoElement.target === documentElement) + ) { + anim.cancel(); + var isGeneratedGroupAnim = !1, + isExitGroupAnim = !1; + if (effect.startsWith("::view-transition-group")) { + var groupName = effect.slice(23); + foundNews.has(groupName) + ? ((isGeneratedGroupAnim = anim.animationName), + (isGeneratedGroupAnim = + null != isGeneratedGroupAnim && + isGeneratedGroupAnim.startsWith( + "-ua-view-transition-group-anim-" + ))) + : (isExitGroupAnim = !0); } + var _timing = pseudoElement.getTiming(); + anim = + rangeEnd - + (("number" === typeof _timing.duration + ? _timing.duration + : 0) + + _timing.delay) * + longestDuration; + groupName = rangeEnd - _timing.delay * longestDuration; + if ( + "reverse" === _timing.direction || + "alternate-reverse" === _timing.direction + ) + (_timing = anim), (anim = groupName), (groupName = _timing); + animateGesture( + pseudoElement.getKeyframes(), + pseudoElement.target, + effect, + timeline, + anim, + groupName, + isGeneratedGroupAnim, + isExitGroupAnim + ); + effect.startsWith("::view-transition-old") && + ((effect = effect.slice(21)), + foundGroups.has(effect) || + foundNews.has(effect) || + (foundGroups.add(effect), + animateGesture( + [{}, {}], + pseudoElement.target, + "::view-transition-group" + effect, + timeline, + rangeStart, + rangeEnd, + !1, + !0 + ))); } } documentElement @@ -22969,7 +23051,7 @@ (error = customizeViewTransitionError(error, !0)), null !== error && errorCallback(error); } finally { - readyCallback(); + mutationCallback(), animateCallback(); } }); transition.finished.finally(function () { @@ -22995,50 +23077,6 @@ new: new ViewTransitionPseudoElement("new", name) }; } - function getCurrentGestureOffset(provider) { - provider = provider.currentTime; - if (null === provider) - throw Error( - "Cannot start a gesture with a disconnected AnimationTimeline." - ); - return "number" === typeof provider ? provider : provider.value; - } - function subscribeToGestureDirection( - provider, - currentOffset, - directionCallback - ) { - function rafCallback() { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && - directionCallback(newTime > currentOffset)); - callbackID = requestAnimationFrame(rafCallback); - } - if ( - "function" === typeof ScrollTimeline && - provider instanceof ScrollTimeline - ) { - var element = provider.source, - scrollCallback = function () { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = - "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && - directionCallback(newTime > currentOffset)); - }; - element.addEventListener("scroll", scrollCallback, !1); - return function () { - element.removeEventListener("scroll", scrollCallback, !1); - }; - } - var callbackID = requestAnimationFrame(rafCallback); - return function () { - cancelAnimationFrame(callbackID); - }; - } function FragmentInstance(fragmentFiber) { this._fragmentFiber = fragmentFiber; this._observers = this._eventListeners = null; @@ -24176,7 +24214,11 @@ this.pooledCache = null; this.pooledCacheLanes = 0; this.formState = formState; - this.gestureClone = this.stoppingGestures = this.pendingGestures = null; + this.gestureClone = + this.stoppingGestures = + this.pendingGestures = + this.transitionTypes = + null; this.incompleteTransitions = new Map(); this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); @@ -24982,6 +25024,23 @@ contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), + disabledDepth = 0, + prevLog, + prevInfo, + prevWarn, + prevError, + prevGroup, + prevGroupCollapsed, + prevGroupEnd; + disabledLog.__reactDisabledLog = !0; + var prefix, + suffix, + reentry = !1; + var componentFrameCache = new ( + "function" === typeof WeakMap ? WeakMap : Map + )(); + var current = null, + isRendering = !1, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -25037,23 +25096,6 @@ illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, viewTransitionMutationContext = !1, - disabledDepth = 0, - prevLog, - prevInfo, - prevWarn, - prevError, - prevGroup, - prevGroupCollapsed, - prevGroupEnd; - disabledLog.__reactDisabledLog = !0; - var prefix, - suffix, - reentry = !1; - var componentFrameCache = new ( - "function" === typeof WeakMap ? WeakMap : Map - )(); - var current = null, - isRendering = !1, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = !1, didWarnCheckedDefaultChecked = !1, @@ -26375,6 +26417,7 @@ _currentRenderer: null, _currentRenderer2: null }, + entangledTransitionTypes = null, now = Scheduler.unstable_now, renderStartTime = -0, commitStartTime = -0, @@ -26429,9 +26472,51 @@ } entangleAsyncAction(transition, returnValue); } + if (null !== entangledTransitionTypes) + for (newEventTime = firstScheduledRoot; null !== newEventTime; ) + queueTransitionTypes(newEventTime, entangledTransitionTypes), + (newEventTime = newEventTime.next); + newEventTime = transition.types; + if (null !== newEventTime) { + for (newEventType = firstScheduledRoot; null !== newEventType; ) + queueTransitionTypes(newEventType, newEventTime), + (newEventType = newEventType.next); + if (0 !== currentEntangledLane) { + newEventType = entangledTransitionTypes; + null === newEventType && + (newEventType = entangledTransitionTypes = []); + for (var i = 0; i < newEventTime.length; i++) { + var transitionType = newEventTime[i]; + -1 === newEventType.indexOf(transitionType) && + newEventType.push(transitionType); + } + } + } null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue); }; + var prevOnStartGestureTransitionFinish = ReactSharedInternals.G; + ReactSharedInternals.G = function (transition, provider, options) { + var cancel = null; + null !== prevOnStartGestureTransitionFinish && + (cancel = prevOnStartGestureTransitionFinish( + transition, + provider, + options + )); + for (var root = firstScheduledRoot; null !== root; ) { + var scheduledGesture = startScheduledGesture( + root, + provider, + options, + transition.types + ); + null !== scheduledGesture && + (cancel = chainGestureCancellation(root, scheduledGesture, cancel)); + root = root.next; + } + return null !== cancel ? cancel : function () {}; + }; var resumedCache = createCursor(null), ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, @@ -26887,7 +26972,6 @@ useCacheRefresh: throwInvalidHookError }; ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; - ContextOnlyDispatcher.useSwipeTransition = throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -27033,11 +27117,6 @@ currentHookNameInDev = "useEffectEvent"; mountHookTypesDev(); return mountEvent(callback); - }, - useSwipeTransition: function (previous, current) { - currentHookNameInDev = "useSwipeTransition"; - mountHookTypesDev(); - return mountSwipeTransition(previous, current); } }; HooksDispatcherOnMountWithHookTypesInDEV = { @@ -27172,11 +27251,6 @@ currentHookNameInDev = "useEffectEvent"; updateHookTypesDev(); return mountEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; HooksDispatcherOnUpdateInDEV = { @@ -27311,11 +27385,6 @@ currentHookNameInDev = "useEffectEvent"; updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; HooksDispatcherOnRerenderInDEV = { @@ -27450,11 +27519,6 @@ currentHookNameInDev = "useEffectEvent"; updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; InvalidNestedHooksDispatcherOnMountInDEV = { @@ -27614,12 +27678,6 @@ warnInvalidHookAccess(); mountHookTypesDev(); return mountEvent(callback); - }, - useSwipeTransition: function (previous, current) { - currentHookNameInDev = "useSwipeTransition"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountSwipeTransition(previous, current); } }; InvalidNestedHooksDispatcherOnUpdateInDEV = { @@ -27779,12 +27837,6 @@ warnInvalidHookAccess(); updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; InvalidNestedHooksDispatcherOnRerenderInDEV = { @@ -27944,12 +27996,6 @@ warnInvalidHookAccess(); updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; var fakeInternalInstance = {}; @@ -28075,6 +28121,7 @@ inProgressLanes = null, inProgressRoot = null, viewTransitionContextChanged$1 = !1, + rootViewTransitionAffected = !1, hostParent = null, hostParentIsContainer = !1, currentHoistableRoot = null, @@ -28917,11 +28964,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -28958,10 +29005,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-experimental-63779030-20250328", + version: "19.2.0-experimental-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-63779030-20250328" + reconcilerVersion: "19.2.0-experimental-040f8286-20250402" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -29433,7 +29480,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js index ddab11b155622..ee3f28abbe52e 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js @@ -386,6 +386,196 @@ function popHostContext(fiber) { (pop(hostTransitionProviderCursor), (HostTransitionContext._currentValue = sharedNotPendingObject)); } +var prefix, suffix; +function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; + } + return "\n" + prefix + name + suffix; +} +var reentry = !1; +function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + reentry = !0; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$1) { + control = x$1; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$2) { + control = x$2; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } + ); + var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + namePropDescriptor = RunInRootFrame = 0; + RunInRootFrame < sampleLines.length && + !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); + + ) + RunInRootFrame++; + for ( + ; + namePropDescriptor < controlLines.length && + !controlLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); + + ) + namePropDescriptor++; + if ( + RunInRootFrame === sampleLines.length || + namePropDescriptor === controlLines.length + ) + for ( + RunInRootFrame = sampleLines.length - 1, + namePropDescriptor = controlLines.length - 1; + 1 <= RunInRootFrame && + 0 <= namePropDescriptor && + sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; + + ) + namePropDescriptor--; + for ( + ; + 1 <= RunInRootFrame && 0 <= namePropDescriptor; + RunInRootFrame--, namePropDescriptor-- + ) + if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { + if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { + do + if ( + (RunInRootFrame--, + namePropDescriptor--, + 0 > namePropDescriptor || + sampleLines[RunInRootFrame] !== + controlLines[namePropDescriptor]) + ) { + var frame = + "\n" + + sampleLines[RunInRootFrame].replace(" at new ", " at "); + fn.displayName && + frame.includes("") && + (frame = frame.replace("", fn.displayName)); + return frame; + } + while (1 <= RunInRootFrame && 0 <= namePropDescriptor); + } + break; + } + } + } finally { + (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); + } + return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(previousPrepareStackTrace) + : ""; +} +function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + case 30: + return describeBuiltInComponentFrame("ViewTransition"); + default: + return ""; + } +} +function getStackByFiberInDevAndProd(workInProgress) { + try { + var info = ""; + do + (info += describeFiber(workInProgress)), + (workInProgress = workInProgress.return); + while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } +} var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -608,18 +798,18 @@ function markRootFinished( 0 < remainingLanes; ) { - var index$5 = 31 - clz32(remainingLanes), - lane = 1 << index$5; - entanglements[index$5] = 0; - expirationTimes[index$5] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$5]; + var index$7 = 31 - clz32(remainingLanes), + lane = 1 << index$7; + entanglements[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$5] = null, index$5 = 0; - index$5 < hiddenUpdatesForLane.length; - index$5++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$5]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } remainingLanes &= ~lane; @@ -644,10 +834,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$6 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$6; - (lane & entangledLanes) | (root[index$6] & entangledLanes) && - (root[index$6] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -693,9 +883,9 @@ function getBumpedLaneForHydrationByLane(lane) { function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - root[index$8].add(fiber); + var index$10 = 31 - clz32(lanes), + lane = 1 << index$10; + root[index$10].add(fiber); lanes &= ~lane; } } @@ -707,16 +897,16 @@ function movePendingFibersToMemoized(root, lanes) { 0 < lanes; ) { - var index$9 = 31 - clz32(lanes); - root = 1 << index$9; - index$9 = pendingUpdatersLaneMap[index$9]; - 0 < index$9.size && - (index$9.forEach(function (fiber) { + var index$11 = 31 - clz32(lanes); + root = 1 << index$11; + index$11 = pendingUpdatersLaneMap[index$11]; + 0 < index$11.size && + (index$11.forEach(function (fiber) { var alternate = fiber.alternate; (null !== alternate && memoizedUpdaters.has(alternate)) || memoizedUpdaters.add(fiber); }), - index$9.clear()); + index$11.clear()); lanes &= ~root; } } @@ -855,244 +1045,54 @@ var viewTransitionMutationContext = !1; function pushMutationContext() { var prev = viewTransitionMutationContext; viewTransitionMutationContext = !1; - return prev; -} -function setValueForAttribute(node, name, value) { - if (isAttributeNameSafe(name)) - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix$10 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$10 && "aria-" !== prefix$10) { - node.removeAttribute(name); - return; - } - } - node.setAttribute(name, "" + value); - } -} -function setValueForKnownAttribute(node, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - node.setAttribute(name, "" + value); - } -} -function setValueForNamespacedAttribute(node, namespace, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - node.setAttributeNS(namespace, name, "" + value); - } -} -var prefix, suffix; -function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; - } - return "\n" + prefix + name + suffix; -} -var reentry = !1; -function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - reentry = !0; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$11) { - control = x$11; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$12) { - control = x$12; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - namePropDescriptor = RunInRootFrame = 0; - RunInRootFrame < sampleLines.length && - !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); - - ) - RunInRootFrame++; - for ( - ; - namePropDescriptor < controlLines.length && - !controlLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); - - ) - namePropDescriptor++; - if ( - RunInRootFrame === sampleLines.length || - namePropDescriptor === controlLines.length - ) - for ( - RunInRootFrame = sampleLines.length - 1, - namePropDescriptor = controlLines.length - 1; - 1 <= RunInRootFrame && - 0 <= namePropDescriptor && - sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; - - ) - namePropDescriptor--; - for ( - ; - 1 <= RunInRootFrame && 0 <= namePropDescriptor; - RunInRootFrame--, namePropDescriptor-- - ) - if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { - if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { - do - if ( - (RunInRootFrame--, - namePropDescriptor--, - 0 > namePropDescriptor || - sampleLines[RunInRootFrame] !== - controlLines[namePropDescriptor]) - ) { - var frame = - "\n" + - sampleLines[RunInRootFrame].replace(" at new ", " at "); - fn.displayName && - frame.includes("") && - (frame = frame.replace("", fn.displayName)); - return frame; - } - while (1 <= RunInRootFrame && 0 <= namePropDescriptor); - } - break; - } - } - } finally { - (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); - } - return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(previousPrepareStackTrace) - : ""; -} -function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - case 30: - return describeBuiltInComponentFrame("ViewTransition"); - default: - return ""; + return prev; +} +function setValueForAttribute(node, name, value) { + if (isAttributeNameSafe(name)) + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix$12 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$12 && "aria-" !== prefix$12) { + node.removeAttribute(name); + return; + } + } + node.setAttribute(name, "" + value); + } +} +function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + node.setAttribute(name, "" + value); } } -function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do - (info += describeFiber(workInProgress)), - (workInProgress = workInProgress.return); - while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; +function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + node.setAttributeNS(namespace, name, "" + value); } } function getToStringValue(value) { @@ -2458,11 +2458,6 @@ function enqueueConcurrentRenderForLane(fiber, lane) { enqueueUpdate$1(fiber, null, null, lane); return getRootForUpdatedFiber(fiber); } -function enqueueGestureRender(fiber) { - fiber = markUpdateLaneFromFiberToRoot(fiber, null, 64); - null !== fiber && markRootUpdated$1(fiber, 64); - return fiber; -} function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { sourceFiber.lanes |= lane; var alternate = sourceFiber.alternate; @@ -3456,6 +3451,22 @@ function releaseCache(cache) { cache.controller.abort(); }); } +function queueTransitionTypes(root, transitionTypes) { + if (0 !== (root.pendingLanes & 4194048)) { + var queued = root.transitionTypes; + null === queued && (queued = root.transitionTypes = []); + for (root = 0; root < transitionTypes.length; root++) { + var transitionType = transitionTypes[root]; + -1 === queued.indexOf(transitionType) && queued.push(transitionType); + } + } +} +var entangledTransitionTypes = null; +function claimQueuedTransitionTypes(root) { + var claimed = root.transitionTypes; + root.transitionTypes = null; + return claimed; +} var now = Scheduler.unstable_now, renderStartTime = -0, commitStartTime = -0, @@ -3613,6 +3624,7 @@ function pingEngtangledActionScope() { if ( 0 === --currentEntangledPendingCount && (-1 < transitionUpdateTime || (transitionStartTime = -1.1), + (entangledTransitionTypes = null), null !== currentEntangledListeners) ) { null !== currentEntangledActionThenable && @@ -3649,6 +3661,73 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } +function startScheduledGesture( + root, + gestureTimeline, + gestureOptions, + transitionTypes +) { + if (gestureOptions && null != gestureOptions.rangeStart) + var JSCompiler_temp = gestureOptions.rangeStart; + else { + JSCompiler_temp = gestureTimeline.currentTime; + if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(549)); + JSCompiler_temp = + "number" === typeof JSCompiler_temp + ? JSCompiler_temp + : JSCompiler_temp.value; + } + gestureOptions = + gestureOptions && null != gestureOptions.rangeEnd + ? gestureOptions.rangeEnd + : 50 > JSCompiler_temp + ? 100 + : 0; + for (root = root.pendingGestures; null !== root; ) { + if (root.provider === gestureTimeline) { + root.count++; + root.rangeStart = JSCompiler_temp; + root.rangeEnd = gestureOptions; + if (null !== transitionTypes) + for ( + gestureTimeline = root.types, + null === gestureTimeline && (gestureTimeline = root.types = []), + JSCompiler_temp = 0; + JSCompiler_temp < transitionTypes.length; + JSCompiler_temp++ + ) + (gestureOptions = transitionTypes[JSCompiler_temp]), + -1 === gestureTimeline.indexOf(gestureOptions) && + gestureTimeline.push(gestureOptions); + return root; + } + root = root.next; + if (null === root) break; + } + return null; +} +function deleteScheduledGesture(root, gesture) { + null === gesture.prev + ? (root.pendingGestures === gesture && + ((root.pendingGestures = gesture.next), + null === root.pendingGestures && (root.pendingLanes &= -65)), + root.stoppingGestures === gesture && + (root.stoppingGestures = gesture.next)) + : ((gesture.prev.next = gesture.next), + null !== gesture.next && (gesture.next.prev = gesture.prev), + (gesture.prev = null), + (gesture.next = null)); +} +function stopCompletedGestures(root) { + var gesture = root.stoppingGestures; + for (root.stoppingGestures = null; null !== gesture; ) + null !== gesture.running && + (gesture.running.skipTransition(), (gesture.running = null)), + (root = gesture.next), + (gesture.next = null), + (gesture.prev = null), + (gesture = root); +} var prevOnStartTransitionFinish = ReactSharedInternals.S; ReactSharedInternals.S = function (transition, returnValue) { if ( @@ -3670,9 +3749,74 @@ ReactSharedInternals.S = function (transition, returnValue) { } entangleAsyncAction(transition, returnValue); } + if (null !== entangledTransitionTypes) + for (newEventTime = firstScheduledRoot; null !== newEventTime; ) + queueTransitionTypes(newEventTime, entangledTransitionTypes), + (newEventTime = newEventTime.next); + newEventTime = transition.types; + if (null !== newEventTime) { + for (newEventType = firstScheduledRoot; null !== newEventType; ) + queueTransitionTypes(newEventType, newEventTime), + (newEventType = newEventType.next); + if (0 !== currentEntangledLane) { + newEventType = entangledTransitionTypes; + null === newEventType && (newEventType = entangledTransitionTypes = []); + for (var i = 0; i < newEventTime.length; i++) { + var transitionType = newEventTime[i]; + -1 === newEventType.indexOf(transitionType) && + newEventType.push(transitionType); + } + } + } null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue); }; +function chainGestureCancellation(root, scheduledGesture, prevCancel) { + return function () { + if ( + null !== scheduledGesture && + (scheduledGesture.count--, 0 === scheduledGesture.count) + ) { + deleteScheduledGesture(root, scheduledGesture); + var runningTransition = scheduledGesture.running; + if (null !== runningTransition) { + var pendingLanesExcludingGestureLane = root.pendingLanes & -65; + 0 !== (pendingLanesExcludingGestureLane & 124) || + 0 !== (pendingLanesExcludingGestureLane & 4194048) + ? ((runningTransition = root.stoppingGestures), + null !== runningTransition && + ((scheduledGesture.next = runningTransition), + (runningTransition.prev = scheduledGesture)), + (root.stoppingGestures = scheduledGesture)) + : ((scheduledGesture.running = null), + runningTransition.skipTransition()); + } + } + null !== prevCancel && prevCancel(); + }; +} +var prevOnStartGestureTransitionFinish = ReactSharedInternals.G; +ReactSharedInternals.G = function (transition, provider, options) { + var cancel = null; + null !== prevOnStartGestureTransitionFinish && + (cancel = prevOnStartGestureTransitionFinish( + transition, + provider, + options + )); + for (var root = firstScheduledRoot; null !== root; ) { + var scheduledGesture = startScheduledGesture( + root, + provider, + options, + transition.types + ); + null !== scheduledGesture && + (cancel = chainGestureCancellation(root, scheduledGesture, cancel)); + root = root.next; + } + return null !== cancel ? cancel : function () {}; +}; var resumedCache = createCursor(null); function peekCacheFromPool() { var cacheResumedFromPreviousRender = resumedCache.current; @@ -4847,76 +4991,6 @@ function findFirstSuspended(row) { } return null; } -function scheduleGesture( - root, - provider, - initialDirection, - rangePrevious, - rangeCurrent, - rangeNext -) { - for (var prev = root.pendingGestures; null !== prev; ) { - if (prev.provider === provider) return prev.count++, prev; - var next = prev.next; - if (null === next) break; - prev = next; - } - var isFlippedDirection = rangePrevious > rangeNext; - next = subscribeToGestureDirection( - provider, - rangeCurrent, - function (direction) { - isFlippedDirection && (direction = !direction); - gesture.direction !== direction && - ((gesture.direction = direction), - null === gesture.prev && - root.pendingGestures !== gesture && - ((direction = root.pendingGestures), - (gesture.next = direction), - null !== direction && (direction.prev = gesture), - (root.pendingGestures = gesture), - (root.pendingLanes |= 64), - ensureRootIsScheduled(root))); - } - ); - var gesture = { - provider: provider, - count: 1, - direction: initialDirection, - rangePrevious: rangePrevious, - rangeCurrent: rangeCurrent, - rangeNext: rangeNext, - cancel: next, - running: null, - prev: prev, - next: null - }; - null === prev ? (root.pendingGestures = gesture) : (prev.next = gesture); - ensureRootIsScheduled(root); - return gesture; -} -function deleteScheduledGesture(root, gesture) { - null === gesture.prev - ? (root.pendingGestures === gesture && - ((root.pendingGestures = gesture.next), - null === root.pendingGestures && (root.pendingLanes &= -65)), - root.stoppingGestures === gesture && - (root.stoppingGestures = gesture.next)) - : ((gesture.prev.next = gesture.next), - null !== gesture.next && (gesture.next.prev = gesture.prev), - (gesture.prev = null), - (gesture.next = null)); -} -function stopCompletedGestures(root) { - var gesture = root.stoppingGestures; - for (root.stoppingGestures = null; null !== gesture; ) - null !== gesture.running && - (gesture.running.skipTransition(), (gesture.running = null)), - (root = gesture.next), - (gesture.next = null), - (gesture.prev = null), - (gesture = root); -} var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, @@ -5183,37 +5257,70 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$65 = !1; + didReadFromEntangledAsyncAction$67 = !1; do { - var updateLane = update.lane & -536870913; - if ( - updateLane !== update.lane - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - var revertLane = update.revertLane; - if (0 === revertLane) + var updateLane = update.lane & -536870913, + shouldSkipUpdate = + updateLane !== update.lane + ? (workInProgressRootRenderLanes & updateLane) !== updateLane + : (renderLanes & updateLane) !== updateLane; + if (64 === updateLane) { + var scheduledGesture = update.gesture; + if (null !== scheduledGesture) + if (0 === scheduledGesture.count) { + update = update.next; + continue; + } else if (64 !== renderLanes) shouldSkipUpdate = !0; + else { + shouldSkipUpdate = workInProgressRoot; + if (null === shouldSkipUpdate) + throw Error(formatProdErrorMessage(349)); + shouldSkipUpdate = + shouldSkipUpdate.pendingGestures !== scheduledGesture; + } + } + if (shouldSkipUpdate) + (scheduledGesture = { + lane: updateLane, + revertLane: update.revertLane, + gesture: update.gesture, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), + null === newBaseQueueLast + ? ((newBaseQueueFirst = newBaseQueueLast = scheduledGesture), + (baseFirst = pendingQueue)) + : (newBaseQueueLast = newBaseQueueLast.next = scheduledGesture), + (currentlyRenderingFiber.lanes |= updateLane), + (workInProgressRootSkippedLanes |= updateLane); + else { + scheduledGesture = update.revertLane; + if (0 === scheduledGesture) null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$65 = !0); - else if ((renderLanes & revertLane) === revertLane) { + (didReadFromEntangledAsyncAction$67 = !0); + else if ((renderLanes & scheduledGesture) === scheduledGesture) { update = update.next; - revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$65 = !0); + scheduledGesture === currentEntangledLane && + (didReadFromEntangledAsyncAction$67 = !0); continue; } else (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -5223,29 +5330,15 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber.lanes |= revertLane), - (workInProgressRootSkippedLanes |= revertLane); + (currentlyRenderingFiber.lanes |= scheduledGesture), + (workInProgressRootSkippedLanes |= scheduledGesture); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane); - } else - (revertLane = { - lane: updateLane, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), - null === newBaseQueueLast - ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), - (baseFirst = pendingQueue)) - : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber.lanes |= updateLane), - (workInProgressRootSkippedLanes |= updateLane); + } update = update.next; } while (null !== update && update !== current); null === newBaseQueueLast @@ -5254,7 +5347,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$65 && + didReadFromEntangledAsyncAction$67 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -5440,6 +5533,9 @@ function runActionStateAction(actionQueue, node) { if (node.isTransition) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; ReactSharedInternals.T = currentTransition; try { var returnValue = action(prevState, payload), @@ -5450,14 +5546,17 @@ function runActionStateAction(actionQueue, node) { } catch (error) { onActionError(actionQueue, node, error); } finally { - ReactSharedInternals.T = prevTransition; + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), + (ReactSharedInternals.T = prevTransition); } } else try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$71) { - onActionError(actionQueue, node, error$71); + } catch (error$74) { + onActionError(actionQueue, node, error$74); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -5808,6 +5907,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); try { @@ -5846,6 +5948,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), (ReactSharedInternals.T = prevTransition); } } @@ -5902,8 +6007,11 @@ function ensureFormComponentIsStateful(formFiber) { return existingStateHook; } function requestFormReset$2(formFiber) { - var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; - dispatchSetStateInternal(formFiber, resetStateQueue, {}, requestUpdateLane()); + var transition = ReactSharedInternals.T; + if (null !== transition && transition.gesture) + throw Error(formatProdErrorMessage(555)); + transition = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetStateInternal(formFiber, transition, {}, requestUpdateLane()); } function useHostTransitionStatus() { return readContext(HostTransitionContext); @@ -5921,15 +6029,15 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$74 = enqueueUpdate(provider, fiber, lane); - null !== root$74 && + var root$77 = enqueueUpdate(provider, fiber, lane); + null !== root$77 && (startUpdateTimerByLane(lane), - scheduleUpdateOnFiber(root$74, provider, lane), - entangleTransitions(root$74, provider, lane)); + scheduleUpdateOnFiber(root$77, provider, lane), + entangleTransitions(root$77, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$74 && + null !== root$77 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -5942,6 +6050,7 @@ function dispatchReducerAction(fiber, queue, action) { action = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5964,6 +6073,7 @@ function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -6002,9 +6112,12 @@ function dispatchSetStateInternal(fiber, queue, action, lane) { return !1; } function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { + var transition = ReactSharedInternals.T, + lane = null !== transition && transition.gesture ? 64 : 2; action = { - lane: 2, + lane: lane, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -6012,16 +6125,47 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { }; if (isRenderPhaseUpdate(fiber)) { if (throwIfDuringRender) throw Error(formatProdErrorMessage(479)); - } else - (throwIfDuringRender = enqueueConcurrentHookUpdate( + } else if ( + ((throwIfDuringRender = enqueueConcurrentHookUpdate( fiber, queue, action, - 2 + lane )), - null !== throwIfDuringRender && - (startUpdateTimerByLane(2), - scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2)); + null !== throwIfDuringRender && + (startUpdateTimerByLane(lane), + scheduleUpdateOnFiber(throwIfDuringRender, fiber, lane), + null !== transition && + ((transition = transition.gesture), null !== transition))) + ) { + a: { + for (fiber = throwIfDuringRender.pendingGestures; null !== fiber; ) { + if (fiber.provider === transition) { + throwIfDuringRender = fiber; + break a; + } + lane = fiber.next; + if (null === lane) break; + fiber = lane; + } + transition = { + provider: transition, + count: 0, + rangeStart: 0, + rangeEnd: 100, + types: null, + running: null, + prev: fiber, + next: null + }; + null === fiber + ? (throwIfDuringRender.pendingGestures = transition) + : (fiber.next = transition); + ensureRootIsScheduled(throwIfDuringRender); + throwIfDuringRender = transition; + } + action.gesture = throwIfDuringRender; + } } function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; @@ -6048,93 +6192,6 @@ function entangleTransitionUpdate(root, queue, lane) { markRootEntangled(root, lane); } } -function startGesture(fiber, queue, gestureProvider, gestureOptions) { - var root = enqueueGestureRender(fiber); - if (null === root) return function () {}; - fiber = getCurrentGestureOffset(gestureProvider); - var range = gestureOptions && gestureOptions.range, - rangePrevious = range ? range[0] : 0, - rangeCurrent = range ? range[1] : fiber; - range = range ? range[2] : 100; - var isFlippedDirection = rangePrevious > range, - update = { - gesture: scheduleGesture( - root, - gestureProvider, - fiber < rangeCurrent - ? isFlippedDirection - : fiber > rangeCurrent - ? !isFlippedDirection - : gestureOptions && "next" === gestureOptions.direction - ? !0 - : gestureOptions && "previous" === gestureOptions.direction - ? !1 - : queue.initialDirection, - rangePrevious, - rangeCurrent, - range - ), - prev: null, - next: queue.pending - }; - null !== queue.pending && (queue.pending.prev = update); - queue.pending = update; - return function () { - if (null === update.prev) - if (queue.pending === update) queue.pending = update.next; - else return; - else - (update.prev.next = update.next), - null !== update.next && (update.next.prev = update.prev), - (update.prev = null), - (update.next = null); - var cancelledGestured = update.gesture; - cancelledGestured.count--; - if (0 === cancelledGestured.count) { - var cancelDirectionSubscription = cancelledGestured.cancel; - cancelDirectionSubscription(); - deleteScheduledGesture(root, cancelledGestured); - cancelDirectionSubscription = cancelledGestured.running; - if (null !== cancelDirectionSubscription) { - var pendingLanesExcludingGestureLane = root.pendingLanes & -65; - 0 !== (pendingLanesExcludingGestureLane & 124) || - 0 !== (pendingLanesExcludingGestureLane & 4194048) - ? ((cancelDirectionSubscription = root.stoppingGestures), - null !== cancelDirectionSubscription && - ((cancelledGestured.next = cancelDirectionSubscription), - (cancelDirectionSubscription.prev = cancelledGestured)), - (root.stoppingGestures = cancelledGestured)) - : ((cancelledGestured.running = null), - cancelDirectionSubscription.skipTransition()); - } - } - }; -} -function updateSwipeTransition(previous, current, next) { - var queue = updateWorkInProgressHook().queue, - startGestureOnHook = queue.dispatch, - rootRenderLanes = workInProgressRootRenderLanes, - value = current; - if (null !== queue.pending) { - if (64 === rootRenderLanes) { - rootRenderLanes = workInProgressRoot; - if (null === rootRenderLanes) throw Error(formatProdErrorMessage(349)); - rootRenderLanes = rootRenderLanes.pendingGestures; - if (null !== rootRenderLanes) - for (var update = queue.pending; null !== update; ) { - if (rootRenderLanes === update.gesture) { - value = rootRenderLanes.direction ? next : previous; - break; - } - update = update.next; - } - didReceiveUpdate = !0; - } - currentlyRenderingFiber.lanes |= 64; - } - queue.initialDirection = previous === current; - return [value, startGestureOnHook]; -} var ContextOnlyDispatcher = { readContext: readContext, use: use, @@ -6161,7 +6218,6 @@ var ContextOnlyDispatcher = { useCacheRefresh: throwInvalidHookError }; ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; -ContextOnlyDispatcher.useSwipeTransition = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -6351,20 +6407,6 @@ var HooksDispatcherOnMount = { throw Error(formatProdErrorMessage(440)); return ref.impl.apply(void 0, arguments); }; - }, - useSwipeTransition: function (previous, current) { - previous = { - pending: null, - dispatch: null, - initialDirection: previous === current - }; - var startGestureOnHook = (previous.dispatch = startGesture.bind( - null, - currentlyRenderingFiber, - previous - )); - mountWorkInProgressHook().queue = previous; - return [current, startGestureOnHook]; } }, HooksDispatcherOnUpdate = { @@ -6415,7 +6457,6 @@ var HooksDispatcherOnMount = { useCacheRefresh: updateRefresh }; HooksDispatcherOnUpdate.useEffectEvent = updateEvent; -HooksDispatcherOnUpdate.useSwipeTransition = updateSwipeTransition; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -6469,7 +6510,6 @@ var HooksDispatcherOnRerender = { useCacheRefresh: updateRefresh }; HooksDispatcherOnRerender.useEffectEvent = updateEvent; -HooksDispatcherOnRerender.useSwipeTransition = updateSwipeTransition; function applyDerivedStateFromProps( workInProgress, ctor, @@ -6564,9 +6604,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$79 in Component) - void 0 === newProps[propName$79] && - (newProps[propName$79] = Component[propName$79]); + for (var propName$81 in Component) + void 0 === newProps[propName$81] && + (newProps[propName$81] = Component[propName$81]); } return newProps; } @@ -6612,9 +6652,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$80) { + } catch (e$82) { setTimeout(function () { - throw e$80; + throw e$82; }); } } @@ -6625,9 +6665,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$81) { + } catch (e$83) { setTimeout(function () { - throw e$81; + throw e$83; }); } } @@ -8643,14 +8683,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$122 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$122 = lastTailNode), + for (var lastTailNode$124 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$124 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$122 + null === lastTailNode$124 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$122.sibling = null); + : (lastTailNode$124.sibling = null); } } function bubbleProperties(completedWork) { @@ -8662,53 +8702,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$124 = completedWork.selfBaseDuration, - child$125 = completedWork.child; - null !== child$125; + var treeBaseDuration$126 = completedWork.selfBaseDuration, + child$127 = completedWork.child; + null !== child$127; ) - (newChildLanes |= child$125.lanes | child$125.childLanes), - (subtreeFlags |= child$125.subtreeFlags & 65011712), - (subtreeFlags |= child$125.flags & 65011712), - (treeBaseDuration$124 += child$125.treeBaseDuration), - (child$125 = child$125.sibling); - completedWork.treeBaseDuration = treeBaseDuration$124; + (newChildLanes |= child$127.lanes | child$127.childLanes), + (subtreeFlags |= child$127.subtreeFlags & 65011712), + (subtreeFlags |= child$127.flags & 65011712), + (treeBaseDuration$126 += child$127.treeBaseDuration), + (child$127 = child$127.sibling); + completedWork.treeBaseDuration = treeBaseDuration$126; } else for ( - treeBaseDuration$124 = completedWork.child; - null !== treeBaseDuration$124; + treeBaseDuration$126 = completedWork.child; + null !== treeBaseDuration$126; ) (newChildLanes |= - treeBaseDuration$124.lanes | treeBaseDuration$124.childLanes), - (subtreeFlags |= treeBaseDuration$124.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$124.flags & 65011712), - (treeBaseDuration$124.return = completedWork), - (treeBaseDuration$124 = treeBaseDuration$124.sibling); + treeBaseDuration$126.lanes | treeBaseDuration$126.childLanes), + (subtreeFlags |= treeBaseDuration$126.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$126.flags & 65011712), + (treeBaseDuration$126.return = completedWork), + (treeBaseDuration$126 = treeBaseDuration$126.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$124 = completedWork.actualDuration; - child$125 = completedWork.selfBaseDuration; + treeBaseDuration$126 = completedWork.actualDuration; + child$127 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$124 += child.actualDuration), - (child$125 += child.treeBaseDuration), + (treeBaseDuration$126 += child.actualDuration), + (child$127 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$124; - completedWork.treeBaseDuration = child$125; + completedWork.actualDuration = treeBaseDuration$126; + completedWork.treeBaseDuration = child$127; } else for ( - treeBaseDuration$124 = completedWork.child; - null !== treeBaseDuration$124; + treeBaseDuration$126 = completedWork.child; + null !== treeBaseDuration$126; ) (newChildLanes |= - treeBaseDuration$124.lanes | treeBaseDuration$124.childLanes), - (subtreeFlags |= treeBaseDuration$124.subtreeFlags), - (subtreeFlags |= treeBaseDuration$124.flags), - (treeBaseDuration$124.return = completedWork), - (treeBaseDuration$124 = treeBaseDuration$124.sibling); + treeBaseDuration$126.lanes | treeBaseDuration$126.childLanes), + (subtreeFlags |= treeBaseDuration$126.subtreeFlags), + (subtreeFlags |= treeBaseDuration$126.flags), + (treeBaseDuration$126.return = completedWork), + (treeBaseDuration$126 = treeBaseDuration$126.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -9006,11 +9046,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$141 = null; + var cache$143 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$141 = newProps.memoizedState.cachePool.pool); - cache$141 !== type && (newProps.flags |= 2048); + (cache$143 = newProps.memoizedState.cachePool.pool); + cache$143 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -9040,8 +9080,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$141 = type.rendering; - if (null === cache$141) + cache$143 = type.rendering; + if (null === cache$143) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -9049,11 +9089,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$141 = findFirstSuspended(current); - if (null !== cache$141) { + cache$143 = findFirstSuspended(current); + if (null !== cache$143) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$141.updateQueue; + current = cache$143.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -9078,7 +9118,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$141)), null !== current)) { + if (((current = findFirstSuspended(cache$143)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -9088,7 +9128,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$141.alternate && + !cache$143.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -9101,13 +9141,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$141.sibling = workInProgress.child), - (workInProgress.child = cache$141)) + ? ((cache$143.sibling = workInProgress.child), + (workInProgress.child = cache$143)) : ((current = type.last), null !== current - ? (current.sibling = cache$141) - : (workInProgress.child = cache$141), - (type.last = cache$141)); + ? (current.sibling = cache$143) + : (workInProgress.child = cache$143), + (type.last = cache$143)); } if (null !== type.tail) return ( @@ -9425,8 +9465,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$159) { - captureCommitPhaseError(current, nearestMountedAncestor, error$159); + } catch (error$161) { + captureCommitPhaseError(current, nearestMountedAncestor, error$161); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -9497,8 +9537,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$161) { - captureCommitPhaseError(current, nearestMountedAncestor, error$161); + } catch (error$163) { + captureCommitPhaseError(current, nearestMountedAncestor, error$163); } else ref.current = null; } @@ -10169,7 +10209,8 @@ var offscreenSubtreeIsHidden = !1, nextEffect = null, inProgressLanes = null, inProgressRoot = null, - viewTransitionContextChanged$1 = !1; + viewTransitionContextChanged$1 = !1, + rootViewTransitionAffected = !1; function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; eventsEnabled = _enabled; @@ -10417,11 +10458,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$156) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$156 + error$158 ); } else { @@ -10438,11 +10479,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$157) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$159 ); } recordEffectDuration(); @@ -10453,11 +10494,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$158) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$160 ); } } @@ -11137,13 +11178,16 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: - flags = currentHoistableRoot; + flags = pushMutationContext(); + current = currentHoistableRoot; currentHoistableRoot = getHoistableRoot( finishedWork.stateNode.containerInfo ); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); - currentHoistableRoot = flags; + currentHoistableRoot = current; + viewTransitionMutationContext && (rootViewTransitionAffected = !0); + viewTransitionMutationContext = flags; break; case 12: flags = pushNestedEffectDurations(); @@ -11330,25 +11374,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$162 = hostParentFiber.stateNode; + var parent$164 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$162, ""), (hostParentFiber.flags &= -33)); - var before$163 = getHostSibling(finishedWork); + (setTextContent(parent$164, ""), (hostParentFiber.flags &= -33)); + var before$165 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$163, - parent$162, + before$165, + parent$164, parentFragmentInstances ); break; case 3: case 4: - var parent$164 = hostParentFiber.stateNode.containerInfo, - before$165 = getHostSibling(finishedWork); + var parent$166 = hostParentFiber.stateNode.containerInfo, + before$167 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$165, - parent$164, + before$167, + parent$166, parentFragmentInstances ); break; @@ -11387,7 +11431,7 @@ function commitAfterMutationEffectsOnFiber(finishedWork, root) { viewTransitionContextChanged$1 = !1; pushViewTransitionCancelableScope(); recursivelyTraverseAfterMutationEffects(root, finishedWork); - if (!viewTransitionContextChanged$1) { + if (!viewTransitionContextChanged$1 && !rootViewTransitionAffected) { finishedWork = viewTransitionCancelableChildren; if (null !== finishedWork) for (var i = 0; i < finishedWork.length; i += 3) @@ -11403,6 +11447,13 @@ function commitAfterMutationEffectsOnFiber(finishedWork, root) { case 5: recursivelyTraverseAfterMutationEffects(root, finishedWork); break; + case 4: + i = viewTransitionContextChanged$1; + viewTransitionContextChanged$1 = !1; + recursivelyTraverseAfterMutationEffects(root, finishedWork); + viewTransitionContextChanged$1 && (rootViewTransitionAffected = !0); + viewTransitionContextChanged$1 = i; + break; case 22: null === finishedWork.memoizedState && (null !== current.memoizedState @@ -12700,7 +12751,7 @@ function recursivelyInsertClones( if (null === nextPhase) recursivelyInsertNewFiber(deletions, i, parentViewTransition, 5); else { - var nextPhase$192 = deletions.flags; + var nextPhase$196 = deletions.flags; switch (deletions.tag) { case 26: recursivelyInsertClones( @@ -12726,16 +12777,16 @@ function recursivelyInsertClones( (setTextContent(clone, ""), (viewTransitionMutationContext = !0))) : (clone = clone.cloneNode(!1)); - if (nextPhase$192 & 4) { - nextPhase$192 = clone; + if (nextPhase$196 & 4) { + nextPhase$196 = clone; var newProps = deletions.memoizedProps; updateProperties( - nextPhase$192, + nextPhase$196, deletions.type, nextPhase.memoizedProps, newProps ); - nextPhase$192[internalPropsKey] = newProps; + nextPhase$196[internalPropsKey] = newProps; } 1 === visitPhase || 2 === visitPhase ? (recursivelyInsertClones(deletions, clone, null, 3), @@ -12754,7 +12805,7 @@ function recursivelyInsertClones( if (null === parentViewTransition) throw Error(formatProdErrorMessage(162)); parentViewTransition = parentViewTransition.cloneNode(!1); - nextPhase$192 & 4 && + nextPhase$196 & 4 && ((parentViewTransition.nodeValue = nextPhase.memoizedProps), (viewTransitionMutationContext = !0)); appendChild(i, parentViewTransition); @@ -12767,7 +12818,7 @@ function recursivelyInsertClones( case 22: null === deletions.memoizedState ? ((nextPhase = - 0 === visitPhase && 0 !== (nextPhase$192 & 8192) + 0 === visitPhase && 0 !== (nextPhase$196 & 8192) ? 1 : visitPhase), recursivelyInsertClones( @@ -12785,8 +12836,8 @@ function recursivelyInsertClones( parentViewTransition = pushMutationContext(); clone = deletions.stateNode; clone.clones = null; - nextPhase$192 = 1 === visitPhase ? 2 : visitPhase; - recursivelyInsertClones(deletions, i, clone, nextPhase$192); + nextPhase$196 = 1 === visitPhase ? 2 : visitPhase; + recursivelyInsertClones(deletions, i, clone, nextPhase$196); viewTransitionMutationContext && (deletions.flags |= 4); 1 === visitPhase ? applyExitViewTransition(deletions) @@ -12969,9 +13020,11 @@ var DefaultAsyncDispatcher = { function requestUpdateLane() { if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; - if (null !== ReactSharedInternals.T) { - var actionScopeLane = currentEntangledLane; - return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane(); + var transition = ReactSharedInternals.T; + if (null !== transition) { + if (transition.gesture) throw Error(formatProdErrorMessage(554)); + transition = currentEntangledLane; + return 0 !== transition ? transition : requestTransitionLane(); } return resolveUpdatePriority(); } @@ -13375,9 +13428,9 @@ function markRootSuspended( didAttemptEntireTree && (root.warmLanes |= suspendedLanes); didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4; - didAttemptEntireTree[index$4] = -1; + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -13711,8 +13764,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$199) { - handleThrow(root, thrownValue$199); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); lanes && root.shellSuspendCounter++; @@ -13833,8 +13886,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$201) { - handleThrow(root, thrownValue$201); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -14096,8 +14149,7 @@ function commitRoot( else { pendingViewTransitionEvents = null; (lanes & 335544064) === lanes - ? ((pendingTransitionTypes = ReactSharedInternals.V), - (ReactSharedInternals.V = null), + ? ((pendingTransitionTypes = claimQueuedTransitionTypes(root)), (recoverableErrors = 10262)) : ((pendingTransitionTypes = null), (recoverableErrors = 10256)); 0 !== finishedWork.actualDuration || @@ -14182,6 +14234,7 @@ function flushMutationEffects() { try { inProgressLanes = lanes; inProgressRoot = root; + rootViewTransitionAffected = !1; resetComponentEffectTimers(); commitMutationEffectsOnFiber(finishedWork, root, lanes); inProgressRoot = inProgressLanes = null; @@ -14530,26 +14583,26 @@ function commitGestureOnRoot(root, finishedWork) { } var rotate = computedStyle.rotate; if ("none" !== rotate && "" !== rotate) { - var parts$276 = rotate.split(" "); + var parts$280 = rotate.split(" "); transform = - 1 === parts$276.length - ? "rotate(" + parts$276[0] + ") " + transform - : 2 === parts$276.length + 1 === parts$280.length + ? "rotate(" + parts$280[0] + ") " + transform + : 2 === parts$280.length ? "rotate" + - parts$276[0].toUpperCase() + + parts$280[0].toUpperCase() + "(" + - parts$276[1] + + parts$280[1] + ") " + transform - : "rotate3d(" + parts$276.join(", ") + ") " + transform; + : "rotate3d(" + parts$280.join(", ") + ") " + transform; } var translate = computedStyle.translate; if ("none" !== translate && "" !== translate) { - var parts$277 = translate.split(" "); + var parts$281 = translate.split(" "); transform = - (3 === parts$277.length ? "translate3d" : "translate") + + (3 === parts$281.length ? "translate3d" : "translate") + "(" + - parts$277.join(", ") + + parts$281.join(", ") + ") " + transform; } @@ -14570,15 +14623,13 @@ function commitGestureOnRoot(root, finishedWork) { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } - pendingTransitionTypes = null; + pendingTransitionTypes = finishedGesture.types; pendingEffectsStatus = 6; pendingViewTransition = finishedGesture.running = startGestureTransition( root.containerInfo, finishedGesture.provider, - finishedGesture.rangeCurrent, - finishedGesture.direction - ? finishedGesture.rangeNext - : finishedGesture.rangePrevious, + finishedGesture.rangeStart, + finishedGesture.rangeEnd, pendingTransitionTypes, flushGestureMutations, flushGestureAnimations, @@ -14913,14 +14964,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$207 = firstScheduledRoot; null !== root$207; ) { + for (var root$211 = firstScheduledRoot; null !== root$211; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$207.pendingLanes; + var pendingLanes = root$211.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$207.suspendedLanes, - pingedLanes = root$207.pingedLanes; + var suspendedLanes = root$211.suspendedLanes, + pingedLanes = root$211.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -14934,21 +14985,21 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$207, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$211, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$207, - root$207 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$207.cancelPendingCommit || - -1 !== root$207.timeoutHandle + root$211, + root$211 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$211.cancelPendingCommit || + -1 !== root$211.timeoutHandle )), (0 === (JSCompiler_inline_result & 3) && 64 !== JSCompiler_inline_result) || - checkIfRootIsPrerendering(root$207, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$211, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$207, JSCompiler_inline_result)); - root$207 = root$207.next; + performSyncWorkOnRoot(root$211, JSCompiler_inline_result)); + root$211 = root$211.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -14995,12 +15046,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3, - expirationTime = expirationTimes[index$3]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$3] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -15233,20 +15284,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1817 = 0; - i$jscomp$inline_1817 < simpleEventPluginEvents.length; - i$jscomp$inline_1817++ + var i$jscomp$inline_1839 = 0; + i$jscomp$inline_1839 < simpleEventPluginEvents.length; + i$jscomp$inline_1839++ ) { - var eventName$jscomp$inline_1818 = - simpleEventPluginEvents[i$jscomp$inline_1817], - domEventName$jscomp$inline_1819 = - eventName$jscomp$inline_1818.toLowerCase(), - capitalizedEvent$jscomp$inline_1820 = - eventName$jscomp$inline_1818[0].toUpperCase() + - eventName$jscomp$inline_1818.slice(1); + var eventName$jscomp$inline_1840 = + simpleEventPluginEvents[i$jscomp$inline_1839], + domEventName$jscomp$inline_1841 = + eventName$jscomp$inline_1840.toLowerCase(), + capitalizedEvent$jscomp$inline_1842 = + eventName$jscomp$inline_1840[0].toUpperCase() + + eventName$jscomp$inline_1840.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1819, - "on" + capitalizedEvent$jscomp$inline_1820 + domEventName$jscomp$inline_1841, + "on" + capitalizedEvent$jscomp$inline_1842 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -16494,34 +16545,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$221 = props[hasSrc]; - if (null != propValue$221) + var propValue$225 = props[hasSrc]; + if (null != propValue$225) switch (hasSrc) { case "name": - hasSrcSet = propValue$221; + hasSrcSet = propValue$225; break; case "type": - propValue = propValue$221; + propValue = propValue$225; break; case "checked": - checked = propValue$221; + checked = propValue$225; break; case "defaultChecked": - defaultChecked = propValue$221; + defaultChecked = propValue$225; break; case "value": - propKey = propValue$221; + propKey = propValue$225; break; case "defaultValue": - defaultValue = propValue$221; + defaultValue = propValue$225; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$221) + if (null != propValue$225) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$221, props, null); + setProp(domElement, tag, hasSrc, propValue$225, props, null); } } initInput( @@ -16660,14 +16711,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$221 in props) - props.hasOwnProperty(propValue$221) && - ((hasSrc = props[propValue$221]), + for (propValue$225 in props) + props.hasOwnProperty(propValue$225) && + ((hasSrc = props[propValue$225]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$221, + propValue$225, hasSrc, props, void 0 @@ -16715,14 +16766,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$238 in nextProps) { - var propKey = nextProps[propKey$238]; - lastProp = lastProps[propKey$238]; + for (var propKey$242 in nextProps) { + var propKey = nextProps[propKey$242]; + lastProp = lastProps[propKey$242]; if ( - nextProps.hasOwnProperty(propKey$238) && + nextProps.hasOwnProperty(propKey$242) && (null != propKey || null != lastProp) ) - switch (propKey$238) { + switch (propKey$242) { case "type": propKey !== lastProp && (viewTransitionMutationContext = !0); type = propKey; @@ -16757,7 +16808,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$238, + propKey$242, propKey, nextProps, lastProp @@ -16776,7 +16827,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$238 = null; + propKey = value = defaultValue = propKey$242 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16808,7 +16859,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && (viewTransitionMutationContext = !0); - propKey$238 = type; + propKey$242 = type; break; case "defaultValue": type !== lastDefaultValue && (viewTransitionMutationContext = !0); @@ -16831,15 +16882,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$238 - ? updateOptions(domElement, !!lastProps, propKey$238, !1) + null != propKey$242 + ? updateOptions(domElement, !!lastProps, propKey$242, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$238 = null; + propKey = propKey$242 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16864,7 +16915,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && (viewTransitionMutationContext = !0); - propKey$238 = name; + propKey$242 = name; break; case "defaultValue": name !== type && (viewTransitionMutationContext = !0); @@ -16879,17 +16930,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$238, propKey); + updateTextarea(domElement, propKey$242, propKey); return; case "option": - for (var propKey$254 in lastProps) + for (var propKey$258 in lastProps) if ( - ((propKey$238 = lastProps[propKey$254]), - lastProps.hasOwnProperty(propKey$254) && - null != propKey$238 && - !nextProps.hasOwnProperty(propKey$254)) + ((propKey$242 = lastProps[propKey$258]), + lastProps.hasOwnProperty(propKey$258) && + null != propKey$242 && + !nextProps.hasOwnProperty(propKey$258)) ) - switch (propKey$254) { + switch (propKey$258) { case "selected": domElement.selected = !1; break; @@ -16897,34 +16948,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$254, + propKey$258, null, nextProps, - propKey$238 + propKey$242 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$238 = nextProps[lastDefaultValue]), + ((propKey$242 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$238 !== propKey && - (null != propKey$238 || null != propKey)) + propKey$242 !== propKey && + (null != propKey$242 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$238 !== propKey && (viewTransitionMutationContext = !0); + propKey$242 !== propKey && (viewTransitionMutationContext = !0); domElement.selected = - propKey$238 && - "function" !== typeof propKey$238 && - "symbol" !== typeof propKey$238; + propKey$242 && + "function" !== typeof propKey$242 && + "symbol" !== typeof propKey$242; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$238, + propKey$242, nextProps, propKey ); @@ -16945,24 +16996,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$259 in lastProps) - (propKey$238 = lastProps[propKey$259]), - lastProps.hasOwnProperty(propKey$259) && - null != propKey$238 && - !nextProps.hasOwnProperty(propKey$259) && - setProp(domElement, tag, propKey$259, null, nextProps, propKey$238); + for (var propKey$263 in lastProps) + (propKey$242 = lastProps[propKey$263]), + lastProps.hasOwnProperty(propKey$263) && + null != propKey$242 && + !nextProps.hasOwnProperty(propKey$263) && + setProp(domElement, tag, propKey$263, null, nextProps, propKey$242); for (checked in nextProps) if ( - ((propKey$238 = nextProps[checked]), + ((propKey$242 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$238 !== propKey && - (null != propKey$238 || null != propKey)) + propKey$242 !== propKey && + (null != propKey$242 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$238) + if (null != propKey$242) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16970,7 +17021,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$238, + propKey$242, nextProps, propKey ); @@ -16978,49 +17029,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$264 in lastProps) - (propKey$238 = lastProps[propKey$264]), - lastProps.hasOwnProperty(propKey$264) && - void 0 !== propKey$238 && - !nextProps.hasOwnProperty(propKey$264) && + for (var propKey$268 in lastProps) + (propKey$242 = lastProps[propKey$268]), + lastProps.hasOwnProperty(propKey$268) && + void 0 !== propKey$242 && + !nextProps.hasOwnProperty(propKey$268) && setPropOnCustomElement( domElement, tag, - propKey$264, + propKey$268, void 0, nextProps, - propKey$238 + propKey$242 ); for (defaultChecked in nextProps) - (propKey$238 = nextProps[defaultChecked]), + (propKey$242 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$238 === propKey || - (void 0 === propKey$238 && void 0 === propKey) || + propKey$242 === propKey || + (void 0 === propKey$242 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$238, + propKey$242, nextProps, propKey ); return; } } - for (var propKey$269 in lastProps) - (propKey$238 = lastProps[propKey$269]), - lastProps.hasOwnProperty(propKey$269) && - null != propKey$238 && - !nextProps.hasOwnProperty(propKey$269) && - setProp(domElement, tag, propKey$269, null, nextProps, propKey$238); + for (var propKey$273 in lastProps) + (propKey$242 = lastProps[propKey$273]), + lastProps.hasOwnProperty(propKey$273) && + null != propKey$242 && + !nextProps.hasOwnProperty(propKey$273) && + setProp(domElement, tag, propKey$273, null, nextProps, propKey$242); for (lastProp in nextProps) - (propKey$238 = nextProps[lastProp]), + (propKey$242 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$238 === propKey || - (null == propKey$238 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$238, nextProps, propKey); + propKey$242 === propKey || + (null == propKey$242 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$242, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -17381,7 +17432,7 @@ function startViewTransition( (error = customizeViewTransitionError(error, !1)), null !== error && errorCallback(error); } finally { - spawnedWorkCallback(); + mutationCallback(), layoutCallback(), spawnedWorkCallback(); } }); transition.finished.finally(function () { @@ -17487,65 +17538,89 @@ function startGestureTransition( animations = documentElement.getAnimations({ subtree: !0 }), foundGroups = new Set(), foundNews = new Set(), + longestDuration = 0, i = 0; i < animations.length; i++ ) { - var pseudoElement = animations[i].effect.pseudoElement; + var effect = animations[i].effect, + pseudoElement = effect.pseudoElement; null != pseudoElement && - (pseudoElement.startsWith("::view-transition-group") + pseudoElement.startsWith("::view-transition") && + ((effect = effect.getTiming()), + (effect = + effect.delay + + ("number" === typeof effect.duration ? effect.duration : 0)), + effect > longestDuration && (longestDuration = effect), + pseudoElement.startsWith("::view-transition-group") ? foundGroups.add(pseudoElement.slice(23)) : pseudoElement.startsWith("::view-transition-new") && foundNews.add(pseudoElement.slice(21))); } + longestDuration = (rangeEnd - rangeStart) / longestDuration; for (i = 0; i < animations.length; i++) { var anim = animations[i]; - if ("running" === anim.playState) { - pseudoElement = anim.effect; - var pseudoElement$279 = pseudoElement.pseudoElement; - if ( - null != pseudoElement$279 && - pseudoElement$279.startsWith("::view-transition") && - pseudoElement.target === documentElement - ) { - anim.cancel(); - var isGeneratedGroupAnim = !1, - isExitGroupAnim = !1; - if (pseudoElement$279.startsWith("::view-transition-group")) { - var groupName = pseudoElement$279.slice(23); - foundNews.has(groupName) - ? ((anim = anim.animationName), - (isGeneratedGroupAnim = - null != anim && - anim.startsWith("-ua-view-transition-group-anim-"))) - : (isExitGroupAnim = !0); - } - animateGesture( - pseudoElement.getKeyframes(), - pseudoElement.target, - pseudoElement$279, - timeline, - rangeStart, - rangeEnd, - isGeneratedGroupAnim, - isExitGroupAnim - ); - pseudoElement$279.startsWith("::view-transition-old") && - ((pseudoElement$279 = pseudoElement$279.slice(21)), - foundGroups.has(pseudoElement$279) || - foundNews.has(pseudoElement$279) || - (foundGroups.add(pseudoElement$279), - animateGesture( - [{}, {}], - pseudoElement.target, - "::view-transition-group" + pseudoElement$279, - timeline, - rangeStart, - rangeEnd, - !1, - !0 - ))); + if ( + "running" === anim.playState && + ((pseudoElement = anim.effect), + (effect = pseudoElement.pseudoElement), + null != effect && + effect.startsWith("::view-transition") && + pseudoElement.target === documentElement) + ) { + anim.cancel(); + var isGeneratedGroupAnim = !1, + isExitGroupAnim = !1; + if (effect.startsWith("::view-transition-group")) { + var groupName = effect.slice(23); + foundNews.has(groupName) + ? ((isGeneratedGroupAnim = anim.animationName), + (isGeneratedGroupAnim = + null != isGeneratedGroupAnim && + isGeneratedGroupAnim.startsWith( + "-ua-view-transition-group-anim-" + ))) + : (isExitGroupAnim = !0); } + var timing$285 = pseudoElement.getTiming(); + anim = + rangeEnd - + (("number" === typeof timing$285.duration + ? timing$285.duration + : 0) + + timing$285.delay) * + longestDuration; + groupName = rangeEnd - timing$285.delay * longestDuration; + if ( + "reverse" === timing$285.direction || + "alternate-reverse" === timing$285.direction + ) + (timing$285 = anim), (anim = groupName), (groupName = timing$285); + animateGesture( + pseudoElement.getKeyframes(), + pseudoElement.target, + effect, + timeline, + anim, + groupName, + isGeneratedGroupAnim, + isExitGroupAnim + ); + effect.startsWith("::view-transition-old") && + ((effect = effect.slice(21)), + foundGroups.has(effect) || + foundNews.has(effect) || + (foundGroups.add(effect), + animateGesture( + [{}, {}], + pseudoElement.target, + "::view-transition-group" + effect, + timeline, + rangeStart, + rangeEnd, + !1, + !0 + ))); } } documentElement @@ -17567,7 +17642,7 @@ function startGestureTransition( (error = customizeViewTransitionError(error, !0)), null !== error && errorCallback(error); } finally { - readyCallback(); + mutationCallback(), animateCallback(); } }); transition.finished.finally(function () { @@ -17620,45 +17695,6 @@ function createViewTransitionInstance(name) { new: new ViewTransitionPseudoElement("new", name) }; } -function getCurrentGestureOffset(provider) { - provider = provider.currentTime; - if (null === provider) throw Error(formatProdErrorMessage(549)); - return "number" === typeof provider ? provider : provider.value; -} -function subscribeToGestureDirection( - provider, - currentOffset, - directionCallback -) { - function rafCallback() { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && directionCallback(newTime > currentOffset)); - callbackID = requestAnimationFrame(rafCallback); - } - if ( - "function" === typeof ScrollTimeline && - provider instanceof ScrollTimeline - ) { - var element = provider.source, - scrollCallback = function () { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && - directionCallback(newTime > currentOffset)); - }; - element.addEventListener("scroll", scrollCallback, !1); - return function () { - element.removeEventListener("scroll", scrollCallback, !1); - }; - } - var callbackID = requestAnimationFrame(rafCallback); - return function () { - cancelAnimationFrame(callbackID); - }; -} function FragmentInstance(fragmentFiber) { this._fragmentFiber = fragmentFiber; this._observers = this._eventListeners = null; @@ -18372,26 +18408,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$283 = getResourcesFromRoot( + var styles$290 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$284 = styles$283.get(type); - resource$284 || + resource$291 = styles$290.get(type); + resource$291 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$284 = { + (resource$291 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$283.set(type, resource$284), - (styles$283 = JSCompiler_inline_result.querySelector( + styles$290.set(type, resource$291), + (styles$290 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$283._p && - ((resource$284.instance = styles$283), - (resource$284.state.loading = 5)), + !styles$290._p && + ((resource$291.instance = styles$290), + (resource$291.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -18404,16 +18440,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$283 || + styles$290 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$284.state + resource$291.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$284; + return resource$291; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -18510,37 +18546,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$289 = hoistableRoot.querySelector( + var instance$296 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$289) + if (instance$296) return ( (resource.state.loading |= 4), - (resource.instance = instance$289), - markNodeAsHoistable(instance$289), - instance$289 + (resource.instance = instance$296), + markNodeAsHoistable(instance$296), + instance$296 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$289 = ( + instance$296 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$289); - var linkInstance = instance$289; + markNodeAsHoistable(instance$296); + var linkInstance = instance$296; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$289, "link", instance); + setInitialProperties(instance$296, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$289, props.precedence, hoistableRoot); - return (resource.instance = instance$289); + insertStylesheet(instance$296, props.precedence, hoistableRoot); + return (resource.instance = instance$296); case "script": - instance$289 = getScriptKey(props.src); + instance$296 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$289) + getScriptSelectorFromKey(instance$296) )) ) return ( @@ -18549,7 +18585,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$289))) + if ((styleProps = preloadPropsMap.get(instance$296))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -18881,7 +18917,11 @@ function FiberRootNode( this.pooledCache = null; this.pooledCacheLanes = 0; this.formState = formState; - this.gestureClone = this.stoppingGestures = this.pendingGestures = null; + this.gestureClone = + this.stoppingGestures = + this.pendingGestures = + this.transitionTypes = + null; this.incompleteTransitions = new Map(); this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); @@ -19586,16 +19626,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_2129 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2151 = React.version; if ( - "19.2.0-experimental-63779030-20250328" !== - isomorphicReactPackageVersion$jscomp$inline_2129 + "19.2.0-experimental-040f8286-20250402" !== + isomorphicReactPackageVersion$jscomp$inline_2151 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2129, - "19.2.0-experimental-63779030-20250328" + isomorphicReactPackageVersion$jscomp$inline_2151, + "19.2.0-experimental-040f8286-20250402" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -19615,24 +19655,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2737 = { +var internals$jscomp$inline_2761 = { bundleType: 0, - version: "19.2.0-experimental-63779030-20250328", + version: "19.2.0-experimental-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-63779030-20250328" + reconcilerVersion: "19.2.0-experimental-040f8286-20250402" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2738 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2762 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2738.isDisabled && - hook$jscomp$inline_2738.supportsFiber + !hook$jscomp$inline_2762.isDisabled && + hook$jscomp$inline_2762.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2738.inject( - internals$jscomp$inline_2737 + (rendererID = hook$jscomp$inline_2762.inject( + internals$jscomp$inline_2761 )), - (injectedHook = hook$jscomp$inline_2738); + (injectedHook = hook$jscomp$inline_2762); } catch (err) {} } function noop() {} @@ -19885,7 +19925,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index 85be574f73f90..881680e634b51 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -4091,9 +4091,6 @@ function unsupportedRefresh() { throw Error("Cache cannot be refreshed during server rendering."); } - function unsupportedStartGesture() { - throw Error("startGesture cannot be called during server rendering."); - } function noop$1() {} function disabledLog() {} function disableLogs() { @@ -9529,10 +9526,6 @@ }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -9628,5 +9621,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js index 5ae914e2961d0..d65b81fdbfbc6 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js @@ -3331,9 +3331,6 @@ function readPreviousThenableFromState() { function unsupportedRefresh() { throw Error(formatProdErrorMessage(393)); } -function unsupportedStartGesture() { - throw Error(formatProdErrorMessage(547)); -} function noop$1() {} var HooksDispatcher = { readContext: function (context) { @@ -3425,10 +3422,6 @@ var HooksDispatcher = { }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -6358,4 +6351,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js index a20345b361e06..1cd975162475b 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js @@ -4091,9 +4091,6 @@ function unsupportedRefresh() { throw Error("Cache cannot be refreshed during server rendering."); } - function unsupportedStartGesture() { - throw Error("startGesture cannot be called during server rendering."); - } function noop$1() {} function disabledLog() {} function disableLogs() { @@ -9529,10 +9526,6 @@ }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -9628,5 +9621,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js index 44a5057cead3b..2fc6a38388e0b 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js @@ -3377,9 +3377,6 @@ function readPreviousThenableFromState() { function unsupportedRefresh() { throw Error("Cache cannot be refreshed during server rendering."); } -function unsupportedStartGesture() { - throw Error("startGesture cannot be called during server rendering."); -} function noop$1() {} var HooksDispatcher = { readContext: function (context) { @@ -3476,10 +3473,6 @@ var HooksDispatcher = { }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -6452,4 +6445,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js index 4582249c380b0..31c30252bdd88 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js @@ -4268,9 +4268,6 @@ function unsupportedRefresh() { throw Error("Cache cannot be refreshed during server rendering."); } - function unsupportedStartGesture() { - throw Error("startGesture cannot be called during server rendering."); - } function noop$1() {} function disabledLog() {} function disableLogs() { @@ -8520,11 +8517,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -9989,10 +9986,6 @@ }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -10326,5 +10319,5 @@ startWork(request); }); }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js index 2e0b97642c93d..0cee8de7e30e2 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js @@ -3733,9 +3733,6 @@ function readPreviousThenableFromState() { function unsupportedRefresh() { throw Error(formatProdErrorMessage(393)); } -function unsupportedStartGesture() { - throw Error(formatProdErrorMessage(547)); -} function noop$1() {} var HooksDispatcher = { readContext: function (context) { @@ -3826,10 +3823,6 @@ var HooksDispatcher = { }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -6899,12 +6892,12 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion, - "19.2.0-experimental-63779030-20250328" + "19.2.0-experimental-040f8286-20250402" ) ); } @@ -7159,4 +7152,4 @@ exports.resumeAndPrerender = function (children, postponedState, options) { startWork(request); }); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js index 040af59676470..3158e4dc88c33 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js @@ -3366,9 +3366,6 @@ function readPreviousThenableFromState() { function unsupportedRefresh() { throw Error("Cache cannot be refreshed during server rendering."); } -function unsupportedStartGesture() { - throw Error("startGesture cannot be called during server rendering."); -} function noop$1() {} var HooksDispatcher = { readContext: function (context) { @@ -3464,10 +3461,6 @@ var HooksDispatcher = { }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -6377,13 +6370,13 @@ function addToReplayParent(node, parentKeyPath, trackedPostpones) { } var isomorphicReactPackageVersion$jscomp$inline_818 = React.version; if ( - "19.2.0-experimental-63779030-20250328" !== + "19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion$jscomp$inline_818 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_818 + - "\n - react-dom: 19.2.0-experimental-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -6474,4 +6467,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js index 575a6095a0545..0f6ef27e2178f 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js @@ -4264,9 +4264,6 @@ function unsupportedRefresh() { throw Error("Cache cannot be refreshed during server rendering."); } - function unsupportedStartGesture() { - throw Error("startGesture cannot be called during server rendering."); - } function noop$1() {} function disabledLog() {} function disableLogs() { @@ -8543,11 +8540,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -10008,10 +10005,6 @@ }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -10356,5 +10349,5 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js index e37cb0744e1b0..bc47cf84ee2cc 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js @@ -3771,9 +3771,6 @@ function readPreviousThenableFromState() { function unsupportedRefresh() { throw Error("Cache cannot be refreshed during server rendering."); } -function unsupportedStartGesture() { - throw Error("startGesture cannot be called during server rendering."); -} function noop$1() {} var HooksDispatcher = { readContext: function (context) { @@ -3869,10 +3866,6 @@ var HooksDispatcher = { }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -7008,11 +7001,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -7277,4 +7270,4 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js index 1296756a271d9..44ddc8612bb36 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js @@ -4156,9 +4156,6 @@ function unsupportedRefresh() { throw Error("Cache cannot be refreshed during server rendering."); } - function unsupportedStartGesture() { - throw Error("startGesture cannot be called during server rendering."); - } function noop$1() {} function disabledLog() {} function disableLogs() { @@ -8407,11 +8404,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } function createDrainHandler(destination, request) { @@ -9942,10 +9939,6 @@ }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -10206,5 +10199,5 @@ } }; }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js index c777095d3fec2..b8aa8e76b5ee9 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js @@ -3658,9 +3658,6 @@ function readPreviousThenableFromState() { function unsupportedRefresh() { throw Error("Cache cannot be refreshed during server rendering."); } -function unsupportedStartGesture() { - throw Error("startGesture cannot be called during server rendering."); -} function noop$1() {} var HooksDispatcher = { readContext: function (context) { @@ -3756,10 +3753,6 @@ var HooksDispatcher = { }, useEffectEvent: function () { return throwOnUseEffectEventCall; - }, - useSwipeTransition: function (previous, current) { - resolveCurrentlyRenderingComponent(); - return [current, unsupportedStartGesture]; } }, currentResumableState = null, @@ -6887,11 +6880,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -7142,4 +7135,4 @@ exports.resumeToPipeableStream = function (children, postponedState, options) { } }; }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js index d936709e312aa..7cb975b3f3b38 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js @@ -489,6 +489,393 @@ (pop(hostTransitionProviderCursor, fiber), (HostTransitionContext._currentValue = NotPendingTransition)); } + function disabledLog() {} + function disableLogs() { + if (0 === disabledDepth) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: !0, + enumerable: !0, + value: disabledLog, + writable: !0 + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + function reenableLogs() { + disabledDepth--; + if (0 === disabledDepth) { + var props = { configurable: !0, enumerable: !0, writable: !0 }; + Object.defineProperties(console, { + log: assign({}, props, { value: prevLog }), + info: assign({}, props, { value: prevInfo }), + warn: assign({}, props, { value: prevWarn }), + error: assign({}, props, { value: prevError }), + group: assign({}, props, { value: prevGroup }), + groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), + groupEnd: assign({}, props, { value: prevGroupEnd }) + }); + } + 0 > disabledDepth && + console.error( + "disabledDepth fell below zero. This is a bug in React. Please file an issue." + ); + } + function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; + } + return "\n" + prefix + name + suffix; + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + var frame = componentFrameCache.get(fn); + if (void 0 !== frame) return frame; + reentry = !0; + frame = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher = null; + previousDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = null; + disableLogs(); + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$0) { + control = x$0; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$1) { + control = x$1; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } + ); + var _RunInRootFrame$Deter = + RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + _RunInRootFrame$Deter = namePropDescriptor = 0; + namePropDescriptor < sampleLines.length && + !sampleLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); + + ) + namePropDescriptor++; + for ( + ; + _RunInRootFrame$Deter < controlLines.length && + !controlLines[_RunInRootFrame$Deter].includes( + "DetermineComponentFrameRoot" + ); + + ) + _RunInRootFrame$Deter++; + if ( + namePropDescriptor === sampleLines.length || + _RunInRootFrame$Deter === controlLines.length + ) + for ( + namePropDescriptor = sampleLines.length - 1, + _RunInRootFrame$Deter = controlLines.length - 1; + 1 <= namePropDescriptor && + 0 <= _RunInRootFrame$Deter && + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]; + + ) + _RunInRootFrame$Deter--; + for ( + ; + 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; + namePropDescriptor--, _RunInRootFrame$Deter-- + ) + if ( + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter] + ) { + if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { + do + if ( + (namePropDescriptor--, + _RunInRootFrame$Deter--, + 0 > _RunInRootFrame$Deter || + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]) + ) { + var _frame = + "\n" + + sampleLines[namePropDescriptor].replace( + " at new ", + " at " + ); + fn.displayName && + _frame.includes("") && + (_frame = _frame.replace("", fn.displayName)); + "function" === typeof fn && + componentFrameCache.set(fn, _frame); + return _frame; + } + while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); + } + break; + } + } + } finally { + (reentry = !1), + (ReactSharedInternals.H = previousDispatcher), + reenableLogs(), + (Error.prepareStackTrace = frame); + } + sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(sampleLines) + : ""; + "function" === typeof fn && componentFrameCache.set(fn, sampleLines); + return sampleLines; + } + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; + } + function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + case 30: + return describeBuiltInComponentFrame("ViewTransition"); + default: + return ""; + } + } + function getStackByFiberInDevAndProd(workInProgress) { + try { + var info = ""; + do { + info += describeFiber(workInProgress); + var debugInfo = workInProgress._debugInfo; + if (debugInfo) + for (var i = debugInfo.length - 1; 0 <= i; i--) { + var entry = debugInfo[i]; + if ("string" === typeof entry.name) { + var JSCompiler_temp_const = info, + env = entry.env; + var JSCompiler_inline_result = describeBuiltInComponentFrame( + entry.name + (env ? " [" + env + "]" : "") + ); + info = JSCompiler_temp_const + JSCompiler_inline_result; + } + } + workInProgress = workInProgress.return; + } while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; + } + function getCurrentFiberOwnerNameInDevOrNull() { + if (null === current) return null; + var owner = current._debugOwner; + return null != owner ? getComponentNameFromOwner(owner) : null; + } + function getCurrentFiberStackInDev() { + if (null === current) return ""; + var workInProgress = current; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 31: + info += describeBuiltInComponentFrame("Activity"); + break; + case 30: + info += describeBuiltInComponentFrame("ViewTransition"); + break; + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); + } + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + workInProgress && + debugStack && + ("string" !== typeof debugStack && + (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), + "" !== debugStack && (info += "\n" + debugStack)); + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + var JSCompiler_inline_result = info; + } catch (x) { + JSCompiler_inline_result = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result; + } + function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { + var previousFiber = current; + setCurrentFiber(fiber); + try { + return null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); + } finally { + setCurrentFiber(previousFiber); + } + throw Error( + "runWithFiberInDEV should never be called in production. This is a bug in React." + ); + } + function setCurrentFiber(fiber) { + ReactSharedInternals.getCurrentStack = + null === fiber ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = fiber; + } function typeName(value) { return ( ("function" === typeof Symbol && @@ -556,283 +943,47 @@ } catch (err) { console.error("React instrumentation encountered an error: %s.", err); } - return hook.checkDCE ? !0 : !1; - } - function setIsStrictModeForDevtools(newIsStrictMode) { - "function" === typeof log$1 && - unstable_setDisableYieldValue(newIsStrictMode); - if (injectedHook && "function" === typeof injectedHook.setStrictMode) - try { - injectedHook.setStrictMode(rendererID, newIsStrictMode); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - console.error( - "React instrumentation encountered an error: %s", - err - )); - } - } - function clz32Fallback(x) { - x >>>= 0; - return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; - } - function getHighestPriorityLanes(lanes) { - var pendingSyncLanes = lanes & 42; - if (0 !== pendingSyncLanes) return pendingSyncLanes; - switch (lanes & -lanes) { - case 1: - return 1; - case 2: - return 2; - case 4: - return 4; - case 8: - return 8; - case 16: - return 16; - case 32: - return 32; - case 64: - return 64; - case 128: - return 128; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return lanes & 4194048; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return lanes & 62914560; - case 67108864: - return 67108864; - case 134217728: - return 134217728; - case 268435456: - return 268435456; - case 536870912: - return 536870912; - case 1073741824: - return 0; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - lanes - ); - } - } - function getNextLanes(root, wipLanes, rootHasPendingCommit) { - var pendingLanes = root.pendingLanes; - if (0 === pendingLanes) return 0; - var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; - var nonIdlePendingLanes = pendingLanes & 134217727; - 0 !== nonIdlePendingLanes - ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = nonIdlePendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = - getHighestPriorityLanes(rootHasPendingCommit))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = pendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); - return 0 === nextLanes - ? 0 - : 0 !== wipLanes && - wipLanes !== nextLanes && - 0 === (wipLanes & suspendedLanes) && - ((suspendedLanes = nextLanes & -nextLanes), - (rootHasPendingCommit = wipLanes & -wipLanes), - suspendedLanes >= rootHasPendingCommit || - (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) - ? wipLanes - : nextLanes; - } - function checkIfRootIsPrerendering(root, renderLanes) { - return ( - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - renderLanes) - ); - } - function computeExpirationTime(lane, currentTime) { - switch (lane) { - case 1: - case 2: - case 4: - case 8: - case 64: - return currentTime + 250; - case 16: - case 32: - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return currentTime + 5e3; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return -1; - case 67108864: - case 134217728: - case 268435456: - case 536870912: - case 1073741824: - return -1; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - -1 - ); - } - } - function claimNextTransitionLane() { - var lane = nextTransitionLane; - nextTransitionLane <<= 1; - 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); - return lane; - } - function claimNextRetryLane() { - var lane = nextRetryLane; - nextRetryLane <<= 1; - 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); - return lane; - } - function createLaneMap(initial) { - for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); - return laneMap; - } - function markRootUpdated$1(root, updateLane) { - root.pendingLanes |= updateLane; - 268435456 !== updateLane && - ((root.suspendedLanes = 0), - (root.pingedLanes = 0), - (root.warmLanes = 0)); - } - function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ) { - var previouslyPendingLanes = root.pendingLanes; - root.pendingLanes = remainingLanes; - root.suspendedLanes = 0; - root.pingedLanes = 0; - root.warmLanes = 0; - root.expiredLanes &= remainingLanes; - root.entangledLanes &= remainingLanes; - root.errorRecoveryDisabledLanes &= remainingLanes; - root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - for ( - remainingLanes = previouslyPendingLanes & ~remainingLanes; - 0 < remainingLanes; - - ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; - expirationTimes[index] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index]; - if (null !== hiddenUpdatesForLane) - for ( - hiddenUpdates[index] = null, index = 0; - index < hiddenUpdatesForLane.length; - index++ - ) { - var update = hiddenUpdatesForLane[index]; - null !== update && (update.lane &= -536870913); - } - remainingLanes &= ~lane; - } - 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); + return hook.checkDCE ? !0 : !1; } - function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { - root.pendingLanes |= spawnedLane; - root.suspendedLanes &= ~spawnedLane; - var spawnedLaneIndex = 31 - clz32(spawnedLane); - root.entangledLanes |= spawnedLane; - root.entanglements[spawnedLaneIndex] = - root.entanglements[spawnedLaneIndex] | - 1073741824 | - (entangledLanes & 4194090); + function setIsStrictModeForDevtools(newIsStrictMode) { + "function" === typeof log$1 && + unstable_setDisableYieldValue(newIsStrictMode); + if (injectedHook && "function" === typeof injectedHook.setStrictMode) + try { + injectedHook.setStrictMode(rendererID, newIsStrictMode); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + console.error( + "React instrumentation encountered an error: %s", + err + )); + } } - function markRootEntangled(root, entangledLanes) { - var rootEntangledLanes = (root.entangledLanes |= entangledLanes); - for (root = root.entanglements; rootEntangledLanes; ) { - var index = 31 - clz32(rootEntangledLanes), - lane = 1 << index; - (lane & entangledLanes) | (root[index] & entangledLanes) && - (root[index] |= entangledLanes); - rootEntangledLanes &= ~lane; - } + function clz32Fallback(x) { + x >>>= 0; + return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; } - function getBumpedLaneForHydrationByLane(lane) { - switch (lane) { + function getHighestPriorityLanes(lanes) { + var pendingSyncLanes = lanes & 42; + if (0 !== pendingSyncLanes) return pendingSyncLanes; + switch (lanes & -lanes) { + case 1: + return 1; case 2: - lane = 1; - break; + return 2; + case 4: + return 4; case 8: - lane = 4; - break; + return 8; + case 16: + return 16; case 32: - lane = 16; - break; + return 32; + case 64: + return 64; + case 128: + return 128; case 256: case 512: case 1024: @@ -847,704 +998,553 @@ case 524288: case 1048576: case 2097152: + return lanes & 4194048; case 4194304: case 8388608: case 16777216: case 33554432: - lane = 128; - break; + return lanes & 62914560; + case 67108864: + return 67108864; + case 134217728: + return 134217728; case 268435456: - lane = 134217728; - break; + return 268435456; + case 536870912: + return 536870912; + case 1073741824: + return 0; default: - lane = 0; - } - return lane; - } - function addFiberToLanesMap(root, fiber, lanes) { - if (isDevToolsPresent) - for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index = 31 - clz32(lanes), - lane = 1 << index; - root[index].add(fiber); - lanes &= ~lane; - } - } - function movePendingFibersToMemoized(root, lanes) { - if (isDevToolsPresent) - for ( - var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, - memoizedUpdaters = root.memoizedUpdaters; - 0 < lanes; - - ) { - var index = 31 - clz32(lanes); - root = 1 << index; - index = pendingUpdatersLaneMap[index]; - 0 < index.size && - (index.forEach(function (fiber) { - var alternate = fiber.alternate; - (null !== alternate && memoizedUpdaters.has(alternate)) || - memoizedUpdaters.add(fiber); - }), - index.clear()); - lanes &= ~root; - } - } - function lanesToEventPriority(lanes) { - lanes &= -lanes; - return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes - ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes - ? 0 !== (lanes & 134217727) - ? DefaultEventPriority - : IdleEventPriority - : ContinuousEventPriority - : DiscreteEventPriority; - } - function resolveUpdatePriority() { - var updatePriority = ReactDOMSharedInternals.p; - if (0 !== updatePriority) return updatePriority; - updatePriority = window.event; - return void 0 === updatePriority - ? DefaultEventPriority - : getEventPriority(updatePriority.type); - } - function runWithPriority(priority, fn) { - var previousPriority = ReactDOMSharedInternals.p; - try { - return (ReactDOMSharedInternals.p = priority), fn(); - } finally { - ReactDOMSharedInternals.p = previousPriority; - } - } - function detachDeletedInstance(node) { - delete node[internalInstanceKey]; - delete node[internalPropsKey]; - delete node[internalEventHandlersKey]; - delete node[internalEventHandlerListenersKey]; - delete node[internalEventHandlesSetKey]; - } - function getClosestInstanceFromNode(targetNode) { - var targetInst = targetNode[internalInstanceKey]; - if (targetInst) return targetInst; - for (var parentNode = targetNode.parentNode; parentNode; ) { - if ( - (targetInst = - parentNode[internalContainerInstanceKey] || - parentNode[internalInstanceKey]) - ) { - parentNode = targetInst.alternate; - if ( - null !== targetInst.child || - (null !== parentNode && null !== parentNode.child) - ) - for ( - targetNode = getParentSuspenseInstance(targetNode); - null !== targetNode; - - ) { - if ((parentNode = targetNode[internalInstanceKey])) - return parentNode; - targetNode = getParentSuspenseInstance(targetNode); - } - return targetInst; - } - targetNode = parentNode; - parentNode = targetNode.parentNode; - } - return null; - } - function getInstanceFromNode(node) { - if ( - (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) - ) { - var tag = node.tag; - if ( - 5 === tag || - 6 === tag || - 13 === tag || - 26 === tag || - 27 === tag || - 3 === tag - ) - return node; - } - return null; - } - function getNodeFromInstance(inst) { - var tag = inst.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) - return inst.stateNode; - throw Error("getNodeFromInstance: Invalid argument."); - } - function getResourcesFromRoot(root) { - var resources = root[internalRootNodeResourcesKey]; - resources || - (resources = root[internalRootNodeResourcesKey] = - { hoistableStyles: new Map(), hoistableScripts: new Map() }); - return resources; - } - function markNodeAsHoistable(node) { - node[internalHoistableMarker] = !0; - } - function getImplicitRole(element) { - var mappedByTag = tagToRoleMappings[element.tagName]; - if (void 0 !== mappedByTag) return mappedByTag; - switch (element.tagName) { - case "A": - case "AREA": - case "LINK": - if (element.hasAttribute("href")) return "link"; - break; - case "IMG": - if (0 < (element.getAttribute("alt") || "").length) return "img"; - break; - case "INPUT": - switch (((mappedByTag = element.type), mappedByTag)) { - case "button": - case "image": - case "reset": - case "submit": - return "button"; - case "checkbox": - case "radio": - return mappedByTag; - case "range": - return "slider"; - case "email": - case "tel": - case "text": - case "url": - return element.hasAttribute("list") ? "combobox" : "textbox"; - case "search": - return element.hasAttribute("list") ? "combobox" : "searchbox"; - default: - return null; - } - case "SELECT": - return element.hasAttribute("multiple") || 1 < element.size - ? "listbox" - : "combobox"; + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + lanes + ); } - return null; } - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + "Capture", dependencies); + function getNextLanes(root, wipLanes, rootHasPendingCommit) { + var pendingLanes = root.pendingLanes; + if (0 === pendingLanes) return 0; + var nextLanes = 0, + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; + var nonIdlePendingLanes = pendingLanes & 134217727; + 0 !== nonIdlePendingLanes + ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); + return 0 === nextLanes + ? 0 + : 0 !== wipLanes && + wipLanes !== nextLanes && + 0 === (wipLanes & suspendedLanes) && + ((suspendedLanes = nextLanes & -nextLanes), + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) + ? wipLanes + : nextLanes; } - function registerDirectEvent(registrationName, dependencies) { - registrationNameDependencies[registrationName] && - console.error( - "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", - registrationName - ); - registrationNameDependencies[registrationName] = dependencies; - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - "onDoubleClick" === registrationName && - (possibleRegistrationNames.ondblclick = registrationName); - for ( - registrationName = 0; - registrationName < dependencies.length; - registrationName++ - ) - allNativeEvents.add(dependencies[registrationName]); + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); } - function checkControlledValueProps(tagName, props) { - hasReadOnlyValue[props.type] || - props.onChange || - props.onInput || - props.readOnly || - props.disabled || - null == props.value || - ("select" === tagName - ? console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." - ) - : console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." - )); - props.onChange || - props.readOnly || - props.disabled || - null == props.checked || - console.error( - "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." - ); + function computeExpirationTime(lane, currentTime) { + switch (lane) { + case 1: + case 2: + case 4: + case 8: + case 64: + return currentTime + 250; + case 16: + case 32: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return currentTime + 5e3; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return -1; + case 67108864: + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + -1 + ); + } } - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) - return !0; - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) - return !1; - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) - return (validatedAttributeNameCache[attributeName] = !0); - illegalAttributeNameCache[attributeName] = !0; - console.error("Invalid attribute name: `%s`", attributeName); - return !1; + function claimNextTransitionLane() { + var lane = nextTransitionLane; + nextTransitionLane <<= 1; + 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); + return lane; } - function pushMutationContext() { - var prev = viewTransitionMutationContext; - viewTransitionMutationContext = !1; - return prev; + function claimNextRetryLane() { + var lane = nextRetryLane; + nextRetryLane <<= 1; + 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); + return lane; } - function getValueForAttributeOnCustomComponent(node, name, expected) { - if (isAttributeNameSafe(name)) { - if (!node.hasAttribute(name)) { - switch (typeof expected) { - case "symbol": - case "object": - return expected; - case "function": - return expected; - case "boolean": - if (!1 === expected) return expected; - } - return void 0 === expected ? void 0 : null; - } - node = node.getAttribute(name); - if ("" === node && !0 === expected) return !0; - checkAttributeStringCoercion(expected, name); - return node === "" + expected ? expected : node; - } + function createLaneMap(initial) { + for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); + return laneMap; } - function setValueForAttribute(node, name, value) { - if (isAttributeNameSafe(name)) - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix && "aria-" !== prefix) { - node.removeAttribute(name); - return; - } - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); - } + function markRootUpdated$1(root, updateLane) { + root.pendingLanes |= updateLane; + 268435456 !== updateLane && + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); } - function setValueForKnownAttribute(node, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); + function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ) { + var previouslyPendingLanes = root.pendingLanes; + root.pendingLanes = remainingLanes; + root.suspendedLanes = 0; + root.pingedLanes = 0; + root.warmLanes = 0; + root.expiredLanes &= remainingLanes; + root.entangledLanes &= remainingLanes; + root.errorRecoveryDisabledLanes &= remainingLanes; + root.shellSuspendCounter = 0; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; + for ( + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; + + ) { + var index = 31 - clz32(remainingLanes), + lane = 1 << index; + entanglements[index] = 0; + expirationTimes[index] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index]; + if (null !== hiddenUpdatesForLane) + for ( + hiddenUpdates[index] = null, index = 0; + index < hiddenUpdatesForLane.length; + index++ + ) { + var update = hiddenUpdatesForLane[index]; + null !== update && (update.lane &= -536870913); + } + remainingLanes &= ~lane; } + 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } - function setValueForNamespacedAttribute(node, namespace, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttributeNS(namespace, name, "" + value); - } + function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { + root.pendingLanes |= spawnedLane; + root.suspendedLanes &= ~spawnedLane; + var spawnedLaneIndex = 31 - clz32(spawnedLane); + root.entangledLanes |= spawnedLane; + root.entanglements[spawnedLaneIndex] = + root.entanglements[spawnedLaneIndex] | + 1073741824 | + (entangledLanes & 4194090); } - function disabledLog() {} - function disableLogs() { - if (0 === disabledDepth) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: !0, - enumerable: !0, - value: disabledLog, - writable: !0 - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); + function markRootEntangled(root, entangledLanes) { + var rootEntangledLanes = (root.entangledLanes |= entangledLanes); + for (root = root.entanglements; rootEntangledLanes; ) { + var index = 31 - clz32(rootEntangledLanes), + lane = 1 << index; + (lane & entangledLanes) | (root[index] & entangledLanes) && + (root[index] |= entangledLanes); + rootEntangledLanes &= ~lane; } - disabledDepth++; } - function reenableLogs() { - disabledDepth--; - if (0 === disabledDepth) { - var props = { configurable: !0, enumerable: !0, writable: !0 }; - Object.defineProperties(console, { - log: assign({}, props, { value: prevLog }), - info: assign({}, props, { value: prevInfo }), - warn: assign({}, props, { value: prevWarn }), - error: assign({}, props, { value: prevError }), - group: assign({}, props, { value: prevGroup }), - groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), - groupEnd: assign({}, props, { value: prevGroupEnd }) - }); + function getBumpedLaneForHydrationByLane(lane) { + switch (lane) { + case 2: + lane = 1; + break; + case 8: + lane = 4; + break; + case 32: + lane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + lane = 128; + break; + case 268435456: + lane = 134217728; + break; + default: + lane = 0; } - 0 > disabledDepth && - console.error( - "disabledDepth fell below zero. This is a bug in React. Please file an issue." - ); + return lane; } - function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; + function addFiberToLanesMap(root, fiber, lanes) { + if (isDevToolsPresent) + for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { + var index = 31 - clz32(lanes), + lane = 1 << index; + root[index].add(fiber); + lanes &= ~lane; } - return "\n" + prefix + name + suffix; } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - var frame = componentFrameCache.get(fn); - if (void 0 !== frame) return frame; - reentry = !0; - frame = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher = null; - previousDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = null; - disableLogs(); - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$0) { - control = x$0; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$1) { - control = x$1; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = - RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - _RunInRootFrame$Deter = namePropDescriptor = 0; - namePropDescriptor < sampleLines.length && - !sampleLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); - - ) - namePropDescriptor++; - for ( - ; - _RunInRootFrame$Deter < controlLines.length && - !controlLines[_RunInRootFrame$Deter].includes( - "DetermineComponentFrameRoot" - ); + function movePendingFibersToMemoized(root, lanes) { + if (isDevToolsPresent) + for ( + var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, + memoizedUpdaters = root.memoizedUpdaters; + 0 < lanes; - ) - _RunInRootFrame$Deter++; + ) { + var index = 31 - clz32(lanes); + root = 1 << index; + index = pendingUpdatersLaneMap[index]; + 0 < index.size && + (index.forEach(function (fiber) { + var alternate = fiber.alternate; + (null !== alternate && memoizedUpdaters.has(alternate)) || + memoizedUpdaters.add(fiber); + }), + index.clear()); + lanes &= ~root; + } + } + function lanesToEventPriority(lanes) { + lanes &= -lanes; + return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes + ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes + ? 0 !== (lanes & 134217727) + ? DefaultEventPriority + : IdleEventPriority + : ContinuousEventPriority + : DiscreteEventPriority; + } + function resolveUpdatePriority() { + var updatePriority = ReactDOMSharedInternals.p; + if (0 !== updatePriority) return updatePriority; + updatePriority = window.event; + return void 0 === updatePriority + ? DefaultEventPriority + : getEventPriority(updatePriority.type); + } + function runWithPriority(priority, fn) { + var previousPriority = ReactDOMSharedInternals.p; + try { + return (ReactDOMSharedInternals.p = priority), fn(); + } finally { + ReactDOMSharedInternals.p = previousPriority; + } + } + function detachDeletedInstance(node) { + delete node[internalInstanceKey]; + delete node[internalPropsKey]; + delete node[internalEventHandlersKey]; + delete node[internalEventHandlerListenersKey]; + delete node[internalEventHandlesSetKey]; + } + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + if (targetInst) return targetInst; + for (var parentNode = targetNode.parentNode; parentNode; ) { + if ( + (targetInst = + parentNode[internalContainerInstanceKey] || + parentNode[internalInstanceKey]) + ) { + parentNode = targetInst.alternate; if ( - namePropDescriptor === sampleLines.length || - _RunInRootFrame$Deter === controlLines.length + null !== targetInst.child || + (null !== parentNode && null !== parentNode.child) ) for ( - namePropDescriptor = sampleLines.length - 1, - _RunInRootFrame$Deter = controlLines.length - 1; - 1 <= namePropDescriptor && - 0 <= _RunInRootFrame$Deter && - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]; + targetNode = getParentSuspenseInstance(targetNode); + null !== targetNode; - ) - _RunInRootFrame$Deter--; - for ( - ; - 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; - namePropDescriptor--, _RunInRootFrame$Deter-- - ) - if ( - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter] ) { - if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { - do - if ( - (namePropDescriptor--, - _RunInRootFrame$Deter--, - 0 > _RunInRootFrame$Deter || - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]) - ) { - var _frame = - "\n" + - sampleLines[namePropDescriptor].replace( - " at new ", - " at " - ); - fn.displayName && - _frame.includes("") && - (_frame = _frame.replace("", fn.displayName)); - "function" === typeof fn && - componentFrameCache.set(fn, _frame); - return _frame; - } - while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); - } - break; + if ((parentNode = targetNode[internalInstanceKey])) + return parentNode; + targetNode = getParentSuspenseInstance(targetNode); } + return targetInst; } - } finally { - (reentry = !1), - (ReactSharedInternals.H = previousDispatcher), - reenableLogs(), - (Error.prepareStackTrace = frame); + targetNode = parentNode; + parentNode = targetNode.parentNode; } - sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(sampleLines) - : ""; - "function" === typeof fn && componentFrameCache.set(fn, sampleLines); - return sampleLines; + return null; } - function formatOwnerStack(error) { - var prevPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - error = error.stack; - Error.prepareStackTrace = prevPrepareStackTrace; - error.startsWith("Error: react-stack-top-frame\n") && - (error = error.slice(29)); - prevPrepareStackTrace = error.indexOf("\n"); - -1 !== prevPrepareStackTrace && - (error = error.slice(prevPrepareStackTrace + 1)); - prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); - -1 !== prevPrepareStackTrace && - (prevPrepareStackTrace = error.lastIndexOf( - "\n", - prevPrepareStackTrace - )); - if (-1 !== prevPrepareStackTrace) - error = error.slice(0, prevPrepareStackTrace); - else return ""; - return error; + function getInstanceFromNode(node) { + if ( + (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) + ) { + var tag = node.tag; + if ( + 5 === tag || + 6 === tag || + 13 === tag || + 26 === tag || + 27 === tag || + 3 === tag + ) + return node; + } + return null; + } + function getNodeFromInstance(inst) { + var tag = inst.tag; + if (5 === tag || 26 === tag || 27 === tag || 6 === tag) + return inst.stateNode; + throw Error("getNodeFromInstance: Invalid argument."); + } + function getResourcesFromRoot(root) { + var resources = root[internalRootNodeResourcesKey]; + resources || + (resources = root[internalRootNodeResourcesKey] = + { hoistableStyles: new Map(), hoistableScripts: new Map() }); + return resources; + } + function markNodeAsHoistable(node) { + node[internalHoistableMarker] = !0; + } + function getImplicitRole(element) { + var mappedByTag = tagToRoleMappings[element.tagName]; + if (void 0 !== mappedByTag) return mappedByTag; + switch (element.tagName) { + case "A": + case "AREA": + case "LINK": + if (element.hasAttribute("href")) return "link"; + break; + case "IMG": + if (0 < (element.getAttribute("alt") || "").length) return "img"; + break; + case "INPUT": + switch (((mappedByTag = element.type), mappedByTag)) { + case "button": + case "image": + case "reset": + case "submit": + return "button"; + case "checkbox": + case "radio": + return mappedByTag; + case "range": + return "slider"; + case "email": + case "tel": + case "text": + case "url": + return element.hasAttribute("list") ? "combobox" : "textbox"; + case "search": + return element.hasAttribute("list") ? "combobox" : "searchbox"; + default: + return null; + } + case "SELECT": + return element.hasAttribute("multiple") || 1 < element.size + ? "listbox" + : "combobox"; + } + return null; + } + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + registrationNameDependencies[registrationName] && + console.error( + "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", + registrationName + ); + registrationNameDependencies[registrationName] = dependencies; + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + "onDoubleClick" === registrationName && + (possibleRegistrationNames.ondblclick = registrationName); + for ( + registrationName = 0; + registrationName < dependencies.length; + registrationName++ + ) + allNativeEvents.add(dependencies[registrationName]); + } + function checkControlledValueProps(tagName, props) { + hasReadOnlyValue[props.type] || + props.onChange || + props.onInput || + props.readOnly || + props.disabled || + null == props.value || + ("select" === tagName + ? console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." + ) + : console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + )); + props.onChange || + props.readOnly || + props.disabled || + null == props.checked || + console.error( + "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + ); + } + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) + return !0; + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) + return !1; + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) + return (validatedAttributeNameCache[attributeName] = !0); + illegalAttributeNameCache[attributeName] = !0; + console.error("Invalid attribute name: `%s`", attributeName); + return !1; + } + function pushMutationContext() { + var prev = viewTransitionMutationContext; + viewTransitionMutationContext = !1; + return prev; } - function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - case 30: - return describeBuiltInComponentFrame("ViewTransition"); - default: - return ""; + function getValueForAttributeOnCustomComponent(node, name, expected) { + if (isAttributeNameSafe(name)) { + if (!node.hasAttribute(name)) { + switch (typeof expected) { + case "symbol": + case "object": + return expected; + case "function": + return expected; + case "boolean": + if (!1 === expected) return expected; + } + return void 0 === expected ? void 0 : null; + } + node = node.getAttribute(name); + if ("" === node && !0 === expected) return !0; + checkAttributeStringCoercion(expected, name); + return node === "" + expected ? expected : node; } } - function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do { - info += describeFiber(workInProgress); - var debugInfo = workInProgress._debugInfo; - if (debugInfo) - for (var i = debugInfo.length - 1; 0 <= i; i--) { - var entry = debugInfo[i]; - if ("string" === typeof entry.name) { - var JSCompiler_temp_const = info, - env = entry.env; - var JSCompiler_inline_result = describeBuiltInComponentFrame( - entry.name + (env ? " [" + env + "]" : "") - ); - info = JSCompiler_temp_const + JSCompiler_inline_result; + function setValueForAttribute(node, name, value) { + if (isAttributeNameSafe(name)) + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix && "aria-" !== prefix) { + node.removeAttribute(name); + return; } - } - workInProgress = workInProgress.return; - } while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; - } - } - function describeFunctionComponentFrameWithoutLineNumber(fn) { - return (fn = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(fn) - : ""; - } - function getCurrentFiberOwnerNameInDevOrNull() { - if (null === current) return null; - var owner = current._debugOwner; - return null != owner ? getComponentNameFromOwner(owner) : null; + } + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); + } } - function getCurrentFiberStackInDev() { - if (null === current) return ""; - var workInProgress = current; - try { - var info = ""; - 6 === workInProgress.tag && (workInProgress = workInProgress.return); - switch (workInProgress.tag) { - case 26: - case 27: - case 5: - info += describeBuiltInComponentFrame(workInProgress.type); - break; - case 13: - info += describeBuiltInComponentFrame("Suspense"); - break; - case 19: - info += describeBuiltInComponentFrame("SuspenseList"); - break; - case 31: - info += describeBuiltInComponentFrame("Activity"); - break; - case 30: - info += describeBuiltInComponentFrame("ViewTransition"); - break; - case 0: - case 15: - case 1: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type - )); - break; - case 11: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type.render - )); + function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; } - for (; workInProgress; ) - if ("number" === typeof workInProgress.tag) { - var fiber = workInProgress; - workInProgress = fiber._debugOwner; - var debugStack = fiber._debugStack; - workInProgress && - debugStack && - ("string" !== typeof debugStack && - (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), - "" !== debugStack && (info += "\n" + debugStack)); - } else if (null != workInProgress.debugStack) { - var ownerStack = workInProgress.debugStack; - (workInProgress = workInProgress.owner) && - ownerStack && - (info += "\n" + formatOwnerStack(ownerStack)); - } else break; - var JSCompiler_inline_result = info; - } catch (x) { - JSCompiler_inline_result = - "\nError generating stack: " + x.message + "\n" + x.stack; + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); } - return JSCompiler_inline_result; } - function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { - var previousFiber = current; - setCurrentFiber(fiber); - try { - return null !== fiber && fiber._debugTask - ? fiber._debugTask.run( - callback.bind(null, arg0, arg1, arg2, arg3, arg4) - ) - : callback(arg0, arg1, arg2, arg3, arg4); - } finally { - setCurrentFiber(previousFiber); + function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + checkAttributeStringCoercion(value, name); + node.setAttributeNS(namespace, name, "" + value); } - throw Error( - "runWithFiberInDEV should never be called in production. This is a bug in React." - ); - } - function setCurrentFiber(fiber) { - ReactSharedInternals.getCurrentStack = - null === fiber ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = fiber; } function getToStringValue(value) { switch (typeof value) { @@ -3838,11 +3838,6 @@ enqueueUpdate$1(fiber, null, null, lane); return getRootForUpdatedFiber(fiber); } - function enqueueGestureRender(fiber) { - fiber = markUpdateLaneFromFiberToRoot(fiber, null, 64); - null !== fiber && markRootUpdated$1(fiber, 64); - return fiber; - } function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { sourceFiber.lanes |= lane; var alternate = sourceFiber.alternate; @@ -5176,6 +5171,21 @@ cache.controller.abort(); }); } + function queueTransitionTypes(root, transitionTypes) { + if (0 !== (root.pendingLanes & 4194048)) { + var queued = root.transitionTypes; + null === queued && (queued = root.transitionTypes = []); + for (root = 0; root < transitionTypes.length; root++) { + var transitionType = transitionTypes[root]; + -1 === queued.indexOf(transitionType) && queued.push(transitionType); + } + } + } + function claimQueuedTransitionTypes(root) { + var claimed = root.transitionTypes; + root.transitionTypes = null; + return claimed; + } function startUpdateTimerByLane(lane) { var JSCompiler_temp; (JSCompiler_temp = 0 !== (lane & 3)) || @@ -5305,6 +5315,7 @@ if ( 0 === --currentEntangledPendingCount && (-1 < transitionUpdateTime || (transitionStartTime = -1.1), + (entangledTransitionTypes = null), null !== currentEntangledListeners) ) { null !== currentEntangledActionThenable && @@ -5325,21 +5336,115 @@ then: function (resolve) { listeners.push(resolve); } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; + } + function startScheduledGesture( + root, + gestureTimeline, + gestureOptions, + transitionTypes + ) { + if (gestureOptions && null != gestureOptions.rangeStart) + var JSCompiler_temp = gestureOptions.rangeStart; + else { + JSCompiler_temp = gestureTimeline.currentTime; + if (null === JSCompiler_temp) + throw Error( + "Cannot start a gesture with a disconnected AnimationTimeline." + ); + JSCompiler_temp = + "number" === typeof JSCompiler_temp + ? JSCompiler_temp + : JSCompiler_temp.value; + } + gestureOptions = + gestureOptions && null != gestureOptions.rangeEnd + ? gestureOptions.rangeEnd + : 50 > JSCompiler_temp + ? 100 + : 0; + for (root = root.pendingGestures; null !== root; ) { + if (root.provider === gestureTimeline) { + root.count++; + root.rangeStart = JSCompiler_temp; + root.rangeEnd = gestureOptions; + if (null !== transitionTypes) + for ( + gestureTimeline = root.types, + null === gestureTimeline && (gestureTimeline = root.types = []), + JSCompiler_temp = 0; + JSCompiler_temp < transitionTypes.length; + JSCompiler_temp++ + ) + (gestureOptions = transitionTypes[JSCompiler_temp]), + -1 === gestureTimeline.indexOf(gestureOptions) && + gestureTimeline.push(gestureOptions); + return root; + } + root = root.next; + if (null === root) break; + } + return null; + } + function deleteScheduledGesture(root, gesture) { + null === gesture.prev + ? (root.pendingGestures === gesture && + ((root.pendingGestures = gesture.next), + null === root.pendingGestures && (root.pendingLanes &= -65)), + root.stoppingGestures === gesture && + (root.stoppingGestures = gesture.next)) + : ((gesture.prev.next = gesture.next), + null !== gesture.next && (gesture.next.prev = gesture.prev), + (gesture.prev = null), + (gesture.next = null)); + } + function stopCompletedGestures(root) { + var gesture = root.stoppingGestures; + for (root.stoppingGestures = null; null !== gesture; ) + null !== gesture.running && + (gesture.running.skipTransition(), (gesture.running = null)), + (root = gesture.next), + (gesture.next = null), + (gesture.prev = null), + (gesture = root); + } + function chainGestureCancellation(root, scheduledGesture, prevCancel) { + return function () { + if ( + null !== scheduledGesture && + (scheduledGesture.count--, 0 === scheduledGesture.count) + ) { + deleteScheduledGesture(root, scheduledGesture); + var runningTransition = scheduledGesture.running; + if (null !== runningTransition) { + var pendingLanesExcludingGestureLane = root.pendingLanes & -65; + 0 !== (pendingLanesExcludingGestureLane & 124) || + 0 !== (pendingLanesExcludingGestureLane & 4194048) + ? ((runningTransition = root.stoppingGestures), + null !== runningTransition && + ((scheduledGesture.next = runningTransition), + (runningTransition.prev = scheduledGesture)), + (root.stoppingGestures = scheduledGesture)) + : ((scheduledGesture.running = null), + runningTransition.skipTransition()); + } } - ); - return thenableWithOverride; + null !== prevCancel && prevCancel(); + }; } function peekCacheFromPool() { var cacheResumedFromPreviousRender = resumedCache.current; @@ -6960,76 +7065,6 @@ } return null; } - function scheduleGesture( - root, - provider, - initialDirection, - rangePrevious, - rangeCurrent, - rangeNext - ) { - for (var prev = root.pendingGestures; null !== prev; ) { - if (prev.provider === provider) return prev.count++, prev; - var next = prev.next; - if (null === next) break; - prev = next; - } - var isFlippedDirection = rangePrevious > rangeNext; - next = subscribeToGestureDirection( - provider, - rangeCurrent, - function (direction) { - isFlippedDirection && (direction = !direction); - gesture.direction !== direction && - ((gesture.direction = direction), - null === gesture.prev && - root.pendingGestures !== gesture && - ((direction = root.pendingGestures), - (gesture.next = direction), - null !== direction && (direction.prev = gesture), - (root.pendingGestures = gesture), - (root.pendingLanes |= 64), - ensureRootIsScheduled(root))); - } - ); - var gesture = { - provider: provider, - count: 1, - direction: initialDirection, - rangePrevious: rangePrevious, - rangeCurrent: rangeCurrent, - rangeNext: rangeNext, - cancel: next, - running: null, - prev: prev, - next: null - }; - null === prev ? (root.pendingGestures = gesture) : (prev.next = gesture); - ensureRootIsScheduled(root); - return gesture; - } - function deleteScheduledGesture(root, gesture) { - null === gesture.prev - ? (root.pendingGestures === gesture && - ((root.pendingGestures = gesture.next), - null === root.pendingGestures && (root.pendingLanes &= -65)), - root.stoppingGestures === gesture && - (root.stoppingGestures = gesture.next)) - : ((gesture.prev.next = gesture.next), - null !== gesture.next && (gesture.next.prev = gesture.prev), - (gesture.prev = null), - (gesture.next = null)); - } - function stopCompletedGestures(root) { - var gesture = root.stoppingGestures; - for (root.stoppingGestures = null; null !== gesture; ) - null !== gesture.running && - (gesture.running.skipTransition(), (gesture.running = null)), - (root = gesture.next), - (gesture.next = null), - (gesture.prev = null), - (gesture = root); - } function mountHookTypesDev() { var hookName = currentHookNameInDev; null === hookTypesDev @@ -7494,19 +7529,53 @@ update = current, didReadFromEntangledAsyncAction = !1; do { - var updateLane = update.lane & -536870913; - if ( - updateLane !== update.lane - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - var revertLane = update.revertLane; - if (0 === revertLane) + var updateLane = update.lane & -536870913, + shouldSkipUpdate = + updateLane !== update.lane + ? (workInProgressRootRenderLanes & updateLane) !== updateLane + : (renderLanes & updateLane) !== updateLane; + if (64 === updateLane) { + var scheduledGesture = update.gesture; + if (null !== scheduledGesture) + if (0 === scheduledGesture.count) { + update = update.next; + continue; + } else if (64 !== renderLanes) shouldSkipUpdate = !0; + else { + shouldSkipUpdate = workInProgressRoot; + if (null === shouldSkipUpdate) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + shouldSkipUpdate = + shouldSkipUpdate.pendingGestures !== scheduledGesture; + } + } + if (shouldSkipUpdate) + (scheduledGesture = { + lane: updateLane, + revertLane: update.revertLane, + gesture: update.gesture, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), + null === newBaseQueueLast + ? ((newBaseQueueFirst = newBaseQueueLast = scheduledGesture), + (baseFirst = pendingQueue)) + : (newBaseQueueLast = newBaseQueueLast.next = scheduledGesture), + (currentlyRenderingFiber.lanes |= updateLane), + (workInProgressRootSkippedLanes |= updateLane); + else { + scheduledGesture = update.revertLane; + if (0 === scheduledGesture) null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7514,15 +7583,16 @@ }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = !0); - else if ((renderLanes & revertLane) === revertLane) { + else if ((renderLanes & scheduledGesture) === scheduledGesture) { update = update.next; - revertLane === currentEntangledLane && + scheduledGesture === currentEntangledLane && (didReadFromEntangledAsyncAction = !0); continue; } else (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7532,29 +7602,15 @@ ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber.lanes |= revertLane), - (workInProgressRootSkippedLanes |= revertLane); + (currentlyRenderingFiber.lanes |= scheduledGesture), + (workInProgressRootSkippedLanes |= scheduledGesture); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane); - } else - (revertLane = { - lane: updateLane, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), - null === newBaseQueueLast - ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), - (baseFirst = pendingQueue)) - : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber.lanes |= updateLane), - (workInProgressRootSkippedLanes |= updateLane); + } update = update.next; } while (null !== update && update !== current); null === newBaseQueueLast @@ -7865,8 +7921,11 @@ if (node.isTransition) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; - ReactSharedInternals.T._updatedFibers = new Set(); try { var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S; @@ -7876,7 +7935,15 @@ } catch (error) { onActionError(actionQueue, node, error); } finally { - (ReactSharedInternals.T = prevTransition), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), + (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && ((actionQueue = currentTransition._updatedFibers.size), @@ -7898,7 +7965,9 @@ null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then - ? (returnValue.then( + ? (ReactSharedInternals.asyncTransitions++, + returnValue.then(releaseAsyncTransition, releaseAsyncTransition), + returnValue.then( function (nextState) { onActionSuccess(actionQueue, node, nextState); }, @@ -8334,6 +8403,9 @@ workInProgressRootSkippedLanes |= hook; return prevValue; } + function releaseAsyncTransition() { + ReactSharedInternals.asyncTransitions--; + } function startTransition( fiber, queue, @@ -8348,9 +8420,12 @@ : ContinuousEventPriority; var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); - currentTransition._updatedFibers = new Set(); try { var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S; @@ -8361,6 +8436,8 @@ "object" === typeof returnValue && "function" === typeof returnValue.then ) { + ReactSharedInternals.asyncTransitions++; + returnValue.then(releaseAsyncTransition, releaseAsyncTransition); var thenableForFinishedState = chainThenableValue( returnValue, finishedState @@ -8387,6 +8464,14 @@ ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && @@ -8453,14 +8538,19 @@ return existingStateHook; } function requestFormReset$1(formFiber) { - null === ReactSharedInternals.T && + var transition = ReactSharedInternals.T; + if (null === transition) console.error( "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition." ); - var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + else if (transition.gesture) + throw Error( + "Cannot requestFormReset() inside a startGestureTransition. There should be no side-effects associated with starting a Gesture until its Action is invoked. Move side-effects to the Action instead." + ); + transition = ensureFormComponentIsStateful(formFiber).next.queue; dispatchSetStateInternal( formFiber, - resetStateQueue, + transition, {}, requestUpdateLane(formFiber) ); @@ -8554,6 +8644,7 @@ var update = { lane: args, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8581,6 +8672,7 @@ var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8629,14 +8721,17 @@ queue, action ) { - null === ReactSharedInternals.T && + var transition = ReactSharedInternals.T; + null === transition && 0 === currentEntangledLane && console.error( "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition." ); + var lane = null !== transition && transition.gesture ? 64 : 2; action = { - lane: 2, + lane: lane, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8646,16 +8741,47 @@ if (throwIfDuringRender) throw Error("Cannot update optimistic state while rendering."); console.error("Cannot call startTransition while rendering."); - } else - (throwIfDuringRender = enqueueConcurrentHookUpdate( + } else if ( + ((throwIfDuringRender = enqueueConcurrentHookUpdate( fiber, queue, action, - 2 + lane )), - null !== throwIfDuringRender && - (startUpdateTimerByLane(2), - scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2)); + null !== throwIfDuringRender && + (startUpdateTimerByLane(lane), + scheduleUpdateOnFiber(throwIfDuringRender, fiber, lane), + null !== transition && + ((transition = transition.gesture), null !== transition))) + ) { + a: { + for (fiber = throwIfDuringRender.pendingGestures; null !== fiber; ) { + if (fiber.provider === transition) { + throwIfDuringRender = fiber; + break a; + } + lane = fiber.next; + if (null === lane) break; + fiber = lane; + } + transition = { + provider: transition, + count: 0, + rangeStart: 0, + rangeEnd: 100, + types: null, + running: null, + prev: fiber, + next: null + }; + null === fiber + ? (throwIfDuringRender.pendingGestures = transition) + : (fiber.next = transition); + ensureRootIsScheduled(throwIfDuringRender); + throwIfDuringRender = transition; + } + action.gesture = throwIfDuringRender; + } } function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; @@ -8682,115 +8808,6 @@ markRootEntangled(root, lane); } } - function startGesture(fiber, queue, gestureProvider, gestureOptions) { - var root = enqueueGestureRender(fiber); - if (null === root) return function () {}; - fiber = getCurrentGestureOffset(gestureProvider); - var range = gestureOptions && gestureOptions.range, - rangePrevious = range ? range[0] : 0, - rangeCurrent = range ? range[1] : fiber; - range = range ? range[2] : 100; - ((rangePrevious > rangeCurrent && range > rangeCurrent) || - (rangePrevious < rangeCurrent && range < rangeCurrent)) && - console.error( - 'The range of a gesture needs "previous" and "next" to be on either side of the "current" offset. Both cannot be above current and both cannot be below current.' - ); - var isFlippedDirection = rangePrevious > range, - update = { - gesture: scheduleGesture( - root, - gestureProvider, - fiber < rangeCurrent - ? isFlippedDirection - : fiber > rangeCurrent - ? !isFlippedDirection - : gestureOptions && "next" === gestureOptions.direction - ? !0 - : gestureOptions && "previous" === gestureOptions.direction - ? !1 - : queue.initialDirection, - rangePrevious, - rangeCurrent, - range - ), - prev: null, - next: queue.pending - }; - null !== queue.pending && (queue.pending.prev = update); - queue.pending = update; - return function () { - if (null === update.prev) - if (queue.pending === update) queue.pending = update.next; - else return; - else - (update.prev.next = update.next), - null !== update.next && (update.next.prev = update.prev), - (update.prev = null), - (update.next = null); - var gesture = update.gesture; - gesture.count--; - if (0 === gesture.count) { - var cancelDirectionSubscription = gesture.cancel; - cancelDirectionSubscription(); - deleteScheduledGesture(root, gesture); - cancelDirectionSubscription = gesture.running; - if (null !== cancelDirectionSubscription) { - var pendingLanesExcludingGestureLane = root.pendingLanes & -65; - 0 !== (pendingLanesExcludingGestureLane & 124) || - 0 !== (pendingLanesExcludingGestureLane & 4194048) - ? ((cancelDirectionSubscription = root.stoppingGestures), - null !== cancelDirectionSubscription && - ((gesture.next = cancelDirectionSubscription), - (cancelDirectionSubscription.prev = gesture)), - (root.stoppingGestures = gesture)) - : ((gesture.running = null), - cancelDirectionSubscription.skipTransition()); - } - } - }; - } - function mountSwipeTransition(previous, current) { - previous = { - pending: null, - dispatch: null, - initialDirection: previous === current - }; - var startGestureOnHook = (previous.dispatch = startGesture.bind( - null, - currentlyRenderingFiber, - previous - )); - mountWorkInProgressHook().queue = previous; - return [current, startGestureOnHook]; - } - function updateSwipeTransition(previous, current, next) { - var queue = updateWorkInProgressHook().queue, - startGestureOnHook = queue.dispatch, - rootRenderLanes = workInProgressRootRenderLanes, - value = current; - if (null !== queue.pending) { - if (64 === rootRenderLanes) { - rootRenderLanes = workInProgressRoot; - if (null === rootRenderLanes) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - rootRenderLanes = rootRenderLanes.pendingGestures; - if (null !== rootRenderLanes) - for (var update = queue.pending; null !== update; ) { - if (rootRenderLanes === update.gesture) { - value = rootRenderLanes.direction ? next : previous; - break; - } - update = update.next; - } - didReceiveUpdate = !0; - } - currentlyRenderingFiber.lanes |= 64; - } - queue.initialDirection = previous === current; - return [value, startGestureOnHook]; - } function warnOnInvalidCallback(callback) { if (null !== callback && "function" !== typeof callback) { var key = String(callback); @@ -10202,33 +10219,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2862; - var JSCompiler_object_inline_stack_2861 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2879; + var JSCompiler_object_inline_stack_2878 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2859 = !1; + var JSCompiler_object_inline_message_2876 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2862 = didSuspend) || - (JSCompiler_object_inline_componentStack_2862 = + (JSCompiler_object_inline_componentStack_2879 = didSuspend) || + (JSCompiler_object_inline_componentStack_2879 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2862 && - ((JSCompiler_object_inline_message_2859 = !0), + JSCompiler_object_inline_componentStack_2879 && + ((JSCompiler_object_inline_message_2876 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2862 = + JSCompiler_object_inline_componentStack_2879 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2859 + JSCompiler_object_inline_message_2876 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2860 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2877 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2860)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2877)) { c: { - var instance = JSCompiler_object_inline_digest_2860; + var instance = JSCompiler_object_inline_digest_2877; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -10270,87 +10287,87 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2860 + JSCompiler_object_inline_digest_2877 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2860 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2877 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2860 && - ((JSCompiler_object_inline_digest_2860 = - JSCompiler_object_inline_digest_2860.dehydrated), - null !== JSCompiler_object_inline_digest_2860) + null !== JSCompiler_object_inline_digest_2877 && + ((JSCompiler_object_inline_digest_2877 = + JSCompiler_object_inline_digest_2877.dehydrated), + null !== JSCompiler_object_inline_digest_2877) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2860) + isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2877) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2860 = - JSCompiler_object_inline_stack_2861.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2861.fallback; - if (JSCompiler_object_inline_message_2859) + JSCompiler_object_inline_digest_2877 = + JSCompiler_object_inline_stack_2878.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2878.fallback; + if (JSCompiler_object_inline_message_2876) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2861 = + (JSCompiler_object_inline_stack_2878 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2860, + JSCompiler_object_inline_digest_2877, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2859 = workInProgress.child), - (JSCompiler_object_inline_message_2859.memoizedState = + (JSCompiler_object_inline_message_2876 = workInProgress.child), + (JSCompiler_object_inline_message_2876.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2859.childLanes = + (JSCompiler_object_inline_message_2876.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2862, + JSCompiler_object_inline_componentStack_2879, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2861 + JSCompiler_object_inline_stack_2878 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2861.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2878.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2861 = + (JSCompiler_object_inline_stack_2878 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2860, + JSCompiler_object_inline_digest_2877, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2859 = workInProgress.child), - (JSCompiler_object_inline_message_2859.memoizedState = + (JSCompiler_object_inline_message_2876 = workInProgress.child), + (JSCompiler_object_inline_message_2876.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2859.childLanes = + (JSCompiler_object_inline_message_2876.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2862, + JSCompiler_object_inline_componentStack_2879, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2861 + JSCompiler_object_inline_stack_2878 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2860 + JSCompiler_object_inline_digest_2877 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2860 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2860) + ((JSCompiler_object_inline_digest_2877 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2877) ) { if (didSuspend) workInProgress.flags & 256 @@ -10367,94 +10384,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2859 = - JSCompiler_object_inline_stack_2861.fallback), - (JSCompiler_object_inline_digest_2860 = workInProgress.mode), - (JSCompiler_object_inline_stack_2861 = + (JSCompiler_object_inline_message_2876 = + JSCompiler_object_inline_stack_2878.fallback), + (JSCompiler_object_inline_digest_2877 = workInProgress.mode), + (JSCompiler_object_inline_stack_2878 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2861.children + children: JSCompiler_object_inline_stack_2878.children }, - JSCompiler_object_inline_digest_2860 + JSCompiler_object_inline_digest_2877 )), - (JSCompiler_object_inline_message_2859 = + (JSCompiler_object_inline_message_2876 = createFiberFromFragment( - JSCompiler_object_inline_message_2859, - JSCompiler_object_inline_digest_2860, + JSCompiler_object_inline_message_2876, + JSCompiler_object_inline_digest_2877, renderLanes, null )), - (JSCompiler_object_inline_message_2859.flags |= 2), - (JSCompiler_object_inline_stack_2861.return = workInProgress), - (JSCompiler_object_inline_message_2859.return = workInProgress), - (JSCompiler_object_inline_stack_2861.sibling = - JSCompiler_object_inline_message_2859), - (workInProgress.child = JSCompiler_object_inline_stack_2861), + (JSCompiler_object_inline_message_2876.flags |= 2), + (JSCompiler_object_inline_stack_2878.return = workInProgress), + (JSCompiler_object_inline_message_2876.return = workInProgress), + (JSCompiler_object_inline_stack_2878.sibling = + JSCompiler_object_inline_message_2876), + (workInProgress.child = JSCompiler_object_inline_stack_2878), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2861 = workInProgress.child), - (JSCompiler_object_inline_stack_2861.memoizedState = + (JSCompiler_object_inline_stack_2878 = workInProgress.child), + (JSCompiler_object_inline_stack_2878.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2861.childLanes = + (JSCompiler_object_inline_stack_2878.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2862, + JSCompiler_object_inline_componentStack_2879, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2859)); + (workInProgress = JSCompiler_object_inline_message_2876)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2860)) + isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2877)) ) { - JSCompiler_object_inline_componentStack_2862 = - JSCompiler_object_inline_digest_2860.nextSibling && - JSCompiler_object_inline_digest_2860.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2862) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2862.dgst; - var message = JSCompiler_object_inline_componentStack_2862.msg; - instance = JSCompiler_object_inline_componentStack_2862.stck; + JSCompiler_object_inline_componentStack_2879 = + JSCompiler_object_inline_digest_2877.nextSibling && + JSCompiler_object_inline_digest_2877.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2879) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2879.dgst; + var message = JSCompiler_object_inline_componentStack_2879.msg; + instance = JSCompiler_object_inline_componentStack_2879.stck; var componentStack = - JSCompiler_object_inline_componentStack_2862.cstck; + JSCompiler_object_inline_componentStack_2879.cstck; } - JSCompiler_object_inline_message_2859 = message; - JSCompiler_object_inline_digest_2860 = JSCompiler_temp; - JSCompiler_object_inline_stack_2861 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2862 = + JSCompiler_object_inline_message_2876 = message; + JSCompiler_object_inline_digest_2877 = JSCompiler_temp; + JSCompiler_object_inline_stack_2878 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2879 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2860 && - ((JSCompiler_object_inline_componentStack_2862 = - JSCompiler_object_inline_message_2859 - ? Error(JSCompiler_object_inline_message_2859) + "POSTPONE" !== JSCompiler_object_inline_digest_2877 && + ((JSCompiler_object_inline_componentStack_2879 = + JSCompiler_object_inline_message_2876 + ? Error(JSCompiler_object_inline_message_2876) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_componentStack_2862.stack = - JSCompiler_object_inline_stack_2861 || ""), - (JSCompiler_object_inline_componentStack_2862.digest = - JSCompiler_object_inline_digest_2860), - (JSCompiler_object_inline_stack_2861 = + (JSCompiler_object_inline_componentStack_2879.stack = + JSCompiler_object_inline_stack_2878 || ""), + (JSCompiler_object_inline_componentStack_2879.digest = + JSCompiler_object_inline_digest_2877), + (JSCompiler_object_inline_stack_2878 = void 0 === JSCompiler_temp ? null : JSCompiler_temp), - (JSCompiler_object_inline_message_2859 = { - value: JSCompiler_object_inline_componentStack_2862, + (JSCompiler_object_inline_message_2876 = { + value: JSCompiler_object_inline_componentStack_2879, source: null, - stack: JSCompiler_object_inline_stack_2861 + stack: JSCompiler_object_inline_stack_2878 }), - "string" === typeof JSCompiler_object_inline_stack_2861 && + "string" === typeof JSCompiler_object_inline_stack_2878 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2862, - JSCompiler_object_inline_message_2859 + JSCompiler_object_inline_componentStack_2879, + JSCompiler_object_inline_message_2876 ), - queueHydrationError(JSCompiler_object_inline_message_2859)); + queueHydrationError(JSCompiler_object_inline_message_2876)); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -10468,44 +10485,44 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2862 = + (JSCompiler_object_inline_componentStack_2879 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2862) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2879) ) { - JSCompiler_object_inline_componentStack_2862 = workInProgressRoot; + JSCompiler_object_inline_componentStack_2879 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_componentStack_2862 && - ((JSCompiler_object_inline_stack_2861 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2861 = - 0 !== (JSCompiler_object_inline_stack_2861 & 42) + null !== JSCompiler_object_inline_componentStack_2879 && + ((JSCompiler_object_inline_stack_2878 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2878 = + 0 !== (JSCompiler_object_inline_stack_2878 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2861 + JSCompiler_object_inline_stack_2878 )), - (JSCompiler_object_inline_stack_2861 = + (JSCompiler_object_inline_stack_2878 = 0 !== - (JSCompiler_object_inline_stack_2861 & - (JSCompiler_object_inline_componentStack_2862.suspendedLanes | + (JSCompiler_object_inline_stack_2878 & + (JSCompiler_object_inline_componentStack_2879.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2861), - 0 !== JSCompiler_object_inline_stack_2861 && - JSCompiler_object_inline_stack_2861 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2878), + 0 !== JSCompiler_object_inline_stack_2878 && + JSCompiler_object_inline_stack_2878 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2861), + ((prevState.retryLane = JSCompiler_object_inline_stack_2878), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2861 + JSCompiler_object_inline_stack_2878 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2862, + JSCompiler_object_inline_componentStack_2879, current, - JSCompiler_object_inline_stack_2861 + JSCompiler_object_inline_stack_2878 ), SelectiveHydrationException) ); - JSCompiler_object_inline_digest_2860.data === + JSCompiler_object_inline_digest_2877.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -10513,14 +10530,14 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2860.data === + JSCompiler_object_inline_digest_2877.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2860.nextSibling + JSCompiler_object_inline_digest_2877.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -10538,54 +10555,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2861.children + JSCompiler_object_inline_stack_2878.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2859) + if (JSCompiler_object_inline_message_2876) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2859 = - JSCompiler_object_inline_stack_2861.fallback), - (JSCompiler_object_inline_digest_2860 = workInProgress.mode), + (JSCompiler_object_inline_message_2876 = + JSCompiler_object_inline_stack_2878.fallback), + (JSCompiler_object_inline_digest_2877 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2861 = createWorkInProgress( + (JSCompiler_object_inline_stack_2878 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2861.children + children: JSCompiler_object_inline_stack_2878.children } )), - (JSCompiler_object_inline_stack_2861.subtreeFlags = + (JSCompiler_object_inline_stack_2878.subtreeFlags = JSCompiler_temp.subtreeFlags & 65011712), null !== instance - ? (JSCompiler_object_inline_message_2859 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2876 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2859 + JSCompiler_object_inline_message_2876 )) - : ((JSCompiler_object_inline_message_2859 = createFiberFromFragment( - JSCompiler_object_inline_message_2859, - JSCompiler_object_inline_digest_2860, + : ((JSCompiler_object_inline_message_2876 = createFiberFromFragment( + JSCompiler_object_inline_message_2876, + JSCompiler_object_inline_digest_2877, renderLanes, null )), - (JSCompiler_object_inline_message_2859.flags |= 2)), - (JSCompiler_object_inline_message_2859.return = workInProgress), - (JSCompiler_object_inline_stack_2861.return = workInProgress), - (JSCompiler_object_inline_stack_2861.sibling = - JSCompiler_object_inline_message_2859), - (workInProgress.child = JSCompiler_object_inline_stack_2861), - (JSCompiler_object_inline_stack_2861 = - JSCompiler_object_inline_message_2859), - (JSCompiler_object_inline_message_2859 = workInProgress.child), - (JSCompiler_object_inline_digest_2860 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2860 - ? (JSCompiler_object_inline_digest_2860 = + (JSCompiler_object_inline_message_2876.flags |= 2)), + (JSCompiler_object_inline_message_2876.return = workInProgress), + (JSCompiler_object_inline_stack_2878.return = workInProgress), + (JSCompiler_object_inline_stack_2878.sibling = + JSCompiler_object_inline_message_2876), + (workInProgress.child = JSCompiler_object_inline_stack_2878), + (JSCompiler_object_inline_stack_2878 = + JSCompiler_object_inline_message_2876), + (JSCompiler_object_inline_message_2876 = workInProgress.child), + (JSCompiler_object_inline_digest_2877 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2877 + ? (JSCompiler_object_inline_digest_2877 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2860.cachePool), + JSCompiler_object_inline_digest_2877.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -10593,38 +10610,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2860 = { + (JSCompiler_object_inline_digest_2877 = { baseLanes: - JSCompiler_object_inline_digest_2860.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2877.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2859.memoizedState = - JSCompiler_object_inline_digest_2860), - (JSCompiler_object_inline_message_2859.childLanes = + (JSCompiler_object_inline_message_2876.memoizedState = + JSCompiler_object_inline_digest_2877), + (JSCompiler_object_inline_message_2876.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2862, + JSCompiler_object_inline_componentStack_2879, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2861 + JSCompiler_object_inline_stack_2878 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2861.children + children: JSCompiler_object_inline_stack_2878.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2862 = + ((JSCompiler_object_inline_componentStack_2879 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2862 + null === JSCompiler_object_inline_componentStack_2879 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2862.push(current)); + : JSCompiler_object_inline_componentStack_2879.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -13079,7 +13096,8 @@ if (5 === tag || 6 === tag) { var stateNode = node.stateNode; before - ? ((parent = + ? (warnForReactChildrenConflict(parent), + (parent = 9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName @@ -13088,20 +13106,20 @@ supportsMoveBefore && null !== stateNode.parentNode ? parent.moveBefore(stateNode, before) : parent.insertBefore(stateNode, before)) - : ((before = parent), - (parent = - 9 === before.nodeType - ? before.body - : "HTML" === before.nodeName - ? before.ownerDocument.body - : before), + : (warnForReactChildrenConflict(parent), + (before = + 9 === parent.nodeType + ? parent.body + : "HTML" === parent.nodeName + ? parent.ownerDocument.body + : parent), supportsMoveBefore && null !== stateNode.parentNode - ? parent.moveBefore(stateNode, null) - : parent.appendChild(stateNode), - (stateNode = before._reactRootContainer), + ? before.moveBefore(stateNode, null) + : before.appendChild(stateNode), + (stateNode = parent._reactRootContainer), (null !== stateNode && void 0 !== stateNode) || - null !== parent.onclick || - (parent.onclick = noop$1)); + null !== before.onclick || + (before.onclick = noop$1)); 5 === tag && null === node.alternate && null !== parentFragmentInstances && @@ -14803,13 +14821,16 @@ root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: - current = currentHoistableRoot; + current = pushMutationContext(); + flags = currentHoistableRoot; currentHoistableRoot = getHoistableRoot( finishedWork.stateNode.containerInfo ); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); - currentHoistableRoot = current; + currentHoistableRoot = flags; + viewTransitionMutationContext && (rootViewTransitionAffected = !0); + viewTransitionMutationContext = current; break; case 12: current = pushNestedEffectDurations(); @@ -15009,7 +15030,10 @@ viewTransitionContextChanged$1 = !1; pushViewTransitionCancelableScope(); recursivelyTraverseAfterMutationEffects(root, finishedWork); - if (!viewTransitionContextChanged$1) { + if ( + !viewTransitionContextChanged$1 && + !rootViewTransitionAffected + ) { finishedWork = viewTransitionCancelableChildren; if (null !== finishedWork) for (var i = 0; i < finishedWork.length; i += 3) @@ -15025,6 +15049,13 @@ case 5: recursivelyTraverseAfterMutationEffects(root, finishedWork); break; + case 4: + i = viewTransitionContextChanged$1; + viewTransitionContextChanged$1 = !1; + recursivelyTraverseAfterMutationEffects(root, finishedWork); + viewTransitionContextChanged$1 && (rootViewTransitionAffected = !0); + viewTransitionContextChanged$1 = i; + break; case 22: null === finishedWork.memoizedState && (null !== current.memoizedState @@ -16220,7 +16251,7 @@ ); finishedWork.flags & 4 && console.error( - "useSwipeTransition() caused something to render a new <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't mount any new <%s> elements.", + "startGestureTransition() caused something to render a new <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't mount any new <%s> elements.", finishedWork.type, finishedWork.type ); @@ -16457,7 +16488,7 @@ ), viewTransitionMutationContext && console.error( - "useSwipeTransition() caused something to mutate <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't update any state which causes <%s> to change.", + "startGestureTransition() caused something to mutate <%s>. This is not possible in the current implementation. Make sure that the swipe doesn't update any state which causes <%s> to change.", deletions.type, deletions.type ), @@ -16897,12 +16928,17 @@ ) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; var transition = ReactSharedInternals.T; - return null !== transition - ? (transition._updatedFibers || (transition._updatedFibers = new Set()), - transition._updatedFibers.add(fiber), - (fiber = currentEntangledLane), - 0 !== fiber ? fiber : requestTransitionLane()) - : resolveUpdatePriority(); + if (null !== transition) { + if (transition.gesture) + throw Error( + "Cannot setState on regular state inside a startGestureTransition. Gestures can only update the useOptimistic() hook. There should be no side-effects associated with starting a Gesture until its Action is invoked. Move side-effects to the Action instead." + ); + transition._updatedFibers || (transition._updatedFibers = new Set()); + transition._updatedFibers.add(fiber); + fiber = currentEntangledLane; + return 0 !== fiber ? fiber : requestTransitionLane(); + } + return resolveUpdatePriority(); } function requestDeferredLane() { 0 === workInProgressDeferredLane && @@ -18202,8 +18238,7 @@ else { pendingViewTransitionEvents = null; (lanes & 335544064) === lanes - ? ((pendingTransitionTypes = ReactSharedInternals.V), - (ReactSharedInternals.V = null), + ? ((pendingTransitionTypes = claimQueuedTransitionTypes(root)), (recoverableErrors = 10262)) : ((pendingTransitionTypes = null), (recoverableErrors = 10256)); 0 !== finishedWork.actualDuration || @@ -18299,6 +18334,7 @@ try { inProgressLanes = lanes; inProgressRoot = root; + rootViewTransitionAffected = !1; resetComponentEffectTimers(); commitMutationEffectsOnFiber(finishedWork, root, lanes); inProgressRoot = inProgressLanes = null; @@ -18598,7 +18634,7 @@ didWarnForRootClone || ((didWarnForRootClone = !0), console.warn( - "useSwipeTransition() caused something to mutate or relayout the root. This currently requires a clone of the whole document. Make sure to add a directly around an absolutely positioned DOM node to minimize the impact of any changes caused by the Swipe Transition." + "startGestureTransition() caused something to mutate or relayout the root. This currently requires a clone of the whole document. Make sure to add a directly around an absolutely positioned DOM node to minimize the impact of any changes caused by the Gesture Transition." )); var rootContainer = root.containerInfo, documentElement = @@ -18617,7 +18653,7 @@ var containerParent = containerInstance.parentNode; if (null === containerParent) throw Error( - "Cannot use a useSwipeTransition() in a detached root." + "Cannot use a startGestureTransition() on a detached root." ); var clone = containerInstance.cloneNode(!1), computedStyle = getComputedStyle(containerInstance); @@ -18725,16 +18761,14 @@ (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } - pendingTransitionTypes = null; + pendingTransitionTypes = finishedGesture.types; pendingEffectsStatus = PENDING_GESTURE_MUTATION_PHASE; pendingViewTransition = finishedGesture.running = startGestureTransition( root.containerInfo, finishedGesture.provider, - finishedGesture.rangeCurrent, - finishedGesture.direction - ? finishedGesture.rangeNext - : finishedGesture.rangePrevious, + finishedGesture.rangeStart, + finishedGesture.rangeEnd, pendingTransitionTypes, flushGestureMutations, flushGestureAnimations, @@ -18770,7 +18804,7 @@ var containerParent = containerInstance.parentNode; if (null === containerParent) throw Error( - "Cannot use a useSwipeTransition() in a detached root." + "Cannot use a startGestureTransition() on a detached root." ); containerParent.removeChild(rootClone); containerInstance.style.viewTransitionName = "root"; @@ -22678,6 +22712,30 @@ ? parentInstance.moveBefore(child, null) : parentInstance.appendChild(child); } + function warnForReactChildrenConflict(container) { + if (!container.__reactWarnedAboutChildrenConflict) { + var props = container[internalPropsKey] || null; + if (null !== props) { + var fiber = getInstanceFromNode(container); + null !== fiber && + ("string" === typeof props.children || + "number" === typeof props.children + ? ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + })) + : null != props.dangerouslySetInnerHTML && + ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + }))); + } + } + } function isSingletonScope(type) { return "head" === type; } @@ -22994,7 +23052,7 @@ (error = customizeViewTransitionError(error, !1)), null !== error && errorCallback(error); } finally { - spawnedWorkCallback(); + mutationCallback(), layoutCallback(), spawnedWorkCallback(); } }); transition.finished.finally(function () { @@ -23104,65 +23162,89 @@ animations = documentElement.getAnimations({ subtree: !0 }), foundGroups = new Set(), foundNews = new Set(), + longestDuration = 0, i = 0; i < animations.length; i++ ) { - var pseudoElement = animations[i].effect.pseudoElement; + var effect = animations[i].effect, + pseudoElement = effect.pseudoElement; null != pseudoElement && - (pseudoElement.startsWith("::view-transition-group") + pseudoElement.startsWith("::view-transition") && + ((effect = effect.getTiming()), + (effect = + effect.delay + + ("number" === typeof effect.duration ? effect.duration : 0)), + effect > longestDuration && (longestDuration = effect), + pseudoElement.startsWith("::view-transition-group") ? foundGroups.add(pseudoElement.slice(23)) : pseudoElement.startsWith("::view-transition-new") && foundNews.add(pseudoElement.slice(21))); } + longestDuration = (rangeEnd - rangeStart) / longestDuration; for (i = 0; i < animations.length; i++) { var anim = animations[i]; - if ("running" === anim.playState) { - pseudoElement = anim.effect; - var _pseudoElement = pseudoElement.pseudoElement; - if ( - null != _pseudoElement && - _pseudoElement.startsWith("::view-transition") && - pseudoElement.target === documentElement - ) { - anim.cancel(); - var isGeneratedGroupAnim = !1, - isExitGroupAnim = !1; - if (_pseudoElement.startsWith("::view-transition-group")) { - var groupName = _pseudoElement.slice(23); - foundNews.has(groupName) - ? ((anim = anim.animationName), - (isGeneratedGroupAnim = - null != anim && - anim.startsWith("-ua-view-transition-group-anim-"))) - : (isExitGroupAnim = !0); - } - animateGesture( - pseudoElement.getKeyframes(), - pseudoElement.target, - _pseudoElement, - timeline, - rangeStart, - rangeEnd, - isGeneratedGroupAnim, - isExitGroupAnim - ); - _pseudoElement.startsWith("::view-transition-old") && - ((_pseudoElement = _pseudoElement.slice(21)), - foundGroups.has(_pseudoElement) || - foundNews.has(_pseudoElement) || - (foundGroups.add(_pseudoElement), - animateGesture( - [{}, {}], - pseudoElement.target, - "::view-transition-group" + _pseudoElement, - timeline, - rangeStart, - rangeEnd, - !1, - !0 - ))); + if ( + "running" === anim.playState && + ((pseudoElement = anim.effect), + (effect = pseudoElement.pseudoElement), + null != effect && + effect.startsWith("::view-transition") && + pseudoElement.target === documentElement) + ) { + anim.cancel(); + var isGeneratedGroupAnim = !1, + isExitGroupAnim = !1; + if (effect.startsWith("::view-transition-group")) { + var groupName = effect.slice(23); + foundNews.has(groupName) + ? ((isGeneratedGroupAnim = anim.animationName), + (isGeneratedGroupAnim = + null != isGeneratedGroupAnim && + isGeneratedGroupAnim.startsWith( + "-ua-view-transition-group-anim-" + ))) + : (isExitGroupAnim = !0); } + var _timing = pseudoElement.getTiming(); + anim = + rangeEnd - + (("number" === typeof _timing.duration + ? _timing.duration + : 0) + + _timing.delay) * + longestDuration; + groupName = rangeEnd - _timing.delay * longestDuration; + if ( + "reverse" === _timing.direction || + "alternate-reverse" === _timing.direction + ) + (_timing = anim), (anim = groupName), (groupName = _timing); + animateGesture( + pseudoElement.getKeyframes(), + pseudoElement.target, + effect, + timeline, + anim, + groupName, + isGeneratedGroupAnim, + isExitGroupAnim + ); + effect.startsWith("::view-transition-old") && + ((effect = effect.slice(21)), + foundGroups.has(effect) || + foundNews.has(effect) || + (foundGroups.add(effect), + animateGesture( + [{}, {}], + pseudoElement.target, + "::view-transition-group" + effect, + timeline, + rangeStart, + rangeEnd, + !1, + !0 + ))); } } documentElement @@ -23184,7 +23266,7 @@ (error = customizeViewTransitionError(error, !0)), null !== error && errorCallback(error); } finally { - readyCallback(); + mutationCallback(), animateCallback(); } }); transition.finished.finally(function () { @@ -23210,50 +23292,6 @@ new: new ViewTransitionPseudoElement("new", name) }; } - function getCurrentGestureOffset(provider) { - provider = provider.currentTime; - if (null === provider) - throw Error( - "Cannot start a gesture with a disconnected AnimationTimeline." - ); - return "number" === typeof provider ? provider : provider.value; - } - function subscribeToGestureDirection( - provider, - currentOffset, - directionCallback - ) { - function rafCallback() { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && - directionCallback(newTime > currentOffset)); - callbackID = requestAnimationFrame(rafCallback); - } - if ( - "function" === typeof ScrollTimeline && - provider instanceof ScrollTimeline - ) { - var element = provider.source, - scrollCallback = function () { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = - "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && - directionCallback(newTime > currentOffset)); - }; - element.addEventListener("scroll", scrollCallback, !1); - return function () { - element.removeEventListener("scroll", scrollCallback, !1); - }; - } - var callbackID = requestAnimationFrame(rafCallback); - return function () { - cancelAnimationFrame(callbackID); - }; - } function FragmentInstance(fragmentFiber) { this._fragmentFiber = fragmentFiber; this._observers = this._eventListeners = null; @@ -24443,7 +24481,11 @@ this.pooledCache = null; this.pooledCacheLanes = 0; this.formState = formState; - this.gestureClone = this.stoppingGestures = this.pendingGestures = null; + this.gestureClone = + this.stoppingGestures = + this.pendingGestures = + this.transitionTypes = + null; this.incompleteTransitions = new Map(); this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); @@ -25200,6 +25242,23 @@ contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), + disabledDepth = 0, + prevLog, + prevInfo, + prevWarn, + prevError, + prevGroup, + prevGroupCollapsed, + prevGroupEnd; + disabledLog.__reactDisabledLog = !0; + var prefix, + suffix, + reentry = !1; + var componentFrameCache = new ( + "function" === typeof WeakMap ? WeakMap : Map + )(); + var current = null, + isRendering = !1, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -25300,23 +25359,6 @@ illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, viewTransitionMutationContext = !1, - disabledDepth = 0, - prevLog, - prevInfo, - prevWarn, - prevError, - prevGroup, - prevGroupCollapsed, - prevGroupEnd; - disabledLog.__reactDisabledLog = !0; - var prefix, - suffix, - reentry = !1; - var componentFrameCache = new ( - "function" === typeof WeakMap ? WeakMap : Map - )(); - var current = null, - isRendering = !1, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = !1, didWarnCheckedDefaultChecked = !1, @@ -26638,6 +26680,7 @@ _currentRenderer: null, _currentRenderer2: null }, + entangledTransitionTypes = null, now = Scheduler.unstable_now, renderStartTime = -0, commitStartTime = -0, @@ -26692,9 +26735,51 @@ } entangleAsyncAction(transition, returnValue); } + if (null !== entangledTransitionTypes) + for (newEventTime = firstScheduledRoot; null !== newEventTime; ) + queueTransitionTypes(newEventTime, entangledTransitionTypes), + (newEventTime = newEventTime.next); + newEventTime = transition.types; + if (null !== newEventTime) { + for (newEventType = firstScheduledRoot; null !== newEventType; ) + queueTransitionTypes(newEventType, newEventTime), + (newEventType = newEventType.next); + if (0 !== currentEntangledLane) { + newEventType = entangledTransitionTypes; + null === newEventType && + (newEventType = entangledTransitionTypes = []); + for (var i = 0; i < newEventTime.length; i++) { + var transitionType = newEventTime[i]; + -1 === newEventType.indexOf(transitionType) && + newEventType.push(transitionType); + } + } + } null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue); }; + var prevOnStartGestureTransitionFinish = ReactSharedInternals.G; + ReactSharedInternals.G = function (transition, provider, options) { + var cancel = null; + null !== prevOnStartGestureTransitionFinish && + (cancel = prevOnStartGestureTransitionFinish( + transition, + provider, + options + )); + for (var root = firstScheduledRoot; null !== root; ) { + var scheduledGesture = startScheduledGesture( + root, + provider, + options, + transition.types + ); + null !== scheduledGesture && + (cancel = chainGestureCancellation(root, scheduledGesture, cancel)); + root = root.next; + } + return null !== cancel ? cancel : function () {}; + }; var resumedCache = createCursor(null), ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, @@ -27150,7 +27235,6 @@ useCacheRefresh: throwInvalidHookError }; ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; - ContextOnlyDispatcher.useSwipeTransition = throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -27296,11 +27380,6 @@ currentHookNameInDev = "useEffectEvent"; mountHookTypesDev(); return mountEvent(callback); - }, - useSwipeTransition: function (previous, current) { - currentHookNameInDev = "useSwipeTransition"; - mountHookTypesDev(); - return mountSwipeTransition(previous, current); } }; HooksDispatcherOnMountWithHookTypesInDEV = { @@ -27435,11 +27514,6 @@ currentHookNameInDev = "useEffectEvent"; updateHookTypesDev(); return mountEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; HooksDispatcherOnUpdateInDEV = { @@ -27574,11 +27648,6 @@ currentHookNameInDev = "useEffectEvent"; updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; HooksDispatcherOnRerenderInDEV = { @@ -27713,11 +27782,6 @@ currentHookNameInDev = "useEffectEvent"; updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; InvalidNestedHooksDispatcherOnMountInDEV = { @@ -27877,12 +27941,6 @@ warnInvalidHookAccess(); mountHookTypesDev(); return mountEvent(callback); - }, - useSwipeTransition: function (previous, current) { - currentHookNameInDev = "useSwipeTransition"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountSwipeTransition(previous, current); } }; InvalidNestedHooksDispatcherOnUpdateInDEV = { @@ -28042,12 +28100,6 @@ warnInvalidHookAccess(); updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; InvalidNestedHooksDispatcherOnRerenderInDEV = { @@ -28207,12 +28259,6 @@ warnInvalidHookAccess(); updateHookTypesDev(); return updateEvent(callback); - }, - useSwipeTransition: function (previous, current, next) { - currentHookNameInDev = "useSwipeTransition"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateSwipeTransition(previous, current, next); } }; var fakeInternalInstance = {}; @@ -28338,6 +28384,7 @@ inProgressLanes = null, inProgressRoot = null, viewTransitionContextChanged$1 = !1, + rootViewTransitionAffected = !1, hostParent = null, hostParentIsContainer = !1, currentHoistableRoot = null, @@ -29185,11 +29232,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -29226,10 +29273,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-experimental-63779030-20250328", + version: "19.2.0-experimental-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-63779030-20250328" + reconcilerVersion: "19.2.0-experimental-040f8286-20250402" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -29537,5 +29584,5 @@ } }; }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js index eed910dee462d..b54fa85aa9fee 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js @@ -322,6 +322,196 @@ function popHostContext(fiber) { (pop(hostTransitionProviderCursor), (HostTransitionContext._currentValue = sharedNotPendingObject)); } +var prefix, suffix; +function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; + } + return "\n" + prefix + name + suffix; +} +var reentry = !1; +function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + reentry = !0; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$1) { + control = x$1; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$2) { + control = x$2; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } + ); + var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + namePropDescriptor = RunInRootFrame = 0; + RunInRootFrame < sampleLines.length && + !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); + + ) + RunInRootFrame++; + for ( + ; + namePropDescriptor < controlLines.length && + !controlLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); + + ) + namePropDescriptor++; + if ( + RunInRootFrame === sampleLines.length || + namePropDescriptor === controlLines.length + ) + for ( + RunInRootFrame = sampleLines.length - 1, + namePropDescriptor = controlLines.length - 1; + 1 <= RunInRootFrame && + 0 <= namePropDescriptor && + sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; + + ) + namePropDescriptor--; + for ( + ; + 1 <= RunInRootFrame && 0 <= namePropDescriptor; + RunInRootFrame--, namePropDescriptor-- + ) + if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { + if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { + do + if ( + (RunInRootFrame--, + namePropDescriptor--, + 0 > namePropDescriptor || + sampleLines[RunInRootFrame] !== + controlLines[namePropDescriptor]) + ) { + var frame = + "\n" + + sampleLines[RunInRootFrame].replace(" at new ", " at "); + fn.displayName && + frame.includes("") && + (frame = frame.replace("", fn.displayName)); + return frame; + } + while (1 <= RunInRootFrame && 0 <= namePropDescriptor); + } + break; + } + } + } finally { + (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); + } + return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(previousPrepareStackTrace) + : ""; +} +function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + case 30: + return describeBuiltInComponentFrame("ViewTransition"); + default: + return ""; + } +} +function getStackByFiberInDevAndProd(workInProgress) { + try { + var info = ""; + do + (info += describeFiber(workInProgress)), + (workInProgress = workInProgress.return); + while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } +} var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -543,18 +733,18 @@ function markRootFinished( 0 < remainingLanes; ) { - var index$5 = 31 - clz32(remainingLanes), - lane = 1 << index$5; - entanglements[index$5] = 0; - expirationTimes[index$5] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$5]; + var index$7 = 31 - clz32(remainingLanes), + lane = 1 << index$7; + entanglements[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$5] = null, index$5 = 0; - index$5 < hiddenUpdatesForLane.length; - index$5++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$5]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } remainingLanes &= ~lane; @@ -579,10 +769,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$6 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$6; - (lane & entangledLanes) | (root[index$6] & entangledLanes) && - (root[index$6] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -850,240 +1040,50 @@ function pushMutationContext() { } function setValueForAttribute(node, name, value) { if (isAttributeNameSafe(name)) - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix$8 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$8 && "aria-" !== prefix$8) { - node.removeAttribute(name); - return; - } - } - node.setAttribute(name, "" + value); - } -} -function setValueForKnownAttribute(node, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - node.setAttribute(name, "" + value); - } -} -function setValueForNamespacedAttribute(node, namespace, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - node.setAttributeNS(namespace, name, "" + value); - } -} -var prefix, suffix; -function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; - } - return "\n" + prefix + name + suffix; -} -var reentry = !1; -function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - reentry = !0; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$9) { - control = x$9; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$10) { - control = x$10; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - namePropDescriptor = RunInRootFrame = 0; - RunInRootFrame < sampleLines.length && - !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); - - ) - RunInRootFrame++; - for ( - ; - namePropDescriptor < controlLines.length && - !controlLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); - - ) - namePropDescriptor++; - if ( - RunInRootFrame === sampleLines.length || - namePropDescriptor === controlLines.length - ) - for ( - RunInRootFrame = sampleLines.length - 1, - namePropDescriptor = controlLines.length - 1; - 1 <= RunInRootFrame && - 0 <= namePropDescriptor && - sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; - - ) - namePropDescriptor--; - for ( - ; - 1 <= RunInRootFrame && 0 <= namePropDescriptor; - RunInRootFrame--, namePropDescriptor-- - ) - if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { - if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { - do - if ( - (RunInRootFrame--, - namePropDescriptor--, - 0 > namePropDescriptor || - sampleLines[RunInRootFrame] !== - controlLines[namePropDescriptor]) - ) { - var frame = - "\n" + - sampleLines[RunInRootFrame].replace(" at new ", " at "); - fn.displayName && - frame.includes("") && - (frame = frame.replace("", fn.displayName)); - return frame; - } - while (1 <= RunInRootFrame && 0 <= namePropDescriptor); - } - break; - } - } - } finally { - (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); - } - return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(previousPrepareStackTrace) - : ""; -} -function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - case 30: - return describeBuiltInComponentFrame("ViewTransition"); - default: - return ""; + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix$10 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$10 && "aria-" !== prefix$10) { + node.removeAttribute(name); + return; + } + } + node.setAttribute(name, "" + value); + } +} +function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + node.setAttribute(name, "" + value); } } -function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do - (info += describeFiber(workInProgress)), - (workInProgress = workInProgress.return); - while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; +function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + node.setAttributeNS(namespace, name, "" + value); } } function getToStringValue(value) { @@ -2449,11 +2449,6 @@ function enqueueConcurrentRenderForLane(fiber, lane) { enqueueUpdate$1(fiber, null, null, lane); return getRootForUpdatedFiber(fiber); } -function enqueueGestureRender(fiber) { - fiber = markUpdateLaneFromFiberToRoot(fiber, null, 64); - null !== fiber && markRootUpdated$1(fiber, 64); - return fiber; -} function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { sourceFiber.lanes |= lane; var alternate = sourceFiber.alternate; @@ -3214,6 +3209,22 @@ function releaseCache(cache) { cache.controller.abort(); }); } +function queueTransitionTypes(root, transitionTypes) { + if (0 !== (root.pendingLanes & 4194048)) { + var queued = root.transitionTypes; + null === queued && (queued = root.transitionTypes = []); + for (root = 0; root < transitionTypes.length; root++) { + var transitionType = transitionTypes[root]; + -1 === queued.indexOf(transitionType) && queued.push(transitionType); + } + } +} +var entangledTransitionTypes = null; +function claimQueuedTransitionTypes(root) { + var claimed = root.transitionTypes; + root.transitionTypes = null; + return claimed; +} var currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, @@ -3238,7 +3249,7 @@ function entangleAsyncAction(transition, thenable) { function pingEngtangledActionScope() { if ( 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners + ((entangledTransitionTypes = null), null !== currentEntangledListeners) ) { null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled"); @@ -3274,15 +3285,145 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } +function startScheduledGesture( + root, + gestureTimeline, + gestureOptions, + transitionTypes +) { + if (gestureOptions && null != gestureOptions.rangeStart) + var JSCompiler_temp = gestureOptions.rangeStart; + else { + JSCompiler_temp = gestureTimeline.currentTime; + if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(549)); + JSCompiler_temp = + "number" === typeof JSCompiler_temp + ? JSCompiler_temp + : JSCompiler_temp.value; + } + gestureOptions = + gestureOptions && null != gestureOptions.rangeEnd + ? gestureOptions.rangeEnd + : 50 > JSCompiler_temp + ? 100 + : 0; + for (root = root.pendingGestures; null !== root; ) { + if (root.provider === gestureTimeline) { + root.count++; + root.rangeStart = JSCompiler_temp; + root.rangeEnd = gestureOptions; + if (null !== transitionTypes) + for ( + gestureTimeline = root.types, + null === gestureTimeline && (gestureTimeline = root.types = []), + JSCompiler_temp = 0; + JSCompiler_temp < transitionTypes.length; + JSCompiler_temp++ + ) + (gestureOptions = transitionTypes[JSCompiler_temp]), + -1 === gestureTimeline.indexOf(gestureOptions) && + gestureTimeline.push(gestureOptions); + return root; + } + root = root.next; + if (null === root) break; + } + return null; +} +function deleteScheduledGesture(root, gesture) { + null === gesture.prev + ? (root.pendingGestures === gesture && + ((root.pendingGestures = gesture.next), + null === root.pendingGestures && (root.pendingLanes &= -65)), + root.stoppingGestures === gesture && + (root.stoppingGestures = gesture.next)) + : ((gesture.prev.next = gesture.next), + null !== gesture.next && (gesture.next.prev = gesture.prev), + (gesture.prev = null), + (gesture.next = null)); +} +function stopCompletedGestures(root) { + var gesture = root.stoppingGestures; + for (root.stoppingGestures = null; null !== gesture; ) + null !== gesture.running && + (gesture.running.skipTransition(), (gesture.running = null)), + (root = gesture.next), + (gesture.next = null), + (gesture.prev = null), + (gesture = root); +} var prevOnStartTransitionFinish = ReactSharedInternals.S; ReactSharedInternals.S = function (transition, returnValue) { "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && entangleAsyncAction(transition, returnValue); + if (null !== entangledTransitionTypes) + for (var root$26 = firstScheduledRoot; null !== root$26; ) + queueTransitionTypes(root$26, entangledTransitionTypes), + (root$26 = root$26.next); + root$26 = transition.types; + if (null !== root$26) { + for (var root$27 = firstScheduledRoot; null !== root$27; ) + queueTransitionTypes(root$27, root$26), (root$27 = root$27.next); + if (0 !== currentEntangledLane) { + root$27 = entangledTransitionTypes; + null === root$27 && (root$27 = entangledTransitionTypes = []); + for (var i = 0; i < root$26.length; i++) { + var transitionType = root$26[i]; + -1 === root$27.indexOf(transitionType) && root$27.push(transitionType); + } + } + } null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue); }; +function chainGestureCancellation(root, scheduledGesture, prevCancel) { + return function () { + if ( + null !== scheduledGesture && + (scheduledGesture.count--, 0 === scheduledGesture.count) + ) { + deleteScheduledGesture(root, scheduledGesture); + var runningTransition = scheduledGesture.running; + if (null !== runningTransition) { + var pendingLanesExcludingGestureLane = root.pendingLanes & -65; + 0 !== (pendingLanesExcludingGestureLane & 124) || + 0 !== (pendingLanesExcludingGestureLane & 4194048) + ? ((runningTransition = root.stoppingGestures), + null !== runningTransition && + ((scheduledGesture.next = runningTransition), + (runningTransition.prev = scheduledGesture)), + (root.stoppingGestures = scheduledGesture)) + : ((scheduledGesture.running = null), + runningTransition.skipTransition()); + } + } + null !== prevCancel && prevCancel(); + }; +} +var prevOnStartGestureTransitionFinish = ReactSharedInternals.G; +ReactSharedInternals.G = function (transition, provider, options) { + var cancel = null; + null !== prevOnStartGestureTransitionFinish && + (cancel = prevOnStartGestureTransitionFinish( + transition, + provider, + options + )); + for (var root = firstScheduledRoot; null !== root; ) { + var scheduledGesture = startScheduledGesture( + root, + provider, + options, + transition.types + ); + null !== scheduledGesture && + (cancel = chainGestureCancellation(root, scheduledGesture, cancel)); + root = root.next; + } + return null !== cancel ? cancel : function () {}; +}; var resumedCache = createCursor(null); function peekCacheFromPool() { var cacheResumedFromPreviousRender = resumedCache.current; @@ -4457,76 +4598,6 @@ function findFirstSuspended(row) { } return null; } -function scheduleGesture( - root, - provider, - initialDirection, - rangePrevious, - rangeCurrent, - rangeNext -) { - for (var prev = root.pendingGestures; null !== prev; ) { - if (prev.provider === provider) return prev.count++, prev; - var next = prev.next; - if (null === next) break; - prev = next; - } - var isFlippedDirection = rangePrevious > rangeNext; - next = subscribeToGestureDirection( - provider, - rangeCurrent, - function (direction) { - isFlippedDirection && (direction = !direction); - gesture.direction !== direction && - ((gesture.direction = direction), - null === gesture.prev && - root.pendingGestures !== gesture && - ((direction = root.pendingGestures), - (gesture.next = direction), - null !== direction && (direction.prev = gesture), - (root.pendingGestures = gesture), - (root.pendingLanes |= 64), - ensureRootIsScheduled(root))); - } - ); - var gesture = { - provider: provider, - count: 1, - direction: initialDirection, - rangePrevious: rangePrevious, - rangeCurrent: rangeCurrent, - rangeNext: rangeNext, - cancel: next, - running: null, - prev: prev, - next: null - }; - null === prev ? (root.pendingGestures = gesture) : (prev.next = gesture); - ensureRootIsScheduled(root); - return gesture; -} -function deleteScheduledGesture(root, gesture) { - null === gesture.prev - ? (root.pendingGestures === gesture && - ((root.pendingGestures = gesture.next), - null === root.pendingGestures && (root.pendingLanes &= -65)), - root.stoppingGestures === gesture && - (root.stoppingGestures = gesture.next)) - : ((gesture.prev.next = gesture.next), - null !== gesture.next && (gesture.next.prev = gesture.prev), - (gesture.prev = null), - (gesture.next = null)); -} -function stopCompletedGestures(root) { - var gesture = root.stoppingGestures; - for (root.stoppingGestures = null; null !== gesture; ) - null !== gesture.running && - (gesture.running.skipTransition(), (gesture.running = null)), - (root = gesture.next), - (gesture.next = null), - (gesture.prev = null), - (gesture = root); -} var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, @@ -4793,37 +4864,70 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$61 = !1; + didReadFromEntangledAsyncAction$63 = !1; do { - var updateLane = update.lane & -536870913; - if ( - updateLane !== update.lane - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - var revertLane = update.revertLane; - if (0 === revertLane) + var updateLane = update.lane & -536870913, + shouldSkipUpdate = + updateLane !== update.lane + ? (workInProgressRootRenderLanes & updateLane) !== updateLane + : (renderLanes & updateLane) !== updateLane; + if (64 === updateLane) { + var scheduledGesture = update.gesture; + if (null !== scheduledGesture) + if (0 === scheduledGesture.count) { + update = update.next; + continue; + } else if (64 !== renderLanes) shouldSkipUpdate = !0; + else { + shouldSkipUpdate = workInProgressRoot; + if (null === shouldSkipUpdate) + throw Error(formatProdErrorMessage(349)); + shouldSkipUpdate = + shouldSkipUpdate.pendingGestures !== scheduledGesture; + } + } + if (shouldSkipUpdate) + (scheduledGesture = { + lane: updateLane, + revertLane: update.revertLane, + gesture: update.gesture, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), + null === newBaseQueueLast + ? ((newBaseQueueFirst = newBaseQueueLast = scheduledGesture), + (baseFirst = pendingQueue)) + : (newBaseQueueLast = newBaseQueueLast.next = scheduledGesture), + (currentlyRenderingFiber.lanes |= updateLane), + (workInProgressRootSkippedLanes |= updateLane); + else { + scheduledGesture = update.revertLane; + if (0 === scheduledGesture) null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$61 = !0); - else if ((renderLanes & revertLane) === revertLane) { + (didReadFromEntangledAsyncAction$63 = !0); + else if ((renderLanes & scheduledGesture) === scheduledGesture) { update = update.next; - revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$61 = !0); + scheduledGesture === currentEntangledLane && + (didReadFromEntangledAsyncAction$63 = !0); continue; } else (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -4833,29 +4937,15 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber.lanes |= revertLane), - (workInProgressRootSkippedLanes |= revertLane); + (currentlyRenderingFiber.lanes |= scheduledGesture), + (workInProgressRootSkippedLanes |= scheduledGesture); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane); - } else - (revertLane = { - lane: updateLane, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), - null === newBaseQueueLast - ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), - (baseFirst = pendingQueue)) - : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber.lanes |= updateLane), - (workInProgressRootSkippedLanes |= updateLane); + } update = update.next; } while (null !== update && update !== current); null === newBaseQueueLast @@ -4864,7 +4954,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$61 && + didReadFromEntangledAsyncAction$63 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -5050,6 +5140,9 @@ function runActionStateAction(actionQueue, node) { if (node.isTransition) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; ReactSharedInternals.T = currentTransition; try { var returnValue = action(prevState, payload), @@ -5060,14 +5153,17 @@ function runActionStateAction(actionQueue, node) { } catch (error) { onActionError(actionQueue, node, error); } finally { - ReactSharedInternals.T = prevTransition; + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), + (ReactSharedInternals.T = prevTransition); } } else try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$67) { - onActionError(actionQueue, node, error$67); + } catch (error$70) { + onActionError(actionQueue, node, error$70); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -5418,6 +5514,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); try { @@ -5456,6 +5555,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), (ReactSharedInternals.T = prevTransition); } } @@ -5512,8 +5614,11 @@ function ensureFormComponentIsStateful(formFiber) { return existingStateHook; } function requestFormReset$1(formFiber) { - var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; - dispatchSetStateInternal(formFiber, resetStateQueue, {}, requestUpdateLane()); + var transition = ReactSharedInternals.T; + if (null !== transition && transition.gesture) + throw Error(formatProdErrorMessage(555)); + transition = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetStateInternal(formFiber, transition, {}, requestUpdateLane()); } function useHostTransitionStatus() { return readContext(HostTransitionContext); @@ -5531,14 +5636,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$70 = enqueueUpdate(provider, fiber, lane); - null !== root$70 && - (scheduleUpdateOnFiber(root$70, provider, lane), - entangleTransitions(root$70, provider, lane)); + var root$73 = enqueueUpdate(provider, fiber, lane); + null !== root$73 && + (scheduleUpdateOnFiber(root$73, provider, lane), + entangleTransitions(root$73, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$70 && + null !== root$73 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -5551,6 +5656,7 @@ function dispatchReducerAction(fiber, queue, action) { action = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5571,6 +5677,7 @@ function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5609,9 +5716,12 @@ function dispatchSetStateInternal(fiber, queue, action, lane) { return !1; } function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { + var transition = ReactSharedInternals.T, + lane = null !== transition && transition.gesture ? 64 : 2; action = { - lane: 2, + lane: lane, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5619,15 +5729,46 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { }; if (isRenderPhaseUpdate(fiber)) { if (throwIfDuringRender) throw Error(formatProdErrorMessage(479)); - } else - (throwIfDuringRender = enqueueConcurrentHookUpdate( + } else if ( + ((throwIfDuringRender = enqueueConcurrentHookUpdate( fiber, queue, action, - 2 + lane )), - null !== throwIfDuringRender && - scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2); + null !== throwIfDuringRender && + (scheduleUpdateOnFiber(throwIfDuringRender, fiber, lane), + null !== transition && + ((transition = transition.gesture), null !== transition))) + ) { + a: { + for (fiber = throwIfDuringRender.pendingGestures; null !== fiber; ) { + if (fiber.provider === transition) { + throwIfDuringRender = fiber; + break a; + } + lane = fiber.next; + if (null === lane) break; + fiber = lane; + } + transition = { + provider: transition, + count: 0, + rangeStart: 0, + rangeEnd: 100, + types: null, + running: null, + prev: fiber, + next: null + }; + null === fiber + ? (throwIfDuringRender.pendingGestures = transition) + : (fiber.next = transition); + ensureRootIsScheduled(throwIfDuringRender); + throwIfDuringRender = transition; + } + action.gesture = throwIfDuringRender; + } } function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; @@ -5654,93 +5795,6 @@ function entangleTransitionUpdate(root, queue, lane) { markRootEntangled(root, lane); } } -function startGesture(fiber, queue, gestureProvider, gestureOptions) { - var root = enqueueGestureRender(fiber); - if (null === root) return function () {}; - fiber = getCurrentGestureOffset(gestureProvider); - var range = gestureOptions && gestureOptions.range, - rangePrevious = range ? range[0] : 0, - rangeCurrent = range ? range[1] : fiber; - range = range ? range[2] : 100; - var isFlippedDirection = rangePrevious > range, - update = { - gesture: scheduleGesture( - root, - gestureProvider, - fiber < rangeCurrent - ? isFlippedDirection - : fiber > rangeCurrent - ? !isFlippedDirection - : gestureOptions && "next" === gestureOptions.direction - ? !0 - : gestureOptions && "previous" === gestureOptions.direction - ? !1 - : queue.initialDirection, - rangePrevious, - rangeCurrent, - range - ), - prev: null, - next: queue.pending - }; - null !== queue.pending && (queue.pending.prev = update); - queue.pending = update; - return function () { - if (null === update.prev) - if (queue.pending === update) queue.pending = update.next; - else return; - else - (update.prev.next = update.next), - null !== update.next && (update.next.prev = update.prev), - (update.prev = null), - (update.next = null); - var cancelledGestured = update.gesture; - cancelledGestured.count--; - if (0 === cancelledGestured.count) { - var cancelDirectionSubscription = cancelledGestured.cancel; - cancelDirectionSubscription(); - deleteScheduledGesture(root, cancelledGestured); - cancelDirectionSubscription = cancelledGestured.running; - if (null !== cancelDirectionSubscription) { - var pendingLanesExcludingGestureLane = root.pendingLanes & -65; - 0 !== (pendingLanesExcludingGestureLane & 124) || - 0 !== (pendingLanesExcludingGestureLane & 4194048) - ? ((cancelDirectionSubscription = root.stoppingGestures), - null !== cancelDirectionSubscription && - ((cancelledGestured.next = cancelDirectionSubscription), - (cancelDirectionSubscription.prev = cancelledGestured)), - (root.stoppingGestures = cancelledGestured)) - : ((cancelledGestured.running = null), - cancelDirectionSubscription.skipTransition()); - } - } - }; -} -function updateSwipeTransition(previous, current, next) { - var queue = updateWorkInProgressHook().queue, - startGestureOnHook = queue.dispatch, - rootRenderLanes = workInProgressRootRenderLanes, - value = current; - if (null !== queue.pending) { - if (64 === rootRenderLanes) { - rootRenderLanes = workInProgressRoot; - if (null === rootRenderLanes) throw Error(formatProdErrorMessage(349)); - rootRenderLanes = rootRenderLanes.pendingGestures; - if (null !== rootRenderLanes) - for (var update = queue.pending; null !== update; ) { - if (rootRenderLanes === update.gesture) { - value = rootRenderLanes.direction ? next : previous; - break; - } - update = update.next; - } - didReceiveUpdate = !0; - } - currentlyRenderingFiber.lanes |= 64; - } - queue.initialDirection = previous === current; - return [value, startGestureOnHook]; -} var ContextOnlyDispatcher = { readContext: readContext, use: use, @@ -5767,7 +5821,6 @@ var ContextOnlyDispatcher = { useCacheRefresh: throwInvalidHookError }; ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; -ContextOnlyDispatcher.useSwipeTransition = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -5957,20 +6010,6 @@ var HooksDispatcherOnMount = { throw Error(formatProdErrorMessage(440)); return ref.impl.apply(void 0, arguments); }; - }, - useSwipeTransition: function (previous, current) { - previous = { - pending: null, - dispatch: null, - initialDirection: previous === current - }; - var startGestureOnHook = (previous.dispatch = startGesture.bind( - null, - currentlyRenderingFiber, - previous - )); - mountWorkInProgressHook().queue = previous; - return [current, startGestureOnHook]; } }, HooksDispatcherOnUpdate = { @@ -6021,7 +6060,6 @@ var HooksDispatcherOnMount = { useCacheRefresh: updateRefresh }; HooksDispatcherOnUpdate.useEffectEvent = updateEvent; -HooksDispatcherOnUpdate.useSwipeTransition = updateSwipeTransition; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -6075,7 +6113,6 @@ var HooksDispatcherOnRerender = { useCacheRefresh: updateRefresh }; HooksDispatcherOnRerender.useEffectEvent = updateEvent; -HooksDispatcherOnRerender.useSwipeTransition = updateSwipeTransition; function applyDerivedStateFromProps( workInProgress, ctor, @@ -6167,9 +6204,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$75 in Component) - void 0 === newProps[propName$75] && - (newProps[propName$75] = Component[propName$75]); + for (var propName$77 in Component) + void 0 === newProps[propName$77] && + (newProps[propName$77] = Component[propName$77]); } return newProps; } @@ -6215,9 +6252,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$76) { + } catch (e$78) { setTimeout(function () { - throw e$76; + throw e$78; }); } } @@ -6228,9 +6265,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$77) { + } catch (e$79) { setTimeout(function () { - throw e$77; + throw e$79; }); } } @@ -8232,14 +8269,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$117 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$117 = lastTailNode), + for (var lastTailNode$119 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$119 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$117 + null === lastTailNode$119 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$117.sibling = null); + : (lastTailNode$119.sibling = null); } } function bubbleProperties(completedWork) { @@ -8249,19 +8286,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$118 = completedWork.child; null !== child$118; ) - (newChildLanes |= child$118.lanes | child$118.childLanes), - (subtreeFlags |= child$118.subtreeFlags & 65011712), - (subtreeFlags |= child$118.flags & 65011712), - (child$118.return = completedWork), - (child$118 = child$118.sibling); + for (var child$120 = completedWork.child; null !== child$120; ) + (newChildLanes |= child$120.lanes | child$120.childLanes), + (subtreeFlags |= child$120.subtreeFlags & 65011712), + (subtreeFlags |= child$120.flags & 65011712), + (child$120.return = completedWork), + (child$120 = child$120.sibling); else - for (child$118 = completedWork.child; null !== child$118; ) - (newChildLanes |= child$118.lanes | child$118.childLanes), - (subtreeFlags |= child$118.subtreeFlags), - (subtreeFlags |= child$118.flags), - (child$118.return = completedWork), - (child$118 = child$118.sibling); + for (child$120 = completedWork.child; null !== child$120; ) + (newChildLanes |= child$120.lanes | child$120.childLanes), + (subtreeFlags |= child$120.subtreeFlags), + (subtreeFlags |= child$120.flags), + (child$120.return = completedWork), + (child$120 = child$120.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8543,11 +8580,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$131 = null; + var cache$133 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$131 = newProps.memoizedState.cachePool.pool); - cache$131 !== type && (newProps.flags |= 2048); + (cache$133 = newProps.memoizedState.cachePool.pool); + cache$133 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -8572,8 +8609,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$131 = type.rendering; - if (null === cache$131) + cache$133 = type.rendering; + if (null === cache$133) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8581,11 +8618,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$131 = findFirstSuspended(current); - if (null !== cache$131) { + cache$133 = findFirstSuspended(current); + if (null !== cache$133) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$131.updateQueue; + current = cache$133.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8610,7 +8647,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$131)), null !== current)) { + if (((current = findFirstSuspended(cache$133)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8620,7 +8657,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$131.alternate && + !cache$133.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8633,13 +8670,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$131.sibling = workInProgress.child), - (workInProgress.child = cache$131)) + ? ((cache$133.sibling = workInProgress.child), + (workInProgress.child = cache$133)) : ((current = type.last), null !== current - ? (current.sibling = cache$131) - : (workInProgress.child = cache$131), - (type.last = cache$131)); + ? (current.sibling = cache$133) + : (workInProgress.child = cache$133), + (type.last = cache$133)); } if (null !== type.tail) return ( @@ -8938,8 +8975,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$148) { - captureCommitPhaseError(current, nearestMountedAncestor, error$148); + } catch (error$150) { + captureCommitPhaseError(current, nearestMountedAncestor, error$150); } else ref.current = null; } @@ -9575,7 +9612,8 @@ var offscreenSubtreeIsHidden = !1, needsFormReset = !1, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null, - viewTransitionContextChanged$1 = !1; + viewTransitionContextChanged$1 = !1, + rootViewTransitionAffected = !1; function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; eventsEnabled = _enabled; @@ -9827,11 +9865,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$146) { + } catch (error$148) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$146 + error$148 ); } } @@ -10260,111 +10298,112 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return)); - if (flags & 4) { - var currentResource = null !== current ? current.memoizedState : null; - flags = finishedWork.memoizedState; - if (null === current) + if (flags & 4) + if ( + ((root = null !== current ? current.memoizedState : null), + (flags = finishedWork.memoizedState), + null === current) + ) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; + root = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - currentResource = - hoistableRoot.getElementsByTagName("title")[0]; + lanes = root.getElementsByTagName("title")[0]; if ( - !currentResource || - currentResource[internalHoistableMarker] || - currentResource[internalInstanceKey] || - "http://www.w3.org/2000/svg" === - currentResource.namespaceURI || - currentResource.hasAttribute("itemprop") + !lanes || + lanes[internalHoistableMarker] || + lanes[internalInstanceKey] || + "http://www.w3.org/2000/svg" === lanes.namespaceURI || + lanes.hasAttribute("itemprop") ) - (currentResource = hoistableRoot.createElement(flags)), - hoistableRoot.head.insertBefore( - currentResource, - hoistableRoot.querySelector("head > title") + (lanes = root.createElement(flags)), + root.head.insertBefore( + lanes, + root.querySelector("head > title") ); - setInitialProperties(currentResource, flags, current); - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + setInitialProperties(lanes, flags, current); + lanes[internalInstanceKey] = finishedWork; + markNodeAsHoistable(lanes); + flags = lanes; break a; case "link": - var maybeNodes = getHydratableHoistableCache( - "link", - "href", - hoistableRoot - ).get(flags + (current.href || "")); - if (maybeNodes) - for (root = 0; root < maybeNodes.length; root++) + if ( + (hoistableRoot = getHydratableHoistableCache( + "link", + "href", + root + ).get(flags + (current.href || ""))) + ) + for (var i = 0; i < hoistableRoot.length; i++) if ( - ((currentResource = maybeNodes[root]), - currentResource.getAttribute("href") === + ((lanes = hoistableRoot[i]), + lanes.getAttribute("href") === (null == current.href || "" === current.href ? null : current.href) && - currentResource.getAttribute("rel") === + lanes.getAttribute("rel") === (null == current.rel ? null : current.rel) && - currentResource.getAttribute("title") === + lanes.getAttribute("title") === (null == current.title ? null : current.title) && - currentResource.getAttribute("crossorigin") === + lanes.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) ) { - maybeNodes.splice(root, 1); + hoistableRoot.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); + root.head.appendChild(lanes); break; case "meta": if ( - (maybeNodes = getHydratableHoistableCache( + (hoistableRoot = getHydratableHoistableCache( "meta", "content", - hoistableRoot + root ).get(flags + (current.content || ""))) ) - for (root = 0; root < maybeNodes.length; root++) + for (i = 0; i < hoistableRoot.length; i++) if ( - ((currentResource = maybeNodes[root]), - currentResource.getAttribute("content") === + ((lanes = hoistableRoot[i]), + lanes.getAttribute("content") === (null == current.content ? null : "" + current.content) && - currentResource.getAttribute("name") === + lanes.getAttribute("name") === (null == current.name ? null : current.name) && - currentResource.getAttribute("property") === + lanes.getAttribute("property") === (null == current.property ? null : current.property) && - currentResource.getAttribute("http-equiv") === + lanes.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - currentResource.getAttribute("charset") === + lanes.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) ) { - maybeNodes.splice(root, 1); + hoistableRoot.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); + root.head.appendChild(lanes); break; default: throw Error(formatProdErrorMessage(468, flags)); } - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + lanes[internalInstanceKey] = finishedWork; + markNodeAsHoistable(lanes); + flags = lanes; } finishedWork.stateNode = flags; } else @@ -10380,12 +10419,12 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.memoizedProps ); else - currentResource !== flags - ? (null === currentResource + root !== flags + ? (null === root ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : currentResource.count--, + : root.count--, null === flags ? mountHoistable( hoistableRoot, @@ -10404,7 +10443,6 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.memoizedProps, current.memoizedProps ); - } break; case 27: recursivelyTraverseMutationEffects(root, finishedWork, lanes); @@ -10429,21 +10467,20 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { null === current || safelyDetachRef(current, current.return)); if (finishedWork.flags & 32) { - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { - setTextContent(hoistableRoot, ""), - (viewTransitionMutationContext = !0); + setTextContent(root, ""), (viewTransitionMutationContext = !0); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 4 && null != finishedWork.stateNode && - ((hoistableRoot = finishedWork.memoizedProps), + ((root = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - hoistableRoot, - null !== current ? current.memoizedProps : hoistableRoot + root, + null !== current ? current.memoizedProps : root )); flags & 1024 && (needsFormReset = !0); break; @@ -10479,13 +10516,16 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { ((needsFormReset = !1), recursivelyResetForms(finishedWork)); break; case 4: - flags = currentHoistableRoot; + flags = pushMutationContext(); + current = currentHoistableRoot; currentHoistableRoot = getHoistableRoot( finishedWork.stateNode.containerInfo ); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); - currentHoistableRoot = flags; + currentHoistableRoot = current; + viewTransitionMutationContext && (rootViewTransitionAffected = !0); + viewTransitionMutationContext = flags; break; case 12: recursivelyTraverseMutationEffects(root, finishedWork, lanes); @@ -10536,13 +10576,12 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { if (null === current) { lanes = current = root; try { - (currentResource = lanes.stateNode), - hoistableRoot - ? ((maybeNodes = currentResource.style), - "function" === typeof maybeNodes.setProperty - ? maybeNodes.setProperty("display", "none", "important") - : (maybeNodes.display = "none")) - : unhideInstance(lanes.stateNode, lanes.memoizedProps); + if (((i = lanes.stateNode), hoistableRoot)) { + var style = i.style; + "function" === typeof style.setProperty + ? style.setProperty("display", "none", "important") + : (style.display = "none"); + } else unhideInstance(lanes.stateNode, lanes.memoizedProps); } catch (error) { captureCommitPhaseError(lanes, lanes.return, error); } @@ -10657,25 +10696,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$149 = hostParentFiber.stateNode; + var parent$151 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$149, ""), (hostParentFiber.flags &= -33)); - var before$150 = getHostSibling(finishedWork); + (setTextContent(parent$151, ""), (hostParentFiber.flags &= -33)); + var before$152 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$150, - parent$149, + before$152, + parent$151, parentFragmentInstances ); break; case 3: case 4: - var parent$151 = hostParentFiber.stateNode.containerInfo, - before$152 = getHostSibling(finishedWork); + var parent$153 = hostParentFiber.stateNode.containerInfo, + before$154 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$152, - parent$151, + before$154, + parent$153, parentFragmentInstances ); break; @@ -10714,7 +10753,7 @@ function commitAfterMutationEffectsOnFiber(finishedWork, root) { viewTransitionContextChanged$1 = !1; pushViewTransitionCancelableScope(); recursivelyTraverseAfterMutationEffects(root, finishedWork); - if (!viewTransitionContextChanged$1) { + if (!viewTransitionContextChanged$1 && !rootViewTransitionAffected) { finishedWork = viewTransitionCancelableChildren; if (null !== finishedWork) for (var i = 0; i < finishedWork.length; i += 3) @@ -10730,6 +10769,13 @@ function commitAfterMutationEffectsOnFiber(finishedWork, root) { case 5: recursivelyTraverseAfterMutationEffects(root, finishedWork); break; + case 4: + i = viewTransitionContextChanged$1; + viewTransitionContextChanged$1 = !1; + recursivelyTraverseAfterMutationEffects(root, finishedWork); + viewTransitionContextChanged$1 && (rootViewTransitionAffected = !0); + viewTransitionContextChanged$1 = i; + break; case 22: null === finishedWork.memoizedState && (null !== current.memoizedState @@ -11781,7 +11827,7 @@ function recursivelyInsertClones( if (null === nextPhase) recursivelyInsertNewFiber(deletions, i, parentViewTransition, 5); else { - var nextPhase$172 = deletions.flags; + var nextPhase$176 = deletions.flags; switch (deletions.tag) { case 26: recursivelyInsertClones( @@ -11807,16 +11853,16 @@ function recursivelyInsertClones( (setTextContent(clone, ""), (viewTransitionMutationContext = !0))) : (clone = clone.cloneNode(!1)); - if (nextPhase$172 & 4) { - nextPhase$172 = clone; + if (nextPhase$176 & 4) { + nextPhase$176 = clone; var newProps = deletions.memoizedProps; updateProperties( - nextPhase$172, + nextPhase$176, deletions.type, nextPhase.memoizedProps, newProps ); - nextPhase$172[internalPropsKey] = newProps; + nextPhase$176[internalPropsKey] = newProps; } 1 === visitPhase || 2 === visitPhase ? (recursivelyInsertClones(deletions, clone, null, 3), @@ -11835,7 +11881,7 @@ function recursivelyInsertClones( if (null === parentViewTransition) throw Error(formatProdErrorMessage(162)); parentViewTransition = parentViewTransition.cloneNode(!1); - nextPhase$172 & 4 && + nextPhase$176 & 4 && ((parentViewTransition.nodeValue = nextPhase.memoizedProps), (viewTransitionMutationContext = !0)); appendChild(i, parentViewTransition); @@ -11848,7 +11894,7 @@ function recursivelyInsertClones( case 22: null === deletions.memoizedState ? ((nextPhase = - 0 === visitPhase && 0 !== (nextPhase$172 & 8192) + 0 === visitPhase && 0 !== (nextPhase$176 & 8192) ? 1 : visitPhase), recursivelyInsertClones( @@ -11866,8 +11912,8 @@ function recursivelyInsertClones( parentViewTransition = pushMutationContext(); clone = deletions.stateNode; clone.clones = null; - nextPhase$172 = 1 === visitPhase ? 2 : visitPhase; - recursivelyInsertClones(deletions, i, clone, nextPhase$172); + nextPhase$176 = 1 === visitPhase ? 2 : visitPhase; + recursivelyInsertClones(deletions, i, clone, nextPhase$176); viewTransitionMutationContext && (deletions.flags |= 4); 1 === visitPhase ? applyExitViewTransition(deletions) @@ -12234,9 +12280,11 @@ var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, function requestUpdateLane() { if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) return workInProgressRootRenderLanes & -workInProgressRootRenderLanes; - if (null !== ReactSharedInternals.T) { - var actionScopeLane = currentEntangledLane; - return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane(); + var transition = ReactSharedInternals.T; + if (null !== transition) { + if (transition.gesture) throw Error(formatProdErrorMessage(554)); + transition = currentEntangledLane; + return 0 !== transition ? transition : requestTransitionLane(); } return resolveUpdatePriority(); } @@ -12589,9 +12637,9 @@ function markRootSuspended( didAttemptEntireTree && (root.warmLanes |= suspendedLanes); didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4; - didAttemptEntireTree[index$4] = -1; + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -12653,9 +12701,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$2 = 31 - clz32(allEntangledLanes), - lane = 1 << index$2; - lanes |= root[index$2]; + var index$4 = 31 - clz32(allEntangledLanes), + lane = 1 << index$4; + lanes |= root[index$4]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -12765,8 +12813,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$178) { - handleThrow(root, thrownValue$178); + } catch (thrownValue$182) { + handleThrow(root, thrownValue$182); } while (1); lanes && root.shellSuspendCounter++; @@ -12881,8 +12929,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$180) { - handleThrow(root, thrownValue$180); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -13095,8 +13143,7 @@ function commitRoot( else { pendingViewTransitionEvents = null; (lanes & 335544064) === lanes - ? ((pendingTransitionTypes = ReactSharedInternals.V), - (ReactSharedInternals.V = null), + ? ((pendingTransitionTypes = claimQueuedTransitionTypes(root)), (recoverableErrors = 10262)) : ((pendingTransitionTypes = null), (recoverableErrors = 10256)); 0 !== (finishedWork.subtreeFlags & recoverableErrors) || @@ -13171,6 +13218,7 @@ function flushMutationEffects() { var prevExecutionContext = executionContext; executionContext |= 4; try { + rootViewTransitionAffected = !1; commitMutationEffectsOnFiber(finishedWork, root, lanes); lanes = selectionInformation; var curFocusedElem = getActiveElementDeep(root.containerInfo), @@ -13470,26 +13518,26 @@ function commitGestureOnRoot(root, finishedWork) { } var rotate = computedStyle.rotate; if ("none" !== rotate && "" !== rotate) { - var parts$255 = rotate.split(" "); + var parts$259 = rotate.split(" "); transform = - 1 === parts$255.length - ? "rotate(" + parts$255[0] + ") " + transform - : 2 === parts$255.length + 1 === parts$259.length + ? "rotate(" + parts$259[0] + ") " + transform + : 2 === parts$259.length ? "rotate" + - parts$255[0].toUpperCase() + + parts$259[0].toUpperCase() + "(" + - parts$255[1] + + parts$259[1] + ") " + transform - : "rotate3d(" + parts$255.join(", ") + ") " + transform; + : "rotate3d(" + parts$259.join(", ") + ") " + transform; } var translate = computedStyle.translate; if ("none" !== translate && "" !== translate) { - var parts$256 = translate.split(" "); + var parts$260 = translate.split(" "); transform = - (3 === parts$256.length ? "translate3d" : "translate") + + (3 === parts$260.length ? "translate3d" : "translate") + "(" + - parts$256.join(", ") + + parts$260.join(", ") + ") " + transform; } @@ -13510,15 +13558,13 @@ function commitGestureOnRoot(root, finishedWork) { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } - pendingTransitionTypes = null; + pendingTransitionTypes = finishedGesture.types; pendingEffectsStatus = 6; pendingViewTransition = finishedGesture.running = startGestureTransition( root.containerInfo, finishedGesture.provider, - finishedGesture.rangeCurrent, - finishedGesture.direction - ? finishedGesture.rangeNext - : finishedGesture.rangePrevious, + finishedGesture.rangeStart, + finishedGesture.rangeEnd, pendingTransitionTypes, flushGestureMutations, flushGestureAnimations, @@ -13800,14 +13846,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$186 = firstScheduledRoot; null !== root$186; ) { + for (var root$190 = firstScheduledRoot; null !== root$190; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$186.pendingLanes; + var pendingLanes = root$190.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$186.suspendedLanes, - pingedLanes = root$186.pingedLanes; + var suspendedLanes = root$190.suspendedLanes, + pingedLanes = root$190.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -13821,21 +13867,21 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$186, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$190, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$186, - root$186 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$186.cancelPendingCommit || - -1 !== root$186.timeoutHandle + root$190, + root$190 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$190.cancelPendingCommit || + -1 !== root$190.timeoutHandle )), (0 === (JSCompiler_inline_result & 3) && 64 !== JSCompiler_inline_result) || - checkIfRootIsPrerendering(root$186, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$190, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$186, JSCompiler_inline_result)); - root$186 = root$186.next; + performSyncWorkOnRoot(root$190, JSCompiler_inline_result)); + root$190 = root$190.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -13881,12 +13927,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3, - expirationTime = expirationTimes[index$3]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$3] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -14112,20 +14158,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1698 = 0; - i$jscomp$inline_1698 < simpleEventPluginEvents.length; - i$jscomp$inline_1698++ + var i$jscomp$inline_1720 = 0; + i$jscomp$inline_1720 < simpleEventPluginEvents.length; + i$jscomp$inline_1720++ ) { - var eventName$jscomp$inline_1699 = - simpleEventPluginEvents[i$jscomp$inline_1698], - domEventName$jscomp$inline_1700 = - eventName$jscomp$inline_1699.toLowerCase(), - capitalizedEvent$jscomp$inline_1701 = - eventName$jscomp$inline_1699[0].toUpperCase() + - eventName$jscomp$inline_1699.slice(1); + var eventName$jscomp$inline_1721 = + simpleEventPluginEvents[i$jscomp$inline_1720], + domEventName$jscomp$inline_1722 = + eventName$jscomp$inline_1721.toLowerCase(), + capitalizedEvent$jscomp$inline_1723 = + eventName$jscomp$inline_1721[0].toUpperCase() + + eventName$jscomp$inline_1721.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1700, - "on" + capitalizedEvent$jscomp$inline_1701 + domEventName$jscomp$inline_1722, + "on" + capitalizedEvent$jscomp$inline_1723 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15373,34 +15419,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$200 = props[hasSrc]; - if (null != propValue$200) + var propValue$204 = props[hasSrc]; + if (null != propValue$204) switch (hasSrc) { case "name": - hasSrcSet = propValue$200; + hasSrcSet = propValue$204; break; case "type": - propValue = propValue$200; + propValue = propValue$204; break; case "checked": - checked = propValue$200; + checked = propValue$204; break; case "defaultChecked": - defaultChecked = propValue$200; + defaultChecked = propValue$204; break; case "value": - propKey = propValue$200; + propKey = propValue$204; break; case "defaultValue": - defaultValue = propValue$200; + defaultValue = propValue$204; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$200) + if (null != propValue$204) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$200, props, null); + setProp(domElement, tag, hasSrc, propValue$204, props, null); } } initInput( @@ -15539,14 +15585,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$200 in props) - props.hasOwnProperty(propValue$200) && - ((hasSrc = props[propValue$200]), + for (propValue$204 in props) + props.hasOwnProperty(propValue$204) && + ((hasSrc = props[propValue$204]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$200, + propValue$204, hasSrc, props, void 0 @@ -15594,14 +15640,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$217 in nextProps) { - var propKey = nextProps[propKey$217]; - lastProp = lastProps[propKey$217]; + for (var propKey$221 in nextProps) { + var propKey = nextProps[propKey$221]; + lastProp = lastProps[propKey$221]; if ( - nextProps.hasOwnProperty(propKey$217) && + nextProps.hasOwnProperty(propKey$221) && (null != propKey || null != lastProp) ) - switch (propKey$217) { + switch (propKey$221) { case "type": propKey !== lastProp && (viewTransitionMutationContext = !0); type = propKey; @@ -15636,7 +15682,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$217, + propKey$221, propKey, nextProps, lastProp @@ -15655,7 +15701,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$217 = null; + propKey = value = defaultValue = propKey$221 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15687,7 +15733,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && (viewTransitionMutationContext = !0); - propKey$217 = type; + propKey$221 = type; break; case "defaultValue": type !== lastDefaultValue && (viewTransitionMutationContext = !0); @@ -15710,15 +15756,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$217 - ? updateOptions(domElement, !!lastProps, propKey$217, !1) + null != propKey$221 + ? updateOptions(domElement, !!lastProps, propKey$221, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$217 = null; + propKey = propKey$221 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15743,7 +15789,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && (viewTransitionMutationContext = !0); - propKey$217 = name; + propKey$221 = name; break; case "defaultValue": name !== type && (viewTransitionMutationContext = !0); @@ -15758,17 +15804,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$217, propKey); + updateTextarea(domElement, propKey$221, propKey); return; case "option": - for (var propKey$233 in lastProps) + for (var propKey$237 in lastProps) if ( - ((propKey$217 = lastProps[propKey$233]), - lastProps.hasOwnProperty(propKey$233) && - null != propKey$217 && - !nextProps.hasOwnProperty(propKey$233)) + ((propKey$221 = lastProps[propKey$237]), + lastProps.hasOwnProperty(propKey$237) && + null != propKey$221 && + !nextProps.hasOwnProperty(propKey$237)) ) - switch (propKey$233) { + switch (propKey$237) { case "selected": domElement.selected = !1; break; @@ -15776,34 +15822,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$233, + propKey$237, null, nextProps, - propKey$217 + propKey$221 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$217 = nextProps[lastDefaultValue]), + ((propKey$221 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$217 !== propKey && - (null != propKey$217 || null != propKey)) + propKey$221 !== propKey && + (null != propKey$221 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$217 !== propKey && (viewTransitionMutationContext = !0); + propKey$221 !== propKey && (viewTransitionMutationContext = !0); domElement.selected = - propKey$217 && - "function" !== typeof propKey$217 && - "symbol" !== typeof propKey$217; + propKey$221 && + "function" !== typeof propKey$221 && + "symbol" !== typeof propKey$221; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$217, + propKey$221, nextProps, propKey ); @@ -15824,24 +15870,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$238 in lastProps) - (propKey$217 = lastProps[propKey$238]), - lastProps.hasOwnProperty(propKey$238) && - null != propKey$217 && - !nextProps.hasOwnProperty(propKey$238) && - setProp(domElement, tag, propKey$238, null, nextProps, propKey$217); + for (var propKey$242 in lastProps) + (propKey$221 = lastProps[propKey$242]), + lastProps.hasOwnProperty(propKey$242) && + null != propKey$221 && + !nextProps.hasOwnProperty(propKey$242) && + setProp(domElement, tag, propKey$242, null, nextProps, propKey$221); for (checked in nextProps) if ( - ((propKey$217 = nextProps[checked]), + ((propKey$221 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$217 !== propKey && - (null != propKey$217 || null != propKey)) + propKey$221 !== propKey && + (null != propKey$221 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$217) + if (null != propKey$221) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15849,7 +15895,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$217, + propKey$221, nextProps, propKey ); @@ -15857,49 +15903,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$243 in lastProps) - (propKey$217 = lastProps[propKey$243]), - lastProps.hasOwnProperty(propKey$243) && - void 0 !== propKey$217 && - !nextProps.hasOwnProperty(propKey$243) && + for (var propKey$247 in lastProps) + (propKey$221 = lastProps[propKey$247]), + lastProps.hasOwnProperty(propKey$247) && + void 0 !== propKey$221 && + !nextProps.hasOwnProperty(propKey$247) && setPropOnCustomElement( domElement, tag, - propKey$243, + propKey$247, void 0, nextProps, - propKey$217 + propKey$221 ); for (defaultChecked in nextProps) - (propKey$217 = nextProps[defaultChecked]), + (propKey$221 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$217 === propKey || - (void 0 === propKey$217 && void 0 === propKey) || + propKey$221 === propKey || + (void 0 === propKey$221 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$217, + propKey$221, nextProps, propKey ); return; } } - for (var propKey$248 in lastProps) - (propKey$217 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$217 && - !nextProps.hasOwnProperty(propKey$248) && - setProp(domElement, tag, propKey$248, null, nextProps, propKey$217); + for (var propKey$252 in lastProps) + (propKey$221 = lastProps[propKey$252]), + lastProps.hasOwnProperty(propKey$252) && + null != propKey$221 && + !nextProps.hasOwnProperty(propKey$252) && + setProp(domElement, tag, propKey$252, null, nextProps, propKey$221); for (lastProp in nextProps) - (propKey$217 = nextProps[lastProp]), + (propKey$221 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$217 === propKey || - (null == propKey$217 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$217, nextProps, propKey); + propKey$221 === propKey || + (null == propKey$221 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$221, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16251,7 +16297,7 @@ function startViewTransition( (error = customizeViewTransitionError(error, !1)), null !== error && errorCallback(error); } finally { - spawnedWorkCallback(); + mutationCallback(), layoutCallback(), spawnedWorkCallback(); } }); transition.finished.finally(function () { @@ -16357,65 +16403,89 @@ function startGestureTransition( animations = documentElement.getAnimations({ subtree: !0 }), foundGroups = new Set(), foundNews = new Set(), + longestDuration = 0, i = 0; i < animations.length; i++ ) { - var pseudoElement = animations[i].effect.pseudoElement; + var effect = animations[i].effect, + pseudoElement = effect.pseudoElement; null != pseudoElement && - (pseudoElement.startsWith("::view-transition-group") + pseudoElement.startsWith("::view-transition") && + ((effect = effect.getTiming()), + (effect = + effect.delay + + ("number" === typeof effect.duration ? effect.duration : 0)), + effect > longestDuration && (longestDuration = effect), + pseudoElement.startsWith("::view-transition-group") ? foundGroups.add(pseudoElement.slice(23)) : pseudoElement.startsWith("::view-transition-new") && foundNews.add(pseudoElement.slice(21))); } + longestDuration = (rangeEnd - rangeStart) / longestDuration; for (i = 0; i < animations.length; i++) { var anim = animations[i]; - if ("running" === anim.playState) { - pseudoElement = anim.effect; - var pseudoElement$258 = pseudoElement.pseudoElement; - if ( - null != pseudoElement$258 && - pseudoElement$258.startsWith("::view-transition") && - pseudoElement.target === documentElement - ) { - anim.cancel(); - var isGeneratedGroupAnim = !1, - isExitGroupAnim = !1; - if (pseudoElement$258.startsWith("::view-transition-group")) { - var groupName = pseudoElement$258.slice(23); - foundNews.has(groupName) - ? ((anim = anim.animationName), - (isGeneratedGroupAnim = - null != anim && - anim.startsWith("-ua-view-transition-group-anim-"))) - : (isExitGroupAnim = !0); - } - animateGesture( - pseudoElement.getKeyframes(), - pseudoElement.target, - pseudoElement$258, - timeline, - rangeStart, - rangeEnd, - isGeneratedGroupAnim, - isExitGroupAnim - ); - pseudoElement$258.startsWith("::view-transition-old") && - ((pseudoElement$258 = pseudoElement$258.slice(21)), - foundGroups.has(pseudoElement$258) || - foundNews.has(pseudoElement$258) || - (foundGroups.add(pseudoElement$258), - animateGesture( - [{}, {}], - pseudoElement.target, - "::view-transition-group" + pseudoElement$258, - timeline, - rangeStart, - rangeEnd, - !1, - !0 - ))); + if ( + "running" === anim.playState && + ((pseudoElement = anim.effect), + (effect = pseudoElement.pseudoElement), + null != effect && + effect.startsWith("::view-transition") && + pseudoElement.target === documentElement) + ) { + anim.cancel(); + var isGeneratedGroupAnim = !1, + isExitGroupAnim = !1; + if (effect.startsWith("::view-transition-group")) { + var groupName = effect.slice(23); + foundNews.has(groupName) + ? ((isGeneratedGroupAnim = anim.animationName), + (isGeneratedGroupAnim = + null != isGeneratedGroupAnim && + isGeneratedGroupAnim.startsWith( + "-ua-view-transition-group-anim-" + ))) + : (isExitGroupAnim = !0); } + var timing$264 = pseudoElement.getTiming(); + anim = + rangeEnd - + (("number" === typeof timing$264.duration + ? timing$264.duration + : 0) + + timing$264.delay) * + longestDuration; + groupName = rangeEnd - timing$264.delay * longestDuration; + if ( + "reverse" === timing$264.direction || + "alternate-reverse" === timing$264.direction + ) + (timing$264 = anim), (anim = groupName), (groupName = timing$264); + animateGesture( + pseudoElement.getKeyframes(), + pseudoElement.target, + effect, + timeline, + anim, + groupName, + isGeneratedGroupAnim, + isExitGroupAnim + ); + effect.startsWith("::view-transition-old") && + ((effect = effect.slice(21)), + foundGroups.has(effect) || + foundNews.has(effect) || + (foundGroups.add(effect), + animateGesture( + [{}, {}], + pseudoElement.target, + "::view-transition-group" + effect, + timeline, + rangeStart, + rangeEnd, + !1, + !0 + ))); } } documentElement @@ -16437,7 +16507,7 @@ function startGestureTransition( (error = customizeViewTransitionError(error, !0)), null !== error && errorCallback(error); } finally { - readyCallback(); + mutationCallback(), animateCallback(); } }); transition.finished.finally(function () { @@ -16490,45 +16560,6 @@ function createViewTransitionInstance(name) { new: new ViewTransitionPseudoElement("new", name) }; } -function getCurrentGestureOffset(provider) { - provider = provider.currentTime; - if (null === provider) throw Error(formatProdErrorMessage(549)); - return "number" === typeof provider ? provider : provider.value; -} -function subscribeToGestureDirection( - provider, - currentOffset, - directionCallback -) { - function rafCallback() { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && directionCallback(newTime > currentOffset)); - callbackID = requestAnimationFrame(rafCallback); - } - if ( - "function" === typeof ScrollTimeline && - provider instanceof ScrollTimeline - ) { - var element = provider.source, - scrollCallback = function () { - var newTime = provider.currentTime; - null !== newTime && - ((newTime = "number" === typeof newTime ? newTime : newTime.value), - newTime !== currentOffset && - directionCallback(newTime > currentOffset)); - }; - element.addEventListener("scroll", scrollCallback, !1); - return function () { - element.removeEventListener("scroll", scrollCallback, !1); - }; - } - var callbackID = requestAnimationFrame(rafCallback); - return function () { - cancelAnimationFrame(callbackID); - }; -} function FragmentInstance(fragmentFiber) { this._fragmentFiber = fragmentFiber; this._observers = this._eventListeners = null; @@ -17286,26 +17317,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$262 = getResourcesFromRoot( + var styles$269 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$263 = styles$262.get(type); - resource$263 || + resource$270 = styles$269.get(type); + resource$270 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$263 = { + (resource$270 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$262.set(type, resource$263), - (styles$262 = JSCompiler_inline_result.querySelector( + styles$269.set(type, resource$270), + (styles$269 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$262._p && - ((resource$263.instance = styles$262), - (resource$263.state.loading = 5)), + !styles$269._p && + ((resource$270.instance = styles$269), + (resource$270.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -17318,16 +17349,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$262 || + styles$269 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$263.state + resource$270.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$263; + return resource$270; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -17424,37 +17455,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$268 = hoistableRoot.querySelector( + var instance$275 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$268) + if (instance$275) return ( (resource.state.loading |= 4), - (resource.instance = instance$268), - markNodeAsHoistable(instance$268), - instance$268 + (resource.instance = instance$275), + markNodeAsHoistable(instance$275), + instance$275 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$268 = ( + instance$275 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$268); - var linkInstance = instance$268; + markNodeAsHoistable(instance$275); + var linkInstance = instance$275; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$268, "link", instance); + setInitialProperties(instance$275, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$268, props.precedence, hoistableRoot); - return (resource.instance = instance$268); + insertStylesheet(instance$275, props.precedence, hoistableRoot); + return (resource.instance = instance$275); case "script": - instance$268 = getScriptKey(props.src); + instance$275 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$268) + getScriptSelectorFromKey(instance$275) )) ) return ( @@ -17463,7 +17494,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$268))) + if ((styleProps = preloadPropsMap.get(instance$275))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17795,7 +17826,11 @@ function FiberRootNode( this.pooledCache = null; this.pooledCacheLanes = 0; this.formState = formState; - this.gestureClone = this.stoppingGestures = this.pendingGestures = null; + this.gestureClone = + this.stoppingGestures = + this.pendingGestures = + this.transitionTypes = + null; this.incompleteTransitions = new Map(); } function createFiberRoot( @@ -18483,16 +18518,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_2010 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2032 = React.version; if ( - "19.2.0-experimental-63779030-20250328" !== - isomorphicReactPackageVersion$jscomp$inline_2010 + "19.2.0-experimental-040f8286-20250402" !== + isomorphicReactPackageVersion$jscomp$inline_2032 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2010, - "19.2.0-experimental-63779030-20250328" + isomorphicReactPackageVersion$jscomp$inline_2032, + "19.2.0-experimental-040f8286-20250402" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -18512,24 +18547,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2630 = { +var internals$jscomp$inline_2654 = { bundleType: 0, - version: "19.2.0-experimental-63779030-20250328", + version: "19.2.0-experimental-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-63779030-20250328" + reconcilerVersion: "19.2.0-experimental-040f8286-20250402" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2631 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2655 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2631.isDisabled && - hook$jscomp$inline_2631.supportsFiber + !hook$jscomp$inline_2655.isDisabled && + hook$jscomp$inline_2655.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2631.inject( - internals$jscomp$inline_2630 + (rendererID = hook$jscomp$inline_2655.inject( + internals$jscomp$inline_2654 )), - (injectedHook = hook$jscomp$inline_2631); + (injectedHook = hook$jscomp$inline_2655); } catch (err) {} } exports.createComponentSelector = function (component) { @@ -18772,4 +18807,4 @@ exports.observeVisibleRects = function ( } }; }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js index 9af0428312e84..63eef528db0bc 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js @@ -416,7 +416,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js index 99e06dade20de..ab94273aa2045 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js @@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js index 6d8d8a5f0a7a5..c64b096ca26fe 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js index 4a269417048a0..a4214b21271fa 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom-experimental/package.json b/packages/next/src/compiled/react-dom-experimental/package.json index af0a40e56869e..27f0a4f78187c 100644 --- a/packages/next/src/compiled/react-dom-experimental/package.json +++ b/packages/next/src/compiled/react-dom-experimental/package.json @@ -72,10 +72,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.0.0-experimental-63779030-20250328" + "scheduler": "0.0.0-experimental-040f8286-20250402" }, "peerDependencies": { - "react": "0.0.0-experimental-63779030-20250328" + "react": "0.0.0-experimental-040f8286-20250402" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js index bf87f513220f9..7ec1ce3f39ce9 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js @@ -475,1063 +475,1063 @@ (pop(hostTransitionProviderCursor, fiber), (HostTransitionContext._currentValue = NotPendingTransition)); } - function typeName(value) { - return ( - ("function" === typeof Symbol && - Symbol.toStringTag && - value[Symbol.toStringTag]) || - value.constructor.name || - "Object" - ); - } - function willCoercionThrow(value) { - try { - return testStringCoercion(value), !1; - } catch (e) { - return !0; + function disabledLog() {} + function disableLogs() { + if (0 === disabledDepth) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: !0, + enumerable: !0, + value: disabledLog, + writable: !0 + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); } + disabledDepth++; } - function testStringCoercion(value) { - return "" + value; - } - function checkAttributeStringCoercion(value, attributeName) { - if (willCoercionThrow(value)) - return ( - console.error( - "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", - attributeName, - typeName(value) - ), - testStringCoercion(value) - ); - } - function checkCSSPropertyStringCoercion(value, propName) { - if (willCoercionThrow(value)) - return ( - console.error( - "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", - propName, - typeName(value) - ), - testStringCoercion(value) - ); - } - function checkFormFieldValueStringCoercion(value) { - if (willCoercionThrow(value)) - return ( - console.error( - "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", - typeName(value) - ), - testStringCoercion(value) - ); - } - function injectInternals(internals) { - if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; - var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; - if (hook.isDisabled) return !0; - if (!hook.supportsFiber) - return ( - console.error( - "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" - ), - !0 - ); - try { - (rendererID = hook.inject(internals)), (injectedHook = hook); - } catch (err) { - console.error("React instrumentation encountered an error: %s.", err); + function reenableLogs() { + disabledDepth--; + if (0 === disabledDepth) { + var props = { configurable: !0, enumerable: !0, writable: !0 }; + Object.defineProperties(console, { + log: assign({}, props, { value: prevLog }), + info: assign({}, props, { value: prevInfo }), + warn: assign({}, props, { value: prevWarn }), + error: assign({}, props, { value: prevError }), + group: assign({}, props, { value: prevGroup }), + groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), + groupEnd: assign({}, props, { value: prevGroupEnd }) + }); } - return hook.checkDCE ? !0 : !1; + 0 > disabledDepth && + console.error( + "disabledDepth fell below zero. This is a bug in React. Please file an issue." + ); } - function setIsStrictModeForDevtools(newIsStrictMode) { - "function" === typeof log$1 && - unstable_setDisableYieldValue(newIsStrictMode); - if (injectedHook && "function" === typeof injectedHook.setStrictMode) + function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) try { - injectedHook.setStrictMode(rendererID, newIsStrictMode); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - console.error( - "React instrumentation encountered an error: %s", - err - )); + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; } + return "\n" + prefix + name + suffix; } - function injectProfilingHooks(profilingHooks) { - injectedProfilingHooks = profilingHooks; - } - function markCommitStopped() { - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markCommitStopped && - injectedProfilingHooks.markCommitStopped(); - } - function markComponentRenderStarted(fiber) { - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentRenderStarted && - injectedProfilingHooks.markComponentRenderStarted(fiber); - } - function markComponentRenderStopped() { - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentRenderStopped && - injectedProfilingHooks.markComponentRenderStopped(); - } - function markRenderStarted(lanes) { - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markRenderStarted && - injectedProfilingHooks.markRenderStarted(lanes); - } - function markRenderStopped() { - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markRenderStopped && - injectedProfilingHooks.markRenderStopped(); - } - function markStateUpdateScheduled(fiber, lane) { - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markStateUpdateScheduled && - injectedProfilingHooks.markStateUpdateScheduled(fiber, lane); - } - function clz32Fallback(x) { - x >>>= 0; - return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; - } - function getLabelForLane(lane) { - if (lane & 1) return "SyncHydrationLane"; - if (lane & 2) return "Sync"; - if (lane & 4) return "InputContinuousHydration"; - if (lane & 8) return "InputContinuous"; - if (lane & 16) return "DefaultHydration"; - if (lane & 32) return "Default"; - if (lane & 128) return "TransitionHydration"; - if (lane & 4194048) return "Transition"; - if (lane & 62914560) return "Retry"; - if (lane & 67108864) return "SelectiveHydration"; - if (lane & 134217728) return "IdleHydration"; - if (lane & 268435456) return "Idle"; - if (lane & 536870912) return "Offscreen"; - if (lane & 1073741824) return "Deferred"; - } - function getHighestPriorityLanes(lanes) { - var pendingSyncLanes = lanes & 42; - if (0 !== pendingSyncLanes) return pendingSyncLanes; - switch (lanes & -lanes) { - case 1: - return 1; - case 2: - return 2; - case 4: - return 4; - case 8: - return 8; - case 16: - return 16; - case 32: - return 32; - case 64: - return 64; - case 128: - return 128; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return lanes & 4194048; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return lanes & 62914560; - case 67108864: - return 67108864; - case 134217728: - return 134217728; - case 268435456: - return 268435456; - case 536870912: - return 536870912; - case 1073741824: - return 0; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - lanes - ); - } - } - function getNextLanes(root, wipLanes, rootHasPendingCommit) { - var pendingLanes = root.pendingLanes; - if (0 === pendingLanes) return 0; - var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; - var nonIdlePendingLanes = pendingLanes & 134217727; - 0 !== nonIdlePendingLanes - ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = nonIdlePendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = - getHighestPriorityLanes(rootHasPendingCommit))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = pendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); - return 0 === nextLanes - ? 0 - : 0 !== wipLanes && - wipLanes !== nextLanes && - 0 === (wipLanes & suspendedLanes) && - ((suspendedLanes = nextLanes & -nextLanes), - (rootHasPendingCommit = wipLanes & -wipLanes), - suspendedLanes >= rootHasPendingCommit || - (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) - ? wipLanes - : nextLanes; - } - function checkIfRootIsPrerendering(root, renderLanes) { - return ( - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - renderLanes) - ); - } - function computeExpirationTime(lane, currentTime) { - switch (lane) { - case 1: - case 2: - case 4: - case 8: - case 64: - return currentTime + 250; - case 16: - case 32: - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return currentTime + 5e3; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return -1; - case 67108864: - case 134217728: - case 268435456: - case 536870912: - case 1073741824: - return -1; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - -1 + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + var frame = componentFrameCache.get(fn); + if (void 0 !== frame) return frame; + reentry = !0; + frame = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher = null; + previousDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = null; + disableLogs(); + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$0) { + control = x$0; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$1) { + control = x$1; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } ); - } - } - function claimNextTransitionLane() { - var lane = nextTransitionLane; - nextTransitionLane <<= 1; - 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); - return lane; - } - function claimNextRetryLane() { - var lane = nextRetryLane; - nextRetryLane <<= 1; - 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); - return lane; - } - function createLaneMap(initial) { - for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); - return laneMap; - } - function markRootUpdated$1(root, updateLane) { - root.pendingLanes |= updateLane; - 268435456 !== updateLane && - ((root.suspendedLanes = 0), - (root.pingedLanes = 0), - (root.warmLanes = 0)); - } - function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ) { - var previouslyPendingLanes = root.pendingLanes; - root.pendingLanes = remainingLanes; - root.suspendedLanes = 0; - root.pingedLanes = 0; - root.warmLanes = 0; - root.expiredLanes &= remainingLanes; - root.entangledLanes &= remainingLanes; - root.errorRecoveryDisabledLanes &= remainingLanes; - root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - for ( - remainingLanes = previouslyPendingLanes & ~remainingLanes; - 0 < remainingLanes; + var _RunInRootFrame$Deter = + RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + _RunInRootFrame$Deter = namePropDescriptor = 0; + namePropDescriptor < sampleLines.length && + !sampleLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); - ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; - expirationTimes[index] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index]; - if (null !== hiddenUpdatesForLane) + ) + namePropDescriptor++; for ( - hiddenUpdates[index] = null, index = 0; - index < hiddenUpdatesForLane.length; - index++ - ) { - var update = hiddenUpdatesForLane[index]; - null !== update && (update.lane &= -536870913); - } - remainingLanes &= ~lane; + ; + _RunInRootFrame$Deter < controlLines.length && + !controlLines[_RunInRootFrame$Deter].includes( + "DetermineComponentFrameRoot" + ); + + ) + _RunInRootFrame$Deter++; + if ( + namePropDescriptor === sampleLines.length || + _RunInRootFrame$Deter === controlLines.length + ) + for ( + namePropDescriptor = sampleLines.length - 1, + _RunInRootFrame$Deter = controlLines.length - 1; + 1 <= namePropDescriptor && + 0 <= _RunInRootFrame$Deter && + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]; + + ) + _RunInRootFrame$Deter--; + for ( + ; + 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; + namePropDescriptor--, _RunInRootFrame$Deter-- + ) + if ( + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter] + ) { + if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { + do + if ( + (namePropDescriptor--, + _RunInRootFrame$Deter--, + 0 > _RunInRootFrame$Deter || + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]) + ) { + var _frame = + "\n" + + sampleLines[namePropDescriptor].replace( + " at new ", + " at " + ); + fn.displayName && + _frame.includes("") && + (_frame = _frame.replace("", fn.displayName)); + "function" === typeof fn && + componentFrameCache.set(fn, _frame); + return _frame; + } + while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); + } + break; + } + } + } finally { + (reentry = !1), + (ReactSharedInternals.H = previousDispatcher), + reenableLogs(), + (Error.prepareStackTrace = frame); } - 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); + sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(sampleLines) + : ""; + "function" === typeof fn && componentFrameCache.set(fn, sampleLines); + return sampleLines; } - function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { - root.pendingLanes |= spawnedLane; - root.suspendedLanes &= ~spawnedLane; - var spawnedLaneIndex = 31 - clz32(spawnedLane); - root.entangledLanes |= spawnedLane; - root.entanglements[spawnedLaneIndex] = - root.entanglements[spawnedLaneIndex] | - 1073741824 | - (entangledLanes & 4194090); + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; } - function markRootEntangled(root, entangledLanes) { - var rootEntangledLanes = (root.entangledLanes |= entangledLanes); - for (root = root.entanglements; rootEntangledLanes; ) { - var index = 31 - clz32(rootEntangledLanes), - lane = 1 << index; - (lane & entangledLanes) | (root[index] & entangledLanes) && - (root[index] |= entangledLanes); - rootEntangledLanes &= ~lane; + function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + default: + return ""; } } - function getBumpedLaneForHydrationByLane(lane) { - switch (lane) { - case 2: - lane = 1; - break; - case 8: - lane = 4; - break; - case 32: - lane = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - lane = 128; - break; - case 268435456: - lane = 134217728; - break; - default: - lane = 0; + function getStackByFiberInDevAndProd(workInProgress) { + try { + var info = ""; + do { + info += describeFiber(workInProgress); + var debugInfo = workInProgress._debugInfo; + if (debugInfo) + for (var i = debugInfo.length - 1; 0 <= i; i--) { + var entry = debugInfo[i]; + if ("string" === typeof entry.name) { + var JSCompiler_temp_const = info, + env = entry.env; + var JSCompiler_inline_result = describeBuiltInComponentFrame( + entry.name + (env ? " [" + env + "]" : "") + ); + info = JSCompiler_temp_const + JSCompiler_inline_result; + } + } + workInProgress = workInProgress.return; + } while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; } - return lane; } - function addFiberToLanesMap(root, fiber, lanes) { - if (isDevToolsPresent) - for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index = 31 - clz32(lanes), - lane = 1 << index; - root[index].add(fiber); - lanes &= ~lane; - } + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; } - function movePendingFibersToMemoized(root, lanes) { - if (isDevToolsPresent) - for ( - var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, - memoizedUpdaters = root.memoizedUpdaters; - 0 < lanes; - - ) { - var index = 31 - clz32(lanes); - root = 1 << index; - index = pendingUpdatersLaneMap[index]; - 0 < index.size && - (index.forEach(function (fiber) { - var alternate = fiber.alternate; - (null !== alternate && memoizedUpdaters.has(alternate)) || - memoizedUpdaters.add(fiber); - }), - index.clear()); - lanes &= ~root; + function getCurrentFiberOwnerNameInDevOrNull() { + if (null === current) return null; + var owner = current._debugOwner; + return null != owner ? getComponentNameFromOwner(owner) : null; + } + function getCurrentFiberStackInDev() { + if (null === current) return ""; + var workInProgress = current; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 31: + info += describeBuiltInComponentFrame("Activity"); + break; + case 30: + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); } + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + workInProgress && + debugStack && + ("string" !== typeof debugStack && + (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), + "" !== debugStack && (info += "\n" + debugStack)); + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + var JSCompiler_inline_result = info; + } catch (x) { + JSCompiler_inline_result = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result; } - function lanesToEventPriority(lanes) { - lanes &= -lanes; - return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes - ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes - ? 0 !== (lanes & 134217727) - ? DefaultEventPriority - : IdleEventPriority - : ContinuousEventPriority - : DiscreteEventPriority; - } - function resolveUpdatePriority() { - var updatePriority = ReactDOMSharedInternals.p; - if (0 !== updatePriority) return updatePriority; - updatePriority = window.event; - return void 0 === updatePriority - ? DefaultEventPriority - : getEventPriority(updatePriority.type); - } - function runWithPriority(priority, fn) { - var previousPriority = ReactDOMSharedInternals.p; + function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { + var previousFiber = current; + setCurrentFiber(fiber); try { - return (ReactDOMSharedInternals.p = priority), fn(); + return null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); } finally { - ReactDOMSharedInternals.p = previousPriority; + setCurrentFiber(previousFiber); } + throw Error( + "runWithFiberInDEV should never be called in production. This is a bug in React." + ); } - function detachDeletedInstance(node) { - delete node[internalInstanceKey]; - delete node[internalPropsKey]; - delete node[internalEventHandlersKey]; - delete node[internalEventHandlerListenersKey]; - delete node[internalEventHandlesSetKey]; + function setCurrentFiber(fiber) { + ReactSharedInternals.getCurrentStack = + null === fiber ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = fiber; } - function getClosestInstanceFromNode(targetNode) { - var targetInst = targetNode[internalInstanceKey]; - if (targetInst) return targetInst; - for (var parentNode = targetNode.parentNode; parentNode; ) { - if ( - (targetInst = - parentNode[internalContainerInstanceKey] || - parentNode[internalInstanceKey]) - ) { - parentNode = targetInst.alternate; - if ( - null !== targetInst.child || - (null !== parentNode && null !== parentNode.child) - ) - for ( - targetNode = getParentSuspenseInstance(targetNode); - null !== targetNode; - - ) { - if ((parentNode = targetNode[internalInstanceKey])) - return parentNode; - targetNode = getParentSuspenseInstance(targetNode); - } - return targetInst; - } - targetNode = parentNode; - parentNode = targetNode.parentNode; - } - return null; + function typeName(value) { + return ( + ("function" === typeof Symbol && + Symbol.toStringTag && + value[Symbol.toStringTag]) || + value.constructor.name || + "Object" + ); } - function getInstanceFromNode(node) { - if ( - (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) - ) { - var tag = node.tag; - if ( - 5 === tag || - 6 === tag || - 13 === tag || - 26 === tag || - 27 === tag || - 3 === tag - ) - return node; + function willCoercionThrow(value) { + try { + return testStringCoercion(value), !1; + } catch (e) { + return !0; } - return null; } - function getNodeFromInstance(inst) { - var tag = inst.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) - return inst.stateNode; - throw Error("getNodeFromInstance: Invalid argument."); + function testStringCoercion(value) { + return "" + value; } - function getResourcesFromRoot(root) { - var resources = root[internalRootNodeResourcesKey]; - resources || - (resources = root[internalRootNodeResourcesKey] = - { hoistableStyles: new Map(), hoistableScripts: new Map() }); - return resources; + function checkAttributeStringCoercion(value, attributeName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", + attributeName, + typeName(value) + ), + testStringCoercion(value) + ); } - function markNodeAsHoistable(node) { - node[internalHoistableMarker] = !0; + function checkCSSPropertyStringCoercion(value, propName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", + propName, + typeName(value) + ), + testStringCoercion(value) + ); } - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + "Capture", dependencies); + function checkFormFieldValueStringCoercion(value) { + if (willCoercionThrow(value)) + return ( + console.error( + "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", + typeName(value) + ), + testStringCoercion(value) + ); } - function registerDirectEvent(registrationName, dependencies) { - registrationNameDependencies[registrationName] && - console.error( - "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", - registrationName + function injectInternals(internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled) return !0; + if (!hook.supportsFiber) + return ( + console.error( + "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" + ), + !0 ); - registrationNameDependencies[registrationName] = dependencies; - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - "onDoubleClick" === registrationName && - (possibleRegistrationNames.ondblclick = registrationName); - for ( - registrationName = 0; - registrationName < dependencies.length; - registrationName++ - ) - allNativeEvents.add(dependencies[registrationName]); + try { + (rendererID = hook.inject(internals)), (injectedHook = hook); + } catch (err) { + console.error("React instrumentation encountered an error: %s.", err); + } + return hook.checkDCE ? !0 : !1; } - function checkControlledValueProps(tagName, props) { - hasReadOnlyValue[props.type] || - props.onChange || - props.onInput || - props.readOnly || - props.disabled || - null == props.value || - ("select" === tagName - ? console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." - ) - : console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + function setIsStrictModeForDevtools(newIsStrictMode) { + "function" === typeof log$1 && + unstable_setDisableYieldValue(newIsStrictMode); + if (injectedHook && "function" === typeof injectedHook.setStrictMode) + try { + injectedHook.setStrictMode(rendererID, newIsStrictMode); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + console.error( + "React instrumentation encountered an error: %s", + err )); - props.onChange || - props.readOnly || - props.disabled || - null == props.checked || - console.error( - "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." - ); + } + } + function injectProfilingHooks(profilingHooks) { + injectedProfilingHooks = profilingHooks; + } + function markCommitStopped() { + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markCommitStopped && + injectedProfilingHooks.markCommitStopped(); + } + function markComponentRenderStarted(fiber) { + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentRenderStarted && + injectedProfilingHooks.markComponentRenderStarted(fiber); + } + function markComponentRenderStopped() { + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentRenderStopped && + injectedProfilingHooks.markComponentRenderStopped(); } - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) - return !0; - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) - return !1; - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) - return (validatedAttributeNameCache[attributeName] = !0); - illegalAttributeNameCache[attributeName] = !0; - console.error("Invalid attribute name: `%s`", attributeName); - return !1; + function markRenderStarted(lanes) { + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markRenderStarted && + injectedProfilingHooks.markRenderStarted(lanes); } - function getValueForAttributeOnCustomComponent(node, name, expected) { - if (isAttributeNameSafe(name)) { - if (!node.hasAttribute(name)) { - switch (typeof expected) { - case "symbol": - case "object": - return expected; - case "function": - return expected; - case "boolean": - if (!1 === expected) return expected; - } - return void 0 === expected ? void 0 : null; - } - node = node.getAttribute(name); - if ("" === node && !0 === expected) return !0; - checkAttributeStringCoercion(expected, name); - return node === "" + expected ? expected : node; - } + function markRenderStopped() { + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markRenderStopped && + injectedProfilingHooks.markRenderStopped(); } - function setValueForAttribute(node, name, value) { - if (isAttributeNameSafe(name)) - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix && "aria-" !== prefix) { - node.removeAttribute(name); - return; - } - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); - } + function markStateUpdateScheduled(fiber, lane) { + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markStateUpdateScheduled && + injectedProfilingHooks.markStateUpdateScheduled(fiber, lane); } - function setValueForKnownAttribute(node, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); + function clz32Fallback(x) { + x >>>= 0; + return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; + } + function getLabelForLane(lane) { + if (lane & 1) return "SyncHydrationLane"; + if (lane & 2) return "Sync"; + if (lane & 4) return "InputContinuousHydration"; + if (lane & 8) return "InputContinuous"; + if (lane & 16) return "DefaultHydration"; + if (lane & 32) return "Default"; + if (lane & 128) return "TransitionHydration"; + if (lane & 4194048) return "Transition"; + if (lane & 62914560) return "Retry"; + if (lane & 67108864) return "SelectiveHydration"; + if (lane & 134217728) return "IdleHydration"; + if (lane & 268435456) return "Idle"; + if (lane & 536870912) return "Offscreen"; + if (lane & 1073741824) return "Deferred"; + } + function getHighestPriorityLanes(lanes) { + var pendingSyncLanes = lanes & 42; + if (0 !== pendingSyncLanes) return pendingSyncLanes; + switch (lanes & -lanes) { + case 1: + return 1; + case 2: + return 2; + case 4: + return 4; + case 8: + return 8; + case 16: + return 16; + case 32: + return 32; + case 64: + return 64; + case 128: + return 128; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return lanes & 4194048; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return lanes & 62914560; + case 67108864: + return 67108864; + case 134217728: + return 134217728; + case 268435456: + return 268435456; + case 536870912: + return 536870912; + case 1073741824: + return 0; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + lanes + ); } } - function setValueForNamespacedAttribute(node, namespace, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttributeNS(namespace, name, "" + value); + function getNextLanes(root, wipLanes, rootHasPendingCommit) { + var pendingLanes = root.pendingLanes; + if (0 === pendingLanes) return 0; + var nextLanes = 0, + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; + var nonIdlePendingLanes = pendingLanes & 134217727; + 0 !== nonIdlePendingLanes + ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); + return 0 === nextLanes + ? 0 + : 0 !== wipLanes && + wipLanes !== nextLanes && + 0 === (wipLanes & suspendedLanes) && + ((suspendedLanes = nextLanes & -nextLanes), + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) + ? wipLanes + : nextLanes; + } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } + function computeExpirationTime(lane, currentTime) { + switch (lane) { + case 1: + case 2: + case 4: + case 8: + case 64: + return currentTime + 250; + case 16: + case 32: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return currentTime + 5e3; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return -1; + case 67108864: + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + -1 + ); } } - function disabledLog() {} - function disableLogs() { - if (0 === disabledDepth) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: !0, - enumerable: !0, - value: disabledLog, - writable: !0 - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - } - disabledDepth++; + function claimNextTransitionLane() { + var lane = nextTransitionLane; + nextTransitionLane <<= 1; + 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); + return lane; } - function reenableLogs() { - disabledDepth--; - if (0 === disabledDepth) { - var props = { configurable: !0, enumerable: !0, writable: !0 }; - Object.defineProperties(console, { - log: assign({}, props, { value: prevLog }), - info: assign({}, props, { value: prevInfo }), - warn: assign({}, props, { value: prevWarn }), - error: assign({}, props, { value: prevError }), - group: assign({}, props, { value: prevGroup }), - groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), - groupEnd: assign({}, props, { value: prevGroupEnd }) - }); - } - 0 > disabledDepth && - console.error( - "disabledDepth fell below zero. This is a bug in React. Please file an issue." - ); + function claimNextRetryLane() { + var lane = nextRetryLane; + nextRetryLane <<= 1; + 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); + return lane; } - function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; - } - return "\n" + prefix + name + suffix; + function createLaneMap(initial) { + for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); + return laneMap; } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - var frame = componentFrameCache.get(fn); - if (void 0 !== frame) return frame; - reentry = !0; - frame = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher = null; - previousDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = null; - disableLogs(); - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$0) { - control = x$0; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$1) { - control = x$1; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = - RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - _RunInRootFrame$Deter = namePropDescriptor = 0; - namePropDescriptor < sampleLines.length && - !sampleLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); + function markRootUpdated$1(root, updateLane) { + root.pendingLanes |= updateLane; + 268435456 !== updateLane && + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); + } + function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ) { + var previouslyPendingLanes = root.pendingLanes; + root.pendingLanes = remainingLanes; + root.suspendedLanes = 0; + root.pingedLanes = 0; + root.warmLanes = 0; + root.expiredLanes &= remainingLanes; + root.entangledLanes &= remainingLanes; + root.errorRecoveryDisabledLanes &= remainingLanes; + root.shellSuspendCounter = 0; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; + for ( + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; - ) - namePropDescriptor++; + ) { + var index = 31 - clz32(remainingLanes), + lane = 1 << index; + entanglements[index] = 0; + expirationTimes[index] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index]; + if (null !== hiddenUpdatesForLane) for ( - ; - _RunInRootFrame$Deter < controlLines.length && - !controlLines[_RunInRootFrame$Deter].includes( - "DetermineComponentFrameRoot" - ); + hiddenUpdates[index] = null, index = 0; + index < hiddenUpdatesForLane.length; + index++ + ) { + var update = hiddenUpdatesForLane[index]; + null !== update && (update.lane &= -536870913); + } + remainingLanes &= ~lane; + } + 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); + } + function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { + root.pendingLanes |= spawnedLane; + root.suspendedLanes &= ~spawnedLane; + var spawnedLaneIndex = 31 - clz32(spawnedLane); + root.entangledLanes |= spawnedLane; + root.entanglements[spawnedLaneIndex] = + root.entanglements[spawnedLaneIndex] | + 1073741824 | + (entangledLanes & 4194090); + } + function markRootEntangled(root, entangledLanes) { + var rootEntangledLanes = (root.entangledLanes |= entangledLanes); + for (root = root.entanglements; rootEntangledLanes; ) { + var index = 31 - clz32(rootEntangledLanes), + lane = 1 << index; + (lane & entangledLanes) | (root[index] & entangledLanes) && + (root[index] |= entangledLanes); + rootEntangledLanes &= ~lane; + } + } + function getBumpedLaneForHydrationByLane(lane) { + switch (lane) { + case 2: + lane = 1; + break; + case 8: + lane = 4; + break; + case 32: + lane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + lane = 128; + break; + case 268435456: + lane = 134217728; + break; + default: + lane = 0; + } + return lane; + } + function addFiberToLanesMap(root, fiber, lanes) { + if (isDevToolsPresent) + for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { + var index = 31 - clz32(lanes), + lane = 1 << index; + root[index].add(fiber); + lanes &= ~lane; + } + } + function movePendingFibersToMemoized(root, lanes) { + if (isDevToolsPresent) + for ( + var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, + memoizedUpdaters = root.memoizedUpdaters; + 0 < lanes; - ) - _RunInRootFrame$Deter++; + ) { + var index = 31 - clz32(lanes); + root = 1 << index; + index = pendingUpdatersLaneMap[index]; + 0 < index.size && + (index.forEach(function (fiber) { + var alternate = fiber.alternate; + (null !== alternate && memoizedUpdaters.has(alternate)) || + memoizedUpdaters.add(fiber); + }), + index.clear()); + lanes &= ~root; + } + } + function lanesToEventPriority(lanes) { + lanes &= -lanes; + return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes + ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes + ? 0 !== (lanes & 134217727) + ? DefaultEventPriority + : IdleEventPriority + : ContinuousEventPriority + : DiscreteEventPriority; + } + function resolveUpdatePriority() { + var updatePriority = ReactDOMSharedInternals.p; + if (0 !== updatePriority) return updatePriority; + updatePriority = window.event; + return void 0 === updatePriority + ? DefaultEventPriority + : getEventPriority(updatePriority.type); + } + function runWithPriority(priority, fn) { + var previousPriority = ReactDOMSharedInternals.p; + try { + return (ReactDOMSharedInternals.p = priority), fn(); + } finally { + ReactDOMSharedInternals.p = previousPriority; + } + } + function detachDeletedInstance(node) { + delete node[internalInstanceKey]; + delete node[internalPropsKey]; + delete node[internalEventHandlersKey]; + delete node[internalEventHandlerListenersKey]; + delete node[internalEventHandlesSetKey]; + } + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + if (targetInst) return targetInst; + for (var parentNode = targetNode.parentNode; parentNode; ) { + if ( + (targetInst = + parentNode[internalContainerInstanceKey] || + parentNode[internalInstanceKey]) + ) { + parentNode = targetInst.alternate; if ( - namePropDescriptor === sampleLines.length || - _RunInRootFrame$Deter === controlLines.length + null !== targetInst.child || + (null !== parentNode && null !== parentNode.child) ) for ( - namePropDescriptor = sampleLines.length - 1, - _RunInRootFrame$Deter = controlLines.length - 1; - 1 <= namePropDescriptor && - 0 <= _RunInRootFrame$Deter && - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]; + targetNode = getParentSuspenseInstance(targetNode); + null !== targetNode; - ) - _RunInRootFrame$Deter--; - for ( - ; - 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; - namePropDescriptor--, _RunInRootFrame$Deter-- - ) - if ( - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter] ) { - if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { - do - if ( - (namePropDescriptor--, - _RunInRootFrame$Deter--, - 0 > _RunInRootFrame$Deter || - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]) - ) { - var _frame = - "\n" + - sampleLines[namePropDescriptor].replace( - " at new ", - " at " - ); - fn.displayName && - _frame.includes("") && - (_frame = _frame.replace("", fn.displayName)); - "function" === typeof fn && - componentFrameCache.set(fn, _frame); - return _frame; - } - while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); - } - break; + if ((parentNode = targetNode[internalInstanceKey])) + return parentNode; + targetNode = getParentSuspenseInstance(targetNode); } + return targetInst; } - } finally { - (reentry = !1), - (ReactSharedInternals.H = previousDispatcher), - reenableLogs(), - (Error.prepareStackTrace = frame); + targetNode = parentNode; + parentNode = targetNode.parentNode; } - sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(sampleLines) - : ""; - "function" === typeof fn && componentFrameCache.set(fn, sampleLines); - return sampleLines; + return null; } - function formatOwnerStack(error) { - var prevPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - error = error.stack; - Error.prepareStackTrace = prevPrepareStackTrace; - error.startsWith("Error: react-stack-top-frame\n") && - (error = error.slice(29)); - prevPrepareStackTrace = error.indexOf("\n"); - -1 !== prevPrepareStackTrace && - (error = error.slice(prevPrepareStackTrace + 1)); - prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); - -1 !== prevPrepareStackTrace && - (prevPrepareStackTrace = error.lastIndexOf( - "\n", - prevPrepareStackTrace - )); - if (-1 !== prevPrepareStackTrace) - error = error.slice(0, prevPrepareStackTrace); - else return ""; - return error; + function getInstanceFromNode(node) { + if ( + (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) + ) { + var tag = node.tag; + if ( + 5 === tag || + 6 === tag || + 13 === tag || + 26 === tag || + 27 === tag || + 3 === tag + ) + return node; + } + return null; + } + function getNodeFromInstance(inst) { + var tag = inst.tag; + if (5 === tag || 26 === tag || 27 === tag || 6 === tag) + return inst.stateNode; + throw Error("getNodeFromInstance: Invalid argument."); + } + function getResourcesFromRoot(root) { + var resources = root[internalRootNodeResourcesKey]; + resources || + (resources = root[internalRootNodeResourcesKey] = + { hoistableStyles: new Map(), hoistableScripts: new Map() }); + return resources; + } + function markNodeAsHoistable(node) { + node[internalHoistableMarker] = !0; + } + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + registrationNameDependencies[registrationName] && + console.error( + "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", + registrationName + ); + registrationNameDependencies[registrationName] = dependencies; + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + "onDoubleClick" === registrationName && + (possibleRegistrationNames.ondblclick = registrationName); + for ( + registrationName = 0; + registrationName < dependencies.length; + registrationName++ + ) + allNativeEvents.add(dependencies[registrationName]); + } + function checkControlledValueProps(tagName, props) { + hasReadOnlyValue[props.type] || + props.onChange || + props.onInput || + props.readOnly || + props.disabled || + null == props.value || + ("select" === tagName + ? console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." + ) + : console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + )); + props.onChange || + props.readOnly || + props.disabled || + null == props.checked || + console.error( + "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + ); } - function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - default: - return ""; - } + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) + return !0; + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) + return !1; + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) + return (validatedAttributeNameCache[attributeName] = !0); + illegalAttributeNameCache[attributeName] = !0; + console.error("Invalid attribute name: `%s`", attributeName); + return !1; } - function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do { - info += describeFiber(workInProgress); - var debugInfo = workInProgress._debugInfo; - if (debugInfo) - for (var i = debugInfo.length - 1; 0 <= i; i--) { - var entry = debugInfo[i]; - if ("string" === typeof entry.name) { - var JSCompiler_temp_const = info, - env = entry.env; - var JSCompiler_inline_result = describeBuiltInComponentFrame( - entry.name + (env ? " [" + env + "]" : "") - ); - info = JSCompiler_temp_const + JSCompiler_inline_result; - } - } - workInProgress = workInProgress.return; - } while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; + function getValueForAttributeOnCustomComponent(node, name, expected) { + if (isAttributeNameSafe(name)) { + if (!node.hasAttribute(name)) { + switch (typeof expected) { + case "symbol": + case "object": + return expected; + case "function": + return expected; + case "boolean": + if (!1 === expected) return expected; + } + return void 0 === expected ? void 0 : null; + } + node = node.getAttribute(name); + if ("" === node && !0 === expected) return !0; + checkAttributeStringCoercion(expected, name); + return node === "" + expected ? expected : node; } } - function describeFunctionComponentFrameWithoutLineNumber(fn) { - return (fn = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(fn) - : ""; - } - function getCurrentFiberOwnerNameInDevOrNull() { - if (null === current) return null; - var owner = current._debugOwner; - return null != owner ? getComponentNameFromOwner(owner) : null; + function setValueForAttribute(node, name, value) { + if (isAttributeNameSafe(name)) + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix && "aria-" !== prefix) { + node.removeAttribute(name); + return; + } + } + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); + } } - function getCurrentFiberStackInDev() { - if (null === current) return ""; - var workInProgress = current; - try { - var info = ""; - 6 === workInProgress.tag && (workInProgress = workInProgress.return); - switch (workInProgress.tag) { - case 26: - case 27: - case 5: - info += describeBuiltInComponentFrame(workInProgress.type); - break; - case 13: - info += describeBuiltInComponentFrame("Suspense"); - break; - case 19: - info += describeBuiltInComponentFrame("SuspenseList"); - break; - case 31: - info += describeBuiltInComponentFrame("Activity"); - break; - case 30: - case 0: - case 15: - case 1: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type - )); - break; - case 11: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type.render - )); + function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; } - for (; workInProgress; ) - if ("number" === typeof workInProgress.tag) { - var fiber = workInProgress; - workInProgress = fiber._debugOwner; - var debugStack = fiber._debugStack; - workInProgress && - debugStack && - ("string" !== typeof debugStack && - (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), - "" !== debugStack && (info += "\n" + debugStack)); - } else if (null != workInProgress.debugStack) { - var ownerStack = workInProgress.debugStack; - (workInProgress = workInProgress.owner) && - ownerStack && - (info += "\n" + formatOwnerStack(ownerStack)); - } else break; - var JSCompiler_inline_result = info; - } catch (x) { - JSCompiler_inline_result = - "\nError generating stack: " + x.message + "\n" + x.stack; + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); } - return JSCompiler_inline_result; } - function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { - var previousFiber = current; - setCurrentFiber(fiber); - try { - return null !== fiber && fiber._debugTask - ? fiber._debugTask.run( - callback.bind(null, arg0, arg1, arg2, arg3, arg4) - ) - : callback(arg0, arg1, arg2, arg3, arg4); - } finally { - setCurrentFiber(previousFiber); + function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + checkAttributeStringCoercion(value, name); + node.setAttributeNS(namespace, name, "" + value); } - throw Error( - "runWithFiberInDEV should never be called in production. This is a bug in React." - ); - } - function setCurrentFiber(fiber) { - ReactSharedInternals.getCurrentStack = - null === fiber ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = fiber; } function getToStringValue(value) { switch (typeof value) { @@ -7005,6 +7005,7 @@ { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7021,6 +7022,7 @@ (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7042,6 +7044,7 @@ (revertLane = { lane: updateLane, revertLane: update.revertLane, + gesture: update.gesture, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7363,8 +7366,8 @@ if (node.isTransition) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; - ReactSharedInternals.T._updatedFibers = new Set(); try { var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S; @@ -7374,7 +7377,15 @@ } catch (error) { onActionError(actionQueue, node, error); } finally { - (ReactSharedInternals.T = prevTransition), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), + (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && ((actionQueue = currentTransition._updatedFibers.size), @@ -7396,7 +7407,9 @@ null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then - ? (returnValue.then( + ? (ReactSharedInternals.asyncTransitions++, + returnValue.then(releaseAsyncTransition, releaseAsyncTransition), + returnValue.then( function (nextState) { onActionSuccess(actionQueue, node, nextState); }, @@ -7795,6 +7808,9 @@ workInProgressRootSkippedLanes |= hook; return prevValue; } + function releaseAsyncTransition() { + ReactSharedInternals.asyncTransitions--; + } function startTransition( fiber, queue, @@ -7809,9 +7825,9 @@ : ContinuousEventPriority; var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); - currentTransition._updatedFibers = new Set(); try { var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S; @@ -7822,6 +7838,8 @@ "object" === typeof returnValue && "function" === typeof returnValue.then ) { + ReactSharedInternals.asyncTransitions++; + returnValue.then(releaseAsyncTransition, releaseAsyncTransition); var thenableForFinishedState = chainThenableValue( returnValue, finishedState @@ -7848,6 +7866,14 @@ ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && @@ -8021,6 +8047,7 @@ var update = { lane: args, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8048,6 +8075,7 @@ var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8104,6 +8132,7 @@ action = { lane: 2, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -12335,13 +12364,15 @@ if (5 === tag || 6 === tag) (node = node.stateNode), before - ? (9 === parent.nodeType + ? (warnForReactChildrenConflict(parent), + (9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent - ).insertBefore(node, before) - : ((before = + ).insertBefore(node, before)) + : (warnForReactChildrenConflict(parent), + (before = 9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName @@ -19348,6 +19379,30 @@ function commitTextUpdate(textInstance, oldText, newText) { textInstance.nodeValue = newText; } + function warnForReactChildrenConflict(container) { + if (!container.__reactWarnedAboutChildrenConflict) { + var props = container[internalPropsKey] || null; + if (null !== props) { + var fiber = getInstanceFromNode(container); + null !== fiber && + ("string" === typeof props.children || + "number" === typeof props.children + ? ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + })) + : null != props.dangerouslySetInnerHTML && + ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + }))); + } + } + } function isSingletonScope(type) { return "head" === type; } @@ -21241,6 +21296,23 @@ contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), + disabledDepth = 0, + prevLog, + prevInfo, + prevWarn, + prevError, + prevGroup, + prevGroupCollapsed, + prevGroupEnd; + disabledLog.__reactDisabledLog = !0; + var prefix, + suffix, + reentry = !1; + var componentFrameCache = new ( + "function" === typeof WeakMap ? WeakMap : Map + )(); + var current = null, + isRendering = !1, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -21295,23 +21367,6 @@ ), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, - disabledDepth = 0, - prevLog, - prevInfo, - prevWarn, - prevError, - prevGroup, - prevGroupCollapsed, - prevGroupEnd; - disabledLog.__reactDisabledLog = !0; - var prefix, - suffix, - reentry = !1; - var componentFrameCache = new ( - "function" === typeof WeakMap ? WeakMap : Map - )(); - var current = null, - isRendering = !1, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = !1, didWarnCheckedDefaultChecked = !1, @@ -24785,11 +24840,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24826,10 +24881,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-canary-63779030-20250328", + version: "19.2.0-canary-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-63779030-20250328" + reconcilerVersion: "19.2.0-canary-040f8286-20250402" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24973,7 +25028,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js index ef1b426625238..838edabc3e601 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js @@ -308,6 +308,194 @@ function popHostContext(fiber) { (pop(hostTransitionProviderCursor), (HostTransitionContext._currentValue = sharedNotPendingObject)); } +var prefix, suffix; +function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; + } + return "\n" + prefix + name + suffix; +} +var reentry = !1; +function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + reentry = !0; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$1) { + control = x$1; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$2) { + control = x$2; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } + ); + var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + namePropDescriptor = RunInRootFrame = 0; + RunInRootFrame < sampleLines.length && + !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); + + ) + RunInRootFrame++; + for ( + ; + namePropDescriptor < controlLines.length && + !controlLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); + + ) + namePropDescriptor++; + if ( + RunInRootFrame === sampleLines.length || + namePropDescriptor === controlLines.length + ) + for ( + RunInRootFrame = sampleLines.length - 1, + namePropDescriptor = controlLines.length - 1; + 1 <= RunInRootFrame && + 0 <= namePropDescriptor && + sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; + + ) + namePropDescriptor--; + for ( + ; + 1 <= RunInRootFrame && 0 <= namePropDescriptor; + RunInRootFrame--, namePropDescriptor-- + ) + if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { + if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { + do + if ( + (RunInRootFrame--, + namePropDescriptor--, + 0 > namePropDescriptor || + sampleLines[RunInRootFrame] !== + controlLines[namePropDescriptor]) + ) { + var frame = + "\n" + + sampleLines[RunInRootFrame].replace(" at new ", " at "); + fn.displayName && + frame.includes("") && + (frame = frame.replace("", fn.displayName)); + return frame; + } + while (1 <= RunInRootFrame && 0 <= namePropDescriptor); + } + break; + } + } + } finally { + (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); + } + return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(previousPrepareStackTrace) + : ""; +} +function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + default: + return ""; + } +} +function getStackByFiberInDevAndProd(workInProgress) { + try { + var info = ""; + do + (info += describeFiber(workInProgress)), + (workInProgress = workInProgress.return); + while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } +} var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -529,18 +717,18 @@ function markRootFinished( 0 < remainingLanes; ) { - var index$5 = 31 - clz32(remainingLanes), - lane = 1 << index$5; - entanglements[index$5] = 0; - expirationTimes[index$5] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$5]; + var index$7 = 31 - clz32(remainingLanes), + lane = 1 << index$7; + entanglements[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$5] = null, index$5 = 0; - index$5 < hiddenUpdatesForLane.length; - index$5++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$5]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } remainingLanes &= ~lane; @@ -565,10 +753,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$6 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$6; - (lane & entangledLanes) | (root[index$6] & entangledLanes) && - (root[index$6] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -752,8 +940,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$8 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$8 && "aria-" !== prefix$8) { + var prefix$10 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$10 && "aria-" !== prefix$10) { node.removeAttribute(name); return; } @@ -789,194 +977,6 @@ function setValueForNamespacedAttribute(node, namespace, name, value) { node.setAttributeNS(namespace, name, "" + value); } } -var prefix, suffix; -function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; - } - return "\n" + prefix + name + suffix; -} -var reentry = !1; -function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - reentry = !0; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$9) { - control = x$9; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$10) { - control = x$10; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - namePropDescriptor = RunInRootFrame = 0; - RunInRootFrame < sampleLines.length && - !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); - - ) - RunInRootFrame++; - for ( - ; - namePropDescriptor < controlLines.length && - !controlLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); - - ) - namePropDescriptor++; - if ( - RunInRootFrame === sampleLines.length || - namePropDescriptor === controlLines.length - ) - for ( - RunInRootFrame = sampleLines.length - 1, - namePropDescriptor = controlLines.length - 1; - 1 <= RunInRootFrame && - 0 <= namePropDescriptor && - sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; - - ) - namePropDescriptor--; - for ( - ; - 1 <= RunInRootFrame && 0 <= namePropDescriptor; - RunInRootFrame--, namePropDescriptor-- - ) - if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { - if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { - do - if ( - (RunInRootFrame--, - namePropDescriptor--, - 0 > namePropDescriptor || - sampleLines[RunInRootFrame] !== - controlLines[namePropDescriptor]) - ) { - var frame = - "\n" + - sampleLines[RunInRootFrame].replace(" at new ", " at "); - fn.displayName && - frame.includes("") && - (frame = frame.replace("", fn.displayName)); - return frame; - } - while (1 <= RunInRootFrame && 0 <= namePropDescriptor); - } - break; - } - } - } finally { - (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); - } - return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(previousPrepareStackTrace) - : ""; -} -function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - default: - return ""; - } -} -function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do - (info += describeFiber(workInProgress)), - (workInProgress = workInProgress.return); - while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; - } -} function getToStringValue(value) { switch (typeof value) { case "bigint": @@ -4524,6 +4524,7 @@ function updateReducerImpl(hook, current, reducer) { { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -4540,6 +4541,7 @@ function updateReducerImpl(hook, current, reducer) { (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -4561,6 +4563,7 @@ function updateReducerImpl(hook, current, reducer) { (revertLane = { lane: updateLane, revertLane: update.revertLane, + gesture: update.gesture, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -4776,7 +4779,10 @@ function runActionStateAction(actionQueue, node) { } catch (error) { onActionError(actionQueue, node, error); } finally { - ReactSharedInternals.T = prevTransition; + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), + (ReactSharedInternals.T = prevTransition); } } else try { @@ -5150,6 +5156,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), (ReactSharedInternals.T = prevTransition); } } @@ -5241,6 +5250,7 @@ function dispatchReducerAction(fiber, queue, action) { action = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5261,6 +5271,7 @@ function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5302,6 +5313,7 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { action = { lane: 2, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -10551,9 +10563,9 @@ function markRootSuspended( didAttemptEntireTree && (root.warmLanes |= suspendedLanes); didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4; - didAttemptEntireTree[index$4] = -1; + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10615,9 +10627,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$2 = 31 - clz32(allEntangledLanes), - lane = 1 << index$2; - lanes |= root[index$2]; + var index$4 = 31 - clz32(allEntangledLanes), + lane = 1 << index$4; + lanes |= root[index$4]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -11553,12 +11565,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3, - expirationTime = expirationTimes[index$3]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$3] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -15260,14 +15272,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1779 = React.version; if ( - "19.2.0-canary-63779030-20250328" !== + "19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion$jscomp$inline_1779 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1779, - "19.2.0-canary-63779030-20250328" + "19.2.0-canary-040f8286-20250402" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15289,10 +15301,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2250 = { bundleType: 0, - version: "19.2.0-canary-63779030-20250328", + version: "19.2.0-canary-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-63779030-20250328" + reconcilerVersion: "19.2.0-canary-040f8286-20250402" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2251 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15396,4 +15408,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js index f8207d74b4934..685001dc6626d 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js @@ -483,1063 +483,1063 @@ (pop(hostTransitionProviderCursor, fiber), (HostTransitionContext._currentValue = NotPendingTransition)); } - function typeName(value) { - return ( - ("function" === typeof Symbol && - Symbol.toStringTag && - value[Symbol.toStringTag]) || - value.constructor.name || - "Object" - ); - } - function willCoercionThrow(value) { - try { - return testStringCoercion(value), !1; - } catch (e) { - return !0; + function disabledLog() {} + function disableLogs() { + if (0 === disabledDepth) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: !0, + enumerable: !0, + value: disabledLog, + writable: !0 + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); } + disabledDepth++; } - function testStringCoercion(value) { - return "" + value; - } - function checkAttributeStringCoercion(value, attributeName) { - if (willCoercionThrow(value)) - return ( - console.error( - "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", - attributeName, - typeName(value) - ), - testStringCoercion(value) - ); - } - function checkCSSPropertyStringCoercion(value, propName) { - if (willCoercionThrow(value)) - return ( - console.error( - "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", - propName, - typeName(value) - ), - testStringCoercion(value) - ); - } - function checkFormFieldValueStringCoercion(value) { - if (willCoercionThrow(value)) - return ( - console.error( - "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", - typeName(value) - ), - testStringCoercion(value) - ); - } - function injectInternals(internals) { - if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; - var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; - if (hook.isDisabled) return !0; - if (!hook.supportsFiber) - return ( - console.error( - "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" - ), - !0 - ); - try { - (rendererID = hook.inject(internals)), (injectedHook = hook); - } catch (err) { - console.error("React instrumentation encountered an error: %s.", err); + function reenableLogs() { + disabledDepth--; + if (0 === disabledDepth) { + var props = { configurable: !0, enumerable: !0, writable: !0 }; + Object.defineProperties(console, { + log: assign({}, props, { value: prevLog }), + info: assign({}, props, { value: prevInfo }), + warn: assign({}, props, { value: prevWarn }), + error: assign({}, props, { value: prevError }), + group: assign({}, props, { value: prevGroup }), + groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), + groupEnd: assign({}, props, { value: prevGroupEnd }) + }); } - return hook.checkDCE ? !0 : !1; + 0 > disabledDepth && + console.error( + "disabledDepth fell below zero. This is a bug in React. Please file an issue." + ); } - function setIsStrictModeForDevtools(newIsStrictMode) { - "function" === typeof log$1 && - unstable_setDisableYieldValue(newIsStrictMode); - if (injectedHook && "function" === typeof injectedHook.setStrictMode) + function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) try { - injectedHook.setStrictMode(rendererID, newIsStrictMode); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - console.error( - "React instrumentation encountered an error: %s", - err - )); + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; } + return "\n" + prefix + name + suffix; } - function injectProfilingHooks(profilingHooks) { - injectedProfilingHooks = profilingHooks; - } - function markCommitStopped() { - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markCommitStopped && - injectedProfilingHooks.markCommitStopped(); - } - function markComponentRenderStarted(fiber) { - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentRenderStarted && - injectedProfilingHooks.markComponentRenderStarted(fiber); - } - function markComponentRenderStopped() { - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentRenderStopped && - injectedProfilingHooks.markComponentRenderStopped(); - } - function markRenderStarted(lanes) { - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markRenderStarted && - injectedProfilingHooks.markRenderStarted(lanes); - } - function markRenderStopped() { - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markRenderStopped && - injectedProfilingHooks.markRenderStopped(); - } - function markStateUpdateScheduled(fiber, lane) { - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markStateUpdateScheduled && - injectedProfilingHooks.markStateUpdateScheduled(fiber, lane); - } - function clz32Fallback(x) { - x >>>= 0; - return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; - } - function getLabelForLane(lane) { - if (lane & 1) return "SyncHydrationLane"; - if (lane & 2) return "Sync"; - if (lane & 4) return "InputContinuousHydration"; - if (lane & 8) return "InputContinuous"; - if (lane & 16) return "DefaultHydration"; - if (lane & 32) return "Default"; - if (lane & 128) return "TransitionHydration"; - if (lane & 4194048) return "Transition"; - if (lane & 62914560) return "Retry"; - if (lane & 67108864) return "SelectiveHydration"; - if (lane & 134217728) return "IdleHydration"; - if (lane & 268435456) return "Idle"; - if (lane & 536870912) return "Offscreen"; - if (lane & 1073741824) return "Deferred"; - } - function getHighestPriorityLanes(lanes) { - var pendingSyncLanes = lanes & 42; - if (0 !== pendingSyncLanes) return pendingSyncLanes; - switch (lanes & -lanes) { - case 1: - return 1; - case 2: - return 2; - case 4: - return 4; - case 8: - return 8; - case 16: - return 16; - case 32: - return 32; - case 64: - return 64; - case 128: - return 128; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return lanes & 4194048; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return lanes & 62914560; - case 67108864: - return 67108864; - case 134217728: - return 134217728; - case 268435456: - return 268435456; - case 536870912: - return 536870912; - case 1073741824: - return 0; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - lanes - ); - } - } - function getNextLanes(root, wipLanes, rootHasPendingCommit) { - var pendingLanes = root.pendingLanes; - if (0 === pendingLanes) return 0; - var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes; - root = root.warmLanes; - var nonIdlePendingLanes = pendingLanes & 134217727; - 0 !== nonIdlePendingLanes - ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = nonIdlePendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = - getHighestPriorityLanes(rootHasPendingCommit))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : rootHasPendingCommit || - ((rootHasPendingCommit = pendingLanes & ~root), - 0 !== rootHasPendingCommit && - (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); - return 0 === nextLanes - ? 0 - : 0 !== wipLanes && - wipLanes !== nextLanes && - 0 === (wipLanes & suspendedLanes) && - ((suspendedLanes = nextLanes & -nextLanes), - (rootHasPendingCommit = wipLanes & -wipLanes), - suspendedLanes >= rootHasPendingCommit || - (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) - ? wipLanes - : nextLanes; - } - function checkIfRootIsPrerendering(root, renderLanes) { - return ( - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - renderLanes) - ); - } - function computeExpirationTime(lane, currentTime) { - switch (lane) { - case 1: - case 2: - case 4: - case 8: - case 64: - return currentTime + 250; - case 16: - case 32: - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - return currentTime + 5e3; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return -1; - case 67108864: - case 134217728: - case 268435456: - case 536870912: - case 1073741824: - return -1; - default: - return ( - console.error( - "Should have found matching lanes. This is a bug in React." - ), - -1 + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + var frame = componentFrameCache.get(fn); + if (void 0 !== frame) return frame; + reentry = !0; + frame = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher = null; + previousDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = null; + disableLogs(); + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$0) { + control = x$0; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$1) { + control = x$1; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } ); - } - } - function claimNextTransitionLane() { - var lane = nextTransitionLane; - nextTransitionLane <<= 1; - 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); - return lane; - } - function claimNextRetryLane() { - var lane = nextRetryLane; - nextRetryLane <<= 1; - 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); - return lane; - } - function createLaneMap(initial) { - for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); - return laneMap; - } - function markRootUpdated$1(root, updateLane) { - root.pendingLanes |= updateLane; - 268435456 !== updateLane && - ((root.suspendedLanes = 0), - (root.pingedLanes = 0), - (root.warmLanes = 0)); - } - function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ) { - var previouslyPendingLanes = root.pendingLanes; - root.pendingLanes = remainingLanes; - root.suspendedLanes = 0; - root.pingedLanes = 0; - root.warmLanes = 0; - root.expiredLanes &= remainingLanes; - root.entangledLanes &= remainingLanes; - root.errorRecoveryDisabledLanes &= remainingLanes; - root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - for ( - remainingLanes = previouslyPendingLanes & ~remainingLanes; - 0 < remainingLanes; + var _RunInRootFrame$Deter = + RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + _RunInRootFrame$Deter = namePropDescriptor = 0; + namePropDescriptor < sampleLines.length && + !sampleLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); - ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; - expirationTimes[index] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index]; - if (null !== hiddenUpdatesForLane) + ) + namePropDescriptor++; for ( - hiddenUpdates[index] = null, index = 0; - index < hiddenUpdatesForLane.length; - index++ - ) { - var update = hiddenUpdatesForLane[index]; - null !== update && (update.lane &= -536870913); - } - remainingLanes &= ~lane; + ; + _RunInRootFrame$Deter < controlLines.length && + !controlLines[_RunInRootFrame$Deter].includes( + "DetermineComponentFrameRoot" + ); + + ) + _RunInRootFrame$Deter++; + if ( + namePropDescriptor === sampleLines.length || + _RunInRootFrame$Deter === controlLines.length + ) + for ( + namePropDescriptor = sampleLines.length - 1, + _RunInRootFrame$Deter = controlLines.length - 1; + 1 <= namePropDescriptor && + 0 <= _RunInRootFrame$Deter && + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]; + + ) + _RunInRootFrame$Deter--; + for ( + ; + 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; + namePropDescriptor--, _RunInRootFrame$Deter-- + ) + if ( + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter] + ) { + if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { + do + if ( + (namePropDescriptor--, + _RunInRootFrame$Deter--, + 0 > _RunInRootFrame$Deter || + sampleLines[namePropDescriptor] !== + controlLines[_RunInRootFrame$Deter]) + ) { + var _frame = + "\n" + + sampleLines[namePropDescriptor].replace( + " at new ", + " at " + ); + fn.displayName && + _frame.includes("") && + (_frame = _frame.replace("", fn.displayName)); + "function" === typeof fn && + componentFrameCache.set(fn, _frame); + return _frame; + } + while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); + } + break; + } + } + } finally { + (reentry = !1), + (ReactSharedInternals.H = previousDispatcher), + reenableLogs(), + (Error.prepareStackTrace = frame); } - 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); + sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(sampleLines) + : ""; + "function" === typeof fn && componentFrameCache.set(fn, sampleLines); + return sampleLines; } - function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { - root.pendingLanes |= spawnedLane; - root.suspendedLanes &= ~spawnedLane; - var spawnedLaneIndex = 31 - clz32(spawnedLane); - root.entangledLanes |= spawnedLane; - root.entanglements[spawnedLaneIndex] = - root.entanglements[spawnedLaneIndex] | - 1073741824 | - (entangledLanes & 4194090); + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && + (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); + -1 !== prevPrepareStackTrace && + (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; } - function markRootEntangled(root, entangledLanes) { - var rootEntangledLanes = (root.entangledLanes |= entangledLanes); - for (root = root.entanglements; rootEntangledLanes; ) { - var index = 31 - clz32(rootEntangledLanes), - lane = 1 << index; - (lane & entangledLanes) | (root[index] & entangledLanes) && - (root[index] |= entangledLanes); - rootEntangledLanes &= ~lane; + function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + default: + return ""; } } - function getBumpedLaneForHydrationByLane(lane) { - switch (lane) { - case 2: - lane = 1; - break; - case 8: - lane = 4; - break; - case 32: - lane = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - lane = 128; - break; - case 268435456: - lane = 134217728; - break; - default: - lane = 0; + function getStackByFiberInDevAndProd(workInProgress) { + try { + var info = ""; + do { + info += describeFiber(workInProgress); + var debugInfo = workInProgress._debugInfo; + if (debugInfo) + for (var i = debugInfo.length - 1; 0 <= i; i--) { + var entry = debugInfo[i]; + if ("string" === typeof entry.name) { + var JSCompiler_temp_const = info, + env = entry.env; + var JSCompiler_inline_result = describeBuiltInComponentFrame( + entry.name + (env ? " [" + env + "]" : "") + ); + info = JSCompiler_temp_const + JSCompiler_inline_result; + } + } + workInProgress = workInProgress.return; + } while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; } - return lane; } - function addFiberToLanesMap(root, fiber, lanes) { - if (isDevToolsPresent) - for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index = 31 - clz32(lanes), - lane = 1 << index; - root[index].add(fiber); - lanes &= ~lane; - } + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(fn) + : ""; } - function movePendingFibersToMemoized(root, lanes) { - if (isDevToolsPresent) - for ( - var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, - memoizedUpdaters = root.memoizedUpdaters; - 0 < lanes; - - ) { - var index = 31 - clz32(lanes); - root = 1 << index; - index = pendingUpdatersLaneMap[index]; - 0 < index.size && - (index.forEach(function (fiber) { - var alternate = fiber.alternate; - (null !== alternate && memoizedUpdaters.has(alternate)) || - memoizedUpdaters.add(fiber); - }), - index.clear()); - lanes &= ~root; + function getCurrentFiberOwnerNameInDevOrNull() { + if (null === current) return null; + var owner = current._debugOwner; + return null != owner ? getComponentNameFromOwner(owner) : null; + } + function getCurrentFiberStackInDev() { + if (null === current) return ""; + var workInProgress = current; + try { + var info = ""; + 6 === workInProgress.tag && (workInProgress = workInProgress.return); + switch (workInProgress.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 31: + info += describeBuiltInComponentFrame("Activity"); + break; + case 30: + case 0: + case 15: + case 1: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type + )); + break; + case 11: + workInProgress._debugOwner || + "" !== info || + (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress.type.render + )); } + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + workInProgress && + debugStack && + ("string" !== typeof debugStack && + (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), + "" !== debugStack && (info += "\n" + debugStack)); + } else if (null != workInProgress.debugStack) { + var ownerStack = workInProgress.debugStack; + (workInProgress = workInProgress.owner) && + ownerStack && + (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + var JSCompiler_inline_result = info; + } catch (x) { + JSCompiler_inline_result = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result; } - function lanesToEventPriority(lanes) { - lanes &= -lanes; - return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes - ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes - ? 0 !== (lanes & 134217727) - ? DefaultEventPriority - : IdleEventPriority - : ContinuousEventPriority - : DiscreteEventPriority; - } - function resolveUpdatePriority() { - var updatePriority = ReactDOMSharedInternals.p; - if (0 !== updatePriority) return updatePriority; - updatePriority = window.event; - return void 0 === updatePriority - ? DefaultEventPriority - : getEventPriority(updatePriority.type); - } - function runWithPriority(priority, fn) { - var previousPriority = ReactDOMSharedInternals.p; + function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { + var previousFiber = current; + setCurrentFiber(fiber); try { - return (ReactDOMSharedInternals.p = priority), fn(); + return null !== fiber && fiber._debugTask + ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) + : callback(arg0, arg1, arg2, arg3, arg4); } finally { - ReactDOMSharedInternals.p = previousPriority; + setCurrentFiber(previousFiber); } + throw Error( + "runWithFiberInDEV should never be called in production. This is a bug in React." + ); } - function detachDeletedInstance(node) { - delete node[internalInstanceKey]; - delete node[internalPropsKey]; - delete node[internalEventHandlersKey]; - delete node[internalEventHandlerListenersKey]; - delete node[internalEventHandlesSetKey]; + function setCurrentFiber(fiber) { + ReactSharedInternals.getCurrentStack = + null === fiber ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = fiber; } - function getClosestInstanceFromNode(targetNode) { - var targetInst = targetNode[internalInstanceKey]; - if (targetInst) return targetInst; - for (var parentNode = targetNode.parentNode; parentNode; ) { - if ( - (targetInst = - parentNode[internalContainerInstanceKey] || - parentNode[internalInstanceKey]) - ) { - parentNode = targetInst.alternate; - if ( - null !== targetInst.child || - (null !== parentNode && null !== parentNode.child) - ) - for ( - targetNode = getParentSuspenseInstance(targetNode); - null !== targetNode; - - ) { - if ((parentNode = targetNode[internalInstanceKey])) - return parentNode; - targetNode = getParentSuspenseInstance(targetNode); - } - return targetInst; - } - targetNode = parentNode; - parentNode = targetNode.parentNode; - } - return null; + function typeName(value) { + return ( + ("function" === typeof Symbol && + Symbol.toStringTag && + value[Symbol.toStringTag]) || + value.constructor.name || + "Object" + ); } - function getInstanceFromNode(node) { - if ( - (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) - ) { - var tag = node.tag; - if ( - 5 === tag || - 6 === tag || - 13 === tag || - 26 === tag || - 27 === tag || - 3 === tag - ) - return node; + function willCoercionThrow(value) { + try { + return testStringCoercion(value), !1; + } catch (e) { + return !0; } - return null; } - function getNodeFromInstance(inst) { - var tag = inst.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) - return inst.stateNode; - throw Error("getNodeFromInstance: Invalid argument."); + function testStringCoercion(value) { + return "" + value; } - function getResourcesFromRoot(root) { - var resources = root[internalRootNodeResourcesKey]; - resources || - (resources = root[internalRootNodeResourcesKey] = - { hoistableStyles: new Map(), hoistableScripts: new Map() }); - return resources; + function checkAttributeStringCoercion(value, attributeName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", + attributeName, + typeName(value) + ), + testStringCoercion(value) + ); } - function markNodeAsHoistable(node) { - node[internalHoistableMarker] = !0; + function checkCSSPropertyStringCoercion(value, propName) { + if (willCoercionThrow(value)) + return ( + console.error( + "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", + propName, + typeName(value) + ), + testStringCoercion(value) + ); } - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + "Capture", dependencies); + function checkFormFieldValueStringCoercion(value) { + if (willCoercionThrow(value)) + return ( + console.error( + "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", + typeName(value) + ), + testStringCoercion(value) + ); } - function registerDirectEvent(registrationName, dependencies) { - registrationNameDependencies[registrationName] && - console.error( - "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", - registrationName + function injectInternals(internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled) return !0; + if (!hook.supportsFiber) + return ( + console.error( + "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" + ), + !0 ); - registrationNameDependencies[registrationName] = dependencies; - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - "onDoubleClick" === registrationName && - (possibleRegistrationNames.ondblclick = registrationName); - for ( - registrationName = 0; - registrationName < dependencies.length; - registrationName++ - ) - allNativeEvents.add(dependencies[registrationName]); + try { + (rendererID = hook.inject(internals)), (injectedHook = hook); + } catch (err) { + console.error("React instrumentation encountered an error: %s.", err); + } + return hook.checkDCE ? !0 : !1; } - function checkControlledValueProps(tagName, props) { - hasReadOnlyValue[props.type] || - props.onChange || - props.onInput || - props.readOnly || - props.disabled || - null == props.value || - ("select" === tagName - ? console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." - ) - : console.error( - "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + function setIsStrictModeForDevtools(newIsStrictMode) { + "function" === typeof log$1 && + unstable_setDisableYieldValue(newIsStrictMode); + if (injectedHook && "function" === typeof injectedHook.setStrictMode) + try { + injectedHook.setStrictMode(rendererID, newIsStrictMode); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + console.error( + "React instrumentation encountered an error: %s", + err )); - props.onChange || - props.readOnly || - props.disabled || - null == props.checked || - console.error( - "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." - ); + } + } + function injectProfilingHooks(profilingHooks) { + injectedProfilingHooks = profilingHooks; + } + function markCommitStopped() { + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markCommitStopped && + injectedProfilingHooks.markCommitStopped(); + } + function markComponentRenderStarted(fiber) { + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentRenderStarted && + injectedProfilingHooks.markComponentRenderStarted(fiber); + } + function markComponentRenderStopped() { + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentRenderStopped && + injectedProfilingHooks.markComponentRenderStopped(); } - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) - return !0; - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) - return !1; - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) - return (validatedAttributeNameCache[attributeName] = !0); - illegalAttributeNameCache[attributeName] = !0; - console.error("Invalid attribute name: `%s`", attributeName); - return !1; + function markRenderStarted(lanes) { + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markRenderStarted && + injectedProfilingHooks.markRenderStarted(lanes); } - function getValueForAttributeOnCustomComponent(node, name, expected) { - if (isAttributeNameSafe(name)) { - if (!node.hasAttribute(name)) { - switch (typeof expected) { - case "symbol": - case "object": - return expected; - case "function": - return expected; - case "boolean": - if (!1 === expected) return expected; - } - return void 0 === expected ? void 0 : null; - } - node = node.getAttribute(name); - if ("" === node && !0 === expected) return !0; - checkAttributeStringCoercion(expected, name); - return node === "" + expected ? expected : node; - } + function markRenderStopped() { + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markRenderStopped && + injectedProfilingHooks.markRenderStopped(); } - function setValueForAttribute(node, name, value) { - if (isAttributeNameSafe(name)) - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix && "aria-" !== prefix) { - node.removeAttribute(name); - return; - } - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); - } + function markStateUpdateScheduled(fiber, lane) { + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markStateUpdateScheduled && + injectedProfilingHooks.markStateUpdateScheduled(fiber, lane); } - function setValueForKnownAttribute(node, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, "" + value); + function clz32Fallback(x) { + x >>>= 0; + return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0; + } + function getLabelForLane(lane) { + if (lane & 1) return "SyncHydrationLane"; + if (lane & 2) return "Sync"; + if (lane & 4) return "InputContinuousHydration"; + if (lane & 8) return "InputContinuous"; + if (lane & 16) return "DefaultHydration"; + if (lane & 32) return "Default"; + if (lane & 128) return "TransitionHydration"; + if (lane & 4194048) return "Transition"; + if (lane & 62914560) return "Retry"; + if (lane & 67108864) return "SelectiveHydration"; + if (lane & 134217728) return "IdleHydration"; + if (lane & 268435456) return "Idle"; + if (lane & 536870912) return "Offscreen"; + if (lane & 1073741824) return "Deferred"; + } + function getHighestPriorityLanes(lanes) { + var pendingSyncLanes = lanes & 42; + if (0 !== pendingSyncLanes) return pendingSyncLanes; + switch (lanes & -lanes) { + case 1: + return 1; + case 2: + return 2; + case 4: + return 4; + case 8: + return 8; + case 16: + return 16; + case 32: + return 32; + case 64: + return 64; + case 128: + return 128; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return lanes & 4194048; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return lanes & 62914560; + case 67108864: + return 67108864; + case 134217728: + return 134217728; + case 268435456: + return 268435456; + case 536870912: + return 536870912; + case 1073741824: + return 0; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + lanes + ); } } - function setValueForNamespacedAttribute(node, namespace, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttributeNS(namespace, name, "" + value); + function getNextLanes(root, wipLanes, rootHasPendingCommit) { + var pendingLanes = root.pendingLanes; + if (0 === pendingLanes) return 0; + var nextLanes = 0, + suspendedLanes = root.suspendedLanes, + pingedLanes = root.pingedLanes; + root = root.warmLanes; + var nonIdlePendingLanes = pendingLanes & 134217727; + 0 !== nonIdlePendingLanes + ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) + : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + 0 !== nonIdlePendingLanes + ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) + : 0 !== pingedLanes + ? (nextLanes = getHighestPriorityLanes(pingedLanes)) + : rootHasPendingCommit || + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); + return 0 === nextLanes + ? 0 + : 0 !== wipLanes && + wipLanes !== nextLanes && + 0 === (wipLanes & suspendedLanes) && + ((suspendedLanes = nextLanes & -nextLanes), + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048))) + ? wipLanes + : nextLanes; + } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } + function computeExpirationTime(lane, currentTime) { + switch (lane) { + case 1: + case 2: + case 4: + case 8: + case 64: + return currentTime + 250; + case 16: + case 32: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return currentTime + 5e3; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return -1; + case 67108864: + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1; + default: + return ( + console.error( + "Should have found matching lanes. This is a bug in React." + ), + -1 + ); } } - function disabledLog() {} - function disableLogs() { - if (0 === disabledDepth) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: !0, - enumerable: !0, - value: disabledLog, - writable: !0 - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - } - disabledDepth++; + function claimNextTransitionLane() { + var lane = nextTransitionLane; + nextTransitionLane <<= 1; + 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); + return lane; } - function reenableLogs() { - disabledDepth--; - if (0 === disabledDepth) { - var props = { configurable: !0, enumerable: !0, writable: !0 }; - Object.defineProperties(console, { - log: assign({}, props, { value: prevLog }), - info: assign({}, props, { value: prevInfo }), - warn: assign({}, props, { value: prevWarn }), - error: assign({}, props, { value: prevError }), - group: assign({}, props, { value: prevGroup }), - groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), - groupEnd: assign({}, props, { value: prevGroupEnd }) - }); - } - 0 > disabledDepth && - console.error( - "disabledDepth fell below zero. This is a bug in React. Please file an issue." - ); + function claimNextRetryLane() { + var lane = nextRetryLane; + nextRetryLane <<= 1; + 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); + return lane; } - function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; - } - return "\n" + prefix + name + suffix; + function createLaneMap(initial) { + for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); + return laneMap; } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - var frame = componentFrameCache.get(fn); - if (void 0 !== frame) return frame; - reentry = !0; - frame = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher = null; - previousDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = null; - disableLogs(); - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$0) { - control = x$0; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$1) { - control = x$1; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = - RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - _RunInRootFrame$Deter = namePropDescriptor = 0; - namePropDescriptor < sampleLines.length && - !sampleLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); + function markRootUpdated$1(root, updateLane) { + root.pendingLanes |= updateLane; + 268435456 !== updateLane && + ((root.suspendedLanes = 0), + (root.pingedLanes = 0), + (root.warmLanes = 0)); + } + function markRootFinished( + root, + finishedLanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ) { + var previouslyPendingLanes = root.pendingLanes; + root.pendingLanes = remainingLanes; + root.suspendedLanes = 0; + root.pingedLanes = 0; + root.warmLanes = 0; + root.expiredLanes &= remainingLanes; + root.entangledLanes &= remainingLanes; + root.errorRecoveryDisabledLanes &= remainingLanes; + root.shellSuspendCounter = 0; + var entanglements = root.entanglements, + expirationTimes = root.expirationTimes, + hiddenUpdates = root.hiddenUpdates; + for ( + remainingLanes = previouslyPendingLanes & ~remainingLanes; + 0 < remainingLanes; - ) - namePropDescriptor++; + ) { + var index = 31 - clz32(remainingLanes), + lane = 1 << index; + entanglements[index] = 0; + expirationTimes[index] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index]; + if (null !== hiddenUpdatesForLane) for ( - ; - _RunInRootFrame$Deter < controlLines.length && - !controlLines[_RunInRootFrame$Deter].includes( - "DetermineComponentFrameRoot" - ); + hiddenUpdates[index] = null, index = 0; + index < hiddenUpdatesForLane.length; + index++ + ) { + var update = hiddenUpdatesForLane[index]; + null !== update && (update.lane &= -536870913); + } + remainingLanes &= ~lane; + } + 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root.tag && + (root.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); + } + function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { + root.pendingLanes |= spawnedLane; + root.suspendedLanes &= ~spawnedLane; + var spawnedLaneIndex = 31 - clz32(spawnedLane); + root.entangledLanes |= spawnedLane; + root.entanglements[spawnedLaneIndex] = + root.entanglements[spawnedLaneIndex] | + 1073741824 | + (entangledLanes & 4194090); + } + function markRootEntangled(root, entangledLanes) { + var rootEntangledLanes = (root.entangledLanes |= entangledLanes); + for (root = root.entanglements; rootEntangledLanes; ) { + var index = 31 - clz32(rootEntangledLanes), + lane = 1 << index; + (lane & entangledLanes) | (root[index] & entangledLanes) && + (root[index] |= entangledLanes); + rootEntangledLanes &= ~lane; + } + } + function getBumpedLaneForHydrationByLane(lane) { + switch (lane) { + case 2: + lane = 1; + break; + case 8: + lane = 4; + break; + case 32: + lane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + lane = 128; + break; + case 268435456: + lane = 134217728; + break; + default: + lane = 0; + } + return lane; + } + function addFiberToLanesMap(root, fiber, lanes) { + if (isDevToolsPresent) + for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { + var index = 31 - clz32(lanes), + lane = 1 << index; + root[index].add(fiber); + lanes &= ~lane; + } + } + function movePendingFibersToMemoized(root, lanes) { + if (isDevToolsPresent) + for ( + var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, + memoizedUpdaters = root.memoizedUpdaters; + 0 < lanes; - ) - _RunInRootFrame$Deter++; + ) { + var index = 31 - clz32(lanes); + root = 1 << index; + index = pendingUpdatersLaneMap[index]; + 0 < index.size && + (index.forEach(function (fiber) { + var alternate = fiber.alternate; + (null !== alternate && memoizedUpdaters.has(alternate)) || + memoizedUpdaters.add(fiber); + }), + index.clear()); + lanes &= ~root; + } + } + function lanesToEventPriority(lanes) { + lanes &= -lanes; + return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes + ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes + ? 0 !== (lanes & 134217727) + ? DefaultEventPriority + : IdleEventPriority + : ContinuousEventPriority + : DiscreteEventPriority; + } + function resolveUpdatePriority() { + var updatePriority = ReactDOMSharedInternals.p; + if (0 !== updatePriority) return updatePriority; + updatePriority = window.event; + return void 0 === updatePriority + ? DefaultEventPriority + : getEventPriority(updatePriority.type); + } + function runWithPriority(priority, fn) { + var previousPriority = ReactDOMSharedInternals.p; + try { + return (ReactDOMSharedInternals.p = priority), fn(); + } finally { + ReactDOMSharedInternals.p = previousPriority; + } + } + function detachDeletedInstance(node) { + delete node[internalInstanceKey]; + delete node[internalPropsKey]; + delete node[internalEventHandlersKey]; + delete node[internalEventHandlerListenersKey]; + delete node[internalEventHandlesSetKey]; + } + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + if (targetInst) return targetInst; + for (var parentNode = targetNode.parentNode; parentNode; ) { + if ( + (targetInst = + parentNode[internalContainerInstanceKey] || + parentNode[internalInstanceKey]) + ) { + parentNode = targetInst.alternate; if ( - namePropDescriptor === sampleLines.length || - _RunInRootFrame$Deter === controlLines.length + null !== targetInst.child || + (null !== parentNode && null !== parentNode.child) ) for ( - namePropDescriptor = sampleLines.length - 1, - _RunInRootFrame$Deter = controlLines.length - 1; - 1 <= namePropDescriptor && - 0 <= _RunInRootFrame$Deter && - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]; + targetNode = getParentSuspenseInstance(targetNode); + null !== targetNode; - ) - _RunInRootFrame$Deter--; - for ( - ; - 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; - namePropDescriptor--, _RunInRootFrame$Deter-- - ) - if ( - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter] ) { - if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { - do - if ( - (namePropDescriptor--, - _RunInRootFrame$Deter--, - 0 > _RunInRootFrame$Deter || - sampleLines[namePropDescriptor] !== - controlLines[_RunInRootFrame$Deter]) - ) { - var _frame = - "\n" + - sampleLines[namePropDescriptor].replace( - " at new ", - " at " - ); - fn.displayName && - _frame.includes("") && - (_frame = _frame.replace("", fn.displayName)); - "function" === typeof fn && - componentFrameCache.set(fn, _frame); - return _frame; - } - while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); - } - break; + if ((parentNode = targetNode[internalInstanceKey])) + return parentNode; + targetNode = getParentSuspenseInstance(targetNode); } + return targetInst; } - } finally { - (reentry = !1), - (ReactSharedInternals.H = previousDispatcher), - reenableLogs(), - (Error.prepareStackTrace = frame); + targetNode = parentNode; + parentNode = targetNode.parentNode; } - sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(sampleLines) - : ""; - "function" === typeof fn && componentFrameCache.set(fn, sampleLines); - return sampleLines; + return null; } - function formatOwnerStack(error) { - var prevPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - error = error.stack; - Error.prepareStackTrace = prevPrepareStackTrace; - error.startsWith("Error: react-stack-top-frame\n") && - (error = error.slice(29)); - prevPrepareStackTrace = error.indexOf("\n"); - -1 !== prevPrepareStackTrace && - (error = error.slice(prevPrepareStackTrace + 1)); - prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame"); - -1 !== prevPrepareStackTrace && - (prevPrepareStackTrace = error.lastIndexOf( - "\n", - prevPrepareStackTrace - )); - if (-1 !== prevPrepareStackTrace) - error = error.slice(0, prevPrepareStackTrace); - else return ""; - return error; + function getInstanceFromNode(node) { + if ( + (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) + ) { + var tag = node.tag; + if ( + 5 === tag || + 6 === tag || + 13 === tag || + 26 === tag || + 27 === tag || + 3 === tag + ) + return node; + } + return null; + } + function getNodeFromInstance(inst) { + var tag = inst.tag; + if (5 === tag || 26 === tag || 27 === tag || 6 === tag) + return inst.stateNode; + throw Error("getNodeFromInstance: Invalid argument."); + } + function getResourcesFromRoot(root) { + var resources = root[internalRootNodeResourcesKey]; + resources || + (resources = root[internalRootNodeResourcesKey] = + { hoistableStyles: new Map(), hoistableScripts: new Map() }); + return resources; + } + function markNodeAsHoistable(node) { + node[internalHoistableMarker] = !0; + } + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + registrationNameDependencies[registrationName] && + console.error( + "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", + registrationName + ); + registrationNameDependencies[registrationName] = dependencies; + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + "onDoubleClick" === registrationName && + (possibleRegistrationNames.ondblclick = registrationName); + for ( + registrationName = 0; + registrationName < dependencies.length; + registrationName++ + ) + allNativeEvents.add(dependencies[registrationName]); + } + function checkControlledValueProps(tagName, props) { + hasReadOnlyValue[props.type] || + props.onChange || + props.onInput || + props.readOnly || + props.disabled || + null == props.value || + ("select" === tagName + ? console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." + ) + : console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + )); + props.onChange || + props.readOnly || + props.disabled || + null == props.checked || + console.error( + "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + ); } - function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - default: - return ""; - } + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) + return !0; + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) + return !1; + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) + return (validatedAttributeNameCache[attributeName] = !0); + illegalAttributeNameCache[attributeName] = !0; + console.error("Invalid attribute name: `%s`", attributeName); + return !1; } - function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do { - info += describeFiber(workInProgress); - var debugInfo = workInProgress._debugInfo; - if (debugInfo) - for (var i = debugInfo.length - 1; 0 <= i; i--) { - var entry = debugInfo[i]; - if ("string" === typeof entry.name) { - var JSCompiler_temp_const = info, - env = entry.env; - var JSCompiler_inline_result = describeBuiltInComponentFrame( - entry.name + (env ? " [" + env + "]" : "") - ); - info = JSCompiler_temp_const + JSCompiler_inline_result; - } - } - workInProgress = workInProgress.return; - } while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; + function getValueForAttributeOnCustomComponent(node, name, expected) { + if (isAttributeNameSafe(name)) { + if (!node.hasAttribute(name)) { + switch (typeof expected) { + case "symbol": + case "object": + return expected; + case "function": + return expected; + case "boolean": + if (!1 === expected) return expected; + } + return void 0 === expected ? void 0 : null; + } + node = node.getAttribute(name); + if ("" === node && !0 === expected) return !0; + checkAttributeStringCoercion(expected, name); + return node === "" + expected ? expected : node; } } - function describeFunctionComponentFrameWithoutLineNumber(fn) { - return (fn = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(fn) - : ""; - } - function getCurrentFiberOwnerNameInDevOrNull() { - if (null === current) return null; - var owner = current._debugOwner; - return null != owner ? getComponentNameFromOwner(owner) : null; + function setValueForAttribute(node, name, value) { + if (isAttributeNameSafe(name)) + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix && "aria-" !== prefix) { + node.removeAttribute(name); + return; + } + } + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); + } } - function getCurrentFiberStackInDev() { - if (null === current) return ""; - var workInProgress = current; - try { - var info = ""; - 6 === workInProgress.tag && (workInProgress = workInProgress.return); - switch (workInProgress.tag) { - case 26: - case 27: - case 5: - info += describeBuiltInComponentFrame(workInProgress.type); - break; - case 13: - info += describeBuiltInComponentFrame("Suspense"); - break; - case 19: - info += describeBuiltInComponentFrame("SuspenseList"); - break; - case 31: - info += describeBuiltInComponentFrame("Activity"); - break; - case 30: - case 0: - case 15: - case 1: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type - )); - break; - case 11: - workInProgress._debugOwner || - "" !== info || - (info += describeFunctionComponentFrameWithoutLineNumber( - workInProgress.type.render - )); + function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; } - for (; workInProgress; ) - if ("number" === typeof workInProgress.tag) { - var fiber = workInProgress; - workInProgress = fiber._debugOwner; - var debugStack = fiber._debugStack; - workInProgress && - debugStack && - ("string" !== typeof debugStack && - (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), - "" !== debugStack && (info += "\n" + debugStack)); - } else if (null != workInProgress.debugStack) { - var ownerStack = workInProgress.debugStack; - (workInProgress = workInProgress.owner) && - ownerStack && - (info += "\n" + formatOwnerStack(ownerStack)); - } else break; - var JSCompiler_inline_result = info; - } catch (x) { - JSCompiler_inline_result = - "\nError generating stack: " + x.message + "\n" + x.stack; + checkAttributeStringCoercion(value, name); + node.setAttribute(name, "" + value); } - return JSCompiler_inline_result; } - function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { - var previousFiber = current; - setCurrentFiber(fiber); - try { - return null !== fiber && fiber._debugTask - ? fiber._debugTask.run( - callback.bind(null, arg0, arg1, arg2, arg3, arg4) - ) - : callback(arg0, arg1, arg2, arg3, arg4); - } finally { - setCurrentFiber(previousFiber); + function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + checkAttributeStringCoercion(value, name); + node.setAttributeNS(namespace, name, "" + value); } - throw Error( - "runWithFiberInDEV should never be called in production. This is a bug in React." - ); - } - function setCurrentFiber(fiber) { - ReactSharedInternals.getCurrentStack = - null === fiber ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = fiber; } function getToStringValue(value) { switch (typeof value) { @@ -7013,6 +7013,7 @@ { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7029,6 +7030,7 @@ (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7050,6 +7052,7 @@ (revertLane = { lane: updateLane, revertLane: update.revertLane, + gesture: update.gesture, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -7371,8 +7374,8 @@ if (node.isTransition) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; - ReactSharedInternals.T._updatedFibers = new Set(); try { var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S; @@ -7382,7 +7385,15 @@ } catch (error) { onActionError(actionQueue, node, error); } finally { - (ReactSharedInternals.T = prevTransition), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), + (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && ((actionQueue = currentTransition._updatedFibers.size), @@ -7404,7 +7415,9 @@ null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then - ? (returnValue.then( + ? (ReactSharedInternals.asyncTransitions++, + returnValue.then(releaseAsyncTransition, releaseAsyncTransition), + returnValue.then( function (nextState) { onActionSuccess(actionQueue, node, nextState); }, @@ -7803,6 +7816,9 @@ workInProgressRootSkippedLanes |= hook; return prevValue; } + function releaseAsyncTransition() { + ReactSharedInternals.asyncTransitions--; + } function startTransition( fiber, queue, @@ -7817,9 +7833,9 @@ : ContinuousEventPriority; var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition._updatedFibers = new Set(); ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); - currentTransition._updatedFibers = new Set(); try { var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S; @@ -7830,6 +7846,8 @@ "object" === typeof returnValue && "function" === typeof returnValue.then ) { + ReactSharedInternals.asyncTransitions++; + returnValue.then(releaseAsyncTransition, releaseAsyncTransition); var thenableForFinishedState = chainThenableValue( returnValue, finishedState @@ -7856,6 +7874,14 @@ ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), (ReactSharedInternals.T = prevTransition), null === prevTransition && currentTransition._updatedFibers && @@ -8029,6 +8055,7 @@ var update = { lane: args, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8056,6 +8083,7 @@ var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -8112,6 +8140,7 @@ action = { lane: 2, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -12343,13 +12372,15 @@ if (5 === tag || 6 === tag) (node = node.stateNode), before - ? (9 === parent.nodeType + ? (warnForReactChildrenConflict(parent), + (9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent - ).insertBefore(node, before) - : ((before = + ).insertBefore(node, before)) + : (warnForReactChildrenConflict(parent), + (before = 9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName @@ -19360,6 +19391,30 @@ function commitTextUpdate(textInstance, oldText, newText) { textInstance.nodeValue = newText; } + function warnForReactChildrenConflict(container) { + if (!container.__reactWarnedAboutChildrenConflict) { + var props = container[internalPropsKey] || null; + if (null !== props) { + var fiber = getInstanceFromNode(container); + null !== fiber && + ("string" === typeof props.children || + "number" === typeof props.children + ? ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + })) + : null != props.dangerouslySetInnerHTML && + ((container.__reactWarnedAboutChildrenConflict = !0), + runWithFiberInDEV(fiber, function () { + console.error( + 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.' + ); + }))); + } + } + } function isSingletonScope(type) { return "head" === type; } @@ -21298,6 +21353,23 @@ contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), + disabledDepth = 0, + prevLog, + prevInfo, + prevWarn, + prevError, + prevGroup, + prevGroupCollapsed, + prevGroupEnd; + disabledLog.__reactDisabledLog = !0; + var prefix, + suffix, + reentry = !1; + var componentFrameCache = new ( + "function" === typeof WeakMap ? WeakMap : Map + )(); + var current = null, + isRendering = !1, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -21352,23 +21424,6 @@ ), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, - disabledDepth = 0, - prevLog, - prevInfo, - prevWarn, - prevError, - prevGroup, - prevGroupCollapsed, - prevGroupEnd; - disabledLog.__reactDisabledLog = !0; - var prefix, - suffix, - reentry = !1; - var componentFrameCache = new ( - "function" === typeof WeakMap ? WeakMap : Map - )(); - var current = null, - isRendering = !1, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = !1, didWarnCheckedDefaultChecked = !1, @@ -24842,11 +24897,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24883,10 +24938,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-canary-63779030-20250328", + version: "19.2.0-canary-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-63779030-20250328" + reconcilerVersion: "19.2.0-canary-040f8286-20250402" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25360,7 +25415,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js index 64f8862491c6b..591a4b1862e58 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js @@ -312,6 +312,194 @@ function popHostContext(fiber) { (pop(hostTransitionProviderCursor), (HostTransitionContext._currentValue = sharedNotPendingObject)); } +var prefix, suffix; +function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; + } + return "\n" + prefix + name + suffix; +} +var reentry = !1; +function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + reentry = !0; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function () { + try { + if (construct) { + var Fake = function () { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function () { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$1) { + control = x$1; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$2) { + control = x$2; + } + (Fake = fn()) && + "function" === typeof Fake.catch && + Fake.catch(function () {}); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = + "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && + namePropDescriptor.configurable && + Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } + ); + var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), + sampleStack = _RunInRootFrame$Deter[0], + controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), + controlLines = controlStack.split("\n"); + for ( + namePropDescriptor = RunInRootFrame = 0; + RunInRootFrame < sampleLines.length && + !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); + + ) + RunInRootFrame++; + for ( + ; + namePropDescriptor < controlLines.length && + !controlLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); + + ) + namePropDescriptor++; + if ( + RunInRootFrame === sampleLines.length || + namePropDescriptor === controlLines.length + ) + for ( + RunInRootFrame = sampleLines.length - 1, + namePropDescriptor = controlLines.length - 1; + 1 <= RunInRootFrame && + 0 <= namePropDescriptor && + sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; + + ) + namePropDescriptor--; + for ( + ; + 1 <= RunInRootFrame && 0 <= namePropDescriptor; + RunInRootFrame--, namePropDescriptor-- + ) + if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { + if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { + do + if ( + (RunInRootFrame--, + namePropDescriptor--, + 0 > namePropDescriptor || + sampleLines[RunInRootFrame] !== + controlLines[namePropDescriptor]) + ) { + var frame = + "\n" + + sampleLines[RunInRootFrame].replace(" at new ", " at "); + fn.displayName && + frame.includes("") && + (frame = frame.replace("", fn.displayName)); + return frame; + } + while (1 <= RunInRootFrame && 0 <= namePropDescriptor); + } + break; + } + } + } finally { + (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); + } + return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") + ? describeBuiltInComponentFrame(previousPrepareStackTrace) + : ""; +} +function describeFiber(fiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, !1); + case 11: + return describeNativeComponentFrame(fiber.type.render, !1); + case 1: + return describeNativeComponentFrame(fiber.type, !0); + case 31: + return describeBuiltInComponentFrame("Activity"); + default: + return ""; + } +} +function getStackByFiberInDevAndProd(workInProgress) { + try { + var info = ""; + do + (info += describeFiber(workInProgress)), + (workInProgress = workInProgress.return); + while (workInProgress); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } +} var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -581,18 +769,18 @@ function markRootFinished( 0 < remainingLanes; ) { - var index$5 = 31 - clz32(remainingLanes), - lane = 1 << index$5; - entanglements[index$5] = 0; - expirationTimes[index$5] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$5]; + var index$7 = 31 - clz32(remainingLanes), + lane = 1 << index$7; + entanglements[index$7] = 0; + expirationTimes[index$7] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$7]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$5] = null, index$5 = 0; - index$5 < hiddenUpdatesForLane.length; - index$5++ + hiddenUpdates[index$7] = null, index$7 = 0; + index$7 < hiddenUpdatesForLane.length; + index$7++ ) { - var update = hiddenUpdatesForLane[index$5]; + var update = hiddenUpdatesForLane[index$7]; null !== update && (update.lane &= -536870913); } remainingLanes &= ~lane; @@ -617,10 +805,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$6 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$6; - (lane & entangledLanes) | (root[index$6] & entangledLanes) && - (root[index$6] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -666,9 +854,9 @@ function getBumpedLaneForHydrationByLane(lane) { function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - root[index$8].add(fiber); + var index$10 = 31 - clz32(lanes), + lane = 1 << index$10; + root[index$10].add(fiber); lanes &= ~lane; } } @@ -680,16 +868,16 @@ function movePendingFibersToMemoized(root, lanes) { 0 < lanes; ) { - var index$9 = 31 - clz32(lanes); - root = 1 << index$9; - index$9 = pendingUpdatersLaneMap[index$9]; - 0 < index$9.size && - (index$9.forEach(function (fiber) { + var index$11 = 31 - clz32(lanes); + root = 1 << index$11; + index$11 = pendingUpdatersLaneMap[index$11]; + 0 < index$11.size && + (index$11.forEach(function (fiber) { var alternate = fiber.alternate; (null !== alternate && memoizedUpdaters.has(alternate)) || memoizedUpdaters.add(fiber); }), - index$9.clear()); + index$11.clear()); lanes &= ~root; } } @@ -834,8 +1022,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$10 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$10 && "aria-" !== prefix$10) { + var prefix$12 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$12 && "aria-" !== prefix$12) { node.removeAttribute(name); return; } @@ -871,194 +1059,6 @@ function setValueForNamespacedAttribute(node, namespace, name, value) { node.setAttributeNS(namespace, name, "" + value); } } -var prefix, suffix; -function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = (match && match[1]) || ""; - suffix = - -1 < x.stack.indexOf("\n at") - ? " ()" - : -1 < x.stack.indexOf("@") - ? "@unknown:0:0" - : ""; - } - return "\n" + prefix + name + suffix; -} -var reentry = !1; -function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - reentry = !0; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function () { - try { - if (construct) { - var Fake = function () { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function () { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$11) { - control = x$11; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$12) { - control = x$12; - } - (Fake = fn()) && - "function" === typeof Fake.catch && - Fake.catch(function () {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = - "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && - namePropDescriptor.configurable && - Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), - sampleStack = _RunInRootFrame$Deter[0], - controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), - controlLines = controlStack.split("\n"); - for ( - namePropDescriptor = RunInRootFrame = 0; - RunInRootFrame < sampleLines.length && - !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); - - ) - RunInRootFrame++; - for ( - ; - namePropDescriptor < controlLines.length && - !controlLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); - - ) - namePropDescriptor++; - if ( - RunInRootFrame === sampleLines.length || - namePropDescriptor === controlLines.length - ) - for ( - RunInRootFrame = sampleLines.length - 1, - namePropDescriptor = controlLines.length - 1; - 1 <= RunInRootFrame && - 0 <= namePropDescriptor && - sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; - - ) - namePropDescriptor--; - for ( - ; - 1 <= RunInRootFrame && 0 <= namePropDescriptor; - RunInRootFrame--, namePropDescriptor-- - ) - if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { - if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { - do - if ( - (RunInRootFrame--, - namePropDescriptor--, - 0 > namePropDescriptor || - sampleLines[RunInRootFrame] !== - controlLines[namePropDescriptor]) - ) { - var frame = - "\n" + - sampleLines[RunInRootFrame].replace(" at new ", " at "); - fn.displayName && - frame.includes("") && - (frame = frame.replace("", fn.displayName)); - return frame; - } - while (1 <= RunInRootFrame && 0 <= namePropDescriptor); - } - break; - } - } - } finally { - (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace); - } - return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") - ? describeBuiltInComponentFrame(previousPrepareStackTrace) - : ""; -} -function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, !1); - case 11: - return describeNativeComponentFrame(fiber.type.render, !1); - case 1: - return describeNativeComponentFrame(fiber.type, !0); - case 31: - return describeBuiltInComponentFrame("Activity"); - default: - return ""; - } -} -function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ""; - do - (info += describeFiber(workInProgress)), - (workInProgress = workInProgress.return); - while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; - } -} function getToStringValue(value) { switch (typeof value) { case "bigint": @@ -4672,6 +4672,7 @@ function updateReducerImpl(hook, current, reducer) { { lane: 0, revertLane: 0, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -4688,6 +4689,7 @@ function updateReducerImpl(hook, current, reducer) { (updateLane = { lane: 0, revertLane: update.revertLane, + gesture: null, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -4709,6 +4711,7 @@ function updateReducerImpl(hook, current, reducer) { (revertLane = { lane: updateLane, revertLane: update.revertLane, + gesture: update.gesture, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, @@ -4924,7 +4927,10 @@ function runActionStateAction(actionQueue, node) { } catch (error) { onActionError(actionQueue, node, error); } finally { - ReactSharedInternals.T = prevTransition; + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), + (ReactSharedInternals.T = prevTransition); } } else try { @@ -5298,6 +5304,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { ); } finally { (ReactDOMSharedInternals.p = previousPriority), + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), (ReactSharedInternals.T = prevTransition); } } @@ -5389,6 +5398,7 @@ function dispatchReducerAction(fiber, queue, action) { action = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5411,6 +5421,7 @@ function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { lane: lane, revertLane: 0, + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -5452,6 +5463,7 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { action = { lane: 2, revertLane: requestTransitionLane(), + gesture: null, action: action, hasEagerState: !1, eagerState: null, @@ -11043,9 +11055,9 @@ function markRootSuspended( didAttemptEntireTree && (root.warmLanes |= suspendedLanes); didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4; - didAttemptEntireTree[index$4] = -1; + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11107,9 +11119,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$2 = 31 - clz32(allEntangledLanes), - lane = 1 << index$2; - lanes |= root[index$2]; + var index$4 = 31 - clz32(allEntangledLanes), + lane = 1 << index$4; + lanes |= root[index$4]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -12176,12 +12188,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3, - expirationTime = expirationTimes[index$3]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$3] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -15905,14 +15917,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1875 = React.version; if ( - "19.2.0-canary-63779030-20250328" !== + "19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion$jscomp$inline_1875 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1875, - "19.2.0-canary-63779030-20250328" + "19.2.0-canary-040f8286-20250402" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15934,10 +15946,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_1882 = { bundleType: 0, - version: "19.2.0-canary-63779030-20250328", + version: "19.2.0-canary-040f8286-20250402", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-63779030-20250328", + reconcilerVersion: "19.2.0-canary-040f8286-20250402", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$282 = 0; @@ -16217,7 +16229,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js index f4891831b8d5a..cf81dee9e94b9 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js @@ -9031,5 +9031,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js index d500befac5ea3..bd3a5235a39a0 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js @@ -5889,4 +5889,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js index c9b87b3d42945..8666b21a09e91 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js @@ -9031,5 +9031,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js index a08815be4cba4..03526b26c84a2 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js @@ -5969,4 +5969,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js index 987d447e6f253..929b3f48361d6 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js @@ -7746,11 +7746,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react"), @@ -9420,5 +9420,5 @@ startWork(request); }); }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js index 94538ec3d32f8..34cb7f8999ce2 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js @@ -6229,12 +6229,12 @@ function abort(request, reason) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion, - "19.2.0-canary-63779030-20250328" + "19.2.0-canary-040f8286-20250402" ) ); } @@ -6381,4 +6381,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js index e4aa4986f5d64..12560a9ccf6d6 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js @@ -5867,13 +5867,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_761 = React.version; if ( - "19.2.0-canary-63779030-20250328" !== + "19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion$jscomp$inline_761 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_761 + - "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -5964,4 +5964,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js index 2283d94fa00f5..89f36d9100713 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js @@ -7769,11 +7769,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react"), @@ -9450,5 +9450,5 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js index e3b88a5fcd7f1..f642b9cf07685 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js @@ -6324,11 +6324,11 @@ function abort(request, reason) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -6485,4 +6485,4 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js index dfba6c0bc5672..2de59e5a30d2a 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js @@ -7644,11 +7644,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } function createDrainHandler(destination, request) { @@ -9313,5 +9313,5 @@ } }; }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js index 21cab8f7c64d7..fbd2bafa5055b 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js @@ -6216,11 +6216,11 @@ function abort(request, reason) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-040f8286-20250402" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-040f8286-20250402\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -6369,4 +6369,4 @@ exports.renderToPipeableStream = function (children, options) { } }; }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js index 5c77f8d4bc704..b90247b38a598 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js @@ -416,7 +416,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js index 7e086269d5d0c..1e1651a6bbcec 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js @@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js index 99d63d0e87445..096d39a433792 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js index f00f3e7ef79b1..96b382e371cd6 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-dom/package.json b/packages/next/src/compiled/react-dom/package.json index 7cc30a55d21fb..ca7f2d469a8bc 100644 --- a/packages/next/src/compiled/react-dom/package.json +++ b/packages/next/src/compiled/react-dom/package.json @@ -67,10 +67,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.27.0-canary-63779030-20250328" + "scheduler": "0.27.0-canary-040f8286-20250402" }, "peerDependencies": { - "react": "19.2.0-canary-63779030-20250328" + "react": "19.2.0-canary-040f8286-20250402" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-experimental/cjs/react.development.js b/packages/next/src/compiled/react-experimental/cjs/react.development.js index 5ee95972df1a0..e46d20f664bcc 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.development.js @@ -503,7 +503,65 @@ function useOptimistic(passthrough, reducer) { return resolveDispatcher().useOptimistic(passthrough, reducer); } + function releaseAsyncTransition() { + ReactSharedInternals.asyncTransitions--; + } + function startTransition(scope) { + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; + currentTransition._updatedFibers = new Set(); + ReactSharedInternals.T = currentTransition; + try { + var returnValue = scope(), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + (ReactSharedInternals.asyncTransitions++, + returnValue.then(releaseAsyncTransition, releaseAsyncTransition), + returnValue.then(noop, reportGlobalError)); + } catch (error) { + reportGlobalError(error); + } finally { + null === prevTransition && + currentTransition._updatedFibers && + ((scope = currentTransition._updatedFibers.size), + currentTransition._updatedFibers.clear(), + 10 < scope && + console.warn( + "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." + )), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), + (ReactSharedInternals.T = prevTransition); + } + } function noop() {} + function addTransitionType(type) { + var transition = ReactSharedInternals.T; + if (null !== transition) { + var transitionTypes = transition.types; + null === transitionTypes + ? (transition.types = [type]) + : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type); + } else + 0 === ReactSharedInternals.asyncTransitions && + console.error( + "addTransitionType can only be called inside a `startTransition()` or `startGestureTransition()` callback. It must be associated with a specific Transition." + ), + startTransition(addTransitionType.bind(null, type)); + } function enqueueTask(task) { if (null === enqueueTaskImpl) try { @@ -667,8 +725,9 @@ A: null, T: null, S: null, - V: null, + G: null, actQueue: null, + asyncTransitions: 0, isBatchingLegacy: !1, didScheduleLegacyUpdate: !1, didUsePromise: !1, @@ -1131,44 +1190,11 @@ }); return compare; }; - exports.startTransition = function (scope) { - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - currentTransition._updatedFibers = new Set(); - try { - var returnValue = scope(), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - returnValue.then(noop, reportGlobalError); - } catch (error) { - reportGlobalError(error); - } finally { - null === prevTransition && - currentTransition._updatedFibers && - ((scope = currentTransition._updatedFibers.size), - currentTransition._updatedFibers.clear(), - 10 < scope && - console.warn( - "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." - )), - (ReactSharedInternals.T = prevTransition); - } - }; + exports.startTransition = startTransition; exports.unstable_Activity = REACT_ACTIVITY_TYPE; exports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE; exports.unstable_ViewTransition = REACT_VIEW_TRANSITION_TYPE; - exports.unstable_addTransitionType = function (type) { - var pendingTransitionTypes = ReactSharedInternals.V; - null === pendingTransitionTypes - ? (ReactSharedInternals.V = [type]) - : -1 === pendingTransitionTypes.indexOf(type) && - pendingTransitionTypes.push(type); - }; + exports.unstable_addTransitionType = addTransitionType; exports.unstable_getCacheForType = function (resourceType) { var dispatcher = ReactSharedInternals.A; return dispatcher @@ -1180,12 +1206,45 @@ reason.$$typeof = REACT_POSTPONE_TYPE; throw reason; }; + exports.unstable_startGestureTransition = function ( + provider, + scope, + options + ) { + if (null == provider) + throw Error( + "A Timeline is required as the first argument to startGestureTransition." + ); + var prevTransition = ReactSharedInternals.T, + currentTransition = { types: null }; + currentTransition.gesture = provider; + currentTransition._updatedFibers = new Set(); + ReactSharedInternals.T = currentTransition; + try { + var returnValue = scope(); + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + console.error( + "Cannot use an async function in startGestureTransition. It must be able to start immediately." + ); + var onStartGestureTransitionFinish = ReactSharedInternals.G; + if (null !== onStartGestureTransitionFinish) + return onStartGestureTransitionFinish( + currentTransition, + provider, + options + ); + } catch (error) { + reportGlobalError(error); + } finally { + ReactSharedInternals.T = prevTransition; + } + return function () {}; + }; exports.unstable_useCacheRefresh = function () { return resolveDispatcher().useCacheRefresh(); }; - exports.unstable_useSwipeTransition = function (previous, current, next) { - return resolveDispatcher().useSwipeTransition(previous, current, next); - }; exports.use = function (usable) { return resolveDispatcher().use(usable); }; @@ -1267,7 +1326,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-experimental/cjs/react.production.js b/packages/next/src/compiled/react-experimental/cjs/react.production.js index 4e3255bab1994..0772fd87bf63e 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.production.js @@ -76,7 +76,7 @@ pureComponentPrototype.constructor = PureComponent; assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = !0; var isArrayImpl = Array.isArray, - ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null }, + ReactSharedInternals = { H: null, A: null, T: null, S: null, G: null }, hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, self, source, owner, props) { self = props.ref; @@ -322,7 +322,41 @@ var reportGlobalError = } console.error(error); }; +function startTransition(scope) { + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; + ReactSharedInternals.T = currentTransition; + try { + var returnValue = scope(), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + returnValue.then(noop, reportGlobalError); + } catch (error) { + reportGlobalError(error); + } finally { + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), + (ReactSharedInternals.T = prevTransition); + } +} function noop() {} +function addTransitionType(type) { + var transition = ReactSharedInternals.T; + if (null !== transition) { + var transitionTypes = transition.types; + null === transitionTypes + ? (transition.types = [type]) + : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type); + } else startTransition(addTransitionType.bind(null, type)); +} exports.Children = { map: mapChildren, forEach: function (children, forEachFunc, forEachContext) { @@ -469,35 +503,11 @@ exports.memo = function (type, compare) { compare: void 0 === compare ? null : compare }; }; -exports.startTransition = function (scope) { - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - try { - var returnValue = scope(), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - returnValue.then(noop, reportGlobalError); - } catch (error) { - reportGlobalError(error); - } finally { - ReactSharedInternals.T = prevTransition; - } -}; +exports.startTransition = startTransition; exports.unstable_Activity = REACT_ACTIVITY_TYPE; exports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE; exports.unstable_ViewTransition = REACT_VIEW_TRANSITION_TYPE; -exports.unstable_addTransitionType = function (type) { - var pendingTransitionTypes = ReactSharedInternals.V; - null === pendingTransitionTypes - ? (ReactSharedInternals.V = [type]) - : -1 === pendingTransitionTypes.indexOf(type) && - pendingTransitionTypes.push(type); -}; +exports.unstable_addTransitionType = addTransitionType; exports.unstable_getCacheForType = function (resourceType) { var dispatcher = ReactSharedInternals.A; return dispatcher ? dispatcher.getCacheForType(resourceType) : resourceType(); @@ -507,12 +517,34 @@ exports.unstable_postpone = function (reason) { reason.$$typeof = REACT_POSTPONE_TYPE; throw reason; }; +exports.unstable_startGestureTransition = function (provider, scope, options) { + if (null == provider) + throw Error( + "A Timeline is required as the first argument to startGestureTransition." + ); + var prevTransition = ReactSharedInternals.T, + currentTransition = { types: null }; + currentTransition.gesture = provider; + ReactSharedInternals.T = currentTransition; + try { + scope(); + var onStartGestureTransitionFinish = ReactSharedInternals.G; + if (null !== onStartGestureTransitionFinish) + return onStartGestureTransitionFinish( + currentTransition, + provider, + options + ); + } catch (error) { + reportGlobalError(error); + } finally { + ReactSharedInternals.T = prevTransition; + } + return function () {}; +}; exports.unstable_useCacheRefresh = function () { return ReactSharedInternals.H.useCacheRefresh(); }; -exports.unstable_useSwipeTransition = function (previous, current, next) { - return ReactSharedInternals.H.useSwipeTransition(previous, current, next); -}; exports.use = function (usable) { return ReactSharedInternals.H.use(usable); }; @@ -571,4 +603,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js index 345ffde033eb0..64dc6d87fce5a 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js @@ -468,6 +468,9 @@ function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } + function releaseAsyncTransition() { + ReactSharedInternals.asyncTransitions--; + } function noop() {} function cleanup(entryValue) { var entry = TaintRegistryValues.get(entryValue); @@ -923,8 +926,11 @@ exports.startTransition = function (scope) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; - ReactSharedInternals.T = currentTransition; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; currentTransition._updatedFibers = new Set(); + ReactSharedInternals.T = currentTransition; try { var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S; @@ -933,7 +939,9 @@ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && - returnValue.then(noop, reportGlobalError); + (ReactSharedInternals.asyncTransitions++, + returnValue.then(releaseAsyncTransition, releaseAsyncTransition), + returnValue.then(noop, reportGlobalError)); } catch (error) { reportGlobalError(error); } finally { @@ -945,6 +953,14 @@ console.warn( "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." )), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), (ReactSharedInternals.T = prevTransition); } }; @@ -976,5 +992,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.2.0-experimental-63779030-20250328"; + exports.version = "19.2.0-experimental-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js index 9118c4f1bbc2d..1e0d48502ac0d 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js @@ -521,6 +521,9 @@ exports.memo = function (type, compare) { exports.startTransition = function (scope) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = + null !== prevTransition ? prevTransition.types : null; + currentTransition.gesture = null; ReactSharedInternals.T = currentTransition; try { var returnValue = scope(), @@ -534,7 +537,10 @@ exports.startTransition = function (scope) { } catch (error) { reportGlobalError(error); } finally { - ReactSharedInternals.T = prevTransition; + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), + (ReactSharedInternals.T = prevTransition); } }; exports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE; @@ -561,4 +567,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.2.0-experimental-63779030-20250328"; +exports.version = "19.2.0-experimental-040f8286-20250402"; diff --git a/packages/next/src/compiled/react-is/package.json b/packages/next/src/compiled/react-is/package.json index 07ec91738b6f1..5f0576a7a36f7 100644 --- a/packages/next/src/compiled/react-is/package.json +++ b/packages/next/src/compiled/react-is/package.json @@ -1,6 +1,6 @@ { "name": "react-is", - "version": "19.2.0-canary-63779030-20250328", + "version": "19.2.0-canary-040f8286-20250402", "description": "Brand checking of React Elements.", "main": "index.js", "sideEffects": false, diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js index 6cc2d7a847218..c9b0dd4d5a7a5 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js @@ -2927,10 +2927,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.2.0-experimental-63779030-20250328", + version: "19.2.0-experimental-040f8286-20250402", rendererPackageName: "react-server-dom-turbopack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-63779030-20250328", + reconcilerVersion: "19.2.0-experimental-040f8286-20250402", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js index a8d30078343ed..bb032704bf41e 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js @@ -3930,7 +3930,6 @@ } }; HooksDispatcher.useEffectEvent = unsupportedHook; - HooksDispatcher.useSwipeTransition = unsupportedHook; var currentOwner = null, DefaultAsyncDispatcher = { getCacheForType: function (resourceType) { diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js index 03a3bcc879600..061167ad46c70 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js @@ -543,7 +543,6 @@ var HooksDispatcher = { } }; HooksDispatcher.useEffectEvent = unsupportedHook; -HooksDispatcher.useSwipeTransition = unsupportedHook; function unsupportedHook() { throw Error("This Hook is not supported in Server Components."); } diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js index 312a55fcd0812..66d55b882b7f8 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js @@ -4027,7 +4027,6 @@ } }; HooksDispatcher.useEffectEvent = unsupportedHook; - HooksDispatcher.useSwipeTransition = unsupportedHook; var currentOwner = null, DefaultAsyncDispatcher = { getCacheForType: function (resourceType) { diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js index 0d52d61b20ad3..e71dc3c0ae186 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js @@ -541,7 +541,6 @@ var HooksDispatcher = { } }; HooksDispatcher.useEffectEvent = unsupportedHook; -HooksDispatcher.useSwipeTransition = unsupportedHook; function unsupportedHook() { throw Error("This Hook is not supported in Server Components."); } diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js index 55253eef3f380..dbf86523dba04 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js @@ -4015,7 +4015,6 @@ } }; HooksDispatcher.useEffectEvent = unsupportedHook; - HooksDispatcher.useSwipeTransition = unsupportedHook; var currentOwner = null, DefaultAsyncDispatcher = { getCacheForType: function (resourceType) { diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js index 70431cb2bcdc6..c4f65ee471700 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js @@ -561,7 +561,6 @@ var HooksDispatcher = { } }; HooksDispatcher.useEffectEvent = unsupportedHook; -HooksDispatcher.useSwipeTransition = unsupportedHook; function unsupportedHook() { throw Error("This Hook is not supported in Server Components."); } diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json index e72f15c77b8de..7fce483fd6d1f 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json @@ -48,7 +48,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "0.0.0-experimental-63779030-20250328", - "react-dom": "0.0.0-experimental-63779030-20250328" + "react": "0.0.0-experimental-040f8286-20250402", + "react-dom": "0.0.0-experimental-040f8286-20250402" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js index 1248207c5a7e4..262ae131df53c 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js @@ -2678,10 +2678,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.2.0-canary-63779030-20250328", + version: "19.2.0-canary-040f8286-20250402", rendererPackageName: "react-server-dom-turbopack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-63779030-20250328", + reconcilerVersion: "19.2.0-canary-040f8286-20250402", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-turbopack/package.json b/packages/next/src/compiled/react-server-dom-turbopack/package.json index 4eb42419b7a93..09100de094d57 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack/package.json @@ -48,7 +48,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "19.2.0-canary-63779030-20250328", - "react-dom": "19.2.0-canary-63779030-20250328" + "react": "19.2.0-canary-040f8286-20250402", + "react-dom": "19.2.0-canary-040f8286-20250402" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js index 435c9b85eae59..01d540aff9201 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js @@ -2942,10 +2942,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.2.0-experimental-63779030-20250328", + version: "19.2.0-experimental-040f8286-20250402", rendererPackageName: "react-server-dom-webpack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-63779030-20250328", + reconcilerVersion: "19.2.0-experimental-040f8286-20250402", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js index 4f003a1b16332..72a2b706fa611 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js @@ -3937,7 +3937,6 @@ } }; HooksDispatcher.useEffectEvent = unsupportedHook; - HooksDispatcher.useSwipeTransition = unsupportedHook; var currentOwner = null, DefaultAsyncDispatcher = { getCacheForType: function (resourceType) { diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js index 8e874e7ef5b05..4434cae4682f4 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js @@ -543,7 +543,6 @@ var HooksDispatcher = { } }; HooksDispatcher.useEffectEvent = unsupportedHook; -HooksDispatcher.useSwipeTransition = unsupportedHook; function unsupportedHook() { throw Error("This Hook is not supported in Server Components."); } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js index a9e18a3506581..5c2cee843d4aa 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js @@ -4030,7 +4030,6 @@ } }; HooksDispatcher.useEffectEvent = unsupportedHook; - HooksDispatcher.useSwipeTransition = unsupportedHook; var currentOwner = null, DefaultAsyncDispatcher = { getCacheForType: function (resourceType) { diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js index 020517669ddd5..86b8ebc798ca1 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js @@ -541,7 +541,6 @@ var HooksDispatcher = { } }; HooksDispatcher.useEffectEvent = unsupportedHook; -HooksDispatcher.useSwipeTransition = unsupportedHook; function unsupportedHook() { throw Error("This Hook is not supported in Server Components."); } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js index 034131b6e07f2..a49132d3f79ca 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js @@ -4018,7 +4018,6 @@ } }; HooksDispatcher.useEffectEvent = unsupportedHook; - HooksDispatcher.useSwipeTransition = unsupportedHook; var currentOwner = null, DefaultAsyncDispatcher = { getCacheForType: function (resourceType) { diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js index c0375963fdd07..29b9bd9402201 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js @@ -561,7 +561,6 @@ var HooksDispatcher = { } }; HooksDispatcher.useEffectEvent = unsupportedHook; -HooksDispatcher.useSwipeTransition = unsupportedHook; function unsupportedHook() { throw Error("This Hook is not supported in Server Components."); } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js index aaf541cc42c0c..525d97c832fc7 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js @@ -3981,7 +3981,6 @@ } }; HooksDispatcher.useEffectEvent = unsupportedHook; - HooksDispatcher.useSwipeTransition = unsupportedHook; var currentOwner = null, DefaultAsyncDispatcher = { getCacheForType: function (resourceType) { diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js index 70bc063b4fcba..2d937279ca072 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js @@ -561,7 +561,6 @@ var HooksDispatcher = { } }; HooksDispatcher.useEffectEvent = unsupportedHook; -HooksDispatcher.useSwipeTransition = unsupportedHook; function unsupportedHook() { throw Error("This Hook is not supported in Server Components."); } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json index 59cc66e4b3210..650ac14e490b1 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json @@ -64,8 +64,8 @@ "webpack-sources": "^3.2.0" }, "peerDependencies": { - "react": "0.0.0-experimental-63779030-20250328", - "react-dom": "0.0.0-experimental-63779030-20250328", + "react": "0.0.0-experimental-040f8286-20250402", + "react-dom": "0.0.0-experimental-040f8286-20250402", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js index ee55fa04ab543..4b81191f84bf6 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js @@ -2693,10 +2693,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.2.0-canary-63779030-20250328", + version: "19.2.0-canary-040f8286-20250402", rendererPackageName: "react-server-dom-webpack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-63779030-20250328", + reconcilerVersion: "19.2.0-canary-040f8286-20250402", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-webpack/package.json b/packages/next/src/compiled/react-server-dom-webpack/package.json index 000bec518fdfc..1d29b68c0f428 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack/package.json @@ -64,8 +64,8 @@ "webpack-sources": "^3.2.0" }, "peerDependencies": { - "react": "19.2.0-canary-63779030-20250328", - "react-dom": "19.2.0-canary-63779030-20250328", + "react": "19.2.0-canary-040f8286-20250402", + "react-dom": "19.2.0-canary-040f8286-20250402", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react/cjs/react.development.js b/packages/next/src/compiled/react/cjs/react.development.js index a661a953213cf..628de0d119de2 100644 --- a/packages/next/src/compiled/react/cjs/react.development.js +++ b/packages/next/src/compiled/react/cjs/react.development.js @@ -498,6 +498,9 @@ ); return dispatcher; } + function releaseAsyncTransition() { + ReactSharedInternals.asyncTransitions--; + } function noop() {} function enqueueTask(task) { if (null === enqueueTaskImpl) @@ -660,8 +663,8 @@ A: null, T: null, S: null, - V: null, actQueue: null, + asyncTransitions: 0, isBatchingLegacy: !1, didScheduleLegacyUpdate: !1, didUsePromise: !1, @@ -1118,8 +1121,8 @@ exports.startTransition = function (scope) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; - ReactSharedInternals.T = currentTransition; currentTransition._updatedFibers = new Set(); + ReactSharedInternals.T = currentTransition; try { var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S; @@ -1128,7 +1131,9 @@ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && - returnValue.then(noop, reportGlobalError); + (ReactSharedInternals.asyncTransitions++, + returnValue.then(releaseAsyncTransition, releaseAsyncTransition), + returnValue.then(noop, reportGlobalError)); } catch (error) { reportGlobalError(error); } finally { @@ -1140,6 +1145,14 @@ console.warn( "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." )), + null !== prevTransition && + null !== currentTransition.types && + (null !== prevTransition.types && + prevTransition.types !== currentTransition.types && + console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), + (prevTransition.types = currentTransition.types)), (ReactSharedInternals.T = prevTransition); } }; @@ -1229,7 +1242,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react/cjs/react.production.js b/packages/next/src/compiled/react/cjs/react.production.js index f80c9abccb083..c813e182b7938 100644 --- a/packages/next/src/compiled/react/cjs/react.production.js +++ b/packages/next/src/compiled/react/cjs/react.production.js @@ -72,7 +72,7 @@ pureComponentPrototype.constructor = PureComponent; assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = !0; var isArrayImpl = Array.isArray, - ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null }, + ReactSharedInternals = { H: null, A: null, T: null, S: null }, hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, self, source, owner, props) { self = props.ref; @@ -472,7 +472,10 @@ exports.startTransition = function (scope) { } catch (error) { reportGlobalError(error); } finally { - ReactSharedInternals.T = prevTransition; + null !== prevTransition && + null !== currentTransition.types && + (prevTransition.types = currentTransition.types), + (ReactSharedInternals.T = prevTransition); } }; exports.unstable_useCacheRefresh = function () { @@ -538,4 +541,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/react/cjs/react.react-server.development.js b/packages/next/src/compiled/react/cjs/react.react-server.development.js index ef0cafa80f2c1..fe579cd4d7696 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.development.js @@ -811,5 +811,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.2.0-canary-63779030-20250328"; + exports.version = "19.2.0-canary-040f8286-20250402"; })(); diff --git a/packages/next/src/compiled/react/cjs/react.react-server.production.js b/packages/next/src/compiled/react/cjs/react.react-server.production.js index 06bade8a1fe9d..eb040ce97fd01 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.production.js @@ -426,4 +426,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.2.0-canary-63779030-20250328"; +exports.version = "19.2.0-canary-040f8286-20250402"; diff --git a/packages/next/src/compiled/unistore/unistore.js b/packages/next/src/compiled/unistore/unistore.js index 595cc78509efb..663a7213035c1 100644 --- a/packages/next/src/compiled/unistore/unistore.js +++ b/packages/next/src/compiled/unistore/unistore.js @@ -1 +1 @@ -(()=>{var t={477:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a{var t={812:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a=14.0.0'} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 '@storybook/instrumenter@8.6.0': resolution: {integrity: sha512-eEY/Hfa3Vj5Nv4vHRHlSqjoyW6oAKNK3rKIXfL/eawQwb7rKhzijDLG5YBH44Hh7dEPIqUp0LEdgpyIY7GXezg==} @@ -5504,8 +5504,8 @@ packages: resolution: {integrity: sha512-04T86VG0UJtiozgZkTR5sY1qM3E0Rgwqwllvyy7kFFdkV+Sv/VsPjW9sC38s9C8FtCYRL8pJZz81ey3oylpIMA==} engines: {node: '>=18.0.0'} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 storybook: ^8.6.0 typescript: '*' peerDependenciesMeta: @@ -5526,16 +5526,16 @@ packages: '@storybook/react-dom-shim@8.6.0': resolution: {integrity: sha512-5Y+vMHhcx0xnaNsLQMbkmjc3zkDn/fGBNsiLH2e4POvW3ZQvOxjoyxAsEQaKwLtFgsdCFSd2tR89F6ItYrA2JQ==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 storybook: ^8.6.0 '@storybook/react-webpack5@8.6.0': resolution: {integrity: sha512-2L9CYDPn1OL0B8K5EU/Wpo9Slg8f0vkYPaPioQnmcK3Q4SJR4JAuDVWHUtNdxhaPOkHIy887Tfrf6BEC/blMaQ==} engines: {node: '>=18.0.0'} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 storybook: ^8.6.0 typescript: '>= 4.2.x' peerDependenciesMeta: @@ -5547,8 +5547,8 @@ packages: engines: {node: '>=18.0.0'} peerDependencies: '@storybook/test': 8.6.0 - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 storybook: ^8.6.0 typescript: '>= 4.2.x' peerDependenciesMeta: @@ -5784,8 +5784,8 @@ packages: engines: {node: '>=18'} peerDependencies: '@types/react': 19.0.8 - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: '@types/react': optional: true @@ -11873,7 +11873,7 @@ packages: lucide-react@0.383.0: resolution: {integrity: sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} @@ -14357,15 +14357,23 @@ packages: resolution: {integrity: sha512-APPU8HB2uZnpl6Vt/+0AFoVYgSRtfiP6FLrZgPPTDmqSb2R4qZRbgd0A3VzIFxDt5e+Fozjx79WjLWnF69DK8g==} engines: {node: '>=16.14.0'} - react-dom@0.0.0-experimental-63779030-20250328: - resolution: {integrity: sha512-3veha+fKz1Op8R2LJaW+EvMVwdJoVFyaw4TtUh3d47HAE1Ya5k4nf/edctWRyWtpk89yNtwGwlsgKbxd5lRNWw==} + react-dom@0.0.0-experimental-040f8286-20250402: + resolution: {integrity: sha512-M4LK4RZUkpyfIvGIf2EM75pz9UVI120y6zrD+2rHH3W7MHgT3Z8IZlVHz8rkb7X41E6jRrbufguLVvbpMg8Z0g==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + + react-dom@19.2.0-canary-040f8286-20250402: + resolution: {integrity: sha512-UZxhSMYI+s/6x5xBNMYeetksY921BLQ1+2HmJeqzntEnPKJKAFUU8t4GaRmA1DJmz6hIqHLSVq/wbq5XYxg5SQ==} + peerDependencies: + react: 19.2.0-canary-040f8286-20250402 react-dom@19.2.0-canary-63779030-20250328: resolution: {integrity: sha512-/e/O3T8cpDd+0/B0hDgMoO5mdo3fg9tFAHTnbz6XvlbMVmo99lYjLHeDh3RV69zX9RjzOJ85ae0DQljPai6How==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + + react-is@19.2.0-canary-040f8286-20250402: + resolution: {integrity: sha512-lft5UDi/+NzmXPHwpNH8FOXNMj5pKmeCFsXQthJBReBiVCOqPFarSIWJffxUBYVoVfskA6PAVtV6uDjdYwEv8g==} react-is@19.2.0-canary-63779030-20250328: resolution: {integrity: sha512-6E4T+Me/8xdv8Vv2SY4NTYbB+HmoyJok+Pt2DkYP70A5PddR38EL4EUKiBhtwyBNPx+oWpVNVaYWM04yT9Ytcg==} @@ -14376,8 +14384,8 @@ packages: react-number-format@5.4.0: resolution: {integrity: sha512-NWdICrqLhI7rAS8yUeLVd6Wr4cN7UjJ9IBTS0f/a9i7UB4x4Ti70kGnksBtZ7o4Z7YRbvCMMR/jQmkoOBa/4fg==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 react-refresh@0.12.0: resolution: {integrity: sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A==} @@ -14388,7 +14396,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: '@types/react': optional: true @@ -14398,58 +14406,58 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: '@types/react': optional: true - react-server-dom-turbopack@0.0.0-experimental-63779030-20250328: - resolution: {integrity: sha512-yM9fSz9Au+gmLMe/likCXsavenwasgtAuPfeYTcvnFRtX5dGys5fIUWZOq+37NMkzZlG8VpTtQ6dj8Ta+HOYNg==} + react-server-dom-turbopack@0.0.0-experimental-040f8286-20250402: + resolution: {integrity: sha512-axwxWNrxc9BczZ1eigM0x80rjsZ0NIp+lpKNg9eOYPPBQDscSqBLPLhOMgiM99tHxsXOBPq3SCuAO+GdiOfVkQ==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 - react-server-dom-turbopack@19.2.0-canary-63779030-20250328: - resolution: {integrity: sha512-yOH0joEJTiZYAYzfiQzWN9yE3EBE/Qq4EQyVEVDtcsF2EoqAjbRJbUEDgje0hI5LN+OkwedCqilM5rMFC1pbsQ==} + react-server-dom-turbopack@19.2.0-canary-040f8286-20250402: + resolution: {integrity: sha512-rTvKHa9h4dk0m/7ecnqsrrvoCYtH18xKPWH2soae1x9ePs91PI9ch5KN1s0QfmFeOXcT6GFVZ6Q9j0nrmbb+6g==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 - react-server-dom-webpack@0.0.0-experimental-63779030-20250328: - resolution: {integrity: sha512-j8p8u3SsTqROCRLwQMxq29h07Qmi8wd52UNVxYDu5EPfom4iLXxn65WUI/mWuAp2k95IwY+2AqMuXVPucrhOdw==} + react-server-dom-webpack@0.0.0-experimental-040f8286-20250402: + resolution: {integrity: sha512-EF+sJG4C6RUwCDilKE2pdH0dL22q8mZdbcaaxHSyx2QZy8pTJUcYK6LqFH/CYenFH6pu7Z2kx/vXWJGWE+Bs7A==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 webpack: 5.98.0 - react-server-dom-webpack@19.2.0-canary-63779030-20250328: - resolution: {integrity: sha512-LCNsgHuGedJ73NVmSZtd3c3SdTd+HEcHwLSbKyBwHfqLfA7wlrziKLWsqQSdAqkU6byS0edQpcDjLzLUjFBzXQ==} + react-server-dom-webpack@19.2.0-canary-040f8286-20250402: + resolution: {integrity: sha512-np5cEYker5Uzyr6QsY+oCh17DSWjfYNuyPPH8C1dQTYqKDd29/2sutoyPR3m9pA+4xvd1mxcyOgp0o6sqRa/bw==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 webpack: 5.98.0 react-shallow-renderer@16.15.0: resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 react-ssr-prepass@1.0.8: resolution: {integrity: sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-is: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-is: 19.2.0-canary-040f8286-20250402 react-style-singleton@2.2.1: resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: '@types/react': optional: true @@ -14457,22 +14465,26 @@ packages: react-test-renderer@18.2.0: resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 react-textarea-autosize@8.5.3: resolution: {integrity: sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==} engines: {node: '>=10'} peerDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 react-virtualized@9.22.3: resolution: {integrity: sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 - react@0.0.0-experimental-63779030-20250328: - resolution: {integrity: sha512-FuK+Kb9AnQ3jSzwKTCORzB3o/ERQk/Vh1yw/JjYCDDm4ZLit2pvYUKNa4wL08LqQC3WOXRNXp/Jhq5TbFggEGA==} + react@0.0.0-experimental-040f8286-20250402: + resolution: {integrity: sha512-6JNUq2f7UAq9Mo7lRpW13931sajmdjO2fNiWtgJLxAqmfzX5Xxlrg5p2W61xdvm3LM6llU5SohR3/hlhBKRmYA==} + engines: {node: '>=0.10.0'} + + react@19.2.0-canary-040f8286-20250402: + resolution: {integrity: sha512-+yF1HPV+N1DXYtcKQVowDB1CbFSb3bfnSGN7MYFl5UQjpDdn1ZYR0+zlpCfhYtZc0jJBb+P7UaI18RTDJsK1Lw==} engines: {node: '>=0.10.0'} react@19.2.0-canary-63779030-20250328: @@ -15021,11 +15033,11 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - scheduler@0.0.0-experimental-63779030-20250328: - resolution: {integrity: sha512-ZaE3pnQqNuQrdauENUMtry4NRIeXx7KOYJEivoXY2YEbI8Dh3axvSPsIzqKcvy+wbuRFYaq2kuhNrdm+uK+qlA==} + scheduler@0.0.0-experimental-040f8286-20250402: + resolution: {integrity: sha512-ca+iYWcXvo0+YXBbiY4OcD/VlXQ5d8FhyMfBsCmqtogwdtlwrQiOcUeP6BOBQ+JX0C8XicbHUBAFPcvK5Im4qQ==} - scheduler@0.27.0-canary-63779030-20250328: - resolution: {integrity: sha512-pw2L23HhtGT8O1rtufzNjkfTGxpuhLB0X3lZISnYK8+5792jc6F7efYNAi9TEE6TKTDQ5HmAYgDMTgTMiq5QVw==} + scheduler@0.27.0-canary-040f8286-20250402: + resolution: {integrity: sha512-ckYdA6h/A7RbsPUeRUZ7xT4eb/siS/08vOFWdw/Cr6e3MO3+jk5tTuNEU5cBfFTTss8zZBnBEf/QEDNTzqn6uw==} schema-utils@2.7.1: resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} @@ -15666,8 +15678,8 @@ packages: engines: {node: '>= 16'} peerDependencies: babel-plugin-styled-components: '>= 2' - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: babel-plugin-styled-components: optional: true @@ -15681,7 +15693,7 @@ packages: peerDependencies: '@babel/core': '*' babel-plugin-macros: '*' - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: '@babel/core': optional: true @@ -15765,7 +15777,7 @@ packages: swr@2.2.4: resolution: {integrity: sha512-njiZ/4RiIhoOlAaLYDqwz5qH/KZXVilRLvomrx83HjzCWTfa+InyfAjv05PSFxnmLzZkNO9ZfvgoqzAaEI4sGQ==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 symbol-observable@1.0.1: resolution: {integrity: sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==} @@ -16562,7 +16574,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: '@types/react': optional: true @@ -16570,13 +16582,13 @@ packages: use-composed-ref@1.3.0: resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 use-isomorphic-layout-effect@1.1.2: resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: '@types/react': optional: true @@ -16585,7 +16597,7 @@ packages: resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==} peerDependencies: '@types/react': '*' - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: '@types/react': optional: true @@ -16595,7 +16607,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 peerDependenciesMeta: '@types/react': optional: true @@ -16603,7 +16615,7 @@ packages: use-sync-external-store@1.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -19416,17 +19428,17 @@ snapshots: '@emotion/memoize@0.8.1': {} - '@emotion/react@11.11.1(@types/react@19.0.8)(react@19.2.0-canary-63779030-20250328)': + '@emotion/react@11.11.1(@types/react@19.0.8)(react@19.2.0-canary-040f8286-20250402)': dependencies: '@babel/runtime': 7.22.5 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.2 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.2.0-canary-63779030-20250328) + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.2.0-canary-040f8286-20250402) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 hoist-non-react-statics: 3.3.2 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 optionalDependencies: '@types/react': 19.0.8 transitivePeerDependencies: @@ -19444,9 +19456,9 @@ snapshots: '@emotion/unitless@0.8.1': {} - '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.2.0-canary-63779030-20250328)': + '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.2.0-canary-040f8286-20250402)': dependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 '@emotion/utils@1.2.1': {} @@ -20990,17 +21002,23 @@ snapshots: transitivePeerDependencies: - supports-color + '@mdx-js/react@2.2.1(react@19.2.0-canary-040f8286-20250402)': + dependencies: + '@types/mdx': 2.0.3 + '@types/react': 19.0.8 + react: 19.2.0-canary-040f8286-20250402 + '@mdx-js/react@2.2.1(react@19.2.0-canary-63779030-20250328)': dependencies: '@types/mdx': 2.0.3 '@types/react': 19.0.8 react: 19.2.0-canary-63779030-20250328 - '@mdx-js/react@3.1.0(@types/react@19.0.8)(react@19.2.0-canary-63779030-20250328)': + '@mdx-js/react@3.1.0(@types/react@19.0.8)(react@19.2.0-canary-040f8286-20250402)': dependencies: '@types/mdx': 2.0.3 '@types/react': 19.0.8 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 '@module-federation/error-codes@0.11.1': {} @@ -21724,12 +21742,12 @@ snapshots: '@storybook/addon-docs@8.6.0(@types/react@19.0.8)(storybook@8.6.0(prettier@3.3.3))': dependencies: - '@mdx-js/react': 3.1.0(@types/react@19.0.8)(react@19.2.0-canary-63779030-20250328) - '@storybook/blocks': 8.6.0(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3)) + '@mdx-js/react': 3.1.0(@types/react@19.0.8)(react@19.2.0-canary-040f8286-20250402) + '@storybook/blocks': 8.6.0(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3)) '@storybook/csf-plugin': 8.6.0(storybook@8.6.0(prettier@3.3.3)) - '@storybook/react-dom-shim': 8.6.0(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3)) - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + '@storybook/react-dom-shim': 8.6.0(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3)) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) storybook: 8.6.0(prettier@3.3.3) ts-dedent: 2.2.0 transitivePeerDependencies: @@ -21794,14 +21812,14 @@ snapshots: - '@swc/helpers' - webpack - '@storybook/blocks@8.6.0(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3))': + '@storybook/blocks@8.6.0(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3))': dependencies: - '@storybook/icons': 1.3.0(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328) + '@storybook/icons': 1.3.0(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402) storybook: 8.6.0(prettier@3.3.3) ts-dedent: 2.2.0 optionalDependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) '@storybook/builder-webpack5@8.6.0(@rspack/core@1.3.0(@swc/helpers@0.5.15))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': dependencies: @@ -21880,10 +21898,10 @@ snapshots: '@storybook/global@5.0.0': {} - '@storybook/icons@1.3.0(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)': + '@storybook/icons@1.3.0(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)': dependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) '@storybook/instrumenter@8.6.0(storybook@8.6.0(prettier@3.3.3))': dependencies: @@ -21895,17 +21913,17 @@ snapshots: dependencies: storybook: 8.6.0(prettier@3.3.3) - '@storybook/preset-react-webpack@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': + '@storybook/preset-react-webpack@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': dependencies: '@storybook/core-webpack': 8.6.0(storybook@8.6.0(prettier@3.3.3)) - '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.8.2)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)) '@types/semver': 7.5.6 find-up: 5.0.0 magic-string: 0.30.17 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 react-docgen: 7.1.0 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) resolve: 1.22.8 semver: 7.6.3 storybook: 8.6.0(prettier@3.3.3) @@ -21939,19 +21957,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@storybook/react-dom-shim@8.6.0(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3))': + '@storybook/react-dom-shim@8.6.0(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3))': dependencies: - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) storybook: 8.6.0(prettier@3.3.3) - '@storybook/react-webpack5@8.6.0(@rspack/core@1.3.0(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': + '@storybook/react-webpack5@8.6.0(@rspack/core@1.3.0(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': dependencies: '@storybook/builder-webpack5': 8.6.0(@rspack/core@1.3.0(@swc/helpers@0.5.15))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) - '@storybook/preset-react-webpack': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) - '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + '@storybook/preset-react-webpack': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) storybook: 8.6.0(prettier@3.3.3) optionalDependencies: typescript: 5.8.2 @@ -21964,16 +21982,16 @@ snapshots: - uglify-js - webpack-cli - '@storybook/react@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': + '@storybook/react@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': dependencies: '@storybook/components': 8.6.0(storybook@8.6.0(prettier@3.3.3)) '@storybook/global': 5.0.0 '@storybook/manager-api': 8.6.0(storybook@8.6.0(prettier@3.3.3)) '@storybook/preview-api': 8.6.0(storybook@8.6.0(prettier@3.3.3)) - '@storybook/react-dom-shim': 8.6.0(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(storybook@8.6.0(prettier@3.3.3)) + '@storybook/react-dom-shim': 8.6.0(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(storybook@8.6.0(prettier@3.3.3)) '@storybook/theming': 8.6.0(storybook@8.6.0(prettier@3.3.3)) - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) storybook: 8.6.0(prettier@3.3.3) optionalDependencies: '@storybook/test': 8.6.0(storybook@8.6.0(prettier@3.3.3)) @@ -22247,13 +22265,13 @@ snapshots: lodash: 4.17.21 redent: 3.0.0 - '@testing-library/react@15.0.7(@types/react@19.0.8)(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)': + '@testing-library/react@15.0.7(@types/react@19.0.8)(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)': dependencies: '@babel/runtime': 7.22.5 '@testing-library/dom': 10.1.0 '@types/react-dom': 19.0.3(@types/react@19.0.8) - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) optionalDependencies: '@types/react': 19.0.8 @@ -27944,7 +27962,7 @@ snapshots: hoist-non-react-statics@3.3.2: dependencies: - react-is: 19.2.0-canary-63779030-20250328 + react-is: 19.2.0-canary-040f8286-20250402 homedir-polyfill@1.0.3: dependencies: @@ -32833,25 +32851,25 @@ snapshots: dependencies: ansi-regex: 5.0.1 ansi-styles: 5.2.0 - react-is: 19.2.0-canary-63779030-20250328 + react-is: 19.2.0-canary-040f8286-20250402 pretty-format@29.5.0: dependencies: '@jest/schemas': 29.4.3 ansi-styles: 5.2.0 - react-is: 19.2.0-canary-63779030-20250328 + react-is: 19.2.0-canary-040f8286-20250402 pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 19.2.0-canary-63779030-20250328 + react-is: 19.2.0-canary-040f8286-20250402 pretty-format@30.0.0-alpha.6: dependencies: '@jest/schemas': 30.0.0-alpha.6 ansi-styles: 5.2.0 - react-is: 19.2.0-canary-63779030-20250328 + react-is: 19.2.0-canary-040f8286-20250402 pretty-ms@7.0.0: dependencies: @@ -32914,7 +32932,7 @@ snapshots: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react-is: 19.2.0-canary-63779030-20250328 + react-is: 19.2.0-canary-040f8286-20250402 property-information@5.6.0: dependencies: @@ -33121,15 +33139,22 @@ snapshots: transitivePeerDependencies: - supports-color - react-dom@0.0.0-experimental-63779030-20250328(react@19.2.0-canary-63779030-20250328): + react-dom@0.0.0-experimental-040f8286-20250402(react@19.2.0-canary-040f8286-20250402): dependencies: - react: 19.2.0-canary-63779030-20250328 - scheduler: 0.27.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + scheduler: 0.27.0-canary-040f8286-20250402 + + react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402): + dependencies: + react: 19.2.0-canary-040f8286-20250402 + scheduler: 0.27.0-canary-040f8286-20250402 react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328): dependencies: react: 19.2.0-canary-63779030-20250328 - scheduler: 0.27.0-canary-63779030-20250328 + scheduler: 0.27.0-canary-040f8286-20250402 + + react-is@19.2.0-canary-040f8286-20250402: {} react-is@19.2.0-canary-63779030-20250328: {} @@ -33162,48 +33187,48 @@ snapshots: optionalDependencies: '@types/react': 19.0.8 - react-server-dom-turbopack@0.0.0-experimental-63779030-20250328(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328): + react-server-dom-turbopack@0.0.0-experimental-040f8286-20250402(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) - react-server-dom-turbopack@19.2.0-canary-63779030-20250328(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328): + react-server-dom-turbopack@19.2.0-canary-040f8286-20250402(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) - react-server-dom-webpack@0.0.0-experimental-63779030-20250328(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): + react-server-dom-webpack@0.0.0-experimental-040f8286-20250402(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) webpack: 5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-server-dom-webpack@19.2.0-canary-63779030-20250328(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): + react-server-dom-webpack@19.2.0-canary-040f8286-20250402(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) webpack: 5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-shallow-renderer@16.15.0(react@19.2.0-canary-63779030-20250328): + react-shallow-renderer@16.15.0(react@19.2.0-canary-040f8286-20250402): dependencies: object-assign: 4.1.1 - react: 19.2.0-canary-63779030-20250328 - react-is: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-is: 19.2.0-canary-040f8286-20250402 - react-ssr-prepass@1.0.8(react-is@19.2.0-canary-63779030-20250328)(react@19.2.0-canary-63779030-20250328): + react-ssr-prepass@1.0.8(react-is@19.2.0-canary-63779030-20250328)(react@19.2.0-canary-040f8286-20250402): dependencies: object-is: 1.0.2 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 react-is: 19.2.0-canary-63779030-20250328 react-style-singleton@2.2.1(@types/react@19.0.8)(react@19.2.0-canary-63779030-20250328): @@ -33215,12 +33240,12 @@ snapshots: optionalDependencies: '@types/react': 19.0.8 - react-test-renderer@18.2.0(react@19.2.0-canary-63779030-20250328): + react-test-renderer@18.2.0(react@19.2.0-canary-040f8286-20250402): dependencies: - react: 19.2.0-canary-63779030-20250328 - react-is: 19.2.0-canary-63779030-20250328 - react-shallow-renderer: 16.15.0(react@19.2.0-canary-63779030-20250328) - scheduler: 0.27.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 + react-is: 19.2.0-canary-040f8286-20250402 + react-shallow-renderer: 16.15.0(react@19.2.0-canary-040f8286-20250402) + scheduler: 0.27.0-canary-040f8286-20250402 react-textarea-autosize@8.5.3(@types/react@19.0.8)(react@19.2.0-canary-63779030-20250328): dependencies: @@ -33231,18 +33256,20 @@ snapshots: transitivePeerDependencies: - '@types/react' - react-virtualized@9.22.3(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328): + react-virtualized@9.22.3(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402): dependencies: '@babel/runtime': 7.22.5 clsx: 1.1.1 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) react-lifecycles-compat: 3.0.4 - react@0.0.0-experimental-63779030-20250328: {} + react@0.0.0-experimental-040f8286-20250402: {} + + react@19.2.0-canary-040f8286-20250402: {} react@19.2.0-canary-63779030-20250328: {} @@ -34002,9 +34029,9 @@ snapshots: dependencies: xmlchars: 2.2.0 - scheduler@0.0.0-experimental-63779030-20250328: {} + scheduler@0.0.0-experimental-040f8286-20250402: {} - scheduler@0.27.0-canary-63779030-20250328: {} + scheduler@0.27.0-canary-040f8286-20250402: {} schema-utils@2.7.1: dependencies: @@ -34761,7 +34788,7 @@ snapshots: dependencies: inline-style-parser: 0.1.1 - styled-components@6.0.0-rc.3(react-dom@19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328))(react@19.2.0-canary-63779030-20250328): + styled-components@6.0.0-rc.3(react-dom@19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402))(react@19.2.0-canary-040f8286-20250402): dependencies: '@babel/cli': 7.21.5(@babel/core@7.22.5) '@babel/core': 7.22.5 @@ -34776,8 +34803,8 @@ snapshots: '@emotion/unitless': 0.8.1 css-to-react-native: 3.2.0 postcss: 8.4.31 - react: 19.2.0-canary-63779030-20250328 - react-dom: 19.2.0-canary-63779030-20250328(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + react-dom: 19.2.0-canary-040f8286-20250402(react@19.2.0-canary-040f8286-20250402) shallowequal: 1.1.0 stylis: 4.2.0 tslib: 2.5.3 @@ -34789,10 +34816,10 @@ snapshots: postcss: 7.0.32 postcss-load-plugins: 2.3.0 - styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-63779030-20250328): + styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-040f8286-20250402): dependencies: client-only: 0.0.1 - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 optionalDependencies: '@babel/core': 7.22.5 babel-plugin-macros: 3.1.0 @@ -34888,11 +34915,11 @@ snapshots: '@swc/counter': 0.1.3 webpack: 5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2) - swr@2.2.4(react@19.2.0-canary-63779030-20250328): + swr@2.2.4(react@19.2.0-canary-040f8286-20250402): dependencies: client-only: 0.0.1 - react: 19.2.0-canary-63779030-20250328 - use-sync-external-store: 1.2.0(react@19.2.0-canary-63779030-20250328) + react: 19.2.0-canary-040f8286-20250402 + use-sync-external-store: 1.2.0(react@19.2.0-canary-040f8286-20250402) symbol-observable@1.0.1: {} @@ -35691,9 +35718,9 @@ snapshots: unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 - unistore@3.4.1(react@19.2.0-canary-63779030-20250328): + unistore@3.4.1(react@19.2.0-canary-040f8286-20250402): optionalDependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 universal-github-app-jwt@1.1.1: dependencies: @@ -35819,9 +35846,9 @@ snapshots: optionalDependencies: '@types/react': 19.0.8 - use-sync-external-store@1.2.0(react@19.2.0-canary-63779030-20250328): + use-sync-external-store@1.2.0(react@19.2.0-canary-040f8286-20250402): dependencies: - react: 19.2.0-canary-63779030-20250328 + react: 19.2.0-canary-040f8286-20250402 util-deprecate@1.0.2: {}