diff --git a/py_neuromodulation/gui/backend/app_backend.py b/py_neuromodulation/gui/backend/app_backend.py index 25b9425c..d4726f4c 100644 --- a/py_neuromodulation/gui/backend/app_backend.py +++ b/py_neuromodulation/gui/backend/app_backend.py @@ -79,6 +79,11 @@ def __init__( StaticFiles(directory=PYNM_DIR / "gui" / "frontend", html=True), name="static", ) + # self.mount( + # "/", + # StaticFiles(directory=PYNM_DIR / "gui" / "frontend", html=True), + # name="frontend", + # ) self.websocket_manager = WebsocketManager() self.pynm_state = app_pynm.PyNMState() diff --git a/py_neuromodulation/gui/backend/app_manager.py b/py_neuromodulation/gui/backend/app_manager.py index 92ddf8fb..d9803723 100644 --- a/py_neuromodulation/gui/backend/app_manager.py +++ b/py_neuromodulation/gui/backend/app_manager.py @@ -14,7 +14,6 @@ if TYPE_CHECKING: from multiprocessing.synchronize import Event - # Shared memory configuration ARRAY_SIZE = 1000 # Adjust based on your needs diff --git a/py_neuromodulation/gui/frontend/assets/index-B53U6dwc.js b/py_neuromodulation/gui/frontend/assets/index-DwZQ1oSq.js similarity index 99% rename from py_neuromodulation/gui/frontend/assets/index-B53U6dwc.js rename to py_neuromodulation/gui/frontend/assets/index-DwZQ1oSq.js index 50701447..8dcaea23 100644 --- a/py_neuromodulation/gui/frontend/assets/index-B53U6dwc.js +++ b/py_neuromodulation/gui/frontend/assets/index-DwZQ1oSq.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); -import { g as getDefaultExportFromCjs, r as requirePlotlyBasic_min } from "./plotly-DTCwMlpS.js"; +import { g as getDefaultExportFromCjs, r as requirePlotlyBasic_min } from "./plotly-BzXJqN3C.js"; function _mergeNamespaces(n, m) { for (var i = 0; i < m.length; i++) { const e = m[i]; @@ -169,7 +169,7 @@ function requireReact_production() { pureComponentPrototype.constructor = PureComponent; assign2(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = true; - var isArrayImpl = Array.isArray, ReactSharedInternals = { H: null, A: null, T: null, S: null }, hasOwnProperty2 = Object.prototype.hasOwnProperty; + var isArrayImpl = Array.isArray, ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null }, hasOwnProperty2 = Object.prototype.hasOwnProperty; function ReactElement(type, key, self2, source, owner, props) { self2 = props.ref; return { @@ -384,8 +384,11 @@ function requireReact_production() { react_production.StrictMode = REACT_STRICT_MODE_TYPE; react_production.Suspense = REACT_SUSPENSE_TYPE; react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; - react_production.act = function() { - throw Error("act(...) is not supported in production builds of React."); + react_production.__COMPILER_RUNTIME = { + __proto__: null, + c: function(size) { + return ReactSharedInternals.H.useMemoCache(size); + } }; react_production.cache = function(fn2) { return function() { @@ -497,8 +500,13 @@ function requireReact_production() { react_production.useDeferredValue = function(value, initialValue) { return ReactSharedInternals.H.useDeferredValue(value, initialValue); }; - react_production.useEffect = function(create2, deps) { - return ReactSharedInternals.H.useEffect(create2, deps); + react_production.useEffect = function(create2, createDeps, update) { + var dispatcher = ReactSharedInternals.H; + if ("function" === typeof update) + throw Error( + "useEffect CRUD overload is not enabled in this build of React." + ); + return dispatcher.useEffect(create2, createDeps); }; react_production.useId = function() { return ReactSharedInternals.H.useId(); @@ -537,7 +545,7 @@ function requireReact_production() { react_production.useTransition = function() { return ReactSharedInternals.H.useTransition(); }; - react_production.version = "19.0.0"; + react_production.version = "19.1.0"; return react_production; } var hasRequiredReact; @@ -618,7 +626,7 @@ function requireScheduler_production() { return localDate.now() - initialTime; }; } - var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null; + var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, needsPaint = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null; function advanceTimers(currentTime) { for (var timer = peek2(timerQueue); null !== timer; ) { if (null === timer.callback) pop(timerQueue); @@ -633,7 +641,7 @@ function requireScheduler_production() { advanceTimers(currentTime); if (!isHostCallbackScheduled) if (null !== peek2(taskQueue)) - isHostCallbackScheduled = true, requestHostCallback(); + isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline()); else { var firstTimer = peek2(timerQueue); null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); @@ -641,9 +649,10 @@ function requireScheduler_production() { } var isMessageLoopRunning = false, taskTimeoutID = -1, frameInterval = 5, startTime = -1; function shouldYieldToHost() { - return exports.unstable_now() - startTime < frameInterval ? false : true; + return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true; } function performWorkUntilDeadline() { + needsPaint = false; if (isMessageLoopRunning) { var currentTime = exports.unstable_now(); startTime = currentTime; @@ -713,9 +722,6 @@ function requireScheduler_production() { schedulePerformWorkUntilDeadline = function() { localSetTimeout(performWorkUntilDeadline, 0); }; - function requestHostCallback() { - isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline()); - } function requestHostTimeout(callback, ms) { taskTimeoutID = localSetTimeout(function() { callback(exports.unstable_now()); @@ -730,9 +736,6 @@ function requireScheduler_production() { exports.unstable_cancelCallback = function(task) { task.callback = null; }; - exports.unstable_continueExecution = function() { - isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, requestHostCallback()); - }; exports.unstable_forceFrameRate = function(fps) { 0 > fps || 125 < fps ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" @@ -741,9 +744,6 @@ function requireScheduler_production() { exports.unstable_getCurrentPriorityLevel = function() { return currentPriorityLevel; }; - exports.unstable_getFirstCallbackNode = function() { - return peek2(taskQueue); - }; exports.unstable_next = function(eventHandler) { switch (currentPriorityLevel) { case 1: @@ -762,9 +762,8 @@ function requireScheduler_production() { currentPriorityLevel = previousPriorityLevel; } }; - exports.unstable_pauseExecution = function() { - }; exports.unstable_requestPaint = function() { + needsPaint = true; }; exports.unstable_runWithPriority = function(priorityLevel, eventHandler) { switch (priorityLevel) { @@ -813,7 +812,7 @@ function requireScheduler_production() { expirationTime: timeout, sortIndex: -1 }; - options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek2(taskQueue) && priorityLevel === peek2(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, requestHostCallback())); + options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek2(taskQueue) && priorityLevel === peek2(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline()))); return priorityLevel; }; exports.unstable_shouldYield = shouldYieldToHost; @@ -996,7 +995,7 @@ function requireReactDom_production() { reactDom_production.useFormStatus = function() { return ReactSharedInternals.H.useHostTransitionStatus(); }; - reactDom_production.version = "19.0.0"; + reactDom_production.version = "19.1.0"; return reactDom_production; } var hasRequiredReactDom; @@ -1045,194 +1044,6 @@ function requireReactDomClient_production() { function isValidContainer(node2) { return !(!node2 || 1 !== node2.nodeType && 9 !== node2.nodeType && 11 !== node2.nodeType); } - var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"); - var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); - var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; - function getIteratorFn(maybeIterable) { - if (null === maybeIterable || "object" !== typeof maybeIterable) return null; - maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; - return "function" === typeof maybeIterable ? maybeIterable : null; - } - var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); - function getComponentNameFromType(type) { - if (null == type) return null; - if ("function" === typeof type) - return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; - if ("string" === typeof type) return type; - switch (type) { - case REACT_FRAGMENT_TYPE: - return "Fragment"; - case REACT_PORTAL_TYPE: - return "Portal"; - case REACT_PROFILER_TYPE: - return "Profiler"; - case REACT_STRICT_MODE_TYPE: - return "StrictMode"; - case REACT_SUSPENSE_TYPE: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - } - if ("object" === typeof type) - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - return (type.displayName || "Context") + ".Provider"; - case REACT_CONSUMER_TYPE: - return (type._context.displayName || "Context") + ".Consumer"; - case REACT_FORWARD_REF_TYPE: - var innerType = type.render; - type = type.displayName; - type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); - return type; - case REACT_MEMO_TYPE: - return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; - case REACT_LAZY_TYPE: - innerType = type._payload; - type = type._init; - try { - return getComponentNameFromType(type(innerType)); - } catch (x) { - } - } - return null; - } - var ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, assign2 = Object.assign, prefix2, suffix; - function describeBuiltInComponentFrame(name2) { - if (void 0 === prefix2) - try { - throw Error(); - } catch (x) { - var match2 = x.stack.trim().match(/\n( *(at )?)/); - prefix2 = match2 && match2[1] || ""; - suffix = -1 < x.stack.indexOf("\n at") ? " ()" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : ""; - } - return "\n" + prefix2 + name2 + suffix; - } - var reentry = false; - function describeNativeComponentFrame(fn2, construct) { - if (!fn2 || reentry) return ""; - reentry = true; - 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(fn2, [], Fake); - } else { - try { - Fake.call(); - } catch (x$0) { - control = x$0; - } - fn2.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$1) { - control = x$1; - } - (Fake = fn2()) && "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 "); - fn2.displayName && frame.includes("") && (frame = frame.replace("", fn2.displayName)); - return frame; - } - while (1 <= RunInRootFrame && 0 <= namePropDescriptor); - } - break; - } - } - } finally { - reentry = false, Error.prepareStackTrace = previousPrepareStackTrace; - } - return (previousPrepareStackTrace = fn2 ? fn2.displayName || fn2.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 fiber = describeNativeComponentFrame(fiber.type, false), fiber; - case 11: - return fiber = describeNativeComponentFrame(fiber.type.render, false), fiber; - case 1: - return fiber = describeNativeComponentFrame(fiber.type, true), fiber; - default: - return ""; - } - } - function getStackByFiberInDevAndProd(workInProgress2) { - try { - var info = ""; - do - info += describeFiber(workInProgress2), workInProgress2 = workInProgress2.return; - while (workInProgress2); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; - } - } function getNearestMountedFiber(fiber) { var node2 = fiber, nearestMounted = fiber; if (fiber.alternate) for (; node2.return; ) node2 = node2.return; @@ -1285,36 +1096,36 @@ function requireReactDomClient_production() { } if (a.return !== b.return) a = parentA, b = parentB; else { - for (var didFindChild = false, child$2 = parentA.child; child$2; ) { - if (child$2 === a) { + for (var didFindChild = false, child$0 = parentA.child; child$0; ) { + if (child$0 === a) { didFindChild = true; a = parentA; b = parentB; break; } - if (child$2 === b) { + if (child$0 === b) { didFindChild = true; b = parentA; a = parentB; break; } - child$2 = child$2.sibling; + child$0 = child$0.sibling; } if (!didFindChild) { - for (child$2 = parentB.child; child$2; ) { - if (child$2 === a) { + for (child$0 = parentB.child; child$0; ) { + if (child$0 === a) { didFindChild = true; a = parentB; b = parentA; break; } - if (child$2 === b) { + if (child$0 === b) { didFindChild = true; b = parentB; a = parentA; break; } - child$2 = child$2.sibling; + child$0 = child$0.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -1334,7 +1145,61 @@ function requireReactDomClient_production() { } return null; } - var isArrayImpl = Array.isArray, ReactDOMSharedInternals = ReactDOM2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, sharedNotPendingObject = { + var assign2 = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_ACTIVITY_TYPE = Symbol.for("react.activity"); + var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) return null; + maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return (type.displayName || "Context") + ".Provider"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); + return type; + case REACT_MEMO_TYPE: + return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) { + } + } + return null; + } + var isArrayImpl = Array.isArray, ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, sharedNotPendingObject = { pending: false, data: null, method: null, @@ -1356,29 +1221,28 @@ function requireReactDomClient_production() { push(rootInstanceStackCursor, nextRootInstance); push(contextFiberStackCursor, fiber); push(contextStackCursor, null); - fiber = nextRootInstance.nodeType; - switch (fiber) { + switch (nextRootInstance.nodeType) { case 9: case 11: - nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) ? (nextRootInstance = nextRootInstance.namespaceURI) ? getOwnHostContext(nextRootInstance) : 0 : 0; + fiber = (fiber = nextRootInstance.documentElement) ? (fiber = fiber.namespaceURI) ? getOwnHostContext(fiber) : 0 : 0; break; default: - if (fiber = 8 === fiber ? nextRootInstance.parentNode : nextRootInstance, nextRootInstance = fiber.tagName, fiber = fiber.namespaceURI) - fiber = getOwnHostContext(fiber), nextRootInstance = getChildHostContextProd(fiber, nextRootInstance); + if (fiber = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI) + nextRootInstance = getOwnHostContext(nextRootInstance), fiber = getChildHostContextProd(nextRootInstance, fiber); else - switch (nextRootInstance) { + switch (fiber) { case "svg": - nextRootInstance = 1; + fiber = 1; break; case "math": - nextRootInstance = 2; + fiber = 2; break; default: - nextRootInstance = 0; + fiber = 0; } } pop(contextStackCursor); - push(contextStackCursor, nextRootInstance); + push(contextStackCursor, fiber); } function popHostContainer() { pop(contextStackCursor); @@ -1396,18 +1260,6 @@ function requireReactDomClient_production() { hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor), HostTransitionContext._currentValue = sharedNotPendingObject); } var hasOwnProperty2 = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, requestPaint = Scheduler.unstable_requestPaint, now = Scheduler.unstable_now, getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel, ImmediatePriority = Scheduler.unstable_ImmediatePriority, UserBlockingPriority = Scheduler.unstable_UserBlockingPriority, NormalPriority$1 = Scheduler.unstable_NormalPriority, LowPriority = Scheduler.unstable_LowPriority, IdlePriority = Scheduler.unstable_IdlePriority, log$1 = Scheduler.log, unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue, rendererID = null, injectedHook = null; - function onCommitRoot(root2) { - if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) - try { - injectedHook.onCommitFiberRoot( - rendererID, - root2, - void 0, - 128 === (root2.current.flags & 128) - ); - } catch (err) { - } - } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode); if (injectedHook && "function" === typeof injectedHook.setStrictMode) @@ -1421,7 +1273,7 @@ function requireReactDomClient_production() { x >>>= 0; return 0 === x ? 32 : 31 - (log(x) / LN2 | 0) | 0; } - var nextTransitionLane = 128, nextRetryLane = 4194304; + var nextTransitionLane = 256, nextRetryLane = 4194304; function getHighestPriorityLanes(lanes) { var pendingSyncLanes = lanes & 42; if (0 !== pendingSyncLanes) return pendingSyncLanes; @@ -1441,6 +1293,7 @@ function requireReactDomClient_production() { case 64: return 64; case 128: + return 128; case 256: case 512: case 1024: @@ -1455,7 +1308,7 @@ function requireReactDomClient_production() { case 524288: case 1048576: case 2097152: - return lanes & 4194176; + return lanes & 4194048; case 4194304: case 8388608: case 16777216: @@ -1475,14 +1328,14 @@ function requireReactDomClient_production() { return lanes; } } - function getNextLanes(root2, wipLanes) { + function getNextLanes(root2, wipLanes, rootHasPendingCommit) { var pendingLanes = root2.pendingLanes; if (0 === pendingLanes) return 0; - var nextLanes = 0, suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes, warmLanes = root2.warmLanes; - root2 = 0 !== root2.finishedLanes; + var nextLanes = 0, suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes; + root2 = root2.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; - 0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : root2 || (warmLanes = nonIdlePendingLanes & ~warmLanes, 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : root2 || (warmLanes = pendingLanes & ~warmLanes, 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); - return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, warmLanes = wipLanes & -wipLanes, suspendedLanes >= warmLanes || 32 === suspendedLanes && 0 !== (warmLanes & 4194176)) ? wipLanes : nextLanes; + 0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root2, 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(root2, renderLanes2) { return 0 === (root2.pendingLanes & ~(root2.suspendedLanes & ~root2.pingedLanes) & renderLanes2); @@ -1493,10 +1346,10 @@ function requireReactDomClient_production() { case 2: case 4: case 8: + case 64: return currentTime + 250; case 16: case 32: - case 64: case 128: case 256: case 512: @@ -1531,7 +1384,7 @@ function requireReactDomClient_production() { function claimNextTransitionLane() { var lane = nextTransitionLane; nextTransitionLane <<= 1; - 0 === (nextTransitionLane & 4194176) && (nextTransitionLane = 128); + 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); return lane; } function claimNextRetryLane() { @@ -1560,13 +1413,13 @@ function requireReactDomClient_production() { root2.shellSuspendCounter = 0; var entanglements = root2.entanglements, expirationTimes = root2.expirationTimes, hiddenUpdates = root2.hiddenUpdates; for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index$7 = 31 - clz32(remainingLanes), lane = 1 << index$7; - entanglements[index$7] = 0; - expirationTimes[index$7] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$7]; + var index$5 = 31 - clz32(remainingLanes), lane = 1 << index$5; + entanglements[index$5] = 0; + expirationTimes[index$5] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$5]; if (null !== hiddenUpdatesForLane) - for (hiddenUpdates[index$7] = null, index$7 = 0; index$7 < hiddenUpdatesForLane.length; index$7++) { - var update = hiddenUpdatesForLane[index$7]; + for (hiddenUpdates[index$5] = null, index$5 = 0; index$5 < hiddenUpdatesForLane.length; index$5++) { + var update = hiddenUpdatesForLane[index$5]; null !== update && (update.lane &= -536870913); } remainingLanes &= ~lane; @@ -1579,16 +1432,55 @@ function requireReactDomClient_production() { root2.suspendedLanes &= ~spawnedLane; var spawnedLaneIndex = 31 - clz32(spawnedLane); root2.entangledLanes |= spawnedLane; - root2.entanglements[spawnedLaneIndex] = root2.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 4194218; + root2.entanglements[spawnedLaneIndex] = root2.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 4194090; } function markRootEntangled(root2, entangledLanes) { var rootEntangledLanes = root2.entangledLanes |= entangledLanes; for (root2 = root2.entanglements; rootEntangledLanes; ) { - var index$8 = 31 - clz32(rootEntangledLanes), lane = 1 << index$8; - lane & entangledLanes | root2[index$8] & entangledLanes && (root2[index$8] |= entangledLanes); + var index$6 = 31 - clz32(rootEntangledLanes), lane = 1 << index$6; + lane & entangledLanes | root2[index$6] & entangledLanes && (root2[index$6] |= 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 lanesToEventPriority(lanes) { lanes &= -lanes; return 2 < lanes ? 8 < lanes ? 0 !== (lanes & 134217727) ? 32 : 268435456 : 8 : 2; @@ -1664,7 +1556,7 @@ function requireReactDomClient_production() { for (registrationName = 0; registrationName < dependencies.length; registrationName++) allNativeEvents.add(dependencies[registrationName]); } - var canUseDOM = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), VALID_ATTRIBUTE_NAME_REGEX = RegExp( + var VALID_ATTRIBUTE_NAME_REGEX = RegExp( "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$" ), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}; function isAttributeNameSafe(attributeName) { @@ -1687,8 +1579,8 @@ function requireReactDomClient_production() { node2.removeAttribute(name2); return; case "boolean": - var prefix$10 = name2.toLowerCase().slice(0, 5); - if ("data-" !== prefix$10 && "aria-" !== prefix$10) { + var prefix$8 = name2.toLowerCase().slice(0, 5); + if ("data-" !== prefix$8 && "aria-" !== prefix$8) { node2.removeAttribute(name2); return; } @@ -1724,6 +1616,145 @@ function requireReactDomClient_production() { node2.setAttributeNS(namespace, name2, "" + value); } } + var prefix2, suffix; + function describeBuiltInComponentFrame(name2) { + if (void 0 === prefix2) + try { + throw Error(); + } catch (x) { + var match2 = x.stack.trim().match(/\n( *(at )?)/); + prefix2 = match2 && match2[1] || ""; + suffix = -1 < x.stack.indexOf("\n at") ? " ()" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : ""; + } + return "\n" + prefix2 + name2 + suffix; + } + var reentry = false; + function describeNativeComponentFrame(fn2, construct) { + if (!fn2 || reentry) return ""; + reentry = true; + 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(fn2, [], Fake); + } else { + try { + Fake.call(); + } catch (x$9) { + control = x$9; + } + fn2.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x$10) { + control = x$10; + } + (Fake = fn2()) && "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 "); + fn2.displayName && frame.includes("") && (frame = frame.replace("", fn2.displayName)); + return frame; + } + while (1 <= RunInRootFrame && 0 <= namePropDescriptor); + } + break; + } + } + } finally { + reentry = false, Error.prepareStackTrace = previousPrepareStackTrace; + } + return (previousPrepareStackTrace = fn2 ? fn2.displayName || fn2.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, false); + case 11: + return describeNativeComponentFrame(fiber.type.render, false); + case 1: + return describeNativeComponentFrame(fiber.type, true); + case 31: + return describeBuiltInComponentFrame("Activity"); + default: + return ""; + } + } + function getStackByFiberInDevAndProd(workInProgress2) { + try { + var info = ""; + do + info += describeFiber(workInProgress2), workInProgress2 = workInProgress2.return; + while (workInProgress2); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } function getToStringValue(value) { switch (typeof value) { case "bigint": @@ -2125,7 +2156,7 @@ function requireReactDomClient_production() { ); return stateNode; } - var passiveBrowserEventsSupported = false; + var canUseDOM = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), passiveBrowserEventsSupported = false; if (canUseDOM) try { var options = {}; @@ -2457,17 +2488,17 @@ function requireReactDomClient_production() { } var isInputEventSupported = false; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$283; + var JSCompiler_inline_result$jscomp$282; if (canUseDOM) { - var isSupported$jscomp$inline_418 = "oninput" in document; - if (!isSupported$jscomp$inline_418) { - var element$jscomp$inline_419 = document.createElement("div"); - element$jscomp$inline_419.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_418 = "function" === typeof element$jscomp$inline_419.oninput; + var isSupported$jscomp$inline_417 = "oninput" in document; + if (!isSupported$jscomp$inline_417) { + var element$jscomp$inline_418 = document.createElement("div"); + element$jscomp$inline_418.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_417 = "function" === typeof element$jscomp$inline_418.oninput; } - JSCompiler_inline_result$jscomp$283 = isSupported$jscomp$inline_418; - } else JSCompiler_inline_result$jscomp$283 = false; - isInputEventSupported = JSCompiler_inline_result$jscomp$283 && (!document.documentMode || 9 < document.documentMode); + JSCompiler_inline_result$jscomp$282 = isSupported$jscomp$inline_417; + } else JSCompiler_inline_result$jscomp$282 = false; + isInputEventSupported = JSCompiler_inline_result$jscomp$282 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { activeElement$1 && (activeElement$1.detachEvent("onpropertychange", handlePropertyChange), activeElementInst$1 = activeElement$1 = null); @@ -2563,45 +2594,6 @@ function requireReactDomClient_production() { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); return nodeName && ("input" === nodeName && ("text" === elem.type || "search" === elem.type || "tel" === elem.type || "url" === elem.type || "password" === elem.type) || "textarea" === nodeName || "true" === elem.contentEditable); } - function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if (curFocusedElem !== containerInfo && containerInfo && containerInfo.ownerDocument && containsNode(containerInfo.ownerDocument.documentElement, containerInfo)) { - if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo)) { - if (priorSelectionInformation = priorSelectionRange.start, curFocusedElem = priorSelectionRange.end, void 0 === curFocusedElem && (curFocusedElem = priorSelectionInformation), "selectionStart" in containerInfo) - containerInfo.selectionStart = priorSelectionInformation, containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - ); - else if (curFocusedElem = (priorSelectionInformation = containerInfo.ownerDocument || document) && priorSelectionInformation.defaultView || window, curFocusedElem.getSelection) { - curFocusedElem = curFocusedElem.getSelection(); - var length2 = containerInfo.textContent.length, start2 = Math.min(priorSelectionRange.start, length2); - priorSelectionRange = void 0 === priorSelectionRange.end ? start2 : Math.min(priorSelectionRange.end, length2); - !curFocusedElem.extend && start2 > priorSelectionRange && (length2 = priorSelectionRange, priorSelectionRange = start2, start2 = length2); - length2 = getNodeForCharacterOffset(containerInfo, start2); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length2 && endMarker && (1 !== curFocusedElem.rangeCount || curFocusedElem.anchorNode !== length2.node || curFocusedElem.anchorOffset !== length2.offset || curFocusedElem.focusNode !== endMarker.node || curFocusedElem.focusOffset !== endMarker.offset) && (priorSelectionInformation = priorSelectionInformation.createRange(), priorSelectionInformation.setStart(length2.node, length2.offset), curFocusedElem.removeAllRanges(), start2 > priorSelectionRange ? (curFocusedElem.addRange(priorSelectionInformation), curFocusedElem.extend(endMarker.node, endMarker.offset)) : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), curFocusedElem.addRange(priorSelectionInformation))); - } - } - priorSelectionInformation = []; - for (curFocusedElem = containerInfo; curFocusedElem = curFocusedElem.parentNode; ) - 1 === curFocusedElem.nodeType && priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for (containerInfo = 0; containerInfo < priorSelectionInformation.length; containerInfo++) - curFocusedElem = priorSelectionInformation[containerInfo], curFocusedElem.element.scrollLeft = curFocusedElem.left, curFocusedElem.element.scrollTop = curFocusedElem.top; - } - } var skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, activeElementInst = null, lastSelection = null, mouseDown = false; function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) { var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : 9 === nativeEventTarget.nodeType ? nativeEventTarget : nativeEventTarget.ownerDocument; @@ -2644,13 +2636,33 @@ function requireReactDomClient_production() { return prefixedEventNames[eventName] = prefixMap[styleProp]; return eventName; } - var ANIMATION_END = getVendorPrefixedEventName("animationend"), ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"), ANIMATION_START = getVendorPrefixedEventName("animationstart"), TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"), TRANSITION_START = getVendorPrefixedEventName("transitionstart"), TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"), TRANSITION_END = getVendorPrefixedEventName("transitionend"), topLevelEventsToReactNames = /* @__PURE__ */ new Map(), simpleEventPluginEvents = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split( + var ANIMATION_END = getVendorPrefixedEventName("animationend"), ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"), ANIMATION_START = getVendorPrefixedEventName("animationstart"), TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"), TRANSITION_START = getVendorPrefixedEventName("transitionstart"), TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"), TRANSITION_END = getVendorPrefixedEventName("transitionend"), topLevelEventsToReactNames = /* @__PURE__ */ new Map(), simpleEventPluginEvents = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split( " " ); + simpleEventPluginEvents.push("scrollEnd"); function registerSimpleEvent(domEventName, reactName) { topLevelEventsToReactNames.set(domEventName, reactName); registerTwoPhaseEvent(reactName, [domEventName]); } + var CapturedStacks = /* @__PURE__ */ new WeakMap(); + function createCapturedValueAtFiber(value, source) { + if ("object" === typeof value && null !== value) { + var existing = CapturedStacks.get(value); + if (void 0 !== existing) return existing; + source = { + value, + source, + stack: getStackByFiberInDevAndProd(source) + }; + CapturedStacks.set(value, source); + return source; + } + return { + value, + source, + stack: getStackByFiberInDevAndProd(source) + }; + } var concurrentQueues = [], concurrentQueuesIndex = 0, concurrentlyUpdatedLanes = 0; function finishQueueingConcurrentUpdates() { for (var endIndex = concurrentQueuesIndex, i = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i < endIndex; ) { @@ -2694,7 +2706,7 @@ function requireReactDomClient_production() { null !== alternate && (alternate.lanes |= lane); for (var isHidden = false, parent = sourceFiber.return; null !== parent; ) parent.childLanes |= lane, alternate = parent.alternate, null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && (sourceFiber = parent.stateNode, null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = true)), sourceFiber = parent, parent = parent.return; - isHidden && null !== update && 3 === sourceFiber.tag && (parent = sourceFiber.stateNode, isHidden = 31 - clz32(lane), parent = parent.hiddenUpdates, sourceFiber = parent[isHidden], null === sourceFiber ? parent[isHidden] = [update] : sourceFiber.push(update), update.lane = lane | 536870912); + return 3 === sourceFiber.tag ? (parent = sourceFiber.stateNode, isHidden && null !== update && (isHidden = 31 - clz32(lane), sourceFiber = parent.hiddenUpdates, alternate = sourceFiber[isHidden], null === alternate ? sourceFiber[isHidden] = [update] : alternate.push(update), update.lane = lane | 536870912), parent) : null; } function getRootForUpdatedFiber(sourceFiber) { if (50 < nestedUpdateCount) @@ -2703,24 +2715,143 @@ function requireReactDomClient_production() { sourceFiber = parent, parent = sourceFiber.return; return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; } - var emptyContextObject = {}, CapturedStacks = /* @__PURE__ */ new WeakMap(); - function createCapturedValueAtFiber(value, source) { - if ("object" === typeof value && null !== value) { - var existing = CapturedStacks.get(value); - if (void 0 !== existing) return existing; - source = { - value, - source, - stack: getStackByFiberInDevAndProd(source) - }; - CapturedStacks.set(value, source); - return source; - } - return { - value, - source, - stack: getStackByFiberInDevAndProd(source) + var emptyContextObject = {}; + function FiberNode(tag, pendingProps, key, mode) { + this.tag = tag; + this.key = key; + this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null; + this.index = 0; + this.refCleanup = this.ref = null; + this.pendingProps = pendingProps; + this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null; + this.mode = mode; + this.subtreeFlags = this.flags = 0; + this.deletions = null; + this.childLanes = this.lanes = 0; + this.alternate = null; + } + function createFiberImplClass(tag, pendingProps, key, mode) { + return new FiberNode(tag, pendingProps, key, mode); + } + function shouldConstruct(Component) { + Component = Component.prototype; + return !(!Component || !Component.isReactComponent); + } + function createWorkInProgress(current2, pendingProps) { + var workInProgress2 = current2.alternate; + null === workInProgress2 ? (workInProgress2 = createFiberImplClass( + current2.tag, + pendingProps, + current2.key, + current2.mode + ), workInProgress2.elementType = current2.elementType, workInProgress2.type = current2.type, workInProgress2.stateNode = current2.stateNode, workInProgress2.alternate = current2, current2.alternate = workInProgress2) : (workInProgress2.pendingProps = pendingProps, workInProgress2.type = current2.type, workInProgress2.flags = 0, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null); + workInProgress2.flags = current2.flags & 65011712; + workInProgress2.childLanes = current2.childLanes; + workInProgress2.lanes = current2.lanes; + workInProgress2.child = current2.child; + workInProgress2.memoizedProps = current2.memoizedProps; + workInProgress2.memoizedState = current2.memoizedState; + workInProgress2.updateQueue = current2.updateQueue; + pendingProps = current2.dependencies; + workInProgress2.dependencies = null === pendingProps ? null : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext }; + workInProgress2.sibling = current2.sibling; + workInProgress2.index = current2.index; + workInProgress2.ref = current2.ref; + workInProgress2.refCleanup = current2.refCleanup; + return workInProgress2; + } + function resetWorkInProgress(workInProgress2, renderLanes2) { + workInProgress2.flags &= 65011714; + var current2 = workInProgress2.alternate; + null === current2 ? (workInProgress2.childLanes = 0, workInProgress2.lanes = renderLanes2, workInProgress2.child = null, workInProgress2.subtreeFlags = 0, workInProgress2.memoizedProps = null, workInProgress2.memoizedState = null, workInProgress2.updateQueue = null, workInProgress2.dependencies = null, workInProgress2.stateNode = null) : (workInProgress2.childLanes = current2.childLanes, workInProgress2.lanes = current2.lanes, workInProgress2.child = current2.child, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.memoizedProps = current2.memoizedProps, workInProgress2.memoizedState = current2.memoizedState, workInProgress2.updateQueue = current2.updateQueue, workInProgress2.type = current2.type, renderLanes2 = current2.dependencies, workInProgress2.dependencies = null === renderLanes2 ? null : { + lanes: renderLanes2.lanes, + firstContext: renderLanes2.firstContext + }); + return workInProgress2; + } + function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes) { + var fiberTag = 0; + owner = type; + if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1); + else if ("string" === typeof type) + fiberTag = isHostHoistableType( + type, + pendingProps, + contextStackCursor.current + ) ? 26 : "html" === type || "head" === type || "body" === type ? 27 : 5; + else + a: switch (type) { + case REACT_ACTIVITY_TYPE: + return type = createFiberImplClass(31, pendingProps, key, mode), type.elementType = REACT_ACTIVITY_TYPE, type.lanes = lanes, type; + case REACT_FRAGMENT_TYPE: + return createFiberFromFragment(pendingProps.children, mode, lanes, key); + case REACT_STRICT_MODE_TYPE: + fiberTag = 8; + mode |= 24; + break; + case REACT_PROFILER_TYPE: + return type = createFiberImplClass(12, pendingProps, key, mode | 2), type.elementType = REACT_PROFILER_TYPE, type.lanes = lanes, type; + case REACT_SUSPENSE_TYPE: + return type = createFiberImplClass(13, pendingProps, key, mode), type.elementType = REACT_SUSPENSE_TYPE, type.lanes = lanes, type; + case REACT_SUSPENSE_LIST_TYPE: + return type = createFiberImplClass(19, pendingProps, key, mode), type.elementType = REACT_SUSPENSE_LIST_TYPE, type.lanes = lanes, type; + default: + if ("object" === typeof type && null !== type) + switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + case REACT_CONTEXT_TYPE: + fiberTag = 10; + break a; + case REACT_CONSUMER_TYPE: + fiberTag = 9; + break a; + case REACT_FORWARD_REF_TYPE: + fiberTag = 11; + break a; + case REACT_MEMO_TYPE: + fiberTag = 14; + break a; + case REACT_LAZY_TYPE: + fiberTag = 16; + owner = null; + break a; + } + fiberTag = 29; + pendingProps = Error( + formatProdErrorMessage(130, null === type ? "null" : typeof type, "") + ); + owner = null; + } + key = createFiberImplClass(fiberTag, pendingProps, key, mode); + key.elementType = type; + key.type = owner; + key.lanes = lanes; + return key; + } + function createFiberFromFragment(elements, mode, lanes, key) { + elements = createFiberImplClass(7, elements, key, mode); + elements.lanes = lanes; + return elements; + } + function createFiberFromText(content, mode, lanes) { + content = createFiberImplClass(6, content, null, mode); + content.lanes = lanes; + return content; + } + function createFiberFromPortal(portal, mode, lanes) { + mode = createFiberImplClass( + 4, + null !== portal.children ? portal.children : [], + portal.key, + mode + ); + mode.lanes = lanes; + mode.stateNode = { + containerInfo: portal.containerInfo, + pendingChildren: null, + implementation: portal.implementation }; + return mode; } var forkStack = [], forkStackIndex = 0, treeForkProvider = null, treeForkCount = 0, idStack = [], idStackIndex = 0, treeContextProvider = null, treeContextId = 1, treeContextOverflow = ""; function pushTreeFork(workInProgress2, totalChildren) { @@ -2823,14 +2954,14 @@ function requireReactDomClient_production() { function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { - case 3: - case 27: - rootOrSingletonContext = true; - return; case 5: case 13: rootOrSingletonContext = false; return; + case 27: + case 3: + rootOrSingletonContext = true; + return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -2838,640 +2969,187 @@ function requireReactDomClient_production() { function popHydrationState(fiber) { if (fiber !== hydrationParentFiber) return false; if (!isHydrating) return popToNextHostParent(fiber), isHydrating = true, false; - var shouldClear = false, JSCompiler_temp; - if (JSCompiler_temp = 3 !== fiber.tag && 27 !== fiber.tag) { - if (JSCompiler_temp = 5 === fiber.tag) + var tag = fiber.tag, JSCompiler_temp; + if (JSCompiler_temp = 3 !== tag && 27 !== tag) { + if (JSCompiler_temp = 5 === tag) JSCompiler_temp = fiber.type, JSCompiler_temp = !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) || shouldSetTextContent(fiber.type, fiber.memoizedProps); JSCompiler_temp = !JSCompiler_temp; } - JSCompiler_temp && (shouldClear = true); - shouldClear && nextHydratableInstance && throwOnHydrationMismatch(fiber); + JSCompiler_temp && nextHydratableInstance && throwOnHydrationMismatch(fiber); popToNextHostParent(fiber); - if (13 === fiber.tag) { + if (13 === tag) { fiber = fiber.memoizedState; fiber = null !== fiber ? fiber.dehydrated : null; if (!fiber) throw Error(formatProdErrorMessage(317)); a: { fiber = fiber.nextSibling; - for (shouldClear = 0; fiber; ) { + for (tag = 0; fiber; ) { if (8 === fiber.nodeType) if (JSCompiler_temp = fiber.data, "/$" === JSCompiler_temp) { - if (0 === shouldClear) { + if (0 === tag) { nextHydratableInstance = getNextHydratable(fiber.nextSibling); break a; } - shouldClear--; + tag--; } else - "$" !== JSCompiler_temp && "$!" !== JSCompiler_temp && "$?" !== JSCompiler_temp || shouldClear++; + "$" !== JSCompiler_temp && "$!" !== JSCompiler_temp && "$?" !== JSCompiler_temp || tag++; fiber = fiber.nextSibling; } nextHydratableInstance = null; } } else - nextHydratableInstance = hydrationParentFiber ? getNextHydratable(fiber.stateNode.nextSibling) : null; + 27 === tag ? (tag = nextHydratableInstance, isSingletonScope(fiber.type) ? (fiber = previousHydratableOnEnteringScopedSingleton, previousHydratableOnEnteringScopedSingleton = null, nextHydratableInstance = fiber) : nextHydratableInstance = tag) : nextHydratableInstance = hydrationParentFiber ? getNextHydratable(fiber.stateNode.nextSibling) : null; return true; } function resetHydrationState() { nextHydratableInstance = hydrationParentFiber = null; isHydrating = false; } + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), hydrationErrors = null); + return queuedErrors; + } function queueHydrationError(error) { null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error); } - var SuspenseException = Error(formatProdErrorMessage(460)), SuspenseyCommitException = Error(formatProdErrorMessage(474)), noopSuspenseyCommitThenable = { then: function() { - } }; - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; + var valueCursor = createCursor(null), currentlyRenderingFiber$1 = null, lastContextDependency = null; + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue); + context._currentValue = nextValue; } - function noop$3() { + function popProvider(context) { + context._currentValue = valueCursor.current; + pop(valueCursor); } - function trackUsedThenable(thenableState2, thenable, index2) { - index2 = thenableState2[index2]; - void 0 === index2 ? thenableState2.push(thenable) : index2 !== thenable && (thenable.then(noop$3, noop$3), thenable = index2); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - thenableState2 = thenable.reason; - if (thenableState2 === SuspenseException) - throw Error(formatProdErrorMessage(483)); - throw thenableState2; - default: - if ("string" === typeof thenable.status) thenable.then(noop$3, noop$3); - else { - thenableState2 = workInProgressRoot; - if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter) - throw Error(formatProdErrorMessage(482)); - thenableState2 = thenable; - thenableState2.status = "pending"; - thenableState2.then( - function(fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function(error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - thenableState2 = thenable.reason; - if (thenableState2 === SuspenseException) - throw Error(formatProdErrorMessage(483)); - throw thenableState2; - } - suspendedThenable = thenable; - throw SuspenseException; + function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2); + if (parent === propagationRoot) break; + parent = parent.return; } } - var suspendedThenable = null; - function getSuspendedThenable() { - if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); - var thenable = suspendedThenable; - suspendedThenable = null; - return thenable; - } - var thenableState$1 = null, thenableIndexCounter$1 = 0; - function unwrapThenable(thenable) { - var index2 = thenableIndexCounter$1; - thenableIndexCounter$1 += 1; - null === thenableState$1 && (thenableState$1 = []); - return trackUsedThenable(thenableState$1, thenable, index2); - } - function coerceRef(workInProgress2, element) { - element = element.props.ref; - workInProgress2.ref = void 0 !== element ? element : null; - } - function throwOnInvalidObjectType(returnFiber, newChild) { - if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) - throw Error(formatProdErrorMessage(525)); - returnFiber = Object.prototype.toString.call(newChild); - throw Error( - formatProdErrorMessage( - 31, - "[object Object]" === returnFiber ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber - ) - ); - } - function resolveLazy(lazyType) { - var init = lazyType._init; - return init(lazyType._payload); - } - function createChildReconciler(shouldTrackSideEffects) { - function deleteChild(returnFiber, childToDelete) { - if (shouldTrackSideEffects) { - var deletions = returnFiber.deletions; - null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete); - } - } - function deleteRemainingChildren(returnFiber, currentFirstChild) { - if (!shouldTrackSideEffects) return null; - for (; null !== currentFirstChild; ) - deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling; - return null; - } - function mapRemainingChildren(currentFirstChild) { - for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; ) - null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling; - return existingChildren; - } - function useFiber(fiber, pendingProps) { - fiber = createWorkInProgress(fiber, pendingProps); - fiber.index = 0; - fiber.sibling = null; - return fiber; - } - function placeChild(newFiber, lastPlacedIndex, newIndex) { - newFiber.index = newIndex; - if (!shouldTrackSideEffects) - return newFiber.flags |= 1048576, lastPlacedIndex; - newIndex = newFiber.alternate; - if (null !== newIndex) - return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 33554434, lastPlacedIndex) : newIndex; - newFiber.flags |= 33554434; - return lastPlacedIndex; - } - function placeSingleChild(newFiber) { - shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 33554434); - return newFiber; - } - function updateTextNode(returnFiber, current2, textContent, lanes) { - if (null === current2 || 6 !== current2.tag) - return current2 = createFiberFromText(textContent, returnFiber.mode, lanes), current2.return = returnFiber, current2; - current2 = useFiber(current2, textContent); - current2.return = returnFiber; - return current2; - } - function updateElement(returnFiber, current2, element, lanes) { - var elementType = element.type; - if (elementType === REACT_FRAGMENT_TYPE) - return updateFragment( - returnFiber, - current2, - element.props.children, - lanes, - element.key - ); - if (null !== current2 && (current2.elementType === elementType || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current2.type)) - return current2 = useFiber(current2, element.props), coerceRef(current2, element), current2.return = returnFiber, current2; - current2 = createFiberFromTypeAndProps( - element.type, - element.key, - element.props, - null, - returnFiber.mode, - lanes - ); - coerceRef(current2, element); - current2.return = returnFiber; - return current2; - } - function updatePortal(returnFiber, current2, portal, lanes) { - if (null === current2 || 4 !== current2.tag || current2.stateNode.containerInfo !== portal.containerInfo || current2.stateNode.implementation !== portal.implementation) - return current2 = createFiberFromPortal(portal, returnFiber.mode, lanes), current2.return = returnFiber, current2; - current2 = useFiber(current2, portal.children || []); - current2.return = returnFiber; - return current2; - } - function updateFragment(returnFiber, current2, fragment, lanes, key) { - if (null === current2 || 7 !== current2.tag) - return current2 = createFiberFromFragment( - fragment, - returnFiber.mode, - lanes, - key - ), current2.return = returnFiber, current2; - current2 = useFiber(current2, fragment); - current2.return = returnFiber; - return current2; - } - function createChild(returnFiber, newChild, lanes) { - if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild) - return newChild = createFiberFromText( - "" + newChild, - returnFiber.mode, - lanes - ), newChild.return = returnFiber, newChild; - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return lanes = createFiberFromTypeAndProps( - newChild.type, - newChild.key, - newChild.props, - null, - returnFiber.mode, - lanes - ), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes; - case REACT_PORTAL_TYPE: - return newChild = createFiberFromPortal( - newChild, - returnFiber.mode, - lanes - ), newChild.return = returnFiber, newChild; - case REACT_LAZY_TYPE: - var init = newChild._init; - newChild = init(newChild._payload); - return createChild(returnFiber, newChild, lanes); - } - if (isArrayImpl(newChild) || getIteratorFn(newChild)) - return newChild = createFiberFromFragment( - newChild, - returnFiber.mode, - lanes, - null - ), newChild.return = returnFiber, newChild; - if ("function" === typeof newChild.then) - return createChild(returnFiber, unwrapThenable(newChild), lanes); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return createChild( - returnFiber, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); - } - return null; - } - function updateSlot(returnFiber, oldFiber, newChild, lanes) { - var key = null !== oldFiber ? oldFiber.key : null; - if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild) - return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null; - case REACT_PORTAL_TYPE: - return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null; - case REACT_LAZY_TYPE: - return key = newChild._init, newChild = key(newChild._payload), updateSlot(returnFiber, oldFiber, newChild, lanes); - } - if (isArrayImpl(newChild) || getIteratorFn(newChild)) - return null !== key ? null : updateFragment(returnFiber, oldFiber, newChild, lanes, null); - if ("function" === typeof newChild.then) - return updateSlot( - returnFiber, - oldFiber, - unwrapThenable(newChild), - lanes - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return updateSlot( - returnFiber, - oldFiber, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); - } - return null; - } - function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) { - if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild) - return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return existingChildren = existingChildren.get( - null === newChild.key ? newIdx : newChild.key - ) || null, updateElement(returnFiber, existingChildren, newChild, lanes); - case REACT_PORTAL_TYPE: - return existingChildren = existingChildren.get( - null === newChild.key ? newIdx : newChild.key - ) || null, updatePortal(returnFiber, existingChildren, newChild, lanes); - case REACT_LAZY_TYPE: - var init = newChild._init; - newChild = init(newChild._payload); - return updateFromMap( - existingChildren, - returnFiber, - newIdx, - newChild, - lanes - ); + function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) { + var fiber = workInProgress2.child; + null !== fiber && (fiber.return = workInProgress2); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes2; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes2); + scheduleContextWorkOnParentPath( + list.return, + renderLanes2, + workInProgress2 + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; } - if (isArrayImpl(newChild) || getIteratorFn(newChild)) - return existingChildren = existingChildren.get(newIdx) || null, updateFragment(returnFiber, existingChildren, newChild, lanes, null); - if ("function" === typeof newChild.then) - return updateFromMap( - existingChildren, - returnFiber, - newIdx, - unwrapThenable(newChild), - lanes - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return updateFromMap( - existingChildren, - returnFiber, - newIdx, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); - } - return null; - } - function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) { - for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) { - oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling; - var newFiber = updateSlot( - returnFiber, - oldFiber, - newChildren[newIdx], - lanes - ); - if (null === newFiber) { - null === oldFiber && (oldFiber = nextOldFiber); - break; + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes2; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes2); + scheduleContextWorkOnParentPath(nextFiber, renderLanes2, workInProgress2); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress2) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; } - shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber); - currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); - null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber; - previousNewFiber = newFiber; - oldFiber = nextOldFiber; - } - if (newIdx === newChildren.length) - return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild; - if (null === oldFiber) { - for (; newIdx < newChildren.length; newIdx++) - oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (currentFirstChild = placeChild( - oldFiber, - currentFirstChild, - newIdx - ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; - } - for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++) - nextOldFiber = updateFromMap( - oldFiber, - returnFiber, - newIdx, - newChildren[newIdx], - lanes - ), null !== nextOldFiber && (shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete( - null === nextOldFiber.key ? newIdx : nextOldFiber.key - ), currentFirstChild = placeChild( - nextOldFiber, - currentFirstChild, - newIdx - ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber); - shouldTrackSideEffects && oldFiber.forEach(function(child) { - return deleteChild(returnFiber, child); - }); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; + fiber = nextFiber; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) { - if (null == newChildren) throw Error(formatProdErrorMessage(151)); - for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()) { - oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling; - var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes); - if (null === newFiber) { - null === oldFiber && (oldFiber = nextOldFiber); - break; - } - shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber); - currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); - null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber; - previousNewFiber = newFiber; - oldFiber = nextOldFiber; - } - if (step.done) - return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild; - if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildren.next()) - step = createChild(returnFiber, step.value, lanes), null !== step && (currentFirstChild = placeChild(step, currentFirstChild, newIdx), null === previousNewFiber ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; + } + function propagateParentContextChanges(current2, workInProgress2, renderLanes2, forcePropagateEntireTree) { + current2 = null; + for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) { + if (!isInsidePropagationBailout) { + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true; + else if (0 !== (parent.flags & 262144)) break; } - for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next()) - step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes), null !== step && (shouldTrackSideEffects && null !== step.alternate && oldFiber.delete(null === step.key ? newIdx : step.key), currentFirstChild = placeChild(step, currentFirstChild, newIdx), null === previousNewFiber ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step); - shouldTrackSideEffects && oldFiber.forEach(function(child) { - return deleteChild(returnFiber, child); - }); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; - } - function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) { - "object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (newChild = newChild.props.children); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - a: { - for (var key = newChild.key; null !== currentFirstChild; ) { - if (currentFirstChild.key === key) { - key = newChild.type; - if (key === REACT_FRAGMENT_TYPE) { - if (7 === currentFirstChild.tag) { - deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ); - lanes = useFiber( - currentFirstChild, - newChild.props.children - ); - lanes.return = returnFiber; - returnFiber = lanes; - break a; - } - } else if (currentFirstChild.elementType === key || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && resolveLazy(key) === currentFirstChild.type) { - deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ); - lanes = useFiber(currentFirstChild, newChild.props); - coerceRef(lanes, newChild); - lanes.return = returnFiber; - returnFiber = lanes; - break a; - } - deleteRemainingChildren(returnFiber, currentFirstChild); - break; - } else deleteChild(returnFiber, currentFirstChild); - currentFirstChild = currentFirstChild.sibling; - } - newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment( - newChild.props.children, - returnFiber.mode, - lanes, - newChild.key - ), lanes.return = returnFiber, returnFiber = lanes) : (lanes = createFiberFromTypeAndProps( - newChild.type, - newChild.key, - newChild.props, - null, - returnFiber.mode, - lanes - ), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = lanes); - } - return placeSingleChild(returnFiber); - case REACT_PORTAL_TYPE: - a: { - for (key = newChild.key; null !== currentFirstChild; ) { - if (currentFirstChild.key === key) - if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === newChild.containerInfo && currentFirstChild.stateNode.implementation === newChild.implementation) { - deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ); - lanes = useFiber(currentFirstChild, newChild.children || []); - lanes.return = returnFiber; - returnFiber = lanes; - break a; - } else { - deleteRemainingChildren(returnFiber, currentFirstChild); - break; - } - else deleteChild(returnFiber, currentFirstChild); - currentFirstChild = currentFirstChild.sibling; - } - lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes); - lanes.return = returnFiber; - returnFiber = lanes; - } - return placeSingleChild(returnFiber); - case REACT_LAZY_TYPE: - return key = newChild._init, newChild = key(newChild._payload), reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - newChild, - lanes - ); - } - if (isArrayImpl(newChild)) - return reconcileChildrenArray( - returnFiber, - currentFirstChild, - newChild, - lanes - ); - if (getIteratorFn(newChild)) { - key = getIteratorFn(newChild); - if ("function" !== typeof key) throw Error(formatProdErrorMessage(150)); - newChild = key.call(newChild); - return reconcileChildrenIterator( - returnFiber, - currentFirstChild, - newChild, - lanes - ); + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || (null !== current2 ? current2.push(context) : current2 = [context]); } - if ("function" === typeof newChild.then) - return reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - unwrapThenable(newChild), - lanes - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current2 ? current2.push(HostTransitionContext) : current2 = [HostTransitionContext]); } - return "string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild ? (newChild = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling), lanes = useFiber(currentFirstChild, newChild), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(newChild, returnFiber.mode, lanes), lanes.return = returnFiber, returnFiber = lanes), placeSingleChild(returnFiber)) : deleteRemainingChildren(returnFiber, currentFirstChild); + parent = parent.return; } - return function(returnFiber, currentFirstChild, newChild, lanes) { - try { - thenableIndexCounter$1 = 0; - var firstChildFiber = reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - newChild, - lanes - ); - thenableState$1 = null; - return firstChildFiber; - } catch (x) { - if (x === SuspenseException) throw x; - var fiber = createFiberImplClass(29, x, null, returnFiber.mode); - fiber.lanes = lanes; - fiber.return = returnFiber; - return fiber; - } finally { - } - }; - } - var reconcileChildFibers = createChildReconciler(true), mountChildFibers = createChildReconciler(false), currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0); - function pushHiddenContext(fiber, context) { - fiber = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, fiber); - push(currentTreeHiddenStackCursor, context); - entangledRenderLanes = fiber | context.baseLanes; - } - function reuseHiddenContextOnStack() { - push(prevEntangledRenderLanesCursor, entangledRenderLanes); - push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); - } - function popHiddenContext() { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor); - pop(prevEntangledRenderLanesCursor); + null !== current2 && propagateContextChanges( + workInProgress2, + current2, + renderLanes2, + forcePropagateEntireTree + ); + workInProgress2.flags |= 262144; } - var suspenseHandlerStackCursor = createCursor(null), shellBoundary = null; - function pushPrimaryTreeSuspenseHandler(handler) { - var current2 = handler.alternate; - push(suspenseStackCursor, suspenseStackCursor.current & 1); - push(suspenseHandlerStackCursor, handler); - null === shellBoundary && (null === current2 || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current2.memoizedState && (shellBoundary = handler)); + function checkIfContextChanged(currentDependencies) { + for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { + if (!objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + )) + return true; + currentDependencies = currentDependencies.next; + } + return false; } - function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), null === shellBoundary) { - var current2 = fiber.alternate; - null !== current2 && null !== current2.memoizedState && (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(); + function prepareToReadContext(workInProgress2) { + currentlyRenderingFiber$1 = workInProgress2; + lastContextDependency = null; + workInProgress2 = workInProgress2.dependencies; + null !== workInProgress2 && (workInProgress2.firstContext = null); } - function reuseSuspenseHandlerOnStack() { - push(suspenseStackCursor, suspenseStackCursor.current); - push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); + function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function popSuspenseHandler(fiber) { - pop(suspenseHandlerStackCursor); - shellBoundary === fiber && (shellBoundary = null); - pop(suspenseStackCursor); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } - var suspenseStackCursor = createCursor(0); - function findFirstSuspended(row) { - for (var node2 = row; null !== node2; ) { - if (13 === node2.tag) { - var state = node2.memoizedState; - if (null !== state && (state = state.dehydrated, null === state || "$?" === state.data || "$!" === state.data)) - return node2; - } else if (19 === node2.tag && void 0 !== node2.memoizedProps.revealOrder) { - if (0 !== (node2.flags & 128)) return node2; - } else if (null !== node2.child) { - node2.child.return = node2; - node2 = node2.child; - continue; - } - if (node2 === row) break; - for (; null === node2.sibling; ) { - if (null === node2.return || node2.return === row) return null; - node2 = node2.return; - } - node2.sibling.return = node2.return; - node2 = node2.sibling; - } - return null; + function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; } var AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() { var listeners = [], signal = this.signal = { @@ -3576,7 +3254,266 @@ function requireReactDomClient_production() { var cacheFromPool = peekCacheFromPool(); return null === cacheFromPool ? null : { parent: CacheContext._currentValue, pool: cacheFromPool }; } - var renderLanes = 0, currentlyRenderingFiber$1 = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = false, didScheduleRenderPhaseUpdateDuringThisPass = false, shouldDoubleInvokeUserFnsInHooksDEV = false, localIdCounter = 0, thenableIndexCounter = 0, thenableState = null, globalClientIdCounter = 0; + var SuspenseException = Error(formatProdErrorMessage(460)), SuspenseyCommitException = Error(formatProdErrorMessage(474)), SuspenseActionException = Error(formatProdErrorMessage(542)), noopSuspenseyCommitThenable = { then: function() { + } }; + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop$32() { + } + function trackUsedThenable(thenableState2, thenable, index2) { + index2 = thenableState2[index2]; + void 0 === index2 ? thenableState2.push(thenable) : index2 !== thenable && (thenable.then(noop$32, noop$32), thenable = index2); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2; + default: + if ("string" === typeof thenable.status) thenable.then(noop$32, noop$32); + else { + thenableState2 = workInProgressRoot; + if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter) + throw Error(formatProdErrorMessage(482)); + thenableState2 = thenable; + thenableState2.status = "pending"; + thenableState2.then( + function(fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function(error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2; + } + suspendedThenable = thenable; + throw SuspenseException; + } + } + var suspendedThenable = null; + function getSuspendedThenable() { + if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException) + throw Error(formatProdErrorMessage(483)); + } + var hasForceUpdate = false; + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; + } + function cloneUpdateQueue(current2, workInProgress2) { + current2 = current2.updateQueue; + workInProgress2.updateQueue === current2 && (workInProgress2.updateQueue = { + baseState: current2.baseState, + firstBaseUpdate: current2.firstBaseUpdate, + lastBaseUpdate: current2.lastBaseUpdate, + shared: current2.shared, + callbacks: null + }); + } + function createUpdate(lane) { + return { lane, tag: 0, payload: null, callback: null, next: null }; + } + function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if (0 !== (executionContext & 2)) { + var pending = updateQueue.pending; + null === pending ? update.next = update : (update.next = pending.next, pending.next = update); + updateQueue.pending = update; + update = getRootForUpdatedFiber(fiber); + markUpdateLaneFromFiberToRoot(fiber, null, lane); + return update; + } + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function entangleTransitions(root2, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194048))) { + var queueLanes = fiber.lanes; + queueLanes &= root2.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root2, lane); + } + } + function enqueueCapturedUpdate(workInProgress2, capturedUpdate) { + var queue = workInProgress2.updateQueue, current2 = workInProgress2.alternate; + if (null !== current2 && (current2 = current2.updateQueue, queue === current2)) { + var newFirst = null, newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { + do { + var clone = { + lane: queue.lane, + tag: queue.tag, + payload: queue.payload, + callback: null, + next: null + }; + null === newLast ? newFirst = newLast = clone : newLast = newLast.next = clone; + queue = queue.next; + } while (null !== queue); + null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate; + } else newFirst = newLast = capturedUpdate; + queue = { + baseState: current2.baseState, + firstBaseUpdate: newFirst, + lastBaseUpdate: newLast, + shared: current2.shared, + callbacks: current2.callbacks + }; + workInProgress2.updateQueue = queue; + return; + } + workInProgress2 = queue.lastBaseUpdate; + null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate; + queue.lastBaseUpdate = capturedUpdate; + } + var didReadFromEntangledAsyncAction = false; + function suspendIfUpdateReadFromEntangledAsyncAction() { + if (didReadFromEntangledAsyncAction) { + var entangledActionThenable = currentEntangledActionThenable; + if (null !== entangledActionThenable) throw entangledActionThenable; + } + } + function processUpdateQueue(workInProgress$jscomp$0, props, instance$jscomp$0, renderLanes2) { + didReadFromEntangledAsyncAction = false; + var queue = workInProgress$jscomp$0.updateQueue; + hasForceUpdate = false; + var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending; + if (null !== pendingQueue) { + queue.shared.pending = null; + var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next; + lastPendingUpdate.next = null; + null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate; + lastBaseUpdate = lastPendingUpdate; + var current2 = workInProgress$jscomp$0.alternate; + null !== current2 && (current2 = current2.updateQueue, pendingQueue = current2.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current2.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current2.lastBaseUpdate = lastPendingUpdate)); + } + if (null !== firstBaseUpdate) { + var newState = queue.baseState; + lastBaseUpdate = 0; + current2 = firstPendingUpdate = lastPendingUpdate = null; + pendingQueue = firstBaseUpdate; + do { + var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane; + if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) { + 0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true); + null !== current2 && (current2 = current2.next = { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); + a: { + var workInProgress2 = workInProgress$jscomp$0, update = pendingQueue; + updateLane = props; + var instance = instance$jscomp$0; + switch (update.tag) { + case 1: + workInProgress2 = update.payload; + if ("function" === typeof workInProgress2) { + newState = workInProgress2.call(instance, newState, updateLane); + break a; + } + newState = workInProgress2; + break a; + case 3: + workInProgress2.flags = workInProgress2.flags & -65537 | 128; + case 0: + workInProgress2 = update.payload; + updateLane = "function" === typeof workInProgress2 ? workInProgress2.call(instance, newState, updateLane) : workInProgress2; + if (null === updateLane || void 0 === updateLane) break a; + newState = assign2({}, newState, updateLane); + break a; + case 2: + hasForceUpdate = true; + } + } + updateLane = pendingQueue.callback; + null !== updateLane && (workInProgress$jscomp$0.flags |= 64, isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), isHiddenUpdate = queue.callbacks, null === isHiddenUpdate ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane)); + } else + isHiddenUpdate = { + lane: updateLane, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: pendingQueue.callback, + next: null + }, null === current2 ? (firstPendingUpdate = current2 = isHiddenUpdate, lastPendingUpdate = newState) : current2 = current2.next = isHiddenUpdate, lastBaseUpdate |= updateLane; + pendingQueue = pendingQueue.next; + if (null === pendingQueue) + if (pendingQueue = queue.shared.pending, null === pendingQueue) + break; + else + isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null; + } while (1); + null === current2 && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current2; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress$jscomp$0.lanes = lastBaseUpdate; + workInProgress$jscomp$0.memoizedState = newState; + } + } + function callCallback(callback, context) { + if ("function" !== typeof callback) + throw Error(formatProdErrorMessage(191, callback)); + callback.call(context); + } + function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++) + callCallback(callbacks[updateQueue], context); + } + var currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0); + function pushHiddenContext(fiber, context) { + fiber = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, fiber); + push(currentTreeHiddenStackCursor, context); + entangledRenderLanes = fiber | context.baseLanes; + } + function reuseHiddenContextOnStack() { + push(prevEntangledRenderLanesCursor, entangledRenderLanes); + push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); + } + function popHiddenContext() { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor); + pop(prevEntangledRenderLanesCursor); + } + var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = false, didScheduleRenderPhaseUpdateDuringThisPass = false, shouldDoubleInvokeUserFnsInHooksDEV = false, localIdCounter = 0, thenableIndexCounter$1 = 0, thenableState$1 = null, globalClientIdCounter = 0; function throwInvalidHookError() { throw Error(formatProdErrorMessage(321)); } @@ -3588,7 +3525,7 @@ function requireReactDomClient_production() { } function renderWithHooks(current2, workInProgress2, Component, props, secondArg, nextRenderLanes) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress2; + currentlyRenderingFiber = workInProgress2; workInProgress2.memoizedState = null; workInProgress2.updateQueue = null; workInProgress2.lanes = 0; @@ -3609,19 +3546,19 @@ function requireReactDomClient_production() { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = false; - thenableIndexCounter = 0; - thenableState = null; + thenableIndexCounter$1 = 0; + thenableState$1 = null; if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300)); null === current2 || didReceiveUpdate || (current2 = current2.dependencies, null !== current2 && checkIfContextChanged(current2) && (didReceiveUpdate = true)); } function renderWithHooksAgain(workInProgress2, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress2; + currentlyRenderingFiber = workInProgress2; var numberOfReRenders = 0; do { - didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null); - thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); + thenableIndexCounter$1 = 0; didScheduleRenderPhaseUpdateDuringThisPass = false; if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); numberOfReRenders += 1; @@ -3642,7 +3579,7 @@ function requireReactDomClient_production() { var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0]; maybeThenable = "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; dispatcher = dispatcher.useState()[0]; - (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -3665,10 +3602,10 @@ function requireReactDomClient_production() { didScheduleRenderPhaseUpdate = false; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = false; - thenableIndexCounter = localIdCounter = 0; - thenableState = null; + thenableIndexCounter$1 = localIdCounter = 0; + thenableState$1 = null; } function mountWorkInProgressHook() { var hook = { @@ -3678,20 +3615,20 @@ function requireReactDomClient_production() { queue: null, next: null }; - null === workInProgressHook ? currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook; + null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook; return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; - var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber$1.memoizedState : workInProgressHook.next; + var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook; else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -3703,20 +3640,19 @@ function requireReactDomClient_production() { queue: currentHook.queue, next: null }; - null === workInProgressHook ? currentlyRenderingFiber$1.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook; + null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook; } return workInProgressHook; } - var createFunctionComponentUpdateQueue; - createFunctionComponentUpdateQueue = function() { + function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; - }; + } function useThenable(thenable) { - var index2 = thenableIndexCounter; - thenableIndexCounter += 1; - null === thenableState && (thenableState = []); - thenable = trackUsedThenable(thenableState, thenable, index2); - index2 = currentlyRenderingFiber$1; + var index2 = thenableIndexCounter$1; + thenableIndexCounter$1 += 1; + null === thenableState$1 && (thenableState$1 = []); + thenable = trackUsedThenable(thenableState$1, thenable, index2); + index2 = currentlyRenderingFiber; null === (null === workInProgressHook ? index2.memoizedState : workInProgressHook.next) && (index2 = index2.alternate, ReactSharedInternals.H = null === index2 || null === index2.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate); return thenable; } @@ -3728,10 +3664,10 @@ function requireReactDomClient_production() { throw Error(formatProdErrorMessage(438, String(usable))); } function useMemoCache(size) { - var memoCache = null, updateQueue = currentlyRenderingFiber$1.updateQueue; + var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current2 = currentlyRenderingFiber$1.alternate; + var current2 = currentlyRenderingFiber.alternate; null !== current2 && (current2 = current2.updateQueue, null !== current2 && (current2 = current2.memoCache, null != current2 && (memoCache = { data: current2.data.map(function(array) { return array.slice(); @@ -3740,7 +3676,7 @@ function requireReactDomClient_production() { }))); } null == memoCache && (memoCache = { data: [], index: 0 }); - null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber$1.updateQueue = updateQueue); + null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -3774,7 +3710,7 @@ function requireReactDomClient_production() { if (null === baseQueue) hook.memoizedState = pendingQueue; else { current2 = baseQueue.next; - var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current2, didReadFromEntangledAsyncAction$54 = false; + var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current2, didReadFromEntangledAsyncAction$32 = false; do { var updateLane = update.lane & -536870913; if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) { @@ -3787,10 +3723,10 @@ function requireReactDomClient_production() { hasEagerState: update.hasEagerState, eagerState: update.eagerState, next: null - }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction$54 = true); + }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction$32 = true); else if ((renderLanes & revertLane) === revertLane) { update = update.next; - revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction$54 = true); + revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction$32 = true); continue; } else updateLane = { @@ -3800,7 +3736,7 @@ function requireReactDomClient_production() { hasEagerState: update.hasEagerState, eagerState: update.eagerState, next: null - }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber$1.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane; + }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane; updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer2(pendingQueue, updateLane); pendingQueue = update.hasEagerState ? update.eagerState : reducer2(pendingQueue, updateLane); @@ -3812,11 +3748,11 @@ function requireReactDomClient_production() { hasEagerState: update.hasEagerState, eagerState: update.eagerState, next: null - }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber$1.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane; + }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane; update = update.next; } while (null !== update && update !== current2); null === newBaseQueueLast ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst; - if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction$54 && (reducer2 = currentEntangledActionThenable, null !== reducer2))) + if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction$32 && (reducer2 = currentEntangledActionThenable, null !== reducer2))) throw reducer2; hook.memoizedState = pendingQueue; hook.baseState = baseFirst; @@ -3845,7 +3781,7 @@ function requireReactDomClient_production() { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407)); getServerSnapshot = getServerSnapshot(); @@ -3856,13 +3792,13 @@ function requireReactDomClient_production() { ); snapshotChanged && (hook.memoizedState = getServerSnapshot, didReceiveUpdate = true); hook = hook.queue; - updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [ - subscribe - ]); + var create2 = subscribeToStore.bind(null, fiber, hook, subscribe); + updateEffectImpl(2048, 8, create2, [subscribe]); if (hook.getSnapshot !== getSnapshot || snapshotChanged || null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1) { fiber.flags |= 2048; - pushEffect( + pushSimpleEffect( 9, + createEffectInstance(), updateStoreInstance.bind( null, fiber, @@ -3870,19 +3806,18 @@ function requireReactDomClient_production() { getServerSnapshot, getSnapshot ), - { destroy: void 0 }, null ); if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349)); - isHydrating$jscomp$0 || 0 !== (renderLanes & 60) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); + isHydrating$jscomp$0 || 0 !== (renderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } return getServerSnapshot; } function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; - null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber$1.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber)); + getSnapshot = currentlyRenderingFiber.updateQueue; + null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber)); } function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) { inst.value = nextSnapshot; @@ -3980,8 +3915,8 @@ function requireReactDomClient_production() { } else try { prevTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node2, prevTransition); - } catch (error$60) { - onActionError(actionQueue, node2, error$60); + } catch (error$38) { + onActionError(actionQueue, node2, error$38); } } function handleActionReturnValue(actionQueue, node2, returnValue) { @@ -4025,7 +3960,7 @@ function requireReactDomClient_production() { var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var JSCompiler_inline_result = currentlyRenderingFiber$1; + var JSCompiler_inline_result = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -4073,14 +4008,14 @@ function requireReactDomClient_production() { ssrFormState.queue = JSCompiler_inline_result; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result ); JSCompiler_inline_result.dispatch = ssrFormState; JSCompiler_inline_result = mountStateImpl(false); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, false, JSCompiler_inline_result.queue ); @@ -4094,7 +4029,7 @@ function requireReactDomClient_production() { JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result$jscomp$0, inRootOrSingleton, ssrFormState @@ -4114,15 +4049,23 @@ function requireReactDomClient_production() { actionStateReducer )[0]; stateHook = updateReducer(basicStateReducer)[0]; - currentStateHook = "object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then ? useThenable(currentStateHook) : currentStateHook; - var actionQueueHook = updateWorkInProgressHook(), actionQueue = actionQueueHook.queue, dispatch = actionQueue.dispatch; - action !== actionQueueHook.memoizedState && (currentlyRenderingFiber$1.flags |= 2048, pushEffect( + if ("object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then) + try { + var state = useThenable(currentStateHook); + } catch (x) { + if (x === SuspenseException) throw SuspenseActionException; + throw x; + } + else state = currentStateHook; + currentStateHook = updateWorkInProgressHook(); + var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; + action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect( 9, + createEffectInstance(), actionStateActionEffect.bind(null, actionQueue, action), - { destroy: void 0 }, null )); - return [currentStateHook, dispatch, stateHook]; + return [state, dispatch, stateHook]; } function actionStateActionEffect(actionQueue, action) { actionQueue.action = action; @@ -4138,38 +4081,47 @@ function requireReactDomClient_production() { currentStateHook.memoizedState = action; return [stateHook, dispatch, false]; } - function pushEffect(tag, create2, inst, deps) { - tag = { tag, create: create2, inst, deps, next: null }; - create2 = currentlyRenderingFiber$1.updateQueue; - null === create2 && (create2 = createFunctionComponentUpdateQueue(), currentlyRenderingFiber$1.updateQueue = create2); - inst = create2.lastEffect; - null === inst ? create2.lastEffect = tag.next = tag : (deps = inst.next, inst.next = tag, tag.next = deps, create2.lastEffect = tag); + function pushSimpleEffect(tag, inst, create2, createDeps) { + tag = { tag, create: create2, deps: createDeps, inst, next: null }; + inst = currentlyRenderingFiber.updateQueue; + null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst); + create2 = inst.lastEffect; + null === create2 ? inst.lastEffect = tag.next = tag : (createDeps = create2.next, create2.next = tag, tag.next = createDeps, inst.lastEffect = tag); return tag; } + function createEffectInstance() { + return { destroy: void 0, resource: void 0 }; + } function updateRef() { return updateWorkInProgressHook().memoizedState; } - function mountEffectImpl(fiberFlags, hookFlags, create2, deps) { + function mountEffectImpl(fiberFlags, hookFlags, create2, createDeps) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= fiberFlags; - hook.memoizedState = pushEffect( + createDeps = void 0 === createDeps ? null : createDeps; + currentlyRenderingFiber.flags |= fiberFlags; + hook.memoizedState = pushSimpleEffect( 1 | hookFlags, + createEffectInstance(), create2, - { destroy: void 0 }, - void 0 === deps ? null : deps + createDeps ); } function updateEffectImpl(fiberFlags, hookFlags, create2, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var inst = hook.memoizedState.inst; - null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushEffect(hookFlags, create2, inst, deps) : (currentlyRenderingFiber$1.flags |= fiberFlags, hook.memoizedState = pushEffect(1 | hookFlags, create2, inst, deps)); + null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create2, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect( + 1 | hookFlags, + inst, + create2, + deps + )); } - function mountEffect(create2, deps) { - mountEffectImpl(8390656, 8, create2, deps); + function mountEffect(create2, createDeps) { + mountEffectImpl(8390656, 8, create2, createDeps); } - function updateEffect(create2, deps) { - updateEffectImpl(2048, 8, create2, deps); + function updateEffect(create2, createDeps) { + updateEffectImpl(2048, 8, create2, createDeps); } function updateInsertionEffect(create2, deps) { return updateEffectImpl(4, 2, create2, deps); @@ -4228,7 +4180,7 @@ function requireReactDomClient_production() { return hook.memoizedState = value; hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -4239,7 +4191,7 @@ function requireReactDomClient_production() { if (0 === (renderLanes & 42)) return didReceiveUpdate = true, hook.memoizedState = value; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -4282,7 +4234,7 @@ function requireReactDomClient_production() { ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition; } } - function noop$2() { + function noop$22() { } function startHostTransition(formFiber, pendingState, action, formData) { if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476)); @@ -4292,7 +4244,7 @@ function requireReactDomClient_production() { queue, pendingState, sharedNotPendingObject, - null === action ? noop$2 : function() { + null === action ? noop$22 : function() { requestFormReset$1(formFiber); return action(formData); } @@ -4353,8 +4305,8 @@ function requireReactDomClient_production() { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$63 = enqueueUpdate(provider, fiber, lane); - null !== root$63 && (scheduleUpdateOnFiber(root$63, provider, lane), entangleTransitions(root$63, provider, lane)); + var root$41 = enqueueUpdate(provider, fiber, lane); + null !== root$41 && (scheduleUpdateOnFiber(root$41, provider, lane), entangleTransitions(root$41, provider, lane)); provider = { cache: createCache3() }; fiber.payload = provider; return; @@ -4427,7 +4379,7 @@ function requireReactDomClient_production() { } function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; - return fiber === currentlyRenderingFiber$1 || null !== alternate && alternate === currentlyRenderingFiber$1; + return fiber === currentlyRenderingFiber || null !== alternate && alternate === currentlyRenderingFiber; } function enqueueRenderPhaseUpdate(queue, update) { didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true; @@ -4436,7 +4388,7 @@ function requireReactDomClient_production() { queue.pending = update; } function entangleTransitionUpdate(root2, queue, lane) { - if (0 !== (lane & 4194176)) { + if (0 !== (lane & 4194048)) { var queueLanes = queue.lanes; queueLanes &= root2.pendingLanes; lane |= queueLanes; @@ -4461,15 +4413,14 @@ function requireReactDomClient_production() { useDeferredValue: throwInvalidHookError, useTransition: throwInvalidHookError, useSyncExternalStore: throwInvalidHookError, - useId: throwInvalidHookError - }; - ContextOnlyDispatcher.useCacheRefresh = throwInvalidHookError; - ContextOnlyDispatcher.useMemoCache = throwInvalidHookError; - ContextOnlyDispatcher.useHostTransitionStatus = throwInvalidHookError; - ContextOnlyDispatcher.useFormState = throwInvalidHookError; - ContextOnlyDispatcher.useActionState = throwInvalidHookError; - ContextOnlyDispatcher.useOptimistic = throwInvalidHookError; - var HooksDispatcherOnMount = { + useId: throwInvalidHookError, + useHostTransitionStatus: throwInvalidHookError, + useFormState: throwInvalidHookError, + useActionState: throwInvalidHookError, + useOptimistic: throwInvalidHookError, + useMemoCache: throwInvalidHookError, + useCacheRefresh: throwInvalidHookError + }, HooksDispatcherOnMount = { readContext, use, useCallback: function(callback, deps) { @@ -4535,7 +4486,7 @@ function requireReactDomClient_production() { hook.queue = reducer2; reducer2 = reducer2.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer2 ); return [hook.memoizedState, reducer2]; @@ -4547,7 +4498,7 @@ function requireReactDomClient_production() { }, useState: function(initialState2) { initialState2 = mountStateImpl(initialState2); - var queue = initialState2.queue, dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); + var queue = initialState2.queue, dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState2.memoizedState, dispatch]; }, @@ -4560,7 +4511,7 @@ function requireReactDomClient_production() { var stateHook = mountStateImpl(false); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, true, false @@ -4569,15 +4520,16 @@ function requireReactDomClient_production() { return [false, stateHook]; }, useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, hook = mountWorkInProgressHook(); + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407)); getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349)); - 0 !== (workInProgressRootRenderLanes & 60) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); + if (null === workInProgressRoot) + throw Error(formatProdErrorMessage(349)); + 0 !== (workInProgressRootRenderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; var inst = { value: getServerSnapshot, getSnapshot }; @@ -4586,8 +4538,9 @@ function requireReactDomClient_production() { subscribe ]); fiber.flags |= 2048; - pushEffect( + pushSimpleEffect( 9, + createEffectInstance(), updateStoreInstance.bind( null, fiber, @@ -4595,7 +4548,6 @@ function requireReactDomClient_production() { getServerSnapshot, getSnapshot ), - { destroy: void 0 }, null ); return getServerSnapshot; @@ -4606,46 +4558,45 @@ function requireReactDomClient_production() { var JSCompiler_inline_result = treeContextOverflow; var idWithLeadingBit = treeContextId; JSCompiler_inline_result = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + JSCompiler_inline_result; - identifierPrefix = ":" + identifierPrefix + "R" + JSCompiler_inline_result; + identifierPrefix = "«" + identifierPrefix + "R" + JSCompiler_inline_result; JSCompiler_inline_result = localIdCounter++; 0 < JSCompiler_inline_result && (identifierPrefix += "H" + JSCompiler_inline_result.toString(32)); - identifierPrefix += ":"; + identifierPrefix += "»"; } else - JSCompiler_inline_result = globalClientIdCounter++, identifierPrefix = ":" + identifierPrefix + "r" + JSCompiler_inline_result.toString(32) + ":"; + JSCompiler_inline_result = globalClientIdCounter++, identifierPrefix = "«" + identifierPrefix + "r" + JSCompiler_inline_result.toString(32) + "»"; return hook.memoizedState = identifierPrefix; }, + useHostTransitionStatus, + useFormState: mountActionState, + useActionState: mountActionState, + useOptimistic: function(passthrough) { + var hook = mountWorkInProgressHook(); + hook.memoizedState = hook.baseState = passthrough; + var queue = { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: null, + lastRenderedState: null + }; + hook.queue = queue; + hook = dispatchOptimisticSetState.bind( + null, + currentlyRenderingFiber, + true, + queue + ); + queue.dispatch = hook; + return [passthrough, hook]; + }, + useMemoCache, useCacheRefresh: function() { return mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber ); } - }; - HooksDispatcherOnMount.useMemoCache = useMemoCache; - HooksDispatcherOnMount.useHostTransitionStatus = useHostTransitionStatus; - HooksDispatcherOnMount.useFormState = mountActionState; - HooksDispatcherOnMount.useActionState = mountActionState; - HooksDispatcherOnMount.useOptimistic = function(passthrough) { - var hook = mountWorkInProgressHook(); - hook.memoizedState = hook.baseState = passthrough; - var queue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: null, - lastRenderedState: null - }; - hook.queue = queue; - hook = dispatchOptimisticSetState.bind( - null, - currentlyRenderingFiber$1, - true, - queue - ); - queue.dispatch = hook; - return [passthrough, hook]; - }; - var HooksDispatcherOnUpdate = { + }, HooksDispatcherOnUpdate = { readContext, use, useCallback: updateCallback, @@ -4678,18 +4629,17 @@ function requireReactDomClient_production() { ]; }, useSyncExternalStore: updateSyncExternalStore, - useId: updateId - }; - HooksDispatcherOnUpdate.useCacheRefresh = updateRefresh; - HooksDispatcherOnUpdate.useMemoCache = useMemoCache; - HooksDispatcherOnUpdate.useHostTransitionStatus = useHostTransitionStatus; - HooksDispatcherOnUpdate.useFormState = updateActionState; - HooksDispatcherOnUpdate.useActionState = updateActionState; - HooksDispatcherOnUpdate.useOptimistic = function(passthrough, reducer2) { - var hook = updateWorkInProgressHook(); - return updateOptimisticImpl(hook, currentHook, passthrough, reducer2); - }; - var HooksDispatcherOnRerender = { + useId: updateId, + useHostTransitionStatus, + useFormState: updateActionState, + useActionState: updateActionState, + useOptimistic: function(passthrough, reducer2) { + var hook = updateWorkInProgressHook(); + return updateOptimisticImpl(hook, currentHook, passthrough, reducer2); + }, + useMemoCache, + useCacheRefresh: updateRefresh + }, HooksDispatcherOnRerender = { readContext, use, useCallback: updateCallback, @@ -4722,20 +4672,534 @@ function requireReactDomClient_production() { ]; }, useSyncExternalStore: updateSyncExternalStore, - useId: updateId - }; - HooksDispatcherOnRerender.useCacheRefresh = updateRefresh; - HooksDispatcherOnRerender.useMemoCache = useMemoCache; - HooksDispatcherOnRerender.useHostTransitionStatus = useHostTransitionStatus; - HooksDispatcherOnRerender.useFormState = rerenderActionState; - HooksDispatcherOnRerender.useActionState = rerenderActionState; - HooksDispatcherOnRerender.useOptimistic = function(passthrough, reducer2) { - var hook = updateWorkInProgressHook(); - if (null !== currentHook) - return updateOptimisticImpl(hook, currentHook, passthrough, reducer2); - hook.baseState = passthrough; - return [passthrough, hook.queue.dispatch]; - }; + useId: updateId, + useHostTransitionStatus, + useFormState: rerenderActionState, + useActionState: rerenderActionState, + useOptimistic: function(passthrough, reducer2) { + var hook = updateWorkInProgressHook(); + if (null !== currentHook) + return updateOptimisticImpl(hook, currentHook, passthrough, reducer2); + hook.baseState = passthrough; + return [passthrough, hook.queue.dispatch]; + }, + useMemoCache, + useCacheRefresh: updateRefresh + }, thenableState = null, thenableIndexCounter = 0; + function unwrapThenable(thenable) { + var index2 = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, thenable, index2); + } + function coerceRef(workInProgress2, element) { + element = element.props.ref; + workInProgress2.ref = void 0 !== element ? element : null; + } + function throwOnInvalidObjectType(returnFiber, newChild) { + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) + throw Error(formatProdErrorMessage(525)); + returnFiber = Object.prototype.toString.call(newChild); + throw Error( + formatProdErrorMessage( + 31, + "[object Object]" === returnFiber ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber + ) + ); + } + function resolveLazy(lazyType) { + var init = lazyType._init; + return init(lazyType._payload); + } + function createChildReconciler(shouldTrackSideEffects) { + function deleteChild(returnFiber, childToDelete) { + if (shouldTrackSideEffects) { + var deletions = returnFiber.deletions; + null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete); + } + } + function deleteRemainingChildren(returnFiber, currentFirstChild) { + if (!shouldTrackSideEffects) return null; + for (; null !== currentFirstChild; ) + deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling; + return null; + } + function mapRemainingChildren(currentFirstChild) { + for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; ) + null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling; + return existingChildren; + } + function useFiber(fiber, pendingProps) { + fiber = createWorkInProgress(fiber, pendingProps); + fiber.index = 0; + fiber.sibling = null; + return fiber; + } + function placeChild(newFiber, lastPlacedIndex, newIndex) { + newFiber.index = newIndex; + if (!shouldTrackSideEffects) + return newFiber.flags |= 1048576, lastPlacedIndex; + newIndex = newFiber.alternate; + if (null !== newIndex) + return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex; + newFiber.flags |= 67108866; + return lastPlacedIndex; + } + function placeSingleChild(newFiber) { + shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 67108866); + return newFiber; + } + function updateTextNode(returnFiber, current2, textContent, lanes) { + if (null === current2 || 6 !== current2.tag) + return current2 = createFiberFromText(textContent, returnFiber.mode, lanes), current2.return = returnFiber, current2; + current2 = useFiber(current2, textContent); + current2.return = returnFiber; + return current2; + } + function updateElement(returnFiber, current2, element, lanes) { + var elementType = element.type; + if (elementType === REACT_FRAGMENT_TYPE) + return updateFragment( + returnFiber, + current2, + element.props.children, + lanes, + element.key + ); + if (null !== current2 && (current2.elementType === elementType || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current2.type)) + return current2 = useFiber(current2, element.props), coerceRef(current2, element), current2.return = returnFiber, current2; + current2 = createFiberFromTypeAndProps( + element.type, + element.key, + element.props, + null, + returnFiber.mode, + lanes + ); + coerceRef(current2, element); + current2.return = returnFiber; + return current2; + } + function updatePortal(returnFiber, current2, portal, lanes) { + if (null === current2 || 4 !== current2.tag || current2.stateNode.containerInfo !== portal.containerInfo || current2.stateNode.implementation !== portal.implementation) + return current2 = createFiberFromPortal(portal, returnFiber.mode, lanes), current2.return = returnFiber, current2; + current2 = useFiber(current2, portal.children || []); + current2.return = returnFiber; + return current2; + } + function updateFragment(returnFiber, current2, fragment, lanes, key) { + if (null === current2 || 7 !== current2.tag) + return current2 = createFiberFromFragment( + fragment, + returnFiber.mode, + lanes, + key + ), current2.return = returnFiber, current2; + current2 = useFiber(current2, fragment); + current2.return = returnFiber; + return current2; + } + function createChild(returnFiber, newChild, lanes) { + if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild) + return newChild = createFiberFromText( + "" + newChild, + returnFiber.mode, + lanes + ), newChild.return = returnFiber, newChild; + if ("object" === typeof newChild && null !== newChild) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return lanes = createFiberFromTypeAndProps( + newChild.type, + newChild.key, + newChild.props, + null, + returnFiber.mode, + lanes + ), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes; + case REACT_PORTAL_TYPE: + return newChild = createFiberFromPortal( + newChild, + returnFiber.mode, + lanes + ), newChild.return = returnFiber, newChild; + case REACT_LAZY_TYPE: + var init = newChild._init; + newChild = init(newChild._payload); + return createChild(returnFiber, newChild, lanes); + } + if (isArrayImpl(newChild) || getIteratorFn(newChild)) + return newChild = createFiberFromFragment( + newChild, + returnFiber.mode, + lanes, + null + ), newChild.return = returnFiber, newChild; + if ("function" === typeof newChild.then) + return createChild(returnFiber, unwrapThenable(newChild), lanes); + if (newChild.$$typeof === REACT_CONTEXT_TYPE) + return createChild( + returnFiber, + readContextDuringReconciliation(returnFiber, newChild), + lanes + ); + throwOnInvalidObjectType(returnFiber, newChild); + } + return null; + } + function updateSlot(returnFiber, oldFiber, newChild, lanes) { + var key = null !== oldFiber ? oldFiber.key : null; + if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild) + return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); + if ("object" === typeof newChild && null !== newChild) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null; + case REACT_PORTAL_TYPE: + return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null; + case REACT_LAZY_TYPE: + return key = newChild._init, newChild = key(newChild._payload), updateSlot(returnFiber, oldFiber, newChild, lanes); + } + if (isArrayImpl(newChild) || getIteratorFn(newChild)) + return null !== key ? null : updateFragment(returnFiber, oldFiber, newChild, lanes, null); + if ("function" === typeof newChild.then) + return updateSlot( + returnFiber, + oldFiber, + unwrapThenable(newChild), + lanes + ); + if (newChild.$$typeof === REACT_CONTEXT_TYPE) + return updateSlot( + returnFiber, + oldFiber, + readContextDuringReconciliation(returnFiber, newChild), + lanes + ); + throwOnInvalidObjectType(returnFiber, newChild); + } + return null; + } + function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) { + if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild) + return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes); + if ("object" === typeof newChild && null !== newChild) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return existingChildren = existingChildren.get( + null === newChild.key ? newIdx : newChild.key + ) || null, updateElement(returnFiber, existingChildren, newChild, lanes); + case REACT_PORTAL_TYPE: + return existingChildren = existingChildren.get( + null === newChild.key ? newIdx : newChild.key + ) || null, updatePortal(returnFiber, existingChildren, newChild, lanes); + case REACT_LAZY_TYPE: + var init = newChild._init; + newChild = init(newChild._payload); + return updateFromMap( + existingChildren, + returnFiber, + newIdx, + newChild, + lanes + ); + } + if (isArrayImpl(newChild) || getIteratorFn(newChild)) + return existingChildren = existingChildren.get(newIdx) || null, updateFragment(returnFiber, existingChildren, newChild, lanes, null); + if ("function" === typeof newChild.then) + return updateFromMap( + existingChildren, + returnFiber, + newIdx, + unwrapThenable(newChild), + lanes + ); + if (newChild.$$typeof === REACT_CONTEXT_TYPE) + return updateFromMap( + existingChildren, + returnFiber, + newIdx, + readContextDuringReconciliation(returnFiber, newChild), + lanes + ); + throwOnInvalidObjectType(returnFiber, newChild); + } + return null; + } + function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) { + for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) { + oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling; + var newFiber = updateSlot( + returnFiber, + oldFiber, + newChildren[newIdx], + lanes + ); + if (null === newFiber) { + null === oldFiber && (oldFiber = nextOldFiber); + break; + } + shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber); + currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); + null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber; + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + if (newIdx === newChildren.length) + return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild; + if (null === oldFiber) { + for (; newIdx < newChildren.length; newIdx++) + oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (currentFirstChild = placeChild( + oldFiber, + currentFirstChild, + newIdx + ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber); + isHydrating && pushTreeFork(returnFiber, newIdx); + return resultingFirstChild; + } + for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++) + nextOldFiber = updateFromMap( + oldFiber, + returnFiber, + newIdx, + newChildren[newIdx], + lanes + ), null !== nextOldFiber && (shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete( + null === nextOldFiber.key ? newIdx : nextOldFiber.key + ), currentFirstChild = placeChild( + nextOldFiber, + currentFirstChild, + newIdx + ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber); + shouldTrackSideEffects && oldFiber.forEach(function(child) { + return deleteChild(returnFiber, child); + }); + isHydrating && pushTreeFork(returnFiber, newIdx); + return resultingFirstChild; + } + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) { + if (null == newChildren) throw Error(formatProdErrorMessage(151)); + for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()) { + oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling; + var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes); + if (null === newFiber) { + null === oldFiber && (oldFiber = nextOldFiber); + break; + } + shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber); + currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); + null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber; + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + if (step.done) + return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild; + if (null === oldFiber) { + for (; !step.done; newIdx++, step = newChildren.next()) + step = createChild(returnFiber, step.value, lanes), null !== step && (currentFirstChild = placeChild(step, currentFirstChild, newIdx), null === previousNewFiber ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step); + isHydrating && pushTreeFork(returnFiber, newIdx); + return resultingFirstChild; + } + for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next()) + step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes), null !== step && (shouldTrackSideEffects && null !== step.alternate && oldFiber.delete(null === step.key ? newIdx : step.key), currentFirstChild = placeChild(step, currentFirstChild, newIdx), null === previousNewFiber ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step); + shouldTrackSideEffects && oldFiber.forEach(function(child) { + return deleteChild(returnFiber, child); + }); + isHydrating && pushTreeFork(returnFiber, newIdx); + return resultingFirstChild; + } + function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) { + "object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (newChild = newChild.props.children); + if ("object" === typeof newChild && null !== newChild) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + a: { + for (var key = newChild.key; null !== currentFirstChild; ) { + if (currentFirstChild.key === key) { + key = newChild.type; + if (key === REACT_FRAGMENT_TYPE) { + if (7 === currentFirstChild.tag) { + deleteRemainingChildren( + returnFiber, + currentFirstChild.sibling + ); + lanes = useFiber( + currentFirstChild, + newChild.props.children + ); + lanes.return = returnFiber; + returnFiber = lanes; + break a; + } + } else if (currentFirstChild.elementType === key || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && resolveLazy(key) === currentFirstChild.type) { + deleteRemainingChildren( + returnFiber, + currentFirstChild.sibling + ); + lanes = useFiber(currentFirstChild, newChild.props); + coerceRef(lanes, newChild); + lanes.return = returnFiber; + returnFiber = lanes; + break a; + } + deleteRemainingChildren(returnFiber, currentFirstChild); + break; + } else deleteChild(returnFiber, currentFirstChild); + currentFirstChild = currentFirstChild.sibling; + } + newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment( + newChild.props.children, + returnFiber.mode, + lanes, + newChild.key + ), lanes.return = returnFiber, returnFiber = lanes) : (lanes = createFiberFromTypeAndProps( + newChild.type, + newChild.key, + newChild.props, + null, + returnFiber.mode, + lanes + ), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = lanes); + } + return placeSingleChild(returnFiber); + case REACT_PORTAL_TYPE: + a: { + for (key = newChild.key; null !== currentFirstChild; ) { + if (currentFirstChild.key === key) + if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === newChild.containerInfo && currentFirstChild.stateNode.implementation === newChild.implementation) { + deleteRemainingChildren( + returnFiber, + currentFirstChild.sibling + ); + lanes = useFiber(currentFirstChild, newChild.children || []); + lanes.return = returnFiber; + returnFiber = lanes; + break a; + } else { + deleteRemainingChildren(returnFiber, currentFirstChild); + break; + } + else deleteChild(returnFiber, currentFirstChild); + currentFirstChild = currentFirstChild.sibling; + } + lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes); + lanes.return = returnFiber; + returnFiber = lanes; + } + return placeSingleChild(returnFiber); + case REACT_LAZY_TYPE: + return key = newChild._init, newChild = key(newChild._payload), reconcileChildFibersImpl( + returnFiber, + currentFirstChild, + newChild, + lanes + ); + } + if (isArrayImpl(newChild)) + return reconcileChildrenArray( + returnFiber, + currentFirstChild, + newChild, + lanes + ); + if (getIteratorFn(newChild)) { + key = getIteratorFn(newChild); + if ("function" !== typeof key) throw Error(formatProdErrorMessage(150)); + newChild = key.call(newChild); + return reconcileChildrenIterator( + returnFiber, + currentFirstChild, + newChild, + lanes + ); + } + if ("function" === typeof newChild.then) + return reconcileChildFibersImpl( + returnFiber, + currentFirstChild, + unwrapThenable(newChild), + lanes + ); + if (newChild.$$typeof === REACT_CONTEXT_TYPE) + return reconcileChildFibersImpl( + returnFiber, + currentFirstChild, + readContextDuringReconciliation(returnFiber, newChild), + lanes + ); + throwOnInvalidObjectType(returnFiber, newChild); + } + return "string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild ? (newChild = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling), lanes = useFiber(currentFirstChild, newChild), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(newChild, returnFiber.mode, lanes), lanes.return = returnFiber, returnFiber = lanes), placeSingleChild(returnFiber)) : deleteRemainingChildren(returnFiber, currentFirstChild); + } + return function(returnFiber, currentFirstChild, newChild, lanes) { + try { + thenableIndexCounter = 0; + var firstChildFiber = reconcileChildFibersImpl( + returnFiber, + currentFirstChild, + newChild, + lanes + ); + thenableState = null; + return firstChildFiber; + } catch (x) { + if (x === SuspenseException || x === SuspenseActionException) throw x; + var fiber = createFiberImplClass(29, x, null, returnFiber.mode); + fiber.lanes = lanes; + fiber.return = returnFiber; + return fiber; + } finally { + } + }; + } + var reconcileChildFibers = createChildReconciler(true), mountChildFibers = createChildReconciler(false), suspenseHandlerStackCursor = createCursor(null), shellBoundary = null; + function pushPrimaryTreeSuspenseHandler(handler) { + var current2 = handler.alternate; + push(suspenseStackCursor, suspenseStackCursor.current & 1); + push(suspenseHandlerStackCursor, handler); + null === shellBoundary && (null === current2 || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current2.memoizedState && (shellBoundary = handler)); + } + function pushOffscreenSuspenseHandler(fiber) { + if (22 === fiber.tag) { + if (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), null === shellBoundary) { + var current2 = fiber.alternate; + null !== current2 && null !== current2.memoizedState && (shellBoundary = fiber); + } + } else reuseSuspenseHandlerOnStack(); + } + function reuseSuspenseHandlerOnStack() { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); + } + function popSuspenseHandler(fiber) { + pop(suspenseHandlerStackCursor); + shellBoundary === fiber && (shellBoundary = null); + pop(suspenseStackCursor); + } + var suspenseStackCursor = createCursor(0); + function findFirstSuspended(row) { + for (var node2 = row; null !== node2; ) { + if (13 === node2.tag) { + var state = node2.memoizedState; + if (null !== state && (state = state.dehydrated, null === state || "$?" === state.data || isSuspenseInstanceFallback(state))) + return node2; + } else if (19 === node2.tag && void 0 !== node2.memoizedProps.revealOrder) { + if (0 !== (node2.flags & 128)) return node2; + } else if (null !== node2.child) { + node2.child.return = node2; + node2 = node2.child; + continue; + } + if (node2 === row) break; + for (; null === node2.sibling; ) { + if (null === node2.return || node2.return === row) return null; + node2 = node2.return; + } + node2.sibling.return = node2.return; + node2 = node2.sibling; + } + return null; + } function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) { ctor = workInProgress2.memoizedState; getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor); @@ -4744,9 +5208,6 @@ function requireReactDomClient_production() { 0 === workInProgress2.lanes && (workInProgress2.updateQueue.baseState = getDerivedStateFromProps); } var classComponentUpdater = { - isMounted: function(component) { - return (component = component._reactInternals) ? getNearestMountedFiber(component) === component : false; - }, enqueueSetState: function(inst, payload, callback) { inst = inst._reactInternals; var lane = requestUpdateLane(), update = createUpdate(lane); @@ -4792,8 +5253,8 @@ function requireReactDomClient_production() { } if (Component = Component.defaultProps) { newProps === baseProps && (newProps = assign2({}, newProps)); - for (var propName$67 in Component) - void 0 === newProps[propName$67] && (newProps[propName$67] = Component[propName$67]); + for (var propName$73 in Component) + void 0 === newProps[propName$73] && (newProps[propName$73] = Component[propName$73]); } return newProps; } @@ -4825,9 +5286,9 @@ function requireReactDomClient_production() { try { var onUncaughtError = root2.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$68) { + } catch (e$74) { setTimeout(function() { - throw e$68; + throw e$74; }); } } @@ -4838,9 +5299,9 @@ function requireReactDomClient_production() { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$69) { + } catch (e$75) { setTimeout(function() { - throw e$69; + throw e$75; }); } } @@ -5030,16 +5491,15 @@ function requireReactDomClient_production() { ); } function updateOffscreenComponent(current2, workInProgress2, renderLanes2) { - var nextProps = workInProgress2.pendingProps, nextChildren = nextProps.children, nextIsDetached = 0 !== (workInProgress2.stateNode._pendingVisibility & 2), prevState = null !== current2 ? current2.memoizedState : null; - markRef(current2, workInProgress2); - if ("hidden" === nextProps.mode || nextIsDetached) { + var nextProps = workInProgress2.pendingProps, nextChildren = nextProps.children, prevState = null !== current2 ? current2.memoizedState : null; + if ("hidden" === nextProps.mode) { if (0 !== (workInProgress2.flags & 128)) { nextProps = null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2; if (null !== current2) { nextChildren = workInProgress2.child = current2.child; - for (nextIsDetached = 0; null !== nextChildren; ) - nextIsDetached = nextIsDetached | nextChildren.lanes | nextChildren.childLanes, nextChildren = nextChildren.sibling; - workInProgress2.childLanes = nextIsDetached & ~nextProps; + for (prevState = 0; null !== nextChildren; ) + prevState = prevState | nextChildren.lanes | nextChildren.childLanes, nextChildren = nextChildren.sibling; + workInProgress2.childLanes = prevState & ~nextProps; } else workInProgress2.childLanes = 0, workInProgress2.child = null; return deferHiddenOffscreenComponent( current2, @@ -5081,12 +5541,12 @@ function requireReactDomClient_production() { function markRef(current2, workInProgress2) { var ref = workInProgress2.ref; if (null === ref) - null !== current2 && null !== current2.ref && (workInProgress2.flags |= 2097664); + null !== current2 && null !== current2.ref && (workInProgress2.flags |= 4194816); else { if ("function" !== typeof ref && "object" !== typeof ref) throw Error(formatProdErrorMessage(284)); if (null === current2 || current2.ref !== ref) - workInProgress2.flags |= 2097664; + workInProgress2.flags |= 4194816; } } function updateFunctionComponent(current2, workInProgress2, Component, nextProps, renderLanes2) { @@ -5258,7 +5718,12 @@ function requireReactDomClient_production() { reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2); return workInProgress2.child; } - var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; + var SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null + }; function mountSuspenseOffscreenState(renderLanes2) { return { baseLanes: renderLanes2, cachePool: getSuspendedCache() }; } @@ -5299,7 +5764,8 @@ function requireReactDomClient_production() { null !== nextInstance ? (workInProgress2.memoizedState = { dehydrated: nextInstance, treeContext: null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }, JSCompiler_temp$jscomp$0 = createFiberImplClass( 18, null, @@ -5311,7 +5777,7 @@ function requireReactDomClient_production() { } nextInstance = workInProgress2.memoizedState; if (null !== nextInstance && (nextInstance = nextInstance.dehydrated, null !== nextInstance)) - return "$!" === nextInstance.data ? workInProgress2.lanes = 16 : workInProgress2.lanes = 536870912, null; + return isSuspenseInstanceFallback(nextInstance) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912, null; popSuspenseHandler(workInProgress2); } nextInstance = nextProps.children; @@ -5358,7 +5824,7 @@ function requireReactDomClient_production() { JSCompiler_temp, renderLanes2 ), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = showFallback); - else if (pushPrimaryTreeSuspenseHandler(workInProgress2), "$!" === nextInstance.data) { + else if (pushPrimaryTreeSuspenseHandler(workInProgress2), isSuspenseInstanceFallback(nextInstance)) { JSCompiler_temp = nextInstance.nextSibling && nextInstance.nextSibling.dataset; if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; JSCompiler_temp = digest; @@ -5373,51 +5839,8 @@ function requireReactDomClient_production() { ); } else if (didReceiveUpdate || propagateParentContextChanges(current2, workInProgress2, renderLanes2, false), JSCompiler_temp = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || JSCompiler_temp) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes2 & -renderLanes2; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - 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: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 64; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes2)) ? 0 : nextProps; - if (0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane) - throw JSCompiler_temp$jscomp$0.retryLane = nextProps, enqueueConcurrentRenderForLane(current2, nextProps), scheduleUpdateOnFiber(JSCompiler_temp, current2, nextProps), SelectiveHydrationException; - } + if (null !== JSCompiler_temp && (nextProps = renderLanes2 & -renderLanes2, nextProps = 0 !== (nextProps & 42) ? 1 : getBumpedLaneForHydrationByLane(nextProps), nextProps = 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes2)) ? 0 : nextProps, 0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane)) + throw JSCompiler_temp$jscomp$0.retryLane = nextProps, enqueueConcurrentRenderForLane(current2, nextProps), scheduleUpdateOnFiber(JSCompiler_temp, current2, nextProps), SelectiveHydrationException; "$?" === nextInstance.data || renderDidSuspendDelayIfPossible(); workInProgress2 = retrySuspenseComponentWithoutHydrating( current2, @@ -5425,10 +5848,7 @@ function requireReactDomClient_production() { renderLanes2 ); } else - "$?" === nextInstance.data ? (workInProgress2.flags |= 128, workInProgress2.child = current2.child, workInProgress2 = retryDehydratedSuspenseBoundary.bind( - null, - current2 - ), nextInstance._reactRetry = workInProgress2, workInProgress2 = null) : (current2 = JSCompiler_temp$jscomp$0.treeContext, nextHydratableInstance = getNextHydratable( + "$?" === nextInstance.data ? (workInProgress2.flags |= 192, workInProgress2.child = current2.child, workInProgress2 = null) : (current2 = JSCompiler_temp$jscomp$0.treeContext, nextHydratableInstance = getNextHydratable( nextInstance.nextSibling ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, rootOrSingletonContext = false, null !== current2 && (idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextId = current2.id, treeContextOverflow = current2.overflow, treeContextProvider = workInProgress2), workInProgress2 = mountSuspensePrimaryChildren( workInProgress2, @@ -5440,7 +5860,7 @@ function requireReactDomClient_production() { return reuseSuspenseHandlerOnStack(), showFallback = nextProps.fallback, nextInstance = workInProgress2.mode, JSCompiler_temp$jscomp$0 = current2.child, digest = JSCompiler_temp$jscomp$0.sibling, nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, { mode: "hidden", children: nextProps.children - }), nextProps.subtreeFlags = JSCompiler_temp$jscomp$0.subtreeFlags & 31457280, null !== digest ? showFallback = createWorkInProgress(digest, showFallback) : (showFallback = createFiberFromFragment( + }), nextProps.subtreeFlags = JSCompiler_temp$jscomp$0.subtreeFlags & 65011712, null !== digest ? showFallback = createWorkInProgress(digest, showFallback) : (showFallback = createFiberFromFragment( showFallback, nextInstance, renderLanes2, @@ -5476,7 +5896,15 @@ function requireReactDomClient_production() { return workInProgress2.child = primaryChildren; } function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { - return createFiberFromOffscreen(offscreenProps, mode, 0, null); + offscreenProps = createFiberImplClass(22, offscreenProps, null, mode); + offscreenProps.lanes = 0; + offscreenProps.stateNode = { + _visibility: 1, + _pendingMarkers: null, + _retryCache: null, + _transitions: null + }; + return offscreenProps; } function retrySuspenseComponentWithoutHydrating(current2, workInProgress2, renderLanes2) { reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2); @@ -5771,61 +6199,74 @@ function requireReactDomClient_production() { workInProgress2.stateNode.containerInfo ); if (null === current2) throw Error(formatProdErrorMessage(387)); - var nextProps = workInProgress2.pendingProps; - init = workInProgress2.memoizedState; - lazyComponent = init.element; + lazyComponent = workInProgress2.pendingProps; + var prevState = workInProgress2.memoizedState; + init = prevState.element; cloneUpdateQueue(current2, workInProgress2); - processUpdateQueue(workInProgress2, nextProps, null, renderLanes2); + processUpdateQueue(workInProgress2, lazyComponent, null, renderLanes2); var nextState = workInProgress2.memoizedState; - nextProps = nextState.cache; - pushProvider(workInProgress2, CacheContext, nextProps); - nextProps !== init.cache && propagateContextChanges( + lazyComponent = nextState.cache; + pushProvider(workInProgress2, CacheContext, lazyComponent); + lazyComponent !== prevState.cache && propagateContextChanges( workInProgress2, [CacheContext], renderLanes2, true ); suspendIfUpdateReadFromEntangledAsyncAction(); - nextProps = nextState.element; - if (init.isDehydrated) - if (init = { - element: nextProps, + lazyComponent = nextState.element; + if (prevState.isDehydrated) + if (prevState = { + element: lazyComponent, isDehydrated: false, cache: nextState.cache - }, workInProgress2.updateQueue.baseState = init, workInProgress2.memoizedState = init, workInProgress2.flags & 256) { + }, workInProgress2.updateQueue.baseState = prevState, workInProgress2.memoizedState = prevState, workInProgress2.flags & 256) { workInProgress2 = mountHostRootWithoutHydrating( current2, workInProgress2, - nextProps, + lazyComponent, renderLanes2 ); break a; - } else if (nextProps !== lazyComponent) { - lazyComponent = createCapturedValueAtFiber( + } else if (lazyComponent !== init) { + init = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress2 ); - queueHydrationError(lazyComponent); + queueHydrationError(init); workInProgress2 = mountHostRootWithoutHydrating( current2, workInProgress2, - nextProps, + lazyComponent, renderLanes2 ); break a; - } else - for (nextHydratableInstance = getNextHydratable( - workInProgress2.stateNode.containerInfo.firstChild - ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, rootOrSingletonContext = true, renderLanes2 = mountChildFibers( + } else { + current2 = workInProgress2.stateNode.containerInfo; + switch (current2.nodeType) { + case 9: + current2 = current2.body; + break; + default: + current2 = "HTML" === current2.nodeName ? current2.ownerDocument.body : current2; + } + nextHydratableInstance = getNextHydratable(current2.firstChild); + hydrationParentFiber = workInProgress2; + isHydrating = true; + hydrationErrors = null; + rootOrSingletonContext = true; + renderLanes2 = mountChildFibers( workInProgress2, null, - nextProps, + lazyComponent, renderLanes2 - ), workInProgress2.child = renderLanes2; renderLanes2; ) + ); + for (workInProgress2.child = renderLanes2; renderLanes2; ) renderLanes2.flags = renderLanes2.flags & -3 | 4096, renderLanes2 = renderLanes2.sibling; + } else { resetHydrationState(); - if (nextProps === lazyComponent) { + if (lazyComponent === init) { workInProgress2 = bailoutOnAlreadyFinishedWork( current2, workInProgress2, @@ -5833,7 +6274,12 @@ function requireReactDomClient_production() { ); break a; } - reconcileChildren(current2, workInProgress2, nextProps, renderLanes2); + reconcileChildren( + current2, + workInProgress2, + lazyComponent, + renderLanes2 + ); } workInProgress2 = workInProgress2.child; } @@ -5857,19 +6303,14 @@ function requireReactDomClient_production() { workInProgress2.type, workInProgress2.pendingProps, rootInstanceStackCursor.current - ), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, nextHydratableInstance = getNextHydratable( + ), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, init = nextHydratableInstance, isSingletonScope(workInProgress2.type) ? (previousHydratableOnEnteringScopedSingleton = init, nextHydratableInstance = getNextHydratable( lazyComponent.firstChild - )), lazyComponent = workInProgress2.pendingProps.children, null !== current2 || isHydrating ? reconcileChildren( + )) : nextHydratableInstance = init), reconcileChildren( current2, workInProgress2, - lazyComponent, - renderLanes2 - ) : workInProgress2.child = reconcileChildFibers( - workInProgress2, - null, - lazyComponent, + workInProgress2.pendingProps.children, renderLanes2 - ), markRef(current2, workInProgress2), workInProgress2.child; + ), markRef(current2, workInProgress2), null === current2 && (workInProgress2.flags |= 4194304), workInProgress2.child; case 5: if (null === current2 && isHydrating) { if (init = lazyComponent = nextHydratableInstance) @@ -5885,10 +6326,10 @@ function requireReactDomClient_production() { } pushHostContext(workInProgress2); init = workInProgress2.type; - nextProps = workInProgress2.pendingProps; + prevState = workInProgress2.pendingProps; nextState = null !== current2 ? current2.memoizedProps : null; - lazyComponent = nextProps.children; - shouldSetTextContent(init, nextProps) ? lazyComponent = null : null !== nextState && shouldSetTextContent(init, nextState) && (workInProgress2.flags |= 32); + lazyComponent = prevState.children; + shouldSetTextContent(init, prevState) ? lazyComponent = null : null !== nextState && shouldSetTextContent(init, nextState) && (workInProgress2.flags |= 32); null !== workInProgress2.memoizedState && (init = renderWithHooks( current2, workInProgress2, @@ -5984,13 +6425,21 @@ function requireReactDomClient_production() { ); case 19: return updateSuspenseListComponent(current2, workInProgress2, renderLanes2); + case 31: + return lazyComponent = workInProgress2.pendingProps, renderLanes2 = workInProgress2.mode, lazyComponent = { + mode: lazyComponent.mode, + children: lazyComponent.children + }, null === current2 ? (renderLanes2 = mountWorkInProgressOffscreenFiber( + lazyComponent, + renderLanes2 + ), renderLanes2.ref = workInProgress2.ref, workInProgress2.child = renderLanes2, renderLanes2.return = workInProgress2, workInProgress2 = renderLanes2) : (renderLanes2 = createWorkInProgress(current2.child, lazyComponent), renderLanes2.ref = workInProgress2.ref, workInProgress2.child = renderLanes2, renderLanes2.return = workInProgress2, workInProgress2 = renderLanes2), workInProgress2; case 22: return updateOffscreenComponent(current2, workInProgress2, renderLanes2); case 24: - return prepareToReadContext(workInProgress2), lazyComponent = readContext(CacheContext), null === current2 ? (init = peekCacheFromPool(), null === init && (init = workInProgressRoot, nextProps = createCache3(), init.pooledCache = nextProps, nextProps.refCount++, null !== nextProps && (init.pooledCacheLanes |= renderLanes2), init = nextProps), workInProgress2.memoizedState = { + return prepareToReadContext(workInProgress2), lazyComponent = readContext(CacheContext), null === current2 ? (init = peekCacheFromPool(), null === init && (init = workInProgressRoot, prevState = createCache3(), init.pooledCache = prevState, prevState.refCount++, null !== prevState && (init.pooledCacheLanes |= renderLanes2), init = prevState), workInProgress2.memoizedState = { parent: lazyComponent, cache: init - }, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, init)) : (0 !== (current2.lanes & renderLanes2) && (cloneUpdateQueue(current2, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), init = current2.memoizedState, nextProps = workInProgress2.memoizedState, init.parent !== lazyComponent ? (init = { parent: lazyComponent, cache: lazyComponent }, workInProgress2.memoizedState = init, 0 === workInProgress2.lanes && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = init), pushProvider(workInProgress2, CacheContext, lazyComponent)) : (lazyComponent = nextProps.cache, pushProvider(workInProgress2, CacheContext, lazyComponent), lazyComponent !== init.cache && propagateContextChanges( + }, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, init)) : (0 !== (current2.lanes & renderLanes2) && (cloneUpdateQueue(current2, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), init = current2.memoizedState, prevState = workInProgress2.memoizedState, init.parent !== lazyComponent ? (init = { parent: lazyComponent, cache: lazyComponent }, workInProgress2.memoizedState = init, 0 === workInProgress2.lanes && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = init), pushProvider(workInProgress2, CacheContext, lazyComponent)) : (lazyComponent = prevState.cache, pushProvider(workInProgress2, CacheContext, lazyComponent), lazyComponent !== init.cache && propagateContextChanges( workInProgress2, [CacheContext], renderLanes2, @@ -6006,321 +6455,399 @@ function requireReactDomClient_production() { } throw Error(formatProdErrorMessage(156, workInProgress2.tag)); } - var valueCursor = createCursor(null), currentlyRenderingFiber = null, lastContextDependency = null; - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue); - context._currentValue = nextValue; - } - function popProvider(context) { - context._currentValue = valueCursor.current; - pop(valueCursor); + function markUpdate(workInProgress2) { + workInProgress2.flags |= 4; } - function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2); - if (parent === propagationRoot) break; - parent = parent.return; + function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) { + if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4)) + workInProgress2.flags &= -16777217; + else if (workInProgress2.flags |= 16777216, !preloadResource(resource)) { + resource = suspenseHandlerStackCursor.current; + if (null !== resource && ((workInProgressRootRenderLanes & 4194048) === workInProgressRootRenderLanes ? null !== shellBoundary : (workInProgressRootRenderLanes & 62914560) !== workInProgressRootRenderLanes && 0 === (workInProgressRootRenderLanes & 536870912) || resource !== shellBoundary)) + throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException; + workInProgress2.flags |= 8192; } } - function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) { - var fiber = workInProgress2.child; - null !== fiber && (fiber.return = workInProgress2); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes2; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes2); - scheduleContextWorkOnParentPath( - list.return, - renderLanes2, - workInProgress2 - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes2; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes2); - scheduleContextWorkOnParentPath(nextFiber, renderLanes2, workInProgress2); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress2) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } + function scheduleRetryEffect(workInProgress2, retryQueue) { + null !== retryQueue && (workInProgress2.flags |= 4); + workInProgress2.flags & 16384 && (retryQueue = 22 !== workInProgress2.tag ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue); } - function propagateParentContextChanges(current2, workInProgress2, renderLanes2, forcePropagateEntireTree) { - current2 = null; - for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) { - if (!isInsidePropagationBailout) { - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true; - else if (0 !== (parent.flags & 262144)) break; - } - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || (null !== current2 ? current2.push(context) : current2 = [context]); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current2 ? current2.push(HostTransitionContext) : current2 = [HostTransitionContext]); + function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { + if (!isHydrating) + switch (renderState.tailMode) { + case "hidden": + hasRenderedATailFallback = renderState.tail; + for (var lastTailNode = null; null !== hasRenderedATailFallback; ) + null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling; + null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null; + break; + case "collapsed": + lastTailNode = renderState.tail; + for (var lastTailNode$113 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$113 = lastTailNode), lastTailNode = lastTailNode.sibling; + null === lastTailNode$113 ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : lastTailNode$113.sibling = null; } - parent = parent.return; - } - null !== current2 && propagateContextChanges( - workInProgress2, - current2, - renderLanes2, - forcePropagateEntireTree - ); - workInProgress2.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - if (!objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - )) - return true; - currentDependencies = currentDependencies.next; - } - return false; - } - function prepareToReadContext(workInProgress2) { - currentlyRenderingFiber = workInProgress2; - lastContextDependency = null; - workInProgress2 = workInProgress2.dependencies; - null !== workInProgress2 && (workInProgress2.firstContext = null); - } - function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - var hasForceUpdate = false; - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; - } - function cloneUpdateQueue(current2, workInProgress2) { - current2 = current2.updateQueue; - workInProgress2.updateQueue === current2 && (workInProgress2.updateQueue = { - baseState: current2.baseState, - firstBaseUpdate: current2.firstBaseUpdate, - lastBaseUpdate: current2.lastBaseUpdate, - shared: current2.shared, - callbacks: null - }); - } - function createUpdate(lane) { - return { lane, tag: 0, payload: null, callback: null, next: null }; - } - function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; - if (0 !== (executionContext & 2)) { - var pending = updateQueue.pending; - null === pending ? update.next = update : (update.next = pending.next, pending.next = update); - updateQueue.pending = update; - update = getRootForUpdatedFiber(fiber); - markUpdateLaneFromFiberToRoot(fiber, null, lane); - return update; - } - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); - } - function entangleTransitions(root2, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root2.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root2, lane); - } } - function enqueueCapturedUpdate(workInProgress2, capturedUpdate) { - var queue = workInProgress2.updateQueue, current2 = workInProgress2.alternate; - if (null !== current2 && (current2 = current2.updateQueue, queue === current2)) { - var newFirst = null, newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { - do { - var clone = { - lane: queue.lane, - tag: queue.tag, - payload: queue.payload, - callback: null, - next: null - }; - null === newLast ? newFirst = newLast = clone : newLast = newLast.next = clone; - queue = queue.next; - } while (null !== queue); - null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate; - } else newFirst = newLast = capturedUpdate; - queue = { - baseState: current2.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: current2.shared, - callbacks: current2.callbacks - }; - workInProgress2.updateQueue = queue; - return; - } - workInProgress2 = queue.lastBaseUpdate; - null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate; - queue.lastBaseUpdate = capturedUpdate; - } - var didReadFromEntangledAsyncAction = false; - function suspendIfUpdateReadFromEntangledAsyncAction() { - if (didReadFromEntangledAsyncAction) { - var entangledActionThenable = currentEntangledActionThenable; - if (null !== entangledActionThenable) throw entangledActionThenable; - } + function bubbleProperties(completedWork) { + var didBailout = null !== completedWork.alternate && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0; + if (didBailout) + for (var child$114 = completedWork.child; null !== child$114; ) + newChildLanes |= child$114.lanes | child$114.childLanes, subtreeFlags |= child$114.subtreeFlags & 65011712, subtreeFlags |= child$114.flags & 65011712, child$114.return = completedWork, child$114 = child$114.sibling; + else + for (child$114 = completedWork.child; null !== child$114; ) + newChildLanes |= child$114.lanes | child$114.childLanes, subtreeFlags |= child$114.subtreeFlags, subtreeFlags |= child$114.flags, child$114.return = completedWork, child$114 = child$114.sibling; + completedWork.subtreeFlags |= subtreeFlags; + completedWork.childLanes = newChildLanes; + return didBailout; } - function processUpdateQueue(workInProgress$jscomp$0, props, instance$jscomp$0, renderLanes2) { - didReadFromEntangledAsyncAction = false; - var queue = workInProgress$jscomp$0.updateQueue; - hasForceUpdate = false; - var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending; - if (null !== pendingQueue) { - queue.shared.pending = null; - var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; - null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate; - lastBaseUpdate = lastPendingUpdate; - var current2 = workInProgress$jscomp$0.alternate; - null !== current2 && (current2 = current2.updateQueue, pendingQueue = current2.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current2.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current2.lastBaseUpdate = lastPendingUpdate)); - } - if (null !== firstBaseUpdate) { - var newState = queue.baseState; - lastBaseUpdate = 0; - current2 = firstPendingUpdate = lastPendingUpdate = null; - pendingQueue = firstBaseUpdate; - do { - var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane; - if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) { - 0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true); - null !== current2 && (current2 = current2.next = { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); - a: { - var workInProgress2 = workInProgress$jscomp$0, update = pendingQueue; - updateLane = props; - var instance = instance$jscomp$0; - switch (update.tag) { + function completeWork(current2, workInProgress2, renderLanes2) { + var newProps = workInProgress2.pendingProps; + popTreeContext(workInProgress2); + switch (workInProgress2.tag) { + case 31: + case 16: + case 15: + case 0: + case 11: + case 7: + case 8: + case 12: + case 9: + case 14: + return bubbleProperties(workInProgress2), null; + case 1: + return bubbleProperties(workInProgress2), null; + case 3: + renderLanes2 = workInProgress2.stateNode; + newProps = null; + null !== current2 && (newProps = current2.memoizedState.cache); + workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048); + popProvider(CacheContext); + popHostContainer(); + renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null); + if (null === current2 || null === current2.child) + popHydrationState(workInProgress2) ? markUpdate(workInProgress2) : null === current2 || current2.memoizedState.isDehydrated && 0 === (workInProgress2.flags & 256) || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable()); + bubbleProperties(workInProgress2); + return null; + case 26: + return renderLanes2 = workInProgress2.memoizedState, null === current2 ? (markUpdate(workInProgress2), null !== renderLanes2 ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(workInProgress2, renderLanes2)) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217)) : renderLanes2 ? renderLanes2 !== current2.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(workInProgress2, renderLanes2)) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (current2.memoizedProps !== newProps && markUpdate(workInProgress2), bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217), null; + case 27: + popHostContext(workInProgress2); + renderLanes2 = rootInstanceStackCursor.current; + var type = workInProgress2.type; + if (null !== current2 && null != workInProgress2.stateNode) + current2.memoizedProps !== newProps && markUpdate(workInProgress2); + else { + if (!newProps) { + if (null === workInProgress2.stateNode) + throw Error(formatProdErrorMessage(166)); + bubbleProperties(workInProgress2); + return null; + } + current2 = contextStackCursor.current; + popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2) : (current2 = resolveSingletonInstance(type, newProps, renderLanes2), workInProgress2.stateNode = current2, markUpdate(workInProgress2)); + } + bubbleProperties(workInProgress2); + return null; + case 5: + popHostContext(workInProgress2); + renderLanes2 = workInProgress2.type; + if (null !== current2 && null != workInProgress2.stateNode) + current2.memoizedProps !== newProps && markUpdate(workInProgress2); + else { + if (!newProps) { + if (null === workInProgress2.stateNode) + throw Error(formatProdErrorMessage(166)); + bubbleProperties(workInProgress2); + return null; + } + current2 = contextStackCursor.current; + if (popHydrationState(workInProgress2)) + prepareToHydrateHostInstance(workInProgress2); + else { + type = getOwnerDocumentFromRootContainer( + rootInstanceStackCursor.current + ); + switch (current2) { case 1: - workInProgress2 = update.payload; - if ("function" === typeof workInProgress2) { - newState = workInProgress2.call(instance, newState, updateLane); - break a; + current2 = type.createElementNS( + "http://www.w3.org/2000/svg", + renderLanes2 + ); + break; + case 2: + current2 = type.createElementNS( + "http://www.w3.org/1998/Math/MathML", + renderLanes2 + ); + break; + default: + switch (renderLanes2) { + case "svg": + current2 = type.createElementNS( + "http://www.w3.org/2000/svg", + renderLanes2 + ); + break; + case "math": + current2 = type.createElementNS( + "http://www.w3.org/1998/Math/MathML", + renderLanes2 + ); + break; + case "script": + current2 = type.createElement("div"); + current2.innerHTML = " - + +
diff --git a/py_neuromodulation/main.py b/py_neuromodulation/main.py new file mode 100644 index 00000000..1de26117 --- /dev/null +++ b/py_neuromodulation/main.py @@ -0,0 +1,37 @@ +""" +This script helps to start the backend and creating a webview. +A .dmg can be created by running the following + + + pyinstaller --noconsole --onefile --name NeuromodApp main.py + + -> Will use this script to run the backend and serve the FE files + + hdiutil create -volname "NeuromodApp" -srcfolder dist/NeuromodApp.app -ov -format UDZO NeuromodApp.dmg + + -> Will create a .dmg file + +""" + +import threading +import uvicorn +import webview +from .run_gui import main # import your existing script + +from py_neuromodulation.stream import LSLOfflinePlayer +from gui.backend.app_manager import run_uvicorn + +SERVER_PORT = 8000 +HOST = "localhost" + +def start_backend(): + player = LSLOfflinePlayer(raw=raw, stream_name="example_stream") + player.start_player(chunk_size=30, n_repeat=5999999) + + run_uvicorn(debug=False, reload=True, server_port=SERVER_PORT) + +if __name__ == "__main__": + t = threading.Thread(target=start_backend, daemon=True) + t.start() + webview.create_window("Neuromodulation App", "http://{}:{}".format(HOST, SERVER_PORT)) + webview.start()