UNPKG

493 kBJavaScriptView Raw
1/**
2 * @license React
3 * react-dom-client.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */
10
11/*
12 Modernizr 3.0.0pre (Custom Build) | MIT
13*/
14"use strict";
15var Scheduler = require("scheduler"),
16 React = require("react"),
17 ReactDOM = require("react-dom");
18function formatProdErrorMessage(code) {
19 var url = "https://react.dev/errors/" + code;
20 if (1 < arguments.length) {
21 url += "?args[]=" + encodeURIComponent(arguments[1]);
22 for (var i = 2; i < arguments.length; i++)
23 url += "&args[]=" + encodeURIComponent(arguments[i]);
24 }
25 return (
26 "Minified React error #" +
27 code +
28 "; visit " +
29 url +
30 " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
31 );
32}
33function isValidContainer(node) {
34 return !(
35 !node ||
36 (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)
37 );
38}
39var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
40 REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
41 REACT_PORTAL_TYPE = Symbol.for("react.portal"),
42 REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
43 REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
44 REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
45 REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
46 REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
47 REACT_CONTEXT_TYPE = Symbol.for("react.context"),
48 REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
49 REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
50 REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
51 REACT_MEMO_TYPE = Symbol.for("react.memo"),
52 REACT_LAZY_TYPE = Symbol.for("react.lazy");
53Symbol.for("react.scope");
54Symbol.for("react.debug_trace_mode");
55var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
56Symbol.for("react.legacy_hidden");
57Symbol.for("react.tracing_marker");
58var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
59function getIteratorFn(maybeIterable) {
60 if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
61 maybeIterable =
62 (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
63 maybeIterable["@@iterator"];
64 return "function" === typeof maybeIterable ? maybeIterable : null;
65}
66Symbol.for("react.client.reference");
67function getNearestMountedFiber(fiber) {
68 var node = fiber,
69 nearestMounted = fiber;
70 if (fiber.alternate) for (; node.return; ) node = node.return;
71 else {
72 fiber = node;
73 do
74 (node = fiber),
75 0 !== (node.flags & 4098) && (nearestMounted = node.return),
76 (fiber = node.return);
77 while (fiber);
78 }
79 return 3 === node.tag ? nearestMounted : null;
80}
81function getSuspenseInstanceFromFiber(fiber) {
82 if (13 === fiber.tag) {
83 var suspenseState = fiber.memoizedState;
84 null === suspenseState &&
85 ((fiber = fiber.alternate),
86 null !== fiber && (suspenseState = fiber.memoizedState));
87 if (null !== suspenseState) return suspenseState.dehydrated;
88 }
89 return null;
90}
91function assertIsMounted(fiber) {
92 if (getNearestMountedFiber(fiber) !== fiber)
93 throw Error(formatProdErrorMessage(188));
94}
95function findCurrentFiberUsingSlowPath(fiber) {
96 var alternate = fiber.alternate;
97 if (!alternate) {
98 alternate = getNearestMountedFiber(fiber);
99 if (null === alternate) throw Error(formatProdErrorMessage(188));
100 return alternate !== fiber ? null : fiber;
101 }
102 for (var a = fiber, b = alternate; ; ) {
103 var parentA = a.return;
104 if (null === parentA) break;
105 var parentB = parentA.alternate;
106 if (null === parentB) {
107 b = parentA.return;
108 if (null !== b) {
109 a = b;
110 continue;
111 }
112 break;
113 }
114 if (parentA.child === parentB.child) {
115 for (parentB = parentA.child; parentB; ) {
116 if (parentB === a) return assertIsMounted(parentA), fiber;
117 if (parentB === b) return assertIsMounted(parentA), alternate;
118 parentB = parentB.sibling;
119 }
120 throw Error(formatProdErrorMessage(188));
121 }
122 if (a.return !== b.return) (a = parentA), (b = parentB);
123 else {
124 for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {
125 if (child$0 === a) {
126 didFindChild = !0;
127 a = parentA;
128 b = parentB;
129 break;
130 }
131 if (child$0 === b) {
132 didFindChild = !0;
133 b = parentA;
134 a = parentB;
135 break;
136 }
137 child$0 = child$0.sibling;
138 }
139 if (!didFindChild) {
140 for (child$0 = parentB.child; child$0; ) {
141 if (child$0 === a) {
142 didFindChild = !0;
143 a = parentB;
144 b = parentA;
145 break;
146 }
147 if (child$0 === b) {
148 didFindChild = !0;
149 b = parentB;
150 a = parentA;
151 break;
152 }
153 child$0 = child$0.sibling;
154 }
155 if (!didFindChild) throw Error(formatProdErrorMessage(189));
156 }
157 }
158 if (a.alternate !== b) throw Error(formatProdErrorMessage(190));
159 }
160 if (3 !== a.tag) throw Error(formatProdErrorMessage(188));
161 return a.stateNode.current === a ? fiber : alternate;
162}
163function findCurrentHostFiber(parent) {
164 parent = findCurrentFiberUsingSlowPath(parent);
165 return null !== parent ? findCurrentHostFiberImpl(parent) : null;
166}
167function findCurrentHostFiberImpl(node) {
168 var tag = node.tag;
169 if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
170 for (node = node.child; null !== node; ) {
171 tag = findCurrentHostFiberImpl(node);
172 if (null !== tag) return tag;
173 node = node.sibling;
174 }
175 return null;
176}
177var assign = Object.assign,
178 isArrayImpl = Array.isArray,
179 ReactSharedInternals =
180 React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
181 ReactDOMSharedInternals =
182 ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
183 sharedNotPendingObject = {
184 pending: !1,
185 data: null,
186 method: null,
187 action: null
188 },
189 valueStack = [],
190 index = -1;
191function createCursor(defaultValue) {
192 return { current: defaultValue };
193}
194function pop(cursor) {
195 0 > index ||
196 ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
197}
198function push(cursor, value) {
199 index++;
200 valueStack[index] = cursor.current;
201 cursor.current = value;
202}
203var contextStackCursor = createCursor(null),
204 contextFiberStackCursor = createCursor(null),
205 rootInstanceStackCursor = createCursor(null),
206 hostTransitionProviderCursor = createCursor(null),
207 HostTransitionContext = {
208 $$typeof: REACT_CONTEXT_TYPE,
209 Provider: null,
210 Consumer: null,
211 _currentValue: null,
212 _currentValue2: null,
213 _threadCount: 0
214 };
215function pushHostContainer(fiber, nextRootInstance) {
216 push(rootInstanceStackCursor, nextRootInstance);
217 push(contextFiberStackCursor, fiber);
218 push(contextStackCursor, null);
219 fiber = nextRootInstance.nodeType;
220 switch (fiber) {
221 case 9:
222 case 11:
223 nextRootInstance = (nextRootInstance = nextRootInstance.documentElement)
224 ? (nextRootInstance = nextRootInstance.namespaceURI)
225 ? getOwnHostContext(nextRootInstance)
226 : 0
227 : 0;
228 break;
229 default:
230 if (
231 ((fiber = 8 === fiber ? nextRootInstance.parentNode : nextRootInstance),
232 (nextRootInstance = fiber.tagName),
233 (fiber = fiber.namespaceURI))
234 )
235 (fiber = getOwnHostContext(fiber)),
236 (nextRootInstance = getChildHostContextProd(fiber, nextRootInstance));
237 else
238 switch (nextRootInstance) {
239 case "svg":
240 nextRootInstance = 1;
241 break;
242 case "math":
243 nextRootInstance = 2;
244 break;
245 default:
246 nextRootInstance = 0;
247 }
248 }
249 pop(contextStackCursor);
250 push(contextStackCursor, nextRootInstance);
251}
252function popHostContainer() {
253 pop(contextStackCursor);
254 pop(contextFiberStackCursor);
255 pop(rootInstanceStackCursor);
256}
257function pushHostContext(fiber) {
258 null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber);
259 var context = contextStackCursor.current;
260 var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type);
261 context !== JSCompiler_inline_result &&
262 (push(contextFiberStackCursor, fiber),
263 push(contextStackCursor, JSCompiler_inline_result));
264}
265function popHostContext(fiber) {
266 contextFiberStackCursor.current === fiber &&
267 (pop(contextStackCursor), pop(contextFiberStackCursor));
268 hostTransitionProviderCursor.current === fiber &&
269 (pop(hostTransitionProviderCursor),
270 (HostTransitionContext._currentValue = null));
271}
272var hasOwnProperty = Object.prototype.hasOwnProperty,
273 scheduleCallback$3 = Scheduler.unstable_scheduleCallback,
274 cancelCallback$1 = Scheduler.unstable_cancelCallback,
275 shouldYield = Scheduler.unstable_shouldYield,
276 requestPaint = Scheduler.unstable_requestPaint,
277 now = Scheduler.unstable_now,
278 getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
279 ImmediatePriority = Scheduler.unstable_ImmediatePriority,
280 UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
281 NormalPriority$1 = Scheduler.unstable_NormalPriority,
282 LowPriority = Scheduler.unstable_LowPriority,
283 IdlePriority = Scheduler.unstable_IdlePriority,
284 log$1 = Scheduler.log,
285 unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
286 rendererID = null,
287 injectedHook = null;
288function onCommitRoot(root) {
289 if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
290 try {
291 injectedHook.onCommitFiberRoot(
292 rendererID,
293 root,
294 void 0,
295 128 === (root.current.flags & 128)
296 );
297 } catch (err) {}
298}
299function setIsStrictModeForDevtools(newIsStrictMode) {
300 "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
301 if (injectedHook && "function" === typeof injectedHook.setStrictMode)
302 try {
303 injectedHook.setStrictMode(rendererID, newIsStrictMode);
304 } catch (err) {}
305}
306var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
307 log = Math.log,
308 LN2 = Math.LN2;
309function clz32Fallback(x) {
310 x >>>= 0;
311 return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
312}
313var nextTransitionLane = 128,
314 nextRetryLane = 4194304;
315function getHighestPriorityLanes(lanes) {
316 var pendingSyncLanes = lanes & 42;
317 if (0 !== pendingSyncLanes) return pendingSyncLanes;
318 switch (lanes & -lanes) {
319 case 1:
320 return 1;
321 case 2:
322 return 2;
323 case 4:
324 return 4;
325 case 8:
326 return 8;
327 case 16:
328 return 16;
329 case 32:
330 return 32;
331 case 64:
332 return 64;
333 case 128:
334 case 256:
335 case 512:
336 case 1024:
337 case 2048:
338 case 4096:
339 case 8192:
340 case 16384:
341 case 32768:
342 case 65536:
343 case 131072:
344 case 262144:
345 case 524288:
346 case 1048576:
347 case 2097152:
348 return lanes & 4194176;
349 case 4194304:
350 case 8388608:
351 case 16777216:
352 case 33554432:
353 return lanes & 62914560;
354 case 67108864:
355 return 67108864;
356 case 134217728:
357 return 134217728;
358 case 268435456:
359 return 268435456;
360 case 536870912:
361 return 536870912;
362 case 1073741824:
363 return 0;
364 default:
365 return lanes;
366 }
367}
368function getNextLanes(root, wipLanes) {
369 var pendingLanes = root.pendingLanes;
370 if (0 === pendingLanes) return 0;
371 var nextLanes = 0,
372 suspendedLanes = root.suspendedLanes;
373 root = root.pingedLanes;
374 var nonIdlePendingLanes = pendingLanes & 134217727;
375 0 !== nonIdlePendingLanes
376 ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
377 0 !== pendingLanes
378 ? (nextLanes = getHighestPriorityLanes(pendingLanes))
379 : ((root &= nonIdlePendingLanes),
380 0 !== root && (nextLanes = getHighestPriorityLanes(root))))
381 : ((pendingLanes &= ~suspendedLanes),
382 0 !== pendingLanes
383 ? (nextLanes = getHighestPriorityLanes(pendingLanes))
384 : 0 !== root && (nextLanes = getHighestPriorityLanes(root)));
385 return 0 === nextLanes
386 ? 0
387 : 0 !== wipLanes &&
388 wipLanes !== nextLanes &&
389 0 === (wipLanes & suspendedLanes) &&
390 ((suspendedLanes = nextLanes & -nextLanes),
391 (root = wipLanes & -wipLanes),
392 suspendedLanes >= root ||
393 (32 === suspendedLanes && 0 !== (root & 4194176)))
394 ? wipLanes
395 : nextLanes;
396}
397function computeExpirationTime(lane, currentTime) {
398 switch (lane) {
399 case 1:
400 case 2:
401 case 4:
402 case 8:
403 return currentTime + 250;
404 case 16:
405 case 32:
406 case 64:
407 case 128:
408 case 256:
409 case 512:
410 case 1024:
411 case 2048:
412 case 4096:
413 case 8192:
414 case 16384:
415 case 32768:
416 case 65536:
417 case 131072:
418 case 262144:
419 case 524288:
420 case 1048576:
421 case 2097152:
422 return currentTime + 5e3;
423 case 4194304:
424 case 8388608:
425 case 16777216:
426 case 33554432:
427 return -1;
428 case 67108864:
429 case 134217728:
430 case 268435456:
431 case 536870912:
432 case 1073741824:
433 return -1;
434 default:
435 return -1;
436 }
437}
438function getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) {
439 if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0;
440 root = root.pendingLanes & -536870913;
441 return 0 !== root ? root : root & 536870912 ? 536870912 : 0;
442}
443function claimNextTransitionLane() {
444 var lane = nextTransitionLane;
445 nextTransitionLane <<= 1;
446 0 === (nextTransitionLane & 4194176) && (nextTransitionLane = 128);
447 return lane;
448}
449function claimNextRetryLane() {
450 var lane = nextRetryLane;
451 nextRetryLane <<= 1;
452 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
453 return lane;
454}
455function createLaneMap(initial) {
456 for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
457 return laneMap;
458}
459function markRootFinished(root, remainingLanes, spawnedLane) {
460 var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
461 root.pendingLanes = remainingLanes;
462 root.suspendedLanes = 0;
463 root.pingedLanes = 0;
464 root.expiredLanes &= remainingLanes;
465 root.entangledLanes &= remainingLanes;
466 root.errorRecoveryDisabledLanes &= remainingLanes;
467 root.shellSuspendCounter = 0;
468 remainingLanes = root.entanglements;
469 for (
470 var expirationTimes = root.expirationTimes,
471 hiddenUpdates = root.hiddenUpdates;
472 0 < noLongerPendingLanes;
473
474 ) {
475 var index$4 = 31 - clz32(noLongerPendingLanes),
476 lane = 1 << index$4;
477 remainingLanes[index$4] = 0;
478 expirationTimes[index$4] = -1;
479 var hiddenUpdatesForLane = hiddenUpdates[index$4];
480 if (null !== hiddenUpdatesForLane)
481 for (
482 hiddenUpdates[index$4] = null, index$4 = 0;
483 index$4 < hiddenUpdatesForLane.length;
484 index$4++
485 ) {
486 var update = hiddenUpdatesForLane[index$4];
487 null !== update && (update.lane &= -536870913);
488 }
489 noLongerPendingLanes &= ~lane;
490 }
491 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
492}
493function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
494 root.pendingLanes |= spawnedLane;
495 root.suspendedLanes &= ~spawnedLane;
496 var spawnedLaneIndex = 31 - clz32(spawnedLane);
497 root.entangledLanes |= spawnedLane;
498 root.entanglements[spawnedLaneIndex] =
499 root.entanglements[spawnedLaneIndex] |
500 1073741824 |
501 (entangledLanes & 4194218);
502}
503function markRootEntangled(root, entangledLanes) {
504 var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
505 for (root = root.entanglements; rootEntangledLanes; ) {
506 var index$5 = 31 - clz32(rootEntangledLanes),
507 lane = 1 << index$5;
508 (lane & entangledLanes) | (root[index$5] & entangledLanes) &&
509 (root[index$5] |= entangledLanes);
510 rootEntangledLanes &= ~lane;
511 }
512}
513function lanesToEventPriority(lanes) {
514 lanes &= -lanes;
515 return 2 < lanes
516 ? 8 < lanes
517 ? 0 !== (lanes & 134217727)
518 ? 32
519 : 268435456
520 : 8
521 : 2;
522}
523function resolveUpdatePriority() {
524 var updatePriority = ReactDOMSharedInternals.p;
525 if (0 !== updatePriority) return updatePriority;
526 updatePriority = window.event;
527 return void 0 === updatePriority ? 32 : getEventPriority(updatePriority.type);
528}
529function runWithPriority(priority, fn) {
530 var previousPriority = ReactDOMSharedInternals.p;
531 try {
532 return (ReactDOMSharedInternals.p = priority), fn();
533 } finally {
534 ReactDOMSharedInternals.p = previousPriority;
535 }
536}
537var randomKey = Math.random().toString(36).slice(2),
538 internalInstanceKey = "__reactFiber$" + randomKey,
539 internalPropsKey = "__reactProps$" + randomKey,
540 internalContainerInstanceKey = "__reactContainer$" + randomKey,
541 internalEventHandlersKey = "__reactEvents$" + randomKey,
542 internalEventHandlerListenersKey = "__reactListeners$" + randomKey,
543 internalEventHandlesSetKey = "__reactHandles$" + randomKey,
544 internalRootNodeResourcesKey = "__reactResources$" + randomKey,
545 internalHoistableMarker = "__reactMarker$" + randomKey;
546function detachDeletedInstance(node) {
547 delete node[internalInstanceKey];
548 delete node[internalPropsKey];
549 delete node[internalEventHandlersKey];
550 delete node[internalEventHandlerListenersKey];
551 delete node[internalEventHandlesSetKey];
552}
553function getClosestInstanceFromNode(targetNode) {
554 var targetInst = targetNode[internalInstanceKey];
555 if (targetInst) return targetInst;
556 for (var parentNode = targetNode.parentNode; parentNode; ) {
557 if (
558 (targetInst =
559 parentNode[internalContainerInstanceKey] ||
560 parentNode[internalInstanceKey])
561 ) {
562 parentNode = targetInst.alternate;
563 if (
564 null !== targetInst.child ||
565 (null !== parentNode && null !== parentNode.child)
566 )
567 for (
568 targetNode = getParentSuspenseInstance(targetNode);
569 null !== targetNode;
570
571 ) {
572 if ((parentNode = targetNode[internalInstanceKey])) return parentNode;
573 targetNode = getParentSuspenseInstance(targetNode);
574 }
575 return targetInst;
576 }
577 targetNode = parentNode;
578 parentNode = targetNode.parentNode;
579 }
580 return null;
581}
582function getInstanceFromNode(node) {
583 if (
584 (node = node[internalInstanceKey] || node[internalContainerInstanceKey])
585 ) {
586 var tag = node.tag;
587 if (
588 5 === tag ||
589 6 === tag ||
590 13 === tag ||
591 26 === tag ||
592 27 === tag ||
593 3 === tag
594 )
595 return node;
596 }
597 return null;
598}
599function getNodeFromInstance(inst) {
600 var tag = inst.tag;
601 if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode;
602 throw Error(formatProdErrorMessage(33));
603}
604function getResourcesFromRoot(root) {
605 var resources = root[internalRootNodeResourcesKey];
606 resources ||
607 (resources = root[internalRootNodeResourcesKey] =
608 { hoistableStyles: new Map(), hoistableScripts: new Map() });
609 return resources;
610}
611function markNodeAsHoistable(node) {
612 node[internalHoistableMarker] = !0;
613}
614var allNativeEvents = new Set(),
615 registrationNameDependencies = {};
616function registerTwoPhaseEvent(registrationName, dependencies) {
617 registerDirectEvent(registrationName, dependencies);
618 registerDirectEvent(registrationName + "Capture", dependencies);
619}
620function registerDirectEvent(registrationName, dependencies) {
621 registrationNameDependencies[registrationName] = dependencies;
622 for (
623 registrationName = 0;
624 registrationName < dependencies.length;
625 registrationName++
626 )
627 allNativeEvents.add(dependencies[registrationName]);
628}
629var canUseDOM = !(
630 "undefined" === typeof window ||
631 "undefined" === typeof window.document ||
632 "undefined" === typeof window.document.createElement
633 ),
634 VALID_ATTRIBUTE_NAME_REGEX = RegExp(
635 "^[: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]*$"
636 ),
637 illegalAttributeNameCache = {},
638 validatedAttributeNameCache = {};
639function isAttributeNameSafe(attributeName) {
640 if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
641 return !0;
642 if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;
643 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
644 return (validatedAttributeNameCache[attributeName] = !0);
645 illegalAttributeNameCache[attributeName] = !0;
646 return !1;
647}
648function setValueForAttribute(node, name, value) {
649 if (isAttributeNameSafe(name))
650 if (null === value) node.removeAttribute(name);
651 else {
652 switch (typeof value) {
653 case "undefined":
654 case "function":
655 case "symbol":
656 node.removeAttribute(name);
657 return;
658 case "boolean":
659 var prefix$7 = name.toLowerCase().slice(0, 5);
660 if ("data-" !== prefix$7 && "aria-" !== prefix$7) {
661 node.removeAttribute(name);
662 return;
663 }
664 }
665 node.setAttribute(name, "" + value);
666 }
667}
668function setValueForKnownAttribute(node, name, value) {
669 if (null === value) node.removeAttribute(name);
670 else {
671 switch (typeof value) {
672 case "undefined":
673 case "function":
674 case "symbol":
675 case "boolean":
676 node.removeAttribute(name);
677 return;
678 }
679 node.setAttribute(name, "" + value);
680 }
681}
682function setValueForNamespacedAttribute(node, namespace, name, value) {
683 if (null === value) node.removeAttribute(name);
684 else {
685 switch (typeof value) {
686 case "undefined":
687 case "function":
688 case "symbol":
689 case "boolean":
690 node.removeAttribute(name);
691 return;
692 }
693 node.setAttributeNS(namespace, name, "" + value);
694 }
695}
696var prefix;
697function describeBuiltInComponentFrame(name) {
698 if (void 0 === prefix)
699 try {
700 throw Error();
701 } catch (x) {
702 var match = x.stack.trim().match(/\n( *(at )?)/);
703 prefix = (match && match[1]) || "";
704 }
705 return "\n" + prefix + name;
706}
707var reentry = !1;
708function describeNativeComponentFrame(fn, construct) {
709 if (!fn || reentry) return "";
710 reentry = !0;
711 var previousPrepareStackTrace = Error.prepareStackTrace;
712 Error.prepareStackTrace = void 0;
713 var RunInRootFrame = {
714 DetermineComponentFrameRoot: function () {
715 try {
716 if (construct) {
717 var Fake = function () {
718 throw Error();
719 };
720 Object.defineProperty(Fake.prototype, "props", {
721 set: function () {
722 throw Error();
723 }
724 });
725 if ("object" === typeof Reflect && Reflect.construct) {
726 try {
727 Reflect.construct(Fake, []);
728 } catch (x) {
729 var control = x;
730 }
731 Reflect.construct(fn, [], Fake);
732 } else {
733 try {
734 Fake.call();
735 } catch (x$8) {
736 control = x$8;
737 }
738 fn.call(Fake.prototype);
739 }
740 } else {
741 try {
742 throw Error();
743 } catch (x$9) {
744 control = x$9;
745 }
746 (Fake = fn()) &&
747 "function" === typeof Fake.catch &&
748 Fake.catch(function () {});
749 }
750 } catch (sample) {
751 if (sample && control && "string" === typeof sample.stack)
752 return [sample.stack, control.stack];
753 }
754 return [null, null];
755 }
756 };
757 RunInRootFrame.DetermineComponentFrameRoot.displayName =
758 "DetermineComponentFrameRoot";
759 var namePropDescriptor = Object.getOwnPropertyDescriptor(
760 RunInRootFrame.DetermineComponentFrameRoot,
761 "name"
762 );
763 namePropDescriptor &&
764 namePropDescriptor.configurable &&
765 Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", {
766 value: "DetermineComponentFrameRoot"
767 });
768 try {
769 var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
770 sampleStack = _RunInRootFrame$Deter[0],
771 controlStack = _RunInRootFrame$Deter[1];
772 if (sampleStack && controlStack) {
773 var sampleLines = sampleStack.split("\n"),
774 controlLines = controlStack.split("\n");
775 for (
776 namePropDescriptor = RunInRootFrame = 0;
777 RunInRootFrame < sampleLines.length &&
778 !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot");
779
780 )
781 RunInRootFrame++;
782 for (
783 ;
784 namePropDescriptor < controlLines.length &&
785 !controlLines[namePropDescriptor].includes(
786 "DetermineComponentFrameRoot"
787 );
788
789 )
790 namePropDescriptor++;
791 if (
792 RunInRootFrame === sampleLines.length ||
793 namePropDescriptor === controlLines.length
794 )
795 for (
796 RunInRootFrame = sampleLines.length - 1,
797 namePropDescriptor = controlLines.length - 1;
798 1 <= RunInRootFrame &&
799 0 <= namePropDescriptor &&
800 sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];
801
802 )
803 namePropDescriptor--;
804 for (
805 ;
806 1 <= RunInRootFrame && 0 <= namePropDescriptor;
807 RunInRootFrame--, namePropDescriptor--
808 )
809 if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
810 if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {
811 do
812 if (
813 (RunInRootFrame--,
814 namePropDescriptor--,
815 0 > namePropDescriptor ||
816 sampleLines[RunInRootFrame] !==
817 controlLines[namePropDescriptor])
818 ) {
819 var frame =
820 "\n" +
821 sampleLines[RunInRootFrame].replace(" at new ", " at ");
822 fn.displayName &&
823 frame.includes("<anonymous>") &&
824 (frame = frame.replace("<anonymous>", fn.displayName));
825 return frame;
826 }
827 while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
828 }
829 break;
830 }
831 }
832 } finally {
833 (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);
834 }
835 return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "")
836 ? describeBuiltInComponentFrame(previousPrepareStackTrace)
837 : "";
838}
839function describeFiber(fiber) {
840 switch (fiber.tag) {
841 case 26:
842 case 27:
843 case 5:
844 return describeBuiltInComponentFrame(fiber.type);
845 case 16:
846 return describeBuiltInComponentFrame("Lazy");
847 case 13:
848 return describeBuiltInComponentFrame("Suspense");
849 case 19:
850 return describeBuiltInComponentFrame("SuspenseList");
851 case 0:
852 case 15:
853 return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber;
854 case 11:
855 return (
856 (fiber = describeNativeComponentFrame(fiber.type.render, !1)), fiber
857 );
858 case 1:
859 return (fiber = describeNativeComponentFrame(fiber.type, !0)), fiber;
860 default:
861 return "";
862 }
863}
864function getStackByFiberInDevAndProd(workInProgress) {
865 try {
866 var info = "";
867 do
868 (info += describeFiber(workInProgress)),
869 (workInProgress = workInProgress.return);
870 while (workInProgress);
871 return info;
872 } catch (x) {
873 return "\nError generating stack: " + x.message + "\n" + x.stack;
874 }
875}
876function getToStringValue(value) {
877 switch (typeof value) {
878 case "bigint":
879 case "boolean":
880 case "number":
881 case "string":
882 case "undefined":
883 return value;
884 case "object":
885 return value;
886 default:
887 return "";
888 }
889}
890function isCheckable(elem) {
891 var type = elem.type;
892 return (
893 (elem = elem.nodeName) &&
894 "input" === elem.toLowerCase() &&
895 ("checkbox" === type || "radio" === type)
896 );
897}
898function trackValueOnNode(node) {
899 var valueField = isCheckable(node) ? "checked" : "value",
900 descriptor = Object.getOwnPropertyDescriptor(
901 node.constructor.prototype,
902 valueField
903 ),
904 currentValue = "" + node[valueField];
905 if (
906 !node.hasOwnProperty(valueField) &&
907 "undefined" !== typeof descriptor &&
908 "function" === typeof descriptor.get &&
909 "function" === typeof descriptor.set
910 ) {
911 var get = descriptor.get,
912 set = descriptor.set;
913 Object.defineProperty(node, valueField, {
914 configurable: !0,
915 get: function () {
916 return get.call(this);
917 },
918 set: function (value) {
919 currentValue = "" + value;
920 set.call(this, value);
921 }
922 });
923 Object.defineProperty(node, valueField, {
924 enumerable: descriptor.enumerable
925 });
926 return {
927 getValue: function () {
928 return currentValue;
929 },
930 setValue: function (value) {
931 currentValue = "" + value;
932 },
933 stopTracking: function () {
934 node._valueTracker = null;
935 delete node[valueField];
936 }
937 };
938 }
939}
940function track(node) {
941 node._valueTracker || (node._valueTracker = trackValueOnNode(node));
942}
943function updateValueIfChanged(node) {
944 if (!node) return !1;
945 var tracker = node._valueTracker;
946 if (!tracker) return !0;
947 var lastValue = tracker.getValue();
948 var value = "";
949 node &&
950 (value = isCheckable(node)
951 ? node.checked
952 ? "true"
953 : "false"
954 : node.value);
955 node = value;
956 return node !== lastValue ? (tracker.setValue(node), !0) : !1;
957}
958function getActiveElement(doc) {
959 doc = doc || ("undefined" !== typeof document ? document : void 0);
960 if ("undefined" === typeof doc) return null;
961 try {
962 return doc.activeElement || doc.body;
963 } catch (e) {
964 return doc.body;
965 }
966}
967var escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g;
968function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
969 return value.replace(
970 escapeSelectorAttributeValueInsideDoubleQuotesRegex,
971 function (ch) {
972 return "\\" + ch.charCodeAt(0).toString(16) + " ";
973 }
974 );
975}
976function updateInput(
977 element,
978 value,
979 defaultValue,
980 lastDefaultValue,
981 checked,
982 defaultChecked,
983 type,
984 name
985) {
986 element.name = "";
987 null != type &&
988 "function" !== typeof type &&
989 "symbol" !== typeof type &&
990 "boolean" !== typeof type
991 ? (element.type = type)
992 : element.removeAttribute("type");
993 if (null != value)
994 if ("number" === type) {
995 if ((0 === value && "" === element.value) || element.value != value)
996 element.value = "" + getToStringValue(value);
997 } else
998 element.value !== "" + getToStringValue(value) &&
999 (element.value = "" + getToStringValue(value));
1000 else
1001 ("submit" !== type && "reset" !== type) || element.removeAttribute("value");
1002 null != value
1003 ? setDefaultValue(element, type, getToStringValue(value))
1004 : null != defaultValue
1005 ? setDefaultValue(element, type, getToStringValue(defaultValue))
1006 : null != lastDefaultValue && element.removeAttribute("value");
1007 null == checked &&
1008 null != defaultChecked &&
1009 (element.defaultChecked = !!defaultChecked);
1010 null != checked &&
1011 (element.checked =
1012 checked && "function" !== typeof checked && "symbol" !== typeof checked);
1013 null != name &&
1014 "function" !== typeof name &&
1015 "symbol" !== typeof name &&
1016 "boolean" !== typeof name
1017 ? (element.name = "" + getToStringValue(name))
1018 : element.removeAttribute("name");
1019}
1020function initInput(
1021 element,
1022 value,
1023 defaultValue,
1024 checked,
1025 defaultChecked,
1026 type,
1027 name,
1028 isHydrating
1029) {
1030 null != type &&
1031 "function" !== typeof type &&
1032 "symbol" !== typeof type &&
1033 "boolean" !== typeof type &&
1034 (element.type = type);
1035 if (null != value || null != defaultValue) {
1036 if (
1037 !(
1038 ("submit" !== type && "reset" !== type) ||
1039 (void 0 !== value && null !== value)
1040 )
1041 )
1042 return;
1043 defaultValue =
1044 null != defaultValue ? "" + getToStringValue(defaultValue) : "";
1045 value = null != value ? "" + getToStringValue(value) : defaultValue;
1046 isHydrating || value === element.value || (element.value = value);
1047 element.defaultValue = value;
1048 }
1049 checked = null != checked ? checked : defaultChecked;
1050 checked =
1051 "function" !== typeof checked && "symbol" !== typeof checked && !!checked;
1052 element.checked = isHydrating ? element.checked : !!checked;
1053 element.defaultChecked = !!checked;
1054 null != name &&
1055 "function" !== typeof name &&
1056 "symbol" !== typeof name &&
1057 "boolean" !== typeof name &&
1058 (element.name = name);
1059}
1060function setDefaultValue(node, type, value) {
1061 ("number" === type && getActiveElement(node.ownerDocument) === node) ||
1062 node.defaultValue === "" + value ||
1063 (node.defaultValue = "" + value);
1064}
1065function updateOptions(node, multiple, propValue, setDefaultSelected) {
1066 node = node.options;
1067 if (multiple) {
1068 multiple = {};
1069 for (var i = 0; i < propValue.length; i++)
1070 multiple["$" + propValue[i]] = !0;
1071 for (propValue = 0; propValue < node.length; propValue++)
1072 (i = multiple.hasOwnProperty("$" + node[propValue].value)),
1073 node[propValue].selected !== i && (node[propValue].selected = i),
1074 i && setDefaultSelected && (node[propValue].defaultSelected = !0);
1075 } else {
1076 propValue = "" + getToStringValue(propValue);
1077 multiple = null;
1078 for (i = 0; i < node.length; i++) {
1079 if (node[i].value === propValue) {
1080 node[i].selected = !0;
1081 setDefaultSelected && (node[i].defaultSelected = !0);
1082 return;
1083 }
1084 null !== multiple || node[i].disabled || (multiple = node[i]);
1085 }
1086 null !== multiple && (multiple.selected = !0);
1087 }
1088}
1089function updateTextarea(element, value, defaultValue) {
1090 if (
1091 null != value &&
1092 ((value = "" + getToStringValue(value)),
1093 value !== element.value && (element.value = value),
1094 null == defaultValue)
1095 ) {
1096 element.defaultValue !== value && (element.defaultValue = value);
1097 return;
1098 }
1099 element.defaultValue =
1100 null != defaultValue ? "" + getToStringValue(defaultValue) : "";
1101}
1102function initTextarea(element, value, defaultValue, children) {
1103 if (null == value) {
1104 if (null != children) {
1105 if (null != defaultValue) throw Error(formatProdErrorMessage(92));
1106 if (isArrayImpl(children)) {
1107 if (1 < children.length) throw Error(formatProdErrorMessage(93));
1108 children = children[0];
1109 }
1110 defaultValue = children;
1111 }
1112 null == defaultValue && (defaultValue = "");
1113 value = defaultValue;
1114 }
1115 defaultValue = getToStringValue(value);
1116 element.defaultValue = defaultValue;
1117 children = element.textContent;
1118 children === defaultValue &&
1119 "" !== children &&
1120 null !== children &&
1121 (element.value = children);
1122}
1123function setTextContent(node, text) {
1124 if (text) {
1125 var firstChild = node.firstChild;
1126 if (
1127 firstChild &&
1128 firstChild === node.lastChild &&
1129 3 === firstChild.nodeType
1130 ) {
1131 firstChild.nodeValue = text;
1132 return;
1133 }
1134 }
1135 node.textContent = text;
1136}
1137var unitlessNumbers = new Set(
1138 "animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(
1139 " "
1140 )
1141);
1142function setValueForStyle(style, styleName, value) {
1143 var isCustomProperty = 0 === styleName.indexOf("--");
1144 null == value || "boolean" === typeof value || "" === value
1145 ? isCustomProperty
1146 ? style.setProperty(styleName, "")
1147 : "float" === styleName
1148 ? (style.cssFloat = "")
1149 : (style[styleName] = "")
1150 : isCustomProperty
1151 ? style.setProperty(styleName, value)
1152 : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName)
1153 ? "float" === styleName
1154 ? (style.cssFloat = value)
1155 : (style[styleName] = ("" + value).trim())
1156 : (style[styleName] = value + "px");
1157}
1158function setValueForStyles(node, styles, prevStyles) {
1159 if (null != styles && "object" !== typeof styles)
1160 throw Error(formatProdErrorMessage(62));
1161 node = node.style;
1162 if (null != prevStyles) {
1163 for (var styleName in prevStyles)
1164 !prevStyles.hasOwnProperty(styleName) ||
1165 (null != styles && styles.hasOwnProperty(styleName)) ||
1166 (0 === styleName.indexOf("--")
1167 ? node.setProperty(styleName, "")
1168 : "float" === styleName
1169 ? (node.cssFloat = "")
1170 : (node[styleName] = ""));
1171 for (var styleName$15 in styles)
1172 (styleName = styles[styleName$15]),
1173 styles.hasOwnProperty(styleName$15) &&
1174 prevStyles[styleName$15] !== styleName &&
1175 setValueForStyle(node, styleName$15, styleName);
1176 } else
1177 for (var styleName$16 in styles)
1178 styles.hasOwnProperty(styleName$16) &&
1179 setValueForStyle(node, styleName$16, styles[styleName$16]);
1180}
1181function isCustomElement(tagName) {
1182 if (-1 === tagName.indexOf("-")) return !1;
1183 switch (tagName) {
1184 case "annotation-xml":
1185 case "color-profile":
1186 case "font-face":
1187 case "font-face-src":
1188 case "font-face-uri":
1189 case "font-face-format":
1190 case "font-face-name":
1191 case "missing-glyph":
1192 return !1;
1193 default:
1194 return !0;
1195 }
1196}
1197var aliases = new Map([
1198 ["acceptCharset", "accept-charset"],
1199 ["htmlFor", "for"],
1200 ["httpEquiv", "http-equiv"],
1201 ["crossOrigin", "crossorigin"],
1202 ["accentHeight", "accent-height"],
1203 ["alignmentBaseline", "alignment-baseline"],
1204 ["arabicForm", "arabic-form"],
1205 ["baselineShift", "baseline-shift"],
1206 ["capHeight", "cap-height"],
1207 ["clipPath", "clip-path"],
1208 ["clipRule", "clip-rule"],
1209 ["colorInterpolation", "color-interpolation"],
1210 ["colorInterpolationFilters", "color-interpolation-filters"],
1211 ["colorProfile", "color-profile"],
1212 ["colorRendering", "color-rendering"],
1213 ["dominantBaseline", "dominant-baseline"],
1214 ["enableBackground", "enable-background"],
1215 ["fillOpacity", "fill-opacity"],
1216 ["fillRule", "fill-rule"],
1217 ["floodColor", "flood-color"],
1218 ["floodOpacity", "flood-opacity"],
1219 ["fontFamily", "font-family"],
1220 ["fontSize", "font-size"],
1221 ["fontSizeAdjust", "font-size-adjust"],
1222 ["fontStretch", "font-stretch"],
1223 ["fontStyle", "font-style"],
1224 ["fontVariant", "font-variant"],
1225 ["fontWeight", "font-weight"],
1226 ["glyphName", "glyph-name"],
1227 ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
1228 ["glyphOrientationVertical", "glyph-orientation-vertical"],
1229 ["horizAdvX", "horiz-adv-x"],
1230 ["horizOriginX", "horiz-origin-x"],
1231 ["imageRendering", "image-rendering"],
1232 ["letterSpacing", "letter-spacing"],
1233 ["lightingColor", "lighting-color"],
1234 ["markerEnd", "marker-end"],
1235 ["markerMid", "marker-mid"],
1236 ["markerStart", "marker-start"],
1237 ["overlinePosition", "overline-position"],
1238 ["overlineThickness", "overline-thickness"],
1239 ["paintOrder", "paint-order"],
1240 ["panose-1", "panose-1"],
1241 ["pointerEvents", "pointer-events"],
1242 ["renderingIntent", "rendering-intent"],
1243 ["shapeRendering", "shape-rendering"],
1244 ["stopColor", "stop-color"],
1245 ["stopOpacity", "stop-opacity"],
1246 ["strikethroughPosition", "strikethrough-position"],
1247 ["strikethroughThickness", "strikethrough-thickness"],
1248 ["strokeDasharray", "stroke-dasharray"],
1249 ["strokeDashoffset", "stroke-dashoffset"],
1250 ["strokeLinecap", "stroke-linecap"],
1251 ["strokeLinejoin", "stroke-linejoin"],
1252 ["strokeMiterlimit", "stroke-miterlimit"],
1253 ["strokeOpacity", "stroke-opacity"],
1254 ["strokeWidth", "stroke-width"],
1255 ["textAnchor", "text-anchor"],
1256 ["textDecoration", "text-decoration"],
1257 ["textRendering", "text-rendering"],
1258 ["transformOrigin", "transform-origin"],
1259 ["underlinePosition", "underline-position"],
1260 ["underlineThickness", "underline-thickness"],
1261 ["unicodeBidi", "unicode-bidi"],
1262 ["unicodeRange", "unicode-range"],
1263 ["unitsPerEm", "units-per-em"],
1264 ["vAlphabetic", "v-alphabetic"],
1265 ["vHanging", "v-hanging"],
1266 ["vIdeographic", "v-ideographic"],
1267 ["vMathematical", "v-mathematical"],
1268 ["vectorEffect", "vector-effect"],
1269 ["vertAdvY", "vert-adv-y"],
1270 ["vertOriginX", "vert-origin-x"],
1271 ["vertOriginY", "vert-origin-y"],
1272 ["wordSpacing", "word-spacing"],
1273 ["writingMode", "writing-mode"],
1274 ["xmlnsXlink", "xmlns:xlink"],
1275 ["xHeight", "x-height"]
1276 ]),
1277 isJavaScriptProtocol =
1278 /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
1279function sanitizeURL(url) {
1280 return isJavaScriptProtocol.test("" + url)
1281 ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
1282 : url;
1283}
1284var currentReplayingEvent = null;
1285function getEventTarget(nativeEvent) {
1286 nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
1287 nativeEvent.correspondingUseElement &&
1288 (nativeEvent = nativeEvent.correspondingUseElement);
1289 return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
1290}
1291var restoreTarget = null,
1292 restoreQueue = null;
1293function restoreStateOfTarget(target) {
1294 var internalInstance = getInstanceFromNode(target);
1295 if (internalInstance && (target = internalInstance.stateNode)) {
1296 var props = target[internalPropsKey] || null;
1297 a: switch (((target = internalInstance.stateNode), internalInstance.type)) {
1298 case "input":
1299 updateInput(
1300 target,
1301 props.value,
1302 props.defaultValue,
1303 props.defaultValue,
1304 props.checked,
1305 props.defaultChecked,
1306 props.type,
1307 props.name
1308 );
1309 internalInstance = props.name;
1310 if ("radio" === props.type && null != internalInstance) {
1311 for (props = target; props.parentNode; ) props = props.parentNode;
1312 props = props.querySelectorAll(
1313 'input[name="' +
1314 escapeSelectorAttributeValueInsideDoubleQuotes(
1315 "" + internalInstance
1316 ) +
1317 '"][type="radio"]'
1318 );
1319 for (
1320 internalInstance = 0;
1321 internalInstance < props.length;
1322 internalInstance++
1323 ) {
1324 var otherNode = props[internalInstance];
1325 if (otherNode !== target && otherNode.form === target.form) {
1326 var otherProps = otherNode[internalPropsKey] || null;
1327 if (!otherProps) throw Error(formatProdErrorMessage(90));
1328 updateInput(
1329 otherNode,
1330 otherProps.value,
1331 otherProps.defaultValue,
1332 otherProps.defaultValue,
1333 otherProps.checked,
1334 otherProps.defaultChecked,
1335 otherProps.type,
1336 otherProps.name
1337 );
1338 }
1339 }
1340 for (
1341 internalInstance = 0;
1342 internalInstance < props.length;
1343 internalInstance++
1344 )
1345 (otherNode = props[internalInstance]),
1346 otherNode.form === target.form && updateValueIfChanged(otherNode);
1347 }
1348 break a;
1349 case "textarea":
1350 updateTextarea(target, props.value, props.defaultValue);
1351 break a;
1352 case "select":
1353 (internalInstance = props.value),
1354 null != internalInstance &&
1355 updateOptions(target, !!props.multiple, internalInstance, !1);
1356 }
1357 }
1358}
1359var isInsideEventHandler = !1;
1360function batchedUpdates$1(fn, a, b) {
1361 if (isInsideEventHandler) return fn(a, b);
1362 isInsideEventHandler = !0;
1363 try {
1364 var JSCompiler_inline_result = fn(a);
1365 return JSCompiler_inline_result;
1366 } finally {
1367 if (
1368 ((isInsideEventHandler = !1),
1369 null !== restoreTarget || null !== restoreQueue)
1370 )
1371 if (
1372 (flushSyncWork$1(),
1373 restoreTarget &&
1374 ((a = restoreTarget),
1375 (fn = restoreQueue),
1376 (restoreQueue = restoreTarget = null),
1377 restoreStateOfTarget(a),
1378 fn))
1379 )
1380 for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
1381 }
1382}
1383function getListener(inst, registrationName) {
1384 var stateNode = inst.stateNode;
1385 if (null === stateNode) return null;
1386 var props = stateNode[internalPropsKey] || null;
1387 if (null === props) return null;
1388 stateNode = props[registrationName];
1389 a: switch (registrationName) {
1390 case "onClick":
1391 case "onClickCapture":
1392 case "onDoubleClick":
1393 case "onDoubleClickCapture":
1394 case "onMouseDown":
1395 case "onMouseDownCapture":
1396 case "onMouseMove":
1397 case "onMouseMoveCapture":
1398 case "onMouseUp":
1399 case "onMouseUpCapture":
1400 case "onMouseEnter":
1401 (props = !props.disabled) ||
1402 ((inst = inst.type),
1403 (props = !(
1404 "button" === inst ||
1405 "input" === inst ||
1406 "select" === inst ||
1407 "textarea" === inst
1408 )));
1409 inst = !props;
1410 break a;
1411 default:
1412 inst = !1;
1413 }
1414 if (inst) return null;
1415 if (stateNode && "function" !== typeof stateNode)
1416 throw Error(
1417 formatProdErrorMessage(231, registrationName, typeof stateNode)
1418 );
1419 return stateNode;
1420}
1421var passiveBrowserEventsSupported = !1;
1422if (canUseDOM)
1423 try {
1424 var options = {};
1425 Object.defineProperty(options, "passive", {
1426 get: function () {
1427 passiveBrowserEventsSupported = !0;
1428 }
1429 });
1430 window.addEventListener("test", options, options);
1431 window.removeEventListener("test", options, options);
1432 } catch (e) {
1433 passiveBrowserEventsSupported = !1;
1434 }
1435var root = null,
1436 startText = null,
1437 fallbackText = null;
1438function getData() {
1439 if (fallbackText) return fallbackText;
1440 var start,
1441 startValue = startText,
1442 startLength = startValue.length,
1443 end,
1444 endValue = "value" in root ? root.value : root.textContent,
1445 endLength = endValue.length;
1446 for (
1447 start = 0;
1448 start < startLength && startValue[start] === endValue[start];
1449 start++
1450 );
1451 var minEnd = startLength - start;
1452 for (
1453 end = 1;
1454 end <= minEnd &&
1455 startValue[startLength - end] === endValue[endLength - end];
1456 end++
1457 );
1458 return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));
1459}
1460function getEventCharCode(nativeEvent) {
1461 var keyCode = nativeEvent.keyCode;
1462 "charCode" in nativeEvent
1463 ? ((nativeEvent = nativeEvent.charCode),
1464 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))
1465 : (nativeEvent = keyCode);
1466 10 === nativeEvent && (nativeEvent = 13);
1467 return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
1468}
1469function functionThatReturnsTrue() {
1470 return !0;
1471}
1472function functionThatReturnsFalse() {
1473 return !1;
1474}
1475function createSyntheticEvent(Interface) {
1476 function SyntheticBaseEvent(
1477 reactName,
1478 reactEventType,
1479 targetInst,
1480 nativeEvent,
1481 nativeEventTarget
1482 ) {
1483 this._reactName = reactName;
1484 this._targetInst = targetInst;
1485 this.type = reactEventType;
1486 this.nativeEvent = nativeEvent;
1487 this.target = nativeEventTarget;
1488 this.currentTarget = null;
1489 for (var propName in Interface)
1490 Interface.hasOwnProperty(propName) &&
1491 ((reactName = Interface[propName]),
1492 (this[propName] = reactName
1493 ? reactName(nativeEvent)
1494 : nativeEvent[propName]));
1495 this.isDefaultPrevented = (
1496 null != nativeEvent.defaultPrevented
1497 ? nativeEvent.defaultPrevented
1498 : !1 === nativeEvent.returnValue
1499 )
1500 ? functionThatReturnsTrue
1501 : functionThatReturnsFalse;
1502 this.isPropagationStopped = functionThatReturnsFalse;
1503 return this;
1504 }
1505 assign(SyntheticBaseEvent.prototype, {
1506 preventDefault: function () {
1507 this.defaultPrevented = !0;
1508 var event = this.nativeEvent;
1509 event &&
1510 (event.preventDefault
1511 ? event.preventDefault()
1512 : "unknown" !== typeof event.returnValue && (event.returnValue = !1),
1513 (this.isDefaultPrevented = functionThatReturnsTrue));
1514 },
1515 stopPropagation: function () {
1516 var event = this.nativeEvent;
1517 event &&
1518 (event.stopPropagation
1519 ? event.stopPropagation()
1520 : "unknown" !== typeof event.cancelBubble &&
1521 (event.cancelBubble = !0),
1522 (this.isPropagationStopped = functionThatReturnsTrue));
1523 },
1524 persist: function () {},
1525 isPersistent: functionThatReturnsTrue
1526 });
1527 return SyntheticBaseEvent;
1528}
1529var EventInterface = {
1530 eventPhase: 0,
1531 bubbles: 0,
1532 cancelable: 0,
1533 timeStamp: function (event) {
1534 return event.timeStamp || Date.now();
1535 },
1536 defaultPrevented: 0,
1537 isTrusted: 0
1538 },
1539 SyntheticEvent = createSyntheticEvent(EventInterface),
1540 UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),
1541 SyntheticUIEvent = createSyntheticEvent(UIEventInterface),
1542 lastMovementX,
1543 lastMovementY,
1544 lastMouseEvent,
1545 MouseEventInterface = assign({}, UIEventInterface, {
1546 screenX: 0,
1547 screenY: 0,
1548 clientX: 0,
1549 clientY: 0,
1550 pageX: 0,
1551 pageY: 0,
1552 ctrlKey: 0,
1553 shiftKey: 0,
1554 altKey: 0,
1555 metaKey: 0,
1556 getModifierState: getEventModifierState,
1557 button: 0,
1558 buttons: 0,
1559 relatedTarget: function (event) {
1560 return void 0 === event.relatedTarget
1561 ? event.fromElement === event.srcElement
1562 ? event.toElement
1563 : event.fromElement
1564 : event.relatedTarget;
1565 },
1566 movementX: function (event) {
1567 if ("movementX" in event) return event.movementX;
1568 event !== lastMouseEvent &&
1569 (lastMouseEvent && "mousemove" === event.type
1570 ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),
1571 (lastMovementY = event.screenY - lastMouseEvent.screenY))
1572 : (lastMovementY = lastMovementX = 0),
1573 (lastMouseEvent = event));
1574 return lastMovementX;
1575 },
1576 movementY: function (event) {
1577 return "movementY" in event ? event.movementY : lastMovementY;
1578 }
1579 }),
1580 SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),
1581 DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),
1582 SyntheticDragEvent = createSyntheticEvent(DragEventInterface),
1583 FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),
1584 SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),
1585 AnimationEventInterface = assign({}, EventInterface, {
1586 animationName: 0,
1587 elapsedTime: 0,
1588 pseudoElement: 0
1589 }),
1590 SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),
1591 ClipboardEventInterface = assign({}, EventInterface, {
1592 clipboardData: function (event) {
1593 return "clipboardData" in event
1594 ? event.clipboardData
1595 : window.clipboardData;
1596 }
1597 }),
1598 SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),
1599 CompositionEventInterface = assign({}, EventInterface, { data: 0 }),
1600 SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface),
1601 normalizeKey = {
1602 Esc: "Escape",
1603 Spacebar: " ",
1604 Left: "ArrowLeft",
1605 Up: "ArrowUp",
1606 Right: "ArrowRight",
1607 Down: "ArrowDown",
1608 Del: "Delete",
1609 Win: "OS",
1610 Menu: "ContextMenu",
1611 Apps: "ContextMenu",
1612 Scroll: "ScrollLock",
1613 MozPrintableKey: "Unidentified"
1614 },
1615 translateToKey = {
1616 8: "Backspace",
1617 9: "Tab",
1618 12: "Clear",
1619 13: "Enter",
1620 16: "Shift",
1621 17: "Control",
1622 18: "Alt",
1623 19: "Pause",
1624 20: "CapsLock",
1625 27: "Escape",
1626 32: " ",
1627 33: "PageUp",
1628 34: "PageDown",
1629 35: "End",
1630 36: "Home",
1631 37: "ArrowLeft",
1632 38: "ArrowUp",
1633 39: "ArrowRight",
1634 40: "ArrowDown",
1635 45: "Insert",
1636 46: "Delete",
1637 112: "F1",
1638 113: "F2",
1639 114: "F3",
1640 115: "F4",
1641 116: "F5",
1642 117: "F6",
1643 118: "F7",
1644 119: "F8",
1645 120: "F9",
1646 121: "F10",
1647 122: "F11",
1648 123: "F12",
1649 144: "NumLock",
1650 145: "ScrollLock",
1651 224: "Meta"
1652 },
1653 modifierKeyToProp = {
1654 Alt: "altKey",
1655 Control: "ctrlKey",
1656 Meta: "metaKey",
1657 Shift: "shiftKey"
1658 };
1659function modifierStateGetter(keyArg) {
1660 var nativeEvent = this.nativeEvent;
1661 return nativeEvent.getModifierState
1662 ? nativeEvent.getModifierState(keyArg)
1663 : (keyArg = modifierKeyToProp[keyArg])
1664 ? !!nativeEvent[keyArg]
1665 : !1;
1666}
1667function getEventModifierState() {
1668 return modifierStateGetter;
1669}
1670var KeyboardEventInterface = assign({}, UIEventInterface, {
1671 key: function (nativeEvent) {
1672 if (nativeEvent.key) {
1673 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
1674 if ("Unidentified" !== key) return key;
1675 }
1676 return "keypress" === nativeEvent.type
1677 ? ((nativeEvent = getEventCharCode(nativeEvent)),
1678 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent))
1679 : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type
1680 ? translateToKey[nativeEvent.keyCode] || "Unidentified"
1681 : "";
1682 },
1683 code: 0,
1684 location: 0,
1685 ctrlKey: 0,
1686 shiftKey: 0,
1687 altKey: 0,
1688 metaKey: 0,
1689 repeat: 0,
1690 locale: 0,
1691 getModifierState: getEventModifierState,
1692 charCode: function (event) {
1693 return "keypress" === event.type ? getEventCharCode(event) : 0;
1694 },
1695 keyCode: function (event) {
1696 return "keydown" === event.type || "keyup" === event.type
1697 ? event.keyCode
1698 : 0;
1699 },
1700 which: function (event) {
1701 return "keypress" === event.type
1702 ? getEventCharCode(event)
1703 : "keydown" === event.type || "keyup" === event.type
1704 ? event.keyCode
1705 : 0;
1706 }
1707 }),
1708 SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),
1709 PointerEventInterface = assign({}, MouseEventInterface, {
1710 pointerId: 0,
1711 width: 0,
1712 height: 0,
1713 pressure: 0,
1714 tangentialPressure: 0,
1715 tiltX: 0,
1716 tiltY: 0,
1717 twist: 0,
1718 pointerType: 0,
1719 isPrimary: 0
1720 }),
1721 SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),
1722 TouchEventInterface = assign({}, UIEventInterface, {
1723 touches: 0,
1724 targetTouches: 0,
1725 changedTouches: 0,
1726 altKey: 0,
1727 metaKey: 0,
1728 ctrlKey: 0,
1729 shiftKey: 0,
1730 getModifierState: getEventModifierState
1731 }),
1732 SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),
1733 TransitionEventInterface = assign({}, EventInterface, {
1734 propertyName: 0,
1735 elapsedTime: 0,
1736 pseudoElement: 0
1737 }),
1738 SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),
1739 WheelEventInterface = assign({}, MouseEventInterface, {
1740 deltaX: function (event) {
1741 return "deltaX" in event
1742 ? event.deltaX
1743 : "wheelDeltaX" in event
1744 ? -event.wheelDeltaX
1745 : 0;
1746 },
1747 deltaY: function (event) {
1748 return "deltaY" in event
1749 ? event.deltaY
1750 : "wheelDeltaY" in event
1751 ? -event.wheelDeltaY
1752 : "wheelDelta" in event
1753 ? -event.wheelDelta
1754 : 0;
1755 },
1756 deltaZ: 0,
1757 deltaMode: 0
1758 }),
1759 SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),
1760 END_KEYCODES = [9, 13, 27, 32],
1761 canUseCompositionEvent = canUseDOM && "CompositionEvent" in window,
1762 documentMode = null;
1763canUseDOM &&
1764 "documentMode" in document &&
1765 (documentMode = document.documentMode);
1766var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode,
1767 useFallbackCompositionData =
1768 canUseDOM &&
1769 (!canUseCompositionEvent ||
1770 (documentMode && 8 < documentMode && 11 >= documentMode)),
1771 SPACEBAR_CHAR = String.fromCharCode(32),
1772 hasSpaceKeypress = !1;
1773function isFallbackCompositionEnd(domEventName, nativeEvent) {
1774 switch (domEventName) {
1775 case "keyup":
1776 return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
1777 case "keydown":
1778 return 229 !== nativeEvent.keyCode;
1779 case "keypress":
1780 case "mousedown":
1781 case "focusout":
1782 return !0;
1783 default:
1784 return !1;
1785 }
1786}
1787function getDataFromCustomEvent(nativeEvent) {
1788 nativeEvent = nativeEvent.detail;
1789 return "object" === typeof nativeEvent && "data" in nativeEvent
1790 ? nativeEvent.data
1791 : null;
1792}
1793var isComposing = !1;
1794function getNativeBeforeInputChars(domEventName, nativeEvent) {
1795 switch (domEventName) {
1796 case "compositionend":
1797 return getDataFromCustomEvent(nativeEvent);
1798 case "keypress":
1799 if (32 !== nativeEvent.which) return null;
1800 hasSpaceKeypress = !0;
1801 return SPACEBAR_CHAR;
1802 case "textInput":
1803 return (
1804 (domEventName = nativeEvent.data),
1805 domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName
1806 );
1807 default:
1808 return null;
1809 }
1810}
1811function getFallbackBeforeInputChars(domEventName, nativeEvent) {
1812 if (isComposing)
1813 return "compositionend" === domEventName ||
1814 (!canUseCompositionEvent &&
1815 isFallbackCompositionEnd(domEventName, nativeEvent))
1816 ? ((domEventName = getData()),
1817 (fallbackText = startText = root = null),
1818 (isComposing = !1),
1819 domEventName)
1820 : null;
1821 switch (domEventName) {
1822 case "paste":
1823 return null;
1824 case "keypress":
1825 if (
1826 !(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) ||
1827 (nativeEvent.ctrlKey && nativeEvent.altKey)
1828 ) {
1829 if (nativeEvent.char && 1 < nativeEvent.char.length)
1830 return nativeEvent.char;
1831 if (nativeEvent.which) return String.fromCharCode(nativeEvent.which);
1832 }
1833 return null;
1834 case "compositionend":
1835 return useFallbackCompositionData && "ko" !== nativeEvent.locale
1836 ? null
1837 : nativeEvent.data;
1838 default:
1839 return null;
1840 }
1841}
1842var supportedInputTypes = {
1843 color: !0,
1844 date: !0,
1845 datetime: !0,
1846 "datetime-local": !0,
1847 email: !0,
1848 month: !0,
1849 number: !0,
1850 password: !0,
1851 range: !0,
1852 search: !0,
1853 tel: !0,
1854 text: !0,
1855 time: !0,
1856 url: !0,
1857 week: !0
1858};
1859function isTextInputElement(elem) {
1860 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
1861 return "input" === nodeName
1862 ? !!supportedInputTypes[elem.type]
1863 : "textarea" === nodeName
1864 ? !0
1865 : !1;
1866}
1867function createAndAccumulateChangeEvent(
1868 dispatchQueue,
1869 inst,
1870 nativeEvent,
1871 target
1872) {
1873 restoreTarget
1874 ? restoreQueue
1875 ? restoreQueue.push(target)
1876 : (restoreQueue = [target])
1877 : (restoreTarget = target);
1878 inst = accumulateTwoPhaseListeners(inst, "onChange");
1879 0 < inst.length &&
1880 ((nativeEvent = new SyntheticEvent(
1881 "onChange",
1882 "change",
1883 null,
1884 nativeEvent,
1885 target
1886 )),
1887 dispatchQueue.push({ event: nativeEvent, listeners: inst }));
1888}
1889var activeElement$1 = null,
1890 activeElementInst$1 = null;
1891function runEventInBatch(dispatchQueue) {
1892 processDispatchQueue(dispatchQueue, 0);
1893}
1894function getInstIfValueChanged(targetInst) {
1895 var targetNode = getNodeFromInstance(targetInst);
1896 if (updateValueIfChanged(targetNode)) return targetInst;
1897}
1898function getTargetInstForChangeEvent(domEventName, targetInst) {
1899 if ("change" === domEventName) return targetInst;
1900}
1901var isInputEventSupported = !1;
1902if (canUseDOM) {
1903 var JSCompiler_inline_result$jscomp$264;
1904 if (canUseDOM) {
1905 var isSupported$jscomp$inline_397 = "oninput" in document;
1906 if (!isSupported$jscomp$inline_397) {
1907 var element$jscomp$inline_398 = document.createElement("div");
1908 element$jscomp$inline_398.setAttribute("oninput", "return;");
1909 isSupported$jscomp$inline_397 =
1910 "function" === typeof element$jscomp$inline_398.oninput;
1911 }
1912 JSCompiler_inline_result$jscomp$264 = isSupported$jscomp$inline_397;
1913 } else JSCompiler_inline_result$jscomp$264 = !1;
1914 isInputEventSupported =
1915 JSCompiler_inline_result$jscomp$264 &&
1916 (!document.documentMode || 9 < document.documentMode);
1917}
1918function stopWatchingForValueChange() {
1919 activeElement$1 &&
1920 (activeElement$1.detachEvent("onpropertychange", handlePropertyChange),
1921 (activeElementInst$1 = activeElement$1 = null));
1922}
1923function handlePropertyChange(nativeEvent) {
1924 if (
1925 "value" === nativeEvent.propertyName &&
1926 getInstIfValueChanged(activeElementInst$1)
1927 ) {
1928 var dispatchQueue = [];
1929 createAndAccumulateChangeEvent(
1930 dispatchQueue,
1931 activeElementInst$1,
1932 nativeEvent,
1933 getEventTarget(nativeEvent)
1934 );
1935 batchedUpdates$1(runEventInBatch, dispatchQueue);
1936 }
1937}
1938function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
1939 "focusin" === domEventName
1940 ? (stopWatchingForValueChange(),
1941 (activeElement$1 = target),
1942 (activeElementInst$1 = targetInst),
1943 activeElement$1.attachEvent("onpropertychange", handlePropertyChange))
1944 : "focusout" === domEventName && stopWatchingForValueChange();
1945}
1946function getTargetInstForInputEventPolyfill(domEventName) {
1947 if (
1948 "selectionchange" === domEventName ||
1949 "keyup" === domEventName ||
1950 "keydown" === domEventName
1951 )
1952 return getInstIfValueChanged(activeElementInst$1);
1953}
1954function getTargetInstForClickEvent(domEventName, targetInst) {
1955 if ("click" === domEventName) return getInstIfValueChanged(targetInst);
1956}
1957function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
1958 if ("input" === domEventName || "change" === domEventName)
1959 return getInstIfValueChanged(targetInst);
1960}
1961function is(x, y) {
1962 return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
1963}
1964var objectIs = "function" === typeof Object.is ? Object.is : is;
1965function shallowEqual(objA, objB) {
1966 if (objectIs(objA, objB)) return !0;
1967 if (
1968 "object" !== typeof objA ||
1969 null === objA ||
1970 "object" !== typeof objB ||
1971 null === objB
1972 )
1973 return !1;
1974 var keysA = Object.keys(objA),
1975 keysB = Object.keys(objB);
1976 if (keysA.length !== keysB.length) return !1;
1977 for (keysB = 0; keysB < keysA.length; keysB++) {
1978 var currentKey = keysA[keysB];
1979 if (
1980 !hasOwnProperty.call(objB, currentKey) ||
1981 !objectIs(objA[currentKey], objB[currentKey])
1982 )
1983 return !1;
1984 }
1985 return !0;
1986}
1987function getLeafNode(node) {
1988 for (; node && node.firstChild; ) node = node.firstChild;
1989 return node;
1990}
1991function getNodeForCharacterOffset(root, offset) {
1992 var node = getLeafNode(root);
1993 root = 0;
1994 for (var nodeEnd; node; ) {
1995 if (3 === node.nodeType) {
1996 nodeEnd = root + node.textContent.length;
1997 if (root <= offset && nodeEnd >= offset)
1998 return { node: node, offset: offset - root };
1999 root = nodeEnd;
2000 }
2001 a: {
2002 for (; node; ) {
2003 if (node.nextSibling) {
2004 node = node.nextSibling;
2005 break a;
2006 }
2007 node = node.parentNode;
2008 }
2009 node = void 0;
2010 }
2011 node = getLeafNode(node);
2012 }
2013}
2014function containsNode(outerNode, innerNode) {
2015 return outerNode && innerNode
2016 ? outerNode === innerNode
2017 ? !0
2018 : outerNode && 3 === outerNode.nodeType
2019 ? !1
2020 : innerNode && 3 === innerNode.nodeType
2021 ? containsNode(outerNode, innerNode.parentNode)
2022 : "contains" in outerNode
2023 ? outerNode.contains(innerNode)
2024 : outerNode.compareDocumentPosition
2025 ? !!(outerNode.compareDocumentPosition(innerNode) & 16)
2026 : !1
2027 : !1;
2028}
2029function getActiveElementDeep() {
2030 for (
2031 var win = window, element = getActiveElement();
2032 element instanceof win.HTMLIFrameElement;
2033
2034 ) {
2035 try {
2036 var JSCompiler_inline_result =
2037 "string" === typeof element.contentWindow.location.href;
2038 } catch (err) {
2039 JSCompiler_inline_result = !1;
2040 }
2041 if (JSCompiler_inline_result) win = element.contentWindow;
2042 else break;
2043 element = getActiveElement(win.document);
2044 }
2045 return element;
2046}
2047function hasSelectionCapabilities(elem) {
2048 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
2049 return (
2050 nodeName &&
2051 (("input" === nodeName &&
2052 ("text" === elem.type ||
2053 "search" === elem.type ||
2054 "tel" === elem.type ||
2055 "url" === elem.type ||
2056 "password" === elem.type)) ||
2057 "textarea" === nodeName ||
2058 "true" === elem.contentEditable)
2059 );
2060}
2061function restoreSelection(priorSelectionInformation) {
2062 var curFocusedElem = getActiveElementDeep(),
2063 priorFocusedElem = priorSelectionInformation.focusedElem,
2064 priorSelectionRange = priorSelectionInformation.selectionRange;
2065 if (
2066 curFocusedElem !== priorFocusedElem &&
2067 priorFocusedElem &&
2068 priorFocusedElem.ownerDocument &&
2069 containsNode(
2070 priorFocusedElem.ownerDocument.documentElement,
2071 priorFocusedElem
2072 )
2073 ) {
2074 if (
2075 null !== priorSelectionRange &&
2076 hasSelectionCapabilities(priorFocusedElem)
2077 )
2078 if (
2079 ((curFocusedElem = priorSelectionRange.start),
2080 (priorSelectionInformation = priorSelectionRange.end),
2081 void 0 === priorSelectionInformation &&
2082 (priorSelectionInformation = curFocusedElem),
2083 "selectionStart" in priorFocusedElem)
2084 )
2085 (priorFocusedElem.selectionStart = curFocusedElem),
2086 (priorFocusedElem.selectionEnd = Math.min(
2087 priorSelectionInformation,
2088 priorFocusedElem.value.length
2089 ));
2090 else if (
2091 ((priorSelectionInformation =
2092 ((curFocusedElem = priorFocusedElem.ownerDocument || document) &&
2093 curFocusedElem.defaultView) ||
2094 window),
2095 priorSelectionInformation.getSelection)
2096 ) {
2097 priorSelectionInformation = priorSelectionInformation.getSelection();
2098 var length = priorFocusedElem.textContent.length,
2099 start = Math.min(priorSelectionRange.start, length);
2100 priorSelectionRange =
2101 void 0 === priorSelectionRange.end
2102 ? start
2103 : Math.min(priorSelectionRange.end, length);
2104 !priorSelectionInformation.extend &&
2105 start > priorSelectionRange &&
2106 ((length = priorSelectionRange),
2107 (priorSelectionRange = start),
2108 (start = length));
2109 length = getNodeForCharacterOffset(priorFocusedElem, start);
2110 var endMarker = getNodeForCharacterOffset(
2111 priorFocusedElem,
2112 priorSelectionRange
2113 );
2114 length &&
2115 endMarker &&
2116 (1 !== priorSelectionInformation.rangeCount ||
2117 priorSelectionInformation.anchorNode !== length.node ||
2118 priorSelectionInformation.anchorOffset !== length.offset ||
2119 priorSelectionInformation.focusNode !== endMarker.node ||
2120 priorSelectionInformation.focusOffset !== endMarker.offset) &&
2121 ((curFocusedElem = curFocusedElem.createRange()),
2122 curFocusedElem.setStart(length.node, length.offset),
2123 priorSelectionInformation.removeAllRanges(),
2124 start > priorSelectionRange
2125 ? (priorSelectionInformation.addRange(curFocusedElem),
2126 priorSelectionInformation.extend(
2127 endMarker.node,
2128 endMarker.offset
2129 ))
2130 : (curFocusedElem.setEnd(endMarker.node, endMarker.offset),
2131 priorSelectionInformation.addRange(curFocusedElem)));
2132 }
2133 curFocusedElem = [];
2134 for (
2135 priorSelectionInformation = priorFocusedElem;
2136 (priorSelectionInformation = priorSelectionInformation.parentNode);
2137
2138 )
2139 1 === priorSelectionInformation.nodeType &&
2140 curFocusedElem.push({
2141 element: priorSelectionInformation,
2142 left: priorSelectionInformation.scrollLeft,
2143 top: priorSelectionInformation.scrollTop
2144 });
2145 "function" === typeof priorFocusedElem.focus && priorFocusedElem.focus();
2146 for (
2147 priorFocusedElem = 0;
2148 priorFocusedElem < curFocusedElem.length;
2149 priorFocusedElem++
2150 )
2151 (priorSelectionInformation = curFocusedElem[priorFocusedElem]),
2152 (priorSelectionInformation.element.scrollLeft =
2153 priorSelectionInformation.left),
2154 (priorSelectionInformation.element.scrollTop =
2155 priorSelectionInformation.top);
2156 }
2157}
2158var skipSelectionChangeEvent =
2159 canUseDOM && "documentMode" in document && 11 >= document.documentMode,
2160 activeElement = null,
2161 activeElementInst = null,
2162 lastSelection = null,
2163 mouseDown = !1;
2164function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
2165 var doc =
2166 nativeEventTarget.window === nativeEventTarget
2167 ? nativeEventTarget.document
2168 : 9 === nativeEventTarget.nodeType
2169 ? nativeEventTarget
2170 : nativeEventTarget.ownerDocument;
2171 mouseDown ||
2172 null == activeElement ||
2173 activeElement !== getActiveElement(doc) ||
2174 ((doc = activeElement),
2175 "selectionStart" in doc && hasSelectionCapabilities(doc)
2176 ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })
2177 : ((doc = (
2178 (doc.ownerDocument && doc.ownerDocument.defaultView) ||
2179 window
2180 ).getSelection()),
2181 (doc = {
2182 anchorNode: doc.anchorNode,
2183 anchorOffset: doc.anchorOffset,
2184 focusNode: doc.focusNode,
2185 focusOffset: doc.focusOffset
2186 })),
2187 (lastSelection && shallowEqual(lastSelection, doc)) ||
2188 ((lastSelection = doc),
2189 (doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect")),
2190 0 < doc.length &&
2191 ((nativeEvent = new SyntheticEvent(
2192 "onSelect",
2193 "select",
2194 null,
2195 nativeEvent,
2196 nativeEventTarget
2197 )),
2198 dispatchQueue.push({ event: nativeEvent, listeners: doc }),
2199 (nativeEvent.target = activeElement))));
2200}
2201function makePrefixMap(styleProp, eventName) {
2202 var prefixes = {};
2203 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
2204 prefixes["Webkit" + styleProp] = "webkit" + eventName;
2205 prefixes["Moz" + styleProp] = "moz" + eventName;
2206 return prefixes;
2207}
2208var vendorPrefixes = {
2209 animationend: makePrefixMap("Animation", "AnimationEnd"),
2210 animationiteration: makePrefixMap("Animation", "AnimationIteration"),
2211 animationstart: makePrefixMap("Animation", "AnimationStart"),
2212 transitionrun: makePrefixMap("Transition", "TransitionRun"),
2213 transitionstart: makePrefixMap("Transition", "TransitionStart"),
2214 transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
2215 transitionend: makePrefixMap("Transition", "TransitionEnd")
2216 },
2217 prefixedEventNames = {},
2218 style = {};
2219canUseDOM &&
2220 ((style = document.createElement("div").style),
2221 "AnimationEvent" in window ||
2222 (delete vendorPrefixes.animationend.animation,
2223 delete vendorPrefixes.animationiteration.animation,
2224 delete vendorPrefixes.animationstart.animation),
2225 "TransitionEvent" in window ||
2226 delete vendorPrefixes.transitionend.transition);
2227function getVendorPrefixedEventName(eventName) {
2228 if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
2229 if (!vendorPrefixes[eventName]) return eventName;
2230 var prefixMap = vendorPrefixes[eventName],
2231 styleProp;
2232 for (styleProp in prefixMap)
2233 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
2234 return (prefixedEventNames[eventName] = prefixMap[styleProp]);
2235 return eventName;
2236}
2237var ANIMATION_END = getVendorPrefixedEventName("animationend"),
2238 ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"),
2239 ANIMATION_START = getVendorPrefixedEventName("animationstart"),
2240 TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"),
2241 TRANSITION_START = getVendorPrefixedEventName("transitionstart"),
2242 TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"),
2243 TRANSITION_END = getVendorPrefixedEventName("transitionend"),
2244 topLevelEventsToReactNames = new Map(),
2245 simpleEventPluginEvents =
2246 "abort auxClick 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(
2247 " "
2248 );
2249function registerSimpleEvent(domEventName, reactName) {
2250 topLevelEventsToReactNames.set(domEventName, reactName);
2251 registerTwoPhaseEvent(reactName, [domEventName]);
2252}
2253function extractEvents$1(
2254 dispatchQueue,
2255 domEventName,
2256 maybeTargetInst,
2257 nativeEvent,
2258 nativeEventTarget
2259) {
2260 if (
2261 "submit" === domEventName &&
2262 maybeTargetInst &&
2263 maybeTargetInst.stateNode === nativeEventTarget
2264 ) {
2265 var action = (nativeEventTarget[internalPropsKey] || null).action,
2266 submitter = nativeEvent.submitter;
2267 submitter &&
2268 ((domEventName = (domEventName = submitter[internalPropsKey] || null)
2269 ? domEventName.formAction
2270 : submitter.getAttribute("formAction")),
2271 null != domEventName && ((action = domEventName), (submitter = null)));
2272 if ("function" === typeof action) {
2273 var event = new SyntheticEvent(
2274 "action",
2275 "action",
2276 null,
2277 nativeEvent,
2278 nativeEventTarget
2279 );
2280 dispatchQueue.push({
2281 event: event,
2282 listeners: [
2283 {
2284 instance: null,
2285 listener: function () {
2286 if (!nativeEvent.defaultPrevented) {
2287 event.preventDefault();
2288 if (submitter) {
2289 var temp = submitter.ownerDocument.createElement("input");
2290 temp.name = submitter.name;
2291 temp.value = submitter.value;
2292 submitter.parentNode.insertBefore(temp, submitter);
2293 var formData = new FormData(nativeEventTarget);
2294 temp.parentNode.removeChild(temp);
2295 } else formData = new FormData(nativeEventTarget);
2296 startHostTransition(
2297 maybeTargetInst,
2298 {
2299 pending: !0,
2300 data: formData,
2301 method: nativeEventTarget.method,
2302 action: action
2303 },
2304 action,
2305 formData
2306 );
2307 }
2308 },
2309 currentTarget: nativeEventTarget
2310 }
2311 ]
2312 });
2313 }
2314 }
2315}
2316for (
2317 var reportGlobalError =
2318 "function" === typeof reportError
2319 ? reportError
2320 : function (error) {
2321 if (
2322 "object" === typeof window &&
2323 "function" === typeof window.ErrorEvent
2324 ) {
2325 var event = new window.ErrorEvent("error", {
2326 bubbles: !0,
2327 cancelable: !0,
2328 message:
2329 "object" === typeof error &&
2330 null !== error &&
2331 "string" === typeof error.message
2332 ? String(error.message)
2333 : String(error),
2334 error: error
2335 });
2336 if (!window.dispatchEvent(event)) return;
2337 } else if (
2338 "object" === typeof process &&
2339 "function" === typeof process.emit
2340 ) {
2341 process.emit("uncaughtException", error);
2342 return;
2343 }
2344 console.error(error);
2345 },
2346 i$jscomp$inline_438 = 0;
2347 i$jscomp$inline_438 < simpleEventPluginEvents.length;
2348 i$jscomp$inline_438++
2349) {
2350 var eventName$jscomp$inline_439 =
2351 simpleEventPluginEvents[i$jscomp$inline_438],
2352 domEventName$jscomp$inline_440 = eventName$jscomp$inline_439.toLowerCase(),
2353 capitalizedEvent$jscomp$inline_441 =
2354 eventName$jscomp$inline_439[0].toUpperCase() +
2355 eventName$jscomp$inline_439.slice(1);
2356 registerSimpleEvent(
2357 domEventName$jscomp$inline_440,
2358 "on" + capitalizedEvent$jscomp$inline_441
2359 );
2360}
2361registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
2362registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
2363registerSimpleEvent(ANIMATION_START, "onAnimationStart");
2364registerSimpleEvent("dblclick", "onDoubleClick");
2365registerSimpleEvent("focusin", "onFocus");
2366registerSimpleEvent("focusout", "onBlur");
2367registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
2368registerSimpleEvent(TRANSITION_START, "onTransitionStart");
2369registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
2370registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
2371registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
2372registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
2373registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
2374registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
2375registerTwoPhaseEvent(
2376 "onChange",
2377 "change click focusin focusout input keydown keyup selectionchange".split(" ")
2378);
2379registerTwoPhaseEvent(
2380 "onSelect",
2381 "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
2382 " "
2383 )
2384);
2385registerTwoPhaseEvent("onBeforeInput", [
2386 "compositionend",
2387 "keypress",
2388 "textInput",
2389 "paste"
2390]);
2391registerTwoPhaseEvent(
2392 "onCompositionEnd",
2393 "compositionend focusout keydown keypress keyup mousedown".split(" ")
2394);
2395registerTwoPhaseEvent(
2396 "onCompositionStart",
2397 "compositionstart focusout keydown keypress keyup mousedown".split(" ")
2398);
2399registerTwoPhaseEvent(
2400 "onCompositionUpdate",
2401 "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
2402);
2403var mediaEventTypes =
2404 "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(
2405 " "
2406 ),
2407 nonDelegatedEvents = new Set(
2408 "cancel close invalid load scroll scrollend toggle"
2409 .split(" ")
2410 .concat(mediaEventTypes)
2411 );
2412function processDispatchQueue(dispatchQueue, eventSystemFlags) {
2413 eventSystemFlags = 0 !== (eventSystemFlags & 4);
2414 for (var i = 0; i < dispatchQueue.length; i++) {
2415 var _dispatchQueue$i = dispatchQueue[i],
2416 event = _dispatchQueue$i.event;
2417 _dispatchQueue$i = _dispatchQueue$i.listeners;
2418 a: {
2419 var previousInstance = void 0;
2420 if (eventSystemFlags)
2421 for (
2422 var i$jscomp$0 = _dispatchQueue$i.length - 1;
2423 0 <= i$jscomp$0;
2424 i$jscomp$0--
2425 ) {
2426 var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],
2427 instance = _dispatchListeners$i.instance,
2428 currentTarget = _dispatchListeners$i.currentTarget;
2429 _dispatchListeners$i = _dispatchListeners$i.listener;
2430 if (instance !== previousInstance && event.isPropagationStopped())
2431 break a;
2432 previousInstance = _dispatchListeners$i;
2433 event.currentTarget = currentTarget;
2434 try {
2435 previousInstance(event);
2436 } catch (error) {
2437 reportGlobalError(error);
2438 }
2439 event.currentTarget = null;
2440 previousInstance = instance;
2441 }
2442 else
2443 for (
2444 i$jscomp$0 = 0;
2445 i$jscomp$0 < _dispatchQueue$i.length;
2446 i$jscomp$0++
2447 ) {
2448 _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
2449 instance = _dispatchListeners$i.instance;
2450 currentTarget = _dispatchListeners$i.currentTarget;
2451 _dispatchListeners$i = _dispatchListeners$i.listener;
2452 if (instance !== previousInstance && event.isPropagationStopped())
2453 break a;
2454 previousInstance = _dispatchListeners$i;
2455 event.currentTarget = currentTarget;
2456 try {
2457 previousInstance(event);
2458 } catch (error) {
2459 reportGlobalError(error);
2460 }
2461 event.currentTarget = null;
2462 previousInstance = instance;
2463 }
2464 }
2465 }
2466}
2467function listenToNonDelegatedEvent(domEventName, targetElement) {
2468 var JSCompiler_inline_result = targetElement[internalEventHandlersKey];
2469 void 0 === JSCompiler_inline_result &&
2470 (JSCompiler_inline_result = targetElement[internalEventHandlersKey] =
2471 new Set());
2472 var listenerSetKey = domEventName + "__bubble";
2473 JSCompiler_inline_result.has(listenerSetKey) ||
2474 (addTrappedEventListener(targetElement, domEventName, 2, !1),
2475 JSCompiler_inline_result.add(listenerSetKey));
2476}
2477function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
2478 var eventSystemFlags = 0;
2479 isCapturePhaseListener && (eventSystemFlags |= 4);
2480 addTrappedEventListener(
2481 target,
2482 domEventName,
2483 eventSystemFlags,
2484 isCapturePhaseListener
2485 );
2486}
2487var listeningMarker = "_reactListening" + Math.random().toString(36).slice(2);
2488function listenToAllSupportedEvents(rootContainerElement) {
2489 if (!rootContainerElement[listeningMarker]) {
2490 rootContainerElement[listeningMarker] = !0;
2491 allNativeEvents.forEach(function (domEventName) {
2492 "selectionchange" !== domEventName &&
2493 (nonDelegatedEvents.has(domEventName) ||
2494 listenToNativeEvent(domEventName, !1, rootContainerElement),
2495 listenToNativeEvent(domEventName, !0, rootContainerElement));
2496 });
2497 var ownerDocument =
2498 9 === rootContainerElement.nodeType
2499 ? rootContainerElement
2500 : rootContainerElement.ownerDocument;
2501 null === ownerDocument ||
2502 ownerDocument[listeningMarker] ||
2503 ((ownerDocument[listeningMarker] = !0),
2504 listenToNativeEvent("selectionchange", !1, ownerDocument));
2505 }
2506}
2507function addTrappedEventListener(
2508 targetContainer,
2509 domEventName,
2510 eventSystemFlags,
2511 isCapturePhaseListener
2512) {
2513 switch (getEventPriority(domEventName)) {
2514 case 2:
2515 var listenerWrapper = dispatchDiscreteEvent;
2516 break;
2517 case 8:
2518 listenerWrapper = dispatchContinuousEvent;
2519 break;
2520 default:
2521 listenerWrapper = dispatchEvent;
2522 }
2523 eventSystemFlags = listenerWrapper.bind(
2524 null,
2525 domEventName,
2526 eventSystemFlags,
2527 targetContainer
2528 );
2529 listenerWrapper = void 0;
2530 !passiveBrowserEventsSupported ||
2531 ("touchstart" !== domEventName &&
2532 "touchmove" !== domEventName &&
2533 "wheel" !== domEventName) ||
2534 (listenerWrapper = !0);
2535 isCapturePhaseListener
2536 ? void 0 !== listenerWrapper
2537 ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
2538 capture: !0,
2539 passive: listenerWrapper
2540 })
2541 : targetContainer.addEventListener(domEventName, eventSystemFlags, !0)
2542 : void 0 !== listenerWrapper
2543 ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
2544 passive: listenerWrapper
2545 })
2546 : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);
2547}
2548function dispatchEventForPluginEventSystem(
2549 domEventName,
2550 eventSystemFlags,
2551 nativeEvent,
2552 targetInst$jscomp$0,
2553 targetContainer
2554) {
2555 var ancestorInst = targetInst$jscomp$0;
2556 if (
2557 0 === (eventSystemFlags & 1) &&
2558 0 === (eventSystemFlags & 2) &&
2559 null !== targetInst$jscomp$0
2560 )
2561 a: for (;;) {
2562 if (null === targetInst$jscomp$0) return;
2563 var nodeTag = targetInst$jscomp$0.tag;
2564 if (3 === nodeTag || 4 === nodeTag) {
2565 var container = targetInst$jscomp$0.stateNode.containerInfo;
2566 if (
2567 container === targetContainer ||
2568 (8 === container.nodeType && container.parentNode === targetContainer)
2569 )
2570 break;
2571 if (4 === nodeTag)
2572 for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
2573 var grandTag = nodeTag.tag;
2574 if (3 === grandTag || 4 === grandTag)
2575 if (
2576 ((grandTag = nodeTag.stateNode.containerInfo),
2577 grandTag === targetContainer ||
2578 (8 === grandTag.nodeType &&
2579 grandTag.parentNode === targetContainer))
2580 )
2581 return;
2582 nodeTag = nodeTag.return;
2583 }
2584 for (; null !== container; ) {
2585 nodeTag = getClosestInstanceFromNode(container);
2586 if (null === nodeTag) return;
2587 grandTag = nodeTag.tag;
2588 if (
2589 5 === grandTag ||
2590 6 === grandTag ||
2591 26 === grandTag ||
2592 27 === grandTag
2593 ) {
2594 targetInst$jscomp$0 = ancestorInst = nodeTag;
2595 continue a;
2596 }
2597 container = container.parentNode;
2598 }
2599 }
2600 targetInst$jscomp$0 = targetInst$jscomp$0.return;
2601 }
2602 batchedUpdates$1(function () {
2603 var targetInst = ancestorInst,
2604 nativeEventTarget = getEventTarget(nativeEvent),
2605 dispatchQueue = [];
2606 a: {
2607 var reactName = topLevelEventsToReactNames.get(domEventName);
2608 if (void 0 !== reactName) {
2609 var SyntheticEventCtor = SyntheticEvent,
2610 reactEventType = domEventName;
2611 switch (domEventName) {
2612 case "keypress":
2613 if (0 === getEventCharCode(nativeEvent)) break a;
2614 case "keydown":
2615 case "keyup":
2616 SyntheticEventCtor = SyntheticKeyboardEvent;
2617 break;
2618 case "focusin":
2619 reactEventType = "focus";
2620 SyntheticEventCtor = SyntheticFocusEvent;
2621 break;
2622 case "focusout":
2623 reactEventType = "blur";
2624 SyntheticEventCtor = SyntheticFocusEvent;
2625 break;
2626 case "beforeblur":
2627 case "afterblur":
2628 SyntheticEventCtor = SyntheticFocusEvent;
2629 break;
2630 case "click":
2631 if (2 === nativeEvent.button) break a;
2632 case "auxclick":
2633 case "dblclick":
2634 case "mousedown":
2635 case "mousemove":
2636 case "mouseup":
2637 case "mouseout":
2638 case "mouseover":
2639 case "contextmenu":
2640 SyntheticEventCtor = SyntheticMouseEvent;
2641 break;
2642 case "drag":
2643 case "dragend":
2644 case "dragenter":
2645 case "dragexit":
2646 case "dragleave":
2647 case "dragover":
2648 case "dragstart":
2649 case "drop":
2650 SyntheticEventCtor = SyntheticDragEvent;
2651 break;
2652 case "touchcancel":
2653 case "touchend":
2654 case "touchmove":
2655 case "touchstart":
2656 SyntheticEventCtor = SyntheticTouchEvent;
2657 break;
2658 case ANIMATION_END:
2659 case ANIMATION_ITERATION:
2660 case ANIMATION_START:
2661 SyntheticEventCtor = SyntheticAnimationEvent;
2662 break;
2663 case TRANSITION_END:
2664 SyntheticEventCtor = SyntheticTransitionEvent;
2665 break;
2666 case "scroll":
2667 case "scrollend":
2668 SyntheticEventCtor = SyntheticUIEvent;
2669 break;
2670 case "wheel":
2671 SyntheticEventCtor = SyntheticWheelEvent;
2672 break;
2673 case "copy":
2674 case "cut":
2675 case "paste":
2676 SyntheticEventCtor = SyntheticClipboardEvent;
2677 break;
2678 case "gotpointercapture":
2679 case "lostpointercapture":
2680 case "pointercancel":
2681 case "pointerdown":
2682 case "pointermove":
2683 case "pointerout":
2684 case "pointerover":
2685 case "pointerup":
2686 SyntheticEventCtor = SyntheticPointerEvent;
2687 }
2688 var inCapturePhase = 0 !== (eventSystemFlags & 4),
2689 accumulateTargetOnly =
2690 !inCapturePhase &&
2691 ("scroll" === domEventName || "scrollend" === domEventName),
2692 reactEventName = inCapturePhase
2693 ? null !== reactName
2694 ? reactName + "Capture"
2695 : null
2696 : reactName;
2697 inCapturePhase = [];
2698 for (
2699 var instance = targetInst, lastHostComponent;
2700 null !== instance;
2701
2702 ) {
2703 var _instance = instance;
2704 lastHostComponent = _instance.stateNode;
2705 _instance = _instance.tag;
2706 (5 !== _instance && 26 !== _instance && 27 !== _instance) ||
2707 null === lastHostComponent ||
2708 null === reactEventName ||
2709 ((_instance = getListener(instance, reactEventName)),
2710 null != _instance &&
2711 inCapturePhase.push(
2712 createDispatchListener(instance, _instance, lastHostComponent)
2713 ));
2714 if (accumulateTargetOnly) break;
2715 instance = instance.return;
2716 }
2717 0 < inCapturePhase.length &&
2718 ((reactName = new SyntheticEventCtor(
2719 reactName,
2720 reactEventType,
2721 null,
2722 nativeEvent,
2723 nativeEventTarget
2724 )),
2725 dispatchQueue.push({ event: reactName, listeners: inCapturePhase }));
2726 }
2727 }
2728 if (0 === (eventSystemFlags & 7)) {
2729 a: {
2730 reactName =
2731 "mouseover" === domEventName || "pointerover" === domEventName;
2732 SyntheticEventCtor =
2733 "mouseout" === domEventName || "pointerout" === domEventName;
2734 if (
2735 reactName &&
2736 nativeEvent !== currentReplayingEvent &&
2737 (reactEventType =
2738 nativeEvent.relatedTarget || nativeEvent.fromElement) &&
2739 (getClosestInstanceFromNode(reactEventType) ||
2740 reactEventType[internalContainerInstanceKey])
2741 )
2742 break a;
2743 if (SyntheticEventCtor || reactName) {
2744 reactName =
2745 nativeEventTarget.window === nativeEventTarget
2746 ? nativeEventTarget
2747 : (reactName = nativeEventTarget.ownerDocument)
2748 ? reactName.defaultView || reactName.parentWindow
2749 : window;
2750 if (SyntheticEventCtor) {
2751 if (
2752 ((reactEventType =
2753 nativeEvent.relatedTarget || nativeEvent.toElement),
2754 (SyntheticEventCtor = targetInst),
2755 (reactEventType = reactEventType
2756 ? getClosestInstanceFromNode(reactEventType)
2757 : null),
2758 null !== reactEventType &&
2759 ((accumulateTargetOnly =
2760 getNearestMountedFiber(reactEventType)),
2761 (inCapturePhase = reactEventType.tag),
2762 reactEventType !== accumulateTargetOnly ||
2763 (5 !== inCapturePhase &&
2764 27 !== inCapturePhase &&
2765 6 !== inCapturePhase)))
2766 )
2767 reactEventType = null;
2768 } else (SyntheticEventCtor = null), (reactEventType = targetInst);
2769 if (SyntheticEventCtor !== reactEventType) {
2770 inCapturePhase = SyntheticMouseEvent;
2771 _instance = "onMouseLeave";
2772 reactEventName = "onMouseEnter";
2773 instance = "mouse";
2774 if ("pointerout" === domEventName || "pointerover" === domEventName)
2775 (inCapturePhase = SyntheticPointerEvent),
2776 (_instance = "onPointerLeave"),
2777 (reactEventName = "onPointerEnter"),
2778 (instance = "pointer");
2779 accumulateTargetOnly =
2780 null == SyntheticEventCtor
2781 ? reactName
2782 : getNodeFromInstance(SyntheticEventCtor);
2783 lastHostComponent =
2784 null == reactEventType
2785 ? reactName
2786 : getNodeFromInstance(reactEventType);
2787 reactName = new inCapturePhase(
2788 _instance,
2789 instance + "leave",
2790 SyntheticEventCtor,
2791 nativeEvent,
2792 nativeEventTarget
2793 );
2794 reactName.target = accumulateTargetOnly;
2795 reactName.relatedTarget = lastHostComponent;
2796 _instance = null;
2797 getClosestInstanceFromNode(nativeEventTarget) === targetInst &&
2798 ((inCapturePhase = new inCapturePhase(
2799 reactEventName,
2800 instance + "enter",
2801 reactEventType,
2802 nativeEvent,
2803 nativeEventTarget
2804 )),
2805 (inCapturePhase.target = lastHostComponent),
2806 (inCapturePhase.relatedTarget = accumulateTargetOnly),
2807 (_instance = inCapturePhase));
2808 accumulateTargetOnly = _instance;
2809 if (SyntheticEventCtor && reactEventType)
2810 b: {
2811 inCapturePhase = SyntheticEventCtor;
2812 reactEventName = reactEventType;
2813 instance = 0;
2814 for (
2815 lastHostComponent = inCapturePhase;
2816 lastHostComponent;
2817 lastHostComponent = getParent(lastHostComponent)
2818 )
2819 instance++;
2820 lastHostComponent = 0;
2821 for (
2822 _instance = reactEventName;
2823 _instance;
2824 _instance = getParent(_instance)
2825 )
2826 lastHostComponent++;
2827 for (; 0 < instance - lastHostComponent; )
2828 (inCapturePhase = getParent(inCapturePhase)), instance--;
2829 for (; 0 < lastHostComponent - instance; )
2830 (reactEventName = getParent(reactEventName)),
2831 lastHostComponent--;
2832 for (; instance--; ) {
2833 if (
2834 inCapturePhase === reactEventName ||
2835 (null !== reactEventName &&
2836 inCapturePhase === reactEventName.alternate)
2837 )
2838 break b;
2839 inCapturePhase = getParent(inCapturePhase);
2840 reactEventName = getParent(reactEventName);
2841 }
2842 inCapturePhase = null;
2843 }
2844 else inCapturePhase = null;
2845 null !== SyntheticEventCtor &&
2846 accumulateEnterLeaveListenersForEvent(
2847 dispatchQueue,
2848 reactName,
2849 SyntheticEventCtor,
2850 inCapturePhase,
2851 !1
2852 );
2853 null !== reactEventType &&
2854 null !== accumulateTargetOnly &&
2855 accumulateEnterLeaveListenersForEvent(
2856 dispatchQueue,
2857 accumulateTargetOnly,
2858 reactEventType,
2859 inCapturePhase,
2860 !0
2861 );
2862 }
2863 }
2864 }
2865 a: {
2866 reactName = targetInst ? getNodeFromInstance(targetInst) : window;
2867 SyntheticEventCtor =
2868 reactName.nodeName && reactName.nodeName.toLowerCase();
2869 if (
2870 "select" === SyntheticEventCtor ||
2871 ("input" === SyntheticEventCtor && "file" === reactName.type)
2872 )
2873 var getTargetInstFunc = getTargetInstForChangeEvent;
2874 else if (isTextInputElement(reactName))
2875 if (isInputEventSupported)
2876 getTargetInstFunc = getTargetInstForInputOrChangeEvent;
2877 else {
2878 getTargetInstFunc = getTargetInstForInputEventPolyfill;
2879 var handleEventFunc = handleEventsForInputEventPolyfill;
2880 }
2881 else
2882 (SyntheticEventCtor = reactName.nodeName),
2883 !SyntheticEventCtor ||
2884 "input" !== SyntheticEventCtor.toLowerCase() ||
2885 ("checkbox" !== reactName.type && "radio" !== reactName.type)
2886 ? targetInst &&
2887 isCustomElement(targetInst.elementType) &&
2888 (getTargetInstFunc = getTargetInstForChangeEvent)
2889 : (getTargetInstFunc = getTargetInstForClickEvent);
2890 if (
2891 getTargetInstFunc &&
2892 (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))
2893 ) {
2894 createAndAccumulateChangeEvent(
2895 dispatchQueue,
2896 getTargetInstFunc,
2897 nativeEvent,
2898 nativeEventTarget
2899 );
2900 break a;
2901 }
2902 handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
2903 "focusout" === domEventName &&
2904 targetInst &&
2905 "number" === reactName.type &&
2906 null != targetInst.memoizedProps.value &&
2907 setDefaultValue(reactName, "number", reactName.value);
2908 }
2909 handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
2910 switch (domEventName) {
2911 case "focusin":
2912 if (
2913 isTextInputElement(handleEventFunc) ||
2914 "true" === handleEventFunc.contentEditable
2915 )
2916 (activeElement = handleEventFunc),
2917 (activeElementInst = targetInst),
2918 (lastSelection = null);
2919 break;
2920 case "focusout":
2921 lastSelection = activeElementInst = activeElement = null;
2922 break;
2923 case "mousedown":
2924 mouseDown = !0;
2925 break;
2926 case "contextmenu":
2927 case "mouseup":
2928 case "dragend":
2929 mouseDown = !1;
2930 constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
2931 break;
2932 case "selectionchange":
2933 if (skipSelectionChangeEvent) break;
2934 case "keydown":
2935 case "keyup":
2936 constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
2937 }
2938 var fallbackData;
2939 if (canUseCompositionEvent)
2940 b: {
2941 switch (domEventName) {
2942 case "compositionstart":
2943 var eventType = "onCompositionStart";
2944 break b;
2945 case "compositionend":
2946 eventType = "onCompositionEnd";
2947 break b;
2948 case "compositionupdate":
2949 eventType = "onCompositionUpdate";
2950 break b;
2951 }
2952 eventType = void 0;
2953 }
2954 else
2955 isComposing
2956 ? isFallbackCompositionEnd(domEventName, nativeEvent) &&
2957 (eventType = "onCompositionEnd")
2958 : "keydown" === domEventName &&
2959 229 === nativeEvent.keyCode &&
2960 (eventType = "onCompositionStart");
2961 eventType &&
2962 (useFallbackCompositionData &&
2963 "ko" !== nativeEvent.locale &&
2964 (isComposing || "onCompositionStart" !== eventType
2965 ? "onCompositionEnd" === eventType &&
2966 isComposing &&
2967 (fallbackData = getData())
2968 : ((root = nativeEventTarget),
2969 (startText = "value" in root ? root.value : root.textContent),
2970 (isComposing = !0))),
2971 (handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType)),
2972 0 < handleEventFunc.length &&
2973 ((eventType = new SyntheticCompositionEvent(
2974 eventType,
2975 domEventName,
2976 null,
2977 nativeEvent,
2978 nativeEventTarget
2979 )),
2980 dispatchQueue.push({ event: eventType, listeners: handleEventFunc }),
2981 fallbackData
2982 ? (eventType.data = fallbackData)
2983 : ((fallbackData = getDataFromCustomEvent(nativeEvent)),
2984 null !== fallbackData && (eventType.data = fallbackData))));
2985 if (
2986 (fallbackData = canUseTextInputEvent
2987 ? getNativeBeforeInputChars(domEventName, nativeEvent)
2988 : getFallbackBeforeInputChars(domEventName, nativeEvent))
2989 )
2990 (eventType = accumulateTwoPhaseListeners(targetInst, "onBeforeInput")),
2991 0 < eventType.length &&
2992 ((handleEventFunc = new SyntheticCompositionEvent(
2993 "onBeforeInput",
2994 "beforeinput",
2995 null,
2996 nativeEvent,
2997 nativeEventTarget
2998 )),
2999 dispatchQueue.push({
3000 event: handleEventFunc,
3001 listeners: eventType
3002 }),
3003 (handleEventFunc.data = fallbackData));
3004 extractEvents$1(
3005 dispatchQueue,
3006 domEventName,
3007 targetInst,
3008 nativeEvent,
3009 nativeEventTarget
3010 );
3011 }
3012 processDispatchQueue(dispatchQueue, eventSystemFlags);
3013 });
3014}
3015function createDispatchListener(instance, listener, currentTarget) {
3016 return {
3017 instance: instance,
3018 listener: listener,
3019 currentTarget: currentTarget
3020 };
3021}
3022function accumulateTwoPhaseListeners(targetFiber, reactName) {
3023 for (
3024 var captureName = reactName + "Capture", listeners = [];
3025 null !== targetFiber;
3026
3027 ) {
3028 var _instance2 = targetFiber,
3029 stateNode = _instance2.stateNode;
3030 _instance2 = _instance2.tag;
3031 (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||
3032 null === stateNode ||
3033 ((_instance2 = getListener(targetFiber, captureName)),
3034 null != _instance2 &&
3035 listeners.unshift(
3036 createDispatchListener(targetFiber, _instance2, stateNode)
3037 ),
3038 (_instance2 = getListener(targetFiber, reactName)),
3039 null != _instance2 &&
3040 listeners.push(
3041 createDispatchListener(targetFiber, _instance2, stateNode)
3042 ));
3043 targetFiber = targetFiber.return;
3044 }
3045 return listeners;
3046}
3047function getParent(inst) {
3048 if (null === inst) return null;
3049 do inst = inst.return;
3050 while (inst && 5 !== inst.tag && 27 !== inst.tag);
3051 return inst ? inst : null;
3052}
3053function accumulateEnterLeaveListenersForEvent(
3054 dispatchQueue,
3055 event,
3056 target,
3057 common,
3058 inCapturePhase
3059) {
3060 for (
3061 var registrationName = event._reactName, listeners = [];
3062 null !== target && target !== common;
3063
3064 ) {
3065 var _instance3 = target,
3066 alternate = _instance3.alternate,
3067 stateNode = _instance3.stateNode;
3068 _instance3 = _instance3.tag;
3069 if (null !== alternate && alternate === common) break;
3070 (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||
3071 null === stateNode ||
3072 ((alternate = stateNode),
3073 inCapturePhase
3074 ? ((stateNode = getListener(target, registrationName)),
3075 null != stateNode &&
3076 listeners.unshift(
3077 createDispatchListener(target, stateNode, alternate)
3078 ))
3079 : inCapturePhase ||
3080 ((stateNode = getListener(target, registrationName)),
3081 null != stateNode &&
3082 listeners.push(
3083 createDispatchListener(target, stateNode, alternate)
3084 )));
3085 target = target.return;
3086 }
3087 0 !== listeners.length &&
3088 dispatchQueue.push({ event: event, listeners: listeners });
3089}
3090var NORMALIZE_NEWLINES_REGEX = /\r\n?/g,
3091 NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
3092function normalizeMarkupForTextOrAttribute(markup) {
3093 return ("string" === typeof markup ? markup : "" + markup)
3094 .replace(NORMALIZE_NEWLINES_REGEX, "\n")
3095 .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
3096}
3097function checkForUnmatchedText(serverText, clientText) {
3098 clientText = normalizeMarkupForTextOrAttribute(clientText);
3099 return normalizeMarkupForTextOrAttribute(serverText) === clientText ? !0 : !1;
3100}
3101function noop$2() {}
3102function setProp(domElement, tag, key, value, props, prevValue) {
3103 switch (key) {
3104 case "children":
3105 "string" === typeof value
3106 ? "body" === tag ||
3107 ("textarea" === tag && "" === value) ||
3108 setTextContent(domElement, value)
3109 : ("number" === typeof value || "bigint" === typeof value) &&
3110 "body" !== tag &&
3111 setTextContent(domElement, "" + value);
3112 break;
3113 case "className":
3114 setValueForKnownAttribute(domElement, "class", value);
3115 break;
3116 case "tabIndex":
3117 setValueForKnownAttribute(domElement, "tabindex", value);
3118 break;
3119 case "dir":
3120 case "role":
3121 case "viewBox":
3122 case "width":
3123 case "height":
3124 setValueForKnownAttribute(domElement, key, value);
3125 break;
3126 case "style":
3127 setValueForStyles(domElement, value, prevValue);
3128 break;
3129 case "src":
3130 case "href":
3131 if ("" === value && ("a" !== tag || "href" !== key)) {
3132 domElement.removeAttribute(key);
3133 break;
3134 }
3135 if (
3136 null == value ||
3137 "function" === typeof value ||
3138 "symbol" === typeof value ||
3139 "boolean" === typeof value
3140 ) {
3141 domElement.removeAttribute(key);
3142 break;
3143 }
3144 value = sanitizeURL("" + value);
3145 domElement.setAttribute(key, value);
3146 break;
3147 case "action":
3148 case "formAction":
3149 if ("function" === typeof value) {
3150 domElement.setAttribute(
3151 key,
3152 "javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
3153 );
3154 break;
3155 } else
3156 "function" === typeof prevValue &&
3157 ("formAction" === key
3158 ? ("input" !== tag &&
3159 setProp(domElement, tag, "name", props.name, props, null),
3160 setProp(
3161 domElement,
3162 tag,
3163 "formEncType",
3164 props.formEncType,
3165 props,
3166 null
3167 ),
3168 setProp(
3169 domElement,
3170 tag,
3171 "formMethod",
3172 props.formMethod,
3173 props,
3174 null
3175 ),
3176 setProp(
3177 domElement,
3178 tag,
3179 "formTarget",
3180 props.formTarget,
3181 props,
3182 null
3183 ))
3184 : (setProp(domElement, tag, "encType", props.encType, props, null),
3185 setProp(domElement, tag, "method", props.method, props, null),
3186 setProp(domElement, tag, "target", props.target, props, null)));
3187 if (
3188 null == value ||
3189 "symbol" === typeof value ||
3190 "boolean" === typeof value
3191 ) {
3192 domElement.removeAttribute(key);
3193 break;
3194 }
3195 value = sanitizeURL("" + value);
3196 domElement.setAttribute(key, value);
3197 break;
3198 case "onClick":
3199 null != value && (domElement.onclick = noop$2);
3200 break;
3201 case "onScroll":
3202 null != value && listenToNonDelegatedEvent("scroll", domElement);
3203 break;
3204 case "onScrollEnd":
3205 null != value && listenToNonDelegatedEvent("scrollend", domElement);
3206 break;
3207 case "dangerouslySetInnerHTML":
3208 if (null != value) {
3209 if ("object" !== typeof value || !("__html" in value))
3210 throw Error(formatProdErrorMessage(61));
3211 key = value.__html;
3212 if (null != key) {
3213 if (null != props.children) throw Error(formatProdErrorMessage(60));
3214 domElement.innerHTML = key;
3215 }
3216 }
3217 break;
3218 case "multiple":
3219 domElement.multiple =
3220 value && "function" !== typeof value && "symbol" !== typeof value;
3221 break;
3222 case "muted":
3223 domElement.muted =
3224 value && "function" !== typeof value && "symbol" !== typeof value;
3225 break;
3226 case "suppressContentEditableWarning":
3227 case "suppressHydrationWarning":
3228 case "defaultValue":
3229 case "defaultChecked":
3230 case "innerHTML":
3231 case "ref":
3232 break;
3233 case "autoFocus":
3234 break;
3235 case "xlinkHref":
3236 if (
3237 null == value ||
3238 "function" === typeof value ||
3239 "boolean" === typeof value ||
3240 "symbol" === typeof value
3241 ) {
3242 domElement.removeAttribute("xlink:href");
3243 break;
3244 }
3245 key = sanitizeURL("" + value);
3246 domElement.setAttributeNS(
3247 "http://www.w3.org/1999/xlink",
3248 "xlink:href",
3249 key
3250 );
3251 break;
3252 case "contentEditable":
3253 case "spellCheck":
3254 case "draggable":
3255 case "value":
3256 case "autoReverse":
3257 case "externalResourcesRequired":
3258 case "focusable":
3259 case "preserveAlpha":
3260 null != value && "function" !== typeof value && "symbol" !== typeof value
3261 ? domElement.setAttribute(key, "" + value)
3262 : domElement.removeAttribute(key);
3263 break;
3264 case "inert":
3265 case "allowFullScreen":
3266 case "async":
3267 case "autoPlay":
3268 case "controls":
3269 case "default":
3270 case "defer":
3271 case "disabled":
3272 case "disablePictureInPicture":
3273 case "disableRemotePlayback":
3274 case "formNoValidate":
3275 case "hidden":
3276 case "loop":
3277 case "noModule":
3278 case "noValidate":
3279 case "open":
3280 case "playsInline":
3281 case "readOnly":
3282 case "required":
3283 case "reversed":
3284 case "scoped":
3285 case "seamless":
3286 case "itemScope":
3287 value && "function" !== typeof value && "symbol" !== typeof value
3288 ? domElement.setAttribute(key, "")
3289 : domElement.removeAttribute(key);
3290 break;
3291 case "capture":
3292 case "download":
3293 !0 === value
3294 ? domElement.setAttribute(key, "")
3295 : !1 !== value &&
3296 null != value &&
3297 "function" !== typeof value &&
3298 "symbol" !== typeof value
3299 ? domElement.setAttribute(key, value)
3300 : domElement.removeAttribute(key);
3301 break;
3302 case "cols":
3303 case "rows":
3304 case "size":
3305 case "span":
3306 null != value &&
3307 "function" !== typeof value &&
3308 "symbol" !== typeof value &&
3309 !isNaN(value) &&
3310 1 <= value
3311 ? domElement.setAttribute(key, value)
3312 : domElement.removeAttribute(key);
3313 break;
3314 case "rowSpan":
3315 case "start":
3316 null == value ||
3317 "function" === typeof value ||
3318 "symbol" === typeof value ||
3319 isNaN(value)
3320 ? domElement.removeAttribute(key)
3321 : domElement.setAttribute(key, value);
3322 break;
3323 case "xlinkActuate":
3324 setValueForNamespacedAttribute(
3325 domElement,
3326 "http://www.w3.org/1999/xlink",
3327 "xlink:actuate",
3328 value
3329 );
3330 break;
3331 case "xlinkArcrole":
3332 setValueForNamespacedAttribute(
3333 domElement,
3334 "http://www.w3.org/1999/xlink",
3335 "xlink:arcrole",
3336 value
3337 );
3338 break;
3339 case "xlinkRole":
3340 setValueForNamespacedAttribute(
3341 domElement,
3342 "http://www.w3.org/1999/xlink",
3343 "xlink:role",
3344 value
3345 );
3346 break;
3347 case "xlinkShow":
3348 setValueForNamespacedAttribute(
3349 domElement,
3350 "http://www.w3.org/1999/xlink",
3351 "xlink:show",
3352 value
3353 );
3354 break;
3355 case "xlinkTitle":
3356 setValueForNamespacedAttribute(
3357 domElement,
3358 "http://www.w3.org/1999/xlink",
3359 "xlink:title",
3360 value
3361 );
3362 break;
3363 case "xlinkType":
3364 setValueForNamespacedAttribute(
3365 domElement,
3366 "http://www.w3.org/1999/xlink",
3367 "xlink:type",
3368 value
3369 );
3370 break;
3371 case "xmlBase":
3372 setValueForNamespacedAttribute(
3373 domElement,
3374 "http://www.w3.org/XML/1998/namespace",
3375 "xml:base",
3376 value
3377 );
3378 break;
3379 case "xmlLang":
3380 setValueForNamespacedAttribute(
3381 domElement,
3382 "http://www.w3.org/XML/1998/namespace",
3383 "xml:lang",
3384 value
3385 );
3386 break;
3387 case "xmlSpace":
3388 setValueForNamespacedAttribute(
3389 domElement,
3390 "http://www.w3.org/XML/1998/namespace",
3391 "xml:space",
3392 value
3393 );
3394 break;
3395 case "is":
3396 setValueForAttribute(domElement, "is", value);
3397 break;
3398 case "innerText":
3399 case "textContent":
3400 break;
3401 default:
3402 if (
3403 !(2 < key.length) ||
3404 ("o" !== key[0] && "O" !== key[0]) ||
3405 ("n" !== key[1] && "N" !== key[1])
3406 )
3407 (key = aliases.get(key) || key),
3408 setValueForAttribute(domElement, key, value);
3409 }
3410}
3411function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
3412 switch (key) {
3413 case "style":
3414 setValueForStyles(domElement, value, prevValue);
3415 break;
3416 case "dangerouslySetInnerHTML":
3417 if (null != value) {
3418 if ("object" !== typeof value || !("__html" in value))
3419 throw Error(formatProdErrorMessage(61));
3420 key = value.__html;
3421 if (null != key) {
3422 if (null != props.children) throw Error(formatProdErrorMessage(60));
3423 domElement.innerHTML = key;
3424 }
3425 }
3426 break;
3427 case "children":
3428 "string" === typeof value
3429 ? setTextContent(domElement, value)
3430 : ("number" === typeof value || "bigint" === typeof value) &&
3431 setTextContent(domElement, "" + value);
3432 break;
3433 case "onScroll":
3434 null != value && listenToNonDelegatedEvent("scroll", domElement);
3435 break;
3436 case "onScrollEnd":
3437 null != value && listenToNonDelegatedEvent("scrollend", domElement);
3438 break;
3439 case "onClick":
3440 null != value && (domElement.onclick = noop$2);
3441 break;
3442 case "suppressContentEditableWarning":
3443 case "suppressHydrationWarning":
3444 case "innerHTML":
3445 case "ref":
3446 break;
3447 case "innerText":
3448 case "textContent":
3449 break;
3450 default:
3451 if (!registrationNameDependencies.hasOwnProperty(key))
3452 a: {
3453 if (
3454 "o" === key[0] &&
3455 "n" === key[1] &&
3456 ((props = key.endsWith("Capture")),
3457 (tag = key.slice(2, props ? key.length - 7 : void 0)),
3458 (prevValue = domElement[internalPropsKey] || null),
3459 (prevValue = null != prevValue ? prevValue[key] : null),
3460 "function" === typeof prevValue &&
3461 domElement.removeEventListener(tag, prevValue, props),
3462 "function" === typeof value)
3463 ) {
3464 "function" !== typeof prevValue &&
3465 null !== prevValue &&
3466 (key in domElement
3467 ? (domElement[key] = null)
3468 : domElement.hasAttribute(key) &&
3469 domElement.removeAttribute(key));
3470 domElement.addEventListener(tag, value, props);
3471 break a;
3472 }
3473 key in domElement
3474 ? (domElement[key] = value)
3475 : !0 === value
3476 ? domElement.setAttribute(key, "")
3477 : setValueForAttribute(domElement, key, value);
3478 }
3479 }
3480}
3481function setInitialProperties(domElement, tag, props) {
3482 switch (tag) {
3483 case "div":
3484 case "span":
3485 case "svg":
3486 case "path":
3487 case "a":
3488 case "g":
3489 case "p":
3490 case "li":
3491 break;
3492 case "input":
3493 listenToNonDelegatedEvent("invalid", domElement);
3494 var name = null,
3495 type = null,
3496 value = null,
3497 defaultValue = null,
3498 checked = null,
3499 defaultChecked = null;
3500 for (propKey in props)
3501 if (props.hasOwnProperty(propKey)) {
3502 var propValue = props[propKey];
3503 if (null != propValue)
3504 switch (propKey) {
3505 case "name":
3506 name = propValue;
3507 break;
3508 case "type":
3509 type = propValue;
3510 break;
3511 case "checked":
3512 checked = propValue;
3513 break;
3514 case "defaultChecked":
3515 defaultChecked = propValue;
3516 break;
3517 case "value":
3518 value = propValue;
3519 break;
3520 case "defaultValue":
3521 defaultValue = propValue;
3522 break;
3523 case "children":
3524 case "dangerouslySetInnerHTML":
3525 if (null != propValue)
3526 throw Error(formatProdErrorMessage(137, tag));
3527 break;
3528 default:
3529 setProp(domElement, tag, propKey, propValue, props, null);
3530 }
3531 }
3532 initInput(
3533 domElement,
3534 value,
3535 defaultValue,
3536 checked,
3537 defaultChecked,
3538 type,
3539 name,
3540 !1
3541 );
3542 track(domElement);
3543 return;
3544 case "select":
3545 listenToNonDelegatedEvent("invalid", domElement);
3546 var propKey = (type = value = null);
3547 for (name in props)
3548 if (
3549 props.hasOwnProperty(name) &&
3550 ((defaultValue = props[name]), null != defaultValue)
3551 )
3552 switch (name) {
3553 case "value":
3554 value = defaultValue;
3555 break;
3556 case "defaultValue":
3557 type = defaultValue;
3558 break;
3559 case "multiple":
3560 propKey = defaultValue;
3561 default:
3562 setProp(domElement, tag, name, defaultValue, props, null);
3563 }
3564 tag = value;
3565 props = type;
3566 domElement.multiple = !!propKey;
3567 null != tag
3568 ? updateOptions(domElement, !!propKey, tag, !1)
3569 : null != props && updateOptions(domElement, !!propKey, props, !0);
3570 return;
3571 case "textarea":
3572 listenToNonDelegatedEvent("invalid", domElement);
3573 value = name = propKey = null;
3574 for (type in props)
3575 if (
3576 props.hasOwnProperty(type) &&
3577 ((defaultValue = props[type]), null != defaultValue)
3578 )
3579 switch (type) {
3580 case "value":
3581 propKey = defaultValue;
3582 break;
3583 case "defaultValue":
3584 name = defaultValue;
3585 break;
3586 case "children":
3587 value = defaultValue;
3588 break;
3589 case "dangerouslySetInnerHTML":
3590 if (null != defaultValue) throw Error(formatProdErrorMessage(91));
3591 break;
3592 default:
3593 setProp(domElement, tag, type, defaultValue, props, null);
3594 }
3595 initTextarea(domElement, propKey, name, value);
3596 track(domElement);
3597 return;
3598 case "option":
3599 for (defaultValue in props)
3600 if (
3601 props.hasOwnProperty(defaultValue) &&
3602 ((propKey = props[defaultValue]), null != propKey)
3603 )
3604 switch (defaultValue) {
3605 case "selected":
3606 domElement.selected =
3607 propKey &&
3608 "function" !== typeof propKey &&
3609 "symbol" !== typeof propKey;
3610 break;
3611 default:
3612 setProp(domElement, tag, defaultValue, propKey, props, null);
3613 }
3614 return;
3615 case "dialog":
3616 listenToNonDelegatedEvent("cancel", domElement);
3617 listenToNonDelegatedEvent("close", domElement);
3618 break;
3619 case "iframe":
3620 case "object":
3621 listenToNonDelegatedEvent("load", domElement);
3622 break;
3623 case "video":
3624 case "audio":
3625 for (propKey = 0; propKey < mediaEventTypes.length; propKey++)
3626 listenToNonDelegatedEvent(mediaEventTypes[propKey], domElement);
3627 break;
3628 case "image":
3629 listenToNonDelegatedEvent("error", domElement);
3630 listenToNonDelegatedEvent("load", domElement);
3631 break;
3632 case "details":
3633 listenToNonDelegatedEvent("toggle", domElement);
3634 break;
3635 case "embed":
3636 case "source":
3637 case "img":
3638 case "link":
3639 listenToNonDelegatedEvent("error", domElement),
3640 listenToNonDelegatedEvent("load", domElement);
3641 case "area":
3642 case "base":
3643 case "br":
3644 case "col":
3645 case "hr":
3646 case "keygen":
3647 case "meta":
3648 case "param":
3649 case "track":
3650 case "wbr":
3651 case "menuitem":
3652 for (checked in props)
3653 if (
3654 props.hasOwnProperty(checked) &&
3655 ((propKey = props[checked]), null != propKey)
3656 )
3657 switch (checked) {
3658 case "children":
3659 case "dangerouslySetInnerHTML":
3660 throw Error(formatProdErrorMessage(137, tag));
3661 default:
3662 setProp(domElement, tag, checked, propKey, props, null);
3663 }
3664 return;
3665 default:
3666 if (isCustomElement(tag)) {
3667 for (defaultChecked in props)
3668 props.hasOwnProperty(defaultChecked) &&
3669 ((propKey = props[defaultChecked]),
3670 void 0 !== propKey &&
3671 setPropOnCustomElement(
3672 domElement,
3673 tag,
3674 defaultChecked,
3675 propKey,
3676 props,
3677 void 0
3678 ));
3679 return;
3680 }
3681 }
3682 for (value in props)
3683 props.hasOwnProperty(value) &&
3684 ((propKey = props[value]),
3685 null != propKey && setProp(domElement, tag, value, propKey, props, null));
3686}
3687function updateProperties(domElement, tag, lastProps, nextProps) {
3688 switch (tag) {
3689 case "div":
3690 case "span":
3691 case "svg":
3692 case "path":
3693 case "a":
3694 case "g":
3695 case "p":
3696 case "li":
3697 break;
3698 case "input":
3699 var name = null,
3700 type = null,
3701 value = null,
3702 defaultValue = null,
3703 lastDefaultValue = null,
3704 checked = null,
3705 defaultChecked = null;
3706 for (propKey in lastProps) {
3707 var lastProp = lastProps[propKey];
3708 if (lastProps.hasOwnProperty(propKey) && null != lastProp)
3709 switch (propKey) {
3710 case "checked":
3711 break;
3712 case "value":
3713 break;
3714 case "defaultValue":
3715 lastDefaultValue = lastProp;
3716 default:
3717 nextProps.hasOwnProperty(propKey) ||
3718 setProp(domElement, tag, propKey, null, nextProps, lastProp);
3719 }
3720 }
3721 for (var propKey$43 in nextProps) {
3722 var propKey = nextProps[propKey$43];
3723 lastProp = lastProps[propKey$43];
3724 if (
3725 nextProps.hasOwnProperty(propKey$43) &&
3726 (null != propKey || null != lastProp)
3727 )
3728 switch (propKey$43) {
3729 case "type":
3730 type = propKey;
3731 break;
3732 case "name":
3733 name = propKey;
3734 break;
3735 case "checked":
3736 checked = propKey;
3737 break;
3738 case "defaultChecked":
3739 defaultChecked = propKey;
3740 break;
3741 case "value":
3742 value = propKey;
3743 break;
3744 case "defaultValue":
3745 defaultValue = propKey;
3746 break;
3747 case "children":
3748 case "dangerouslySetInnerHTML":
3749 if (null != propKey)
3750 throw Error(formatProdErrorMessage(137, tag));
3751 break;
3752 default:
3753 propKey !== lastProp &&
3754 setProp(
3755 domElement,
3756 tag,
3757 propKey$43,
3758 propKey,
3759 nextProps,
3760 lastProp
3761 );
3762 }
3763 }
3764 updateInput(
3765 domElement,
3766 value,
3767 defaultValue,
3768 lastDefaultValue,
3769 checked,
3770 defaultChecked,
3771 type,
3772 name
3773 );
3774 return;
3775 case "select":
3776 propKey = value = defaultValue = propKey$43 = null;
3777 for (type in lastProps)
3778 if (
3779 ((lastDefaultValue = lastProps[type]),
3780 lastProps.hasOwnProperty(type) && null != lastDefaultValue)
3781 )
3782 switch (type) {
3783 case "value":
3784 break;
3785 case "multiple":
3786 propKey = lastDefaultValue;
3787 default:
3788 nextProps.hasOwnProperty(type) ||
3789 setProp(
3790 domElement,
3791 tag,
3792 type,
3793 null,
3794 nextProps,
3795 lastDefaultValue
3796 );
3797 }
3798 for (name in nextProps)
3799 if (
3800 ((type = nextProps[name]),
3801 (lastDefaultValue = lastProps[name]),
3802 nextProps.hasOwnProperty(name) &&
3803 (null != type || null != lastDefaultValue))
3804 )
3805 switch (name) {
3806 case "value":
3807 propKey$43 = type;
3808 break;
3809 case "defaultValue":
3810 defaultValue = type;
3811 break;
3812 case "multiple":
3813 value = type;
3814 default:
3815 type !== lastDefaultValue &&
3816 setProp(
3817 domElement,
3818 tag,
3819 name,
3820 type,
3821 nextProps,
3822 lastDefaultValue
3823 );
3824 }
3825 tag = defaultValue;
3826 lastProps = value;
3827 nextProps = propKey;
3828 null != propKey$43
3829 ? updateOptions(domElement, !!lastProps, propKey$43, !1)
3830 : !!nextProps !== !!lastProps &&
3831 (null != tag
3832 ? updateOptions(domElement, !!lastProps, tag, !0)
3833 : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1));
3834 return;
3835 case "textarea":
3836 propKey = propKey$43 = null;
3837 for (defaultValue in lastProps)
3838 if (
3839 ((name = lastProps[defaultValue]),
3840 lastProps.hasOwnProperty(defaultValue) &&
3841 null != name &&
3842 !nextProps.hasOwnProperty(defaultValue))
3843 )
3844 switch (defaultValue) {
3845 case "value":
3846 break;
3847 case "children":
3848 break;
3849 default:
3850 setProp(domElement, tag, defaultValue, null, nextProps, name);
3851 }
3852 for (value in nextProps)
3853 if (
3854 ((name = nextProps[value]),
3855 (type = lastProps[value]),
3856 nextProps.hasOwnProperty(value) && (null != name || null != type))
3857 )
3858 switch (value) {
3859 case "value":
3860 propKey$43 = name;
3861 break;
3862 case "defaultValue":
3863 propKey = name;
3864 break;
3865 case "children":
3866 break;
3867 case "dangerouslySetInnerHTML":
3868 if (null != name) throw Error(formatProdErrorMessage(91));
3869 break;
3870 default:
3871 name !== type &&
3872 setProp(domElement, tag, value, name, nextProps, type);
3873 }
3874 updateTextarea(domElement, propKey$43, propKey);
3875 return;
3876 case "option":
3877 for (var propKey$59 in lastProps)
3878 if (
3879 ((propKey$43 = lastProps[propKey$59]),
3880 lastProps.hasOwnProperty(propKey$59) &&
3881 null != propKey$43 &&
3882 !nextProps.hasOwnProperty(propKey$59))
3883 )
3884 switch (propKey$59) {
3885 case "selected":
3886 domElement.selected = !1;
3887 break;
3888 default:
3889 setProp(domElement, tag, propKey$59, null, nextProps, propKey$43);
3890 }
3891 for (lastDefaultValue in nextProps)
3892 if (
3893 ((propKey$43 = nextProps[lastDefaultValue]),
3894 (propKey = lastProps[lastDefaultValue]),
3895 nextProps.hasOwnProperty(lastDefaultValue) &&
3896 propKey$43 !== propKey &&
3897 (null != propKey$43 || null != propKey))
3898 )
3899 switch (lastDefaultValue) {
3900 case "selected":
3901 domElement.selected =
3902 propKey$43 &&
3903 "function" !== typeof propKey$43 &&
3904 "symbol" !== typeof propKey$43;
3905 break;
3906 default:
3907 setProp(
3908 domElement,
3909 tag,
3910 lastDefaultValue,
3911 propKey$43,
3912 nextProps,
3913 propKey
3914 );
3915 }
3916 return;
3917 case "img":
3918 case "link":
3919 case "area":
3920 case "base":
3921 case "br":
3922 case "col":
3923 case "embed":
3924 case "hr":
3925 case "keygen":
3926 case "meta":
3927 case "param":
3928 case "source":
3929 case "track":
3930 case "wbr":
3931 case "menuitem":
3932 for (var propKey$64 in lastProps)
3933 (propKey$43 = lastProps[propKey$64]),
3934 lastProps.hasOwnProperty(propKey$64) &&
3935 null != propKey$43 &&
3936 !nextProps.hasOwnProperty(propKey$64) &&
3937 setProp(domElement, tag, propKey$64, null, nextProps, propKey$43);
3938 for (checked in nextProps)
3939 if (
3940 ((propKey$43 = nextProps[checked]),
3941 (propKey = lastProps[checked]),
3942 nextProps.hasOwnProperty(checked) &&
3943 propKey$43 !== propKey &&
3944 (null != propKey$43 || null != propKey))
3945 )
3946 switch (checked) {
3947 case "children":
3948 case "dangerouslySetInnerHTML":
3949 if (null != propKey$43)
3950 throw Error(formatProdErrorMessage(137, tag));
3951 break;
3952 default:
3953 setProp(domElement, tag, checked, propKey$43, nextProps, propKey);
3954 }
3955 return;
3956 default:
3957 if (isCustomElement(tag)) {
3958 for (var propKey$69 in lastProps)
3959 (propKey$43 = lastProps[propKey$69]),
3960 lastProps.hasOwnProperty(propKey$69) &&
3961 void 0 !== propKey$43 &&
3962 !nextProps.hasOwnProperty(propKey$69) &&
3963 setPropOnCustomElement(
3964 domElement,
3965 tag,
3966 propKey$69,
3967 void 0,
3968 nextProps,
3969 propKey$43
3970 );
3971 for (defaultChecked in nextProps)
3972 (propKey$43 = nextProps[defaultChecked]),
3973 (propKey = lastProps[defaultChecked]),
3974 !nextProps.hasOwnProperty(defaultChecked) ||
3975 propKey$43 === propKey ||
3976 (void 0 === propKey$43 && void 0 === propKey) ||
3977 setPropOnCustomElement(
3978 domElement,
3979 tag,
3980 defaultChecked,
3981 propKey$43,
3982 nextProps,
3983 propKey
3984 );
3985 return;
3986 }
3987 }
3988 for (var propKey$74 in lastProps)
3989 (propKey$43 = lastProps[propKey$74]),
3990 lastProps.hasOwnProperty(propKey$74) &&
3991 null != propKey$43 &&
3992 !nextProps.hasOwnProperty(propKey$74) &&
3993 setProp(domElement, tag, propKey$74, null, nextProps, propKey$43);
3994 for (lastProp in nextProps)
3995 (propKey$43 = nextProps[lastProp]),
3996 (propKey = lastProps[lastProp]),
3997 !nextProps.hasOwnProperty(lastProp) ||
3998 propKey$43 === propKey ||
3999 (null == propKey$43 && null == propKey) ||
4000 setProp(domElement, tag, lastProp, propKey$43, nextProps, propKey);
4001}
4002var concurrentQueues = [],
4003 concurrentQueuesIndex = 0,
4004 concurrentlyUpdatedLanes = 0;
4005function finishQueueingConcurrentUpdates() {
4006 for (
4007 var endIndex = concurrentQueuesIndex,
4008 i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);
4009 i < endIndex;
4010
4011 ) {
4012 var fiber = concurrentQueues[i];
4013 concurrentQueues[i++] = null;
4014 var queue = concurrentQueues[i];
4015 concurrentQueues[i++] = null;
4016 var update = concurrentQueues[i];
4017 concurrentQueues[i++] = null;
4018 var lane = concurrentQueues[i];
4019 concurrentQueues[i++] = null;
4020 if (null !== queue && null !== update) {
4021 var pending = queue.pending;
4022 null === pending
4023 ? (update.next = update)
4024 : ((update.next = pending.next), (pending.next = update));
4025 queue.pending = update;
4026 }
4027 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
4028 }
4029}
4030function enqueueUpdate$1(fiber, queue, update, lane) {
4031 concurrentQueues[concurrentQueuesIndex++] = fiber;
4032 concurrentQueues[concurrentQueuesIndex++] = queue;
4033 concurrentQueues[concurrentQueuesIndex++] = update;
4034 concurrentQueues[concurrentQueuesIndex++] = lane;
4035 concurrentlyUpdatedLanes |= lane;
4036 fiber.lanes |= lane;
4037 fiber = fiber.alternate;
4038 null !== fiber && (fiber.lanes |= lane);
4039}
4040function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
4041 enqueueUpdate$1(fiber, queue, update, lane);
4042 return getRootForUpdatedFiber(fiber);
4043}
4044function enqueueConcurrentRenderForLane(fiber, lane) {
4045 enqueueUpdate$1(fiber, null, null, lane);
4046 return getRootForUpdatedFiber(fiber);
4047}
4048function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
4049 sourceFiber.lanes |= lane;
4050 var alternate = sourceFiber.alternate;
4051 null !== alternate && (alternate.lanes |= lane);
4052 for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )
4053 (parent.childLanes |= lane),
4054 (alternate = parent.alternate),
4055 null !== alternate && (alternate.childLanes |= lane),
4056 22 === parent.tag &&
4057 ((sourceFiber = parent.stateNode),
4058 null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),
4059 (sourceFiber = parent),
4060 (parent = parent.return);
4061 isHidden &&
4062 null !== update &&
4063 3 === sourceFiber.tag &&
4064 ((parent = sourceFiber.stateNode),
4065 (isHidden = 31 - clz32(lane)),
4066 (parent = parent.hiddenUpdates),
4067 (sourceFiber = parent[isHidden]),
4068 null === sourceFiber
4069 ? (parent[isHidden] = [update])
4070 : sourceFiber.push(update),
4071 (update.lane = lane | 536870912));
4072}
4073function getRootForUpdatedFiber(sourceFiber) {
4074 throwIfInfiniteUpdateLoopDetected();
4075 for (var parent = sourceFiber.return; null !== parent; )
4076 (sourceFiber = parent), (parent = sourceFiber.return);
4077 return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;
4078}
4079var emptyContextObject = {},
4080 CapturedStacks = new WeakMap();
4081function createCapturedValueAtFiber(value, source) {
4082 if ("object" === typeof value && null !== value) {
4083 var stack = CapturedStacks.get(value);
4084 "string" !== typeof stack &&
4085 ((stack = getStackByFiberInDevAndProd(source)),
4086 CapturedStacks.set(value, stack));
4087 } else stack = getStackByFiberInDevAndProd(source);
4088 return { value: value, source: source, stack: stack };
4089}
4090var forkStack = [],
4091 forkStackIndex = 0,
4092 treeForkProvider = null,
4093 treeForkCount = 0,
4094 idStack = [],
4095 idStackIndex = 0,
4096 treeContextProvider = null,
4097 treeContextId = 1,
4098 treeContextOverflow = "";
4099function pushTreeFork(workInProgress, totalChildren) {
4100 forkStack[forkStackIndex++] = treeForkCount;
4101 forkStack[forkStackIndex++] = treeForkProvider;
4102 treeForkProvider = workInProgress;
4103 treeForkCount = totalChildren;
4104}
4105function pushTreeId(workInProgress, totalChildren, index) {
4106 idStack[idStackIndex++] = treeContextId;
4107 idStack[idStackIndex++] = treeContextOverflow;
4108 idStack[idStackIndex++] = treeContextProvider;
4109 treeContextProvider = workInProgress;
4110 var baseIdWithLeadingBit = treeContextId;
4111 workInProgress = treeContextOverflow;
4112 var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
4113 baseIdWithLeadingBit &= ~(1 << baseLength);
4114 index += 1;
4115 var length = 32 - clz32(totalChildren) + baseLength;
4116 if (30 < length) {
4117 var numberOfOverflowBits = baseLength - (baseLength % 5);
4118 length = (
4119 baseIdWithLeadingBit &
4120 ((1 << numberOfOverflowBits) - 1)
4121 ).toString(32);
4122 baseIdWithLeadingBit >>= numberOfOverflowBits;
4123 baseLength -= numberOfOverflowBits;
4124 treeContextId =
4125 (1 << (32 - clz32(totalChildren) + baseLength)) |
4126 (index << baseLength) |
4127 baseIdWithLeadingBit;
4128 treeContextOverflow = length + workInProgress;
4129 } else
4130 (treeContextId =
4131 (1 << length) | (index << baseLength) | baseIdWithLeadingBit),
4132 (treeContextOverflow = workInProgress);
4133}
4134function pushMaterializedTreeId(workInProgress) {
4135 null !== workInProgress.return &&
4136 (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));
4137}
4138function popTreeContext(workInProgress) {
4139 for (; workInProgress === treeForkProvider; )
4140 (treeForkProvider = forkStack[--forkStackIndex]),
4141 (forkStack[forkStackIndex] = null),
4142 (treeForkCount = forkStack[--forkStackIndex]),
4143 (forkStack[forkStackIndex] = null);
4144 for (; workInProgress === treeContextProvider; )
4145 (treeContextProvider = idStack[--idStackIndex]),
4146 (idStack[idStackIndex] = null),
4147 (treeContextOverflow = idStack[--idStackIndex]),
4148 (idStack[idStackIndex] = null),
4149 (treeContextId = idStack[--idStackIndex]),
4150 (idStack[idStackIndex] = null);
4151}
4152var hydrationParentFiber = null,
4153 nextHydratableInstance = null,
4154 isHydrating = !1,
4155 hydrationErrors = null,
4156 rootOrSingletonContext = !1,
4157 HydrationMismatchException = Error(formatProdErrorMessage(519));
4158function throwOnHydrationMismatch(fiber) {
4159 var error = Error(formatProdErrorMessage(418, ""));
4160 queueHydrationError(createCapturedValueAtFiber(error, fiber));
4161 throw HydrationMismatchException;
4162}
4163function prepareToHydrateHostInstance(fiber) {
4164 var instance = fiber.stateNode,
4165 type = fiber.type,
4166 props = fiber.memoizedProps;
4167 instance[internalInstanceKey] = fiber;
4168 instance[internalPropsKey] = props;
4169 switch (type) {
4170 case "dialog":
4171 listenToNonDelegatedEvent("cancel", instance);
4172 listenToNonDelegatedEvent("close", instance);
4173 break;
4174 case "iframe":
4175 case "object":
4176 case "embed":
4177 listenToNonDelegatedEvent("load", instance);
4178 break;
4179 case "video":
4180 case "audio":
4181 for (type = 0; type < mediaEventTypes.length; type++)
4182 listenToNonDelegatedEvent(mediaEventTypes[type], instance);
4183 break;
4184 case "source":
4185 listenToNonDelegatedEvent("error", instance);
4186 break;
4187 case "img":
4188 case "image":
4189 case "link":
4190 listenToNonDelegatedEvent("error", instance);
4191 listenToNonDelegatedEvent("load", instance);
4192 break;
4193 case "details":
4194 listenToNonDelegatedEvent("toggle", instance);
4195 break;
4196 case "input":
4197 listenToNonDelegatedEvent("invalid", instance);
4198 initInput(
4199 instance,
4200 props.value,
4201 props.defaultValue,
4202 props.checked,
4203 props.defaultChecked,
4204 props.type,
4205 props.name,
4206 !0
4207 );
4208 track(instance);
4209 break;
4210 case "select":
4211 listenToNonDelegatedEvent("invalid", instance);
4212 break;
4213 case "textarea":
4214 listenToNonDelegatedEvent("invalid", instance),
4215 initTextarea(instance, props.value, props.defaultValue, props.children),
4216 track(instance);
4217 }
4218 type = props.children;
4219 ("string" !== typeof type &&
4220 "number" !== typeof type &&
4221 "bigint" !== typeof type) ||
4222 instance.textContent === "" + type ||
4223 !0 === props.suppressHydrationWarning ||
4224 checkForUnmatchedText(instance.textContent, type)
4225 ? (null != props.onScroll && listenToNonDelegatedEvent("scroll", instance),
4226 null != props.onScrollEnd &&
4227 listenToNonDelegatedEvent("scrollend", instance),
4228 null != props.onClick && (instance.onclick = noop$2),
4229 (instance = !0))
4230 : (instance = !1);
4231 instance || throwOnHydrationMismatch(fiber);
4232}
4233function popToNextHostParent(fiber) {
4234 for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
4235 switch (hydrationParentFiber.tag) {
4236 case 3:
4237 case 27:
4238 rootOrSingletonContext = !0;
4239 return;
4240 case 5:
4241 case 13:
4242 rootOrSingletonContext = !1;
4243 return;
4244 default:
4245 hydrationParentFiber = hydrationParentFiber.return;
4246 }
4247}
4248function popHydrationState(fiber) {
4249 if (fiber !== hydrationParentFiber) return !1;
4250 if (!isHydrating) return popToNextHostParent(fiber), (isHydrating = !0), !1;
4251 var shouldClear = !1,
4252 JSCompiler_temp;
4253 if ((JSCompiler_temp = 3 !== fiber.tag && 27 !== fiber.tag)) {
4254 if ((JSCompiler_temp = 5 === fiber.tag))
4255 (JSCompiler_temp = fiber.type),
4256 (JSCompiler_temp =
4257 !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) ||
4258 shouldSetTextContent(fiber.type, fiber.memoizedProps));
4259 JSCompiler_temp = !JSCompiler_temp;
4260 }
4261 JSCompiler_temp && (shouldClear = !0);
4262 shouldClear && nextHydratableInstance && throwOnHydrationMismatch(fiber);
4263 popToNextHostParent(fiber);
4264 if (13 === fiber.tag) {
4265 fiber = fiber.memoizedState;
4266 fiber = null !== fiber ? fiber.dehydrated : null;
4267 if (!fiber) throw Error(formatProdErrorMessage(317));
4268 a: {
4269 fiber = fiber.nextSibling;
4270 for (shouldClear = 0; fiber; ) {
4271 if (8 === fiber.nodeType)
4272 if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) {
4273 if (0 === shouldClear) {
4274 nextHydratableInstance = getNextHydratable(fiber.nextSibling);
4275 break a;
4276 }
4277 shouldClear--;
4278 } else
4279 ("$" !== JSCompiler_temp &&
4280 "$!" !== JSCompiler_temp &&
4281 "$?" !== JSCompiler_temp) ||
4282 shouldClear++;
4283 fiber = fiber.nextSibling;
4284 }
4285 nextHydratableInstance = null;
4286 }
4287 } else
4288 nextHydratableInstance = hydrationParentFiber
4289 ? getNextHydratable(fiber.stateNode.nextSibling)
4290 : null;
4291 return !0;
4292}
4293function resetHydrationState() {
4294 nextHydratableInstance = hydrationParentFiber = null;
4295 isHydrating = !1;
4296}
4297function queueHydrationError(error) {
4298 null === hydrationErrors
4299 ? (hydrationErrors = [error])
4300 : hydrationErrors.push(error);
4301}
4302var SuspenseException = Error(formatProdErrorMessage(460)),
4303 SuspenseyCommitException = Error(formatProdErrorMessage(474)),
4304 noopSuspenseyCommitThenable = { then: function () {} };
4305function isThenableResolved(thenable) {
4306 thenable = thenable.status;
4307 return "fulfilled" === thenable || "rejected" === thenable;
4308}
4309function noop$1() {}
4310function trackUsedThenable(thenableState, thenable, index) {
4311 index = thenableState[index];
4312 void 0 === index
4313 ? thenableState.push(thenable)
4314 : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));
4315 switch (thenable.status) {
4316 case "fulfilled":
4317 return thenable.value;
4318 case "rejected":
4319 thenableState = thenable.reason;
4320 if (thenableState === SuspenseException)
4321 throw Error(formatProdErrorMessage(483));
4322 throw thenableState;
4323 default:
4324 if ("string" === typeof thenable.status) thenable.then(noop$1, noop$1);
4325 else {
4326 thenableState = workInProgressRoot;
4327 if (null !== thenableState && 100 < thenableState.shellSuspendCounter)
4328 throw Error(formatProdErrorMessage(482));
4329 thenableState = thenable;
4330 thenableState.status = "pending";
4331 thenableState.then(
4332 function (fulfilledValue) {
4333 if ("pending" === thenable.status) {
4334 var fulfilledThenable = thenable;
4335 fulfilledThenable.status = "fulfilled";
4336 fulfilledThenable.value = fulfilledValue;
4337 }
4338 },
4339 function (error) {
4340 if ("pending" === thenable.status) {
4341 var rejectedThenable = thenable;
4342 rejectedThenable.status = "rejected";
4343 rejectedThenable.reason = error;
4344 }
4345 }
4346 );
4347 }
4348 switch (thenable.status) {
4349 case "fulfilled":
4350 return thenable.value;
4351 case "rejected":
4352 thenableState = thenable.reason;
4353 if (thenableState === SuspenseException)
4354 throw Error(formatProdErrorMessage(483));
4355 throw thenableState;
4356 }
4357 suspendedThenable = thenable;
4358 throw SuspenseException;
4359 }
4360}
4361var suspendedThenable = null;
4362function getSuspendedThenable() {
4363 if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));
4364 var thenable = suspendedThenable;
4365 suspendedThenable = null;
4366 return thenable;
4367}
4368var thenableState$1 = null,
4369 thenableIndexCounter$1 = 0;
4370function unwrapThenable(thenable) {
4371 var index = thenableIndexCounter$1;
4372 thenableIndexCounter$1 += 1;
4373 null === thenableState$1 && (thenableState$1 = []);
4374 return trackUsedThenable(thenableState$1, thenable, index);
4375}
4376function coerceRef(returnFiber, current, workInProgress, element) {
4377 returnFiber = element.props.ref;
4378 workInProgress.ref = void 0 !== returnFiber ? returnFiber : null;
4379}
4380function throwOnInvalidObjectType(returnFiber, newChild) {
4381 if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
4382 throw Error(formatProdErrorMessage(525));
4383 returnFiber = Object.prototype.toString.call(newChild);
4384 throw Error(
4385 formatProdErrorMessage(
4386 31,
4387 "[object Object]" === returnFiber
4388 ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
4389 : returnFiber
4390 )
4391 );
4392}
4393function resolveLazy(lazyType) {
4394 var init = lazyType._init;
4395 return init(lazyType._payload);
4396}
4397function createChildReconciler(shouldTrackSideEffects) {
4398 function deleteChild(returnFiber, childToDelete) {
4399 if (shouldTrackSideEffects) {
4400 var deletions = returnFiber.deletions;
4401 null === deletions
4402 ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))
4403 : deletions.push(childToDelete);
4404 }
4405 }
4406 function deleteRemainingChildren(returnFiber, currentFirstChild) {
4407 if (!shouldTrackSideEffects) return null;
4408 for (; null !== currentFirstChild; )
4409 deleteChild(returnFiber, currentFirstChild),
4410 (currentFirstChild = currentFirstChild.sibling);
4411 return null;
4412 }
4413 function mapRemainingChildren(currentFirstChild) {
4414 for (var existingChildren = new Map(); null !== currentFirstChild; )
4415 null !== currentFirstChild.key
4416 ? existingChildren.set(currentFirstChild.key, currentFirstChild)
4417 : existingChildren.set(currentFirstChild.index, currentFirstChild),
4418 (currentFirstChild = currentFirstChild.sibling);
4419 return existingChildren;
4420 }
4421 function useFiber(fiber, pendingProps) {
4422 fiber = createWorkInProgress(fiber, pendingProps);
4423 fiber.index = 0;
4424 fiber.sibling = null;
4425 return fiber;
4426 }
4427 function placeChild(newFiber, lastPlacedIndex, newIndex) {
4428 newFiber.index = newIndex;
4429 if (!shouldTrackSideEffects)
4430 return (newFiber.flags |= 1048576), lastPlacedIndex;
4431 newIndex = newFiber.alternate;
4432 if (null !== newIndex)
4433 return (
4434 (newIndex = newIndex.index),
4435 newIndex < lastPlacedIndex
4436 ? ((newFiber.flags |= 33554434), lastPlacedIndex)
4437 : newIndex
4438 );
4439 newFiber.flags |= 33554434;
4440 return lastPlacedIndex;
4441 }
4442 function placeSingleChild(newFiber) {
4443 shouldTrackSideEffects &&
4444 null === newFiber.alternate &&
4445 (newFiber.flags |= 33554434);
4446 return newFiber;
4447 }
4448 function updateTextNode(returnFiber, current, textContent, lanes) {
4449 if (null === current || 6 !== current.tag)
4450 return (
4451 (current = createFiberFromText(textContent, returnFiber.mode, lanes)),
4452 (current.return = returnFiber),
4453 current
4454 );
4455 current = useFiber(current, textContent);
4456 current.return = returnFiber;
4457 return current;
4458 }
4459 function updateElement(returnFiber, current, element, lanes) {
4460 var elementType = element.type;
4461 if (elementType === REACT_FRAGMENT_TYPE)
4462 return updateFragment(
4463 returnFiber,
4464 current,
4465 element.props.children,
4466 lanes,
4467 element.key
4468 );
4469 if (
4470 null !== current &&
4471 (current.elementType === elementType ||
4472 ("object" === typeof elementType &&
4473 null !== elementType &&
4474 elementType.$$typeof === REACT_LAZY_TYPE &&
4475 resolveLazy(elementType) === current.type))
4476 )
4477 return (
4478 (lanes = useFiber(current, element.props)),
4479 coerceRef(returnFiber, current, lanes, element),
4480 (lanes.return = returnFiber),
4481 lanes
4482 );
4483 lanes = createFiberFromTypeAndProps(
4484 element.type,
4485 element.key,
4486 element.props,
4487 null,
4488 returnFiber.mode,
4489 lanes
4490 );
4491 coerceRef(returnFiber, current, lanes, element);
4492 lanes.return = returnFiber;
4493 return lanes;
4494 }
4495 function updatePortal(returnFiber, current, portal, lanes) {
4496 if (
4497 null === current ||
4498 4 !== current.tag ||
4499 current.stateNode.containerInfo !== portal.containerInfo ||
4500 current.stateNode.implementation !== portal.implementation
4501 )
4502 return (
4503 (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),
4504 (current.return = returnFiber),
4505 current
4506 );
4507 current = useFiber(current, portal.children || []);
4508 current.return = returnFiber;
4509 return current;
4510 }
4511 function updateFragment(returnFiber, current, fragment, lanes, key) {
4512 if (null === current || 7 !== current.tag)
4513 return (
4514 (current = createFiberFromFragment(
4515 fragment,
4516 returnFiber.mode,
4517 lanes,
4518 key
4519 )),
4520 (current.return = returnFiber),
4521 current
4522 );
4523 current = useFiber(current, fragment);
4524 current.return = returnFiber;
4525 return current;
4526 }
4527 function createChild(returnFiber, newChild, lanes) {
4528 if (
4529 ("string" === typeof newChild && "" !== newChild) ||
4530 "number" === typeof newChild ||
4531 "bigint" === typeof newChild
4532 )
4533 return (
4534 (newChild = createFiberFromText(
4535 "" + newChild,
4536 returnFiber.mode,
4537 lanes
4538 )),
4539 (newChild.return = returnFiber),
4540 newChild
4541 );
4542 if ("object" === typeof newChild && null !== newChild) {
4543 switch (newChild.$$typeof) {
4544 case REACT_ELEMENT_TYPE:
4545 return (
4546 (lanes = createFiberFromTypeAndProps(
4547 newChild.type,
4548 newChild.key,
4549 newChild.props,
4550 null,
4551 returnFiber.mode,
4552 lanes
4553 )),
4554 coerceRef(returnFiber, null, lanes, newChild),
4555 (lanes.return = returnFiber),
4556 lanes
4557 );
4558 case REACT_PORTAL_TYPE:
4559 return (
4560 (newChild = createFiberFromPortal(
4561 newChild,
4562 returnFiber.mode,
4563 lanes
4564 )),
4565 (newChild.return = returnFiber),
4566 newChild
4567 );
4568 case REACT_LAZY_TYPE:
4569 var init = newChild._init;
4570 return createChild(returnFiber, init(newChild._payload), lanes);
4571 }
4572 if (isArrayImpl(newChild) || getIteratorFn(newChild))
4573 return (
4574 (newChild = createFiberFromFragment(
4575 newChild,
4576 returnFiber.mode,
4577 lanes,
4578 null
4579 )),
4580 (newChild.return = returnFiber),
4581 newChild
4582 );
4583 if ("function" === typeof newChild.then)
4584 return createChild(returnFiber, unwrapThenable(newChild), lanes);
4585 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
4586 return createChild(
4587 returnFiber,
4588 readContextDuringReconciliation(returnFiber, newChild, lanes),
4589 lanes
4590 );
4591 throwOnInvalidObjectType(returnFiber, newChild);
4592 }
4593 return null;
4594 }
4595 function updateSlot(returnFiber, oldFiber, newChild, lanes) {
4596 var key = null !== oldFiber ? oldFiber.key : null;
4597 if (
4598 ("string" === typeof newChild && "" !== newChild) ||
4599 "number" === typeof newChild ||
4600 "bigint" === typeof newChild
4601 )
4602 return null !== key
4603 ? null
4604 : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
4605 if ("object" === typeof newChild && null !== newChild) {
4606 switch (newChild.$$typeof) {
4607 case REACT_ELEMENT_TYPE:
4608 return newChild.key === key
4609 ? updateElement(returnFiber, oldFiber, newChild, lanes)
4610 : null;
4611 case REACT_PORTAL_TYPE:
4612 return newChild.key === key
4613 ? updatePortal(returnFiber, oldFiber, newChild, lanes)
4614 : null;
4615 case REACT_LAZY_TYPE:
4616 return (
4617 (key = newChild._init),
4618 updateSlot(returnFiber, oldFiber, key(newChild._payload), lanes)
4619 );
4620 }
4621 if (isArrayImpl(newChild) || getIteratorFn(newChild))
4622 return null !== key
4623 ? null
4624 : updateFragment(returnFiber, oldFiber, newChild, lanes, null);
4625 if ("function" === typeof newChild.then)
4626 return updateSlot(
4627 returnFiber,
4628 oldFiber,
4629 unwrapThenable(newChild),
4630 lanes
4631 );
4632 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
4633 return updateSlot(
4634 returnFiber,
4635 oldFiber,
4636 readContextDuringReconciliation(returnFiber, newChild, lanes),
4637 lanes
4638 );
4639 throwOnInvalidObjectType(returnFiber, newChild);
4640 }
4641 return null;
4642 }
4643 function updateFromMap(
4644 existingChildren,
4645 returnFiber,
4646 newIdx,
4647 newChild,
4648 lanes
4649 ) {
4650 if (
4651 ("string" === typeof newChild && "" !== newChild) ||
4652 "number" === typeof newChild ||
4653 "bigint" === typeof newChild
4654 )
4655 return (
4656 (existingChildren = existingChildren.get(newIdx) || null),
4657 updateTextNode(returnFiber, existingChildren, "" + newChild, lanes)
4658 );
4659 if ("object" === typeof newChild && null !== newChild) {
4660 switch (newChild.$$typeof) {
4661 case REACT_ELEMENT_TYPE:
4662 return (
4663 (existingChildren =
4664 existingChildren.get(
4665 null === newChild.key ? newIdx : newChild.key
4666 ) || null),
4667 updateElement(returnFiber, existingChildren, newChild, lanes)
4668 );
4669 case REACT_PORTAL_TYPE:
4670 return (
4671 (existingChildren =
4672 existingChildren.get(
4673 null === newChild.key ? newIdx : newChild.key
4674 ) || null),
4675 updatePortal(returnFiber, existingChildren, newChild, lanes)
4676 );
4677 case REACT_LAZY_TYPE:
4678 var init = newChild._init;
4679 return updateFromMap(
4680 existingChildren,
4681 returnFiber,
4682 newIdx,
4683 init(newChild._payload),
4684 lanes
4685 );
4686 }
4687 if (isArrayImpl(newChild) || getIteratorFn(newChild))
4688 return (
4689 (existingChildren = existingChildren.get(newIdx) || null),
4690 updateFragment(returnFiber, existingChildren, newChild, lanes, null)
4691 );
4692 if ("function" === typeof newChild.then)
4693 return updateFromMap(
4694 existingChildren,
4695 returnFiber,
4696 newIdx,
4697 unwrapThenable(newChild),
4698 lanes
4699 );
4700 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
4701 return updateFromMap(
4702 existingChildren,
4703 returnFiber,
4704 newIdx,
4705 readContextDuringReconciliation(returnFiber, newChild, lanes),
4706 lanes
4707 );
4708 throwOnInvalidObjectType(returnFiber, newChild);
4709 }
4710 return null;
4711 }
4712 function reconcileChildrenArray(
4713 returnFiber,
4714 currentFirstChild,
4715 newChildren,
4716 lanes
4717 ) {
4718 for (
4719 var resultingFirstChild = null,
4720 previousNewFiber = null,
4721 oldFiber = currentFirstChild,
4722 newIdx = (currentFirstChild = 0),
4723 nextOldFiber = null;
4724 null !== oldFiber && newIdx < newChildren.length;
4725 newIdx++
4726 ) {
4727 oldFiber.index > newIdx
4728 ? ((nextOldFiber = oldFiber), (oldFiber = null))
4729 : (nextOldFiber = oldFiber.sibling);
4730 var newFiber = updateSlot(
4731 returnFiber,
4732 oldFiber,
4733 newChildren[newIdx],
4734 lanes
4735 );
4736 if (null === newFiber) {
4737 null === oldFiber && (oldFiber = nextOldFiber);
4738 break;
4739 }
4740 shouldTrackSideEffects &&
4741 oldFiber &&
4742 null === newFiber.alternate &&
4743 deleteChild(returnFiber, oldFiber);
4744 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
4745 null === previousNewFiber
4746 ? (resultingFirstChild = newFiber)
4747 : (previousNewFiber.sibling = newFiber);
4748 previousNewFiber = newFiber;
4749 oldFiber = nextOldFiber;
4750 }
4751 if (newIdx === newChildren.length)
4752 return (
4753 deleteRemainingChildren(returnFiber, oldFiber),
4754 isHydrating && pushTreeFork(returnFiber, newIdx),
4755 resultingFirstChild
4756 );
4757 if (null === oldFiber) {
4758 for (; newIdx < newChildren.length; newIdx++)
4759 (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),
4760 null !== oldFiber &&
4761 ((currentFirstChild = placeChild(
4762 oldFiber,
4763 currentFirstChild,
4764 newIdx
4765 )),
4766 null === previousNewFiber
4767 ? (resultingFirstChild = oldFiber)
4768 : (previousNewFiber.sibling = oldFiber),
4769 (previousNewFiber = oldFiber));
4770 isHydrating && pushTreeFork(returnFiber, newIdx);
4771 return resultingFirstChild;
4772 }
4773 for (
4774 oldFiber = mapRemainingChildren(oldFiber);
4775 newIdx < newChildren.length;
4776 newIdx++
4777 )
4778 (nextOldFiber = updateFromMap(
4779 oldFiber,
4780 returnFiber,
4781 newIdx,
4782 newChildren[newIdx],
4783 lanes
4784 )),
4785 null !== nextOldFiber &&
4786 (shouldTrackSideEffects &&
4787 null !== nextOldFiber.alternate &&
4788 oldFiber.delete(
4789 null === nextOldFiber.key ? newIdx : nextOldFiber.key
4790 ),
4791 (currentFirstChild = placeChild(
4792 nextOldFiber,
4793 currentFirstChild,
4794 newIdx
4795 )),
4796 null === previousNewFiber
4797 ? (resultingFirstChild = nextOldFiber)
4798 : (previousNewFiber.sibling = nextOldFiber),
4799 (previousNewFiber = nextOldFiber));
4800 shouldTrackSideEffects &&
4801 oldFiber.forEach(function (child) {
4802 return deleteChild(returnFiber, child);
4803 });
4804 isHydrating && pushTreeFork(returnFiber, newIdx);
4805 return resultingFirstChild;
4806 }
4807 function reconcileChildrenIterator(
4808 returnFiber,
4809 currentFirstChild,
4810 newChildren,
4811 lanes
4812 ) {
4813 if (null == newChildren) throw Error(formatProdErrorMessage(151));
4814 for (
4815 var resultingFirstChild = null,
4816 previousNewFiber = null,
4817 oldFiber = currentFirstChild,
4818 newIdx = (currentFirstChild = 0),
4819 nextOldFiber = null,
4820 step = newChildren.next();
4821 null !== oldFiber && !step.done;
4822 newIdx++, step = newChildren.next(), null
4823 ) {
4824 oldFiber.index > newIdx
4825 ? ((nextOldFiber = oldFiber), (oldFiber = null))
4826 : (nextOldFiber = oldFiber.sibling);
4827 var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
4828 if (null === newFiber) {
4829 null === oldFiber && (oldFiber = nextOldFiber);
4830 break;
4831 }
4832 shouldTrackSideEffects &&
4833 oldFiber &&
4834 null === newFiber.alternate &&
4835 deleteChild(returnFiber, oldFiber);
4836 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
4837 null === previousNewFiber
4838 ? (resultingFirstChild = newFiber)
4839 : (previousNewFiber.sibling = newFiber);
4840 previousNewFiber = newFiber;
4841 oldFiber = nextOldFiber;
4842 }
4843 if (step.done)
4844 return (
4845 deleteRemainingChildren(returnFiber, oldFiber),
4846 isHydrating && pushTreeFork(returnFiber, newIdx),
4847 resultingFirstChild
4848 );
4849 if (null === oldFiber) {
4850 for (; !step.done; newIdx++, step = newChildren.next(), null)
4851 (step = createChild(returnFiber, step.value, lanes)),
4852 null !== step &&
4853 ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
4854 null === previousNewFiber
4855 ? (resultingFirstChild = step)
4856 : (previousNewFiber.sibling = step),
4857 (previousNewFiber = step));
4858 isHydrating && pushTreeFork(returnFiber, newIdx);
4859 return resultingFirstChild;
4860 }
4861 for (
4862 oldFiber = mapRemainingChildren(oldFiber);
4863 !step.done;
4864 newIdx++, step = newChildren.next(), null
4865 )
4866 (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),
4867 null !== step &&
4868 (shouldTrackSideEffects &&
4869 null !== step.alternate &&
4870 oldFiber.delete(null === step.key ? newIdx : step.key),
4871 (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
4872 null === previousNewFiber
4873 ? (resultingFirstChild = step)
4874 : (previousNewFiber.sibling = step),
4875 (previousNewFiber = step));
4876 shouldTrackSideEffects &&
4877 oldFiber.forEach(function (child) {
4878 return deleteChild(returnFiber, child);
4879 });
4880 isHydrating && pushTreeFork(returnFiber, newIdx);
4881 return resultingFirstChild;
4882 }
4883 function reconcileChildFibersImpl(
4884 returnFiber,
4885 currentFirstChild,
4886 newChild,
4887 lanes
4888 ) {
4889 "object" === typeof newChild &&
4890 null !== newChild &&
4891 newChild.type === REACT_FRAGMENT_TYPE &&
4892 null === newChild.key &&
4893 (newChild = newChild.props.children);
4894 if ("object" === typeof newChild && null !== newChild) {
4895 switch (newChild.$$typeof) {
4896 case REACT_ELEMENT_TYPE:
4897 a: {
4898 for (
4899 var key = newChild.key, child = currentFirstChild;
4900 null !== child;
4901
4902 ) {
4903 if (child.key === key) {
4904 key = newChild.type;
4905 if (key === REACT_FRAGMENT_TYPE) {
4906 if (7 === child.tag) {
4907 deleteRemainingChildren(returnFiber, child.sibling);
4908 currentFirstChild = useFiber(
4909 child,
4910 newChild.props.children
4911 );
4912 currentFirstChild.return = returnFiber;
4913 returnFiber = currentFirstChild;
4914 break a;
4915 }
4916 } else if (
4917 child.elementType === key ||
4918 ("object" === typeof key &&
4919 null !== key &&
4920 key.$$typeof === REACT_LAZY_TYPE &&
4921 resolveLazy(key) === child.type)
4922 ) {
4923 deleteRemainingChildren(returnFiber, child.sibling);
4924 currentFirstChild = useFiber(child, newChild.props);
4925 coerceRef(returnFiber, child, currentFirstChild, newChild);
4926 currentFirstChild.return = returnFiber;
4927 returnFiber = currentFirstChild;
4928 break a;
4929 }
4930 deleteRemainingChildren(returnFiber, child);
4931 break;
4932 } else deleteChild(returnFiber, child);
4933 child = child.sibling;
4934 }
4935 newChild.type === REACT_FRAGMENT_TYPE
4936 ? ((currentFirstChild = createFiberFromFragment(
4937 newChild.props.children,
4938 returnFiber.mode,
4939 lanes,
4940 newChild.key
4941 )),
4942 (currentFirstChild.return = returnFiber),
4943 (returnFiber = currentFirstChild))
4944 : ((lanes = createFiberFromTypeAndProps(
4945 newChild.type,
4946 newChild.key,
4947 newChild.props,
4948 null,
4949 returnFiber.mode,
4950 lanes
4951 )),
4952 coerceRef(returnFiber, currentFirstChild, lanes, newChild),
4953 (lanes.return = returnFiber),
4954 (returnFiber = lanes));
4955 }
4956 return placeSingleChild(returnFiber);
4957 case REACT_PORTAL_TYPE:
4958 a: {
4959 for (child = newChild.key; null !== currentFirstChild; ) {
4960 if (currentFirstChild.key === child)
4961 if (
4962 4 === currentFirstChild.tag &&
4963 currentFirstChild.stateNode.containerInfo ===
4964 newChild.containerInfo &&
4965 currentFirstChild.stateNode.implementation ===
4966 newChild.implementation
4967 ) {
4968 deleteRemainingChildren(
4969 returnFiber,
4970 currentFirstChild.sibling
4971 );
4972 currentFirstChild = useFiber(
4973 currentFirstChild,
4974 newChild.children || []
4975 );
4976 currentFirstChild.return = returnFiber;
4977 returnFiber = currentFirstChild;
4978 break a;
4979 } else {
4980 deleteRemainingChildren(returnFiber, currentFirstChild);
4981 break;
4982 }
4983 else deleteChild(returnFiber, currentFirstChild);
4984 currentFirstChild = currentFirstChild.sibling;
4985 }
4986 currentFirstChild = createFiberFromPortal(
4987 newChild,
4988 returnFiber.mode,
4989 lanes
4990 );
4991 currentFirstChild.return = returnFiber;
4992 returnFiber = currentFirstChild;
4993 }
4994 return placeSingleChild(returnFiber);
4995 case REACT_LAZY_TYPE:
4996 return (
4997 (child = newChild._init),
4998 reconcileChildFibersImpl(
4999 returnFiber,
5000 currentFirstChild,
5001 child(newChild._payload),
5002 lanes
5003 )
5004 );
5005 }
5006 if (isArrayImpl(newChild))
5007 return reconcileChildrenArray(
5008 returnFiber,
5009 currentFirstChild,
5010 newChild,
5011 lanes
5012 );
5013 if (getIteratorFn(newChild)) {
5014 child = getIteratorFn(newChild);
5015 if ("function" !== typeof child)
5016 throw Error(formatProdErrorMessage(150));
5017 newChild = child.call(newChild);
5018 return reconcileChildrenIterator(
5019 returnFiber,
5020 currentFirstChild,
5021 newChild,
5022 lanes
5023 );
5024 }
5025 if ("function" === typeof newChild.then)
5026 return reconcileChildFibersImpl(
5027 returnFiber,
5028 currentFirstChild,
5029 unwrapThenable(newChild),
5030 lanes
5031 );
5032 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5033 return reconcileChildFibersImpl(
5034 returnFiber,
5035 currentFirstChild,
5036 readContextDuringReconciliation(returnFiber, newChild, lanes),
5037 lanes
5038 );
5039 throwOnInvalidObjectType(returnFiber, newChild);
5040 }
5041 return ("string" === typeof newChild && "" !== newChild) ||
5042 "number" === typeof newChild ||
5043 "bigint" === typeof newChild
5044 ? ((newChild = "" + newChild),
5045 null !== currentFirstChild && 6 === currentFirstChild.tag
5046 ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
5047 (currentFirstChild = useFiber(currentFirstChild, newChild)),
5048 (currentFirstChild.return = returnFiber),
5049 (returnFiber = currentFirstChild))
5050 : (deleteRemainingChildren(returnFiber, currentFirstChild),
5051 (currentFirstChild = createFiberFromText(
5052 newChild,
5053 returnFiber.mode,
5054 lanes
5055 )),
5056 (currentFirstChild.return = returnFiber),
5057 (returnFiber = currentFirstChild)),
5058 placeSingleChild(returnFiber))
5059 : deleteRemainingChildren(returnFiber, currentFirstChild);
5060 }
5061 return function (returnFiber, currentFirstChild, newChild, lanes) {
5062 thenableIndexCounter$1 = 0;
5063 returnFiber = reconcileChildFibersImpl(
5064 returnFiber,
5065 currentFirstChild,
5066 newChild,
5067 lanes
5068 );
5069 thenableState$1 = null;
5070 return returnFiber;
5071 };
5072}
5073var reconcileChildFibers = createChildReconciler(!0),
5074 mountChildFibers = createChildReconciler(!1),
5075 currentTreeHiddenStackCursor = createCursor(null),
5076 prevEntangledRenderLanesCursor = createCursor(0);
5077function pushHiddenContext(fiber, context) {
5078 fiber = entangledRenderLanes;
5079 push(prevEntangledRenderLanesCursor, fiber);
5080 push(currentTreeHiddenStackCursor, context);
5081 entangledRenderLanes = fiber | context.baseLanes;
5082}
5083function reuseHiddenContextOnStack() {
5084 push(prevEntangledRenderLanesCursor, entangledRenderLanes);
5085 push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);
5086}
5087function popHiddenContext() {
5088 entangledRenderLanes = prevEntangledRenderLanesCursor.current;
5089 pop(currentTreeHiddenStackCursor);
5090 pop(prevEntangledRenderLanesCursor);
5091}
5092var suspenseHandlerStackCursor = createCursor(null),
5093 shellBoundary = null;
5094function pushPrimaryTreeSuspenseHandler(handler) {
5095 var current = handler.alternate;
5096 push(suspenseStackCursor, suspenseStackCursor.current & 1);
5097 push(suspenseHandlerStackCursor, handler);
5098 null === shellBoundary &&
5099 (null === current || null !== currentTreeHiddenStackCursor.current
5100 ? (shellBoundary = handler)
5101 : null !== current.memoizedState && (shellBoundary = handler));
5102}
5103function pushOffscreenSuspenseHandler(fiber) {
5104 if (22 === fiber.tag) {
5105 if (
5106 (push(suspenseStackCursor, suspenseStackCursor.current),
5107 push(suspenseHandlerStackCursor, fiber),
5108 null === shellBoundary)
5109 ) {
5110 var current = fiber.alternate;
5111 null !== current &&
5112 null !== current.memoizedState &&
5113 (shellBoundary = fiber);
5114 }
5115 } else reuseSuspenseHandlerOnStack(fiber);
5116}
5117function reuseSuspenseHandlerOnStack() {
5118 push(suspenseStackCursor, suspenseStackCursor.current);
5119 push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
5120}
5121function popSuspenseHandler(fiber) {
5122 pop(suspenseHandlerStackCursor);
5123 shellBoundary === fiber && (shellBoundary = null);
5124 pop(suspenseStackCursor);
5125}
5126var suspenseStackCursor = createCursor(0);
5127function findFirstSuspended(row) {
5128 for (var node = row; null !== node; ) {
5129 if (13 === node.tag) {
5130 var state = node.memoizedState;
5131 if (
5132 null !== state &&
5133 ((state = state.dehydrated),
5134 null === state || "$?" === state.data || "$!" === state.data)
5135 )
5136 return node;
5137 } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
5138 if (0 !== (node.flags & 128)) return node;
5139 } else if (null !== node.child) {
5140 node.child.return = node;
5141 node = node.child;
5142 continue;
5143 }
5144 if (node === row) break;
5145 for (; null === node.sibling; ) {
5146 if (null === node.return || node.return === row) return null;
5147 node = node.return;
5148 }
5149 node.sibling.return = node.return;
5150 node = node.sibling;
5151 }
5152 return null;
5153}
5154var AbortControllerLocal =
5155 "undefined" !== typeof AbortController
5156 ? AbortController
5157 : function () {
5158 var listeners = [],
5159 signal = (this.signal = {
5160 aborted: !1,
5161 addEventListener: function (type, listener) {
5162 listeners.push(listener);
5163 }
5164 });
5165 this.abort = function () {
5166 signal.aborted = !0;
5167 listeners.forEach(function (listener) {
5168 return listener();
5169 });
5170 };
5171 },
5172 scheduleCallback$2 = Scheduler.unstable_scheduleCallback,
5173 NormalPriority = Scheduler.unstable_NormalPriority,
5174 CacheContext = {
5175 $$typeof: REACT_CONTEXT_TYPE,
5176 Consumer: null,
5177 Provider: null,
5178 _currentValue: null,
5179 _currentValue2: null,
5180 _threadCount: 0
5181 };
5182function createCache() {
5183 return {
5184 controller: new AbortControllerLocal(),
5185 data: new Map(),
5186 refCount: 0
5187 };
5188}
5189function releaseCache(cache) {
5190 cache.refCount--;
5191 0 === cache.refCount &&
5192 scheduleCallback$2(NormalPriority, function () {
5193 cache.controller.abort();
5194 });
5195}
5196var firstScheduledRoot = null,
5197 lastScheduledRoot = null,
5198 didScheduleMicrotask = !1,
5199 mightHavePendingSyncWork = !1,
5200 isFlushingWork = !1,
5201 currentEventTransitionLane = 0;
5202function ensureRootIsScheduled(root) {
5203 root !== lastScheduledRoot &&
5204 null === root.next &&
5205 (null === lastScheduledRoot
5206 ? (firstScheduledRoot = lastScheduledRoot = root)
5207 : (lastScheduledRoot = lastScheduledRoot.next = root));
5208 mightHavePendingSyncWork = !0;
5209 didScheduleMicrotask ||
5210 ((didScheduleMicrotask = !0),
5211 scheduleImmediateTask(processRootScheduleInMicrotask));
5212}
5213function flushSyncWorkAcrossRoots_impl(onlyLegacy) {
5214 if (!isFlushingWork && mightHavePendingSyncWork) {
5215 isFlushingWork = !0;
5216 do {
5217 var didPerformSomeWork = !1;
5218 for (var root$100 = firstScheduledRoot; null !== root$100; ) {
5219 if (!onlyLegacy) {
5220 var workInProgressRootRenderLanes$102 = workInProgressRootRenderLanes;
5221 workInProgressRootRenderLanes$102 = getNextLanes(
5222 root$100,
5223 root$100 === workInProgressRoot
5224 ? workInProgressRootRenderLanes$102
5225 : 0
5226 );
5227 0 !== (workInProgressRootRenderLanes$102 & 3) &&
5228 ((didPerformSomeWork = !0),
5229 performSyncWorkOnRoot(root$100, workInProgressRootRenderLanes$102));
5230 }
5231 root$100 = root$100.next;
5232 }
5233 } while (didPerformSomeWork);
5234 isFlushingWork = !1;
5235 }
5236}
5237function processRootScheduleInMicrotask() {
5238 mightHavePendingSyncWork = didScheduleMicrotask = !1;
5239 for (
5240 var currentTime = now(), prev = null, root = firstScheduledRoot;
5241 null !== root;
5242
5243 ) {
5244 var next = root.next;
5245 if (0 !== currentEventTransitionLane && shouldAttemptEagerTransition()) {
5246 var root$jscomp$0 = root,
5247 lane = currentEventTransitionLane;
5248 root$jscomp$0.pendingLanes |= 2;
5249 root$jscomp$0.entangledLanes |= 2;
5250 root$jscomp$0.entanglements[1] |= lane;
5251 }
5252 root$jscomp$0 = scheduleTaskForRootDuringMicrotask(root, currentTime);
5253 0 === root$jscomp$0
5254 ? ((root.next = null),
5255 null === prev ? (firstScheduledRoot = next) : (prev.next = next),
5256 null === next && (lastScheduledRoot = prev))
5257 : ((prev = root),
5258 0 !== (root$jscomp$0 & 3) && (mightHavePendingSyncWork = !0));
5259 root = next;
5260 }
5261 currentEventTransitionLane = 0;
5262 flushSyncWorkAcrossRoots_impl(!1);
5263}
5264function scheduleTaskForRootDuringMicrotask(root, currentTime) {
5265 for (
5266 var suspendedLanes = root.suspendedLanes,
5267 pingedLanes = root.pingedLanes,
5268 expirationTimes = root.expirationTimes,
5269 lanes = root.pendingLanes & -62914561;
5270 0 < lanes;
5271
5272 ) {
5273 var index$2 = 31 - clz32(lanes),
5274 lane = 1 << index$2,
5275 expirationTime = expirationTimes[index$2];
5276 if (-1 === expirationTime) {
5277 if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
5278 expirationTimes[index$2] = computeExpirationTime(lane, currentTime);
5279 } else expirationTime <= currentTime && (root.expiredLanes |= lane);
5280 lanes &= ~lane;
5281 }
5282 currentTime = workInProgressRoot;
5283 suspendedLanes = workInProgressRootRenderLanes;
5284 suspendedLanes = getNextLanes(
5285 root,
5286 root === currentTime ? suspendedLanes : 0
5287 );
5288 pingedLanes = root.callbackNode;
5289 if (
5290 0 === suspendedLanes ||
5291 (root === currentTime && 2 === workInProgressSuspendedReason) ||
5292 null !== root.cancelPendingCommit
5293 )
5294 return (
5295 null !== pingedLanes &&
5296 null !== pingedLanes &&
5297 cancelCallback$1(pingedLanes),
5298 (root.callbackNode = null),
5299 (root.callbackPriority = 0)
5300 );
5301 if (0 !== (suspendedLanes & 3))
5302 return (
5303 null !== pingedLanes &&
5304 null !== pingedLanes &&
5305 cancelCallback$1(pingedLanes),
5306 (root.callbackPriority = 2),
5307 (root.callbackNode = null),
5308 2
5309 );
5310 currentTime = suspendedLanes & -suspendedLanes;
5311 if (currentTime === root.callbackPriority) return currentTime;
5312 null !== pingedLanes && cancelCallback$1(pingedLanes);
5313 switch (lanesToEventPriority(suspendedLanes)) {
5314 case 2:
5315 suspendedLanes = ImmediatePriority;
5316 break;
5317 case 8:
5318 suspendedLanes = UserBlockingPriority;
5319 break;
5320 case 32:
5321 suspendedLanes = NormalPriority$1;
5322 break;
5323 case 268435456:
5324 suspendedLanes = IdlePriority;
5325 break;
5326 default:
5327 suspendedLanes = NormalPriority$1;
5328 }
5329 pingedLanes = performConcurrentWorkOnRoot.bind(null, root);
5330 suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
5331 root.callbackPriority = currentTime;
5332 root.callbackNode = suspendedLanes;
5333 return currentTime;
5334}
5335function scheduleImmediateTask(cb) {
5336 scheduleMicrotask(function () {
5337 0 !== (executionContext & 6)
5338 ? scheduleCallback$3(ImmediatePriority, cb)
5339 : cb();
5340 });
5341}
5342function requestTransitionLane() {
5343 0 === currentEventTransitionLane &&
5344 (currentEventTransitionLane = claimNextTransitionLane());
5345 return currentEventTransitionLane;
5346}
5347var currentEntangledListeners = null,
5348 currentEntangledPendingCount = 0,
5349 currentEntangledLane = 0,
5350 currentEntangledActionThenable = null;
5351function entangleAsyncAction(transition, thenable) {
5352 if (null === currentEntangledListeners) {
5353 var entangledListeners = (currentEntangledListeners = []);
5354 currentEntangledPendingCount = 0;
5355 currentEntangledLane = requestTransitionLane();
5356 currentEntangledActionThenable = {
5357 status: "pending",
5358 value: void 0,
5359 then: function (resolve) {
5360 entangledListeners.push(resolve);
5361 }
5362 };
5363 }
5364 currentEntangledPendingCount++;
5365 thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
5366 return thenable;
5367}
5368function pingEngtangledActionScope() {
5369 if (
5370 null !== currentEntangledListeners &&
5371 0 === --currentEntangledPendingCount
5372 ) {
5373 null !== currentEntangledActionThenable &&
5374 (currentEntangledActionThenable.status = "fulfilled");
5375 var listeners = currentEntangledListeners;
5376 currentEntangledListeners = null;
5377 currentEntangledLane = 0;
5378 currentEntangledActionThenable = null;
5379 for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
5380 }
5381}
5382function chainThenableValue(thenable, result) {
5383 var listeners = [],
5384 thenableWithOverride = {
5385 status: "pending",
5386 value: null,
5387 reason: null,
5388 then: function (resolve) {
5389 listeners.push(resolve);
5390 }
5391 };
5392 thenable.then(
5393 function () {
5394 thenableWithOverride.status = "fulfilled";
5395 thenableWithOverride.value = result;
5396 for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
5397 },
5398 function (error) {
5399 thenableWithOverride.status = "rejected";
5400 thenableWithOverride.reason = error;
5401 for (error = 0; error < listeners.length; error++)
5402 (0, listeners[error])(void 0);
5403 }
5404 );
5405 return thenableWithOverride;
5406}
5407function requestCurrentTransition() {
5408 var transition = ReactSharedInternals.T;
5409 null !== transition && transition._callbacks.add(handleAsyncAction);
5410 return transition;
5411}
5412function handleAsyncAction(transition, thenable) {
5413 entangleAsyncAction(transition, thenable);
5414}
5415function notifyTransitionCallbacks(transition, returnValue) {
5416 transition._callbacks.forEach(function (callback) {
5417 return callback(transition, returnValue);
5418 });
5419}
5420var resumedCache = createCursor(null);
5421function peekCacheFromPool() {
5422 var cacheResumedFromPreviousRender = resumedCache.current;
5423 return null !== cacheResumedFromPreviousRender
5424 ? cacheResumedFromPreviousRender
5425 : workInProgressRoot.pooledCache;
5426}
5427function pushTransition(offscreenWorkInProgress, prevCachePool) {
5428 null === prevCachePool
5429 ? push(resumedCache, resumedCache.current)
5430 : push(resumedCache, prevCachePool.pool);
5431}
5432function getSuspendedCache() {
5433 var cacheFromPool = peekCacheFromPool();
5434 return null === cacheFromPool
5435 ? null
5436 : { parent: CacheContext._currentValue, pool: cacheFromPool };
5437}
5438var renderLanes = 0,
5439 currentlyRenderingFiber$1 = null,
5440 currentHook = null,
5441 workInProgressHook = null,
5442 didScheduleRenderPhaseUpdate = !1,
5443 didScheduleRenderPhaseUpdateDuringThisPass = !1,
5444 shouldDoubleInvokeUserFnsInHooksDEV = !1,
5445 localIdCounter = 0,
5446 thenableIndexCounter = 0,
5447 thenableState = null,
5448 globalClientIdCounter = 0;
5449function throwInvalidHookError() {
5450 throw Error(formatProdErrorMessage(321));
5451}
5452function areHookInputsEqual(nextDeps, prevDeps) {
5453 if (null === prevDeps) return !1;
5454 for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
5455 if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
5456 return !0;
5457}
5458function renderWithHooks(
5459 current,
5460 workInProgress,
5461 Component,
5462 props,
5463 secondArg,
5464 nextRenderLanes
5465) {
5466 renderLanes = nextRenderLanes;
5467 currentlyRenderingFiber$1 = workInProgress;
5468 workInProgress.memoizedState = null;
5469 workInProgress.updateQueue = null;
5470 workInProgress.lanes = 0;
5471 ReactSharedInternals.H =
5472 null === current || null === current.memoizedState
5473 ? HooksDispatcherOnMount
5474 : HooksDispatcherOnUpdate;
5475 shouldDoubleInvokeUserFnsInHooksDEV = !1;
5476 current = Component(props, secondArg);
5477 shouldDoubleInvokeUserFnsInHooksDEV = !1;
5478 didScheduleRenderPhaseUpdateDuringThisPass &&
5479 (current = renderWithHooksAgain(
5480 workInProgress,
5481 Component,
5482 props,
5483 secondArg
5484 ));
5485 finishRenderingHooks();
5486 return current;
5487}
5488function finishRenderingHooks() {
5489 ReactSharedInternals.H = ContextOnlyDispatcher;
5490 var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
5491 renderLanes = 0;
5492 workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
5493 didScheduleRenderPhaseUpdate = !1;
5494 thenableIndexCounter = 0;
5495 thenableState = null;
5496 if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));
5497}
5498function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
5499 currentlyRenderingFiber$1 = workInProgress;
5500 var numberOfReRenders = 0;
5501 do {
5502 didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);
5503 thenableIndexCounter = 0;
5504 didScheduleRenderPhaseUpdateDuringThisPass = !1;
5505 if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));
5506 numberOfReRenders += 1;
5507 workInProgressHook = currentHook = null;
5508 workInProgress.updateQueue = null;
5509 ReactSharedInternals.H = HooksDispatcherOnRerender;
5510 var children = Component(props, secondArg);
5511 } while (didScheduleRenderPhaseUpdateDuringThisPass);
5512 return children;
5513}
5514function TransitionAwareHostComponent() {
5515 var dispatcher = ReactSharedInternals.H,
5516 maybeThenable = dispatcher.useState()[0];
5517 maybeThenable =
5518 "function" === typeof maybeThenable.then
5519 ? useThenable(maybeThenable)
5520 : maybeThenable;
5521 dispatcher = dispatcher.useState()[0];
5522 (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
5523 (currentlyRenderingFiber$1.flags |= 1024);
5524 return maybeThenable;
5525}
5526function checkDidRenderIdHook() {
5527 var didRenderIdHook = 0 !== localIdCounter;
5528 localIdCounter = 0;
5529 return didRenderIdHook;
5530}
5531function bailoutHooks(current, workInProgress, lanes) {
5532 workInProgress.updateQueue = current.updateQueue;
5533 workInProgress.flags &= -2053;
5534 current.lanes &= ~lanes;
5535}
5536function resetHooksOnUnwind(workInProgress) {
5537 if (didScheduleRenderPhaseUpdate) {
5538 for (
5539 workInProgress = workInProgress.memoizedState;
5540 null !== workInProgress;
5541
5542 ) {
5543 var queue = workInProgress.queue;
5544 null !== queue && (queue.pending = null);
5545 workInProgress = workInProgress.next;
5546 }
5547 didScheduleRenderPhaseUpdate = !1;
5548 }
5549 renderLanes = 0;
5550 workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
5551 didScheduleRenderPhaseUpdateDuringThisPass = !1;
5552 thenableIndexCounter = localIdCounter = 0;
5553 thenableState = null;
5554}
5555function mountWorkInProgressHook() {
5556 var hook = {
5557 memoizedState: null,
5558 baseState: null,
5559 baseQueue: null,
5560 queue: null,
5561 next: null
5562 };
5563 null === workInProgressHook
5564 ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook)
5565 : (workInProgressHook = workInProgressHook.next = hook);
5566 return workInProgressHook;
5567}
5568function updateWorkInProgressHook() {
5569 if (null === currentHook) {
5570 var nextCurrentHook = currentlyRenderingFiber$1.alternate;
5571 nextCurrentHook =
5572 null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
5573 } else nextCurrentHook = currentHook.next;
5574 var nextWorkInProgressHook =
5575 null === workInProgressHook
5576 ? currentlyRenderingFiber$1.memoizedState
5577 : workInProgressHook.next;
5578 if (null !== nextWorkInProgressHook)
5579 (workInProgressHook = nextWorkInProgressHook),
5580 (currentHook = nextCurrentHook);
5581 else {
5582 if (null === nextCurrentHook) {
5583 if (null === currentlyRenderingFiber$1.alternate)
5584 throw Error(formatProdErrorMessage(467));
5585 throw Error(formatProdErrorMessage(310));
5586 }
5587 currentHook = nextCurrentHook;
5588 nextCurrentHook = {
5589 memoizedState: currentHook.memoizedState,
5590 baseState: currentHook.baseState,
5591 baseQueue: currentHook.baseQueue,
5592 queue: currentHook.queue,
5593 next: null
5594 };
5595 null === workInProgressHook
5596 ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook =
5597 nextCurrentHook)
5598 : (workInProgressHook = workInProgressHook.next = nextCurrentHook);
5599 }
5600 return workInProgressHook;
5601}
5602var createFunctionComponentUpdateQueue;
5603createFunctionComponentUpdateQueue = function () {
5604 return { lastEffect: null, events: null, stores: null };
5605};
5606function useThenable(thenable) {
5607 var index = thenableIndexCounter;
5608 thenableIndexCounter += 1;
5609 null === thenableState && (thenableState = []);
5610 thenable = trackUsedThenable(thenableState, thenable, index);
5611 null === currentlyRenderingFiber$1.alternate &&
5612 (null === workInProgressHook
5613 ? null === currentlyRenderingFiber$1.memoizedState
5614 : null === workInProgressHook.next) &&
5615 (ReactSharedInternals.H = HooksDispatcherOnMount);
5616 return thenable;
5617}
5618function use(usable) {
5619 if (null !== usable && "object" === typeof usable) {
5620 if ("function" === typeof usable.then) return useThenable(usable);
5621 if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
5622 }
5623 throw Error(formatProdErrorMessage(438, String(usable)));
5624}
5625function basicStateReducer(state, action) {
5626 return "function" === typeof action ? action(state) : action;
5627}
5628function updateReducer(reducer) {
5629 var hook = updateWorkInProgressHook();
5630 return updateReducerImpl(hook, currentHook, reducer);
5631}
5632function updateReducerImpl(hook, current, reducer) {
5633 var queue = hook.queue;
5634 if (null === queue) throw Error(formatProdErrorMessage(311));
5635 queue.lastRenderedReducer = reducer;
5636 var baseQueue = hook.baseQueue,
5637 pendingQueue = queue.pending;
5638 if (null !== pendingQueue) {
5639 if (null !== baseQueue) {
5640 var baseFirst = baseQueue.next;
5641 baseQueue.next = pendingQueue.next;
5642 pendingQueue.next = baseFirst;
5643 }
5644 current.baseQueue = baseQueue = pendingQueue;
5645 queue.pending = null;
5646 }
5647 pendingQueue = hook.baseState;
5648 if (null === baseQueue) hook.memoizedState = pendingQueue;
5649 else {
5650 current = baseQueue.next;
5651 var newBaseQueueFirst = (baseFirst = null),
5652 newBaseQueueLast = null,
5653 update = current,
5654 didReadFromEntangledAsyncAction$103 = !1;
5655 do {
5656 var updateLane = update.lane & -536870913;
5657 if (
5658 updateLane !== update.lane
5659 ? (workInProgressRootRenderLanes & updateLane) === updateLane
5660 : (renderLanes & updateLane) === updateLane
5661 ) {
5662 var revertLane = update.revertLane;
5663 if (0 === revertLane)
5664 null !== newBaseQueueLast &&
5665 (newBaseQueueLast = newBaseQueueLast.next =
5666 {
5667 lane: 0,
5668 revertLane: 0,
5669 action: update.action,
5670 hasEagerState: update.hasEagerState,
5671 eagerState: update.eagerState,
5672 next: null
5673 }),
5674 updateLane === currentEntangledLane &&
5675 (didReadFromEntangledAsyncAction$103 = !0);
5676 else if ((renderLanes & revertLane) === revertLane) {
5677 update = update.next;
5678 revertLane === currentEntangledLane &&
5679 (didReadFromEntangledAsyncAction$103 = !0);
5680 continue;
5681 } else
5682 (updateLane = {
5683 lane: 0,
5684 revertLane: update.revertLane,
5685 action: update.action,
5686 hasEagerState: update.hasEagerState,
5687 eagerState: update.eagerState,
5688 next: null
5689 }),
5690 null === newBaseQueueLast
5691 ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),
5692 (baseFirst = pendingQueue))
5693 : (newBaseQueueLast = newBaseQueueLast.next = updateLane),
5694 (currentlyRenderingFiber$1.lanes |= revertLane),
5695 (workInProgressRootSkippedLanes |= revertLane);
5696 updateLane = update.action;
5697 shouldDoubleInvokeUserFnsInHooksDEV &&
5698 reducer(pendingQueue, updateLane);
5699 pendingQueue = update.hasEagerState
5700 ? update.eagerState
5701 : reducer(pendingQueue, updateLane);
5702 } else
5703 (revertLane = {
5704 lane: updateLane,
5705 revertLane: update.revertLane,
5706 action: update.action,
5707 hasEagerState: update.hasEagerState,
5708 eagerState: update.eagerState,
5709 next: null
5710 }),
5711 null === newBaseQueueLast
5712 ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),
5713 (baseFirst = pendingQueue))
5714 : (newBaseQueueLast = newBaseQueueLast.next = revertLane),
5715 (currentlyRenderingFiber$1.lanes |= updateLane),
5716 (workInProgressRootSkippedLanes |= updateLane);
5717 update = update.next;
5718 } while (null !== update && update !== current);
5719 null === newBaseQueueLast
5720 ? (baseFirst = pendingQueue)
5721 : (newBaseQueueLast.next = newBaseQueueFirst);
5722 if (
5723 !objectIs(pendingQueue, hook.memoizedState) &&
5724 ((didReceiveUpdate = !0),
5725 didReadFromEntangledAsyncAction$103 &&
5726 ((reducer = currentEntangledActionThenable), null !== reducer))
5727 )
5728 throw reducer;
5729 hook.memoizedState = pendingQueue;
5730 hook.baseState = baseFirst;
5731 hook.baseQueue = newBaseQueueLast;
5732 queue.lastRenderedState = pendingQueue;
5733 }
5734 null === baseQueue && (queue.lanes = 0);
5735 return [hook.memoizedState, queue.dispatch];
5736}
5737function rerenderReducer(reducer) {
5738 var hook = updateWorkInProgressHook(),
5739 queue = hook.queue;
5740 if (null === queue) throw Error(formatProdErrorMessage(311));
5741 queue.lastRenderedReducer = reducer;
5742 var dispatch = queue.dispatch,
5743 lastRenderPhaseUpdate = queue.pending,
5744 newState = hook.memoizedState;
5745 if (null !== lastRenderPhaseUpdate) {
5746 queue.pending = null;
5747 var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);
5748 do (newState = reducer(newState, update.action)), (update = update.next);
5749 while (update !== lastRenderPhaseUpdate);
5750 objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);
5751 hook.memoizedState = newState;
5752 null === hook.baseQueue && (hook.baseState = newState);
5753 queue.lastRenderedState = newState;
5754 }
5755 return [newState, dispatch];
5756}
5757function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
5758 var fiber = currentlyRenderingFiber$1,
5759 hook = updateWorkInProgressHook(),
5760 isHydrating$jscomp$0 = isHydrating;
5761 if (isHydrating$jscomp$0) {
5762 if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));
5763 getServerSnapshot = getServerSnapshot();
5764 } else getServerSnapshot = getSnapshot();
5765 var snapshotChanged = !objectIs(
5766 (currentHook || hook).memoizedState,
5767 getServerSnapshot
5768 );
5769 snapshotChanged &&
5770 ((hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0));
5771 hook = hook.queue;
5772 updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [
5773 subscribe
5774 ]);
5775 if (
5776 hook.getSnapshot !== getSnapshot ||
5777 snapshotChanged ||
5778 (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)
5779 ) {
5780 fiber.flags |= 2048;
5781 pushEffect(
5782 9,
5783 updateStoreInstance.bind(
5784 null,
5785 fiber,
5786 hook,
5787 getServerSnapshot,
5788 getSnapshot
5789 ),
5790 { destroy: void 0 },
5791 null
5792 );
5793 if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
5794 isHydrating$jscomp$0 ||
5795 0 !== (renderLanes & 60) ||
5796 pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
5797 }
5798 return getServerSnapshot;
5799}
5800function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
5801 fiber.flags |= 16384;
5802 fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };
5803 getSnapshot = currentlyRenderingFiber$1.updateQueue;
5804 null === getSnapshot
5805 ? ((getSnapshot = createFunctionComponentUpdateQueue()),
5806 (currentlyRenderingFiber$1.updateQueue = getSnapshot),
5807 (getSnapshot.stores = [fiber]))
5808 : ((renderedSnapshot = getSnapshot.stores),
5809 null === renderedSnapshot
5810 ? (getSnapshot.stores = [fiber])
5811 : renderedSnapshot.push(fiber));
5812}
5813function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
5814 inst.value = nextSnapshot;
5815 inst.getSnapshot = getSnapshot;
5816 checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
5817}
5818function subscribeToStore(fiber, inst, subscribe) {
5819 return subscribe(function () {
5820 checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
5821 });
5822}
5823function checkIfSnapshotChanged(inst) {
5824 var latestGetSnapshot = inst.getSnapshot;
5825 inst = inst.value;
5826 try {
5827 var nextValue = latestGetSnapshot();
5828 return !objectIs(inst, nextValue);
5829 } catch (error) {
5830 return !0;
5831 }
5832}
5833function forceStoreRerender(fiber) {
5834 var root = enqueueConcurrentRenderForLane(fiber, 2);
5835 null !== root && scheduleUpdateOnFiber(root, fiber, 2);
5836}
5837function mountStateImpl(initialState) {
5838 var hook = mountWorkInProgressHook();
5839 if ("function" === typeof initialState) {
5840 var initialStateInitializer = initialState;
5841 initialState = initialStateInitializer();
5842 shouldDoubleInvokeUserFnsInHooksDEV &&
5843 (setIsStrictModeForDevtools(!0),
5844 initialStateInitializer(),
5845 setIsStrictModeForDevtools(!1));
5846 }
5847 hook.memoizedState = hook.baseState = initialState;
5848 hook.queue = {
5849 pending: null,
5850 lanes: 0,
5851 dispatch: null,
5852 lastRenderedReducer: basicStateReducer,
5853 lastRenderedState: initialState
5854 };
5855 return hook;
5856}
5857function updateOptimisticImpl(hook, current, passthrough, reducer) {
5858 hook.baseState = passthrough;
5859 return updateReducerImpl(
5860 hook,
5861 currentHook,
5862 "function" === typeof reducer ? reducer : basicStateReducer
5863 );
5864}
5865function dispatchActionState(
5866 fiber,
5867 actionQueue,
5868 setPendingState,
5869 setState,
5870 payload
5871) {
5872 if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));
5873 fiber = actionQueue.pending;
5874 null === fiber
5875 ? ((fiber = { payload: payload, next: null }),
5876 (fiber.next = actionQueue.pending = fiber),
5877 runActionStateAction(actionQueue, setPendingState, setState, payload))
5878 : (actionQueue.pending = fiber.next =
5879 { payload: payload, next: fiber.next });
5880}
5881function runActionStateAction(actionQueue, setPendingState, setState, payload) {
5882 var action = actionQueue.action,
5883 prevState = actionQueue.state,
5884 prevTransition = ReactSharedInternals.T,
5885 currentTransition = { _callbacks: new Set() };
5886 ReactSharedInternals.T = currentTransition;
5887 setPendingState(!0);
5888 try {
5889 var returnValue = action(prevState, payload);
5890 null !== returnValue &&
5891 "object" === typeof returnValue &&
5892 "function" === typeof returnValue.then
5893 ? (notifyTransitionCallbacks(currentTransition, returnValue),
5894 returnValue.then(
5895 function (nextState) {
5896 actionQueue.state = nextState;
5897 finishRunningActionStateAction(
5898 actionQueue,
5899 setPendingState,
5900 setState
5901 );
5902 },
5903 function () {
5904 return finishRunningActionStateAction(
5905 actionQueue,
5906 setPendingState,
5907 setState
5908 );
5909 }
5910 ),
5911 setState(returnValue))
5912 : (setState(returnValue),
5913 (actionQueue.state = returnValue),
5914 finishRunningActionStateAction(actionQueue, setPendingState, setState));
5915 } catch (error) {
5916 setState({ then: function () {}, status: "rejected", reason: error }),
5917 finishRunningActionStateAction(actionQueue, setPendingState, setState);
5918 } finally {
5919 ReactSharedInternals.T = prevTransition;
5920 }
5921}
5922function finishRunningActionStateAction(
5923 actionQueue,
5924 setPendingState,
5925 setState
5926) {
5927 var last = actionQueue.pending;
5928 if (null !== last) {
5929 var first = last.next;
5930 first === last
5931 ? (actionQueue.pending = null)
5932 : ((first = first.next),
5933 (last.next = first),
5934 runActionStateAction(
5935 actionQueue,
5936 setPendingState,
5937 setState,
5938 first.payload
5939 ));
5940 }
5941}
5942function actionStateReducer(oldState, newState) {
5943 return newState;
5944}
5945function mountActionState(action, initialStateProp) {
5946 if (isHydrating) {
5947 var ssrFormState = workInProgressRoot.formState;
5948 if (null !== ssrFormState) {
5949 a: {
5950 var JSCompiler_inline_result = currentlyRenderingFiber$1;
5951 if (isHydrating) {
5952 if (nextHydratableInstance) {
5953 b: {
5954 var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance;
5955 for (
5956 var inRootOrSingleton = rootOrSingletonContext;
5957 8 !== JSCompiler_inline_result$jscomp$0.nodeType;
5958
5959 ) {
5960 if (!inRootOrSingleton) {
5961 JSCompiler_inline_result$jscomp$0 = null;
5962 break b;
5963 }
5964 JSCompiler_inline_result$jscomp$0 = getNextHydratable(
5965 JSCompiler_inline_result$jscomp$0.nextSibling
5966 );
5967 if (null === JSCompiler_inline_result$jscomp$0) {
5968 JSCompiler_inline_result$jscomp$0 = null;
5969 break b;
5970 }
5971 }
5972 inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data;
5973 JSCompiler_inline_result$jscomp$0 =
5974 "F!" === inRootOrSingleton || "F" === inRootOrSingleton
5975 ? JSCompiler_inline_result$jscomp$0
5976 : null;
5977 }
5978 if (JSCompiler_inline_result$jscomp$0) {
5979 nextHydratableInstance = getNextHydratable(
5980 JSCompiler_inline_result$jscomp$0.nextSibling
5981 );
5982 JSCompiler_inline_result =
5983 "F!" === JSCompiler_inline_result$jscomp$0.data;
5984 break a;
5985 }
5986 }
5987 throwOnHydrationMismatch(JSCompiler_inline_result);
5988 }
5989 JSCompiler_inline_result = !1;
5990 }
5991 JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);
5992 }
5993 }
5994 ssrFormState = mountWorkInProgressHook();
5995 ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
5996 JSCompiler_inline_result = {
5997 pending: null,
5998 lanes: 0,
5999 dispatch: null,
6000 lastRenderedReducer: actionStateReducer,
6001 lastRenderedState: initialStateProp
6002 };
6003 ssrFormState.queue = JSCompiler_inline_result;
6004 ssrFormState = dispatchSetState.bind(
6005 null,
6006 currentlyRenderingFiber$1,
6007 JSCompiler_inline_result
6008 );
6009 JSCompiler_inline_result.dispatch = ssrFormState;
6010 JSCompiler_inline_result = mountStateImpl(!1);
6011 inRootOrSingleton = dispatchOptimisticSetState.bind(
6012 null,
6013 currentlyRenderingFiber$1,
6014 !1,
6015 JSCompiler_inline_result.queue
6016 );
6017 JSCompiler_inline_result = mountWorkInProgressHook();
6018 JSCompiler_inline_result$jscomp$0 = {
6019 state: initialStateProp,
6020 dispatch: null,
6021 action: action,
6022 pending: null
6023 };
6024 JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0;
6025 ssrFormState = dispatchActionState.bind(
6026 null,
6027 currentlyRenderingFiber$1,
6028 JSCompiler_inline_result$jscomp$0,
6029 inRootOrSingleton,
6030 ssrFormState
6031 );
6032 JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState;
6033 JSCompiler_inline_result.memoizedState = action;
6034 return [initialStateProp, ssrFormState, !1];
6035}
6036function updateActionState(action) {
6037 var stateHook = updateWorkInProgressHook();
6038 return updateActionStateImpl(stateHook, currentHook, action);
6039}
6040function updateActionStateImpl(stateHook, currentStateHook, action) {
6041 currentStateHook = updateReducerImpl(
6042 stateHook,
6043 currentStateHook,
6044 actionStateReducer
6045 )[0];
6046 stateHook = updateReducer(basicStateReducer)[0];
6047 currentStateHook =
6048 "object" === typeof currentStateHook &&
6049 null !== currentStateHook &&
6050 "function" === typeof currentStateHook.then
6051 ? useThenable(currentStateHook)
6052 : currentStateHook;
6053 var actionQueueHook = updateWorkInProgressHook(),
6054 actionQueue = actionQueueHook.queue,
6055 dispatch = actionQueue.dispatch;
6056 action !== actionQueueHook.memoizedState &&
6057 ((currentlyRenderingFiber$1.flags |= 2048),
6058 pushEffect(
6059 9,
6060 actionStateActionEffect.bind(null, actionQueue, action),
6061 { destroy: void 0 },
6062 null
6063 ));
6064 return [currentStateHook, dispatch, stateHook];
6065}
6066function actionStateActionEffect(actionQueue, action) {
6067 actionQueue.action = action;
6068}
6069function rerenderActionState(action) {
6070 var stateHook = updateWorkInProgressHook(),
6071 currentStateHook = currentHook;
6072 if (null !== currentStateHook)
6073 return updateActionStateImpl(stateHook, currentStateHook, action);
6074 updateWorkInProgressHook();
6075 stateHook = stateHook.memoizedState;
6076 currentStateHook = updateWorkInProgressHook();
6077 var dispatch = currentStateHook.queue.dispatch;
6078 currentStateHook.memoizedState = action;
6079 return [stateHook, dispatch, !1];
6080}
6081function pushEffect(tag, create, inst, deps) {
6082 tag = { tag: tag, create: create, inst: inst, deps: deps, next: null };
6083 create = currentlyRenderingFiber$1.updateQueue;
6084 null === create
6085 ? ((create = createFunctionComponentUpdateQueue()),
6086 (currentlyRenderingFiber$1.updateQueue = create),
6087 (create.lastEffect = tag.next = tag))
6088 : ((inst = create.lastEffect),
6089 null === inst
6090 ? (create.lastEffect = tag.next = tag)
6091 : ((deps = inst.next),
6092 (inst.next = tag),
6093 (tag.next = deps),
6094 (create.lastEffect = tag)));
6095 return tag;
6096}
6097function updateRef() {
6098 return updateWorkInProgressHook().memoizedState;
6099}
6100function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
6101 var hook = mountWorkInProgressHook();
6102 currentlyRenderingFiber$1.flags |= fiberFlags;
6103 hook.memoizedState = pushEffect(
6104 1 | hookFlags,
6105 create,
6106 { destroy: void 0 },
6107 void 0 === deps ? null : deps
6108 );
6109}
6110function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
6111 var hook = updateWorkInProgressHook();
6112 deps = void 0 === deps ? null : deps;
6113 var inst = hook.memoizedState.inst;
6114 null !== currentHook &&
6115 null !== deps &&
6116 areHookInputsEqual(deps, currentHook.memoizedState.deps)
6117 ? (hook.memoizedState = pushEffect(hookFlags, create, inst, deps))
6118 : ((currentlyRenderingFiber$1.flags |= fiberFlags),
6119 (hook.memoizedState = pushEffect(1 | hookFlags, create, inst, deps)));
6120}
6121function mountEffect(create, deps) {
6122 mountEffectImpl(8390656, 8, create, deps);
6123}
6124function updateEffect(create, deps) {
6125 updateEffectImpl(2048, 8, create, deps);
6126}
6127function updateInsertionEffect(create, deps) {
6128 return updateEffectImpl(4, 2, create, deps);
6129}
6130function updateLayoutEffect(create, deps) {
6131 return updateEffectImpl(4, 4, create, deps);
6132}
6133function imperativeHandleEffect(create, ref) {
6134 if ("function" === typeof ref) {
6135 create = create();
6136 var refCleanup = ref(create);
6137 return function () {
6138 "function" === typeof refCleanup ? refCleanup() : ref(null);
6139 };
6140 }
6141 if (null !== ref && void 0 !== ref)
6142 return (
6143 (create = create()),
6144 (ref.current = create),
6145 function () {
6146 ref.current = null;
6147 }
6148 );
6149}
6150function updateImperativeHandle(ref, create, deps) {
6151 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
6152 updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);
6153}
6154function mountDebugValue() {}
6155function updateCallback(callback, deps) {
6156 var hook = updateWorkInProgressHook();
6157 deps = void 0 === deps ? null : deps;
6158 var prevState = hook.memoizedState;
6159 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
6160 return prevState[0];
6161 hook.memoizedState = [callback, deps];
6162 return callback;
6163}
6164function updateMemo(nextCreate, deps) {
6165 var hook = updateWorkInProgressHook();
6166 deps = void 0 === deps ? null : deps;
6167 var prevState = hook.memoizedState;
6168 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
6169 return prevState[0];
6170 prevState = nextCreate();
6171 shouldDoubleInvokeUserFnsInHooksDEV &&
6172 (setIsStrictModeForDevtools(!0),
6173 nextCreate(),
6174 setIsStrictModeForDevtools(!1));
6175 hook.memoizedState = [prevState, deps];
6176 return prevState;
6177}
6178function mountDeferredValueImpl(hook, value, initialValue) {
6179 if (void 0 === initialValue || 0 !== (renderLanes & 1073741824))
6180 return (hook.memoizedState = value);
6181 hook.memoizedState = initialValue;
6182 hook = requestDeferredLane();
6183 currentlyRenderingFiber$1.lanes |= hook;
6184 workInProgressRootSkippedLanes |= hook;
6185 return initialValue;
6186}
6187function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
6188 if (objectIs(value, prevValue)) return value;
6189 if (null !== currentTreeHiddenStackCursor.current)
6190 return (
6191 (hook = mountDeferredValueImpl(hook, value, initialValue)),
6192 objectIs(hook, prevValue) || (didReceiveUpdate = !0),
6193 hook
6194 );
6195 if (0 === (renderLanes & 42))
6196 return (didReceiveUpdate = !0), (hook.memoizedState = value);
6197 hook = requestDeferredLane();
6198 currentlyRenderingFiber$1.lanes |= hook;
6199 workInProgressRootSkippedLanes |= hook;
6200 return prevValue;
6201}
6202function startTransition(fiber, queue, pendingState, finishedState, callback) {
6203 var previousPriority = ReactDOMSharedInternals.p;
6204 ReactDOMSharedInternals.p =
6205 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
6206 var prevTransition = ReactSharedInternals.T,
6207 currentTransition = { _callbacks: new Set() };
6208 ReactSharedInternals.T = currentTransition;
6209 dispatchOptimisticSetState(fiber, !1, queue, pendingState);
6210 try {
6211 var returnValue = callback();
6212 if (
6213 null !== returnValue &&
6214 "object" === typeof returnValue &&
6215 "function" === typeof returnValue.then
6216 ) {
6217 notifyTransitionCallbacks(currentTransition, returnValue);
6218 var thenableForFinishedState = chainThenableValue(
6219 returnValue,
6220 finishedState
6221 );
6222 dispatchSetState(fiber, queue, thenableForFinishedState);
6223 } else dispatchSetState(fiber, queue, finishedState);
6224 } catch (error) {
6225 dispatchSetState(fiber, queue, {
6226 then: function () {},
6227 status: "rejected",
6228 reason: error
6229 });
6230 } finally {
6231 (ReactDOMSharedInternals.p = previousPriority),
6232 (ReactSharedInternals.T = prevTransition);
6233 }
6234}
6235function startHostTransition(formFiber, pendingState, callback, formData) {
6236 if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476));
6237 var queue = ensureFormComponentIsStateful(formFiber).queue;
6238 startTransition(
6239 formFiber,
6240 queue,
6241 pendingState,
6242 sharedNotPendingObject,
6243 function () {
6244 requestFormReset$1(formFiber);
6245 return callback(formData);
6246 }
6247 );
6248}
6249function ensureFormComponentIsStateful(formFiber) {
6250 var existingStateHook = formFiber.memoizedState;
6251 if (null !== existingStateHook) return existingStateHook;
6252 existingStateHook = {
6253 memoizedState: sharedNotPendingObject,
6254 baseState: sharedNotPendingObject,
6255 baseQueue: null,
6256 queue: {
6257 pending: null,
6258 lanes: 0,
6259 dispatch: null,
6260 lastRenderedReducer: basicStateReducer,
6261 lastRenderedState: sharedNotPendingObject
6262 },
6263 next: null
6264 };
6265 var initialResetState = {};
6266 existingStateHook.next = {
6267 memoizedState: initialResetState,
6268 baseState: initialResetState,
6269 baseQueue: null,
6270 queue: {
6271 pending: null,
6272 lanes: 0,
6273 dispatch: null,
6274 lastRenderedReducer: basicStateReducer,
6275 lastRenderedState: initialResetState
6276 },
6277 next: null
6278 };
6279 formFiber.memoizedState = existingStateHook;
6280 formFiber = formFiber.alternate;
6281 null !== formFiber && (formFiber.memoizedState = existingStateHook);
6282 return existingStateHook;
6283}
6284function requestFormReset$1(formFiber) {
6285 requestCurrentTransition();
6286 var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue;
6287 dispatchSetState(formFiber, resetStateQueue, {});
6288}
6289function useHostTransitionStatus() {
6290 var status = readContext(HostTransitionContext);
6291 return null !== status ? status : sharedNotPendingObject;
6292}
6293function updateId() {
6294 return updateWorkInProgressHook().memoizedState;
6295}
6296function updateRefresh() {
6297 return updateWorkInProgressHook().memoizedState;
6298}
6299function refreshCache(fiber) {
6300 for (var provider = fiber.return; null !== provider; ) {
6301 switch (provider.tag) {
6302 case 24:
6303 case 3:
6304 var lane = requestUpdateLane();
6305 fiber = createUpdate(lane);
6306 var root$111 = enqueueUpdate(provider, fiber, lane);
6307 null !== root$111 &&
6308 (scheduleUpdateOnFiber(root$111, provider, lane),
6309 entangleTransitions(root$111, provider, lane));
6310 provider = { cache: createCache() };
6311 fiber.payload = provider;
6312 return;
6313 }
6314 provider = provider.return;
6315 }
6316}
6317function dispatchReducerAction(fiber, queue, action) {
6318 var lane = requestUpdateLane();
6319 action = {
6320 lane: lane,
6321 revertLane: 0,
6322 action: action,
6323 hasEagerState: !1,
6324 eagerState: null,
6325 next: null
6326 };
6327 isRenderPhaseUpdate(fiber)
6328 ? enqueueRenderPhaseUpdate(queue, action)
6329 : ((action = enqueueConcurrentHookUpdate(fiber, queue, action, lane)),
6330 null !== action &&
6331 (scheduleUpdateOnFiber(action, fiber, lane),
6332 entangleTransitionUpdate(action, queue, lane)));
6333}
6334function dispatchSetState(fiber, queue, action) {
6335 var lane = requestUpdateLane(),
6336 update = {
6337 lane: lane,
6338 revertLane: 0,
6339 action: action,
6340 hasEagerState: !1,
6341 eagerState: null,
6342 next: null
6343 };
6344 if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
6345 else {
6346 var alternate = fiber.alternate;
6347 if (
6348 0 === fiber.lanes &&
6349 (null === alternate || 0 === alternate.lanes) &&
6350 ((alternate = queue.lastRenderedReducer), null !== alternate)
6351 )
6352 try {
6353 var currentState = queue.lastRenderedState,
6354 eagerState = alternate(currentState, action);
6355 update.hasEagerState = !0;
6356 update.eagerState = eagerState;
6357 if (objectIs(eagerState, currentState)) {
6358 enqueueUpdate$1(fiber, queue, update, 0);
6359 null === workInProgressRoot && finishQueueingConcurrentUpdates();
6360 return;
6361 }
6362 } catch (error) {
6363 } finally {
6364 }
6365 action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
6366 null !== action &&
6367 (scheduleUpdateOnFiber(action, fiber, lane),
6368 entangleTransitionUpdate(action, queue, lane));
6369 }
6370}
6371function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
6372 requestCurrentTransition();
6373 action = {
6374 lane: 2,
6375 revertLane: requestTransitionLane(),
6376 action: action,
6377 hasEagerState: !1,
6378 eagerState: null,
6379 next: null
6380 };
6381 if (isRenderPhaseUpdate(fiber)) {
6382 if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));
6383 } else
6384 (throwIfDuringRender = enqueueConcurrentHookUpdate(
6385 fiber,
6386 queue,
6387 action,
6388 2
6389 )),
6390 null !== throwIfDuringRender &&
6391 scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);
6392}
6393function isRenderPhaseUpdate(fiber) {
6394 var alternate = fiber.alternate;
6395 return (
6396 fiber === currentlyRenderingFiber$1 ||
6397 (null !== alternate && alternate === currentlyRenderingFiber$1)
6398 );
6399}
6400function enqueueRenderPhaseUpdate(queue, update) {
6401 didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =
6402 !0;
6403 var pending = queue.pending;
6404 null === pending
6405 ? (update.next = update)
6406 : ((update.next = pending.next), (pending.next = update));
6407 queue.pending = update;
6408}
6409function entangleTransitionUpdate(root, queue, lane) {
6410 if (0 !== (lane & 4194176)) {
6411 var queueLanes = queue.lanes;
6412 queueLanes &= root.pendingLanes;
6413 lane |= queueLanes;
6414 queue.lanes = lane;
6415 markRootEntangled(root, lane);
6416 }
6417}
6418var ContextOnlyDispatcher = {
6419 readContext: readContext,
6420 use: use,
6421 useCallback: throwInvalidHookError,
6422 useContext: throwInvalidHookError,
6423 useEffect: throwInvalidHookError,
6424 useImperativeHandle: throwInvalidHookError,
6425 useLayoutEffect: throwInvalidHookError,
6426 useInsertionEffect: throwInvalidHookError,
6427 useMemo: throwInvalidHookError,
6428 useReducer: throwInvalidHookError,
6429 useRef: throwInvalidHookError,
6430 useState: throwInvalidHookError,
6431 useDebugValue: throwInvalidHookError,
6432 useDeferredValue: throwInvalidHookError,
6433 useTransition: throwInvalidHookError,
6434 useSyncExternalStore: throwInvalidHookError,
6435 useId: throwInvalidHookError
6436};
6437ContextOnlyDispatcher.useCacheRefresh = throwInvalidHookError;
6438ContextOnlyDispatcher.useHostTransitionStatus = throwInvalidHookError;
6439ContextOnlyDispatcher.useFormState = throwInvalidHookError;
6440ContextOnlyDispatcher.useActionState = throwInvalidHookError;
6441ContextOnlyDispatcher.useOptimistic = throwInvalidHookError;
6442var HooksDispatcherOnMount = {
6443 readContext: readContext,
6444 use: use,
6445 useCallback: function (callback, deps) {
6446 mountWorkInProgressHook().memoizedState = [
6447 callback,
6448 void 0 === deps ? null : deps
6449 ];
6450 return callback;
6451 },
6452 useContext: readContext,
6453 useEffect: mountEffect,
6454 useImperativeHandle: function (ref, create, deps) {
6455 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
6456 mountEffectImpl(
6457 4194308,
6458 4,
6459 imperativeHandleEffect.bind(null, create, ref),
6460 deps
6461 );
6462 },
6463 useLayoutEffect: function (create, deps) {
6464 return mountEffectImpl(4194308, 4, create, deps);
6465 },
6466 useInsertionEffect: function (create, deps) {
6467 mountEffectImpl(4, 2, create, deps);
6468 },
6469 useMemo: function (nextCreate, deps) {
6470 var hook = mountWorkInProgressHook();
6471 deps = void 0 === deps ? null : deps;
6472 var nextValue = nextCreate();
6473 shouldDoubleInvokeUserFnsInHooksDEV &&
6474 (setIsStrictModeForDevtools(!0),
6475 nextCreate(),
6476 setIsStrictModeForDevtools(!1));
6477 hook.memoizedState = [nextValue, deps];
6478 return nextValue;
6479 },
6480 useReducer: function (reducer, initialArg, init) {
6481 var hook = mountWorkInProgressHook();
6482 if (void 0 !== init) {
6483 var initialState = init(initialArg);
6484 shouldDoubleInvokeUserFnsInHooksDEV &&
6485 (setIsStrictModeForDevtools(!0),
6486 init(initialArg),
6487 setIsStrictModeForDevtools(!1));
6488 } else initialState = initialArg;
6489 hook.memoizedState = hook.baseState = initialState;
6490 reducer = {
6491 pending: null,
6492 lanes: 0,
6493 dispatch: null,
6494 lastRenderedReducer: reducer,
6495 lastRenderedState: initialState
6496 };
6497 hook.queue = reducer;
6498 reducer = reducer.dispatch = dispatchReducerAction.bind(
6499 null,
6500 currentlyRenderingFiber$1,
6501 reducer
6502 );
6503 return [hook.memoizedState, reducer];
6504 },
6505 useRef: function (initialValue) {
6506 var hook = mountWorkInProgressHook();
6507 initialValue = { current: initialValue };
6508 return (hook.memoizedState = initialValue);
6509 },
6510 useState: function (initialState) {
6511 initialState = mountStateImpl(initialState);
6512 var queue = initialState.queue,
6513 dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);
6514 queue.dispatch = dispatch;
6515 return [initialState.memoizedState, dispatch];
6516 },
6517 useDebugValue: mountDebugValue,
6518 useDeferredValue: function (value, initialValue) {
6519 var hook = mountWorkInProgressHook();
6520 return mountDeferredValueImpl(hook, value, initialValue);
6521 },
6522 useTransition: function () {
6523 var stateHook = mountStateImpl(!1);
6524 stateHook = startTransition.bind(
6525 null,
6526 currentlyRenderingFiber$1,
6527 stateHook.queue,
6528 !0,
6529 !1
6530 );
6531 mountWorkInProgressHook().memoizedState = stateHook;
6532 return [!1, stateHook];
6533 },
6534 useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
6535 var fiber = currentlyRenderingFiber$1,
6536 hook = mountWorkInProgressHook();
6537 if (isHydrating) {
6538 if (void 0 === getServerSnapshot)
6539 throw Error(formatProdErrorMessage(407));
6540 getServerSnapshot = getServerSnapshot();
6541 } else {
6542 getServerSnapshot = getSnapshot();
6543 if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
6544 0 !== (workInProgressRootRenderLanes & 60) ||
6545 pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
6546 }
6547 hook.memoizedState = getServerSnapshot;
6548 var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
6549 hook.queue = inst;
6550 mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
6551 subscribe
6552 ]);
6553 fiber.flags |= 2048;
6554 pushEffect(
6555 9,
6556 updateStoreInstance.bind(
6557 null,
6558 fiber,
6559 inst,
6560 getServerSnapshot,
6561 getSnapshot
6562 ),
6563 { destroy: void 0 },
6564 null
6565 );
6566 return getServerSnapshot;
6567 },
6568 useId: function () {
6569 var hook = mountWorkInProgressHook(),
6570 identifierPrefix = workInProgressRoot.identifierPrefix;
6571 if (isHydrating) {
6572 var JSCompiler_inline_result = treeContextOverflow;
6573 var idWithLeadingBit = treeContextId;
6574 JSCompiler_inline_result =
6575 (
6576 idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))
6577 ).toString(32) + JSCompiler_inline_result;
6578 identifierPrefix =
6579 ":" + identifierPrefix + "R" + JSCompiler_inline_result;
6580 JSCompiler_inline_result = localIdCounter++;
6581 0 < JSCompiler_inline_result &&
6582 (identifierPrefix += "H" + JSCompiler_inline_result.toString(32));
6583 identifierPrefix += ":";
6584 } else
6585 (JSCompiler_inline_result = globalClientIdCounter++),
6586 (identifierPrefix =
6587 ":" +
6588 identifierPrefix +
6589 "r" +
6590 JSCompiler_inline_result.toString(32) +
6591 ":");
6592 return (hook.memoizedState = identifierPrefix);
6593 },
6594 useCacheRefresh: function () {
6595 return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
6596 null,
6597 currentlyRenderingFiber$1
6598 ));
6599 }
6600};
6601HooksDispatcherOnMount.useHostTransitionStatus = useHostTransitionStatus;
6602HooksDispatcherOnMount.useFormState = mountActionState;
6603HooksDispatcherOnMount.useActionState = mountActionState;
6604HooksDispatcherOnMount.useOptimistic = function (passthrough) {
6605 var hook = mountWorkInProgressHook();
6606 hook.memoizedState = hook.baseState = passthrough;
6607 var queue = {
6608 pending: null,
6609 lanes: 0,
6610 dispatch: null,
6611 lastRenderedReducer: null,
6612 lastRenderedState: null
6613 };
6614 hook.queue = queue;
6615 hook = dispatchOptimisticSetState.bind(
6616 null,
6617 currentlyRenderingFiber$1,
6618 !0,
6619 queue
6620 );
6621 queue.dispatch = hook;
6622 return [passthrough, hook];
6623};
6624var HooksDispatcherOnUpdate = {
6625 readContext: readContext,
6626 use: use,
6627 useCallback: updateCallback,
6628 useContext: readContext,
6629 useEffect: updateEffect,
6630 useImperativeHandle: updateImperativeHandle,
6631 useInsertionEffect: updateInsertionEffect,
6632 useLayoutEffect: updateLayoutEffect,
6633 useMemo: updateMemo,
6634 useReducer: updateReducer,
6635 useRef: updateRef,
6636 useState: function () {
6637 return updateReducer(basicStateReducer);
6638 },
6639 useDebugValue: mountDebugValue,
6640 useDeferredValue: function (value, initialValue) {
6641 var hook = updateWorkInProgressHook();
6642 return updateDeferredValueImpl(
6643 hook,
6644 currentHook.memoizedState,
6645 value,
6646 initialValue
6647 );
6648 },
6649 useTransition: function () {
6650 var booleanOrThenable = updateReducer(basicStateReducer)[0],
6651 start = updateWorkInProgressHook().memoizedState;
6652 return [
6653 "boolean" === typeof booleanOrThenable
6654 ? booleanOrThenable
6655 : useThenable(booleanOrThenable),
6656 start
6657 ];
6658 },
6659 useSyncExternalStore: updateSyncExternalStore,
6660 useId: updateId
6661};
6662HooksDispatcherOnUpdate.useCacheRefresh = updateRefresh;
6663HooksDispatcherOnUpdate.useHostTransitionStatus = useHostTransitionStatus;
6664HooksDispatcherOnUpdate.useFormState = updateActionState;
6665HooksDispatcherOnUpdate.useActionState = updateActionState;
6666HooksDispatcherOnUpdate.useOptimistic = function (passthrough, reducer) {
6667 var hook = updateWorkInProgressHook();
6668 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
6669};
6670var HooksDispatcherOnRerender = {
6671 readContext: readContext,
6672 use: use,
6673 useCallback: updateCallback,
6674 useContext: readContext,
6675 useEffect: updateEffect,
6676 useImperativeHandle: updateImperativeHandle,
6677 useInsertionEffect: updateInsertionEffect,
6678 useLayoutEffect: updateLayoutEffect,
6679 useMemo: updateMemo,
6680 useReducer: rerenderReducer,
6681 useRef: updateRef,
6682 useState: function () {
6683 return rerenderReducer(basicStateReducer);
6684 },
6685 useDebugValue: mountDebugValue,
6686 useDeferredValue: function (value, initialValue) {
6687 var hook = updateWorkInProgressHook();
6688 return null === currentHook
6689 ? mountDeferredValueImpl(hook, value, initialValue)
6690 : updateDeferredValueImpl(
6691 hook,
6692 currentHook.memoizedState,
6693 value,
6694 initialValue
6695 );
6696 },
6697 useTransition: function () {
6698 var booleanOrThenable = rerenderReducer(basicStateReducer)[0],
6699 start = updateWorkInProgressHook().memoizedState;
6700 return [
6701 "boolean" === typeof booleanOrThenable
6702 ? booleanOrThenable
6703 : useThenable(booleanOrThenable),
6704 start
6705 ];
6706 },
6707 useSyncExternalStore: updateSyncExternalStore,
6708 useId: updateId
6709};
6710HooksDispatcherOnRerender.useCacheRefresh = updateRefresh;
6711HooksDispatcherOnRerender.useHostTransitionStatus = useHostTransitionStatus;
6712HooksDispatcherOnRerender.useFormState = rerenderActionState;
6713HooksDispatcherOnRerender.useActionState = rerenderActionState;
6714HooksDispatcherOnRerender.useOptimistic = function (passthrough, reducer) {
6715 var hook = updateWorkInProgressHook();
6716 if (null !== currentHook)
6717 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
6718 hook.baseState = passthrough;
6719 return [passthrough, hook.queue.dispatch];
6720};
6721function defaultOnUncaughtError(error) {
6722 reportGlobalError(error);
6723}
6724function defaultOnCaughtError(error) {
6725 console.error(error);
6726}
6727function defaultOnRecoverableError(error) {
6728 reportGlobalError(error);
6729}
6730function logUncaughtError(root, errorInfo) {
6731 try {
6732 var onUncaughtError = root.onUncaughtError;
6733 onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });
6734 } catch (e$115) {
6735 setTimeout(function () {
6736 throw e$115;
6737 });
6738 }
6739}
6740function logCaughtError(root, boundary, errorInfo) {
6741 try {
6742 var onCaughtError = root.onCaughtError;
6743 onCaughtError(errorInfo.value, {
6744 componentStack: errorInfo.stack,
6745 errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
6746 });
6747 } catch (e$116) {
6748 setTimeout(function () {
6749 throw e$116;
6750 });
6751 }
6752}
6753function createRootErrorUpdate(root, errorInfo, lane) {
6754 lane = createUpdate(lane);
6755 lane.tag = 3;
6756 lane.payload = { element: null };
6757 lane.callback = function () {
6758 logUncaughtError(root, errorInfo);
6759 };
6760 return lane;
6761}
6762function createClassErrorUpdate(lane) {
6763 lane = createUpdate(lane);
6764 lane.tag = 3;
6765 return lane;
6766}
6767function initializeClassErrorUpdate(update, root, fiber, errorInfo) {
6768 var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
6769 if ("function" === typeof getDerivedStateFromError) {
6770 var error = errorInfo.value;
6771 update.payload = function () {
6772 return getDerivedStateFromError(error);
6773 };
6774 update.callback = function () {
6775 logCaughtError(root, fiber, errorInfo);
6776 };
6777 }
6778 var inst = fiber.stateNode;
6779 null !== inst &&
6780 "function" === typeof inst.componentDidCatch &&
6781 (update.callback = function () {
6782 logCaughtError(root, fiber, errorInfo);
6783 "function" !== typeof getDerivedStateFromError &&
6784 (null === legacyErrorBoundariesThatAlreadyFailed
6785 ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
6786 : legacyErrorBoundariesThatAlreadyFailed.add(this));
6787 var stack = errorInfo.stack;
6788 this.componentDidCatch(errorInfo.value, {
6789 componentStack: null !== stack ? stack : ""
6790 });
6791 });
6792}
6793function throwException(
6794 root,
6795 returnFiber,
6796 sourceFiber,
6797 value,
6798 rootRenderLanes
6799) {
6800 sourceFiber.flags |= 32768;
6801 if (
6802 null !== value &&
6803 "object" === typeof value &&
6804 "function" === typeof value.then
6805 ) {
6806 sourceFiber = suspenseHandlerStackCursor.current;
6807 if (null !== sourceFiber) {
6808 switch (sourceFiber.tag) {
6809 case 13:
6810 return (
6811 null === shellBoundary
6812 ? renderDidSuspendDelayIfPossible()
6813 : null === sourceFiber.alternate &&
6814 0 === workInProgressRootExitStatus &&
6815 (workInProgressRootExitStatus = 3),
6816 (sourceFiber.flags &= -257),
6817 (sourceFiber.flags |= 65536),
6818 (sourceFiber.lanes = rootRenderLanes),
6819 value === noopSuspenseyCommitThenable
6820 ? (sourceFiber.flags |= 16384)
6821 : ((returnFiber = sourceFiber.updateQueue),
6822 null === returnFiber
6823 ? (sourceFiber.updateQueue = new Set([value]))
6824 : returnFiber.add(value),
6825 attachPingListener(root, value, rootRenderLanes)),
6826 !1
6827 );
6828 case 22:
6829 return (
6830 (sourceFiber.flags |= 65536),
6831 value === noopSuspenseyCommitThenable
6832 ? (sourceFiber.flags |= 16384)
6833 : ((returnFiber = sourceFiber.updateQueue),
6834 null === returnFiber
6835 ? ((returnFiber = {
6836 transitions: null,
6837 markerInstances: null,
6838 retryQueue: new Set([value])
6839 }),
6840 (sourceFiber.updateQueue = returnFiber))
6841 : ((sourceFiber = returnFiber.retryQueue),
6842 null === sourceFiber
6843 ? (returnFiber.retryQueue = new Set([value]))
6844 : sourceFiber.add(value)),
6845 attachPingListener(root, value, rootRenderLanes)),
6846 !1
6847 );
6848 }
6849 throw Error(formatProdErrorMessage(435, sourceFiber.tag));
6850 }
6851 attachPingListener(root, value, rootRenderLanes);
6852 renderDidSuspendDelayIfPossible();
6853 return !1;
6854 }
6855 if (isHydrating)
6856 return (
6857 (returnFiber = suspenseHandlerStackCursor.current),
6858 null !== returnFiber
6859 ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),
6860 (returnFiber.flags |= 65536),
6861 (returnFiber.lanes = rootRenderLanes),
6862 value !== HydrationMismatchException &&
6863 ((root = Error(formatProdErrorMessage(422), { cause: value })),
6864 queueHydrationError(createCapturedValueAtFiber(root, sourceFiber))))
6865 : (value !== HydrationMismatchException &&
6866 ((returnFiber = Error(formatProdErrorMessage(423), {
6867 cause: value
6868 })),
6869 queueHydrationError(
6870 createCapturedValueAtFiber(returnFiber, sourceFiber)
6871 )),
6872 (root = root.current.alternate),
6873 (root.flags |= 65536),
6874 (rootRenderLanes &= -rootRenderLanes),
6875 (root.lanes |= rootRenderLanes),
6876 (value = createCapturedValueAtFiber(value, sourceFiber)),
6877 (rootRenderLanes = createRootErrorUpdate(
6878 root.stateNode,
6879 value,
6880 rootRenderLanes
6881 )),
6882 enqueueCapturedUpdate(root, rootRenderLanes),
6883 4 !== workInProgressRootExitStatus &&
6884 (workInProgressRootExitStatus = 2)),
6885 !1
6886 );
6887 var wrapperError = Error(formatProdErrorMessage(520), { cause: value });
6888 wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber);
6889 null === workInProgressRootConcurrentErrors
6890 ? (workInProgressRootConcurrentErrors = [wrapperError])
6891 : workInProgressRootConcurrentErrors.push(wrapperError);
6892 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);
6893 if (null === returnFiber) return !0;
6894 value = createCapturedValueAtFiber(value, sourceFiber);
6895 sourceFiber = returnFiber;
6896 do {
6897 switch (sourceFiber.tag) {
6898 case 3:
6899 return (
6900 (sourceFiber.flags |= 65536),
6901 (root = rootRenderLanes & -rootRenderLanes),
6902 (sourceFiber.lanes |= root),
6903 (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)),
6904 enqueueCapturedUpdate(sourceFiber, root),
6905 !1
6906 );
6907 case 1:
6908 if (
6909 ((returnFiber = sourceFiber.type),
6910 (wrapperError = sourceFiber.stateNode),
6911 0 === (sourceFiber.flags & 128) &&
6912 ("function" === typeof returnFiber.getDerivedStateFromError ||
6913 (null !== wrapperError &&
6914 "function" === typeof wrapperError.componentDidCatch &&
6915 (null === legacyErrorBoundariesThatAlreadyFailed ||
6916 !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError)))))
6917 )
6918 return (
6919 (sourceFiber.flags |= 65536),
6920 (rootRenderLanes &= -rootRenderLanes),
6921 (sourceFiber.lanes |= rootRenderLanes),
6922 (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),
6923 initializeClassErrorUpdate(
6924 rootRenderLanes,
6925 root,
6926 sourceFiber,
6927 value
6928 ),
6929 enqueueCapturedUpdate(sourceFiber, rootRenderLanes),
6930 !1
6931 );
6932 }
6933 sourceFiber = sourceFiber.return;
6934 } while (null !== sourceFiber);
6935 return !1;
6936}
6937var SelectiveHydrationException = Error(formatProdErrorMessage(461)),
6938 didReceiveUpdate = !1;
6939function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
6940 workInProgress.child =
6941 null === current
6942 ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
6943 : reconcileChildFibers(
6944 workInProgress,
6945 current.child,
6946 nextChildren,
6947 renderLanes
6948 );
6949}
6950function updateForwardRef(
6951 current,
6952 workInProgress,
6953 Component,
6954 nextProps,
6955 renderLanes
6956) {
6957 Component = Component.render;
6958 var ref = workInProgress.ref;
6959 if ("ref" in nextProps) {
6960 var propsWithoutRef = {};
6961 for (var key in nextProps)
6962 "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
6963 } else propsWithoutRef = nextProps;
6964 prepareToReadContext(workInProgress, renderLanes);
6965 nextProps = renderWithHooks(
6966 current,
6967 workInProgress,
6968 Component,
6969 propsWithoutRef,
6970 ref,
6971 renderLanes
6972 );
6973 key = checkDidRenderIdHook();
6974 if (null !== current && !didReceiveUpdate)
6975 return (
6976 bailoutHooks(current, workInProgress, renderLanes),
6977 bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
6978 );
6979 isHydrating && key && pushMaterializedTreeId(workInProgress);
6980 workInProgress.flags |= 1;
6981 reconcileChildren(current, workInProgress, nextProps, renderLanes);
6982 return workInProgress.child;
6983}
6984function updateMemoComponent(
6985 current,
6986 workInProgress,
6987 Component,
6988 nextProps,
6989 renderLanes
6990) {
6991 if (null === current) {
6992 var type = Component.type;
6993 if (
6994 "function" === typeof type &&
6995 !shouldConstruct(type) &&
6996 void 0 === type.defaultProps &&
6997 null === Component.compare
6998 )
6999 return (
7000 (workInProgress.tag = 15),
7001 (workInProgress.type = type),
7002 updateSimpleMemoComponent(
7003 current,
7004 workInProgress,
7005 type,
7006 nextProps,
7007 renderLanes
7008 )
7009 );
7010 current = createFiberFromTypeAndProps(
7011 Component.type,
7012 null,
7013 nextProps,
7014 workInProgress,
7015 workInProgress.mode,
7016 renderLanes
7017 );
7018 current.ref = workInProgress.ref;
7019 current.return = workInProgress;
7020 return (workInProgress.child = current);
7021 }
7022 type = current.child;
7023 if (0 === (current.lanes & renderLanes)) {
7024 var prevProps = type.memoizedProps;
7025 Component = Component.compare;
7026 Component = null !== Component ? Component : shallowEqual;
7027 if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)
7028 return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
7029 }
7030 workInProgress.flags |= 1;
7031 current = createWorkInProgress(type, nextProps);
7032 current.ref = workInProgress.ref;
7033 current.return = workInProgress;
7034 return (workInProgress.child = current);
7035}
7036function updateSimpleMemoComponent(
7037 current,
7038 workInProgress,
7039 Component,
7040 nextProps,
7041 renderLanes
7042) {
7043 if (null !== current) {
7044 var prevProps = current.memoizedProps;
7045 if (
7046 shallowEqual(prevProps, nextProps) &&
7047 current.ref === workInProgress.ref
7048 )
7049 if (
7050 ((didReceiveUpdate = !1),
7051 (workInProgress.pendingProps = nextProps = prevProps),
7052 0 !== (current.lanes & renderLanes))
7053 )
7054 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
7055 else
7056 return (
7057 (workInProgress.lanes = current.lanes),
7058 bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
7059 );
7060 }
7061 return updateFunctionComponent(
7062 current,
7063 workInProgress,
7064 Component,
7065 nextProps,
7066 renderLanes
7067 );
7068}
7069function updateOffscreenComponent(current, workInProgress, renderLanes) {
7070 var nextProps = workInProgress.pendingProps,
7071 nextChildren = nextProps.children,
7072 nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
7073 prevState = null !== current ? current.memoizedState : null;
7074 markRef(current, workInProgress);
7075 if ("hidden" === nextProps.mode || nextIsDetached) {
7076 if (0 !== (workInProgress.flags & 128)) {
7077 renderLanes =
7078 null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;
7079 if (null !== current) {
7080 nextProps = workInProgress.child = current.child;
7081 for (nextChildren = 0; null !== nextProps; )
7082 (nextChildren =
7083 nextChildren | nextProps.lanes | nextProps.childLanes),
7084 (nextProps = nextProps.sibling);
7085 workInProgress.childLanes = nextChildren & ~renderLanes;
7086 } else (workInProgress.childLanes = 0), (workInProgress.child = null);
7087 return deferHiddenOffscreenComponent(
7088 current,
7089 workInProgress,
7090 renderLanes
7091 );
7092 }
7093 if (0 !== (renderLanes & 536870912))
7094 (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),
7095 null !== current &&
7096 pushTransition(
7097 workInProgress,
7098 null !== prevState ? prevState.cachePool : null
7099 ),
7100 null !== prevState
7101 ? pushHiddenContext(workInProgress, prevState)
7102 : reuseHiddenContextOnStack(),
7103 pushOffscreenSuspenseHandler(workInProgress);
7104 else
7105 return (
7106 (workInProgress.lanes = workInProgress.childLanes = 536870912),
7107 deferHiddenOffscreenComponent(
7108 current,
7109 workInProgress,
7110 null !== prevState ? prevState.baseLanes | renderLanes : renderLanes
7111 )
7112 );
7113 } else
7114 null !== prevState
7115 ? (pushTransition(workInProgress, prevState.cachePool),
7116 pushHiddenContext(workInProgress, prevState),
7117 reuseSuspenseHandlerOnStack(workInProgress),
7118 (workInProgress.memoizedState = null))
7119 : (null !== current && pushTransition(workInProgress, null),
7120 reuseHiddenContextOnStack(),
7121 reuseSuspenseHandlerOnStack(workInProgress));
7122 reconcileChildren(current, workInProgress, nextChildren, renderLanes);
7123 return workInProgress.child;
7124}
7125function deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes) {
7126 var JSCompiler_inline_result = peekCacheFromPool();
7127 JSCompiler_inline_result =
7128 null === JSCompiler_inline_result
7129 ? null
7130 : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result };
7131 workInProgress.memoizedState = {
7132 baseLanes: nextBaseLanes,
7133 cachePool: JSCompiler_inline_result
7134 };
7135 null !== current && pushTransition(workInProgress, null);
7136 reuseHiddenContextOnStack();
7137 pushOffscreenSuspenseHandler(workInProgress);
7138 return null;
7139}
7140function markRef(current, workInProgress) {
7141 var ref = workInProgress.ref;
7142 if (null === ref)
7143 null !== current &&
7144 null !== current.ref &&
7145 (workInProgress.flags |= 2097664);
7146 else {
7147 if ("function" !== typeof ref && "object" !== typeof ref)
7148 throw Error(formatProdErrorMessage(284));
7149 if (null === current || current.ref !== ref)
7150 workInProgress.flags |= 2097664;
7151 }
7152}
7153function updateFunctionComponent(
7154 current,
7155 workInProgress,
7156 Component,
7157 nextProps,
7158 renderLanes
7159) {
7160 prepareToReadContext(workInProgress, renderLanes);
7161 Component = renderWithHooks(
7162 current,
7163 workInProgress,
7164 Component,
7165 nextProps,
7166 void 0,
7167 renderLanes
7168 );
7169 nextProps = checkDidRenderIdHook();
7170 if (null !== current && !didReceiveUpdate)
7171 return (
7172 bailoutHooks(current, workInProgress, renderLanes),
7173 bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
7174 );
7175 isHydrating && nextProps && pushMaterializedTreeId(workInProgress);
7176 workInProgress.flags |= 1;
7177 reconcileChildren(current, workInProgress, Component, renderLanes);
7178 return workInProgress.child;
7179}
7180function replayFunctionComponent(
7181 current,
7182 workInProgress,
7183 nextProps,
7184 Component,
7185 secondArg,
7186 renderLanes
7187) {
7188 prepareToReadContext(workInProgress, renderLanes);
7189 nextProps = renderWithHooksAgain(
7190 workInProgress,
7191 Component,
7192 nextProps,
7193 secondArg
7194 );
7195 finishRenderingHooks();
7196 Component = checkDidRenderIdHook();
7197 if (null !== current && !didReceiveUpdate)
7198 return (
7199 bailoutHooks(current, workInProgress, renderLanes),
7200 bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
7201 );
7202 isHydrating && Component && pushMaterializedTreeId(workInProgress);
7203 workInProgress.flags |= 1;
7204 reconcileChildren(current, workInProgress, nextProps, renderLanes);
7205 return workInProgress.child;
7206}
7207function updateClassComponent(
7208 current,
7209 workInProgress,
7210 Component,
7211 nextProps,
7212 renderLanes
7213) {
7214 prepareToReadContext(workInProgress, renderLanes);
7215 if (null === workInProgress.stateNode) {
7216 var context = emptyContextObject,
7217 contextType = Component.contextType;
7218 "object" === typeof contextType &&
7219 null !== contextType &&
7220 (context = readContext(contextType));
7221 context = new Component(nextProps, context);
7222 workInProgress.memoizedState =
7223 null !== context.state && void 0 !== context.state ? context.state : null;
7224 context.updater = classComponentUpdater;
7225 workInProgress.stateNode = context;
7226 context._reactInternals = workInProgress;
7227 context = workInProgress.stateNode;
7228 context.props = nextProps;
7229 context.state = workInProgress.memoizedState;
7230 context.refs = {};
7231 initializeUpdateQueue(workInProgress);
7232 contextType = Component.contextType;
7233 context.context =
7234 "object" === typeof contextType && null !== contextType
7235 ? readContext(contextType)
7236 : emptyContextObject;
7237 context.state = workInProgress.memoizedState;
7238 contextType = Component.getDerivedStateFromProps;
7239 "function" === typeof contextType &&
7240 (applyDerivedStateFromProps(
7241 workInProgress,
7242 Component,
7243 contextType,
7244 nextProps
7245 ),
7246 (context.state = workInProgress.memoizedState));
7247 "function" === typeof Component.getDerivedStateFromProps ||
7248 "function" === typeof context.getSnapshotBeforeUpdate ||
7249 ("function" !== typeof context.UNSAFE_componentWillMount &&
7250 "function" !== typeof context.componentWillMount) ||
7251 ((contextType = context.state),
7252 "function" === typeof context.componentWillMount &&
7253 context.componentWillMount(),
7254 "function" === typeof context.UNSAFE_componentWillMount &&
7255 context.UNSAFE_componentWillMount(),
7256 contextType !== context.state &&
7257 classComponentUpdater.enqueueReplaceState(context, context.state, null),
7258 processUpdateQueue(workInProgress, nextProps, context, renderLanes),
7259 suspendIfUpdateReadFromEntangledAsyncAction(),
7260 (context.state = workInProgress.memoizedState));
7261 "function" === typeof context.componentDidMount &&
7262 (workInProgress.flags |= 4194308);
7263 nextProps = !0;
7264 } else if (null === current) {
7265 context = workInProgress.stateNode;
7266 var unresolvedOldProps = workInProgress.memoizedProps,
7267 oldProps = resolveClassComponentProps(Component, unresolvedOldProps);
7268 context.props = oldProps;
7269 var oldContext = context.context,
7270 contextType$jscomp$0 = Component.contextType;
7271 contextType = emptyContextObject;
7272 "object" === typeof contextType$jscomp$0 &&
7273 null !== contextType$jscomp$0 &&
7274 (contextType = readContext(contextType$jscomp$0));
7275 var getDerivedStateFromProps = Component.getDerivedStateFromProps;
7276 contextType$jscomp$0 =
7277 "function" === typeof getDerivedStateFromProps ||
7278 "function" === typeof context.getSnapshotBeforeUpdate;
7279 unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;
7280 contextType$jscomp$0 ||
7281 ("function" !== typeof context.UNSAFE_componentWillReceiveProps &&
7282 "function" !== typeof context.componentWillReceiveProps) ||
7283 ((unresolvedOldProps || oldContext !== contextType) &&
7284 callComponentWillReceiveProps(
7285 workInProgress,
7286 context,
7287 nextProps,
7288 contextType
7289 ));
7290 hasForceUpdate = !1;
7291 var oldState = workInProgress.memoizedState;
7292 context.state = oldState;
7293 processUpdateQueue(workInProgress, nextProps, context, renderLanes);
7294 suspendIfUpdateReadFromEntangledAsyncAction();
7295 oldContext = workInProgress.memoizedState;
7296 unresolvedOldProps || oldState !== oldContext || hasForceUpdate
7297 ? ("function" === typeof getDerivedStateFromProps &&
7298 (applyDerivedStateFromProps(
7299 workInProgress,
7300 Component,
7301 getDerivedStateFromProps,
7302 nextProps
7303 ),
7304 (oldContext = workInProgress.memoizedState)),
7305 (oldProps =
7306 hasForceUpdate ||
7307 checkShouldComponentUpdate(
7308 workInProgress,
7309 Component,
7310 oldProps,
7311 nextProps,
7312 oldState,
7313 oldContext,
7314 contextType
7315 ))
7316 ? (contextType$jscomp$0 ||
7317 ("function" !== typeof context.UNSAFE_componentWillMount &&
7318 "function" !== typeof context.componentWillMount) ||
7319 ("function" === typeof context.componentWillMount &&
7320 context.componentWillMount(),
7321 "function" === typeof context.UNSAFE_componentWillMount &&
7322 context.UNSAFE_componentWillMount()),
7323 "function" === typeof context.componentDidMount &&
7324 (workInProgress.flags |= 4194308))
7325 : ("function" === typeof context.componentDidMount &&
7326 (workInProgress.flags |= 4194308),
7327 (workInProgress.memoizedProps = nextProps),
7328 (workInProgress.memoizedState = oldContext)),
7329 (context.props = nextProps),
7330 (context.state = oldContext),
7331 (context.context = contextType),
7332 (nextProps = oldProps))
7333 : ("function" === typeof context.componentDidMount &&
7334 (workInProgress.flags |= 4194308),
7335 (nextProps = !1));
7336 } else {
7337 context = workInProgress.stateNode;
7338 cloneUpdateQueue(current, workInProgress);
7339 contextType = workInProgress.memoizedProps;
7340 contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);
7341 context.props = contextType$jscomp$0;
7342 getDerivedStateFromProps = workInProgress.pendingProps;
7343 oldState = context.context;
7344 oldContext = Component.contextType;
7345 oldProps = emptyContextObject;
7346 "object" === typeof oldContext &&
7347 null !== oldContext &&
7348 (oldProps = readContext(oldContext));
7349 unresolvedOldProps = Component.getDerivedStateFromProps;
7350 (oldContext =
7351 "function" === typeof unresolvedOldProps ||
7352 "function" === typeof context.getSnapshotBeforeUpdate) ||
7353 ("function" !== typeof context.UNSAFE_componentWillReceiveProps &&
7354 "function" !== typeof context.componentWillReceiveProps) ||
7355 ((contextType !== getDerivedStateFromProps || oldState !== oldProps) &&
7356 callComponentWillReceiveProps(
7357 workInProgress,
7358 context,
7359 nextProps,
7360 oldProps
7361 ));
7362 hasForceUpdate = !1;
7363 oldState = workInProgress.memoizedState;
7364 context.state = oldState;
7365 processUpdateQueue(workInProgress, nextProps, context, renderLanes);
7366 suspendIfUpdateReadFromEntangledAsyncAction();
7367 var newState = workInProgress.memoizedState;
7368 contextType !== getDerivedStateFromProps ||
7369 oldState !== newState ||
7370 hasForceUpdate
7371 ? ("function" === typeof unresolvedOldProps &&
7372 (applyDerivedStateFromProps(
7373 workInProgress,
7374 Component,
7375 unresolvedOldProps,
7376 nextProps
7377 ),
7378 (newState = workInProgress.memoizedState)),
7379 (contextType$jscomp$0 =
7380 hasForceUpdate ||
7381 checkShouldComponentUpdate(
7382 workInProgress,
7383 Component,
7384 contextType$jscomp$0,
7385 nextProps,
7386 oldState,
7387 newState,
7388 oldProps
7389 ) ||
7390 !1)
7391 ? (oldContext ||
7392 ("function" !== typeof context.UNSAFE_componentWillUpdate &&
7393 "function" !== typeof context.componentWillUpdate) ||
7394 ("function" === typeof context.componentWillUpdate &&
7395 context.componentWillUpdate(nextProps, newState, oldProps),
7396 "function" === typeof context.UNSAFE_componentWillUpdate &&
7397 context.UNSAFE_componentWillUpdate(
7398 nextProps,
7399 newState,
7400 oldProps
7401 )),
7402 "function" === typeof context.componentDidUpdate &&
7403 (workInProgress.flags |= 4),
7404 "function" === typeof context.getSnapshotBeforeUpdate &&
7405 (workInProgress.flags |= 1024))
7406 : ("function" !== typeof context.componentDidUpdate ||
7407 (contextType === current.memoizedProps &&
7408 oldState === current.memoizedState) ||
7409 (workInProgress.flags |= 4),
7410 "function" !== typeof context.getSnapshotBeforeUpdate ||
7411 (contextType === current.memoizedProps &&
7412 oldState === current.memoizedState) ||
7413 (workInProgress.flags |= 1024),
7414 (workInProgress.memoizedProps = nextProps),
7415 (workInProgress.memoizedState = newState)),
7416 (context.props = nextProps),
7417 (context.state = newState),
7418 (context.context = oldProps),
7419 (nextProps = contextType$jscomp$0))
7420 : ("function" !== typeof context.componentDidUpdate ||
7421 (contextType === current.memoizedProps &&
7422 oldState === current.memoizedState) ||
7423 (workInProgress.flags |= 4),
7424 "function" !== typeof context.getSnapshotBeforeUpdate ||
7425 (contextType === current.memoizedProps &&
7426 oldState === current.memoizedState) ||
7427 (workInProgress.flags |= 1024),
7428 (nextProps = !1));
7429 }
7430 context = nextProps;
7431 markRef(current, workInProgress);
7432 nextProps = 0 !== (workInProgress.flags & 128);
7433 context || nextProps
7434 ? ((context = workInProgress.stateNode),
7435 (Component =
7436 nextProps && "function" !== typeof Component.getDerivedStateFromError
7437 ? null
7438 : context.render()),
7439 (workInProgress.flags |= 1),
7440 null !== current && nextProps
7441 ? ((workInProgress.child = reconcileChildFibers(
7442 workInProgress,
7443 current.child,
7444 null,
7445 renderLanes
7446 )),
7447 (workInProgress.child = reconcileChildFibers(
7448 workInProgress,
7449 null,
7450 Component,
7451 renderLanes
7452 )))
7453 : reconcileChildren(current, workInProgress, Component, renderLanes),
7454 (workInProgress.memoizedState = context.state),
7455 (current = workInProgress.child))
7456 : (current = bailoutOnAlreadyFinishedWork(
7457 current,
7458 workInProgress,
7459 renderLanes
7460 ));
7461 return current;
7462}
7463function mountHostRootWithoutHydrating(
7464 current,
7465 workInProgress,
7466 nextChildren,
7467 renderLanes
7468) {
7469 resetHydrationState();
7470 workInProgress.flags |= 256;
7471 reconcileChildren(current, workInProgress, nextChildren, renderLanes);
7472 return workInProgress.child;
7473}
7474var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 };
7475function mountSuspenseOffscreenState(renderLanes) {
7476 return { baseLanes: renderLanes, cachePool: getSuspendedCache() };
7477}
7478function getRemainingWorkInPrimaryTree(
7479 current,
7480 primaryTreeDidDefer,
7481 renderLanes
7482) {
7483 current = null !== current ? current.childLanes & ~renderLanes : 0;
7484 primaryTreeDidDefer && (current |= workInProgressDeferredLane);
7485 return current;
7486}
7487function updateSuspenseComponent(current, workInProgress, renderLanes) {
7488 var nextProps = workInProgress.pendingProps,
7489 showFallback = !1,
7490 didSuspend = 0 !== (workInProgress.flags & 128),
7491 JSCompiler_temp;
7492 (JSCompiler_temp = didSuspend) ||
7493 (JSCompiler_temp =
7494 null !== current && null === current.memoizedState
7495 ? !1
7496 : 0 !== (suspenseStackCursor.current & 2));
7497 JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));
7498 JSCompiler_temp = 0 !== (workInProgress.flags & 32);
7499 workInProgress.flags &= -33;
7500 if (null === current) {
7501 if (isHydrating) {
7502 showFallback
7503 ? pushPrimaryTreeSuspenseHandler(workInProgress)
7504 : reuseSuspenseHandlerOnStack(workInProgress);
7505 if (isHydrating) {
7506 var nextInstance = nextHydratableInstance,
7507 JSCompiler_temp$jscomp$0;
7508 if ((JSCompiler_temp$jscomp$0 = nextInstance)) {
7509 c: {
7510 JSCompiler_temp$jscomp$0 = nextInstance;
7511 for (
7512 nextInstance = rootOrSingletonContext;
7513 8 !== JSCompiler_temp$jscomp$0.nodeType;
7514
7515 ) {
7516 if (!nextInstance) {
7517 nextInstance = null;
7518 break c;
7519 }
7520 JSCompiler_temp$jscomp$0 = getNextHydratable(
7521 JSCompiler_temp$jscomp$0.nextSibling
7522 );
7523 if (null === JSCompiler_temp$jscomp$0) {
7524 nextInstance = null;
7525 break c;
7526 }
7527 }
7528 nextInstance = JSCompiler_temp$jscomp$0;
7529 }
7530 null !== nextInstance
7531 ? ((workInProgress.memoizedState = {
7532 dehydrated: nextInstance,
7533 treeContext:
7534 null !== treeContextProvider
7535 ? { id: treeContextId, overflow: treeContextOverflow }
7536 : null,
7537 retryLane: 536870912
7538 }),
7539 (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)),
7540 (JSCompiler_temp$jscomp$0.stateNode = nextInstance),
7541 (JSCompiler_temp$jscomp$0.return = workInProgress),
7542 (workInProgress.child = JSCompiler_temp$jscomp$0),
7543 (hydrationParentFiber = workInProgress),
7544 (nextHydratableInstance = null),
7545 (JSCompiler_temp$jscomp$0 = !0))
7546 : (JSCompiler_temp$jscomp$0 = !1);
7547 }
7548 JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress);
7549 }
7550 nextInstance = workInProgress.memoizedState;
7551 if (
7552 null !== nextInstance &&
7553 ((nextInstance = nextInstance.dehydrated), null !== nextInstance)
7554 )
7555 return (
7556 "$!" === nextInstance.data
7557 ? (workInProgress.lanes = 16)
7558 : (workInProgress.lanes = 536870912),
7559 null
7560 );
7561 popSuspenseHandler(workInProgress);
7562 }
7563 nextInstance = nextProps.children;
7564 nextProps = nextProps.fallback;
7565 if (showFallback)
7566 return (
7567 reuseSuspenseHandlerOnStack(workInProgress),
7568 (showFallback = workInProgress.mode),
7569 (nextInstance = mountWorkInProgressOffscreenFiber(
7570 { mode: "hidden", children: nextInstance },
7571 showFallback
7572 )),
7573 (nextProps = createFiberFromFragment(
7574 nextProps,
7575 showFallback,
7576 renderLanes,
7577 null
7578 )),
7579 (nextInstance.return = workInProgress),
7580 (nextProps.return = workInProgress),
7581 (nextInstance.sibling = nextProps),
7582 (workInProgress.child = nextInstance),
7583 (showFallback = workInProgress.child),
7584 (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)),
7585 (showFallback.childLanes = getRemainingWorkInPrimaryTree(
7586 current,
7587 JSCompiler_temp,
7588 renderLanes
7589 )),
7590 (workInProgress.memoizedState = SUSPENDED_MARKER),
7591 nextProps
7592 );
7593 pushPrimaryTreeSuspenseHandler(workInProgress);
7594 return mountSuspensePrimaryChildren(workInProgress, nextInstance);
7595 }
7596 JSCompiler_temp$jscomp$0 = current.memoizedState;
7597 if (
7598 null !== JSCompiler_temp$jscomp$0 &&
7599 ((nextInstance = JSCompiler_temp$jscomp$0.dehydrated),
7600 null !== nextInstance)
7601 ) {
7602 if (didSuspend)
7603 workInProgress.flags & 256
7604 ? (pushPrimaryTreeSuspenseHandler(workInProgress),
7605 (workInProgress.flags &= -257),
7606 (workInProgress = retrySuspenseComponentWithoutHydrating(
7607 current,
7608 workInProgress,
7609 renderLanes
7610 )))
7611 : null !== workInProgress.memoizedState
7612 ? (reuseSuspenseHandlerOnStack(workInProgress),
7613 (workInProgress.child = current.child),
7614 (workInProgress.flags |= 128),
7615 (workInProgress = null))
7616 : (reuseSuspenseHandlerOnStack(workInProgress),
7617 (showFallback = nextProps.fallback),
7618 (nextInstance = workInProgress.mode),
7619 (nextProps = mountWorkInProgressOffscreenFiber(
7620 { mode: "visible", children: nextProps.children },
7621 nextInstance
7622 )),
7623 (showFallback = createFiberFromFragment(
7624 showFallback,
7625 nextInstance,
7626 renderLanes,
7627 null
7628 )),
7629 (showFallback.flags |= 2),
7630 (nextProps.return = workInProgress),
7631 (showFallback.return = workInProgress),
7632 (nextProps.sibling = showFallback),
7633 (workInProgress.child = nextProps),
7634 reconcileChildFibers(
7635 workInProgress,
7636 current.child,
7637 null,
7638 renderLanes
7639 ),
7640 (nextProps = workInProgress.child),
7641 (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)),
7642 (nextProps.childLanes = getRemainingWorkInPrimaryTree(
7643 current,
7644 JSCompiler_temp,
7645 renderLanes
7646 )),
7647 (workInProgress.memoizedState = SUSPENDED_MARKER),
7648 (workInProgress = showFallback));
7649 else if (
7650 (pushPrimaryTreeSuspenseHandler(workInProgress),
7651 "$!" === nextInstance.data)
7652 ) {
7653 JSCompiler_temp =
7654 nextInstance.nextSibling && nextInstance.nextSibling.dataset;
7655 if (JSCompiler_temp) var digest = JSCompiler_temp.dgst;
7656 JSCompiler_temp = digest;
7657 nextProps = Error(formatProdErrorMessage(419));
7658 nextProps.stack = "";
7659 nextProps.digest = JSCompiler_temp;
7660 queueHydrationError({ value: nextProps, source: null, stack: null });
7661 workInProgress = retrySuspenseComponentWithoutHydrating(
7662 current,
7663 workInProgress,
7664 renderLanes
7665 );
7666 } else if (
7667 ((JSCompiler_temp = 0 !== (renderLanes & current.childLanes)),
7668 didReceiveUpdate || JSCompiler_temp)
7669 ) {
7670 JSCompiler_temp = workInProgressRoot;
7671 if (null !== JSCompiler_temp) {
7672 nextProps = renderLanes & -renderLanes;
7673 if (0 !== (nextProps & 42)) nextProps = 1;
7674 else
7675 switch (nextProps) {
7676 case 2:
7677 nextProps = 1;
7678 break;
7679 case 8:
7680 nextProps = 4;
7681 break;
7682 case 32:
7683 nextProps = 16;
7684 break;
7685 case 128:
7686 case 256:
7687 case 512:
7688 case 1024:
7689 case 2048:
7690 case 4096:
7691 case 8192:
7692 case 16384:
7693 case 32768:
7694 case 65536:
7695 case 131072:
7696 case 262144:
7697 case 524288:
7698 case 1048576:
7699 case 2097152:
7700 case 4194304:
7701 case 8388608:
7702 case 16777216:
7703 case 33554432:
7704 nextProps = 64;
7705 break;
7706 case 268435456:
7707 nextProps = 134217728;
7708 break;
7709 default:
7710 nextProps = 0;
7711 }
7712 nextProps =
7713 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
7714 ? 0
7715 : nextProps;
7716 if (0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane)
7717 throw (
7718 ((JSCompiler_temp$jscomp$0.retryLane = nextProps),
7719 enqueueConcurrentRenderForLane(current, nextProps),
7720 scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
7721 SelectiveHydrationException)
7722 );
7723 }
7724 "$?" === nextInstance.data || renderDidSuspendDelayIfPossible();
7725 workInProgress = retrySuspenseComponentWithoutHydrating(
7726 current,
7727 workInProgress,
7728 renderLanes
7729 );
7730 } else
7731 "$?" === nextInstance.data
7732 ? ((workInProgress.flags |= 128),
7733 (workInProgress.child = current.child),
7734 (workInProgress = retryDehydratedSuspenseBoundary.bind(
7735 null,
7736 current
7737 )),
7738 (nextInstance._reactRetry = workInProgress),
7739 (workInProgress = null))
7740 : ((current = JSCompiler_temp$jscomp$0.treeContext),
7741 (nextHydratableInstance = getNextHydratable(
7742 nextInstance.nextSibling
7743 )),
7744 (hydrationParentFiber = workInProgress),
7745 (isHydrating = !0),
7746 (hydrationErrors = null),
7747 (rootOrSingletonContext = !1),
7748 null !== current &&
7749 ((idStack[idStackIndex++] = treeContextId),
7750 (idStack[idStackIndex++] = treeContextOverflow),
7751 (idStack[idStackIndex++] = treeContextProvider),
7752 (treeContextId = current.id),
7753 (treeContextOverflow = current.overflow),
7754 (treeContextProvider = workInProgress)),
7755 (workInProgress = mountSuspensePrimaryChildren(
7756 workInProgress,
7757 nextProps.children
7758 )),
7759 (workInProgress.flags |= 4096));
7760 return workInProgress;
7761 }
7762 if (showFallback)
7763 return (
7764 reuseSuspenseHandlerOnStack(workInProgress),
7765 (showFallback = nextProps.fallback),
7766 (nextInstance = workInProgress.mode),
7767 (JSCompiler_temp$jscomp$0 = current.child),
7768 (digest = JSCompiler_temp$jscomp$0.sibling),
7769 (nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, {
7770 mode: "hidden",
7771 children: nextProps.children
7772 })),
7773 (nextProps.subtreeFlags =
7774 JSCompiler_temp$jscomp$0.subtreeFlags & 31457280),
7775 null !== digest
7776 ? (showFallback = createWorkInProgress(digest, showFallback))
7777 : ((showFallback = createFiberFromFragment(
7778 showFallback,
7779 nextInstance,
7780 renderLanes,
7781 null
7782 )),
7783 (showFallback.flags |= 2)),
7784 (showFallback.return = workInProgress),
7785 (nextProps.return = workInProgress),
7786 (nextProps.sibling = showFallback),
7787 (workInProgress.child = nextProps),
7788 (nextProps = showFallback),
7789 (showFallback = workInProgress.child),
7790 (nextInstance = current.child.memoizedState),
7791 null === nextInstance
7792 ? (nextInstance = mountSuspenseOffscreenState(renderLanes))
7793 : ((JSCompiler_temp$jscomp$0 = nextInstance.cachePool),
7794 null !== JSCompiler_temp$jscomp$0
7795 ? ((digest = CacheContext._currentValue),
7796 (JSCompiler_temp$jscomp$0 =
7797 JSCompiler_temp$jscomp$0.parent !== digest
7798 ? { parent: digest, pool: digest }
7799 : JSCompiler_temp$jscomp$0))
7800 : (JSCompiler_temp$jscomp$0 = getSuspendedCache()),
7801 (nextInstance = {
7802 baseLanes: nextInstance.baseLanes | renderLanes,
7803 cachePool: JSCompiler_temp$jscomp$0
7804 })),
7805 (showFallback.memoizedState = nextInstance),
7806 (showFallback.childLanes = getRemainingWorkInPrimaryTree(
7807 current,
7808 JSCompiler_temp,
7809 renderLanes
7810 )),
7811 (workInProgress.memoizedState = SUSPENDED_MARKER),
7812 nextProps
7813 );
7814 pushPrimaryTreeSuspenseHandler(workInProgress);
7815 renderLanes = current.child;
7816 current = renderLanes.sibling;
7817 renderLanes = createWorkInProgress(renderLanes, {
7818 mode: "visible",
7819 children: nextProps.children
7820 });
7821 renderLanes.return = workInProgress;
7822 renderLanes.sibling = null;
7823 null !== current &&
7824 ((JSCompiler_temp = workInProgress.deletions),
7825 null === JSCompiler_temp
7826 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))
7827 : JSCompiler_temp.push(current));
7828 workInProgress.child = renderLanes;
7829 workInProgress.memoizedState = null;
7830 return renderLanes;
7831}
7832function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
7833 primaryChildren = mountWorkInProgressOffscreenFiber(
7834 { mode: "visible", children: primaryChildren },
7835 workInProgress.mode
7836 );
7837 primaryChildren.return = workInProgress;
7838 return (workInProgress.child = primaryChildren);
7839}
7840function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
7841 return createFiberFromOffscreen(offscreenProps, mode, 0, null);
7842}
7843function retrySuspenseComponentWithoutHydrating(
7844 current,
7845 workInProgress,
7846 renderLanes
7847) {
7848 reconcileChildFibers(workInProgress, current.child, null, renderLanes);
7849 current = mountSuspensePrimaryChildren(
7850 workInProgress,
7851 workInProgress.pendingProps.children
7852 );
7853 current.flags |= 2;
7854 workInProgress.memoizedState = null;
7855 return current;
7856}
7857function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
7858 fiber.lanes |= renderLanes;
7859 var alternate = fiber.alternate;
7860 null !== alternate && (alternate.lanes |= renderLanes);
7861 scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);
7862}
7863function initSuspenseListRenderState(
7864 workInProgress,
7865 isBackwards,
7866 tail,
7867 lastContentRow,
7868 tailMode
7869) {
7870 var renderState = workInProgress.memoizedState;
7871 null === renderState
7872 ? (workInProgress.memoizedState = {
7873 isBackwards: isBackwards,
7874 rendering: null,
7875 renderingStartTime: 0,
7876 last: lastContentRow,
7877 tail: tail,
7878 tailMode: tailMode
7879 })
7880 : ((renderState.isBackwards = isBackwards),
7881 (renderState.rendering = null),
7882 (renderState.renderingStartTime = 0),
7883 (renderState.last = lastContentRow),
7884 (renderState.tail = tail),
7885 (renderState.tailMode = tailMode));
7886}
7887function updateSuspenseListComponent(current, workInProgress, renderLanes) {
7888 var nextProps = workInProgress.pendingProps,
7889 revealOrder = nextProps.revealOrder,
7890 tailMode = nextProps.tail;
7891 reconcileChildren(current, workInProgress, nextProps.children, renderLanes);
7892 nextProps = suspenseStackCursor.current;
7893 if (0 !== (nextProps & 2))
7894 (nextProps = (nextProps & 1) | 2), (workInProgress.flags |= 128);
7895 else {
7896 if (null !== current && 0 !== (current.flags & 128))
7897 a: for (current = workInProgress.child; null !== current; ) {
7898 if (13 === current.tag)
7899 null !== current.memoizedState &&
7900 scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
7901 else if (19 === current.tag)
7902 scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
7903 else if (null !== current.child) {
7904 current.child.return = current;
7905 current = current.child;
7906 continue;
7907 }
7908 if (current === workInProgress) break a;
7909 for (; null === current.sibling; ) {
7910 if (null === current.return || current.return === workInProgress)
7911 break a;
7912 current = current.return;
7913 }
7914 current.sibling.return = current.return;
7915 current = current.sibling;
7916 }
7917 nextProps &= 1;
7918 }
7919 push(suspenseStackCursor, nextProps);
7920 switch (revealOrder) {
7921 case "forwards":
7922 renderLanes = workInProgress.child;
7923 for (revealOrder = null; null !== renderLanes; )
7924 (current = renderLanes.alternate),
7925 null !== current &&
7926 null === findFirstSuspended(current) &&
7927 (revealOrder = renderLanes),
7928 (renderLanes = renderLanes.sibling);
7929 renderLanes = revealOrder;
7930 null === renderLanes
7931 ? ((revealOrder = workInProgress.child), (workInProgress.child = null))
7932 : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));
7933 initSuspenseListRenderState(
7934 workInProgress,
7935 !1,
7936 revealOrder,
7937 renderLanes,
7938 tailMode
7939 );
7940 break;
7941 case "backwards":
7942 renderLanes = null;
7943 revealOrder = workInProgress.child;
7944 for (workInProgress.child = null; null !== revealOrder; ) {
7945 current = revealOrder.alternate;
7946 if (null !== current && null === findFirstSuspended(current)) {
7947 workInProgress.child = revealOrder;
7948 break;
7949 }
7950 current = revealOrder.sibling;
7951 revealOrder.sibling = renderLanes;
7952 renderLanes = revealOrder;
7953 revealOrder = current;
7954 }
7955 initSuspenseListRenderState(
7956 workInProgress,
7957 !0,
7958 renderLanes,
7959 null,
7960 tailMode
7961 );
7962 break;
7963 case "together":
7964 initSuspenseListRenderState(workInProgress, !1, null, null, void 0);
7965 break;
7966 default:
7967 workInProgress.memoizedState = null;
7968 }
7969 return workInProgress.child;
7970}
7971function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
7972 null !== current && (workInProgress.dependencies = current.dependencies);
7973 workInProgressRootSkippedLanes |= workInProgress.lanes;
7974 if (0 === (renderLanes & workInProgress.childLanes)) return null;
7975 if (null !== current && workInProgress.child !== current.child)
7976 throw Error(formatProdErrorMessage(153));
7977 if (null !== workInProgress.child) {
7978 current = workInProgress.child;
7979 renderLanes = createWorkInProgress(current, current.pendingProps);
7980 workInProgress.child = renderLanes;
7981 for (renderLanes.return = workInProgress; null !== current.sibling; )
7982 (current = current.sibling),
7983 (renderLanes = renderLanes.sibling =
7984 createWorkInProgress(current, current.pendingProps)),
7985 (renderLanes.return = workInProgress);
7986 renderLanes.sibling = null;
7987 }
7988 return workInProgress.child;
7989}
7990function attemptEarlyBailoutIfNoScheduledUpdate(
7991 current,
7992 workInProgress,
7993 renderLanes
7994) {
7995 switch (workInProgress.tag) {
7996 case 3:
7997 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
7998 pushProvider(workInProgress, CacheContext, current.memoizedState.cache);
7999 resetHydrationState();
8000 break;
8001 case 27:
8002 case 5:
8003 pushHostContext(workInProgress);
8004 break;
8005 case 4:
8006 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
8007 break;
8008 case 10:
8009 pushProvider(
8010 workInProgress,
8011 workInProgress.type,
8012 workInProgress.memoizedProps.value
8013 );
8014 break;
8015 case 13:
8016 var state = workInProgress.memoizedState;
8017 if (null !== state) {
8018 if (null !== state.dehydrated)
8019 return (
8020 pushPrimaryTreeSuspenseHandler(workInProgress),
8021 (workInProgress.flags |= 128),
8022 null
8023 );
8024 if (0 !== (renderLanes & workInProgress.child.childLanes))
8025 return updateSuspenseComponent(current, workInProgress, renderLanes);
8026 pushPrimaryTreeSuspenseHandler(workInProgress);
8027 current = bailoutOnAlreadyFinishedWork(
8028 current,
8029 workInProgress,
8030 renderLanes
8031 );
8032 return null !== current ? current.sibling : null;
8033 }
8034 pushPrimaryTreeSuspenseHandler(workInProgress);
8035 break;
8036 case 19:
8037 state = 0 !== (renderLanes & workInProgress.childLanes);
8038 if (0 !== (current.flags & 128)) {
8039 if (state)
8040 return updateSuspenseListComponent(
8041 current,
8042 workInProgress,
8043 renderLanes
8044 );
8045 workInProgress.flags |= 128;
8046 }
8047 var renderState = workInProgress.memoizedState;
8048 null !== renderState &&
8049 ((renderState.rendering = null),
8050 (renderState.tail = null),
8051 (renderState.lastEffect = null));
8052 push(suspenseStackCursor, suspenseStackCursor.current);
8053 if (state) break;
8054 else return null;
8055 case 22:
8056 case 23:
8057 return (
8058 (workInProgress.lanes = 0),
8059 updateOffscreenComponent(current, workInProgress, renderLanes)
8060 );
8061 case 24:
8062 pushProvider(workInProgress, CacheContext, current.memoizedState.cache);
8063 }
8064 return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
8065}
8066function beginWork(current, workInProgress, renderLanes) {
8067 if (null !== current)
8068 if (current.memoizedProps !== workInProgress.pendingProps)
8069 didReceiveUpdate = !0;
8070 else {
8071 if (
8072 0 === (current.lanes & renderLanes) &&
8073 0 === (workInProgress.flags & 128)
8074 )
8075 return (
8076 (didReceiveUpdate = !1),
8077 attemptEarlyBailoutIfNoScheduledUpdate(
8078 current,
8079 workInProgress,
8080 renderLanes
8081 )
8082 );
8083 didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;
8084 }
8085 else
8086 (didReceiveUpdate = !1),
8087 isHydrating &&
8088 0 !== (workInProgress.flags & 1048576) &&
8089 pushTreeId(workInProgress, treeForkCount, workInProgress.index);
8090 workInProgress.lanes = 0;
8091 switch (workInProgress.tag) {
8092 case 16:
8093 a: {
8094 current = workInProgress.pendingProps;
8095 var lazyComponent = workInProgress.elementType,
8096 init = lazyComponent._init;
8097 lazyComponent = init(lazyComponent._payload);
8098 workInProgress.type = lazyComponent;
8099 if ("function" === typeof lazyComponent)
8100 shouldConstruct(lazyComponent)
8101 ? ((current = resolveClassComponentProps(lazyComponent, current)),
8102 (workInProgress.tag = 1),
8103 (workInProgress = updateClassComponent(
8104 null,
8105 workInProgress,
8106 lazyComponent,
8107 current,
8108 renderLanes
8109 )))
8110 : ((workInProgress.tag = 0),
8111 (workInProgress = updateFunctionComponent(
8112 null,
8113 workInProgress,
8114 lazyComponent,
8115 current,
8116 renderLanes
8117 )));
8118 else {
8119 if (void 0 !== lazyComponent && null !== lazyComponent)
8120 if (
8121 ((init = lazyComponent.$$typeof), init === REACT_FORWARD_REF_TYPE)
8122 ) {
8123 workInProgress.tag = 11;
8124 workInProgress = updateForwardRef(
8125 null,
8126 workInProgress,
8127 lazyComponent,
8128 current,
8129 renderLanes
8130 );
8131 break a;
8132 } else if (init === REACT_MEMO_TYPE) {
8133 workInProgress.tag = 14;
8134 workInProgress = updateMemoComponent(
8135 null,
8136 workInProgress,
8137 lazyComponent,
8138 current,
8139 renderLanes
8140 );
8141 break a;
8142 }
8143 throw Error(formatProdErrorMessage(306, lazyComponent, ""));
8144 }
8145 }
8146 return workInProgress;
8147 case 0:
8148 return updateFunctionComponent(
8149 current,
8150 workInProgress,
8151 workInProgress.type,
8152 workInProgress.pendingProps,
8153 renderLanes
8154 );
8155 case 1:
8156 return (
8157 (lazyComponent = workInProgress.type),
8158 (init = resolveClassComponentProps(
8159 lazyComponent,
8160 workInProgress.pendingProps
8161 )),
8162 updateClassComponent(
8163 current,
8164 workInProgress,
8165 lazyComponent,
8166 init,
8167 renderLanes
8168 )
8169 );
8170 case 3:
8171 a: {
8172 pushHostContainer(
8173 workInProgress,
8174 workInProgress.stateNode.containerInfo
8175 );
8176 if (null === current) throw Error(formatProdErrorMessage(387));
8177 var nextProps = workInProgress.pendingProps;
8178 init = workInProgress.memoizedState;
8179 lazyComponent = init.element;
8180 cloneUpdateQueue(current, workInProgress);
8181 processUpdateQueue(workInProgress, nextProps, null, renderLanes);
8182 var nextState = workInProgress.memoizedState;
8183 nextProps = nextState.cache;
8184 pushProvider(workInProgress, CacheContext, nextProps);
8185 nextProps !== init.cache &&
8186 propagateContextChange(workInProgress, CacheContext, renderLanes);
8187 suspendIfUpdateReadFromEntangledAsyncAction();
8188 nextProps = nextState.element;
8189 if (init.isDehydrated)
8190 if (
8191 ((init = {
8192 element: nextProps,
8193 isDehydrated: !1,
8194 cache: nextState.cache
8195 }),
8196 (workInProgress.updateQueue.baseState = init),
8197 (workInProgress.memoizedState = init),
8198 workInProgress.flags & 256)
8199 ) {
8200 workInProgress = mountHostRootWithoutHydrating(
8201 current,
8202 workInProgress,
8203 nextProps,
8204 renderLanes
8205 );
8206 break a;
8207 } else if (nextProps !== lazyComponent) {
8208 lazyComponent = createCapturedValueAtFiber(
8209 Error(formatProdErrorMessage(424)),
8210 workInProgress
8211 );
8212 queueHydrationError(lazyComponent);
8213 workInProgress = mountHostRootWithoutHydrating(
8214 current,
8215 workInProgress,
8216 nextProps,
8217 renderLanes
8218 );
8219 break a;
8220 } else
8221 for (
8222 nextHydratableInstance = getNextHydratable(
8223 workInProgress.stateNode.containerInfo.firstChild
8224 ),
8225 hydrationParentFiber = workInProgress,
8226 isHydrating = !0,
8227 hydrationErrors = null,
8228 rootOrSingletonContext = !0,
8229 renderLanes = mountChildFibers(
8230 workInProgress,
8231 null,
8232 nextProps,
8233 renderLanes
8234 ),
8235 workInProgress.child = renderLanes;
8236 renderLanes;
8237
8238 )
8239 (renderLanes.flags = (renderLanes.flags & -3) | 4096),
8240 (renderLanes = renderLanes.sibling);
8241 else {
8242 resetHydrationState();
8243 if (nextProps === lazyComponent) {
8244 workInProgress = bailoutOnAlreadyFinishedWork(
8245 current,
8246 workInProgress,
8247 renderLanes
8248 );
8249 break a;
8250 }
8251 reconcileChildren(current, workInProgress, nextProps, renderLanes);
8252 }
8253 workInProgress = workInProgress.child;
8254 }
8255 return workInProgress;
8256 case 26:
8257 return (
8258 markRef(current, workInProgress),
8259 (renderLanes = workInProgress.memoizedState =
8260 getResource(
8261 workInProgress.type,
8262 null === current ? null : current.memoizedProps,
8263 workInProgress.pendingProps
8264 )),
8265 null !== current ||
8266 isHydrating ||
8267 null !== renderLanes ||
8268 ((renderLanes = workInProgress.type),
8269 (current = workInProgress.pendingProps),
8270 (lazyComponent = getOwnerDocumentFromRootContainer(
8271 rootInstanceStackCursor.current
8272 ).createElement(renderLanes)),
8273 (lazyComponent[internalInstanceKey] = workInProgress),
8274 (lazyComponent[internalPropsKey] = current),
8275 setInitialProperties(lazyComponent, renderLanes, current),
8276 markNodeAsHoistable(lazyComponent),
8277 (workInProgress.stateNode = lazyComponent)),
8278 null
8279 );
8280 case 27:
8281 return (
8282 pushHostContext(workInProgress),
8283 null === current &&
8284 isHydrating &&
8285 ((lazyComponent = workInProgress.stateNode =
8286 resolveSingletonInstance(
8287 workInProgress.type,
8288 workInProgress.pendingProps,
8289 rootInstanceStackCursor.current
8290 )),
8291 (hydrationParentFiber = workInProgress),
8292 (rootOrSingletonContext = !0),
8293 (nextHydratableInstance = getNextHydratable(
8294 lazyComponent.firstChild
8295 ))),
8296 (lazyComponent = workInProgress.pendingProps.children),
8297 null !== current || isHydrating
8298 ? reconcileChildren(
8299 current,
8300 workInProgress,
8301 lazyComponent,
8302 renderLanes
8303 )
8304 : (workInProgress.child = reconcileChildFibers(
8305 workInProgress,
8306 null,
8307 lazyComponent,
8308 renderLanes
8309 )),
8310 markRef(current, workInProgress),
8311 workInProgress.child
8312 );
8313 case 5:
8314 if (null === current && isHydrating) {
8315 if ((init = lazyComponent = nextHydratableInstance))
8316 (lazyComponent = canHydrateInstance(
8317 lazyComponent,
8318 workInProgress.type,
8319 workInProgress.pendingProps,
8320 rootOrSingletonContext
8321 )),
8322 null !== lazyComponent
8323 ? ((workInProgress.stateNode = lazyComponent),
8324 (hydrationParentFiber = workInProgress),
8325 (nextHydratableInstance = getNextHydratable(
8326 lazyComponent.firstChild
8327 )),
8328 (rootOrSingletonContext = !1),
8329 (init = !0))
8330 : (init = !1);
8331 init || throwOnHydrationMismatch(workInProgress);
8332 }
8333 pushHostContext(workInProgress);
8334 init = workInProgress.type;
8335 nextProps = workInProgress.pendingProps;
8336 nextState = null !== current ? current.memoizedProps : null;
8337 lazyComponent = nextProps.children;
8338 shouldSetTextContent(init, nextProps)
8339 ? (lazyComponent = null)
8340 : null !== nextState &&
8341 shouldSetTextContent(init, nextState) &&
8342 (workInProgress.flags |= 32);
8343 null !== workInProgress.memoizedState &&
8344 ((init = renderWithHooks(
8345 current,
8346 workInProgress,
8347 TransitionAwareHostComponent,
8348 null,
8349 null,
8350 renderLanes
8351 )),
8352 (HostTransitionContext._currentValue = init),
8353 didReceiveUpdate &&
8354 null !== current &&
8355 current.memoizedState.memoizedState !== init &&
8356 propagateContextChange(
8357 workInProgress,
8358 HostTransitionContext,
8359 renderLanes
8360 ));
8361 markRef(current, workInProgress);
8362 reconcileChildren(current, workInProgress, lazyComponent, renderLanes);
8363 return workInProgress.child;
8364 case 6:
8365 if (null === current && isHydrating) {
8366 if ((current = renderLanes = nextHydratableInstance))
8367 (renderLanes = canHydrateTextInstance(
8368 renderLanes,
8369 workInProgress.pendingProps,
8370 rootOrSingletonContext
8371 )),
8372 null !== renderLanes
8373 ? ((workInProgress.stateNode = renderLanes),
8374 (hydrationParentFiber = workInProgress),
8375 (nextHydratableInstance = null),
8376 (current = !0))
8377 : (current = !1);
8378 current || throwOnHydrationMismatch(workInProgress);
8379 }
8380 return null;
8381 case 13:
8382 return updateSuspenseComponent(current, workInProgress, renderLanes);
8383 case 4:
8384 return (
8385 pushHostContainer(
8386 workInProgress,
8387 workInProgress.stateNode.containerInfo
8388 ),
8389 (lazyComponent = workInProgress.pendingProps),
8390 null === current
8391 ? (workInProgress.child = reconcileChildFibers(
8392 workInProgress,
8393 null,
8394 lazyComponent,
8395 renderLanes
8396 ))
8397 : reconcileChildren(
8398 current,
8399 workInProgress,
8400 lazyComponent,
8401 renderLanes
8402 ),
8403 workInProgress.child
8404 );
8405 case 11:
8406 return updateForwardRef(
8407 current,
8408 workInProgress,
8409 workInProgress.type,
8410 workInProgress.pendingProps,
8411 renderLanes
8412 );
8413 case 7:
8414 return (
8415 reconcileChildren(
8416 current,
8417 workInProgress,
8418 workInProgress.pendingProps,
8419 renderLanes
8420 ),
8421 workInProgress.child
8422 );
8423 case 8:
8424 return (
8425 reconcileChildren(
8426 current,
8427 workInProgress,
8428 workInProgress.pendingProps.children,
8429 renderLanes
8430 ),
8431 workInProgress.child
8432 );
8433 case 12:
8434 return (
8435 reconcileChildren(
8436 current,
8437 workInProgress,
8438 workInProgress.pendingProps.children,
8439 renderLanes
8440 ),
8441 workInProgress.child
8442 );
8443 case 10:
8444 a: {
8445 lazyComponent = workInProgress.type;
8446 init = workInProgress.pendingProps;
8447 nextProps = workInProgress.memoizedProps;
8448 nextState = init.value;
8449 pushProvider(workInProgress, lazyComponent, nextState);
8450 if (null !== nextProps)
8451 if (objectIs(nextProps.value, nextState)) {
8452 if (nextProps.children === init.children) {
8453 workInProgress = bailoutOnAlreadyFinishedWork(
8454 current,
8455 workInProgress,
8456 renderLanes
8457 );
8458 break a;
8459 }
8460 } else
8461 propagateContextChange(workInProgress, lazyComponent, renderLanes);
8462 reconcileChildren(current, workInProgress, init.children, renderLanes);
8463 workInProgress = workInProgress.child;
8464 }
8465 return workInProgress;
8466 case 9:
8467 return (
8468 (init = workInProgress.type._context),
8469 (lazyComponent = workInProgress.pendingProps.children),
8470 prepareToReadContext(workInProgress, renderLanes),
8471 (init = readContext(init)),
8472 (lazyComponent = lazyComponent(init)),
8473 (workInProgress.flags |= 1),
8474 reconcileChildren(current, workInProgress, lazyComponent, renderLanes),
8475 workInProgress.child
8476 );
8477 case 14:
8478 return updateMemoComponent(
8479 current,
8480 workInProgress,
8481 workInProgress.type,
8482 workInProgress.pendingProps,
8483 renderLanes
8484 );
8485 case 15:
8486 return updateSimpleMemoComponent(
8487 current,
8488 workInProgress,
8489 workInProgress.type,
8490 workInProgress.pendingProps,
8491 renderLanes
8492 );
8493 case 19:
8494 return updateSuspenseListComponent(current, workInProgress, renderLanes);
8495 case 22:
8496 return updateOffscreenComponent(current, workInProgress, renderLanes);
8497 case 24:
8498 return (
8499 prepareToReadContext(workInProgress, renderLanes),
8500 (lazyComponent = readContext(CacheContext)),
8501 null === current
8502 ? ((init = peekCacheFromPool()),
8503 null === init &&
8504 ((init = workInProgressRoot),
8505 (nextProps = createCache()),
8506 (init.pooledCache = nextProps),
8507 nextProps.refCount++,
8508 null !== nextProps && (init.pooledCacheLanes |= renderLanes),
8509 (init = nextProps)),
8510 (workInProgress.memoizedState = {
8511 parent: lazyComponent,
8512 cache: init
8513 }),
8514 initializeUpdateQueue(workInProgress),
8515 pushProvider(workInProgress, CacheContext, init))
8516 : (0 !== (current.lanes & renderLanes) &&
8517 (cloneUpdateQueue(current, workInProgress),
8518 processUpdateQueue(workInProgress, null, null, renderLanes),
8519 suspendIfUpdateReadFromEntangledAsyncAction()),
8520 (init = current.memoizedState),
8521 (nextProps = workInProgress.memoizedState),
8522 init.parent !== lazyComponent
8523 ? ((init = { parent: lazyComponent, cache: lazyComponent }),
8524 (workInProgress.memoizedState = init),
8525 0 === workInProgress.lanes &&
8526 (workInProgress.memoizedState =
8527 workInProgress.updateQueue.baseState =
8528 init),
8529 pushProvider(workInProgress, CacheContext, lazyComponent))
8530 : ((lazyComponent = nextProps.cache),
8531 pushProvider(workInProgress, CacheContext, lazyComponent),
8532 lazyComponent !== init.cache &&
8533 propagateContextChange(
8534 workInProgress,
8535 CacheContext,
8536 renderLanes
8537 ))),
8538 reconcileChildren(
8539 current,
8540 workInProgress,
8541 workInProgress.pendingProps.children,
8542 renderLanes
8543 ),
8544 workInProgress.child
8545 );
8546 }
8547 throw Error(formatProdErrorMessage(156, workInProgress.tag));
8548}
8549var valueCursor = createCursor(null),
8550 currentlyRenderingFiber = null,
8551 lastContextDependency = null,
8552 lastFullyObservedContext = null;
8553function resetContextDependencies() {
8554 lastFullyObservedContext =
8555 lastContextDependency =
8556 currentlyRenderingFiber =
8557 null;
8558}
8559function pushProvider(providerFiber, context, nextValue) {
8560 push(valueCursor, context._currentValue);
8561 context._currentValue = nextValue;
8562}
8563function popProvider(context) {
8564 context._currentValue = valueCursor.current;
8565 pop(valueCursor);
8566}
8567function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {
8568 for (; null !== parent; ) {
8569 var alternate = parent.alternate;
8570 (parent.childLanes & renderLanes) !== renderLanes
8571 ? ((parent.childLanes |= renderLanes),
8572 null !== alternate && (alternate.childLanes |= renderLanes))
8573 : null !== alternate &&
8574 (alternate.childLanes & renderLanes) !== renderLanes &&
8575 (alternate.childLanes |= renderLanes);
8576 if (parent === propagationRoot) break;
8577 parent = parent.return;
8578 }
8579}
8580function propagateContextChange(workInProgress, context, renderLanes) {
8581 var fiber = workInProgress.child;
8582 null !== fiber && (fiber.return = workInProgress);
8583 for (; null !== fiber; ) {
8584 var list = fiber.dependencies;
8585 if (null !== list) {
8586 var nextFiber = fiber.child;
8587 for (var dependency = list.firstContext; null !== dependency; ) {
8588 if (dependency.context === context) {
8589 if (1 === fiber.tag) {
8590 dependency = createUpdate(renderLanes & -renderLanes);
8591 dependency.tag = 2;
8592 var updateQueue = fiber.updateQueue;
8593 if (null !== updateQueue) {
8594 updateQueue = updateQueue.shared;
8595 var pending = updateQueue.pending;
8596 null === pending
8597 ? (dependency.next = dependency)
8598 : ((dependency.next = pending.next),
8599 (pending.next = dependency));
8600 updateQueue.pending = dependency;
8601 }
8602 }
8603 fiber.lanes |= renderLanes;
8604 dependency = fiber.alternate;
8605 null !== dependency && (dependency.lanes |= renderLanes);
8606 scheduleContextWorkOnParentPath(
8607 fiber.return,
8608 renderLanes,
8609 workInProgress
8610 );
8611 list.lanes |= renderLanes;
8612 break;
8613 }
8614 dependency = dependency.next;
8615 }
8616 } else if (10 === fiber.tag)
8617 nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
8618 else if (18 === fiber.tag) {
8619 nextFiber = fiber.return;
8620 if (null === nextFiber) throw Error(formatProdErrorMessage(341));
8621 nextFiber.lanes |= renderLanes;
8622 list = nextFiber.alternate;
8623 null !== list && (list.lanes |= renderLanes);
8624 scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress);
8625 nextFiber = fiber.sibling;
8626 } else nextFiber = fiber.child;
8627 if (null !== nextFiber) nextFiber.return = fiber;
8628 else
8629 for (nextFiber = fiber; null !== nextFiber; ) {
8630 if (nextFiber === workInProgress) {
8631 nextFiber = null;
8632 break;
8633 }
8634 fiber = nextFiber.sibling;
8635 if (null !== fiber) {
8636 fiber.return = nextFiber.return;
8637 nextFiber = fiber;
8638 break;
8639 }
8640 nextFiber = nextFiber.return;
8641 }
8642 fiber = nextFiber;
8643 }
8644}
8645function prepareToReadContext(workInProgress, renderLanes) {
8646 currentlyRenderingFiber = workInProgress;
8647 lastFullyObservedContext = lastContextDependency = null;
8648 workInProgress = workInProgress.dependencies;
8649 null !== workInProgress &&
8650 null !== workInProgress.firstContext &&
8651 (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0),
8652 (workInProgress.firstContext = null));
8653}
8654function readContext(context) {
8655 return readContextForConsumer(currentlyRenderingFiber, context);
8656}
8657function readContextDuringReconciliation(consumer, context, renderLanes) {
8658 null === currentlyRenderingFiber &&
8659 prepareToReadContext(consumer, renderLanes);
8660 return readContextForConsumer(consumer, context);
8661}
8662function readContextForConsumer(consumer, context) {
8663 var value = context._currentValue;
8664 if (lastFullyObservedContext !== context)
8665 if (
8666 ((context = { context: context, memoizedValue: value, next: null }),
8667 null === lastContextDependency)
8668 ) {
8669 if (null === consumer) throw Error(formatProdErrorMessage(308));
8670 lastContextDependency = context;
8671 consumer.dependencies = { lanes: 0, firstContext: context };
8672 } else lastContextDependency = lastContextDependency.next = context;
8673 return value;
8674}
8675var hasForceUpdate = !1;
8676function initializeUpdateQueue(fiber) {
8677 fiber.updateQueue = {
8678 baseState: fiber.memoizedState,
8679 firstBaseUpdate: null,
8680 lastBaseUpdate: null,
8681 shared: { pending: null, lanes: 0, hiddenCallbacks: null },
8682 callbacks: null
8683 };
8684}
8685function cloneUpdateQueue(current, workInProgress) {
8686 current = current.updateQueue;
8687 workInProgress.updateQueue === current &&
8688 (workInProgress.updateQueue = {
8689 baseState: current.baseState,
8690 firstBaseUpdate: current.firstBaseUpdate,
8691 lastBaseUpdate: current.lastBaseUpdate,
8692 shared: current.shared,
8693 callbacks: null
8694 });
8695}
8696function createUpdate(lane) {
8697 return { lane: lane, tag: 0, payload: null, callback: null, next: null };
8698}
8699function enqueueUpdate(fiber, update, lane) {
8700 var updateQueue = fiber.updateQueue;
8701 if (null === updateQueue) return null;
8702 updateQueue = updateQueue.shared;
8703 if (0 !== (executionContext & 2)) {
8704 var pending = updateQueue.pending;
8705 null === pending
8706 ? (update.next = update)
8707 : ((update.next = pending.next), (pending.next = update));
8708 updateQueue.pending = update;
8709 update = getRootForUpdatedFiber(fiber);
8710 markUpdateLaneFromFiberToRoot(fiber, null, lane);
8711 return update;
8712 }
8713 enqueueUpdate$1(fiber, updateQueue, update, lane);
8714 return getRootForUpdatedFiber(fiber);
8715}
8716function entangleTransitions(root, fiber, lane) {
8717 fiber = fiber.updateQueue;
8718 if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) {
8719 var queueLanes = fiber.lanes;
8720 queueLanes &= root.pendingLanes;
8721 lane |= queueLanes;
8722 fiber.lanes = lane;
8723 markRootEntangled(root, lane);
8724 }
8725}
8726function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
8727 var queue = workInProgress.updateQueue,
8728 current = workInProgress.alternate;
8729 if (
8730 null !== current &&
8731 ((current = current.updateQueue), queue === current)
8732 ) {
8733 var newFirst = null,
8734 newLast = null;
8735 queue = queue.firstBaseUpdate;
8736 if (null !== queue) {
8737 do {
8738 var clone = {
8739 lane: queue.lane,
8740 tag: queue.tag,
8741 payload: queue.payload,
8742 callback: null,
8743 next: null
8744 };
8745 null === newLast
8746 ? (newFirst = newLast = clone)
8747 : (newLast = newLast.next = clone);
8748 queue = queue.next;
8749 } while (null !== queue);
8750 null === newLast
8751 ? (newFirst = newLast = capturedUpdate)
8752 : (newLast = newLast.next = capturedUpdate);
8753 } else newFirst = newLast = capturedUpdate;
8754 queue = {
8755 baseState: current.baseState,
8756 firstBaseUpdate: newFirst,
8757 lastBaseUpdate: newLast,
8758 shared: current.shared,
8759 callbacks: current.callbacks
8760 };
8761 workInProgress.updateQueue = queue;
8762 return;
8763 }
8764 workInProgress = queue.lastBaseUpdate;
8765 null === workInProgress
8766 ? (queue.firstBaseUpdate = capturedUpdate)
8767 : (workInProgress.next = capturedUpdate);
8768 queue.lastBaseUpdate = capturedUpdate;
8769}
8770var didReadFromEntangledAsyncAction = !1;
8771function suspendIfUpdateReadFromEntangledAsyncAction() {
8772 if (didReadFromEntangledAsyncAction) {
8773 var entangledActionThenable = currentEntangledActionThenable;
8774 if (null !== entangledActionThenable) throw entangledActionThenable;
8775 }
8776}
8777function processUpdateQueue(
8778 workInProgress$jscomp$0,
8779 props,
8780 instance$jscomp$0,
8781 renderLanes
8782) {
8783 didReadFromEntangledAsyncAction = !1;
8784 var queue = workInProgress$jscomp$0.updateQueue;
8785 hasForceUpdate = !1;
8786 var firstBaseUpdate = queue.firstBaseUpdate,
8787 lastBaseUpdate = queue.lastBaseUpdate,
8788 pendingQueue = queue.shared.pending;
8789 if (null !== pendingQueue) {
8790 queue.shared.pending = null;
8791 var lastPendingUpdate = pendingQueue,
8792 firstPendingUpdate = lastPendingUpdate.next;
8793 lastPendingUpdate.next = null;
8794 null === lastBaseUpdate
8795 ? (firstBaseUpdate = firstPendingUpdate)
8796 : (lastBaseUpdate.next = firstPendingUpdate);
8797 lastBaseUpdate = lastPendingUpdate;
8798 var current = workInProgress$jscomp$0.alternate;
8799 null !== current &&
8800 ((current = current.updateQueue),
8801 (pendingQueue = current.lastBaseUpdate),
8802 pendingQueue !== lastBaseUpdate &&
8803 (null === pendingQueue
8804 ? (current.firstBaseUpdate = firstPendingUpdate)
8805 : (pendingQueue.next = firstPendingUpdate),
8806 (current.lastBaseUpdate = lastPendingUpdate)));
8807 }
8808 if (null !== firstBaseUpdate) {
8809 var newState = queue.baseState;
8810 lastBaseUpdate = 0;
8811 current = firstPendingUpdate = lastPendingUpdate = null;
8812 pendingQueue = firstBaseUpdate;
8813 do {
8814 var updateLane = pendingQueue.lane & -536870913,
8815 isHiddenUpdate = updateLane !== pendingQueue.lane;
8816 if (
8817 isHiddenUpdate
8818 ? (workInProgressRootRenderLanes & updateLane) === updateLane
8819 : (renderLanes & updateLane) === updateLane
8820 ) {
8821 0 !== updateLane &&
8822 updateLane === currentEntangledLane &&
8823 (didReadFromEntangledAsyncAction = !0);
8824 null !== current &&
8825 (current = current.next =
8826 {
8827 lane: 0,
8828 tag: pendingQueue.tag,
8829 payload: pendingQueue.payload,
8830 callback: null,
8831 next: null
8832 });
8833 a: {
8834 var workInProgress = workInProgress$jscomp$0,
8835 update = pendingQueue;
8836 updateLane = props;
8837 var instance = instance$jscomp$0;
8838 switch (update.tag) {
8839 case 1:
8840 workInProgress = update.payload;
8841 if ("function" === typeof workInProgress) {
8842 newState = workInProgress.call(instance, newState, updateLane);
8843 break a;
8844 }
8845 newState = workInProgress;
8846 break a;
8847 case 3:
8848 workInProgress.flags = (workInProgress.flags & -65537) | 128;
8849 case 0:
8850 workInProgress = update.payload;
8851 updateLane =
8852 "function" === typeof workInProgress
8853 ? workInProgress.call(instance, newState, updateLane)
8854 : workInProgress;
8855 if (null === updateLane || void 0 === updateLane) break a;
8856 newState = assign({}, newState, updateLane);
8857 break a;
8858 case 2:
8859 hasForceUpdate = !0;
8860 }
8861 }
8862 updateLane = pendingQueue.callback;
8863 null !== updateLane &&
8864 ((workInProgress$jscomp$0.flags |= 64),
8865 isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),
8866 (isHiddenUpdate = queue.callbacks),
8867 null === isHiddenUpdate
8868 ? (queue.callbacks = [updateLane])
8869 : isHiddenUpdate.push(updateLane));
8870 } else
8871 (isHiddenUpdate = {
8872 lane: updateLane,
8873 tag: pendingQueue.tag,
8874 payload: pendingQueue.payload,
8875 callback: pendingQueue.callback,
8876 next: null
8877 }),
8878 null === current
8879 ? ((firstPendingUpdate = current = isHiddenUpdate),
8880 (lastPendingUpdate = newState))
8881 : (current = current.next = isHiddenUpdate),
8882 (lastBaseUpdate |= updateLane);
8883 pendingQueue = pendingQueue.next;
8884 if (null === pendingQueue)
8885 if (((pendingQueue = queue.shared.pending), null === pendingQueue))
8886 break;
8887 else
8888 (isHiddenUpdate = pendingQueue),
8889 (pendingQueue = isHiddenUpdate.next),
8890 (isHiddenUpdate.next = null),
8891 (queue.lastBaseUpdate = isHiddenUpdate),
8892 (queue.shared.pending = null);
8893 } while (1);
8894 null === current && (lastPendingUpdate = newState);
8895 queue.baseState = lastPendingUpdate;
8896 queue.firstBaseUpdate = firstPendingUpdate;
8897 queue.lastBaseUpdate = current;
8898 null === firstBaseUpdate && (queue.shared.lanes = 0);
8899 workInProgressRootSkippedLanes |= lastBaseUpdate;
8900 workInProgress$jscomp$0.lanes = lastBaseUpdate;
8901 workInProgress$jscomp$0.memoizedState = newState;
8902 }
8903}
8904function callCallback(callback, context) {
8905 if ("function" !== typeof callback)
8906 throw Error(formatProdErrorMessage(191, callback));
8907 callback.call(context);
8908}
8909function commitCallbacks(updateQueue, context) {
8910 var callbacks = updateQueue.callbacks;
8911 if (null !== callbacks)
8912 for (
8913 updateQueue.callbacks = null, updateQueue = 0;
8914 updateQueue < callbacks.length;
8915 updateQueue++
8916 )
8917 callCallback(callbacks[updateQueue], context);
8918}
8919function applyDerivedStateFromProps(
8920 workInProgress,
8921 ctor,
8922 getDerivedStateFromProps,
8923 nextProps
8924) {
8925 ctor = workInProgress.memoizedState;
8926 getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
8927 getDerivedStateFromProps =
8928 null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
8929 ? ctor
8930 : assign({}, ctor, getDerivedStateFromProps);
8931 workInProgress.memoizedState = getDerivedStateFromProps;
8932 0 === workInProgress.lanes &&
8933 (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
8934}
8935var classComponentUpdater = {
8936 isMounted: function (component) {
8937 return (component = component._reactInternals)
8938 ? getNearestMountedFiber(component) === component
8939 : !1;
8940 },
8941 enqueueSetState: function (inst, payload, callback) {
8942 inst = inst._reactInternals;
8943 var lane = requestUpdateLane(),
8944 update = createUpdate(lane);
8945 update.payload = payload;
8946 void 0 !== callback && null !== callback && (update.callback = callback);
8947 payload = enqueueUpdate(inst, update, lane);
8948 null !== payload &&
8949 (scheduleUpdateOnFiber(payload, inst, lane),
8950 entangleTransitions(payload, inst, lane));
8951 },
8952 enqueueReplaceState: function (inst, payload, callback) {
8953 inst = inst._reactInternals;
8954 var lane = requestUpdateLane(),
8955 update = createUpdate(lane);
8956 update.tag = 1;
8957 update.payload = payload;
8958 void 0 !== callback && null !== callback && (update.callback = callback);
8959 payload = enqueueUpdate(inst, update, lane);
8960 null !== payload &&
8961 (scheduleUpdateOnFiber(payload, inst, lane),
8962 entangleTransitions(payload, inst, lane));
8963 },
8964 enqueueForceUpdate: function (inst, callback) {
8965 inst = inst._reactInternals;
8966 var lane = requestUpdateLane(),
8967 update = createUpdate(lane);
8968 update.tag = 2;
8969 void 0 !== callback && null !== callback && (update.callback = callback);
8970 callback = enqueueUpdate(inst, update, lane);
8971 null !== callback &&
8972 (scheduleUpdateOnFiber(callback, inst, lane),
8973 entangleTransitions(callback, inst, lane));
8974 }
8975};
8976function checkShouldComponentUpdate(
8977 workInProgress,
8978 ctor,
8979 oldProps,
8980 newProps,
8981 oldState,
8982 newState,
8983 nextContext
8984) {
8985 workInProgress = workInProgress.stateNode;
8986 return "function" === typeof workInProgress.shouldComponentUpdate
8987 ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)
8988 : ctor.prototype && ctor.prototype.isPureReactComponent
8989 ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
8990 : !0;
8991}
8992function callComponentWillReceiveProps(
8993 workInProgress,
8994 instance,
8995 newProps,
8996 nextContext
8997) {
8998 workInProgress = instance.state;
8999 "function" === typeof instance.componentWillReceiveProps &&
9000 instance.componentWillReceiveProps(newProps, nextContext);
9001 "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
9002 instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
9003 instance.state !== workInProgress &&
9004 classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
9005}
9006function resolveClassComponentProps(Component, baseProps) {
9007 var newProps = baseProps;
9008 if ("ref" in baseProps) {
9009 newProps = {};
9010 for (var propName in baseProps)
9011 "ref" !== propName && (newProps[propName] = baseProps[propName]);
9012 }
9013 if ((Component = Component.defaultProps)) {
9014 newProps === baseProps && (newProps = assign({}, newProps));
9015 for (var propName$156 in Component)
9016 void 0 === newProps[propName$156] &&
9017 (newProps[propName$156] = Component[propName$156]);
9018 }
9019 return newProps;
9020}
9021var offscreenSubtreeIsHidden = !1,
9022 offscreenSubtreeWasHidden = !1,
9023 needsFormReset = !1,
9024 PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
9025 nextEffect = null;
9026function callComponentWillUnmountWithTimer(current, instance) {
9027 instance.props = resolveClassComponentProps(
9028 current.type,
9029 current.memoizedProps
9030 );
9031 instance.state = current.memoizedState;
9032 instance.componentWillUnmount();
9033}
9034function safelyAttachRef(current, nearestMountedAncestor) {
9035 try {
9036 var ref = current.ref;
9037 if (null !== ref) {
9038 var instance = current.stateNode;
9039 switch (current.tag) {
9040 case 26:
9041 case 27:
9042 case 5:
9043 var instanceToUse = instance;
9044 break;
9045 default:
9046 instanceToUse = instance;
9047 }
9048 "function" === typeof ref
9049 ? (current.refCleanup = ref(instanceToUse))
9050 : (ref.current = instanceToUse);
9051 }
9052 } catch (error) {
9053 captureCommitPhaseError(current, nearestMountedAncestor, error);
9054 }
9055}
9056function safelyDetachRef(current, nearestMountedAncestor) {
9057 var ref = current.ref,
9058 refCleanup = current.refCleanup;
9059 if (null !== ref)
9060 if ("function" === typeof refCleanup)
9061 try {
9062 refCleanup();
9063 } catch (error) {
9064 captureCommitPhaseError(current, nearestMountedAncestor, error);
9065 } finally {
9066 (current.refCleanup = null),
9067 (current = current.alternate),
9068 null != current && (current.refCleanup = null);
9069 }
9070 else if ("function" === typeof ref)
9071 try {
9072 ref(null);
9073 } catch (error$157) {
9074 captureCommitPhaseError(current, nearestMountedAncestor, error$157);
9075 }
9076 else ref.current = null;
9077}
9078function safelyCallDestroy(current, nearestMountedAncestor, destroy) {
9079 try {
9080 destroy();
9081 } catch (error) {
9082 captureCommitPhaseError(current, nearestMountedAncestor, error);
9083 }
9084}
9085var shouldFireAfterActiveInstanceBlur = !1;
9086function commitBeforeMutationEffects(root, firstChild) {
9087 eventsEnabled = _enabled;
9088 root = getActiveElementDeep();
9089 if (hasSelectionCapabilities(root)) {
9090 if ("selectionStart" in root)
9091 var JSCompiler_temp = {
9092 start: root.selectionStart,
9093 end: root.selectionEnd
9094 };
9095 else
9096 a: {
9097 JSCompiler_temp =
9098 ((JSCompiler_temp = root.ownerDocument) &&
9099 JSCompiler_temp.defaultView) ||
9100 window;
9101 var selection =
9102 JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
9103 if (selection && 0 !== selection.rangeCount) {
9104 JSCompiler_temp = selection.anchorNode;
9105 var anchorOffset = selection.anchorOffset,
9106 focusNode = selection.focusNode;
9107 selection = selection.focusOffset;
9108 try {
9109 JSCompiler_temp.nodeType, focusNode.nodeType;
9110 } catch (e$19) {
9111 JSCompiler_temp = null;
9112 break a;
9113 }
9114 var length = 0,
9115 start = -1,
9116 end = -1,
9117 indexWithinAnchor = 0,
9118 indexWithinFocus = 0,
9119 node = root,
9120 parentNode = null;
9121 b: for (;;) {
9122 for (var next; ; ) {
9123 node !== JSCompiler_temp ||
9124 (0 !== anchorOffset && 3 !== node.nodeType) ||
9125 (start = length + anchorOffset);
9126 node !== focusNode ||
9127 (0 !== selection && 3 !== node.nodeType) ||
9128 (end = length + selection);
9129 3 === node.nodeType && (length += node.nodeValue.length);
9130 if (null === (next = node.firstChild)) break;
9131 parentNode = node;
9132 node = next;
9133 }
9134 for (;;) {
9135 if (node === root) break b;
9136 parentNode === JSCompiler_temp &&
9137 ++indexWithinAnchor === anchorOffset &&
9138 (start = length);
9139 parentNode === focusNode &&
9140 ++indexWithinFocus === selection &&
9141 (end = length);
9142 if (null !== (next = node.nextSibling)) break;
9143 node = parentNode;
9144 parentNode = node.parentNode;
9145 }
9146 node = next;
9147 }
9148 JSCompiler_temp =
9149 -1 === start || -1 === end ? null : { start: start, end: end };
9150 } else JSCompiler_temp = null;
9151 }
9152 JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
9153 } else JSCompiler_temp = null;
9154 selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp };
9155 _enabled = !1;
9156 for (nextEffect = firstChild; null !== nextEffect; )
9157 if (
9158 ((firstChild = nextEffect),
9159 (root = firstChild.child),
9160 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
9161 )
9162 (root.return = firstChild), (nextEffect = root);
9163 else
9164 for (; null !== nextEffect; ) {
9165 firstChild = nextEffect;
9166 try {
9167 var current = firstChild.alternate,
9168 flags = firstChild.flags;
9169 switch (firstChild.tag) {
9170 case 0:
9171 break;
9172 case 11:
9173 case 15:
9174 break;
9175 case 1:
9176 if (0 !== (flags & 1024) && null !== current) {
9177 var prevState = current.memoizedState,
9178 instance = firstChild.stateNode,
9179 snapshot = instance.getSnapshotBeforeUpdate(
9180 resolveClassComponentProps(
9181 firstChild.type,
9182 current.memoizedProps
9183 ),
9184 prevState
9185 );
9186 instance.__reactInternalSnapshotBeforeUpdate = snapshot;
9187 }
9188 break;
9189 case 3:
9190 if (0 !== (flags & 1024)) {
9191 var container = firstChild.stateNode.containerInfo,
9192 nodeType = container.nodeType;
9193 if (9 === nodeType) clearContainerSparingly(container);
9194 else if (1 === nodeType)
9195 switch (container.nodeName) {
9196 case "HEAD":
9197 case "HTML":
9198 case "BODY":
9199 clearContainerSparingly(container);
9200 break;
9201 default:
9202 container.textContent = "";
9203 }
9204 }
9205 break;
9206 case 5:
9207 case 26:
9208 case 27:
9209 case 6:
9210 case 4:
9211 case 17:
9212 break;
9213 default:
9214 if (0 !== (flags & 1024))
9215 throw Error(formatProdErrorMessage(163));
9216 }
9217 } catch (error) {
9218 captureCommitPhaseError(firstChild, firstChild.return, error);
9219 }
9220 root = firstChild.sibling;
9221 if (null !== root) {
9222 root.return = firstChild.return;
9223 nextEffect = root;
9224 break;
9225 }
9226 nextEffect = firstChild.return;
9227 }
9228 current = shouldFireAfterActiveInstanceBlur;
9229 shouldFireAfterActiveInstanceBlur = !1;
9230 return current;
9231}
9232function commitHookEffectListUnmount(
9233 flags,
9234 finishedWork,
9235 nearestMountedAncestor
9236) {
9237 var updateQueue = finishedWork.updateQueue;
9238 updateQueue = null !== updateQueue ? updateQueue.lastEffect : null;
9239 if (null !== updateQueue) {
9240 var effect = (updateQueue = updateQueue.next);
9241 do {
9242 if ((effect.tag & flags) === flags) {
9243 var inst = effect.inst,
9244 destroy = inst.destroy;
9245 void 0 !== destroy &&
9246 ((inst.destroy = void 0),
9247 safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy));
9248 }
9249 effect = effect.next;
9250 } while (effect !== updateQueue);
9251 }
9252}
9253function commitHookEffectListMount(flags, finishedWork) {
9254 finishedWork = finishedWork.updateQueue;
9255 finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
9256 if (null !== finishedWork) {
9257 var effect = (finishedWork = finishedWork.next);
9258 do {
9259 if ((effect.tag & flags) === flags) {
9260 var create = effect.create,
9261 inst = effect.inst;
9262 create = create();
9263 inst.destroy = create;
9264 }
9265 effect = effect.next;
9266 } while (effect !== finishedWork);
9267 }
9268}
9269function commitHookLayoutEffects(finishedWork, hookFlags) {
9270 try {
9271 commitHookEffectListMount(hookFlags, finishedWork);
9272 } catch (error) {
9273 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9274 }
9275}
9276function commitClassCallbacks(finishedWork) {
9277 var updateQueue = finishedWork.updateQueue;
9278 if (null !== updateQueue) {
9279 var instance = finishedWork.stateNode;
9280 try {
9281 commitCallbacks(updateQueue, instance);
9282 } catch (error) {
9283 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9284 }
9285 }
9286}
9287function commitHostComponentMount(finishedWork) {
9288 var type = finishedWork.type,
9289 props = finishedWork.memoizedProps,
9290 instance = finishedWork.stateNode;
9291 try {
9292 a: switch (type) {
9293 case "button":
9294 case "input":
9295 case "select":
9296 case "textarea":
9297 props.autoFocus && instance.focus();
9298 break a;
9299 case "img":
9300 props.src && (instance.src = props.src);
9301 }
9302 } catch (error) {
9303 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9304 }
9305}
9306function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
9307 var flags = finishedWork.flags;
9308 switch (finishedWork.tag) {
9309 case 0:
9310 case 11:
9311 case 15:
9312 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9313 flags & 4 && commitHookLayoutEffects(finishedWork, 5);
9314 break;
9315 case 1:
9316 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9317 if (flags & 4)
9318 if (((finishedRoot = finishedWork.stateNode), null === current))
9319 try {
9320 finishedRoot.componentDidMount();
9321 } catch (error) {
9322 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9323 }
9324 else {
9325 var prevProps = resolveClassComponentProps(
9326 finishedWork.type,
9327 current.memoizedProps
9328 );
9329 current = current.memoizedState;
9330 try {
9331 finishedRoot.componentDidUpdate(
9332 prevProps,
9333 current,
9334 finishedRoot.__reactInternalSnapshotBeforeUpdate
9335 );
9336 } catch (error$159) {
9337 captureCommitPhaseError(
9338 finishedWork,
9339 finishedWork.return,
9340 error$159
9341 );
9342 }
9343 }
9344 flags & 64 && commitClassCallbacks(finishedWork);
9345 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
9346 break;
9347 case 3:
9348 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9349 if (flags & 64 && ((flags = finishedWork.updateQueue), null !== flags)) {
9350 finishedRoot = null;
9351 if (null !== finishedWork.child)
9352 switch (finishedWork.child.tag) {
9353 case 27:
9354 case 5:
9355 finishedRoot = finishedWork.child.stateNode;
9356 break;
9357 case 1:
9358 finishedRoot = finishedWork.child.stateNode;
9359 }
9360 try {
9361 commitCallbacks(flags, finishedRoot);
9362 } catch (error) {
9363 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9364 }
9365 }
9366 break;
9367 case 26:
9368 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9369 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
9370 break;
9371 case 27:
9372 case 5:
9373 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9374 null === current && flags & 4 && commitHostComponentMount(finishedWork);
9375 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
9376 break;
9377 case 12:
9378 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9379 break;
9380 case 13:
9381 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9382 flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
9383 break;
9384 case 22:
9385 prevProps =
9386 null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
9387 if (!prevProps) {
9388 current =
9389 (null !== current && null !== current.memoizedState) ||
9390 offscreenSubtreeWasHidden;
9391 var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,
9392 prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
9393 offscreenSubtreeIsHidden = prevProps;
9394 (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden
9395 ? recursivelyTraverseReappearLayoutEffects(
9396 finishedRoot,
9397 finishedWork,
9398 0 !== (finishedWork.subtreeFlags & 8772)
9399 )
9400 : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9401 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
9402 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
9403 }
9404 flags & 512 &&
9405 ("manual" === finishedWork.memoizedProps.mode
9406 ? safelyAttachRef(finishedWork, finishedWork.return)
9407 : safelyDetachRef(finishedWork, finishedWork.return));
9408 break;
9409 default:
9410 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9411 }
9412}
9413function detachFiberAfterEffects(fiber) {
9414 var alternate = fiber.alternate;
9415 null !== alternate &&
9416 ((fiber.alternate = null), detachFiberAfterEffects(alternate));
9417 fiber.child = null;
9418 fiber.deletions = null;
9419 fiber.sibling = null;
9420 5 === fiber.tag &&
9421 ((alternate = fiber.stateNode),
9422 null !== alternate && detachDeletedInstance(alternate));
9423 fiber.stateNode = null;
9424 fiber.return = null;
9425 fiber.dependencies = null;
9426 fiber.memoizedProps = null;
9427 fiber.memoizedState = null;
9428 fiber.pendingProps = null;
9429 fiber.stateNode = null;
9430 fiber.updateQueue = null;
9431}
9432function isHostParent(fiber) {
9433 return (
9434 5 === fiber.tag ||
9435 3 === fiber.tag ||
9436 26 === fiber.tag ||
9437 27 === fiber.tag ||
9438 4 === fiber.tag
9439 );
9440}
9441function getHostSibling(fiber) {
9442 a: for (;;) {
9443 for (; null === fiber.sibling; ) {
9444 if (null === fiber.return || isHostParent(fiber.return)) return null;
9445 fiber = fiber.return;
9446 }
9447 fiber.sibling.return = fiber.return;
9448 for (
9449 fiber = fiber.sibling;
9450 5 !== fiber.tag &&
9451 6 !== fiber.tag &&
9452 27 !== fiber.tag &&
9453 18 !== fiber.tag;
9454
9455 ) {
9456 if (fiber.flags & 2) continue a;
9457 if (null === fiber.child || 4 === fiber.tag) continue a;
9458 else (fiber.child.return = fiber), (fiber = fiber.child);
9459 }
9460 if (!(fiber.flags & 2)) return fiber.stateNode;
9461 }
9462}
9463function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
9464 var tag = node.tag;
9465 if (5 === tag || 6 === tag)
9466 (node = node.stateNode),
9467 before
9468 ? 8 === parent.nodeType
9469 ? parent.parentNode.insertBefore(node, before)
9470 : parent.insertBefore(node, before)
9471 : (8 === parent.nodeType
9472 ? ((before = parent.parentNode), before.insertBefore(node, parent))
9473 : ((before = parent), before.appendChild(node)),
9474 (parent = parent._reactRootContainer),
9475 (null !== parent && void 0 !== parent) ||
9476 null !== before.onclick ||
9477 (before.onclick = noop$2));
9478 else if (4 !== tag && 27 !== tag && ((node = node.child), null !== node))
9479 for (
9480 insertOrAppendPlacementNodeIntoContainer(node, before, parent),
9481 node = node.sibling;
9482 null !== node;
9483
9484 )
9485 insertOrAppendPlacementNodeIntoContainer(node, before, parent),
9486 (node = node.sibling);
9487}
9488function insertOrAppendPlacementNode(node, before, parent) {
9489 var tag = node.tag;
9490 if (5 === tag || 6 === tag)
9491 (node = node.stateNode),
9492 before ? parent.insertBefore(node, before) : parent.appendChild(node);
9493 else if (4 !== tag && 27 !== tag && ((node = node.child), null !== node))
9494 for (
9495 insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
9496 null !== node;
9497
9498 )
9499 insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);
9500}
9501var hostParent = null,
9502 hostParentIsContainer = !1;
9503function recursivelyTraverseDeletionEffects(
9504 finishedRoot,
9505 nearestMountedAncestor,
9506 parent
9507) {
9508 for (parent = parent.child; null !== parent; )
9509 commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),
9510 (parent = parent.sibling);
9511}
9512function commitDeletionEffectsOnFiber(
9513 finishedRoot,
9514 nearestMountedAncestor,
9515 deletedFiber
9516) {
9517 if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
9518 try {
9519 injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
9520 } catch (err) {}
9521 switch (deletedFiber.tag) {
9522 case 26:
9523 offscreenSubtreeWasHidden ||
9524 safelyDetachRef(deletedFiber, nearestMountedAncestor);
9525 recursivelyTraverseDeletionEffects(
9526 finishedRoot,
9527 nearestMountedAncestor,
9528 deletedFiber
9529 );
9530 deletedFiber.memoizedState
9531 ? deletedFiber.memoizedState.count--
9532 : deletedFiber.stateNode &&
9533 ((deletedFiber = deletedFiber.stateNode),
9534 deletedFiber.parentNode.removeChild(deletedFiber));
9535 break;
9536 case 27:
9537 offscreenSubtreeWasHidden ||
9538 safelyDetachRef(deletedFiber, nearestMountedAncestor);
9539 var prevHostParent = hostParent,
9540 prevHostParentIsContainer = hostParentIsContainer;
9541 hostParent = deletedFiber.stateNode;
9542 recursivelyTraverseDeletionEffects(
9543 finishedRoot,
9544 nearestMountedAncestor,
9545 deletedFiber
9546 );
9547 deletedFiber = deletedFiber.stateNode;
9548 for (finishedRoot = deletedFiber.attributes; finishedRoot.length; )
9549 deletedFiber.removeAttributeNode(finishedRoot[0]);
9550 detachDeletedInstance(deletedFiber);
9551 hostParent = prevHostParent;
9552 hostParentIsContainer = prevHostParentIsContainer;
9553 break;
9554 case 5:
9555 offscreenSubtreeWasHidden ||
9556 safelyDetachRef(deletedFiber, nearestMountedAncestor);
9557 case 6:
9558 prevHostParent = hostParent;
9559 prevHostParentIsContainer = hostParentIsContainer;
9560 hostParent = null;
9561 recursivelyTraverseDeletionEffects(
9562 finishedRoot,
9563 nearestMountedAncestor,
9564 deletedFiber
9565 );
9566 hostParent = prevHostParent;
9567 hostParentIsContainer = prevHostParentIsContainer;
9568 null !== hostParent &&
9569 (hostParentIsContainer
9570 ? ((finishedRoot = hostParent),
9571 (deletedFiber = deletedFiber.stateNode),
9572 8 === finishedRoot.nodeType
9573 ? finishedRoot.parentNode.removeChild(deletedFiber)
9574 : finishedRoot.removeChild(deletedFiber))
9575 : hostParent.removeChild(deletedFiber.stateNode));
9576 break;
9577 case 18:
9578 null !== hostParent &&
9579 (hostParentIsContainer
9580 ? ((finishedRoot = hostParent),
9581 (deletedFiber = deletedFiber.stateNode),
9582 8 === finishedRoot.nodeType
9583 ? clearSuspenseBoundary(finishedRoot.parentNode, deletedFiber)
9584 : 1 === finishedRoot.nodeType &&
9585 clearSuspenseBoundary(finishedRoot, deletedFiber),
9586 retryIfBlockedOn(finishedRoot))
9587 : clearSuspenseBoundary(hostParent, deletedFiber.stateNode));
9588 break;
9589 case 4:
9590 prevHostParent = hostParent;
9591 prevHostParentIsContainer = hostParentIsContainer;
9592 hostParent = deletedFiber.stateNode.containerInfo;
9593 hostParentIsContainer = !0;
9594 recursivelyTraverseDeletionEffects(
9595 finishedRoot,
9596 nearestMountedAncestor,
9597 deletedFiber
9598 );
9599 hostParent = prevHostParent;
9600 hostParentIsContainer = prevHostParentIsContainer;
9601 break;
9602 case 0:
9603 case 11:
9604 case 14:
9605 case 15:
9606 if (
9607 !offscreenSubtreeWasHidden &&
9608 ((prevHostParent = deletedFiber.updateQueue),
9609 null !== prevHostParent &&
9610 ((prevHostParent = prevHostParent.lastEffect),
9611 null !== prevHostParent))
9612 ) {
9613 prevHostParentIsContainer = prevHostParent = prevHostParent.next;
9614 do {
9615 var tag = prevHostParentIsContainer.tag,
9616 inst = prevHostParentIsContainer.inst,
9617 destroy = inst.destroy;
9618 void 0 !== destroy &&
9619 (0 !== (tag & 2)
9620 ? ((inst.destroy = void 0),
9621 safelyCallDestroy(
9622 deletedFiber,
9623 nearestMountedAncestor,
9624 destroy
9625 ))
9626 : 0 !== (tag & 4) &&
9627 ((inst.destroy = void 0),
9628 safelyCallDestroy(
9629 deletedFiber,
9630 nearestMountedAncestor,
9631 destroy
9632 )));
9633 prevHostParentIsContainer = prevHostParentIsContainer.next;
9634 } while (prevHostParentIsContainer !== prevHostParent);
9635 }
9636 recursivelyTraverseDeletionEffects(
9637 finishedRoot,
9638 nearestMountedAncestor,
9639 deletedFiber
9640 );
9641 break;
9642 case 1:
9643 if (
9644 !offscreenSubtreeWasHidden &&
9645 (safelyDetachRef(deletedFiber, nearestMountedAncestor),
9646 (prevHostParent = deletedFiber.stateNode),
9647 "function" === typeof prevHostParent.componentWillUnmount)
9648 )
9649 try {
9650 callComponentWillUnmountWithTimer(deletedFiber, prevHostParent);
9651 } catch (error) {
9652 captureCommitPhaseError(deletedFiber, nearestMountedAncestor, error);
9653 }
9654 recursivelyTraverseDeletionEffects(
9655 finishedRoot,
9656 nearestMountedAncestor,
9657 deletedFiber
9658 );
9659 break;
9660 case 21:
9661 recursivelyTraverseDeletionEffects(
9662 finishedRoot,
9663 nearestMountedAncestor,
9664 deletedFiber
9665 );
9666 break;
9667 case 22:
9668 safelyDetachRef(deletedFiber, nearestMountedAncestor);
9669 offscreenSubtreeWasHidden =
9670 (prevHostParent = offscreenSubtreeWasHidden) ||
9671 null !== deletedFiber.memoizedState;
9672 recursivelyTraverseDeletionEffects(
9673 finishedRoot,
9674 nearestMountedAncestor,
9675 deletedFiber
9676 );
9677 offscreenSubtreeWasHidden = prevHostParent;
9678 break;
9679 default:
9680 recursivelyTraverseDeletionEffects(
9681 finishedRoot,
9682 nearestMountedAncestor,
9683 deletedFiber
9684 );
9685 }
9686}
9687function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
9688 if (
9689 null === finishedWork.memoizedState &&
9690 ((finishedRoot = finishedWork.alternate),
9691 null !== finishedRoot &&
9692 ((finishedRoot = finishedRoot.memoizedState),
9693 null !== finishedRoot &&
9694 ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))
9695 )
9696 try {
9697 retryIfBlockedOn(finishedRoot);
9698 } catch (error) {
9699 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9700 }
9701}
9702function getRetryCache(finishedWork) {
9703 switch (finishedWork.tag) {
9704 case 13:
9705 case 19:
9706 var retryCache = finishedWork.stateNode;
9707 null === retryCache &&
9708 (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
9709 return retryCache;
9710 case 22:
9711 return (
9712 (finishedWork = finishedWork.stateNode),
9713 (retryCache = finishedWork._retryCache),
9714 null === retryCache &&
9715 (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),
9716 retryCache
9717 );
9718 default:
9719 throw Error(formatProdErrorMessage(435, finishedWork.tag));
9720 }
9721}
9722function attachSuspenseRetryListeners(finishedWork, wakeables) {
9723 var retryCache = getRetryCache(finishedWork);
9724 wakeables.forEach(function (wakeable) {
9725 var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
9726 retryCache.has(wakeable) ||
9727 (retryCache.add(wakeable), wakeable.then(retry, retry));
9728 });
9729}
9730function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
9731 var deletions = parentFiber.deletions;
9732 if (null !== deletions)
9733 for (var i = 0; i < deletions.length; i++) {
9734 var childToDelete = deletions[i];
9735 try {
9736 var root = root$jscomp$0,
9737 returnFiber = parentFiber,
9738 parent = returnFiber;
9739 a: for (; null !== parent; ) {
9740 switch (parent.tag) {
9741 case 27:
9742 case 5:
9743 hostParent = parent.stateNode;
9744 hostParentIsContainer = !1;
9745 break a;
9746 case 3:
9747 hostParent = parent.stateNode.containerInfo;
9748 hostParentIsContainer = !0;
9749 break a;
9750 case 4:
9751 hostParent = parent.stateNode.containerInfo;
9752 hostParentIsContainer = !0;
9753 break a;
9754 }
9755 parent = parent.return;
9756 }
9757 if (null === hostParent) throw Error(formatProdErrorMessage(160));
9758 commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);
9759 hostParent = null;
9760 hostParentIsContainer = !1;
9761 var alternate = childToDelete.alternate;
9762 null !== alternate && (alternate.return = null);
9763 childToDelete.return = null;
9764 } catch (error) {
9765 captureCommitPhaseError(childToDelete, parentFiber, error);
9766 }
9767 }
9768 if (parentFiber.subtreeFlags & 13878)
9769 for (parentFiber = parentFiber.child; null !== parentFiber; )
9770 commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
9771 (parentFiber = parentFiber.sibling);
9772}
9773var currentHoistableRoot = null;
9774function commitMutationEffectsOnFiber(finishedWork, root) {
9775 var current = finishedWork.alternate,
9776 flags = finishedWork.flags;
9777 switch (finishedWork.tag) {
9778 case 0:
9779 case 11:
9780 case 14:
9781 case 15:
9782 recursivelyTraverseMutationEffects(root, finishedWork);
9783 commitReconciliationEffects(finishedWork);
9784 if (flags & 4) {
9785 try {
9786 commitHookEffectListUnmount(3, finishedWork, finishedWork.return),
9787 commitHookEffectListMount(3, finishedWork);
9788 } catch (error) {
9789 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9790 }
9791 try {
9792 commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
9793 } catch (error$171) {
9794 captureCommitPhaseError(finishedWork, finishedWork.return, error$171);
9795 }
9796 }
9797 break;
9798 case 1:
9799 recursivelyTraverseMutationEffects(root, finishedWork);
9800 commitReconciliationEffects(finishedWork);
9801 flags & 512 &&
9802 null !== current &&
9803 safelyDetachRef(current, current.return);
9804 flags & 64 &&
9805 offscreenSubtreeIsHidden &&
9806 ((finishedWork = finishedWork.updateQueue),
9807 null !== finishedWork &&
9808 ((flags = finishedWork.callbacks),
9809 null !== flags &&
9810 ((current = finishedWork.shared.hiddenCallbacks),
9811 (finishedWork.shared.hiddenCallbacks =
9812 null === current ? flags : current.concat(flags)))));
9813 break;
9814 case 26:
9815 var hoistableRoot = currentHoistableRoot;
9816 recursivelyTraverseMutationEffects(root, finishedWork);
9817 commitReconciliationEffects(finishedWork);
9818 flags & 512 &&
9819 null !== current &&
9820 safelyDetachRef(current, current.return);
9821 if (flags & 4)
9822 if (
9823 ((root = null !== current ? current.memoizedState : null),
9824 (flags = finishedWork.memoizedState),
9825 null === current)
9826 )
9827 if (null === flags)
9828 if (null === finishedWork.stateNode) {
9829 a: {
9830 flags = finishedWork.type;
9831 current = finishedWork.memoizedProps;
9832 root = hoistableRoot.ownerDocument || hoistableRoot;
9833 b: switch (flags) {
9834 case "title":
9835 hoistableRoot = root.getElementsByTagName("title")[0];
9836 if (
9837 !hoistableRoot ||
9838 hoistableRoot[internalHoistableMarker] ||
9839 hoistableRoot[internalInstanceKey] ||
9840 "http://www.w3.org/2000/svg" ===
9841 hoistableRoot.namespaceURI ||
9842 hoistableRoot.hasAttribute("itemprop")
9843 )
9844 (hoistableRoot = root.createElement(flags)),
9845 root.head.insertBefore(
9846 hoistableRoot,
9847 root.querySelector("head > title")
9848 );
9849 setInitialProperties(hoistableRoot, flags, current);
9850 hoistableRoot[internalInstanceKey] = finishedWork;
9851 markNodeAsHoistable(hoistableRoot);
9852 flags = hoistableRoot;
9853 break a;
9854 case "link":
9855 var maybeNodes = getHydratableHoistableCache(
9856 "link",
9857 "href",
9858 root
9859 ).get(flags + (current.href || ""));
9860 if (maybeNodes)
9861 for (var i = 0; i < maybeNodes.length; i++)
9862 if (
9863 ((hoistableRoot = maybeNodes[i]),
9864 hoistableRoot.getAttribute("href") ===
9865 (null == current.href ? null : current.href) &&
9866 hoistableRoot.getAttribute("rel") ===
9867 (null == current.rel ? null : current.rel) &&
9868 hoistableRoot.getAttribute("title") ===
9869 (null == current.title ? null : current.title) &&
9870 hoistableRoot.getAttribute("crossorigin") ===
9871 (null == current.crossOrigin
9872 ? null
9873 : current.crossOrigin))
9874 ) {
9875 maybeNodes.splice(i, 1);
9876 break b;
9877 }
9878 hoistableRoot = root.createElement(flags);
9879 setInitialProperties(hoistableRoot, flags, current);
9880 root.head.appendChild(hoistableRoot);
9881 break;
9882 case "meta":
9883 if (
9884 (maybeNodes = getHydratableHoistableCache(
9885 "meta",
9886 "content",
9887 root
9888 ).get(flags + (current.content || "")))
9889 )
9890 for (i = 0; i < maybeNodes.length; i++)
9891 if (
9892 ((hoistableRoot = maybeNodes[i]),
9893 hoistableRoot.getAttribute("content") ===
9894 (null == current.content
9895 ? null
9896 : "" + current.content) &&
9897 hoistableRoot.getAttribute("name") ===
9898 (null == current.name ? null : current.name) &&
9899 hoistableRoot.getAttribute("property") ===
9900 (null == current.property
9901 ? null
9902 : current.property) &&
9903 hoistableRoot.getAttribute("http-equiv") ===
9904 (null == current.httpEquiv
9905 ? null
9906 : current.httpEquiv) &&
9907 hoistableRoot.getAttribute("charset") ===
9908 (null == current.charSet
9909 ? null
9910 : current.charSet))
9911 ) {
9912 maybeNodes.splice(i, 1);
9913 break b;
9914 }
9915 hoistableRoot = root.createElement(flags);
9916 setInitialProperties(hoistableRoot, flags, current);
9917 root.head.appendChild(hoistableRoot);
9918 break;
9919 default:
9920 throw Error(formatProdErrorMessage(468, flags));
9921 }
9922 hoistableRoot[internalInstanceKey] = finishedWork;
9923 markNodeAsHoistable(hoistableRoot);
9924 flags = hoistableRoot;
9925 }
9926 finishedWork.stateNode = flags;
9927 } else
9928 mountHoistable(
9929 hoistableRoot,
9930 finishedWork.type,
9931 finishedWork.stateNode
9932 );
9933 else
9934 finishedWork.stateNode = acquireResource(
9935 hoistableRoot,
9936 flags,
9937 finishedWork.memoizedProps
9938 );
9939 else if (root !== flags)
9940 null === root
9941 ? null !== current.stateNode &&
9942 ((current = current.stateNode),
9943 current.parentNode.removeChild(current))
9944 : root.count--,
9945 null === flags
9946 ? mountHoistable(
9947 hoistableRoot,
9948 finishedWork.type,
9949 finishedWork.stateNode
9950 )
9951 : acquireResource(
9952 hoistableRoot,
9953 flags,
9954 finishedWork.memoizedProps
9955 );
9956 else if (null === flags && null !== finishedWork.stateNode)
9957 try {
9958 var domElement = finishedWork.stateNode,
9959 newProps = finishedWork.memoizedProps;
9960 updateProperties(
9961 domElement,
9962 finishedWork.type,
9963 current.memoizedProps,
9964 newProps
9965 );
9966 domElement[internalPropsKey] = newProps;
9967 } catch (error$172) {
9968 captureCommitPhaseError(
9969 finishedWork,
9970 finishedWork.return,
9971 error$172
9972 );
9973 }
9974 break;
9975 case 27:
9976 if (flags & 4 && null === finishedWork.alternate) {
9977 hoistableRoot = finishedWork.stateNode;
9978 maybeNodes = finishedWork.memoizedProps;
9979 for (i = hoistableRoot.firstChild; i; ) {
9980 var nextNode = i.nextSibling,
9981 nodeName = i.nodeName;
9982 i[internalHoistableMarker] ||
9983 "HEAD" === nodeName ||
9984 "BODY" === nodeName ||
9985 "SCRIPT" === nodeName ||
9986 "STYLE" === nodeName ||
9987 ("LINK" === nodeName && "stylesheet" === i.rel.toLowerCase()) ||
9988 hoistableRoot.removeChild(i);
9989 i = nextNode;
9990 }
9991 i = finishedWork.type;
9992 for (nextNode = hoistableRoot.attributes; nextNode.length; )
9993 hoistableRoot.removeAttributeNode(nextNode[0]);
9994 setInitialProperties(hoistableRoot, i, maybeNodes);
9995 hoistableRoot[internalInstanceKey] = finishedWork;
9996 hoistableRoot[internalPropsKey] = maybeNodes;
9997 }
9998 case 5:
9999 recursivelyTraverseMutationEffects(root, finishedWork);
10000 commitReconciliationEffects(finishedWork);
10001 flags & 512 &&
10002 null !== current &&
10003 safelyDetachRef(current, current.return);
10004 if (finishedWork.flags & 32) {
10005 root = finishedWork.stateNode;
10006 try {
10007 setTextContent(root, "");
10008 } catch (error$173) {
10009 captureCommitPhaseError(finishedWork, finishedWork.return, error$173);
10010 }
10011 }
10012 if (flags & 4 && ((root = finishedWork.stateNode), null != root)) {
10013 hoistableRoot = finishedWork.memoizedProps;
10014 current = null !== current ? current.memoizedProps : hoistableRoot;
10015 maybeNodes = finishedWork.type;
10016 try {
10017 updateProperties(root, maybeNodes, current, hoistableRoot),
10018 (root[internalPropsKey] = hoistableRoot);
10019 } catch (error$175) {
10020 captureCommitPhaseError(finishedWork, finishedWork.return, error$175);
10021 }
10022 }
10023 flags & 1024 && (needsFormReset = !0);
10024 break;
10025 case 6:
10026 recursivelyTraverseMutationEffects(root, finishedWork);
10027 commitReconciliationEffects(finishedWork);
10028 if (flags & 4) {
10029 if (null === finishedWork.stateNode)
10030 throw Error(formatProdErrorMessage(162));
10031 flags = finishedWork.stateNode;
10032 current = finishedWork.memoizedProps;
10033 try {
10034 flags.nodeValue = current;
10035 } catch (error$176) {
10036 captureCommitPhaseError(finishedWork, finishedWork.return, error$176);
10037 }
10038 }
10039 break;
10040 case 3:
10041 tagCaches = null;
10042 hoistableRoot = currentHoistableRoot;
10043 currentHoistableRoot = getHoistableRoot(root.containerInfo);
10044 recursivelyTraverseMutationEffects(root, finishedWork);
10045 currentHoistableRoot = hoistableRoot;
10046 commitReconciliationEffects(finishedWork);
10047 if (flags & 4 && null !== current && current.memoizedState.isDehydrated)
10048 try {
10049 retryIfBlockedOn(root.containerInfo);
10050 } catch (error$177) {
10051 captureCommitPhaseError(finishedWork, finishedWork.return, error$177);
10052 }
10053 needsFormReset &&
10054 ((needsFormReset = !1), recursivelyResetForms(finishedWork));
10055 break;
10056 case 4:
10057 flags = currentHoistableRoot;
10058 currentHoistableRoot = getHoistableRoot(
10059 finishedWork.stateNode.containerInfo
10060 );
10061 recursivelyTraverseMutationEffects(root, finishedWork);
10062 commitReconciliationEffects(finishedWork);
10063 currentHoistableRoot = flags;
10064 break;
10065 case 13:
10066 recursivelyTraverseMutationEffects(root, finishedWork);
10067 commitReconciliationEffects(finishedWork);
10068 finishedWork.child.flags & 8192 &&
10069 (null !== finishedWork.memoizedState) !==
10070 (null !== current && null !== current.memoizedState) &&
10071 (globalMostRecentFallbackTime = now());
10072 flags & 4 &&
10073 ((flags = finishedWork.updateQueue),
10074 null !== flags &&
10075 ((finishedWork.updateQueue = null),
10076 attachSuspenseRetryListeners(finishedWork, flags)));
10077 break;
10078 case 22:
10079 flags & 512 &&
10080 null !== current &&
10081 safelyDetachRef(current, current.return);
10082 domElement = null !== finishedWork.memoizedState;
10083 newProps = null !== current && null !== current.memoizedState;
10084 var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,
10085 prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
10086 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || domElement;
10087 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || newProps;
10088 recursivelyTraverseMutationEffects(root, finishedWork);
10089 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
10090 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
10091 commitReconciliationEffects(finishedWork);
10092 root = finishedWork.stateNode;
10093 root._current = finishedWork;
10094 root._visibility &= -3;
10095 root._visibility |= root._pendingVisibility & 2;
10096 if (
10097 flags & 8192 &&
10098 ((root._visibility = domElement
10099 ? root._visibility & -2
10100 : root._visibility | 1),
10101 domElement &&
10102 ((root = offscreenSubtreeIsHidden || offscreenSubtreeWasHidden),
10103 null === current ||
10104 newProps ||
10105 root ||
10106 recursivelyTraverseDisappearLayoutEffects(finishedWork)),
10107 null === finishedWork.memoizedProps ||
10108 "manual" !== finishedWork.memoizedProps.mode)
10109 )
10110 a: for (current = null, root = finishedWork; ; ) {
10111 if (5 === root.tag || 26 === root.tag || 27 === root.tag) {
10112 if (null === current) {
10113 current = root;
10114 try {
10115 (hoistableRoot = root.stateNode),
10116 domElement
10117 ? ((maybeNodes = hoistableRoot.style),
10118 "function" === typeof maybeNodes.setProperty
10119 ? maybeNodes.setProperty("display", "none", "important")
10120 : (maybeNodes.display = "none"))
10121 : ((i = root.stateNode),
10122 (nextNode = root.memoizedProps.style),
10123 (nodeName =
10124 void 0 !== nextNode &&
10125 null !== nextNode &&
10126 nextNode.hasOwnProperty("display")
10127 ? nextNode.display
10128 : null),
10129 (i.style.display =
10130 null == nodeName || "boolean" === typeof nodeName
10131 ? ""
10132 : ("" + nodeName).trim()));
10133 } catch (error) {
10134 captureCommitPhaseError(
10135 finishedWork,
10136 finishedWork.return,
10137 error
10138 );
10139 }
10140 }
10141 } else if (6 === root.tag) {
10142 if (null === current)
10143 try {
10144 root.stateNode.nodeValue = domElement ? "" : root.memoizedProps;
10145 } catch (error$161) {
10146 captureCommitPhaseError(
10147 finishedWork,
10148 finishedWork.return,
10149 error$161
10150 );
10151 }
10152 } else if (
10153 ((22 !== root.tag && 23 !== root.tag) ||
10154 null === root.memoizedState ||
10155 root === finishedWork) &&
10156 null !== root.child
10157 ) {
10158 root.child.return = root;
10159 root = root.child;
10160 continue;
10161 }
10162 if (root === finishedWork) break a;
10163 for (; null === root.sibling; ) {
10164 if (null === root.return || root.return === finishedWork) break a;
10165 current === root && (current = null);
10166 root = root.return;
10167 }
10168 current === root && (current = null);
10169 root.sibling.return = root.return;
10170 root = root.sibling;
10171 }
10172 flags & 4 &&
10173 ((flags = finishedWork.updateQueue),
10174 null !== flags &&
10175 ((current = flags.retryQueue),
10176 null !== current &&
10177 ((flags.retryQueue = null),
10178 attachSuspenseRetryListeners(finishedWork, current))));
10179 break;
10180 case 19:
10181 recursivelyTraverseMutationEffects(root, finishedWork);
10182 commitReconciliationEffects(finishedWork);
10183 flags & 4 &&
10184 ((flags = finishedWork.updateQueue),
10185 null !== flags &&
10186 ((finishedWork.updateQueue = null),
10187 attachSuspenseRetryListeners(finishedWork, flags)));
10188 break;
10189 case 21:
10190 break;
10191 default:
10192 recursivelyTraverseMutationEffects(root, finishedWork),
10193 commitReconciliationEffects(finishedWork);
10194 }
10195}
10196function commitReconciliationEffects(finishedWork) {
10197 var flags = finishedWork.flags;
10198 if (flags & 2) {
10199 try {
10200 if (27 !== finishedWork.tag) {
10201 b: {
10202 for (var parent = finishedWork.return; null !== parent; ) {
10203 if (isHostParent(parent)) {
10204 var JSCompiler_inline_result = parent;
10205 break b;
10206 }
10207 parent = parent.return;
10208 }
10209 throw Error(formatProdErrorMessage(160));
10210 }
10211 switch (JSCompiler_inline_result.tag) {
10212 case 27:
10213 var parent$jscomp$0 = JSCompiler_inline_result.stateNode,
10214 before = getHostSibling(finishedWork);
10215 insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0);
10216 break;
10217 case 5:
10218 var parent$162 = JSCompiler_inline_result.stateNode;
10219 JSCompiler_inline_result.flags & 32 &&
10220 (setTextContent(parent$162, ""),
10221 (JSCompiler_inline_result.flags &= -33));
10222 var before$163 = getHostSibling(finishedWork);
10223 insertOrAppendPlacementNode(finishedWork, before$163, parent$162);
10224 break;
10225 case 3:
10226 case 4:
10227 var parent$164 = JSCompiler_inline_result.stateNode.containerInfo,
10228 before$165 = getHostSibling(finishedWork);
10229 insertOrAppendPlacementNodeIntoContainer(
10230 finishedWork,
10231 before$165,
10232 parent$164
10233 );
10234 break;
10235 default:
10236 throw Error(formatProdErrorMessage(161));
10237 }
10238 }
10239 } catch (error) {
10240 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10241 }
10242 finishedWork.flags &= -3;
10243 }
10244 flags & 4096 && (finishedWork.flags &= -4097);
10245}
10246function recursivelyResetForms(parentFiber) {
10247 if (parentFiber.subtreeFlags & 1024)
10248 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
10249 var fiber = parentFiber;
10250 recursivelyResetForms(fiber);
10251 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
10252 parentFiber = parentFiber.sibling;
10253 }
10254}
10255function recursivelyTraverseLayoutEffects(root, parentFiber) {
10256 if (parentFiber.subtreeFlags & 8772)
10257 for (parentFiber = parentFiber.child; null !== parentFiber; )
10258 commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),
10259 (parentFiber = parentFiber.sibling);
10260}
10261function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
10262 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
10263 var finishedWork = parentFiber;
10264 switch (finishedWork.tag) {
10265 case 0:
10266 case 11:
10267 case 14:
10268 case 15:
10269 commitHookEffectListUnmount(4, finishedWork, finishedWork.return);
10270 recursivelyTraverseDisappearLayoutEffects(finishedWork);
10271 break;
10272 case 1:
10273 safelyDetachRef(finishedWork, finishedWork.return);
10274 var instance = finishedWork.stateNode;
10275 if ("function" === typeof instance.componentWillUnmount) {
10276 var current = finishedWork,
10277 nearestMountedAncestor = finishedWork.return;
10278 try {
10279 callComponentWillUnmountWithTimer(current, instance);
10280 } catch (error) {
10281 captureCommitPhaseError(current, nearestMountedAncestor, error);
10282 }
10283 }
10284 recursivelyTraverseDisappearLayoutEffects(finishedWork);
10285 break;
10286 case 26:
10287 case 27:
10288 case 5:
10289 safelyDetachRef(finishedWork, finishedWork.return);
10290 recursivelyTraverseDisappearLayoutEffects(finishedWork);
10291 break;
10292 case 22:
10293 safelyDetachRef(finishedWork, finishedWork.return);
10294 null === finishedWork.memoizedState &&
10295 recursivelyTraverseDisappearLayoutEffects(finishedWork);
10296 break;
10297 default:
10298 recursivelyTraverseDisappearLayoutEffects(finishedWork);
10299 }
10300 parentFiber = parentFiber.sibling;
10301 }
10302}
10303function recursivelyTraverseReappearLayoutEffects(
10304 finishedRoot$jscomp$0,
10305 parentFiber,
10306 includeWorkInProgressEffects
10307) {
10308 includeWorkInProgressEffects =
10309 includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
10310 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
10311 var current = parentFiber.alternate,
10312 finishedRoot = finishedRoot$jscomp$0,
10313 finishedWork = parentFiber,
10314 flags = finishedWork.flags;
10315 switch (finishedWork.tag) {
10316 case 0:
10317 case 11:
10318 case 15:
10319 recursivelyTraverseReappearLayoutEffects(
10320 finishedRoot,
10321 finishedWork,
10322 includeWorkInProgressEffects
10323 );
10324 commitHookLayoutEffects(finishedWork, 4);
10325 break;
10326 case 1:
10327 recursivelyTraverseReappearLayoutEffects(
10328 finishedRoot,
10329 finishedWork,
10330 includeWorkInProgressEffects
10331 );
10332 finishedRoot = finishedWork.stateNode;
10333 if ("function" === typeof finishedRoot.componentDidMount)
10334 try {
10335 finishedRoot.componentDidMount();
10336 } catch (error) {
10337 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10338 }
10339 current = finishedWork.updateQueue;
10340 if (null !== current) {
10341 var hiddenCallbacks = current.shared.hiddenCallbacks;
10342 if (null !== hiddenCallbacks)
10343 for (
10344 current.shared.hiddenCallbacks = null, current = 0;
10345 current < hiddenCallbacks.length;
10346 current++
10347 )
10348 callCallback(hiddenCallbacks[current], finishedRoot);
10349 }
10350 includeWorkInProgressEffects &&
10351 flags & 64 &&
10352 commitClassCallbacks(finishedWork);
10353 safelyAttachRef(finishedWork, finishedWork.return);
10354 break;
10355 case 26:
10356 case 27:
10357 case 5:
10358 recursivelyTraverseReappearLayoutEffects(
10359 finishedRoot,
10360 finishedWork,
10361 includeWorkInProgressEffects
10362 );
10363 includeWorkInProgressEffects &&
10364 null === current &&
10365 flags & 4 &&
10366 commitHostComponentMount(finishedWork);
10367 safelyAttachRef(finishedWork, finishedWork.return);
10368 break;
10369 case 12:
10370 recursivelyTraverseReappearLayoutEffects(
10371 finishedRoot,
10372 finishedWork,
10373 includeWorkInProgressEffects
10374 );
10375 break;
10376 case 13:
10377 recursivelyTraverseReappearLayoutEffects(
10378 finishedRoot,
10379 finishedWork,
10380 includeWorkInProgressEffects
10381 );
10382 includeWorkInProgressEffects &&
10383 flags & 4 &&
10384 commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
10385 break;
10386 case 22:
10387 null === finishedWork.memoizedState &&
10388 recursivelyTraverseReappearLayoutEffects(
10389 finishedRoot,
10390 finishedWork,
10391 includeWorkInProgressEffects
10392 );
10393 safelyAttachRef(finishedWork, finishedWork.return);
10394 break;
10395 default:
10396 recursivelyTraverseReappearLayoutEffects(
10397 finishedRoot,
10398 finishedWork,
10399 includeWorkInProgressEffects
10400 );
10401 }
10402 parentFiber = parentFiber.sibling;
10403 }
10404}
10405function commitHookPassiveMountEffects(finishedWork, hookFlags) {
10406 try {
10407 commitHookEffectListMount(hookFlags, finishedWork);
10408 } catch (error) {
10409 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10410 }
10411}
10412function commitOffscreenPassiveMountEffects(current, finishedWork) {
10413 var previousCache = null;
10414 null !== current &&
10415 null !== current.memoizedState &&
10416 null !== current.memoizedState.cachePool &&
10417 (previousCache = current.memoizedState.cachePool.pool);
10418 current = null;
10419 null !== finishedWork.memoizedState &&
10420 null !== finishedWork.memoizedState.cachePool &&
10421 (current = finishedWork.memoizedState.cachePool.pool);
10422 current !== previousCache &&
10423 (null != current && current.refCount++,
10424 null != previousCache && releaseCache(previousCache));
10425}
10426function commitCachePassiveMountEffect(current, finishedWork) {
10427 current = null;
10428 null !== finishedWork.alternate &&
10429 (current = finishedWork.alternate.memoizedState.cache);
10430 finishedWork = finishedWork.memoizedState.cache;
10431 finishedWork !== current &&
10432 (finishedWork.refCount++, null != current && releaseCache(current));
10433}
10434function recursivelyTraversePassiveMountEffects(
10435 root,
10436 parentFiber,
10437 committedLanes,
10438 committedTransitions
10439) {
10440 if (parentFiber.subtreeFlags & 10256)
10441 for (parentFiber = parentFiber.child; null !== parentFiber; )
10442 commitPassiveMountOnFiber(
10443 root,
10444 parentFiber,
10445 committedLanes,
10446 committedTransitions
10447 ),
10448 (parentFiber = parentFiber.sibling);
10449}
10450function commitPassiveMountOnFiber(
10451 finishedRoot,
10452 finishedWork,
10453 committedLanes,
10454 committedTransitions
10455) {
10456 var flags = finishedWork.flags;
10457 switch (finishedWork.tag) {
10458 case 0:
10459 case 11:
10460 case 15:
10461 recursivelyTraversePassiveMountEffects(
10462 finishedRoot,
10463 finishedWork,
10464 committedLanes,
10465 committedTransitions
10466 );
10467 flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);
10468 break;
10469 case 3:
10470 recursivelyTraversePassiveMountEffects(
10471 finishedRoot,
10472 finishedWork,
10473 committedLanes,
10474 committedTransitions
10475 );
10476 flags & 2048 &&
10477 ((finishedRoot = null),
10478 null !== finishedWork.alternate &&
10479 (finishedRoot = finishedWork.alternate.memoizedState.cache),
10480 (finishedWork = finishedWork.memoizedState.cache),
10481 finishedWork !== finishedRoot &&
10482 (finishedWork.refCount++,
10483 null != finishedRoot && releaseCache(finishedRoot)));
10484 break;
10485 case 23:
10486 break;
10487 case 22:
10488 var instance = finishedWork.stateNode;
10489 null !== finishedWork.memoizedState
10490 ? instance._visibility & 4
10491 ? recursivelyTraversePassiveMountEffects(
10492 finishedRoot,
10493 finishedWork,
10494 committedLanes,
10495 committedTransitions
10496 )
10497 : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork)
10498 : instance._visibility & 4
10499 ? recursivelyTraversePassiveMountEffects(
10500 finishedRoot,
10501 finishedWork,
10502 committedLanes,
10503 committedTransitions
10504 )
10505 : ((instance._visibility |= 4),
10506 recursivelyTraverseReconnectPassiveEffects(
10507 finishedRoot,
10508 finishedWork,
10509 committedLanes,
10510 committedTransitions,
10511 0 !== (finishedWork.subtreeFlags & 10256)
10512 ));
10513 flags & 2048 &&
10514 commitOffscreenPassiveMountEffects(
10515 finishedWork.alternate,
10516 finishedWork
10517 );
10518 break;
10519 case 24:
10520 recursivelyTraversePassiveMountEffects(
10521 finishedRoot,
10522 finishedWork,
10523 committedLanes,
10524 committedTransitions
10525 );
10526 flags & 2048 &&
10527 commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
10528 break;
10529 default:
10530 recursivelyTraversePassiveMountEffects(
10531 finishedRoot,
10532 finishedWork,
10533 committedLanes,
10534 committedTransitions
10535 );
10536 }
10537}
10538function recursivelyTraverseReconnectPassiveEffects(
10539 finishedRoot$jscomp$0,
10540 parentFiber,
10541 committedLanes$jscomp$0,
10542 committedTransitions$jscomp$0,
10543 includeWorkInProgressEffects
10544) {
10545 includeWorkInProgressEffects =
10546 includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 10256);
10547 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
10548 var finishedRoot = finishedRoot$jscomp$0,
10549 finishedWork = parentFiber,
10550 committedLanes = committedLanes$jscomp$0,
10551 committedTransitions = committedTransitions$jscomp$0,
10552 flags = finishedWork.flags;
10553 switch (finishedWork.tag) {
10554 case 0:
10555 case 11:
10556 case 15:
10557 recursivelyTraverseReconnectPassiveEffects(
10558 finishedRoot,
10559 finishedWork,
10560 committedLanes,
10561 committedTransitions,
10562 includeWorkInProgressEffects
10563 );
10564 commitHookPassiveMountEffects(finishedWork, 8);
10565 break;
10566 case 23:
10567 break;
10568 case 22:
10569 var instance = finishedWork.stateNode;
10570 null !== finishedWork.memoizedState
10571 ? instance._visibility & 4
10572 ? recursivelyTraverseReconnectPassiveEffects(
10573 finishedRoot,
10574 finishedWork,
10575 committedLanes,
10576 committedTransitions,
10577 includeWorkInProgressEffects
10578 )
10579 : recursivelyTraverseAtomicPassiveEffects(
10580 finishedRoot,
10581 finishedWork
10582 )
10583 : ((instance._visibility |= 4),
10584 recursivelyTraverseReconnectPassiveEffects(
10585 finishedRoot,
10586 finishedWork,
10587 committedLanes,
10588 committedTransitions,
10589 includeWorkInProgressEffects
10590 ));
10591 includeWorkInProgressEffects &&
10592 flags & 2048 &&
10593 commitOffscreenPassiveMountEffects(
10594 finishedWork.alternate,
10595 finishedWork
10596 );
10597 break;
10598 case 24:
10599 recursivelyTraverseReconnectPassiveEffects(
10600 finishedRoot,
10601 finishedWork,
10602 committedLanes,
10603 committedTransitions,
10604 includeWorkInProgressEffects
10605 );
10606 includeWorkInProgressEffects &&
10607 flags & 2048 &&
10608 commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
10609 break;
10610 default:
10611 recursivelyTraverseReconnectPassiveEffects(
10612 finishedRoot,
10613 finishedWork,
10614 committedLanes,
10615 committedTransitions,
10616 includeWorkInProgressEffects
10617 );
10618 }
10619 parentFiber = parentFiber.sibling;
10620 }
10621}
10622function recursivelyTraverseAtomicPassiveEffects(
10623 finishedRoot$jscomp$0,
10624 parentFiber
10625) {
10626 if (parentFiber.subtreeFlags & 10256)
10627 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
10628 var finishedRoot = finishedRoot$jscomp$0,
10629 finishedWork = parentFiber,
10630 flags = finishedWork.flags;
10631 switch (finishedWork.tag) {
10632 case 22:
10633 recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
10634 flags & 2048 &&
10635 commitOffscreenPassiveMountEffects(
10636 finishedWork.alternate,
10637 finishedWork
10638 );
10639 break;
10640 case 24:
10641 recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
10642 flags & 2048 &&
10643 commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
10644 break;
10645 default:
10646 recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
10647 }
10648 parentFiber = parentFiber.sibling;
10649 }
10650}
10651var suspenseyCommitFlag = 8192;
10652function recursivelyAccumulateSuspenseyCommit(parentFiber) {
10653 if (parentFiber.subtreeFlags & suspenseyCommitFlag)
10654 for (parentFiber = parentFiber.child; null !== parentFiber; )
10655 accumulateSuspenseyCommitOnFiber(parentFiber),
10656 (parentFiber = parentFiber.sibling);
10657}
10658function accumulateSuspenseyCommitOnFiber(fiber) {
10659 switch (fiber.tag) {
10660 case 26:
10661 recursivelyAccumulateSuspenseyCommit(fiber);
10662 fiber.flags & suspenseyCommitFlag &&
10663 null !== fiber.memoizedState &&
10664 suspendResource(
10665 currentHoistableRoot,
10666 fiber.memoizedState,
10667 fiber.memoizedProps
10668 );
10669 break;
10670 case 5:
10671 recursivelyAccumulateSuspenseyCommit(fiber);
10672 break;
10673 case 3:
10674 case 4:
10675 var previousHoistableRoot = currentHoistableRoot;
10676 currentHoistableRoot = getHoistableRoot(fiber.stateNode.containerInfo);
10677 recursivelyAccumulateSuspenseyCommit(fiber);
10678 currentHoistableRoot = previousHoistableRoot;
10679 break;
10680 case 22:
10681 null === fiber.memoizedState &&
10682 ((previousHoistableRoot = fiber.alternate),
10683 null !== previousHoistableRoot &&
10684 null !== previousHoistableRoot.memoizedState
10685 ? ((previousHoistableRoot = suspenseyCommitFlag),
10686 (suspenseyCommitFlag = 16777216),
10687 recursivelyAccumulateSuspenseyCommit(fiber),
10688 (suspenseyCommitFlag = previousHoistableRoot))
10689 : recursivelyAccumulateSuspenseyCommit(fiber));
10690 break;
10691 default:
10692 recursivelyAccumulateSuspenseyCommit(fiber);
10693 }
10694}
10695function detachAlternateSiblings(parentFiber) {
10696 var previousFiber = parentFiber.alternate;
10697 if (
10698 null !== previousFiber &&
10699 ((parentFiber = previousFiber.child), null !== parentFiber)
10700 ) {
10701 previousFiber.child = null;
10702 do
10703 (previousFiber = parentFiber.sibling),
10704 (parentFiber.sibling = null),
10705 (parentFiber = previousFiber);
10706 while (null !== parentFiber);
10707 }
10708}
10709function recursivelyTraversePassiveUnmountEffects(parentFiber) {
10710 var deletions = parentFiber.deletions;
10711 if (0 !== (parentFiber.flags & 16)) {
10712 if (null !== deletions)
10713 for (var i = 0; i < deletions.length; i++) {
10714 var childToDelete = deletions[i];
10715 nextEffect = childToDelete;
10716 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
10717 childToDelete,
10718 parentFiber
10719 );
10720 }
10721 detachAlternateSiblings(parentFiber);
10722 }
10723 if (parentFiber.subtreeFlags & 10256)
10724 for (parentFiber = parentFiber.child; null !== parentFiber; )
10725 commitPassiveUnmountOnFiber(parentFiber),
10726 (parentFiber = parentFiber.sibling);
10727}
10728function commitPassiveUnmountOnFiber(finishedWork) {
10729 switch (finishedWork.tag) {
10730 case 0:
10731 case 11:
10732 case 15:
10733 recursivelyTraversePassiveUnmountEffects(finishedWork);
10734 finishedWork.flags & 2048 &&
10735 commitHookEffectListUnmount(9, finishedWork, finishedWork.return);
10736 break;
10737 case 22:
10738 var instance = finishedWork.stateNode;
10739 null !== finishedWork.memoizedState &&
10740 instance._visibility & 4 &&
10741 (null === finishedWork.return || 13 !== finishedWork.return.tag)
10742 ? ((instance._visibility &= -5),
10743 recursivelyTraverseDisconnectPassiveEffects(finishedWork))
10744 : recursivelyTraversePassiveUnmountEffects(finishedWork);
10745 break;
10746 default:
10747 recursivelyTraversePassiveUnmountEffects(finishedWork);
10748 }
10749}
10750function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
10751 var deletions = parentFiber.deletions;
10752 if (0 !== (parentFiber.flags & 16)) {
10753 if (null !== deletions)
10754 for (var i = 0; i < deletions.length; i++) {
10755 var childToDelete = deletions[i];
10756 nextEffect = childToDelete;
10757 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
10758 childToDelete,
10759 parentFiber
10760 );
10761 }
10762 detachAlternateSiblings(parentFiber);
10763 }
10764 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
10765 deletions = parentFiber;
10766 switch (deletions.tag) {
10767 case 0:
10768 case 11:
10769 case 15:
10770 commitHookEffectListUnmount(8, deletions, deletions.return);
10771 recursivelyTraverseDisconnectPassiveEffects(deletions);
10772 break;
10773 case 22:
10774 i = deletions.stateNode;
10775 i._visibility & 4 &&
10776 ((i._visibility &= -5),
10777 recursivelyTraverseDisconnectPassiveEffects(deletions));
10778 break;
10779 default:
10780 recursivelyTraverseDisconnectPassiveEffects(deletions);
10781 }
10782 parentFiber = parentFiber.sibling;
10783 }
10784}
10785function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
10786 deletedSubtreeRoot,
10787 nearestMountedAncestor
10788) {
10789 for (; null !== nextEffect; ) {
10790 var fiber = nextEffect;
10791 switch (fiber.tag) {
10792 case 0:
10793 case 11:
10794 case 15:
10795 commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);
10796 break;
10797 case 23:
10798 case 22:
10799 if (
10800 null !== fiber.memoizedState &&
10801 null !== fiber.memoizedState.cachePool
10802 ) {
10803 var cache = fiber.memoizedState.cachePool.pool;
10804 null != cache && cache.refCount++;
10805 }
10806 break;
10807 case 24:
10808 releaseCache(fiber.memoizedState.cache);
10809 }
10810 cache = fiber.child;
10811 if (null !== cache) (cache.return = fiber), (nextEffect = cache);
10812 else
10813 a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
10814 cache = nextEffect;
10815 var sibling = cache.sibling,
10816 returnFiber = cache.return;
10817 detachFiberAfterEffects(cache);
10818 if (cache === fiber) {
10819 nextEffect = null;
10820 break a;
10821 }
10822 if (null !== sibling) {
10823 sibling.return = returnFiber;
10824 nextEffect = sibling;
10825 break a;
10826 }
10827 nextEffect = returnFiber;
10828 }
10829 }
10830}
10831function FiberNode(tag, pendingProps, key, mode) {
10832 this.tag = tag;
10833 this.key = key;
10834 this.sibling =
10835 this.child =
10836 this.return =
10837 this.stateNode =
10838 this.type =
10839 this.elementType =
10840 null;
10841 this.index = 0;
10842 this.refCleanup = this.ref = null;
10843 this.pendingProps = pendingProps;
10844 this.dependencies =
10845 this.memoizedState =
10846 this.updateQueue =
10847 this.memoizedProps =
10848 null;
10849 this.mode = mode;
10850 this.subtreeFlags = this.flags = 0;
10851 this.deletions = null;
10852 this.childLanes = this.lanes = 0;
10853 this.alternate = null;
10854}
10855function createFiber(tag, pendingProps, key, mode) {
10856 return new FiberNode(tag, pendingProps, key, mode);
10857}
10858function shouldConstruct(Component) {
10859 Component = Component.prototype;
10860 return !(!Component || !Component.isReactComponent);
10861}
10862function createWorkInProgress(current, pendingProps) {
10863 var workInProgress = current.alternate;
10864 null === workInProgress
10865 ? ((workInProgress = createFiber(
10866 current.tag,
10867 pendingProps,
10868 current.key,
10869 current.mode
10870 )),
10871 (workInProgress.elementType = current.elementType),
10872 (workInProgress.type = current.type),
10873 (workInProgress.stateNode = current.stateNode),
10874 (workInProgress.alternate = current),
10875 (current.alternate = workInProgress))
10876 : ((workInProgress.pendingProps = pendingProps),
10877 (workInProgress.type = current.type),
10878 (workInProgress.flags = 0),
10879 (workInProgress.subtreeFlags = 0),
10880 (workInProgress.deletions = null));
10881 workInProgress.flags = current.flags & 31457280;
10882 workInProgress.childLanes = current.childLanes;
10883 workInProgress.lanes = current.lanes;
10884 workInProgress.child = current.child;
10885 workInProgress.memoizedProps = current.memoizedProps;
10886 workInProgress.memoizedState = current.memoizedState;
10887 workInProgress.updateQueue = current.updateQueue;
10888 pendingProps = current.dependencies;
10889 workInProgress.dependencies =
10890 null === pendingProps
10891 ? null
10892 : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };
10893 workInProgress.sibling = current.sibling;
10894 workInProgress.index = current.index;
10895 workInProgress.ref = current.ref;
10896 workInProgress.refCleanup = current.refCleanup;
10897 return workInProgress;
10898}
10899function resetWorkInProgress(workInProgress, renderLanes) {
10900 workInProgress.flags &= 31457282;
10901 var current = workInProgress.alternate;
10902 null === current
10903 ? ((workInProgress.childLanes = 0),
10904 (workInProgress.lanes = renderLanes),
10905 (workInProgress.child = null),
10906 (workInProgress.subtreeFlags = 0),
10907 (workInProgress.memoizedProps = null),
10908 (workInProgress.memoizedState = null),
10909 (workInProgress.updateQueue = null),
10910 (workInProgress.dependencies = null),
10911 (workInProgress.stateNode = null))
10912 : ((workInProgress.childLanes = current.childLanes),
10913 (workInProgress.lanes = current.lanes),
10914 (workInProgress.child = current.child),
10915 (workInProgress.subtreeFlags = 0),
10916 (workInProgress.deletions = null),
10917 (workInProgress.memoizedProps = current.memoizedProps),
10918 (workInProgress.memoizedState = current.memoizedState),
10919 (workInProgress.updateQueue = current.updateQueue),
10920 (workInProgress.type = current.type),
10921 (renderLanes = current.dependencies),
10922 (workInProgress.dependencies =
10923 null === renderLanes
10924 ? null
10925 : {
10926 lanes: renderLanes.lanes,
10927 firstContext: renderLanes.firstContext
10928 }));
10929 return workInProgress;
10930}
10931function createFiberFromTypeAndProps(
10932 type,
10933 key,
10934 pendingProps,
10935 owner,
10936 mode,
10937 lanes
10938) {
10939 var fiberTag = 0;
10940 owner = type;
10941 if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
10942 else if ("string" === typeof type)
10943 fiberTag = isHostHoistableType(
10944 type,
10945 pendingProps,
10946 contextStackCursor.current
10947 )
10948 ? 26
10949 : "html" === type || "head" === type || "body" === type
10950 ? 27
10951 : 5;
10952 else
10953 a: switch (type) {
10954 case REACT_FRAGMENT_TYPE:
10955 return createFiberFromFragment(pendingProps.children, mode, lanes, key);
10956 case REACT_STRICT_MODE_TYPE:
10957 fiberTag = 8;
10958 mode |= 24;
10959 break;
10960 case REACT_PROFILER_TYPE:
10961 return (
10962 (type = createFiber(12, pendingProps, key, mode | 2)),
10963 (type.elementType = REACT_PROFILER_TYPE),
10964 (type.lanes = lanes),
10965 type
10966 );
10967 case REACT_SUSPENSE_TYPE:
10968 return (
10969 (type = createFiber(13, pendingProps, key, mode)),
10970 (type.elementType = REACT_SUSPENSE_TYPE),
10971 (type.lanes = lanes),
10972 type
10973 );
10974 case REACT_SUSPENSE_LIST_TYPE:
10975 return (
10976 (type = createFiber(19, pendingProps, key, mode)),
10977 (type.elementType = REACT_SUSPENSE_LIST_TYPE),
10978 (type.lanes = lanes),
10979 type
10980 );
10981 case REACT_OFFSCREEN_TYPE:
10982 return createFiberFromOffscreen(pendingProps, mode, lanes, key);
10983 default:
10984 if ("object" === typeof type && null !== type)
10985 switch (type.$$typeof) {
10986 case REACT_PROVIDER_TYPE:
10987 case REACT_CONTEXT_TYPE:
10988 fiberTag = 10;
10989 break a;
10990 case REACT_CONSUMER_TYPE:
10991 fiberTag = 9;
10992 break a;
10993 case REACT_FORWARD_REF_TYPE:
10994 fiberTag = 11;
10995 break a;
10996 case REACT_MEMO_TYPE:
10997 fiberTag = 14;
10998 break a;
10999 case REACT_LAZY_TYPE:
11000 fiberTag = 16;
11001 owner = null;
11002 break a;
11003 }
11004 throw Error(
11005 formatProdErrorMessage(130, null == type ? type : typeof type, "")
11006 );
11007 }
11008 key = createFiber(fiberTag, pendingProps, key, mode);
11009 key.elementType = type;
11010 key.type = owner;
11011 key.lanes = lanes;
11012 return key;
11013}
11014function createFiberFromFragment(elements, mode, lanes, key) {
11015 elements = createFiber(7, elements, key, mode);
11016 elements.lanes = lanes;
11017 return elements;
11018}
11019function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
11020 pendingProps = createFiber(22, pendingProps, key, mode);
11021 pendingProps.elementType = REACT_OFFSCREEN_TYPE;
11022 pendingProps.lanes = lanes;
11023 var primaryChildInstance = {
11024 _visibility: 1,
11025 _pendingVisibility: 1,
11026 _pendingMarkers: null,
11027 _retryCache: null,
11028 _transitions: null,
11029 _current: null,
11030 detach: function () {
11031 var fiber = primaryChildInstance._current;
11032 if (null === fiber) throw Error(formatProdErrorMessage(456));
11033 if (0 === (primaryChildInstance._pendingVisibility & 2)) {
11034 var root = enqueueConcurrentRenderForLane(fiber, 2);
11035 null !== root &&
11036 ((primaryChildInstance._pendingVisibility |= 2),
11037 scheduleUpdateOnFiber(root, fiber, 2));
11038 }
11039 },
11040 attach: function () {
11041 var fiber = primaryChildInstance._current;
11042 if (null === fiber) throw Error(formatProdErrorMessage(456));
11043 if (0 !== (primaryChildInstance._pendingVisibility & 2)) {
11044 var root = enqueueConcurrentRenderForLane(fiber, 2);
11045 null !== root &&
11046 ((primaryChildInstance._pendingVisibility &= -3),
11047 scheduleUpdateOnFiber(root, fiber, 2));
11048 }
11049 }
11050 };
11051 pendingProps.stateNode = primaryChildInstance;
11052 return pendingProps;
11053}
11054function createFiberFromText(content, mode, lanes) {
11055 content = createFiber(6, content, null, mode);
11056 content.lanes = lanes;
11057 return content;
11058}
11059function createFiberFromPortal(portal, mode, lanes) {
11060 mode = createFiber(
11061 4,
11062 null !== portal.children ? portal.children : [],
11063 portal.key,
11064 mode
11065 );
11066 mode.lanes = lanes;
11067 mode.stateNode = {
11068 containerInfo: portal.containerInfo,
11069 pendingChildren: null,
11070 implementation: portal.implementation
11071 };
11072 return mode;
11073}
11074function markUpdate(workInProgress) {
11075 workInProgress.flags |= 4;
11076}
11077function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
11078 if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
11079 workInProgress.flags &= -16777217;
11080 else if (
11081 ((workInProgress.flags |= 16777216),
11082 0 === (workInProgressRootRenderLanes & 42) &&
11083 ((resource =
11084 "stylesheet" === resource.type && 0 === (resource.state.loading & 3)
11085 ? !1
11086 : !0),
11087 !resource))
11088 )
11089 if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;
11090 else
11091 throw (
11092 ((suspendedThenable = noopSuspenseyCommitThenable),
11093 SuspenseyCommitException)
11094 );
11095}
11096function scheduleRetryEffect(workInProgress, retryQueue) {
11097 null !== retryQueue
11098 ? (workInProgress.flags |= 4)
11099 : workInProgress.flags & 16384 &&
11100 ((retryQueue =
11101 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),
11102 (workInProgress.lanes |= retryQueue));
11103}
11104function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
11105 if (!isHydrating)
11106 switch (renderState.tailMode) {
11107 case "hidden":
11108 hasRenderedATailFallback = renderState.tail;
11109 for (var lastTailNode = null; null !== hasRenderedATailFallback; )
11110 null !== hasRenderedATailFallback.alternate &&
11111 (lastTailNode = hasRenderedATailFallback),
11112 (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
11113 null === lastTailNode
11114 ? (renderState.tail = null)
11115 : (lastTailNode.sibling = null);
11116 break;
11117 case "collapsed":
11118 lastTailNode = renderState.tail;
11119 for (var lastTailNode$187 = null; null !== lastTailNode; )
11120 null !== lastTailNode.alternate && (lastTailNode$187 = lastTailNode),
11121 (lastTailNode = lastTailNode.sibling);
11122 null === lastTailNode$187
11123 ? hasRenderedATailFallback || null === renderState.tail
11124 ? (renderState.tail = null)
11125 : (renderState.tail.sibling = null)
11126 : (lastTailNode$187.sibling = null);
11127 }
11128}
11129function bubbleProperties(completedWork) {
11130 var didBailout =
11131 null !== completedWork.alternate &&
11132 completedWork.alternate.child === completedWork.child,
11133 newChildLanes = 0,
11134 subtreeFlags = 0;
11135 if (didBailout)
11136 for (var child$188 = completedWork.child; null !== child$188; )
11137 (newChildLanes |= child$188.lanes | child$188.childLanes),
11138 (subtreeFlags |= child$188.subtreeFlags & 31457280),
11139 (subtreeFlags |= child$188.flags & 31457280),
11140 (child$188.return = completedWork),
11141 (child$188 = child$188.sibling);
11142 else
11143 for (child$188 = completedWork.child; null !== child$188; )
11144 (newChildLanes |= child$188.lanes | child$188.childLanes),
11145 (subtreeFlags |= child$188.subtreeFlags),
11146 (subtreeFlags |= child$188.flags),
11147 (child$188.return = completedWork),
11148 (child$188 = child$188.sibling);
11149 completedWork.subtreeFlags |= subtreeFlags;
11150 completedWork.childLanes = newChildLanes;
11151 return didBailout;
11152}
11153function completeWork(current, workInProgress, renderLanes) {
11154 var newProps = workInProgress.pendingProps;
11155 popTreeContext(workInProgress);
11156 switch (workInProgress.tag) {
11157 case 16:
11158 case 15:
11159 case 0:
11160 case 11:
11161 case 7:
11162 case 8:
11163 case 12:
11164 case 9:
11165 case 14:
11166 return bubbleProperties(workInProgress), null;
11167 case 1:
11168 return bubbleProperties(workInProgress), null;
11169 case 3:
11170 renderLanes = workInProgress.stateNode;
11171 newProps = null;
11172 null !== current && (newProps = current.memoizedState.cache);
11173 workInProgress.memoizedState.cache !== newProps &&
11174 (workInProgress.flags |= 2048);
11175 popProvider(CacheContext);
11176 popHostContainer();
11177 renderLanes.pendingContext &&
11178 ((renderLanes.context = renderLanes.pendingContext),
11179 (renderLanes.pendingContext = null));
11180 if (null === current || null === current.child)
11181 popHydrationState(workInProgress)
11182 ? markUpdate(workInProgress)
11183 : null === current ||
11184 (current.memoizedState.isDehydrated &&
11185 0 === (workInProgress.flags & 256)) ||
11186 ((workInProgress.flags |= 1024),
11187 null !== hydrationErrors &&
11188 (queueRecoverableErrors(hydrationErrors),
11189 (hydrationErrors = null)));
11190 bubbleProperties(workInProgress);
11191 return null;
11192 case 26:
11193 renderLanes = workInProgress.memoizedState;
11194 if (null === current)
11195 markUpdate(workInProgress),
11196 null !== renderLanes
11197 ? (bubbleProperties(workInProgress),
11198 preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
11199 : (bubbleProperties(workInProgress),
11200 (workInProgress.flags &= -16777217));
11201 else {
11202 var currentResource = current.memoizedState;
11203 renderLanes !== currentResource && markUpdate(workInProgress);
11204 null !== renderLanes
11205 ? (bubbleProperties(workInProgress),
11206 renderLanes === currentResource
11207 ? (workInProgress.flags &= -16777217)
11208 : preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
11209 : (current.memoizedProps !== newProps && markUpdate(workInProgress),
11210 bubbleProperties(workInProgress),
11211 (workInProgress.flags &= -16777217));
11212 }
11213 return null;
11214 case 27:
11215 popHostContext(workInProgress);
11216 renderLanes = rootInstanceStackCursor.current;
11217 currentResource = workInProgress.type;
11218 if (null !== current && null != workInProgress.stateNode)
11219 current.memoizedProps !== newProps && markUpdate(workInProgress);
11220 else {
11221 if (!newProps) {
11222 if (null === workInProgress.stateNode)
11223 throw Error(formatProdErrorMessage(166));
11224 bubbleProperties(workInProgress);
11225 return null;
11226 }
11227 current = contextStackCursor.current;
11228 popHydrationState(workInProgress)
11229 ? prepareToHydrateHostInstance(workInProgress, current)
11230 : ((current = resolveSingletonInstance(
11231 currentResource,
11232 newProps,
11233 renderLanes
11234 )),
11235 (workInProgress.stateNode = current),
11236 markUpdate(workInProgress));
11237 }
11238 bubbleProperties(workInProgress);
11239 return null;
11240 case 5:
11241 popHostContext(workInProgress);
11242 renderLanes = workInProgress.type;
11243 if (null !== current && null != workInProgress.stateNode)
11244 current.memoizedProps !== newProps && markUpdate(workInProgress);
11245 else {
11246 if (!newProps) {
11247 if (null === workInProgress.stateNode)
11248 throw Error(formatProdErrorMessage(166));
11249 bubbleProperties(workInProgress);
11250 return null;
11251 }
11252 current = contextStackCursor.current;
11253 if (popHydrationState(workInProgress))
11254 prepareToHydrateHostInstance(workInProgress, current);
11255 else {
11256 currentResource = getOwnerDocumentFromRootContainer(
11257 rootInstanceStackCursor.current
11258 );
11259 switch (current) {
11260 case 1:
11261 current = currentResource.createElementNS(
11262 "http://www.w3.org/2000/svg",
11263 renderLanes
11264 );
11265 break;
11266 case 2:
11267 current = currentResource.createElementNS(
11268 "http://www.w3.org/1998/Math/MathML",
11269 renderLanes
11270 );
11271 break;
11272 default:
11273 switch (renderLanes) {
11274 case "svg":
11275 current = currentResource.createElementNS(
11276 "http://www.w3.org/2000/svg",
11277 renderLanes
11278 );
11279 break;
11280 case "math":
11281 current = currentResource.createElementNS(
11282 "http://www.w3.org/1998/Math/MathML",
11283 renderLanes
11284 );
11285 break;
11286 case "script":
11287 current = currentResource.createElement("div");
11288 current.innerHTML = "<script>\x3c/script>";
11289 current = current.removeChild(current.firstChild);
11290 break;
11291 case "select":
11292 current =
11293 "string" === typeof newProps.is
11294 ? currentResource.createElement("select", {
11295 is: newProps.is
11296 })
11297 : currentResource.createElement("select");
11298 newProps.multiple
11299 ? (current.multiple = !0)
11300 : newProps.size && (current.size = newProps.size);
11301 break;
11302 default:
11303 current =
11304 "string" === typeof newProps.is
11305 ? currentResource.createElement(renderLanes, {
11306 is: newProps.is
11307 })
11308 : currentResource.createElement(renderLanes);
11309 }
11310 }
11311 current[internalInstanceKey] = workInProgress;
11312 current[internalPropsKey] = newProps;
11313 a: for (
11314 currentResource = workInProgress.child;
11315 null !== currentResource;
11316
11317 ) {
11318 if (5 === currentResource.tag || 6 === currentResource.tag)
11319 current.appendChild(currentResource.stateNode);
11320 else if (
11321 4 !== currentResource.tag &&
11322 27 !== currentResource.tag &&
11323 null !== currentResource.child
11324 ) {
11325 currentResource.child.return = currentResource;
11326 currentResource = currentResource.child;
11327 continue;
11328 }
11329 if (currentResource === workInProgress) break a;
11330 for (; null === currentResource.sibling; ) {
11331 if (
11332 null === currentResource.return ||
11333 currentResource.return === workInProgress
11334 )
11335 break a;
11336 currentResource = currentResource.return;
11337 }
11338 currentResource.sibling.return = currentResource.return;
11339 currentResource = currentResource.sibling;
11340 }
11341 workInProgress.stateNode = current;
11342 a: switch (
11343 (setInitialProperties(current, renderLanes, newProps), renderLanes)
11344 ) {
11345 case "button":
11346 case "input":
11347 case "select":
11348 case "textarea":
11349 current = !!newProps.autoFocus;
11350 break a;
11351 case "img":
11352 current = !0;
11353 break a;
11354 default:
11355 current = !1;
11356 }
11357 current && markUpdate(workInProgress);
11358 }
11359 }
11360 bubbleProperties(workInProgress);
11361 workInProgress.flags &= -16777217;
11362 return null;
11363 case 6:
11364 if (current && null != workInProgress.stateNode)
11365 current.memoizedProps !== newProps && markUpdate(workInProgress);
11366 else {
11367 if ("string" !== typeof newProps && null === workInProgress.stateNode)
11368 throw Error(formatProdErrorMessage(166));
11369 current = rootInstanceStackCursor.current;
11370 if (popHydrationState(workInProgress)) {
11371 current = workInProgress.stateNode;
11372 renderLanes = workInProgress.memoizedProps;
11373 newProps = null;
11374 currentResource = hydrationParentFiber;
11375 if (null !== currentResource)
11376 switch (currentResource.tag) {
11377 case 27:
11378 case 5:
11379 newProps = currentResource.memoizedProps;
11380 }
11381 current[internalInstanceKey] = workInProgress;
11382 current =
11383 current.nodeValue === renderLanes ||
11384 (null !== newProps && !0 === newProps.suppressHydrationWarning) ||
11385 checkForUnmatchedText(current.nodeValue, renderLanes)
11386 ? !0
11387 : !1;
11388 current || throwOnHydrationMismatch(workInProgress);
11389 } else
11390 (current =
11391 getOwnerDocumentFromRootContainer(current).createTextNode(
11392 newProps
11393 )),
11394 (current[internalInstanceKey] = workInProgress),
11395 (workInProgress.stateNode = current);
11396 }
11397 bubbleProperties(workInProgress);
11398 return null;
11399 case 13:
11400 newProps = workInProgress.memoizedState;
11401 if (
11402 null === current ||
11403 (null !== current.memoizedState &&
11404 null !== current.memoizedState.dehydrated)
11405 ) {
11406 currentResource = popHydrationState(workInProgress);
11407 if (null !== newProps && null !== newProps.dehydrated) {
11408 if (null === current) {
11409 if (!currentResource) throw Error(formatProdErrorMessage(318));
11410 currentResource = workInProgress.memoizedState;
11411 currentResource =
11412 null !== currentResource ? currentResource.dehydrated : null;
11413 if (!currentResource) throw Error(formatProdErrorMessage(317));
11414 currentResource[internalInstanceKey] = workInProgress;
11415 } else
11416 resetHydrationState(),
11417 0 === (workInProgress.flags & 128) &&
11418 (workInProgress.memoizedState = null),
11419 (workInProgress.flags |= 4);
11420 bubbleProperties(workInProgress);
11421 currentResource = !1;
11422 } else
11423 null !== hydrationErrors &&
11424 (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)),
11425 (currentResource = !0);
11426 if (!currentResource) {
11427 if (workInProgress.flags & 256)
11428 return popSuspenseHandler(workInProgress), workInProgress;
11429 popSuspenseHandler(workInProgress);
11430 return null;
11431 }
11432 }
11433 popSuspenseHandler(workInProgress);
11434 if (0 !== (workInProgress.flags & 128))
11435 return (workInProgress.lanes = renderLanes), workInProgress;
11436 renderLanes = null !== newProps;
11437 current = null !== current && null !== current.memoizedState;
11438 if (renderLanes) {
11439 newProps = workInProgress.child;
11440 currentResource = null;
11441 null !== newProps.alternate &&
11442 null !== newProps.alternate.memoizedState &&
11443 null !== newProps.alternate.memoizedState.cachePool &&
11444 (currentResource = newProps.alternate.memoizedState.cachePool.pool);
11445 var cache$200 = null;
11446 null !== newProps.memoizedState &&
11447 null !== newProps.memoizedState.cachePool &&
11448 (cache$200 = newProps.memoizedState.cachePool.pool);
11449 cache$200 !== currentResource && (newProps.flags |= 2048);
11450 }
11451 renderLanes !== current &&
11452 renderLanes &&
11453 (workInProgress.child.flags |= 8192);
11454 scheduleRetryEffect(workInProgress, workInProgress.updateQueue);
11455 bubbleProperties(workInProgress);
11456 return null;
11457 case 4:
11458 return (
11459 popHostContainer(),
11460 null === current &&
11461 listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),
11462 bubbleProperties(workInProgress),
11463 null
11464 );
11465 case 10:
11466 return (
11467 popProvider(workInProgress.type), bubbleProperties(workInProgress), null
11468 );
11469 case 19:
11470 pop(suspenseStackCursor);
11471 currentResource = workInProgress.memoizedState;
11472 if (null === currentResource)
11473 return bubbleProperties(workInProgress), null;
11474 newProps = 0 !== (workInProgress.flags & 128);
11475 cache$200 = currentResource.rendering;
11476 if (null === cache$200)
11477 if (newProps) cutOffTailIfNeeded(currentResource, !1);
11478 else {
11479 if (
11480 0 !== workInProgressRootExitStatus ||
11481 (null !== current && 0 !== (current.flags & 128))
11482 )
11483 for (current = workInProgress.child; null !== current; ) {
11484 cache$200 = findFirstSuspended(current);
11485 if (null !== cache$200) {
11486 workInProgress.flags |= 128;
11487 cutOffTailIfNeeded(currentResource, !1);
11488 current = cache$200.updateQueue;
11489 workInProgress.updateQueue = current;
11490 scheduleRetryEffect(workInProgress, current);
11491 workInProgress.subtreeFlags = 0;
11492 current = renderLanes;
11493 for (renderLanes = workInProgress.child; null !== renderLanes; )
11494 resetWorkInProgress(renderLanes, current),
11495 (renderLanes = renderLanes.sibling);
11496 push(
11497 suspenseStackCursor,
11498 (suspenseStackCursor.current & 1) | 2
11499 );
11500 return workInProgress.child;
11501 }
11502 current = current.sibling;
11503 }
11504 null !== currentResource.tail &&
11505 now() > workInProgressRootRenderTargetTime &&
11506 ((workInProgress.flags |= 128),
11507 (newProps = !0),
11508 cutOffTailIfNeeded(currentResource, !1),
11509 (workInProgress.lanes = 4194304));
11510 }
11511 else {
11512 if (!newProps)
11513 if (((current = findFirstSuspended(cache$200)), null !== current)) {
11514 if (
11515 ((workInProgress.flags |= 128),
11516 (newProps = !0),
11517 (current = current.updateQueue),
11518 (workInProgress.updateQueue = current),
11519 scheduleRetryEffect(workInProgress, current),
11520 cutOffTailIfNeeded(currentResource, !0),
11521 null === currentResource.tail &&
11522 "hidden" === currentResource.tailMode &&
11523 !cache$200.alternate &&
11524 !isHydrating)
11525 )
11526 return bubbleProperties(workInProgress), null;
11527 } else
11528 2 * now() - currentResource.renderingStartTime >
11529 workInProgressRootRenderTargetTime &&
11530 536870912 !== renderLanes &&
11531 ((workInProgress.flags |= 128),
11532 (newProps = !0),
11533 cutOffTailIfNeeded(currentResource, !1),
11534 (workInProgress.lanes = 4194304));
11535 currentResource.isBackwards
11536 ? ((cache$200.sibling = workInProgress.child),
11537 (workInProgress.child = cache$200))
11538 : ((current = currentResource.last),
11539 null !== current
11540 ? (current.sibling = cache$200)
11541 : (workInProgress.child = cache$200),
11542 (currentResource.last = cache$200));
11543 }
11544 if (null !== currentResource.tail)
11545 return (
11546 (workInProgress = currentResource.tail),
11547 (currentResource.rendering = workInProgress),
11548 (currentResource.tail = workInProgress.sibling),
11549 (currentResource.renderingStartTime = now()),
11550 (workInProgress.sibling = null),
11551 (current = suspenseStackCursor.current),
11552 push(suspenseStackCursor, newProps ? (current & 1) | 2 : current & 1),
11553 workInProgress
11554 );
11555 bubbleProperties(workInProgress);
11556 return null;
11557 case 22:
11558 case 23:
11559 return (
11560 popSuspenseHandler(workInProgress),
11561 popHiddenContext(),
11562 (newProps = null !== workInProgress.memoizedState),
11563 null !== current
11564 ? (null !== current.memoizedState) !== newProps &&
11565 (workInProgress.flags |= 8192)
11566 : newProps && (workInProgress.flags |= 8192),
11567 newProps
11568 ? 0 !== (renderLanes & 536870912) &&
11569 0 === (workInProgress.flags & 128) &&
11570 (bubbleProperties(workInProgress),
11571 workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))
11572 : bubbleProperties(workInProgress),
11573 (renderLanes = workInProgress.updateQueue),
11574 null !== renderLanes &&
11575 scheduleRetryEffect(workInProgress, renderLanes.retryQueue),
11576 (renderLanes = null),
11577 null !== current &&
11578 null !== current.memoizedState &&
11579 null !== current.memoizedState.cachePool &&
11580 (renderLanes = current.memoizedState.cachePool.pool),
11581 (newProps = null),
11582 null !== workInProgress.memoizedState &&
11583 null !== workInProgress.memoizedState.cachePool &&
11584 (newProps = workInProgress.memoizedState.cachePool.pool),
11585 newProps !== renderLanes && (workInProgress.flags |= 2048),
11586 null !== current && pop(resumedCache),
11587 null
11588 );
11589 case 24:
11590 return (
11591 (renderLanes = null),
11592 null !== current && (renderLanes = current.memoizedState.cache),
11593 workInProgress.memoizedState.cache !== renderLanes &&
11594 (workInProgress.flags |= 2048),
11595 popProvider(CacheContext),
11596 bubbleProperties(workInProgress),
11597 null
11598 );
11599 case 25:
11600 return null;
11601 }
11602 throw Error(formatProdErrorMessage(156, workInProgress.tag));
11603}
11604function unwindWork(current, workInProgress) {
11605 popTreeContext(workInProgress);
11606 switch (workInProgress.tag) {
11607 case 1:
11608 return (
11609 (current = workInProgress.flags),
11610 current & 65536
11611 ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
11612 : null
11613 );
11614 case 3:
11615 return (
11616 popProvider(CacheContext),
11617 popHostContainer(),
11618 (current = workInProgress.flags),
11619 0 !== (current & 65536) && 0 === (current & 128)
11620 ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
11621 : null
11622 );
11623 case 26:
11624 case 27:
11625 case 5:
11626 return popHostContext(workInProgress), null;
11627 case 13:
11628 popSuspenseHandler(workInProgress);
11629 current = workInProgress.memoizedState;
11630 if (null !== current && null !== current.dehydrated) {
11631 if (null === workInProgress.alternate)
11632 throw Error(formatProdErrorMessage(340));
11633 resetHydrationState();
11634 }
11635 current = workInProgress.flags;
11636 return current & 65536
11637 ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
11638 : null;
11639 case 19:
11640 return pop(suspenseStackCursor), null;
11641 case 4:
11642 return popHostContainer(), null;
11643 case 10:
11644 return popProvider(workInProgress.type), null;
11645 case 22:
11646 case 23:
11647 return (
11648 popSuspenseHandler(workInProgress),
11649 popHiddenContext(),
11650 null !== current && pop(resumedCache),
11651 (current = workInProgress.flags),
11652 current & 65536
11653 ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
11654 : null
11655 );
11656 case 24:
11657 return popProvider(CacheContext), null;
11658 case 25:
11659 return null;
11660 default:
11661 return null;
11662 }
11663}
11664function unwindInterruptedWork(current, interruptedWork) {
11665 popTreeContext(interruptedWork);
11666 switch (interruptedWork.tag) {
11667 case 3:
11668 popProvider(CacheContext);
11669 popHostContainer();
11670 break;
11671 case 26:
11672 case 27:
11673 case 5:
11674 popHostContext(interruptedWork);
11675 break;
11676 case 4:
11677 popHostContainer();
11678 break;
11679 case 13:
11680 popSuspenseHandler(interruptedWork);
11681 break;
11682 case 19:
11683 pop(suspenseStackCursor);
11684 break;
11685 case 10:
11686 popProvider(interruptedWork.type);
11687 break;
11688 case 22:
11689 case 23:
11690 popSuspenseHandler(interruptedWork);
11691 popHiddenContext();
11692 null !== current && pop(resumedCache);
11693 break;
11694 case 24:
11695 popProvider(CacheContext);
11696 }
11697}
11698var DefaultAsyncDispatcher = {
11699 getCacheForType: function (resourceType) {
11700 var cache = readContext(CacheContext),
11701 cacheForType = cache.data.get(resourceType);
11702 void 0 === cacheForType &&
11703 ((cacheForType = resourceType()),
11704 cache.data.set(resourceType, cacheForType));
11705 return cacheForType;
11706 }
11707 },
11708 PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
11709 executionContext = 0,
11710 workInProgressRoot = null,
11711 workInProgress = null,
11712 workInProgressRootRenderLanes = 0,
11713 workInProgressSuspendedReason = 0,
11714 workInProgressThrownValue = null,
11715 workInProgressRootDidAttachPingListener = !1,
11716 entangledRenderLanes = 0,
11717 workInProgressRootExitStatus = 0,
11718 workInProgressRootSkippedLanes = 0,
11719 workInProgressRootInterleavedUpdatedLanes = 0,
11720 workInProgressRootPingedLanes = 0,
11721 workInProgressDeferredLane = 0,
11722 workInProgressRootConcurrentErrors = null,
11723 workInProgressRootRecoverableErrors = null,
11724 workInProgressRootDidIncludeRecursiveRenderUpdate = !1,
11725 didIncludeCommitPhaseUpdate = !1,
11726 globalMostRecentFallbackTime = 0,
11727 workInProgressRootRenderTargetTime = Infinity,
11728 workInProgressTransitions = null,
11729 legacyErrorBoundariesThatAlreadyFailed = null,
11730 rootDoesHavePassiveEffects = !1,
11731 rootWithPendingPassiveEffects = null,
11732 pendingPassiveEffectsLanes = 0,
11733 pendingPassiveEffectsRemainingLanes = 0,
11734 pendingPassiveTransitions = null,
11735 nestedUpdateCount = 0,
11736 rootWithNestedUpdates = null;
11737function requestUpdateLane() {
11738 if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes)
11739 return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
11740 if (null !== requestCurrentTransition()) {
11741 var actionScopeLane = currentEntangledLane;
11742 return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane();
11743 }
11744 return resolveUpdatePriority();
11745}
11746function requestDeferredLane() {
11747 0 === workInProgressDeferredLane &&
11748 (workInProgressDeferredLane =
11749 0 === (workInProgressRootRenderLanes & 536870912) || isHydrating
11750 ? claimNextTransitionLane()
11751 : 536870912);
11752 var suspenseHandler = suspenseHandlerStackCursor.current;
11753 null !== suspenseHandler && (suspenseHandler.flags |= 32);
11754 return workInProgressDeferredLane;
11755}
11756function scheduleUpdateOnFiber(root, fiber, lane) {
11757 if (
11758 (root === workInProgressRoot && 2 === workInProgressSuspendedReason) ||
11759 null !== root.cancelPendingCommit
11760 )
11761 prepareFreshStack(root, 0),
11762 markRootSuspended(
11763 root,
11764 workInProgressRootRenderLanes,
11765 workInProgressDeferredLane
11766 );
11767 markRootUpdated(root, lane);
11768 if (0 === (executionContext & 2) || root !== workInProgressRoot)
11769 root === workInProgressRoot &&
11770 (0 === (executionContext & 2) &&
11771 (workInProgressRootInterleavedUpdatedLanes |= lane),
11772 4 === workInProgressRootExitStatus &&
11773 markRootSuspended(
11774 root,
11775 workInProgressRootRenderLanes,
11776 workInProgressDeferredLane
11777 )),
11778 ensureRootIsScheduled(root);
11779}
11780function performConcurrentWorkOnRoot(root, didTimeout) {
11781 if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
11782 var originalCallbackNode = root.callbackNode;
11783 if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
11784 return null;
11785 var lanes = getNextLanes(
11786 root,
11787 root === workInProgressRoot ? workInProgressRootRenderLanes : 0
11788 );
11789 if (0 === lanes) return null;
11790 var shouldTimeSlice =
11791 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout;
11792 didTimeout = shouldTimeSlice
11793 ? renderRootConcurrent(root, lanes)
11794 : renderRootSync(root, lanes);
11795 if (0 !== didTimeout) {
11796 var renderWasConcurrent = shouldTimeSlice;
11797 do {
11798 if (6 === didTimeout) markRootSuspended(root, lanes, 0);
11799 else {
11800 shouldTimeSlice = root.current.alternate;
11801 if (
11802 renderWasConcurrent &&
11803 !isRenderConsistentWithExternalStores(shouldTimeSlice)
11804 ) {
11805 didTimeout = renderRootSync(root, lanes);
11806 renderWasConcurrent = !1;
11807 continue;
11808 }
11809 if (2 === didTimeout) {
11810 renderWasConcurrent = lanes;
11811 var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
11812 root,
11813 renderWasConcurrent
11814 );
11815 if (
11816 0 !== errorRetryLanes &&
11817 ((lanes = errorRetryLanes),
11818 (didTimeout = recoverFromConcurrentError(
11819 root,
11820 renderWasConcurrent,
11821 errorRetryLanes
11822 )),
11823 (renderWasConcurrent = !1),
11824 2 !== didTimeout)
11825 )
11826 continue;
11827 }
11828 if (1 === didTimeout) {
11829 prepareFreshStack(root, 0);
11830 markRootSuspended(root, lanes, 0);
11831 break;
11832 }
11833 root.finishedWork = shouldTimeSlice;
11834 root.finishedLanes = lanes;
11835 a: {
11836 renderWasConcurrent = root;
11837 switch (didTimeout) {
11838 case 0:
11839 case 1:
11840 throw Error(formatProdErrorMessage(345));
11841 case 4:
11842 if ((lanes & 4194176) === lanes) {
11843 markRootSuspended(
11844 renderWasConcurrent,
11845 lanes,
11846 workInProgressDeferredLane
11847 );
11848 break a;
11849 }
11850 break;
11851 case 2:
11852 workInProgressRootRecoverableErrors = null;
11853 break;
11854 case 3:
11855 case 5:
11856 break;
11857 default:
11858 throw Error(formatProdErrorMessage(329));
11859 }
11860 if (
11861 (lanes & 62914560) === lanes &&
11862 ((didTimeout = globalMostRecentFallbackTime + 300 - now()),
11863 10 < didTimeout)
11864 ) {
11865 markRootSuspended(
11866 renderWasConcurrent,
11867 lanes,
11868 workInProgressDeferredLane
11869 );
11870 if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
11871 renderWasConcurrent.timeoutHandle = scheduleTimeout(
11872 commitRootWhenReady.bind(
11873 null,
11874 renderWasConcurrent,
11875 shouldTimeSlice,
11876 workInProgressRootRecoverableErrors,
11877 workInProgressTransitions,
11878 workInProgressRootDidIncludeRecursiveRenderUpdate,
11879 lanes,
11880 workInProgressDeferredLane
11881 ),
11882 didTimeout
11883 );
11884 break a;
11885 }
11886 commitRootWhenReady(
11887 renderWasConcurrent,
11888 shouldTimeSlice,
11889 workInProgressRootRecoverableErrors,
11890 workInProgressTransitions,
11891 workInProgressRootDidIncludeRecursiveRenderUpdate,
11892 lanes,
11893 workInProgressDeferredLane
11894 );
11895 }
11896 }
11897 break;
11898 } while (1);
11899 }
11900 ensureRootIsScheduled(root);
11901 scheduleTaskForRootDuringMicrotask(root, now());
11902 root =
11903 root.callbackNode === originalCallbackNode
11904 ? performConcurrentWorkOnRoot.bind(null, root)
11905 : null;
11906 return root;
11907}
11908function recoverFromConcurrentError(
11909 root,
11910 originallyAttemptedLanes,
11911 errorRetryLanes
11912) {
11913 var errorsFromFirstAttempt = workInProgressRootConcurrentErrors,
11914 wasRootDehydrated = root.current.memoizedState.isDehydrated;
11915 wasRootDehydrated && (prepareFreshStack(root, errorRetryLanes).flags |= 256);
11916 errorRetryLanes = renderRootSync(root, errorRetryLanes);
11917 if (2 !== errorRetryLanes) {
11918 if (workInProgressRootDidAttachPingListener && !wasRootDehydrated)
11919 return (
11920 (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes),
11921 (workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes),
11922 4
11923 );
11924 root = workInProgressRootRecoverableErrors;
11925 workInProgressRootRecoverableErrors = errorsFromFirstAttempt;
11926 null !== root && queueRecoverableErrors(root);
11927 }
11928 return errorRetryLanes;
11929}
11930function queueRecoverableErrors(errors) {
11931 null === workInProgressRootRecoverableErrors
11932 ? (workInProgressRootRecoverableErrors = errors)
11933 : workInProgressRootRecoverableErrors.push.apply(
11934 workInProgressRootRecoverableErrors,
11935 errors
11936 );
11937}
11938function commitRootWhenReady(
11939 root,
11940 finishedWork,
11941 recoverableErrors,
11942 transitions,
11943 didIncludeRenderPhaseUpdate,
11944 lanes,
11945 spawnedLane
11946) {
11947 if (
11948 0 === (lanes & 42) &&
11949 ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }),
11950 accumulateSuspenseyCommitOnFiber(finishedWork),
11951 (finishedWork = waitForCommitToBeReady()),
11952 null !== finishedWork)
11953 ) {
11954 root.cancelPendingCommit = finishedWork(
11955 commitRoot.bind(
11956 null,
11957 root,
11958 recoverableErrors,
11959 transitions,
11960 didIncludeRenderPhaseUpdate
11961 )
11962 );
11963 markRootSuspended(root, lanes, spawnedLane);
11964 return;
11965 }
11966 commitRoot(
11967 root,
11968 recoverableErrors,
11969 transitions,
11970 didIncludeRenderPhaseUpdate,
11971 spawnedLane
11972 );
11973}
11974function isRenderConsistentWithExternalStores(finishedWork) {
11975 for (var node = finishedWork; ; ) {
11976 if (node.flags & 16384) {
11977 var updateQueue = node.updateQueue;
11978 if (
11979 null !== updateQueue &&
11980 ((updateQueue = updateQueue.stores), null !== updateQueue)
11981 )
11982 for (var i = 0; i < updateQueue.length; i++) {
11983 var check = updateQueue[i],
11984 getSnapshot = check.getSnapshot;
11985 check = check.value;
11986 try {
11987 if (!objectIs(getSnapshot(), check)) return !1;
11988 } catch (error) {
11989 return !1;
11990 }
11991 }
11992 }
11993 updateQueue = node.child;
11994 if (node.subtreeFlags & 16384 && null !== updateQueue)
11995 (updateQueue.return = node), (node = updateQueue);
11996 else {
11997 if (node === finishedWork) break;
11998 for (; null === node.sibling; ) {
11999 if (null === node.return || node.return === finishedWork) return !0;
12000 node = node.return;
12001 }
12002 node.sibling.return = node.return;
12003 node = node.sibling;
12004 }
12005 }
12006 return !0;
12007}
12008function markRootUpdated(root, updatedLanes) {
12009 root.pendingLanes |= updatedLanes;
12010 268435456 !== updatedLanes &&
12011 ((root.suspendedLanes = 0), (root.pingedLanes = 0));
12012 executionContext & 2
12013 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0)
12014 : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0);
12015 throwIfInfiniteUpdateLoopDetected();
12016}
12017function markRootSuspended(root, suspendedLanes, spawnedLane) {
12018 suspendedLanes &= ~workInProgressRootPingedLanes;
12019 suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
12020 root.suspendedLanes |= suspendedLanes;
12021 root.pingedLanes &= ~suspendedLanes;
12022 for (
12023 var expirationTimes = root.expirationTimes, lanes = suspendedLanes;
12024 0 < lanes;
12025
12026 ) {
12027 var index$3 = 31 - clz32(lanes),
12028 lane = 1 << index$3;
12029 expirationTimes[index$3] = -1;
12030 lanes &= ~lane;
12031 }
12032 0 !== spawnedLane &&
12033 markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
12034}
12035function performSyncWorkOnRoot(root, lanes) {
12036 if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
12037 if (flushPassiveEffects()) return ensureRootIsScheduled(root), null;
12038 var exitStatus = renderRootSync(root, lanes);
12039 if (2 === exitStatus) {
12040 var originallyAttemptedLanes = lanes,
12041 errorRetryLanes = getLanesToRetrySynchronouslyOnError(
12042 root,
12043 originallyAttemptedLanes
12044 );
12045 0 !== errorRetryLanes &&
12046 ((lanes = errorRetryLanes),
12047 (exitStatus = recoverFromConcurrentError(
12048 root,
12049 originallyAttemptedLanes,
12050 errorRetryLanes
12051 )));
12052 }
12053 if (1 === exitStatus)
12054 return (
12055 prepareFreshStack(root, 0),
12056 markRootSuspended(root, lanes, 0),
12057 ensureRootIsScheduled(root),
12058 null
12059 );
12060 if (6 === exitStatus)
12061 return (
12062 markRootSuspended(root, lanes, workInProgressDeferredLane),
12063 ensureRootIsScheduled(root),
12064 null
12065 );
12066 root.finishedWork = root.current.alternate;
12067 root.finishedLanes = lanes;
12068 commitRoot(
12069 root,
12070 workInProgressRootRecoverableErrors,
12071 workInProgressTransitions,
12072 workInProgressRootDidIncludeRecursiveRenderUpdate,
12073 workInProgressDeferredLane
12074 );
12075 ensureRootIsScheduled(root);
12076 return null;
12077}
12078function flushSyncWork$1() {
12079 return 0 === (executionContext & 6)
12080 ? (flushSyncWorkAcrossRoots_impl(!1), !1)
12081 : !0;
12082}
12083function resetWorkInProgressStack() {
12084 if (null !== workInProgress) {
12085 if (0 === workInProgressSuspendedReason)
12086 var interruptedWork = workInProgress.return;
12087 else
12088 (interruptedWork = workInProgress),
12089 resetContextDependencies(),
12090 resetHooksOnUnwind(interruptedWork),
12091 (thenableState$1 = null),
12092 (thenableIndexCounter$1 = 0),
12093 (interruptedWork = workInProgress);
12094 for (; null !== interruptedWork; )
12095 unwindInterruptedWork(interruptedWork.alternate, interruptedWork),
12096 (interruptedWork = interruptedWork.return);
12097 workInProgress = null;
12098 }
12099}
12100function prepareFreshStack(root, lanes) {
12101 root.finishedWork = null;
12102 root.finishedLanes = 0;
12103 var timeoutHandle = root.timeoutHandle;
12104 -1 !== timeoutHandle &&
12105 ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
12106 timeoutHandle = root.cancelPendingCommit;
12107 null !== timeoutHandle &&
12108 ((root.cancelPendingCommit = null), timeoutHandle());
12109 resetWorkInProgressStack();
12110 workInProgressRoot = root;
12111 workInProgress = timeoutHandle = createWorkInProgress(root.current, null);
12112 workInProgressRootRenderLanes = lanes;
12113 workInProgressSuspendedReason = 0;
12114 workInProgressThrownValue = null;
12115 workInProgressRootDidAttachPingListener = !1;
12116 workInProgressDeferredLane =
12117 workInProgressRootPingedLanes =
12118 workInProgressRootInterleavedUpdatedLanes =
12119 workInProgressRootSkippedLanes =
12120 workInProgressRootExitStatus =
12121 0;
12122 workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =
12123 null;
12124 workInProgressRootDidIncludeRecursiveRenderUpdate = !1;
12125 0 !== (lanes & 8) && (lanes |= lanes & 32);
12126 var allEntangledLanes = root.entangledLanes;
12127 if (0 !== allEntangledLanes)
12128 for (
12129 root = root.entanglements, allEntangledLanes &= lanes;
12130 0 < allEntangledLanes;
12131
12132 ) {
12133 var index$1 = 31 - clz32(allEntangledLanes),
12134 lane = 1 << index$1;
12135 lanes |= root[index$1];
12136 allEntangledLanes &= ~lane;
12137 }
12138 entangledRenderLanes = lanes;
12139 finishQueueingConcurrentUpdates();
12140 return timeoutHandle;
12141}
12142function handleThrow(root, thrownValue) {
12143 currentlyRenderingFiber$1 = null;
12144 ReactSharedInternals.H = ContextOnlyDispatcher;
12145 thrownValue === SuspenseException
12146 ? ((thrownValue = getSuspendedThenable()),
12147 (workInProgressSuspendedReason =
12148 shouldRemainOnPreviousScreen() &&
12149 0 === (workInProgressRootSkippedLanes & 134217727) &&
12150 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)
12151 ? 2
12152 : 3))
12153 : thrownValue === SuspenseyCommitException
12154 ? ((thrownValue = getSuspendedThenable()),
12155 (workInProgressSuspendedReason = 4))
12156 : (workInProgressSuspendedReason =
12157 thrownValue === SelectiveHydrationException
12158 ? 8
12159 : null !== thrownValue &&
12160 "object" === typeof thrownValue &&
12161 "function" === typeof thrownValue.then
12162 ? 6
12163 : 1);
12164 workInProgressThrownValue = thrownValue;
12165 null === workInProgress &&
12166 ((workInProgressRootExitStatus = 1),
12167 logUncaughtError(
12168 root,
12169 createCapturedValueAtFiber(thrownValue, root.current)
12170 ));
12171}
12172function shouldRemainOnPreviousScreen() {
12173 var handler = suspenseHandlerStackCursor.current;
12174 return null === handler
12175 ? !0
12176 : (workInProgressRootRenderLanes & 4194176) ===
12177 workInProgressRootRenderLanes
12178 ? null === shellBoundary
12179 ? !0
12180 : !1
12181 : (workInProgressRootRenderLanes & 62914560) ===
12182 workInProgressRootRenderLanes ||
12183 0 !== (workInProgressRootRenderLanes & 536870912)
12184 ? handler === shellBoundary
12185 : !1;
12186}
12187function pushDispatcher() {
12188 var prevDispatcher = ReactSharedInternals.H;
12189 ReactSharedInternals.H = ContextOnlyDispatcher;
12190 return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
12191}
12192function pushAsyncDispatcher() {
12193 var prevAsyncDispatcher = ReactSharedInternals.A;
12194 ReactSharedInternals.A = DefaultAsyncDispatcher;
12195 return prevAsyncDispatcher;
12196}
12197function renderDidSuspendDelayIfPossible() {
12198 workInProgressRootExitStatus = 4;
12199 (0 === (workInProgressRootSkippedLanes & 134217727) &&
12200 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||
12201 null === workInProgressRoot ||
12202 markRootSuspended(
12203 workInProgressRoot,
12204 workInProgressRootRenderLanes,
12205 workInProgressDeferredLane
12206 );
12207}
12208function renderRootSync(root, lanes) {
12209 var prevExecutionContext = executionContext;
12210 executionContext |= 2;
12211 var prevDispatcher = pushDispatcher(),
12212 prevAsyncDispatcher = pushAsyncDispatcher();
12213 if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)
12214 (workInProgressTransitions = null), prepareFreshStack(root, lanes);
12215 lanes = !1;
12216 a: do
12217 try {
12218 if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
12219 var unitOfWork = workInProgress,
12220 thrownValue = workInProgressThrownValue;
12221 switch (workInProgressSuspendedReason) {
12222 case 8:
12223 resetWorkInProgressStack();
12224 workInProgressRootExitStatus = 6;
12225 break a;
12226 case 3:
12227 case 2:
12228 lanes ||
12229 null !== suspenseHandlerStackCursor.current ||
12230 (lanes = !0);
12231 default:
12232 (workInProgressSuspendedReason = 0),
12233 (workInProgressThrownValue = null),
12234 throwAndUnwindWorkLoop(root, unitOfWork, thrownValue);
12235 }
12236 }
12237 workLoopSync();
12238 break;
12239 } catch (thrownValue$215) {
12240 handleThrow(root, thrownValue$215);
12241 }
12242 while (1);
12243 lanes && root.shellSuspendCounter++;
12244 resetContextDependencies();
12245 executionContext = prevExecutionContext;
12246 ReactSharedInternals.H = prevDispatcher;
12247 ReactSharedInternals.A = prevAsyncDispatcher;
12248 if (null !== workInProgress) throw Error(formatProdErrorMessage(261));
12249 workInProgressRoot = null;
12250 workInProgressRootRenderLanes = 0;
12251 finishQueueingConcurrentUpdates();
12252 return workInProgressRootExitStatus;
12253}
12254function workLoopSync() {
12255 for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
12256}
12257function renderRootConcurrent(root, lanes) {
12258 var prevExecutionContext = executionContext;
12259 executionContext |= 2;
12260 var prevDispatcher = pushDispatcher(),
12261 prevAsyncDispatcher = pushAsyncDispatcher();
12262 if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)
12263 (workInProgressTransitions = null),
12264 (workInProgressRootRenderTargetTime = now() + 500),
12265 prepareFreshStack(root, lanes);
12266 a: do
12267 try {
12268 if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
12269 lanes = workInProgress;
12270 var thrownValue = workInProgressThrownValue;
12271 b: switch (workInProgressSuspendedReason) {
12272 case 1:
12273 workInProgressSuspendedReason = 0;
12274 workInProgressThrownValue = null;
12275 throwAndUnwindWorkLoop(root, lanes, thrownValue);
12276 break;
12277 case 2:
12278 if (isThenableResolved(thrownValue)) {
12279 workInProgressSuspendedReason = 0;
12280 workInProgressThrownValue = null;
12281 replaySuspendedUnitOfWork(lanes);
12282 break;
12283 }
12284 lanes = function () {
12285 2 === workInProgressSuspendedReason &&
12286 workInProgressRoot === root &&
12287 (workInProgressSuspendedReason = 7);
12288 ensureRootIsScheduled(root);
12289 };
12290 thrownValue.then(lanes, lanes);
12291 break a;
12292 case 3:
12293 workInProgressSuspendedReason = 7;
12294 break a;
12295 case 4:
12296 workInProgressSuspendedReason = 5;
12297 break a;
12298 case 7:
12299 isThenableResolved(thrownValue)
12300 ? ((workInProgressSuspendedReason = 0),
12301 (workInProgressThrownValue = null),
12302 replaySuspendedUnitOfWork(lanes))
12303 : ((workInProgressSuspendedReason = 0),
12304 (workInProgressThrownValue = null),
12305 throwAndUnwindWorkLoop(root, lanes, thrownValue));
12306 break;
12307 case 5:
12308 switch (workInProgress.tag) {
12309 case 5:
12310 case 26:
12311 case 27:
12312 lanes = workInProgress;
12313 workInProgressSuspendedReason = 0;
12314 workInProgressThrownValue = null;
12315 var sibling = lanes.sibling;
12316 if (null !== sibling) workInProgress = sibling;
12317 else {
12318 var returnFiber = lanes.return;
12319 null !== returnFiber
12320 ? ((workInProgress = returnFiber),
12321 completeUnitOfWork(returnFiber))
12322 : (workInProgress = null);
12323 }
12324 break b;
12325 }
12326 workInProgressSuspendedReason = 0;
12327 workInProgressThrownValue = null;
12328 throwAndUnwindWorkLoop(root, lanes, thrownValue);
12329 break;
12330 case 6:
12331 workInProgressSuspendedReason = 0;
12332 workInProgressThrownValue = null;
12333 throwAndUnwindWorkLoop(root, lanes, thrownValue);
12334 break;
12335 case 8:
12336 resetWorkInProgressStack();
12337 workInProgressRootExitStatus = 6;
12338 break a;
12339 default:
12340 throw Error(formatProdErrorMessage(462));
12341 }
12342 }
12343 workLoopConcurrent();
12344 break;
12345 } catch (thrownValue$217) {
12346 handleThrow(root, thrownValue$217);
12347 }
12348 while (1);
12349 resetContextDependencies();
12350 ReactSharedInternals.H = prevDispatcher;
12351 ReactSharedInternals.A = prevAsyncDispatcher;
12352 executionContext = prevExecutionContext;
12353 if (null !== workInProgress) return 0;
12354 workInProgressRoot = null;
12355 workInProgressRootRenderLanes = 0;
12356 finishQueueingConcurrentUpdates();
12357 return workInProgressRootExitStatus;
12358}
12359function workLoopConcurrent() {
12360 for (; null !== workInProgress && !shouldYield(); )
12361 performUnitOfWork(workInProgress);
12362}
12363function performUnitOfWork(unitOfWork) {
12364 var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);
12365 unitOfWork.memoizedProps = unitOfWork.pendingProps;
12366 null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
12367}
12368function replaySuspendedUnitOfWork(unitOfWork) {
12369 var current = unitOfWork.alternate;
12370 switch (unitOfWork.tag) {
12371 case 15:
12372 case 0:
12373 current = replayFunctionComponent(
12374 current,
12375 unitOfWork,
12376 unitOfWork.pendingProps,
12377 unitOfWork.type,
12378 void 0,
12379 workInProgressRootRenderLanes
12380 );
12381 break;
12382 case 11:
12383 current = replayFunctionComponent(
12384 current,
12385 unitOfWork,
12386 unitOfWork.pendingProps,
12387 unitOfWork.type.render,
12388 unitOfWork.ref,
12389 workInProgressRootRenderLanes
12390 );
12391 break;
12392 case 5:
12393 resetHooksOnUnwind(unitOfWork);
12394 default:
12395 unwindInterruptedWork(current, unitOfWork),
12396 (unitOfWork = workInProgress =
12397 resetWorkInProgress(unitOfWork, entangledRenderLanes)),
12398 (current = beginWork(current, unitOfWork, entangledRenderLanes));
12399 }
12400 unitOfWork.memoizedProps = unitOfWork.pendingProps;
12401 null === current
12402 ? completeUnitOfWork(unitOfWork)
12403 : (workInProgress = current);
12404}
12405function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {
12406 resetContextDependencies();
12407 resetHooksOnUnwind(unitOfWork);
12408 thenableState$1 = null;
12409 thenableIndexCounter$1 = 0;
12410 var returnFiber = unitOfWork.return;
12411 try {
12412 if (
12413 throwException(
12414 root,
12415 returnFiber,
12416 unitOfWork,
12417 thrownValue,
12418 workInProgressRootRenderLanes
12419 )
12420 ) {
12421 workInProgressRootExitStatus = 1;
12422 logUncaughtError(
12423 root,
12424 createCapturedValueAtFiber(thrownValue, root.current)
12425 );
12426 workInProgress = null;
12427 return;
12428 }
12429 } catch (error) {
12430 if (null !== returnFiber) throw ((workInProgress = returnFiber), error);
12431 workInProgressRootExitStatus = 1;
12432 logUncaughtError(
12433 root,
12434 createCapturedValueAtFiber(thrownValue, root.current)
12435 );
12436 workInProgress = null;
12437 return;
12438 }
12439 if (unitOfWork.flags & 32768)
12440 a: {
12441 root = unitOfWork;
12442 do {
12443 unitOfWork = unwindWork(root.alternate, root);
12444 if (null !== unitOfWork) {
12445 unitOfWork.flags &= 32767;
12446 workInProgress = unitOfWork;
12447 break a;
12448 }
12449 root = root.return;
12450 null !== root &&
12451 ((root.flags |= 32768),
12452 (root.subtreeFlags = 0),
12453 (root.deletions = null));
12454 workInProgress = root;
12455 } while (null !== root);
12456 workInProgressRootExitStatus = 6;
12457 workInProgress = null;
12458 }
12459 else completeUnitOfWork(unitOfWork);
12460}
12461function completeUnitOfWork(unitOfWork) {
12462 var completedWork = unitOfWork;
12463 do {
12464 unitOfWork = completedWork.return;
12465 var next = completeWork(
12466 completedWork.alternate,
12467 completedWork,
12468 entangledRenderLanes
12469 );
12470 if (null !== next) {
12471 workInProgress = next;
12472 return;
12473 }
12474 completedWork = completedWork.sibling;
12475 if (null !== completedWork) {
12476 workInProgress = completedWork;
12477 return;
12478 }
12479 workInProgress = completedWork = unitOfWork;
12480 } while (null !== completedWork);
12481 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
12482}
12483function commitRoot(
12484 root,
12485 recoverableErrors,
12486 transitions,
12487 didIncludeRenderPhaseUpdate,
12488 spawnedLane
12489) {
12490 var prevTransition = ReactSharedInternals.T,
12491 previousUpdateLanePriority = ReactDOMSharedInternals.p;
12492 try {
12493 (ReactDOMSharedInternals.p = 2),
12494 (ReactSharedInternals.T = null),
12495 commitRootImpl(
12496 root,
12497 recoverableErrors,
12498 transitions,
12499 didIncludeRenderPhaseUpdate,
12500 previousUpdateLanePriority,
12501 spawnedLane
12502 );
12503 } finally {
12504 (ReactSharedInternals.T = prevTransition),
12505 (ReactDOMSharedInternals.p = previousUpdateLanePriority);
12506 }
12507 return null;
12508}
12509function commitRootImpl(
12510 root,
12511 recoverableErrors,
12512 transitions,
12513 didIncludeRenderPhaseUpdate,
12514 renderPriorityLevel,
12515 spawnedLane
12516) {
12517 do flushPassiveEffects();
12518 while (null !== rootWithPendingPassiveEffects);
12519 if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
12520 var finishedWork = root.finishedWork,
12521 lanes = root.finishedLanes;
12522 if (null === finishedWork) return null;
12523 root.finishedWork = null;
12524 root.finishedLanes = 0;
12525 if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
12526 root.callbackNode = null;
12527 root.callbackPriority = 0;
12528 root.cancelPendingCommit = null;
12529 var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
12530 remainingLanes |= concurrentlyUpdatedLanes;
12531 markRootFinished(root, remainingLanes, spawnedLane);
12532 didIncludeCommitPhaseUpdate = !1;
12533 root === workInProgressRoot &&
12534 ((workInProgress = workInProgressRoot = null),
12535 (workInProgressRootRenderLanes = 0));
12536 (0 === (finishedWork.subtreeFlags & 10256) &&
12537 0 === (finishedWork.flags & 10256)) ||
12538 rootDoesHavePassiveEffects ||
12539 ((rootDoesHavePassiveEffects = !0),
12540 (pendingPassiveEffectsRemainingLanes = remainingLanes),
12541 (pendingPassiveTransitions = transitions),
12542 scheduleCallback(NormalPriority$1, function () {
12543 flushPassiveEffects();
12544 return null;
12545 }));
12546 transitions = 0 !== (finishedWork.flags & 15990);
12547 if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) {
12548 transitions = ReactSharedInternals.T;
12549 ReactSharedInternals.T = null;
12550 spawnedLane = ReactDOMSharedInternals.p;
12551 ReactDOMSharedInternals.p = 2;
12552 var prevExecutionContext = executionContext;
12553 executionContext |= 4;
12554 commitBeforeMutationEffects(root, finishedWork);
12555 commitMutationEffectsOnFiber(finishedWork, root);
12556 restoreSelection(selectionInformation);
12557 _enabled = !!eventsEnabled;
12558 selectionInformation = eventsEnabled = null;
12559 root.current = finishedWork;
12560 commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
12561 requestPaint();
12562 executionContext = prevExecutionContext;
12563 ReactDOMSharedInternals.p = spawnedLane;
12564 ReactSharedInternals.T = transitions;
12565 } else root.current = finishedWork;
12566 rootDoesHavePassiveEffects
12567 ? ((rootDoesHavePassiveEffects = !1),
12568 (rootWithPendingPassiveEffects = root),
12569 (pendingPassiveEffectsLanes = lanes))
12570 : releaseRootPooledCache(root, remainingLanes);
12571 remainingLanes = root.pendingLanes;
12572 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
12573 onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
12574 ensureRootIsScheduled(root);
12575 if (null !== recoverableErrors)
12576 for (
12577 renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
12578 finishedWork < recoverableErrors.length;
12579 finishedWork++
12580 )
12581 (remainingLanes = recoverableErrors[finishedWork]),
12582 renderPriorityLevel(remainingLanes.value, {
12583 componentStack: remainingLanes.stack
12584 });
12585 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects();
12586 remainingLanes = root.pendingLanes;
12587 didIncludeRenderPhaseUpdate ||
12588 didIncludeCommitPhaseUpdate ||
12589 (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42))
12590 ? root === rootWithNestedUpdates
12591 ? nestedUpdateCount++
12592 : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
12593 : (nestedUpdateCount = 0);
12594 flushSyncWorkAcrossRoots_impl(!1);
12595 return null;
12596}
12597function releaseRootPooledCache(root, remainingLanes) {
12598 0 === (root.pooledCacheLanes &= remainingLanes) &&
12599 ((remainingLanes = root.pooledCache),
12600 null != remainingLanes &&
12601 ((root.pooledCache = null), releaseCache(remainingLanes)));
12602}
12603function flushPassiveEffects() {
12604 if (null !== rootWithPendingPassiveEffects) {
12605 var root$221 = rootWithPendingPassiveEffects,
12606 remainingLanes = pendingPassiveEffectsRemainingLanes;
12607 pendingPassiveEffectsRemainingLanes = 0;
12608 var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
12609 prevTransition = ReactSharedInternals.T,
12610 previousPriority = ReactDOMSharedInternals.p;
12611 try {
12612 ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
12613 ReactSharedInternals.T = null;
12614 if (null === rootWithPendingPassiveEffects)
12615 var JSCompiler_inline_result = !1;
12616 else {
12617 renderPriority = pendingPassiveTransitions;
12618 pendingPassiveTransitions = null;
12619 var root = rootWithPendingPassiveEffects,
12620 lanes = pendingPassiveEffectsLanes;
12621 rootWithPendingPassiveEffects = null;
12622 pendingPassiveEffectsLanes = 0;
12623 if (0 !== (executionContext & 6))
12624 throw Error(formatProdErrorMessage(331));
12625 var prevExecutionContext = executionContext;
12626 executionContext |= 4;
12627 commitPassiveUnmountOnFiber(root.current);
12628 commitPassiveMountOnFiber(root, root.current, lanes, renderPriority);
12629 executionContext = prevExecutionContext;
12630 flushSyncWorkAcrossRoots_impl(!1);
12631 if (
12632 injectedHook &&
12633 "function" === typeof injectedHook.onPostCommitFiberRoot
12634 )
12635 try {
12636 injectedHook.onPostCommitFiberRoot(rendererID, root);
12637 } catch (err) {}
12638 JSCompiler_inline_result = !0;
12639 }
12640 return JSCompiler_inline_result;
12641 } finally {
12642 (ReactDOMSharedInternals.p = previousPriority),
12643 (ReactSharedInternals.T = prevTransition),
12644 releaseRootPooledCache(root$221, remainingLanes);
12645 }
12646 }
12647 return !1;
12648}
12649function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
12650 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
12651 sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
12652 rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
12653 null !== rootFiber &&
12654 (markRootUpdated(rootFiber, 2), ensureRootIsScheduled(rootFiber));
12655}
12656function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
12657 if (3 === sourceFiber.tag)
12658 captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
12659 else
12660 for (; null !== nearestMountedAncestor; ) {
12661 if (3 === nearestMountedAncestor.tag) {
12662 captureCommitPhaseErrorOnRoot(
12663 nearestMountedAncestor,
12664 sourceFiber,
12665 error
12666 );
12667 break;
12668 } else if (1 === nearestMountedAncestor.tag) {
12669 var instance = nearestMountedAncestor.stateNode;
12670 if (
12671 "function" ===
12672 typeof nearestMountedAncestor.type.getDerivedStateFromError ||
12673 ("function" === typeof instance.componentDidCatch &&
12674 (null === legacyErrorBoundariesThatAlreadyFailed ||
12675 !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
12676 ) {
12677 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
12678 error = createClassErrorUpdate(2);
12679 instance = enqueueUpdate(nearestMountedAncestor, error, 2);
12680 null !== instance &&
12681 (initializeClassErrorUpdate(
12682 error,
12683 instance,
12684 nearestMountedAncestor,
12685 sourceFiber
12686 ),
12687 markRootUpdated(instance, 2),
12688 ensureRootIsScheduled(instance));
12689 break;
12690 }
12691 }
12692 nearestMountedAncestor = nearestMountedAncestor.return;
12693 }
12694}
12695function attachPingListener(root, wakeable, lanes) {
12696 var pingCache = root.pingCache;
12697 if (null === pingCache) {
12698 pingCache = root.pingCache = new PossiblyWeakMap();
12699 var threadIDs = new Set();
12700 pingCache.set(wakeable, threadIDs);
12701 } else
12702 (threadIDs = pingCache.get(wakeable)),
12703 void 0 === threadIDs &&
12704 ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));
12705 threadIDs.has(lanes) ||
12706 ((workInProgressRootDidAttachPingListener = !0),
12707 threadIDs.add(lanes),
12708 (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)),
12709 wakeable.then(root, root));
12710}
12711function pingSuspendedRoot(root, wakeable, pingedLanes) {
12712 var pingCache = root.pingCache;
12713 null !== pingCache && pingCache.delete(wakeable);
12714 root.pingedLanes |= root.suspendedLanes & pingedLanes;
12715 executionContext & 2
12716 ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0)
12717 : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0);
12718 throwIfInfiniteUpdateLoopDetected();
12719 workInProgressRoot === root &&
12720 (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&
12721 (4 === workInProgressRootExitStatus ||
12722 (3 === workInProgressRootExitStatus &&
12723 (workInProgressRootRenderLanes & 62914560) ===
12724 workInProgressRootRenderLanes &&
12725 300 > now() - globalMostRecentFallbackTime)
12726 ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)
12727 : (workInProgressRootPingedLanes |= pingedLanes));
12728 ensureRootIsScheduled(root);
12729}
12730function retryTimedOutBoundary(boundaryFiber, retryLane) {
12731 0 === retryLane && (retryLane = claimNextRetryLane());
12732 boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
12733 null !== boundaryFiber &&
12734 (markRootUpdated(boundaryFiber, retryLane),
12735 ensureRootIsScheduled(boundaryFiber));
12736}
12737function retryDehydratedSuspenseBoundary(boundaryFiber) {
12738 var suspenseState = boundaryFiber.memoizedState,
12739 retryLane = 0;
12740 null !== suspenseState && (retryLane = suspenseState.retryLane);
12741 retryTimedOutBoundary(boundaryFiber, retryLane);
12742}
12743function resolveRetryWakeable(boundaryFiber, wakeable) {
12744 var retryLane = 0;
12745 switch (boundaryFiber.tag) {
12746 case 13:
12747 var retryCache = boundaryFiber.stateNode;
12748 var suspenseState = boundaryFiber.memoizedState;
12749 null !== suspenseState && (retryLane = suspenseState.retryLane);
12750 break;
12751 case 19:
12752 retryCache = boundaryFiber.stateNode;
12753 break;
12754 case 22:
12755 retryCache = boundaryFiber.stateNode._retryCache;
12756 break;
12757 default:
12758 throw Error(formatProdErrorMessage(314));
12759 }
12760 null !== retryCache && retryCache.delete(wakeable);
12761 retryTimedOutBoundary(boundaryFiber, retryLane);
12762}
12763function throwIfInfiniteUpdateLoopDetected() {
12764 if (50 < nestedUpdateCount)
12765 throw (
12766 ((nestedUpdateCount = 0),
12767 (rootWithNestedUpdates = null),
12768 executionContext & 2 &&
12769 null !== workInProgressRoot &&
12770 (workInProgressRoot.errorRecoveryDisabledLanes |=
12771 workInProgressRootRenderLanes),
12772 Error(formatProdErrorMessage(185)))
12773 );
12774}
12775function scheduleCallback(priorityLevel, callback) {
12776 return scheduleCallback$3(priorityLevel, callback);
12777}
12778var eventsEnabled = null,
12779 selectionInformation = null;
12780function getOwnerDocumentFromRootContainer(rootContainerElement) {
12781 return 9 === rootContainerElement.nodeType
12782 ? rootContainerElement
12783 : rootContainerElement.ownerDocument;
12784}
12785function getOwnHostContext(namespaceURI) {
12786 switch (namespaceURI) {
12787 case "http://www.w3.org/2000/svg":
12788 return 1;
12789 case "http://www.w3.org/1998/Math/MathML":
12790 return 2;
12791 default:
12792 return 0;
12793 }
12794}
12795function getChildHostContextProd(parentNamespace, type) {
12796 if (0 === parentNamespace)
12797 switch (type) {
12798 case "svg":
12799 return 1;
12800 case "math":
12801 return 2;
12802 default:
12803 return 0;
12804 }
12805 return 1 === parentNamespace && "foreignObject" === type
12806 ? 0
12807 : parentNamespace;
12808}
12809function shouldSetTextContent(type, props) {
12810 return (
12811 "textarea" === type ||
12812 "noscript" === type ||
12813 "string" === typeof props.children ||
12814 "number" === typeof props.children ||
12815 "bigint" === typeof props.children ||
12816 ("object" === typeof props.dangerouslySetInnerHTML &&
12817 null !== props.dangerouslySetInnerHTML &&
12818 null != props.dangerouslySetInnerHTML.__html)
12819 );
12820}
12821var currentPopstateTransitionEvent = null;
12822function shouldAttemptEagerTransition() {
12823 var event = window.event;
12824 if (event && "popstate" === event.type) {
12825 if (event === currentPopstateTransitionEvent) return !1;
12826 currentPopstateTransitionEvent = event;
12827 return !0;
12828 }
12829 currentPopstateTransitionEvent = null;
12830 return !1;
12831}
12832var scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0,
12833 cancelTimeout = "function" === typeof clearTimeout ? clearTimeout : void 0,
12834 localPromise = "function" === typeof Promise ? Promise : void 0,
12835 scheduleMicrotask =
12836 "function" === typeof queueMicrotask
12837 ? queueMicrotask
12838 : "undefined" !== typeof localPromise
12839 ? function (callback) {
12840 return localPromise
12841 .resolve(null)
12842 .then(callback)
12843 .catch(handleErrorInNextTick);
12844 }
12845 : scheduleTimeout;
12846function handleErrorInNextTick(error) {
12847 setTimeout(function () {
12848 throw error;
12849 });
12850}
12851function clearSuspenseBoundary(parentInstance, suspenseInstance) {
12852 var node = suspenseInstance,
12853 depth = 0;
12854 do {
12855 var nextNode = node.nextSibling;
12856 parentInstance.removeChild(node);
12857 if (nextNode && 8 === nextNode.nodeType)
12858 if (((node = nextNode.data), "/$" === node)) {
12859 if (0 === depth) {
12860 parentInstance.removeChild(nextNode);
12861 retryIfBlockedOn(suspenseInstance);
12862 return;
12863 }
12864 depth--;
12865 } else ("$" !== node && "$?" !== node && "$!" !== node) || depth++;
12866 node = nextNode;
12867 } while (node);
12868 retryIfBlockedOn(suspenseInstance);
12869}
12870function clearContainerSparingly(container) {
12871 var nextNode = container.firstChild;
12872 nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
12873 for (; nextNode; ) {
12874 var node = nextNode;
12875 nextNode = nextNode.nextSibling;
12876 switch (node.nodeName) {
12877 case "HTML":
12878 case "HEAD":
12879 case "BODY":
12880 clearContainerSparingly(node);
12881 detachDeletedInstance(node);
12882 continue;
12883 case "SCRIPT":
12884 case "STYLE":
12885 continue;
12886 case "LINK":
12887 if ("stylesheet" === node.rel.toLowerCase()) continue;
12888 }
12889 container.removeChild(node);
12890 }
12891}
12892function canHydrateInstance(instance, type, props, inRootOrSingleton) {
12893 for (; 1 === instance.nodeType; ) {
12894 var anyProps = props;
12895 if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
12896 if (
12897 !inRootOrSingleton &&
12898 ("INPUT" !== instance.nodeName || "hidden" !== instance.type)
12899 )
12900 break;
12901 } else if (!inRootOrSingleton)
12902 if ("input" === type && "hidden" === instance.type) {
12903 var name = null == anyProps.name ? null : "" + anyProps.name;
12904 if (
12905 "hidden" === anyProps.type &&
12906 instance.getAttribute("name") === name
12907 )
12908 return instance;
12909 } else return instance;
12910 else if (!instance[internalHoistableMarker])
12911 switch (type) {
12912 case "meta":
12913 if (!instance.hasAttribute("itemprop")) break;
12914 return instance;
12915 case "link":
12916 name = instance.getAttribute("rel");
12917 if ("stylesheet" === name && instance.hasAttribute("data-precedence"))
12918 break;
12919 else if (
12920 name !== anyProps.rel ||
12921 instance.getAttribute("href") !==
12922 (null == anyProps.href ? null : anyProps.href) ||
12923 instance.getAttribute("crossorigin") !==
12924 (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||
12925 instance.getAttribute("title") !==
12926 (null == anyProps.title ? null : anyProps.title)
12927 )
12928 break;
12929 return instance;
12930 case "style":
12931 if (instance.hasAttribute("data-precedence")) break;
12932 return instance;
12933 case "script":
12934 name = instance.getAttribute("src");
12935 if (
12936 (name !== (null == anyProps.src ? null : anyProps.src) ||
12937 instance.getAttribute("type") !==
12938 (null == anyProps.type ? null : anyProps.type) ||
12939 instance.getAttribute("crossorigin") !==
12940 (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) &&
12941 name &&
12942 instance.hasAttribute("async") &&
12943 !instance.hasAttribute("itemprop")
12944 )
12945 break;
12946 return instance;
12947 default:
12948 return instance;
12949 }
12950 instance = getNextHydratable(instance.nextSibling);
12951 if (null === instance) break;
12952 }
12953 return null;
12954}
12955function canHydrateTextInstance(instance, text, inRootOrSingleton) {
12956 if ("" === text) return null;
12957 for (; 3 !== instance.nodeType; ) {
12958 if (
12959 (1 !== instance.nodeType ||
12960 "INPUT" !== instance.nodeName ||
12961 "hidden" !== instance.type) &&
12962 !inRootOrSingleton
12963 )
12964 return null;
12965 instance = getNextHydratable(instance.nextSibling);
12966 if (null === instance) return null;
12967 }
12968 return instance;
12969}
12970function getNextHydratable(node) {
12971 for (; null != node; node = node.nextSibling) {
12972 var nodeType = node.nodeType;
12973 if (1 === nodeType || 3 === nodeType) break;
12974 if (8 === nodeType) {
12975 nodeType = node.data;
12976 if (
12977 "$" === nodeType ||
12978 "$!" === nodeType ||
12979 "$?" === nodeType ||
12980 "F!" === nodeType ||
12981 "F" === nodeType
12982 )
12983 break;
12984 if ("/$" === nodeType) return null;
12985 }
12986 }
12987 return node;
12988}
12989function getParentSuspenseInstance(targetInstance) {
12990 targetInstance = targetInstance.previousSibling;
12991 for (var depth = 0; targetInstance; ) {
12992 if (8 === targetInstance.nodeType) {
12993 var data = targetInstance.data;
12994 if ("$" === data || "$!" === data || "$?" === data) {
12995 if (0 === depth) return targetInstance;
12996 depth--;
12997 } else "/$" === data && depth++;
12998 }
12999 targetInstance = targetInstance.previousSibling;
13000 }
13001 return null;
13002}
13003function resolveSingletonInstance(type, props, rootContainerInstance) {
13004 props = getOwnerDocumentFromRootContainer(rootContainerInstance);
13005 switch (type) {
13006 case "html":
13007 type = props.documentElement;
13008 if (!type) throw Error(formatProdErrorMessage(452));
13009 return type;
13010 case "head":
13011 type = props.head;
13012 if (!type) throw Error(formatProdErrorMessage(453));
13013 return type;
13014 case "body":
13015 type = props.body;
13016 if (!type) throw Error(formatProdErrorMessage(454));
13017 return type;
13018 default:
13019 throw Error(formatProdErrorMessage(451));
13020 }
13021}
13022var preloadPropsMap = new Map(),
13023 preconnectsSet = new Set();
13024function getHoistableRoot(container) {
13025 return "function" === typeof container.getRootNode
13026 ? container.getRootNode()
13027 : container.ownerDocument;
13028}
13029var previousDispatcher = ReactDOMSharedInternals.d;
13030ReactDOMSharedInternals.d = {
13031 f: flushSyncWork,
13032 r: requestFormReset,
13033 D: prefetchDNS,
13034 C: preconnect,
13035 L: preload,
13036 m: preloadModule,
13037 X: preinitScript,
13038 S: preinitStyle,
13039 M: preinitModuleScript
13040};
13041function flushSyncWork() {
13042 var previousWasRendering = previousDispatcher.f(),
13043 wasRendering = flushSyncWork$1();
13044 return previousWasRendering || wasRendering;
13045}
13046function requestFormReset(form) {
13047 var formInst = getInstanceFromNode(form);
13048 null !== formInst && 5 === formInst.tag && "form" === formInst.type
13049 ? requestFormReset$1(formInst)
13050 : previousDispatcher.r(form);
13051}
13052var globalDocument = "undefined" === typeof document ? null : document;
13053function preconnectAs(rel, href, crossOrigin) {
13054 var ownerDocument = globalDocument;
13055 if (ownerDocument && "string" === typeof href && href) {
13056 var limitedEscapedHref =
13057 escapeSelectorAttributeValueInsideDoubleQuotes(href);
13058 limitedEscapedHref =
13059 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
13060 "string" === typeof crossOrigin &&
13061 (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
13062 preconnectsSet.has(limitedEscapedHref) ||
13063 (preconnectsSet.add(limitedEscapedHref),
13064 (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),
13065 null === ownerDocument.querySelector(limitedEscapedHref) &&
13066 ((href = ownerDocument.createElement("link")),
13067 setInitialProperties(href, "link", rel),
13068 markNodeAsHoistable(href),
13069 ownerDocument.head.appendChild(href)));
13070 }
13071}
13072function prefetchDNS(href) {
13073 previousDispatcher.D(href);
13074 preconnectAs("dns-prefetch", href, null);
13075}
13076function preconnect(href, crossOrigin) {
13077 previousDispatcher.C(href, crossOrigin);
13078 preconnectAs("preconnect", href, crossOrigin);
13079}
13080function preload(href, as, options) {
13081 previousDispatcher.L(href, as, options);
13082 var ownerDocument = globalDocument;
13083 if (ownerDocument && href && as) {
13084 var preloadSelector =
13085 'link[rel="preload"][as="' +
13086 escapeSelectorAttributeValueInsideDoubleQuotes(as) +
13087 '"]';
13088 "image" === as
13089 ? options && options.imageSrcSet
13090 ? ((preloadSelector +=
13091 '[imagesrcset="' +
13092 escapeSelectorAttributeValueInsideDoubleQuotes(
13093 options.imageSrcSet
13094 ) +
13095 '"]'),
13096 "string" === typeof options.imageSizes &&
13097 (preloadSelector +=
13098 '[imagesizes="' +
13099 escapeSelectorAttributeValueInsideDoubleQuotes(
13100 options.imageSizes
13101 ) +
13102 '"]'))
13103 : (preloadSelector +=
13104 '[href="' +
13105 escapeSelectorAttributeValueInsideDoubleQuotes(href) +
13106 '"]')
13107 : (preloadSelector +=
13108 '[href="' +
13109 escapeSelectorAttributeValueInsideDoubleQuotes(href) +
13110 '"]');
13111 var key = preloadSelector;
13112 switch (as) {
13113 case "style":
13114 key = getStyleKey(href);
13115 break;
13116 case "script":
13117 key = getScriptKey(href);
13118 }
13119 preloadPropsMap.has(key) ||
13120 ((href = assign(
13121 {
13122 rel: "preload",
13123 href:
13124 "image" === as && options && options.imageSrcSet ? void 0 : href,
13125 as: as
13126 },
13127 options
13128 )),
13129 preloadPropsMap.set(key, href),
13130 null !== ownerDocument.querySelector(preloadSelector) ||
13131 ("style" === as &&
13132 ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) ||
13133 ("script" === as &&
13134 ownerDocument.querySelector(getScriptSelectorFromKey(key))) ||
13135 ((as = ownerDocument.createElement("link")),
13136 setInitialProperties(as, "link", href),
13137 markNodeAsHoistable(as),
13138 ownerDocument.head.appendChild(as)));
13139 }
13140}
13141function preloadModule(href, options) {
13142 previousDispatcher.m(href, options);
13143 var ownerDocument = globalDocument;
13144 if (ownerDocument && href) {
13145 var as = options && "string" === typeof options.as ? options.as : "script",
13146 preloadSelector =
13147 'link[rel="modulepreload"][as="' +
13148 escapeSelectorAttributeValueInsideDoubleQuotes(as) +
13149 '"][href="' +
13150 escapeSelectorAttributeValueInsideDoubleQuotes(href) +
13151 '"]',
13152 key = preloadSelector;
13153 switch (as) {
13154 case "audioworklet":
13155 case "paintworklet":
13156 case "serviceworker":
13157 case "sharedworker":
13158 case "worker":
13159 case "script":
13160 key = getScriptKey(href);
13161 }
13162 if (
13163 !preloadPropsMap.has(key) &&
13164 ((href = assign({ rel: "modulepreload", href: href }, options)),
13165 preloadPropsMap.set(key, href),
13166 null === ownerDocument.querySelector(preloadSelector))
13167 ) {
13168 switch (as) {
13169 case "audioworklet":
13170 case "paintworklet":
13171 case "serviceworker":
13172 case "sharedworker":
13173 case "worker":
13174 case "script":
13175 if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
13176 return;
13177 }
13178 as = ownerDocument.createElement("link");
13179 setInitialProperties(as, "link", href);
13180 markNodeAsHoistable(as);
13181 ownerDocument.head.appendChild(as);
13182 }
13183 }
13184}
13185function preinitStyle(href, precedence, options) {
13186 previousDispatcher.S(href, precedence, options);
13187 var ownerDocument = globalDocument;
13188 if (ownerDocument && href) {
13189 var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,
13190 key = getStyleKey(href);
13191 precedence = precedence || "default";
13192 var resource = styles.get(key);
13193 if (!resource) {
13194 var state = { loading: 0, preload: null };
13195 if (
13196 (resource = ownerDocument.querySelector(
13197 getStylesheetSelectorFromKey(key)
13198 ))
13199 )
13200 state.loading = 5;
13201 else {
13202 href = assign(
13203 { rel: "stylesheet", href: href, "data-precedence": precedence },
13204 options
13205 );
13206 (options = preloadPropsMap.get(key)) &&
13207 adoptPreloadPropsForStylesheet(href, options);
13208 var link = (resource = ownerDocument.createElement("link"));
13209 markNodeAsHoistable(link);
13210 setInitialProperties(link, "link", href);
13211 link._p = new Promise(function (resolve, reject) {
13212 link.onload = resolve;
13213 link.onerror = reject;
13214 });
13215 link.addEventListener("load", function () {
13216 state.loading |= 1;
13217 });
13218 link.addEventListener("error", function () {
13219 state.loading |= 2;
13220 });
13221 state.loading |= 4;
13222 insertStylesheet(resource, precedence, ownerDocument);
13223 }
13224 resource = {
13225 type: "stylesheet",
13226 instance: resource,
13227 count: 1,
13228 state: state
13229 };
13230 styles.set(key, resource);
13231 }
13232 }
13233}
13234function preinitScript(src, options) {
13235 previousDispatcher.X(src, options);
13236 var ownerDocument = globalDocument;
13237 if (ownerDocument && src) {
13238 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
13239 key = getScriptKey(src),
13240 resource = scripts.get(key);
13241 resource ||
13242 ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),
13243 resource ||
13244 ((src = assign({ src: src, async: !0 }, options)),
13245 (options = preloadPropsMap.get(key)) &&
13246 adoptPreloadPropsForScript(src, options),
13247 (resource = ownerDocument.createElement("script")),
13248 markNodeAsHoistable(resource),
13249 setInitialProperties(resource, "link", src),
13250 ownerDocument.head.appendChild(resource)),
13251 (resource = {
13252 type: "script",
13253 instance: resource,
13254 count: 1,
13255 state: null
13256 }),
13257 scripts.set(key, resource));
13258 }
13259}
13260function preinitModuleScript(src, options) {
13261 previousDispatcher.M(src, options);
13262 var ownerDocument = globalDocument;
13263 if (ownerDocument && src) {
13264 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
13265 key = getScriptKey(src),
13266 resource = scripts.get(key);
13267 resource ||
13268 ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),
13269 resource ||
13270 ((src = assign({ src: src, async: !0, type: "module" }, options)),
13271 (options = preloadPropsMap.get(key)) &&
13272 adoptPreloadPropsForScript(src, options),
13273 (resource = ownerDocument.createElement("script")),
13274 markNodeAsHoistable(resource),
13275 setInitialProperties(resource, "link", src),
13276 ownerDocument.head.appendChild(resource)),
13277 (resource = {
13278 type: "script",
13279 instance: resource,
13280 count: 1,
13281 state: null
13282 }),
13283 scripts.set(key, resource));
13284 }
13285}
13286function getResource(type, currentProps, pendingProps) {
13287 currentProps = (currentProps = rootInstanceStackCursor.current)
13288 ? getHoistableRoot(currentProps)
13289 : null;
13290 if (!currentProps) throw Error(formatProdErrorMessage(446));
13291 switch (type) {
13292 case "meta":
13293 case "title":
13294 return null;
13295 case "style":
13296 return "string" === typeof pendingProps.precedence &&
13297 "string" === typeof pendingProps.href
13298 ? ((pendingProps = getStyleKey(pendingProps.href)),
13299 (currentProps = getResourcesFromRoot(currentProps).hoistableStyles),
13300 (type = currentProps.get(pendingProps)),
13301 type ||
13302 ((type = { type: "style", instance: null, count: 0, state: null }),
13303 currentProps.set(pendingProps, type)),
13304 type)
13305 : { type: "void", instance: null, count: 0, state: null };
13306 case "link":
13307 if (
13308 "stylesheet" === pendingProps.rel &&
13309 "string" === typeof pendingProps.href &&
13310 "string" === typeof pendingProps.precedence
13311 ) {
13312 type = getStyleKey(pendingProps.href);
13313 var styles$226 = getResourcesFromRoot(currentProps).hoistableStyles,
13314 resource$227 = styles$226.get(type);
13315 resource$227 ||
13316 ((currentProps = currentProps.ownerDocument || currentProps),
13317 (resource$227 = {
13318 type: "stylesheet",
13319 instance: null,
13320 count: 0,
13321 state: { loading: 0, preload: null }
13322 }),
13323 styles$226.set(type, resource$227),
13324 preloadPropsMap.has(type) ||
13325 preloadStylesheet(
13326 currentProps,
13327 type,
13328 {
13329 rel: "preload",
13330 as: "style",
13331 href: pendingProps.href,
13332 crossOrigin: pendingProps.crossOrigin,
13333 integrity: pendingProps.integrity,
13334 media: pendingProps.media,
13335 hrefLang: pendingProps.hrefLang,
13336 referrerPolicy: pendingProps.referrerPolicy
13337 },
13338 resource$227.state
13339 ));
13340 return resource$227;
13341 }
13342 return null;
13343 case "script":
13344 return (
13345 (type = pendingProps.async),
13346 (pendingProps = pendingProps.src),
13347 "string" === typeof pendingProps &&
13348 type &&
13349 "function" !== typeof type &&
13350 "symbol" !== typeof type
13351 ? ((pendingProps = getScriptKey(pendingProps)),
13352 (currentProps =
13353 getResourcesFromRoot(currentProps).hoistableScripts),
13354 (type = currentProps.get(pendingProps)),
13355 type ||
13356 ((type = {
13357 type: "script",
13358 instance: null,
13359 count: 0,
13360 state: null
13361 }),
13362 currentProps.set(pendingProps, type)),
13363 type)
13364 : { type: "void", instance: null, count: 0, state: null }
13365 );
13366 default:
13367 throw Error(formatProdErrorMessage(444, type));
13368 }
13369}
13370function getStyleKey(href) {
13371 return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
13372}
13373function getStylesheetSelectorFromKey(key) {
13374 return 'link[rel="stylesheet"][' + key + "]";
13375}
13376function stylesheetPropsFromRawProps(rawProps) {
13377 return assign({}, rawProps, {
13378 "data-precedence": rawProps.precedence,
13379 precedence: null
13380 });
13381}
13382function preloadStylesheet(ownerDocument, key, preloadProps, state) {
13383 preloadPropsMap.set(key, preloadProps);
13384 ownerDocument.querySelector(getStylesheetSelectorFromKey(key)) ||
13385 (ownerDocument.querySelector('link[rel="preload"][as="style"][' + key + "]")
13386 ? (state.loading = 1)
13387 : ((key = ownerDocument.createElement("link")),
13388 (state.preload = key),
13389 key.addEventListener("load", function () {
13390 return (state.loading |= 1);
13391 }),
13392 key.addEventListener("error", function () {
13393 return (state.loading |= 2);
13394 }),
13395 setInitialProperties(key, "link", preloadProps),
13396 markNodeAsHoistable(key),
13397 ownerDocument.head.appendChild(key)));
13398}
13399function getScriptKey(src) {
13400 return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
13401}
13402function getScriptSelectorFromKey(key) {
13403 return "script[async]" + key;
13404}
13405function acquireResource(hoistableRoot, resource, props) {
13406 resource.count++;
13407 if (null === resource.instance)
13408 switch (resource.type) {
13409 case "style":
13410 var instance = hoistableRoot.querySelector(
13411 'style[data-href~="' +
13412 escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +
13413 '"]'
13414 );
13415 if (instance)
13416 return (
13417 (resource.instance = instance),
13418 markNodeAsHoistable(instance),
13419 instance
13420 );
13421 var styleProps = assign({}, props, {
13422 "data-href": props.href,
13423 "data-precedence": props.precedence,
13424 href: null,
13425 precedence: null
13426 });
13427 instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement(
13428 "style"
13429 );
13430 markNodeAsHoistable(instance);
13431 setInitialProperties(instance, "style", styleProps);
13432 insertStylesheet(instance, props.precedence, hoistableRoot);
13433 return (resource.instance = instance);
13434 case "stylesheet":
13435 styleProps = getStyleKey(props.href);
13436 var instance$231 = hoistableRoot.querySelector(
13437 getStylesheetSelectorFromKey(styleProps)
13438 );
13439 if (instance$231)
13440 return (
13441 (resource.state.loading |= 4),
13442 (resource.instance = instance$231),
13443 markNodeAsHoistable(instance$231),
13444 instance$231
13445 );
13446 instance = stylesheetPropsFromRawProps(props);
13447 (styleProps = preloadPropsMap.get(styleProps)) &&
13448 adoptPreloadPropsForStylesheet(instance, styleProps);
13449 instance$231 = (
13450 hoistableRoot.ownerDocument || hoistableRoot
13451 ).createElement("link");
13452 markNodeAsHoistable(instance$231);
13453 var linkInstance = instance$231;
13454 linkInstance._p = new Promise(function (resolve, reject) {
13455 linkInstance.onload = resolve;
13456 linkInstance.onerror = reject;
13457 });
13458 setInitialProperties(instance$231, "link", instance);
13459 resource.state.loading |= 4;
13460 insertStylesheet(instance$231, props.precedence, hoistableRoot);
13461 return (resource.instance = instance$231);
13462 case "script":
13463 instance$231 = getScriptKey(props.src);
13464 if (
13465 (styleProps = hoistableRoot.querySelector(
13466 getScriptSelectorFromKey(instance$231)
13467 ))
13468 )
13469 return (
13470 (resource.instance = styleProps),
13471 markNodeAsHoistable(styleProps),
13472 styleProps
13473 );
13474 instance = props;
13475 if ((styleProps = preloadPropsMap.get(instance$231)))
13476 (instance = assign({}, props)),
13477 adoptPreloadPropsForScript(instance, styleProps);
13478 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
13479 styleProps = hoistableRoot.createElement("script");
13480 markNodeAsHoistable(styleProps);
13481 setInitialProperties(styleProps, "link", instance);
13482 hoistableRoot.head.appendChild(styleProps);
13483 return (resource.instance = styleProps);
13484 case "void":
13485 return null;
13486 default:
13487 throw Error(formatProdErrorMessage(443, resource.type));
13488 }
13489 else
13490 "stylesheet" === resource.type &&
13491 0 === (resource.state.loading & 4) &&
13492 ((instance = resource.instance),
13493 (resource.state.loading |= 4),
13494 insertStylesheet(instance, props.precedence, hoistableRoot));
13495 return resource.instance;
13496}
13497function insertStylesheet(instance, precedence, root) {
13498 for (
13499 var nodes = root.querySelectorAll(
13500 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
13501 ),
13502 last = nodes.length ? nodes[nodes.length - 1] : null,
13503 prior = last,
13504 i = 0;
13505 i < nodes.length;
13506 i++
13507 ) {
13508 var node = nodes[i];
13509 if (node.dataset.precedence === precedence) prior = node;
13510 else if (prior !== last) break;
13511 }
13512 prior
13513 ? prior.parentNode.insertBefore(instance, prior.nextSibling)
13514 : ((precedence = 9 === root.nodeType ? root.head : root),
13515 precedence.insertBefore(instance, precedence.firstChild));
13516}
13517function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
13518 null == stylesheetProps.crossOrigin &&
13519 (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
13520 null == stylesheetProps.referrerPolicy &&
13521 (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
13522 null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);
13523}
13524function adoptPreloadPropsForScript(scriptProps, preloadProps) {
13525 null == scriptProps.crossOrigin &&
13526 (scriptProps.crossOrigin = preloadProps.crossOrigin);
13527 null == scriptProps.referrerPolicy &&
13528 (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
13529 null == scriptProps.integrity &&
13530 (scriptProps.integrity = preloadProps.integrity);
13531}
13532var tagCaches = null;
13533function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
13534 if (null === tagCaches) {
13535 var cache = new Map();
13536 var caches = (tagCaches = new Map());
13537 caches.set(ownerDocument, cache);
13538 } else
13539 (caches = tagCaches),
13540 (cache = caches.get(ownerDocument)),
13541 cache || ((cache = new Map()), caches.set(ownerDocument, cache));
13542 if (cache.has(type)) return cache;
13543 cache.set(type, null);
13544 ownerDocument = ownerDocument.getElementsByTagName(type);
13545 for (caches = 0; caches < ownerDocument.length; caches++) {
13546 var node = ownerDocument[caches];
13547 if (
13548 !(
13549 node[internalHoistableMarker] ||
13550 node[internalInstanceKey] ||
13551 ("link" === type && "stylesheet" === node.getAttribute("rel"))
13552 ) &&
13553 "http://www.w3.org/2000/svg" !== node.namespaceURI
13554 ) {
13555 var nodeKey = node.getAttribute(keyAttribute) || "";
13556 nodeKey = type + nodeKey;
13557 var existing = cache.get(nodeKey);
13558 existing ? existing.push(node) : cache.set(nodeKey, [node]);
13559 }
13560 }
13561 return cache;
13562}
13563function mountHoistable(hoistableRoot, type, instance) {
13564 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
13565 hoistableRoot.head.insertBefore(
13566 instance,
13567 "title" === type ? hoistableRoot.querySelector("head > title") : null
13568 );
13569}
13570function isHostHoistableType(type, props, hostContext) {
13571 if (1 === hostContext || null != props.itemProp) return !1;
13572 switch (type) {
13573 case "meta":
13574 case "title":
13575 return !0;
13576 case "style":
13577 if (
13578 "string" !== typeof props.precedence ||
13579 "string" !== typeof props.href ||
13580 "" === props.href
13581 )
13582 break;
13583 return !0;
13584 case "link":
13585 if (
13586 "string" !== typeof props.rel ||
13587 "string" !== typeof props.href ||
13588 "" === props.href ||
13589 props.onLoad ||
13590 props.onError
13591 )
13592 break;
13593 switch (props.rel) {
13594 case "stylesheet":
13595 return (
13596 (type = props.disabled),
13597 "string" === typeof props.precedence && null == type
13598 );
13599 default:
13600 return !0;
13601 }
13602 case "script":
13603 if (
13604 props.async &&
13605 "function" !== typeof props.async &&
13606 "symbol" !== typeof props.async &&
13607 !props.onLoad &&
13608 !props.onError &&
13609 props.src &&
13610 "string" === typeof props.src
13611 )
13612 return !0;
13613 }
13614 return !1;
13615}
13616var suspendedState = null;
13617function noop() {}
13618function suspendResource(hoistableRoot, resource, props) {
13619 if (null === suspendedState) throw Error(formatProdErrorMessage(475));
13620 var state = suspendedState;
13621 if (
13622 "stylesheet" === resource.type &&
13623 ("string" !== typeof props.media ||
13624 !1 !== matchMedia(props.media).matches) &&
13625 0 === (resource.state.loading & 4)
13626 ) {
13627 if (null === resource.instance) {
13628 var key = getStyleKey(props.href),
13629 instance = hoistableRoot.querySelector(
13630 getStylesheetSelectorFromKey(key)
13631 );
13632 if (instance) {
13633 hoistableRoot = instance._p;
13634 null !== hoistableRoot &&
13635 "object" === typeof hoistableRoot &&
13636 "function" === typeof hoistableRoot.then &&
13637 (state.count++,
13638 (state = onUnsuspend.bind(state)),
13639 hoistableRoot.then(state, state));
13640 resource.state.loading |= 4;
13641 resource.instance = instance;
13642 markNodeAsHoistable(instance);
13643 return;
13644 }
13645 instance = hoistableRoot.ownerDocument || hoistableRoot;
13646 props = stylesheetPropsFromRawProps(props);
13647 (key = preloadPropsMap.get(key)) &&
13648 adoptPreloadPropsForStylesheet(props, key);
13649 instance = instance.createElement("link");
13650 markNodeAsHoistable(instance);
13651 var linkInstance = instance;
13652 linkInstance._p = new Promise(function (resolve, reject) {
13653 linkInstance.onload = resolve;
13654 linkInstance.onerror = reject;
13655 });
13656 setInitialProperties(instance, "link", props);
13657 resource.instance = instance;
13658 }
13659 null === state.stylesheets && (state.stylesheets = new Map());
13660 state.stylesheets.set(resource, hoistableRoot);
13661 (hoistableRoot = resource.state.preload) &&
13662 0 === (resource.state.loading & 3) &&
13663 (state.count++,
13664 (resource = onUnsuspend.bind(state)),
13665 hoistableRoot.addEventListener("load", resource),
13666 hoistableRoot.addEventListener("error", resource));
13667 }
13668}
13669function waitForCommitToBeReady() {
13670 if (null === suspendedState) throw Error(formatProdErrorMessage(475));
13671 var state = suspendedState;
13672 state.stylesheets &&
13673 0 === state.count &&
13674 insertSuspendedStylesheets(state, state.stylesheets);
13675 return 0 < state.count
13676 ? function (commit) {
13677 var stylesheetTimer = setTimeout(function () {
13678 state.stylesheets &&
13679 insertSuspendedStylesheets(state, state.stylesheets);
13680 if (state.unsuspend) {
13681 var unsuspend = state.unsuspend;
13682 state.unsuspend = null;
13683 unsuspend();
13684 }
13685 }, 6e4);
13686 state.unsuspend = commit;
13687 return function () {
13688 state.unsuspend = null;
13689 clearTimeout(stylesheetTimer);
13690 };
13691 }
13692 : null;
13693}
13694function onUnsuspend() {
13695 this.count--;
13696 if (0 === this.count)
13697 if (this.stylesheets) insertSuspendedStylesheets(this, this.stylesheets);
13698 else if (this.unsuspend) {
13699 var unsuspend = this.unsuspend;
13700 this.unsuspend = null;
13701 unsuspend();
13702 }
13703}
13704var precedencesByRoot = null;
13705function insertSuspendedStylesheets(state, resources) {
13706 state.stylesheets = null;
13707 null !== state.unsuspend &&
13708 (state.count++,
13709 (precedencesByRoot = new Map()),
13710 resources.forEach(insertStylesheetIntoRoot, state),
13711 (precedencesByRoot = null),
13712 onUnsuspend.call(state));
13713}
13714function insertStylesheetIntoRoot(root, resource) {
13715 if (!(resource.state.loading & 4)) {
13716 var precedences = precedencesByRoot.get(root);
13717 if (precedences) var last = precedences.get(null);
13718 else {
13719 precedences = new Map();
13720 precedencesByRoot.set(root, precedences);
13721 for (
13722 var nodes = root.querySelectorAll(
13723 "link[data-precedence],style[data-precedence]"
13724 ),
13725 i = 0;
13726 i < nodes.length;
13727 i++
13728 ) {
13729 var node = nodes[i];
13730 if (
13731 "link" === node.nodeName ||
13732 "not all" !== node.getAttribute("media")
13733 )
13734 precedences.set(node.dataset.precedence, node), (last = node);
13735 }
13736 last && precedences.set(null, last);
13737 }
13738 nodes = resource.instance;
13739 node = nodes.getAttribute("data-precedence");
13740 i = precedences.get(node) || last;
13741 i === last && precedences.set(null, nodes);
13742 precedences.set(node, nodes);
13743 this.count++;
13744 last = onUnsuspend.bind(this);
13745 nodes.addEventListener("load", last);
13746 nodes.addEventListener("error", last);
13747 i
13748 ? i.parentNode.insertBefore(nodes, i.nextSibling)
13749 : ((root = 9 === root.nodeType ? root.head : root),
13750 root.insertBefore(nodes, root.firstChild));
13751 resource.state.loading |= 4;
13752 }
13753}
13754function FiberRootNode(
13755 containerInfo,
13756 tag,
13757 hydrate,
13758 identifierPrefix,
13759 onUncaughtError,
13760 onCaughtError,
13761 onRecoverableError,
13762 formState
13763) {
13764 this.tag = 1;
13765 this.containerInfo = containerInfo;
13766 this.finishedWork =
13767 this.pingCache =
13768 this.current =
13769 this.pendingChildren =
13770 null;
13771 this.timeoutHandle = -1;
13772 this.callbackNode =
13773 this.next =
13774 this.pendingContext =
13775 this.context =
13776 this.cancelPendingCommit =
13777 null;
13778 this.callbackPriority = 0;
13779 this.expirationTimes = createLaneMap(-1);
13780 this.entangledLanes =
13781 this.shellSuspendCounter =
13782 this.errorRecoveryDisabledLanes =
13783 this.finishedLanes =
13784 this.expiredLanes =
13785 this.pingedLanes =
13786 this.suspendedLanes =
13787 this.pendingLanes =
13788 0;
13789 this.entanglements = createLaneMap(0);
13790 this.hiddenUpdates = createLaneMap(null);
13791 this.identifierPrefix = identifierPrefix;
13792 this.onUncaughtError = onUncaughtError;
13793 this.onCaughtError = onCaughtError;
13794 this.onRecoverableError = onRecoverableError;
13795 this.pooledCache = null;
13796 this.pooledCacheLanes = 0;
13797 this.formState = formState;
13798 this.incompleteTransitions = new Map();
13799}
13800function createFiberRoot(
13801 containerInfo,
13802 tag,
13803 hydrate,
13804 initialChildren,
13805 hydrationCallbacks,
13806 isStrictMode,
13807 concurrentUpdatesByDefaultOverride,
13808 identifierPrefix,
13809 onUncaughtError,
13810 onCaughtError,
13811 onRecoverableError,
13812 transitionCallbacks,
13813 formState
13814) {
13815 containerInfo = new FiberRootNode(
13816 containerInfo,
13817 tag,
13818 hydrate,
13819 identifierPrefix,
13820 onUncaughtError,
13821 onCaughtError,
13822 onRecoverableError,
13823 formState
13824 );
13825 tag = 1;
13826 !0 === isStrictMode && (tag |= 24);
13827 isStrictMode = createFiber(3, null, null, tag);
13828 containerInfo.current = isStrictMode;
13829 isStrictMode.stateNode = containerInfo;
13830 tag = createCache();
13831 tag.refCount++;
13832 containerInfo.pooledCache = tag;
13833 tag.refCount++;
13834 isStrictMode.memoizedState = {
13835 element: initialChildren,
13836 isDehydrated: hydrate,
13837 cache: tag
13838 };
13839 initializeUpdateQueue(isStrictMode);
13840 return containerInfo;
13841}
13842function getContextForSubtree(parentComponent) {
13843 if (!parentComponent) return emptyContextObject;
13844 parentComponent = emptyContextObject;
13845 return parentComponent;
13846}
13847function updateContainerImpl(
13848 rootFiber,
13849 lane,
13850 element,
13851 container,
13852 parentComponent,
13853 callback
13854) {
13855 parentComponent = getContextForSubtree(parentComponent);
13856 null === container.context
13857 ? (container.context = parentComponent)
13858 : (container.pendingContext = parentComponent);
13859 container = createUpdate(lane);
13860 container.payload = { element: element };
13861 callback = void 0 === callback ? null : callback;
13862 null !== callback && (container.callback = callback);
13863 element = enqueueUpdate(rootFiber, container, lane);
13864 null !== element &&
13865 (scheduleUpdateOnFiber(element, rootFiber, lane),
13866 entangleTransitions(element, rootFiber, lane));
13867}
13868function markRetryLaneImpl(fiber, retryLane) {
13869 fiber = fiber.memoizedState;
13870 if (null !== fiber && null !== fiber.dehydrated) {
13871 var a = fiber.retryLane;
13872 fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
13873 }
13874}
13875function markRetryLaneIfNotHydrated(fiber, retryLane) {
13876 markRetryLaneImpl(fiber, retryLane);
13877 (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
13878}
13879function attemptContinuousHydration(fiber) {
13880 if (13 === fiber.tag) {
13881 var root = enqueueConcurrentRenderForLane(fiber, 67108864);
13882 null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);
13883 markRetryLaneIfNotHydrated(fiber, 67108864);
13884 }
13885}
13886function emptyFindFiberByHostInstance() {
13887 return null;
13888}
13889var _enabled = !0;
13890function dispatchDiscreteEvent(
13891 domEventName,
13892 eventSystemFlags,
13893 container,
13894 nativeEvent
13895) {
13896 var prevTransition = ReactSharedInternals.T;
13897 ReactSharedInternals.T = null;
13898 var previousPriority = ReactDOMSharedInternals.p;
13899 try {
13900 (ReactDOMSharedInternals.p = 2),
13901 dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
13902 } finally {
13903 (ReactDOMSharedInternals.p = previousPriority),
13904 (ReactSharedInternals.T = prevTransition);
13905 }
13906}
13907function dispatchContinuousEvent(
13908 domEventName,
13909 eventSystemFlags,
13910 container,
13911 nativeEvent
13912) {
13913 var prevTransition = ReactSharedInternals.T;
13914 ReactSharedInternals.T = null;
13915 var previousPriority = ReactDOMSharedInternals.p;
13916 try {
13917 (ReactDOMSharedInternals.p = 8),
13918 dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
13919 } finally {
13920 (ReactDOMSharedInternals.p = previousPriority),
13921 (ReactSharedInternals.T = prevTransition);
13922 }
13923}
13924function dispatchEvent(
13925 domEventName,
13926 eventSystemFlags,
13927 targetContainer,
13928 nativeEvent
13929) {
13930 if (_enabled) {
13931 var blockedOn = findInstanceBlockingEvent(nativeEvent);
13932 if (null === blockedOn)
13933 dispatchEventForPluginEventSystem(
13934 domEventName,
13935 eventSystemFlags,
13936 nativeEvent,
13937 return_targetInst,
13938 targetContainer
13939 ),
13940 clearIfContinuousEvent(domEventName, nativeEvent);
13941 else if (
13942 queueIfContinuousEvent(
13943 blockedOn,
13944 domEventName,
13945 eventSystemFlags,
13946 targetContainer,
13947 nativeEvent
13948 )
13949 )
13950 nativeEvent.stopPropagation();
13951 else if (
13952 (clearIfContinuousEvent(domEventName, nativeEvent),
13953 eventSystemFlags & 4 &&
13954 -1 < discreteReplayableEvents.indexOf(domEventName))
13955 ) {
13956 for (; null !== blockedOn; ) {
13957 var fiber = getInstanceFromNode(blockedOn);
13958 if (null !== fiber)
13959 switch (fiber.tag) {
13960 case 3:
13961 fiber = fiber.stateNode;
13962 if (fiber.current.memoizedState.isDehydrated) {
13963 var lanes = getHighestPriorityLanes(fiber.pendingLanes);
13964 if (0 !== lanes) {
13965 var root = fiber;
13966 root.pendingLanes |= 2;
13967 for (root.entangledLanes |= 2; lanes; ) {
13968 var lane = 1 << (31 - clz32(lanes));
13969 root.entanglements[1] |= lane;
13970 lanes &= ~lane;
13971 }
13972 ensureRootIsScheduled(fiber);
13973 0 === (executionContext & 6) &&
13974 ((workInProgressRootRenderTargetTime = now() + 500),
13975 flushSyncWorkAcrossRoots_impl(!1));
13976 }
13977 }
13978 break;
13979 case 13:
13980 (root = enqueueConcurrentRenderForLane(fiber, 2)),
13981 null !== root && scheduleUpdateOnFiber(root, fiber, 2),
13982 flushSyncWork$1(),
13983 markRetryLaneIfNotHydrated(fiber, 2);
13984 }
13985 fiber = findInstanceBlockingEvent(nativeEvent);
13986 null === fiber &&
13987 dispatchEventForPluginEventSystem(
13988 domEventName,
13989 eventSystemFlags,
13990 nativeEvent,
13991 return_targetInst,
13992 targetContainer
13993 );
13994 if (fiber === blockedOn) break;
13995 blockedOn = fiber;
13996 }
13997 null !== blockedOn && nativeEvent.stopPropagation();
13998 } else
13999 dispatchEventForPluginEventSystem(
14000 domEventName,
14001 eventSystemFlags,
14002 nativeEvent,
14003 null,
14004 targetContainer
14005 );
14006 }
14007}
14008function findInstanceBlockingEvent(nativeEvent) {
14009 nativeEvent = getEventTarget(nativeEvent);
14010 return findInstanceBlockingTarget(nativeEvent);
14011}
14012var return_targetInst = null;
14013function findInstanceBlockingTarget(targetNode) {
14014 return_targetInst = null;
14015 targetNode = getClosestInstanceFromNode(targetNode);
14016 if (null !== targetNode) {
14017 var nearestMounted = getNearestMountedFiber(targetNode);
14018 if (null === nearestMounted) targetNode = null;
14019 else {
14020 var tag = nearestMounted.tag;
14021 if (13 === tag) {
14022 targetNode = getSuspenseInstanceFromFiber(nearestMounted);
14023 if (null !== targetNode) return targetNode;
14024 targetNode = null;
14025 } else if (3 === tag) {
14026 if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
14027 return 3 === nearestMounted.tag
14028 ? nearestMounted.stateNode.containerInfo
14029 : null;
14030 targetNode = null;
14031 } else nearestMounted !== targetNode && (targetNode = null);
14032 }
14033 }
14034 return_targetInst = targetNode;
14035 return null;
14036}
14037function getEventPriority(domEventName) {
14038 switch (domEventName) {
14039 case "cancel":
14040 case "click":
14041 case "close":
14042 case "contextmenu":
14043 case "copy":
14044 case "cut":
14045 case "auxclick":
14046 case "dblclick":
14047 case "dragend":
14048 case "dragstart":
14049 case "drop":
14050 case "focusin":
14051 case "focusout":
14052 case "input":
14053 case "invalid":
14054 case "keydown":
14055 case "keypress":
14056 case "keyup":
14057 case "mousedown":
14058 case "mouseup":
14059 case "paste":
14060 case "pause":
14061 case "play":
14062 case "pointercancel":
14063 case "pointerdown":
14064 case "pointerup":
14065 case "ratechange":
14066 case "reset":
14067 case "resize":
14068 case "seeked":
14069 case "submit":
14070 case "touchcancel":
14071 case "touchend":
14072 case "touchstart":
14073 case "volumechange":
14074 case "change":
14075 case "selectionchange":
14076 case "textInput":
14077 case "compositionstart":
14078 case "compositionend":
14079 case "compositionupdate":
14080 case "beforeblur":
14081 case "afterblur":
14082 case "beforeinput":
14083 case "blur":
14084 case "fullscreenchange":
14085 case "focus":
14086 case "hashchange":
14087 case "popstate":
14088 case "select":
14089 case "selectstart":
14090 return 2;
14091 case "drag":
14092 case "dragenter":
14093 case "dragexit":
14094 case "dragleave":
14095 case "dragover":
14096 case "mousemove":
14097 case "mouseout":
14098 case "mouseover":
14099 case "pointermove":
14100 case "pointerout":
14101 case "pointerover":
14102 case "scroll":
14103 case "toggle":
14104 case "touchmove":
14105 case "wheel":
14106 case "mouseenter":
14107 case "mouseleave":
14108 case "pointerenter":
14109 case "pointerleave":
14110 return 8;
14111 case "message":
14112 switch (getCurrentPriorityLevel()) {
14113 case ImmediatePriority:
14114 return 2;
14115 case UserBlockingPriority:
14116 return 8;
14117 case NormalPriority$1:
14118 case LowPriority:
14119 return 32;
14120 case IdlePriority:
14121 return 268435456;
14122 default:
14123 return 32;
14124 }
14125 default:
14126 return 32;
14127 }
14128}
14129var hasScheduledReplayAttempt = !1,
14130 queuedFocus = null,
14131 queuedDrag = null,
14132 queuedMouse = null,
14133 queuedPointers = new Map(),
14134 queuedPointerCaptures = new Map(),
14135 queuedExplicitHydrationTargets = [],
14136 discreteReplayableEvents =
14137 "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(
14138 " "
14139 );
14140function clearIfContinuousEvent(domEventName, nativeEvent) {
14141 switch (domEventName) {
14142 case "focusin":
14143 case "focusout":
14144 queuedFocus = null;
14145 break;
14146 case "dragenter":
14147 case "dragleave":
14148 queuedDrag = null;
14149 break;
14150 case "mouseover":
14151 case "mouseout":
14152 queuedMouse = null;
14153 break;
14154 case "pointerover":
14155 case "pointerout":
14156 queuedPointers.delete(nativeEvent.pointerId);
14157 break;
14158 case "gotpointercapture":
14159 case "lostpointercapture":
14160 queuedPointerCaptures.delete(nativeEvent.pointerId);
14161 }
14162}
14163function accumulateOrCreateContinuousQueuedReplayableEvent(
14164 existingQueuedEvent,
14165 blockedOn,
14166 domEventName,
14167 eventSystemFlags,
14168 targetContainer,
14169 nativeEvent
14170) {
14171 if (
14172 null === existingQueuedEvent ||
14173 existingQueuedEvent.nativeEvent !== nativeEvent
14174 )
14175 return (
14176 (existingQueuedEvent = {
14177 blockedOn: blockedOn,
14178 domEventName: domEventName,
14179 eventSystemFlags: eventSystemFlags,
14180 nativeEvent: nativeEvent,
14181 targetContainers: [targetContainer]
14182 }),
14183 null !== blockedOn &&
14184 ((blockedOn = getInstanceFromNode(blockedOn)),
14185 null !== blockedOn && attemptContinuousHydration(blockedOn)),
14186 existingQueuedEvent
14187 );
14188 existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
14189 blockedOn = existingQueuedEvent.targetContainers;
14190 null !== targetContainer &&
14191 -1 === blockedOn.indexOf(targetContainer) &&
14192 blockedOn.push(targetContainer);
14193 return existingQueuedEvent;
14194}
14195function queueIfContinuousEvent(
14196 blockedOn,
14197 domEventName,
14198 eventSystemFlags,
14199 targetContainer,
14200 nativeEvent
14201) {
14202 switch (domEventName) {
14203 case "focusin":
14204 return (
14205 (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
14206 queuedFocus,
14207 blockedOn,
14208 domEventName,
14209 eventSystemFlags,
14210 targetContainer,
14211 nativeEvent
14212 )),
14213 !0
14214 );
14215 case "dragenter":
14216 return (
14217 (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
14218 queuedDrag,
14219 blockedOn,
14220 domEventName,
14221 eventSystemFlags,
14222 targetContainer,
14223 nativeEvent
14224 )),
14225 !0
14226 );
14227 case "mouseover":
14228 return (
14229 (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
14230 queuedMouse,
14231 blockedOn,
14232 domEventName,
14233 eventSystemFlags,
14234 targetContainer,
14235 nativeEvent
14236 )),
14237 !0
14238 );
14239 case "pointerover":
14240 var pointerId = nativeEvent.pointerId;
14241 queuedPointers.set(
14242 pointerId,
14243 accumulateOrCreateContinuousQueuedReplayableEvent(
14244 queuedPointers.get(pointerId) || null,
14245 blockedOn,
14246 domEventName,
14247 eventSystemFlags,
14248 targetContainer,
14249 nativeEvent
14250 )
14251 );
14252 return !0;
14253 case "gotpointercapture":
14254 return (
14255 (pointerId = nativeEvent.pointerId),
14256 queuedPointerCaptures.set(
14257 pointerId,
14258 accumulateOrCreateContinuousQueuedReplayableEvent(
14259 queuedPointerCaptures.get(pointerId) || null,
14260 blockedOn,
14261 domEventName,
14262 eventSystemFlags,
14263 targetContainer,
14264 nativeEvent
14265 )
14266 ),
14267 !0
14268 );
14269 }
14270 return !1;
14271}
14272function attemptExplicitHydrationTarget(queuedTarget) {
14273 var targetInst = getClosestInstanceFromNode(queuedTarget.target);
14274 if (null !== targetInst) {
14275 var nearestMounted = getNearestMountedFiber(targetInst);
14276 if (null !== nearestMounted)
14277 if (((targetInst = nearestMounted.tag), 13 === targetInst)) {
14278 if (
14279 ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),
14280 null !== targetInst)
14281 ) {
14282 queuedTarget.blockedOn = targetInst;
14283 runWithPriority(queuedTarget.priority, function () {
14284 if (13 === nearestMounted.tag) {
14285 var lane = requestUpdateLane(),
14286 root = enqueueConcurrentRenderForLane(nearestMounted, lane);
14287 null !== root &&
14288 scheduleUpdateOnFiber(root, nearestMounted, lane);
14289 markRetryLaneIfNotHydrated(nearestMounted, lane);
14290 }
14291 });
14292 return;
14293 }
14294 } else if (
14295 3 === targetInst &&
14296 nearestMounted.stateNode.current.memoizedState.isDehydrated
14297 ) {
14298 queuedTarget.blockedOn =
14299 3 === nearestMounted.tag
14300 ? nearestMounted.stateNode.containerInfo
14301 : null;
14302 return;
14303 }
14304 }
14305 queuedTarget.blockedOn = null;
14306}
14307function attemptReplayContinuousQueuedEvent(queuedEvent) {
14308 if (null !== queuedEvent.blockedOn) return !1;
14309 for (
14310 var targetContainers = queuedEvent.targetContainers;
14311 0 < targetContainers.length;
14312
14313 ) {
14314 var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
14315 if (null === nextBlockedOn) {
14316 nextBlockedOn = queuedEvent.nativeEvent;
14317 var nativeEventClone = new nextBlockedOn.constructor(
14318 nextBlockedOn.type,
14319 nextBlockedOn
14320 );
14321 currentReplayingEvent = nativeEventClone;
14322 nextBlockedOn.target.dispatchEvent(nativeEventClone);
14323 currentReplayingEvent = null;
14324 } else
14325 return (
14326 (targetContainers = getInstanceFromNode(nextBlockedOn)),
14327 null !== targetContainers &&
14328 attemptContinuousHydration(targetContainers),
14329 (queuedEvent.blockedOn = nextBlockedOn),
14330 !1
14331 );
14332 targetContainers.shift();
14333 }
14334 return !0;
14335}
14336function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
14337 attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
14338}
14339function replayUnblockedEvents() {
14340 hasScheduledReplayAttempt = !1;
14341 null !== queuedFocus &&
14342 attemptReplayContinuousQueuedEvent(queuedFocus) &&
14343 (queuedFocus = null);
14344 null !== queuedDrag &&
14345 attemptReplayContinuousQueuedEvent(queuedDrag) &&
14346 (queuedDrag = null);
14347 null !== queuedMouse &&
14348 attemptReplayContinuousQueuedEvent(queuedMouse) &&
14349 (queuedMouse = null);
14350 queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
14351 queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
14352}
14353function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
14354 queuedEvent.blockedOn === unblocked &&
14355 ((queuedEvent.blockedOn = null),
14356 hasScheduledReplayAttempt ||
14357 ((hasScheduledReplayAttempt = !0),
14358 Scheduler.unstable_scheduleCallback(
14359 Scheduler.unstable_NormalPriority,
14360 replayUnblockedEvents
14361 )));
14362}
14363var lastScheduledReplayQueue = null;
14364function scheduleReplayQueueIfNeeded(formReplayingQueue) {
14365 lastScheduledReplayQueue !== formReplayingQueue &&
14366 ((lastScheduledReplayQueue = formReplayingQueue),
14367 Scheduler.unstable_scheduleCallback(
14368 Scheduler.unstable_NormalPriority,
14369 function () {
14370 lastScheduledReplayQueue === formReplayingQueue &&
14371 (lastScheduledReplayQueue = null);
14372 for (var i = 0; i < formReplayingQueue.length; i += 3) {
14373 var form = formReplayingQueue[i],
14374 submitterOrAction = formReplayingQueue[i + 1],
14375 formData = formReplayingQueue[i + 2];
14376 if ("function" !== typeof submitterOrAction)
14377 if (null === findInstanceBlockingTarget(submitterOrAction || form))
14378 continue;
14379 else break;
14380 var formInst = getInstanceFromNode(form);
14381 null !== formInst &&
14382 (formReplayingQueue.splice(i, 3),
14383 (i -= 3),
14384 startHostTransition(
14385 formInst,
14386 {
14387 pending: !0,
14388 data: formData,
14389 method: form.method,
14390 action: submitterOrAction
14391 },
14392 submitterOrAction,
14393 formData
14394 ));
14395 }
14396 }
14397 ));
14398}
14399function retryIfBlockedOn(unblocked) {
14400 function unblock(queuedEvent) {
14401 return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
14402 }
14403 null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);
14404 null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
14405 null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);
14406 queuedPointers.forEach(unblock);
14407 queuedPointerCaptures.forEach(unblock);
14408 for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
14409 var queuedTarget = queuedExplicitHydrationTargets[i];
14410 queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
14411 }
14412 for (
14413 ;
14414 0 < queuedExplicitHydrationTargets.length &&
14415 ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);
14416
14417 )
14418 attemptExplicitHydrationTarget(i),
14419 null === i.blockedOn && queuedExplicitHydrationTargets.shift();
14420 i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
14421 if (null != i)
14422 for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
14423 var form = i[queuedTarget],
14424 submitterOrAction = i[queuedTarget + 1],
14425 formProps = form[internalPropsKey] || null;
14426 if ("function" === typeof submitterOrAction)
14427 formProps || scheduleReplayQueueIfNeeded(i);
14428 else if (formProps) {
14429 var action = null;
14430 if (submitterOrAction && submitterOrAction.hasAttribute("formAction"))
14431 if (
14432 ((form = submitterOrAction),
14433 (formProps = submitterOrAction[internalPropsKey] || null))
14434 )
14435 action = formProps.formAction;
14436 else {
14437 if (null !== findInstanceBlockingTarget(form)) continue;
14438 }
14439 else action = formProps.action;
14440 "function" === typeof action
14441 ? (i[queuedTarget + 1] = action)
14442 : (i.splice(queuedTarget, 3), (queuedTarget -= 3));
14443 scheduleReplayQueueIfNeeded(i);
14444 }
14445 }
14446}
14447function ReactDOMRoot(internalRoot) {
14448 this._internalRoot = internalRoot;
14449}
14450ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =
14451 function (children) {
14452 var root = this._internalRoot;
14453 if (null === root) throw Error(formatProdErrorMessage(409));
14454 var current = root.current,
14455 lane = requestUpdateLane();
14456 updateContainerImpl(current, lane, children, root, null, null);
14457 };
14458ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
14459 function () {
14460 var root = this._internalRoot;
14461 if (null !== root) {
14462 this._internalRoot = null;
14463 var container = root.containerInfo;
14464 0 === root.tag && flushPassiveEffects();
14465 updateContainerImpl(root.current, 2, null, root, null, null);
14466 flushSyncWork$1();
14467 container[internalContainerInstanceKey] = null;
14468 }
14469 };
14470function ReactDOMHydrationRoot(internalRoot) {
14471 this._internalRoot = internalRoot;
14472}
14473ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
14474 if (target) {
14475 var updatePriority = resolveUpdatePriority();
14476 target = { blockedOn: null, target: target, priority: updatePriority };
14477 for (
14478 var i = 0;
14479 i < queuedExplicitHydrationTargets.length &&
14480 0 !== updatePriority &&
14481 updatePriority < queuedExplicitHydrationTargets[i].priority;
14482 i++
14483 );
14484 queuedExplicitHydrationTargets.splice(i, 0, target);
14485 0 === i && attemptExplicitHydrationTarget(target);
14486 }
14487};
14488ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
14489 var fiber = componentOrElement._reactInternals;
14490 if (void 0 === fiber) {
14491 if ("function" === typeof componentOrElement.render)
14492 throw Error(formatProdErrorMessage(188));
14493 componentOrElement = Object.keys(componentOrElement).join(",");
14494 throw Error(formatProdErrorMessage(268, componentOrElement));
14495 }
14496 componentOrElement = findCurrentHostFiber(fiber);
14497 componentOrElement =
14498 null === componentOrElement ? null : componentOrElement.stateNode;
14499 return componentOrElement;
14500};
14501var devToolsConfig$jscomp$inline_1641 = {
14502 findFiberByHostInstance: getClosestInstanceFromNode,
14503 bundleType: 0,
14504 version: "19.0.0-beta-94eed63c49-20240425",
14505 rendererPackageName: "react-dom"
14506};
14507var internals$jscomp$inline_2019 = {
14508 bundleType: devToolsConfig$jscomp$inline_1641.bundleType,
14509 version: devToolsConfig$jscomp$inline_1641.version,
14510 rendererPackageName: devToolsConfig$jscomp$inline_1641.rendererPackageName,
14511 rendererConfig: devToolsConfig$jscomp$inline_1641.rendererConfig,
14512 overrideHookState: null,
14513 overrideHookStateDeletePath: null,
14514 overrideHookStateRenamePath: null,
14515 overrideProps: null,
14516 overridePropsDeletePath: null,
14517 overridePropsRenamePath: null,
14518 setErrorHandler: null,
14519 setSuspenseHandler: null,
14520 scheduleUpdate: null,
14521 currentDispatcherRef: ReactSharedInternals,
14522 findHostInstanceByFiber: function (fiber) {
14523 fiber = findCurrentHostFiber(fiber);
14524 return null === fiber ? null : fiber.stateNode;
14525 },
14526 findFiberByHostInstance:
14527 devToolsConfig$jscomp$inline_1641.findFiberByHostInstance ||
14528 emptyFindFiberByHostInstance,
14529 findHostInstancesForRefresh: null,
14530 scheduleRefresh: null,
14531 scheduleRoot: null,
14532 setRefreshHandler: null,
14533 getCurrentFiber: null,
14534 reconcilerVersion: "19.0.0-beta-94eed63c49-20240425"
14535};
14536if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
14537 var hook$jscomp$inline_2020 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
14538 if (
14539 !hook$jscomp$inline_2020.isDisabled &&
14540 hook$jscomp$inline_2020.supportsFiber
14541 )
14542 try {
14543 (rendererID = hook$jscomp$inline_2020.inject(
14544 internals$jscomp$inline_2019
14545 )),
14546 (injectedHook = hook$jscomp$inline_2020);
14547 } catch (err) {}
14548}
14549exports.createRoot = function (container, options) {
14550 if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
14551 var isStrictMode = !1,
14552 identifierPrefix = "",
14553 onUncaughtError = defaultOnUncaughtError,
14554 onCaughtError = defaultOnCaughtError,
14555 onRecoverableError = defaultOnRecoverableError,
14556 transitionCallbacks = null;
14557 null !== options &&
14558 void 0 !== options &&
14559 (!0 === options.unstable_strictMode && (isStrictMode = !0),
14560 void 0 !== options.identifierPrefix &&
14561 (identifierPrefix = options.identifierPrefix),
14562 void 0 !== options.onUncaughtError &&
14563 (onUncaughtError = options.onUncaughtError),
14564 void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),
14565 void 0 !== options.onRecoverableError &&
14566 (onRecoverableError = options.onRecoverableError),
14567 void 0 !== options.unstable_transitionCallbacks &&
14568 (transitionCallbacks = options.unstable_transitionCallbacks));
14569 options = createFiberRoot(
14570 container,
14571 1,
14572 !1,
14573 null,
14574 null,
14575 isStrictMode,
14576 !1,
14577 identifierPrefix,
14578 onUncaughtError,
14579 onCaughtError,
14580 onRecoverableError,
14581 transitionCallbacks,
14582 null
14583 );
14584 container[internalContainerInstanceKey] = options.current;
14585 listenToAllSupportedEvents(
14586 8 === container.nodeType ? container.parentNode : container
14587 );
14588 return new ReactDOMRoot(options);
14589};
14590exports.hydrateRoot = function (container, initialChildren, options) {
14591 if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
14592 var isStrictMode = !1,
14593 identifierPrefix = "",
14594 onUncaughtError = defaultOnUncaughtError,
14595 onCaughtError = defaultOnCaughtError,
14596 onRecoverableError = defaultOnRecoverableError,
14597 transitionCallbacks = null,
14598 formState = null;
14599 null !== options &&
14600 void 0 !== options &&
14601 (!0 === options.unstable_strictMode && (isStrictMode = !0),
14602 void 0 !== options.identifierPrefix &&
14603 (identifierPrefix = options.identifierPrefix),
14604 void 0 !== options.onUncaughtError &&
14605 (onUncaughtError = options.onUncaughtError),
14606 void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),
14607 void 0 !== options.onRecoverableError &&
14608 (onRecoverableError = options.onRecoverableError),
14609 void 0 !== options.unstable_transitionCallbacks &&
14610 (transitionCallbacks = options.unstable_transitionCallbacks),
14611 void 0 !== options.formState && (formState = options.formState));
14612 initialChildren = createFiberRoot(
14613 container,
14614 1,
14615 !0,
14616 initialChildren,
14617 null != options ? options : null,
14618 isStrictMode,
14619 !1,
14620 identifierPrefix,
14621 onUncaughtError,
14622 onCaughtError,
14623 onRecoverableError,
14624 transitionCallbacks,
14625 formState
14626 );
14627 initialChildren.context = getContextForSubtree(null);
14628 options = initialChildren.current;
14629 isStrictMode = requestUpdateLane();
14630 identifierPrefix = createUpdate(isStrictMode);
14631 identifierPrefix.callback = null;
14632 enqueueUpdate(options, identifierPrefix, isStrictMode);
14633 initialChildren.current.lanes = isStrictMode;
14634 markRootUpdated(initialChildren, isStrictMode);
14635 ensureRootIsScheduled(initialChildren);
14636 container[internalContainerInstanceKey] = initialChildren.current;
14637 listenToAllSupportedEvents(container);
14638 return new ReactDOMHydrationRoot(initialChildren);
14639};
14640exports.version = "19.0.0-beta-94eed63c49-20240425";